1#ifndef included_AMP_IDATimeIntegrator
2#define included_AMP_IDATimeIntegrator
7#include "AMP/operators/LinearOperator.h"
8#include "AMP/time_integrators/TimeIntegrator.h"
9#include "AMP/time_integrators/sundials/IDATimeIntegratorParameters.h"
10#include "AMP/time_integrators/sundials/IDATimeOperator.h"
11#include "AMP/vectors/sundials/SundialsVector.h"
13#ifdef AMP_USE_SUNDIALS
16 #include "ida/ida_spgmr.h"
17 #include "sundials/sundials_nvector.h"
18 #include "sundials/sundials_types.h"
126 void initialize( std::shared_ptr<TimeIntegratorParameters> parameters )
override;
133 void reset( std::shared_ptr<const TimeIntegratorParameters> parameters )
override;
150 std::shared_ptr<AMP::LinearAlgebra::Vector> in,
151 std::shared_ptr<AMP::LinearAlgebra::Vector> out )
override;
208 std::string
type()
const override {
return "IDATimeIntegrator"; }
std::shared_ptr< AMP::LinearAlgebra::Vector > d_residual
bool checkNewSolution(void) override
std::shared_ptr< AMP::Solver::SolverStrategy > d_pNestedSolver
bool getBoolManufacturedProblem(void)
void reset(std::shared_ptr< const TimeIntegratorParameters > parameters) override
bool d_bManufacturedProblem
double d_relative_tolerance
std::shared_ptr< LinearTimeOperator > getLinearTimeOperator() const
double getNextDt(const bool good_solution) override
std::shared_ptr< AMP::LinearAlgebra::Vector > d_solution_prime
bool d_bLinearMassOperator
static int IDAPrecSolve(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, N_Vector rvec, N_Vector zvec, realtype cj, realtype delta, void *user_data, N_Vector tmp)
std::shared_ptr< AMP::LinearAlgebra::Vector > getResidualVector() const
static int IDAResTrial(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, void *user_data)
void setInitialGuess(const bool first_step, const double current_time, const double current_dt, const double old_dt)
std::shared_ptr< IDATimeOperator > d_pIDATimeOperator
void updateSourceTerm(void)
void getFromInput(std::shared_ptr< AMP::Database > input_db)
std::string type() const override
Return the name of the TimeIntegrator.
void updateSolution(void) override
std::shared_ptr< LinearTimeOperator > d_pLinearTimeOperator
IDATimeIntegrator(std::shared_ptr< TimeIntegratorParameters > parameters)
std::shared_ptr< AMP::LinearAlgebra::Vector > getSourceTerm() override
bool d_bLinearRhsOperator
bool d_createLinearOperatorInternally
std::shared_ptr< AMP::Solver::SolverStrategy > getPreconditioner(void)
virtual ~IDATimeIntegrator()
double d_absolute_tolerance
void initialize(std::shared_ptr< TimeIntegratorParameters > parameters) override
static int IDAPrecSetup(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, realtype cj, void *user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3)
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.
bool d_bUsePreconditioner
std::shared_ptr< IDATimeOperator > getIDATimeOperator() const
Abstract base class for time integration.
std::shared_ptr< AMP::TimeIntegrator::TimeIntegrator > shared_ptr
Convience typedef.