OGS
MeshLib::Mesh Class Reference

Detailed Description

A basic mesh.

Definition at line 42 of file Mesh.h.

#include <Mesh.h>

Inheritance diagram for MeshLib::Mesh:
[legend]
Collaboration diagram for MeshLib::Mesh:
[legend]

Public Member Functions

 Mesh (std::string name, std::vector< Node * > nodes, std::vector< Element * > elements, bool const compute_element_neighbors=false, Properties const &properties=Properties())
 
 Mesh (const Mesh &mesh)
 Copy constructor.
 
 Mesh (Mesh &&mesh)
 
Meshoperator= (const Mesh &mesh)=delete
 
Meshoperator= (Mesh &&mesh)=delete
 
virtual ~Mesh ()
 Destructor.
 
void shallowClean ()
 
void addElement (Element *elem)
 Add an element to the mesh.
 
unsigned getDimension () const
 Returns the dimension of the mesh (determined by the maximum dimension over all elements).
 
const NodegetNode (std::size_t idx) const
 Get the node with the given index.
 
const ElementgetElement (std::size_t idx) const
 Get the element with the given index.
 
std::size_t getNumberOfElements () const
 Get the number of elements.
 
std::size_t getNumberOfNodes () const
 Get the number of nodes.
 
const std::string getName () const
 Get name of the mesh.
 
std::vector< Node * > const & getNodes () const
 Get the nodes-vector for the mesh.
 
std::vector< Element * > const & getElements () const
 Get the element-vector for the mesh.
 
void resetElementIDs ()
 Resets the IDs of all mesh-elements to their position in the element vector.
 
void resetNodeIDs ()
 Resets the IDs of all mesh-nodes to their position in the node vector.
 
void setName (const std::string &name)
 Changes the name of the mesh.
 
std::size_t getID () const
 Get id of the mesh.
 
std::size_t computeNumberOfBaseNodes () const
 Get the number of base nodes.
 
bool hasNonlinearElement () const
 Check if the mesh contains any nonlinear element.
 
std::vector< Element const * > const & getElementsConnectedToNode (std::size_t node_id) const
 
std::vector< Element const * > const & getElementsConnectedToNode (Node const &node) const
 
PropertiesgetProperties ()
 
Properties const & getProperties () const
 
bool isAxiallySymmetric () const
 
void setAxiallySymmetric (bool is_axial_symmetric)
 

Protected Member Functions

void calcEdgeLengthRange ()
 Set the minimum and maximum length over the edges of the mesh.
 
void setDimension ()
 Sets the dimension of the mesh.
 
void setElementNeighbors ()
 

Protected Attributes

std::size_t const _id
 
unsigned _mesh_dimension
 
std::pair< double, double > _node_distance
 The minimal and maximal distance of nodes within an element over all elements in the mesh.
 
std::string _name
 
std::vector< Node * > _nodes
 
std::vector< Element * > _elements
 
Properties _properties
 
std::vector< std::vector< Element const * > > _elements_connected_to_nodes
 
bool _is_axially_symmetric = false
 
bool const _compute_element_neighbors
 

Friends

class ApplicationUtils::NodeWiseMeshPartitioner
 
void removeMeshNodes (Mesh &mesh, const std::vector< std::size_t > &nodes)
 

Constructor & Destructor Documentation

◆ Mesh() [1/3]

MeshLib::Mesh::Mesh ( std::string name,
std::vector< Node * > nodes,
std::vector< Element * > elements,
bool const compute_element_neighbors = false,
Properties const & properties = Properties() )

Constructor using a mesh name and an array of nodes and elements

Parameters
nameMesh name.
nodesA vector of mesh nodes.
elementsAn array of mesh elements.
compute_element_neighborsswitch to compute element neighbors or not
propertiesMesh properties.

Definition at line 62 of file Mesh.cpp.

71 _node_distance(std::numeric_limits<double>::max(), 0),
72 _name(std::move(name)),
73 _nodes(std::move(nodes)),
74 _elements(std::move(elements)),
75 _properties(properties),
76 _compute_element_neighbors(compute_element_neighbors)
77{
78 this->resetNodeIDs();
79 this->resetElementIDs();
80 this->setDimension();
81
83
85 {
86 this->setElementNeighbors();
87 }
88}
static std::size_t global_mesh_counter
Mesh counter used to uniquely identify meshes by id.
Definition Mesh.cpp:39
Properties _properties
Definition Mesh.h:160
std::size_t const _id
Definition Mesh.h:153
bool const _compute_element_neighbors
Definition Mesh.h:165
std::vector< std::vector< Element const * > > _elements_connected_to_nodes
Definition Mesh.h:162
unsigned _mesh_dimension
Definition Mesh.h:154
std::string _name
Definition Mesh.h:157
void resetNodeIDs()
Resets the IDs of all mesh-nodes to their position in the node vector.
Definition Mesh.cpp:159
std::vector< Element * > _elements
Definition Mesh.h:159
void setDimension()
Sets the dimension of the mesh.
Definition Mesh.cpp:177
void resetElementIDs()
Resets the IDs of all mesh-elements to their position in the element vector.
Definition Mesh.cpp:168
void setElementNeighbors()
Definition Mesh.cpp:204
std::pair< double, double > _node_distance
The minimal and maximal distance of nodes within an element over all elements in the mesh.
Definition Mesh.h:156
std::vector< Node * > _nodes
Definition Mesh.h:158
std::vector< std::vector< Element const * > > findElementsConnectedToNodes(Mesh const &mesh)
Definition Mesh.cpp:45

References _compute_element_neighbors, _elements_connected_to_nodes, MeshLib::findElementsConnectedToNodes(), resetElementIDs(), resetNodeIDs(), setDimension(), and setElementNeighbors().

◆ Mesh() [2/3]

MeshLib::Mesh::Mesh ( const Mesh & mesh)

Copy constructor.

Definition at line 90 of file Mesh.cpp.

92 _mesh_dimension(mesh.getDimension()),
93 _node_distance(mesh._node_distance.first, mesh._node_distance.second),
94 _name(mesh.getName()),
95 _nodes(mesh.getNumberOfNodes()),
96 _elements(mesh.getNumberOfElements()),
97 _properties(mesh._properties),
98 _compute_element_neighbors(mesh._compute_element_neighbors)
99{
100 const std::vector<Node*>& nodes(mesh.getNodes());
101 const std::size_t nNodes(nodes.size());
102 for (unsigned i = 0; i < nNodes; ++i)
103 {
104 _nodes[i] = new Node(*nodes[i]);
105 }
106
107 const std::vector<Element*>& elements(mesh.getElements());
108 const std::size_t nElements(elements.size());
109 for (unsigned i = 0; i < nElements; ++i)
110 {
111 _elements[i] = elements[i]->clone();
112 for (auto const& [j, node_id] :
113 elements[i]->nodes() | views::ids | ranges::views::enumerate)
114 {
115 _elements[i]->setNode(static_cast<unsigned>(j), _nodes[node_id]);
116 }
117 }
118
119 if (_mesh_dimension == 0)
120 {
121 this->setDimension();
122 }
123
126 {
127 this->setElementNeighbors();
128 }
129}
constexpr ranges::views::view_closure ids
For an element of a range view return its id.
Definition Mesh.h:225

