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

Solver.AutoMesh = -1 when the geometry creates the mesh

parent 89848dc3
No related branches found
No related tags found
No related merge requests found
......@@ -1292,7 +1292,8 @@ StringXNumber SolverOptions_Number[] = {
"Automatically save the ONELAB database after each computation" },
{ F|O, "AutoMesh" , opt_solver_auto_mesh , 1. ,
"Automatically mesh if necesssary (0: never remesh; 1: on startup, use existing "
"mesh on disk if available; 2: always remesh)" },
"mesh on disk if available; 2: always remesh; -1: the geometry script creates "
"the mesh)" },
{ F|O, "AutoMergeFile" , opt_solver_auto_merge_file , 1. ,
"Automatically merge result files" },
{ F|O, "AutoShowViews" , opt_solver_auto_show_views , 2. ,
......
......@@ -326,14 +326,14 @@ namespace onelabUtils {
{
bool redraw = false;
onelab::server::citer it = onelab::server::instance()->findClient("Gmsh");
if(it == onelab::server::instance()->lastClient()) return redraw;
// do nothing in case of a python metamodel
std::vector<onelab::number> pn;
onelab::server::instance()->get(pn, "IsPyMetamodel");
if(pn.size() && pn[0].getValue()) return redraw;
onelab::server::citer it = onelab::server::instance()->findClient("Gmsh");
if(it == onelab::server::instance()->lastClient()) return redraw;
onelab::client *c = *it;
std::string mshFileName = onelabUtils::getMshFileName(c);
......@@ -343,6 +343,11 @@ namespace onelabUtils {
// = 2: mesh and save mesh (e.g. if char length changed)
// > 2: reload geometry, mesh and save mesh (other things have changed)
if(meshAuto < 0){ // the geometry creates the mesh
meshAuto = 0;
if(changed) changed = 3;
}
Msg::SetOnelabAction(action);
if(action == "initialize"){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment