Skip to content

Commit

Permalink
Wave example: Add generated thorn
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Dec 15, 2011
1 parent bf4d0bb commit 5a6220b
Show file tree
Hide file tree
Showing 17 changed files with 1,912 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Examples/Wave/configuration.ccl
@@ -0,0 +1,3 @@
# File produced by Kranc

REQUIRES GenericFD
63 changes: 63 additions & 0 deletions Examples/Wave/interface.ccl
@@ -0,0 +1,63 @@
# File produced by Kranc

implements: Wave

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 errors type=GF timelevels=3 tags=''
{
phiError,
piError
} "errors"

public:
CCTK_REAL exact type=GF timelevels=3 tags=''
{
phiExact,
piExact
} "exact"

public:
CCTK_REAL norms type=GF timelevels=3 tags=''
{
VL2,
VDP,
EL2
} "norms"

public:
CCTK_REAL evolved type=GF timelevels=3 tags=''
{
phi,
pi
} "evolved"

public:
CCTK_REAL evolvedrhs type=GF timelevels=3 tags=''
{
phirhs,
pirhs
} "evolvedrhs"
283 changes: 283 additions & 0 deletions Examples/Wave/param.ccl
@@ -0,0 +1,283 @@
# 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 periodicity "periodicity"
{
"*:*" :: ""
} 1

restricted:
CCTK_REAL amplitude "amplitude"
{
"*:*" :: ""
} 1

restricted:
CCTK_REAL n1 "n1"
{
"*:*" :: ""
} 1

restricted:
CCTK_REAL n2 "n2"
{
"*:*" :: ""
} 0

restricted:
CCTK_REAL n3 "n3"
{
"*:*" :: ""
} 0

restricted:
CCTK_REAL nSigma "nSigma"
{
"*:*" :: ""
} 0

restricted:
CCTK_REAL r0 "r0"
{
"*:*" :: ""
} 0

restricted:
CCTK_REAL t0 "t0"
{
"*:*" :: ""
} 0

restricted:
CCTK_REAL x0 "x0"
{
"*:*" :: ""
} 0

restricted:
CCTK_REAL hlleAlpha "hlleAlpha"
{
"*:*" :: ""
} 0

private:
KEYWORD initial_data "initial_data"
{
"gaussian" :: "gaussian"
"sine" :: "sine"
} "gaussian"

private:
KEYWORD boundary_condition "boundary_condition"
{
"none" :: "none"
"radiative" :: "radiative"
} "radiative"

restricted:
CCTK_INT Wave_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 wave_exact_sine_calc_every "wave_exact_sine_calc_every" STEERABLE=ALWAYS
{
*:* :: ""
} 1

restricted:
CCTK_INT wave_exact_gaussian_calc_every "wave_exact_gaussian_calc_every" STEERABLE=ALWAYS
{
*:* :: ""
} 1

restricted:
CCTK_INT wave_import_exact_calc_every "wave_import_exact_calc_every" STEERABLE=ALWAYS
{
*:* :: ""
} 1

restricted:
CCTK_INT wave_evolve_calc_every "wave_evolve_calc_every" STEERABLE=ALWAYS
{
*:* :: ""
} 1

restricted:
CCTK_INT wave_calc_errors_calc_every "wave_calc_errors_calc_every" STEERABLE=ALWAYS
{
*:* :: ""
} 1

restricted:
CCTK_INT wave_calc_norm_calc_every "wave_calc_norm_calc_every" STEERABLE=ALWAYS
{
*:* :: ""
} 1

restricted:
CCTK_INT wave_boundary_calc_every "wave_boundary_calc_every" STEERABLE=ALWAYS
{
*:* :: ""
} 1

restricted:
CCTK_INT wave_exact_sine_calc_offset "wave_exact_sine_calc_offset" STEERABLE=ALWAYS
{
*:* :: ""
} 0

restricted:
CCTK_INT wave_exact_gaussian_calc_offset "wave_exact_gaussian_calc_offset" STEERABLE=ALWAYS
{
*:* :: ""
} 0

restricted:
CCTK_INT wave_import_exact_calc_offset "wave_import_exact_calc_offset" STEERABLE=ALWAYS
{
*:* :: ""
} 0

restricted:
CCTK_INT wave_evolve_calc_offset "wave_evolve_calc_offset" STEERABLE=ALWAYS
{
*:* :: ""
} 0

restricted:
CCTK_INT wave_calc_errors_calc_offset "wave_calc_errors_calc_offset" STEERABLE=ALWAYS
{
*:* :: ""
} 0

restricted:
CCTK_INT wave_calc_norm_calc_offset "wave_calc_norm_calc_offset" STEERABLE=ALWAYS
{
*:* :: ""
} 0

restricted:
CCTK_INT wave_boundary_calc_offset "wave_boundary_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_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_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_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_bound_scalar "Dirichlet boundary value" STEERABLE=ALWAYS
{
"*:*" :: "unrestricted"
} 0.

0 comments on commit 5a6220b

Please sign in to comment.