Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SimpleWave example: Add generated thorn
- Loading branch information
Showing
12 changed files
with
794 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# File produced by Kranc | ||
|
||
REQUIRES GenericFD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# File produced by Kranc | ||
|
||
implements: SimpleWave | ||
|
||
inherits: Grid GenericFD Boundary | ||
|
||
|
||
|
||
USES INCLUDE: GenericFD.h | ||
USES INCLUDE: Symmetry.h | ||
USES INCLUDE: sbp_calc_coeffs.h | ||
USES INCLUDE: Boundary.h | ||
|
||
CCTK_INT FUNCTION MoLRegisterEvolved(CCTK_INT IN EvolvedIndex, CCTK_INT IN RHSIndex) | ||
USES FUNCTION MoLRegisterEvolved | ||
|
||
SUBROUTINE Diff_coeff(CCTK_POINTER_TO_CONST IN cctkGH, CCTK_INT IN dir, CCTK_INT IN nsize, CCTK_INT OUT ARRAY imin, CCTK_INT OUT ARRAY imax, CCTK_REAL OUT ARRAY q, CCTK_INT IN table_handle) | ||
USES FUNCTION Diff_coeff | ||
|
||
CCTK_INT FUNCTION MultiPatch_GetMap(CCTK_POINTER_TO_CONST IN cctkGH) | ||
USES FUNCTION MultiPatch_GetMap | ||
|
||
CCTK_INT FUNCTION Boundary_SelectGroupForBC(CCTK_POINTER_TO_CONST IN GH, CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, CCTK_STRING IN group_name, CCTK_STRING IN bc_name) | ||
USES FUNCTION Boundary_SelectGroupForBC | ||
|
||
CCTK_INT FUNCTION Boundary_SelectVarForBC(CCTK_POINTER_TO_CONST IN GH, CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, CCTK_STRING IN var_name, CCTK_STRING IN bc_name) | ||
USES FUNCTION Boundary_SelectVarForBC | ||
|
||
public: | ||
CCTK_REAL evolved_group type=GF timelevels=3 tags='' | ||
{ | ||
phi, | ||
pi | ||
} "evolved_group" | ||
|
||
public: | ||
CCTK_REAL evolved_grouprhs type=GF timelevels=3 tags='' | ||
{ | ||
phirhs, | ||
pirhs | ||
} "evolved_grouprhs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
# File produced by Kranc | ||
|
||
|
||
shares: GenericFD | ||
|
||
|
||
|
||
shares: MethodOfLines | ||
|
||
USES CCTK_INT MoL_Num_Evolved_Vars | ||
|
||
restricted: | ||
CCTK_INT verbose "verbose" STEERABLE=ALWAYS | ||
{ | ||
*:* :: "" | ||
} 0 | ||
|
||
restricted: | ||
CCTK_REAL hlleAlpha "hlleAlpha" | ||
{ | ||
"*:*" :: "" | ||
} 0 | ||
|
||
restricted: | ||
CCTK_INT SimpleWave_MaxNumEvolvedVars "Number of evolved variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Evolved_Vars STEERABLE=RECOVER | ||
{ | ||
2:2 :: "Number of evolved variables used by this thorn" | ||
} 2 | ||
|
||
restricted: | ||
CCTK_INT timelevels "Number of active timelevels" STEERABLE=RECOVER | ||
{ | ||
0:3 :: "" | ||
} 3 | ||
|
||
restricted: | ||
CCTK_INT rhs_timelevels "Number of active RHS timelevels" STEERABLE=RECOVER | ||
{ | ||
0:3 :: "" | ||
} 1 | ||
|
||
restricted: | ||
CCTK_INT initial_sine_calc_every "initial_sine_calc_every" STEERABLE=ALWAYS | ||
{ | ||
*:* :: "" | ||
} 1 | ||
|
||
restricted: | ||
CCTK_INT calc_rhs_calc_every "calc_rhs_calc_every" STEERABLE=ALWAYS | ||
{ | ||
*:* :: "" | ||
} 1 | ||
|
||
restricted: | ||
CCTK_INT initial_sine_calc_offset "initial_sine_calc_offset" STEERABLE=ALWAYS | ||
{ | ||
*:* :: "" | ||
} 0 | ||
|
||
restricted: | ||
CCTK_INT calc_rhs_calc_offset "calc_rhs_calc_offset" STEERABLE=ALWAYS | ||
{ | ||
*:* :: "" | ||
} 0 | ||
|
||
private: | ||
KEYWORD phi_bound "Boundary condition to implement" STEERABLE=ALWAYS | ||
{ | ||
"flat" :: "Flat boundary condition" | ||
"none" :: "No boundary condition" | ||
"static" :: "Boundaries held fixed" | ||
"radiative" :: "Radiation boundary condition" | ||
"scalar" :: "Dirichlet boundary condition" | ||
"newrad" :: "Improved radiative boundary condition" | ||
"skip" :: "skip boundary condition code" | ||
} "skip" | ||
|
||
private: | ||
KEYWORD pi_bound "Boundary condition to implement" STEERABLE=ALWAYS | ||
{ | ||
"flat" :: "Flat boundary condition" | ||
"none" :: "No boundary condition" | ||
"static" :: "Boundaries held fixed" | ||
"radiative" :: "Radiation boundary condition" | ||
"scalar" :: "Dirichlet boundary condition" | ||
"newrad" :: "Improved radiative boundary condition" | ||
"skip" :: "skip boundary condition code" | ||
} "skip" | ||
|
||
private: | ||
KEYWORD evolved_group_bound "Boundary condition to implement" STEERABLE=ALWAYS | ||
{ | ||
"flat" :: "Flat boundary condition" | ||
"none" :: "No boundary condition" | ||
"static" :: "Boundaries held fixed" | ||
"radiative" :: "Radiation boundary condition" | ||
"scalar" :: "Dirichlet boundary condition" | ||
"newrad" :: "Improved radiative boundary condition" | ||
"skip" :: "skip boundary condition code" | ||
} "none" | ||
|
||
private: | ||
CCTK_REAL phi_bound_speed "characteristic speed at boundary" STEERABLE=ALWAYS | ||
{ | ||
"0:*" :: "outgoing characteristic speed > 0" | ||
} 1. | ||
|
||
private: | ||
CCTK_REAL pi_bound_speed "characteristic speed at boundary" STEERABLE=ALWAYS | ||
{ | ||
"0:*" :: "outgoing characteristic speed > 0" | ||
} 1. | ||
|
||
private: | ||
CCTK_REAL evolved_group_bound_speed "characteristic speed at boundary" STEERABLE=ALWAYS | ||
{ | ||
"0:*" :: "outgoing characteristic speed > 0" | ||
} 1. | ||
|
||
private: | ||
CCTK_REAL phi_bound_limit "limit value for r -> infinity" STEERABLE=ALWAYS | ||
{ | ||
"*:*" :: "value of limit value is unrestricted" | ||
} 0. | ||
|
||
private: | ||
CCTK_REAL pi_bound_limit "limit value for r -> infinity" STEERABLE=ALWAYS | ||
{ | ||
"*:*" :: "value of limit value is unrestricted" | ||
} 0. | ||
|
||
private: | ||
CCTK_REAL evolved_group_bound_limit "limit value for r -> infinity" STEERABLE=ALWAYS | ||
{ | ||
"*:*" :: "value of limit value is unrestricted" | ||
} 0. | ||
|
||
private: | ||
CCTK_REAL phi_bound_scalar "Dirichlet boundary value" STEERABLE=ALWAYS | ||
{ | ||
"*:*" :: "unrestricted" | ||
} 0. | ||
|
||
private: | ||
CCTK_REAL pi_bound_scalar "Dirichlet boundary value" STEERABLE=ALWAYS | ||
{ | ||
"*:*" :: "unrestricted" | ||
} 0. | ||
|
||
private: | ||
CCTK_REAL evolved_group_bound_scalar "Dirichlet boundary value" STEERABLE=ALWAYS | ||
{ | ||
"*:*" :: "unrestricted" | ||
} 0. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# File produced by Kranc | ||
|
||
|
||
if (timelevels == 1) | ||
{ | ||
STORAGE: evolved_group[1] | ||
} | ||
if (timelevels == 2) | ||
{ | ||
STORAGE: evolved_group[2] | ||
} | ||
if (timelevels == 3) | ||
{ | ||
STORAGE: evolved_group[3] | ||
} | ||
|
||
if (rhs_timelevels == 1) | ||
{ | ||
STORAGE: evolved_grouprhs[1] | ||
} | ||
if (rhs_timelevels == 2) | ||
{ | ||
STORAGE: evolved_grouprhs[2] | ||
} | ||
if (rhs_timelevels == 3) | ||
{ | ||
STORAGE: evolved_grouprhs[3] | ||
} | ||
|
||
schedule SimpleWave_Startup at STARTUP | ||
{ | ||
LANG: C | ||
OPTIONS: meta | ||
} "create banner" | ||
|
||
schedule SimpleWave_RegisterVars in MoL_Register | ||
{ | ||
LANG: C | ||
OPTIONS: meta | ||
} "Register Variables for MoL" | ||
|
||
schedule SimpleWave_RegisterSymmetries in SymmetryRegister | ||
{ | ||
LANG: C | ||
OPTIONS: meta | ||
} "register symmetries" | ||
|
||
schedule initial_sine AT INITIAL | ||
{ | ||
LANG: C | ||
} "initial_sine" | ||
|
||
schedule calc_rhs in MoL_CalcRHS | ||
{ | ||
LANG: C | ||
} "calc_rhs" | ||
|
||
schedule SimpleWave_SelectBoundConds in MoL_PostStep | ||
{ | ||
LANG: C | ||
OPTIONS: level | ||
SYNC: evolved_group | ||
} "select boundary conditions" | ||
|
||
schedule SimpleWave_CheckBoundaries at BASEGRID | ||
{ | ||
LANG: C | ||
OPTIONS: meta | ||
} "check boundaries treatment" | ||
|
||
schedule group ApplyBCs as SimpleWave_ApplyBCs in MoL_PostStep after SimpleWave_SelectBoundConds | ||
{ | ||
# no language specified | ||
} "Apply boundary conditions controlled by thorn Boundary" |
Oops, something went wrong.