Chaste Commit::8b5d759ac2eb95e67ae57699734101efccb0a0a9
ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <ImmersedBoundaryMesh.hpp>

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

Classes

class  ImmersedBoundaryElementIterator
 
class  ImmersedBoundaryLaminaIterator
 

Public Member Functions

const std::vector< Node< SPACE_DIM > * > & rGetNodes () const
 
ImmersedBoundaryElementIterator GetElementIteratorBegin (bool skipDeletedElements=true)
 
ImmersedBoundaryElementIterator GetElementIteratorEnd ()
 
ImmersedBoundaryLaminaIterator GetLaminaIteratorBegin (bool skipDeletedLaminas=true)
 
ImmersedBoundaryLaminaIterator GetLaminaIteratorEnd ()
 
 ImmersedBoundaryMesh (std::vector< Node< SPACE_DIM > * > nodes, std::vector< ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > * > elements, std::vector< ImmersedBoundaryElement< ELEMENT_DIM - 1, SPACE_DIM > * > laminas={}, unsigned numGridPtsX=128u, unsigned numGridPtsY=128u)
 
 ImmersedBoundaryMesh ()
 
virtual ~ImmersedBoundaryMesh ()
 
virtual unsigned GetNumNodes () const
 
virtual unsigned GetNumElements () const
 
unsigned GetNumAllElements () const
 
unsigned GetNumLaminas () const
 
unsigned GetNumGridPtsX () const
 
unsigned GetNumGridPtsY () const
 
double GetCharacteristicNodeSpacing () const
 
double GetSpacingRatio () const
 
unsigned GetMaxNodeIndex () const
 
unsigned GetMaxElementIndex () const
 
unsigned GetMaxLaminaIndex () const
 
c_vector< double, SPACE_DIM > GetVectorFromAtoB (const c_vector< double, SPACE_DIM > &rLocation1, const c_vector< double, SPACE_DIM > &rLocation2)
 
void SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > point)
 
void ConformToGeometry (c_vector< double, SPACE_DIM > &rLocation)
 
const multi_array< double, 3 > & rGet2dVelocityGrids () const
 
multi_array< double, 3 > & rGetModifiable2dVelocityGrids ()
 
void SetNumGridPtsX (unsigned meshPointsX)
 
void SetNumGridPtsY (unsigned meshPointsY)
 
void SetNumGridPtsXAndY (unsigned numGridPts)
 
void SetCharacteristicNodeSpacing (double nodeSpacing)
 
unsigned AddNode (Node< SPACE_DIM > *pNewNode)
 
std::vector< std::shared_ptr< FluidSource< SPACE_DIM > > > & rGetElementFluidSources ()
 
std::vector< std::shared_ptr< FluidSource< SPACE_DIM > > > & rGetBalancingFluidSources ()
 
std::set< unsignedGetNeighbouringNodeIndices (unsigned nodeIndex)
 
ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > * GetElement (unsigned index) const
 
ImmersedBoundaryElement< ELEMENT_DIM - 1, SPACE_DIM > * GetLamina (unsigned index) const
 
virtual c_vector< double, SPACE_DIM > GetCentroidOfElement (unsigned index)
 
void ConstructFromMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader)
 
virtual void Clear ()
 
virtual double GetVolumeOfElement (unsigned index)
 
virtual double GetSurfaceAreaOfElement (unsigned index)
 
double GetVoronoiSurfaceAreaOfElement (unsigned elemIdx)
 
double GetAverageNodeSpacingOfElement (unsigned index, bool recalculate=true)
 
double GetAverageNodeSpacingOfLamina (unsigned index, bool recalculate=true)
 
virtual c_vector< double, 3 > CalculateMomentsOfElement (unsigned index)
 
double GetElongationShapeFactorOfElement (unsigned elementIndex)
 
double GetTortuosityOfMesh ()
 
double GetSkewnessOfElementMassDistributionAboutAxis (unsigned elemIndex, c_vector< double, SPACE_DIM > axis)
 
ChasteCuboid< SPACE_DIM > CalculateBoundingBoxOfElement (unsigned index)
 
c_vector< double, SPACE_DIM > GetShortAxisOfElement (unsigned index)
 
unsigned DivideElementAlongGivenAxis (ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > *pElement, c_vector< double, SPACE_DIM > axisOfDivision, bool placeOriginalElementBelow=false)
 
unsigned DivideElementAlongShortAxis (ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > *pElement, bool placeOriginalElementBelow=false)
 
double GetElementDivisionSpacing ()
 
void SetElementDivisionSpacing (double elementDivisionSpacing)
 
double GetNeighbourDist () const
 
void SetCellRearrangementThreshold (double cellRearrangementThreshold)
 
double GetCellRearrangementThreshold ()
 
void SetNeighbourDist (double neighbourDist)
 
void UpdateNodeLocationsVoronoiDiagramIfOutOfDate ()
 
void ReMesh (bool randomOrder=false)
 
void ReMeshElement (ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > *pElement, bool randomOrder)
 
void ReMeshLamina (ImmersedBoundaryElement< ELEMENT_DIM - 1, SPACE_DIM > *pLamina, bool randomOrder)
 
bool NodesInDifferentElementOrLamina (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB)
 
std::set< unsignedGetNeighbouringElementIndices (unsigned elemIdx)
 
double CalculateLengthOfVoronoiEdge (const boost::polygon::voronoi_diagram< double >::edge_type &rEdge)
 
std::array< unsigned, 13 > GetPolygonDistribution ()
 
const boost::polygon::voronoi_diagram< double > & rGetNodeLocationsVoronoiDiagram (bool update=true)
 
const std::vector< unsigned int > & GetVoronoiCellIdsIndexedByNodeIndex () const
 
int ScaleUpToVoronoiCoordinate (double location) const
 
double ScaleDistanceDownFromVoronoi (const double distance) const
 
double GetVoronoiSurfaceAreaOfElement (const unsigned elemIdx)
 
- Public Member Functions inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM >
NodeIterator GetNodeIteratorBegin (bool skipDeletedNodes=true)
 
NodeIterator GetNodeIteratorEnd ()
 
 AbstractMesh ()
 
virtual ~AbstractMesh ()
 
unsigned GetNumBoundaryNodes () const
 
virtual unsigned GetNumAllNodes () const
 
unsigned GetNumNodeAttributes () const
 
Node< SPACE_DIM > * GetNode (unsigned index) const
 
virtual Node< SPACE_DIM > * GetNodeOrHaloNode (unsigned index) const
 
Node< SPACE_DIM > * GetNodeFromPrePermutationIndex (unsigned index) const
 
virtual void ReadNodesPerProcessorFile (const std::string &rNodesPerProcessorFile)
 
virtual DistributedVectorFactoryGetDistributedVectorFactory ()
 
virtual void SetDistributedVectorFactory (DistributedVectorFactory *pFactory)
 
virtual void PermuteNodes ()
 
BoundaryNodeIterator GetBoundaryNodeIteratorBegin () const
 
BoundaryNodeIterator GetBoundaryNodeIteratorEnd () const
 
std::string GetMeshFileBaseName () const
 
bool IsMeshOnDisk () const
 
const std::vector< unsigned > & rGetNodePermutation () const
 
double GetDistanceBetweenNodes (unsigned indexA, unsigned indexB)
 
virtual double GetWidth (const unsigned &rDimension) const
 
virtual ChasteCuboid< SPACE_DIM > CalculateBoundingBox () const
 
virtual unsigned GetNearestNodeIndex (const ChastePoint< SPACE_DIM > &rTestPoint)
 
virtual void Scale (const double xFactor=1.0, const double yFactor=1.0, const double zFactor=1.0)
 
virtual void Translate (const c_vector< double, SPACE_DIM > &rDisplacement)
 
void Translate (const double xMovement=0.0, const double yMovement=0.0, const double zMovement=0.0)
 
virtual void Rotate (c_matrix< double, SPACE_DIM, SPACE_DIM > rotationMatrix)
 
void Rotate (c_vector< double, 3 > axis, double angle)
 
void RotateX (const double theta)
 
void RotateY (const double theta)
 
void RotateZ (const double theta)
 
void Rotate (double theta)
 
virtual void RefreshMesh ()
 
bool IsMeshChanging () const
 
unsigned CalculateMaximumContainingElementsPerProcess () const
 
void SetMeshHasChangedSinceLoading ()
 

Protected Member Functions

unsigned SolveNodeMapping (unsigned index) const
 
unsigned SolveElementMapping (unsigned index) const
 
unsigned SolveBoundaryElementMapping (unsigned index) const
 
void TagBoundaryElements ()
 
unsigned DivideElement (ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > *pElement, unsigned nodeAIndex, unsigned nodeBIndex, c_vector< double, SPACE_DIM > centroid, c_vector< double, SPACE_DIM > axisOfDivision)
 
template<class Archive >
void save (Archive &archive, const unsigned int version) const
 
template<class Archive >
void load (Archive &archive, const unsigned int version)
 
- Protected Member Functions inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM >
virtual void SetElementOwnerships ()
 
ChasteCuboid< SPACE_DIM > CalculateBoundingBox (const std::vector< Node< SPACE_DIM > * > &rNodes) const
 

Protected Attributes

unsigned mNumGridPtsX
 
unsigned mNumGridPtsY
 
double mCharacteristicNodeSpacing
 
double mElementDivisionSpacing
 
double mNeighbourDist
 
double mSummaryOfNodeLocations
 
double mCellRearrangementThreshold
 
std::vector< unsignedmDeletedNodeIndices
 
std::vector< unsignedmDeletedElementIndices
 
multi_array< double, 3 > m2dVelocityGrids
 
multi_array< double, 4 > m3dVelocityGrids
 
std::vector< ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > * > mElements
 
std::vector< ImmersedBoundaryElement< ELEMENT_DIM - 1, SPACE_DIM > * > mLaminas
 
std::vector< std::shared_ptr< FluidSource< SPACE_DIM > > > mElementFluidSources
 
std::vector< std::shared_ptr< FluidSource< SPACE_DIM > > > mBalancingFluidSources
 
boost::polygon::voronoi_diagram< doublemNodeLocationsVoronoiDiagram
 
std::vector< unsignedmVoronoiCellIdsIndexedByNodeIndex
 
- Protected Attributes inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM >
std::vector< Node< SPACE_DIM > * > mNodes
 
std::vector< Node< SPACE_DIM > * > mBoundaryNodes
 
DistributedVectorFactorympDistributedVectorFactory
 
std::vector< unsignedmNodePermutation
 
std::string mMeshFileBaseName
 
bool mMeshChangesDuringSimulation
 

Static Protected Attributes

static constexpr double mVoronoiHalo = 0.1
 

Friends

class TestImmersedBoundaryMesh
 
class boost::serialization::access
 

Additional Inherited Members

- Public Types inherited from AbstractMesh< ELEMENT_DIM, SPACE_DIM >
typedef std::vector< Node< SPACE_DIM > * >::const_iterator BoundaryNodeIterator
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >

An immersed boundary mesh class, in which elements may contain different numbers of nodes. This is facilitated by the ImmersedBoundaryElement class.

This class allows immersed boundary simulations.

Definition at line 69 of file ImmersedBoundaryMesh.hpp.

Constructor & Destructor Documentation

◆ ImmersedBoundaryMesh() [1/2]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMesh ( std::vector< Node< SPACE_DIM > * >  nodes,
std::vector< ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > * >  elements,
std::vector< ImmersedBoundaryElement< ELEMENT_DIM - 1, SPACE_DIM > * >  laminas = {},
unsigned  numGridPtsX = 128u,
unsigned  numGridPtsY = 128u 
)

◆ ImmersedBoundaryMesh() [2/2]

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

Default constructor for use by serializer.

Definition at line 515 of file ImmersedBoundaryMesh.cpp.

◆ ~ImmersedBoundaryMesh()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::~ImmersedBoundaryMesh ( )
virtual

Destructor.

Definition at line 522 of file ImmersedBoundaryMesh.cpp.

Member Function Documentation

◆ AddNode()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::AddNode ( Node< SPACE_DIM > *  pNewNode)

Add a node to the mesh

Parameters
pNewNodea pointer to the node to be added to the mesh.
Returns
the index of the new node

Definition at line 694 of file ImmersedBoundaryMesh.cpp.

◆ CalculateBoundingBoxOfElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ChasteCuboid< SPACE_DIM > ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::CalculateBoundingBoxOfElement ( unsigned  index)

Calculate the bounding box of an element specified by its index.

Parameters
indexthe index of the element
Returns
a Chaste cuboid representing the element bounding box

Definition at line 476 of file ImmersedBoundaryMesh.cpp.

◆ CalculateLengthOfVoronoiEdge()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::CalculateLengthOfVoronoiEdge ( const boost::polygon::voronoi_diagram< double >::edge_type &  rEdge)

Get the length of an edge in the voronoi diagram mNodeLocationsVoronoiDiagram. This gives the "real" length after undoing the scaling required when calculating the diagram.

Parameters
rEdgethe edge to calculate the length of
Returns
the length of rEdge

Definition at line 1933 of file ImmersedBoundaryMesh.cpp.

◆ CalculateMomentsOfElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, 3 > ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::CalculateMomentsOfElement ( unsigned  index)
virtual

Compute the second moments and product moment of area for a given 2D element about its centroid. These are:

I_xx, the second moment of area about an axis through the centroid of the element parallel to the x-axis;

I_yy, the second moment of area about an axis through the centroid of the element parallel to the y-axis;

and I_xy, product moment of area through the centroid of the element.

Formulae for these quantities may be found e.g. in the following reference:

Mechanics of Materials James M. Gere (Author), Barry J. Goodno. Cengage Learning; 8th edition (January 1, 2012)

This method is used within GetShortAxisOfElement() to compute the direction of the shortest principal axis passing through the centroid, or 'short axis', of the element.

Note that by definition, the second moments of area must be non-negative, while the product moment of area may not be.

Parameters
indexthe global index of a specified immersed boundary element
Returns
(Ixx,Iyy,Ixy).

Definition at line 1180 of file ImmersedBoundaryMesh.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and NEVER_REACHED.

◆ Clear()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::Clear ( )
virtual

Delete mNodes, mFaces and mElements.

Definition at line 578 of file ImmersedBoundaryMesh.cpp.

Referenced by ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMesh().

◆ ConformToGeometry()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ConformToGeometry ( c_vector< double, SPACE_DIM > &  rLocation)

Transform a location so that it lies within the domain [0,1)x[0,1). This method assumes the location is already 'close' to the domain, for instance because a location has previously been 'straightened out' for geometric calculations that require no looping due to periodicity.

Parameters
rLocationthe location to transform

Definition at line 1819 of file ImmersedBoundaryMesh.cpp.

◆ ConstructFromMeshReader()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader ( AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &  rMeshReader)

Construct the mesh using a MeshReader.

Parameters
rMeshReaderthe mesh reader

Referenced by ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::load().

◆ DivideElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::DivideElement ( ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > *  pElement,
unsigned  nodeAIndex,
unsigned  nodeBIndex,
c_vector< double, SPACE_DIM >  centroid,
c_vector< double, SPACE_DIM >  axisOfDivision 
)
protected

Divide an element along the axis passing through two of its nodes.

Parameters
pElementthe element to divide
nodeAIndexthe local index of one node within this element
nodeBIndexthe local index of another node within this element
centroidthe centroid of the element being divided
axisOfDivisionthe specified division axis
Returns
the index of the new element

Definition at line 1369 of file ImmersedBoundaryMesh.cpp.

References DOUBLE_UNSET, EXCEPTION, ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM >::GetFluidSource(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), NEVER_REACHED, ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM >::rGetCornerNodes(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::rGetElementAttributes().

◆ DivideElementAlongGivenAxis()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::DivideElementAlongGivenAxis ( ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > *  pElement,
c_vector< double, SPACE_DIM >  axisOfDivision,
bool  placeOriginalElementBelow = false 
)

Divide an element along a specified axis.

If the new nodes (intersections of axis with element) are within mCellRearrangementThreshold of existing nodes then they are moved 2*mCellRearrangementThreshold away.

Parameters
pElementthe element to divide
axisOfDivisionaxis to divide the element by
placeOriginalElementBelowwhether to place the original element below (in the y direction) the new element (defaults to false)
Returns
the index of the new element

Definition at line 1297 of file ImmersedBoundaryMesh.cpp.

References EXCEPTION, AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and NEVER_REACHED.

◆ DivideElementAlongShortAxis()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::DivideElementAlongShortAxis ( ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > *  pElement,
bool  placeOriginalElementBelow = false 
)

Divide an element along its short axis.

Parameters
pElementthe element to divide
placeOriginalElementBelowwhether to place the original element below (in the y direction) the new element (defaults to false)
Returns
the index of the new element

Definition at line 1353 of file ImmersedBoundaryMesh.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), and NEVER_REACHED.

◆ GetAverageNodeSpacingOfElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetAverageNodeSpacingOfElement ( unsigned  index,
bool  recalculate = true 
)

◆ GetAverageNodeSpacingOfLamina()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetAverageNodeSpacingOfLamina ( unsigned  index,
bool  recalculate = true 
)

Compute the average node spacing of a lamina.

Parameters
indexthe global index of a specified immersed boundary lamina
recalculatewhether or not to recalculate the value
Returns
the average node spacing of the lamina

Definition at line 1137 of file ImmersedBoundaryMesh.cpp.

References DOUBLE_UNSET.

Referenced by ImmersedBoundaryLinearInteractionForce< DIM >::AddImmersedBoundaryForceContribution(), ImmersedBoundaryMorseInteractionForce< DIM >::AddImmersedBoundaryForceContribution(), ImmersedBoundaryLinearMembraneForce< DIM >::CalculateForcesOnElement(), and ImmersedBoundaryMorseMembraneForce< DIM >::CalculateForcesOnElement().

◆ GetCellRearrangementThreshold()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetCellRearrangementThreshold ( )
Returns
the maximum distance a cell vertex can move without triggering a step size exception

Definition at line 709 of file ImmersedBoundaryMesh.cpp.

◆ GetCentroidOfElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetCentroidOfElement ( unsigned  index)
virtual

Compute the centroid of an element.

A formula for the centroid of a plane polygon may be found e.g. in the following reference:

Mechanics of Materials James M. Gere (Author), Barry J. Goodno. Cengage Learning; 8th edition (January 1, 2012)

This needs to be overridden in daughter classes for non-Euclidean metrics.

Parameters
indexthe global index of a specified immersed boundary element
Returns
(centroid_x, centroid_y).

Definition at line 792 of file ImmersedBoundaryMesh.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and NEVER_REACHED.

Referenced by ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMesh().

◆ GetCharacteristicNodeSpacing()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetCharacteristicNodeSpacing ( ) const
Returns
the characteristic node spacing.

Definition at line 606 of file ImmersedBoundaryMesh.cpp.

◆ GetElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > * ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetElement ( unsigned  index) const
Parameters
indexthe global index of a specified immersed boundary element.
Returns
a pointer to the immersed boundary element

Definition at line 766 of file ImmersedBoundaryMesh.cpp.

Referenced by CellPopulationElementWriter< ELEMENT_DIM, SPACE_DIM >::Visit().

◆ GetElementDivisionSpacing()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetElementDivisionSpacing ( )
Returns
mElementDivisionSpacing

Definition at line 1164 of file ImmersedBoundaryMesh.cpp.

◆ GetElementIteratorBegin()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryElementIterator ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin ( bool  skipDeletedElements = true)
inline

◆ GetElementIteratorEnd()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryElementIterator ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd ( )
inline

◆ GetElongationShapeFactorOfElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetElongationShapeFactorOfElement ( unsigned  elementIndex)

Get the elongation shape factor of a given element. This is defined as the square root of the ratio of the two second moments of the element around its principal axes.

Parameters
elementIndexindex of an element in the mesh
Returns
the elongation shape factor of the element.

Definition at line 175 of file ImmersedBoundaryMesh.cpp.

◆ GetLamina()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ImmersedBoundaryElement< ELEMENT_DIM - 1, SPACE_DIM > * ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetLamina ( unsigned  index) const
Parameters
indexthe global index of a specified immersed boundary lamina.
Returns
a pointer to the immersed boundary lamina

Definition at line 773 of file ImmersedBoundaryMesh.cpp.

◆ GetLaminaIteratorBegin()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryLaminaIterator ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetLaminaIteratorBegin ( bool  skipDeletedLaminas = true)
inline

◆ GetLaminaIteratorEnd()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryLaminaIterator ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetLaminaIteratorEnd ( )
inline

◆ GetMaxElementIndex()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetMaxElementIndex ( ) const
Returns
the maximum element index (elements may not be indexed consecutively), or UINT_MAX if there are none

Definition at line 1963 of file ImmersedBoundaryMesh.cpp.

◆ GetMaxLaminaIndex()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetMaxLaminaIndex ( ) const
Returns
the maximum lamina index (laminas may not be indexed consecutively), or UINT_MAX if there are none

Definition at line 1984 of file ImmersedBoundaryMesh.cpp.

◆ GetMaxNodeIndex()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetMaxNodeIndex ( ) const
Returns
the maximum node index (nodes may not be indexed consecutively), or UINT_MAX if there are none

Definition at line 1944 of file ImmersedBoundaryMesh.cpp.

◆ GetNeighbourDist()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetNeighbourDist ( ) const
Returns
mNeighbourDist

Definition at line 780 of file ImmersedBoundaryMesh.cpp.

◆ GetNeighbouringElementIndices()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::set< unsigned > ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringElementIndices ( unsigned  elemIdx)

Given an element index, find a set containing the indices of its neighbouring elements.

Parameters
elemIdxglobal index of the element
Returns
a set of its neighbouring element indices

Definition at line 1854 of file ImmersedBoundaryMesh.cpp.

References EXCEPTION.

◆ GetNeighbouringNodeIndices()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::set< unsigned > ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringNodeIndices ( unsigned  nodeIndex)

Given a node, find a set containing the indices of its neighbouring nodes.

Parameters
nodeIndexglobal index of the node
Returns
its neighbouring node indices

Definition at line 528 of file ImmersedBoundaryMesh.cpp.

◆ GetNumAllElements()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllElements ( ) const
Returns
the number of ImmersedBoundaryElements in the mesh, including those marked as deleted.

Definition at line 754 of file ImmersedBoundaryMesh.cpp.

Referenced by ImmersedBoundaryMeshWriter< ELEMENT_DIM, SPACE_DIM >::FindElementOverlaps().

◆ GetNumElements()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements ( ) const
virtual
Returns
the number of ImmersedBoundaryElements in the mesh.

Definition at line 748 of file ImmersedBoundaryMesh.cpp.

◆ GetNumGridPtsX()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetNumGridPtsX ( ) const
Returns
the number of fluid mesh points in the x direction.

Definition at line 624 of file ImmersedBoundaryMesh.cpp.

Referenced by ImmersedBoundary2dArrays< DIM >::ImmersedBoundary2dArrays(), and ImmersedBoundaryFftInterface< DIM >::ImmersedBoundaryFftInterface().

◆ GetNumGridPtsY()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetNumGridPtsY ( ) const
Returns
the number of fluid mesh points in the y direction.

Definition at line 630 of file ImmersedBoundaryMesh.cpp.

Referenced by ImmersedBoundary2dArrays< DIM >::ImmersedBoundary2dArrays(), and ImmersedBoundaryFftInterface< DIM >::ImmersedBoundaryFftInterface().

◆ GetNumLaminas()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetNumLaminas ( ) const
Returns
the number of laminas in the mesh.

Definition at line 760 of file ImmersedBoundaryMesh.cpp.

Referenced by ImmersedBoundaryLinearDifferentialAdhesionForce< DIM >::AddImmersedBoundaryForceContribution().

◆ GetNumNodes()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes ( ) const
virtual

◆ GetPolygonDistribution()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::array< unsigned, 13 > ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetPolygonDistribution ( )

Calculate the polygon distribution for the mesh: number of {0, 1, 2, 3, 4, 5,..., 12+}-gons. Note that the vector will always begin {0, 0, 0, ...} as there can be no 0, 1, or 2-gons, but this choice means that accessing the nth element of the vector gives you the number of n-gons which seems to be most natural. All 12-sided and higher order polygons are accumulated in the array[12] position.

Returns
an array of length 13 representing the polygon distribution.

Definition at line 1908 of file ImmersedBoundaryMesh.cpp.

References NEVER_REACHED.

◆ GetShortAxisOfElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetShortAxisOfElement ( unsigned  index)

Compute the direction of the shortest principal axis passing through the centroid, or 'short axis', of a given element. This is the eigenvector associated with the eigenvalue of largest magnitude of the inertia matrix

J = ( I_xx -I_xy ) ( -I_xy I_yy )

whose entries are computed by calling the method CalculateMomentsOfElement().

Note that if the nodes owned by the element are supplied in clockwise rather than anticlockwise manner, or if this arises when any periodicity is enforced, then the sign of each moment may be incorrect change. This means that we need to consider the eigenvalue of largest magnitude rather than largest value when computing the short axis of the element.

If the element is a regular polygon then the eigenvalues of the inertia tensor are equal: in this case we return a random unit vector.

This method is only implemented in 2D at present.

Parameters
indexthe global index of a specified immersed boundary element
Returns
a unit vector giving the direction of the short axis

Definition at line 1239 of file ImmersedBoundaryMesh.cpp.

References RandomNumberGenerator::Instance(), NEVER_REACHED, and RandomNumberGenerator::ranf().

Referenced by ShortAxisImmersedBoundaryDivisionRule< SPACE_DIM >::CalculateCellDivisionVector().

◆ GetSkewnessOfElementMassDistributionAboutAxis()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetSkewnessOfElementMassDistributionAboutAxis ( unsigned  elemIndex,
c_vector< double, SPACE_DIM >  axis 
)

Calculate the skewness of the mass-distribution of a given element along a line perpendicular to a given axis, as a measure of element asymmetry.

This method is only valid in 2D.

Parameters
elemIndexthe index of the element in this mesh
axisthe axis perpendicular to which the distribution is found
Returns
the skewness of the mass distribution for the given element about the given axis

Definition at line 247 of file ImmersedBoundaryMesh.cpp.

◆ GetSpacingRatio()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetSpacingRatio ( ) const
Returns
the spacing ratio: Characteristic Node Spacing / Fluid Grid Spacing

Definition at line 612 of file ImmersedBoundaryMesh.cpp.

◆ GetSurfaceAreaOfElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetSurfaceAreaOfElement ( unsigned  index)
virtual

Compute the surface area (or perimeter in 2D) of an element.

This needs to be overridden in daughter classes for non-Euclidean metrics.

Parameters
indexthe global index of a specified immersed boundary element
Returns
the surface area of the element

Definition at line 1037 of file ImmersedBoundaryMesh.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and NEVER_REACHED.

Referenced by ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMesh().

◆ GetTortuosityOfMesh()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetTortuosityOfMesh ( )

Compute tortuosity, defined as the ratio of total length to straight-line length, of piecewise linear curve through centroids of successive elements.

Returns
the tortuosity of the mesh

Definition at line 203 of file ImmersedBoundaryMesh.cpp.

References NEVER_REACHED.

◆ GetVectorFromAtoB()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetVectorFromAtoB ( const c_vector< double, SPACE_DIM > &  rLocation1,
const c_vector< double, SPACE_DIM > &  rLocation2 
)
virtual

◆ GetVolumeOfElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfElement ( unsigned  index)
virtual

Get the volume (or area in 2D, or length in 1D) of an element.

This needs to be overridden in daughter classes for non-Euclidean metrics.

Parameters
indexthe global index of a specified immersed boundary element
Returns
the volume of the element

Definition at line 998 of file ImmersedBoundaryMesh.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and NEVER_REACHED.

◆ GetVoronoiCellIdsIndexedByNodeIndex()

template<unsigned int ELEMENT_DIM, unsigned int SPACE_DIM>
const std::vector< unsigned int > & ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetVoronoiCellIdsIndexedByNodeIndex ( ) const
Returns
mVoronoiCellIdsIndexedByNodeIndex

Definition at line 2312 of file ImmersedBoundaryMesh.cpp.

◆ GetVoronoiSurfaceAreaOfElement() [1/2]

double ImmersedBoundaryMesh< 1, 1 >::GetVoronoiSurfaceAreaOfElement ( const unsigned  elemIdx)

Template specialisation for impossible to reach code path

Parameters
elemIdxthe element index
Returns
0.0

Definition at line 1114 of file ImmersedBoundaryMesh.cpp.

◆ GetVoronoiSurfaceAreaOfElement() [2/2]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::GetVoronoiSurfaceAreaOfElement ( unsigned  elemIdx)

Compute the surface area (or perimeter in 2D) of the Voronoi cell of an element. The voronoi cell of an element is the union of the voronoi cells of all nodes in the element.

Parameters
elemIdxthe global index of a specified immersed boundary element
Returns
the voronoi surface area of the element

Definition at line 1063 of file ImmersedBoundaryMesh.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and NEVER_REACHED.

◆ load()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::load ( Archive &  archive,
const unsigned int  version 
)
inlineprotected

Load a mesh by using ImmersedBoundaryMeshReader and the location in ArchiveLocationInfo.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 222 of file ImmersedBoundaryMesh.hpp.

References ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), ArchiveLocationInfo::GetArchiveDirectory(), and ArchiveLocationInfo::GetMeshFilename().

◆ NodesInDifferentElementOrLamina()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::NodesInDifferentElementOrLamina ( Node< SPACE_DIM > *  pNodeA,
Node< SPACE_DIM > *  pNodeB 
)

Determine whether two nodes belong to the same element, or the same lamina

Parameters
pNodeAa pointer to a node
pNodeBa pointer to a different node
Returns
whether the two nodes belong to the same element or lamina

Definition at line 1839 of file ImmersedBoundaryMesh.cpp.

References Node< SPACE_DIM >::ContainingElementsBegin(), and Node< SPACE_DIM >::GetRegion().

Referenced by ImmersedBoundaryLinearDifferentialAdhesionForce< DIM >::AddImmersedBoundaryForceContribution(), ImmersedBoundaryLinearInteractionForce< DIM >::AddImmersedBoundaryForceContribution(), and ImmersedBoundaryMorseInteractionForce< DIM >::AddImmersedBoundaryForceContribution().

◆ ReMesh()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh ( bool  randomOrder = false)

ReMesh method that evenly redistributes nodes around each element and lamina.

Parameters
randomOrderwhether to remesh elements and laminas starting from a random location. Defaults to false.

Definition at line 1666 of file ImmersedBoundaryMesh.cpp.

◆ ReMeshElement()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ReMeshElement ( ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM > *  pElement,
bool  randomOrder 
)

ReMesh method that evenly redistributes nodes around a specific element.

Parameters
pElementthe element to remesh
randomOrderwhether to remesh elements and laminas starting from a random location

Definition at line 1688 of file ImmersedBoundaryMesh.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), RandomNumberGenerator::Instance(), NEVER_REACHED, and RandomNumberGenerator::randMod().

◆ ReMeshLamina()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ReMeshLamina ( ImmersedBoundaryElement< ELEMENT_DIM - 1, SPACE_DIM > *  pLamina,
bool  randomOrder 
)

ReMesh method that evenly redistributes nodes along a specific lamina.

Parameters
pLaminathe lamina to remesh
randomOrderwhether to remesh elements and laminas starting from a random location

Definition at line 1753 of file ImmersedBoundaryMesh.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), RandomNumberGenerator::Instance(), NEVER_REACHED, and RandomNumberGenerator::randMod().

◆ rGet2dVelocityGrids()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
const multi_array< double, 3 > & ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::rGet2dVelocityGrids ( ) const
Returns
reference to non-modifiable 2d fluid velocity grids.

Definition at line 682 of file ImmersedBoundaryMesh.cpp.

◆ rGetBalancingFluidSources()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< std::shared_ptr< FluidSource< SPACE_DIM > > > & ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::rGetBalancingFluidSources ( )
Returns
reference to vector of balancing fluid sources

Definition at line 676 of file ImmersedBoundaryMesh.cpp.

◆ rGetElementFluidSources()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< std::shared_ptr< FluidSource< SPACE_DIM > > > & ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::rGetElementFluidSources ( )
Returns
reference to vector of element-associated fluid sources

Definition at line 664 of file ImmersedBoundaryMesh.cpp.

◆ rGetModifiable2dVelocityGrids()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
multi_array< double, 3 > & ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::rGetModifiable2dVelocityGrids ( )
Returns
reference to non-modifiable 3d fluid velocity grids.
reference to modifiable 2d fluid velocity grids.

Definition at line 688 of file ImmersedBoundaryMesh.cpp.

◆ rGetNodeLocationsVoronoiDiagram()

template<unsigned int ELEMENT_DIM, unsigned int SPACE_DIM>
const boost::polygon::voronoi_diagram< double > & ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::rGetNodeLocationsVoronoiDiagram ( bool  update = true)

Get the voronoi diagram of node locations. This may be needed for population writers and others.

Parameters
updatewhether to update the diagram before returning the reference (default true)
Returns
mNodeLocationsVoronoiDiagram

Definition at line 2301 of file ImmersedBoundaryMesh.cpp.

Referenced by HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::Visit().

◆ rGetNodes()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
const std::vector< Node< SPACE_DIM > * > & ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::rGetNodes ( ) const
Returns
a reference to the const collection of nodes

Definition at line 618 of file ImmersedBoundaryMesh.cpp.

Referenced by ImmersedBoundaryKinematicFeedbackForce< DIM >::UpdatePreviousLocations().

◆ save()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::save ( Archive &  archive,
const unsigned int  version 
) const
inlineprotected

Archive the ImmersedBoundaryMesh and its member variables. Note that this will write out an ImmersedBoundaryMeshWriter file to wherever ArchiveLocationInfo has specified.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 204 of file ImmersedBoundaryMesh.hpp.

References ArchiveLocationInfo::GetArchiveRelativePath(), ArchiveLocationInfo::GetMeshFilename(), and ImmersedBoundaryMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().

◆ ScaleDistanceDownFromVoronoi()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ScaleDistanceDownFromVoronoi ( const double  distance) const

Helper method for voronoi functions. Scale a distance down from the voronoi coordinates.

Parameters
distancea distance in the voronoi diagram
Returns
a distance in the immersed boundary domain

Definition at line 2292 of file ImmersedBoundaryMesh.cpp.

◆ ScaleUpToVoronoiCoordinate()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
int ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ScaleUpToVoronoiCoordinate ( double  location) const

Helper method for voronoi functions. Scale a location up to the integer grid needed by boost voronoi.

Parameters
locationa location in [-mVoronoiHalo, 1.0 + mVoronoiHalo]
Returns
a corresponding integer location scaled to [INT_MIN, INT_MAX]

Definition at line 2276 of file ImmersedBoundaryMesh.cpp.

◆ SetCellRearrangementThreshold()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SetCellRearrangementThreshold ( double  cellRearrangementThreshold)
Parameters
cellRearrangementThresholdthe new value of mCellRearrangementThreshold

Definition at line 703 of file ImmersedBoundaryMesh.cpp.

◆ SetCharacteristicNodeSpacing()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SetCharacteristicNodeSpacing ( double  nodeSpacing)
Parameters
nodeSpacingthe new characteristic node spacing.

Definition at line 658 of file ImmersedBoundaryMesh.cpp.

◆ SetElementDivisionSpacing()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SetElementDivisionSpacing ( double  elementDivisionSpacing)
Parameters
elementDivisionSpacingthe new value of mElementDivisionSpacing

Definition at line 1170 of file ImmersedBoundaryMesh.cpp.

Referenced by ImmersedBoundaryCellPopulation< DIM >::ImmersedBoundaryCellPopulation().

◆ SetNeighbourDist()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SetNeighbourDist ( double  neighbourDist)
Parameters
neighbourDistthe new value of mNeighbourDist

Definition at line 786 of file ImmersedBoundaryMesh.cpp.

Referenced by ImmersedBoundaryCellPopulation< DIM >::ImmersedBoundaryCellPopulation().

◆ SetNode()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SetNode ( unsigned  nodeIndex,
ChastePoint< SPACE_DIM >  point 
)

Move the node with a particular index to a new point in space.

Parameters
nodeIndexthe index of the node to be moved
pointthe new target location of the node

Definition at line 736 of file ImmersedBoundaryMesh.cpp.

◆ SetNumGridPtsX()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SetNumGridPtsX ( unsigned  meshPointsX)
Parameters
meshPointsXthe new number of fluid mesh points in the x direction.

Definition at line 636 of file ImmersedBoundaryMesh.cpp.

◆ SetNumGridPtsXAndY()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SetNumGridPtsXAndY ( unsigned  numGridPts)
Parameters
numGridPtsthe new number of fluid mesh points in both directions.

Definition at line 650 of file ImmersedBoundaryMesh.cpp.

◆ SetNumGridPtsY()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SetNumGridPtsY ( unsigned  meshPointsY)
Parameters
meshPointsYthe new number of fluid mesh points in the x direction.

Definition at line 643 of file ImmersedBoundaryMesh.cpp.

◆ SolveBoundaryElementMapping()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SolveBoundaryElementMapping ( unsigned  index) const
protected

Solve boundary element mapping method. This overridden method is required as it is pure virtual in the base class.

Parameters
indexthe global index of the boundary element
Returns
local index

Definition at line 572 of file ImmersedBoundaryMesh.cpp.

◆ SolveElementMapping()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SolveElementMapping ( unsigned  index) const
protected

Solve element mapping method. This overridden method is required as it is pure virtual in the base class.

Parameters
indexthe global index of the element
Returns
local index

Definition at line 565 of file ImmersedBoundaryMesh.cpp.

◆ SolveNodeMapping()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SolveNodeMapping ( unsigned  index) const
protectedvirtual

Solve node mapping method. This overridden method is required as it is pure virtual in the base class.

Parameters
indexthe global index of the node
Returns
local index

Implements AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 558 of file ImmersedBoundaryMesh.cpp.

◆ TagBoundaryElements()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::TagBoundaryElements ( )
protected

