Chaste  Release::2024.1
HoneycombMeshGenerator Class Reference

#include <HoneycombMeshGenerator.hpp>

+ Inheritance diagram for HoneycombMeshGenerator:
+ Collaboration diagram for HoneycombMeshGenerator:

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< unsignedGetCellLocationIndices ()
 
MutableMesh< 2, 2 > * GetCircularMesh (double radius)
 
double GetDomainDepth ()
 
double GetDomainWidth ()
 

Protected Attributes

MutableMesh< 2, 2 > * mpMesh
 
std::set< unsignedmGhostNodeIndices
 
std::string mMeshFilename
 
double mDomainWidth
 
double mDomainDepth
 
double mBottom
 
double mTop
 
unsigned mNumCellWidth
 
unsigned mNumCellLength
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ HoneycombMeshGenerator() [1/2]

HoneycombMeshGenerator::HoneycombMeshGenerator ( unsigned  numNodesAlongWidth,
unsigned  numNodesAlongLength,
unsigned  ghosts = 0,
double  scaleFactor = 1.0 
)

Default constructor.

Parameters
numNodesAlongWidthThe number of cells you want alopng the bottom of the domain
numNodesAlongLengthThe number of cells you want sides of the domain
ghostsThe thickness of ghost nodes to put around the edge (defaults to 0)
scaleFactorThe scale factor for the width (circumference) of the cells (defaults to 1.0)

Definition at line 46 of file HoneycombMeshGenerator.cpp.

References OutputFileHandler::GetOutputDirectoryFullPath(), PetscTools::IsSequential(), mBottom, mDomainDepth, mDomainWidth, mMeshFilename, mNumCellLength, mNumCellWidth, and mTop.

◆ HoneycombMeshGenerator() [2/2]

HoneycombMeshGenerator::HoneycombMeshGenerator ( )
inline

Null constructor for derived classes to call.

Definition at line 96 of file HoneycombMeshGenerator.hpp.

References GetCellLocationIndices(), GetCircularMesh(), GetDomainDepth(), GetDomainWidth(), GetMesh(), and ~HoneycombMeshGenerator().

◆ ~HoneycombMeshGenerator()

HoneycombMeshGenerator::~HoneycombMeshGenerator ( )
virtual

Destructor - deletes the mesh object and pointer

Definition at line 228 of file HoneycombMeshGenerator.cpp.

References mpMesh.

Referenced by HoneycombMeshGenerator().

Member Function Documentation

◆ GetCellLocationIndices()

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.

Returns
indices of nodes

Definition at line 238 of file HoneycombMeshGenerator.cpp.

Referenced by HoneycombMeshGenerator().

◆ GetCircularMesh()

MutableMesh< 2, 2 > * HoneycombMeshGenerator::GetCircularMesh ( double  radius)
Parameters
radiusthe radius of the circular mesh
Returns
a honeycomb mesh constructed to be roughly circular.

Definition at line 252 of file HoneycombMeshGenerator.cpp.

References EXCEPTION, and mGhostNodeIndices.

Referenced by HoneycombMeshGenerator().

◆ GetDomainDepth()

double HoneycombMeshGenerator::GetDomainDepth ( )
Returns
mDomainDepth

Definition at line 296 of file HoneycombMeshGenerator.cpp.

References mDomainDepth.

Referenced by HoneycombMeshGenerator().

◆ GetDomainWidth()

double HoneycombMeshGenerator::GetDomainWidth ( )
Returns
mDomainWidth

Definition at line 301 of file HoneycombMeshGenerator.cpp.

References mDomainWidth.

Referenced by HoneycombMeshGenerator().

◆ GetMesh()

MutableMesh< 2, 2 > * HoneycombMeshGenerator::GetMesh ( )
virtual
Returns
a 2D honeycomb mesh based on a 2D plane

Reimplemented in CylindricalHoneycombMeshGenerator.

Definition at line 233 of file HoneycombMeshGenerator.cpp.

References mpMesh.

Referenced by HoneycombMeshGenerator().

Member Data Documentation

◆ mBottom

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

◆ mDomainDepth

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

◆ mDomainWidth

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

◆ mGhostNodeIndices

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(), and GetCircularMesh().

◆ mMeshFilename

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

◆ mNumCellLength

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

◆ mNumCellWidth

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

◆ mpMesh

◆ mTop

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


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