Skip to content

Commit f507fd7

Browse files
authored
Merge pull request #60 from EinsteinToolkit/eschnett/kerrschild
KerrSchildX: New thorn
2 parents 5ecd399 + 92e3374 commit f507fd7

File tree

9 files changed

+513
-2
lines changed

9 files changed

+513
-2
lines changed

KerrSchildX/README

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Cactus Code Thorn KerrSchildX
2+
Author(s) : Erik Schnetter <[email protected]>
3+
Maintainer(s): Erik Schnetter <[email protected]>
4+
Licence : LGPL
5+
--------------------------------------------------------------------------
6+
7+
1. Purpose
8+
9+
Set up Kerr-Schild initial conditions

KerrSchildX/configuration.ccl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Configuration definition for thorn KerrSchildX
2+
3+
REQUIRES Arith Loop

KerrSchildX/interface.ccl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Interface definition for thorn KerrSchildX
2+
3+
IMPLEMENTS: KerrSchildX
4+
5+
INHERITS: ADMBaseX CoordinatesX

KerrSchildX/par/kerrschild.par

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
ActiveThorns = "
2+
ADMBaseX
3+
CarpetX
4+
CoordinatesX
5+
Formaline
6+
IOUtil
7+
KerrSchildX
8+
"
9+
10+
Cactus::cctk_show_schedule = yes # no
11+
CarpetX::verbose = no
12+
13+
Cactus::presync_mode = "mixed-error"
14+
15+
CarpetX::xmin = -4.0
16+
CarpetX::ymin = -4.0
17+
CarpetX::zmin = -4.0
18+
19+
CarpetX::xmax = +4.0
20+
CarpetX::ymax = +4.0
21+
CarpetX::zmax = +4.0
22+
23+
CarpetX::ncells_x = 16
24+
CarpetX::ncells_y = 16
25+
CarpetX::ncells_z = 16
26+
27+
CarpetX::blocking_factor_x = 16
28+
CarpetX::blocking_factor_y = 16
29+
CarpetX::blocking_factor_z = 16
30+
31+
ADMBaseX::initial_data = "kerrschildx"
32+
ADMBaseX::initial_lapse = "kerrschildx"
33+
ADMBaseX::initial_shift = "kerrschildx"
34+
ADMBaseX::initial_dtlapse = "kerrschildx"
35+
ADMBaseX::initial_dtshift = "kerrschildx"
36+
37+
Cactus::cctk_itlast = 0
38+
39+
IO::out_dir = $parfile
40+
CarpetX::out_tsv_every = 1
41+
CarpetX::out_tsv_vars = "ADMBaseX::metric ADMBaseX::curv ADMBaseX::lapse ADMBaseX::shift ADMBaseX::dtlapse ADMBaseX::dtshift"
42+
CarpetX::out_silo_every = 1
43+
CarpetX::out_silo_vars = "ADMBaseX::metric ADMBaseX::curv ADMBaseX::lapse ADMBaseX::shift ADMBaseX::dtlapse ADMBaseX::dtshift"

KerrSchildX/param.ccl

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Parameter definitions for thorn KerrSchild
2+
3+
SHARES: ADMBaseX
4+
5+
EXTENDS KEYWORD initial_data
6+
{
7+
"kerrschildx" :: "Kerr-Schild black hole"
8+
}
9+
10+
EXTENDS KEYWORD initial_lapse
11+
{
12+
"kerrschildx" :: "Kerr-Schild black hole"
13+
}
14+
15+
EXTENDS KEYWORD initial_shift
16+
{
17+
"kerrschildx" :: "Kerr-Schild black hole"
18+
}
19+
20+
EXTENDS KEYWORD initial_dtlapse
21+
{
22+
"kerrschildx" :: "Kerr-Schild black hole"
23+
}
24+
25+
EXTENDS KEYWORD initial_dtshift
26+
{
27+
"kerrschildx" :: "Kerr-Schild black hole"
28+
}
29+
30+
31+
32+
PRIVATE:
33+
34+
CCTK_REAL mass "Mass"
35+
{
36+
0.0:* :: ""
37+
} 1.0
38+
39+
CCTK_REAL spin "Spin parameter (with dimension `mass`)"
40+
{
41+
*:* :: "Must be -mass < spin < mass"
42+
} 0.0
43+
44+
CCTK_REAL epsilon "Avoid division by zero"
45+
{
46+
0:* :: ""
47+
} 1.0e-8

KerrSchildX/schedule.ccl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Schedule definitions for thorn KerrSchild
2+
3+
if (CCTK_Equals(initial_data, "kerrschildx") ||
4+
CCTK_Equals(initial_lapse, "kerrschildx") ||
5+
CCTK_Equals(initial_shift, "kerrschildx") ||
6+
CCTK_Equals(initial_dtlapse, "kerrschildx") ||
7+
CCTK_Equals(initial_dtshift, "kerrschildx"))
8+
{
9+
SCHEDULE KerrSchildX_ParamCheck AT paramcheck
10+
{
11+
LANG: C
12+
OPTIONS: global
13+
} "Check Kerr-Schild parameters"
14+
15+
SCHEDULE KerrSchildX_InitialData IN ADMBaseX_SetADMVars
16+
{
17+
LANG: C
18+
READS: CoordinatesX::vertex_coords(everywhere)
19+
WRITES: ADMBaseX::metric(everywhere)
20+
WRITES: ADMBaseX::curv(everywhere)
21+
WRITES: ADMBaseX::lapse(everywhere)
22+
WRITES: ADMBaseX::shift(everywhere)
23+
WRITES: ADMBaseX::dtlapse(everywhere)
24+
WRITES: ADMBaseX::dtshift(everywhere)
25+
} "Create Kerr-Schild initial data"
26+
}

0 commit comments

Comments
 (0)