From b0d1bb6a2a19c01a31b55e066010d4b0abc5d242 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sat, 5 Mar 2011 12:56:54 +0000 Subject: [PATCH] fix compile w/o bfgs --- Geo/GFace.cpp | 2 +- Mesh/meshGFaceLloyd.cpp | 17 ++++++----------- Mesh/meshGFaceLloyd.h | 8 ++++++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp index 2ff748e8a0..09905244b9 100644 --- a/Geo/GFace.cpp +++ b/Geo/GFace.cpp @@ -1164,7 +1164,7 @@ bool GFace::fillPointCloud(double maxDist, std::vector<SPoint3> *points, void GFace::lloyd(int nbiter, int infn) { -#if defined(HAVE_MESH) +#if defined(HAVE_MESH) && defined(HAVE_BFGS) lloydAlgorithm algo(nbiter, infn); algo(this); #endif diff --git a/Mesh/meshGFaceLloyd.cpp b/Mesh/meshGFaceLloyd.cpp index 7872cc2e00..adacce0b57 100644 --- a/Mesh/meshGFaceLloyd.cpp +++ b/Mesh/meshGFaceLloyd.cpp @@ -1,4 +1,9 @@ #include <set> +#include <fstream> + +#include "GmshConfig.h" +#if defined(HAVE_BFGS) + #include "meshGFaceLloyd.h" #include "DivideAndConquer.h" #include "GFace.h" @@ -8,13 +13,6 @@ #include "Context.h" #include "meshGFace.h" #include "BackgroundMesh.h" -#include <fstream> -#include "ap.h" -#include "alglibinternal.h" -#include "alglibmisc.h" -#include "linalg.h" -#include "optimization.h" - /****************fonction callback****************/ @@ -77,10 +75,6 @@ class gradientCallback { }; -void topology(const alglib::real_1d_array &x,double func,void *ptr){ -} - - /****************fonctions principales****************/ /*****************************************************/ @@ -1152,3 +1146,4 @@ SPoint2 boundary_edge::get_p2(){ } +#endif diff --git a/Mesh/meshGFaceLloyd.h b/Mesh/meshGFaceLloyd.h index 90b2e42638..b40bc46a9e 100644 --- a/Mesh/meshGFaceLloyd.h +++ b/Mesh/meshGFaceLloyd.h @@ -5,8 +5,12 @@ #ifndef _MESH_GFACE_LLOYD_H_ #define _MESH_GFACE_LLOYD_H_ + #include "fullMatrix.h" #include "DivideAndConquer.h" +#include "GmshConfig.h" + +#if defined(HAVE_BFGS) #include "ap.h" #include "alglibinternal.h" #include "alglibmisc.h" @@ -16,8 +20,6 @@ class GFace; class boundary_edge; -void topology(const alglib::real_1d_array &,double,void*); - class lloydAlgorithm { int ITER_MAX; bool infiniteNorm; @@ -101,3 +103,5 @@ class boundary_edge{ }; #endif + +#endif -- GitLab