11 #ifndef _ARK4DENSEOUTPUT_H_ 12 #define _ARK4DENSEOUTPUT_H_ 15 #include "NamespaceHeader.H" 33 template <
class Soln,
class Rhs,
class IMEXOp>
41 void define(
const Soln& a_state,
Real a_dt,
bool a_denseOutput =
false);
94 template <
class Soln,
class Rhs,
class IMEXOp>
96 define(
const Soln& a_state,
Real a_dt,
bool a_denseOutput)
102 for (
int stage = 0; stage <
s_nStages; stage++)
106 m_kE.define(a_state);
107 m_kI.define(a_state);
108 m_rhs.define(a_state);
124 template <
class Soln,
class Rhs,
class IMEXOp>
134 template <
class Soln,
class Rhs,
class IMEXOp>
153 template <
class Soln,
class Rhs,
class IMEXOp>
160 if (a_start0) stage0 = 0;
165 m_opImEx.stage0stage1(stage0, stage1);
171 template <
class Soln,
class Rhs,
class IMEXOp>
178 CH_TIMER(
"ARK4DenseOutput::advance - explicit op", t1);
179 CH_TIMER(
"ARK4DenseOutput::advance - implicit op", t2);
180 CH_TIMER(
"ARK4DenseOutput::advance - implicit solve", t3);
191 for (
int stage = 0; stage <
s_nStages; stage++)
192 m_phi[stage].copy(a_state);
196 a_state.copy(
m_phi[0]);
199 for (
int stage = 0; stage <
s_nStages; stage++)
219 a_state.increment(
m_kE, m_dt*
s_b[stage],
true);
228 a_state.increment(
m_kI, m_dt*
s_b[stage],
true);
262 template <
class Soln,
class Rhs,
class IMEXOp>
266 CH_TIMERS(
"ARK4DenseOutput::denseOutputCoefs");
272 for (
int icoef=0; icoef < nCoef; ++icoef)
278 a_interpCoefs[0]->copy(
m_phi[0]);
281 for (
int icoef = 1; icoef < nCoef ; ++icoef)
297 template <
class Soln,
class Rhs,
class IMEXOp>
302 template <
class Soln,
class Rhs,
class IMEXOp>
304 s_c[] = { 0.0, 0.5, 0.332, 0.62, 0.85, 1.0 };
307 template <
class Soln,
class Rhs,
class IMEXOp>
310 {0., 0., 0., 0., 0., 0.},
311 {0.5, 0., 0., 0., 0., 0.},
312 {0.221776, 0.110224, 0., 0., 0., 0.},
313 {-0.04884659515311857, -0.17772065232640102, 0.8465672474795197, 0., 0., 0.},
314 {-0.15541685842491548, -0.3567050098221991, 1.0587258798684427, 0.30339598837867193, 0., 0.},
315 { 0.2014243506726763, 0.008742057842904185, 0.15993995707168115, 0.4038290605220775, 0.22606457389066084, 0.}
319 template <
class Soln,
class Rhs,
class IMEXOp>
322 {0., 0., 0., 0., 0., 0.},
323 {0.25, 0.25, 0., 0., 0., 0.},
324 {0.137776, -0.055776, 0.25, 0., 0., 0.},
325 {0.14463686602698217, -0.22393190761334475, 0.4492950415863626, 0.25, 0., 0.},
326 {0.09825878328356477, -0.5915442428196704, 0.8101210538282996, 0.283164405707806, 0.25, 0.},
327 {0.15791629516167136, 0., 0.18675894052400077, 0.6805652953093346, -0.27524053099500667, 0.25}
331 template <
class Soln,
class Rhs,
class IMEXOp>
334 {0.15791629516167136, 0., 0.18675894052400077, 0.6805652953093346, -0.27524053099500667, 0.25};
337 template <
class Soln,
class Rhs,
class IMEXOp>
340 {0.961753400252887, 0., 0.787405595186356, -2.74544192086633, 3.70351728061223, -1.70723435518514},
341 {-1.76418754019038, 0., -0.774504669155511, 9.64023584441292, -12.544886411271, 5.44334277620397},
342 {0.960350435099165, 0., 0.173858014493155, -6.21422862823726, 8.56612859966376, -3.48610842101883}
345 #include "NamespaceFooter.H" #define CH_TIMERS(name)
Definition: CH_Timer.H:133
#define CH_assert(cond)
Definition: CHArray.H:37
bool isDefined() const
Definition: ARK4DenseOutput.H:61
IMEXOp & getImExOp()
Definition: ARK4DenseOutput.H:126
one dimensional dynamic array
Definition: Vector.H:53
#define CH_START(tpointer)
Definition: CH_Timer.H:145
Real m_dt
Definition: ARK4DenseOutput.H:79
void resetDt(Real a_dt)
Definition: ARK4DenseOutput.H:136
static const Real s_c[s_nStages]
Definition: ARK4DenseOutput.H:68
Rhs m_rhs
Definition: ARK4DenseOutput.H:82
#define CH_TIMER(name, tpointer)
Definition: CH_Timer.H:63
static const Real s_bstar[s_nDenseCoefs][s_nStages]
Definition: ARK4DenseOutput.H:73
static const Real s_aI[s_nStages][s_nStages]
Definition: ARK4DenseOutput.H:70
bool m_isDefined
Definition: ARK4DenseOutput.H:76
bool m_hasDenseOutput
Definition: ARK4DenseOutput.H:78
void denseOutputCoefs(Vector< Rhs *> &a_interpCoefs)
Definition: ARK4DenseOutput.H:264
static const Real s_b[s_nStages]
Definition: ARK4DenseOutput.H:71
Soln m_phi[s_nStages]
Definition: ARK4DenseOutput.H:81
void start0end1(bool a_start0, bool a_end1)
Definition: ARK4DenseOutput.H:155
IMEXOp m_opImEx
Definition: ARK4DenseOutput.H:86
double Real
Definition: REAL.H:33
bool m_denseOutput
Definition: ARK4DenseOutput.H:77
T Abs(const T &a_a)
Definition: Misc.H:53
size_t size() const
Definition: Vector.H:192
Real m_time
Definition: ARK4DenseOutput.H:80
Rhs m_kI
Definition: ARK4DenseOutput.H:85
Definition: ARK4DenseOutput.H:34
static const Real s_aE[s_nStages][s_nStages]
Definition: ARK4DenseOutput.H:69
void advance(Real a_time, Soln &a_state)
Definition: ARK4DenseOutput.H:173
#define CH_STOP(tpointer)
Definition: CH_Timer.H:150
static const int s_nDenseCoefs
Definition: ARK4DenseOutput.H:72
Rhs m_denseCoefs[s_nDenseCoefs]
Definition: ARK4DenseOutput.H:83
void define(const Soln &a_state, Real a_dt, bool a_denseOutput=false)
Definition: ARK4DenseOutput.H:96
static const int s_nStages
Runge-Kutta coefficients.
Definition: ARK4DenseOutput.H:66
bool hasDenseOutput() const
Definition: ARK4DenseOutput.H:63
Rhs m_kE
Definition: ARK4DenseOutput.H:84
static const Real s_aIdiag
Definition: ARK4DenseOutput.H:67