Skip to content

Commit

Permalink
FEM: Add split input writer option to preferences dialog GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
vdwalts authored and berndhahnebach committed Nov 2, 2016
1 parent 1ad6d80 commit 890b42a
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 58 deletions.
126 changes: 68 additions & 58 deletions src/Mod/Fem/Gui/DlgSettingsFemCcx.ui
Expand Up @@ -6,16 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>555</width>
<height>652</height>
<width>536</width>
<height>752</height>
</rect>
</property>
<property name="windowTitle">
<string>CalculiX</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="gb_01_ccx_param">
<property name="sizePolicy">
Expand All @@ -33,26 +33,33 @@
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<item>
<layout class="QGridLayout" name="gl_ccx">
<item row="5" column="2">
<widget class="Gui::PrefFileChooser" name="fc_ext_editor" native="true">
<property name="enabled">
<bool>false</bool>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="l_ccx_binary_std">
<property name="text">
<string>CalculiX binary</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Gui::PrefCheckBox" name="cb_ccx_binary_std">
<property name="text">
<string>Use standard ccx binary path</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>ExternalEditorPath</cstring>
<cstring>UseStandardCcxLocation</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Fem/Ccx</cstring>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="1" column="0">
<widget class="QLabel" name="l_ccx_binary_path">
<property name="enabled">
<bool>false</bool>
Expand All @@ -68,7 +75,7 @@
</property>
</widget>
</item>
<item row="2" column="2">
<item row="1" column="1">
<widget class="Gui::PrefFileChooser" name="fc_ccx_binary_path" native="true">
<property name="enabled">
<bool>false</bool>
Expand Down Expand Up @@ -108,7 +115,14 @@
</property>
</widget>
</item>
<item row="3" column="2">
<item row="2" column="0">
<widget class="QLabel" name="l_editor">
<property name="text">
<string>Editor</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::PrefCheckBox" name="cb_int_editor">
<property name="text">
<string>Use internal editor for .inp files</string>
Expand All @@ -125,13 +139,6 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="l_editor">
<property name="text">
<string>Editor</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="l_ext_editor">
<property name="enabled">
<bool>false</bool>
Expand All @@ -147,26 +154,42 @@
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="Gui::PrefCheckBox" name="cb_ccx_binary_std">
<property name="text">
<string>Use standard ccx binary path</string>
</property>
<property name="checked">
<bool>true</bool>
<item row="3" column="1">
<widget class="Gui::PrefFileChooser" name="fc_ext_editor" native="true">
<property name="enabled">
<bool>false</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>UseStandardCcxLocation</cstring>
<cstring>ExternalEditorPath</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Fem/Ccx</cstring>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="l_ccx_binary_std">
<item row="4" column="0">
<widget class="QLabel" name="l_editor_2">
<property name="text">
<string>CalculiX binary</string>
<string>Split .inp</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="Gui::PrefCheckBox" name="cb_split_inp_writer">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Split writing of .inp</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>SplitInputWriter</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Fem/Ccx</cstring>
</property>
</widget>
</item>
Expand Down Expand Up @@ -340,17 +363,17 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="l_non_lin_geom">
<item row="0" column="0">
<widget class="QLabel" name="l_ccx_numcpu">
<property name="text">
<string>Non-linear geometry</string>
<string>Number of CPU's to use (Spooles only)</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="l_ccx_numcpu">
<item row="2" column="0">
<widget class="QLabel" name="l_non_lin_geom">
<property name="text">
<string>Number of CPU's to use (Spooles only)</string>
<string>Non-linear geometry</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -509,8 +532,8 @@
<property name="title">
<string>Frequency defaults</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QGridLayout" name="gl_freuq">
<item row="1" column="1">
<widget class="Gui::PrefSpinBox" name="sb_eigenmode_number">
Expand Down Expand Up @@ -617,19 +640,6 @@
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
Expand Down
2 changes: 2 additions & 0 deletions src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp
Expand Up @@ -69,6 +69,8 @@ void DlgSettingsFemCcxImp::saveSettings()
fc_ext_editor->onSave();
cb_ccx_binary_std->onSave();
fc_ccx_binary_path->onSave();
cb_split_inp_writer->onSave();
cb_split_inp_writer->onRestore();
}

void DlgSettingsFemCcxImp::loadSettings()
Expand Down
4 changes: 4 additions & 0 deletions src/Mod/Fem/_FemSolverCalculix.py
Expand Up @@ -97,6 +97,10 @@ def __init__(self, obj):
use_non_ccx_iterations_param = ccx_prefs.GetInt("UseNonCcxIterationParam", False)
obj.IterationsControlParameterTimeUse = use_non_ccx_iterations_param

obj.addProperty("App::PropertyBool", "SplitInputWriter", "Fem", "Split writing of ccx input file")
split = ccx_prefs.GetBool("SplitInputWriter", False)
obj.SplitInputWriter = split

ccx_default_time_incrementation_control_parameter = {
# iteration parameter
'I_0': 4,
Expand Down

0 comments on commit 890b42a

Please sign in to comment.