Go to the documentation of this file.
21 #ifndef __AdamsBashforth3_hpp__
22 #define __AdamsBashforth3_hpp__
85 Kokkos::Schedule<Kokkos::Static>,
86 Kokkos::IndexType<int32>
105 return makeUnique<AdamsBashforth3>(*
this);
146 template<
typename activeFunctor>
151 activeFunctor activeP );
156 template<
typename activeFunctor>
161 activeFunctor activeP )
166 auto activeRng = activeP.activeRange();
168 Kokkos::parallel_for(
169 "AdamsBashforth3::correct",
175 d_y[i] += dt*(
static_cast<real>(23.0 / 12.0) * ldy
176 -
static_cast<real>(16.0 / 12.0) * d_history[i].dy1_
177 +
static_cast<real>(5.0 / 12.0) * d_history[i].dy2_);
178 d_history[i] = {ldy ,d_history[i].dy1_};
188 #endif //__integration_hpp__
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
bool setInitialVals(const int32IndexContainer &newIndices, const realx3Vector &y) override
Set the initial values for new indices.
pointField< VectorSingle, AB3History > & history_
Integration history.
Kokkos::RangePolicy< DefaultExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< int32 > > rpIntegration
Range policy for integration kernel.
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.
Base class for integrating the first order ODE (IVP)
const auto & deviceViewAll() const
const auto & pStruct() const
Const ref to pointStructure.
bool readEnd(const char *funcName)
End read of data chunk, ends with ')' return true or FatalIOError.
virtual ~AdamsBashforth3()=default
Destructor.
Kokkos::DefaultExecutionSpace DefaultExecutionSpace
Default execution space, it can be device exe.
bool correct(real dt, realx3Vector_D &y, realx3Vector_D &dy) override
AdamsBashforth3(const word &baseName, repository &owner, const pointStructure &pStruct, const word &method)
Construct from components.
const word & baseName() const
Base name.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
bool intRange(real dt, realx3Vector_D &y, realx3Vector_D &dy, activeFunctor activeP)
Integrate on active points in the active range.
Interface class for any input stream
add_vCtor(integration, AdamsBashforth3, word)
Add this to the virtual constructor table.
INLINE_FUNCTION iIstream & operator>>(iIstream &str, AB3History &ab3)
@ END_LIST
Begin list [isseparator].
INLINE_FUNCTION iOstream & operator<<(iOstream &str, const AB3History &ab3)
bool intAll(real dt, realx3Vector_D &y, realx3Vector_D &dy, range activeRng)
Integrate on all points in the active range.
repository & owner()
Ref to the owner repository.
INLINE_FUNCTION_H auto & deviceViewAll()
Device view range [0,capcity)
@ BEGIN_LIST
End entry [isseparator].
uniquePtr< integration > clone() const override
TypeInfo("AdamsBashforth3")
Third order Adams-Bashforth integration method for solving ODE.
virtual word method() const =0
return integration method
Interface class for any output stream.
It holds two vectors of indecis on Host and Device.