35 #include "VertexElement.hpp" 39 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
42 const std::vector<bool>& rOrientations,
46 mOrientations(rOrientations)
49 assert(SPACE_DIM == 3);
54 if (SPACE_DIM == ELEMENT_DIM)
61 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
64 const std::vector<bool>& rOrientations)
73 std::set<Node<SPACE_DIM>* > nodes_set;
74 for (
unsigned face_index=0; face_index<
mFaces.size(); face_index++)
76 for (
unsigned node_index=0; node_index<
mFaces[face_index]->GetNumNodes(); node_index++)
83 for (
typename std::set<
Node<SPACE_DIM>* >::iterator node_iter = nodes_set.begin();
84 node_iter != nodes_set.end();
87 this->
mNodes.push_back(*node_iter);
94 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
100 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
107 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
112 template <
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
118 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
122 this->
mFaces.push_back(pFace);
125 std::set<unsigned> node_indices;
126 for (
unsigned local_index=0; local_index<this->
GetNumNodes(); local_index++)
133 for (
unsigned local_index=0; local_index<pFace->
GetNumNodes(); local_index++)
137 if (node_indices.find(global_index) == node_indices.end())
146 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
149 assert(index <
mFaces.size());
153 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
170 template<
unsigned SPACE_DIM>
176 template<
unsigned SPACE_DIM>
182 template<
unsigned SPACE_DIM>
188 template<
unsigned SPACE_DIM>
VertexElement(unsigned index, const std::vector< VertexElement< ELEMENT_DIM-1, SPACE_DIM > * > &rFaces, const std::vector< bool > &rOrientations)
unsigned GetNodeGlobalIndex(unsigned localIndex) const
bool FaceIsOrientatedClockwise(unsigned index) const
std::vector< VertexElement< ELEMENT_DIM-1, SPACE_DIM > * > mFaces
unsigned GetNumFaces() const
std::vector< bool > mOrientations
Node< SPACE_DIM > * GetNode(unsigned localIndex) const
std::vector< Node< SPACE_DIM > * > mNodes
VertexElement< ELEMENT_DIM-1, SPACE_DIM > * GetFace(unsigned index) const
void AddNode(Node< SPACE_DIM > *pNode, const unsigned &rIndex)
unsigned GetNumNodes() const
void AddFace(VertexElement< ELEMENT_DIM-1, SPACE_DIM > *pFace)