summaryrefslogtreecommitdiffstats
path: root/Project/SimulationsSettingsForm.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-08-30 20:42:27 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-08-30 20:42:27 -0300
commit516cdb72d3ff99a1ee786d3ea24c9b579272fe76 (patch)
tree6017213d5e270f94c1063d11e793c196e3c969f8 /Project/SimulationsSettingsForm.cpp
parent1fcb990bd02da945ac0204caaed6a9aa1f6a7d5f (diff)
downloadPSP.git-516cdb72d3ff99a1ee786d3ea24c9b579272fe76.tar.gz
PSP.git-516cdb72d3ff99a1ee786d3ea24c9b579272fe76.tar.xz
PSP.git-516cdb72d3ff99a1ee786d3ea24c9b579272fe76.zip
COI (center of inertia) implemented
See Milano's book p. 342
Diffstat (limited to 'Project/SimulationsSettingsForm.cpp')
-rw-r--r--Project/SimulationsSettingsForm.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Project/SimulationsSettingsForm.cpp b/Project/SimulationsSettingsForm.cpp
index 9e38010..714e49b 100644
--- a/Project/SimulationsSettingsForm.cpp
+++ b/Project/SimulationsSettingsForm.cpp
@@ -46,6 +46,8 @@ SimulationsSettingsForm::SimulationsSettingsForm(wxWindow* parent, PropertiesDat
m_textCtrlStabMaxIterations->SetValue(wxString::Format("%d", data.stabilityMaxIterations));
m_textCtrlCtrlStepRatio->SetValue(wxString::Format("%d", data.controlTimeStepRatio));
m_textCtrlPrintTime->SetValue(wxString::Format("%g", data.plotTime));
+
+ m_checkBoxUseCOI->SetValue(data.useCOI);
}
SimulationsSettingsForm::~SimulationsSettingsForm() {}
@@ -111,6 +113,8 @@ bool SimulationsSettingsForm::ValidateData()
if(!Element::DoubleFromString(this, m_textCtrlPrintTime->GetValue(), data.plotTime,
_("Value entered incorrectly in the field \"Plot time\".")))
return false;
+ data.useCOI = m_checkBoxUseCOI->GetValue();
+
m_properties->SetSimulationPropertiesData(data);
return true;
}