diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index b4e0bc686a1b61495d0cda8375d37a812a3d18de..929ca952dad2ba50cf3ceb8b09c8c46bc0fc23da 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -439,7 +439,6 @@ int MergeFile(const std::string &fileName, bool warnIfMissing, bool setWindowTit int num = defineSolver(split[1]); opt_solver_executable(num, GMSH_SET, fileName); CTX::instance()->launchSolverAtStartup = num; - //Msg::SetOnelabNumber("0Metamodel/Batch", CTX::instance()->batch, false); return 1; } #endif diff --git a/Common/onelabUtils.cpp b/Common/onelabUtils.cpp index 295fff51b545ebd2b3745a1d3096476483d7f3c2..b152f8df5b7ad2c5eb742215bcc83fab61b36869 100644 --- a/Common/onelabUtils.cpp +++ b/Common/onelabUtils.cpp @@ -315,8 +315,8 @@ namespace onelabUtils { else if(action == "check"){ if(onelab::server::instance()->getChanged("Gmsh") || modelName != GModel::current()->getName()){ - // reload geometry if Gmsh parameters have been modified or if the model - // name has changed + // reload geometry if Gmsh parameters have been modified or + // if the model name has changed modelName = GModel::current()->getName(); redraw = true; OpenProject(GModel::current()->getFileName(), false); diff --git a/Fltk/onelabGroup.cpp b/Fltk/onelabGroup.cpp index e797c6f372bab4a0052d1eb0fecf6e76d00d5cdb..7fe5b1ac7d254a4d57956ad0a3a430274f686f19 100644 --- a/Fltk/onelabGroup.cpp +++ b/Fltk/onelabGroup.cpp @@ -855,7 +855,8 @@ void onelab_cb(Fl_Widget *w, void *data) if(fileChooser(FILE_CHOOSER_SINGLE, "Load", "*.db", db.c_str())) loadDb(fileChooserGetName(1)); - // switch to "restore" mode" (use archived solution files) + // switch to "restore" mode" + // (the metamodel will use archived solution files) std::vector<onelab::number> pn; onelab::server::instance()->get(pn,"0Metamodel/9Use restored solution"); if(pn.size()){ @@ -881,10 +882,9 @@ void onelab_cb(Fl_Widget *w, void *data) onelab::server::instance()->get(pn, "IsPyMetamodel"); bool isPyMetamodel = (pn.size() && pn[0].getValue()); - do{ // enter loop - // if the client is a not a metamodel, run Gmsh + // if the client is not a python metamodel, run Gmsh if(!isPyMetamodel){ if(onelabUtils::runGmshClient(action, CTX::instance()->solver.autoMesh)) drawContext::global()->draw(); @@ -913,6 +913,7 @@ void onelab_cb(Fl_Widget *w, void *data) } if(FlGui::instance()->onelab->stop()) break; } + // after computing, all parameters are set unchanged if(action == "compute"){ onelab::server::instance()->setChanged(false); diff --git a/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.cpp b/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.cpp index 954302a0a06ad1eb5a73b847afccebbb015f89e3..9df0dcde51055b90e57896a2122c0926abcbe74d 100644 --- a/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.cpp +++ b/contrib/HighOrderMeshOptimizer/OptHomIntegralBoundaryDist.cpp @@ -243,8 +243,9 @@ double computeBndDistGb(GEdge *edge, std::vector<double> & params, // the model double computeBndDistG_(GEdge *edge, std::vector<double> & p, // the model edge const nodalBasis &basis, const std::vector<SPoint3> &xyz, - const unsigned int N) // the mesh edge + const unsigned int NN) // the mesh edge { + const unsigned int N = 256; std::vector<int> o; o.push_back(0); for (unsigned int i=2; i < p.size();i++)o.push_back(i); diff --git a/contrib/onelab/python/onelab.py b/contrib/onelab/python/onelab.py index f2b3344304ed7e8aa562173582920b5c74a7bd34..c7d7e07ce730da37da9958d687516629b7281d12 100755 --- a/contrib/onelab/python/onelab.py +++ b/contrib/onelab/python/onelab.py @@ -446,7 +446,8 @@ class client : if result == 0 : self._send(self._GMSH_INFO, 'call \"' + ' '.join(argv) + '\"') else : - self._send(self._GMSH_ERROR, 'call failed !!\n' + call.stderr.read().encode('utf-8')) + for line in iter(call.stderr.readline, b''): + self._send(self._GMSH_ERROR, line.rstrip().encode('utf-8')) def upload(self, here, there, remote='') : if not here or not there :