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

pp

parent 9c2962c6
No related branches found
No related tags found
No related merge requests found
......@@ -65,10 +65,11 @@ class Field {
virtual ~Field() {}
int id;
std::map<std::string, FieldOption *> options;
virtual bool isotropic () const { return true; }
// isotropic
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;}
// anisotropic
virtual void operator() (double x, double y, double z, SMetric3 &, GEntity *ge=0){}
bool update_needed;
virtual const char *getName() = 0;
#if defined(HAVE_POST)
......
......@@ -130,7 +130,6 @@ static double F_Lc_aniso(GEdge *ge, double t)
return sqrt(lSquared);
}
static double F_Transfinite(GEdge *ge, double t_)
{
double length = ge->length();
......@@ -289,19 +288,18 @@ void deMeshGEdge::operator() (GEdge *ge)
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];
sprintf(name,"line%d.dat",tag);
FILE *f = fopen (name,"w");
for (int i=0;i<Points.size();i++){
sprintf(name, "line%d.dat", tag);
FILE *f = fopen(name, "w");
for (unsigned int i = 0; i < Points.size(); 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);
}
void meshGEdge::operator() (GEdge *ge)
{
ge->model()->setCurrentMeshEntity(ge);
......
......@@ -11,16 +11,15 @@ class GEdge;
// Create the mesh of the edge
class meshGEdge {
public :
meshGEdge () {}
void operator () ( GEdge * );
meshGEdge() {}
void operator () (GEdge *);
};
// destroy the mesh of the edge
class deMeshGEdge {
bool _STL;
public :
deMeshGEdge () {}
void operator () ( GEdge * );
deMeshGEdge() {}
void operator () (GEdge *);
};
int MeshExtrudedCurve(GEdge *ge);
......
......@@ -12,7 +12,8 @@ class lloydAlgorithm {
int ITER_MAX;
bool infiniteNorm ;
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 *);
};
......
......@@ -48,22 +48,23 @@ class deMeshGRegion {
void operator () (GRegion *);
};
void MeshDelaunayVolume(std::vector<GRegion*> &delaunay);
int MeshTransfiniteVolume(GRegion *gr);
int SubdivideExtrudedMesh(GModel *m);
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<MLine*,GEdge*> > es_cont ;
GFace* findInFaceSearchStructure ( MVertex *p1,MVertex *p2,MVertex *p3, const fs_cont&search );
GEdge* findInEdgeSearchStructure ( MVertex *p1,MVertex *p2, const es_cont&search );
bool buildFaceSearchStructure ( GModel *model , fs_cont&search );
bool buildEdgeSearchStructure ( GModel *model , es_cont&search );
typedef std::multimap<MVertex*, std::pair<MTriangle*, GFace*> > fs_cont ;
typedef std::multimap<MVertex*, std::pair<MLine*, GEdge*> > es_cont ;
GFace* findInFaceSearchStructure(MVertex *p1, MVertex *p2, MVertex *p3,
const fs_cont &search);
GEdge* findInEdgeSearchStructure(MVertex *p1, MVertex *p2, const es_cont &search);
bool buildFaceSearchStructure(GModel *model, fs_cont &search);
bool buildEdgeSearchStructure(GModel *model, es_cont &search);
// adapt the mesh of a region
class adaptMeshGRegion {
es_cont *_es; fs_cont *_fs;
es_cont *_es;
fs_cont *_fs;
public :
void operator () (GRegion *);
};
......
......@@ -27,12 +27,14 @@ int RenumberGraph(Graph &graph, meshPartitionOptions &options);
int PartitionMesh(GModel *const model, meshPartitionOptions &options);
int RenumberMesh(GModel *const model, 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);
int CreatePartitionBoundaries(GModel *model, bool createGhostCells);
void splitBoundaryEdges(GModel *model, std::set<partitionEdge*, Less_partitionEdge> &newEdges);
void createPartitionFaces(GModel *model, GFaceCompound * gf, int num_parts,
void splitBoundaryEdges(GModel *model,
std::set<partitionEdge*, Less_partitionEdge> &newEdges);
void createPartitionFaces(GModel *model, GFaceCompound *gf, int num_parts,
std::vector<discreteFace*> &pFaces);
#endif
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