Raise exceptions when trying to interpolate fields that don't exist in the CylMesh

This commit is contained in:
rowanc1
2014-05-02 15:05:31 -07:00
parent f31caf2d61
commit d6210072cd
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -229,6 +229,8 @@ class BaseTensorMesh(BaseRectangularMesh):
'N' -> scalar field defined on nodes
'CC' -> scalar 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)
loc = Utils.asArray_N_x_Dim(loc, self.dim)