Time interpolator class using 4th-order Runge-Kutta.
More...
#include <TimeInterpolatorRK4.H>
|
| TimeInterpolatorRK4 () |
| Default constructor. More...
|
|
| ~TimeInterpolatorRK4 () |
| Destructor. More...
|
|
void | define (const DisjointBoxLayout &a_thisDisjointBoxLayout, const DisjointBoxLayout &a_coarserDisjointBoxLayout, const ProblemDomain &a_domain, const int &a_refineCoarse, const int &a_numStates, const int &a_ghosts) |
| Actual constructor. More...
|
|
void | setDt (const Real &a_dt) |
| Set coarse timestep. More...
|
|
void | saveInitialSoln (const LevelData< FArrayBox > &a_soln) |
| Update Taylor polynomial coefficients with the coarse solution. More...
|
|
void | saveRHS (const LevelData< FArrayBox > &a_rhs) |
| Update Taylor polynomial coefficients with coarse right-hand side. More...
|
|
void | interpolate (LevelData< FArrayBox > &a_U, const Real &a_timeInterpCoeff, const Interval &a_intvl) |
| Interpolate in time using the Taylor polynomial. More...
|
|
void | intermediate (LevelData< FArrayBox > &a_U, const Real &a_timeInterpCoeff, const int &a_stage, const Interval &a_intvl) const |
| Set RK4 intermediate values in time using the Taylor polynomial. More...
|
|
Time interpolator class using 4th-order Runge-Kutta.
◆ TimeInterpolatorRK4() [1/2]
TimeInterpolatorRK4::TimeInterpolatorRK4 |
( |
| ) |
|
Default constructor.
Object requires define() to be called before all other functions.
◆ ~TimeInterpolatorRK4()
TimeInterpolatorRK4::~TimeInterpolatorRK4 |
( |
| ) |
|
Destructor.
Destroys all objects created by define(). Passed in data references of define() are left alone.
◆ TimeInterpolatorRK4() [2/2]
◆ define()
void TimeInterpolatorRK4::define |
( |
const DisjointBoxLayout & |
a_thisDisjointBoxLayout, |
|
|
const DisjointBoxLayout & |
a_coarserDisjointBoxLayout, |
|
|
const ProblemDomain & |
a_domain, |
|
|
const int & |
a_refineCoarse, |
|
|
const int & |
a_numStates, |
|
|
const int & |
a_ghosts |
|
) |
| |
Actual constructor.
Set up object.
- Parameters
-
a_thisDisjointBoxLayout | layout at this level |
a_coarserDisjointBoxLayout | layout at next coarser level |
a_domain | problem domain on this level |
a_refineCoarse | refinement ratio between this level and next coarser level |
a_numStates | number of variables |
a_ghosts | layers of ghost cells to be filled in on the coarsened layout at this level |
◆ setDt()
void TimeInterpolatorRK4::setDt |
( |
const Real & |
a_dt | ) |
|
◆ saveInitialSoln()
Update Taylor polynomial coefficients with the coarse solution.
Update Taylor polynomial coefficients with coarse solution a_soln. Ghost cells, too.
This function must be called after setDt() and before saveRHS().
◆ saveRHS()
Update Taylor polynomial coefficients with coarse right-hand side.
Update Taylor polynomial coefficients with coarse right-hand side. Ghost cells, too.
This function must be called exactly four times, after saveInitialSoln() and before any calls to interpolate().
The counter m_countRHS keeps track of how many times this is called.
◆ interpolate()
Interpolate in time using the Taylor polynomial.
Interpolate in time to a_U on interval a_intvl using the Taylor polynomial. Ghost cells, too.
- Parameters
-
a_U | interpolated solution on this level coarsened |
a_timeInterpCoeff | time interpolation coefficient in range [0:1] |
a_intvl | interval of a_U to fill in |
◆ intermediate()
void TimeInterpolatorRK4::intermediate |
( |
LevelData< FArrayBox > & |
a_U, |
|
|
const Real & |
a_timeInterpCoeff, |
|
|
const int & |
a_stage, |
|
|
const Interval & |
a_intvl |
|
) |
| const |
Set RK4 intermediate values in time using the Taylor polynomial.
Set RK4 intermediate values to a_U on interval a_intvl using the Taylor polynomial. Ghost cells, too.
- Parameters
-
a_U | interpolated solution on this level coarsened |
a_timeInterpCoeff | time interpolation coefficient in range [0:1] |
a_stage | which RK4 stage: 0, 1, 2, 3 |
a_intvl | interval of a_U to fill in |
◆ resetData()
void TimeInterpolatorRK4::resetData |
( |
| ) |
|
|
protected |
Reset this object to use with new data.
◆ setVectorDt()
Set a_vec = m_dt * (a_c0, a_c1, a_c2, a_c3).
◆ operator=()
◆ m_coeffs
◆ m_thisCoarsenedLayout
layout for this level, coarsened by m_refToCoarse
◆ m_coarseLayout
layout for the coarse level
◆ m_copier
Copier TimeInterpolatorRK4::m_copier |
|
protected |
For copying from rhs on m_coarseLayout to m_rhsCopy on m_thisCoarsenedLayout.
◆ m_ghosts
int TimeInterpolatorRK4::m_ghosts |
|
protected |
layers of ghost cells around m_thisCoarsenedLayout for m_rhsCopy and m_taylorCoeffs
◆ m_numCoeffs
int TimeInterpolatorRK4::m_numCoeffs |
|
protected |
number of coefficients in Taylor polynomial: this is 4
◆ m_ghostVect
IntVect TimeInterpolatorRK4::m_ghostVect |
|
protected |
ghost vector around m_thisCoarsenedLayout for m_rhsCopy and m_taylorCoeffs
◆ m_dt
Real TimeInterpolatorRK4::m_dt |
|
protected |
◆ m_rhsCopy
Copy of rhs on m_thisCoarsenedLayout, to be used within saveRHS.
◆ m_taylorCoeffs
coefficients of the third-degree Taylor polynomial on m_thisCoarsenedLayout with ghost vector m_ghostVect; m_numCoeffs*m_numStates components
◆ m_diff12
difference between f(U1) and f(U2), used for intermediate-value calculations, on m_thisCoarsenedLayout with ghost vector m_ghostVect; m_numCoeffs*m_numStates components
◆ m_gotDt
bool TimeInterpolatorRK4::m_gotDt |
|
protected |
whether m_dt has been set
◆ m_gotInitialSoln
bool TimeInterpolatorRK4::m_gotInitialSoln |
|
protected |
whether initial solution has been saved
◆ m_gotFullTaylorPoly
bool TimeInterpolatorRK4::m_gotFullTaylorPoly |
|
protected |
whether we have the full Taylor polynomial
◆ m_countRHS
int TimeInterpolatorRK4::m_countRHS |
|
protected |
number of times saveRHS function has been called
◆ m_coarseDomain
Problem domain - index space for next coarser level.
◆ m_refineCoarse
int TimeInterpolatorRK4::m_refineCoarse |
|
protected |
Refinement ratio between this level and the next coarser.
◆ m_numStates
int TimeInterpolatorRK4::m_numStates |
|
protected |
◆ m_defined
bool TimeInterpolatorRK4::m_defined |
|
protected |
The documentation for this class was generated from the following file: