Updates to docs errors.

This commit is contained in:
Rowan Cockett
2016-05-29 18:57:38 -07:00
parent a131383dae
commit bc073e49b5
7 changed files with 56 additions and 24 deletions
+10 -10
View File
@@ -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
+14 -9
View File
@@ -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) \
+1
View File
@@ -0,0 +1 @@
from environmentSetup import supress_nonlocal_image_warn
+15
View File
@@ -0,0 +1,15 @@
def supress_nonlocal_image_warn():
import sphinx.environment
sphinx.environment.BuildEnvironment.warn_node = _supress_nonlocal_image_warn
def _supress_nonlocal_image_warn(self, msg, node):
from docutils.utils import get_source_line
if not msg.startswith('nonlocal image URI found:'):
self._warnfunc(msg, '%s:%s' % get_source_line(node))
if __name__ == '__main__':
checkDependencies()
+4 -2
View File
@@ -27,7 +27,8 @@ back to conductivity. This is a relatively trivial example (we are just taking
the exponential!) but by defining maps we can start to combine and manipulate
exactly what we think about as our model, \\\(m\\\). In code, this looks like
::
.. code-block:: python
:linenos:
M = Mesh.TensorMesh([100]) # Create a mesh
expMap = Maps.ExpMap(M) # Create a mapping
@@ -50,7 +51,8 @@ To do this we will introduce the vertical 1D map (:class:`SimPEG.Maps.SurjectVer
which does the first part of what we just described. The second part will be
done by the :class:`SimPEG.Maps.ExpMap` described above.
::
.. code-block:: python
:linenos:
M = Mesh.TensorMesh([7,5])
v1dMap = Maps.SurjectVertical1D(M)
+9 -3
View File
@@ -21,7 +21,7 @@ Solver Utilities
:undoc-members:
Curv Utilities
=============
==============
.. automodule:: SimPEG.Utils.curvutils
:members:
@@ -51,7 +51,10 @@ Interpolation Utilities
Counter Utilities
=================
::
.. code-block:: python
:linenos:
class MyClass(object):
def __init__(self, url):
self.counter = Counter()
@@ -69,7 +72,10 @@ Counter Utilities
for i in range(300): c.MySecondMethod()
c.counter.summary()
::
.. code-block:: text
:linenos:
Counters:
MyClass.MyMethod : 100
+3
View File
@@ -251,3 +251,6 @@ texinfo_documents = [
#texinfo_show_urls = 'footnote'
autodoc_member_order = 'bysource'
from _ext import supress_nonlocal_image_warn
supress_nonlocal_image_warn()