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

Mesh v2 -- OK

parent f5d41c0c
No related branches found
No related tags found
No related merge requests found
#include <iostream>
#include "Mesh.h"
#include "Gmsh.h"
#include "Mesh.h"
#include "GroupOfElement.h"
#include "QuadNodeBasis.h"
#include "QuadEdgeBasis.h"
......@@ -23,15 +25,16 @@ int ain(int argc, char** argv){
// Get Mesh //
Mesh msh(argv[1]);
GroupOfElement goe = msh.getFromPhysical(7);
// Writer for .msh
WriterMsh writer;
writer.setDomain(msh.getGroup(2).getAll());
writer.setDomain(goe.getAll());
// Plot Basis //
HexNodeBasis b(1);
PlotBasis plot(msh.getGroup(2), b, writer);
PlotBasis plot(goe, b, writer);
plot.plot("basis");
// Stop Gmsh //
......
......@@ -3,17 +3,21 @@
using namespace std;
FunctionSpace::FunctionSpace(const GroupOfElement& goe, int basisType, int order){
FunctionSpace::FunctionSpace(const GroupOfElement& goe, Mesh& mesh,
int basisType, int order){
// Save GroupOfElement & Mesh //
this->goe = &goe;
this->mesh = &(goe.getMesh());
this->mesh = &mesh;
// Get Geo Data (WARNING HOMOGENE MESH REQUIRED)//
MElement& element = goe.get(0);
int elementType = element.getType();
int nVertex = element.getNumVertices();
int nEdge = element.getNumEdges();
int nFace = element.getNumFaces();
const MElement& element = goe.get(0);
MElement& myElement =
const_cast<MElement&>(element);
int elementType = myElement.getType();
int nVertex = myElement.getNumVertices();
int nEdge = myElement.getNumEdges();
int nFace = myElement.getNumFaces();
// Init Struct //
type = basisType;
......
......@@ -37,7 +37,7 @@ class FunctionSpace{
int type;
public:
FunctionSpace(const GroupOfElement& goe,
FunctionSpace(const GroupOfElement& goe, Mesh& mesh,
int basisType, int order);
virtual ~FunctionSpace(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment