36 #ifndef _TETRAHEDRALMESH_HPP_
37 #define _TETRAHEDRALMESH_HPP_
40 #include <boost/serialization/base_object.hpp>
49 #include "AbstractTetrahedralMesh.hpp"
50 #include "AbstractMeshReader.hpp"
51 #include "ChastePoint.hpp"
63 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
66 friend class TestTetrahedralMesh;
67 friend class TestCryptSimulation2d;
70 friend class boost::serialization::access;
77 template<
class Archive>
78 void serialize(Archive & archive,
const unsigned int version)
80 archive & boost::serialization::base_object<AbstractTetrahedralMesh<ELEMENT_DIM, SPACE_DIM> >(*this);
143 template <
class MESHER_IO>
163 template <
class MESHER_IO>
164 void ImportFromMesher(MESHER_IO& mesherOutput,
unsigned numberOfElements,
int *elementList,
unsigned numberOfFaces,
int *faceList,
int *edgeMarkerList);
274 virtual void Clear();
295 virtual void GetJacobianForElement(
unsigned elementIndex, c_matrix<double, SPACE_DIM, SPACE_DIM>& rJacobian,
double& rJacobianDeterminant)
const;
305 virtual void GetInverseJacobianForElement(
unsigned elementIndex, c_matrix<double, SPACE_DIM, ELEMENT_DIM>& rJacobian,
double& rJacobianDeterminant, c_matrix<double, ELEMENT_DIM, SPACE_DIM>& rInverseJacobian)
const;
314 virtual void GetWeightedDirectionForElement(
unsigned elementIndex, c_vector<double, SPACE_DIM>& rWeightedDirection,
double& rJacobianDeterminant)
const;
393 #endif //_TETRAHEDRALMESH_HPP_
std::vector< c_matrix< double, SPACE_DIM, ELEMENT_DIM > > mElementJacobians
double GetAngleBetweenNodes(unsigned indexA, unsigned indexB)
void ImportFromMesher(MESHER_IO &mesherOutput, unsigned numberOfElements, int *elementList, unsigned numberOfFaces, int *faceList, int *edgeMarkerList)
std::vector< unsigned > GetContainingElementIndices(const ChastePoint< SPACE_DIM > &rTestPoint)
virtual void GetWeightedDirectionForBoundaryElement(unsigned elementIndex, c_vector< double, SPACE_DIM > &rWeightedDirection, double &rJacobianDeterminant) const
unsigned GetContainingElementIndexWithInitialGuess(const ChastePoint< SPACE_DIM > &rTestPoint, unsigned startingElementGuess, bool strict=false)
virtual void GetInverseJacobianForElement(unsigned elementIndex, c_matrix< double, SPACE_DIM, ELEMENT_DIM > &rJacobian, double &rJacobianDeterminant, c_matrix< double, ELEMENT_DIM, SPACE_DIM > &rInverseJacobian) const
virtual void RefreshJacobianCachedData()
std::vector< c_matrix< double, ELEMENT_DIM, SPACE_DIM > > mElementInverseJacobians
void ConstructFromMeshReader(AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader)
virtual void GetJacobianForElement(unsigned elementIndex, c_matrix< double, SPACE_DIM, SPACE_DIM > &rJacobian, double &rJacobianDeterminant) const
unsigned mNodeBLocalIndex
Node< SPACE_DIM > * GetNodeA()
unsigned mNodeALocalIndex
EdgeIterator(TetrahedralMesh &rMesh, unsigned elemIndex)
Node< SPACE_DIM > * GetNodeB()
void ReadNodesPerProcessorFile(const std::string &rNodesPerProcessorFile)
unsigned SolveBoundaryElementMapping(unsigned index) const
void InitialiseTriangulateIo(triangulateio &mesherIo)
unsigned SolveElementMapping(unsigned index) const
std::vector< double > mElementJacobianDeterminants
unsigned GetNearestElementIndex(const ChastePoint< SPACE_DIM > &rTestPoint)
std::vector< c_vector< double, SPACE_DIM > > mBoundaryElementWeightedDirections
#define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
bool operator!=(const typename TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgeIterator &rOther)
void serialize(Archive &archive, const unsigned int version)
EdgeIterator EdgesBegin()
unsigned SolveNodeMapping(unsigned index) const
std::vector< double > mBoundaryElementJacobianDeterminants
virtual void GetWeightedDirectionForElement(unsigned elementIndex, c_vector< double, SPACE_DIM > &rWeightedDirection, double &rJacobianDeterminant) const
EdgeIterator & operator++()
std::vector< c_vector< double, SPACE_DIM > > mElementWeightedDirections
void ExportToMesher(NodeMap &map, MESHER_IO &mesherInput, int *elementList=NULL)
std::set< std::pair< unsigned, unsigned > > mEdgesVisited
void FreeTriangulateIo(triangulateio &mesherIo)