NodesOnlyMesh< SPACE_DIM > Class Template Reference

#include <NodesOnlyMesh.hpp>

Inherits MutableMesh< SPACE_DIM, SPACE_DIM >.

Collaboration diagram for NodesOnlyMesh< SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 NodesOnlyMesh ()
virtual ~NodesOnlyMesh ()
void ConstructNodesWithoutMesh (const std::vector< Node< SPACE_DIM > * > &rNodes, double maxInteractionDistance)
void ConstructNodesWithoutMesh (const AbstractMesh< SPACE_DIM, SPACE_DIM > &rGeneratingMesh, double maxInteractionDistance)
std::vector< bool > & rGetInitiallyOwnedNodes ()
void Clear ()
unsigned SolveNodeMapping (unsigned index) const
Node< SPACE_DIM > * GetNodeOrHaloNode (unsigned index) const
bool IsOwned (c_vector< double, SPACE_DIM > &location)
unsigned GetNumNodes () const
virtual unsigned GetMaximumNodeIndex ()
void SetMaximumInteractionDistance (double maxDistance)
double GetMaximumInteractionDistance ()
double GetWidth (const unsigned &rDimension) const
void SetCalculateNodeNeighbours (bool calculateNodeNeighbours)
void CalculateInteriorNodePairs (std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > &rNodePairs, std::map< unsigned, std::set< unsigned > > &rNodeNeighbours)
void CalculateBoundaryNodePairs (std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > &rNodePairs, std::map< unsigned, std::set< unsigned > > &rNodeNeighbours)
void ReMesh (NodeMap &rMap)
void SetInitialBoxCollection (const c_vector< double, 2 *SPACE_DIM > domainSize, double maxInteractionDistance)
void UpdateBoxCollection ()
void ResizeBoxCollection ()
void AddNodesToBoxes ()
void AddHaloNodesToBoxes ()
void CalculateNodesOutsideLocalDomain ()
std::vector< unsigned > & rGetNodesToSendLeft ()
std::vector< unsigned > & rGetNodesToSendRight ()
std::vector< unsigned > & rGetHaloNodesToSendRight ()
std::vector< unsigned > & rGetHaloNodesToSendLeft ()
void AddHaloNode (boost::shared_ptr< Node< SPACE_DIM > > pNewNode)
void ClearHaloNodes ()
unsigned AddNode (Node< SPACE_DIM > *pNewNode)
void AddMovedNode (boost::shared_ptr< Node< SPACE_DIM > > pMovedNode)
void DeleteNode (unsigned index)
void DeleteMovedNode (unsigned index)
void SetMinimumNodeDomainBoundarySeparation (double separation)
void LoadBalanceMesh ()
void ConstructFromMeshReader (AbstractMeshReader< SPACE_DIM, SPACE_DIM > &rMeshReader)

Protected Member Functions

void ClearBoxCollection ()
virtual void SetUpBoxCollection (double cutOffLength, c_vector< double, 2 *SPACE_DIM > domainSize, int numLocalRows=PETSC_DECIDE, bool isPeriodic=false)
DistributedBoxCollection
< SPACE_DIM > * 
GetBoxCollection ()

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
unsigned GetNextAvailableIndex ()
void EnlargeBoxCollection ()
bool IsANodeCloseToDomainBoundary ()
void SetUpBoxCollection (const std::vector< Node< SPACE_DIM > * > &rNodes)
void RemoveDeletedNodes (NodeMap &map)
void UpdateNodeIndices ()
void AddNodeWithFixedIndex (Node< SPACE_DIM > *pNewNode)

Private Attributes

std::vector< boost::shared_ptr
< Node< SPACE_DIM > > > 
mHaloNodes
double mMaximumInteractionDistance
std::map< unsigned, unsignedmNodesMapping
std::map< unsigned, unsignedmHaloNodesMapping
unsigned mIndexCounter
double mMinimumNodeDomainBoundarySeparation
std::vector< unsignedmDeletedGlobalNodeIndices
std::vector< unsignedmNodesToSendRight
std::vector< unsignedmNodesToSendLeft
std::vector< boolmLocalInitialNodes
unsigned mMaxAddedNodeIndex
DistributedBoxCollection
< SPACE_DIM > * 
mpBoxCollection
bool mCalculateNodeNeighbours

Friends

class TestNodesOnlyMesh
class boost::serialization::access

Detailed Description

template<unsigned SPACE_DIM>
class NodesOnlyMesh< SPACE_DIM >

Mesh class for storing lists of nodes (no elements). This inherits from MutableMesh because we want to be able to add and delete nodes.

Definition at line 52 of file NodesOnlyMesh.hpp.


Constructor & Destructor Documentation

template<unsigned SPACE_DIM>
NodesOnlyMesh< SPACE_DIM >::NodesOnlyMesh (  )  [inline]

Default constructor to initialise BoxCollection to NULL.

Definition at line 41 of file NodesOnlyMesh.cpp.

template<unsigned SPACE_DIM>
NodesOnlyMesh< SPACE_DIM >::~NodesOnlyMesh (  )  [inline, virtual]

Over-written destructor to delete pointer to BoxCollection.

Definition at line 53 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::Clear(), and NodesOnlyMesh< SPACE_DIM >::ClearBoxCollection().


Member Function Documentation

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::AddHaloNode ( boost::shared_ptr< Node< SPACE_DIM > >  pNewNode  )  [inline]

Add a temporary halo node on this process.

Parameters:
pNewNode a shared pointer to the new node to add.

Definition at line 349 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mHaloNodes, and NodesOnlyMesh< SPACE_DIM >::mHaloNodesMapping.

Referenced by NodeBasedCellPopulation< DIM >::AddHaloCell().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::AddHaloNodesToBoxes (  )  [inline]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::AddMovedNode ( boost::shared_ptr< Node< SPACE_DIM > >  pMovedNode  )  [inline]

Add a node to this process that has moved from another process.

Parameters:
pMovedNode the node to add to this mesh.

Definition at line 375 of file NodesOnlyMesh.cpp.

References Node< SPACE_DIM >::AddNodeAttribute(), NodesOnlyMesh< SPACE_DIM >::AddNodeWithFixedIndex(), Node< SPACE_DIM >::SetIsParticle(), Node< SPACE_DIM >::SetRadius(), and Node< SPACE_DIM >::SetRegion().

Referenced by NodeBasedCellPopulation< DIM >::AddMovedCell().

template<unsigned SPACE_DIM>
unsigned NodesOnlyMesh< SPACE_DIM >::AddNode ( Node< SPACE_DIM > *  pNewNode  )  [inline, virtual]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::AddNodesToBoxes (  )  [inline]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::AddNodeWithFixedIndex ( Node< SPACE_DIM > *  pNewNode  )  [inline, private]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::CalculateBoundaryNodePairs ( std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > &  rNodePairs,
std::map< unsigned, std::set< unsigned > > &  rNodeNeighbours 
) [inline]

Calculate pairs of nodes from boxes on the process boundary using the BoxCollection

Parameters:
rNodePairs reference to the set of node pairs to populate.
rNodeNeighbours reference to the list of neighbouring nodes for each node.

Definition at line 213 of file NodesOnlyMesh.cpp.

References DistributedBoxCollection< DIM >::CalculateBoundaryNodePairs(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and NodesOnlyMesh< SPACE_DIM >::mpBoxCollection.

Referenced by NodeBasedCellPopulation< DIM >::Update().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::CalculateInteriorNodePairs ( std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > &  rNodePairs,
std::map< unsigned, std::set< unsigned > > &  rNodeNeighbours 
) [inline]

Calculate pairs of nodes from interior boxes using the BoxCollection.

Parameters:
rNodePairs reference to the set of node pairs to populate.
rNodeNeighbours reference to the list of neighbouring nodes for each node.

Definition at line 205 of file NodesOnlyMesh.cpp.

References DistributedBoxCollection< DIM >::CalculateInteriorNodePairs(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and NodesOnlyMesh< SPACE_DIM >::mpBoxCollection.

Referenced by NodeBasedCellPopulation< DIM >::Update().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::CalculateNodesOutsideLocalDomain (  )  [inline]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::Clear (  )  [inline, virtual]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ClearBoxCollection (  )  [inline, protected]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ClearHaloNodes (  )  [inline]

Delete all the halo nodes on this process.

Definition at line 356 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mHaloNodes, and NodesOnlyMesh< SPACE_DIM >::mHaloNodesMapping.

Referenced by NodeBasedCellPopulation< DIM >::RefreshHaloCells().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ConstructFromMeshReader ( AbstractMeshReader< SPACE_DIM, SPACE_DIM > &  rMeshReader  )  [inline]

Overridden ConstructFromMeshReader to correctly assign global node indices on load.

Parameters:
rMeshReader the mesh reader for input.

Definition at line 631 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::GetNextAvailableIndex(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh ( const AbstractMesh< SPACE_DIM, SPACE_DIM > &  rGeneratingMesh,
double  maxInteractionDistance 
) [inline]

A Helper method to enable you to construct a nodes-only mesh by stripping the nodes TetrahedralMesh, this calls the ConstructNodesWithoutMesh method with the nodes

Parameters:
rGeneratingMesh any mesh with nodes, used to generate the NodesOnlyMesh.
maxInteractionDistance the distance that defines node neighbours in CalculateNodePairs.

Definition at line 94 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh ( const std::vector< Node< SPACE_DIM > * > &  rNodes,
double  maxInteractionDistance 
) [inline]

Construct the mesh using only nodes. No mesh is created, but the nodes are stored. The original vector of nodes is deep-copied: new node objects are made with are independent of the pointers in the input so that they can be safely deleted.

If this is the only way of constructing a mesh of this type, then we can be certain that elements and boundary elements are always unused.

Parameters:
rNodes a vector of pointers to nodes.
maxInteractionDistance the distance that defines node neighbours in CalculateNodePairs.

Definition at line 60 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::Clear(), Node< SPACE_DIM >::GetIndex(), NodesOnlyMesh< SPACE_DIM >::GetNextAvailableIndex(), DistributedBoxCollection< DIM >::IsOwned(), NodesOnlyMesh< SPACE_DIM >::mLocalInitialNodes, NodesOnlyMesh< SPACE_DIM >::mMaximumInteractionDistance, NodesOnlyMesh< SPACE_DIM >::mMinimumNodeDomainBoundarySeparation, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, NodesOnlyMesh< SPACE_DIM >::mNodesMapping, NodesOnlyMesh< SPACE_DIM >::mpBoxCollection, Node< SPACE_DIM >::SetRadius(), and NodesOnlyMesh< SPACE_DIM >::SetUpBoxCollection().

Referenced by NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh(), PottsBasedCellPopulation< DIM >::WriteVtkResultsToFile(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteVtkResultsToFile(), and CaBasedCellPopulation< DIM >::WriteVtkResultsToFile().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::DeleteMovedNode ( unsigned  index  )  [inline]

Make a clean delete of a node that has moved off this process.

Parameters:
index the global index of the node moving off this process.

Definition at line 420 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::DeleteNode(), and NodesOnlyMesh< SPACE_DIM >::mDeletedGlobalNodeIndices.

Referenced by NodeBasedCellPopulation< DIM >::DeleteMovedCell().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::DeleteNode ( unsigned  index  )  [inline, virtual]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::EnlargeBoxCollection (  )  [inline, private]
template<unsigned SPACE_DIM>
DistributedBoxCollection< SPACE_DIM > * NodesOnlyMesh< SPACE_DIM >::GetBoxCollection (  )  [inline, protected]
Returns:
mpBoxCollection

Definition at line 131 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mpBoxCollection.

template<unsigned SPACE_DIM>
double NodesOnlyMesh< SPACE_DIM >::GetMaximumInteractionDistance (  )  [inline]
template<unsigned SPACE_DIM>
unsigned NodesOnlyMesh< SPACE_DIM >::GetMaximumNodeIndex (  )  [inline, virtual]
template<unsigned SPACE_DIM>
unsigned NodesOnlyMesh< SPACE_DIM >::GetNextAvailableIndex (  )  [inline, private]

Calculate the next unique global index available on this process. Uses a hashing function to ensure that a unique index is given to every node.

For example for 3 process they will have access to the following integers:

Proc 0: 0 3 6 9 12 ...

Proc 1: 1 4 7 10 13 ...

Proc 2: 2 5 8 11 14 ...

Deleted node indices can be locally re-used.

Deleted node indices of nodes that have *moved* process cannot be re-used.

Returns:
the next available index.

Definition at line 437 of file NodesOnlyMesh.cpp.

References PetscTools::GetMyRank(), PetscTools::GetNumProcs(), NodesOnlyMesh< SPACE_DIM >::mDeletedGlobalNodeIndices, and NodesOnlyMesh< SPACE_DIM >::mIndexCounter.

Referenced by NodesOnlyMesh< SPACE_DIM >::AddNode(), NodesOnlyMesh< SPACE_DIM >::ConstructFromMeshReader(), and NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh().

template<unsigned SPACE_DIM>
Node< SPACE_DIM > * NodesOnlyMesh< SPACE_DIM >::GetNodeOrHaloNode ( unsigned  index  )  const [inline, virtual]

Overridden method to get node or halo node from the mesh.

Parameters:
index the global index of the node.
Returns:
a pointer to the node.

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 137 of file NodesOnlyMesh.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), NodesOnlyMesh< SPACE_DIM >::mHaloNodes, and NodesOnlyMesh< SPACE_DIM >::mHaloNodesMapping.

Referenced by NodeBasedCellPopulation< DIM >::GetNode().

template<unsigned SPACE_DIM>
unsigned NodesOnlyMesh< SPACE_DIM >::GetNumNodes (  )  const [inline, virtual]
Returns:
the local number of nodes that are actually in use. Does not include halo nodes.

Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.

Definition at line 164 of file NodesOnlyMesh.cpp.

References MutableMesh< SPACE_DIM, SPACE_DIM >::mDeletedNodeIndices, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

Referenced by NodeBasedCellPopulation< DIM >::GetNumNodes().

template<unsigned SPACE_DIM>
double NodesOnlyMesh< SPACE_DIM >::GetWidth ( const unsigned rDimension  )  const [inline, virtual]

Overridden GetWidth method to work in parallel.

Parameters:
rDimension the dimension along which to get the width.
Returns:
the width.

Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in Cylindrical2dNodesOnlyMesh.

Definition at line 188 of file NodesOnlyMesh.cpp.

References PetscTools::GetWorld().

Referenced by NodeBasedCellPopulation< DIM >::GetWidth().

template<unsigned SPACE_DIM>
bool NodesOnlyMesh< SPACE_DIM >::IsANodeCloseToDomainBoundary (  )  [inline, private]
template<unsigned SPACE_DIM>
bool NodesOnlyMesh< SPACE_DIM >::IsOwned ( c_vector< double, SPACE_DIM > &  location  )  [inline]

A method to identify whether a location is owned in the parallel space decomposition.

Parameters:
location the location to test
Returns:
whether the point is owned.

Definition at line 158 of file NodesOnlyMesh.cpp.

References DistributedBoxCollection< DIM >::IsOwned(), and NodesOnlyMesh< SPACE_DIM >::mpBoxCollection.

Referenced by ParallelCellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateParallelCells().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::LoadBalanceMesh (  )  [inline]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ReMesh ( NodeMap rMap  )  [inline, virtual]

Overridden ReMesh() method. Since only Nodes are stored, this method cleans up mNodes by removing nodes marked as deleted and reallocating mNodes to 'fill the gaps'.

Parameters:
rMap a reference to a NodeMap which associates the indices of the old mesh with the new mesh. It should be large enough to contain all node indices.

Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.

Definition at line 221 of file NodesOnlyMesh.cpp.

References MutableMesh< SPACE_DIM, SPACE_DIM >::mAddedNodes, MutableMesh< SPACE_DIM, SPACE_DIM >::mDeletedNodeIndices, NodesOnlyMesh< SPACE_DIM >::RemoveDeletedNodes(), NodeMap::ResetToIdentity(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::SetMeshHasChangedSinceLoading(), and NodesOnlyMesh< SPACE_DIM >::UpdateNodeIndices().

Referenced by ParallelCellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateParallelCells(), NodeBasedCellPopulation< DIM >::UpdateCellProcessLocation(), NodeBasedCellPopulationWithParticles< DIM >::WriteVtkResultsToFile(), and NodeBasedCellPopulation< DIM >::WriteVtkResultsToFile().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::RemoveDeletedNodes ( NodeMap map  )  [inline, private]

Remove all nodes that return mIsDeleted as true.

Parameters:
map the NodeMap to record which nodes have been removed.

Definition at line 236 of file NodesOnlyMesh.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, NodesOnlyMesh< SPACE_DIM >::mNodesMapping, and NodeMap::SetDeleted().

Referenced by NodesOnlyMesh< SPACE_DIM >::ReMesh().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ResizeBoxCollection (  )  [inline]
template<unsigned SPACE_DIM>
std::vector< unsigned > & NodesOnlyMesh< SPACE_DIM >::rGetHaloNodesToSendLeft (  )  [inline]
Returns:
the indices of halo nodes, owned by this process, on the left hand boundary.

Definition at line 314 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mpBoxCollection, and DistributedBoxCollection< DIM >::rGetHaloNodesLeft().

Referenced by NodeBasedCellPopulation< DIM >::RefreshHaloCells().

template<unsigned SPACE_DIM>
std::vector< unsigned > & NodesOnlyMesh< SPACE_DIM >::rGetHaloNodesToSendRight (  )  [inline]
Returns:
the indices of halo nodes, owned by this process, on the right hand boundary.

Definition at line 308 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mpBoxCollection, and DistributedBoxCollection< DIM >::rGetHaloNodesRight().

Referenced by NodeBasedCellPopulation< DIM >::RefreshHaloCells().

template<unsigned SPACE_DIM>
std::vector< bool > & NodesOnlyMesh< SPACE_DIM >::rGetInitiallyOwnedNodes (  )  [inline]
Returns:
whether each initial node given to ConstructNodesWithoutMesh is owned by this process.

Definition at line 100 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mLocalInitialNodes.

template<unsigned SPACE_DIM>
std::vector< unsigned > & NodesOnlyMesh< SPACE_DIM >::rGetNodesToSendLeft (  )  [inline]
template<unsigned SPACE_DIM>
std::vector< unsigned > & NodesOnlyMesh< SPACE_DIM >::rGetNodesToSendRight (  )  [inline]
template<unsigned SPACE_DIM>
template<class Archive >
void NodesOnlyMesh< SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Archives the member variables of the object which have to be preserved during its lifetime.

Note that we must archive any member variables FIRST so that this method can call a ReMesh (to convert from TrianglesMeshReader input format into our native format).

Parameters:
archive the archive
version the current version of this class

Reimplemented from TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in Cylindrical2dNodesOnlyMesh.

Definition at line 73 of file NodesOnlyMesh.hpp.

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::SetCalculateNodeNeighbours ( bool  calculateNodeNeighbours  )  [inline]

Set whether to calculate node neighbours for the rNodeNeigbours set in CalculateNodePairs. Switch off for efficiency

Parameters:
calculateNodeNeighbours whether to store the neighbours.

Definition at line 199 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mCalculateNodeNeighbours.

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::SetInitialBoxCollection ( const c_vector< double, 2 *SPACE_DIM >  domainSize,
double  maxInteractionDistance 
) [inline]

Set the initial box collection without passing nodes to the mesh. Used for memory efficient construction in parallel.

Parameters:
domainSize the initial domain size of the mesh.
maxInteractionDistance the max interaction distance between nodes.

Definition at line 525 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::SetUpBoxCollection().

Referenced by ParallelCellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateParallelCells().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::SetMaximumInteractionDistance ( double  maxDistance  )  [inline]

Set the maximum node interaction distance.

Parameters:
maxDistance the new maximum distance.

Definition at line 176 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mMaximumInteractionDistance.

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::SetMinimumNodeDomainBoundarySeparation ( double  separation  )  [inline]

Set the value of mMinimumNodeDomainBoundarySeparation.

Parameters:
separation the new value for the separation.

Definition at line 429 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mMinimumNodeDomainBoundarySeparation.

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::SetUpBoxCollection ( double  cutOffLength,
c_vector< double, 2 *SPACE_DIM >  domainSize,
int  numLocalRows = PETSC_DECIDE,
bool  isPeriodic = false 
) [inline, protected, virtual]

Set up the box collection. Overridden in subclasses to implement periodicity.

Parameters:
cutOffLength the cut off length for node neighbours.
domainSize the size of the domain containing the nodes.
numLocalRows the number of rows that should be owned by this process.
isPeriodic whether the DistributedBoxCollection should be periodic.

Definition at line 548 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::ClearBoxCollection(), NodesOnlyMesh< SPACE_DIM >::mCalculateNodeNeighbours, NodesOnlyMesh< SPACE_DIM >::mpBoxCollection, DistributedBoxCollection< DIM >::SetCalculateNodeNeighbours(), DistributedBoxCollection< DIM >::SetupHaloBoxes(), and DistributedBoxCollection< DIM >::SetupLocalBoxesHalfOnly().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::SetUpBoxCollection ( const std::vector< Node< SPACE_DIM > * > &  rNodes  )  [inline, private]
template<unsigned SPACE_DIM>
unsigned NodesOnlyMesh< SPACE_DIM >::SolveNodeMapping ( unsigned  index  )  const [inline, virtual]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::UpdateBoxCollection (  )  [inline]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::UpdateNodeIndices (  )  [inline, private]

Make sure that node indices match their location, and update mNodesMapping.

Definition at line 259 of file NodesOnlyMesh.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and NodesOnlyMesh< SPACE_DIM >::mNodesMapping.

Referenced by NodesOnlyMesh< SPACE_DIM >::ReMesh().


Friends And Related Function Documentation

template<unsigned SPACE_DIM>
friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.

Reimplemented in Cylindrical2dNodesOnlyMesh.

Definition at line 59 of file NodesOnlyMesh.hpp.


Member Data Documentation

template<unsigned SPACE_DIM>
bool NodesOnlyMesh< SPACE_DIM >::mCalculateNodeNeighbours [private]

Whether to calculate node neighbours in the box collection. Switch off for efficiency

Definition at line 119 of file NodesOnlyMesh.hpp.

Referenced by NodesOnlyMesh< SPACE_DIM >::SetCalculateNodeNeighbours(), and NodesOnlyMesh< SPACE_DIM >::SetUpBoxCollection().

template<unsigned SPACE_DIM>
std::vector<unsigned> NodesOnlyMesh< SPACE_DIM >::mDeletedGlobalNodeIndices [private]

A list of the global indices of nodes that have been deleted from this process and can be reused.

Definition at line 99 of file NodesOnlyMesh.hpp.

Referenced by NodesOnlyMesh< SPACE_DIM >::DeleteMovedNode(), NodesOnlyMesh< SPACE_DIM >::DeleteNode(), and NodesOnlyMesh< SPACE_DIM >::GetNextAvailableIndex().

template<unsigned SPACE_DIM>
std::vector<boost::shared_ptr<Node<SPACE_DIM> > > NodesOnlyMesh< SPACE_DIM >::mHaloNodes [private]
template<unsigned SPACE_DIM>
std::map<unsigned, unsigned> NodesOnlyMesh< SPACE_DIM >::mHaloNodesMapping [private]

A map from halo node global index to local index in mHaloNodes.

Definition at line 90 of file NodesOnlyMesh.hpp.

Referenced by NodesOnlyMesh< SPACE_DIM >::AddHaloNode(), NodesOnlyMesh< SPACE_DIM >::ClearHaloNodes(), and NodesOnlyMesh< SPACE_DIM >::GetNodeOrHaloNode().

template<unsigned SPACE_DIM>
unsigned NodesOnlyMesh< SPACE_DIM >::mIndexCounter [private]

A counter of the number of fresh node indices used on this process. Ensures unique indices in parallel.

Definition at line 93 of file NodesOnlyMesh.hpp.

Referenced by NodesOnlyMesh< SPACE_DIM >::Clear(), NodesOnlyMesh< SPACE_DIM >::GetMaximumNodeIndex(), and NodesOnlyMesh< SPACE_DIM >::GetNextAvailableIndex().

template<unsigned SPACE_DIM>
std::vector<bool> NodesOnlyMesh< SPACE_DIM >::mLocalInitialNodes [private]

A list of flags showing which initial nodes passed to ConstructNodesWithoutMesh were created on this process.

Definition at line 109 of file NodesOnlyMesh.hpp.

Referenced by NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh(), and NodesOnlyMesh< SPACE_DIM >::rGetInitiallyOwnedNodes().

template<unsigned SPACE_DIM>
unsigned NodesOnlyMesh< SPACE_DIM >::mMaxAddedNodeIndex [private]

A variable to keep track of added node indices so we know the largest on this process. Used to create a large enough NodeMap when remeshing.

Definition at line 113 of file NodesOnlyMesh.hpp.

Referenced by NodesOnlyMesh< SPACE_DIM >::AddNodeWithFixedIndex(), and NodesOnlyMesh< SPACE_DIM >::GetMaximumNodeIndex().

template<unsigned SPACE_DIM>
double NodesOnlyMesh< SPACE_DIM >::mMaximumInteractionDistance [private]
template<unsigned SPACE_DIM>
double NodesOnlyMesh< SPACE_DIM >::mMinimumNodeDomainBoundarySeparation [private]

A minimum separation to maintain between nodes and the boundary of mpBoxCollection, which grows with the mesh.

Definition at line 96 of file NodesOnlyMesh.hpp.

Referenced by NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh(), NodesOnlyMesh< SPACE_DIM >::IsANodeCloseToDomainBoundary(), NodesOnlyMesh< 2 >::serialize(), and NodesOnlyMesh< SPACE_DIM >::SetMinimumNodeDomainBoundarySeparation().

template<unsigned SPACE_DIM>
std::map<unsigned, unsigned> NodesOnlyMesh< SPACE_DIM >::mNodesMapping [private]
template<unsigned SPACE_DIM>
std::vector<unsigned> NodesOnlyMesh< SPACE_DIM >::mNodesToSendLeft [private]

A list of global indices of nodes that need to be moved to the left hand process.

Definition at line 105 of file NodesOnlyMesh.hpp.

Referenced by NodesOnlyMesh< SPACE_DIM >::CalculateNodesOutsideLocalDomain(), and NodesOnlyMesh< SPACE_DIM >::rGetNodesToSendLeft().

template<unsigned SPACE_DIM>
std::vector<unsigned> NodesOnlyMesh< SPACE_DIM >::mNodesToSendRight [private]

A list of global indices of nodes that need to be moved to the right hand process.

Definition at line 102 of file NodesOnlyMesh.hpp.

Referenced by NodesOnlyMesh< SPACE_DIM >::CalculateNodesOutsideLocalDomain(), and NodesOnlyMesh< SPACE_DIM >::rGetNodesToSendRight().

template<unsigned SPACE_DIM>
DistributedBoxCollection<SPACE_DIM>* NodesOnlyMesh< SPACE_DIM >::mpBoxCollection [private]

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

Generated by  doxygen 1.6.2