Skip to content

Commit

Permalink
FEM: solver run and settings, use single quotes instead of double ones
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Sep 5, 2019
1 parent e9f60b9 commit e0fde7f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Mod/Fem/femsolver/run.py
Expand Up @@ -56,7 +56,7 @@

def run_fem_solver(solver, working_dir=None):

if solver.Proxy.Type == 'Fem::FemSolverCalculixCcxTools':
if solver.Proxy.Type == "Fem::FemSolverCalculixCcxTools":
App.Console.PrintMessage("CalxuliX ccx tools solver!\n")
from femtools.ccxtools import CcxTools as ccx
fea = ccx(solver)
Expand Down
22 changes: 11 additions & 11 deletions src/Mod/Fem/femsolver/settings.py
Expand Up @@ -27,12 +27,12 @@
## \addtogroup FEM
# @{

'''
"""
parameter in FreeCAD can be edited in two ways, either in the
Preferences: menu Edit --> Preferences
or
Parameter editor: menu Tools --> Edit parameter
'''
"""

import FreeCAD

Expand Down Expand Up @@ -69,13 +69,13 @@ def get_binary(self):
# ATM pure unix shell commands without path names are used
# TODO see todo on use_default later in this module
binary = self.default
FreeCAD.Console.PrintLog('Solver binary path: {} \n'.format(binary))
FreeCAD.Console.PrintLog("Solver binary path: {} \n".format(binary))

# check if use_default is set to True
# if True the standard binary path will be overwritten with a user binary path
if self.param_group.GetBool(self.use_default, True) is False:
binary = self.param_group.GetString(self.custom_path)
FreeCAD.Console.PrintLog('Solver binary path: {} \n'.format(binary))
FreeCAD.Console.PrintLog("Solver binary path: {} \n".format(binary))

# get the whole binary path name for the given command or binary path and return it
from distutils.spawn import find_executable as find_bin
Expand All @@ -85,7 +85,7 @@ def get_write_comments(self):
return self.param_group.GetBool(self.write_comments, True)


'''
"""
default:
default command to run the binary
this one is taken if the UseStandardXXXLocationis not given or set to True
Expand All @@ -99,7 +99,7 @@ def get_write_comments(self):
custom_path:
the xxxBinaryPath parameter identifier
binary path given by the user
'''
"""
_SOLVER_PARAM = {
"Calculix": _SolverDlg(
default="ccx",
Expand Down Expand Up @@ -127,12 +127,12 @@ def get_write_comments(self):
def get_binary(name):
if name in _SOLVER_PARAM:
binary = _SOLVER_PARAM[name].get_binary()
FreeCAD.Console.PrintMessage('Solver binary path: {} \n'.format(binary))
FreeCAD.Console.PrintMessage("Solver binary path: {} \n".format(binary))
return binary
else:
FreeCAD.Console.PrintError(
'Settings solver name: {} not found in '
'solver settings modules _SOLVER_PARAM dirctionary.\n'
"Settings solver name: {} not found in "
"solver settings modules _SOLVER_PARAM dirctionary.\n"
.format(name)
)
return None
Expand All @@ -143,8 +143,8 @@ def get_write_comments(name):
return _SOLVER_PARAM[name].get_write_comments()
else:
FreeCAD.Console.PrintError(
'Settings solver name: {} not found in '
'solver settings modules _SOLVER_PARAM dirctionary.\n'
"Settings solver name: {} not found in "
"solver settings modules _SOLVER_PARAM dirctionary.\n"
.format(name)
)
return None
Expand Down

0 comments on commit e0fde7f

Please sign in to comment.