diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f50b14233d566c2018c8d158b40d1a82361d468..1a88737ac267f2e47b1e5dee22d6692d654494c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,7 @@ opt(POPPLER "Enable Poppler for displaying PDF documents (experimental)" OFF) opt(QT "Enable dummy QT graphical interface proof-of-concept (experimental)" OFF) opt(RTREE "Enable RTREE (used for quad/hex mesh generation)" ${DEFAULT}) opt(SALOME "Enable Salome routines for CAD healing" ${DEFAULT}) +opt(SCIP "Enable SCIP optimization suite" OFF) opt(SGEOM "Enable SGEOM interface to OCC (experimental)" OFF) opt(SLEPC "Enable SLEPc eigensolvers (required for conformal compounds)" ${DEFAULT}) opt(SOLVER "Enable built-in finite element solvers (required for compounds)" ${DEFAULT}) @@ -1065,6 +1066,18 @@ if(ENABLE_ACIS) endif(ACIS_LIB) endif(ENABLE_ACIS) +if(ENABLE_SCIP) + find_library(SCIP_LIB scipopt PATH_SUFFIXES lib) + if(SCIP_LIB) + find_path(SCIP_INC "scip-3.1.0/src/scip/scip.h") + if(SCIP_INC) + set_config_option(HAVE_SCIP "SCIP") + list(APPEND EXTERNAL_LIBRARIES ${SCIP_LIB}) + list(APPEND EXTERNAL_INCLUDES "${SCIP_INC}/scip-3.1.0/src;${SCIP_INC}/soplex-2.0.0/src") + endif(SCIP_INC) + endif(SCIP_LIB) +endif(ENABLE_SCIP) + if(ENABLE_WRAP_PYTHON) find_package(SWIG) find_package(PythonLibs) diff --git a/Common/GmshConfig.h.in b/Common/GmshConfig.h.in index 5695622fd9d1d8c8c259fbc31586b0dd5d0f624d..cfd854f929ab2b3544d1fd0e9f7b6b6aaf976ec4 100644 --- a/Common/GmshConfig.h.in +++ b/Common/GmshConfig.h.in @@ -58,6 +58,7 @@ #cmakedefine HAVE_QT #cmakedefine HAVE_RTREE #cmakedefine HAVE_SALOME +#cmakedefine HAVE_SCIP #cmakedefine HAVE_SGEOM #cmakedefine HAVE_SLEPC #cmakedefine HAVE_SOLVER diff --git a/Numeric/MetricBasis.cpp b/Numeric/MetricBasis.cpp index 68c6f1a80134373f4e12c72c83f7b881ecd0a7d3..3e4ae55d3b1c6d078fee0365318388951e58d081 100644 --- a/Numeric/MetricBasis.cpp +++ b/Numeric/MetricBasis.cpp @@ -3,12 +3,23 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to the public mailing list <gmsh@geuz.org>. +#include "GmshConfig.h" #include "MetricBasis.h" -//#include "GmshDefines.h" #include "BasisFactory.h" #include "pointsGenerators.h" #include <cmath> +#if defined(HAVE_SCIP) +#include <scip/scip.h> +#include <soplex.h> + +void MaFonctionScip() +{ + SCIP *scip; + SCIPcreate(&scip); +} +#endif + MetricCoefficient::MetricCoefficient(MElement *el) : _element(el) { const int tag = el->getTypeForMSH();