start of getting any field from any formulation

This commit is contained in:
Lindsey
2015-12-08 18:11:01 -08:00
parent 7c0be4ec50
commit 884d27b541
6 changed files with 235 additions and 76 deletions
+10
View File
@@ -233,6 +233,10 @@ class BaseTensorMesh(BaseMesh):
'Fz' -> z-component of field defined on faces
'N' -> scalar field defined on nodes
'CC' -> scalar field defined on cell centers
# 'CCVx' -> x-component of a field defined on cell centers
# 'CCVy' -> y-component of a field defined on cell centers
# 'CCVz' -> z-component of a field defined on cell centers
"""
if self._meshType == 'CYL' and self.isSymmetric and locType in ['Ex','Ez','Fy']:
raise Exception('Symmetric CylMesh does not support %s interpolation, as this variable does not exist.' % locType)
@@ -256,6 +260,12 @@ class BaseTensorMesh(BaseMesh):
Q = sp.hstack(components)
elif locType in ['CC', 'N']:
Q = Utils.interpmat(loc, *self.getTensor(locType))
# elif locType in ['CCVx', 'CCVy', 'CCVz']:
# Q = Utils.interpmat(loc, 'CC')
# Zero = 0.*Q
else:
raise NotImplementedError('getInterpolationMat: locType=='+locType+' and mesh.dim=='+str(self.dim))