Go to the documentation of this file.
21 #ifndef __AdamsBashforth5_hpp__
22 #define __AdamsBashforth5_hpp__
91 Kokkos::Schedule<Kokkos::Static>,
92 Kokkos::IndexType<int32>
110 return makeUnique<AdamsBashforth5>(*
this);
151 template<
typename activeFunctor>
156 activeFunctor activeP );
161 template<
typename activeFunctor>
166 activeFunctor activeP )
171 auto activeRng = activeP.activeRange();
173 Kokkos::parallel_for(
174 "AdamsBashforth5::correct",
181 static_cast<real>(1901.0 / 720.0) * d_dy[i]
182 -
static_cast<real>(2774.0 / 720.0) * d_history[i].dy1_
183 +
static_cast<real>(2616.0 / 720.0) * d_history[i].dy2_
184 -
static_cast<real>(1274.0 / 720.0) * d_history[i].dy3_
185 +
static_cast<real>( 251.0 / 720.0) * d_history[i].dy4_
187 d_history[i] = {d_dy[i] ,d_history[i].dy1_, d_history[i].dy2_, d_history[i].dy3_};
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
add_vCtor(integration, AdamsBashforth5, word)
Add this to the virtual constructor table.
pointField< VectorSingle, AB5History > & history_
Integration history.
AdamsBashforth5(const word &baseName, repository &owner, const pointStructure &pStruct, const word &method)
Base class for integrating the first order ODE (IVP)
const auto & deviceViewAll() const
bool setInitialVals(const int32IndexContainer &newIndices, const realx3Vector &y) override
Set the initial values for new indices.
const auto & pStruct() const
Const ref to pointStructure.
bool readEnd(const char *funcName)
End read of data chunk, ends with ')' return true or FatalIOError.
Kokkos::DefaultExecutionSpace DefaultExecutionSpace
Default execution space, it can be device exe.
const word & baseName() const
Base name.
Fifth order Adams-Bashforth integration method for solving ODE.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Interface class for any input stream
bool intAll(real dt, realx3Vector_D &y, realx3Vector_D &dy, range activeRng)
Integrate on all points in the active range.
bool correct(real dt, realx3Vector_D &y, realx3Vector_D &dy) override
INLINE_FUNCTION iIstream & operator>>(iIstream &str, AB3History &ab3)
@ END_LIST
Begin list [isseparator].
uniquePtr< integration > clone() const override
bool intRange(real dt, realx3Vector_D &y, realx3Vector_D &dy, activeFunctor activeP)
Integrate on active points in the active range.
INLINE_FUNCTION iOstream & operator<<(iOstream &str, const AB3History &ab3)
virtual ~AdamsBashforth5()=default
repository & owner()
Ref to the owner repository.
INLINE_FUNCTION_H auto & deviceViewAll()
Device view range [0,capcity)
@ BEGIN_LIST
End entry [isseparator].
virtual word method() const =0
return integration method
TypeInfo("AdamsBashforth5")
Type info.
Kokkos::RangePolicy< DefaultExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< int32 > > rpIntegration
Range policy for integration kernel.
Interface class for any output stream.
bool predict(real UNUSED(dt), realx3Vector_D &UNUSED(y), realx3Vector_D &UNUSED(dy)) override
bool needSetInitialVals() const override
Check if the method requires any set initial vals.
It holds two vectors of indecis on Host and Device.