Go to the documentation of this file.
21 #ifndef __AdamsMoulton4_hpp__
22 #define __AdamsMoulton4_hpp__
48 Kokkos::Schedule<Kokkos::Static>,
49 Kokkos::IndexType<int32>
88 return makeUnique<AdamsMoulton4>(*
this);
93 template<
typename activeFunctor>
98 template<
typename activeFunctor>
104 template<
typename activeFunctor>
109 activeFunctor activeP )
114 auto d_y0 =
y0_.deviceVectorAll();
115 auto d_dy0 =
dy0_.deviceVectorAll();
116 auto d_dy1 =
dy1_.deviceVectorAll();
117 auto d_dy2 =
dy2_.deviceVectorAll();
121 Kokkos::parallel_for(
122 "AdamsMoulton4::predictRange",
128 d_y[i] = d_y0[i] + dt*(
129 static_cast<real>(23.0 /12.0 ) * d_dy[i]
130 -
static_cast<real>(16.0 / 12.0) * d_dy1[i]
131 +
static_cast<real>( 5.0 / 12.0) * d_dy2[i]);
141 template<
typename activeFunctor>
146 activeFunctor activeP )
152 auto d_dy0 = dy0_.deviceVectorAll();
153 auto d_y0 = y0_.deviceVectorAll();
154 auto d_dy1 = dy1_.deviceVectorAll();
155 auto d_dy2 = dy2_.deviceVectorAll();
157 auto activeRng = activeP.activeRange();
159 Kokkos::parallel_for(
160 "AdamsMoulton4::correct",
165 auto corrct_y = d_y0[i] + dt*(
166 static_cast<real>(9.0/24.0)*d_dy[i]
167 +
static_cast<real>(19.0/24.0)*d_dy0[i]
168 -
static_cast<real>( 5.0/24.0)*d_dy1[i]
169 +
static_cast<real>( 1.0/24.0)*d_dy2[i]);
185 #endif //__integration_hpp__
AdamsMoulton4(const word &baseName, repository &owner, const pointStructure &pStruct, const word &method)
virtual ~AdamsMoulton4()=default
bool needSetInitialVals() const override
realx3PointField_D & dy0_
realx3PointField_D & dy1_
realx3PointField_D & dy2_
const auto & pStruct() const
bool correct(real dt, realx3Vector_D &y, realx3Vector_D &dy) override
bool predict(real dt, realx3Vector_D &y, realx3Vector_D &dy) override
Kokkos::DefaultExecutionSpace DefaultExecutionSpace
bool intRange(real dt, realx3Vector_D &y, realx3Vector_D &dy, activeFunctor activeP)
const word & baseName() const
bool setInitialVals(const int32IndexContainer &newIndices, const realx3Vector &y) override
Kokkos::RangePolicy< DefaultExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< int32 > > rpIntegration
add_vCtor(integration, AdamsMoulton4, word)
bool predictRange(real dt, realx3Vector_D &y, realx3Vector_D &dy, activeFunctor activeP)
range activeRange() const
bool predictAll(real dt, realx3Vector_D &y, realx3Vector_D &dy, range activeRng)
TypeInfo("AdamsMoulton4")
bool intAll(real dt, realx3Vector_D &y, realx3Vector_D &dy, range activeRng)
INLINE_FUNCTION_H viewType & deviceVectorAll()
uniquePtr< integration > clone() const override