References _compute_element_neighbors, _elements, _elements_connected_to_nodes, _mesh_dimension, _nodes, MeshLib::findElementsConnectedToNodes(), getElements(), getNodes(), MeshLib::views::ids, MeshLib::Node, setDimension(), and setElementNeighbors().

◆ Mesh() [3/3]

MeshLib::Mesh::Mesh ( Mesh && mesh)
default

◆ ~Mesh()

MeshLib::Mesh::~Mesh ( )
virtual

Destructor.

Definition at line 139 of file Mesh.cpp.

140{
141 const std::size_t nElements(_elements.size());
142 for (std::size_t i = 0; i < nElements; ++i)
143 {
144 delete _elements[i];
145 }
146
147 const std::size_t nNodes(_nodes.size());
148 for (std::size_t i = 0; i < nNodes; ++i)
149 {
150 delete _nodes[i];
151 }
152}

References _elements, and _nodes.

Member Function Documentation

◆ addElement()

void MeshLib::Mesh::addElement ( Element * elem)

Add an element to the mesh.

Definition at line 154 of file Mesh.cpp.

155{
156 _elements.push_back(elem);
157}

References _elements.

◆ calcEdgeLengthRange()

void MeshLib::Mesh::calcEdgeLengthRange ( )
protected

Set the minimum and maximum length over the edges of the mesh.

◆ computeNumberOfBaseNodes()

std::size_t MeshLib::Mesh::computeNumberOfBaseNodes ( ) const

Get the number of base nodes.

Definition at line 238 of file Mesh.cpp.

239{
240 return std::count_if(begin(_nodes), end(_nodes),
241 [this](auto const* const node) {
242 return isBaseNode(
243 *node,
244 _elements_connected_to_nodes[node->getID()]);
245 });
246}
bool isBaseNode(Node const &node, std::vector< Element const * > const &elements_connected_to_node)
Definition Mesh.cpp:346

References _elements_connected_to_nodes, _nodes, and MeshLib::isBaseNode().

Referenced by MeshGeoToolsLib::MeshNodesAlongPolyline::MeshNodesAlongPolyline(), MeshGeoToolsLib::MeshNodesAlongSurface::MeshNodesAlongSurface(), MeshLib::computeNumberOfRegularBaseNodesAtRank(), MeshLib::computeNumberOfRegularHigherOrderNodesAtRank(), and ApplicationUtils::setNumberOfNodesInPartitions().

◆ getDimension()

unsigned MeshLib::Mesh::getDimension ( ) const
inline

Returns the dimension of the mesh (determined by the maximum dimension over all elements).

Definition at line 88 of file Mesh.h.

88{ return _mesh_dimension; }

References _mesh_dimension.

Referenced by ProcessLib::ConstraintDirichletBoundaryCondition::ConstraintDirichletBoundaryCondition(), ProcessLib::PhaseField::PhaseFieldProcess< DisplacementDim >::PhaseFieldProcess(), ProcessLib::LIE::PostProcessTool::PostProcessTool(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalProcess< DisplacementDim >::SmallDeformationNonlocalProcess(), ProcessLib::SurfaceFlux::SurfaceFlux(), ProcessLib::TES::TESProcess::TESProcess(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::ThermoHydroMechanicsProcess(), ProcessLib::ThermoMechanics::ThermoMechanicsProcess< DisplacementDim >::ThermoMechanicsProcess(), MeshToolsLib::MeshGenerator::AddFaultToVoxelGrid::addFaultToVoxelGrid(), MeshToolsLib::addLayerToMesh(), MeshGeoToolsLib::GeoMapper::advancedMapOnMesh(), MeshToolsLib::ElementSizeMetric::calc2dOr3dQuality(), MeshToolsLib::ElementSizeMetric::calculateQuality(), MeshToolsLib::SizeDifferenceMetric::calculateQuality(), MeshToolsLib::RasterDataToMesh::checkMesh(), MeshView::contextMenuEvent(), MeshToolsLib::convertMeshToGeo(), ProcessLib::createBoundaryCondition(), MeshToolsLib::createBoundaryElements(), ProcessLib::ComponentTransport::createComponentTransportProcess(), ProcessLib::createConstraintDirichletBoundaryCondition(), ProcessLib::createDirichletBoundaryCondition(), ProcessLib::createDirichletBoundaryConditionWithinTimeInterval(), MeshToolsLib::createFlippedMesh(), ProcessLib::createHCNonAdvectiveFreeComponentFlowBoundaryCondition(), ProcessLib::HT::createHTProcess(), LayeredMeshGenerator::createLayers(), ProcessLib::LiquidFlow::createLiquidFlowProcess(), ProcessLib::createNeumannBoundaryCondition(), ProcessLib::createPrimaryVariableConstraintDirichletBoundaryCondition(), ProcessLib::createPythonBoundaryCondition(), ProcessLib::createPythonSourceTerm(), LayeredVolume::createRasterLayers(), MeshToolsLib::MeshLayerMapper::createRasterLayers(), ProcessLib::RichardsComponentTransport::createRichardsComponentTransportProcess(), ProcessLib::createRobinBoundaryCondition(), ProcessLib::createSolutionDependentDirichletBoundaryCondition(), ProcessLib::createSourceTerm(), MeshToolsLib::MeshLayerMapper::createStaticLayers(), ProcessLib::ThermoRichardsFlow::createThermoRichardsFlowProcess(), ProcessLib::createVariableDependentNeumannBoundaryCondition(), ProcessLib::createWellboreCompensateNeumannBoundaryCondition(), ProcessLib::WellboreSimulator::createWellboreSimulatorProcess(), MeshToolsLib::MeshValidation::detectHoles(), ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::findFracutreIntersections(), MeshToolsLib::BoundaryExtraction::getBoundaryElementsAsMesh(), ProcessLib::LIE::getFractureMatrixDataInMesh(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), ProcessLib::HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::getOrientedSurfaceNormal(), MeshToolsLib::MeshSurfaceExtraction::getSurfaceAreaForNodes(), getSurfaceIntegratedValuesForNodes(), MeshToolsLib::MeshSurfaceExtraction::getSurfaceNodes(), ProcessLib::HeatTransportBHE::HeatTransportBHEProcess::initializeConcreteProcess(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::initializeConcreteProcess(), ProcessLib::RichardsComponentTransport::RichardsComponentTransportProcess::initializeConcreteProcess(), ProcessLib::RichardsFlow::RichardsFlowProcess::initializeConcreteProcess(), ProcessLib::SteadyStateDiffusion::SteadyStateDiffusion::initializeConcreteProcess(), ProcessLib::TES::TESProcess::initializeConcreteProcess(), ProcessLib::ThermalTwoPhaseFlowWithPP::ThermalTwoPhaseFlowWithPPProcess::initializeConcreteProcess(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowProcess::initializeConcreteProcess(), ProcessLib::TwoPhaseFlowWithPP::TwoPhaseFlowWithPPProcess::initializeConcreteProcess(), ProcessLib::TwoPhaseFlowWithPrho::TwoPhaseFlowWithPrhoProcess::initializeConcreteProcess(), ProcessLib::TES::TESProcess::initializeSecondaryVariables(), MeshLib::is2DMeshOnRotatedVerticalPlane(), MeshToolsLib::MeshLayerMapper::layerMapping(), MeshGeoToolsLib::GeoMapper::mapOnMesh(), MeshToolsLib::MeshLayerMapper::mapToStaticValue(), MeshLib::NodeSearch::searchBoundaryNodes(), setDimension(), MeshToolsLib::Mesh2MeshPropertyInterpolation::setPropertiesForMesh(), testIfMeshesAreEqual(), FileIO::SHPInterface::write2dMeshToSHP(), and FileIO::TetGenInterface::writeTetGenSmesh().

◆ getElement()

◆ getElements()

std::vector< Element * > const & MeshLib::Mesh::getElements ( ) const
inline

Get the element-vector for the mesh.

Definition at line 109 of file Mesh.h.

109{ return _elements; }

References _elements.

Referenced by ProcessLib::ConstraintDirichletBoundaryCondition::ConstraintDirichletBoundaryCondition(), MeshLib::ElementStatus::ElementStatus(), MeshGeoToolsLib::HeuristicSearchLength::HeuristicSearchLength(), Mesh(), ProcessLib::LIE::PostProcessTool::PostProcessTool(), ProcessLib::PythonBoundaryCondition::PythonBoundaryCondition(), ProcessLib::SourceTerms::Python::PythonSourceTerm::PythonSourceTerm(), ProcessLib::SurfaceFlux::SurfaceFlux(), ProcessLib::VolumetricSourceTerm::VolumetricSourceTerm(), LayeredVolume::addLayerBoundaries(), LayeredVolume::addLayerToMesh(), MeshToolsLib::addLayerToMesh(), MeshToolsLib::MeshLayerMapper::addLayerToMesh(), MeshModel::addMeshObject(), MeshGeoToolsLib::appendLinesAlongPolylines(), MeshToolsLib::ElementSizeMetric::calc1dQuality(), MeshToolsLib::ElementSizeMetric::calc2dOr3dQuality(), MeshToolsLib::AngleSkewMetric::calculateQuality(), MeshToolsLib::EdgeRatioMetric::calculateQuality(), MeshToolsLib::RadiusEdgeRatioMetric::calculateQuality(), MeshToolsLib::SizeDifferenceMetric::calculateQuality(), MaterialPropertyLib::checkMaterialSpatialDistributionMap(), MaterialPropertyLib::checkMPLPhasesForSinglePhaseFlow(), ProcessLib::ComponentTransport::checkMPLProperties(), ProcessLib::RichardsComponentTransport::anonymous_namespace{CreateRichardsComponentTransportProcess.cpp}::checkMPLProperties(), ProcessLib::StokesFlow::anonymous_namespace{CreateStokesFlowProcess.cpp}::checkMPLProperties(), computePointCloudNodes(), ProcessLib::HeatTransportBHE::HeatTransportBHEProcess::constructDofTable(), MeshToolsLib::convertMeshToGeo(), MeshToolsLib::convertToLinearMesh(), ProcessLib::createAnchorTerm(), MeshToolsLib::createBoundaryElements(), ProcessLib::ComponentTransport::createComponentTransportProcess(), ProcessLib::createDeactivatedSubdomainMesh(), MeshToolsLib::createFlippedMesh(), ProcessLib::HT::createHTProcess(), ProcessLib::LIE::HydroMechanics::createHydroMechanicsProcess(), ProcessLib::LiquidFlow::createLiquidFlowProcess(), NumLib::createNumericalStabilization(), createPropertyVector(), MeshToolsLib::createQuadraticOrderMesh(), ParameterLib::createRandomFieldMeshElementParameter(), MeshToolsLib::MeshLayerMapper::createRasterLayers(), MeshToolsLib::MeshLayerMapper::createStaticLayers(), ApplicationUtils::distributeElementsIntoPartitions(), MeshLib::MeshSubset::elementsBegin(), MeshLib::MeshSubset::elementsEnd(), extractBoundaries(), extractBoundaryMeshes(), MeshLib::findElementsConnectedToNodes(), MeshLib::ElementStatus::getActiveElements(), ProcessLib::HeatTransportBHE::getBHEDataInMesh(), OGSMesh::getCells(), ProcessLib::ConstraintDirichletBoundaryCondition::getEssentialBCValues(), ProcessLib::LIE::getFractureMatrixDataInMesh(), MeshLib::getMeshElementsForMaterialIDs(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), MeshToolsLib::MeshInformation::getNumberOfElementTypes(), MeshToolsLib::MeshSurfaceExtraction::getSurfaceNodes(), MeshLib::IO::getTopologyType(), anonymous_namespace{IdentifySubdomainMesh.cpp}::identifySubdomainMeshElements(), ProcessLib::ComponentTransport::ComponentTransportProcess::initializeConcreteProcess(), ProcessLib::HeatConduction::HeatConductionProcess::initializeConcreteProcess(), ProcessLib::HeatTransportBHE::HeatTransportBHEProcess::initializeConcreteProcess(), ProcessLib::HT::HTProcess::initializeConcreteProcess(), ProcessLib::HydroMechanics::HydroMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::LargeDeformation::LargeDeformationProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::initializeConcreteProcess(), ProcessLib::LIE::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::LiquidFlow::LiquidFlowProcess::initializeConcreteProcess(), ProcessLib::PhaseField::PhaseFieldProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::RichardsComponentTransport::RichardsComponentTransportProcess::initializeConcreteProcess(), ProcessLib::RichardsFlow::RichardsFlowProcess::initializeConcreteProcess(), ProcessLib::RichardsMechanics::RichardsMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::SteadyStateDiffusion::SteadyStateDiffusion::initializeConcreteProcess(), ProcessLib::StokesFlow::StokesFlowProcess< GlobalDim >::initializeConcreteProcess(), ProcessLib::TES::TESProcess::initializeConcreteProcess(), ProcessLib::TH2M::TH2MProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermalTwoPhaseFlowWithPP::ThermalTwoPhaseFlowWithPPProcess::initializeConcreteProcess(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoMechanics::ThermoMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowProcess::initializeConcreteProcess(), ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsProcess< DisplacementDim, ConstitutiveTraits >::initializeConcreteProcess(), ProcessLib::TwoPhaseFlowWithPP::TwoPhaseFlowWithPPProcess::initializeConcreteProcess(), ProcessLib::TwoPhaseFlowWithPrho::TwoPhaseFlowWithPrhoProcess::initializeConcreteProcess(), ProcessLib::WellboreSimulator::WellboreSimulatorProcess::initializeConcreteProcess(), MeshToolsLib::Mesh2MeshPropertyInterpolation::interpolatePropertiesForMesh(), MeshLib::is2DMeshOnRotatedVerticalPlane(), MeshToolsLib::MeshGenerator::AddFaultToVoxelGrid::isVoxelGrid(), main(), ApplicationUtils::markDuplicateGhostCells(), anonymous_namespace{AddFaultToVoxelGrid.cpp}::markFaults(), ApplicationUtils::partitionMesh(), ProcessLib::ConstraintDirichletBoundaryCondition::preTimestep(), MeshToolsLib::RasterDataToMesh::projectToElements(), MeshToolsLib::removeElements(), removeLineElements(), MeshToolsLib::removeNodes(), reorderNonlinearNodes(), MeshLib::VtkMappedMeshSource::RequestData(), MeshGeoToolsLib::resetMeshElementProperty(), MeshLib::NodeSearch::searchBoundaryNodes(), MeshLib::ElementSearch::searchByBoundingBox(), MeshLib::ElementSearch::searchByContent(), MeshLib::ElementSearch::searchByElementType(), MeshToolsLib::ElementValueModification::setByElementType(), setMaterialIDs(), ElementTreeModel::setMesh(), MeshToolsLib::MeshRevision::simplifyMesh(), MeshLib::MeshElementGrid::sortElementsInGridCells(), MeshToolsLib::MeshValidation::testElementGeometry(), MeshLib::transformMeshToNodePartitionedMesh(), MeshLib::IO::transformToXDMFTopology(), MeshLib::IO::Legacy::MeshIO::write(), FileIO::TetGenInterface::write2dElements(), FileIO::SHPInterface::write2dMeshToSHP(), FileIO::TetGenInterface::write3dElements(), and MeshToolsLib::zeroMeshFieldDataByMaterialIDs().

◆ getElementsConnectedToNode() [1/2]

std::vector< MeshLib::Element const * > const & MeshLib::Mesh::getElementsConnectedToNode ( Node const & node) const

Definition at line 262 of file Mesh.cpp.

264{
265 return _elements_connected_to_nodes[node.getID()];
266}

References _elements_connected_to_nodes, and MathLib::Point3dWithID::getID().

◆ getElementsConnectedToNode() [2/2]

std::vector< MeshLib::Element const * > const & MeshLib::Mesh::getElementsConnectedToNode ( std::size_t node_id) const

◆ getID()

◆ getName()

const std::string MeshLib::Mesh::getName ( ) const
inline

Get name of the mesh.

Definition at line 103 of file Mesh.h.

103{ return _name; }

References _name.

Referenced by MeshGeoToolsLib::HeuristicSearchLength::HeuristicSearchLength(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::HydroMechanicsProcess(), MeshGeoToolsLib::MeshNodeSearcher::MeshNodeSearcher(), ProcessLib::LIE::PostProcessTool::PostProcessTool(), SaveMeshDialog::SaveMeshDialog(), ProcessLib::SolutionDependentDirichletBoundaryCondition::SolutionDependentDirichletBoundaryCondition(), ProcessLib::addBulkMeshPropertyToSubMesh(), MeshToolsLib::addLayerToMesh(), MeshModel::addMeshObject(), VtkVisPipeline::addPipelineItem(), addPrimaryVariablesToMesh(), ProcessLib::Output::addProcess(), MeshGeoToolsLib::appendLinesAlongPolylines(), anonymous_namespace{SubmeshResiduumOutputConfig.cpp}::checkBulkIDMappingsPresent(), anonymous_namespace{SubmeshResiduumOutputConfig.cpp}::checkNonOverlappingCover(), ProcessLib::checkParametersOfDirichletBoundaryCondition(), MeshLib::computeGhostBaseNodeGlobalNodeIDsOfSubDomainPartition(), anonymous_namespace{SubmeshResiduumOutputConfig.cpp}::computeNonOverlappingBulkMeshCoverBySubmeshes(), MeshLib::computeNumberOfRegularNodes(), MeshLib::computeRegularBaseNodeGlobalNodeIDsOfSubDomainPartition(), MeshGeoToolsLib::constructAdditionalMeshesFromGeometries(), anonymous_namespace{convertMeshToGeo.cpp}::convertMeshNodesToGeoPoints(), MeshToolsLib::convertMeshToGeo(), MeshToolsLib::convertSurfaceToMesh(), ProcessLib::createHCNonAdvectiveFreeComponentFlowBoundaryCondition(), ProcessLib::HydroMechanics::createHydroMechanicsProcess(), ProcessLib::createNeumannBoundaryCondition(), MeshToolsLib::createQuadraticOrderMesh(), ProcessLib::createRobinBoundaryCondition(), ProcessLib::createSourceTerm(), ProcessLib::createVariableDependentNeumannBoundaryCondition(), ProcessLib::createWellboreCompensateNeumannBoundaryCondition(), ProcessLib::Output::doOutputAlways(), ProcessLib::Output::doOutputNonlinearIteration(), MeshView::exportToShapefile(), MeshToolsLib::BoundaryExtraction::getBoundaryElementsAsMesh(), MeshGeoToolsLib::MeshNodeSearcher::getMeshNodeIDs(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), MeshLib::getNumberOfGlobalNodes(), NumLib::MeshComponentMap::getSubset(), MeshLib::is2DMeshOnRotatedVerticalPlane(), ParameterLib::isDefinedOnSameMesh(), main(), SaveMeshDialog::on_selectDirButton_clicked(), MeshView::openRasterDataToMeshDialog(), outputAABB(), ProcessLib::outputMeshVtk(), parseOutputMeshConfig(), ElementTreeModel::setMesh(), MeshLib::transformMeshToNodePartitionedMesh(), anonymous_namespace{IdentifySubdomainMesh.cpp}::updateOrCheckExistingSubdomainProperty(), MeshLib::vtkStandardNewMacro(), FileIO::SHPInterface::write2dMeshToSHP(), MeshToolsLib::ElementQualityInterface::writeHistogram(), and MeshLib::IO::VtuInterface::writeVTU().

◆ getNode()

◆ getNodes()

std::vector< Node * > const & MeshLib::Mesh::getNodes ( ) const
inline

Get the nodes-vector for the mesh.

Definition at line 106 of file Mesh.h.

106{ return _nodes; }

References _nodes.

Referenced by MeshGeoToolsLib::BoundaryElementsAtPoint::BoundaryElementsAtPoint(), ProcessLib::ConstraintDirichletBoundaryCondition::ConstraintDirichletBoundaryCondition(), ProcessLib::DirichletBoundaryCondition::DirichletBoundaryCondition(), MeshLib::ElementStatus::ElementStatus(), Mesh(), MeshGeoToolsLib::MeshNodesAlongPolyline::MeshNodesAlongPolyline(), MeshGeoToolsLib::MeshNodesAlongSurface::MeshNodesAlongSurface(), MeshLib::MeshSubset::MeshSubset(), MeshLib::NodeAdjacencyTable::NodeAdjacencyTable(), ProcessLib::LIE::PostProcessTool::PostProcessTool(), ProcessLib::PrimaryVariableConstraintDirichletBoundaryCondition::PrimaryVariableConstraintDirichletBoundaryCondition(), ProcessLib::PythonBoundaryCondition::PythonBoundaryCondition(), ProcessLib::SolutionDependentDirichletBoundaryCondition::SolutionDependentDirichletBoundaryCondition(), ProcessLib::SurfaceFlux::SurfaceFlux(), LayeredVolume::addLayerToMesh(), MeshToolsLib::addLayerToMesh(), MeshToolsLib::MeshLayerMapper::addLayerToMesh(), adjustExtent(), MeshGeoToolsLib::appendLinesAlongPolylines(), MeshLib::calculateNodesConnectedByElements(), ProcessLib::checkParametersOfDirichletBoundaryCondition(), MeshToolsLib::MeshRevision::collapseNodeIndices(), MeshLib::computeGhostBaseNodeGlobalNodeIDsOfSubDomainPartition(), MeshLib::computeNumberOfRegularNodes(), MeshLib::computeRegularBaseNodeGlobalNodeIDsOfSubDomainPartition(), ProcessLib::DeactivatedSubdomainDirichlet::config(), ProcessLib::DirichletBoundaryConditionWithinTimeInterval::config(), ProcessLib::HeatTransportBHE::HeatTransportBHEProcess::constructDofTable(), ProcessLib::Process::constructDofTableOfSpecifiedProcessStaggeredScheme(), ProcessLib::Process::constructMonolithicProcessDofTable(), MeshToolsLib::MeshRevision::constructNewNodesArray(), anonymous_namespace{convertMeshToGeo.cpp}::convertMeshNodesToGeoPoints(), MeshToolsLib::convertToLinearMesh(), ProcessLib::ComponentTransport::createComponentTransportProcess(), MeshToolsLib::createFlippedMesh(), ProcessLib::HeatConduction::createHeatConductionProcess(), ProcessLib::HT::createHTProcess(), ProcessLib::LiquidFlow::createLiquidFlowProcess(), createMeshFromElements(), MeshToolsLib::createQuadraticOrderMesh(), ProcessLib::createSourceTerm(), MeshToolsLib::MeshLayerMapper::createStaticLayers(), MeshLib::NodeAdjacencyTable::createTable(), ProcessLib::createVariableDependentNeumannBoundaryCondition(), ProcessLib::createWellboreCompensateNeumannBoundaryCondition(), ApplicationUtils::determineAndAppendGhostNodesToPartitions(), ProcessLib::extractInnerAndOuterNodes(), MeshLib::findElementsConnectedToNodes(), MeshLib::ElementStatus::getActiveNodes(), MeshToolsLib::MeshInformation::getBoundingBox(), ProcessLib::PrimaryVariableConstraintDirichletBoundaryCondition::getEssentialBCValues(), ProcessLib::PythonBoundaryCondition::getEssentialBCValues(), ProcessLib::getEssentialBCValuesLocal(), getMeshExtent(), MeshGeoToolsLib::MeshNodeSearcher::getMeshNodeIDs(), MeshLib::getNumberOfGlobalNodes(), OGSMesh::getPointCoordinates(), MeshToolsLib::MeshSurfaceExtraction::getSurfaceAreaForNodes(), getSurfaceIntegratedValuesForNodes(), anonymous_namespace{IdentifySubdomainMesh.cpp}::identifySubdomainMeshElements(), anonymous_namespace{IdentifySubdomainMesh.cpp}::identifySubdomainMeshNodes(), ProcessLib::NodalSourceTerm::integrate(), MeshToolsLib::Mesh2MeshPropertyInterpolation::interpolateElementPropertiesToNodeProperties(), MeshToolsLib::Mesh2MeshPropertyInterpolation::interpolatePropertiesForMesh(), MeshToolsLib::MeshLayerMapper::layerMapping(), MeshGeoToolsLib::GeoMapper::mapOnMesh(), MeshGeoToolsLib::GeoMapper::mapPointDataToMeshSurface(), MeshGeoToolsLib::GeoMapper::mapStationData(), MeshToolsLib::MeshLayerMapper::mapToStaticValue(), anonymous_namespace{AddFaultToVoxelGrid.cpp}::markFaults(), TranslateDataDialog::moveMesh(), ApplicationUtils::partitionMesh(), ProcessLib::SolutionDependentDirichletBoundaryCondition::postTimestep(), ProcessLib::PhaseFieldIrreversibleDamageOracleBoundaryCondition::preTimestep(), MeshToolsLib::RasterDataToMesh::projectToNodes(), MeshToolsLib::removeElements(), MeshToolsLib::removeNodes(), reorderNonlinearNodes(), MeshLib::VtkMappedMeshSource::RequestData(), MeshGeoToolsLib::resetMeshElementProperty(), rotateMesh(), MeshLib::NodeSearch::searchBoundaryNodes(), MeshLib::NodeSearch::searchUnused(), swapNodeCoordinateAxes(), MeshLib::IO::transformGeometry(), MeshLib::IO::transformToXDMFGeometry(), Layers2GridDialog::updateExpectedVoxel(), and FileIO::TetGenInterface::writeTetGenSmesh().

◆ getNumberOfElements()

std::size_t MeshLib::Mesh::getNumberOfElements ( ) const
inline

Get the number of elements.

Definition at line 97 of file Mesh.h.

97{ return _elements.size(); }

References _elements.

Referenced by MeshToolsLib::ElementQualityMetric::ElementQualityMetric(), MeshLib::ElementStatus::ElementStatus(), MeshGeoToolsLib::HeuristicSearchLength::HeuristicSearchLength(), ProcessLib::LIE::SmallDeformation::SmallDeformationProcess< DisplacementDim >::SmallDeformationProcess(), CreateStructuredGridDialog::accept(), addIntegrationPointData(), MeshToolsLib::addLayerToMesh(), MeshToolsLib::MeshLayerMapper::addLayerToMesh(), MeshLib::addPropertyToMesh(), FileIO::SwmmInterface::addResultsToMesh(), addSecondaryVariableResiduals(), MeshGeoToolsLib::appendLinesAlongPolylines(), MeshToolsLib::EdgeRatioMetric::calculateQuality(), MeshToolsLib::RadiusEdgeRatioMetric::calculateQuality(), MeshToolsLib::SizeDifferenceMetric::calculateQuality(), anonymous_namespace{SubmeshResiduumOutputConfig.cpp}::checkMatchingElementCounts(), anonymous_namespace{SubmeshResiduumOutputConfig.cpp}::checkNonOverlappingCover(), anonymous_namespace{SubmeshResiduumOutputConfig.cpp}::computeNonOverlappingBulkMeshCoverBySubmeshes(), MeshToolsLib::convertMeshToGeo(), ProcessLib::createConstraintDirichletBoundaryCondition(), ProcessLib::createDirichletBoundaryCondition(), ProcessLib::createDirichletBoundaryConditionWithinTimeInterval(), ChemistryLib::PhreeqcIOData::createEquilibriumReactants(), MeshToolsLib::createFlippedMesh(), ProcessLib::createHCNonAdvectiveFreeComponentFlowBoundaryCondition(), ChemistryLib::PhreeqcIOData::createKineticReactants(), ProcessLib::createNeumannBoundaryCondition(), ProcessLib::createPrimaryVariableConstraintDirichletBoundaryCondition(), ProcessLib::createPythonBoundaryCondition(), ProcessLib::createPythonSourceTerm(), ProcessLib::createRobinBoundaryCondition(), MeshToolsLib::createSfcMeshProperties(), ProcessLib::createSolutionDependentDirichletBoundaryCondition(), MeshToolsLib::MeshLayerMapper::createStaticLayers(), ProcessLib::createVariableDependentNeumannBoundaryCondition(), MeshToolsLib::AngleSkewMetric::ElementQualityMetric(), ProcessLib::HeatTransportBHE::getBHEDataInMesh(), ProcessLib::LIE::getFractureMatrixDataInMesh(), MeshLib::getOrCreateMeshProperty(), anonymous_namespace{IdentifySubdomainMesh.cpp}::identifySubdomainMeshElements(), ProcessLib::HeatTransportBHE::HeatTransportBHEProcess::initializeConcreteProcess(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::initializeConcreteProcess(), ProcessLib::LIE::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess(), main(), anonymous_namespace{AddFaultToVoxelGrid.cpp}::markFaults(), MeshAnalysisDialog::on_startButton_pressed(), setMaterialIDs(), ElementTreeModel::setMesh(), MeshToolsLib::Mesh2MeshPropertyInterpolation::setPropertiesForMesh(), MeshToolsLib::MeshRevision::simplifyMesh(), MeshToolsLib::MeshValidation::testElementGeometry(), testIfMeshesAreEqual(), ProcessLib::ProcessVariable::updateDeactivatedSubdomains(), FileIO::SHPInterface::write2dMeshToSHP(), and FileIO::TetGenInterface::writeTetGenSmesh().

◆ getNumberOfNodes()

std::size_t MeshLib::Mesh::getNumberOfNodes ( ) const
inline

Get the number of nodes.

Definition at line 100 of file Mesh.h.

100{ return _nodes.size(); }

References _nodes.

Referenced by MeshLib::ElementStatus::ElementStatus(), MeshGeoToolsLib::MeshNodesAlongPolyline::MeshNodesAlongPolyline(), MeshGeoToolsLib::MeshNodesAlongSurface::MeshNodesAlongSurface(), ProcessLib::SolutionDependentDirichletBoundaryCondition::SolutionDependentDirichletBoundaryCondition(), LayeredVolume::addLayerBoundaries(), LayeredVolume::addLayerToMesh(), MeshToolsLib::MeshLayerMapper::addLayerToMesh(), MeshLib::addPropertyToMesh(), FileIO::SwmmInterface::addResultsToMesh(), addSecondaryVariableNodes(), MeshToolsLib::MeshRevision::collapseNodeIndices(), ProcessLib::TES::TESProcess::computeEquilibriumLoading(), MeshLib::computeNumberOfRegularHigherOrderNodesAtRank(), ProcessLib::TES::TESProcess::computeRelativeHumidity(), ProcessLib::TES::TESProcess::computeVapourPartialPressure(), anonymous_namespace{convertMeshToGeo.cpp}::convertMeshNodesToGeoPoints(), ProcessLib::LIE::PostProcessTool::copyPropertyValues(), ProcessLib::createConstraintDirichletBoundaryCondition(), ProcessLib::createDirichletBoundaryCondition(), ProcessLib::createDirichletBoundaryConditionWithinTimeInterval(), ProcessLib::createHCNonAdvectiveFreeComponentFlowBoundaryCondition(), ProcessLib::createNeumannBoundaryCondition(), NumLib::MeshComponentMap::createParallelMeshComponentMap(), ProcessLib::createPrimaryVariableConstraintDirichletBoundaryCondition(), ProcessLib::createPythonBoundaryCondition(), ProcessLib::createPythonSourceTerm(), MeshToolsLib::MeshLayerMapper::createRasterLayers(), ProcessLib::createRobinBoundaryCondition(), MeshToolsLib::createSfcMeshProperties(), ProcessLib::createSolutionDependentDirichletBoundaryCondition(), MeshToolsLib::MeshLayerMapper::createStaticLayers(), ProcessLib::createVariableDependentNeumannBoundaryCondition(), ProcessLib::extractInnerAndOuterNodes(), MeshToolsLib::BoundaryExtraction::getBoundaryElementsAsMesh(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), MeshLib::getOrCreateMeshProperty(), MeshToolsLib::MeshSurfaceExtraction::getSurfaceAreaForNodes(), MeshToolsLib::MeshSurfaceExtraction::getSurfaceNodes(), anonymous_namespace{IdentifySubdomainMesh.cpp}::identifySubdomainMeshElements(), anonymous_namespace{IdentifySubdomainMesh.cpp}::identifySubdomainMeshNodes(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::initializeConcreteProcess(), MeshToolsLib::Mesh2MeshPropertyInterpolation::interpolatePropertiesForMesh(), MeshToolsLib::MeshLayerMapper::layerMapping(), main(), MeshGeoToolsLib::GeoMapper::mapOnMesh(), MeshAnalysisDialog::on_startButton_pressed(), MeshLib::VtkMappedMeshSource::RequestInformation(), MeshLib::NodeSearch::searchNodesConnectedToOnlyGivenElements(), MeshLib::NodeSearch::searchUnused(), ElementTreeModel::setMesh(), ApplicationUtils::setNumberOfNodesInPartitions(), ProcessLib::ComponentTransport::ComponentTransportProcess::solveReactionEquation(), testIfMeshesAreEqual(), and MeshLib::IO::Legacy::MeshIO::write().

◆ getProperties() [1/2]

Properties & MeshLib::Mesh::getProperties ( )
inline

Definition at line 134 of file Mesh.h.

134{ return _properties; }

References _properties.

Referenced by MeshLib::ElementStatus::ElementStatus(), ProcessLib::LIE::PostProcessTool::PostProcessTool(), ProcessLib::LIE::SmallDeformation::SmallDeformationProcess< DisplacementDim >::SmallDeformationProcess(), ProcessLib::SolutionDependentDirichletBoundaryCondition::SolutionDependentDirichletBoundaryCondition(), ProcessLib::SurfaceFlux::SurfaceFlux(), CreateStructuredGridDialog::accept(), MeshElementRemovalDialog::accept(), ProcessLib::addBulkMeshPropertyToSubMesh(), MeshToolsLib::addLayerToMesh(), MeshLib::addPropertyToMesh(), MeshElementRemovalDialog::addScalarArrays(), MeshLib::bulkElementIDs(), MeshLib::bulkNodeIDs(), anonymous_namespace{SubmeshResiduumOutputConfig.cpp}::checkBulkIDMappingsPresent(), ProcessLib::checkParametersOfDirichletBoundaryCondition(), MeshToolsLib::ElementValueModification::condense(), MeshLib::VtkMeshConverter::convertScalarArrays(), MeshToolsLib::convertToLinearMesh(), MeshToolsLib::createFlippedMesh(), ParameterLib::createGroupBasedParameter(), ProcessLib::createHCNonAdvectiveFreeComponentFlowBoundaryCondition(), ParameterLib::createMeshElementParameter(), ParameterLib::createMeshNodeParameter(), MeshToolsLib::createQuadraticOrderMesh(), ParameterLib::createRandomFieldMeshElementParameter(), ProcessLib::createSourceTerm(), determineIntegrationOrder(), ProcessLib::extractElementsAlongOuterNodes(), extractMatGroup(), MeshToolsLib::BoundaryExtraction::getBoundaryElementsAsMesh(), ChemistryLib::ChemicalSolverInterface::getElementIDs(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), MeshLib::getOrCreateMeshProperty(), getSurfaceIntegratedValuesForNodes(), ProcessLib::HydroMechanics::HydroMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::LargeDeformation::LargeDeformationProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::PhaseField::PhaseFieldProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::RichardsMechanics::RichardsMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::TH2M::TH2MProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoMechanics::ThermoMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowProcess::initializeConcreteProcess(), ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsProcess< DisplacementDim, ConstitutiveTraits >::initializeConcreteProcess(), MeshToolsLib::Mesh2MeshPropertyInterpolation::interpolateElementPropertiesToNodeProperties(), MeshLib::IO::Legacy::MeshIO::loadMeshFromFile(), MeshToolsLib::MeshGenerator::VoxelGridFromMesh::mapArray(), MeshLib::materialIDs(), MeshElementRemovalDialog::on_scalarArrayComboBox_currentIndexChanged(), ApplicationUtils::NodeWiseMeshPartitioner::partitionOtherMesh(), ProcessLib::Output::prepareSubmesh(), MeshToolsLib::RasterDataToMesh::projectToElements(), MeshToolsLib::RasterDataToMesh::projectToNodes(), FileIO::GMSH::readGMSHMesh(), MeshToolsLib::removeElements(), MeshToolsLib::removeNodes(), MeshToolsLib::ElementValueModification::replace(), MeshLib::VtkMappedMeshSource::RequestData(), MeshGeoToolsLib::resetMeshElementProperty(), MeshLib::scaleMeshPropertyVector(), MeshLib::ElementSearch::searchByPropertyValueRange(), MeshToolsLib::ElementValueModification::setByElementType(), setMaterialIDs(), ElementTreeModel::setMesh(), MeshToolsLib::Mesh2MeshPropertyInterpolation::setPropertiesForMesh(), MeshToolsLib::MeshRevision::simplifyMesh(), MeshLib::IO::transformAttributes(), MeshLib::transformMeshToNodePartitionedMesh(), anonymous_namespace{IdentifySubdomainMesh.cpp}::updateOrCheckExistingSubdomainProperty(), MeshLib::IO::Legacy::MeshIO::write(), FileIO::TetGenInterface::write2dElements(), FileIO::SHPInterface::write2dMeshToSHP(), FileIO::TetGenInterface::write3dElements(), MeshToolsLib::MeshInformation::writePropertyVectorInformation(), MeshLib::IO::VtuInterface::writeVTU(), and MeshToolsLib::zeroMeshFieldDataByMaterialIDs().

◆ getProperties() [2/2]

Properties const & MeshLib::Mesh::getProperties ( ) const
inline

Definition at line 135 of file Mesh.h.

135{ return _properties; }

References _properties.

◆ hasNonlinearElement()

bool MeshLib::Mesh::hasNonlinearElement ( ) const

Check if the mesh contains any nonlinear element.

Definition at line 248 of file Mesh.cpp.

249{
250 return std::any_of(
251 std::begin(_elements), std::end(_elements),
252 [](Element const* const e)
253 { return e->getNumberOfNodes() != e->getNumberOfBaseNodes(); });
254}

References _elements, MeshLib::Element::getNumberOfBaseNodes(), and MeshLib::Element::getNumberOfNodes().

◆ isAxiallySymmetric()

bool MeshLib::Mesh::isAxiallySymmetric ( ) const
inline

Definition at line 137 of file Mesh.h.

137{ return _is_axially_symmetric; }
bool _is_axially_symmetric
Definition Mesh.h:164

References _is_axially_symmetric.

Referenced by ProcessLib::ConstraintDirichletBoundaryCondition::ConstraintDirichletBoundaryCondition(), ProcessLib::PythonBoundaryCondition::PythonBoundaryCondition(), ProcessLib::SourceTerms::Python::PythonSourceTerm::PythonSourceTerm(), ProcessLib::SurfaceFlux::SurfaceFlux(), ProcessLib::VolumetricSourceTerm::VolumetricSourceTerm(), MeshGeoToolsLib::constructAdditionalMeshesFromGeoObjects(), ProcessLib::createBoundaryCondition(), ProcessLib::HydroMechanics::createHydroMechanicsProcess(), ProcessLib::ComponentTransport::ComponentTransportProcess::initializeConcreteProcess(), ProcessLib::HeatConduction::HeatConductionProcess::initializeConcreteProcess(), ProcessLib::HeatTransportBHE::HeatTransportBHEProcess::initializeConcreteProcess(), ProcessLib::HT::HTProcess::initializeConcreteProcess(), ProcessLib::HydroMechanics::HydroMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::LargeDeformation::LargeDeformationProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::initializeConcreteProcess(), ProcessLib::LIE::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::LiquidFlow::LiquidFlowProcess::initializeConcreteProcess(), ProcessLib::PhaseField::PhaseFieldProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::RichardsComponentTransport::RichardsComponentTransportProcess::initializeConcreteProcess(), ProcessLib::RichardsFlow::RichardsFlowProcess::initializeConcreteProcess(), ProcessLib::RichardsMechanics::RichardsMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::SteadyStateDiffusion::SteadyStateDiffusion::initializeConcreteProcess(), ProcessLib::StokesFlow::StokesFlowProcess< GlobalDim >::initializeConcreteProcess(), ProcessLib::TES::TESProcess::initializeConcreteProcess(), ProcessLib::TH2M::TH2MProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermalTwoPhaseFlowWithPP::ThermalTwoPhaseFlowWithPPProcess::initializeConcreteProcess(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoMechanics::ThermoMechanicsProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowProcess::initializeConcreteProcess(), ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsProcess< DisplacementDim, ConstitutiveTraits >::initializeConcreteProcess(), ProcessLib::TwoPhaseFlowWithPP::TwoPhaseFlowWithPPProcess::initializeConcreteProcess(), ProcessLib::TwoPhaseFlowWithPrho::TwoPhaseFlowWithPrhoProcess::initializeConcreteProcess(), and ProcessLib::WellboreSimulator::WellboreSimulatorProcess::initializeConcreteProcess().

◆ operator=() [1/2]

Mesh & MeshLib::Mesh::operator= ( const Mesh & mesh)
delete

◆ operator=() [2/2]

Mesh & MeshLib::Mesh::operator= ( Mesh && mesh)
delete

◆ resetElementIDs()

void MeshLib::Mesh::resetElementIDs ( )

Resets the IDs of all mesh-elements to their position in the element vector.

Definition at line 168 of file Mesh.cpp.

169{
170 const std::size_t nElements(this->_elements.size());
171 for (unsigned i = 0; i < nElements; ++i)
172 {
173 _elements[i]->setID(i);
174 }
175}

References _elements.

Referenced by Mesh().

◆ resetNodeIDs()

void MeshLib::Mesh::resetNodeIDs ( )

Resets the IDs of all mesh-nodes to their position in the node vector.

Definition at line 159 of file Mesh.cpp.

160{
161 const std::size_t nNodes(_nodes.size());
162 for (std::size_t i = 0; i < nNodes; ++i)
163 {
164 _nodes[i]->setID(i);
165 }
166}

References _nodes.

Referenced by Mesh(), reorderNonlinearNodes(), and MeshToolsLib::MeshRevision::simplifyMesh().

◆ setAxiallySymmetric()

void MeshLib::Mesh::setAxiallySymmetric ( bool is_axial_symmetric)
inline

Definition at line 138 of file Mesh.h.

138 {
139 _is_axially_symmetric = is_axial_symmetric;
140 }

References _is_axially_symmetric.

◆ setDimension()

void MeshLib::Mesh::setDimension ( )
protected

Sets the dimension of the mesh.

Definition at line 177 of file Mesh.cpp.

178{
179 const std::size_t nElements(_elements.size());
180 for (unsigned i = 0; i < nElements; ++i)
181 {
183 {
184 _mesh_dimension = _elements[i]->getDimension();
185 }
186 }
187}
unsigned getDimension() const
Returns the dimension of the mesh (determined by the maximum dimension over all elements).
Definition Mesh.h:88

References _elements, _mesh_dimension, and getDimension().

Referenced by Mesh(), and Mesh().

◆ setElementNeighbors()

void MeshLib::Mesh::setElementNeighbors ( )
protected

Fills in the neighbor-information for elements. Note: Using this implementation, an element e can only have neighbors that have the same dimensionality as e.

Definition at line 204 of file Mesh.cpp.

205{
206 std::vector<Element const*> neighbors;
207 for (auto element : _elements)
208 {
209 // create vector with all elements connected to current element
210 // (includes lots of doubles!)
211 const std::size_t nNodes(element->getNumberOfBaseNodes());
212 for (unsigned n(0); n < nNodes; ++n)
213 {
214 auto const& conn_elems(
215 _elements_connected_to_nodes[element->getNode(n)->getID()]);
216 neighbors.insert(neighbors.end(), conn_elems.begin(),
217 conn_elems.end());
218 }
219 std::sort(neighbors.begin(), neighbors.end());
220 auto const neighbors_new_end =
221 std::unique(neighbors.begin(), neighbors.end());
222
223 for (auto neighbor = neighbors.begin(); neighbor != neighbors_new_end;
224 ++neighbor)
225 {
226 std::optional<unsigned> const opposite_face_id =
227 element->addNeighbor(const_cast<Element*>(*neighbor));
228 if (opposite_face_id)
229 {
230 const_cast<Element*>(*neighbor)->setNeighbor(element,
231 *opposite_face_id);
232 }
233 }
234 neighbors.clear();
235 }
236}

References _elements, _elements_connected_to_nodes, and MeshLib::Element::setNeighbor().

Referenced by Mesh(), and Mesh().

◆ setName()

void MeshLib::Mesh::setName ( const std::string & name)
inline

Changes the name of the mesh.

Definition at line 118 of file Mesh.h.

118{ this->_name = name; }

References _name.

Referenced by VtkVisPipelineView::convertVTKToOGSMesh().

◆ shallowClean()

void MeshLib::Mesh::shallowClean ( )

Only cleans vector members _nodes and _elements, and does not touch the pointer entries of the vectors. This function can only be called in the case that the pointers of _nodes and _elements are shared with other instances of this class and are deleted by them as well.

Definition at line 133 of file Mesh.cpp.

134{
135 _elements.clear();
136 _nodes.clear();
137}

References _elements, and _nodes.

Referenced by main().

Friends And Related Symbol Documentation

◆ ApplicationUtils::NodeWiseMeshPartitioner

Definition at line 48 of file Mesh.h.

◆ removeMeshNodes

void removeMeshNodes ( Mesh & mesh,
const std::vector< std::size_t > & nodes )
friend

Member Data Documentation

◆ _compute_element_neighbors

bool const MeshLib::Mesh::_compute_element_neighbors
protected

Definition at line 165 of file Mesh.h.

Referenced by Mesh(), and Mesh().

◆ _elements

std::vector<Element*> MeshLib::Mesh::_elements
protected

◆ _elements_connected_to_nodes

std::vector<std::vector<Element const*> > MeshLib::Mesh::_elements_connected_to_nodes
protected

◆ _id

std::size_t const MeshLib::Mesh::_id
protected

Definition at line 153 of file Mesh.h.

Referenced by getID().

◆ _is_axially_symmetric

bool MeshLib::Mesh::_is_axially_symmetric = false
protected

Definition at line 164 of file Mesh.h.

Referenced by isAxiallySymmetric(), and setAxiallySymmetric().

◆ _mesh_dimension

unsigned MeshLib::Mesh::_mesh_dimension
protected

Definition at line 154 of file Mesh.h.

Referenced by Mesh(), getDimension(), and setDimension().

◆ _name

std::string MeshLib::Mesh::_name
protected

Definition at line 157 of file Mesh.h.

Referenced by getName(), and setName().

◆ _node_distance

std::pair<double, double> MeshLib::Mesh::_node_distance
protected

The minimal and maximal distance of nodes within an element over all elements in the mesh.

Definition at line 156 of file Mesh.h.

◆ _nodes

std::vector<Node*> MeshLib::Mesh::_nodes
protected

◆ _properties

Properties MeshLib::Mesh::_properties
protected

Definition at line 160 of file Mesh.h.

Referenced by getProperties(), and getProperties().


The documentation for this class was generated from the following files: