systemSolver->runBasicKinematic();

This commit is contained in:
Aik-Siong Koh
2023-06-11 07:15:20 -06:00
parent d848450907
commit 3b08cd72df
182 changed files with 2789 additions and 535 deletions

View File

@@ -1,3 +1,46 @@
#include <string>
#include "IntegratorInterface.h"
#include "SystemSolver.h"
#include "BasicQuasiIntegrator.h"
using namespace MbD;
void MbD::IntegratorInterface::initializeGlobally()
{
tstart = system->startTime();
hout = system->outputStepSize();
hmax = system->maxStepSize();
hmin = system->minStepSize();
tout = system->firstOutputTime();
tend = system->endTime();
direction = (tstart < tend) ? 1.0 : -1.0;
}
void MbD::IntegratorInterface::setSystem(SystemSolver* sys)
{
system = sys;
}
void MbD::IntegratorInterface::logString(std::string& str)
{
system->logString(str);
}
void MbD::IntegratorInterface::run()
{
this->preRun();
this->initializeLocally();
this->initializeGlobally();
if (hout > (4 * std::numeric_limits<double>::epsilon()) && (direction * tout < (direction * (tend + (0.1 * direction * hout))))) {
integrator->run();
}
this->finalize();
this->reportStats();
this->postRun();
}
int MbD::IntegratorInterface::orderMax()
{
return system->orderMax;
}