Change the project name from MbDCode to OndselSolver.
This commit is contained in:
71
OndselSolver/BasicQuasiIntegrator.cpp
Normal file
71
OndselSolver/BasicQuasiIntegrator.cpp
Normal file
@@ -0,0 +1,71 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Ondsel, Inc. *
|
||||
* *
|
||||
* This file is part of OndselSolver. *
|
||||
* *
|
||||
* See LICENSE file for details about copyright. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "BasicQuasiIntegrator.h"
|
||||
#include "IntegratorInterface.h"
|
||||
|
||||
using namespace MbD;
|
||||
|
||||
void BasicQuasiIntegrator::firstStep()
|
||||
{
|
||||
istep = 0;
|
||||
this->preFirstStep();
|
||||
iTry = 1;
|
||||
orderNew = 1;
|
||||
this->selectFirstStepSize();
|
||||
this->incrementTime();
|
||||
this->runInitialConditionTypeSolution();
|
||||
//this->reportTrialStepStats();
|
||||
this->postFirstStep();
|
||||
//this->reportStepStats();
|
||||
}
|
||||
|
||||
bool BasicQuasiIntegrator::isRedoingFirstStep()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void BasicQuasiIntegrator::nextStep()
|
||||
{
|
||||
this->preStep();
|
||||
iTry = 1;
|
||||
this->selectOrder();
|
||||
this->selectStepSize();
|
||||
this->incrementTime();
|
||||
this->runInitialConditionTypeSolution();
|
||||
//this->reportTrialStepStats();
|
||||
this->postStep();
|
||||
//this->reportStepStats();
|
||||
}
|
||||
|
||||
void BasicQuasiIntegrator::runInitialConditionTypeSolution()
|
||||
{
|
||||
system->runInitialConditionTypeSolution();
|
||||
}
|
||||
|
||||
void BasicQuasiIntegrator::selectFirstStepSize()
|
||||
{
|
||||
if (iTry == 1) {
|
||||
hnew = direction * (system->tout - t);
|
||||
}
|
||||
else {
|
||||
hnew = 0.25 * h;
|
||||
}
|
||||
hnew = system->suggestSmallerOrAcceptFirstStepSize(hnew);
|
||||
}
|
||||
|
||||
void BasicQuasiIntegrator::selectStepSize()
|
||||
{
|
||||
if (iTry == 1) {
|
||||
hnew = direction * (system->tout - t);
|
||||
}
|
||||
else {
|
||||
hnew = 0.25 * h;
|
||||
}
|
||||
hnew = system->suggestSmallerOrAcceptStepSize(hnew);
|
||||
}
|
||||
Reference in New Issue
Block a user