diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp index 69e5ef2b176091d7dc43f0204c9e31b89e93e286..5f7ed66885eed3ff879eb869a09c8f3709d668bb 100644 --- a/Geo/GFaceCompound.cpp +++ b/Geo/GFaceCompound.cpp @@ -2,33 +2,36 @@ #include "gmshAssembler.h" #include "gmshLaplace.h" #include "Octree.h" -#include "gmshGmmLinearSystem.h" +#include "gmshLinearSystemGmm.h" static void fixEdgeToValue (GEdge *ed, double value, - gmshAssembler &myAssembler){ + gmshAssembler &myAssembler) +{ myAssembler.fixVertex(ed->getBeginVertex()->mesh_vertices[0], 0, 1, value); myAssembler.fixVertex(ed->getEndVertex()->mesh_vertices[0], 0, 1, value); - for (int i=0 ; i< ed->mesh_vertices.size();i++){ + for (int i = 0 ; i < ed->mesh_vertices.size(); i++){ myAssembler.fixVertex(ed->mesh_vertices[i],0, 1, value); } } static void fixEdgeToValueX (GEdge *ed, - gmshAssembler &myAssembler){ - for (int i=0 ; i< ed->lines.size();i++){ - myAssembler.fixVertex(ed->lines[i]->getVertex(0),0, 1, ed->lines[i]->getVertex(0)->x()); - myAssembler.fixVertex(ed->lines[i]->getVertex(1),0, 1, ed->lines[i]->getVertex(1)->x()); + gmshAssembler &myAssembler) +{ + for (int i = 0 ; i < ed->lines.size(); i++){ + myAssembler.fixVertex(ed->lines[i]->getVertex(0), 0, 1, ed->lines[i]->getVertex(0)->x()); + myAssembler.fixVertex(ed->lines[i]->getVertex(1), 0, 1, ed->lines[i]->getVertex(1)->x()); } } static void fixEdgeToValueY (GEdge *ed, - gmshAssembler &myAssembler){ - for (int i=0 ; i< ed->lines.size();i++){ - myAssembler.fixVertex(ed->lines[i]->getVertex(0),0, 1, ed->lines[i]->getVertex(0)->y()); - myAssembler.fixVertex(ed->lines[i]->getVertex(1),0, 1, ed->lines[i]->getVertex(1)->y()); + gmshAssembler &myAssembler) +{ + for (int i = 0 ; i < ed->lines.size(); i++){ + myAssembler.fixVertex(ed->lines[i]->getVertex(0), 0, 1, ed->lines[i]->getVertex(0)->y()); + myAssembler.fixVertex(ed->lines[i]->getVertex(1), 0, 1, ed->lines[i]->getVertex(1)->y()); } } @@ -45,7 +48,6 @@ void GFaceCompound::getBoundingEdges () return; } - std::set<GEdge*> _unique; std::list<GFace*> :: iterator it = _compound.begin(); for ( ; it != _compound.end() ; ++it){ @@ -75,7 +77,9 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound, printf("%d %d %d %d \n",_U0.size(),_U1.size(),_V0.size(),_V1.size()); getBoundingEdges(); } -GFaceCompound::~GFaceCompound(){ + +GFaceCompound::~GFaceCompound() +{ if (oct){ Octree_Delete(oct); delete [] _gfct; @@ -167,7 +171,8 @@ void GFaceCompound::parametrize (bool _isU) const } -GPoint GFaceCompound::point(double par1, double par2) const { +GPoint GFaceCompound::point(double par1, double par2) const +{ parametrize(); double U,V; MTriangle *t; @@ -181,12 +186,10 @@ GPoint GFaceCompound::point(double par1, double par2) const { /* computing dX/du and dX/dv - - - */ -Pair<SVector3,SVector3> GFaceCompound::firstDer(const SPoint2 ¶m) const{ +Pair<SVector3,SVector3> GFaceCompound::firstDer(const SPoint2 ¶m) const +{ parametrize(); double U,V; MTriangle *t; @@ -197,7 +200,8 @@ Pair<SVector3,SVector3> GFaceCompound::firstDer(const SPoint2 ¶m) const{ SVector3(jac[1][0],jac[1][1],jac[1][2])); } -static void GFaceCompoundBB(void *a, double*mmin, double*mmax){ +static void GFaceCompoundBB(void *a, double*mmin, double*mmax) +{ GFaceCompoundTriangle *t = (GFaceCompoundTriangle *)a; mmin[0] = std::min(std::min(t->p1.x(),t->p2.x()),t->p3.x()); mmin[1] = std::min(std::min(t->p1.y(),t->p2.y()),t->p3.y()); @@ -206,14 +210,17 @@ static void GFaceCompoundBB(void *a, double*mmin, double*mmax){ mmin[2] = -1; mmax[2] = 1; } -static void GFaceCompoundCentroid(void *a, double*c){ + +static void GFaceCompoundCentroid(void *a, double*c) +{ GFaceCompoundTriangle *t = (GFaceCompoundTriangle *)a; c[0] = (t->p1.x() + t->p2.x() + t->p3.x())/3.0; c[1] = (t->p1.y() + t->p2.y() + t->p3.y())/3.0; c[2] = 0.0; } -static int GFaceCompoundInEle(void *a, double*c){ +static int GFaceCompoundInEle(void *a, double*c) +{ GFaceCompoundTriangle *t = (GFaceCompoundTriangle *)a; double M[2][2],R[2],X[2]; const double eps = 1.e-6; @@ -235,10 +242,10 @@ static int GFaceCompoundInEle(void *a, double*c){ return 0; } - void GFaceCompound::getTriangle (double u, double v, MTriangle **t, - double &_u, double &_v)const { + double &_u, double &_v) const +{ parametrize(); double uv[3] = {u,v,0}; @@ -262,10 +269,6 @@ void GFaceCompound::getTriangle (double u, double v, _v = X[1]; return; - - - - // std::list<GFace*> :: const_iterator it = _compound.begin(); // for ( ; it != _compound.end() ; ++it){ // for ( int i=0;i<(*it)->triangles.size() ; ++i){ @@ -301,8 +304,8 @@ void GFaceCompound::getTriangle (double u, double v, // *t = 0; } -void GFaceCompound::buildOct() const { - +void GFaceCompound::buildOct() const +{ SBoundingBox3d bb; int count; std::list<GFace*> :: const_iterator it = _compound.begin(); @@ -327,7 +330,6 @@ void GFaceCompound::buildOct() const { it = _compound.begin(); count = 0; - FILE * uvx = fopen ("UVX.pos","w"); FILE * uvy = fopen ("UVY.pos","w"); FILE * uvz = fopen ("UVZ.pos","w"); diff --git a/Geo/Makefile b/Geo/Makefile index 7231bb427961376b1916eb05ec9ca1019af5c1a7..6964533be169c8fbba39ac8b858abda36a4dd1ec 100644 --- a/Geo/Makefile +++ b/Geo/Makefile @@ -111,7 +111,7 @@ GFaceCompound.o: GFaceCompound.cpp GFaceCompound.h Geo.h \ ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Message.h \ ../Numeric/FunctionSpace.h ../Common/Octree.h \ - ../Common/OctreeInternals.h ../Numeric/gmshGmmLinearSystem.h \ + ../Common/OctreeInternals.h ../Numeric/gmshLinearSystemGmm.h \ ../Numeric/gmshLinearSystem.h GRegion.o: GRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \ diff --git a/Mesh/Makefile b/Mesh/Makefile index b8001617fde51f6f48b41d9ba2c6eb1f41b25d87..c68a1478197ec9f9f11c564d86c2f06c9d55672a 100644 --- a/Mesh/Makefile +++ b/Mesh/Makefile @@ -126,7 +126,7 @@ gmshSmoothHighOrder.o: gmshSmoothHighOrder.cpp gmshSmoothHighOrder.h \ ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Common/Message.h ../Numeric/FunctionSpace.h \ ../Numeric/gmshElasticity.h ../Numeric/gmshTermOfFormulation.h \ - ../Numeric/gmshGmmLinearSystem.h ../Numeric/gmshLinearSystem.h + ../Numeric/gmshLinearSystemGmm.h ../Numeric/gmshLinearSystem.h meshGEdge.o: meshGEdge.cpp ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ diff --git a/Mesh/gmshSmoothHighOrder.cpp b/Mesh/gmshSmoothHighOrder.cpp index e57c8841f6fc3615342b47b18a920989c5bd7f35..7472026bd8663cd3387672d262267320665020a6 100644 --- a/Mesh/gmshSmoothHighOrder.cpp +++ b/Mesh/gmshSmoothHighOrder.cpp @@ -3,7 +3,7 @@ #include "gmshAssembler.h" #include "gmshLaplace.h" #include "gmshElasticity.h" -#include "gmshGmmLinearSystem.h" +#include "gmshLinearSystemGmm.h" #include "GFace.h" #include "GRegion.h" diff --git a/Numeric/gmshGmmLinearSystem.h b/Numeric/gmshLinearSystemGmm.h similarity index 100% rename from Numeric/gmshGmmLinearSystem.h rename to Numeric/gmshLinearSystemGmm.h