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

Free Space test cases + Nodal Interpolation + Small Fix in FunctionSpace: Bug...

Free Space test cases + Nodal Interpolation + Small Fix in FunctionSpace: Bug with cell function in 2D for 3D Function Space + Vertices of GroupOfElement
parent 21791d9f
No related branches found
No related tags found
No related merge requests found
...@@ -154,6 +154,13 @@ vector<Dof> FunctionSpace::getUnorderedKeys(const MElement& elem) const{ ...@@ -154,6 +154,13 @@ vector<Dof> FunctionSpace::getUnorderedKeys(const MElement& elem) const{
const size_t nEdge = element.getNumEdges(); const size_t nEdge = element.getNumEdges();
const size_t nFace = element.getNumFaces(); const size_t nFace = element.getNumFaces();
// Number of cells //
size_t nCell;
if(element.getDim() == 3) // Need to be 3D to have one Cell
nCell = 1;
else
nCell = 0;
vector<MVertex*> vertex(nVertex); vector<MVertex*> vertex(nVertex);
vector<MEdge> edge(nEdge); vector<MEdge> edge(nEdge);
vector<MFace> face(nFace); vector<MFace> face(nFace);
...@@ -172,7 +179,7 @@ vector<Dof> FunctionSpace::getUnorderedKeys(const MElement& elem) const{ ...@@ -172,7 +179,7 @@ vector<Dof> FunctionSpace::getUnorderedKeys(const MElement& elem) const{
fPerVertex * nVertex + fPerVertex * nVertex +
fPerEdge * nEdge + fPerEdge * nEdge +
fPerFace * nFace + fPerFace * nFace +
fPerCell; fPerCell * nCell;
vector<Dof> myDof(nDof); vector<Dof> myDof(nDof);
...@@ -203,9 +210,11 @@ vector<Dof> FunctionSpace::getUnorderedKeys(const MElement& elem) const{ ...@@ -203,9 +210,11 @@ vector<Dof> FunctionSpace::getUnorderedKeys(const MElement& elem) const{
} }
// Add Cell Based Dof // // Add Cell Based Dof //
for(size_t j = 0; j < fPerCell; j++){ for(size_t i = 0; i < nCell; i++){
myDof[it].setDof(mesh->getGlobalId(element), j); for(size_t j = 0; j < fPerCell; j++){
it++; myDof[it].setDof(mesh->getGlobalId(element), j);
it++;
}
} }
return myDof; return myDof;
......
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