From a7f89131b461160b175f53471ea8807aa55131b5 Mon Sep 17 00:00:00 2001 From: seogi_macbook Date: Tue, 3 May 2016 11:26:28 -0700 Subject: [PATCH] Playing with 2.5D DC inversion TODOs: Parallelize ky ... (currently pretty slow) --- SimPEG/EM/Static/DC/ProblemDC_2D.py | 2 ++ SimPEG/EM/Static/Utils/StaticUtils.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SimPEG/EM/Static/DC/ProblemDC_2D.py b/SimPEG/EM/Static/DC/ProblemDC_2D.py index 86f9dc72..2e40fde9 100644 --- a/SimPEG/EM/Static/DC/ProblemDC_2D.py +++ b/SimPEG/EM/Static/DC/ProblemDC_2D.py @@ -50,6 +50,7 @@ class BaseDCProblem_2D(BaseEMProblem): dky = np.r_[dky[0], dky] y = 0. + #TODO: this loop is pretty slow .. (Parellize) for iky in range(self.nky): ky = self.kys[iky] A = self.getA(ky) @@ -94,6 +95,7 @@ class BaseDCProblem_2D(BaseEMProblem): for rx in src.rxList: Jtv_temp1 = np.zeros(m.size) Jtv_temp0 = np.zeros(m.size) + #TODO: this loop is pretty slow .. (Parellize) for iky in range(self.nky): u_src = f[src, self._solutionType, iky] ky = self.kys[iky] diff --git a/SimPEG/EM/Static/Utils/StaticUtils.py b/SimPEG/EM/Static/Utils/StaticUtils.py index 43181c8a..d8e0d0c8 100644 --- a/SimPEG/EM/Static/Utils/StaticUtils.py +++ b/SimPEG/EM/Static/Utils/StaticUtils.py @@ -213,7 +213,6 @@ def gen_DCIPsurvey(endl, mesh, stype, a, b, n): # Pole-dipole: Moving pole on one end -> [A a MN1 a MN2 ... MNn a B] SrcList = [] - if stype != 'gradient': for ii in range(0, int(nstn)-1): @@ -262,6 +261,7 @@ def gen_DCIPsurvey(endl, mesh, stype, a, b, n): srcClass = DC.Src.Pole([rxClass], M[ii,:]) SrcList.append(srcClass) + # TODO: test gradient array! elif stype == 'gradient': # Gradient survey only requires Tx at end of line and creates a square