runOndselPiston, runPiston execute correctly

This commit is contained in:
Aik-Siong Koh
2023-06-30 19:48:30 -06:00
parent c30ee64b89
commit cb27f2344b
154 changed files with 2786 additions and 1605 deletions

View File

@@ -3,7 +3,7 @@
using namespace MbD;
void MbD::BasicQuasiIntegrator::firstStep()
void BasicQuasiIntegrator::firstStep()
{
istep = 0;
this->preFirstStep();
@@ -13,47 +13,34 @@ void MbD::BasicQuasiIntegrator::firstStep()
this->incrementTime();
this->runInitialConditionTypeSolution();
//this->reportTrialStepStats();
//while (this->isRedoingFirstStep())
//{
// this->incrementTry();
// orderNew = 1;
// this->selectFirstStepSize();
// this->changeTime();
// this->runInitialConditionTypeSolution();
// this->reportTrialStepStats();
//}
//this->postFirstStep();
this->postFirstStep();
//this->reportStepStats();
}
void MbD::BasicQuasiIntegrator::nextStep()
bool BasicQuasiIntegrator::isRedoingFirstStep()
{
return false;
}
void BasicQuasiIntegrator::nextStep()
{
this->preStep();
iTry = 1;
this->selectOrder();
//this->selectStepSize();
//this->incrementTime();
//this->runInitialConditionTypeSolution();
this->selectStepSize();
this->incrementTime();
this->runInitialConditionTypeSolution();
//this->reportTrialStepStats();
//while (this->isRedoingStep()) {
// this->incrementTry();
// this->selectOrder();
// this->selectStepSize();
// this->changeTime();
// this->runInitialConditionTypeSolution();
// this->reportTrialStepStats();
//}
//this->postStep();
this->postStep();
//this->reportStepStats();
}
void MbD::BasicQuasiIntegrator::runInitialConditionTypeSolution()
void BasicQuasiIntegrator::runInitialConditionTypeSolution()
{
system->runInitialConditionTypeSolution();
}
void MbD::BasicQuasiIntegrator::selectFirstStepSize()
void BasicQuasiIntegrator::selectFirstStepSize()
{
if (iTry == 1) {
hnew = direction * (system->tout - t);
@@ -63,3 +50,14 @@ void MbD::BasicQuasiIntegrator::selectFirstStepSize()
}
hnew = system->suggestSmallerOrAcceptFirstStepSize(hnew);
}
void BasicQuasiIntegrator::selectStepSize()
{
if (iTry == 1) {
hnew = direction * (system->tout - t);
}
else {
hnew = 0.25 * h;
}
hnew = system->suggestSmallerOrAcceptStepSize(hnew);
}