
Public Member Functions | |
| MeshTransformationBase (const MeshType &meshType) | |
| Construct with a mesh type, which specifies the type of mesh to be built when the filter is applied. | |
| virtual | ~MeshTransformationBase () |
| virtual dtor | |
| virtual Mesh | apply (const Mesh &inputMesh) const =0 |
| Apply the filter to the given input mesh, producing an output mesh. | |
Printable interface | |
| virtual void | print (std::ostream &os) const |
| Print to a stream. | |
Describable interface | |
| virtual std::string | description () const |
| Print to a stream. | |
Protected Member Functions | |
| Mesh | createMesh (int dim, const MPIComm &comm) const |
| createMesh() allocates the mesh object with a call to meshType's createMesh() method. | |
Private Attributes | |
| MeshType | meshType_ |
Examples of filter operations are refinement, load balancing, and extrusion from 2D to 3D. The action of a mesh filter should be independent of the internal mesh representation used. To allow user-level specification of the type of internal mesh representation to be used, a MeshTransformationBase is constructed with a MeshType object which acts as a factory to produce empty output meshes.
If the communicator has more than one processor, the mesh created will be distributed.
The only method you will need to override is
virtual Mesh apply(const Mesh& inputMesh) const = 0 See the ExtrustionMeshTransformation source code for a very simple example of how to write a mesh filter subtype.
Optionally, you can override the description() method to provide more informative descriptive output than the std::string "MeshTransformationBase[unknown subtype]".
Definition at line 80 of file SundanceMeshTransformationBase.hpp.
| Sundance::MeshTransformationBase::MeshTransformationBase | ( | const MeshType & | meshType | ) | [inline] |
Construct with a mesh type, which specifies the type of mesh to be built when the filter is applied.
Definition at line 89 of file SundanceMeshTransformationBase.hpp.
| virtual Sundance::MeshTransformationBase::~MeshTransformationBase | ( | ) | [inline, virtual] |
| virtual Mesh Sundance::MeshTransformationBase::apply | ( | const Mesh & | inputMesh | ) | const [pure virtual] |
Apply the filter to the given input mesh, producing an output mesh.
Implemented in Sundance::ExtrusionMeshTransformation, and Sundance::RefinementTransformation.
createMesh() allocates the mesh object with a call to meshType's createMesh() method.
Definition at line 9 of file SundanceMeshTransformationBase.cpp.
References Sundance::MeshType::createEmptyMesh(), and meshType_.
Referenced by Sundance::ExtrusionMeshTransformation::apply().
| virtual std::string Sundance::MeshTransformationBase::description | ( | ) | const [inline, virtual] |
Print to a stream.
Reimplemented in Sundance::ExtrusionMeshTransformation.
Definition at line 109 of file SundanceMeshTransformationBase.hpp.
Referenced by print().
| virtual void Sundance::MeshTransformationBase::print | ( | std::ostream & | os | ) | const [inline, virtual] |
Print to a stream.
Implements Playa::Printable.
Definition at line 103 of file SundanceMeshTransformationBase.hpp.
References description().
Reimplemented in Sundance::RefinementTransformation.
Definition at line 121 of file SundanceMeshTransformationBase.hpp.
Referenced by createMesh().