#include <MutableMesh.hpp>
Inherits TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.
Public Member Functions | |
MutableMesh () | |
MutableMesh (std::vector< Node< SPACE_DIM > * > nodes) | |
virtual | ~MutableMesh () |
void | Clear () |
unsigned | GetNumNodes () const |
unsigned | GetNumElements () const |
unsigned | GetNumBoundaryElements () const |
void | RescaleMeshFromBoundaryNode (ChastePoint< 1 > updatedPoint, unsigned boundaryNodeIndex) |
virtual unsigned | AddNode (Node< SPACE_DIM > *pNewNode) |
unsigned | AddElement (Element< ELEMENT_DIM, SPACE_DIM > *pNewElement) |
virtual void | SetNode (unsigned index, ChastePoint< SPACE_DIM > point, bool concreteMove=true) |
void | MoveMergeNode (unsigned index, unsigned targetIndex, bool concreteMove=true) |
virtual void | DeleteNode (unsigned index) |
virtual void | DeleteElement (unsigned index) |
void | DeleteNodePriorToReMesh (unsigned index) |
unsigned | RefineElement (Element< ELEMENT_DIM, SPACE_DIM > *pElement, ChastePoint< SPACE_DIM > point) |
void | DeleteBoundaryNodeAt (unsigned index) |
void | ReIndex (NodeMap &map) |
virtual void | ReMesh (NodeMap &map) |
void | ReMesh () |
std::vector< c_vector < unsigned, 5 > > | SplitLongEdges (double cutoffLength) |
c_vector< unsigned, 3 > | SplitEdge (Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB) |
bool | CheckIsVoronoi (double maxPenetration=0.0) |
template<> | |
void | RescaleMeshFromBoundaryNode (ChastePoint< 1 > updatedPoint, unsigned boundaryNodeIndex) |
Protected Attributes | |
std::vector< unsigned > | mDeletedElementIndices |
std::vector< unsigned > | mDeletedBoundaryElementIndices |
std::vector< unsigned > | mDeletedNodeIndices |
bool | mAddedNodes |
Private Member Functions | |
template<class Archive > | |
void | save (Archive &archive, const unsigned int version) const |
template<class Archive > | |
void | load (Archive &archive, const unsigned int version) |
bool | CheckIsVoronoi (Element< ELEMENT_DIM, SPACE_DIM > *pElement, double maxPenetration) |
Friends | |
class | boost::serialization::access |
A concrete mutable mesh class.
Definition at line 50 of file MutableMesh.hpp.
MutableMesh< ELEMENT_DIM, SPACE_DIM >::MutableMesh | ( | ) | [inline] |
Constructor.
Definition at line 52 of file MutableMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mMeshChangesDuringSimulation.
MutableMesh< ELEMENT_DIM, SPACE_DIM >::MutableMesh | ( | std::vector< Node< SPACE_DIM > * > | nodes | ) | [inline] |
Constructor which takes in a vector of nodes.
nodes | a vector of nodes |
Definition at line 59 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::mAddedNodes, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mMeshChangesDuringSimulation, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh().
MutableMesh< ELEMENT_DIM, SPACE_DIM >::~MutableMesh | ( | ) | [inline, virtual] |
Destructor.
Definition at line 74 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::Clear().
unsigned MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddElement | ( | Element< ELEMENT_DIM, SPACE_DIM > * | pNewElement | ) | [inline] |
Helper method to add an element to the mesh.
pNewElement | pointer to the new element object. The object will be updated with the index assigned to the element. |
Definition at line 100 of file MutableMesh.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements, and Element< ELEMENT_DIM, SPACE_DIM >::ResetIndex().
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::SplitEdge().
unsigned MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode | ( | Node< SPACE_DIM > * | pNewNode | ) | [inline, virtual] |
Add a node to the mesh.
NB. After calling this one or more times, you must then call ReMesh
pNewNode | pointer to the new node |
Reimplemented in NodesOnlyMesh< SPACE_DIM >, NodesOnlyMesh< DIM >, and NodesOnlyMesh< 2 >.
Definition at line 80 of file MutableMesh.cpp.
References Node< SPACE_DIM >::GetIndex(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::mAddedNodes, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and Node< SPACE_DIM >::SetIndex().
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::RefineElement(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::SplitEdge().
bool MutableMesh< ELEMENT_DIM, SPACE_DIM >::CheckIsVoronoi | ( | double | maxPenetration = 0.0 |
) | [inline] |
maxPenetration | is the maximum distance a node is allowed to be inside the circumsphere of an element that it is not a member of, as a proportion of the circumsphere radius. |
Definition at line 1079 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::CheckIsVoronoi(), and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements.
bool MutableMesh< ELEMENT_DIM, SPACE_DIM >::CheckIsVoronoi | ( | Element< ELEMENT_DIM, SPACE_DIM > * | pElement, | |
double | maxPenetration | |||
) | [inline, private] |
pElement | pointer to an element | |
maxPenetration | is the maximum distance a node is allowed to be inside the circumsphere of the element, as a proportion of the circumsphere radius. |
Definition at line 995 of file MutableMesh.cpp.
References Element< ELEMENT_DIM, SPACE_DIM >::CalculateCircumsphere(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementInverseJacobians, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobians, and Node< SPACE_DIM >::rGetContainingElementIndices().
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::CheckIsVoronoi().
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::Clear | ( | ) | [inline, virtual] |
Clear all the data in the mesh.
Reimplemented from TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.
Reimplemented in NodesOnlyMesh< SPACE_DIM >, NodesOnlyMesh< DIM >, and NodesOnlyMesh< 2 >.
Definition at line 124 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::mAddedNodes, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedBoundaryElementIndices, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices, and MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::MutableMesh(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::~MutableMesh().
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt | ( | unsigned | index | ) | [inline] |
Remove a boundary node, and update all the appropriate data structures.
The deleted node is not removed from the list, merely marked as deleted, and can be reused when a new node is added to the mesh.
Any elements or boundary elements containing this node will be removed. The boundary nodes information will be updated with new boundary node(s). NB: New boundary elements WILL NOT be added.
index | The index of the node to remove. |
Definition at line 516 of file MutableMesh.cpp.
References EXCEPTION, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElement(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), Node< SPACE_DIM >::IsDeleted(), Element< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryNodes, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedBoundaryElementIndices, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and Node< SPACE_DIM >::SetAsBoundaryNode().
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteElement | ( | unsigned | index | ) | [inline, virtual] |
Delete an element from the mesh. Any remaining nodes not connected to an element are also removed.
index | The index of the element to be deleted |
Definition at line 267 of file MutableMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryElements(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedBoundaryElementIndices, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices, and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements.
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNode | ( | unsigned | index | ) | [inline, virtual] |
Delete a node from the mesh by finding an appropriate neighbour node to merge it with.
index | is the index of the node to be deleted |
Reimplemented in NodesOnlyMesh< SPACE_DIM >, NodesOnlyMesh< DIM >, and NodesOnlyMesh< 2 >.
Definition at line 231 of file MutableMesh.cpp.
References EXCEPTION, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and MutableMesh< ELEMENT_DIM, SPACE_DIM >::MoveMergeNode().
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNodePriorToReMesh | ( | unsigned | index | ) | [inline] |
Mark a node as deleted. Note that this method DOES NOT deal with the associated elements and therefore should only be called immediately prior to a ReMesh() being called. (Thus saves work compared to DeleteNode() function and does not MoveMerge the node and elements).
index | The index of the node to delete |
Definition at line 299 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.
Referenced by HoneycombMeshGenerator::GetCircularMesh(), and NodeBasedCellPopulation< DIM >::RemoveDeadCells().
unsigned MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryElements | ( | ) | const [inline, virtual] |
Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 135 of file MutableMesh.cpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements, and MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedBoundaryElementIndices.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteElement().
unsigned MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements | ( | ) | const [inline, virtual] |
Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 141 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices, and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements.
unsigned MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes | ( | ) | const [inline, virtual] |
Reimplemented from AbstractMesh< ELEMENT_DIM, SPACE_DIM >.
Reimplemented in NodesOnlyMesh< SPACE_DIM >, NodesOnlyMesh< DIM >, and NodesOnlyMesh< 2 >.
Definition at line 147 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.
Referenced by HoneycombMeshGenerator::GetCellLocationIndices(), HoneycombMeshGenerator::GetCircularMesh(), MutableMesh< SPACE_DIM, SPACE_DIM >::load(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh().
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::load | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Load the mesh, along with attributes if saved nodes have attributes. Loading of attributes is covered in TestNodesOnlyMesh.
archive | the archive to save to. | |
version | the version number. |
Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 93 of file MutableMesh.hpp.
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::MoveMergeNode | ( | unsigned | index, | |
unsigned | targetIndex, | |||
bool | concreteMove = true | |||
) | [inline] |
Move one node to another (i.e. merges the nodes), refreshing/deleting elements as appropriate.
index | is the index of the node to be moved | |
targetIndex | is the index of the node to move to | |
concreteMove | can be set to false if you just want to check whether this will work (defaults to true). Set it to true if you're doing the merger for real, in order to do all the bookkeeping. |
Definition at line 306 of file MutableMesh.cpp.
References EXCEPTION, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElement(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementJacobianDeterminants, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementWeightedDirections, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedBoundaryElementIndices, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobianDeterminants, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNode().
unsigned MutableMesh< ELEMENT_DIM, SPACE_DIM >::RefineElement | ( | Element< ELEMENT_DIM, SPACE_DIM > * | pElement, | |
ChastePoint< SPACE_DIM > | point | |||
) | [inline] |
Refine an element at a given point.
pElement | pointer to the element | |
point | a point located in the element |
Definition at line 460 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), EXCEPTION, Element< ELEMENT_DIM, SPACE_DIM >::IncludesPoint(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, ChastePoint< DIM >::rGetLocation(), and Element< ELEMENT_DIM, SPACE_DIM >::UpdateNode().
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReIndex | ( | NodeMap & | map | ) | [inline] |
Re-index a mesh so that it has no deleted elements or nodes.
map | is a NodeMap which associates the indices of nodes in the old mesh with indices of nodes in the new mesh. This should be created with the correct size (NumAllNodes) |
Definition at line 565 of file MutableMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::mAddedNodes, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementJacobianDeterminants, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementWeightedDirections, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedBoundaryElementIndices, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementInverseJacobians, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobianDeterminants, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementJacobians, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementWeightedDirections, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, NodeMap::Resize(), NodeMap::SetDeleted(), and NodeMap::SetNewIndex().
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh | ( | ) | [inline] |
Alternative version of remesh which takes no parameters, i.e. does not require a NodeMap. It will create one and call the other ReMesh method. Note: inherited classes should overload ReMesh(NodeMap&)
Definition at line 810 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes().
Referenced by MutableMesh< SPACE_DIM, SPACE_DIM >::load(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::MutableMesh().
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh | ( | NodeMap & | map | ) | [inline, virtual] |
Re-mesh a mesh using triangle (via library calls) or tetgen
map | is a NodeMap which associates the indices of nodes in the old mesh with indices of nodes in the new mesh. This should be created with the correct size (NumAllNodes) |
Reimplemented in NodesOnlyMesh< SPACE_DIM >, Cylindrical2dMesh, NodesOnlyMesh< DIM >, and NodesOnlyMesh< 2 >.
Definition at line 677 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), EXCEPTION, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ExportToMesher(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::FreeTriangulateIo(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ImportFromMesher(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::InitialiseTriangulateIo(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::mAddedNodes, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryElements, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mBoundaryNodes, MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElements, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RefreshJacobianCachedData(), NodeMap::Resize(), NodeMap::SetDeleted(), and NodeMap::SetNewIndex().
Referenced by CylindricalHoneycombMeshGenerator::CylindricalHoneycombMeshGenerator(), and HoneycombMeshGenerator::GetCircularMesh().
void MutableMesh< 1, 1 >::RescaleMeshFromBoundaryNode | ( | ChastePoint< 1 > | updatedPoint, | |
unsigned | boundaryNodeIndex | |||
) | [inline] |
The RescaleMeshFromBoundaryNode method is only defined for 1D meshes.
updatedPoint | point determining the scale factor | |
boundaryNodeIndex | index of the boundary node |
Definition at line 159 of file MutableMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::RefreshMesh().
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::RescaleMeshFromBoundaryNode | ( | ChastePoint< 1 > | updatedPoint, | |
unsigned | boundaryNodeIndex | |||
) |
Rescale the mesh from a boundary node.
updatedPoint | point determining the scale factor | |
boundaryNodeIndex | index of the boundary node |
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::save | ( | Archive & | archive, | |
const unsigned int | version | |||
) | const [inline, private] |
Save the mesh, along with attributes if nodes have attributes. Saving of attributes is covered in TestNodesOnlyMesh.
archive | the archive to save to. | |
version | the version number. |
Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.
Definition at line 62 of file MutableMesh.hpp.
void MutableMesh< ELEMENT_DIM, SPACE_DIM >::SetNode | ( | unsigned | index, | |
ChastePoint< SPACE_DIM > | point, | |||
bool | concreteMove = true | |||
) | [inline, virtual] |
Move the node with a particular index to a new point in space and verifies that the signed areas of the supporting Elements are positive.
index | is the index of the node to be moved | |
point | is the new target location of the node | |
concreteMove | is set to false if we want to skip the signed area tests (defaults to true) |
Definition at line 174 of file MutableMesh.cpp.
References EXCEPTION, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElement(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::mElementWeightedDirections, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.
c_vector< unsigned, 3 > MutableMesh< ELEMENT_DIM, SPACE_DIM >::SplitEdge | ( | Node< SPACE_DIM > * | pNodeA, | |
Node< SPACE_DIM > * | pNodeB | |||
) | [inline] |
Splits an edge in two and create all the relevant new elements and nodes
pNodeA | first point defining the edge | |
pNodeB | second point defining the edge |
Definition at line 914 of file MutableMesh.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddElement(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), Node< SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetVectorFromAtoB(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, NEVER_REACHED, AbstractElement< ELEMENT_DIM, SPACE_DIM >::ReplaceNode(), Node< SPACE_DIM >::rGetContainingElementIndices(), Node< SPACE_DIM >::rGetLocation(), and UNSIGNED_UNSET.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::SplitLongEdges().
std::vector< c_vector< unsigned, 5 > > MutableMesh< ELEMENT_DIM, SPACE_DIM >::SplitLongEdges | ( | double | cutoffLength | ) | [inline] |
Find edges in the mesh longer than the given cutoff length and split them creating new elements as required.
cutoffLength | cutoff length for edge splitting |
Definition at line 817 of file MutableMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetDistanceBetweenNodes(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), Node< SPACE_DIM >::GetIndex(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::SplitEdge().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.
Reimplemented in NodesOnlyMesh< SPACE_DIM >, Cylindrical2dMesh, Cylindrical2dNodesOnlyMesh, NodesOnlyMesh< DIM >, and NodesOnlyMesh< 2 >.
Definition at line 53 of file MutableMesh.hpp.
bool MutableMesh< ELEMENT_DIM, SPACE_DIM >::mAddedNodes [protected] |
Whether any nodes have been added to the mesh.
Definition at line 151 of file MutableMesh.hpp.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::MutableMesh(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReIndex(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh().
std::vector<unsigned> MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedBoundaryElementIndices [protected] |
Indices of boundary elements that have been marked as deleted. These indices can be reused when adding new boundary elements.
Definition at line 142 of file MutableMesh.hpp.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteElement(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryElements(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::MoveMergeNode(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReIndex().
std::vector<unsigned> MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedElementIndices [protected] |
Indices of elements that have been marked as deleted. These indices can be reused when adding new elements.
Definition at line 136 of file MutableMesh.hpp.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddElement(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteElement(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::MoveMergeNode(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::RefineElement(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReIndex().
std::vector<unsigned> MutableMesh< ELEMENT_DIM, SPACE_DIM >::mDeletedNodeIndices [protected] |
Indices of nodes that have been marked as deleted. These indices can be reused when adding new nodes.
Definition at line 148 of file MutableMesh.hpp.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::Clear(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteElement(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNodePriorToReMesh(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::MoveMergeNode(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReIndex(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh().