Fem: Add log verbosity preference to Elmer
This commit is contained in:
committed by
Chris Hennes
parent
d68b0c087e
commit
8c18208c97
@@ -144,13 +144,45 @@
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="l_log_verbosity">
|
||||
<property name="text">
|
||||
<string>Log verbosity</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="sb_log_verbosity">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum output level</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>31</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>MaxOutputLevel</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem/Elmer</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="l_num_tasks">
|
||||
<property name="text">
|
||||
<string>Number of tasks</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="sb_num_tasks">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
@@ -169,14 +201,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="l_threads_per_task">
|
||||
<property name="text">
|
||||
<string>Threads per task</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="sb_threads_per_task">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
|
||||
@@ -58,6 +58,7 @@ void DlgSettingsFemElmerImp::saveSettings()
|
||||
ui->fc_elmer_binary_path->onSave();
|
||||
ui->fc_grid_binary_path->onSave();
|
||||
|
||||
ui->sb_log_verbosity->onSave();
|
||||
ui->sb_num_tasks->onSave();
|
||||
ui->sb_threads_per_task->onSave();
|
||||
|
||||
@@ -70,6 +71,7 @@ void DlgSettingsFemElmerImp::loadSettings()
|
||||
ui->fc_elmer_binary_path->onRestore();
|
||||
ui->fc_grid_binary_path->onRestore();
|
||||
|
||||
ui->sb_log_verbosity->onRestore();
|
||||
ui->sb_num_tasks->onRestore();
|
||||
ui->sb_threads_per_task->onRestore();
|
||||
|
||||
|
||||
@@ -236,6 +236,9 @@ class Writer:
|
||||
# the solver that we have another scale
|
||||
self._simulation("Coordinate Scaling", 0.001)
|
||||
self._simulation("Simulation Type", self.solver.SimulationType)
|
||||
param = ParamGet("User parameter:BaseApp/Preferences/Mod/Fem/Elmer")
|
||||
out_level = 10 if self.testmode else param.GetInt("MaxOutputLevel", 10)
|
||||
self._simulation("Max Output Level", out_level)
|
||||
if self.solver.SimulationType == "Steady State":
|
||||
self._simulation("Steady State Max Iterations", self.solver.SteadyStateMaxIterations)
|
||||
self._simulation("Steady State Min Iterations", self.solver.SteadyStateMinIterations)
|
||||
|
||||
@@ -118,7 +118,7 @@ class TestSolverElmer(unittest.TestCase):
|
||||
|
||||
# write input files
|
||||
# fcc_print("Checking FEM input file writing for Elmer solver framework solver ...")
|
||||
w = writer.Writer(self.document.SolverElmer, analysis_dir)
|
||||
w = writer.Writer(self.document.SolverElmer, analysis_dir, testmode=True)
|
||||
w.write_solver_input()
|
||||
|
||||
fcc_print("Test writing STARTINFO file")
|
||||
|
||||
@@ -27,6 +27,7 @@ Simulation
|
||||
Coordinate Mapping(3) = Integer 1 2 3
|
||||
Coordinate Scaling = Real 0.001
|
||||
Coordinate System = String "Cartesian"
|
||||
Max Output Level = Integer 10
|
||||
Simulation Type = String "Steady State"
|
||||
Steady State Max Iterations = Integer 1
|
||||
Steady State Min Iterations = Integer 0
|
||||
|
||||
Reference in New Issue
Block a user