diff --git a/MeshLib/Mesh.cpp b/MeshLib/Mesh.cpp index c332dc66b735080ad35634974c15e31e1ed3af4d..4a97bee3a824125bc5fde97e205bef47d2371aa0 100644 --- a/MeshLib/Mesh.cpp +++ b/MeshLib/Mesh.cpp @@ -119,7 +119,13 @@ void Mesh::setDimension() void Mesh::setElementInformationForNodes() { const size_t nElements (_elements.size()); - for (unsigned i=0; i<nElements; i++) +#ifdef _OPENMP + OPENMP_LOOP_TYPE i; + #pragma omp parallel for +#else + unsigned i(0) +#endif + for (i=0; i<nElements; i++) { const unsigned nNodes (_elements[i]->getNNodes()); for (unsigned j=0; j<nNodes; j++) diff --git a/MeshLib/MshEditor.h b/MeshLib/MshEditor.h index 083daba110d2d5adda8bce44b15a9f149e5e4dee..3c3323e049aafd2376d009f0bbe6ffa6b6bbc348 100644 --- a/MeshLib/MshEditor.h +++ b/MeshLib/MshEditor.h @@ -39,7 +39,7 @@ public: static void getSurfaceAreaForNodes(const MeshLib::Mesh* mesh, std::vector<double> &node_area_vec); /// Removes the mesh nodes (and connected elements) given in the nodes-list from the mesh. - MeshLib::Mesh* removeMeshNodes(MeshLib::Mesh* mesh, const std::vector<size_t> &nodes); + static MeshLib::Mesh* removeMeshNodes(MeshLib::Mesh* mesh, const std::vector<size_t> &nodes); /// Returns the surface nodes of a layered mesh. static std::vector<GeoLib::PointWithID*> getSurfaceNodes(const MeshLib::Mesh &mesh); diff --git a/MeshLib/Node.h b/MeshLib/Node.h index cc996c11e46039f8133800c7adee9efbc2c61119..05a50e56a94bca53b5dec66e64dfacb2a7c8b040 100644 --- a/MeshLib/Node.h +++ b/MeshLib/Node.h @@ -19,6 +19,7 @@ #include "PointWithID.h" #include "Mesh.h" +#include "MshEditor.h" namespace MeshLib { @@ -30,9 +31,9 @@ class Element; class Node : public GeoLib::PointWithID { /* friend functions: */ + friend MeshLib::Mesh* MshEditor::removeMeshNodes(MeshLib::Mesh* mesh, const std::vector<size_t> &nodes); /* friend classes: */ friend class Mesh; - friend class MshEditor; friend class MeshCoarsener; friend class MshLayerMapper;