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

fix compile

parent 12c39b7f
No related branches found
No related tags found
No related merge requests found
...@@ -318,12 +318,10 @@ double goldenSectionSearch(const GEdge *ge, const SPoint3 &q, double x1, ...@@ -318,12 +318,10 @@ double goldenSectionSearch(const GEdge *ge, const SPoint3 &q, double x1,
GPoint GEdge::closestPoint(const SPoint3 &q, double &t) const GPoint GEdge::closestPoint(const SPoint3 &q, double &t) const
{ {
// printf("looking for closest point in curve %d to point %g %g\n",tag(),q.x(),q.y()); // printf("looking for closest point in curve %d to point %g %g\n",tag(),q.x(),q.y());
const int nbSamples = 100; const int nbSamples = 100;
double tolerance = 1.e-12;
Range<double> interval = parBounds(0); Range<double> interval = parBounds(0);
double tMin = std::min(interval.high(), interval.low()); double tMin = std::min(interval.high(), interval.low());
...@@ -342,7 +340,7 @@ GPoint GEdge::closestPoint(const SPoint3 &q, double &t) const ...@@ -342,7 +340,7 @@ GPoint GEdge::closestPoint(const SPoint3 &q, double &t) const
} }
} }
// printf("parameter %g as an initial guess (dist = %g)\n",topt,DMIN); // printf("parameter %g as an initial guess (dist = %g)\n",topt,DMIN);
if (topt == tMin) if (topt == tMin)
t = goldenSectionSearch (this, q, topt, topt + DT/2, topt + DT, 1.e-7); t = goldenSectionSearch (this, q, topt, topt + DT/2, topt + DT, 1.e-7);
...@@ -352,9 +350,8 @@ GPoint GEdge::closestPoint(const SPoint3 &q, double &t) const ...@@ -352,9 +350,8 @@ GPoint GEdge::closestPoint(const SPoint3 &q, double &t) const
t = goldenSectionSearch (this, q, topt - DT, topt, topt + DT, 1.e-7); t = goldenSectionSearch (this, q, topt - DT, topt, topt + DT, 1.e-7);
const SVector3 dp = q - position(t); const SVector3 dp = q - position(t);
const double D = dp.norm(); // const double D = dp.norm();
// printf("after golden section parameter %g (dist = %g)\n",t,D);
// printf("after golden section parameter %g (dist = %g)\n",t,D);
return point(t); return point(t);
} }
......
...@@ -59,7 +59,7 @@ class GRbf; ...@@ -59,7 +59,7 @@ class GRbf;
class GFaceCompound : public GFace { class GFaceCompound : public GFace {
public: public:
typedef enum {ITERU=0,ITERV=1,ITERD=2} iterationStep; typedef enum {ITERU=0,ITERV=1,ITERD=2} iterationStep;
typedef enum {HARMONIC_CIRCLE=0, CONFORMAL_SPECTRAL=1, RADIAL_BASIS=2, HARMONIC_PLANE=3, typedef enum {HARMONIC_CIRCLE=0, CONFORMAL_SPECTRAL=1, RADIAL_BASIS=2, HARMONIC_PLANE=3,
CONVEX_CIRCLE=4,CONVEX_PLANE=5, HARMONIC_SQUARE=6, CONFORMAL_FE=7} typeOfCompound; CONVEX_CIRCLE=4,CONVEX_PLANE=5, HARMONIC_SQUARE=6, CONFORMAL_FE=7} typeOfCompound;
typedef enum {HARMONIC=0,CONFORMAL=1, RBF=2, CONVEX=3} typeOfMapping; typedef enum {HARMONIC=0,CONFORMAL=1, RBF=2, CONVEX=3} typeOfMapping;
typedef enum {UNITCIRCLE, MEANPLANE, SQUARE, ALREADYFIXED,SPECTRAL, FE} typeOfIsomorphism; typedef enum {UNITCIRCLE, MEANPLANE, SQUARE, ALREADYFIXED,SPECTRAL, FE} typeOfIsomorphism;
...@@ -102,7 +102,7 @@ class GFaceCompound : public GFace { ...@@ -102,7 +102,7 @@ class GFaceCompound : public GFace {
ANNdistArray dist; ANNdistArray dist;
#endif #endif
void buildOct() const ; void buildOct() const ;
void buildAllNodes() const; void buildAllNodes() const;
//different type of parametrizations //different type of parametrizations
void parametrize(iterationStep, typeOfMapping) const; void parametrize(iterationStep, typeOfMapping) const;
...@@ -121,12 +121,12 @@ class GFaceCompound : public GFace { ...@@ -121,12 +121,12 @@ class GFaceCompound : public GFace {
void fillNeumannBCS_Plane() const; void fillNeumannBCS_Plane() const;
void orientFillTris(std::list<MTriangle*> loopfillTris)const; void orientFillTris(std::list<MTriangle*> loopfillTris)const;
void printFillTris()const; void printFillTris()const;
void computeNormals () const; void computeNormals () const;
void getBoundingEdges(); void getBoundingEdges();
void getUniqueEdges(std::set<GEdge*> &_unique); void getUniqueEdges(std::set<GEdge*> &_unique);
void computeALoop(std::set<GEdge*> &_unique, std::list<GEdge*> &); void computeALoop(std::set<GEdge*> &_unique, std::list<GEdge*> &);
void getTriangle(double u, double v, GFaceCompoundTriangle **lt, void getTriangle(double u, double v, GFaceCompoundTriangle **lt,
double &_u, double &_v) const; double &_u, double &_v) const;
virtual double locCurvature(MTriangle *t, double u, double v) const; virtual double locCurvature(MTriangle *t, double u, double v) const;
...@@ -135,20 +135,20 @@ class GFaceCompound : public GFace { ...@@ -135,20 +135,20 @@ class GFaceCompound : public GFace {
bool trivial() const; bool trivial() const;
void printStuff(int iNewton=0) const; void printStuff(int iNewton=0) const;
public: public:
GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound, GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
std::list<GEdge*> &U0, typeOfCompound typ = HARMONIC_CIRCLE, std::list<GEdge*> &U0, typeOfCompound typ = HARMONIC_CIRCLE,
int allowPartition=1, int allowPartition=1,
linearSystem<double>* lsys =0); linearSystem<double>* lsys =0);
GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound, GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
std::list<GEdge*> &U0, std::list<GEdge*> &V0, std::list<GEdge*> &U0, std::list<GEdge*> &V0,
std::list<GEdge*> &U1, std::list<GEdge*> &V1, std::list<GEdge*> &U1, std::list<GEdge*> &V1,
typeOfCompound typ = HARMONIC_CIRCLE, typeOfCompound typ = HARMONIC_CIRCLE,
int allowPartition=1, int allowPartition=1,
linearSystem<double>* lsys =0); linearSystem<double>* lsys =0);
~GFaceCompound(); ~GFaceCompound();
Range<double> parBounds(int i) const Range<double> parBounds(int i) const
{ return trivial() ? (*(_compound.begin()))->parBounds(i) : Range<double>(-1, 1); } { return trivial() ? (*(_compound.begin()))->parBounds(i) : Range<double>(-1, 1); }
GPoint point(double par1, double par2) const; GPoint point(double par1, double par2) const;
...@@ -156,7 +156,7 @@ class GFaceCompound : public GFace { ...@@ -156,7 +156,7 @@ class GFaceCompound : public GFace {
SPoint2 parFromPoint(const SPoint3 &p, bool onSurface=true) const; SPoint2 parFromPoint(const SPoint3 &p, bool onSurface=true) const;
SPoint2 parFromVertex(MVertex *v) const; SPoint2 parFromVertex(MVertex *v) const;
virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const; virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const;
virtual void secondDer(const SPoint2 &, SVector3 *, SVector3 *, SVector3 *) const; virtual void secondDer(const SPoint2 &, SVector3 *, SVector3 *, SVector3 *) const;
virtual GEntity::GeomType geomType() const { return CompoundSurface; } virtual GEntity::GeomType geomType() const { return CompoundSurface; }
ModelType getNativeType() const { return GmshModel; } ModelType getNativeType() const { return GmshModel; }
void * getNativePtr() const { return 0; } void * getNativePtr() const { return 0; }
...@@ -177,8 +177,8 @@ class GFaceCompound : public GFace { ...@@ -177,8 +177,8 @@ class GFaceCompound : public GFace {
int allowPartition() const{ return _allowPartition; } int allowPartition() const{ return _allowPartition; }
void setType(typeOfIsomorphism type){ _type=type;} void setType(typeOfIsomorphism type){ _type=type;}
// useful for mesh generators // useful for mesh generators
GPoint intersectionWithCircle (const SVector3 &n1, const SVector3 &n2, const SVector3 &p, GPoint intersectionWithCircle (const SVector3 &n1, const SVector3 &n2, const SVector3 &p,
const double &d, double uv[2]) const; const double &d, double uv[2]) const;
private: private:
...@@ -195,13 +195,13 @@ template<class scalar> class linearSystem; ...@@ -195,13 +195,13 @@ template<class scalar> class linearSystem;
class GFaceCompound : public GFace { class GFaceCompound : public GFace {
public: public:
typedef enum {ITERU=0,ITERV=1,ITERD=2} iterationStep; typedef enum {ITERU=0,ITERV=1,ITERD=2} iterationStep;
typedef enum {HARMONIC_CIRCLE=0, CONFORMAL_SPECTRAL=1, RADIAL_BASIS=2, HARMONIC_PLANE=3, typedef enum {HARMONIC_CIRCLE=0, CONFORMAL_SPECTRAL=1, RADIAL_BASIS=2, HARMONIC_PLANE=3,
CONVEX_CIRCLE=4,CONVEX_PLANE=5, HARMONIC_SQUARE=6, CONFORMAL_FE=7} typeOfCompound; CONVEX_CIRCLE=4,CONVEX_PLANE=5, HARMONIC_SQUARE=6, CONFORMAL_FE=7} typeOfCompound;
typedef enum {HARMONIC=0,CONFORMAL=1, RBF=2, CONVEX=3} typeOfMapping; typedef enum {HARMONIC=0,CONFORMAL=1, RBF=2, CONVEX=3} typeOfMapping;
typedef enum {UNITCIRCLE, MEANPLANE, SQUARE, ALREADYFIXED,SPECTRAL, FE} typeOfIsomorphism; typedef enum {UNITCIRCLE, MEANPLANE, SQUARE, ALREADYFIXED,SPECTRAL, FE} typeOfIsomorphism;
GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound, GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
std::list<GEdge*> &U0, typeOfMapping typ = HARMONIC, std::list<GEdge*> &U0, typeOfMapping typ = HARMONIC,
int allowPartition=1, int allowPartition=1,
linearSystem<double>* lsys =0) linearSystem<double>* lsys =0)
: GFace(m, tag) : GFace(m, tag)
{ {
...@@ -210,8 +210,8 @@ class GFaceCompound : public GFace { ...@@ -210,8 +210,8 @@ class GFaceCompound : public GFace {
GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound, GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
std::list<GEdge*> &U0, std::list<GEdge*> &V0, std::list<GEdge*> &U0, std::list<GEdge*> &V0,
std::list<GEdge*> &U1, std::list<GEdge*> &V1, std::list<GEdge*> &U1, std::list<GEdge*> &V1,
typeOfCompound typ = HARMONIC_CIRCLE, typeOfCompound typ = HARMONIC_CIRCLE,
int allowPartition=1, int allowPartition=1,
linearSystem<double>* lsys =0) linearSystem<double>* lsys =0)
: GFace(m, tag) : GFace(m, tag)
{ {
...@@ -223,7 +223,8 @@ class GFaceCompound : public GFace { ...@@ -223,7 +223,8 @@ class GFaceCompound : public GFace {
{ {
return Pair<SVector3, SVector3>(SVector3(0, 0, 0), SVector3(0, 0, 0)); return Pair<SVector3, SVector3>(SVector3(0, 0, 0), SVector3(0, 0, 0));
} }
void secondDer(const SPoint2 &param, SPoint2 parFromVertex(MVertex *v) const { return SPoint2(); }
void secondDer(const SPoint2 &param,
SVector3 *dudu, SVector3 *dvdv, SVector3 *dudv) const{} SVector3 *dudu, SVector3 *dvdv, SVector3 *dudv) const{}
virtual SPoint2 getCoordinates(MVertex *v) const { return SPoint2(); } virtual SPoint2 getCoordinates(MVertex *v) const { return SPoint2(); }
void parametrize() const {} void parametrize() const {}
......
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