Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VolumeIntegrals_vacuumX/schedule.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ SCHEDULE VI_vacuumX_InitializeIntegralCounter before VI_vacuumX_VolumeIntegralGr
WRITES: IntegralCounter(everywhere)
} "Initialize IntegralCounter variable"
##################
SCHEDULE GROUP VI_vacuumX_VolumeIntegralGroup AT CCTK_ANALYSIS WHILE VolumeIntegrals_vacuumX::IntegralCounter
SCHEDULE GROUP VI_vacuumX_VolumeIntegralGroup AT CCTK_ANALYSIS WHILE VolumeIntegrals_vacuumX::IntegralCounter AFTER Z4c_AnalysisGroup
{
} "Evaluate all volume integrals"

Expand Down
25 changes: 21 additions & 4 deletions VolumeIntegrals_vacuumX/src/evaluate_integrands_local.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -240,18 +240,35 @@ extern "C" void VI_vacuumX_ComputeIntegrand(CCTK_ARGUMENTS) {
const CCTK_REAL idx = 1.0 / CCTK_DELTA_SPACE(0);
const CCTK_REAL idy = 1.0 / CCTK_DELTA_SPACE(1);
const CCTK_REAL idz = 1.0 / CCTK_DELTA_SPACE(2);
vect<int, dim> imin, imax;
grid.box_int<1, 1, 1>(grid.nghostzones, imin, imax);

grid.loop_allmn_device<1, 1, 1>(
grid.nghostzones, 1,
grid.loop_all_device<1, 1, 1>(
grid.nghostzones,
[=] CCTK_DEVICE(const PointDesc &p) CCTK_ATTRIBUTE_ALWAYS_INLINE {
VolIntegrand1(p.I) = 0.0;
VolIntegrand2(p.I) = 0.0;
VolIntegrand3(p.I) = 0.0;
VolIntegrand4(p.I) = 0.0;
});

grid.loop_int_device<1, 1, 1>(
grid.nghostzones,
[=] CCTK_DEVICE(const PointDesc &p) CCTK_ATTRIBUTE_ALWAYS_INLINE {
for (int d = 0; d < dim; ++d)
if (p.I[d] < imin[d] + 1 || p.I[d] >= imax[d] - 1)
return;
VI_vacuumX_ADM_Mass_integrand_eval_derivs(
VolIntegrand2, VolIntegrand3, VolIntegrand4, p, idx, idy, idz,
alp, gxx, gxy, gxz, gyy, gyz, gzz);
});

grid.loop_allmn_device<1, 1, 1>(
grid.nghostzones, 2,
grid.loop_int_device<1, 1, 1>(
grid.nghostzones,
[=] CCTK_DEVICE(const PointDesc &p) CCTK_ATTRIBUTE_ALWAYS_INLINE {
for (int d = 0; d < dim; ++d)
if (p.I[d] < imin[d] + 2 || p.I[d] >= imax[d] - 2)
return;
VI_vacuumX_ADM_Mass_integrand(VolIntegrand1, p, idx, idy, idz,
VolIntegrand2, VolIntegrand3,
VolIntegrand4);
Expand Down