summaryrefslogtreecommitdiff
path: root/src/maximal_slicing_axi_mg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/maximal_slicing_axi_mg.c')
-rw-r--r--src/maximal_slicing_axi_mg.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/maximal_slicing_axi_mg.c b/src/maximal_slicing_axi_mg.c
index c37cbef..14bd2c8 100644
--- a/src/maximal_slicing_axi_mg.c
+++ b/src/maximal_slicing_axi_mg.c
@@ -871,3 +871,33 @@ void msa_mg_inithist(CCTK_ARGUMENTS)
lapse_prev1_time[i] = DBL_MAX;
}
}
+
+void maximal_slicing_axi_mg_modify_diss(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ CoordPatch *cp;
+
+ const int reflevel = ctz(cctkGH->cctk_levfac[0]);
+
+ double *epsdis;
+
+ epsdis = CCTK_VarDataPtr(cctkGH, 0, "Dissipation::epsdisA");
+ if (!epsdis)
+ abort();
+
+ cp = get_coord_patch(ms, reflevel);
+
+ for (int idx_z = 0; idx_z < cp->grid_size[2]; idx_z++)
+ for (int idx_x = cp->grid_size[0] - cp->offset_right[0] - (ms->fd_stencil + 1); idx_x < cp->grid_size[0]; idx_x++) {
+ const ptrdiff_t idx_dst = CPINDEX(cp, idx_x, cp->y_idx, idx_z);
+ epsdis[idx_dst] = 0.0;
+ }
+
+ for (int idx_x = 0; idx_x < cp->grid_size[0]; idx_x++)
+ for (int idx_z = cp->grid_size[2] - cp->offset_right[1] - (ms->fd_stencil + 1); idx_z < cp->grid_size[2]; idx_z++) {
+ const ptrdiff_t idx_dst = CPINDEX(cp, idx_x, cp->y_idx, idx_z);
+ epsdis[idx_dst] = 0.0;
+ }
+}