11#ifndef included_RK2TimeIntegrator
12#define included_RK2TimeIntegrator
16#include "AMP/time_integrators/TimeIntegrator.h"
20class TimeIntegratorParameters;
34 explicit RK2TimeIntegrator( std::shared_ptr<AMP::TimeIntegrator::TimeIntegratorParameters> );
42 std::shared_ptr<AMP::TimeIntegrator::TimeIntegratorParameters> parameters )
44 return std::unique_ptr<AMP::TimeIntegrator::TimeIntegrator>(
52 std::shared_ptr<AMP::TimeIntegrator::TimeIntegratorParameters> parameters )
override;
60 std::shared_ptr<const AMP::TimeIntegrator::TimeIntegratorParameters> parameters )
override;
74 std::shared_ptr<AMP::LinearAlgebra::Vector> in,
75 std::shared_ptr<AMP::LinearAlgebra::Vector> out )
override;
77 std::string
type()
const override {
return "RK2"; }
114 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_k1_vec;
115 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_k2_vec;
Class to manage reading/writing restart data.
void initialize(std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > parameters) override
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.
std::shared_ptr< AMP::LinearAlgebra::Vector > d_k1_vec
std::shared_ptr< AMP::LinearAlgebra::Vector > d_new_solution
RK2TimeIntegrator()=delete
std::string type() const override
Return the name of the TimeIntegrator.
std::shared_ptr< AMP::LinearAlgebra::Vector > d_k2_vec
void writeRestart(int64_t fid) const override
Write restart data to file.
RK2TimeIntegrator(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 registerChildObjects(AMP::IO::RestartManager *manager) const override
Register any child objects.
RK2TimeIntegrator(std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters >)
void updateSolution(void) override
static std::unique_ptr< AMP::TimeIntegrator::TimeIntegrator > createTimeIntegrator(std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > parameters)
Abstract base class for time integration.
std::shared_ptr< AMP::TimeIntegrator::TimeIntegrator > shared_ptr
Convience typedef.