Go to the documentation of this file.
21 #ifndef __AdamsMoulton5_hpp__
22 #define __AdamsMoulton5_hpp__
50 Kokkos::Schedule<Kokkos::Static>,
51 Kokkos::IndexType<int32>
90 return makeUnique<AdamsMoulton5>(*
this);
95 template<
typename activeFunctor>
100 template<
typename activeFunctor>
106 template<
typename activeFunctor>
111 activeFunctor activeP )
116 auto d_y0 =
y0_.deviceVectorAll();
117 auto d_dy0 =
dy0_.deviceVectorAll();
118 auto d_dy1 =
dy1_.deviceVectorAll();
119 auto d_dy2 =
dy2_.deviceVectorAll();
120 auto d_dy3 =
dy3_.deviceVectorAll();
124 Kokkos::parallel_for(
125 "AdamsMoulton5::predictRange",
131 d_y[i] = d_y0[i] + dt*(
132 static_cast<real>(55.0/24.0) * d_dy[i]
133 -
static_cast<real>(59.0/24.0) * d_dy1[i]
134 +
static_cast<real>(37.0/24.0) * d_dy2[i]
135 -
static_cast<real>( 9.0/24.0) * d_dy3[i]);
144 template<
typename activeFunctor>
149 activeFunctor activeP )
155 auto d_dy0 = dy0_.deviceVectorAll();
156 auto d_y0 = y0_.deviceVectorAll();
157 auto d_dy1 = dy1_.deviceVectorAll();
158 auto d_dy2 = dy2_.deviceVectorAll();
159 auto d_dy3 = dy3_.deviceVectorAll();
161 auto activeRng = activeP.activeRange();
163 Kokkos::parallel_for(
164 "AdamsMoulton5::correct",
169 auto corrct_y = d_y0[i] + dt*(
170 static_cast<real>(251.0/720.0)*d_dy[i]
171 +
static_cast<real>(646.0/720.0)*d_dy0[i]
172 -
static_cast<real>(264.0/720.0)*d_dy1[i]
173 +
static_cast<real>(106.0/720.0)*d_dy2[i]
174 -
static_cast<real>( 19.0/720.0)*d_dy3[i]);
191 #endif //__integration_hpp__
bool setInitialVals(const int32IndexContainer &newIndices, const realx3Vector &y) override
Kokkos::RangePolicy< DefaultExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< int32 > > rpIntegration
bool predictRange(real dt, realx3Vector_D &y, realx3Vector_D &dy, activeFunctor activeP)
bool intAll(real dt, realx3Vector_D &y, realx3Vector_D &dy, range activeRng)
const auto & pStruct() const
add_vCtor(integration, AdamsMoulton5, word)
bool predictAll(real dt, realx3Vector_D &y, realx3Vector_D &dy, range activeRng)
Kokkos::DefaultExecutionSpace DefaultExecutionSpace
const word & baseName() const
realx3PointField_D & dy0_
realx3PointField_D & dy1_
uniquePtr< integration > clone() const override
range activeRange() const
bool correct(real dt, realx3Vector_D &y, realx3Vector_D &dy) override
AdamsMoulton5(const word &baseName, repository &owner, const pointStructure &pStruct, const word &method)
bool needSetInitialVals() const override
bool predict(real dt, realx3Vector_D &y, realx3Vector_D &dy) override
realx3PointField_D & dy2_
realx3PointField_D & dy3_
bool intRange(real dt, realx3Vector_D &y, realx3Vector_D &dy, activeFunctor activeP)
virtual ~AdamsMoulton5()=default
INLINE_FUNCTION_H viewType & deviceVectorAll()
TypeInfo("AdamsMoulton5")