OGS
MeshLib::Mesh Class Reference

Detailed Description

A basic mesh.

Definition at line 41 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, 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
 

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,
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.
propertiesMesh properties.

Definition at line 62 of file Mesh.cpp.

70 _node_distance(std::numeric_limits<double>::max(), 0),
71 _name(std::move(name)),
72 _nodes(std::move(nodes)),
73 _elements(std::move(elements)),
74 _properties(properties)
75{
76 this->resetNodeIDs();
77 this->resetElementIDs();
78 this->setDimension();
79
81
82 this->setElementNeighbors();
83}
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:156
std::size_t const _id
Definition: Mesh.h:149
std::vector< std::vector< Element const * > > _elements_connected_to_nodes
Definition: Mesh.h:158
unsigned _mesh_dimension
Definition: Mesh.h:150
std::string _name
Definition: Mesh.h:153
void resetNodeIDs()
Resets the IDs of all mesh-nodes to their position in the node vector.
Definition: Mesh.cpp:149
std::vector< Element * > _elements
Definition: Mesh.h:155
void setDimension()
Sets the dimension of the mesh.
Definition: Mesh.cpp:167
void resetElementIDs()
Resets the IDs of all mesh-elements to their position in the element vector.
Definition: Mesh.cpp:158
void setElementNeighbors()
Definition: Mesh.cpp:194
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:152
std::vector< Node * > _nodes
Definition: Mesh.h:154
std::vector< std::vector< Element const * > > findElementsConnectedToNodes(Mesh const &mesh)
Definition: Mesh.cpp:45

References _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 85 of file Mesh.cpp.

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

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

◆ Mesh() [3/3]

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

◆ ~Mesh()

MeshLib::Mesh::~Mesh ( )
virtual

Destructor.

Definition at line 129 of file Mesh.cpp.

130{
131 const std::size_t nElements(_elements.size());
132 for (std::size_t i = 0; i < nElements; ++i)
133 {
134 delete _elements[i];
135 }
136
137 const std::size_t nNodes(_nodes.size());
138 for (std::size_t i = 0; i < nNodes; ++i)
139 {
140 delete _nodes[i];
141 }
142}

References _elements, and _nodes.

Member Function Documentation

◆ addElement()

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

Add an element to the mesh.

Definition at line 144 of file Mesh.cpp.

145{
146 _elements.push_back(elem);
147}

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 228 of file Mesh.cpp.

229{
230 return std::count_if(begin(_nodes), end(_nodes),
231 [this](auto const* const node) {
232 return isBaseNode(
233 *node,
234 _elements_connected_to_nodes[node->getID()]);
235 });
236}
bool isBaseNode(Node const &node, std::vector< Element const * > const &elements_connected_to_node)
Definition: Mesh.cpp:336

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

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

◆ getDimension()

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

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

Definition at line 84 of file Mesh.h.

84{ return _mesh_dimension; }

References _mesh_dimension.

Referenced by ProcessLib::ConstraintDirichletBoundaryCondition::ConstraintDirichletBoundaryCondition(), ProcessLib::HydroMechanics::HydroMechanicsProcess< DisplacementDim >::HydroMechanicsProcess(), ProcessLib::LIE::PostProcessTool::PostProcessTool(), ProcessLib::RichardsMechanics::RichardsMechanicsProcess< DisplacementDim >::RichardsMechanicsProcess(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalProcess< DisplacementDim >::SmallDeformationNonlocalProcess(), ProcessLib::SmallDeformation::SmallDeformationProcess< DisplacementDim >::SmallDeformationProcess(), 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(), 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::TH2M::TH2MProcess< DisplacementDim >::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 105 of file Mesh.h.

105{ 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::MeshLayerMapper::addLayerToMesh(), MeshToolsLib::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(), 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(), MeshToolsLib::createBoundaryElements(), ProcessLib::ComponentTransport::createComponentTransportProcess(), ProcessLib::createDeactivatedSubdomainMesh(), MeshToolsLib::createFlippedMesh(), ProcessLib::HT::createHTProcess(), ProcessLib::HydroMechanics::createHydroMechanicsProcess(), ProcessLib::LiquidFlow::createLiquidFlowProcess(), NumLib::createNumericalStabilization(), createPropertyVector(), MeshToolsLib::createQuadraticOrderMesh(), ParameterLib::createRandomFieldMeshElementParameter(), MeshToolsLib::MeshLayerMapper::createRasterLayers(), MeshToolsLib::MeshLayerMapper::createStaticLayers(), 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(), 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::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(), MeshToolsLib::Mesh2MeshPropertyInterpolation::interpolatePropertiesForMesh(), MeshLib::is2DMeshOnRotatedVerticalPlane(), anonymous_namespace{AddFaultToVoxelGrid.cpp}::isVoxelGrid(), main(), ApplicationUtils::markDuplicateGhostCells(), anonymous_namespace{AddFaultToVoxelGrid.cpp}::markFaults(), ApplicationUtils::NodeWiseMeshPartitioner::partitionOtherMesh(), 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 252 of file Mesh.cpp.

254{
255 return _elements_connected_to_nodes[node.getID()];
256}

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 99 of file Mesh.h.

99{ return _name; }

References _name.

Referenced by ProcessLib::ComponentTransport::ComponentTransportProcess::ComponentTransportProcess(), 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(), 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::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(), 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 102 of file Mesh.h.

102{ 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::MeshLayerMapper::addLayerToMesh(), MeshToolsLib::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::extractInnerAndOuterNodes(), MeshLib::findElementsConnectedToNodes(), MeshLib::ElementStatus::getActiveNodes(), MeshToolsLib::MeshInformation::getBoundingBox(), ProcessLib::PythonBoundaryCondition::getEssentialBCValues(), ProcessLib::PrimaryVariableConstraintDirichletBoundaryCondition::getEssentialBCValues(), ProcessLib::getEssentialBCValuesLocal(), getMeshExtent(), MeshGeoToolsLib::MeshNodeSearcher::getMeshNodeIDs(), MeshLib::getNumberOfGlobalNodes(), OGSMesh::getPointCoordinates(), MeshToolsLib::MeshSurfaceExtraction::getSurfaceAreaForNodes(), getSurfaceIntegratedValuesForNodes(), 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::NodeWiseMeshPartitioner::partitionOtherMesh(), 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 93 of file Mesh.h.

93{ 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::MeshLayerMapper::addLayerToMesh(), MeshToolsLib::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::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 96 of file Mesh.h.

96{ 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}::identifySubdomainMeshNodes(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::initializeConcreteProcess(), MeshToolsLib::Mesh2MeshPropertyInterpolation::interpolatePropertiesForMesh(), MeshToolsLib::MeshLayerMapper::layerMapping(), main(), MeshGeoToolsLib::GeoMapper::mapOnMesh(), MeshAnalysisDialog::on_startButton_pressed(), ApplicationUtils::NodeWiseMeshPartitioner::partitionOtherMesh(), MeshLib::VtkMappedMeshSource::RequestInformation(), MeshLib::NodeSearch::searchNodesConnectedToOnlyGivenElements(), MeshLib::NodeSearch::searchUnused(), ElementTreeModel::setMesh(), ProcessLib::ComponentTransport::ComponentTransportProcess::solveReactionEquation(), testIfMeshesAreEqual(), and MeshLib::IO::Legacy::MeshIO::write().

◆ getProperties() [1/2]

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

Definition at line 130 of file Mesh.h.

130{ 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::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(), main(), 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 131 of file Mesh.h.

131{ return _properties; }

References _properties.

◆ hasNonlinearElement()

bool MeshLib::Mesh::hasNonlinearElement ( ) const

Check if the mesh contains any nonlinear element.

Definition at line 238 of file Mesh.cpp.

239{
240 return std::any_of(
241 std::begin(_elements), std::end(_elements),
242 [](Element const* const e)
243 { return e->getNumberOfNodes() != e->getNumberOfBaseNodes(); });
244}

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

◆ isAxiallySymmetric()

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

Definition at line 133 of file Mesh.h.

133{ return _is_axially_symmetric; }
bool _is_axially_symmetric
Definition: Mesh.h:160

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::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(), and ProcessLib::TwoPhaseFlowWithPrho::TwoPhaseFlowWithPrhoProcess::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 158 of file Mesh.cpp.

159{
160 const std::size_t nElements(this->_elements.size());
161 for (unsigned i = 0; i < nElements; ++i)
162 {
163 _elements[i]->setID(i);
164 }
165}

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 149 of file Mesh.cpp.

150{
151 const std::size_t nNodes(_nodes.size());
152 for (std::size_t i = 0; i < nNodes; ++i)
153 {
154 _nodes[i]->setID(i);
155 }
156}

References _nodes.

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

◆ setAxiallySymmetric()

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

Definition at line 134 of file Mesh.h.

134 {
135 _is_axially_symmetric = is_axial_symmetric;
136 }

References _is_axially_symmetric.

◆ setDimension()

void MeshLib::Mesh::setDimension ( )
protected

Sets the dimension of the mesh.

Definition at line 167 of file Mesh.cpp.

168{
169 const std::size_t nElements(_elements.size());
170 for (unsigned i = 0; i < nElements; ++i)
171 {
173 {
174 _mesh_dimension = _elements[i]->getDimension();
175 }
176 }
177}
unsigned getDimension() const
Returns the dimension of the mesh (determined by the maximum dimension over all elements).
Definition: Mesh.h:84

References _elements, _mesh_dimension, and getDimension().

Referenced by 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 194 of file Mesh.cpp.

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

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

Referenced by Mesh().

◆ setName()

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

Changes the name of the mesh.

Definition at line 114 of file Mesh.h.

114{ 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 123 of file Mesh.cpp.

124{
125 _elements.clear();
126 _nodes.clear();
127}

References _elements, and _nodes.

Referenced by main().

Friends And Related Function Documentation

◆ ApplicationUtils::NodeWiseMeshPartitioner

Definition at line 47 of file Mesh.h.

◆ removeMeshNodes

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

Member Data Documentation

◆ _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 149 of file Mesh.h.

Referenced by getID().

◆ _is_axially_symmetric

bool MeshLib::Mesh::_is_axially_symmetric = false
protected

Definition at line 160 of file Mesh.h.

Referenced by isAxiallySymmetric(), and setAxiallySymmetric().

◆ _mesh_dimension

unsigned MeshLib::Mesh::_mesh_dimension
protected

Definition at line 150 of file Mesh.h.

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

◆ _name

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

Definition at line 153 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 152 of file Mesh.h.

◆ _nodes

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

◆ _properties

Properties MeshLib::Mesh::_properties
protected

Definition at line 156 of file Mesh.h.

Referenced by getProperties().


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