diff --git a/Plugin/Levelset.cpp b/Plugin/Levelset.cpp index d06bacec4e2c94acc447689d395ad05c1042b239..79b5589b67795a693cc2a1e95f67795508cae69a 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); }