Added nCv property to BaseMesh and Cyl1DMesh classes.

This commit is contained in:
Dave Marchant
2013-11-18 11:06:35 -08:00
parent a950ba8dd1
commit 8992f195a4
2 changed files with 17 additions and 0 deletions
+11
View File
@@ -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
+6
View File
@@ -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