diff --git a/Common/Context.cpp b/Common/Context.cpp index 36681e5500eb363a841d56d2cf7270f97b81b4d0..4bd44431204734e4c52974de02b2ac450e6275aa 100644 --- a/Common/Context.cpp +++ b/Common/Context.cpp @@ -78,7 +78,8 @@ CTX::CTX() mesh.volumesEdges = mesh.volumesFaces = mesh.surfacesEdges = mesh.surfacesFaces = 0; mesh.volumesFaces = mesh.surfacesEdges = mesh.surfacesFaces = 0; mesh.smoothInternalEdges = mesh.smoothNormals = mesh.reverseAllNormals = 0; - mesh.explode = mesh.numSubEdges = mesh.angleSmoothNormals = 0; + mesh.explode = mesh.angleSmoothNormals = 0.; + mesh.numSubEdges = 0; mesh.colorCarousel = 0; color.mesh.tangents = color.mesh.tetrahedron = color.mesh.triangle = 0; color.mesh.prism = color.mesh.pyramid = color.mesh.hexahedron = 0; diff --git a/Mesh/meshGFaceBoundaryLayers.cpp b/Mesh/meshGFaceBoundaryLayers.cpp index 87b6e5ba0b0dd0aaef31eade9944425aac8a76d2..794bfd6f1ba93c917067ba7a554b702487285388 100644 --- a/Mesh/meshGFaceBoundaryLayers.cpp +++ b/Mesh/meshGFaceBoundaryLayers.cpp @@ -187,7 +187,7 @@ BoundaryLayerColumns* buidAdditionalPoints2D (GFace *gf, double _treshold) { _dirs.push_back(x); } else if (angle >= _treshold){ - int fanSize = angle / _treshold; + int fanSize = (int)(angle / _treshold); printf("ONE FAN HAS BEEN CREATED : %d %d %d %d ANGLE = %g | %g %g %g %g\n",e1.getVertex(0)->getNum(), e1.getVertex(1)->getNum(),e2.getVertex(0)->getNum(),e2.getVertex(1)->getNum(), angle/M_PI*180,N1[0].x(),N1[0].y(),N2[0].x(),N2[0].y()); diff --git a/Numeric/DivideAndConquer.cpp b/Numeric/DivideAndConquer.cpp index 2ab5ea79d171ad8231eb9fb353a96a428b3f5559..55ce4be000c6848e67723720d45ba6f1a70955db 100644 --- a/Numeric/DivideAndConquer.cpp +++ b/Numeric/DivideAndConquer.cpp @@ -865,7 +865,8 @@ void DocRecord::setPoints(fullMatrix<double> *p) } } -void DocRecord::recur_tag_triangles(int iTriangle,std::set<int>& taggedTriangles,std::map<std::pair<void*,void*>,std::pair<int,int> >& edgesToTriangles){ +void DocRecord::recur_tag_triangles(int iTriangle,std::set<int>& taggedTriangles,std::map<std::pair<void*,void*>,std::pair<int,int> >& edgesToTriangles) +{ if(taggedTriangles.find(iTriangle)!=taggedTriangles.end()) return; taggedTriangles.insert(iTriangle); @@ -885,7 +886,8 @@ void DocRecord::recur_tag_triangles(int iTriangle,std::set<int>& taggedTriangles } } -std::set<int> DocRecord::tagInterior(double x,double y){ +std::set<int> DocRecord::tagInterior(double x,double y) +{ std::map<std::pair<void*,void*>,std::pair<int,int> > edgesToTriangles; int iFirst = 1; for(int i=0;i<numTriangles;i++){ @@ -921,7 +923,8 @@ std::set<int> DocRecord::tagInterior(double x,double y){ return taggedTriangles; } -void DocRecord::concave(double x,double y,GFace* gf){ +void DocRecord::concave(double x,double y,GFace* gf) +{ int i; int index1; int index2; @@ -969,7 +972,8 @@ void DocRecord::concave(double x,double y,GFace* gf){ } } -bool DocRecord::contain(int index1,int index2,int index3){ +bool DocRecord::contain(int index1,int index2,int index3) +{ int i; void* dataA; void* dataB; @@ -986,20 +990,23 @@ bool DocRecord::contain(int index1,int index2,int index3){ return 0; } -void DocRecord::add(int index1,int index2){ +void DocRecord::add(int index1,int index2) +{ void* data; data = points[index2].data; points[index1].vicinity.push_back(data); } -void DocRecord::initialize(){ +void DocRecord::initialize() +{ int i; for(i=0;i<numPoints;i++){ points[i].flag = 0; } } -bool DocRecord::remove_point(int index){ +bool DocRecord::remove_point(int index) +{ if(points[index].flag == 0){ points[index].flag = 1; return 1; @@ -1007,7 +1014,8 @@ bool DocRecord::remove_point(int index){ else return 0; } -void DocRecord::remove_all(){ +void DocRecord::remove_all() +{ int i; int index; int numPoints2; @@ -1035,7 +1043,8 @@ void DocRecord::remove_all(){ numPoints = numPoints2; } -void DocRecord::add_point(double x,double y,GFace*face){ +void DocRecord::add_point(double x,double y,GFace*face) +{ PointRecord point; point.where.h = x; point.where.v = y; @@ -1044,7 +1053,8 @@ void DocRecord::add_point(double x,double y,GFace*face){ numPoints = numPoints+1; } -void DocRecord::build_edges(){ +void DocRecord::build_edges() +{ int i; int j; int num; @@ -1063,11 +1073,13 @@ void DocRecord::build_edges(){ } } -void DocRecord::clear_edges(){ +void DocRecord::clear_edges() +{ mesh_edges.clear(); } -bool DocRecord::delaunay_conformity(GFace* gf){ +bool DocRecord::delaunay_conformity(GFace* gf) +{ int i; bool flag; GEdge* edge; @@ -1086,9 +1098,8 @@ bool DocRecord::delaunay_conformity(GFace* gf){ vertex1 = element->getVertex(0); vertex2 = element->getVertex(1); flag = find_edge(vertex1,vertex2); - if(!flag) return 0; + if(!flag) return false; } } - return 1; + return true; } - \ No newline at end of file