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

Manage implicit time integration. More...

#include <ImplicitIntegrator.h>

Inheritance diagram for AMP::TimeIntegrator::ImplicitIntegrator:
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.
 
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.
 
virtual double getGamma (void)
 
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
 
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)
 
virtual std::vector< doublegetTimeHistoryScalings (void)
 Scaling factors for previous time history vectors.
 
virtual std::shared_ptr< AMP::LinearAlgebra::VectorgetTimeHistorySourceTerm ()
 
virtual int getTotalRejectedSteps () const
 
 ImplicitIntegrator ()=delete
 
 ImplicitIntegrator (const ImplicitIntegrator &)=delete
 
 ImplicitIntegrator (int64_t fid, AMP::IO::RestartManager *manager)
 Read restart data to file.
 
 ImplicitIntegrator (std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > prm)
 
virtual void initialize (std::shared_ptr< TimeIntegratorParameters > parameters)
 Initialize state of time integrator.
 
void initialize (void)
 
void operator= (const ImplicitIntegrator &)=delete
 
virtual void printClassData (std::ostream &os) const
 
void printStatistics (std::ostream &os=AMP::pout) override
 print the statistics on the solver
 
void putToDatabase (std::shared_ptr< AMP::Database > db)
 
void registerChildObjects (AMP::IO::RestartManager *manager) const override
 Register any child objects.
 
void registerOperator (std::shared_ptr< AMP::Operator::Operator > op) override
 
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)
 
virtual void setInitialTime (const double t)
 
virtual void setSourceTerm (AMP::LinearAlgebra::Vector::shared_ptr src)
 
void setTimeScalingFunction (std::function< void(AMP::Scalar)> fnPtr)
 
virtual size_t sizeOfTimeHistory () const
 
bool stepsRemaining () const override
 
virtual std::string type () const
 Return the name of the TimeIntegrator.
 
void updateSolution (void) override
 
void writeRestart (int64_t fid) const override
 Write restart data to file.
 
virtual ~ImplicitIntegrator ()
 

Protected Member Functions

void createSolver (void)
 
void getFromInput (std::shared_ptr< const AMP::Database > db)
 
void getFromRestart ()
 
virtual int integratorSpecificAdvanceSolution (const double dt, const bool first_step, std::shared_ptr< AMP::LinearAlgebra::Vector > in, std::shared_ptr< AMP::LinearAlgebra::Vector > out)
 
virtual void setInitialGuess (const bool first_step, const double current_time, const double current_dt, const double old_dt)
 
virtual void setTimeHistoryScalings ()
 

Protected Attributes

double d_current_dt = std::numeric_limits<double>::signaling_NaN()
 
double d_current_time = std::numeric_limits<double>::signaling_NaN()
 
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
 
double d_final_time = std::numeric_limits<double>::signaling_NaN()
 
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
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_ic_vector = nullptr
 
int d_iDebugPrintInfoLevel = 0
 
double d_initial_dt = std::numeric_limits<double>::signaling_NaN()
 initial time increment
 
double d_initial_time = std::numeric_limits<double>::signaling_NaN()
 
bool d_initialized = false
 
int d_integrator_step = 0
 
double d_max_dt = std::numeric_limits<double>::max()
 maximum allowable timestep (user defined)
 
int d_max_integrator_steps = 0
 
double d_min_dt = std::numeric_limits<double>::signaling_NaN()
 
std::string d_object_name
 
double d_old_dt = std::numeric_limits<double>::signaling_NaN()
 
std::shared_ptr< AMP::Operator::Operatord_operator
 
std::shared_ptr< AMP::Operator::Operatord_pMassOperator
 
std::shared_ptr< TimeIntegratorParametersd_pParameters
 
std::shared_ptr< AMP::LinearAlgebra::Vectord_pSourceTerm
 
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_retcode = 0
 
bool d_time_history_initialized = false
 whether it is the first step
 
int d_total_steprejects = 0
 
bool d_user_managed_time_operator = false
 user manages time operator
 
std::shared_ptr< AMP::IO::Writerd_writer
 keeps track of total number of step rejections
 

Private Member Functions

virtual bool integratorSpecificCheckNewSolution (const int solver_retcode)
 
virtual double integratorSpecificGetNextDt (const bool good_solution, const int solver_retcode)
 allows for specialization of getNextDt for classes of time integrators
 
virtual void integratorSpecificInitialize (void)
 
virtual void integratorSpecificUpdateSolution (double time)
 

Detailed Description

Manage implicit time integration.

