Advanced Multi-Physics (AMP)
On-Line Documentation
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AMP::TimeIntegrator::BDFIntegrator Class Referenceabstract

#include <BDFIntegrator.h>

Inheritance diagram for AMP::TimeIntegrator::BDFIntegrator:
Inheritance graph
[legend]

Public Types

typedef std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorshared_ptr
 Convience typedef.
 

Public Member Functions

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 entire patch hierarchy through the specified time increment.
 
virtual void appendRhsVector (AMP::LinearAlgebra::Vector::shared_ptr vec)
 Append the vectors of interest to the rhs vector.
 
virtual void appendSolutionVector (AMP::LinearAlgebra::Vector::shared_ptr vec)
 Append the vectors of interest to the solution vector.
 
 BDFIntegrator (AMP::TimeIntegrator::TimeIntegratorParameters::shared_ptr)
 
 BDFIntegrator (int64_t fid, AMP::IO::RestartManager *manager)
 Read restart data to file.
 
bool checkNewSolution (void) override
 
virtual double getCurrentDt () const
 Return current timestep.
 
virtual double getCurrentTime () const
 Return final integration time.
 
virtual double getFinalTime () const
 Return final integration time.
 
int getFunctionEvaluationCount (void)
 
double getGamma (void) override
 
uint64_t getID () const
 Get a unique id hash for the vector.
 
virtual double getInitialDt ()
 
virtual double getInitialTime () const
 Return initial integration time.
 
virtual int getIntegratorStep () const
 Return current integration step number.
 
virtual int getMaxIntegratorSteps () const
 Return maximum number of integration steps.
 
virtual double getNextDt (const bool good_solution) override
 
int getNumberOfStepRejections (void)
 returns the total number of timestep rejections
 
const std::string & getObjectName () const
 
std::shared_ptr< AMP::Operator::OperatorgetOperator (void)
 
virtual std::shared_ptr< AMP::LinearAlgebra::VectorgetSolution (void)
 
std::shared_ptr< AMP::Solver::SolverStrategygetSolver (void)
 
virtual AMP::LinearAlgebra::Vector::shared_ptr getSourceTerm (void)
 
std::vector< doublegetTimeHistoryScalings (void) override
 Scaling factors for previous time history vectors.
 
std::shared_ptr< AMP::LinearAlgebra::VectorgetTimeHistorySourceTerm () override
 
const autogetTimeHistoryVectors ()
 
double getTimeOperatorScaling (void)
 return the factor getGamma() used to scale the rhs operator
 
virtual int getTotalRejectedSteps () const
 
virtual void initialize (std::shared_ptr< TimeIntegratorParameters > parameters)
 Initialize state of time integrator.
 
void initialize (void)
 
void initializeVariables (bool is_from_restart)
 
int integratorSpecificAdvanceSolution (const double dt, const bool first_step, std::shared_ptr< AMP::LinearAlgebra::Vector > in, std::shared_ptr< AMP::LinearAlgebra::Vector > out) override
 
virtual void printClassData (std::ostream &os) const
 
void printStatistics (std::ostream &os=AMP::pout) override
 print the statistics on the implicit equations
 
void putToDatabase (std::shared_ptr< AMP::Database > db)
 
void registerChildObjects (AMP::IO::RestartManager *manager) const override
 Register any child objects.
 
void registerDataManagerCallback (DataManagerCallBack callBackFn)
 
void registerOperator (std::shared_ptr< AMP::Operator::Operator > op) override
 
void registerVectorsForMemoryManagement (void)
 
virtual void registerWriter (std::shared_ptr< AMP::IO::Writer > writer)
 Registers a writer with the solver.
 
void reset (std::shared_ptr< const AMP::TimeIntegrator::TimeIntegratorParameters > parameters) override
 
virtual void reset (std::shared_ptr< const TimeIntegratorParameters > parameters)=0
 Resets the internal state of the time integrator.
 
void reset (void)
 
void resetSolver (std::shared_ptr< AMP::Solver::SolverStrategy > solver=nullptr)
 
void setComponentScalingFunction (std::function< void(std::shared_ptr< AMP::LinearAlgebra::Vector >, std::shared_ptr< AMP::LinearAlgebra::Vector >)> fnPtr)
 
void setComponentScalings (std::shared_ptr< AMP::LinearAlgebra::Vector > s, std::shared_ptr< AMP::LinearAlgebra::Vector > f)
 for multiphysics problems it may be necessary to scale the solution
 
virtual void setCurrentDt (const double dt)
 
virtual void setCurrentTime (const double t)
 
virtual void setFinalTime (const double t)
 
virtual void setInitialDt (const double dt)
 
void setInitialGuess (const bool first_step, const double current_time, const double current_dt, const double old_dt) override
 
virtual void setInitialTime (const double t)
 
void setIsNewTimeStep (bool bval)
 
void setIterationCounts (const int nli, const int li)
 
void setRegridStatus (bool is_after_regrid)
 
virtual void setSourceTerm (AMP::LinearAlgebra::Vector::shared_ptr src)
 
void setTimeScalingFunction (std::function< void(AMP::Scalar)> fnPtr)
 
size_t sizeOfTimeHistory () const override
 
bool stepsRemaining () const override
 
std::string type () const override
 Return the name of the TimeIntegrator.
 
void updateSolution (void) override
 
void writeRestart (int64_t fid) const override
 Write restart data to file.
 
 ~BDFIntegrator ()
 

Static Public Member Functions

static std::unique_ptr< AMP::TimeIntegrator::TimeIntegratorcreateTimeIntegrator (std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > parameters)
 

Protected Member Functions

double calculateLTEScalingFactor (void)
 
void calculateScaledLTENorm (std::shared_ptr< AMP::LinearAlgebra::Vector > x, std::shared_ptr< AMP::LinearAlgebra::Vector > y, std::vector< double > &norms)
 
void calculateTemporalTruncationError (void)
 
void computeIntegratorSourceTerm (void)
 
void createSolver (void)
 
void estimateBDF2TimeDerivative (void)
 estimates the BDF2 time derivative using the approach in Gresho and Sani
 
void estimateBETimeDerivative (void)
 estimates the BE time derivative using the approach in Gresho and Sani
 
void estimateCNTimeDerivative (void)
 estimates the CN time derivative using the approach in Gresho and Sani
 
double estimateDtWithTruncationErrorEstimates (double current_dt, bool good_solution)
 estimate timestep based on truncation error estimates
 
void estimateFrontSpeed ()
 
void estimateTimeDerivative (void)
 wrapper for estimating the time derivative after a succesful step
 
void evaluateAB2Predictor (void)
 evaluates the AB2 predictor and stores in the predictor energy and temperature variables
 
void evaluateBDFInterpolantPredictor (void)
 evaluates a predictor based on an interpolating polynomial
 
void evaluateForwardEulerPredictor (void)
 
void evaluateLeapFrogPredictor (void)
 
void evaluatePredictor (void)
 evaluates the predictor and stores in the predictor energy and temperature variables
 
void getFromInput (std::shared_ptr< AMP::Database > input_db)
 
void getFromRestart ()
 
double getNextDtConstant (const bool good_solution, const int solver_retcode)
 
double getNextDtFinalConstant (const bool good_solution, const int solver_retcode)
 
double getNextDtPredefined (const bool good_solution, const int solver_retcode)
 
double getNextDtTruncationError (const bool good_solution, const int solver_retcode)
 
bool integratorSpecificCheckNewSolution (const int solver_retcode) override
 
double integratorSpecificGetNextDt (const bool good_solution, const int solver_retcode) override
 
void integratorSpecificInitialize (void) override
 
void integratorSpecificUpdateSolution (const double new_time) override
 
void printVectorComponentNorms (const std::shared_ptr< AMP::LinearAlgebra::Vector > &vec, const std::string &prefix, const std::string &postfix, const std::string &norm)
 
void setMultiPhysicsScalings (void)
 
void setPredictorType (const std::string &predictor="")
 
void setTimeHistoryScalings () override
 

Protected Attributes

std::vector< doubled_a
 time history scalings
 
double d_alpha = 1.0
 ratio of current to previous timestep
 
bool d_auto_component_scaling = false
 enable auto scaling if true
 
int d_bdf1_eps_regrid_steps = 0
 number of steps to use bdf1 error estimator after regrid
 
