Skip to content
Snippets Groups Projects
Commit e68df95b authored by Nicolas Marsic's avatar Nicolas Marsic
Browse files

Mesh: Entity with *Global* Id (Vertex + Cell)

parent 256f0128
No related branches found
No related tags found
No related merge requests found
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
using namespace std; using namespace std;
FunctionSpace::FunctionSpace(const GroupOfElement& goe, int basisType, int order){ FunctionSpace::FunctionSpace(const GroupOfElement& goe, int basisType, int order){
// Save GroupOfElement // // Save GroupOfElement & Mesh //
this->goe = &goe; this->goe = &goe;
this->mesh = &(goe.getMesh());
// Get Geo Data (WARNING HOMOGENE MESH REQUIRED)// // Get Geo Data (WARNING HOMOGENE MESH REQUIRED)//
MElement& element = goe.get(0); MElement& element = goe.get(0);
...@@ -84,7 +85,7 @@ vector<Dof> FunctionSpace::getKeys(const MElement& elem) const{ ...@@ -84,7 +85,7 @@ vector<Dof> FunctionSpace::getKeys(const MElement& elem) const{
// Add Vertex Based Dof // // Add Vertex Based Dof //
for(int i = 0; i < nVertex; i++){ for(int i = 0; i < nVertex; i++){
for(int j = 0; j < nFVertex; j++){ for(int j = 0; j < nFVertex; j++){
myDof[it].setDof(vertex[i]->getNum(), j); myDof[it].setDof(mesh->getGlobalId(*vertex[i]), j);
it++; it++;
} }
} }
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
#include "Basis.h" #include "Basis.h"
#include "Dof.h" #include "Dof.h"
#include "Mesh.h"
#include "GroupOfElement.h" #include "GroupOfElement.h"
#include "MElement.h" #include "MElement.h"
#include "MVertex.h" #include "MVertex.h"
#include "MEdge.h" #include "MEdge.h"
...@@ -23,6 +26,7 @@ ...@@ -23,6 +26,7 @@
class FunctionSpace{ class FunctionSpace{
protected: protected:
Mesh* mesh;
const GroupOfElement* goe; const GroupOfElement* goe;
const Basis* basis; const Basis* basis;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment