OGS
|
Functions | |
template<typename ElementType > | |
std::unique_ptr< MeshLib::Element > | createElement (std::span< MeshLib::Node *const > const element_nodes, std::vector< MeshLib::Node * > const &nodes, std::array< std::size_t, ElementType::n_all_nodes > const local_ids) |
unsigned | subdivideQuad (MeshLib::Element const *const quad, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &new_elements) |
Subdivides a nonplanar quad into two triangles. | |
unsigned | subdividePrism (MeshLib::Element const *const prism, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &new_elements) |
Subdivides a prism with nonplanar quad faces into two tets. | |
unsigned | subdivideHex (MeshLib::Element const *const hex, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &new_elements) |
Subdivides a Hex with nonplanar faces into tets. | |
unsigned | subdividePyramid (MeshLib::Element const *const pyramid, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &new_elements) |
Subdivides a pyramid with a nonplanar base into two tets. | |
MeshLib::Element * | constructLine (MeshLib::Element const *const element, const std::vector< MeshLib::Node * > &nodes) |
MeshLib::Element * | constructTri (MeshLib::Element const *const element, const std::vector< MeshLib::Node * > &nodes) |
MeshLib::Element * | constructFourNodeElement (MeshLib::Element const *const element, std::vector< MeshLib::Node * > const &nodes, unsigned const min_elem_dim=1) |
void | reducePyramid (MeshLib::Element const *const org_elem, unsigned const n_unique_nodes, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &new_elements, unsigned const min_elem_dim) |
unsigned | reducePrism (MeshLib::Element const *const org_elem, unsigned const n_unique_nodes, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &new_elements, unsigned const min_elem_dim) |
std::array< unsigned, 4 > | lutHexCuttingQuadNodes (unsigned id1, unsigned id2) |
unsigned | lutHexDiametralNode (unsigned const id) |
std::pair< unsigned, unsigned > | lutHexBackNodes (unsigned const i, unsigned const j, unsigned const k, unsigned const l) |
unsigned | findPyramidTopNode (MeshLib::Element const &element, std::array< std::size_t, 4 > const &base_node_ids) |
unsigned | reduceHex (MeshLib::Element const *const org_elem, unsigned const n_unique_nodes, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &new_elements, unsigned const min_elem_dim) |
std::size_t | subdivideElement (MeshLib::Element const *const element, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &elements) |
std::size_t | reduceElement (MeshLib::Element const *const element, unsigned const n_unique_nodes, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &elements, unsigned const min_elem_dim) |
unsigned | getNumberOfUniqueNodes (MeshLib::Element const *const element) |
template<typename T > | |
void | fillNodeProperty (std::vector< T > &new_prop, std::vector< T > const &old_prop, std::vector< size_t > const &node_ids) |
template<typename T > | |
void | fillElemProperty (std::vector< T > &new_prop, std::vector< T > const &old_prop, std::vector< size_t > const &elem_ids) |
MeshLib::Properties | copyProperties (MeshLib::Properties const &props, std::vector< std::size_t > const &node_ids, std::vector< std::size_t > const &elem_ids) |
MeshLib::Element * anonymous_namespace{MeshRevision.cpp}::constructFourNodeElement | ( | MeshLib::Element const *const | element, |
std::vector< MeshLib::Node * > const & | nodes, | ||
unsigned const | min_elem_dim = 1 ) |
Creates a quad or a tet, depending if the four nodes being coplanar or not (element should have exactly four unique nodes!)
Definition at line 215 of file MeshRevision.cpp.
References MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), MeshLib::Element::getNumberOfBaseNodes(), MathLib::isCoplanar(), and MeshLib::Element::validate().
Referenced by reduceHex(), reducePrism(), and reducePyramid().
MeshLib::Element * anonymous_namespace{MeshRevision.cpp}::constructLine | ( | MeshLib::Element const *const | element, |
const std::vector< MeshLib::Node * > & | nodes ) |
Creates a line element from the first two unique nodes found in the element (element should have exactly two unique nodes!)
Definition at line 161 of file MeshRevision.cpp.
References createElement(), MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), MeshLib::Element::getNumberOfBaseNodes(), and MeshLib::Element::nodes().
Referenced by reduceElement(), reduceHex(), reducePrism(), and reducePyramid().
MeshLib::Element * anonymous_namespace{MeshRevision.cpp}::constructTri | ( | MeshLib::Element const *const | element, |
const std::vector< MeshLib::Node * > & | nodes ) |
Creates a triangle element from the first three unique nodes found in the element (element should have exactly three unique nodes!)
Definition at line 180 of file MeshRevision.cpp.
References MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), and MeshLib::Element::getNumberOfBaseNodes().
Referenced by reduceElement(), reduceHex(), reducePrism(), and reducePyramid().
MeshLib::Properties anonymous_namespace{MeshRevision.cpp}::copyProperties | ( | MeshLib::Properties const & | props, |
std::vector< std::size_t > const & | node_ids, | ||
std::vector< std::size_t > const & | elem_ids ) |
Copies all scalar arrays according to the restructured Node- and Element-vectors after the mesh revision process (i.e. collapsed nodes, split elements, etc.)
Definition at line 928 of file MeshRevision.cpp.
References MeshLib::Cell, MeshLib::Properties::createNewPropertyVector(), MeshLib::Properties::existsPropertyVector(), fillElemProperty(), fillNodeProperty(), MeshLib::Properties::getPropertyVector(), MeshLib::Properties::getPropertyVectorNames(), MeshLib::Node, and WARN().
std::unique_ptr< MeshLib::Element > anonymous_namespace{MeshRevision.cpp}::createElement | ( | std::span< MeshLib::Node *const > const | element_nodes, |
std::vector< MeshLib::Node * > const & | nodes, | ||
std::array< std::size_t, ElementType::n_all_nodes > const | local_ids ) |
Definition at line 68 of file MeshRevision.cpp.
Referenced by constructLine(), reduceHex(), reducePrism(), subdivideHex(), subdividePrism(), and subdividePyramid().
void anonymous_namespace{MeshRevision.cpp}::fillElemProperty | ( | std::vector< T > & | new_prop, |
std::vector< T > const & | old_prop, | ||
std::vector< size_t > const & | elem_ids ) |
Definition at line 916 of file MeshRevision.cpp.
Referenced by copyProperties().
void anonymous_namespace{MeshRevision.cpp}::fillNodeProperty | ( | std::vector< T > & | new_prop, |
std::vector< T > const & | old_prop, | ||
std::vector< size_t > const & | node_ids ) |
Definition at line 900 of file MeshRevision.cpp.
Referenced by copyProperties().
unsigned anonymous_namespace{MeshRevision.cpp}::findPyramidTopNode | ( | MeshLib::Element const & | element, |
std::array< std::size_t, 4 > const & | base_node_ids ) |
Definition at line 556 of file MeshRevision.cpp.
References MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), and MeshLib::Element::getNumberOfBaseNodes().
Referenced by reduceHex().
unsigned anonymous_namespace{MeshRevision.cpp}::getNumberOfUniqueNodes | ( | MeshLib::Element const *const | element | ) |
Calculates the number of unique nodes in an element (i.e. uncollapsed nodes).
Definition at line 880 of file MeshRevision.cpp.
References MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), and MeshLib::Element::getNumberOfBaseNodes().
std::pair< unsigned, unsigned > anonymous_namespace{MeshRevision.cpp}::lutHexBackNodes | ( | unsigned const | i, |
unsigned const | j, | ||
unsigned const | k, | ||
unsigned const | l ) |
When a hex is subdivided into two prisms, this returns the nodes of the hex edge that will serve as the back of one of the prisms.
Definition at line 509 of file MeshRevision.cpp.
References lutHexDiametralNode().
Referenced by reduceHex().
std::array< unsigned, 4 > anonymous_namespace{MeshRevision.cpp}::lutHexCuttingQuadNodes | ( | unsigned | id1, |
unsigned | id2 ) |
Lookup-table for returning four nodes connected to the two nodes (id1, id2) forming an edge in a Hex.
Definition at line 392 of file MeshRevision.cpp.
References OGS_FATAL.
Referenced by reduceHex().
unsigned anonymous_namespace{MeshRevision.cpp}::lutHexDiametralNode | ( | unsigned const | id | ) |
Lookup-table for returning the diametral node id of the given node id in a Hex.
Definition at line 499 of file MeshRevision.cpp.
Referenced by lutHexBackNodes(), and reduceHex().
std::size_t anonymous_namespace{MeshRevision.cpp}::reduceElement | ( | MeshLib::Element const *const | element, |
unsigned const | n_unique_nodes, | ||
std::vector< MeshLib::Node * > const & | nodes, | ||
std::vector< MeshLib::Element * > & | elements, | ||
unsigned const | min_elem_dim ) |
Definition at line 831 of file MeshRevision.cpp.
References constructLine(), constructTri(), ERR(), MeshLib::Element::getGeomType(), MeshLib::HEXAHEDRON, MeshLib::PRISM, MeshLib::PYRAMID, MeshLib::QUAD, reduceHex(), reducePrism(), reducePyramid(), MeshLib::TETRAHEDRON, and MeshLib::TRIANGLE.
unsigned anonymous_namespace{MeshRevision.cpp}::reduceHex | ( | MeshLib::Element const *const | org_elem, |
unsigned const | n_unique_nodes, | ||
std::vector< MeshLib::Node * > const & | nodes, | ||
std::vector< MeshLib::Element * > & | new_elements, | ||
unsigned const | min_elem_dim ) |
Reduces a hexahedron element by removing collapsed nodes and constructing one or more new elements from the remaining nodes.
Definition at line 582 of file MeshRevision.cpp.
References constructFourNodeElement(), constructLine(), constructTri(), createElement(), ERR(), findPyramidTopNode(), MeshLib::Element::getFace(), MeshLib::Element::getGeomType(), MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), MeshLib::Element::isEdge(), lutHexBackNodes(), lutHexCuttingQuadNodes(), lutHexDiametralNode(), MeshLib::Element::nodes(), MeshLib::QUAD, and reducePrism().
Referenced by reduceElement().
unsigned anonymous_namespace{MeshRevision.cpp}::reducePrism | ( | MeshLib::Element const *const | org_elem, |
unsigned const | n_unique_nodes, | ||
std::vector< MeshLib::Node * > const & | nodes, | ||
std::vector< MeshLib::Element * > & | new_elements, | ||
unsigned const | min_elem_dim ) |
Reduces a prism element by removing collapsed nodes and constructing one or two new elements from the remaining nodes.
Definition at line 303 of file MeshRevision.cpp.
References constructFourNodeElement(), constructLine(), constructTri(), createElement(), ERR(), MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), MathLib::isCoplanar(), MeshToolsLib::lutPrismThirdNode(), and MeshLib::Element::nodes().
Referenced by reduceElement(), and reduceHex().
void anonymous_namespace{MeshRevision.cpp}::reducePyramid | ( | MeshLib::Element const *const | org_elem, |
unsigned const | n_unique_nodes, | ||
std::vector< MeshLib::Node * > const & | nodes, | ||
std::vector< MeshLib::Element * > & | new_elements, | ||
unsigned const | min_elem_dim ) |
Reduces a pyramid element by removing collapsed nodes and constructing a new elements from the remaining nodes.
Definition at line 275 of file MeshRevision.cpp.
References constructFourNodeElement(), constructLine(), and constructTri().
Referenced by reduceElement().
std::size_t anonymous_namespace{MeshRevision.cpp}::subdivideElement | ( | MeshLib::Element const *const | element, |
std::vector< MeshLib::Node * > const & | nodes, | ||
std::vector< MeshLib::Element * > & | elements ) |
Subdivides an element if it has a face that is not coplanar
element | the element that will be subdivided |
nodes | vector containing the nodes the elements originated by the subdivision are based on |
elements | vector of MeshLib::Elements; the elements originated by the subdivision will be inserted into elements |
Definition at line 806 of file MeshRevision.cpp.
References MeshLib::Element::getGeomType(), MeshLib::HEXAHEDRON, MeshLib::PRISM, MeshLib::PYRAMID, MeshLib::QUAD, subdivideHex(), subdividePrism(), subdividePyramid(), and subdivideQuad().
unsigned anonymous_namespace{MeshRevision.cpp}::subdivideHex | ( | MeshLib::Element const *const | hex, |
std::vector< MeshLib::Node * > const & | nodes, | ||
std::vector< MeshLib::Element * > & | new_elements ) |
Subdivides a Hex with nonplanar faces into tets.
Definition at line 125 of file MeshRevision.cpp.
References createElement(), MeshLib::Element::nodes(), and subdividePrism().
Referenced by subdivideElement().
unsigned anonymous_namespace{MeshRevision.cpp}::subdividePrism | ( | MeshLib::Element const *const | prism, |
std::vector< MeshLib::Node * > const & | nodes, | ||
std::vector< MeshLib::Element * > & | new_elements ) |
Subdivides a prism with nonplanar quad faces into two tets.
Definition at line 106 of file MeshRevision.cpp.
References createElement(), and MeshLib::Element::nodes().
Referenced by subdivideElement(), and subdivideHex().
unsigned anonymous_namespace{MeshRevision.cpp}::subdividePyramid | ( | MeshLib::Element const *const | pyramid, |
std::vector< MeshLib::Node * > const & | nodes, | ||
std::vector< MeshLib::Element * > & | new_elements ) |
Subdivides a pyramid with a nonplanar base into two tets.
Definition at line 141 of file MeshRevision.cpp.
References createElement(), and MeshLib::Element::nodes().
Referenced by subdivideElement().
unsigned anonymous_namespace{MeshRevision.cpp}::subdivideQuad | ( | MeshLib::Element const *const | quad, |
std::vector< MeshLib::Node * > const & | nodes, | ||
std::vector< MeshLib::Element * > & | new_elements ) |
Subdivides a nonplanar quad into two triangles.
Definition at line 88 of file MeshRevision.cpp.
References MeshLib::Element::nodes().
Referenced by subdivideElement().