Skip to content

Commit

Permalink
Z4c: Fixes suggested in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Nov 28, 2023
1 parent 587f907 commit 0842024
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 56 deletions.
2 changes: 0 additions & 2 deletions NewRadX/configuration.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ REQUIRES Loop
PROVIDES NewRadX
{
}

REQUIRES NewRadX
44 changes: 42 additions & 2 deletions Z4c/param.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,46 @@ CCTK_REAL epsdiss "Dissipation coefficient <arXiv:gr-qc/0610128>" STEERABLE=alwa
} 0.32

KEYWORD boundary_conditions "boundary conditions"{
"radiative" :: "radiative boundary conditions using NewRadX"
"CarpetX" :: "use CarpetX default boundary conditions"
"NewRadX" :: "radiative boundary conditions using NewRadX"
"CarpetX" :: "use CarpetX default boundary conditions"
} "CarpetX"

CCTK_INT n_chi "n power of outgoing boundary r^n fall off rate for chi"
{
0:2 :: "1 is reasonable"
} 1

CCTK_INT n_gammat "n power of outgoing boundary r^n fall off rate for gammat_ij"
{
0:2 :: "1 is reasonable"
} 1

CCTK_INT n_Kh "n power of outgoing boundary r^n fall off rate for Kh"
{
0:2 :: "Maybe 1?"
} 1

CCTK_INT n_At "n power of outgoing boundary r^n fall off rate for At_ij"
{
0:2 :: "Maybe 1?"
} 1

CCTK_INT n_Gamt "n power of outgoing boundary r^n fall off rate for Gamt^i"
{
0:2 :: "Maybe 1?"
} 1

CCTK_INT n_Theta "n power of outgoing boundary r^n fall off rate for Theta"
{
0:2 :: "Maybe 1?"
} 1

CCTK_INT n_alphaG "n power of outgoing boundary r^n fall off rate for alpha"
{
0:2 :: "1 is my guess"
} 1

CCTK_INT n_betaG "n power of outgoing boundary r^n fall off rate for beta"
{
0:2 :: "1 is my guess"
} 1
6 changes: 3 additions & 3 deletions Z4c/schedule.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ SCHEDULE Z4c_RHS IN Z4c_RHSGroup
SYNC: betaG_rhs
} "Calculate Z4c RHS"

if (CCTK_Equals(boundary_conditions, "radiative")) {
SCHEDULE apply_boundary_conditions IN Z4c_RHSGroup AFTER Z4c_RHS
if (CCTK_Equals(boundary_conditions, "NewRadX")) {
SCHEDULE Z4c_apply_newradx_boundary_conditions IN Z4c_RHSGroup AFTER Z4c_RHS
{
LANG: C
READS: chi(everywhere)
Expand All @@ -285,5 +285,5 @@ if (CCTK_Equals(boundary_conditions, "radiative")) {
WRITES: Theta_rhs(interior)
WRITES: alphaG_rhs(interior)
WRITES: betaG_rhs(interior)
} "Apply NewRad boundary conditions to Z4c RHS variables"
} "Apply radiative boundary conditions to Z4c RHS variables using NewRadX"
}
48 changes: 24 additions & 24 deletions Z4c/src/apply_newrad.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ using namespace NewRadX;

namespace Z4c {

extern "C" void apply_boundary_conditions(CCTK_ARGUMENTS) {
DECLARE_CCTK_ARGUMENTSX_apply_boundary_conditions;
extern "C" void Z4c_apply_newradx_boundary_conditions(CCTK_ARGUMENTS) {
DECLARE_CCTK_ARGUMENTSX_Z4c_apply_newradx_boundary_conditions;
DECLARE_CCTK_PARAMETERS;

NewRadX_Apply(cctkGH, chi, chi_rhs, 1, 1, 1);
NewRadX_Apply(cctkGH, gammatxx, gammatxx_rhs, 1, 1, 1);
NewRadX_Apply(cctkGH, gammatxy, gammatxy_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, gammatxz, gammatxz_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, gammatyy, gammatyy_rhs, 1, 1, 1);
NewRadX_Apply(cctkGH, gammatyz, gammatyz_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, gammatzz, gammatzz_rhs, 1, 1, 1);
NewRadX_Apply(cctkGH, Kh, Kh_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, Atxx, Atxx_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, Atxy, Atxy_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, Atxz, Atxz_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, Atyy, Atyy_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, Atyz, Atyz_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, Atzz, Atzz_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, Gamtx, Gamtx_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, Gamty, Gamty_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, Gamtz, Gamtz_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, Theta, Theta_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, alphaG, alphaG_rhs, 1, 1, 1);
NewRadX_Apply(cctkGH, betaGx, betaGx_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, betaGy, betaGy_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, betaGz, betaGz_rhs, 0, 1, 1);
NewRadX_Apply(cctkGH, chi, chi_rhs, 1, 1, n_chi);
NewRadX_Apply(cctkGH, gammatxx, gammatxx_rhs, 1, 1, n_gammat);
NewRadX_Apply(cctkGH, gammatxy, gammatxy_rhs, 0, 1, n_gammat);
NewRadX_Apply(cctkGH, gammatxz, gammatxz_rhs, 0, 1, n_gammat);
NewRadX_Apply(cctkGH, gammatyy, gammatyy_rhs, 1, 1, n_gammat);
NewRadX_Apply(cctkGH, gammatyz, gammatyz_rhs, 0, 1, n_gammat);
NewRadX_Apply(cctkGH, gammatzz, gammatzz_rhs, 1, 1, n_gammat);
NewRadX_Apply(cctkGH, Kh, Kh_rhs, 0, 1, n_Kh);
NewRadX_Apply(cctkGH, Atxx, Atxx_rhs, 0, 1, n_At);
NewRadX_Apply(cctkGH, Atxy, Atxy_rhs, 0, 1, n_At);
NewRadX_Apply(cctkGH, Atxz, Atxz_rhs, 0, 1, n_At);
NewRadX_Apply(cctkGH, Atyy, Atyy_rhs, 0, 1, n_At);
NewRadX_Apply(cctkGH, Atyz, Atyz_rhs, 0, 1, n_At);
NewRadX_Apply(cctkGH, Atzz, Atzz_rhs, 0, 1, n_At);
NewRadX_Apply(cctkGH, Gamtx, Gamtx_rhs, 0, 1, n_Gamt);
NewRadX_Apply(cctkGH, Gamty, Gamty_rhs, 0, 1, n_Gamt);
NewRadX_Apply(cctkGH, Gamtz, Gamtz_rhs, 0, 1, n_Gamt);
NewRadX_Apply(cctkGH, Theta, Theta_rhs, 0, 1, n_Theta);
NewRadX_Apply(cctkGH, alphaG, alphaG_rhs, 1, 1, n_alphaG);
NewRadX_Apply(cctkGH, betaGx, betaGx_rhs, 0, 1, n_betaG);
NewRadX_Apply(cctkGH, betaGy, betaGy_rhs, 0, 1, n_betaG);
NewRadX_Apply(cctkGH, betaGz, betaGz_rhs, 0, 1, n_betaG);
}

} // namespace Z4c
2 changes: 1 addition & 1 deletion Z4c/test/qc0.par
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Z4c::calc_constraints = yes
Z4c::chi_floor = 1.0e-6
Z4c::alphaG_floor = 1.0e-8
Z4c::epsdiss = 0.32
Z4c::boundary_conditions = "radiative"
Z4c::boundary_conditions = "NewRadX"

IO::out_dir = $parfile
IO::out_every = 1
Expand Down
19 changes: 0 additions & 19 deletions Z4c/test/qc0/performance.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions Z4c/test/test.ccl

This file was deleted.

0 comments on commit 0842024

Please sign in to comment.