std::string d_bdf_starting_integrator = "CN"
 the one step method used to start up BDF2, options are "Backward Euler" or "CN"
 
bool d_calculateTimeTruncError = false
 calculate time truncation error if enabled
 
bool d_combine_timestep_estimators = false
 boolean flag to combine different time error estimators
 
bool d_control_timestep_variation = false
 boolean to minimize the number of timestep changes in the truncation error strategy
 
double d_current_dt = std::numeric_limits<double>::signaling_NaN()
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_current_function_vector = nullptr
 the next vector will store the rhs at the current time level
 
int d_current_stepaccepts = 0
 keeps track of successive step acceptances
 
int d_current_steprejects = 0
 keeps track of successive step rejections at a given timestep
 
double d_current_time = std::numeric_limits<double>::signaling_NaN()
 
double d_DtCutLowerBound = std::numeric_limits<double>::signaling_NaN()
 max factor to cut timestep by when a timestep is rejected
 
double d_DtGrowthUpperBound = std::numeric_limits<double>::signaling_NaN()
 upper bound on factor by which timestep can be increased
 
int d_enable_picontrol_regrid_steps = 0
 the number of timesteps after a regrid before the pi controller is enabled
 
int d_evaluatefunction_count = 0
 counter to track number of nonlinear function calls
 
std::function< void(std::shared_ptr< AMP::LinearAlgebra::Vector >, std::shared_ptr< AMP::LinearAlgebra::Vector >)> d_fComponentScalingFnPtr
 registered callback function to set multiphysics component scalings
 
int d_final_constant_timestep_current_step = 1
 
double d_final_time = std::numeric_limits<double>::signaling_NaN()
 
double d_first_initial_dt = 0.0
 double storing the first dt before any restart
 
bool d_first_step = true
 
std::function< void(AMP::Scalar)> d_fTimeScalingFnPtr
 registered callback function to set gamma, typically when the user needs to know gamma
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_function_scaling
 
double d_gamma = 0.0
 factor to multiply rhs by
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_ic_vector = nullptr
 
int d_iDebugPrintInfoLevel = 0
 
std::string d_implicit_integrator = "BDF2"
 string for the time integrator being used, options are "Backward Euler", "BDF2", or "CN"
 
double d_initial_dt = std::numeric_limits<double>::signaling_NaN()
 initial time increment
 
std::string d_initial_predictor_type = "forward_euler"
 initial predictor type
 
double d_initial_time = std::numeric_limits<double>::signaling_NaN()
 
bool d_initialized = false
 
size_t d_integrator_index = 0
 index into d_integrator_names showing what is the current integrator
 
std::vector< std::string > d_integrator_names
 names of time integrators
 
std::vector< doubled_integrator_order
 truncation error order for time integrators
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_integrator_source_vector = nullptr
 
int d_integrator_step = 0
 
std::vector< doubled_integrator_steps
 vector of previous timesteps
 
bool d_is_after_regrid = false
 state of simulation, whether it is immediately after a regrid
 
bool d_is_new_timestep = true
 boolean flag to determine if a new timestep has started
 
std::list< doubled_l2errorNorms_E
 
std::list< doubled_l2errorNorms_T
 
int d_linear_iterations = 0
 records number of linear iterations at current timestep
 
std::vector< intd_linearIterations
 vector to keep track of the number of linear iterations
 
bool d_log_statistics = true
 whether to log statistics about time integrator
 
std::vector< std::vector< double > > d_LTE
 vector of vectors to store the local truncation errors for components
 
double d_max_dt = std::numeric_limits<double>::max()
 maximum allowable timestep (user defined)
 
size_t d_max_integrator_index = static_cast<size_t>( -1 )
 index into d_integrator_names that shows what is the max BDF order
 
int d_max_integrator_steps = 0
 
double d_min_dt = std::numeric_limits<double>::signaling_NaN()
 
double d_new_time = std::numeric_limits<double>::signaling_NaN()
 double containing t_{n+1}
 
int d_nonlinear_iterations = 0
 records number of nonlinear iterations at current timestep
 
std::vector< intd_nonlinearIterations
 vector to keep track of the number of nonlinear iterations
 
int d_number_initial_fixed_steps = 0
 
int d_number_of_time_intervals = -1
 
std::string d_object_name
 
double d_old_dt = std::numeric_limits<double>::signaling_NaN()
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_old_td_vector = nullptr
 the next vector will store the old time derivative at previous time level
 
std::shared_ptr< AMP::Operator::Operatord_operator
 
std::string d_pi_controller_type = "PC.4.7"
 type of PI controller, current options are "H211b", "PI.4.7", and "Deadbeat"
 
std::shared_ptr< AMP::Operator::Operatord_pMassOperator
 
std::shared_ptr< TimeIntegratorParametersd_pParameters
 
std::string d_predictor_type = "leapfrog"
 predictor to use with predictor corrector approach
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_predictor_vector = nullptr
 the next vector will store the predictor for the next timestep
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_prev_function_vector = nullptr
 the next vector will store the old rhs at the previous time level
 
std::vector< std::shared_ptr< AMP::LinearAlgebra::Vector > > d_prev_solutions
 
bool d_prevSuccessiveRejects = false
 boolean flag to keep track of successive time step rejections
 
double d_prevTimeTruncationErrorEstimate = 1.0
 truncation error estimate at previous step
 
std::vector< doubled_problem_scales
 fixed used defined scales for time error scaling
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_pSourceTerm
 
DataManagerCallBack d_registerVectorForManagement
 
bool d_reset_after_restart = false
 boolean flag to detect a call to reset immediately following restart
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_scratch_function_vector = nullptr
 the next vector is used for scratch or intermediate storage for rhs
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_scratch_vector = nullptr
 the next vector is used for scratch or intermediate storage
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_solution_scaling
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_solution_vector
 
std::shared_ptr< AMP::Solver::SolverStrategyd_solver = nullptr
 
int d_solver_converged_reason = -1
 convergence reason returned by solver
 
int d_solver_retcode = 0
 
std::vector< intd_step_accepted
 vector to keep track of whether the step is accepted
 
double d_target_relative_change = 0.1
 
double d_time_atol = std::numeric_limits<double>::signaling_NaN()
 absolute tolerance for the truncation error based strategy
 
std::string d_time_error_scaling = "fixed_scaling"
 
bool d_time_history_initialized = false
 whether it is the first step
 
double d_time_rtol = std::numeric_limits<double>::signaling_NaN()
 relative tolerance for the truncation error based strategy
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_timederivative_vector = nullptr
 the next vector will store the current estimate for the time derivative
 
double d_timeErrorEstimateRatio = 1.0
 truncation error ratio to previous step
 
std::vector< doubled_times
 vector to the store the simulation times
 
std::string d_timestep_strategy = "truncationErrorStrategy"
 
std::vector< doubled_timesteps
 vector to store the timesteps
 
int d_timesteps_after_regrid = 0
 keeps track of the number of timesteps after the last regrid
 
double d_timeTruncationErrorEstimate = 1.0
 truncation error estimate in time over both E and T
 
std::string d_timeTruncationErrorNormType = "l2Norm"
 norm type used for truncation error calculation
 
int d_total_steprejects = 0
 
bool d_use_bdf1_estimator_on_regrid = true
 
bool d_use_constant_time_interpolation = false
 boolean flag used to do constant time interpolation, used after regrids
 
bool d_use_initial_predictor = true
 
bool d_use_pi_controller = true
 boolean flag to enable or disable the use of a PI based timestep controller
 
bool d_use_predictor = true
 boolean flag to use a predictor for the initial guess at each timestep
 
bool d_user_managed_time_operator = false
 user manages time operator
 
std::vector< std::string > d_var_names
 names of variables to associate with different components of a vector
 
std::vector< std::string > d_vector_names
 names of variables to associate with different vectors
 
bool d_vectors_registered_for_mgmt = false
 boolean to ensure registerVectorsForMemoryManagement is called once
 
std::shared_ptr< AMP::IO::Writerd_writer
 keeps track of total number of step rejections
 

Detailed Description

Definition at line 23 of file BDFIntegrator.h.

Member Typedef Documentation

◆ shared_ptr

Convience typedef.

Definition at line 37 of file TimeIntegrator.h.

Constructor & Destructor Documentation

◆ BDFIntegrator() [1/2]

AMP::TimeIntegrator::BDFIntegrator::BDFIntegrator ( AMP::TimeIntegrator::TimeIntegratorParameters::shared_ptr  )
explicit

◆ ~BDFIntegrator()

AMP::TimeIntegrator::BDFIntegrator::~BDFIntegrator ( )

◆ BDFIntegrator() [2/2]

AMP::TimeIntegrator::BDFIntegrator::BDFIntegrator ( int64_t  fid,
AMP::IO::RestartManager manager 
)

Read restart data to file.

This function will create a variable from the restart file

Parameters
fidFile identifier to write
managerRestart manager

Member Function Documentation

◆ advanceSolution()

int AMP::TimeIntegrator::ImplicitIntegrator::advanceSolution ( const double  dt,
const bool  first_step,
std::shared_ptr< AMP::LinearAlgebra::Vector in,
std::shared_ptr< AMP::LinearAlgebra::Vector out 
)
overridevirtualinherited

Integrate entire patch hierarchy through the specified time increment.

Integrate entire patch hierarchy through the specified time increment. The time advance assumes the use of a nonlinear solver to implicitly integrate the discrete equations. The integer return value is the return code generated by the particular solver package in use. It is the user's responsibility to interpret this code in a manner consistent with the solver they are using.

The boolean first_step argument is true when this is the very first call to the advance function or if the call occurs immediately after the hierarchy has changed due to regridding. Otherwise it is false. Note that, when the argument is true, the use of extrapolation to construct the initial guess for the advanced solution may not be possible.

Parameters
dtTime step size
first_stepWhether this is the first step after grid change
inInput vector
outOutput vector

Implements AMP::TimeIntegrator::TimeIntegrator.

◆ appendRhsVector()

virtual void AMP::TimeIntegrator::TimeIntegrator::appendRhsVector ( AMP::LinearAlgebra::Vector::shared_ptr  vec)
inlinevirtualinherited

Append the vectors of interest to the rhs vector.

This function will append the necessary vectors that this solver owns to the global vector provided. Note that each solver may own any number of vectors, but no vector may be owned by multiple solvers.

Parameters
vecThe vector to append

Definition at line 219 of file TimeIntegrator.h.

◆ appendSolutionVector()

virtual void AMP::TimeIntegrator::TimeIntegrator::appendSolutionVector ( AMP::LinearAlgebra::Vector::shared_ptr  vec)
inlinevirtualinherited

Append the vectors of interest to the solution vector.

This function will append the necessary vectors that this solver owns to the global vector provided. Note that each solver may own any number of vectors, but no vector may be owned by multiple solvers.

Parameters
vecThe vector to append

Definition at line 208 of file TimeIntegrator.h.

◆ calculateLTEScalingFactor()

double AMP::TimeIntegrator::BDFIntegrator::calculateLTEScalingFactor ( void  )
protected

Utility function that calculates the scaling term for the local truncation error (LTE) expressions obtained by doing Taylor series expansions at a given timestep

◆ calculateScaledLTENorm()

void AMP::TimeIntegrator::BDFIntegrator::calculateScaledLTENorm ( std::shared_ptr< AMP::LinearAlgebra::Vector x,
std::shared_ptr< AMP::LinearAlgebra::Vector y,
std::vector< double > &  norms 
)
protected

Utility function to calculate the scaled norm of the LTE error.

◆ calculateTemporalTruncationError()

void AMP::TimeIntegrator::BDFIntegrator::calculateTemporalTruncationError ( void  )
protected

routine to calculate the current truncation error

◆ checkNewSolution()

bool AMP::TimeIntegrator::ImplicitIntegrator::checkNewSolution ( void  )
overridevirtualinherited

Check time advanced solution to determine whether it is acceptable. Return true if the solution is acceptable; return false otherwise. The integer argument is the return code generated by the call to the nonlinear solver "solve" routine. The meaning of this value depends on the particular nonlinear solver in use and must be intepreted properly by the user-supplied solution checking routine.

Implements AMP::TimeIntegrator::TimeIntegrator.

◆ computeIntegratorSourceTerm()

void AMP::TimeIntegrator::BDFIntegrator::computeIntegratorSourceTerm ( void  )
protected

calculates the linear weighted sum of previous time solutions that forms a source term for the nonlinear equations at each timestep

◆ createSolver()

void AMP::TimeIntegrator::ImplicitIntegrator::createSolver ( void  )
protectedinherited

◆ createTimeIntegrator()

static std::unique_ptr< AMP::TimeIntegrator::TimeIntegrator > AMP::TimeIntegrator::BDFIntegrator::createTimeIntegrator ( std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters parameters)
static

◆ estimateBDF2TimeDerivative()

void AMP::TimeIntegrator::BDFIntegrator::estimateBDF2TimeDerivative ( void  )
protected

estimates the BDF2 time derivative using the approach in Gresho and Sani

◆ estimateBETimeDerivative()

void AMP::TimeIntegrator::BDFIntegrator::estimateBETimeDerivative ( void  )
protected

estimates the BE time derivative using the approach in Gresho and Sani

◆ estimateCNTimeDerivative()

void AMP::TimeIntegrator::BDFIntegrator::estimateCNTimeDerivative ( void  )
protected

estimates the CN time derivative using the approach in Gresho and Sani

◆ estimateDtWithTruncationErrorEstimates()

double AMP::TimeIntegrator::BDFIntegrator::estimateDtWithTruncationErrorEstimates ( double  current_dt,
bool  good_solution 
)
protected

estimate timestep based on truncation error estimates

◆ estimateFrontSpeed()

void AMP::TimeIntegrator::BDFIntegrator::estimateFrontSpeed ( )
protected

estimate the speed of the Marshak wave front, used as a heuristic within some timestep calculations

◆ estimateTimeDerivative()

void AMP::TimeIntegrator::BDFIntegrator::estimateTimeDerivative ( void  )
protected

wrapper for estimating the time derivative after a succesful step

◆ evaluateAB2Predictor()

void AMP::TimeIntegrator::BDFIntegrator::evaluateAB2Predictor ( void  )
protected

evaluates the AB2 predictor and stores in the predictor energy and temperature variables

◆ evaluateBDFInterpolantPredictor()

void AMP::TimeIntegrator::BDFIntegrator::evaluateBDFInterpolantPredictor ( void  )
protected

evaluates a predictor based on an interpolating polynomial

◆ evaluateForwardEulerPredictor()

void AMP::TimeIntegrator::BDFIntegrator::evaluateForwardEulerPredictor ( void  )
protected

evaluates the forward Euler predictor and stores in the predictor energy and temperature variables

◆ evaluateLeapFrogPredictor()

void AMP::TimeIntegrator::BDFIntegrator::evaluateLeapFrogPredictor ( void  )
protected

evaluates the leap frog predictor and stores in the predictor energy and temperature variables

◆ evaluatePredictor()

void AMP::TimeIntegrator::BDFIntegrator::evaluatePredictor ( void  )
protected

evaluates the predictor and stores in the predictor energy and temperature variables

◆ getCurrentDt()

virtual double AMP::TimeIntegrator::TimeIntegrator::getCurrentDt ( ) const
virtualinherited

Return current timestep.

Return current timestep.

◆ getCurrentTime()

virtual double AMP::TimeIntegrator::TimeIntegrator::getCurrentTime ( ) const
virtualinherited

Return final integration time.

Return current integration time.

◆ getFinalTime()

virtual double AMP::TimeIntegrator::TimeIntegrator::getFinalTime ( ) const
virtualinherited

Return final integration time.

Return final integration time.

◆ getFromInput()

void AMP::TimeIntegrator::BDFIntegrator::getFromInput ( std::shared_ptr< AMP::Database input_db)
protected

read in parameters from input database

◆ getFromRestart()

void AMP::TimeIntegrator::TimeIntegrator::getFromRestart ( )
protectedinherited

◆ getFunctionEvaluationCount()

int AMP::TimeIntegrator::BDFIntegrator::getFunctionEvaluationCount ( void  )
inline

Definition at line 65 of file BDFIntegrator.h.

References d_evaluatefunction_count.

◆ getGamma()

double AMP::TimeIntegrator::BDFIntegrator::getGamma ( void  )
overridevirtual

◆ getID()

uint64_t AMP::TimeIntegrator::TimeIntegrator::getID ( ) const
inherited

Get a unique id hash for the vector.

◆ getInitialDt()

