Skip to content

Commit

Permalink
TestSubcyclingMC: update function CalcYfsFromKcs
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Apr 11, 2024
1 parent 6a5ed5d commit b0b7353
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions TestSubcyclingMC/src/testsubcyclingmc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,24 @@ void CalcYs(const Loop::GridDescBaseDevice &grid,
});
}

/**
* \brief Calculate Ys ghost points for fine grid using Ks on coarse grid
*
* \param stage RK stage number starting from 1
* \param ncycle number of subcyling steps. It's usually 2 or 4.
* Without subcycling, this will be 1.
*/
void CalcYfsFromKcs(
// output
CCTK_REAL Yf,
// input
CCTK_REAL kc1, CCTK_REAL kc2, CCTK_REAL kc3, CCTK_REAL kc4, CCTK_REAL u0,
CCTK_INT stage) {
CCTK_REAL dtc, CCTK_REAL xsi, CCTK_INT stage) {
assert(stage > 0 && stage <= 4);

// CCTK_REAL dtc = m_dt_coarse;
// CCTK_REAL r = CCTK_REAL(1) / CCTK_REAL(ncycle);
// CCTK_REAL xsi = CCTK_REAL(iteration-1) / CCTK_REAL(ncycle);
CCTK_REAL dtc = 0;
CCTK_REAL r = 0;
CCTK_REAL xsi = 0;
const CCTK_REAL ncycle = 2; // 2 to 1 mesh refinement
CCTK_REAL r = CCTK_REAL(1) / CCTK_REAL(ncycle);

CCTK_REAL xsi2 = xsi * xsi;
CCTK_REAL xsi3 = xsi2 * xsi;
Expand Down

0 comments on commit b0b7353

Please sign in to comment.