![]() |
OGS
|
Contains all functionality concerned with defining and obtaining information about meshes and their components (nodes, elements). Also includes additional algorithms for generating and modifying meshes and elements.
Namespaces | |
anonymous_namespace{AngleSkewMetric.cpp} | |
anonymous_namespace{ConvertToLinearMesh.cpp} | |
BoundaryExtraction | |
detail | |
details | |
IO | |
MeshGenerator | |
ProjectPointOnMesh | |
RasterDataToMesh | |
Adding pixel values from a raster onto nodes or cells of a mesh. | |
Classes | |
class | PropertyVector |
struct | CoordinateSystemType |
Coordinate system type. More... | |
class | CoordinateSystem |
Coordinate systems. More... | |
class | ElementCoordinatesMappingLocal |
class | CellRule |
class | NoEdgeReturn |
Returns always null pointer. More... | |
class | LinearEdgeReturn |
Returns linear order edge. More... | |
class | QuadraticEdgeReturn |
Returns quadratic order edge. More... | |
class | EdgeRule |
class | Element |
class | FaceRule |
class | HexRule20 |
class | HexRule8 |
class | LineRule2 |
class | LineRule3 |
class | PointRule1 |
A 0d point element. More... | |
class | PrismRule15 |
class | PrismRule6 |
class | PyramidRule13 |
class | PyramidRule5 |
class | QuadRule4 |
class | QuadRule8 |
class | QuadRule9 |
class | TemplateElement |
class | TetRule10 |
class | TetRule4 |
class | TriRule3 |
class | TriRule6 |
class | VertexRule |
class | ElementStatus |
struct | Location |
class | Mesh |
class | ElementValueModification |
A set of methods for manipulating mesh element values. More... | |
class | Mesh2MeshPropertyInterpolation |
class | MeshRevision |
class | MeshLayerMapper |
Manipulating and adding prism element layers to an existing 2D mesh. More... | |
class | RasterToMesh |
Converts raster data into an OGS mesh. More... | |
class | VtkMeshConverter |
Converter for VtkUnstructured Grids to OGS meshes. More... | |
class | MeshInformation |
A set of tools for extracting information from a mesh. More... | |
struct | AngleSkewMetric |
struct | EdgeRatioMetric |
class | ElementQualityInterface |
class | ElementQualityMetric |
class | ElementSizeMetric |
struct | MeshValidation |
A collection of methods for testing mesh quality and correctness. More... | |
struct | RadiusEdgeRatioMetric |
struct | SizeDifferenceMetric |
class | ElementSearch |
Element search class. More... | |
class | MeshElementGrid |
class | NodeSearch |
Node search class. More... | |
class | MeshSubset |
A subset of nodes on a single mesh. More... | |
class | MeshSurfaceExtraction |
A set of tools concerned with extracting nodes and elements from a mesh surface. More... | |
class | Node |
class | NodeAdjacencyTable |
class | NodePartitionedMesh |
A subdomain mesh. More... | |
class | Properties |
Property manager on mesh items. Class Properties manages scalar, vector or matrix properties. For instance in groundwater flow porosity is a scalar property and permeabilty can be stored as a tensor property. Properties are assigned to mesh items, i.e. Node or Element objects. The createNewPropertyVector() method first creates a PropertyVector of template type T (scalar, vector or matrix). This class stores the PropertyVector, accessible by a combination of the name and the type of the mesh item (Node or Element). More... | |
class | PropertyVectorBase |
class | PropertyVector< T * > |
class | VtkMappedMeshSource |
class | VtkMeshNodalCoordinatesTemplate |
Typedefs | |
using | RotationMatrix = Eigen::Matrix< double, 3u, 3u, Eigen::RowMajor > |
using | Hex = TemplateElement< MeshLib::HexRule8 > |
using | Hex20 = TemplateElement< MeshLib::HexRule20 > |
using | Line = TemplateElement< MeshLib::LineRule2 > |
using | Line3 = TemplateElement< MeshLib::LineRule3 > |
using | Point = TemplateElement< PointRule1 > |
using | Prism = TemplateElement< MeshLib::PrismRule6 > |
using | Prism15 = TemplateElement< MeshLib::PrismRule15 > |
using | Pyramid = TemplateElement< MeshLib::PyramidRule5 > |
using | Pyramid13 = TemplateElement< MeshLib::PyramidRule13 > |
using | Quad = TemplateElement< MeshLib::QuadRule4 > |
using | Quad8 = TemplateElement< MeshLib::QuadRule8 > |
using | Quad9 = TemplateElement< MeshLib::QuadRule9 > |
using | Tet = TemplateElement< MeshLib::TetRule4 > |
using | Tet10 = TemplateElement< MeshLib::TetRule10 > |
using | Tri = TemplateElement< MeshLib::TriRule3 > |
using | Tri6 = TemplateElement< MeshLib::TriRule6 > |
Enumerations | |
enum class | MeshItemType { Node , Edge , Face , Cell , IntegrationPoint } |
enum class | MeshElemType { INVALID = 0 , POINT = 1 , LINE = 3 , QUAD = 9 , HEXAHEDRON = 12 , TRIANGLE = 5 , TETRAHEDRON = 10 , PRISM = 16 , PYRAMID = 14 } |
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum. More... | |
enum class | CellType { INVALID = 0 , POINT1 = 1 , LINE2 = 2 , LINE3 = 3 , TRI3 = 4 , TRI6 = 5 , QUAD4 = 6 , QUAD8 = 7 , QUAD9 = 8 , TET4 = 9 , TET10 = 10 , HEX8 = 11 , HEX20 = 12 , HEX27 = 13 , PRISM6 = 14 , PRISM15 = 15 , PRISM18 = 16 , PYRAMID5 = 17 , PYRAMID13 = 18 , enum_length } |
Types of mesh elements supported by OpenGeoSys. More... | |
enum class | MeshQualityType { INVALID = 0 , ELEMENTSIZE , SIZEDIFFERENCE , EDGERATIO , EQUIANGLESKEW , RADIUSEDGERATIO } |
Describes a mesh quality metric. More... | |
enum class | UseIntensityAs { ELEVATION , MATERIALS , DATAVECTOR , NONE } |
Selection of possible interpretations for intensities. More... | |
Functions | |
bool | convertMeshToGeo (const MeshLib::Mesh &mesh, GeoLib::GEOObjects &geo_objects, double const eps) |
MeshLib::Mesh * | convertSurfaceToMesh (const GeoLib::Surface &sfc, const std::string &mesh_name, double eps) |
std::ostream & | operator<< (std::ostream &os, Element const &e) |
bool | areNeighbors (Element const *const element, Element const *const other) |
Returns true if elem is a neighbour of this element and false otherwise. More... | |
bool | hasZeroVolume (MeshLib::Element const &element) |
Returns true if the element has zero length/area/volume. More... | |
MeshLib::Node | getCenterOfGravity (MeshLib::Element const &element) |
Calculates the center of gravity for the mesh element. More... | |
std::pair< double, double > | computeSqrNodeDistanceRange (MeshLib::Element const &element, bool const check_allnodes=true) |
Compute the minimum and maximum node distances for this element. More... | |
std::pair< double, double > | computeSqrEdgeLengthRange (Element const &element) |
Compute the minimum and maximum squared edge length for this element. More... | |
bool | isPointInElementXY (MathLib::Point3d const &p, Element const &e) |
unsigned | getNodeIDinElement (Element const &element, const Node *node) |
Returns the position of the given node in the node array of this element. More... | |
std::size_t | getNodeIndex (Element const &element, unsigned const idx) |
MathLib::Point3d | getBulkElementPoint (Tri const &, std::size_t const face_id, MathLib::WeightedPoint1D const &wp) |
MathLib::Point3d | getBulkElementPoint (Hex const &, std::size_t const face_id, MathLib::WeightedPoint2D const &wp) |
MathLib::Point3d | getBulkElementPoint (Mesh const &mesh, std::size_t const bulk_element_id, std::size_t const bulk_face_id, MathLib::WeightedPoint1D const &wp) |
MathLib::Point3d | getBulkElementPoint (Mesh const &mesh, std::size_t bulk_element_id, std::size_t bulk_face_id, MathLib::WeightedPoint2D const &wp) |
MathLib::Point3d | getBulkElementPoint (Mesh const &, std::size_t, std::size_t, MathLib::WeightedPoint3D const &) |
std::vector< Node * > | getBaseNodes (std::vector< Element * > const &elements) |
Eigen::Vector3d | calculateNormalizedSurfaceNormal (MeshLib::Element const &surface_element, MeshLib::Element const &bulk_element) |
std::vector< std::size_t > | findElementsWithinRadius (Element const &start_element, double const radius_squared) |
std::ostream & | operator<< (std::ostream &os, MeshItemType const &t) |
std::ostream & | operator<< (std::ostream &os, Location const &l) |
static constexpr char const * | toString (const MeshItemType t) |
Returns a char array for a specific MeshItemType. More... | |
bool | operator< (const Location &left, const Location &right) |
Lexicographic order of Location. More... | |
std::vector< std::vector< Element const * > > | findElementsConnectedToNodes (Mesh const &mesh) |
void | scaleMeshPropertyVector (MeshLib::Mesh &mesh, std::string const &property_name, double factor) |
PropertyVector< int > const * | materialIDs (Mesh const &mesh) |
std::unique_ptr< MeshLib::Mesh > | createMeshFromElementSelection (std::string mesh_name, std::vector< MeshLib::Element * > const &elements) |
std::vector< std::vector< Node * > > | calculateNodesConnectedByElements (Mesh const &mesh) |
bool | isBaseNode (Node const &node, std::vector< Element const * > const &elements_connected_to_node) |
bool | operator== (Mesh const &a, Mesh const &b) |
Meshes are equal if their id's are equal. More... | |
bool | operator!= (Mesh const &a, Mesh const &b) |
template<typename T > | |
void | addPropertyToMesh (Mesh &mesh, std::string const &name, MeshItemType item_type, std::size_t number_of_components, std::vector< T > const &values) |
template<typename T > | |
PropertyVector< T > * | getOrCreateMeshProperty (Mesh &mesh, std::string const &property_name, MeshItemType const item_type, int const number_of_components) |
std::unique_ptr< Mesh > | createMeshFromElementSelection (std::string mesh_name, std::vector< Element * > const &elements) |
MeshLib::Element * | extrudeElement (std::vector< MeshLib::Node * > const &subsfc_nodes, MeshLib::Element const &sfc_elem, MeshLib::PropertyVector< std::size_t > const &sfc_to_subsfc_id_map, std::map< std::size_t, std::size_t > const &subsfc_sfc_id_map) |
MeshLib::Mesh * | addLayerToMesh (MeshLib::Mesh const &mesh, double thickness, std::string const &name, bool on_top, bool copy_material_ids) |
std::unique_ptr< MeshLib::Mesh > | convertToLinearMesh (MeshLib::Mesh const &org_mesh, std::string const &new_mesh_name) |
std::vector< Node * > | copyNodeVector (const std::vector< Node * > &nodes) |
Creates a deep copy of a Node vector. More... | |
std::vector< Element * > | copyElementVector (std::vector< Element * > const &elements, std::vector< Node * > const &new_nodes, std::vector< std::size_t > const *const node_id_map) |
template<typename E > | |
Element * | copyElement (Element const *const element, const std::vector< Node * > &nodes, std::vector< std::size_t > const *const id_map) |
std::vector< Element * > | cloneElements (std::vector< Element * > const &elements) |
Clones a vector of elements using the Element::clone() function. More... | |
std::unique_ptr< Element > | createFlippedElement (Element const &elem, std::vector< Node * > const &nodes) |
std::unique_ptr< Mesh > | createFlippedMesh (Mesh const &mesh) |
template<typename T > | |
void | fillNodeProperty (std::vector< T > &new_prop, std::vector< T > const &old_prop, std::vector< size_t > node_ids) |
template<typename T > | |
void | fillElemProperty (std::vector< T > &new_prop, std::vector< T > const &old_prop, std::vector< size_t > elem_ids) |
template<typename Iterator > | |
void | moveMeshNodes (Iterator begin, Iterator end, MeshLib::Node const &displacement) |
MeshLib::Mesh * | removeElements (const MeshLib::Mesh &mesh, const std::vector< std::size_t > &removed_element_ids, const std::string &new_mesh_name) |
std::vector< bool > | markUnusedNodes (std::vector< Element * > const &elements, std::vector< Node * > const &nodes) |
Marks nodes not used by any of the elements. More... | |
void | removeMarkedNodes (std::vector< bool > const &nodes_to_delete, std::vector< Node * > &nodes) |
Deallocates and removes nodes marked true. More... | |
MeshLib::Mesh * | removeNodes (const MeshLib::Mesh &mesh, const std::vector< std::size_t > &del_nodes_idx, const std::string &new_mesh_name) |
std::string | MeshElemType2String (const MeshElemType t) |
Given a MeshElemType this returns the appropriate string. More... | |
std::string | MeshElemType2StringShort (const MeshElemType t) |
Given a MeshElemType this returns the appropriate string with a short name. More... | |
MeshElemType | String2MeshElemType (const std::string &s) |
Given a string of the shortened name of the element type, this returns the corresponding MeshElemType. More... | |
std::vector< MeshElemType > | getMeshElemTypes () |
Returns a vector of all mesh element types. More... | |
std::vector< std::string > | getMeshElemTypeStringsShort () |
Returns a vector of strings of mesh element types. More... | |
std::string | CellType2String (const CellType t) |
Given a MeshElemType this returns the appropriate string. More... | |
std::string | MeshQualityType2String (const MeshQualityType t) |
MeshLib::MeshQualityType | String2MeshQualityType (std::string const &s) |
std::unique_ptr< Mesh > | createQuadraticOrderMesh (Mesh const &linear_mesh, bool const add_centre_node) |
static void | trackSurface (MeshLib::Element const *const element, std::vector< unsigned > &sfc_idx, unsigned const current_index) |
template<typename Container , typename Predicate > | |
std::vector< std::size_t > | filter (Container const &container, Predicate const &p) |
std::vector< Node * > | getUniqueNodes (std::vector< Element * > const &elements) |
Create a vector of unique nodes used by given elements. More... | |
template<typename T > | |
void | processPropertyVector (MeshLib::PropertyVector< T > const &property, std::vector< std::size_t > const &id_map, MeshLib::Mesh &sfc_mesh) |
bool | createSfcMeshProperties (MeshLib::Mesh &sfc_mesh, MeshLib::Properties const &properties, std::vector< std::size_t > const &node_ids_map, std::vector< std::size_t > const &element_ids_map) |
std::tuple< std::vector< MeshLib::Node * >, std::vector< std::size_t > > | createNodesAndIDMapFromElements (std::vector< MeshLib::Element * > const &elements, std::size_t const n_all_nodes) |
void | createSurfaceElementsFromElement (MeshLib::Element const &surface_element, std::vector< MeshLib::Element * > &surface_elements, std::vector< std::size_t > &element_to_bulk_element_id_map, std::vector< std::size_t > &element_to_bulk_face_id_map) |
std::tuple< std::vector< MeshLib::Element * >, std::vector< std::size_t >, std::vector< std::size_t > > | createBoundaryElements (MeshLib::Mesh const &bulk_mesh) |
void | addBulkIDPropertiesToMesh (MeshLib::Mesh &surface_mesh, std::string const &node_to_bulk_node_id_map_name, std::vector< std::size_t > const &node_to_bulk_node_id_map, std::string const &element_to_bulk_element_id_map_name, std::vector< std::size_t > const &element_to_bulk_element_id_map, std::string const &element_to_bulk_face_id_map_name, std::vector< std::size_t > const &element_to_bulk_face_id_map) |
std::vector< Eigen::MatrixXd > | getElementRotationMatrices (int const space_dimension, int const mesh_dimension, std::vector< Element * > const &elements) |
Element rotation matrix computation. More... | |
int | getSpaceDimension (std::vector< Node * > const &nodes) |
Computes dimension of the embedding space containing the set of given points. More... | |
bool | is2DMeshOnRotatedVerticalPlane (Mesh const &mesh) |
void | setMeshSpaceDimension (std::vector< std::unique_ptr< Mesh >> const &meshes) |
vtkStandardNewMacro (VtkMappedMeshSource) void VtkMappedMeshSource | |
Variables | |
static constexpr char const * | mesh_item_type_strings [] |
Char array names for all of MeshItemType values. More... | |
using MeshLib::Hex = typedef TemplateElement<MeshLib::HexRule8> |
using MeshLib::Hex20 = typedef TemplateElement<MeshLib::HexRule20> |
using MeshLib::Line = typedef TemplateElement<MeshLib::LineRule2> |
using MeshLib::Line3 = typedef TemplateElement<MeshLib::LineRule3> |
using MeshLib::Point = typedef TemplateElement<PointRule1> |
using MeshLib::Prism = typedef TemplateElement<MeshLib::PrismRule6> |
using MeshLib::Prism15 = typedef TemplateElement<MeshLib::PrismRule15> |
using MeshLib::Pyramid = typedef TemplateElement<MeshLib::PyramidRule5> |
using MeshLib::Pyramid13 = typedef TemplateElement<MeshLib::PyramidRule13> |
using MeshLib::Quad = typedef TemplateElement<MeshLib::QuadRule4> |
using MeshLib::Quad8 = typedef TemplateElement<MeshLib::QuadRule8> |
using MeshLib::Quad9 = typedef TemplateElement<MeshLib::QuadRule9> |
using MeshLib::RotationMatrix = typedef Eigen::Matrix<double, 3u, 3u, Eigen::RowMajor> |
Definition at line 23 of file ElementCoordinatesMappingLocal.h.
using MeshLib::Tet = typedef TemplateElement<MeshLib::TetRule4> |
using MeshLib::Tet10 = typedef TemplateElement<MeshLib::TetRule10> |
using MeshLib::Tri = typedef TemplateElement<MeshLib::TriRule3> |
using MeshLib::Tri6 = typedef TemplateElement<MeshLib::TriRule6> |
|
strong |
Types of mesh elements supported by OpenGeoSys.
Enumerator | |
---|---|
INVALID | |
POINT1 | |
LINE2 | |
LINE3 | |
TRI3 | |
TRI6 | |
QUAD4 | |
QUAD8 | |
QUAD9 | |
TET4 | |
TET10 | |
HEX8 | |
HEX20 | |
HEX27 | |
PRISM6 | |
PRISM15 | |
PRISM18 | |
PYRAMID5 | |
PYRAMID13 | |
enum_length |
Definition at line 42 of file MeshEnums.h.
|
strong |
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.
Enumerator | |
---|---|
INVALID | |
POINT | |
LINE | |
QUAD | |
HEXAHEDRON | |
TRIANGLE | |
TETRAHEDRON | |
PRISM | |
PYRAMID |
Definition at line 26 of file MeshEnums.h.
|
strong |
Enumerator | |
---|---|
Node | |
Edge | |
Face | |
Cell | |
IntegrationPoint |
Definition at line 21 of file Location.h.
|
strong |
Describes a mesh quality metric.
Enumerator | |
---|---|
INVALID | |
ELEMENTSIZE | |
SIZEDIFFERENCE | |
EDGERATIO | |
EQUIANGLESKEW | |
RADIUSEDGERATIO |
Definition at line 69 of file MeshEnums.h.
|
strong |
Selection of possible interpretations for intensities.
Enumerator | |
---|---|
ELEVATION | |
MATERIALS | |
DATAVECTOR | |
NONE |
Definition at line 82 of file MeshEnums.h.
void MeshLib::addBulkIDPropertiesToMesh | ( | MeshLib::Mesh & | surface_mesh, |
std::string const & | node_to_bulk_node_id_map_name, | ||
std::vector< std::size_t > const & | node_to_bulk_node_id_map, | ||
std::string const & | element_to_bulk_element_id_map_name, | ||
std::vector< std::size_t > const & | element_to_bulk_element_id_map, | ||
std::string const & | element_to_bulk_face_id_map_name, | ||
std::vector< std::size_t > const & | element_to_bulk_face_id_map | ||
) |
Definition at line 498 of file MeshSurfaceExtraction.cpp.
References addPropertyToMesh(), Cell, and Node.
Referenced by MeshLib::BoundaryExtraction::getBoundaryElementsAsMesh(), and MeshLib::MeshSurfaceExtraction::getMeshSurface().
MeshLib::Mesh * MeshLib::addLayerToMesh | ( | MeshLib::Mesh const & | mesh, |
double | thickness, | ||
std::string const & | name, | ||
bool | on_top, | ||
bool | copy_material_ids | ||
) |
Adds a layer to the mesh. If on_top is true, the layer is added on top, if it is false, the layer is added at the bottom.
Definition at line 85 of file AddLayerToMesh.cpp.
References Cell, MathLib::LinAlg::copy(), copyElementVector(), copyNodeVector(), createFlippedMesh(), ERR(), MeshLib::Properties::existsPropertyVector(), extrudeElement(), MeshLib::Mesh::getDimension(), MeshLib::Mesh::getElements(), MeshLib::MeshSurfaceExtraction::getMeshSurface(), MeshLib::Mesh::getName(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getNumberOfElements(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), INFO(), MaterialPropertyLib::name, and Node.
Referenced by MeshLib::MeshGenerator::generateRegularPrismMesh(), main(), and MeshView::openAddLayerDialog().
void MeshLib::addPropertyToMesh | ( | Mesh & | mesh, |
std::string const & | name, | ||
MeshItemType | item_type, | ||
std::size_t | number_of_components, | ||
std::vector< T > const & | values | ||
) |
Creates a new PropertyVector
in the given mesh and initializes it with the given data. A PropertyVector
with the same name must not exist.
mesh | A Mesh the new ProperyVector will be created in. |
name | A string that contains the name of the new PropertyVector . |
item_type | One of the values MeshLib::MeshItemType::Cell or shows the association of the property values either to Element's / cells or Node's |
number_of_components | the number of components of a property |
values | A vector containing the values that are used for initialization. |
Definition at line 193 of file Mesh.h.
References Cell, MathLib::LinAlg::copy(), MeshLib::Properties::createNewPropertyVector(), MeshLib::Mesh::getNumberOfElements(), MeshLib::Mesh::getNumberOfNodes(), MeshLib::Mesh::getProperties(), ApplicationUtils::NodeWiseMeshPartitioner::mesh(), MaterialPropertyLib::name, Node, and OGS_FATAL.
Referenced by addBulkIDPropertiesToMesh(), createMeshFromElementSelection(), ParameterLib::createRandomFieldMeshElementParameter(), main(), and anonymous_namespace{IdentifySubdomainMesh.cpp}::updateOrCheckExistingSubdomainProperty().
Returns true if elem is a neighbour of this element and false otherwise.
Definition at line 108 of file Element.cpp.
References MeshLib::Element::getNeighbor(), and MeshLib::Element::getNumberOfNeighbors().
Referenced by MeshLib::Element::addNeighbor().
std::vector< std::vector< Node * > > MeshLib::calculateNodesConnectedByElements | ( | Mesh const & | mesh | ) |
Computes the element-connectivity of nodes. Two nodes i and j are connected if they are shared by an element.
Definition at line 331 of file Mesh.cpp.
References findElementsConnectedToNodes(), and MeshLib::Mesh::getNodes().
Referenced by MeshLib::NodeAdjacencyTable::createTable(), MeshLib::NodePartitionedMesh::getMaximumNConnectedNodesToNode(), and main().
|
inline |
Definition at line 44 of file Utils.h.
References MathLib::TemplatePoint< T, DIM >::getCoords(), MeshLib::Element::getDimension(), MeshLib::Element::getNode(), and MeshLib::FaceRule::getSurfaceNormal().
std::string MeshLib::CellType2String | ( | const CellType | t | ) |
Given a MeshElemType this returns the appropriate string.
Definition at line 157 of file MeshEnums.cpp.
References HEX20, HEX27, HEX8, LINE2, LINE3, POINT1, PRISM15, PRISM6, PYRAMID13, PYRAMID5, QUAD4, QUAD8, QUAD9, RETURN_CELL_TYPE_STR, TET10, TET4, TRI3, and TRI6.
Referenced by convertToLinearMesh(), createQuadraticElement(), getBulkElementPoint(), and main().
Clones a vector of elements using the Element::clone() function.
Definition at line 118 of file DuplicateMeshComponents.cpp.
References MeshLib::Element::clone().
Referenced by MeshGeoToolsLib::constructAdditionalMeshesFromGeometries(), and ProcessLib::createDeactivatedSubdomainMesh().
std::pair< double, double > MeshLib::computeSqrEdgeLengthRange | ( | Element const & | element | ) |
Compute the minimum and maximum squared edge length for this element.
Definition at line 162 of file Element.cpp.
References MeshLib::Element::getEdgeNode(), MeshLib::Element::getNumberOfEdges(), and MathLib::sqrDist().
Referenced by MeshLib::Mesh::calcEdgeLengthRange(), and MeshLib::RadiusEdgeRatioMetric::calculateQuality().
std::pair< double, double > MeshLib::computeSqrNodeDistanceRange | ( | MeshLib::Element const & | element, |
bool const | check_allnodes | ||
) |
Compute the minimum and maximum node distances for this element.
Definition at line 142 of file Element.cpp.
References MeshLib::Element::getNode(), MeshLib::Element::getNumberOfBaseNodes(), MeshLib::Element::getNumberOfNodes(), and MathLib::sqrDist().
Referenced by MeshGeoToolsLib::HeuristicSearchLength::HeuristicSearchLength(), and MeshGeoToolsLib::snapPointToElementNode().
bool MeshLib::convertMeshToGeo | ( | const MeshLib::Mesh & | mesh, |
GeoLib::GEOObjects & | geo_objects, | ||
double | eps = std::numeric_limits< double >::epsilon() |
||
) |
Converts a 2D mesh into a geometry. A new geometry with the name of the mesh will be inserted into geo_objects, consisting of points identical with mesh nodes and one surface representing the mesh. Triangles are converted to geometric triangles, quads are split into two triangles, all other elements are ignored.
Definition at line 77 of file convertMeshToGeo.cpp.
References anonymous_namespace{convertMeshToGeo.cpp}::addElementToSurface(), anonymous_namespace{convertMeshToGeo.cpp}::convertMeshNodesToGeoPoints(), ERR(), MeshLib::Mesh::getDimension(), MeshLib::Mesh::getElements(), GeoLib::PointVec::getIDMap(), MeshLib::Mesh::getName(), MeshLib::Mesh::getNumberOfElements(), GeoLib::GEOObjects::getPointVec(), GeoLib::GEOObjects::getPointVecObj(), MeshLib::MeshInformation::getValueBounds(), materialIDs(), and OGS_FATAL.
Referenced by MainWindow::convertMeshToGeometry(), FileIO::createSurface(), and main().
MeshLib::Mesh * MeshLib::convertSurfaceToMesh | ( | const GeoLib::Surface & | sfc, |
const std::string & | mesh_name, | ||
double | eps = std::numeric_limits< double >::epsilon() |
||
) |
Converts a surface into a triangular mesh
sfc | Surface object |
mesh_name | New mesh name |
eps | Minimum distance for nodes not to be collapsed |
Definition at line 148 of file convertMeshToGeo.cpp.
References MeshLib::Mesh::getName(), GeoLib::Surface::getNumberOfTriangles(), and MeshLib::MeshRevision::simplifyMesh().
Referenced by main().
std::unique_ptr< MeshLib::Mesh > MeshLib::convertToLinearMesh | ( | const MeshLib::Mesh & | mesh, |
const std::string & | new_mesh_name | ||
) |
Converts a non-linear mesh to a linear mesh. All the mesh properties will be copied except for entries for non-linear nodes.
Definition at line 59 of file ConvertToLinearMesh.cpp.
References CellType2String(), copyNodeVector(), MeshLib::Properties::excludeCopyProperties(), getBaseNodes(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getNumberOfBaseNodes(), MeshLib::PropertyVectorBase::getNumberOfGlobalComponents(), MeshLib::Mesh::getProperties(), HEX20, LINE3, MaterialPropertyLib::name, Node, OGS_FATAL, QUAD8, TET10, and TRI6.
Referenced by main(), and anonymous_namespace{postLIE.cpp}::postVTU().
Element * MeshLib::copyElement | ( | Element const *const | element, |
const std::vector< Node * > & | nodes, | ||
std::vector< std::size_t > const *const | id_map | ||
) |
Copies an element without change, using the nodes vector from the result mesh.
Copies an element without change, using the nodes vector from the result mesh and an optional mapping from the nodes the 'old' elements.
Definition at line 51 of file DuplicateMeshComponents.cpp.
References MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), and MeshLib::Element::getNumberOfNodes().
Referenced by MeshLib::MeshRevision::simplifyMesh().
std::vector< Element * > MeshLib::copyElementVector | ( | std::vector< Element * > const & | elements, |
std::vector< Node * > const & | new_nodes, | ||
std::vector< std::size_t > const *const | node_id_map = nullptr |
||
) |
Creates a deep copy of an element vector using the given Node vector.
elements | The element vector that should be duplicated. |
new_nodes | The new node vector used for the duplicated element vector. |
node_id_map | An optional mapping from the nodes the 'old' elements based on to the new nodes. This should be consistent with the original node vector. |
Definition at line 34 of file DuplicateMeshComponents.cpp.
Referenced by ProcessLib::LIE::PostProcessTool::PostProcessTool(), addLayerToMesh(), MeshGeoToolsLib::appendLinesAlongPolylines(), createMeshFromElements(), LayeredVolume::createRasterLayers(), MeshLib::BoundaryExtraction::getBoundaryElementsAsMesh(), MeshLib::MeshSurfaceExtraction::getMeshSurface(), main(), removeElements(), and removeNodes().
Creates a deep copy of a Node vector.
Definition at line 22 of file DuplicateMeshComponents.cpp.
Referenced by ProcessLib::LIE::PostProcessTool::PostProcessTool(), addLayerToMesh(), MeshGeoToolsLib::appendLinesAlongPolylines(), convertToLinearMesh(), createFlippedMesh(), createMeshFromElements(), createQuadraticOrderMesh(), LayeredVolume::createRasterLayers(), main(), removeElements(), and removeNodes().
std::tuple<std::vector<MeshLib::Element*>, std::vector<std::size_t>, std::vector<std::size_t> > MeshLib::createBoundaryElements | ( | MeshLib::Mesh const & | bulk_mesh | ) |
Definition at line 413 of file MeshSurfaceExtraction.cpp.
References createSurfaceElementsFromElement(), MeshLib::Mesh::getDimension(), and MeshLib::Mesh::getElements().
Referenced by MeshLib::BoundaryExtraction::getBoundaryElementsAsMesh().
std::unique_ptr< Element > MeshLib::createFlippedElement | ( | Element const & | elem, |
std::vector< Node * > const & | nodes | ||
) |
Creates a copy of an 1d / 2d element where the node order is reversed, such that the direction of a line changes and normals of 2D elements changes its sign.
elem | original element |
nodes | node vector used for the copy of the element |
Definition at line 22 of file FlipElements.cpp.
References MeshLib::Element::getDimension(), MeshLib::Element::getGeomType(), MathLib::Point3dWithID::getID(), MeshLib::Element::getID(), MeshLib::Element::getNode(), MeshLib::Element::getNumberOfNodes(), LINE, QUAD, and TRIANGLE.
Referenced by createFlippedMesh().
Creates a copy of a 1d / 2d mesh where the node order of all elements is reversed such that the direction of lines changes and normals of 2D elements changes their sign.
mesh | input mesh |
Definition at line 54 of file FlipElements.cpp.
References copyNodeVector(), createFlippedElement(), MeshLib::Mesh::getDimension(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getNumberOfElements(), and MeshLib::Mesh::getProperties().
Referenced by addLayerToMesh().
std::unique_ptr<Mesh> MeshLib::createMeshFromElementSelection | ( | std::string | mesh_name, |
std::vector< Element * > const & | elements | ||
) |
Creates a new mesh from a vector of elements.
Definition at line 268 of file Mesh.cpp.
References addPropertyToMesh(), Cell, DBUG(), and Node.
Referenced by MeshGeoToolsLib::constructAdditionalMeshesFromGeometries(), and ProcessLib::createDeactivatedSubdomainMesh().
std::unique_ptr<MeshLib::Mesh> MeshLib::createMeshFromElementSelection | ( | std::string | mesh_name, |
std::vector< Element * > const & | elements | ||
) |
Creates a new mesh from a vector of elements.
Definition at line 268 of file Mesh.cpp.
References addPropertyToMesh(), Cell, DBUG(), and Node.
Referenced by MeshGeoToolsLib::constructAdditionalMeshesFromGeometries(), and ProcessLib::createDeactivatedSubdomainMesh().
std::tuple<std::vector<MeshLib::Node*>, std::vector<std::size_t> > MeshLib::createNodesAndIDMapFromElements | ( | std::vector< MeshLib::Element * > const & | elements, |
std::size_t const | n_all_nodes | ||
) |
Definition at line 161 of file MeshSurfaceExtraction.cpp.
References MathLib::Point3dWithID::getID().
Referenced by MeshLib::BoundaryExtraction::getBoundaryElementsAsMesh(), MeshLib::MeshSurfaceExtraction::getMeshSurface(), and MeshLib::MeshSurfaceExtraction::getSurfaceNodes().
std::unique_ptr< Mesh > MeshLib::createQuadraticOrderMesh | ( | Mesh const & | linear_mesh, |
bool const | add_centre_node | ||
) |
Create a quadratic order mesh from the linear order mesh. For some element types like Quad-4, a centre node might be added if the add_centre_node
flag is set, yielding a Quad-9.
Definition at line 139 of file QuadraticMeshGenerator.cpp.
References MathLib::LinAlg::copy(), copyNodeVector(), createQuadraticElement(), MeshLib::Properties::excludeCopyProperties(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getName(), getNodeIndex(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getProperties(), and Node.
Referenced by main().
bool MeshLib::createSfcMeshProperties | ( | MeshLib::Mesh & | sfc_mesh, |
MeshLib::Properties const & | properties, | ||
std::vector< std::size_t > const & | node_ids_map, | ||
std::vector< std::size_t > const & | element_ids_map | ||
) |
Definition at line 52 of file MeshSurfaceExtraction.cpp.
References Cell, ERR(), MeshLib::Mesh::getNumberOfElements(), MeshLib::Mesh::getNumberOfNodes(), INFO(), MaterialPropertyLib::name, Node, processPropertyVector(), and WARN().
Referenced by MeshLib::BoundaryExtraction::getBoundaryElementsAsMesh(), and MeshLib::MeshSurfaceExtraction::getMeshSurface().
void MeshLib::createSurfaceElementsFromElement | ( | MeshLib::Element const & | surface_element, |
std::vector< MeshLib::Element * > & | surface_elements, | ||
std::vector< std::size_t > & | element_to_bulk_element_id_map, | ||
std::vector< std::size_t > & | element_to_bulk_face_id_map | ||
) |
Definition at line 390 of file MeshSurfaceExtraction.cpp.
References MeshLib::Element::getBoundary(), MeshLib::Element::getID(), MeshLib::Element::getNeighbor(), and MeshLib::Element::getNumberOfBoundaries().
Referenced by createBoundaryElements().
MeshLib::Element* MeshLib::extrudeElement | ( | std::vector< MeshLib::Node * > const & | subsfc_nodes, |
MeshLib::Element const & | sfc_elem, | ||
MeshLib::PropertyVector< std::size_t > const & | sfc_to_subsfc_id_map, | ||
std::map< std::size_t, std::size_t > const & | subsfc_sfc_id_map | ||
) |
Extrudes point, line, triangle or quad elements to its higher dimensional versions, i.e. line, quad, prism, hexahedron.
subsfc_nodes | the nodes the elements are based on |
sfc_elem | the element of the surface that will be extruded |
sfc_to_subsfc_id_map | relation between the surface nodes of the surface element and the ids of the nodes of the subsurface mesh |
subsfc_sfc_id_map | mapping of the surface nodes of the current mesh to the surface nodes of the extruded mesh |
Definition at line 44 of file AddLayerToMesh.cpp.
References MeshLib::Element::getDimension(), MeshLib::Element::getGeomType(), MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), MeshLib::Element::getNumberOfBaseNodes(), LINE, QUAD, and TRIANGLE.
Referenced by addLayerToMesh().
void MeshLib::fillElemProperty | ( | std::vector< T > & | new_prop, |
std::vector< T > const & | old_prop, | ||
std::vector< size_t > | elem_ids | ||
) |
Definition at line 242 of file MeshRevision.cpp.
Referenced by MeshLib::MeshRevision::copyProperties().
void MeshLib::fillNodeProperty | ( | std::vector< T > & | new_prop, |
std::vector< T > const & | old_prop, | ||
std::vector< size_t > | node_ids | ||
) |
Definition at line 225 of file MeshRevision.cpp.
Referenced by MeshLib::MeshRevision::copyProperties().
std::vector<std::size_t> MeshLib::filter | ( | Container const & | container, |
Predicate const & | p | ||
) |
Definition at line 22 of file ElementSearch.cpp.
Referenced by VtkAddFilterDialog::VtkAddFilterDialog(), VtkVisPipeline::highlightGeoObject(), VtkVisPipeline::highlightMeshComponent(), VtkAddFilterDialog::on_buttonBox_accepted(), VtkAddFilterDialog::on_filterListWidget_currentRowChanged(), MeshLib::ElementSearch::searchByBoundingBox(), MeshLib::ElementSearch::searchByContent(), MeshLib::ElementSearch::searchByElementType(), and VtkVisPipeline::showMeshElementQuality().
std::vector<std::vector<Element const*> > MeshLib::findElementsConnectedToNodes | ( | Mesh const & | mesh | ) |
Definition at line 35 of file Mesh.cpp.
References MeshLib::Mesh::getElements(), and MeshLib::Mesh::getNodes().
Referenced by MeshLib::Mesh::Mesh(), and calculateNodesConnectedByElements().
std::vector< std::size_t > MeshLib::findElementsWithinRadius | ( | Element const & | start_element, |
double const | radius_squared | ||
) |
Find neighbor elements in given radius of the element.
Definition at line 23 of file findElementsWithinRadius.cpp.
References MeshLib::Element::getID(), MeshLib::Element::getNode(), MeshLib::Element::getNumberOfNodes(), and MathLib::sqrDist().
Returns a vector of node pointers containing the base nodes of the elements input vector.
Definition at line 26 of file Utils.h.
References MathLib::LinAlg::copy(), MathLib::Point3dWithID::getID(), and BaseLib::makeVectorUnique().
Referenced by ProcessLib::HydroMechanics::HydroMechanicsProcess< DisplacementDim >::constructDofTable(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::constructDofTable(), ProcessLib::RichardsMechanics::RichardsMechanicsProcess< DisplacementDim >::constructDofTable(), ProcessLib::StokesFlow::StokesFlowProcess< GlobalDim >::constructDofTable(), ProcessLib::TH2M::TH2MProcess< DisplacementDim >::constructDofTable(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::constructDofTable(), ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsProcess< DisplacementDim >::constructDofTable(), and convertToLinearMesh().
MathLib::Point3d MeshLib::getBulkElementPoint | ( | Hex const & | hex, |
std::size_t const | face_id, | ||
MathLib::WeightedPoint2D const & | wp | ||
) |
Maps the given 2d boundary point wp
of a quad face, given in local coordinates of the quad, to 3d point existing on a hexahedron face also in local coordinates.
Maps the given lower dimensional 2d boundary point wp
of a quad or triangle element, given in local coordinates of the quad or triangle, to a 3d point existing on a tet face also in local coordinates.
Maps the given lower dimensional 2d boundary point wp
of a quad or triangle element, given in local coordinates of the quad or triangle, to a 3d point existing on a prism face also in local coordinates.
Maps the given lower dimensional 2d boundary point wp
of a quad or triangle element, given in local coordinates of the quad or triangle, to a 3d point existing on a pyramid face also in local coordinates.
Definition at line 57 of file MapBulkElementPoint.cpp.
References OGS_FATAL.
MathLib::Point3d MeshLib::getBulkElementPoint | ( | Mesh const & | , |
std::size_t | , | ||
std::size_t | , | ||
MathLib::WeightedPoint3D const & | |||
) |
Definition at line 206 of file MapBulkElementPoint.cpp.
References MathLib::ORIGIN.
MathLib::Point3d MeshLib::getBulkElementPoint | ( | Mesh const & | mesh, |
std::size_t | bulk_element_id, | ||
std::size_t | bulk_face_id, | ||
MathLib::WeightedPoint2D const & | wp | ||
) |
Maps the given 2d boundary point wp
of a boundary element, given in local coordinates of the boundary element, to 3d point existing on a bulk element also in local coordinates.
Definition at line 175 of file MapBulkElementPoint.cpp.
References CellType2String(), getBulkElementPoint(), MeshLib::Mesh::getElement(), HEX8, OGS_FATAL, PRISM6, PYRAMID5, and TET4.
MathLib::Point3d MeshLib::getBulkElementPoint | ( | Mesh const & | mesh, |
std::size_t const | bulk_element_id, | ||
std::size_t const | bulk_face_id, | ||
MathLib::WeightedPoint1D const & | wp | ||
) |
Maps the given 1d boundary point wp
of a boundary element, given in local coordinates of the boundary element, to 3d point existing on a bulk element also in local coordinates.
Definition at line 155 of file MapBulkElementPoint.cpp.
References CellType2String(), getBulkElementPoint(), MeshLib::Mesh::getElement(), OGS_FATAL, QUAD4, and TRI3.
MathLib::Point3d MeshLib::getBulkElementPoint | ( | Tri const & | tri, |
std::size_t const | face_id, | ||
MathLib::WeightedPoint1D const & | wp | ||
) |
Maps the given lower dimensional boundary point wp
of a line, i.e. the 1d integration point given in local coordinates of a line, to higher dimensional point of the triangle face (defined by the triangle element and the face id) also in local coordinates of the triangle element.
tri | the triangle element |
face_id | the id of the triangle face the point will be mapped on |
wp | the integration point of the lower dimensional element |
Maps the given lower dimensional boundary point wp
of a line, i.e. the 1d integration point given in local coordinates of a line, to higher dimensional point of the quad face (defined by the quad element and the face id) also in local coordinates of the quad face.
quad | the quad element |
face_id | the id of the quad face the point will be mapped on |
wp | the integration point of the lower dimensional element |
Definition at line 17 of file MapBulkElementPoint.cpp.
References OGS_FATAL.
Referenced by ProcessLib::ConstraintDirichletBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::ConstraintDirichletBoundaryConditionLocalAssembler(), ProcessLib::HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::assemble(), getBulkElementPoint(), and ProcessLib::SurfaceFluxLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::integrate().
MeshLib::Node MeshLib::getCenterOfGravity | ( | Element const & | element | ) |
Calculates the center of gravity for the mesh element.
Definition at line 126 of file Element.cpp.
References MeshLib::Element::getNode(), and MeshLib::Element::getNumberOfBaseNodes().
Referenced by ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::initializeConcreteProcess(), ProcessLib::LIE::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess(), main(), markFaults(), LayeredVolume::removeCongruentElements(), ProcessLib::LIE::setFractureProperty(), FileIO::FEFLOWMeshInterface::setMaterialIDs(), setMaterialIDs(), MeshLib::CellRule::testElementNodeOrder(), ProcessLib::ProcessVariable::updateDeactivatedSubdomains(), and FileIO::TetGenInterface::write3dElements().
std::vector< Eigen::MatrixXd > MeshLib::getElementRotationMatrices | ( | int const | space_dimension, |
int const | mesh_dimension, | ||
std::vector< Element * > const & | elements | ||
) |
Element rotation matrix computation.
This function returns a vector containing the rotation matrices of given elements. The rotation matrix of an element is used to map the local vector to the global coordinate system. If an element is not inclined, the identity matrix is used as its rotation matrix.
space_dimension | The space dimension. |
mesh_dimension | The mesh dimension. |
elements | The mesh elements. |
Definition at line 21 of file GetElementRotationMatrices.cpp.
References MeshLib::ElementCoordinatesMappingLocal::getRotationMatrixToGlobal().
Referenced by ProcessLib::LiquidFlow::createLiquidFlowProcess().
std::vector< MeshElemType > MeshLib::getMeshElemTypes | ( | ) |
Returns a vector of all mesh element types.
Definition at line 132 of file MeshEnums.cpp.
References HEXAHEDRON, LINE, POINT, PRISM, PYRAMID, QUAD, TETRAHEDRON, and TRIANGLE.
Referenced by MeshModel::createMeshElemTypeMap(), and getMeshElemTypeStringsShort().
std::vector< std::string > MeshLib::getMeshElemTypeStringsShort | ( | ) |
Returns a vector of strings of mesh element types.
Definition at line 146 of file MeshEnums.cpp.
References getMeshElemTypes().
Referenced by main().
unsigned MeshLib::getNodeIDinElement | ( | Element const & | element, |
const MeshLib::Node * | node | ||
) |
Returns the position of the given node in the node array of this element.
Definition at line 212 of file Element.cpp.
References MeshLib::Element::getNode(), and MeshLib::Element::getNumberOfNodes().
Referenced by isBaseNode(), and MeshLib::MeshRevision::reduceHex().
std::size_t MeshLib::getNodeIndex | ( | Element const & | element, |
unsigned | idx | ||
) |
Get the global node index of the node with the local index idx within the element. The index should be at most the number of nodes of the element.
element | The element object that will be searched for the index. |
idx | Local index of Node, at most the number of nodes of the element that you can obtain with Element::getNumberOfBaseNodes(). |
Definition at line 225 of file Element.cpp.
References ERR(), MathLib::Point3dWithID::getID(), MeshLib::Element::getNode(), and MeshLib::Element::getNumberOfNodes().
Referenced by MeshGeoToolsLib::BoundaryElementsAlongPolyline::BoundaryElementsAlongPolyline(), MeshGeoToolsLib::BoundaryElementsOnSurface::BoundaryElementsOnSurface(), ProcessLib::LIE::PostProcessTool::PostProcessTool(), anonymous_namespace{convertMeshToGeo.cpp}::addElementToSurface(), LayeredVolume::addLayerBoundaries(), LayeredVolume::addLayerToMesh(), MeshLib::MeshLayerMapper::addLayerToMesh(), ProcessLib::LIE::PostProcessTool::calculateTotalDisplacement(), MeshLib::RasterToMesh::convert(), createQuadraticOrderMesh(), FileIO::SwmmInterface::getLinkPointIds(), anonymous_namespace{IdentifySubdomainMesh.cpp}::identifySubdomainMeshElements(), MeshGeoToolsLib::BoundaryElementsAlongPolyline::includesAllEdgeNodeIDs(), NumLib::interpolateToHigherOrderNodes(), markUnusedNodes(), ProcessLib::LIE::HydroMechanics::LocalDataInitializer< LocalAssemblerInterface, LocalAssemblerDataMatrix, LocalAssemblerDataMatrixNearFracture, LocalAssemblerDataFracture, GlobalDim, ConstructorArgs >::operator()(), ProcessLib::LIE::SmallDeformation::LocalDataInitializer< LocalAssemblerInterface, LocalAssemblerDataMatrix, LocalAssemblerDataMatrixNearFracture, LocalAssemblerDataFracture, GlobalDim, ConstructorArgs >::operator()(), LayeredVolume::removeCongruentElements(), MeshLib::NodeSearch::searchNodesConnectedToOnlyGivenElements(), FileIO::FEFLOWMeshInterface::setMaterialIDs(), ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerMatrix< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, GlobalDim >::setPressureOfInactiveNodes(), FileIO::TetGenInterface::writeElementToFacets(), and ApplicationUtils::writeMETIS().
PropertyVector<T>* MeshLib::getOrCreateMeshProperty | ( | Mesh & | mesh, |
std::string const & | property_name, | ||
MeshItemType const | item_type, | ||
int const | number_of_components | ||
) |
Definition at line 234 of file Mesh.h.
References Cell, MeshLib::Properties::existsPropertyVector(), MeshLib::Mesh::getNumberOfElements(), MeshLib::Mesh::getNumberOfNodes(), MeshLib::Mesh::getProperties(), IntegrationPoint, ApplicationUtils::NodeWiseMeshPartitioner::mesh(), Node, and OGS_FATAL.
int MeshLib::getSpaceDimension | ( | std::vector< Node * > const & | nodes | ) |
Computes dimension of the embedding space containing the set of given points.
The space dimension is computed by accounting the non-zero norms of \mathbf x, \mathbf y, \mathbf z, which are the coordinates of all nodes of the mesh. With this concept, the space dimension of a mesh is:
Definition at line 23 of file GetSpaceDimension.cpp.
Referenced by ProcessLib::LiquidFlow::createLiquidFlowProcess(), and setMeshSpaceDimension().
Create a vector of unique nodes used by given elements.
Definition at line 163 of file NodeSearch.cpp.
bool MeshLib::hasZeroVolume | ( | MeshLib::Element const & | element | ) |
Returns true if the element has zero length/area/volume.
Definition at line 121 of file Element.cpp.
References MeshLib::Element::getContent().
Referenced by MeshLib::HexRule8::validate(), MeshLib::LineRule2::validate(), MeshLib::PointRule1::validate(), MeshLib::PrismRule6::validate(), MeshLib::PyramidRule5::validate(), MeshLib::QuadRule4::validate(), MeshLib::TetRule4::validate(), and MeshLib::TriRule3::validate().
bool MeshLib::is2DMeshOnRotatedVerticalPlane | ( | Mesh const & | mesh | ) |
Definition at line 24 of file Is2DMeshOnRotatedVerticalPlane.cpp.
References MeshLib::Mesh::getDimension(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getName(), and OGS_FATAL.
Referenced by ProcessLib::HydroMechanics::createHydroMechanicsProcess().
bool MeshLib::isBaseNode | ( | Node const & | node, |
std::vector< Element const * > const & | elements_connected_to_node | ||
) |
Returns true if the given node is a base node of a (first) element, or if it is not connected to any element i.e. an unconnected node.
Definition at line 370 of file Mesh.cpp.
References getNodeIDinElement().
Referenced by MeshGeoToolsLib::MeshNodesOnPoint::MeshNodesOnPoint(), ApplicationUtils::findGhostNodesInPartition(), ApplicationUtils::findRegularNodesInPartition(), MeshLib::Mesh::getNumberOfBaseNodes(), NumLib::MeshComponentMap::getSubset(), MeshLib::NodePartitionedMesh::isGhostNode(), and ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::IsCrackTip::operator()().
bool MeshLib::isPointInElementXY | ( | MathLib::Point3d const & | p, |
Element const & | e | ||
) |
Let p' the orthogonal projection to the x- y plane of the point p
and e' the orthogonal projection to the x- y plane of the element e
. The method checks if p' is located in e'.
p | MathLib::Point3d is the test point |
e | the element that is used for the request |
Definition at line 177 of file Element.cpp.
References MeshLib::Element::getGeomType(), MeshLib::Element::getNode(), MeshLib::Element::getNumberOfBaseNodes(), MathLib::isPointInTriangleXY(), MeshElemType2String(), QUAD, MathLib::sqrDist2d(), TRIANGLE, and WARN().
Referenced by MeshLib::Mesh2MeshPropertyInterpolation::interpolatePropertiesForMesh().
std::vector< bool > MeshLib::markUnusedNodes | ( | std::vector< Element * > const & | elements, |
std::vector< Node * > const & | nodes | ||
) |
Marks nodes not used by any of the elements.
Definition at line 100 of file RemoveMeshComponents.cpp.
References getNodeIndex().
Referenced by createMeshFromElements(), and removeNodes().
PropertyVector< int > const * MeshLib::materialIDs | ( | Mesh const & | mesh | ) |
Returns the material ids property vector defined on the mesh.
The material ids are always an int
property named "MaterialIDs". If the property does not exists (or is of different type), a nullptr is returned.
Definition at line 258 of file Mesh.cpp.
References Cell, MeshLib::Properties::existsPropertyVector(), and MeshLib::Mesh::getProperties().
Referenced by ProcessLib::HeatTransportBHE::HeatTransportBHEProcess::HeatTransportBHEProcess(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::HydroMechanicsProcess(), MeshGeoToolsLib::appendLinesAlongPolylines(), convertMeshToGeo(), ProcessLib::createDeactivatedSubdomain(), ProcessLib::createDeactivatedSubdomainMesh(), ProcessLib::LIE::HydroMechanics::createHydroMechanicsProcess(), ProcessLib::HydroMechanics::createHydroMechanicsProcess(), MaterialPropertyLib::createMaterialSpatialDistributionMap(), ProcessLib::PhaseField::createPhaseFieldProcess(), MaterialLib::PorousMedium::createPorousMediaProperties(), ProcessLib::RichardsMechanics::createRichardsMechanicsProcess(), ProcessLib::SmallDeformationNonlocal::createSmallDeformationNonlocalProcess(), ProcessLib::LIE::SmallDeformation::createSmallDeformationProcess(), ProcessLib::SmallDeformation::createSmallDeformationProcess(), ProcessLib::TH2M::createTH2MProcess(), ProcessLib::ThermalTwoPhaseFlowWithPP::createThermalTwoPhaseFlowWithPPProcess(), ProcessLib::ThermoHydroMechanics::createThermoHydroMechanicsProcess(), ProcessLib::ThermoMechanicalPhaseField::createThermoMechanicalPhaseFieldProcess(), ProcessLib::ThermoMechanics::createThermoMechanicsProcess(), ProcessLib::ThermoRichardsMechanics::createThermoRichardsMechanicsProcess(), ProcessLib::TwoPhaseFlowWithPP::createTwoPhaseFlowWithPPProcess(), ProcessLib::TwoPhaseFlowWithPrho::createTwoPhaseFlowWithPrhoProcess(), extractBoundaryMeshes(), ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::findFracutreIntersections(), ProcessLib::HeatTransportBHE::getBHEDataInMesh(), ProcessLib::LIE::getFractureMatrixDataInMesh(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::initializeConcreteProcess(), main(), removeUnusedElements(), ElementTreeModel::setElement(), and ProcessLib::ProcessVariable::updateDeactivatedSubdomains().
std::string MeshLib::MeshElemType2String | ( | const MeshElemType | t | ) |
Given a MeshElemType this returns the appropriate string.
Definition at line 21 of file MeshEnums.cpp.
References HEXAHEDRON, LINE, POINT, PRISM, PYRAMID, QUAD, TETRAHEDRON, and TRIANGLE.
Referenced by MeshModel::createMeshElemTypeMap(), MeshLib::TemplateElement< ELEMENT_RULE >::getNode(), isPointInElementXY(), ElementTreeModel::setElement(), ElementTreeModel::setMesh(), and MeshLib::MeshInformation::writeAllNumbersOfElementTypes().
std::string MeshLib::MeshElemType2StringShort | ( | const MeshElemType | t | ) |
Given a MeshElemType this returns the appropriate string with a short name.
Definition at line 58 of file MeshEnums.cpp.
References HEXAHEDRON, LINE, POINT, PRISM, PYRAMID, QUAD, TETRAHEDRON, and TRIANGLE.
std::string MeshLib::MeshQualityType2String | ( | const MeshQualityType | t | ) |
Definition at line 186 of file MeshEnums.cpp.
References EDGERATIO, ELEMENTSIZE, EQUIANGLESKEW, RADIUSEDGERATIO, and SIZEDIFFERENCE.
Referenced by VtkVisPipeline::showMeshElementQuality(), and MeshLib::ElementQualityInterface::writeHistogram().
void MeshLib::moveMeshNodes | ( | Iterator | begin, |
Iterator | end, | ||
MeshLib::Node const & | displacement | ||
) |
Function that moves mesh nodes.
The function iterates over all mesh nodes between the begin and the end iterator and moves them using the given displacement.
begin | begin iterator |
end | end iterator |
displacement | the displacement to use |
Definition at line 32 of file moveMeshNodes.h.
Referenced by main().
Lexicographic order of Location.
Definition at line 51 of file Location.h.
References MeshLib::Location::item_id, MeshLib::Location::item_type, and MeshLib::Location::mesh_id.
std::ostream& MeshLib::operator<< | ( | std::ostream & | os, |
Element const & | e | ||
) |
Definition at line 89 of file Element.cpp.
std::ostream & MeshLib::operator<< | ( | std::ostream & | os, |
Location const & | l | ||
) |
Definition at line 35 of file Location.cpp.
References MeshLib::Location::item_id, MeshLib::Location::item_type, and MeshLib::Location::mesh_id.
std::ostream & MeshLib::operator<< | ( | std::ostream & | os, |
MeshItemType const & | t | ||
) |
Definition at line 17 of file Location.cpp.
References Cell, Edge, Face, IntegrationPoint, and Node.
Meshes are equal if their id's are equal.
Definition at line 166 of file Mesh.h.
References MeshLib::Mesh::getID().
void MeshLib::processPropertyVector | ( | MeshLib::PropertyVector< T > const & | property, |
std::vector< std::size_t > const & | id_map, | ||
MeshLib::Mesh & | sfc_mesh | ||
) |
Definition at line 33 of file MeshSurfaceExtraction.cpp.
References MeshLib::PropertyVector< PROP_VAL_TYPE >::getComponent(), MeshLib::PropertyVectorBase::getMeshItemType(), and MeshLib::PropertyVectorBase::getPropertyName().
Referenced by createSfcMeshProperties().
MeshLib::Mesh * MeshLib::removeElements | ( | const MeshLib::Mesh & | mesh, |
const std::vector< std::size_t > & | removed_element_ids, | ||
const std::string & | new_mesh_name | ||
) |
Removes mesh elements and returns a new mesh object. The original mesh is kept unchanged.
mesh | an original mesh whose elements are removed |
removed_element_ids | a vector of element indices to be removed |
new_mesh_name | a new mesh name |
Definition at line 52 of file RemoveMeshComponents.cpp.
References copyElementVector(), copyNodeVector(), MeshLib::Properties::excludeCopyProperties(), MeshLib::details::excludeElementCopy(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getProperties(), MeshLib::NodeSearch::getSearchedNodeIDs(), INFO(), and MeshLib::NodeSearch::searchNodesConnectedToOnlyGivenElements().
Referenced by MeshElementRemovalDialog::accept(), MeshLib::RasterToMesh::convert(), LayeredVolume::createRasterLayers(), extractMatGroup(), MeshLib::MeshGenerator::generateRegularPrismMesh(), main(), removeUnusedElements(), removeUnusedGridCells(), and writeBoundary().
void MeshLib::removeMarkedNodes | ( | std::vector< bool > const & | nodes_to_delete, |
std::vector< Node * > & | nodes | ||
) |
Deallocates and removes nodes marked true.
Definition at line 115 of file RemoveMeshComponents.cpp.
Referenced by createMeshFromElements(), and removeNodes().
MeshLib::Mesh * MeshLib::removeNodes | ( | const MeshLib::Mesh & | mesh, |
const std::vector< std::size_t > & | del_nodes_idx, | ||
const std::string & | new_mesh_name | ||
) |
Removes the mesh nodes (and connected elements) given in the nodes-list from the mesh.
mesh | an original mesh whose elements are removed |
del_nodes_idx | a vector of node indices to be removed |
new_mesh_name | a new mesh name |
Definition at line 131 of file RemoveMeshComponents.cpp.
References copyElementVector(), copyNodeVector(), MeshLib::Properties::excludeCopyProperties(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getProperties(), MeshLib::ElementSearch::getSearchedElementIDs(), markUnusedNodes(), removeMarkedNodes(), and MeshLib::ElementSearch::searchByNodeIDs().
Referenced by LayeredMeshGenerator::getMesh().
void MeshLib::scaleMeshPropertyVector | ( | Mesh & | mesh, |
std::string const & | property_name, | ||
double | factor | ||
) |
Scales the mesh property with name property_name
by given factor
.
Definition at line 244 of file Mesh.cpp.
References MeshLib::Properties::existsPropertyVector(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), and WARN().
Referenced by main().
void MeshLib::setMeshSpaceDimension | ( | std::vector< std::unique_ptr< Mesh >> const & | meshes | ) |
In this function, the dimension of the space, which contains all nodes of the bulk mesh, is computed, and it is then set as a member of the elements of all meshes.
The space dimension is needed for the numerical simulations with a bulk mesh with elements with different dimensions. For example, in a bulk mesh for the numerical simulation of the liquid flow in the fractured porous media, the 1D or 2D elements can be used to represent the fractures, while the elements with higher dimension can be used to discretise the porous medium matrix domain.
meshes | All meshes include the bulk mesh and the meshes for boundary conditions. |
Definition at line 20 of file SetMeshSpaceDimension.cpp.
References getNodes(), and getSpaceDimension().
Referenced by anonymous_namespace{ProjectData.cpp}::readMeshes().
MeshElemType MeshLib::String2MeshElemType | ( | const std::string & | s | ) |
Given a string of the shortened name of the element type, this returns the corresponding MeshElemType.
Definition at line 95 of file MeshEnums.cpp.
References HEXAHEDRON, INVALID, LINE, POINT, PRISM, PYRAMID, QUAD, TETRAHEDRON, and TRIANGLE.
Referenced by MeshElementRemovalDialog::accept(), main(), and MeshLib::IO::Legacy::MeshIO::readElement().
MeshLib::MeshQualityType MeshLib::String2MeshQualityType | ( | std::string const & | s | ) |
Definition at line 211 of file MeshEnums.cpp.
References EDGERATIO, ELEMENTSIZE, EQUIANGLESKEW, INVALID, RADIUSEDGERATIO, and SIZEDIFFERENCE.
Referenced by main().
|
staticconstexpr |
Returns a char array for a specific MeshItemType.
Definition at line 28 of file Location.h.
References mesh_item_type_strings.
|
static |
Finds all surface elements that can be reached from element. All elements that are found in this way are marked in the global sfc_idx vector using the current_index.
element | The mesh element from which the search is started |
sfc_idx | The global index vector notifying to which surface elements belong |
current_index | The index that all elements reachable from element will be assigned in sfc_idx |
Definition at line 40 of file MeshValidation.cpp.
References MeshLib::Element::getID(), MeshLib::Element::getNeighbor(), and MeshLib::Element::getNumberOfNeighbors().
Referenced by MeshLib::MeshValidation::detectHoles().
MeshLib::vtkStandardNewMacro | ( | VtkMappedMeshSource | ) |
Definition at line 32 of file VtkMappedMeshSource.cpp.
References MeshLib::VtkMappedMeshSource::_mesh, and MeshLib::Mesh::getName().
|
staticconstexpr |
Char array names for all of MeshItemType values.
Definition at line 24 of file Location.h.
Referenced by toString().