virtual double AMP::TimeIntegrator::TimeIntegrator::getInitialDt ( )
inlinevirtualinherited

get initial time step.

Definition at line 179 of file TimeIntegrator.h.

References AMP::TimeIntegrator::TimeIntegrator::d_initial_dt.

◆ getInitialTime()

virtual double AMP::TimeIntegrator::TimeIntegrator::getInitialTime ( ) const
virtualinherited

Return initial integration time.

Return initial integration time.

◆ getIntegratorStep()

virtual int AMP::TimeIntegrator::TimeIntegrator::getIntegratorStep ( ) const
virtualinherited

Return current integration step number.

Return current integration step number.

◆ getMaxIntegratorSteps()

virtual int AMP::TimeIntegrator::TimeIntegrator::getMaxIntegratorSteps ( ) const
virtualinherited

Return maximum number of integration steps.

Return maximum number of integration steps.

◆ getNextDt()

virtual double AMP::TimeIntegrator::ImplicitIntegrator::getNextDt ( const bool  good_solution)
overridevirtualinherited

Return time increment for next solution advance. Timestep selection is generally based on whether the nonlinear solution iteration converged and, if so, whether the solution meets some user-defined criteria. This routine assumes that, before it is called, the routine checkNewSolution() was called. The boolean argument is the return value from that call. The integer argument is the return code generated by the nonlinear solver package that computed the solution.

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

◆ getNextDtConstant()

double AMP::TimeIntegrator::BDFIntegrator::getNextDtConstant ( const bool  good_solution,
const int  solver_retcode 
)
protected

◆ getNextDtFinalConstant()

double AMP::TimeIntegrator::BDFIntegrator::getNextDtFinalConstant ( const bool  good_solution,
const int  solver_retcode 
)
protected

◆ getNextDtPredefined()

double AMP::TimeIntegrator::BDFIntegrator::getNextDtPredefined ( const bool  good_solution,
const int  solver_retcode 
)
protected

◆ getNextDtTruncationError()

double AMP::TimeIntegrator::BDFIntegrator::getNextDtTruncationError ( const bool  good_solution,
const int  solver_retcode 
)
protected

◆ getNumberOfStepRejections()

int AMP::TimeIntegrator::BDFIntegrator::getNumberOfStepRejections ( void  )
inline

returns the total number of timestep rejections

Definition at line 33 of file BDFIntegrator.h.

References AMP::TimeIntegrator::TimeIntegrator::d_total_steprejects.

◆ getObjectName()

const std::string & AMP::TimeIntegrator::ImplicitIntegrator::getObjectName ( ) const
inlineinherited

Returns the object name.

Definition at line 225 of file ImplicitIntegrator.h.

References AMP::TimeIntegrator::TimeIntegrator::d_object_name.

◆ getOperator()

std::shared_ptr< AMP::Operator::Operator > AMP::TimeIntegrator::TimeIntegrator::getOperator ( void  )
inlineinherited

Definition at line 246 of file TimeIntegrator.h.

References AMP::TimeIntegrator::TimeIntegrator::d_operator.

◆ getSolution()

virtual std::shared_ptr< AMP::LinearAlgebra::Vector > AMP::TimeIntegrator::TimeIntegrator::getSolution ( void  )
inlinevirtualinherited

Retrieve the current solution.

Definition at line 137 of file TimeIntegrator.h.

References AMP::TimeIntegrator::TimeIntegrator::d_solution_vector.

◆ getSolver()

std::shared_ptr< AMP::Solver::SolverStrategy > AMP::TimeIntegrator::ImplicitIntegrator::getSolver ( void  )
inlineinherited

◆ getSourceTerm()

virtual AMP::LinearAlgebra::Vector::shared_ptr AMP::TimeIntegrator::TimeIntegrator::getSourceTerm ( void  )
inlinevirtualinherited

◆ getTimeHistoryScalings()

std::vector< double > AMP::TimeIntegrator::BDFIntegrator::getTimeHistoryScalings ( void  )
overridevirtual

Scaling factors for previous time history vectors.

For RK methods the previous time vector is always scaled by 1. For multistep methods this vector can consist of multiple scalings with the first entry being the scaling for $y^{n-1}$, the next being for $y^{n-2}$ etc

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

◆ getTimeHistorySourceTerm()

std::shared_ptr< AMP::LinearAlgebra::Vector > AMP::TimeIntegrator::BDFIntegrator::getTimeHistorySourceTerm ( )
inlineoverridevirtual

Reimplemented from AMP::TimeIntegrator::ImplicitIntegrator.

Definition at line 97 of file BDFIntegrator.h.

References d_integrator_source_vector.

◆ getTimeHistoryVectors()

const auto & AMP::TimeIntegrator::BDFIntegrator::getTimeHistoryVectors ( )
inline

Definition at line 95 of file BDFIntegrator.h.

References d_prev_solutions.

◆ getTimeOperatorScaling()

double AMP::TimeIntegrator::BDFIntegrator::getTimeOperatorScaling ( void  )

return the factor getGamma() used to scale the rhs operator

◆ getTotalRejectedSteps()

virtual int AMP::TimeIntegrator::TimeIntegrator::getTotalRejectedSteps ( ) const
inlinevirtualinherited

◆ initialize() [1/2]

virtual void AMP::TimeIntegrator::TimeIntegrator::initialize ( std::shared_ptr< TimeIntegratorParameters parameters)
virtualinherited

Initialize state of time integrator.

Initialize state of time integrator. This includes creating solution vector and initializing solver components.

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

◆ initialize() [2/2]

void AMP::TimeIntegrator::ImplicitIntegrator::initialize ( void  )
inherited

Initialize state of time integrator. This includes creating solution vector and initializing solver components.

◆ initializeVariables()

void AMP::TimeIntegrator::BDFIntegrator::initializeVariables ( bool  is_from_restart)

registering and allocation of variables

◆ integratorSpecificAdvanceSolution()

int AMP::TimeIntegrator::BDFIntegrator::integratorSpecificAdvanceSolution ( const double  dt,
const bool  first_step,
std::shared_ptr< AMP::LinearAlgebra::Vector in,
std::shared_ptr< AMP::LinearAlgebra::Vector out 
)
overridevirtual

allows for specialization of advanceSolution for classes of time integrators

Reimplemented from AMP::TimeIntegrator::ImplicitIntegrator.

◆ integratorSpecificCheckNewSolution()

bool AMP::TimeIntegrator::BDFIntegrator::integratorSpecificCheckNewSolution ( const int  solver_retcode)
overrideprotectedvirtual

Check the computed solution and return true if it is acceptable; otherwise return false. The integer solver_retcode is the return code generated by the nonlinear solver. This value must be interpreted in a manner consistent with the solver in use.

Reimplemented from AMP::TimeIntegrator::ImplicitIntegrator.

◆ integratorSpecificGetNextDt()

double AMP::TimeIntegrator::BDFIntegrator::integratorSpecificGetNextDt ( const bool  good_solution,
const int  solver_retcode 
)
overrideprotectedvirtual

Return the next time increment through which to advance the solution. The good_solution is the value returned by a call to checkNewSolution(), which determines whether the computed solution is acceptable or not. The integer solver_retcode is the return code generated by the nonlinear solver. This value must be interpreted in a manner consistant with the solver in use.

Reimplemented from AMP::TimeIntegrator::ImplicitIntegrator.

◆ integratorSpecificInitialize()

void AMP::TimeIntegrator::BDFIntegrator::integratorSpecificInitialize ( void  )
overrideprotectedvirtual

allows for specialization of the initialization routine for classes of time integrators

Reimplemented from AMP::TimeIntegrator::ImplicitIntegrator.

◆ integratorSpecificUpdateSolution()

void AMP::TimeIntegrator::BDFIntegrator::integratorSpecificUpdateSolution ( const double  new_time)
overrideprotectedvirtual

Update solution storage and dependent quantities after computing an acceptable time advanced solution. The new_time value is the new solution time.

Function overloaded from algs::ImplicitEquationStrategy.

Reimplemented from AMP::TimeIntegrator::ImplicitIntegrator.

◆ printClassData()

virtual void AMP::TimeIntegrator::ImplicitIntegrator::printClassData ( std::ostream &  os) const
virtualinherited

Print out all members of integrator instance to given output stream.

◆ printStatistics()

