Skip to content

Commit

Permalink
ADMconstraints: add extra SYNCs
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Nov 20, 2024
1 parent d8d0af1 commit 6026cf2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ADMconstraints/schedule.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ SCHEDULE GROUP ADMconstraints_AnalysisGroup AT analysis


if (calc_constraints) {
SCHEDULE ADMconstraints_CalcConstraints IN ADMconstraints_AnalysisGroup
SCHEDULE ADMconstraints_Sync IN ADMconstraints_AnalysisGroup
{
LANG: C
OPTIONS: global
SYNC: ADMBaseX::metric
SYNC: ADMBaseX::curv
SYNC: ADMBaseX::lapse
SYNC: ADMBaseX::shift
} "Synchronize"

SCHEDULE ADMconstraints_CalcConstraints IN ADMconstraints_AnalysisGroup AFTER ADMconstraints_Sync
{
LANG: C
READS: ADMBaseX::metric(everywhere)
Expand All @@ -24,7 +34,6 @@ if (calc_constraints) {
READS: TmunuBaseX::eTij(interior)
WRITES: HC(interior)
WRITES: MC(interior)
SYNC: HC MC
} "Calculate ADM Constraints"

if (use_lapse_mask) {
Expand All @@ -36,6 +45,7 @@ if (calc_constraints) {
READS: MC(interior)
WRITES: HC(interior)
WRITES: MC(interior)
SYNC: HC MC
} "Apply lapse mask"
}
}
4 changes: 4 additions & 0 deletions ADMconstraints/src/admconstraints.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ CCTK_DEVICE CCTK_HOST CCTK_ATTRIBUTE_ALWAYS_INLINE inline T Power(T x, int y) {
return (y == 2) ? Arith::pow2(x) : Arith::pown(x, y);
}

extern "C" void ADMconstraints_Sync(CCTK_ARGUMENTS) {
// do nothing
}

extern "C" void ADMconstraints_CalcConstraints(CCTK_ARGUMENTS) {
DECLARE_CCTK_ARGUMENTSX_ADMconstraints_CalcConstraints;
DECLARE_CCTK_PARAMETERS;
Expand Down

0 comments on commit 6026cf2

Please sign in to comment.