Go to the documentation of this file.
21 #ifndef __AdamsMoulton3_hpp__
22 #define __AdamsMoulton3_hpp__
46 Kokkos::Schedule<Kokkos::Static>,
47 Kokkos::IndexType<int32>
86 return makeUnique<AdamsMoulton3>(*
this);
91 template<
typename activeFunctor>
96 template<
typename activeFunctor>
102 template<
typename activeFunctor>
107 activeFunctor activeP )
111 auto d_y0 =
y0_.deviceVectorAll();
112 auto d_dy0 =
dy0_.deviceVectorAll();
113 auto d_dy1=
dy1_.deviceVectorAll();
117 Kokkos::parallel_for(
118 "AdamsMoulton3::predictRange",
127 static_cast<real>(3.0 / 2.0) * d_dy[i]
128 -
static_cast<real>(1.0 / 2.0) * d_dy1[i]
139 template<
typename activeFunctor>
144 activeFunctor activeP )
150 auto d_dy0 = dy0_.deviceVectorAll();
151 auto d_y0 = y0_.deviceVectorAll();
152 auto d_dy1 = dy1_.deviceVectorAll();
154 auto activeRng = activeP.activeRange();
156 Kokkos::parallel_for(
157 "AdamsMoulton3::correct",
162 auto corrct_y = d_y0[i] + dt*(
163 static_cast<real>(5.0/12.0)*d_dy[i]
164 +
static_cast<real>(8.0/12.0)*d_dy0[i]
165 -
static_cast<real>(1.0/12.0)*d_dy1[i]);
179 #endif //__integration_hpp__
TypeInfo("AdamsMoulton3")
add_vCtor(integration, AdamsMoulton3, word)
const auto & pStruct() const
AdamsMoulton3(const word &baseName, repository &owner, const pointStructure &pStruct, const word &method)
bool intAll(real dt, realx3Vector_D &y, realx3Vector_D &dy, range activeRng)
Kokkos::DefaultExecutionSpace DefaultExecutionSpace
Kokkos::RangePolicy< DefaultExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< int32 > > rpIntegration
const word & baseName() const
bool predictRange(real dt, realx3Vector_D &y, realx3Vector_D &dy, activeFunctor activeP)
bool setInitialVals(const int32IndexContainer &newIndices, const realx3Vector &y) override
realx3PointField_D & dy0_
range activeRange() const
uniquePtr< integration > clone() const override
bool intRange(real dt, realx3Vector_D &y, realx3Vector_D &dy, activeFunctor activeP)
bool predictAll(real dt, realx3Vector_D &y, realx3Vector_D &dy, range activeRng)
realx3PointField_D & dy1_
bool predict(real dt, realx3Vector_D &y, realx3Vector_D &dy) override
bool correct(real dt, realx3Vector_D &y, realx3Vector_D &dy) override
virtual ~AdamsMoulton3()=default
INLINE_FUNCTION_H viewType & deviceVectorAll()
bool needSetInitialVals() const override