From a65bebecea4f8a127eb2daeee53c05c060b8efad Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 3 Sep 2010 12:15:24 +0000
Subject: [PATCH] fix (partially) levelset-based plugins for adapted views
 (still need more work to work transparently on multisteo datasets)

---
 Plugin/Levelset.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Plugin/Levelset.cpp b/Plugin/Levelset.cpp
index d06bacec4e..79b5589b67 100644
--- a/Plugin/Levelset.cpp
+++ b/Plugin/Levelset.cpp
@@ -9,6 +9,7 @@
 #include "Iso.h"
 #include "adaptiveData.h"
 #include "GmshDefines.h"
+#include "PViewOptions.h"
 
 static const int exn[13][12][2] = {
   {{0,0}}, // point
@@ -397,8 +398,11 @@ void GMSH_LevelsetPlugin::_cutAndAddElements(PViewData *vdata, PViewData *wdata,
 
 PView *GMSH_LevelsetPlugin::execute(PView *v)
 {
+  // FIXME: we can only run the plugin on one step at a time
   if(v->getData()->isAdaptive()){
-    v->getData()->getAdaptiveData()->changeResolution(0, _recurLevel, _targetError, this);
+    PViewOptions *opt = v->getOptions();
+    v->getData()->getAdaptiveData()->changeResolution
+      (opt->timeStep, _recurLevel, _targetError, this);
     v->setChanged(true);
   }
 
-- 
GitLab