Skip to content
Snippets Groups Projects
Commit b7904dfa authored by Karsten Rink's avatar Karsten Rink
Browse files

testing static functions as friend functions; added another OpenMP loop in mesh class

parent ad00bdc8
No related branches found
No related tags found
No related merge requests found
......@@ -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++)
......
......@@ -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);
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment