FEM: solver frame work, move get binary to snake_case
This commit is contained in:
@@ -99,7 +99,7 @@ class Solve(run.Solve):
|
||||
# TODO do not run solver, do not try to read results in a smarter way than an Exception
|
||||
raise Exception('Error on writing CalculiX input file.\n')
|
||||
self.pushStatus("Executing solver...\n")
|
||||
binary = settings.getBinary("Calculix")
|
||||
binary = settings.get_binary("Calculix")
|
||||
self._process = subprocess.Popen(
|
||||
[binary, "-i", _inputFileName],
|
||||
cwd=self.directory,
|
||||
|
||||
@@ -93,7 +93,7 @@ class Solve(run.Solve):
|
||||
|
||||
def run(self):
|
||||
self.pushStatus("Executing solver...\n")
|
||||
binary = settings.getBinary("ElmerSolver")
|
||||
binary = settings.get_binary("ElmerSolver")
|
||||
if binary is not None:
|
||||
self._process = subprocess.Popen(
|
||||
[binary], cwd=self.directory,
|
||||
|
||||
@@ -126,7 +126,7 @@ class Writer(object):
|
||||
if self.testmode:
|
||||
print("We are in testmode ElmerGrid may not be installed!")
|
||||
else:
|
||||
binary = settings.getBinary("ElmerGrid")
|
||||
binary = settings.get_binary("ElmerGrid")
|
||||
if binary is None:
|
||||
raise WriteError("Couldn't find ElmerGrid binary.")
|
||||
args = [binary,
|
||||
|
||||
@@ -63,7 +63,7 @@ class _SolverDlg(object):
|
||||
# get the parameter object where the paramete are saved in
|
||||
self.param_group = FreeCAD.ParamGet(self.param_path)
|
||||
|
||||
def getBinary(self):
|
||||
def get_binary(self):
|
||||
|
||||
# set the binary path to the FreeCAD defaults, ATM pure unix shell commands without path names are used
|
||||
# TODO see todo on use_default later in this module
|
||||
@@ -121,9 +121,9 @@ _SOLVER_PARAM = {
|
||||
}
|
||||
|
||||
|
||||
def getBinary(name):
|
||||
def get_binary(name):
|
||||
if name in _SOLVER_PARAM:
|
||||
binary = _SOLVER_PARAM[name].getBinary()
|
||||
binary = _SOLVER_PARAM[name].get_binary()
|
||||
FreeCAD.Console.PrintMessage('Solver binary path: {} \n'.format(binary))
|
||||
return binary
|
||||
else:
|
||||
|
||||
@@ -93,7 +93,7 @@ class Solve(run.Solve):
|
||||
# the subprocess was just copied, it seems to work :-)
|
||||
# TODO: search out for "Vektor GS" and "Vektor KOI" and print values, may be compared with the used ones
|
||||
self.pushStatus("Executing test solver...\n")
|
||||
binary = settings.getBinary("Z88")
|
||||
binary = settings.get_binary("Z88")
|
||||
self._process = subprocess.Popen(
|
||||
[binary, "-t", "-choly"],
|
||||
cwd=self.directory,
|
||||
@@ -105,7 +105,7 @@ class Solve(run.Solve):
|
||||
self.signalAbort.remove(self._process.terminate)
|
||||
|
||||
self.pushStatus("Executing real solver...\n")
|
||||
binary = settings.getBinary("Z88")
|
||||
binary = settings.get_binary("Z88")
|
||||
self._process = subprocess.Popen(
|
||||
[binary, "-c", "-choly"],
|
||||
cwd=self.directory,
|
||||
|
||||
Reference in New Issue
Block a user