⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 asol.m

📁 3D电阻率反演Matlab程序 RESINVM3D is a MATLAB package for inverting 3D Dc Resistivity and Electrical Resi
💻 M
字号:
function[V] = Asol(MTX,u,tol)
% [V] = Asol(MTX,u,tol)
% Calculates the 3D Dc res forward modeling matrix times a vector
% it solves Av = u (in this notation) or v = A^-1*u

% Copyright (c) 2007 by the Society of Exploration Geophysicists.
% For more information, go to http://software.seg.org/2007/0001 .
% You must read and accept usage terms at:
% http://software.seg.org/disclaimer.txt before use.
% 
% Revision history:
% Original SEG version by Adam Pidlisecky and Eldad Haber
% Last update, July 2006

nit = 500;
I = speye(size(MTX.FOR));
 
A = MTX.FOR;
[n,n] = size(MTX.FOR);


fprintf('           A sol    ');
%calculate the potentials for each source term -  sources in a q = array(nx*ny*nz,# 0f source dipoles)

if size(u,1) > size(MTX.FOR,1);
    %put the long vector into a new arrangement for solving in parts
    u = reshape(u,size(MTX.FOR,1),size(u,1)/size(MTX.FOR,1));
end    
  %
%initialize the potential vector
V = zeros(n,size(u,2)); 

for i=1:size(u,2),
   qi = u(:,i);
   qi = qi(MTX.p);
 
   v = bicgstb(A,qi, MTX.PL, MTX.PU, nit, tol);
 
   %arrange as a vector
   v = v(MTX.up);
  V(:,i) =  v;

   fprintf('.');          
end;
disp(' ');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -