Source code for Mordicus.Modules.Cemosis.Containers.Meshes.FeelppUnstructuredMesh
# -*- coding: utf-8 -*-
from Mordicus.Core.Containers.Meshes.MeshBase import MeshBase
import feelpp
[docs]class FeelppUnstructuredMesh(MeshBase):
"""
Class containing a wrapper for Feel++ Mesh
Attributes
----------
__storage : feelpp.Containers.UnstructuredMesh
"""
def __init__(self, mesh):
"""
Parameters
----------
mesh : Feel++ mesh
the mesh wrapped to this library
"""
super(FeelppUnstructuredMesh, self).__init__()
self.SetInternalStorage(mesh)
[docs] def GetNodes(self):
return self.GetInternalStorage().nodes()
[docs] def AllElementsIterator(self):
return feelpp.elements(self.GetInternalStorage())
[docs] def GetDimensionality(self):
return self.GetInternalStorage().realDimension()
[docs] def GetNumberOfNodes(self):
return self.GetInternalStorage().numGlobalPoints()
def __str__(self):
res = str(self.GetInternalStorage())
return res