mirror of
https://github.com/wassname/simpeg.git
synced 2026-09-10 12:37:30 +08:00
Updates to docs errors.
This commit is contained in:
@@ -165,7 +165,7 @@ class Fields3D_e(Fields):
|
||||
Fields object for Problem3D_e.
|
||||
|
||||
:param Mesh mesh: mesh
|
||||
:param Survey survey: survey
|
||||
:param SimPEG.EM.FDEM.SurveyFDEM.Survey survey: survey
|
||||
"""
|
||||
|
||||
knownFields = {'eSolution':'E'}
|
||||
@@ -431,7 +431,7 @@ class Fields3D_b(Fields):
|
||||
Fields object for Problem3D_b.
|
||||
|
||||
:param Mesh mesh: mesh
|
||||
:param Survey survey: survey
|
||||
:param SimPEG.EM.FDEM.SurveyFDEM.Survey survey: survey
|
||||
"""
|
||||
|
||||
knownFields = {'bSolution':'F'}
|
||||
@@ -446,8 +446,8 @@ class Fields3D_b(Fields):
|
||||
'h' : ['bSolution','CCV','_h'],
|
||||
}
|
||||
|
||||
def __init__(self,mesh,survey,**kwargs):
|
||||
Fields.__init__(self,mesh,survey,**kwargs)
|
||||
def __init__(self, mesh, survey, **kwargs):
|
||||
Fields.__init__(self, mesh, survey, **kwargs)
|
||||
|
||||
def startup(self):
|
||||
self.prob = self.survey.prob
|
||||
@@ -698,7 +698,7 @@ class Fields3D_j(Fields):
|
||||
Fields object for Problem3D_j.
|
||||
|
||||
:param Mesh mesh: mesh
|
||||
:param Survey survey: survey
|
||||
:param SimPEG.EM.FDEM.SurveyFDEM.Survey survey: survey
|
||||
"""
|
||||
|
||||
knownFields = {'jSolution':'F'}
|
||||
@@ -713,8 +713,8 @@ class Fields3D_j(Fields):
|
||||
'b' : ['jSolution','CCV','_b'],
|
||||
}
|
||||
|
||||
def __init__(self,mesh,survey,**kwargs):
|
||||
Fields.__init__(self,mesh,survey,**kwargs)
|
||||
def __init__(self, mesh, survey, **kwargs):
|
||||
Fields.__init__(self, mesh, survey, **kwargs)
|
||||
|
||||
def startup(self):
|
||||
self.prob = self.survey.prob
|
||||
@@ -993,7 +993,7 @@ class Fields3D_h(Fields):
|
||||
Fields object for Problem3D_h.
|
||||
|
||||
:param Mesh mesh: mesh
|
||||
:param Survey survey: survey
|
||||
:param SimPEG.EM.FDEM.SurveyFDEM.Survey survey: survey
|
||||
"""
|
||||
|
||||
knownFields = {'hSolution':'E'}
|
||||
@@ -1008,8 +1008,8 @@ class Fields3D_h(Fields):
|
||||
'b' : ['hSolution','CCV','_b'],
|
||||
}
|
||||
|
||||
def __init__(self,mesh,survey,**kwargs):
|
||||
Fields.__init__(self,mesh,survey,**kwargs)
|
||||
def __init__(self, mesh, survey, **kwargs):
|
||||
Fields.__init__(self, mesh, survey, **kwargs)
|
||||
|
||||
def startup(self):
|
||||
self.prob = self.survey.prob
|
||||
|
||||
@@ -105,15 +105,20 @@ def closestPoints(mesh, pts, gridLoc='CC'):
|
||||
def ExtractCoreMesh(xyzlim, mesh, meshType='tensor'):
|
||||
"""
|
||||
Extracts Core Mesh from Global mesh
|
||||
xyzlim: 2D array [ndim x 2]
|
||||
mesh: SimPEG mesh
|
||||
This function ouputs:
|
||||
|
||||
:param numpy.ndarray xyzlim: 2D array [ndim x 2]
|
||||
:param simpeg.Mesh.BaseMesh mesh: The mesh
|
||||
|
||||
This function ouputs::
|
||||
|
||||
- actind: corresponding boolean index from global to core
|
||||
- meshcore: core SimPEG mesh
|
||||
|
||||
Warning: 1D and 2D has not been tested
|
||||
|
||||
"""
|
||||
from SimPEG import Mesh
|
||||
if mesh.dim ==1:
|
||||
if mesh.dim == 1:
|
||||
xyzlim = xyzlim.flatten()
|
||||
xmin, xmax = xyzlim[0], xyzlim[1]
|
||||
|
||||
@@ -125,11 +130,11 @@ def ExtractCoreMesh(xyzlim, mesh, meshType='tensor'):
|
||||
|
||||
x0 = [xc[0]-hx[0]*0.5, yc[0]-hy[0]*0.5]
|
||||
|
||||
meshCore = Mesh.TensorMesh([hx, hy] ,x0=x0)
|
||||
meshCore = Mesh.TensorMesh([hx, hy], x0=x0)
|
||||
|
||||
actind = (mesh.gridCC[:,0]>xmin) & (mesh.gridCC[:,0]<xmax)
|
||||
|
||||
elif mesh.dim ==2:
|
||||
elif mesh.dim == 2:
|
||||
xmin, xmax = xyzlim[0,0], xyzlim[0,1]
|
||||
ymin, ymax = xyzlim[1,0], xyzlim[1,1]
|
||||
|
||||
@@ -144,12 +149,12 @@ def ExtractCoreMesh(xyzlim, mesh, meshType='tensor'):
|
||||
|
||||
x0 = [xc[0]-hx[0]*0.5, yc[0]-hy[0]*0.5]
|
||||
|
||||
meshCore = Mesh.TensorMesh([hx, hy] ,x0=x0)
|
||||
meshCore = Mesh.TensorMesh([hx, hy], x0=x0)
|
||||
|
||||
actind = (mesh.gridCC[:,0]>xmin) & (mesh.gridCC[:,0]<xmax) \
|
||||
& (mesh.gridCC[:,1]>ymin) & (mesh.gridCC[:,1]<ymax) \
|
||||
|
||||
elif mesh.dim==3:
|
||||
elif mesh.dim == 3:
|
||||
xmin, xmax = xyzlim[0,0], xyzlim[0,1]
|
||||
ymin, ymax = xyzlim[1,0], xyzlim[1,1]
|
||||
zmin, zmax = xyzlim[2,0], xyzlim[2,1]
|
||||
@@ -168,7 +173,7 @@ def ExtractCoreMesh(xyzlim, mesh, meshType='tensor'):
|
||||
|
||||
x0 = [xc[0]-hx[0]*0.5, yc[0]-hy[0]*0.5, zc[0]-hz[0]*0.5]
|
||||
|
||||
meshCore = Mesh.TensorMesh([hx, hy, hz] ,x0=x0)
|
||||
meshCore = Mesh.TensorMesh([hx, hy, hz], x0=x0)
|
||||
|
||||
actind = (mesh.gridCC[:,0]>xmin) & (mesh.gridCC[:,0]<xmax) \
|
||||
& (mesh.gridCC[:,1]>ymin) & (mesh.gridCC[:,1]<ymax) \
|
||||
|
||||
Reference in New Issue
Block a user