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

*** empty log message ***

parent 8f51d527
No related branches found
No related tags found
No related merge requests found
......@@ -155,7 +155,12 @@ PView *GMSH_EvaluatePlugin::execute(PView *v)
externalTimeStep = 0;
}
v1->setChanged(true);
#if defined(HAVE_MATH_EVAL)
void *f = evaluator_create((char*)expr);
if(!f){
Msg::Error("Invalid expression '%s'", expr);
return v;
}
OctreePost *octree = 0;
if((data1->getNumEntities() != data2->getNumEntities()) ||
......@@ -164,12 +169,7 @@ PView *GMSH_EvaluatePlugin::execute(PView *v)
octree = new OctreePost(v2);
}
#if defined(HAVE_MATH_EVAL)
void *f = evaluator_create((char*)expr);
if(!f){
Msg::Error("Invalid expression '%s'", expr);
return v;
}
v1->setChanged(true);
for(int step = 0; step < data1->getNumTimeSteps(); step++){
if(timeStep >= 0 && timeStep != step) continue;
......@@ -228,12 +228,11 @@ PView *GMSH_EvaluatePlugin::execute(PView *v)
}
}
evaluator_destroy(f);
if(octree) delete octree;
#else
Msg::Error("MathEval is not compiled in this version of Gmsh");
#endif
if(octree) delete octree;
data1->finalize();
return v1;
......
......@@ -29,7 +29,7 @@ PViewDataList *GMSH_PostPlugin::getDataList(PView *view)
}
else{
// FIXME: do automatic data conversion here
Msg::Error("This plugin can only be run on list-based datasets");
Msg::Error("This plugin can only be run on list-based views (`.pos' files)");
return 0;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment