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

fix compile without Solver module

parent 8c907ce1
Branches
Tags
No related merge requests found
#include "GmshConfig.h" #include "GmshConfig.h"
#ifdef HAVE_LUA
#if defined(HAVE_LUA)
#include <iostream> #include <iostream>
#include <string> #include <string>
#include "Gmsh.h" #include "Gmsh.h"
...@@ -15,7 +16,9 @@ ...@@ -15,7 +16,9 @@
#include "Bindings.h" #include "Bindings.h"
#include "drawContext.h" #include "drawContext.h"
#include "GmshMessage.h" #include "GmshMessage.h"
#if defined(HAVE_SOLVER)
#include "linearSystemCSR.h" #include "linearSystemCSR.h"
#endif
extern "C" { extern "C" {
#include "lua.h" #include "lua.h"
...@@ -23,7 +26,7 @@ extern "C" { ...@@ -23,7 +26,7 @@ extern "C" {
#include "lauxlib.h" #include "lauxlib.h"
} }
#ifdef HAVE_READLINE #if defined(HAVE_READLINE)
#include "readline.h" #include "readline.h"
#include "history.h" #include "history.h"
#endif #endif
...@@ -332,10 +335,14 @@ binding::binding() ...@@ -332,10 +335,14 @@ binding::binding()
MElement::registerBindings(this); MElement::registerBindings(this);
MVertex::registerBindings(this); MVertex::registerBindings(this);
fullMatrix<double>::registerBindings(this); fullMatrix<double>::registerBindings(this);
function::registerBindings(this);
gmshOptions::registerBindings(this); gmshOptions::registerBindings(this);
Msg::registerBindings(this); Msg::registerBindings(this);
#if defined(HAVE_SOLVER)
function::registerBindings(this);
linearSystemCSRGmm<double>::registerBindings(this); linearSystemCSRGmm<double>::registerBindings(this);
#endif
} }
binding *binding::_instance=NULL; binding *binding::_instance=NULL;
#endif #endif
...@@ -132,18 +132,22 @@ class GFaceCompound : public GFace { ...@@ -132,18 +132,22 @@ class GFaceCompound : public GFace {
template<class scalar> class linearSystem; template<class scalar> class linearSystem;
class GFaceCompound : public GFace { class GFaceCompound : public GFace {
public: public:
typedef enum {HARMONIC=1,CONFORMAL=2, CONVEXCOMBINATION=3} typeOfMapping; typedef enum {HARMONIC=1,CONFORMAL=2, CONVEXCOMBINATION=3, MULTISCALE=4} typeOfMapping;
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*> &U1, std::list<GEdge*> &U0, std::list<GEdge*> &U1,
std::list<GEdge*> &V0, std::list<GEdge*> &V1, std::list<GEdge*> &V0, std::list<GEdge*> &V1,
linearSystem<double>* lsys =0, linearSystem<double>* lsys =0,
typeOfMapping typ = HARMONIC) : GFace(m, tag) typeOfMapping typ = HARMONIC, int allowPartition=1)
: GFace(m, tag)
{ {
Msg::Error("Gmsh has to be compiled with solver support to use GFaceCompounds"); Msg::Error("Gmsh has to be compiled with solver support to use GFaceCompounds");
} }
virtual ~GFaceCompound() {} virtual ~GFaceCompound() {}
GPoint point(double par1, double par2) const ; GPoint point(double par1, double par2) const { return GPoint(); }
Pair<SVector3, SVector3> firstDer(const SPoint2 &param) const; Pair<SVector3, SVector3> firstDer(const SPoint2 &param) const
{
return Pair<SVector3, SVector3>(SVector3(0, 0, 0), SVector3(0, 0, 0));
}
void secondDer(const SPoint2 &param, 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(); }
......
...@@ -18,12 +18,15 @@ ...@@ -18,12 +18,15 @@
#include "MTriangle.h" #include "MTriangle.h"
#include "MVertex.h" #include "MVertex.h"
#include "Octree.h" #include "Octree.h"
#if defined(HAVE_SOLVER)
#include "dofManager.h" #include "dofManager.h"
#include "laplaceTerm.h" #include "laplaceTerm.h"
#include "linearSystemGMM.h" #include "linearSystemGMM.h"
#include "linearSystemCSR.h" #include "linearSystemCSR.h"
#include "linearSystemFull.h" #include "linearSystemFull.h"
#include "linearSystemPETSc.h" #include "linearSystemPETSc.h"
#endif
// computes the characteristic length of the mesh at a vertex in order // computes the characteristic length of the mesh at a vertex in order
// to have the geometry captured with accuracy. A parameter called // to have the geometry captured with accuracy. A parameter called
...@@ -303,6 +306,7 @@ backgroundMesh::~backgroundMesh() ...@@ -303,6 +306,7 @@ backgroundMesh::~backgroundMesh()
void backgroundMesh::propagate1dMesh(GFace *_gf) void backgroundMesh::propagate1dMesh(GFace *_gf)
{ {
#if defined(HAVE_SOLVER)
std::list<GEdge*> e = _gf->edges(); std::list<GEdge*> e = _gf->edges();
std::list<GEdge*>::const_iterator it = e.begin(); std::list<GEdge*>::const_iterator it = e.begin();
std::map<MVertex*,double> sizes; std::map<MVertex*,double> sizes;
...@@ -371,10 +375,12 @@ void backgroundMesh::propagate1dMesh(GFace *_gf) ...@@ -371,10 +375,12 @@ void backgroundMesh::propagate1dMesh(GFace *_gf)
_sizes[v_2D] = value; _sizes[v_2D] = value;
} }
delete _lsys; delete _lsys;
#endif
} }
void backgroundMesh::updateSizes(GFace *_gf) void backgroundMesh::updateSizes(GFace *_gf)
{ {
#if defined(HAVE_SOLVER)
std::map<MVertex*,double>::iterator itv = _sizes.begin(); std::map<MVertex*,double>::iterator itv = _sizes.begin();
for ( ; itv != _sizes.end(); ++itv){ for ( ; itv != _sizes.end(); ++itv){
SPoint2 p; SPoint2 p;
...@@ -471,6 +477,7 @@ void backgroundMesh::updateSizes(GFace *_gf) ...@@ -471,6 +477,7 @@ void backgroundMesh::updateSizes(GFace *_gf)
_sizes[v_2D] = value; _sizes[v_2D] = value;
} }
delete _lsys; delete _lsys;
#endif
} }
double backgroundMesh::operator() (double u, double v, double w) const double backgroundMesh::operator() (double u, double v, double w) const
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "MEdge.h" #include "MEdge.h"
#include "MElement.h" #include "MElement.h"
#include "multiscaleLaplace.h" #include "multiscaleLaplace.h"
#include "Numeric.h"
#include "Context.h" #include "Context.h"
static void recur_connect(MVertex *v, static void recur_connect(MVertex *v,
...@@ -321,7 +322,7 @@ void multiscalePartition::setNumberOfPartitions(int &nbParts) ...@@ -321,7 +322,7 @@ void multiscalePartition::setNumberOfPartitions(int &nbParts)
void multiscalePartition::partition(partitionLevel & level, int nbParts, void multiscalePartition::partition(partitionLevel & level, int nbParts,
typeOfPartition method) typeOfPartition method)
{ {
#if defined(HAVE_METIS) || defined(HAVE_CHACO) #if defined(HAVE_SOLVER) && (defined(HAVE_METIS) || defined(HAVE_CHACO))
if (method == LAPLACIAN){ if (method == LAPLACIAN){
std::map<MVertex*, SPoint3> coordinates; std::map<MVertex*, SPoint3> coordinates;
......
...@@ -40,6 +40,7 @@ std::string GMSH_DistancePlugin::getHelp() const ...@@ -40,6 +40,7 @@ std::string GMSH_DistancePlugin::getHelp() const
PView *GMSH_DistancePlugin::execute(PView *v) PView *GMSH_DistancePlugin::execute(PView *v)
{ {
#if defined(HAVE_SOLVER)
std::vector<GEntity*> entities; std::vector<GEntity*> entities;
GModel::current()->getEntities(entities); GModel::current()->getEntities(entities);
...@@ -338,6 +339,6 @@ PView *GMSH_DistancePlugin::execute(PView *v) ...@@ -338,6 +339,6 @@ PView *GMSH_DistancePlugin::execute(PView *v)
// } // }
// fprintf(f2,"};\n"); // fprintf(f2,"};\n");
// fclose(f2); // fclose(f2);
#endif
return 0; return 0;
} }
...@@ -211,6 +211,8 @@ void PluginManager::registerDefaultPlugins() ...@@ -211,6 +211,8 @@ void PluginManager::registerDefaultPlugins()
("Triangulate", GMSH_RegisterTriangulatePlugin())); ("Triangulate", GMSH_RegisterTriangulatePlugin()));
allPlugins.insert(std::pair<std::string, GMSH_Plugin*> allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
("GSHHS", GMSH_RegisterGSHHSPlugin())); ("GSHHS", GMSH_RegisterGSHHSPlugin()));
allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
("ExtractEdges", GMSH_RegisterExtractEdgesPlugin()));
#if defined(HAVE_TETGEN) #if defined(HAVE_TETGEN)
allPlugins.insert(std::pair<std::string, GMSH_Plugin*> allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
("Tetrahedralize", GMSH_RegisterTetrahedralizePlugin())); ("Tetrahedralize", GMSH_RegisterTetrahedralizePlugin()));
...@@ -219,10 +221,10 @@ void PluginManager::registerDefaultPlugins() ...@@ -219,10 +221,10 @@ void PluginManager::registerDefaultPlugins()
allPlugins.insert(std::pair<std::string, GMSH_Plugin*> allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
("Homology", GMSH_RegisterHomologyComputationPlugin())); ("Homology", GMSH_RegisterHomologyComputationPlugin()));
#endif #endif
#if defined(HAVE_SOLVER)
allPlugins.insert(std::pair<std::string, GMSH_Plugin*> allPlugins.insert(std::pair<std::string, GMSH_Plugin*>
("Distance", GMSH_RegisterDistancePlugin())); ("Distance", GMSH_RegisterDistancePlugin()));
allPlugins.insert(std::pair<std::string, GMSH_Plugin*> #endif
("ExtractEdges", GMSH_RegisterExtractEdgesPlugin()));
} }
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment