Skip to content

Commit

Permalink
Z4co: add par for diss order
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Sep 10, 2024
1 parent 1a452cd commit 4da3f80
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
9 changes: 9 additions & 0 deletions Z4co/param.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@ CCTK_INT deriv_order "Order of spatial finite differencing" STEERABLE=never
2 :: "Second order finite difference"
4 :: "Fourth order finite difference"
6 :: "Sixth order finite difference"
8 :: "Eighth order finite difference"
} 4

CCTK_INT diss_order "Order of Kreiss-Oliger dissipation" STEERABLE=never
{
3 :: "Third order KO dissipation"
5 :: "Fifth order KO dissipation"
7 :: "Seventh order KO dissipation"
9 :: "Ninth order KO dissipation"
} 5

BOOLEAN calc_ADM_vars "Calculate ADM variables" STEERABLE=recover
{
} yes
Expand Down
15 changes: 11 additions & 4 deletions Z4co/src/rhs.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,23 @@ extern "C" void Z4co_RHS(CCTK_ARGUMENTS) {

vreal (*calc_diss)(const GF3D2<const CCTK_REAL> &, const vbool &,
const vect<int, dim> &, const vect<CCTK_REAL, dim> &);
switch (deriv_order) {
case 2: {
switch (diss_order) {
case 3: {
calc_diss = &Derivs::calc_diss<2>;
break;
}
case 4:
case 6: {
case 5: {
calc_diss = &Derivs::calc_diss<4>;
break;
}
case 7: {
calc_diss = &Derivs::calc_diss<6>;
break;
}
case 9: {
calc_diss = &Derivs::calc_diss<8>;
break;
}
default:
assert(0);
}
Expand Down

0 comments on commit 4da3f80

Please sign in to comment.