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

pp

parent 9c2962c6
Branches
Tags
No related merge requests found
...@@ -65,10 +65,11 @@ class Field { ...@@ -65,10 +65,11 @@ class Field {
virtual ~Field() {} virtual ~Field() {}
int id; int id;
std::map<std::string, FieldOption *> options; std::map<std::string, FieldOption *> options;
virtual double operator() (double x, double y, double z, GEntity *ge=0) = 0;
// start of the anisotropic field implementation
virtual void operator() (double x, double y, double z, SMetric3 &, GEntity *ge=0){throw;}
virtual bool isotropic () const { return true; } virtual bool isotropic () const { return true; }
// isotropic
virtual double operator() (double x, double y, double z, GEntity *ge=0) = 0;
// anisotropic
virtual void operator() (double x, double y, double z, SMetric3 &, GEntity *ge=0){}
bool update_needed; bool update_needed;
virtual const char *getName() = 0; virtual const char *getName() = 0;
#if defined(HAVE_POST) #if defined(HAVE_POST)
......
...@@ -130,7 +130,6 @@ static double F_Lc_aniso(GEdge *ge, double t) ...@@ -130,7 +130,6 @@ static double F_Lc_aniso(GEdge *ge, double t)
return sqrt(lSquared); return sqrt(lSquared);
} }
static double F_Transfinite(GEdge *ge, double t_) static double F_Transfinite(GEdge *ge, double t_)
{ {
double length = ge->length(); double length = ge->length();
...@@ -289,19 +288,18 @@ void deMeshGEdge::operator() (GEdge *ge) ...@@ -289,19 +288,18 @@ void deMeshGEdge::operator() (GEdge *ge)
ge->meshStatistics.status = GEdge::PENDING; ge->meshStatistics.status = GEdge::PENDING;
} }
void printFandPrimitive(int tag, std::vector<IntPoint> &Points ){ static void printFandPrimitive(int tag, std::vector<IntPoint> &Points)
{
char name[256]; char name[256];
sprintf(name, "line%d.dat", tag); sprintf(name, "line%d.dat", tag);
FILE *f = fopen(name, "w"); FILE *f = fopen(name, "w");
for (int i=0;i<Points.size();i++){ for (unsigned int i = 0; i < Points.size(); i++){
const IntPoint &P = Points[i]; const IntPoint &P = Points[i];
fprintf(f, "%g %g %g\n", P.t, 1./P.lc, P.p); fprintf(f, "%g %g %g\n", P.t, 1./P.lc, P.p);
} }
fclose(f); fclose(f);
} }
void meshGEdge::operator() (GEdge *ge) void meshGEdge::operator() (GEdge *ge)
{ {
ge->model()->setCurrentMeshEntity(ge); ge->model()->setCurrentMeshEntity(ge);
......
...@@ -17,7 +17,6 @@ class meshGEdge { ...@@ -17,7 +17,6 @@ class meshGEdge {
// destroy the mesh of the edge // destroy the mesh of the edge
class deMeshGEdge { class deMeshGEdge {
bool _STL;
public : public :
deMeshGEdge() {} deMeshGEdge() {}
void operator () (GEdge *); void operator () (GEdge *);
......
...@@ -12,7 +12,8 @@ class lloydAlgorithm { ...@@ -12,7 +12,8 @@ class lloydAlgorithm {
int ITER_MAX; int ITER_MAX;
bool infiniteNorm ; bool infiniteNorm ;
public : public :
lloydAlgorithm (int itermax, bool infnorm = false): ITER_MAX(itermax), infiniteNorm(infnorm) {} lloydAlgorithm (int itermax, bool infnorm = false)
: ITER_MAX(itermax), infiniteNorm(infnorm) {}
void operator () (GFace *); void operator () (GFace *);
}; };
......
...@@ -48,7 +48,6 @@ class deMeshGRegion { ...@@ -48,7 +48,6 @@ class deMeshGRegion {
void operator () (GRegion *); void operator () (GRegion *);
}; };
void MeshDelaunayVolume(std::vector<GRegion*> &delaunay); void MeshDelaunayVolume(std::vector<GRegion*> &delaunay);
int MeshTransfiniteVolume(GRegion *gr); int MeshTransfiniteVolume(GRegion *gr);
int SubdivideExtrudedMesh(GModel *m); int SubdivideExtrudedMesh(GModel *m);
...@@ -56,14 +55,16 @@ void carveHole(GRegion *gr, int num, double distance, std::vector<int> &surfaces ...@@ -56,14 +55,16 @@ void carveHole(GRegion *gr, int num, double distance, std::vector<int> &surfaces
typedef std::multimap<MVertex*, std::pair<MTriangle*, GFace*> > fs_cont ; typedef std::multimap<MVertex*, std::pair<MTriangle*, GFace*> > fs_cont ;
typedef std::multimap<MVertex*, std::pair<MLine*, GEdge*> > es_cont ; typedef std::multimap<MVertex*, std::pair<MLine*, GEdge*> > es_cont ;
GFace* findInFaceSearchStructure ( MVertex *p1,MVertex *p2,MVertex *p3, const fs_cont&search ); GFace* findInFaceSearchStructure(MVertex *p1, MVertex *p2, MVertex *p3,
const fs_cont &search);
GEdge* findInEdgeSearchStructure(MVertex *p1, MVertex *p2, const es_cont &search); GEdge* findInEdgeSearchStructure(MVertex *p1, MVertex *p2, const es_cont &search);
bool buildFaceSearchStructure(GModel *model, fs_cont &search); bool buildFaceSearchStructure(GModel *model, fs_cont &search);
bool buildEdgeSearchStructure(GModel *model, es_cont &search); bool buildEdgeSearchStructure(GModel *model, es_cont &search);
// adapt the mesh of a region // adapt the mesh of a region
class adaptMeshGRegion { class adaptMeshGRegion {
es_cont *_es; fs_cont *_fs; es_cont *_es;
fs_cont *_fs;
public : public :
void operator () (GRegion *); void operator () (GRegion *);
}; };
......
...@@ -27,11 +27,13 @@ int RenumberGraph(Graph &graph, meshPartitionOptions &options); ...@@ -27,11 +27,13 @@ int RenumberGraph(Graph &graph, meshPartitionOptions &options);
int PartitionMesh(GModel *const model, meshPartitionOptions &options); int PartitionMesh(GModel *const model, meshPartitionOptions &options);
int RenumberMesh(GModel *const model, meshPartitionOptions &options); int RenumberMesh(GModel *const model, meshPartitionOptions &options);
int PartitionMeshFace(std::list<GFace*> &cFaces, meshPartitionOptions &options); int PartitionMeshFace(std::list<GFace*> &cFaces, meshPartitionOptions &options);
int PartitionMeshElements(std::vector<MElement*> &elements, meshPartitionOptions &options); int PartitionMeshElements(std::vector<MElement*> &elements,
meshPartitionOptions &options);
bool PartitionZeroGenus(std::list<GFace*> &cFaces, int &nbParts); bool PartitionZeroGenus(std::list<GFace*> &cFaces, int &nbParts);
int CreatePartitionBoundaries(GModel *model, bool createGhostCells); int CreatePartitionBoundaries(GModel *model, bool createGhostCells);
void splitBoundaryEdges(GModel *model, std::set<partitionEdge*, Less_partitionEdge> &newEdges); void splitBoundaryEdges(GModel *model,
std::set<partitionEdge*, Less_partitionEdge> &newEdges);
void createPartitionFaces(GModel *model, GFaceCompound *gf, int num_parts, void createPartitionFaces(GModel *model, GFaceCompound *gf, int num_parts,
std::vector<discreteFace*> &pFaces); std::vector<discreteFace*> &pFaces);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment