Support 2nd and 8th order CUDA AMR paths

This commit is contained in:
2026-05-07 20:31:26 +08:00
parent c4d8d41b25
commit dcc83bafcb
4 changed files with 150 additions and 18 deletions

View File

@@ -245,11 +245,15 @@ bool cuda_cell_gw3_restrict_params(const Parallel::gridseg *src,
const Parallel::gridseg *dst,
int first_fine[3])
{
#if (USE_CUDA_BSSN || (USE_CUDA_Z4C && (ABEtype == 2))) && defined(Cell) && ((ghost_width == 3) || (ghost_width == 4))
#if ghost_width == 4
#if (USE_CUDA_BSSN || (USE_CUDA_Z4C && (ABEtype == 2))) && defined(Cell) && (ghost_width >= 2) && (ghost_width <= 5)
#if ghost_width == 5
const int stencil_hi = 5;
#elif ghost_width == 4
const int stencil_hi = 4;
#else
#elif ghost_width == 3
const int stencil_hi = 3;
#else
const int stencil_hi = 2;
#endif
if (!src || !dst || !src->Bg || !dst->Bg)
return false;
@@ -291,11 +295,15 @@ bool cuda_cell_gw3_prolong_params(const Parallel::gridseg *src,
int first_fine_ii[3],
int coarse_lb[3])
{
#if (USE_CUDA_BSSN || (USE_CUDA_Z4C && (ABEtype == 2))) && defined(Cell) && ((ghost_width == 3) || (ghost_width == 4))
#if ghost_width == 4
#if (USE_CUDA_BSSN || (USE_CUDA_Z4C && (ABEtype == 2))) && defined(Cell) && (ghost_width >= 2) && (ghost_width <= 5)
#if ghost_width == 5
const int stencil_hi = 5;
#elif ghost_width == 4
const int stencil_hi = 4;
#else
#elif ghost_width == 3
const int stencil_hi = 3;
#else
const int stencil_hi = 2;
#endif
if (!src || !dst || !src->Bg || !dst->Bg)
return false;