From bc073e49b54a46306cde328c7fc0b4283e4828d4 Mon Sep 17 00:00:00 2001 From: Rowan Cockett Date: Sun, 29 May 2016 18:57:38 -0700 Subject: [PATCH] Updates to docs errors. --- SimPEG/EM/FDEM/FieldsFDEM.py | 20 ++++++++++---------- SimPEG/Utils/meshutils.py | 23 ++++++++++++++--------- docs/_ext/__init__.py | 1 + docs/_ext/environmentSetup.py | 15 +++++++++++++++ docs/api_Maps.rst | 6 ++++-- docs/api_Utils.rst | 12 +++++++++--- docs/conf.py | 3 +++ 7 files changed, 56 insertions(+), 24 deletions(-) create mode 100644 docs/_ext/__init__.py create mode 100644 docs/_ext/environmentSetup.py diff --git a/SimPEG/EM/FDEM/FieldsFDEM.py b/SimPEG/EM/FDEM/FieldsFDEM.py index 253b9984..c2e4bfa6 100644 --- a/SimPEG/EM/FDEM/FieldsFDEM.py +++ b/SimPEG/EM/FDEM/FieldsFDEM.py @@ -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 diff --git a/SimPEG/Utils/meshutils.py b/SimPEG/Utils/meshutils.py index eb5d13a1..1415e7b8 100644 --- a/SimPEG/Utils/meshutils.py +++ b/SimPEG/Utils/meshutils.py @@ -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]xmin) & (mesh.gridCC[:,0]ymin) & (mesh.gridCC[:,1]xmin) & (mesh.gridCC[:,0]ymin) & (mesh.gridCC[:,1]