Chaste  Build::
DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <DiscreteContinuumMeshGenerator.hpp>

+ Collaboration diagram for DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 DiscreteContinuumMeshGenerator ()
 
 ~DiscreteContinuumMeshGenerator ()
 
boost::shared_ptr< DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM > > GetMesh ()
 
void SetDomain (boost::shared_ptr< Part< SPACE_DIM > > pDomain)
 
void SetDomain (vtkSmartPointer< vtkPolyData > pDomain)
 
void SetDomain (const std::string &rPathToStl)
 
void SetMaxElementArea (units::quantity< unit::volume > maxElementArea)
 
void SetHoles (std::vector< DimensionalChastePoint< SPACE_DIM > > holes)
 
void SetRegionMarkers (std::vector< DimensionalChastePoint< SPACE_DIM > > regionMarkers)
 
void Update ()
 

Static Public Member Functions

static boost::shared_ptr< DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM > > Create ()
 

Private Member Functions

void Mesh2d ()
 
void Mesh3d ()
 
void MeshStl3d ()
 
void InitialiseTriangulateIo (triangulateio &mesherIo)
 
void FreeTriangulateIo (triangulateio &mesherIo)
 

Private Attributes

units::quantity< unit::volume > mMaxElementArea
 
boost::shared_ptr< DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM > > mpMesh
 
boost::shared_ptr< Part< SPACE_DIM > > mpDomain
 
vtkSmartPointer< vtkPolyData > mpVtkDomain
 
std::string mStlFilePath
 
std::vector< DimensionalChastePoint< SPACE_DIM > > mHoles
 
std::vector< DimensionalChastePoint< SPACE_DIM > > mRegions
 
std::vector< unsigned > mAttributes
 
units::quantity< unit::length > mReferenceLength
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
class DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >

This class is for generating 2d and 3d finite element meshes using triangle and tetgen.

Definition at line 59 of file DiscreteContinuumMesh.hpp.

Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::DiscreteContinuumMeshGenerator ( )

Constructor

Definition at line 55 of file DiscreteContinuumMeshGenerator.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::~DiscreteContinuumMeshGenerator ( )

Destructor

Definition at line 77 of file DiscreteContinuumMeshGenerator.cpp.

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
boost::shared_ptr< DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM > > DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::Create ( )
static

Factory constructor method

Returns
a shared pointer to a new mesh generator

Definition at line 70 of file DiscreteContinuumMeshGenerator.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::FreeTriangulateIo ( triangulateio &  mesherIo)
private

This is the same as the TetrahedralMesh implementation of InitialiseTriangulateIo but avoids some templating

Parameters
mesherIothe mesher input

Definition at line 516 of file DiscreteContinuumMeshGenerator.cpp.

Referenced by DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::Mesh2d().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
boost::shared_ptr< DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM > > DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::GetMesh ( )

Return the mesh

Returns
the mesh

Definition at line 83 of file DiscreteContinuumMeshGenerator.cpp.

References DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mpMesh.

Referenced by ImageToMesh< DIM >::Update().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::InitialiseTriangulateIo ( triangulateio &  mesherIo)
private

This is the same as the TetrahedralMesh implementation of InitialiseTriangulateIo but avoids some templating

Parameters
mesherIothe mesher input

Definition at line 496 of file DiscreteContinuumMeshGenerator.cpp.

Referenced by DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::Mesh2d().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::SetDomain ( boost::shared_ptr< Part< SPACE_DIM > >  pDomain)

Set the domain for meshing

Parameters
pDomainthe domain for meshing

Definition at line 93 of file DiscreteContinuumMeshGenerator.cpp.

References DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mpDomain.

Referenced by ImageToMesh< DIM >::Update().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::SetDomain ( vtkSmartPointer< vtkPolyData >  pDomain)

Set the domain for meshing

Parameters
pDomainthe domain for meshing

Definition at line 99 of file DiscreteContinuumMeshGenerator.cpp.

References DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mpVtkDomain.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::SetDomain ( const std::string &  rPathToStl)

Set the domain for meshing

Parameters
rPathToStlthe path to the stl for meshing

Definition at line 105 of file DiscreteContinuumMeshGenerator.cpp.

References DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mStlFilePath.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::SetHoles ( std::vector< DimensionalChastePoint< SPACE_DIM > >  holes)

Set the hole locations

Parameters
holeshole locations

Definition at line 117 of file DiscreteContinuumMeshGenerator.cpp.

References DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mHoles.

Referenced by ImageToMesh< DIM >::Update().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::SetMaxElementArea ( units::quantity< unit::volume >  maxElementArea)

Set the max element area

Parameters
maxElementAreathe max element area

Definition at line 111 of file DiscreteContinuumMeshGenerator.cpp.

References DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mMaxElementArea.

Referenced by ImageToMesh< DIM >::Update().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::SetRegionMarkers ( std::vector< DimensionalChastePoint< SPACE_DIM > >  regionMarkers)

Set the region marker locations

Parameters
regionMarkersregion marker locations

Definition at line 123 of file DiscreteContinuumMeshGenerator.cpp.

References DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mRegions.

Referenced by ImageToMesh< DIM >::Update().

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::vector<unsigned> DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mAttributes
private

Store element-wise region markers

Definition at line 108 of file DiscreteContinuumMeshGenerator.hpp.

Referenced by DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::Mesh2d().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
units::quantity<unit::volume> DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mMaxElementArea
private
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
boost::shared_ptr<Part<SPACE_DIM> > DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mpDomain
private
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
vtkSmartPointer<vtkPolyData> DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mpVtkDomain
private
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
units::quantity<unit::length> DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mReferenceLength
private
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::vector<DimensionalChastePoint<SPACE_DIM> > DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mRegions
private
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::string DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >::mStlFilePath
private

The documentation for this class was generated from the following files: