Moved modelBuilder into utils added some documentation

This commit is contained in:
Rowan Cockett
2013-08-30 22:17:05 -07:00
parent e11a3ccf65
commit b66c63759d
5 changed files with 43 additions and 30 deletions
+12 -9
View File
@@ -8,18 +8,21 @@ from utils import ndgrid, mkvc
class TensorMesh(BaseMesh, TensorView, DiffOperators, InnerProducts):
"""
TensorMesh is a mesh class that deals with tensor product meshes.
TensorMesh is a mesh class that deals with tensor product meshes.
Any Mesh that has a constant width along the entire axis
such that it can defined by a single width vector, called 'h'.
Any Mesh that has a constant width along the entire axis
such that it can defined by a single width vector, called 'h'.
e.g.
::
hx = np.array([1,1,1])
hy = np.array([1,2])
hz = np.array([1,1,1,1])
hx = np.array([1,1,1])
hy = np.array([1,2])
hz = np.array([1,1,1,1])
mesh = TensorMesh([hx, hy, hz])
mesh = TensorMesh([hx, hy, hz])
.. math::
x^2 = 5
"""
_meshType = 'TENSOR'
@@ -61,7 +64,7 @@ class TensorMesh(BaseMesh, TensorView, DiffOperators, InnerProducts):
outStr = outStr + ' {0:d}*{1:.2f},'.format(n,h)
return outStr[:-1]
if self.dim == 1:
outStr = outStr + '\n x0: {0:.2f}'.format(self.x0[0])
outStr = outStr + '\n nCx: {0:d}'.format(self.nCx)