From 56eada36004cfa443765b86631d25e92187aabbd Mon Sep 17 00:00:00 2001 From: Gauthier Becker <gauthierbecker@gmail.com> Date: Thu, 22 Aug 2013 07:50:11 +0000 Subject: [PATCH] Fix minimal compile i.e. without ANN and TETGEN --- Geo/GFaceCompound.h | 1 + Mesh/Field.h | 31 +++++++++++++++++++++++++++++++ Mesh/meshGRegion.cpp | 8 +++++++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/Geo/GFaceCompound.h b/Geo/GFaceCompound.h index e086c40a65..f97a9fb072 100644 --- a/Geo/GFaceCompound.h +++ b/Geo/GFaceCompound.h @@ -230,6 +230,7 @@ class GFaceCompound : public GFace { GPoint intersectionWithCircle (const SVector3 &n1, const SVector3 &n2, const SVector3 &p, const double &d, double uv[2]) const { return GPoint(); } int allowPartition() const{ return 1; } + void deleteInternals(){} }; #endif diff --git a/Mesh/Field.h b/Mesh/Field.h index 7914f3c8cd..79108e57d2 100644 --- a/Mesh/Field.h +++ b/Mesh/Field.h @@ -165,7 +165,38 @@ class BoundaryLayerField : public Field { void setupFor3d(); void removeAttractors(); }; +#else +class BoundaryLayerField : public Field { + public: + double hwall_n,hwall_t,ratio,hfar,thickness,fan_angle; + double current_distance, tgt_aniso_ratio; + SPoint3 _closest_point; + int iRecombine, iIntersect; + //AttractorField *current_closest; + virtual bool isotropic () const {return false;} + virtual const char *getName(){return "";} + virtual std::string getDescription(){return "";} + BoundaryLayerField() : hwall_n(0.), hwall_t(0.), ratio(0.), + hfar(0.), thickness(0.), fan_angle(0.), + current_distance(0.), tgt_aniso_ratio(0.), + _closest_point(0.,0.,0.), iRecombine(0), iIntersect(0) + //current_closest(NULL) + { + Msg::Error("You must compile with ANN to use BoundaryLayerField"); + } + ~BoundaryLayerField() {} + virtual double operator() (double x, double y, double z, GEntity *ge=0){return 0.;} + virtual void operator() (double x, double y, double z, SMetric3 &metr, GEntity *ge=0){} + bool isFaceBL (int iF) const {return false;} + bool isEdgeBL (int iE) const {return false;} + bool isVertexBL (int iV) const {return false;} + void computeFor1dMesh(double x, double y, double z, SMetric3 &metr){return;} + void setupFor2d(int iF){return;} + void setupFor3d(){return;} + void removeAttractors(){return;} +}; #endif + class FieldOptionString : public FieldOption { public: diff --git a/Mesh/meshGRegion.cpp b/Mesh/meshGRegion.cpp index 09c4e28d9c..7b6aa0e486 100644 --- a/Mesh/meshGRegion.cpp +++ b/Mesh/meshGRegion.cpp @@ -1066,6 +1066,7 @@ void _relocateVertex(MVertex *ver, } } +#if defined(HAVE_TETGEN) bool CreateAnEmptyVolumeMesh(GRegion *gr){ printf("creating an empty volume mesh\n"); splitQuadRecovery sqr; @@ -1088,7 +1089,12 @@ bool CreateAnEmptyVolumeMesh(GRegion *gr){ TransferTetgenMesh(gr, in, out, numberedV); return true; } - +#else +bool CreateAnEmptyVolumeMesh(GRegion *gr){ + Msg::Error("You should compile with TETGEN in order to create an empty volume mesh"); + return false; +} +#endif // HAVE_TETGEN#endif // HAVE_TETGEN#endif // HAVE_TETGEN void MeshDelaunayVolume(std::vector<GRegion*> ®ions) { -- GitLab