Skip to content
Snippets Groups Projects
Commit c090ab83 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

try not to include GmshDefines.h in headers

parent d2299f8b
Branches
Tags
No related merge requests found
......@@ -16,6 +16,7 @@
#include "GmshMessage.h"
#include "VertexArray.h"
#include "boundaryLayersData.h"
#include "GmshDefines.h"
GRegion::GRegion(GModel *model, int tag)
: GEntity (model, tag), compound(0)
......@@ -432,3 +433,29 @@ std::list<GVertex*> GRegion::vertices() const
res.insert(res.begin(), v.begin(), v.end());
return res;
}
void GRegion::addElement(int type, MElement *e)
{
switch (type){
case TYPE_TET:
addTetrahedron((MTetrahedron*) e);
break;
case TYPE_HEX:
addHexahedron((MHexahedron*) e);
break;
case TYPE_PRI:
addPrism((MPrism*) e);
break;
case TYPE_PYR:
addPyramid((MPyramid*) e);
break;
case TYPE_TRIH:
addTrihedron((MTrihedron*) e);
break;
case TYPE_POLYH:
addPolyhedron((MPolyhedron*) e);
break;
default:
Msg::Error("Trying to add unsupported element in region");
}
}
......@@ -12,7 +12,6 @@
#include <stdio.h>
#include "GEntity.h"
#include "boundaryLayersData.h"
#include "GmshDefines.h"
class MElement;
class MTetrahedron;
......@@ -68,7 +67,6 @@ class GRegion : public GEntity {
// vertices that bound the region
virtual std::list<GVertex*> vertices() const;
// get the bounding box
virtual SBoundingBox3d bounds() const;
......@@ -137,39 +135,15 @@ class GRegion : public GEntity {
std::vector<MPolyhedron*> polyhedra;
void addTetrahedron(MTetrahedron *t){ tetrahedra.push_back(t); }
void addHexahedron(MHexahedron *h){ hexahedra.push_back(h); }
void addPrism(MPrism *p){ prisms.push_back(p); }
void addPyramid(MPyramid *p){ pyramids.push_back(p); }
void addPolyhedron(MPolyhedron *p){ polyhedra.push_back(p); }
void addTrihedron(MTrihedron *t){ trihedra.push_back(t); }
void addElement(int type, MElement *e){
switch (type){
case TYPE_TET:
addTetrahedron((MTetrahedron*) e);
break;
case TYPE_HEX:
addHexahedron((MHexahedron*) e);
break;
case TYPE_PRI:
addPrism((MPrism*) e);
break;
case TYPE_PYR:
addPyramid((MPyramid*) e);
break;
case TYPE_TRIH:
addTrihedron((MTrihedron*) e);
break;
case TYPE_POLYH:
addPolyhedron((MPolyhedron*) e);
break;
default:
Msg::Fatal("Trying to add unsupported element");
}
}
void addElement(int type, MElement *e);
// get the boundary layer columns
BoundaryLayerColumns *getColumns () {return &_columns;}
BoundaryLayerColumns *getColumns () { return &_columns; }
};
#endif
......@@ -9,7 +9,7 @@
#include <stdio.h>
#include <algorithm>
#include <string>
#include "GmshDefines.h"
#include "GmshMessage.h"
#include "MVertex.h"
#include "MEdge.h"
......@@ -19,6 +19,7 @@
#include "JacobianBasis.h"
#include "MetricBasis.h"
#include "GaussIntegration.h"
class GModel;
// A mesh element.
......
......@@ -10,8 +10,6 @@
#include <map>
#include <string>
#include "SPoint3.h"
//#include "drawContext.h"
class PViewData;
class PViewOptions;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment