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

#include <DiscreteContinuumMesh.hpp>

+ Inheritance diagram for DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 DiscreteContinuumMesh ()
 
 ~DiscreteContinuumMesh ()
 
std::vector< std::vector< unsigned > > GetConnectivity ()
 
std::vector< c_vector< double, SPACE_DIM > > GetNodeLocations ()
 
std::vector< c_vector< double, SPACE_DIM > > GetElementCentroids ()
 
std::vector< DimensionalChastePoint< SPACE_DIM > > GetNodeLocationsAsPoints ()
 
std::vector< unsigned > GetElementRegionMarkers ()
 
units::quantity< unit::length > GetReferenceLengthScale ()
 
std::vector< std::vector< unsigned > > GetPointElementMap (std::vector< DimensionalChastePoint< SPACE_DIM > > points)
 
const std::vector< std::vector< CellPtr > > & GetElementCellMap (bool update=true)
 
std::vector< std::vector< boost::shared_ptr< VesselSegment< SPACE_DIM > > > > GetElementSegmentMap (bool update=true, bool useVesselSurface=false)
 
vtkSmartPointer< vtkUnstructuredGrid > GetAsVtkUnstructuredGrid ()
 
void SetAttributes (std::vector< unsigned > attributes)
 
void SetCellPopulation (AbstractCellPopulation< SPACE_DIM > &rCellPopulation, units::quantity< unit::length > cellLengthScale)
 
void SetVesselNetwork (boost::shared_ptr< VesselNetwork< SPACE_DIM > > pNetwork)
 
void ImportDiscreteContinuumMeshFromTetgen (tetgen::tetgenio &mesherOutput, unsigned numberOfElements, int *elementList, unsigned numberOfFaces, int *faceList, int *edgeMarkerList)
 

Static Public Member Functions

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

Private Attributes

std::vector< unsigned > mAttributes
 
units::quantity< unit::length > mReferenceLength
 
vtkSmartPointer< vtkUnstructuredGrid > mpVtkMesh
 
vtkSmartPointer< vtkCellLocator > mpVtkCellLocator
 
bool mVtkRepresentationUpToDate
 
std::vector< std::vector< unsigned > > mPointElementMap
 
std::vector< std::vector< boost::shared_ptr< VesselSegment< SPACE_DIM > > > > mSegmentElementMap
 
std::vector< std::vector< CellPtr > > mCellElementMap
 
boost::shared_ptr< VesselNetwork< SPACE_DIM > > mpNetwork
 
AbstractCellPopulation< SPACE_DIM > * mpCellPopulation
 
units::quantity< unit::length > mCellPopulationReferenceLength
 

Friends

class DiscreteContinuumMeshGenerator< ELEMENT_DIM, SPACE_DIM >
 

Detailed Description

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

This is a TetrahedralMesh with some extra functions for point locating, output of node locations and connectivity and attribute storage. It uses its own version of ImportFromTetgen with fewer template arguements. There is scope for merging this versions with the one in TetrahedralMesh.

Definition at line 67 of file DiscreteContinuumMesh.hpp.

Constructor & Destructor Documentation

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

Constructor

Definition at line 58 of file DiscreteContinuumMesh.cpp.

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

Destructor

Definition at line 82 of file DiscreteContinuumMesh.cpp.

Member Function Documentation

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

Factory constructor method

Returns
a shared pointer to a new mesh

Definition at line 75 of file DiscreteContinuumMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< std::vector< unsigned > > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetConnectivity ( )

Return the element connectivity

Returns
the element connectivity

Definition at line 315 of file DiscreteContinuumMesh.cpp.

Referenced by DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetAsVtkUnstructuredGrid().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< c_vector< double, SPACE_DIM > > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetElementCentroids ( )

Return the element centroids

Returns
the element centroids

Definition at line 159 of file DiscreteContinuumMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< unsigned > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetElementRegionMarkers ( )

Return the element-wise region markers

Returns
the element-wise region markers

Definition at line 153 of file DiscreteContinuumMesh.cpp.

References DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mAttributes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< std::vector< boost::shared_ptr< VesselSegment< SPACE_DIM > > > > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetElementSegmentMap ( bool  update = true,
bool  useVesselSurface = false 
)
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< c_vector< double, SPACE_DIM > > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeLocations ( )

Return the node locations

Returns
the node locations

Definition at line 333 of file DiscreteContinuumMesh.cpp.

Referenced by DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetAsVtkUnstructuredGrid().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< DimensionalChastePoint< SPACE_DIM > > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeLocationsAsPoints ( )

Return the node locations

Returns
the node locations as chaste points

Definition at line 345 of file DiscreteContinuumMesh.cpp.

References DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mReferenceLength.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< std::vector< unsigned > > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetPointElementMap ( std::vector< DimensionalChastePoint< SPACE_DIM > >  points)
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
units::quantity< unit::length > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetReferenceLengthScale ( )

Return the reference length scale

Returns
the reference length scale

Definition at line 88 of file DiscreteContinuumMesh.cpp.

References DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mReferenceLength.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::ImportDiscreteContinuumMeshFromTetgen ( tetgen::tetgenio &  mesherOutput,
unsigned  numberOfElements,
int *  elementList,
unsigned  numberOfFaces,
int *  faceList,
int *  edgeMarkerList 
)

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

Parameters
mesherOutputtetgen output
numberOfElementsthe number of elements
elementListthe element list
numberOfFacesthe number of faces
faceListthe face list
edgeMarkerListan edge marker list

Definition at line 357 of file DiscreteContinuumMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::SetAttributes ( std::vector< unsigned >  attributes)

Set element attributes

Parameters
attributesthe element attributes

Definition at line 486 of file DiscreteContinuumMesh.cpp.

References DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mAttributes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::SetCellPopulation ( AbstractCellPopulation< SPACE_DIM > &  rCellPopulation,
units::quantity< unit::length >  cellLengthScale 
)

Set the cell population

Parameters
rCellPopulationa reference to the cell population

Definition at line 492 of file DiscreteContinuumMesh.cpp.

References DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mCellPopulationReferenceLength, and DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mpCellPopulation.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::SetVesselNetwork ( boost::shared_ptr< VesselNetwork< SPACE_DIM > >  pNetwork)

Set the vessel network

Parameters
pNetworkthe vessel network

Definition at line 500 of file DiscreteContinuumMesh.cpp.

References DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mpNetwork.

Friends And Related Function Documentation

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

For access to ImportFromMesher

Definition at line 72 of file DiscreteContinuumMesh.hpp.

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::vector<unsigned> DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mAttributes
private
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::vector<std::vector<CellPtr > > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mCellElementMap
private

The cell element map

Definition at line 112 of file DiscreteContinuumMesh.hpp.

Referenced by DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetElementCellMap().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
units::quantity<unit::length> DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mCellPopulationReferenceLength
private
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
AbstractCellPopulation<SPACE_DIM>* DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mpCellPopulation
private

The cell population. This memory pointed to is not managed in this class.

Definition at line 122 of file DiscreteContinuumMesh.hpp.

Referenced by DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetElementCellMap(), and DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::SetCellPopulation().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
boost::shared_ptr<VesselNetwork<SPACE_DIM> > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mpNetwork
private
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::vector<std::vector<unsigned> > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mPointElementMap
private

The point element map

Definition at line 102 of file DiscreteContinuumMesh.hpp.

Referenced by DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetPointElementMap().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
vtkSmartPointer<vtkCellLocator> DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mpVtkCellLocator
private
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
vtkSmartPointer<vtkUnstructuredGrid> DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mpVtkMesh
private

A vtk representation

Definition at line 87 of file DiscreteContinuumMesh.hpp.

Referenced by DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetAsVtkUnstructuredGrid().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::vector<std::vector<boost::shared_ptr<VesselSegment<SPACE_DIM> > > > DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mSegmentElementMap
private

The segment element map

Definition at line 107 of file DiscreteContinuumMesh.hpp.

Referenced by DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetElementSegmentMap().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::mVtkRepresentationUpToDate
private

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