def setUp(self): npad = 10 cs = 12.5 hx = [(cs, npad, -1.4), (cs, 61), (cs, npad, 1.4)] hy = [(cs, npad, -1.4), (cs, 20)] mesh = TensorMesh([hx, hy], x0="CN") sighalf = 1e-2 sigma = np.ones(mesh.nC) * sighalf x = mesh.cell_centers_x[ np.logical_and(mesh.cell_centers_x > -150, mesh.cell_centers_x < 250) ] M = utils.ndgrid(x, np.r_[0.0]) N = utils.ndgrid(x + 12.5 * 4, np.r_[0.0]) A0loc = np.r_[-200, 0.0] A1loc = np.r_[-250, 0.0] rx = dc.receivers.Dipole(M, N, data_type="apparent_resistivity") src0 = dc.sources.Dipole([rx], A0loc, A1loc) survey = dc.Survey([src0]) self.survey = survey self.mesh = mesh self.sigma = sigma self.sigma_half = sighalf self.plotIt = False try: from pymatsolver import Pardiso self.solver = Pardiso except ImportError: self.solver = SolverLU
def setUp(self): cs = 12.5 hx = [(cs, 7, -1.3), (cs, 61), (cs, 7, 1.3)] hy = [(cs, 7, -1.3), (cs, 20)] mesh = TensorMesh([hx, hy], x0="CN") sighalf = 1e-2 sigma = np.ones(mesh.nC) * sighalf x = np.linspace(-135, 250.0, 20) M = utils.ndgrid(x - 12.5, np.r_[0.0]) N = utils.ndgrid(x + 12.5, np.r_[0.0]) A0loc = np.r_[-150, 0.0] # A1loc = np.r_[-130, 0.] rxloc = [np.c_[M, np.zeros(20)], np.c_[N, np.zeros(20)]] data_ana = analytics.DCAnalytic_Pole_Dipole(np.r_[A0loc, 0.0], rxloc, sighalf, earth_type="halfspace") rx = dc.receivers.Dipole(M, N) src0 = dc.sources.Pole([rx], A0loc) survey = dc.Survey([src0]) self.survey = survey self.mesh = mesh self.sigma = sigma self.data_ana = data_ana self.plotIt = False try: from pymatsolver import Pardiso self.Solver = Pardiso except ImportError: self.Solver = SolverLU
def setUp(self): cs = 12.5 hx = [(cs, 7, -1.3), (cs, 61), (cs, 7, 1.3)] hy = [(cs, 7, -1.3), (cs, 20)] mesh = TensorMesh([hx, hy], x0="CN") sighalf = 1e-2 sigma = np.ones(mesh.nC) * sighalf x = np.linspace(-135, 250.0, 20) M = utils.ndgrid(x - 12.5, np.r_[0.0]) N = utils.ndgrid(x + 12.5, np.r_[0.0]) A0loc = np.r_[-150, 0.0] A1loc = np.r_[-130, 0.0] rx = dc.receivers.Dipole(M, N, data_type="apparent_resistivity") src0 = dc.sources.Dipole([rx], A0loc, A1loc) survey = dc.Survey([src0]) self.survey = survey self.mesh = mesh self.sigma = sigma self.sigma_half = sighalf self.plotIt = False try: from pymatsolver import Pardiso self.Solver = Pardiso except ImportError: self.Solver = SolverLU
def setUp(self): mesh = discretize.TensorMesh([30, 30], x0=[-0.5, -1.0]) sigma = np.random.rand(mesh.nC) model = np.log(sigma) # prob = DC.Simulation3DCellCentered(mesh, rhoMap=maps.ExpMap(mesh)) # prob1 = DC.Simulation3DCellCentered(mesh, rhoMap=maps.ExpMap(mesh)) rx = DC.Rx.Pole(utils.ndgrid([mesh.vectorCCx, np.r_[mesh.vectorCCy.max()]])) rx1 = DC.Rx.Pole(utils.ndgrid([mesh.vectorCCx, np.r_[mesh.vectorCCy.min()]])) src = DC.Src.Dipole( [rx], np.r_[-0.25, mesh.vectorCCy.max()], np.r_[0.25, mesh.vectorCCy.max()] ) src1 = DC.Src.Dipole( [rx1], np.r_[-0.25, mesh.vectorCCy.max()], np.r_[0.25, mesh.vectorCCy.max()] ) survey = DC.Survey([src]) simulation0 = DC.simulation.Simulation3DCellCentered( mesh=mesh, survey=survey, rhoMap=maps.ExpMap(mesh) ) survey1 = DC.Survey([src1]) simulation1 = DC.simulation.Simulation3DCellCentered( mesh=mesh, survey=survey1, rhoMap=maps.ExpMap(mesh) ) dobs0 = simulation0.make_synthetic_data(model) dobs1 = simulation1.make_synthetic_data(model) self.mesh = mesh self.model = model self.survey0 = survey self.sim0 = simulation0 self.survey1 = survey1 self.sim1 = simulation1 # self.dmis0 = data_misfit.L2DataMisfit(self.survey0) self.dmis0 = data_misfit.L2DataMisfit(data=dobs0, simulation=simulation0) self.dmis1 = data_misfit.L2DataMisfit(data=dobs1, simulation=simulation1) self.dmiscombo = self.dmis0 + self.dmis1
def setUp(self): cs = 12.5 hx = [(cs, 7, -1.3), (cs, 61), (cs, 7, 1.3)] hy = [(cs, 7, -1.3), (cs, 20)] mesh = discretize.TensorMesh([hx, hy], x0="CN") x = np.linspace(-200, 200.0, 20) M = utils.ndgrid(x - 12.5, np.r_[0.0]) N = utils.ndgrid(x + 12.5, np.r_[0.0]) A0loc = np.r_[-150, 0.0] A1loc = np.r_[-130, 0.0] B0loc = np.r_[-130, 0.0] B1loc = np.r_[-110, 0.0] rx = dc.Rx.Dipole(M, N) src0 = dc.Src.Dipole([rx], A0loc, B0loc) src1 = dc.Src.Dipole([rx], A1loc, B1loc) src0_ip = dc.Src.Dipole([rx], A0loc, B0loc) src1_ip = dc.Src.Dipole([rx], A1loc, B1loc) source_lists = [src0, src1] source_lists_ip = [src0_ip, src1_ip] surveyDC = dc.Survey([src0, src1]) sigmaInf = np.ones(mesh.nC) * 1.0 blkind = utils.model_builder.getIndicesSphere(np.r_[0, -150], 40, mesh.gridCC) eta = np.zeros(mesh.nC) eta[blkind] = 0.1 sigma0 = sigmaInf * (1.0 - eta) self.surveyDC = surveyDC self.mesh = mesh self.sigmaInf = sigmaInf self.sigma0 = sigma0 self.source_lists = source_lists self.source_lists_ip = source_lists_ip self.eta = eta
def setUp(self): npad = 10 cs = 12.5 hx = [(cs, npad, -1.4), (cs, 61), (cs, npad, 1.4)] hy = [(cs, npad, -1.4), (cs, 20)] mesh = TensorMesh([hx, hy], x0="CN") sighalf = 1e-2 sigma = np.ones(mesh.nC) * sighalf x = mesh.cell_centers_x[ np.logical_and(mesh.cell_centers_x > -150, mesh.cell_centers_x < 250) ] M = utils.ndgrid(x, np.r_[0.0]) N = utils.ndgrid(x + 12.5 * 4, np.r_[0.0]) A0loc = np.r_[-200, 0.0] A1loc = np.r_[-250, 0.0] rxloc = [np.c_[M, np.zeros(x.size)], np.c_[N, np.zeros(x.size)]] data_ana_A = analytics.DCAnalytic_Pole_Dipole( np.r_[A0loc, 0.0], rxloc, sighalf, earth_type="halfspace" ) data_ana_b = analytics.DCAnalytic_Pole_Dipole( np.r_[A1loc, 0.0], rxloc, sighalf, earth_type="halfspace" ) data_ana = data_ana_A - data_ana_b rx = dc.receivers.Dipole(M, N) src0 = dc.sources.Dipole([rx], A0loc, A1loc) survey = dc.Survey([src0]) self.survey = survey self.mesh = mesh self.sigma = sigma self.data_ana = data_ana self.plotIt = False try: from pymatsolver import Pardiso self.solver = Pardiso except ImportError: self.solver = SolverLU