AllowRotation and size_t

This commit is contained in:
Aik-Siong Koh
2024-01-14 21:40:33 -07:00
committed by PaddleStroke
parent fe99ad2593
commit 85557e1fa4
285 changed files with 1854 additions and 1116 deletions

View File

@@ -11,7 +11,7 @@
using namespace MbD;
FColDsptr MbD::LinearMultiStepMethod::derivativeatpresentpast(int n, double t, FColDsptr y, std::shared_ptr<std::vector<FColDsptr>> ypast)
FColDsptr MbD::LinearMultiStepMethod::derivativeatpresentpast(size_t n, double t, FColDsptr y, std::shared_ptr<std::vector<FColDsptr>> ypast)
{
//"Interpolate or extrapolate."
//"dfdt(t) = df0dt + d2f0dt2*(t - t0) + d3f0dt3*(t - t0)^2 / 2! + ..."
@@ -20,17 +20,17 @@ FColDsptr MbD::LinearMultiStepMethod::derivativeatpresentpast(int n, double t, F
if (t != time) {
auto dt = t - time;
auto dtpower = 1.0;
for (int i = n + 1; i <= order; i++)
for (size_t i = n + 1; i <= order; i++)
{
auto diydti = this->derivativepresentpast(i, y, ypast);
dtpower = dtpower * dt;
answer->equalSelfPlusFullColumntimes(diydti, dtpower * (OneOverFactorials->at((int)i - n)));
answer->equalSelfPlusFullColumntimes(diydti, dtpower * (OneOverFactorials->at(i - n)));
}
}
return answer;
}
FColDsptr MbD::LinearMultiStepMethod::derivativepresentpast(int, FColDsptr, std::shared_ptr<std::vector<FColDsptr>>)
FColDsptr MbD::LinearMultiStepMethod::derivativepresentpast(size_t, FColDsptr, std::shared_ptr<std::vector<FColDsptr>>)
{
assert(false);
return FColDsptr();
@@ -47,7 +47,7 @@ double MbD::LinearMultiStepMethod::firstPastTimeNode()
return timeNodes->at(0);
}
FColDsptr MbD::LinearMultiStepMethod::derivativepresentpastpresentDerivativepastDerivative(int,
FColDsptr MbD::LinearMultiStepMethod::derivativepresentpastpresentDerivativepastDerivative(size_t,
FColDsptr, std::shared_ptr<std::vector<FColDsptr>>,
FColDsptr, std::shared_ptr<std::vector<FColDsptr>>)
{