11 #ifndef _RK4DENSEOUTPUT_H_ 12 #define _RK4DENSEOUTPUT_H_ 15 #include "NamespaceHeader.H" 23 template <
class Soln,
class Rhs,
class EXOP>
31 void define(
const Soln& a_state,
Real a_dt,
bool a_denseOutput =
false);
81 template <
class Soln,
class Rhs,
class EXOP>
83 define(
const Soln& a_state,
Real a_dt,
bool a_denseOutput)
89 for (
int stage = 0; stage <
s_nStages; stage++)
94 m_rhs.define(a_state);
110 template <
class Soln,
class Rhs,
class EXOP>
120 template <
class Soln,
class Rhs,
class EXOP>
139 template <
class Soln,
class Rhs,
class EXOP>
146 if (a_start0) stage0 = 0;
151 m_opEx.stage0stage1(stage0, stage1);
157 template <
class Soln,
class Rhs,
class EXOP>
164 CH_TIMER(
"RK4DenseOutput::advance - explicit op", t1);
175 for (
int stage = 0; stage <
s_nStages; stage++)
176 m_phi[stage].copy(a_state);
180 a_state.copy(
m_phi[0]);
183 for (
int stage = 0; stage <
s_nStages; stage++)
198 a_state.increment(
m_kE, m_dt*
s_b[stage],
true);
231 template <
class Soln,
class Rhs,
class EXOP>
235 CH_TIMERS(
"RK4DenseOutput::denseOutputCoefs");
241 for (
int icoef=0; icoef < nCoef; ++icoef)
247 a_interpCoefs[0]->copy(
m_phi[0]);
250 for (
int icoef = 1; icoef < nCoef ; ++icoef)
267 template <
class Soln,
class Rhs,
class EXOP>
269 s_c[] = { 0.0, 0.5, 0.5, 1.0 };
272 template <
class Soln,
class Rhs,
class EXOP>
282 template <
class Soln,
class Rhs,
class EXOP>
285 {0.16666666666666667, 0.33333333333333333, 0.33333333333333333, 0.16666666666666667};
288 template <
class Soln,
class Rhs,
class EXOP>
292 {-1.5, 1.0, 1.0, -0.5},
293 {0.66666666666666667, -0.66666666666666667, -0.66666666666666667, 0.66666666666666667}
297 #include "NamespaceFooter.H" void denseOutputCoefs(Vector< Rhs *> &a_interpCoefs)
Definition: RK4DenseOutput.H:233
#define CH_TIMERS(name)
Definition: CH_Timer.H:133
EXOP & getEXOP()
Definition: RK4DenseOutput.H:112
bool m_isDefined
Definition: RK4DenseOutput.H:64
static const int s_nStages
Runge-Kutta coefficients.
Definition: RK4DenseOutput.H:56
#define CH_assert(cond)
Definition: CHArray.H:37
static const Real s_a[s_nStages][s_nStages]
Definition: RK4DenseOutput.H:58
bool isDefined() const
Definition: RK4DenseOutput.H:51
one dimensional dynamic array
Definition: Vector.H:53
#define CH_START(tpointer)
Definition: CH_Timer.H:145
bool hasDenseOutput() const
Definition: RK4DenseOutput.H:53
EXOP m_opEx
Definition: RK4DenseOutput.H:73
static const Real s_c[s_nStages]
Definition: RK4DenseOutput.H:57
#define CH_TIMER(name, tpointer)
Definition: CH_Timer.H:63
Rhs m_rhs
Definition: RK4DenseOutput.H:70
Real m_dt
Definition: RK4DenseOutput.H:67
static const int s_nDenseCoefs
Definition: RK4DenseOutput.H:60
Definition: RK4DenseOutput.H:24
void start0end1(bool a_start0, bool a_end1)
Definition: RK4DenseOutput.H:141
double Real
Definition: REAL.H:33
void resetDt(Real a_dt)
Definition: RK4DenseOutput.H:122
T Abs(const T &a_a)
Definition: Misc.H:53
bool m_hasDenseOutput
Definition: RK4DenseOutput.H:66
size_t size() const
Definition: Vector.H:192
Real m_time
Definition: RK4DenseOutput.H:68
void define(const Soln &a_state, Real a_dt, bool a_denseOutput=false)
Definition: RK4DenseOutput.H:83
Rhs m_denseCoefs[s_nDenseCoefs]
Definition: RK4DenseOutput.H:71
static const Real s_bstar[s_nDenseCoefs][s_nStages]
Definition: RK4DenseOutput.H:61
#define CH_STOP(tpointer)
Definition: CH_Timer.H:150
bool m_denseOutput
Definition: RK4DenseOutput.H:65
Rhs m_kE
Definition: RK4DenseOutput.H:72
Soln m_phi[s_nStages]
Definition: RK4DenseOutput.H:69
void advance(Real a_time, Soln &a_state)
Definition: RK4DenseOutput.H:159
static const Real s_b[s_nStages]
Definition: RK4DenseOutput.H:59