void AMP::TimeIntegrator::BDFIntegrator::printStatistics ( std::ostream &  os = AMP::pout)
overridevirtual

print the statistics on the implicit equations

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

◆ printVectorComponentNorms()

void AMP::TimeIntegrator::BDFIntegrator::printVectorComponentNorms ( const std::shared_ptr< AMP::LinearAlgebra::Vector > &  vec,
const std::string &  prefix,
const std::string &  postfix,
const std::string &  norm 
)
protected

prints out norms of vector components calculated individually, prefix and postfix are strings that the user can customize to make the message more informational

◆ putToDatabase()

void AMP::TimeIntegrator::TimeIntegrator::putToDatabase ( std::shared_ptr< AMP::Database db)
inherited

Write out state of object to given database.

When assertion checking is active, the database pointer must be non-null.

◆ registerChildObjects()

void AMP::TimeIntegrator::BDFIntegrator::registerChildObjects ( AMP::IO::RestartManager manager) const
overridevirtual

Register any child objects.

This function will register child objects with the manager

Parameters
managerRestart manager

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

◆ registerDataManagerCallback()

void AMP::TimeIntegrator::BDFIntegrator::registerDataManagerCallback ( DataManagerCallBack  callBackFn)
inline

Definition at line 82 of file BDFIntegrator.h.

References d_registerVectorForManagement.

◆ registerOperator()

void AMP::TimeIntegrator::ImplicitIntegrator::registerOperator ( std::shared_ptr< AMP::Operator::Operator op)
overridevirtualinherited

Registers an operator for the rhs

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

◆ registerVectorsForMemoryManagement()

void AMP::TimeIntegrator::BDFIntegrator::registerVectorsForMemoryManagement ( void  )

◆ registerWriter()

virtual void AMP::TimeIntegrator::TimeIntegrator::registerWriter ( std::shared_ptr< AMP::IO::Writer writer)
inlinevirtualinherited

Registers a writer with the solver.

This function will register a writer with the solver. The solver may then register any vector components it "owns" with the writer.

Parameters
writerThe writer to register

Definition at line 227 of file TimeIntegrator.h.

References AMP::TimeIntegrator::TimeIntegrator::d_writer.

◆ reset() [1/3]

void AMP::TimeIntegrator::BDFIntegrator::reset ( std::shared_ptr< const AMP::TimeIntegrator::TimeIntegratorParameters parameters)
override

Reset cached information that depends on the mesh configuration.

◆ reset() [2/3]

virtual void AMP::TimeIntegrator::TimeIntegrator::reset ( std::shared_ptr< const TimeIntegratorParameters parameters)
pure virtualinherited

Resets the internal state of the time integrator.

Resets the internal state of the time integrator as needed. A parameter argument is passed to allow for general flexibility in determining what needs to be reset.

Implemented in AMP::TimeIntegrator::OxideTimeIntegrator, and AMP::TimeIntegrator::IDATimeIntegrator.

◆ reset() [3/3]

void AMP::TimeIntegrator::ImplicitIntegrator::reset ( void  )
inherited

reset parameters so that the time integrator is ready to start at the initial time

◆ resetSolver()

void AMP::TimeIntegrator::ImplicitIntegrator::resetSolver ( std::shared_ptr< AMP::Solver::SolverStrategy solver = nullptr)
inlineinherited

◆ setComponentScalingFunction()

void AMP::TimeIntegrator::ImplicitIntegrator::setComponentScalingFunction ( std::function< void(std::shared_ptr< AMP::LinearAlgebra::Vector >, std::shared_ptr< AMP::LinearAlgebra::Vector >)>  fnPtr)
inlineinherited

◆ setComponentScalings()

void AMP::TimeIntegrator::ImplicitIntegrator::setComponentScalings ( std::shared_ptr< AMP::LinearAlgebra::Vector s,
std::shared_ptr< AMP::LinearAlgebra::Vector f 
)
inherited

for multiphysics problems it may be necessary to scale the solution

◆ setCurrentDt()

virtual void AMP::TimeIntegrator::TimeIntegrator::setCurrentDt ( const double  dt)
inlinevirtualinherited

◆ setCurrentTime()

virtual void AMP::TimeIntegrator::TimeIntegrator::setCurrentTime ( const double  t)
inlinevirtualinherited

◆ setFinalTime()

virtual void AMP::TimeIntegrator::TimeIntegrator::setFinalTime ( const double  t)
inlinevirtualinherited

◆ setInitialDt()

virtual void AMP::TimeIntegrator::TimeIntegrator::setInitialDt ( const double  dt)
inlinevirtualinherited

◆ setInitialGuess()

void AMP::TimeIntegrator::BDFIntegrator::setInitialGuess ( const bool  first_step,
const double  current_time,
const double  current_dt,
const double  old_dt 
)
overridevirtual

Set the initial guess for the time advanced solution at the start of the nonlinear iteration. The boolean argument first_step indicates whether we are at the first step on the current mesh configuration. This is true when the mesh is constructed initially and after regridding. In these cases, setting the initial iterate using extrapolation, for example, may not be possible.

Reimplemented from AMP::TimeIntegrator::ImplicitIntegrator.

◆ setInitialTime()

virtual void AMP::TimeIntegrator::TimeIntegrator::setInitialTime ( const double  t)
inlinevirtualinherited

◆ setIsNewTimeStep()

void AMP::TimeIntegrator::BDFIntegrator::setIsNewTimeStep ( bool  bval)
inline

Definition at line 51 of file BDFIntegrator.h.

References d_is_new_timestep.

◆ setIterationCounts()

void AMP::TimeIntegrator::BDFIntegrator::setIterationCounts ( const int  nli,
const int  li 
)

◆ setMultiPhysicsScalings()

void AMP::TimeIntegrator::BDFIntegrator::setMultiPhysicsScalings ( void  )
protected

Set solution and function scalings for multi-physics scalings automatically

◆ setPredictorType()

void AMP::TimeIntegrator::BDFIntegrator::setPredictorType ( const std::string &  predictor = "")
protected

◆ setRegridStatus()

void AMP::TimeIntegrator::BDFIntegrator::setRegridStatus ( bool  is_after_regrid)

Set flag to indicate whether regridding is taking place.

◆ setSourceTerm()

virtual void AMP::TimeIntegrator::TimeIntegrator::setSourceTerm ( AMP::LinearAlgebra::Vector::shared_ptr  src)
inlinevirtualinherited

◆ setTimeHistoryScalings()

void AMP::TimeIntegrator::BDFIntegrator::setTimeHistoryScalings ( )
overrideprotectedvirtual

◆ setTimeScalingFunction()

void AMP::TimeIntegrator::ImplicitIntegrator::setTimeScalingFunction ( std::function< void(AMP::Scalar)>  fnPtr)
inlineinherited

◆ sizeOfTimeHistory()

size_t AMP::TimeIntegrator::BDFIntegrator::sizeOfTimeHistory ( ) const
inlineoverridevirtual

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

Definition at line 93 of file BDFIntegrator.h.

References d_max_integrator_index.

◆ stepsRemaining()

bool AMP::TimeIntegrator::ImplicitIntegrator::stepsRemaining ( ) const
inlineoverridevirtualinherited

Return true if the number of integration steps performed by the integrator has not reached the specified maximum; return false otherwise.

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

Definition at line 215 of file ImplicitIntegrator.h.

References AMP::TimeIntegrator::TimeIntegrator::d_integrator_step, and AMP::TimeIntegrator::TimeIntegrator::d_max_integrator_steps.

◆ type()

std::string AMP::TimeIntegrator::BDFIntegrator::type ( ) const
inlineoverridevirtual

Return the name of the TimeIntegrator.

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

Definition at line 102 of file BDFIntegrator.h.

◆ updateSolution()

void AMP::TimeIntegrator::ImplicitIntegrator::updateSolution ( void  )
overridevirtualinherited

Update solution (e.g., reset pointers for solution data, update dependent variables, etc.) after time advance. It is assumed that when this routine is invoked, an acceptable new solution has been computed. The double return value is the simulation time corresponding to the advanced solution.

Implements AMP::TimeIntegrator::TimeIntegrator.

◆ writeRestart()

void AMP::TimeIntegrator::BDFIntegrator::writeRestart ( int64_t  fid) const
overridevirtual

Write restart data to file.

This function will write the mesh to an HDF5 file

Parameters
fidFile identifier to write

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

Member Data Documentation

◆ d_a

std::vector<double> AMP::TimeIntegrator::BDFIntegrator::d_a
protected

time history scalings

Definition at line 318 of file BDFIntegrator.h.

◆ d_alpha

double AMP::TimeIntegrator::BDFIntegrator::d_alpha = 1.0
protected

ratio of current to previous timestep

Definition at line 359 of file BDFIntegrator.h.

◆ d_auto_component_scaling

bool AMP::TimeIntegrator::BDFIntegrator::d_auto_component_scaling = false
protected

enable auto scaling if true

Definition at line 431 of file BDFIntegrator.h.

◆ d_bdf1_eps_regrid_steps

int AMP::TimeIntegrator::BDFIntegrator::d_bdf1_eps_regrid_steps = 0
protected

number of steps to use bdf1 error estimator after regrid

Definition at line 402 of file BDFIntegrator.h.

◆ d_bdf_starting_integrator

std::string AMP::TimeIntegrator::BDFIntegrator::d_bdf_starting_integrator = "CN"
protected

the one step method used to start up BDF2, options are "Backward Euler" or "CN"

Definition at line 327 of file BDFIntegrator.h.

◆ d_calculateTimeTruncError

bool AMP::TimeIntegrator::BDFIntegrator::d_calculateTimeTruncError = false
protected

calculate time truncation error if enabled

Definition at line 473 of file BDFIntegrator.h.

◆ d_combine_timestep_estimators

bool AMP::TimeIntegrator::BDFIntegrator::d_combine_timestep_estimators = false
protected

boolean flag to combine different time error estimators

Definition at line 447 of file BDFIntegrator.h.

◆ d_control_timestep_variation

bool AMP::TimeIntegrator::BDFIntegrator::d_control_timestep_variation = false
protected

boolean to minimize the number of timestep changes in the truncation error strategy

Definition at line 450 of file BDFIntegrator.h.

◆ d_current_dt

double AMP::TimeIntegrator::TimeIntegrator::d_current_dt = std::numeric_limits<double>::signaling_NaN()
protectedinherited

◆ d_current_function_vector

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::BDFIntegrator::d_current_function_vector = nullptr
protected

the next vector will store the rhs at the current time level

Definition at line 276 of file BDFIntegrator.h.

◆ d_current_stepaccepts

int AMP::TimeIntegrator::BDFIntegrator::d_current_stepaccepts = 0
protected

keeps track of successive step acceptances

Definition at line 408 of file BDFIntegrator.h.

◆ d_current_steprejects

int AMP::TimeIntegrator::BDFIntegrator::d_current_steprejects = 0
protected

keeps track of successive step rejections at a given timestep

Definition at line 405 of file BDFIntegrator.h.

◆ d_current_time

double AMP::TimeIntegrator::TimeIntegrator::d_current_time = std::numeric_limits<double>::signaling_NaN()
protectedinherited

◆ d_DtCutLowerBound

double AMP::TimeIntegrator::BDFIntegrator::d_DtCutLowerBound = std::numeric_limits<double>::signaling_NaN()
protected

max factor to cut timestep by when a timestep is rejected

Definition at line 362 of file BDFIntegrator.h.

◆ d_DtGrowthUpperBound

double AMP::TimeIntegrator::BDFIntegrator::d_DtGrowthUpperBound = std::numeric_limits<double>::signaling_NaN()
protected

upper bound on factor by which timestep can be increased

Definition at line 365 of file BDFIntegrator.h.

◆ d_enable_picontrol_regrid_steps

int AMP::TimeIntegrator::BDFIntegrator::d_enable_picontrol_regrid_steps = 0
protected

the number of timesteps after a regrid before the pi controller is enabled

Definition at line 399 of file BDFIntegrator.h.

◆ d_evaluatefunction_count

int AMP::TimeIntegrator::BDFIntegrator::d_evaluatefunction_count = 0
protected

counter to track number of nonlinear function calls

Definition at line 420 of file BDFIntegrator.h.

Referenced by getFunctionEvaluationCount().

◆ d_fComponentScalingFnPtr

std::function<void( std::shared_ptr<AMP::LinearAlgebra::Vector>, std::shared_ptr<AMP::LinearAlgebra::Vector> )> AMP::TimeIntegrator::ImplicitIntegrator::d_fComponentScalingFnPtr
protectedinherited

registered callback function to set multiphysics component scalings

Definition at line 320 of file ImplicitIntegrator.h.

Referenced by AMP::TimeIntegrator::ImplicitIntegrator::setComponentScalingFunction().

◆ d_final_constant_timestep_current_step

int AMP::TimeIntegrator::BDFIntegrator::d_final_constant_timestep_current_step = 1
protected

used only with the final constant timestep scheme, counter to keep track of current step

Definition at line 435 of file BDFIntegrator.h.

◆ d_final_time

double AMP::TimeIntegrator::TimeIntegrator::d_final_time = std::numeric_limits<double>::signaling_NaN()
protectedinherited

Definition at line 345 of file TimeIntegrator.h.

Referenced by AMP::TimeIntegrator::TimeIntegrator::setFinalTime().

◆ d_first_initial_dt

double AMP::TimeIntegrator::BDFIntegrator::d_first_initial_dt = 0.0
protected

double storing the first dt before any restart

Definition at line 356 of file BDFIntegrator.h.

◆ d_first_step

bool AMP::TimeIntegrator::ImplicitIntegrator::d_first_step = true
protectedinherited

the return code from the implicit solver at the current timestep

Definition at line 297 of file ImplicitIntegrator.h.

◆ d_fTimeScalingFnPtr

std::function<void( AMP::Scalar )> AMP::TimeIntegrator::ImplicitIntegrator::d_fTimeScalingFnPtr
protectedinherited

registered callback function to set gamma, typically when the user needs to know gamma

Definition at line 315 of file ImplicitIntegrator.h.

Referenced by AMP::TimeIntegrator::ImplicitIntegrator::setTimeScalingFunction().

◆ d_function_scaling

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::ImplicitIntegrator::d_function_scaling
protectedinherited

Definition at line 287 of file ImplicitIntegrator.h.

◆ d_gamma

double AMP::TimeIntegrator::BDFIntegrator::d_gamma = 0.0
protected

factor to multiply rhs by

Definition at line 387 of file BDFIntegrator.h.

◆ d_ic_vector

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::TimeIntegrator::d_ic_vector = nullptr
protectedinherited

Definition at line 315 of file TimeIntegrator.h.

◆ d_iDebugPrintInfoLevel

int AMP::TimeIntegrator::TimeIntegrator::d_iDebugPrintInfoLevel = 0
protectedinherited

Definition at line 357 of file TimeIntegrator.h.

◆ d_implicit_integrator

std::string AMP::TimeIntegrator::BDFIntegrator::d_implicit_integrator = "BDF2"
protected

string for the time integrator being used, options are "Backward Euler", "BDF2", or "CN"

Definition at line 324 of file BDFIntegrator.h.

◆ d_initial_dt

double AMP::TimeIntegrator::TimeIntegrator::d_initial_dt = std::numeric_limits<double>::signaling_NaN()
protectedinherited

◆ d_initial_predictor_type

std::string AMP::TimeIntegrator::BDFIntegrator::d_initial_predictor_type = "forward_euler"
protected

initial predictor type

Definition at line 344 of file BDFIntegrator.h.

◆ d_initial_time

double AMP::TimeIntegrator::TimeIntegrator::d_initial_time = std::numeric_limits<double>::signaling_NaN()
protectedinherited

◆ d_initialized

bool AMP::TimeIntegrator::TimeIntegrator::d_initialized = false
protectedinherited

Set to true after initialization in constructors. Needed in getFromInput to avoid reseting some parameters in subsequent reset operations.

Definition at line 370 of file TimeIntegrator.h.

◆ d_integrator_index

size_t AMP::TimeIntegrator::BDFIntegrator::d_integrator_index = 0
protected

index into d_integrator_names showing what is the current integrator

Definition at line 393 of file BDFIntegrator.h.

◆ d_integrator_names

std::vector<std::string> AMP::TimeIntegrator::BDFIntegrator::d_integrator_names
protected

names of time integrators

Definition at line 309 of file BDFIntegrator.h.

◆ d_integrator_order

