Sundance::MeshTransformationBase Class Reference

Inheritance diagram for Sundance::MeshTransformationBase:

Playa::Handleable< MeshTransformationBase > Playa::Printable Sundance::Noncopyable Sundance::ObjectWithClassVerbosity< MeshTransformationBase > Playa::ObjectWithVerbosity Sundance::ExtrusionMeshTransformation Sundance::RefinementTransformation

List of all members.

Public Member Functions

 MeshTransformationBase (const MeshType &meshType)
virtual ~MeshTransformationBase ()
virtual Mesh apply (const Mesh &inputMesh) const =0
Printable interface


virtual void print (std::ostream &os) const
Describable interface


virtual std::string description () const

Protected Member Functions

Mesh createMesh (int dim, const MPIComm &comm) const

Private Attributes

MeshType meshType_


Detailed Description

MeshSourceBase provides the internal interface for mesh filters, i.e., objects that take an input mesh and produce a new mesh. 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.

Writing your own MeshTransformationBase subtype

The only method you will need to override is

which is where you do the filter action and return an output mesh. This method should usually physically create the mesh with a call to createMesh(), ensuring that the correct mesh representation type is created using the MeshType factory with which the filter was constructed.

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.


Constructor & Destructor Documentation

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 dtor

Definition at line 93 of file SundanceMeshTransformationBase.hpp.


Member Function Documentation

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.

Mesh MeshTransformationBase::createMesh ( int  dim,
const MPIComm comm 
) const [protected]

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().


Member Data Documentation

Reimplemented in Sundance::RefinementTransformation.

Definition at line 121 of file SundanceMeshTransformationBase.hpp.

Referenced by createMesh().

Site Contact