#include <RK12TimeIntegrator.h>

Public Types | |
| typedef std::shared_ptr< AMP::TimeIntegrator::TimeIntegrator > | shared_ptr |
| Convience typedef. | |
Static Public Member Functions | |
| static std::unique_ptr< AMP::TimeIntegrator::TimeIntegrator > | createTimeIntegrator (std::shared_ptr< AMP::TimeIntegrator::TimeIntegratorParameters > parameters) |
Protected Member Functions | |
| void | getFromRestart () |
Protected Attributes | |
| double | d_current_dt = std::numeric_limits<double>::signaling_NaN() |
| double | d_current_time = std::numeric_limits<double>::signaling_NaN() |
| double | d_final_time = std::numeric_limits<double>::signaling_NaN() |
| std::shared_ptr< AMP::LinearAlgebra::Vector > | d_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::Operator > | d_operator |
| std::shared_ptr< AMP::Operator::Operator > | d_pMassOperator |
| std::shared_ptr< TimeIntegratorParameters > | d_pParameters |
| std::shared_ptr< AMP::LinearAlgebra::Vector > | d_pSourceTerm |
| std::shared_ptr< AMP::LinearAlgebra::Vector > | d_solution_vector |
| int | d_total_steprejects = 0 |
| std::shared_ptr< AMP::IO::Writer > | d_writer |
| keeps track of total number of step rejections | |
Private Member Functions | |
| void | getFromInput (std::shared_ptr< AMP::Database > input_db) |
| RK12TimeIntegrator () | |
| void | setupVectors (void) |
Private Attributes | |
| double | d_atol = 0.0 |
| std::shared_ptr< AMP::LinearAlgebra::Vector > | d_k1_vec |
| std::shared_ptr< AMP::LinearAlgebra::Vector > | d_k2_vec |
| std::shared_ptr< AMP::LinearAlgebra::Vector > | d_new_solution |
| int | d_number_regrid_states = 0 |
| double | d_safety_factor = 0.0 |
| bool | d_use_fixed_dt = false |
| std::shared_ptr< AMP::LinearAlgebra::Vector > | d_z_vec |
Class RK12TimeIntegrator is a concrete time integrator that implements the explicit adaptive Runge-Kutta obtained by combining Heun's method and Euler
0 |
| 1/2 1/2 | 1 0
Definition at line 34 of file RK12TimeIntegrator.h.
|
inherited |
Convience typedef.
Definition at line 37 of file TimeIntegrator.h.
|
explicit |
Constructor that accepts parameter list.
| AMP::TimeIntegrator::RK12TimeIntegrator::~RK12TimeIntegrator | ( | ) |
Destructor.
| AMP::TimeIntegrator::RK12TimeIntegrator::RK12TimeIntegrator | ( | int64_t | fid, |
| AMP::IO::RestartManager * | manager | ||
| ) |
Read restart data to file.
This function will create a variable from the restart file
| fid | File identifier to write |
| manager | Restart manager |
|
private |
Constructor.
Referenced by createTimeIntegrator().
|
overridevirtual |
Integrate through the specified time increment.
Integrate through the specified time increment.
The boolean first_step argument is true when this is the very first call to the advance function. 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.
This function may, or may not, copy the new solution into the solution vector at the previous time step (updateSolution). If it is copied, this can reduce the memory requirements, but restricts the implementation to those functions that will not be called multiple times within a time step. If it is not copied, the update solution function must be called after each time step. The concrete implementation needs to make this clear.
| dt | Time step size |
| first_step | Whether this is the first step |
| in | Input vector |
| out | Output vector |
Implements AMP::TimeIntegrator::TimeIntegrator.
|
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.
| vec | The vector to append |
Definition at line 219 of file TimeIntegrator.h.
|
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.
| vec | The vector to append |
Definition at line 208 of file TimeIntegrator.h.
Determine whether time advanced solution is satisfactory.
Implements AMP::TimeIntegrator::TimeIntegrator.
|
inlinestatic |
Definition at line 48 of file RK12TimeIntegrator.h.
References RK12TimeIntegrator().
Return current timestep.
Return current timestep.
Return final integration time.
Return current integration time.
Return final integration time.
Return final integration time.
|
private |
Read data from input database.
|
protectedinherited |
Reimplemented in AMP::TimeIntegrator::BDFIntegrator.
Definition at line 268 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_current_dt.
|
inherited |
Get a unique id hash for the vector.
get initial time step.
Definition at line 179 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_initial_dt.
Return initial integration time.
Return initial integration time.
Return current integration step number.
Return current integration step number.
Return maximum number of integration steps.
Return maximum number of integration steps.
|
overridevirtual |
Specify next time step to use.
Reimplemented from AMP::TimeIntegrator::TimeIntegrator.
|
inlineinherited |
Definition at line 246 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_operator.
|
inlinevirtualinherited |
Retrieve the current solution.
Definition at line 137 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_solution_vector.
|
inlinevirtualinherited |
Reimplemented in AMP::TimeIntegrator::IDATimeIntegrator.
Definition at line 266 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_pSourceTerm.
|
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.
|
inlinevirtualinherited |
Definition at line 248 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_total_steprejects.
|
override |
Initialize from parameter list.
|
virtualinherited |
Initialize state of time integrator.
Initialize state of time integrator. This includes creating solution vector and initializing solver components.
Reimplemented in AMP::TimeIntegrator::ImplicitIntegrator, AMP::TimeIntegrator::OxideTimeIntegrator, and AMP::TimeIntegrator::IDATimeIntegrator.
|
inherited |
Print out all members of integrator instance to given output stream.
|
virtualinherited |
Reimplemented in AMP::TimeIntegrator::BDFIntegrator, and AMP::TimeIntegrator::ImplicitIntegrator.
|
inherited |
Write out state of object to given database.
When assertion checking is active, the database pointer must be non-null.
|
overridevirtual |
Register any child objects.
This function will register child objects with the manager
| manager | Restart manager |
Reimplemented from AMP::TimeIntegrator::TimeIntegrator.
|
inlinevirtualinherited |
Reimplemented in AMP::TimeIntegrator::ImplicitIntegrator.
Definition at line 241 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_operator.
|
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.
| writer | The writer to register |
Definition at line 227 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_writer.
|
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.
|
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.
|
inlinevirtualinherited |
Definition at line 250 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_current_dt.
|
inlinevirtualinherited |
Definition at line 254 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_current_time.
|
inlinevirtualinherited |
Definition at line 258 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_final_time.
|
inlinevirtualinherited |
Definition at line 252 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_initial_dt.
|
inlinevirtualinherited |
Definition at line 256 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_initial_time.
|
inlinevirtualinherited |
Definition at line 262 of file TimeIntegrator.h.
References AMP::TimeIntegrator::TimeIntegrator::d_pSourceTerm.
setup the vectors used by RK12
|
inlinevirtualinherited |
Reimplemented in AMP::TimeIntegrator::BDFIntegrator.
Definition at line 284 of file TimeIntegrator.h.
Have the number of integration steps reached the maximum.
Return true if the number of integration steps performed by the integrator has not reached the specified maximum; return false otherwise.
Reimplemented in AMP::TimeIntegrator::ImplicitIntegrator.
|
inlineoverridevirtual |
Return the name of the TimeIntegrator.
Reimplemented from AMP::TimeIntegrator::TimeIntegrator.
Definition at line 89 of file RK12TimeIntegrator.h.
Update state of the solution.
Implements AMP::TimeIntegrator::TimeIntegrator.
Write restart data to file.
This function will write the mesh to an HDF5 file
| fid | File identifier to write |
Reimplemented from AMP::TimeIntegrator::TimeIntegrator.
|
private |
Definition at line 133 of file RK12TimeIntegrator.h.
|
protectedinherited |
Definition at line 350 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::TimeIntegrator::getGamma(), and AMP::TimeIntegrator::TimeIntegrator::setCurrentDt().
|
protectedinherited |
Definition at line 346 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::TimeIntegrator::setCurrentTime().
|
protectedinherited |
Definition at line 345 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::TimeIntegrator::setFinalTime().
|
protectedinherited |
Definition at line 315 of file TimeIntegrator.h.
|
protectedinherited |
Definition at line 357 of file TimeIntegrator.h.
|
protectedinherited |
initial time increment
Definition at line 349 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::TimeIntegrator::getInitialDt(), and AMP::TimeIntegrator::TimeIntegrator::setInitialDt().
|
protectedinherited |
Definition at line 344 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::TimeIntegrator::setInitialTime().
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.
|
protectedinherited |
Definition at line 358 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::ImplicitIntegrator::stepsRemaining().
|
private |
Definition at line 138 of file RK12TimeIntegrator.h.
|
private |
Definition at line 139 of file RK12TimeIntegrator.h.
|
protectedinherited |
maximum allowable timestep (user defined)
Definition at line 355 of file TimeIntegrator.h.
|
protectedinherited |
Definition at line 359 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::ImplicitIntegrator::stepsRemaining().
|
protectedinherited |
Definition at line 352 of file TimeIntegrator.h.
|
private |
Definition at line 137 of file RK12TimeIntegrator.h.
|
private |
Definition at line 130 of file RK12TimeIntegrator.h.
|
protectedinherited |
Definition at line 305 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::ImplicitIntegrator::getObjectName().
|
protectedinherited |
Definition at line 351 of file TimeIntegrator.h.
|
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().
|
protectedinherited |
The operator is the left hand side mass operator (for FEM formulations)
Definition at line 333 of file TimeIntegrator.h.
|
protectedinherited |
pointer to parameters
Definition at line 310 of file TimeIntegrator.h.
|
protectedinherited |
Definition at line 338 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::TimeIntegrator::getSourceTerm(), and AMP::TimeIntegrator::TimeIntegrator::setSourceTerm().
|
private |
Definition at line 132 of file RK12TimeIntegrator.h.
|
protectedinherited |
Definition at line 320 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::TimeIntegrator::getSolution().
|
protectedinherited |
Definition at line 361 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::BDFIntegrator::getNumberOfStepRejections(), and AMP::TimeIntegrator::TimeIntegrator::getTotalRejectedSteps().
Definition at line 135 of file RK12TimeIntegrator.h.
|
protectedinherited |
keeps track of total number of step rejections
Definition at line 364 of file TimeIntegrator.h.
Referenced by AMP::TimeIntegrator::TimeIntegrator::registerWriter().
|
private |
Definition at line 140 of file RK12TimeIntegrator.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:45. Comments on this page |