From 7f06e908b2e1cafd48df7ae5b1d64363441115dd Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 15 Sep 2009 20:42:17 +0000 Subject: [PATCH] small fixes --- CMakeLists.txt | 8 ++++---- Common/GmshConfig.h.in | 1 + Mesh/Field.cpp | 4 ---- Mesh/Field.h | 6 +++--- Post/PViewVertexArrays.cpp | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bebeb6759..a86cba2199 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,7 @@ option(ENABLE_OSMESA "Use OSMesa for offscreen rendering" OFF) option(ENABLE_PARSER "Build the GEO file parser" ON) option(ENABLE_POST "Build the post-processing module" ON) option(ENABLE_QT "Build QT GUI" OFF) -option(ENABLE_SOLVER "Build Gmsh with the gsolver finite element library" OFF) +option(ENABLE_SOLVER "Build the finite element solver code" OFF) option(ENABLE_TAUCS "Enable Taucs linear algebra solver" ON) option(ENABLE_TETGEN "Enable Tetgen mesh generator" ON) option(ENABLE_TETGEN_NEW "Enable experimental version of Tetgen" OFF) @@ -486,9 +486,9 @@ endif(ENABLE_TAUCS) if(ENABLE_SOLVER) add_subdirectory(Solver) - set(HAVE_GSOLVER TRUE) - list(APPEND CONFIG_OPTIONS "gsolver") -endif(ENABLE_NETGEN) + set(HAVE_SOLVER TRUE) + list(APPEND CONFIG_OPTIONS "Solver") +endif(ENABLE_SOLVER) if(ENABLE_OCC) if(WIN32) diff --git a/Common/GmshConfig.h.in b/Common/GmshConfig.h.in index 065909fc38..e556abbcc3 100644 --- a/Common/GmshConfig.h.in +++ b/Common/GmshConfig.h.in @@ -36,6 +36,7 @@ #cmakedefine HAVE_OPENGL #cmakedefine HAVE_OSMESA #cmakedefine HAVE_QT +#cmakedefine HAVE_SOLVER #cmakedefine HAVE_TAUCS #cmakedefine HAVE_TETGEN diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp index e8ae1a4034..bb0518575f 100644 --- a/Mesh/Field.cpp +++ b/Mesh/Field.cpp @@ -1388,10 +1388,6 @@ FieldManager::FieldManager() background_field = -1; } -Field::Field() -{ -} - #if !defined(HAVE_NO_POST) void Field::putOnNewView() { diff --git a/Mesh/Field.h b/Mesh/Field.h index d4ca54e45b..131e94bac6 100644 --- a/Mesh/Field.h +++ b/Mesh/Field.h @@ -61,15 +61,15 @@ class FieldOption { class Field { public: + Field() {} + virtual ~Field() {} int id; std::map<std::string, FieldOption *> options; - virtual double operator() (double x, double y, double z, GEntity *ge=0) = 0; + virtual double operator() (double x, double y, double z, GEntity *ge=0) = 0; // start of the anisotropic field implementation virtual void operator() (double x, double y, double z, SMetric3 &, GEntity *ge=0){throw;} virtual bool isotropic () const {return true;} - virtual ~Field() {} bool update_needed; - Field(); virtual const char *getName() = 0; #if !defined(HAVE_NO_POST) void putOnView(PView * view, int comp = -1); diff --git a/Post/PViewVertexArrays.cpp b/Post/PViewVertexArrays.cpp index 773b8d7e4c..c35e66d3b6 100644 --- a/Post/PViewVertexArrays.cpp +++ b/Post/PViewVertexArrays.cpp @@ -1119,7 +1119,7 @@ void PView::fillVertexArray(int length, const char *bytes) { int is = sizeof(int), ds = sizeof(double); - if(length < 2 * is){ + if(length < 2 * is + 9 * ds){ Msg::Error("Too few bytes to create vertex array: %d", length); return; } -- GitLab