mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-07 22:23:06 +08:00
minor fixes.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import numpy as np
|
||||
from scipy.constants import mu_0, pi
|
||||
from scipy import special
|
||||
|
||||
def DCAnalyticHalf(txloc, rxlocs, sigma, flag="wholespace"):
|
||||
"""
|
||||
@@ -36,7 +37,7 @@ deg2rad = lambda deg: deg/180.*np.pi
|
||||
rad2deg = lambda rad: rad*180./np.pi
|
||||
|
||||
def DCAnalyticSphere(txloc, rxloc, xc, radius, sigma, sigma1, \
|
||||
flag = "sec", order=12):
|
||||
flag = "sec", order=12, halfspace=False):
|
||||
# def DCSpherePointCurrent(txloc, rxloc, xc, radius, rho, rho1, \
|
||||
# flag = "sec", order=12):
|
||||
"""
|
||||
@@ -99,10 +100,15 @@ def DCAnalyticSphere(txloc, rxloc, xc, radius, sigma, sigma1, \
|
||||
|
||||
out[~sphind] += prim[~sphind]
|
||||
|
||||
if halfspace:
|
||||
scale = 2
|
||||
else:
|
||||
scale = 1
|
||||
|
||||
if flag == "sec":
|
||||
return out-prim
|
||||
return scale*(out-prim)
|
||||
elif flag == "total":
|
||||
return out
|
||||
return scale*out
|
||||
|
||||
def AnBnfun(n, radius, x0, rho, rho1, I=1.):
|
||||
const = I*rho/(4*np.pi)
|
||||
|
||||
@@ -5,7 +5,7 @@ import numpy as np
|
||||
|
||||
class BaseSrc(SimPEG.Survey.BaseSrc):
|
||||
|
||||
current = 1
|
||||
current = 1.0
|
||||
loc = None
|
||||
|
||||
def __init__(self, rxList, **kwargs):
|
||||
@@ -33,7 +33,7 @@ class Dipole(BaseSrc):
|
||||
elif prob._formulation == 'EB':
|
||||
qa = prob.mesh.getInterpolationMat(self.loc[0], locType='N').todense()
|
||||
qb = -prob.mesh.getInterpolationMat(self.loc[1], locType='N').todense()
|
||||
q = mkvc(qa+qb)
|
||||
q = self.current * mkvc(qa+qb)
|
||||
return q
|
||||
|
||||
# def bc_contribution
|
||||
|
||||
@@ -3,4 +3,5 @@ from SurveyDC import Survey
|
||||
import SrcDC as Src #Pole
|
||||
import RxDC as Rx
|
||||
from FieldsDC import Fields_CC
|
||||
from BoundaryUtils import getxBCyBC_CC
|
||||
import Utils
|
||||
|
||||
Reference in New Issue
Block a user