11#ifndef included_RK23TimeIntegrator
12#define included_RK23TimeIntegrator
16#include "AMP/time_integrators/TimeIntegrator.h"
33 std::shared_ptr<AMP::TimeIntegrator::TimeIntegratorParameters> parameters );
41 std::shared_ptr<AMP::TimeIntegrator::TimeIntegratorParameters> parameters )
43 return std::unique_ptr<AMP::TimeIntegrator::TimeIntegrator>(
51 std::shared_ptr<AMP::TimeIntegrator::TimeIntegratorParameters> parameters )
override;
59 std::shared_ptr<const AMP::TimeIntegrator::TimeIntegratorParameters> parameters )
override;
78 std::shared_ptr<AMP::LinearAlgebra::Vector> in,
79 std::shared_ptr<AMP::LinearAlgebra::Vector> out )
override;
81 std::string
type()
const override {
return "RK23"; }
130 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_k1_vec;
131 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_k2_vec;
132 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_k3_vec;
133 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_k4_vec;
134 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_z_vec;
Class to manage reading/writing restart data.
void reset(std::shared_ptr< const AMP::TimeIntegrator::TimeIntegratorParameters > parameters) override
std::string type() const override
Return the name of the TimeIntegrator.
static std::unique_ptr< AMP::TimeIntegrator::TimeIntegrator > createTimeIntegrator(std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > parameters)
void initialize(std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > parameters) override
RK23TimeIntegrator(int64_t fid, AMP::IO::RestartManager *manager)
Read restart data to file.
std::shared_ptr< AMP::LinearAlgebra::Vector > d_new_solution
std::shared_ptr< AMP::LinearAlgebra::Vector > d_z_vec
std::shared_ptr< AMP::LinearAlgebra::Vector > d_k4_vec
void registerChildObjects(AMP::IO::RestartManager *manager) const override
Register any child objects.
double getNextDt(const bool good_solution) override
std::shared_ptr< AMP::LinearAlgebra::Vector > d_k3_vec
std::shared_ptr< AMP::LinearAlgebra::Vector > d_k2_vec
void writeRestart(int64_t fid) const override
Write restart data to file.
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.
void updateSolution(void) override
RK23TimeIntegrator(std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > parameters)
bool checkNewSolution(void) override
void getFromInput(std::shared_ptr< AMP::Database > input_db)
int d_number_regrid_states
std::shared_ptr< AMP::LinearAlgebra::Vector > d_k1_vec
Abstract base class for time integration.
std::shared_ptr< AMP::TimeIntegrator::TimeIntegrator > shared_ptr
Convience typedef.