Determine whether each element is on the boundary or not, and call the element's SetIsBoundaryElement() method.

It is not possible to define in precise terms whether an element is on the boundary (as there is no commonality of nodes as in a vertex population). Instead we use information from the node locations voronoi diagram. Any nodes with infinite voronoi edges are certainly in boundary elements, as well as nodes in elements whose voronoi cells are "too big".

Definition at line 2005 of file ImmersedBoundaryMesh.cpp.

References EXCEPTION, AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), and ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM >::SetIsBoundaryElement().

◆ UpdateNodeLocationsVoronoiDiagramIfOutOfDate()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::UpdateNodeLocationsVoronoiDiagramIfOutOfDate ( )

Update mNodeLocationsVoronoiDiagram if it is out of date, which is the case when mSummaryOfNodeLocations is out-of-date, i.e. nodes have moved location. This ensures the update is performed at most once per time step.

Definition at line 2122 of file ImmersedBoundaryMesh.cpp.

References NEVER_REACHED.

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 194 of file ImmersedBoundaryMesh.hpp.

◆ TestImmersedBoundaryMesh

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class TestImmersedBoundaryMesh
friend

Definition at line 71 of file ImmersedBoundaryMesh.hpp.

Member Data Documentation

◆ m2dVelocityGrids

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
multi_array<double, 3> ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::m2dVelocityGrids
protected

2D grid for fluid x velocity

Definition at line 110 of file ImmersedBoundaryMesh.hpp.

Referenced by ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMesh().

◆ m3dVelocityGrids

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
multi_array<double, 4> ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::m3dVelocityGrids
protected

3D grid for fluid x velocity

Definition at line 113 of file ImmersedBoundaryMesh.hpp.

◆ mBalancingFluidSources

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<std::shared_ptr<FluidSource<SPACE_DIM> > > ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mBalancingFluidSources
protected

Vector of fluid sources used to balance those of the elements.

Definition at line 125 of file ImmersedBoundaryMesh.hpp.

Referenced by ImmersedBoundaryMesh< DIM, DIM >::SolveNodeMapping().

◆ mCellRearrangementThreshold

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mCellRearrangementThreshold
protected

The distance above which a cell vertex moving will trigger a step size exception

Definition at line 96 of file ImmersedBoundaryMesh.hpp.

◆ mCharacteristicNodeSpacing

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mCharacteristicNodeSpacing
protected

Characteristic node spacing

Definition at line 81 of file ImmersedBoundaryMesh.hpp.

Referenced by ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMesh().

◆ mDeletedElementIndices

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<unsigned> ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices
protected

Indices of elements that have been deleted. These indices can be reused when adding new elements.

Definition at line 107 of file ImmersedBoundaryMesh.hpp.

◆ mDeletedNodeIndices

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<unsigned> ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices
protected

Indices of nodes that have been deleted. These indices can be reused when adding new elements/nodes.

Definition at line 104 of file ImmersedBoundaryMesh.hpp.

◆ mElementDivisionSpacing

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mElementDivisionSpacing
protected

The required spacing when an element divides

Definition at line 84 of file ImmersedBoundaryMesh.hpp.

◆ mElementFluidSources

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<std::shared_ptr<FluidSource<SPACE_DIM> > > ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mElementFluidSources
protected

Vector of fluid sources related to elements.

Definition at line 122 of file ImmersedBoundaryMesh.hpp.

Referenced by ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMesh().

◆ mElements

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<ImmersedBoundaryElement<ELEMENT_DIM, SPACE_DIM>*> ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mElements
protected

◆ mLaminas

◆ mNeighbourDist

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mNeighbourDist
protected

The distance at which two elements are neighbouring

Definition at line 87 of file ImmersedBoundaryMesh.hpp.

◆ mNodeLocationsVoronoiDiagram

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
boost::polygon::voronoi_diagram<double> ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mNodeLocationsVoronoiDiagram
protected

A voronoi diagram of the node locations, used to determine the element neighbours

Definition at line 128 of file ImmersedBoundaryMesh.hpp.

◆ mNumGridPtsX

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mNumGridPtsX
protected

Number of grid points in x direction

Definition at line 75 of file ImmersedBoundaryMesh.hpp.

Referenced by ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMesh().

◆ mNumGridPtsY

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mNumGridPtsY
protected

Number of grid points in y direction

Definition at line 78 of file ImmersedBoundaryMesh.hpp.

Referenced by ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMesh().

◆ mSummaryOfNodeLocations

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mSummaryOfNodeLocations
protected

A summary statistic used by UpdateNodeLocationsVoronoiDiagramIfOutOfDate() to determine if mNodeLocationsVoronoiDiagram is out of date

Definition at line 93 of file ImmersedBoundaryMesh.hpp.

◆ mVoronoiCellIdsIndexedByNodeIndex

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<unsigned> ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mVoronoiCellIdsIndexedByNodeIndex
protected

A vector keeping track voronoi cell IDs indexed by node index. This vector is the length of the largest node index, and is updated by UpdateNodeLocationsVoronoiDiagramIfOutOfDate().

The value mVoronoiCellIdsIndexedByNodeIndex[node_idx] gives the ID of the voronoi cell corresponding to the node with index node_idx.

Definition at line 137 of file ImmersedBoundaryMesh.hpp.

◆ mVoronoiHalo

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
constexpr double ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::mVoronoiHalo = 0.1
staticconstexprprotected

A halo distance around the unit square, used when calculating the node voronoi diagram

Definition at line 101 of file ImmersedBoundaryMesh.hpp.


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