Namespaces | |
namespace | anonymous_namespace{AngleSkewMetric.cpp} |
namespace | anonymous_namespace{ConvertToLinearMesh.cpp} |
namespace | BoundaryExtraction |
namespace | MeshGenerator |
namespace | MeshGenerators |
namespace | ProjectPointOnMesh |
namespace | RasterDataToMesh |
Adding pixel values from a raster onto nodes or cells of a mesh. | |
Classes | |
struct | AngleSkewMetric |
struct | EdgeRatioMetric |
class | ElementQualityInterface |
class | ElementQualityMetric |
class | ElementSizeMetric |
class | ElementValueModification |
A set of methods for manipulating mesh element values. More... | |
class | Mesh2MeshPropertyInterpolation |
class | MeshInformation |
A set of tools for extracting information from a mesh. More... | |
class | MeshLayerMapper |
Manipulating and adding prism element layers to an existing 2D mesh. More... | |
class | MeshRevision |
class | MeshSurfaceExtraction |
A set of tools concerned with extracting nodes and elements from a mesh surface. More... | |
struct | MeshValidation |
A collection of methods for testing mesh quality and correctness. More... | |
struct | NodesPartitionResult |
struct | RadiusEdgeRatioMetric |
class | RasterToMesh |
Converts raster data into an OGS mesh. More... | |
struct | SizeDifferenceMetric |
Functions | |
template<typename ShapeFunction > | |
double | computeElementVolumeNumerically (MeshLib::Element const &e) |
double | computeElementVolumeNumerically (MeshLib::Element const &e) |
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) |
template<typename ElementType > | |
int | getNumberOfElementIntegrationPointsGeneral (MeshLib::IntegrationPointMetaDataSingleField const &ip_meta_data) |
int | getNumberOfElementIntegrationPoints (MeshLib::IntegrationPointMetaDataSingleField const &ip_meta_data, MeshLib::Element const &e) |
std::vector< std::size_t > | getIntegrationPointDataOffsetsOfMeshElements (std::vector< MeshLib::Element * > const &mesh_elements, MeshLib::PropertyVectorBase const &pv, MeshLib::Properties const &properties) |
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 const thickness, std::string const &name, bool const on_top, bool const copy_material_ids, std::optional< int > const layer_id) |
std::unique_ptr< MeshLib::Mesh > | convertToLinearMesh (MeshLib::Mesh const &mesh, std::string const &new_mesh_name) |
std::unique_ptr< MeshLib::Element > | createFlippedElement (MeshLib::Element const &elem, std::vector< MeshLib::Node * > const &nodes) |
std::unique_ptr< MeshLib::Mesh > | createFlippedMesh (MeshLib::Mesh const &mesh) |
template<typename T > | |
void | setSigma0 (int const pv_num_components, MeshLib::PropertyVector< T > const *const pv_bulk_mesh, std::unordered_map< std::string, double > &initial_value_dict, MeshLib::PropertyVector< T > &new_pv) |
template<typename T > | |
bool | createNodeProperties (MeshLib::Mesh &merged_mesh, std::string const &pv_name, int const pv_num_components, MeshLib::PropertyVector< T > const *const pv_bulk_mesh, std::unordered_map< std::string, double > &initial_value_dict) |
template<typename T > | |
bool | createCellProperties (MeshLib::Mesh &merged_mesh, std::string const &pv_name, int const pv_num_components, MeshLib::PropertyVector< T > const *const pv_bulk_mesh, std::unordered_map< std::string, double > &initial_value_dict) |
template<typename T > | |
bool | createIntegrationPointProperties (MeshLib::Mesh &merged_mesh, std::string const &pv_name, int const pv_num_components, MeshLib::PropertyVector< T > const *const pv_bulk_mesh, std::unordered_map< std::string, double > &initial_value_dict, std::optional< MeshLib::IntegrationPointMetaData > const &integration_point_meta_data) |
template<typename T > | |
bool | createMergedPropertyVector (MeshLib::Mesh &merged_mesh, std::unordered_map< std::string, double > &initial_value_dict, MeshLib::PropertyVector< T > const *const pv_bulk_mesh, std::optional< MeshLib::IntegrationPointMetaData > const &integration_point_meta_data) |
std::vector< MeshLib::Node * > | findNodesInBoundedDomain (std::vector< MeshLib::Node * > const &nodes, GeoLib::AABB const &aabb) |
std::unique_ptr< MeshLib::Mesh > | mergeMeshToBulkMesh (MeshLib::Mesh const &bulk_mesh, MeshLib::Mesh const &other_mesh, std::unordered_map< std::string, double > &initial_value_dict) |
unsigned | lutPrismThirdNode (unsigned const id1, unsigned const id2) |
template<typename Iterator > | |
void | moveMeshNodes (Iterator begin, Iterator end, Eigen::Vector3d const &displacement) |
NodesPartitionResult | partitionNodesByCoordinateMatch (std::vector< MeshLib::Node * > const &node_vector, std::vector< MeshLib::Node * > const &tool_node_vector, GeoLib::AABB const &aabb, bool const return_non_paired_nodes) |
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< MeshLib::Element * > const &elements, std::vector< MeshLib::Node * > const &nodes) |
Marks nodes not used by any of the elements. | |
void | removeMarkedNodes (std::vector< bool > const &nodes_to_delete, std::vector< MeshLib::Node * > &nodes) |
Deallocates and removes nodes marked true. | |
MeshLib::Mesh * | removeNodes (const MeshLib::Mesh &mesh, const std::vector< std::size_t > &del_nodes_idx, const std::string &new_mesh_name) |
std::unique_ptr< MeshLib::Mesh > | createQuadraticOrderMesh (MeshLib::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 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_view node_to_bulk_node_id_map_name, std::vector< std::size_t > const &node_to_bulk_node_id_map, std::string_view element_to_bulk_element_id_map_name, std::vector< std::size_t > const &element_to_bulk_element_id_map, std::string_view element_to_bulk_face_id_map_name, std::vector< std::size_t > const &element_to_bulk_face_id_map) |
void | zeroMeshFieldDataByMaterialIDs (MeshLib::Mesh &mesh, std::vector< int > const &selected_material_ids) |
void MeshToolsLib::addBulkIDPropertiesToMesh | ( | MeshLib::Mesh & | surface_mesh, |
std::string_view | node_to_bulk_node_id_map_name, | ||
std::vector< std::size_t > const & | node_to_bulk_node_id_map, | ||
std::string_view | element_to_bulk_element_id_map_name, | ||
std::vector< std::size_t > const & | element_to_bulk_element_id_map, | ||
std::string_view | element_to_bulk_face_id_map_name, | ||
std::vector< std::size_t > const & | element_to_bulk_face_id_map ) |
Definition at line 528 of file MeshSurfaceExtraction.cpp.
References MeshLib::addPropertyToMesh(), MeshLib::Cell, and MeshLib::Node.
Referenced by MeshToolsLib::BoundaryExtraction::getBoundaryElementsAsMesh(), and MeshToolsLib::MeshSurfaceExtraction::getMeshSurface().
MeshLib::Mesh * MeshToolsLib::addLayerToMesh | ( | MeshLib::Mesh const & | mesh, |
double const | thickness, | ||
std::string const & | name, | ||
bool const | on_top, | ||
bool const | copy_material_ids, | ||
std::optional< int > const | layer_id ) |
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 84 of file AddLayerToMesh.cpp.
References MeshLib::Cell, MeshLib::copyElementVector(), MeshLib::copyNodeVector(), createFlippedMesh(), ERR(), MeshLib::Properties::existsPropertyVector(), extrudeElement(), MeshLib::getBulkIDString(), MeshLib::Mesh::getDimension(), MeshLib::Mesh::getElements(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), MeshLib::Mesh::getName(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getNumberOfElements(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), INFO(), and MeshLib::Node.
Referenced by MeshToolsLib::MeshGenerator::generateRegularPrismMesh(), main(), and MeshView::openAddLayerDialog().
double MeshToolsLib::computeElementVolumeNumerically | ( | MeshLib::Element const & | e | ) |
Definition at line 47 of file ComputeElementVolumeNumerically.cpp.
References NumLib::initShapeMatrices().
Referenced by MeshToolsLib::ElementSizeMetric::calc1dQuality(), MeshToolsLib::ElementSizeMetric::calc2dOr3dQuality(), and computeElementVolumeNumerically().
double MeshToolsLib::computeElementVolumeNumerically | ( | MeshLib::Element const & | e | ) |
Definition at line 73 of file ComputeElementVolumeNumerically.cpp.
References MeshLib::CellType2String(), computeElementVolumeNumerically(), MeshLib::Element::getCellType(), MeshLib::HEX20, MeshLib::HEX8, MeshLib::LINE2, MeshLib::LINE3, OGS_FATAL, MeshLib::PRISM15, MeshLib::PRISM6, MeshLib::PYRAMID13, MeshLib::PYRAMID5, MeshLib::QUAD4, MeshLib::QUAD8, MeshLib::QUAD9, MeshLib::TET10, MeshLib::TET4, MeshLib::TRI3, and MeshLib::TRI6.
bool MeshToolsLib::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 ERR(), MeshLib::Mesh::getDimension(), MeshLib::Mesh::getElements(), GeoLib::PointVec::getIDMap(), MeshLib::Mesh::getName(), MeshLib::Mesh::getNumberOfElements(), GeoLib::GEOObjects::getPointVec(), GeoLib::GEOObjects::getPointVecObj(), MeshToolsLib::MeshInformation::getValueBounds(), and OGS_FATAL.
Referenced by MainWindow::convertMeshToGeometry(), FileIO::createSurface(), and main().
MeshLib::Mesh * MeshToolsLib::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 150 of file convertMeshToGeo.cpp.
References convertSurfaceToMesh(), MeshLib::Mesh::getName(), GeoLib::Surface::getNumberOfTriangles(), MeshLib::Node, and MeshToolsLib::MeshRevision::simplifyMesh().
Referenced by convertSurfaceToMesh(), and main().
std::unique_ptr< MeshLib::Mesh > MeshToolsLib::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 47 of file ConvertToLinearMesh.cpp.
References MeshLib::CellType2String(), MeshLib::Properties::excludeCopyProperties(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getNodes(), MeshLib::PropertyVectorBase::getNumberOfGlobalComponents(), MeshLib::Mesh::getProperties(), MeshLib::HEX20, MeshLib::LINE3, MeshLib::Node, OGS_FATAL, MeshLib::QUAD8, MeshLib::TET10, and MeshLib::TRI6.
Referenced by main(), and anonymous_namespace{postLIE.cpp}::postVTU().
std::tuple< std::vector< MeshLib::Element * >, std::vector< std::size_t >, std::vector< std::size_t > > MeshToolsLib::createBoundaryElements | ( | MeshLib::Mesh const & | bulk_mesh | ) |
Definition at line 443 of file MeshSurfaceExtraction.cpp.
References createSurfaceElementsFromElement(), MeshLib::Mesh::getDimension(), and MeshLib::Mesh::getElements().
Referenced by MeshToolsLib::BoundaryExtraction::getBoundaryElementsAsMesh().
bool MeshToolsLib::createCellProperties | ( | MeshLib::Mesh & | merged_mesh, |
std::string const & | pv_name, | ||
int const | pv_num_components, | ||
MeshLib::PropertyVector< T > const *const | pv_bulk_mesh, | ||
std::unordered_map< std::string, double > & | initial_value_dict ) |
Definition at line 101 of file MergeMeshToBulkMesh.cpp.
References MeshLib::Cell, MeshLib::Mesh::getNumberOfElements(), MeshLib::getOrCreateMeshProperty(), and MeshLib::PropertyVector< T >::size().
Referenced by createMergedPropertyVector().
std::unique_ptr< MeshLib::Element > MeshToolsLib::createFlippedElement | ( | MeshLib::Element const & | elem, |
std::vector< MeshLib::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(), MeshLib::LINE, MeshLib::QUAD, and MeshLib::TRIANGLE.
Referenced by createFlippedMesh().
std::unique_ptr< MeshLib::Mesh > MeshToolsLib::createFlippedMesh | ( | MeshLib::Mesh const & | mesh | ) |
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 57 of file FlipElements.cpp.
References createFlippedElement(), MeshLib::Mesh::getDimension(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getNumberOfElements(), and MeshLib::Mesh::getProperties().
Referenced by addLayerToMesh().
bool MeshToolsLib::createIntegrationPointProperties | ( | MeshLib::Mesh & | merged_mesh, |
std::string const & | pv_name, | ||
int const | pv_num_components, | ||
MeshLib::PropertyVector< T > const *const | pv_bulk_mesh, | ||
std::unordered_map< std::string, double > & | initial_value_dict, | ||
std::optional< MeshLib::IntegrationPointMetaData > const & | integration_point_meta_data ) |
Definition at line 122 of file MergeMeshToBulkMesh.cpp.
References MeshLib::Mesh::getElements(), MeshLib::getIntegrationPointMetaDataSingleField(), getNumberOfElementIntegrationPoints(), MeshLib::getOrCreateMeshProperty(), MeshLib::IntegrationPoint, and setSigma0().
Referenced by createMergedPropertyVector().
bool MeshToolsLib::createMergedPropertyVector | ( | MeshLib::Mesh & | merged_mesh, |
std::unordered_map< std::string, double > & | initial_value_dict, | ||
MeshLib::PropertyVector< T > const *const | pv_bulk_mesh, | ||
std::optional< MeshLib::IntegrationPointMetaData > const & | integration_point_meta_data ) |
Definition at line 159 of file MergeMeshToBulkMesh.cpp.
References MeshLib::Cell, createCellProperties(), createIntegrationPointProperties(), createNodeProperties(), MeshLib::PropertyVectorBase::getMeshItemType(), MeshLib::PropertyVectorBase::getNumberOfGlobalComponents(), MeshLib::getOrCreateMeshProperty(), MeshLib::PropertyVectorBase::getPropertyName(), MeshLib::IntegrationPoint, MeshLib::Node, and MeshLib::PropertyVector< T >::size().
Referenced by mergeMeshToBulkMesh().
bool MeshToolsLib::createNodeProperties | ( | MeshLib::Mesh & | merged_mesh, |
std::string const & | pv_name, | ||
int const | pv_num_components, | ||
MeshLib::PropertyVector< T > const *const | pv_bulk_mesh, | ||
std::unordered_map< std::string, double > & | initial_value_dict ) |
Definition at line 56 of file MergeMeshToBulkMesh.cpp.
References MeshLib::Mesh::getNumberOfNodes(), MeshLib::getOrCreateMeshProperty(), MeshLib::Node, setSigma0(), and MeshLib::PropertyVector< T >::size().
Referenced by createMergedPropertyVector().
std::tuple< std::vector< MeshLib::Node * >, std::vector< std::size_t > > MeshToolsLib::createNodesAndIDMapFromElements | ( | std::vector< MeshLib::Element * > const & | elements, |
std::size_t const | n_all_nodes ) |
Definition at line 175 of file MeshSurfaceExtraction.cpp.
References MathLib::Point3dWithID::getID().
Referenced by MeshToolsLib::BoundaryExtraction::getBoundaryElementsAsMesh(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), and MeshToolsLib::MeshSurfaceExtraction::getSurfaceNodes().
std::unique_ptr< MeshLib::Mesh > MeshToolsLib::createQuadraticOrderMesh | ( | MeshLib::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 195 of file QuadraticMeshGenerator.cpp.
References MeshLib::copyNodeVector(), createQuadraticElement(), MeshLib::Properties::excludeCopyProperties(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getName(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getProperties(), and MeshLib::Node.
Referenced by main().
bool MeshToolsLib::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 54 of file MeshSurfaceExtraction.cpp.
References MeshLib::Cell, ERR(), MeshLib::Mesh::getNumberOfElements(), MeshLib::Mesh::getNumberOfNodes(), INFO(), MeshLib::Node, processPropertyVector(), and WARN().
Referenced by MeshToolsLib::BoundaryExtraction::getBoundaryElementsAsMesh(), and MeshToolsLib::MeshSurfaceExtraction::getMeshSurface().
void MeshToolsLib::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 420 of file MeshSurfaceExtraction.cpp.
References MeshLib::Element::getBoundary(), MeshLib::Element::getID(), MeshLib::Element::getNeighbor(), and MeshLib::Element::getNumberOfBoundaries().
Referenced by createBoundaryElements().
MeshLib::Element * MeshToolsLib::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(), MeshLib::LINE, MeshLib::QUAD, and MeshLib::TRIANGLE.
Referenced by addLayerToMesh().
std::vector< MeshLib::Node * > MeshToolsLib::findNodesInBoundedDomain | ( | std::vector< MeshLib::Node * > const & | nodes, |
GeoLib::AABB const & | aabb ) |
Definition at line 215 of file MergeMeshToBulkMesh.cpp.
References MathLib::Point3d::asEigenVector3d(), and GeoLib::AABB::containsPoint().
Referenced by mergeMeshToBulkMesh().
std::vector< std::size_t > MeshToolsLib::getIntegrationPointDataOffsetsOfMeshElements | ( | std::vector< MeshLib::Element * > const & | mesh_elements, |
MeshLib::PropertyVectorBase const & | pv, | ||
MeshLib::Properties const & | properties ) |
Definition at line 98 of file IntegrationPointDataTools.cpp.
References MeshLib::getIntegrationPointMetaData(), MeshLib::getIntegrationPointMetaDataSingleField(), getNumberOfElementIntegrationPoints(), MeshLib::PropertyVectorBase::getNumberOfGlobalComponents(), and MeshLib::PropertyVectorBase::getPropertyName().
Referenced by ApplicationUtils::copyPropertyVector(), createPropertyVector(), and zeroMeshFieldDataByMaterialIDs().
int MeshToolsLib::getNumberOfElementIntegrationPoints | ( | MeshLib::IntegrationPointMetaDataSingleField const & | ip_meta_data, |
MeshLib::Element const & | e ) |
Definition at line 36 of file IntegrationPointDataTools.cpp.
References MeshLib::CellType2String(), MeshLib::Element::getCellType(), getNumberOfElementIntegrationPointsGeneral(), MeshLib::HEX20, MeshLib::HEX27, MeshLib::HEX8, MeshLib::INVALID, MeshLib::LINE2, MeshLib::LINE3, OGS_FATAL, MeshLib::PRISM15, MeshLib::PRISM18, MeshLib::PRISM6, MeshLib::PYRAMID13, MeshLib::PYRAMID5, MeshLib::QUAD4, MeshLib::QUAD8, MeshLib::QUAD9, MeshLib::TET10, MeshLib::TET4, MeshLib::TRI3, and MeshLib::TRI6.
Referenced by ApplicationUtils::checkFieldPropertyVectorSize(), ApplicationUtils::copyFieldPropertyDataToPartitions(), createIntegrationPointProperties(), createPropertyVector(), getIntegrationPointDataOffsetsOfMeshElements(), and ApplicationUtils::setIntegrationPointNumberOfPartition().
int MeshToolsLib::getNumberOfElementIntegrationPointsGeneral | ( | MeshLib::IntegrationPointMetaDataSingleField const & | ip_meta_data | ) |
Definition at line 24 of file IntegrationPointDataTools.cpp.
References MeshLib::IntegrationPointMetaDataSingleField::integration_order.
Referenced by getNumberOfElementIntegrationPoints().
unsigned MeshToolsLib::lutPrismThirdNode | ( | unsigned const | id1, |
unsigned const | id2 ) |
Lookup-table for returning the third node of bottom or top triangle given the other two.
Definition at line 35 of file MeshRevision.cpp.
Referenced by anonymous_namespace{MeshRevision.cpp}::reducePrism().
std::vector< bool > MeshToolsLib::markUnusedNodes | ( | std::vector< MeshLib::Element * > const & | elements, |
std::vector< MeshLib::Node * > const & | nodes ) |
Marks nodes not used by any of the elements.
Definition at line 70 of file RemoveMeshComponents.cpp.
Referenced by createMeshFromElements(), and removeNodes().
std::unique_ptr< MeshLib::Mesh > MeshToolsLib::mergeMeshToBulkMesh | ( | MeshLib::Mesh const & | bulk_mesh, |
MeshLib::Mesh const & | other_mesh, | ||
std::unordered_map< std::string, double > & | initial_value_dict ) |
Merges the mesh other_mesh
into the bulk mesh bulk_mesh
. Optionally sets constant integration point stress and primary nodal variables in the bulk mesh to specified values for the merged part.
Note: This function moves nodes and elements from other_mesh
to the merged mesh (bulk_mesh
). It deletes the duplicate nodes of other_mesh
at the mesh interface. The merged mesh manages memory deallocation for nodes and elements. The member function shallowClean
must be called on bulk_mesh
and other_mesh
afterward to prevent memory leaks.
bulk_mesh | Bulk mesh. |
other_mesh | Mesh to be merged. |
initial_value_dict | Initial values to be specified for the merged part. |
Definition at line 225 of file MergeMeshToBulkMesh.cpp.
References MeshLib::applyToPropertyVectors(), createMergedPropertyVector(), findNodesInBoundedDomain(), MeshLib::Mesh::getElements(), MathLib::Point3dWithID::getID(), MeshLib::getIntegrationPointMetaData(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getProperties(), and partitionNodesByCoordinateMatch().
Referenced by main().
void MeshToolsLib::moveMeshNodes | ( | Iterator | begin, |
Iterator | end, | ||
Eigen::Vector3d 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 33 of file moveMeshNodes.h.
References MathLib::Point3d::asEigenVector3d().
Referenced by main(), TranslateDataDialog::moveGeometry(), and TranslateDataDialog::moveMesh().
NodesPartitionResult MeshToolsLib::partitionNodesByCoordinateMatch | ( | std::vector< MeshLib::Node * > const & | node_vector, |
std::vector< MeshLib::Node * > const & | tool_node_vector, | ||
GeoLib::AABB const & | aabb, | ||
bool const | return_non_paired_nodes = true ) |
Assuming at least one element in node_vector
can be paired with an element in tool_node_vector
based on identical coordinates, this function partitions node_vector
into two vectors: one containing nodes that can be paired with elements in tool_node_vector
, and another containing the remaining nodes or empty depending on the argument return_non_paired_nodes
.
node_vector | Node vector to be partitioned. |
tool_node_vector | Node vector as a tool for partitioning. |
aabb | Axis-aligned bounding box (AABB) for spatial filtering and the optional return of non-paired nodes. |
return_non_paired_nodes | Indicator whether to return unpaired nodes. |
node_vector
,node_vector
to its pair in tool_node_vector
or nothing if return_non_paired_nodes
is false,node_vector
or nothing if return_non_paired_nodes
is false. Definition at line 20 of file PartitionNodesByCoordinateMatch.cpp.
References GeoLib::OctTree< POINT, MAX_POINTS >::createOctTree(), MathLib::Point3dWithID::getID(), GeoLib::AABB::getMaxPoint(), and GeoLib::AABB::getMinPoint().
Referenced by mergeMeshToBulkMesh().
void MeshToolsLib::processPropertyVector | ( | MeshLib::PropertyVector< T > const & | property, |
std::vector< std::size_t > const & | id_map, | ||
MeshLib::Mesh & | sfc_mesh ) |
Definition at line 35 of file MeshSurfaceExtraction.cpp.
References MeshLib::PropertyVector< T >::getComponent(), MeshLib::PropertyVectorBase::getMeshItemType(), MeshLib::getOrCreateMeshProperty(), and MeshLib::PropertyVectorBase::getPropertyName().
Referenced by createSfcMeshProperties().
MeshLib::Mesh * MeshToolsLib::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 21 of file RemoveMeshComponents.cpp.
References MeshLib::copyElementVector(), MeshLib::copyNodeVector(), MeshLib::Properties::excludeCopyProperties(), BaseLib::excludeObjectCopy(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getProperties(), MeshLib::NodeSearch::getSearchedNodeIDs(), INFO(), and MeshLib::NodeSearch::searchNodesConnectedToOnlyGivenElements().
Referenced by MeshElementRemovalDialog::accept(), MeshToolsLib::RasterToMesh::convert(), LayeredVolume::createRasterLayers(), MeshToolsLib::MeshGenerators::VoxelFromLayeredMeshes::createVoxelFromLayeredMesh(), extractMatGroup(), MeshToolsLib::MeshGenerator::generateRegularPrismMesh(), main(), MeshToolsLib::MeshGenerator::VoxelGridFromMesh::removeUnusedGridCells(), and writeBoundary().
void MeshToolsLib::removeMarkedNodes | ( | std::vector< bool > const & | nodes_to_delete, |
std::vector< MeshLib::Node * > & | nodes ) |
Deallocates and removes nodes marked true.
Definition at line 86 of file RemoveMeshComponents.cpp.
Referenced by createMeshFromElements(), and removeNodes().
MeshLib::Mesh * MeshToolsLib::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 102 of file RemoveMeshComponents.cpp.
References MeshLib::copyElementVector(), MeshLib::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 MeshToolsLib::setSigma0 | ( | int const | pv_num_components, |
MeshLib::PropertyVector< T > const *const | pv_bulk_mesh, | ||
std::unordered_map< std::string, double > & | initial_value_dict, | ||
MeshLib::PropertyVector< T > & | new_pv ) |
Definition at line 38 of file MergeMeshToBulkMesh.cpp.
References MeshLib::PropertyVector< T >::size().
Referenced by createIntegrationPointProperties(), and createNodeProperties().
|
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 MeshToolsLib::MeshValidation::detectHoles().
void MeshToolsLib::zeroMeshFieldDataByMaterialIDs | ( | MeshLib::Mesh & | mesh, |
std::vector< int > const & | selected_material_ids ) |
Definition at line 24 of file ZeroMeshFieldDataByMaterialIDs.cpp.
References MeshLib::Mesh::getElements(), getIntegrationPointDataOffsetsOfMeshElements(), MeshLib::Mesh::getProperties(), MeshLib::IntegrationPoint, and OGS_FATAL.
Referenced by anonymous_namespace{ProjectData.cpp}::readMeshes().