Merge pull request #25538 from marioalexis84/fem-clean_dlg_settings

Fem: Remove unnecessary code
This commit is contained in:
Chris Hennes
2026-02-16 11:14:31 -06:00
committed by GitHub
6 changed files with 15 additions and 58 deletions
+6
View File
@@ -193,6 +193,9 @@
<property name="toolTip">
<string>Default type on analysis</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<property name="prefEntry" stdset="0">
<cstring>AnalysisType</cstring>
</property>
@@ -352,6 +355,9 @@
<property name="editable">
<bool>false</bool>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<property name="prefEntry" stdset="0">
<cstring>Solver</cstring>
</property>
+2 -22
View File
@@ -57,12 +57,6 @@ DlgSettingsFemCcxImp::~DlgSettingsFemCcxImp() = default;
void DlgSettingsFemCcxImp::saveSettings()
{
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/Mod/Fem/Ccx"
);
hGrp->SetInt("Solver", ui->cmb_solver->currentIndex());
hGrp->SetInt("AnalysisType", ui->cb_analysis_type->currentIndex());
ui->sb_ccx_numcpu->onSave(); // Number of CPUs
ui->cmb_solver->onSave();
ui->cb_ccx_non_lin_geom->onSave();
@@ -91,7 +85,6 @@ void DlgSettingsFemCcxImp::saveSettings()
void DlgSettingsFemCcxImp::loadSettings()
{
ui->sb_ccx_numcpu->onRestore(); // Number of CPUs
ui->cmb_solver->onRestore();
ui->cb_ccx_non_lin_geom->onRestore();
ui->cb_use_iterations_param->onRestore();
@@ -116,22 +109,9 @@ void DlgSettingsFemCcxImp::loadSettings()
ui->fc_ccx_binary_path->onRestore();
ui->cb_split_inp_writer->onRestore();
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/Mod/Fem/Ccx"
);
// determine number of CPU threads
int processor_count = hGrp->GetInt("AnalysisNumCPUs", QThread::idealThreadCount());
ui->sb_ccx_numcpu->setValue(processor_count);
int index = hGrp->GetInt("Solver", 0);
if (index > -1) {
ui->cmb_solver->setCurrentIndex(index);
}
index = hGrp->GetInt("AnalysisType", 0);
if (index > -1) {
ui->cb_analysis_type->setCurrentIndex(index);
}
ui->sb_ccx_numcpu->setValue(QThread::idealThreadCount());
ui->sb_ccx_numcpu->onRestore(); // Number of CPUs
}
/**
@@ -45,6 +45,9 @@ not belonging to faces and faces not belonging to volumes.</string>
<property name="whatsThis">
<string>element parameter: All: all elements, Highest: highest elements only, FEM: FEM elements only (only edges not belonging to faces and faces not belonging to volumes)</string>
</property>
<property name="currentIndex">
<number>2</number>
</property>
<property name="prefEntry" stdset="0">
<cstring>AbaqusElementChoice</cstring>
</property>
@@ -45,11 +45,6 @@ DlgSettingsFemExportAbaqusImp::~DlgSettingsFemExportAbaqusImp() = default;
void DlgSettingsFemExportAbaqusImp::saveSettings()
{
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/Mod/Fem/Abaqus"
);
hGrp->SetInt("AbaqusElementChoice", ui->comboBoxElemChoiceParam->currentIndex());
ui->comboBoxElemChoiceParam->onSave();
ui->checkBoxWriteGroups->onSave();
}
@@ -58,14 +53,6 @@ void DlgSettingsFemExportAbaqusImp::loadSettings()
{
ui->comboBoxElemChoiceParam->onRestore();
ui->checkBoxWriteGroups->onRestore();
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/Mod/Fem/Abaqus"
);
int index = hGrp->GetInt("AbaqusElementChoice", 2);
if (index > -1) {
ui->comboBoxElemChoiceParam->setCurrentIndex(index);
}
}
/**
+3
View File
@@ -139,6 +139,9 @@
<property name="editable">
<bool>false</bool>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<property name="prefEntry" stdset="0">
<cstring>Solver</cstring>
</property>
+1 -23
View File
@@ -52,15 +52,8 @@ DlgSettingsFemZ88Imp::~DlgSettingsFemZ88Imp() = default;
void DlgSettingsFemZ88Imp::saveSettings()
{
ui->fc_z88_binary_path->onSave();
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/Mod/Fem/Z88"
);
hGrp->SetInt("Solver", ui->cmb_solver->currentIndex());
ui->cmb_solver->onSave();
hGrp->SetInt("MaxGS", ui->sb_Z88_MaxGS->value());
ui->sb_Z88_MaxGS->onSave();
hGrp->SetInt("MaxKOI", ui->sb_Z88_MaxKOI->value());
ui->sb_Z88_MaxKOI->onSave();
}
@@ -69,22 +62,7 @@ void DlgSettingsFemZ88Imp::loadSettings()
ui->fc_z88_binary_path->onRestore();
ui->cmb_solver->onRestore();
ui->sb_Z88_MaxGS->onRestore();
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/Mod/Fem/Z88"
);
int index = hGrp->GetInt("Solver", 0);
if (index > -1) {
ui->cmb_solver->setCurrentIndex(index);
}
int places = hGrp->GetInt("MaxGS", 100000000);
if (places > -1) {
ui->sb_Z88_MaxGS->setValue(places);
}
places = hGrp->GetInt("MaxKOI", 2800000);
if (places > -1) {
ui->sb_Z88_MaxKOI->setValue(places);
}
ui->sb_Z88_MaxKOI->onRestore();
}
/**