Class ImplicitIntegrator manages implicit time integration over a mesh. It maintains references to an Operator and SolverStrategy objects, which provide operations describing the implicit equations and solving the problem at each time step, respectively.

Input Parameters

Definitions:

All input data items described above, except for initial_time, may be overridden by new input values when continuing from restart.

Details:

parameter type default range opt/req behavior on restart
initial_time double none >=0 req May not be modified by input db on restart
final_time double none final_time >= initial_time req Parameter read from restart db may be overridden by input db
max_integrator_steps int none >=0 req Parameter read from restart db may be overridden by input db

A sample input file entry might look like:

std::shared_ptr< AMP::TimeIntegrator::TimeIntegrator > shared_ptr
Convience typedef.
See also
AMP::Operator::Operator
AMP::Solver::SolverStrategy

Definition at line 91 of file ImplicitIntegrator.h.

Member Typedef Documentation

◆ shared_ptr

Convience typedef.

Definition at line 37 of file TimeIntegrator.h.

Constructor & Destructor Documentation

◆ ImplicitIntegrator() [1/4]

AMP::TimeIntegrator::ImplicitIntegrator::ImplicitIntegrator ( std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters prm)
explicit

The constructor for ImplicitIntegrator initializes the default state of the integrator. The integrator is configured with the concrete strategy objects in the argument list that provide operations related to the nonlinear solver and implicit equations to solve. Data members are initialized from the input and restart databases.

Note that no vectors are created in the constructor. Vectors are created and the nonlinear solver is initialized in the initialize() member function.

Precondition
!object_name.empty()
implicit_equations != 0
nonlinear_solver != 0
hierarchy

◆ ImplicitIntegrator() [2/4]

AMP::TimeIntegrator::ImplicitIntegrator::ImplicitIntegrator ( )
delete

◆ ImplicitIntegrator() [3/4]

AMP::TimeIntegrator::ImplicitIntegrator::ImplicitIntegrator ( const ImplicitIntegrator )
delete

◆ ~ImplicitIntegrator()

virtual AMP::TimeIntegrator::ImplicitIntegrator::~ImplicitIntegrator ( )
virtual

Empty destructor for ImplicitIntegrator

◆ ImplicitIntegrator() [4/4]

AMP::TimeIntegrator::ImplicitIntegrator::ImplicitIntegrator ( 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 
)
overridevirtual

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.

◆ checkNewSolution()

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

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.

◆ createSolver()

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

◆ 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::TimeIntegrator::getFromInput ( std::shared_ptr< const AMP::Database db)
protectedinherited

◆ getFromRestart()

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

◆ getGamma()

virtual double AMP::TimeIntegrator::TimeIntegrator::getGamma ( void  )
inlinevirtualinherited

◆ 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)
overridevirtual

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.

◆ getObjectName()

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

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  )
inline

Definition at line 227 of file ImplicitIntegrator.h.

References d_solver.

◆ getSourceTerm()

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

◆ getTimeHistoryScalings()

virtual std::vector< double > AMP::TimeIntegrator::TimeIntegrator::getTimeHistoryScalings ( void  )
inlinevirtualinherited

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 in AMP::TimeIntegrator::BDFIntegrator.

Definition at line 276 of file TimeIntegrator.h.

◆ getTimeHistorySourceTerm()

virtual std::shared_ptr< AMP::LinearAlgebra::Vector > AMP::TimeIntegrator::ImplicitIntegrator::getTimeHistorySourceTerm ( )
inlinevirtual

Reimplemented in AMP::TimeIntegrator::BDFIntegrator.

Definition at line 256 of file ImplicitIntegrator.h.

◆ getTotalRejectedSteps()

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

◆ initialize() [1/2]

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

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  )

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

◆ integratorSpecificAdvanceSolution()

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

allows for specialization of advanceSolution for classes of time integrators

Reimplemented in AMP::TimeIntegrator::BDFIntegrator.

◆ integratorSpecificCheckNewSolution()

virtual bool AMP::TimeIntegrator::ImplicitIntegrator::integratorSpecificCheckNewSolution ( const int  solver_retcode)
privatevirtual

allows for specialization of the checkNewSolution for classes of time integrators

Reimplemented in AMP::TimeIntegrator::BDFIntegrator.

◆ integratorSpecificGetNextDt()

virtual double AMP::TimeIntegrator::ImplicitIntegrator::integratorSpecificGetNextDt ( const bool  good_solution,
const int  solver_retcode 
)
privatevirtual

allows for specialization of getNextDt for classes of time integrators

Reimplemented in AMP::TimeIntegrator::BDFIntegrator.

◆ integratorSpecificInitialize()

virtual void AMP::TimeIntegrator::ImplicitIntegrator::integratorSpecificInitialize ( void  )
privatevirtual

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

Reimplemented in AMP::TimeIntegrator::BDFIntegrator.

◆ integratorSpecificUpdateSolution()

virtual void AMP::TimeIntegrator::ImplicitIntegrator::integratorSpecificUpdateSolution ( double  time)
privatevirtual

allows for specialization of updateSolution for classes of time integrators

Reimplemented in AMP::TimeIntegrator::BDFIntegrator.

◆ operator=()

◆ printClassData()

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

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

◆ printStatistics()

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

print the statistics on the solver

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

◆ 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::ImplicitIntegrator::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.

◆ registerOperator()

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

Registers an operator for the rhs

Reimplemented from AMP::TimeIntegrator::TimeIntegrator.

◆ 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::ImplicitIntegrator::reset ( std::shared_ptr< const AMP::TimeIntegrator::TimeIntegratorParameters parameters)
override

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 Typically used after a regrid.

◆ 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  )

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)
inline

Definition at line 228 of file ImplicitIntegrator.h.

References d_solver.

◆ setComponentScalingFunction()

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

Definition at line 249 of file ImplicitIntegrator.h.

References d_fComponentScalingFnPtr.

◆ setComponentScalings()

void AMP::TimeIntegrator::ImplicitIntegrator::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

◆ 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()

virtual void AMP::TimeIntegrator::ImplicitIntegrator::setInitialGuess ( const bool  first_step,
const double  current_time,
const double  current_dt,
const double  old_dt 
)
protectedvirtual

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 hierarchy configuration. This is true when the hierarchy is constructed initially and after regridding. In these cases, setting the initial iterate using extrapolation, for example, may not be possible.

Function overloaded from algs::ImplicitEquationStrategy.

Reimplemented in AMP::TimeIntegrator::BDFIntegrator.

◆ setInitialTime()

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

◆ setSourceTerm()

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

◆ setTimeHistoryScalings()

virtual void AMP::TimeIntegrator::ImplicitIntegrator::setTimeHistoryScalings ( )
inlineprotectedvirtual

Reimplemented in AMP::TimeIntegrator::BDFIntegrator.

Definition at line 277 of file ImplicitIntegrator.h.

◆ setTimeScalingFunction()

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

Definition at line 244 of file ImplicitIntegrator.h.

References d_fTimeScalingFnPtr.

◆ sizeOfTimeHistory()

virtual size_t AMP::TimeIntegrator::TimeIntegrator::sizeOfTimeHistory ( ) const
inlinevirtualinherited

Reimplemented in AMP::TimeIntegrator::BDFIntegrator.

Definition at line 284 of file TimeIntegrator.h.

◆ stepsRemaining()

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

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()

virtual std::string AMP::TimeIntegrator::TimeIntegrator::type ( ) const
virtualinherited

◆ updateSolution()

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

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::ImplicitIntegrator::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_current_dt

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

◆ d_current_time

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

◆ d_fComponentScalingFnPtr

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

registered callback function to set multiphysics component scalings

Definition at line 320 of file ImplicitIntegrator.h.

Referenced by setComponentScalingFunction().

◆ 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_step

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

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
protected

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

Definition at line 315 of file ImplicitIntegrator.h.

Referenced by setTimeScalingFunction().

◆ d_function_scaling

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

Definition at line 287 of file ImplicitIntegrator.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_initial_dt

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

◆ 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_step

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

Definition at line 358 of file TimeIntegrator.h.

Referenced by stepsRemaining().

◆ 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_steps

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

Definition at line 359 of file TimeIntegrator.h.

Referenced by stepsRemaining().

◆ 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_object_name

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

Definition at line 305 of file TimeIntegrator.h.

Referenced by getObjectName().

◆ 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_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_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_pSourceTerm

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

◆ d_solution_scaling

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

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
protected

Definition at line 284 of file ImplicitIntegrator.h.

Referenced by getSolver(), and resetSolver().

◆ d_solver_retcode

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

Definition at line 294 of file ImplicitIntegrator.h.

◆ d_time_history_initialized

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

whether it is the first step

Definition at line 299 of file ImplicitIntegrator.h.

◆ d_total_steprejects

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

◆ d_user_managed_time_operator

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

user manages time operator

Definition at line 302 of file ImplicitIntegrator.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