69{
70 std::size_t iT = vars.template get<fd::fdParams::Timestep>();
71 T f[MODEL::extent()*DESCRIPTOR::d], F[MODEL::extent()*DESCRIPTOR::d];
72 T u[DESCRIPTOR::d];
73 T* fNew = fd::accessNew<T,FIELD>(cell, iT);
74 T* f0 = fd::accessOld<T,FIELD>(cell, iT);
75 for (int iN=1; iN<=MODEL::extent(); ++iN) {
76 f[fd::getArrayPos<MODEL::extent()>(iN-1,0)] = *fd::accessOld<T,FIELD>( cell.neighbor({-iN, 0}), iT );
77 F[fd::getArrayPos<MODEL::extent()>(iN-1,0)] = *fd::accessOld<T,FIELD>( cell.neighbor({+iN, 0}), iT );
78 f[fd::getArrayPos<MODEL::extent()>(iN-1,1)] = *fd::accessOld<T,FIELD>( cell.neighbor({ 0, -iN}), iT );
79 F[fd::getArrayPos<MODEL::extent()>(iN-1,1)] = *fd::accessOld<T,FIELD>( cell.neighbor({ 0, +iN}), iT );
80 }
81 cell.computeU(u);
82 MODEL::template apply<PARAMETERS>(fNew, f0, f, F, u, vars);
84}
void applySourceTerm(T *fNew, CELL &cell) any_platform