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

pp

parent 7fc7ef01
Branches
Tags
No related merge requests found
...@@ -240,14 +240,6 @@ int ParseFile(const std::string &fileName, bool close, bool warnIfMissing) ...@@ -240,14 +240,6 @@ int ParseFile(const std::string &fileName, bool close, bool warnIfMissing)
#endif #endif
} }
static int defineSolver(const std::string &name)
{
for(int i = 0; i < 5; i++){
if(opt_solver_name(i, GMSH_GET, "") == name) return i;
}
return 4;
}
void ParseString(const std::string &str) void ParseString(const std::string &str)
{ {
if(str.empty()) return; if(str.empty()) return;
...@@ -260,6 +252,15 @@ void ParseString(const std::string &str) ...@@ -260,6 +252,15 @@ void ParseString(const std::string &str)
} }
} }
static int defineSolver(const std::string &name)
{
for(int i = 0; i < 5; i++){
if(opt_solver_name(i, GMSH_GET, "") == name) return i;
}
opt_solver_name(4, GMSH_SET|GMSH_GUI, name);
return 4;
}
int MergeFile(const std::string &fileName, bool warnIfMissing) int MergeFile(const std::string &fileName, bool warnIfMissing)
{ {
if(GModel::current()->getName() == ""){ if(GModel::current()->getName() == ""){
...@@ -431,7 +432,6 @@ int MergeFile(const std::string &fileName, bool warnIfMissing) ...@@ -431,7 +432,6 @@ int MergeFile(const std::string &fileName, bool warnIfMissing)
status = 1; status = 1;
/* tester ceci: /* tester ceci:
int num = defineSolver("python"); int num = defineSolver("python");
opt_solver_name(num, GMSH_SET, "python");
opt_solver_executable(num, GMSH_SET, fileName); opt_solver_executable(num, GMSH_SET, fileName);
CTX::instance()->launchSolverAtStartup = num; CTX::instance()->launchSolverAtStartup = num;
return 1; return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment