OGS
SetMeshSpaceDimension.cpp
Go to the documentation of this file.
1 
12 #include "SetMeshSpaceDimension.h"
13 
14 #include "GetSpaceDimension.h"
16 #include "MeshLib/Mesh.h"
17 
18 namespace MeshLib
19 {
20 void setMeshSpaceDimension(std::vector<std::unique_ptr<Mesh>> const& meshes)
21 {
22  // Get the space dimension from the bulk mesh:
23  auto const space_dimension = getSpaceDimension(meshes[0]->getNodes());
24  for (auto& mesh : meshes)
25  {
26  auto elements = mesh->getElements();
27  for (auto element : elements)
28  {
29  element->space_dimension_ = space_dimension;
30  }
31  }
32 }
33 }; // namespace MeshLib
Definition of the Element class.
std::vector< std::size_t > getNodes(GeoLib::Point const &pnt, std::vector< MeshLib::Node * > const &nodes, MeshLib::PropertyVector< int > const &mat_ids, std::pair< int, int > const &mat_limits, std::pair< double, double > const &elevation_limits, MeshLib::Mesh const &mesh)
Definition of the Mesh class.
void setMeshSpaceDimension(std::vector< std::unique_ptr< Mesh >> const &meshes)
int getSpaceDimension(std::vector< Node * > const &nodes)
Computes dimension of the embedding space containing the set of given points.