![]() |
Chaste Commit::333233612e3dcc941d260418acd7b5ccdc30390e
|
#include <AbstractMesh.hpp>
Classes | |
class | NodeIterator |
Public Types | |
typedef std::vector< Node< SPACE_DIM > * >::const_iterator | BoundaryNodeIterator |
Public Member Functions | |
NodeIterator | GetNodeIteratorBegin (bool skipDeletedNodes=true) |
NodeIterator | GetNodeIteratorEnd () |
AbstractMesh () | |
virtual | ~AbstractMesh () |
virtual unsigned | GetNumNodes () const |
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 DistributedVectorFactory * | GetDistributedVectorFactory () |
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 |
virtual c_vector< double, SPACE_DIM > | GetVectorFromAtoB (const c_vector< double, SPACE_DIM > &rLocationA, const c_vector< double, SPACE_DIM > &rLocationB) |
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 | |
virtual void | SetElementOwnerships () |
ChasteCuboid< SPACE_DIM > | CalculateBoundingBox (const std::vector< Node< SPACE_DIM > * > &rNodes) const |
Protected Attributes | |
std::vector< Node< SPACE_DIM > * > | mNodes |
std::vector< Node< SPACE_DIM > * > | mBoundaryNodes |
DistributedVectorFactory * | mpDistributedVectorFactory |
std::vector< unsigned > | mNodePermutation |
std::string | mMeshFileBaseName |
bool | mMeshChangesDuringSimulation |
Private Member Functions | |
virtual unsigned | SolveNodeMapping (unsigned index) const =0 |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | TestDistributedTetrahedralMesh |
template<unsigned A_DIMENSION> | |
class | NodesOnlyMesh |
template<unsigned A_DIMENSION> | |
class | QuadraticMeshHelper |
class | boost::serialization::access |
Abstract base class for all meshes.
Definition at line 60 of file AbstractMesh.hpp.
typedef std::vector<Node<SPACE_DIM>*>::const_iterator AbstractMesh< ELEMENT_DIM, SPACE_DIM >::BoundaryNodeIterator |
Definition of boundary node Iterator type.
Definition at line 148 of file AbstractMesh.hpp.
AbstractMesh< ELEMENT_DIM, SPACE_DIM >::AbstractMesh | ( | ) |
Constructor.
Definition at line 44 of file AbstractMesh.cpp.
|
virtual |
Virtual destructor, since this class has virtual methods.
Definition at line 52 of file AbstractMesh.cpp.
|
virtual |
Calculate the bounding box (width extremes for all dimensions of the mesh). Overridden in distributed case
Reimplemented in DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, and DistributedTetrahedralMesh< DIM, DIM >.
Definition at line 277 of file AbstractMesh.cpp.
Referenced by DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateBoundingBox(), and Cylindrical2dMesh::UpdateTopAndBottom().
|
protected |
Calculate a bounding box from a set of nodes. A generalised version of the public CalculateBoundingBox method.
rNodes | the list of nodes to calculate the bounding box for. |
Definition at line 227 of file AbstractMesh.cpp.
Referenced by Electrodes< DIM >::Electrodes(), and FineCoarseMeshPair< DIM >::SetUpBoxes().
unsigned AbstractMesh< ELEMENT_DIM, SPACE_DIM >::CalculateMaximumContainingElementsPerProcess | ( | ) | const |
Definition at line 491 of file AbstractMesh.cpp.
Referenced by LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseForSolve(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNclFile().
AbstractMesh< ELEMENT_DIM, SPACE_DIM >::BoundaryNodeIterator AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryNodeIteratorBegin | ( | ) | const |
Definition at line 169 of file AbstractMesh.cpp.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 3 >::DefineConstantDirichletOnMeshBoundary(), and PapillaryFibreCalculator::GetRadiusVectorForOneElement().
AbstractMesh< ELEMENT_DIM, SPACE_DIM >::BoundaryNodeIterator AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryNodeIteratorEnd | ( | ) | const |
Definition at line 175 of file AbstractMesh.cpp.
Referenced by PapillaryFibreCalculator::GetRadiusVectorForOneElement().
double AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetDistanceBetweenNodes | ( | unsigned | indexA, |
unsigned | indexB | ||
) |
Return the distance between two nodes.
This method calls GetVectorFromAtoB(), which is overridden in some daughter classes (e.g. Cylindrical2dMesh).
indexA | a node index |
indexB | a node index |
Definition at line 212 of file AbstractMesh.cpp.
Referenced by HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::Visit().
|
virtual |
Definition at line 133 of file AbstractMesh.cpp.
References PetscTools::IsParallel().
Referenced by Hdf5ToTxtConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToTxtConverter(), Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToVtkConverter(), VoltageInterpolaterOntoMechanicsMesh< DIM >::VoltageInterpolaterOntoMechanicsMesh(), and NodePartitioner< ELEMENT_DIM, SPACE_DIM >::DumbPartitioning().
std::string AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetMeshFileBaseName | ( | ) | const |
Definition at line 181 of file AbstractMesh.cpp.
Referenced by AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::save().
|
virtual |
GetNearestNodeIndex iterates through all nodes in the mesh and returns the global index with the smallest distance to the provided point.
This method is overridden in the distributed case to return the global node index.
This method uses GetVectorFromAtoB distance and hence may return a correct solution in non-Euclidean space, but only if this method is overridden in a subclass (see e.g. Cylindrical2dMesh for an example of this).
rTestPoint | reference to the point |
Reimplemented in DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, and DistributedTetrahedralMesh< DIM, DIM >.
Definition at line 285 of file AbstractMesh.cpp.
Referenced by DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNearestNodeIndex().
Node< SPACE_DIM > * AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode | ( | unsigned | index | ) | const |
Get the node with a given index in the mesh.
index | the global index of the node |
Definition at line 93 of file AbstractMesh.cpp.
Referenced by AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMesh(), PottsBasedCellPopulation< DIM >::CreateMutableMesh(), CryptCellsGenerator< CELL_CYCLE_MODEL >::Generate(), Cylindrical2dVertexMesh::GetMeshForVtk(), Toroidal2dVertexMesh::GetMeshForVtk(), NonlinearElasticityTools< DIM >::GetNodesByComponentValue(), PapillaryFibreCalculator::GetRadiusVectorForOneElement(), TrapezoidEdgeVertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::MakeVtkMesh(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::MakeVtkMesh(), Toroidal2dMesh::ReMesh(), Cylindrical2dNodesOnlyMesh::SetNode(), Cylindrical2dMesh::UseTheseElementsToDecideMeshing(), and DiscreteSystemForceCalculator::WriteResultsToFile().
Node< SPACE_DIM > * AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeFromPrePermutationIndex | ( | unsigned | index | ) | const |
Get the node with a given index in the mesh, prior to any node permutation being applied. For non-permuted meshes, this will have the same effect as GetNode.
This method is intended for use by the archiving code, to enable checkpoint migration, so that we can load the correct cells and boundary conditions after the mesh has been re-partitioned.
If unsure, use GetNode in preference to this method!
index | the global index of the node prior to a permutation being applied |
Definition at line 106 of file AbstractMesh.cpp.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::MergeFromArchive().
|
inline |
skipDeletedNodes | whether to include deleted nodes |
Definition at line 531 of file AbstractMesh.hpp.
Referenced by AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AbstractCentreBasedCellPopulation(), Electrodes< DIM >::Electrodes(), NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles(), VertexCryptBoundaryForce< DIM >::AddForceContribution(), Cylindrical2dMesh::CreateMirrorNodes(), Toroidal2dMesh::CreateMirrorNodes(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetParallelFiles(), ImmersedBoundarySvgWriter< DIM >::UpdateAtEndOfTimeStep(), NodeVelocityWriter< ELEMENT_DIM, SPACE_DIM >::Visit(), NodeVelocityWriter< ELEMENT_DIM, SPACE_DIM >::Visit(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNclFile().
|
inline |
Definition at line 538 of file AbstractMesh.hpp.
Referenced by Electrodes< DIM >::Electrodes(), NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles(), VertexCryptBoundaryForce< DIM >::AddForceContribution(), Cylindrical2dMesh::CreateMirrorNodes(), Toroidal2dMesh::CreateMirrorNodes(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetParallelFiles(), ImmersedBoundarySvgWriter< DIM >::UpdateAtEndOfTimeStep(), NodeVelocityWriter< ELEMENT_DIM, SPACE_DIM >::Visit(), NodeVelocityWriter< ELEMENT_DIM, SPACE_DIM >::Visit(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNclFile().
|
virtual |
Get the node with a given index in the mesh (synonym of GetNode() unless overridden in a distributed mesh).
index | the global index of the node |
Reimplemented in DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, DistributedTetrahedralMesh< DIM, DIM >, NodesOnlyMesh< SPACE_DIM >, NodesOnlyMesh< 2 >, and NodesOnlyMesh< DIM >.
Definition at line 100 of file AbstractMesh.cpp.
Referenced by QuadraticMeshHelper< DIM >::AddInternalNodesToElements().
|
virtual |
Reimplemented in DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, and DistributedTetrahedralMesh< DIM, DIM >.
Definition at line 78 of file AbstractMesh.cpp.
Referenced by TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ExportToMesher(), Cylindrical2dMesh::ReMesh(), Toroidal2dMesh::ReMesh(), Cylindrical2dMesh::UseTheseElementsToDecideMeshing(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNclFile().
unsigned AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryNodes | ( | ) | const |
Definition at line 72 of file AbstractMesh.cpp.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 3 >::DefineConstantDirichletOnMeshBoundary().
unsigned AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodeAttributes | ( | ) | const |
Definition at line 84 of file AbstractMesh.cpp.
|
virtual |
Overridden in MutableMesh and DistributedTetrahedralMesh.
Reimplemented in PottsMesh< DIM >, PottsMesh< SPACE_DIM >, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, DistributedTetrahedralMesh< DIM, DIM >, MutableMesh< ELEMENT_DIM, SPACE_DIM >, MutableMesh< 2, 2 >, MutableMesh< DIM, DIM >, MutableMesh< SPACE_DIM, SPACE_DIM >, NodesOnlyMesh< SPACE_DIM >, NodesOnlyMesh< 2 >, NodesOnlyMesh< DIM >, ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >, ImmersedBoundaryMesh< 2, 2 >, ImmersedBoundaryMesh< DIM, DIM >, MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >, MutableVertexMesh< 2, 2 >, MutableVertexMesh< DIM, DIM >, VertexMesh< ELEMENT_DIM, SPACE_DIM >, VertexMesh< 2, 2 >, and VertexMesh< DIM, DIM >.
Definition at line 66 of file AbstractMesh.cpp.
Referenced by AbstractContinuumMechanicsSolver< DIM >::AbstractContinuumMechanicsSolver(), CardiacElectroMechProbRegularGeom< DIM >::CardiacElectroMechProbRegularGeom(), CmguiDeformedSolutionsWriter< DIM >::CmguiDeformedSolutionsWriter(), Hdf5ToTxtConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToTxtConverter(), Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToVtkConverter(), StreeterFibreGenerator< SPACE_DIM >::StreeterFibreGenerator(), VoltageInterpolaterOntoMechanicsMesh< DIM >::VoltageInterpolaterOntoMechanicsMesh(), AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Calculate(), CuboidMeshConstructor< ELEMENT_DIM, SPACE_DIM >::Construct(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMesh(), NodePartitioner< ELEMENT_DIM, SPACE_DIM >::DumbPartitioning(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ExportToMesher(), CryptCellsGenerator< CELL_CYCLE_MODEL >::Generate(), NonlinearElasticityTools< DIM >::GetNodesByComponentValue(), LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::PrepareForSetupLinearSystem(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNclFile(), DiscreteSystemForceCalculator::WriteResultsToFile(), and LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteVtkResultsToFile().
|
virtual |
This method is overridden in some daughter classes (e.g. Cylindrical2dMesh).
rLocationA | a c_vector of coordinates |
rLocationB | a c_vector of coordinates |
Reimplemented in ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >, ImmersedBoundaryMesh< 2, 2 >, ImmersedBoundaryMesh< DIM, DIM >, PeriodicNodesOnlyMesh< SPACE_DIM >, VertexMesh< ELEMENT_DIM, SPACE_DIM >, VertexMesh< 2, 2 >, and VertexMesh< DIM, DIM >.
Definition at line 204 of file AbstractMesh.cpp.
Referenced by VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVectorFromAtoB().
|
virtual |
Calculate the 'width' of any dimension of the mesh.
This method is overridden in some daughter classes (e.g. Cylindrical2dMesh).
rDimension | a dimension (0,1 or 2) |
Reimplemented in NodesOnlyMesh< SPACE_DIM >, NodesOnlyMesh< 2 >, NodesOnlyMesh< DIM >, Cylindrical2dMesh, Cylindrical2dNodesOnlyMesh, PeriodicNodesOnlyMesh< SPACE_DIM >, Toroidal2dMesh, Cylindrical2dVertexMesh, and Toroidal2dVertexMesh.
Definition at line 220 of file AbstractMesh.cpp.
Referenced by NodesOnlyMesh< SPACE_DIM >::GetWidth(), Cylindrical2dMesh::GetWidth(), Cylindrical2dNodesOnlyMesh::GetWidth(), PeriodicNodesOnlyMesh< SPACE_DIM >::GetWidth(), and Cylindrical2dVertexMesh::GetWidth().
bool AbstractMesh< ELEMENT_DIM, SPACE_DIM >::IsMeshChanging | ( | ) | const |
Definition at line 485 of file AbstractMesh.cpp.
bool AbstractMesh< ELEMENT_DIM, SPACE_DIM >::IsMeshOnDisk | ( | ) | const |
Get whether this mesh was read from file.
Definition at line 192 of file AbstractMesh.cpp.
Referenced by AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::save().
|
virtual |
Permute the nodes so that they appear in a different order in mNodes (and their mIndex's are altered accordingly).
Reimplemented in TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, TetrahedralMesh< 3, 3 >, and TetrahedralMesh< DIM, DIM >.
Definition at line 162 of file AbstractMesh.cpp.
References NEVER_REACHED.
|
virtual |
Read in the number of nodes per processor from file.
rNodesPerProcessorFile | the name of the file |
Reimplemented in TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, TetrahedralMesh< 3, 3 >, and TetrahedralMesh< DIM, DIM >.
Definition at line 120 of file AbstractMesh.cpp.
References NEVER_REACHED.
|
virtual |
This method allows the mesh properties to be re-calculated after one or more nodes have been moved.
Reimplemented in TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, TetrahedralMesh< 3, 3 >, TetrahedralMesh< DIM, DIM >, Cylindrical2dNodesOnlyMesh, PeriodicNodesOnlyMesh< SPACE_DIM >, and Toroidal2dMesh.
Definition at line 480 of file AbstractMesh.cpp.
Referenced by Cylindrical2dNodesOnlyMesh::RefreshMesh(), and PeriodicNodesOnlyMesh< SPACE_DIM >::RefreshMesh().
const std::vector< unsigned > & AbstractMesh< ELEMENT_DIM, SPACE_DIM >::rGetNodePermutation | ( | ) | const |
When empty (most meshes) there is no node permutation When non-empty (parallel distributed meshes) then for a given original_index mNodePermutation[original_index] holds the new assigned index of that node in memory
Definition at line 198 of file AbstractMesh.cpp.
Referenced by QuadraticMeshHelper< DIM >::AddInternalNodesToElements(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::save(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNclFile().
|
virtual |
Do a general mesh rotation with a positive determinant orthonormal rotation matrix. This is the rotation method that actually does the work. Should be overridden when the child class has halo nodes.
rotationMatrix | is a Ublas rotation matrix of the correct form |
Reimplemented in DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, and DistributedTetrahedralMesh< DIM, DIM >.
Definition at line 385 of file AbstractMesh.cpp.
void AbstractMesh< ELEMENT_DIM, SPACE_DIM >::Rotate | ( | c_vector< double, 3 > | axis, |
double | angle | ||
) |
Do an angle axis rotation.
axis | is the axis of rotation (does not need to be normalised) |
angle | is the angle of rotation in radians |
Definition at line 399 of file AbstractMesh.cpp.
void AbstractMesh< ELEMENT_DIM, SPACE_DIM >::Rotate | ( | double | theta | ) |
Rotating a 2D mesh equates that rotation around the z-axis.
theta | is the angle of rotation in radians |
Definition at line 474 of file AbstractMesh.cpp.
void AbstractMesh< ELEMENT_DIM, SPACE_DIM >::RotateX | ( | const double | theta | ) |
Rotate the mesh about the x-axis.
theta | is the angle of rotation in radians |
Definition at line 424 of file AbstractMesh.cpp.
void AbstractMesh< ELEMENT_DIM, SPACE_DIM >::RotateY | ( | const double | theta | ) |
Rotate the mesh about the y-axis.
theta | is the angle of rotation in radians |
Definition at line 440 of file AbstractMesh.cpp.
void AbstractMesh< ELEMENT_DIM, SPACE_DIM >::RotateZ | ( | const double | theta | ) |
Rotate the mesh about the z-axis.
theta | is the angle of rotation in radians |
Definition at line 457 of file AbstractMesh.cpp.
References EXCEPTION.
|
virtual |
Scale the mesh.
xFactor | is the scale in the x-direction (defaults to 1.0) |
yFactor | is the scale in the y-direction (defaults to 1.0) |
zFactor | is the scale in the z-direction (defaults to 1.0) |
Reimplemented in DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, DistributedTetrahedralMesh< DIM, DIM >, and Cylindrical2dVertexMesh.
Definition at line 322 of file AbstractMesh.cpp.
Referenced by DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::Scale(), and Cylindrical2dVertexMesh::Scale().
|
inlineprivate |
Serialize the mesh.
archive | the archive |
version | the current version of this class |
Definition at line 87 of file AbstractMesh.hpp.
References ProcessSpecificArchive< Archive >::Get(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mMeshChangesDuringSimulation, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory.
|
virtual |
Set method for mpDistributedVectorFactory. Must be called before the mesh is used for anything. This only actually impacts the DistributedTetrahedralMesh subclass, in which the supplied factory is then used to specify the node distribution among the processes.
pFactory | a factory to use for this mesh |
Reimplemented in DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, and DistributedTetrahedralMesh< DIM, DIM >.
Definition at line 147 of file AbstractMesh.cpp.
References EXCEPTION, PetscTools::GetNumProcs(), and DistributedVectorFactory::GetNumProcs().
Referenced by AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::load(), and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SetDistributedVectorFactory().
|
protectedvirtual |
Does nothing. Used in derived classes which have elements
Reimplemented in AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, AbstractTetrahedralMesh< DIM, DIM >, AbstractTetrahedralMesh< ELEMENT_DIM, ELEMENT_DIM >, AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM >, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, and DistributedTetrahedralMesh< DIM, DIM >.
Definition at line 127 of file AbstractMesh.cpp.
void AbstractMesh< ELEMENT_DIM, SPACE_DIM >::SetMeshHasChangedSinceLoading | ( | ) |
Set whether the mesh has been modified since it was read from file. This prevents the archiving code just blithely storing the original, unmodified, mesh.
Definition at line 506 of file AbstractMesh.cpp.
Referenced by ImmersedBoundaryCellPopulation< DIM >::GetTetrahedralMeshForPdeModifier(), and VertexBasedCellPopulation< DIM >::GetTetrahedralMeshForPdeModifier().
|
privatepure virtual |
Pure virtual solve node mapping method. For a node with a given global index, get the local index used by this process.
Overridden in TetrahedralMesh DistributedTetrahedralMesh and Vertex Mesh classes.
index | the global index of the node |
Implemented in PottsMesh< DIM >, PottsMesh< SPACE_DIM >, DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, DistributedTetrahedralMesh< DIM, DIM >, NodesOnlyMesh< SPACE_DIM >, NodesOnlyMesh< 2 >, NodesOnlyMesh< DIM >, TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, TetrahedralMesh< 3, 3 >, TetrahedralMesh< DIM, DIM >, ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >, ImmersedBoundaryMesh< 2, 2 >, ImmersedBoundaryMesh< DIM, DIM >, VertexMesh< ELEMENT_DIM, SPACE_DIM >, VertexMesh< 2, 2 >, and VertexMesh< DIM, DIM >.
|
virtual |
Translate the mesh given the displacement vector. This is the translation method that actually does the work. Should be overridden when the child class has halo nodes.
rDisplacement | is a translation vector of the correct size |
Reimplemented in DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >, and DistributedTetrahedralMesh< DIM, DIM >.
Definition at line 371 of file AbstractMesh.cpp.
void AbstractMesh< ELEMENT_DIM, SPACE_DIM >::Translate | ( | const double | xMovement = 0.0 , |
const double | yMovement = 0.0 , |
||
const double | zMovement = 0.0 |
||
) |
Translate the mesh given the coordinate displacements separately.
xMovement | is the x-displacement (defaults to 0.0) |
yMovement | is the y-displacement (defaults to 0.0) |
zMovement | is the z-displacement (defaults to 0.0) |
Definition at line 344 of file AbstractMesh.cpp.
Needed for serialization.
Definition at line 79 of file AbstractMesh.hpp.
|
friend |
Definition at line 63 of file AbstractMesh.hpp.
|
friend |
Definition at line 64 of file AbstractMesh.hpp.
|
friend |
Definition at line 62 of file AbstractMesh.hpp.
|
protected |
Vector of pointers to boundary nodes in the mesh.
Definition at line 99 of file AbstractMesh.hpp.
Referenced by QuadraticMeshHelper< DIM >::AddNodeToBoundaryElement(), and TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ImportFromMesher().
|
protected |
Whether this mesh changes during simulation (used to know whether to write a new one to file)
Definition at line 125 of file AbstractMesh.hpp.
Referenced by Cylindrical2dVertexMesh::Cylindrical2dVertexMesh(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::MutableMesh(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::MutableVertexMesh(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::MutableVertexMesh(), Toroidal2dVertexMesh::Toroidal2dVertexMesh(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh(), Toroidal2dVertexMesh::ConstructFromMeshReader(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::save(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
If the mesh is constructed from file using a MeshReader, this member variable stores the base name of these files.
Definition at line 120 of file AbstractMesh.hpp.
|
protected |
Vector containing node permutation information.
When empty (most meshes) there is no node permutation When non-empty (parallel distributed meshes) then for a given original_index mNodePermutation[original_index] holds the new assigned index of that node in memory
Definition at line 114 of file AbstractMesh.hpp.
|
protected |
Vector of pointers to nodes in the mesh.
Definition at line 96 of file AbstractMesh.hpp.
Referenced by Cylindrical2dMesh::Cylindrical2dMesh(), Cylindrical2dVertexMesh::Cylindrical2dVertexMesh(), ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::ImmersedBoundaryMesh(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::MutableVertexMesh(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator(), Toroidal2dMesh::Toroidal2dMesh(), Toroidal2dVertexMesh::Toroidal2dVertexMesh(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh(), Toroidal2dVertexMesh::ConstructFromMeshReader(), NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh(), Cylindrical2dMesh::CreateMirrorNodes(), Toroidal2dMesh::CreateMirrorNodes(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ExportToMesher(), VertexMesh< 2, 2 >::GetFace(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ImportFromMesher(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::load(), NodesOnlyMesh< SPACE_DIM >::load(), Cylindrical2dMesh::ReconstructCylindricalMesh(), Toroidal2dMesh::ReconstructCylindricalMesh(), Toroidal2dMesh::ReconstructToroidalMesh(), Cylindrical2dNodesOnlyMesh::RefreshMesh(), Toroidal2dMesh::RefreshMesh(), Cylindrical2dMesh::ReMesh(), Toroidal2dMesh::ReMesh(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::save(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveNodeMapping(), and VertexMesh< 2, 2 >::SolveNodeMapping().
|
protected |
DistributedVectorFactory capable of reproducing the given number of nodes owned by each processor.
Definition at line 105 of file AbstractMesh.hpp.
Referenced by AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::load(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::serialize().