mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-11 11:26:01 +08:00
docs clean-up (using autoclass is more stable than automodule)
This commit is contained in:
+6
-6
@@ -34,8 +34,8 @@ class IdentityMap(object):
|
||||
"""
|
||||
The default shape is (mesh.nC, nP).
|
||||
|
||||
:rtype: (int,int)
|
||||
:return: shape of the operator as a tuple
|
||||
:rtype: tuple
|
||||
:return: shape of the operator as a tuple (int,int)
|
||||
"""
|
||||
if self.mesh is None:
|
||||
return ('*', self.nP)
|
||||
@@ -77,7 +77,7 @@ class IdentityMap(object):
|
||||
The derivative of the transformation.
|
||||
|
||||
:param numpy.array m: model
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: derivative of transformed model
|
||||
|
||||
"""
|
||||
@@ -206,7 +206,7 @@ class ExpMap(IdentityMap):
|
||||
def deriv(self, m):
|
||||
"""
|
||||
:param numpy.array m: model
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: derivative of transformed model
|
||||
|
||||
The *transform* changes the model into the physical property.
|
||||
@@ -350,7 +350,7 @@ class Vertical1DMap(IdentityMap):
|
||||
def deriv(self, m):
|
||||
"""
|
||||
:param numpy.array m: model
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: derivative of transformed model
|
||||
"""
|
||||
repNum = self.mesh.vnC[:self.mesh.dim-1].prod()
|
||||
@@ -405,7 +405,7 @@ class Map2Dto3D(IdentityMap):
|
||||
def deriv(self, m):
|
||||
"""
|
||||
:param numpy.array m: model
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: derivative of transformed model
|
||||
"""
|
||||
inds = self * np.arange(self.nP)
|
||||
|
||||
+18
-16
@@ -7,8 +7,8 @@ class BaseMesh(object):
|
||||
BaseMesh does all the counting you don't want to do.
|
||||
BaseMesh should be inherited by meshes with a regular structure.
|
||||
|
||||
:param numpy.array,list n: number of cells in each direction (dim, )
|
||||
:param numpy.array,list x0: Origin of the mesh (dim, )
|
||||
:param numpy.array n: (or list) number of cells in each direction (dim, )
|
||||
:param numpy.array x0: (or list) Origin of the mesh (dim, )
|
||||
|
||||
"""
|
||||
|
||||
@@ -34,8 +34,8 @@ class BaseMesh(object):
|
||||
"""
|
||||
Origin of the mesh
|
||||
|
||||
:rtype: numpy.array (dim, )
|
||||
:return: x0
|
||||
:rtype: numpy.array
|
||||
:return: x0, (dim, )
|
||||
"""
|
||||
return self._x0
|
||||
|
||||
@@ -116,8 +116,8 @@ class BaseMesh(object):
|
||||
"""
|
||||
Total number of edges in each direction
|
||||
|
||||
:rtype: numpy.array (dim, )
|
||||
:return: [nEx, nEy, nEz]
|
||||
:rtype: numpy.array
|
||||
:return: [nEx, nEy, nEz], (dim, )
|
||||
|
||||
.. plot::
|
||||
:include-source:
|
||||
@@ -173,8 +173,8 @@ class BaseMesh(object):
|
||||
"""
|
||||
Total number of faces in each direction
|
||||
|
||||
:rtype: numpy.array (dim, )
|
||||
:return: [nFx, nFy, nFz]
|
||||
:rtype: numpy.array
|
||||
:return: [nFx, nFy, nFz], (dim, )
|
||||
|
||||
.. plot::
|
||||
:include-source:
|
||||
@@ -200,8 +200,8 @@ class BaseMesh(object):
|
||||
"""
|
||||
Face Normals
|
||||
|
||||
:rtype: numpy.array (sum(nF), dim)
|
||||
:return: normals
|
||||
:rtype: numpy.array
|
||||
:return: normals, (sum(nF), dim)
|
||||
"""
|
||||
if self.dim == 2:
|
||||
nX = np.c_[np.ones(self.nFx), np.zeros(self.nFx)]
|
||||
@@ -218,8 +218,8 @@ class BaseMesh(object):
|
||||
"""
|
||||
Edge Tangents
|
||||
|
||||
:rtype: numpy.array (sum(nE), dim)
|
||||
:return: normals
|
||||
:rtype: numpy.array
|
||||
:return: normals, (sum(nE), dim)
|
||||
"""
|
||||
if self.dim == 2:
|
||||
tX = np.c_[np.ones(self.nEx), np.zeros(self.nEx)]
|
||||
@@ -236,8 +236,9 @@ class BaseMesh(object):
|
||||
Given a vector, fV, in cartesian coordinates, this will project it onto the mesh using the normals
|
||||
|
||||
:param numpy.array fV: face vector with shape (nF, dim)
|
||||
:rtype: numpy.array with shape (nF, )
|
||||
:return: projected face vector
|
||||
:rtype: numpy.array
|
||||
:return: projected face vector, (nF, )
|
||||
|
||||
"""
|
||||
assert isinstance(fV, np.ndarray), 'fV must be an ndarray'
|
||||
assert len(fV.shape) == 2 and fV.shape[0] == self.nF and fV.shape[1] == self.dim, 'fV must be an ndarray of shape (nF x dim)'
|
||||
@@ -248,8 +249,9 @@ class BaseMesh(object):
|
||||
Given a vector, eV, in cartesian coordinates, this will project it onto the mesh using the tangents
|
||||
|
||||
:param numpy.array eV: edge vector with shape (nE, dim)
|
||||
:rtype: numpy.array with shape (nE, )
|
||||
:return: projected edge vector
|
||||
:rtype: numpy.array
|
||||
:return: projected edge vector, (nE, )
|
||||
|
||||
"""
|
||||
assert isinstance(eV, np.ndarray), 'eV must be an ndarray'
|
||||
assert len(eV.shape) == 2 and eV.shape[0] == self.nE and eV.shape[1] == self.dim, 'eV must be an ndarray of shape (nE x dim)'
|
||||
|
||||
@@ -16,7 +16,7 @@ class InnerProducts(object):
|
||||
:param bool invProp: inverts the material property
|
||||
:param bool invMat: inverts the matrix
|
||||
:param bool doFast: do a faster implementation if available.
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: M, the inner product matrix (nF, nF)
|
||||
"""
|
||||
return self._getInnerProduct('F', prop=prop, invProp=invProp, invMat=invMat, doFast=doFast)
|
||||
@@ -27,7 +27,7 @@ class InnerProducts(object):
|
||||
:param bool invProp: inverts the material property
|
||||
:param bool invMat: inverts the matrix
|
||||
:param bool doFast: do a faster implementation if available.
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: M, the inner product matrix (nE, nE)
|
||||
"""
|
||||
return self._getInnerProduct('E', prop=prop, invProp=invProp, invMat=invMat, doFast=doFast)
|
||||
@@ -39,7 +39,7 @@ class InnerProducts(object):
|
||||
:param bool invProp: inverts the material property
|
||||
:param bool invMat: inverts the matrix
|
||||
:param bool doFast: do a faster implementation if available.
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: M, the inner product matrix (nE, nE)
|
||||
"""
|
||||
assert projType in ['F', 'E'], "projType must be 'F' for faces or 'E' for edges"
|
||||
@@ -121,7 +121,7 @@ class InnerProducts(object):
|
||||
Given u, dMdmu returns (nF, nC*nA)
|
||||
|
||||
:param np.ndarray u: vector that multiplies dMdmu
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: dMdmu, the derivative of the inner product matrix for a certain u
|
||||
"""
|
||||
return self._getInnerProductDeriv(prop, 'F', doFast=doFast, invProp=invProp, invMat=invMat)
|
||||
@@ -133,7 +133,7 @@ class InnerProducts(object):
|
||||
:param bool doFast: do a faster implementation if available.
|
||||
:param bool invProp: inverts the material property
|
||||
:param bool invMat: inverts the matrix
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: dMdm, the derivative of the inner product matrix (nE, nC*nA)
|
||||
"""
|
||||
return self._getInnerProductDeriv(prop, 'E', doFast=doFast, invProp=invProp, invMat=invMat)
|
||||
@@ -145,7 +145,7 @@ class InnerProducts(object):
|
||||
:param bool doFast: do a faster implementation if available.
|
||||
:param bool invProp: inverts the material property
|
||||
:param bool invMat: inverts the matrix
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: dMdm, the derivative of the inner product matrix (nE, nC*nA)
|
||||
"""
|
||||
fast = None
|
||||
@@ -169,7 +169,7 @@ class InnerProducts(object):
|
||||
:param numpy.array v: vector to multiply (required in the general implementation)
|
||||
:param list P: list of projection matrices
|
||||
:param str projType: 'F' for faces 'E' for edges
|
||||
:rtype: scipy.csr_matrix
|
||||
:rtype: scipy.sparse.csr_matrix
|
||||
:return: dMdm, the derivative of the inner product matrix (n, nC*nA)
|
||||
"""
|
||||
assert projType in ['F', 'E'], "projType must be 'F' for faces or 'E' for edges"
|
||||
|
||||
Reference in New Issue
Block a user