diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 52f66e430eda04a5f2eae9594fb1d190e00125ed..8d7615a0efbf729da6fda6e1f80425d08ba10a32 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -1842,6 +1842,27 @@ void GModel::save(std::string fileName) GModel::setCurrent(temp); } +GFaceCompound* GModel::addCompoundFace(std::vector<GFace*> faces, int typeP, int typeS) +{ + + int num = getMaxElementaryNumber(2) + 1; + + std::list<GFace*> comp(faces.begin(), faces.end()); + std::list<GEdge*> U0; + + GFaceCompound::typeOfMapping typ = GFaceCompound::HARMONIC; + if (typeP == 1) typ = GFaceCompound::CONFORMAL; + if (typeP == 2) typ = GFaceCompound::RBF; + + printf("new compound %d \n", num); + GFaceCompound *gfc = new GFaceCompound(this, num, comp, U0, typ, typeS); + + add(gfc); + + return gfc; + +} + GVertex *GModel::addVertex(double x, double y, double z, double lc) { if(_factory) return _factory->addVertex(this, x, y, z, lc); diff --git a/Geo/GModel.h b/Geo/GModel.h index 3137fb8f420e5ad588cd3e32b7df32024455ecf3..3a4171cae82e96dc17c38e5283e0e2d49d1169ae 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -399,6 +399,7 @@ class GModel void setFactory(std::string name); // create brep geometry entities using the factory + GFaceCompound *addCompoundFace(std::vector<GFace*> faces, int typeP, int typeS); GVertex *addVertex(double x, double y, double z, double lc); GEdge *addLine(GVertex *v1, GVertex *v2); GEdge *addCircleArcCenter(double x, double y, double z, GVertex *start, GVertex *end); diff --git a/Geo/GModelFactory.cpp b/Geo/GModelFactory.cpp index 4577c3b3c0db3fc6759db8bae83f44202b212f70..52f2521bcb1cf6b02ea6692900668e11776b101c 100644 --- a/Geo/GModelFactory.cpp +++ b/Geo/GModelFactory.cpp @@ -15,6 +15,7 @@ #include "MLine.h" #include "GModel.h" + GVertex *GeoFactory::addVertex(GModel *gm, double x, double y, double z, double lc) { int num = gm->getMaxElementaryNumber(0) + 1; diff --git a/Geo/GModelFactory.h b/Geo/GModelFactory.h index 3688606632634b705b26700dc399ead70b8e1aec..c227f1db29b47b7f8f5abc34c94ca986d3dcb175 100644 --- a/Geo/GModelFactory.h +++ b/Geo/GModelFactory.h @@ -3,7 +3,7 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to <gmsh@geuz.org>. -#ifndef _GMODEL_FACTORY_H_ +#ifndef _GMODEL_FACT@ORY_H_ #define _GMODEL_FACTORY_H_ #include <vector> @@ -32,6 +32,7 @@ class GModelFactory { virtual GEdge *addLine(GModel *, GVertex *v1, GVertex *v2) = 0; virtual GFace *addPlanarFace(GModel *gm, std::vector<std::vector<GEdge *> > edges) = 0; virtual GRegion*addVolume(GModel *gm, std::vector<std::vector<GFace *> > faces) = 0; + virtual GEdge *addCircleArc(GModel *gm, const arcCreationMethod &method, GVertex *start, GVertex *end, const SPoint3 &aPoint) diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp index 45e91986f9dca4a9b3778d08bb244686314a790a..bda1b60b89fb0c42c853774fe86a2fce9fca63af 100644 --- a/Mesh/meshGFace.cpp +++ b/Mesh/meshGFace.cpp @@ -1744,7 +1744,7 @@ void deMeshGFace::operator() (GFace *gf) } // for debugging, change value from -1 to -100; -int debugSurface = -1 ; //-1; +int debugSurface = -1; //-1; void meshGFace::operator() (GFace *gf) { diff --git a/Solver/multiscaleLaplace.cpp b/Solver/multiscaleLaplace.cpp index 68817c620ad5319aa427809f826d2b93ae576314..d3f30e56d62662c9d24f7f4cc9fb971fc6672e0b 100644 --- a/Solver/multiscaleLaplace.cpp +++ b/Solver/multiscaleLaplace.cpp @@ -342,10 +342,10 @@ static void recur_compute_centers_ (double R, double a1, double a2, } //sort centers from left to right - //std::sort(centers.begin(),centers.end(), sort_pred(PL,PR)); + std::sort(centers.begin(),centers.end(), sort_pred(PL,PR)); //sort from distances - sort_centers_dist(centers, PL); + //sort_centers_dist(centers, PL); centers.insert(centers.begin(), std::make_pair(PL,zero)); centers.push_back(std::make_pair(PR,zero));