From 285727df54c6a57c9650602c6a5d1167a2cb8845 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 13 Jun 2011 09:52:56 +0000 Subject: [PATCH] option to forceInterpolation --- CMakeLists.txt | 5 ++--- Plugin/MathEval.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d3feb2718..ab3cf930e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,9 +17,7 @@ endif(DEFINED CMAKE_BUILD_TYPE) project(gmsh CXX C) option(ENABLE_ACIS "Enable ACIS geometrical models" ON) -option(ENABLE_ANN "Enable ANN to compute Approximate Nearest -Neighbors" ON) -option(ENABLE_RBF "Enable RBF project" OFF) +option(ENABLE_ANN "Enable ANN to compute Approximate Nearest Neighbors" ON) option(ENABLE_BAMG "Enable Bamg mesh generator" ON) option(ENABLE_BFGS "Enable BFGS" ON) option(ENABLE_BLAS_LAPACK "Use BLAS/Lapack for basic linear algebra" ON) @@ -50,6 +48,7 @@ option(ENABLE_PETSC "Enable PETSc linear algebra solvers" ON) option(ENABLE_PLUGINS "Build the post-processing plugins" ON) option(ENABLE_POST "Build the post-processing module" ON) option(ENABLE_QT "Build QT GUI" OFF) +option(ENABLE_RBF "Enable RBF project" OFF) option(ENABLE_READLINE "Enable Readline in Lua prompt" ON) option(ENABLE_SALOME "Enable Salome routines for CAD healing" ON) option(ENABLE_SLEPC "Enable SLEPc eigensolvers" ON) diff --git a/Plugin/MathEval.cpp b/Plugin/MathEval.cpp index cae488ed07..9777f0d852 100644 --- a/Plugin/MathEval.cpp +++ b/Plugin/MathEval.cpp @@ -13,7 +13,8 @@ StringXNumber MathEvalOptions_Number[] = { {GMSH_FULLRC, "TimeStep", NULL, -1.}, {GMSH_FULLRC, "View", NULL, -1.}, {GMSH_FULLRC, "OtherTimeStep", NULL, -1.}, - {GMSH_FULLRC, "OtherView", NULL, -1.} + {GMSH_FULLRC, "OtherView", NULL, -1.}, + {GMSH_FULLRC, "ForceInterpolation", NULL, 0.} }; StringXString MathEvalOptions_String[] = { @@ -90,6 +91,7 @@ PView *GMSH_MathEvalPlugin::execute(PView *view) int iView = (int)MathEvalOptions_Number[1].def; int otherTimeStep = (int)MathEvalOptions_Number[2].def; int iOtherView = (int)MathEvalOptions_Number[3].def; + int forceInterpolation = (int)MathEvalOptions_Number[4].def; std::vector<std::string> expr(9); for(int i = 0; i < 9; i++) expr[i] = MathEvalOptions_String[i].def; @@ -118,7 +120,8 @@ PView *GMSH_MathEvalPlugin::execute(PView *view) } OctreePost *octree = 0; - if((data1->getNumEntities() != otherData->getNumEntities()) || + if(forceInterpolation || + (data1->getNumEntities() != otherData->getNumEntities()) || (data1->getNumElements() != otherData->getNumElements())){ Msg::Info("Other view based on different grid: interpolating..."); octree = new OctreePost(otherView); -- GitLab