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 @@
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++;
}
}
......
......@@ -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;
......
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