![]() |
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) |
| std::vector< std::size_t > | getSurvivingNodeIds (std::vector< std::size_t > const &node_ids) |
| template<typename T> | |
| bool | copyProperty (MeshLib::Properties const &props, MeshLib::Properties &new_properties, std::string const &name, MeshLib::MeshItemType const item_type, std::vector< std::size_t > const &source_ids) |
| template<typename... Ts> | |
| bool | copyPropertyOfAnyValueType (MeshLib::Properties const &props, MeshLib::Properties &new_properties, std::string const &name, MeshLib::MeshItemType const item_type, std::vector< std::size_t > const &source_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 207 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 153 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 172 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 953 of file MeshRevision.cpp.
References MeshLib::Cell, copyPropertyOfAnyValueType(), MeshLib::Properties::getPropertyVectorNames(), getSurvivingNodeIds(), MeshLib::Node, and WARN().
| bool anonymous_namespace{MeshRevision.cpp}::copyProperty | ( | MeshLib::Properties const & | props, |
| MeshLib::Properties & | new_properties, | ||
| std::string const & | name, | ||
| MeshLib::MeshItemType const | item_type, | ||
| std::vector< std::size_t > const & | source_ids ) |
Copies the scalar property name of value type T and item type item_type, if such a property exists, to new_properties. The new property holds one value per entry of source_ids, gathered from the old property at that id. Returns false if no such property exists.
Definition at line 907 of file MeshRevision.cpp.
References MeshLib::Properties::createNewPropertyVector(), MeshLib::Properties::existsPropertyVector(), MeshLib::Properties::getPropertyVector(), and OGS_FATAL.
Referenced by copyPropertyOfAnyValueType().
| bool anonymous_namespace{MeshRevision.cpp}::copyPropertyOfAnyValueType | ( | MeshLib::Properties const & | props, |
| MeshLib::Properties & | new_properties, | ||
| std::string const & | name, | ||
| MeshLib::MeshItemType const | item_type, | ||
| std::vector< std::size_t > const & | source_ids ) |
Copies the scalar property name of item type item_type, trying the supported value types in turn. Returns false if no property of that name and item type exists in any of them.
Definition at line 938 of file MeshRevision.cpp.
References copyProperty().
Referenced by copyProperties().
| 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 60 of file MeshRevision.cpp.
References MeshLib::views::ids.
Referenced by constructLine(), reduceHex(), reducePrism(), subdivideHex(), subdividePrism(), subdividePyramid(), and subdivideQuad().
| unsigned anonymous_namespace{MeshRevision.cpp}::findPyramidTopNode | ( | MeshLib::Element const & | element, |
| std::array< std::size_t, 4 > const & | base_node_ids ) |
Definition at line 548 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 872 of file MeshRevision.cpp.
References MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), and MeshLib::Element::getNumberOfBaseNodes().
| std::vector< std::size_t > anonymous_namespace{MeshRevision.cpp}::getSurvivingNodeIds | ( | std::vector< std::size_t > const & | node_ids | ) |
Ids of the nodes surviving the collapsing, i.e. of those mapped onto themselves, in increasing order.
Definition at line 893 of file MeshRevision.cpp.
Referenced by copyProperties().
| 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 501 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 384 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 491 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 823 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 574 of file MeshRevision.cpp.
References constructFourNodeElement(), constructLine(), constructTri(), createElement(), ERR(), findPyramidTopNode(), MeshLib::Element::getFace(), MeshLib::Element::getGeomType(), MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), MeshLib::getNodeIDinElement(), 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 295 of file MeshRevision.cpp.
References constructFourNodeElement(), constructLine(), constructTri(), createElement(), ERR(), MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), MeshLib::views::ids, 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 267 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 798 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 117 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 98 of file MeshRevision.cpp.
References createElement(), MeshLib::views::ids, 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 133 of file MeshRevision.cpp.
References createElement(), MeshLib::views::ids, 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 80 of file MeshRevision.cpp.
References createElement(), and MeshLib::Element::nodes().
Referenced by subdivideElement().