diff --git a/AMSS_NCKU_source/bssn_class.C b/AMSS_NCKU_source/bssn_class.C index 6c0e749..15f4d74 100644 --- a/AMSS_NCKU_source/bssn_class.C +++ b/AMSS_NCKU_source/bssn_class.C @@ -98,7 +98,9 @@ static int cuda_compute_rhs_bssn_ss( Symmetry, Lev, eps, sst, co); } } -// All call sites below that use f_compute_rhs_bssn_ss get redirected to GPU +// Use GPU for shell RHS in Step and SHStep. +// Compute_Constraint / Interp_Constraint / Constraint_Out keep +// CPU Fortran (GPU alloc-per-call overhead dominates there). #define f_compute_rhs_bssn_ss cuda_compute_rhs_bssn_ss #endif @@ -9066,6 +9068,12 @@ void bssn_class::AnalysisStuff(int lev, double dT_lev) //================================================================================================ +#if USE_CUDA_BSSN && defined(WithShell) +#undef f_compute_rhs_bssn_ss +// Restore the original Fortran name mapping from bssn_rhs.h (fortran3 convention) +#define f_compute_rhs_bssn_ss compute_rhs_bssn_ss_ +#endif + // This member function computes and outputs constraint violations //================================================================================================