Skip to content

Commit

Permalink
move var to outside kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
hklion committed Dec 13, 2023
1 parent 6d2ce0d commit dcd78fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/TimeIntegration/ROMSX_setup_step.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ ROMSX::setup_step (int lev, Real time, Real dt_lev)
Real coriolis_beta = solverChoice.coriolis_beta;

const auto dx = Geom(lev).CellSizeArray();
Real Esize=geom[lev].ProbHi()[1] - geom[lev].ProbLo()[1];

ParallelFor(tbxp2D,
[=] AMREX_GPU_DEVICE (int i, int j, int )
{
pm(i,j,0) = dxi[0];
pn(i,j,0) = dxi[1];
Real Esize=geom[lev].ProbHi()[1] - geom[lev].ProbLo()[1];
Real y = prob_lo[1] + (j + 0.5) * dx[1];
Real f=coriolis_f0 + coriolis_beta*(y-.5*Esize);
fomn(i,j,0)=f*(1.0/(pm(i,j,0)*pn(i,j,0)));
Expand Down

0 comments on commit dcd78fe

Please sign in to comment.