mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-04 10:12:45 +08:00
Added nCv property to BaseMesh and Cyl1DMesh classes.
This commit is contained in:
@@ -228,6 +228,17 @@ class BaseMesh(object):
|
||||
return locals()
|
||||
nC = property(**nC())
|
||||
|
||||
def nCv():
|
||||
doc = """
|
||||
Total number of cells in each direction
|
||||
|
||||
:rtype: numpy.array (dim, )
|
||||
:return: [nCx, nCy, nCz]
|
||||
"""
|
||||
fget = lambda self: np.array([x for x in [self.nCx, self.nCy, self.nCz] if not x is None])
|
||||
return locals()
|
||||
nCv = property(**nCv())
|
||||
|
||||
def nNx():
|
||||
doc = """
|
||||
Number of nodes in the x-direction
|
||||
|
||||
@@ -80,6 +80,12 @@ class Cyl1DMesh(object):
|
||||
return locals()
|
||||
nC = property(**nC())
|
||||
|
||||
def nCv():
|
||||
doc = "Total number of cells in each direction"
|
||||
fget = lambda self: np.array([self.nCx, self.nCz])
|
||||
return locals()
|
||||
nCv = property(**nCv())
|
||||
|
||||
def nNr():
|
||||
doc = "Number of nodes in the radial direction"
|
||||
fget = lambda self: self.hr.size
|
||||
|
||||
Reference in New Issue
Block a user