diff --git a/FunctionSpace/FunctionSpace.cpp b/FunctionSpace/FunctionSpace.cpp index 74162f9a4da796e2a3ddd270c7ff306da9ea6c75..ddfc234522e51b7e02fccd929cf7c299d6d94522 100644 --- a/FunctionSpace/FunctionSpace.cpp +++ b/FunctionSpace/FunctionSpace.cpp @@ -4,8 +4,9 @@ using namespace std; FunctionSpace::FunctionSpace(const GroupOfElement& goe, int basisType, int order){ - // Save GroupOfElement // - this->goe = &goe; + // Save GroupOfElement & Mesh // + this->goe = &goe; + this->mesh = &(goe.getMesh()); // Get Geo Data (WARNING HOMOGENE MESH REQUIRED)// MElement& element = goe.get(0); @@ -84,7 +85,7 @@ vector<Dof> FunctionSpace::getKeys(const MElement& elem) const{ // Add Vertex Based Dof // for(int i = 0; i < nVertex; i++){ for(int j = 0; j < nFVertex; j++){ - myDof[it].setDof(vertex[i]->getNum(), j); + myDof[it].setDof(mesh->getGlobalId(*vertex[i]), j); it++; } } diff --git a/FunctionSpace/FunctionSpace.h b/FunctionSpace/FunctionSpace.h index 0bd942b01a45fae47f092a79c005548802c873d1..8f2adadacde95adbd33c6c43e5262dd87a0c5bf7 100644 --- a/FunctionSpace/FunctionSpace.h +++ b/FunctionSpace/FunctionSpace.h @@ -5,7 +5,10 @@ #include "Basis.h" #include "Dof.h" + +#include "Mesh.h" #include "GroupOfElement.h" + #include "MElement.h" #include "MVertex.h" #include "MEdge.h" @@ -23,6 +26,7 @@ class FunctionSpace{ protected: + Mesh* mesh; const GroupOfElement* goe; const Basis* basis;