std::vector<double> AMP::TimeIntegrator::BDFIntegrator::d_integrator_order
protected

truncation error order for time integrators

Definition at line 303 of file BDFIntegrator.h.

◆ d_integrator_source_vector

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::BDFIntegrator::d_integrator_source_vector = nullptr
protected

stores linear weighted sum of previous time solutions that becomes a source term for the nonlinear system of equations

Definition at line 261 of file BDFIntegrator.h.

Referenced by getTimeHistorySourceTerm().

◆ d_integrator_step

int AMP::TimeIntegrator::TimeIntegrator::d_integrator_step = 0
protectedinherited

◆ d_integrator_steps

std::vector<double> AMP::TimeIntegrator::BDFIntegrator::d_integrator_steps
protected

vector of previous timesteps

Definition at line 306 of file BDFIntegrator.h.

◆ d_is_after_regrid

bool AMP::TimeIntegrator::BDFIntegrator::d_is_after_regrid = false
protected

state of simulation, whether it is immediately after a regrid

Definition at line 441 of file BDFIntegrator.h.

◆ d_is_new_timestep

bool AMP::TimeIntegrator::BDFIntegrator::d_is_new_timestep = true
protected

boolean flag to determine if a new timestep has started

Definition at line 444 of file BDFIntegrator.h.

Referenced by setIsNewTimeStep().

◆ d_l2errorNorms_E

std::list<double> AMP::TimeIntegrator::BDFIntegrator::d_l2errorNorms_E
protected

Definition at line 346 of file BDFIntegrator.h.

◆ d_l2errorNorms_T

std::list<double> AMP::TimeIntegrator::BDFIntegrator::d_l2errorNorms_T
protected

Definition at line 347 of file BDFIntegrator.h.

◆ d_linear_iterations

int AMP::TimeIntegrator::BDFIntegrator::d_linear_iterations = 0
protected

records number of linear iterations at current timestep

Definition at line 417 of file BDFIntegrator.h.

◆ d_linearIterations

std::vector<int> AMP::TimeIntegrator::BDFIntegrator::d_linearIterations
protected

vector to keep track of the number of linear iterations

Definition at line 288 of file BDFIntegrator.h.

◆ d_log_statistics

bool AMP::TimeIntegrator::BDFIntegrator::d_log_statistics = true
protected

whether to log statistics about time integrator

Definition at line 438 of file BDFIntegrator.h.

◆ d_LTE

std::vector<std::vector<double> > AMP::TimeIntegrator::BDFIntegrator::d_LTE
protected

vector of vectors to store the local truncation errors for components

Definition at line 294 of file BDFIntegrator.h.

◆ d_max_dt

double AMP::TimeIntegrator::TimeIntegrator::d_max_dt = std::numeric_limits<double>::max()
protectedinherited

maximum allowable timestep (user defined)

Definition at line 355 of file TimeIntegrator.h.

◆ d_max_integrator_index

size_t AMP::TimeIntegrator::BDFIntegrator::d_max_integrator_index = static_cast<size_t>( -1 )
protected

index into d_integrator_names that shows what is the max BDF order

Definition at line 390 of file BDFIntegrator.h.

Referenced by sizeOfTimeHistory().

◆ d_max_integrator_steps

int AMP::TimeIntegrator::TimeIntegrator::d_max_integrator_steps = 0
protectedinherited

◆ d_min_dt

double AMP::TimeIntegrator::TimeIntegrator::d_min_dt = std::numeric_limits<double>::signaling_NaN()
protectedinherited

Definition at line 352 of file TimeIntegrator.h.

◆ d_new_time

double AMP::TimeIntegrator::BDFIntegrator::d_new_time = std::numeric_limits<double>::signaling_NaN()
protected

double containing t_{n+1}

Definition at line 353 of file BDFIntegrator.h.

◆ d_nonlinear_iterations

int AMP::TimeIntegrator::BDFIntegrator::d_nonlinear_iterations = 0
protected

records number of nonlinear iterations at current timestep

Definition at line 414 of file BDFIntegrator.h.

◆ d_nonlinearIterations

std::vector<int> AMP::TimeIntegrator::BDFIntegrator::d_nonlinearIterations
protected

vector to keep track of the number of nonlinear iterations

Definition at line 285 of file BDFIntegrator.h.

◆ d_number_initial_fixed_steps

int AMP::TimeIntegrator::BDFIntegrator::d_number_initial_fixed_steps = 0
protected

used only with the final constant timestep scheme, number of initial steps to take with d_initial_dt

Definition at line 428 of file BDFIntegrator.h.

◆ d_number_of_time_intervals

int AMP::TimeIntegrator::BDFIntegrator::d_number_of_time_intervals = -1
protected

used only with the final constant timestep scheme, number of time intervals before the final constant timestep is attained

Definition at line 424 of file BDFIntegrator.h.

◆ d_object_name

std::string AMP::TimeIntegrator::TimeIntegrator::d_object_name
protectedinherited

◆ d_old_dt

double AMP::TimeIntegrator::TimeIntegrator::d_old_dt = std::numeric_limits<double>::signaling_NaN()
protectedinherited

Definition at line 351 of file TimeIntegrator.h.

◆ d_old_td_vector

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::BDFIntegrator::d_old_td_vector = nullptr
protected

the next vector will store the old time derivative at previous time level

Definition at line 282 of file BDFIntegrator.h.

◆ d_operator

std::shared_ptr<AMP::Operator::Operator> AMP::TimeIntegrator::TimeIntegrator::d_operator
protectedinherited

The operator is the right hand side operator for an explicit integrator when the time integration problem is : u_t = f(u) but in the case of implicit time integrators the operator represents u_t-f(u)

Definition at line 328 of file TimeIntegrator.h.

Referenced by AMP::TimeIntegrator::TimeIntegrator::getOperator(), and AMP::TimeIntegrator::TimeIntegrator::registerOperator().

◆ d_pi_controller_type

std::string AMP::TimeIntegrator::BDFIntegrator::d_pi_controller_type = "PC.4.7"
protected

type of PI controller, current options are "H211b", "PI.4.7", and "Deadbeat"

Definition at line 334 of file BDFIntegrator.h.

◆ d_pMassOperator

std::shared_ptr<AMP::Operator::Operator> AMP::TimeIntegrator::TimeIntegrator::d_pMassOperator
protectedinherited

The operator is the left hand side mass operator (for FEM formulations)

Definition at line 333 of file TimeIntegrator.h.

◆ d_pParameters

std::shared_ptr<TimeIntegratorParameters> AMP::TimeIntegrator::TimeIntegrator::d_pParameters
protectedinherited

pointer to parameters

Definition at line 310 of file TimeIntegrator.h.

◆ d_predictor_type

std::string AMP::TimeIntegrator::BDFIntegrator::d_predictor_type = "leapfrog"
protected

predictor to use with predictor corrector approach

Definition at line 341 of file BDFIntegrator.h.

◆ d_predictor_vector

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::BDFIntegrator::d_predictor_vector = nullptr
protected

the next vector will store the predictor for the next timestep

Definition at line 264 of file BDFIntegrator.h.

◆ d_prev_function_vector

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::BDFIntegrator::d_prev_function_vector = nullptr
protected

the next vector will store the old rhs at the previous time level

Definition at line 279 of file BDFIntegrator.h.

◆ d_prev_solutions

std::vector<std::shared_ptr<AMP::LinearAlgebra::Vector> > AMP::TimeIntegrator::BDFIntegrator::d_prev_solutions
protected

stores the solution vectors at previous time levels, only the number required for the time integrator to function are stored

Definition at line 257 of file BDFIntegrator.h.

Referenced by getTimeHistoryVectors().

◆ d_prevSuccessiveRejects

bool AMP::TimeIntegrator::BDFIntegrator::d_prevSuccessiveRejects = false
protected

boolean flag to keep track of successive time step rejections

Definition at line 464 of file BDFIntegrator.h.

◆ d_prevTimeTruncationErrorEstimate

double AMP::TimeIntegrator::BDFIntegrator::d_prevTimeTruncationErrorEstimate = 1.0
protected

truncation error estimate at previous step

Definition at line 374 of file BDFIntegrator.h.

◆ d_problem_scales

std::vector<double> AMP::TimeIntegrator::BDFIntegrator::d_problem_scales
protected

fixed used defined scales for time error scaling

Definition at line 350 of file BDFIntegrator.h.

◆ d_pSourceTerm

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::TimeIntegrator::d_pSourceTerm
protectedinherited

◆ d_registerVectorForManagement

DataManagerCallBack AMP::TimeIntegrator::BDFIntegrator::d_registerVectorForManagement
protected

Definition at line 249 of file BDFIntegrator.h.

Referenced by registerDataManagerCallback().

◆ d_reset_after_restart

bool AMP::TimeIntegrator::BDFIntegrator::d_reset_after_restart = false
protected

boolean flag to detect a call to reset immediately following restart

Definition at line 476 of file BDFIntegrator.h.

◆ d_scratch_function_vector

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::BDFIntegrator::d_scratch_function_vector = nullptr
protected

the next vector is used for scratch or intermediate storage for rhs

Definition at line 273 of file BDFIntegrator.h.

◆ d_scratch_vector

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::BDFIntegrator::d_scratch_vector = nullptr
protected

the next vector is used for scratch or intermediate storage

Definition at line 270 of file BDFIntegrator.h.

◆ d_solution_scaling

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::ImplicitIntegrator::d_solution_scaling
protectedinherited

Definition at line 286 of file ImplicitIntegrator.h.

◆ d_solution_vector

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::TimeIntegrator::d_solution_vector
protectedinherited

Definition at line 320 of file TimeIntegrator.h.

Referenced by AMP::TimeIntegrator::TimeIntegrator::getSolution().

◆ d_solver

std::shared_ptr<AMP::Solver::SolverStrategy> AMP::TimeIntegrator::ImplicitIntegrator::d_solver = nullptr
protectedinherited

◆ d_solver_converged_reason

int AMP::TimeIntegrator::BDFIntegrator::d_solver_converged_reason = -1
protected

convergence reason returned by solver

Definition at line 411 of file BDFIntegrator.h.

◆ d_solver_retcode

int AMP::TimeIntegrator::ImplicitIntegrator::d_solver_retcode = 0
protectedinherited

Definition at line 294 of file ImplicitIntegrator.h.

◆ d_step_accepted

std::vector<int> AMP::TimeIntegrator::BDFIntegrator::d_step_accepted
protected

vector to keep track of whether the step is accepted

Definition at line 291 of file BDFIntegrator.h.

◆ d_target_relative_change

double AMP::TimeIntegrator::BDFIntegrator::d_target_relative_change = 0.1
protected

iterations becomes too large, default is 0.75 target fractional change in energy for each timestep

Definition at line 384 of file BDFIntegrator.h.

◆ d_time_atol

double AMP::TimeIntegrator::BDFIntegrator::d_time_atol = std::numeric_limits<double>::signaling_NaN()
protected

absolute tolerance for the truncation error based strategy

Definition at line 368 of file BDFIntegrator.h.

◆ d_time_error_scaling

std::string AMP::TimeIntegrator::BDFIntegrator::d_time_error_scaling = "fixed_scaling"
protected

error scaling used for time local error calculations, options are "fixed_scaling" or "fixed_resolution"

Definition at line 338 of file BDFIntegrator.h.

◆ d_time_history_initialized

bool AMP::TimeIntegrator::ImplicitIntegrator::d_time_history_initialized = false
protectedinherited

whether it is the first step

Definition at line 299 of file ImplicitIntegrator.h.

◆ d_time_rtol

double AMP::TimeIntegrator::BDFIntegrator::d_time_rtol = std::numeric_limits<double>::signaling_NaN()
protected

relative tolerance for the truncation error based strategy

Definition at line 371 of file BDFIntegrator.h.

◆ d_timederivative_vector

std::shared_ptr<AMP::LinearAlgebra::Vector> AMP::TimeIntegrator::BDFIntegrator::d_timederivative_vector = nullptr
protected

the next vector will store the current estimate for the time derivative

Definition at line 267 of file BDFIntegrator.h.

◆ d_timeErrorEstimateRatio

double AMP::TimeIntegrator::BDFIntegrator::d_timeErrorEstimateRatio = 1.0
protected

truncation error ratio to previous step

Definition at line 380 of file BDFIntegrator.h.

◆ d_times

std::vector<double> AMP::TimeIntegrator::BDFIntegrator::d_times
protected

vector to the store the simulation times

Definition at line 300 of file BDFIntegrator.h.

◆ d_timestep_strategy

std::string AMP::TimeIntegrator::BDFIntegrator::d_timestep_strategy = "truncationErrorStrategy"
protected

timestep strategy to use, options are "truncationErrorStrategy" "predefined", "constant", "final_constant", "Rider-Knoll", "limit relative change"

Definition at line 331 of file BDFIntegrator.h.

◆ d_timesteps

std::vector<double> AMP::TimeIntegrator::BDFIntegrator::d_timesteps
protected

vector to store the timesteps

Definition at line 297 of file BDFIntegrator.h.

◆ d_timesteps_after_regrid

int AMP::TimeIntegrator::BDFIntegrator::d_timesteps_after_regrid = 0
protected

keeps track of the number of timesteps after the last regrid

Definition at line 396 of file BDFIntegrator.h.

◆ d_timeTruncationErrorEstimate

double AMP::TimeIntegrator::BDFIntegrator::d_timeTruncationErrorEstimate = 1.0
protected

truncation error estimate in time over both E and T

Definition at line 377 of file BDFIntegrator.h.

◆ d_timeTruncationErrorNormType

std::string AMP::TimeIntegrator::BDFIntegrator::d_timeTruncationErrorNormType = "l2Norm"
protected

norm type used for truncation error calculation

Definition at line 321 of file BDFIntegrator.h.

◆ d_total_steprejects

int AMP::TimeIntegrator::TimeIntegrator::d_total_steprejects = 0
protectedinherited

◆ d_use_bdf1_estimator_on_regrid

bool AMP::TimeIntegrator::BDFIntegrator::d_use_bdf1_estimator_on_regrid = true
protected

use an error estimator based on BDF1 for the first 3 steps during and immediately after regrid

Definition at line 461 of file BDFIntegrator.h.

◆ d_use_constant_time_interpolation

bool AMP::TimeIntegrator::BDFIntegrator::d_use_constant_time_interpolation = false
protected

boolean flag used to do constant time interpolation, used after regrids

Definition at line 467 of file BDFIntegrator.h.

◆ d_use_initial_predictor

bool AMP::TimeIntegrator::BDFIntegrator::d_use_initial_predictor = true
protected

boolean flag to incrementally add in predictor for very first step using forward Euler or AB2

Definition at line 457 of file BDFIntegrator.h.

◆ d_use_pi_controller

bool AMP::TimeIntegrator::BDFIntegrator::d_use_pi_controller = true
protected

boolean flag to enable or disable the use of a PI based timestep controller

Definition at line 470 of file BDFIntegrator.h.

◆ d_use_predictor

bool AMP::TimeIntegrator::BDFIntegrator::d_use_predictor = true
protected

boolean flag to use a predictor for the initial guess at each timestep

Definition at line 453 of file BDFIntegrator.h.

◆ d_user_managed_time_operator

bool AMP::TimeIntegrator::ImplicitIntegrator::d_user_managed_time_operator = false
protectedinherited

user manages time operator

Definition at line 302 of file ImplicitIntegrator.h.

◆ d_var_names

std::vector<std::string> AMP::TimeIntegrator::BDFIntegrator::d_var_names
protected

names of variables to associate with different components of a vector

Definition at line 315 of file BDFIntegrator.h.

◆ d_vector_names

std::vector<std::string> AMP::TimeIntegrator::BDFIntegrator::d_vector_names
protected

names of variables to associate with different vectors

Definition at line 312 of file BDFIntegrator.h.

◆ d_vectors_registered_for_mgmt

bool AMP::TimeIntegrator::BDFIntegrator::d_vectors_registered_for_mgmt = false
protected

boolean to ensure registerVectorsForMemoryManagement is called once

Definition at line 479 of file BDFIntegrator.h.

◆ d_writer

std::shared_ptr<AMP::IO::Writer> AMP::TimeIntegrator::TimeIntegrator::d_writer
protectedinherited

keeps track of total number of step rejections

Definition at line 364 of file TimeIntegrator.h.

Referenced by AMP::TimeIntegrator::TimeIntegrator::registerWriter().


The documentation for this class was generated from the following file:



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:45.
Comments on this page