36 #ifndef ABSTRACTMESH_HPP_ 37 #define ABSTRACTMESH_HPP_ 50 #include "DistributedVectorFactory.hpp" 51 #include "ProcessSpecificArchive.hpp" 52 #include "ChasteCuboid.hpp" 54 #include <boost/utility.hpp> 59 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
62 friend class TestDistributedTetrahedralMesh;
79 friend class boost::serialization::access;
86 template<
class Archive>
87 void serialize(Archive & archive,
const unsigned int version)
96 std::vector<Node<SPACE_DIM> *>
mNodes;
306 virtual c_vector<double, SPACE_DIM>
GetVectorFromAtoB(
const c_vector<double, SPACE_DIM>& rLocationA,
307 const c_vector<double, SPACE_DIM>& rLocationB);
330 virtual double GetWidth(
const unsigned& rDimension)
const;
362 virtual void Scale(
const double xFactor=1.0,
const double yFactor=1.0,
const double zFactor=1.0);
371 virtual void Translate(
const c_vector<double, SPACE_DIM>& rDisplacement);
380 void Translate(
const double xMovement=0.0,
const double yMovement=0.0,
const double zMovement=0.0);
389 virtual void Rotate(c_matrix<double , SPACE_DIM, SPACE_DIM> rotationMatrix);
397 void Rotate(c_vector<double,3> axis,
double angle);
404 void RotateX(
const double theta);
411 void RotateY(
const double theta);
418 void RotateZ(
const double theta);
425 void Rotate(
double theta);
499 bool skipDeletedNodes=
true);
505 typename std::vector<Node<SPACE_DIM> *>::iterator
mNodeIter;
530 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
532 bool skipDeletedNodes)
537 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
543 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
550 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
557 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
563 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
575 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
579 bool skipDeletedNodes)
599 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
605 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
virtual DistributedVectorFactory * GetDistributedVectorFactory()
#define TEMPLATED_CLASS_IS_ABSTRACT_2_UNSIGNED(T)
std::vector< Node< SPACE_DIM > * > mBoundaryNodes
virtual void ReadNodesPerProcessorFile(const std::string &rNodesPerProcessorFile)
virtual unsigned GetNearestNodeIndex(const ChastePoint< SPACE_DIM > &rTestPoint)
virtual void RefreshMesh()
virtual Node< SPACE_DIM > * GetNodeOrHaloNode(unsigned index) const
virtual unsigned SolveNodeMapping(unsigned index) const =0
const std::vector< unsigned > & rGetNodePermutation() const
Node< SPACE_DIM > * operator->()
bool IsMeshChanging() const
virtual void Translate(const c_vector< double, SPACE_DIM > &rDisplacement)
std::vector< unsigned > mNodePermutation
Node< SPACE_DIM > * GetNode(unsigned index) const
std::vector< Node< SPACE_DIM > * >::iterator mNodeIter
void serialize(Archive &archive, const unsigned int version)
NodeIterator GetNodeIteratorEnd()
unsigned CalculateMaximumContainingElementsPerProcess() const
std::string GetMeshFileBaseName() const
virtual ChasteCuboid< SPACE_DIM > CalculateBoundingBox() const
virtual unsigned GetNumNodes() const
virtual void PermuteNodes()
Node< SPACE_DIM > & operator*()
BoundaryNodeIterator GetBoundaryNodeIteratorBegin() const
virtual unsigned GetNumAllNodes() const
NodeIterator & operator++()
virtual void SetElementOwnerships()
std::string mMeshFileBaseName
static Archive * Get(void)
double GetDistanceBetweenNodes(unsigned indexA, unsigned indexB)
bool mMeshChangesDuringSimulation
std::vector< Node< SPACE_DIM > * > mNodes
DistributedVectorFactory * mpDistributedVectorFactory
unsigned GetNumBoundaryNodes() const
bool operator!=(const typename AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator &rOther)
unsigned GetNumNodeAttributes() const
std::vector< Node< SPACE_DIM > * >::const_iterator BoundaryNodeIterator
NodeIterator GetNodeIteratorBegin(bool skipDeletedNodes=true)
bool IsMeshOnDisk() const
void SetMeshHasChangedSinceLoading()
virtual double GetWidth(const unsigned &rDimension) const
virtual void Rotate(c_matrix< double, SPACE_DIM, SPACE_DIM > rotationMatrix)
virtual c_vector< double, SPACE_DIM > GetVectorFromAtoB(const c_vector< double, SPACE_DIM > &rLocationA, const c_vector< double, SPACE_DIM > &rLocationB)
BoundaryNodeIterator GetBoundaryNodeIteratorEnd() const
virtual void Scale(const double xFactor=1.0, const double yFactor=1.0, const double zFactor=1.0)
NodeIterator(AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, typename std::vector< Node< SPACE_DIM > * >::iterator nodeIter, bool skipDeletedNodes=true)
virtual void SetDistributedVectorFactory(DistributedVectorFactory *pFactory)
void RotateY(const double theta)
void RotateZ(const double theta)
Node< SPACE_DIM > * GetNodeFromPrePermutationIndex(unsigned index) const
void RotateX(const double theta)