From 26a885904e732c3ab43cf3d6f32909398171a2b2 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 27 Aug 2010 09:21:11 +0000
Subject: [PATCH] pp

---
 Mesh/Field.h          |  7 ++++---
 Mesh/meshGEdge.cpp    | 14 ++++++--------
 Mesh/meshGEdge.h      |  9 ++++-----
 Mesh/meshGFaceLloyd.h |  3 ++-
 Mesh/meshGRegion.h    | 17 +++++++++--------
 Mesh/meshPartition.h  |  8 +++++---
 6 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/Mesh/Field.h b/Mesh/Field.h
index e4eaf0001b..6b11213e77 100644
--- a/Mesh/Field.h
+++ b/Mesh/Field.h
@@ -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)
diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp
index 34601dc6e6..c3345d1eef 100644
--- a/Mesh/meshGEdge.cpp
+++ b/Mesh/meshGEdge.cpp
@@ -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);
diff --git a/Mesh/meshGEdge.h b/Mesh/meshGEdge.h
index a07a0d1f50..36082ab4e3 100644
--- a/Mesh/meshGEdge.h
+++ b/Mesh/meshGEdge.h
@@ -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);
diff --git a/Mesh/meshGFaceLloyd.h b/Mesh/meshGFaceLloyd.h
index a03fff0f9d..b560f44870 100644
--- a/Mesh/meshGFaceLloyd.h
+++ b/Mesh/meshGFaceLloyd.h
@@ -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 *);
 };
 
diff --git a/Mesh/meshGRegion.h b/Mesh/meshGRegion.h
index 912975d351..034891e50f 100644
--- a/Mesh/meshGRegion.h
+++ b/Mesh/meshGRegion.h
@@ -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 *);
 };
diff --git a/Mesh/meshPartition.h b/Mesh/meshPartition.h
index 787d6218e3..928b5ea020 100644
--- a/Mesh/meshPartition.h
+++ b/Mesh/meshPartition.h
@@ -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
-- 
GitLab