HoneycombMeshGenerator Class Reference

#include <HoneycombMeshGenerator.hpp>

Collaboration diagram for HoneycombMeshGenerator:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 HoneycombMeshGenerator (unsigned numNodesAlongWidth, unsigned numNodesAlongLength, unsigned ghosts=3, bool cylindrical=true, double scaleFactor=1.0)
 ~HoneycombMeshGenerator ()
MutableMesh< 2, 2 > * GetMesh ()
Cylindrical2dMeshGetCylindricalMesh ()
std::vector< unsigned > GetCellLocationIndices ()
MutableMesh< 2, 2 > * GetCircularMesh (double radius)

Private Member Functions

void Make2dPeriodicCryptMesh (double width, unsigned ghosts)

Private Attributes

MutableMesh< 2, 2 > * mpMesh
std::set< unsigned > mGhostNodeIndices
std::string mMeshFilename
double mCryptWidth
double mCryptDepth
double mBottom
double mTop
unsigned mNumCellWidth
unsigned mNumCellLength
bool mCylindrical


Detailed Description

Generator of honeycomb meshes, used as starting points for many simulations.

This class takes in options such as width, height, number of ghost nodes and generates a honeycomb mesh (with equal distance between nodes), and ghost node information when requested.

NOTE: the user should delete the mesh after use to manage memory.

Definition at line 51 of file HoneycombMeshGenerator.hpp.


Constructor & Destructor Documentation

HoneycombMeshGenerator::HoneycombMeshGenerator ( unsigned  numNodesAlongWidth,
unsigned  numNodesAlongLength,
unsigned  ghosts = 3,
bool  cylindrical = true,
double  scaleFactor = 1.0 
)

Crypt Periodic Honeycomb Mesh Generator

Overwritten constructor for a mesh so mesh can be compressed by changing crypt width

Parameters:
numNodesAlongWidth The number of stem cells you want,
numNodesAlongLength The number of cells you want along crypt axis,
ghosts The thickness of ghost nodes to put around the edge (defaults to 3),
cylindrical Whether the mesh should be cylindrically periodic (defaults to true),
scaleFactor The scale factor for the width (circumference) of the cells.
Note: this class creates a cancer params instance and sets the crypt width and length accordingly in the parameters class to be used elsewhere.

Definition at line 32 of file HoneycombMeshGenerator.cpp.

References OutputFileHandler::GetOutputDirectoryFullPath(), CancerParameters::Instance(), Make2dPeriodicCryptMesh(), mCryptDepth, mCryptWidth, mCylindrical, mGhostNodeIndices, mMeshFilename, mpMesh, CancerParameters::SetCryptLength(), and CancerParameters::SetCryptWidth().

HoneycombMeshGenerator::~HoneycombMeshGenerator (  ) 

Destructor - deletes the mesh object and pointer

Definition at line 79 of file HoneycombMeshGenerator.cpp.

References mpMesh.


Member Function Documentation

void HoneycombMeshGenerator::Make2dPeriodicCryptMesh ( double  width,
unsigned  ghosts 
) [private]

Periodic honeycomb mesh maker

Parameters:
width The periodic length scale to base this mesh around
ghosts The number of rows of ghost nodes to add on at the top and bottom

Definition at line 160 of file HoneycombMeshGenerator.cpp.

References PetscTools::Barrier(), OutputFileHandler::IsMaster(), mBottom, mCryptDepth, mCylindrical, mGhostNodeIndices, mMeshFilename, mNumCellLength, mNumCellWidth, mTop, and OutputFileHandler::OpenOutputFile().

Referenced by HoneycombMeshGenerator().

MutableMesh< 2, 2 > * HoneycombMeshGenerator::GetMesh (  ) 

Returns:
a honeycomb mesh based on a 2D plane.

Definition at line 85 of file HoneycombMeshGenerator.cpp.

References mCylindrical, and mpMesh.

Cylindrical2dMesh * HoneycombMeshGenerator::GetCylindricalMesh (  ) 

Returns:
a honeycomb mesh with cylindrical boundaries.

Definition at line 95 of file HoneycombMeshGenerator.cpp.

References mCylindrical, and mpMesh.

std::vector< unsigned > HoneycombMeshGenerator::GetCellLocationIndices (  ) 

Returns the indices of the nodes in the mesh which correspond to real cells. This information needs to be passed in when constructing a MeshBasedTissueWithGhostNodes.

Returns:
indices of nodes

Definition at line 104 of file HoneycombMeshGenerator.cpp.

References mGhostNodeIndices, and mpMesh.

MutableMesh< 2, 2 > * HoneycombMeshGenerator::GetCircularMesh ( double  radius  ) 

Parameters:
radius the radius of the circular mesh
Returns:
a honeycomb mesh constructed to be roughly circular.

Definition at line 118 of file HoneycombMeshGenerator.cpp.

References mCylindrical, and mpMesh.


Member Data Documentation

MutableMesh<2,2>* HoneycombMeshGenerator::mpMesh [private]

A pointer to the mesh this class creates

Definition at line 56 of file HoneycombMeshGenerator.hpp.

Referenced by GetCellLocationIndices(), GetCircularMesh(), GetCylindricalMesh(), GetMesh(), HoneycombMeshGenerator(), and ~HoneycombMeshGenerator().

std::set<unsigned> HoneycombMeshGenerator::mGhostNodeIndices [private]

The indices of the nodes in this mesh which are 'ghost nodes'

Definition at line 59 of file HoneycombMeshGenerator.hpp.

Referenced by GetCellLocationIndices(), HoneycombMeshGenerator(), and Make2dPeriodicCryptMesh().

The mesh is generated by writing out a series of nodes and reading them in from this file

Definition at line 62 of file HoneycombMeshGenerator.hpp.

Referenced by HoneycombMeshGenerator(), and Make2dPeriodicCryptMesh().

The (x) width of the crypt to be constructed

Definition at line 65 of file HoneycombMeshGenerator.hpp.

Referenced by HoneycombMeshGenerator().

The (y) depth of the crypt to be constructed

Definition at line 68 of file HoneycombMeshGenerator.hpp.

Referenced by HoneycombMeshGenerator(), and Make2dPeriodicCryptMesh().

The y coordinate of the bottom row of cells (ghosts if requested)

Definition at line 71 of file HoneycombMeshGenerator.hpp.

Referenced by Make2dPeriodicCryptMesh().

double HoneycombMeshGenerator::mTop [private]

The y coordinate of the top row of cells (ghosts if requested)

Definition at line 74 of file HoneycombMeshGenerator.hpp.

Referenced by Make2dPeriodicCryptMesh().

The number of columns of cells to put across the x coordinate of the mesh

Definition at line 77 of file HoneycombMeshGenerator.hpp.

Referenced by Make2dPeriodicCryptMesh().

The number of rows of cells to put up the y coordinate of the mesh

Definition at line 80 of file HoneycombMeshGenerator.hpp.

Referenced by Make2dPeriodicCryptMesh().

Whether we are creating a cylindrical mesh or not

Definition at line 83 of file HoneycombMeshGenerator.hpp.

Referenced by GetCircularMesh(), GetCylindricalMesh(), GetMesh(), HoneycombMeshGenerator(), and Make2dPeriodicCryptMesh().


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

Generated on Wed Mar 18 12:52:32 2009 for Chaste by  doxygen 1.5.5