11#ifndef included_RK4TimeIntegrator
12#define included_RK4TimeIntegrator
16#include "AMP/time_integrators/TimeIntegrator.h"
32 std::shared_ptr<AMP::TimeIntegrator::TimeIntegratorParameters> parameters );
40 std::shared_ptr<AMP::TimeIntegrator::TimeIntegratorParameters> parameters )
42 return std::unique_ptr<AMP::TimeIntegrator::TimeIntegrator>(
50 std::shared_ptr<AMP::TimeIntegrator::TimeIntegratorParameters> parameters )
override;
58 std::shared_ptr<const AMP::TimeIntegrator::TimeIntegratorParameters> parameters )
override;
72 std::shared_ptr<AMP::LinearAlgebra::Vector> in,
73 std::shared_ptr<AMP::LinearAlgebra::Vector> out )
override;
75 std::string
type()
const override {
return "RK4"; }
112 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_k1_vec;
113 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_k2_vec;
114 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_k3_vec;
115 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_k4_vec;
Class to manage reading/writing restart data.
RK4TimeIntegrator()=delete
std::shared_ptr< AMP::LinearAlgebra::Vector > d_new_solution
RK4TimeIntegrator(std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > parameters)
int advanceSolution(const double dt, const bool first_step, std::shared_ptr< AMP::LinearAlgebra::Vector > in, std::shared_ptr< AMP::LinearAlgebra::Vector > out) override
Integrate through the specified time increment.
RK4TimeIntegrator(int64_t fid, AMP::IO::RestartManager *manager)
Read restart data to file.
bool checkNewSolution(void) override
void reset(std::shared_ptr< const AMP::TimeIntegrator::TimeIntegratorParameters > parameters) override
void updateSolution(void) override
static std::unique_ptr< AMP::TimeIntegrator::TimeIntegrator > createTimeIntegrator(std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > parameters)
std::shared_ptr< AMP::LinearAlgebra::Vector > d_k2_vec
std::string type() const override
Return the name of the TimeIntegrator.
std::shared_ptr< AMP::LinearAlgebra::Vector > d_k1_vec
void initialize(std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > parameters) override
std::shared_ptr< AMP::LinearAlgebra::Vector > d_k3_vec
std::shared_ptr< AMP::LinearAlgebra::Vector > d_k4_vec
void writeRestart(int64_t fid) const override
Write restart data to file.
void registerChildObjects(AMP::IO::RestartManager *manager) const override
Register any child objects.
Abstract base class for time integration.
std::shared_ptr< AMP::TimeIntegrator::TimeIntegrator > shared_ptr
Convience typedef.