Chaste Release::3.1
|
#include <HoneycombMeshGenerator.hpp>
Public Member Functions | |
HoneycombMeshGenerator (unsigned numNodesAlongWidth, unsigned numNodesAlongLength, unsigned ghosts=0, double scaleFactor=1.0) | |
HoneycombMeshGenerator () | |
virtual | ~HoneycombMeshGenerator () |
virtual MutableMesh< 2, 2 > * | GetMesh () |
std::vector< unsigned > | GetCellLocationIndices () |
MutableMesh< 2, 2 > * | GetCircularMesh (double radius) |
double | GetDomainDepth () |
double | GetDomainWidth () |
Protected Attributes | |
MutableMesh< 2, 2 > * | mpMesh |
std::set< unsigned > | mGhostNodeIndices |
std::string | mMeshFilename |
double | mDomainWidth |
double | mDomainDepth |
double | mBottom |
double | mTop |
unsigned | mNumCellWidth |
unsigned | mNumCellLength |
Honeycomb mesh generator that creates a 2D honeycomb mesh (with equal distance between nodes) for use in cell-centre simulations.
NOTE: the user should delete the mesh after use to manage memory.
Definition at line 50 of file HoneycombMeshGenerator.hpp.
HoneycombMeshGenerator::HoneycombMeshGenerator | ( | unsigned | numNodesAlongWidth, |
unsigned | numNodesAlongLength, | ||
unsigned | ghosts = 0 , |
||
double | scaleFactor = 1.0 |
||
) |
Default constructor.
numNodesAlongWidth | The number of cells you want alopng the bottom of the domain |
numNodesAlongLength | The number of cells you want sides of the domain |
ghosts | The thickness of ghost nodes to put around the edge (defaults to 0) |
scaleFactor | The scale factor for the width (circumference) of the cells (defaults to 1.0) |
Definition at line 45 of file HoneycombMeshGenerator.cpp.
References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), FileFinder::FindMatches(), OutputFileHandler::GetOutputDirectoryFullPath(), PetscTools::IsSequential(), mBottom, mDomainDepth, mDomainWidth, mGhostNodeIndices, mMeshFilename, mNumCellLength, mNumCellWidth, mpMesh, mTop, OutputFileHandler::OpenOutputFile(), FileFinder::Remove(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::SetMeshHasChangedSinceLoading().
HoneycombMeshGenerator::HoneycombMeshGenerator | ( | ) | [inline] |
Null constructor for derived classes to call.
Definition at line 96 of file HoneycombMeshGenerator.hpp.
HoneycombMeshGenerator::~HoneycombMeshGenerator | ( | ) | [virtual] |
Destructor - deletes the mesh object and pointer
Definition at line 232 of file HoneycombMeshGenerator.cpp.
References mpMesh.
std::vector< unsigned > HoneycombMeshGenerator::GetCellLocationIndices | ( | ) |
Returns the indices of the nodes in the mesh which correspond to real cells. This information is needed when constructing a MeshBasedCellPopulationWithGhostNodes.
Definition at line 242 of file HoneycombMeshGenerator.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), mGhostNodeIndices, and mpMesh.
MutableMesh< 2, 2 > * HoneycombMeshGenerator::GetCircularMesh | ( | double | radius | ) |
radius | the radius of the circular mesh |
Definition at line 256 of file HoneycombMeshGenerator.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNodePriorToReMesh(), EXCEPTION, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), RandomNumberGenerator::Instance(), mGhostNodeIndices, mpMesh, RandomNumberGenerator::ranf(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::Translate().
double HoneycombMeshGenerator::GetDomainDepth | ( | ) |
Definition at line 300 of file HoneycombMeshGenerator.cpp.
References mDomainDepth.
double HoneycombMeshGenerator::GetDomainWidth | ( | ) |
Definition at line 305 of file HoneycombMeshGenerator.cpp.
References mDomainWidth.
MutableMesh< 2, 2 > * HoneycombMeshGenerator::GetMesh | ( | ) | [virtual] |
Reimplemented in CylindricalHoneycombMeshGenerator.
Definition at line 237 of file HoneycombMeshGenerator.cpp.
References mpMesh.
double HoneycombMeshGenerator::mBottom [protected] |
The y coordinate of the bottom row of cells (ghosts if requested)
Definition at line 70 of file HoneycombMeshGenerator.hpp.
Referenced by CylindricalHoneycombMeshGenerator::CylindricalHoneycombMeshGenerator(), and HoneycombMeshGenerator().
double HoneycombMeshGenerator::mDomainDepth [protected] |
The (y) depth of the domain to be constructed
Definition at line 67 of file HoneycombMeshGenerator.hpp.
Referenced by CylindricalHoneycombMeshGenerator::CylindricalHoneycombMeshGenerator(), GetDomainDepth(), and HoneycombMeshGenerator().
double HoneycombMeshGenerator::mDomainWidth [protected] |
The (x) width of the domain to be constructed
Definition at line 64 of file HoneycombMeshGenerator.hpp.
Referenced by CylindricalHoneycombMeshGenerator::CylindricalHoneycombMeshGenerator(), GetDomainWidth(), and HoneycombMeshGenerator().
std::set<unsigned> HoneycombMeshGenerator::mGhostNodeIndices [protected] |
The indices of the nodes in this mesh which are 'ghost nodes'
Definition at line 58 of file HoneycombMeshGenerator.hpp.
Referenced by CylindricalHoneycombMeshGenerator::CylindricalHoneycombMeshGenerator(), GetCellLocationIndices(), GetCircularMesh(), and HoneycombMeshGenerator().
std::string HoneycombMeshGenerator::mMeshFilename [protected] |
The mesh is generated by writing out a series of nodes and reading them in from this file
Definition at line 61 of file HoneycombMeshGenerator.hpp.
Referenced by CylindricalHoneycombMeshGenerator::CylindricalHoneycombMeshGenerator(), and HoneycombMeshGenerator().
unsigned HoneycombMeshGenerator::mNumCellLength [protected] |
The number of rows of cells to put up the y coordinate of the mesh
Definition at line 79 of file HoneycombMeshGenerator.hpp.
Referenced by CylindricalHoneycombMeshGenerator::CylindricalHoneycombMeshGenerator(), and HoneycombMeshGenerator().
unsigned HoneycombMeshGenerator::mNumCellWidth [protected] |
The number of columns of cells to put across the x coordinate of the mesh
Definition at line 76 of file HoneycombMeshGenerator.hpp.
Referenced by CylindricalHoneycombMeshGenerator::CylindricalHoneycombMeshGenerator(), and HoneycombMeshGenerator().
MutableMesh<2,2>* HoneycombMeshGenerator::mpMesh [protected] |
A pointer to the mesh this class creates
Definition at line 55 of file HoneycombMeshGenerator.hpp.
Referenced by CylindricalHoneycombMeshGenerator::CylindricalHoneycombMeshGenerator(), GetCellLocationIndices(), GetCircularMesh(), CylindricalHoneycombMeshGenerator::GetCylindricalMesh(), GetMesh(), CylindricalHoneycombMeshGenerator::GetMesh(), HoneycombMeshGenerator(), and ~HoneycombMeshGenerator().
double HoneycombMeshGenerator::mTop [protected] |
The y coordinate of the top row of cells (ghosts if requested)
Definition at line 73 of file HoneycombMeshGenerator.hpp.
Referenced by CylindricalHoneycombMeshGenerator::CylindricalHoneycombMeshGenerator(), and HoneycombMeshGenerator().