Skip to content

Commit

Permalink
Generate SimpleWaveScript
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Jan 28, 2012
1 parent de81a4c commit 84f1b6a
Show file tree
Hide file tree
Showing 13 changed files with 1,318 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Examples/SimpleWaveScript/configuration.ccl
@@ -0,0 +1,6 @@
# File produced by Kranc

REQUIRES GenericFD
OPTIONAL LoopControl
{
}
52 changes: 52 additions & 0 deletions Examples/SimpleWaveScript/interface.ccl
@@ -0,0 +1,52 @@
# File produced by Kranc

implements: SimpleWaveScript

inherits: Grid GenericFD Boundary



USES INCLUDE: GenericFD.h
USES INCLUDE: Symmetry.h
USES INCLUDE: sbp_calc_coeffs.h
USES INCLUDE: Boundary.h
USES INCLUDE: loopcontrol.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 phi_group type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=0'
{
phi
} "phi_group"

public:
CCTK_REAL pi_group type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=0'
{
pi
} "pi_group"

public:
CCTK_REAL phi_grouprhs type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=0'
{
phirhs
} "phi_grouprhs"

public:
CCTK_REAL pi_grouprhs type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=0'
{
pirhs
} "pi_grouprhs"
198 changes: 198 additions & 0 deletions Examples/SimpleWaveScript/param.ccl
@@ -0,0 +1,198 @@
# File produced by Kranc


shares: GenericFD



shares: MethodOfLines

USES CCTK_INT MoL_Num_Evolved_Vars
USES CCTK_INT MoL_Num_ArrayEvolved_Vars

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

restricted:
CCTK_INT fdOrder "fdOrder"
{
*:* :: ""
} 2

restricted:
CCTK_INT SimpleWaveScript_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 SimpleWaveScript_MaxNumArrayEvolvedVars "Number of Array evolved variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_ArrayEvolved_Vars STEERABLE=RECOVER
{
0:0 :: "Number of Array evolved variables used by this thorn"
} 0

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 other_timelevels "Number of active timelevels for non-evolved grid functions" STEERABLE=RECOVER
{
0:3 :: ""
} 1

restricted:
CCTK_INT initial_sine_calc_calc_every "initial_sine_calc_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_calc_offset "initial_sine_calc_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 phi_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:
KEYWORD pi_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 phi_group_bound_speed "characteristic speed at boundary" STEERABLE=ALWAYS
{
"0:*" :: "outgoing characteristic speed > 0"
} 1.

private:
CCTK_REAL pi_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 phi_group_bound_limit "limit value for r -> infinity" STEERABLE=ALWAYS
{
"*:*" :: "value of limit value is unrestricted"
} 0.

private:
CCTK_REAL pi_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 phi_group_bound_scalar "Dirichlet boundary value" STEERABLE=ALWAYS
{
"*:*" :: "unrestricted"
} 0.

private:
CCTK_REAL pi_group_bound_scalar "Dirichlet boundary value" STEERABLE=ALWAYS
{
"*:*" :: "unrestricted"
} 0.

101 changes: 101 additions & 0 deletions Examples/SimpleWaveScript/schedule.ccl
@@ -0,0 +1,101 @@
# File produced by Kranc


if (timelevels == 1)
{
STORAGE: phi_group[1]
}
if (timelevels == 2)
{
STORAGE: phi_group[2]
}
if (timelevels == 3)
{
STORAGE: phi_group[3]
}

if (timelevels == 1)
{
STORAGE: pi_group[1]
}
if (timelevels == 2)
{
STORAGE: pi_group[2]
}
if (timelevels == 3)
{
STORAGE: pi_group[3]
}

if (rhs_timelevels == 1)
{
STORAGE: phi_grouprhs[1]
}
if (rhs_timelevels == 2)
{
STORAGE: phi_grouprhs[2]
}
if (rhs_timelevels == 3)
{
STORAGE: phi_grouprhs[3]
}

if (rhs_timelevels == 1)
{
STORAGE: pi_grouprhs[1]
}
if (rhs_timelevels == 2)
{
STORAGE: pi_grouprhs[2]
}
if (rhs_timelevels == 3)
{
STORAGE: pi_grouprhs[3]
}

schedule SimpleWaveScript_Startup at STARTUP
{
LANG: C
OPTIONS: meta
} "create banner"

schedule SimpleWaveScript_RegisterVars in MoL_Register
{
LANG: C
OPTIONS: meta
} "Register Variables for MoL"

schedule SimpleWaveScript_RegisterSymmetries in SymmetryRegister
{
LANG: C
OPTIONS: meta
} "register symmetries"

schedule initial_sine_calc at initial
{
LANG: C
} "initial_sine_calc"

schedule calc_rhs in mol_calcrhs
{
LANG: C
} "calc_rhs"

schedule SimpleWaveScript_SelectBoundConds in MoL_PostStep
{
LANG: C
OPTIONS: level
SYNC: phi_group
SYNC: pi_group
} "select boundary conditions"

schedule SimpleWaveScript_CheckBoundaries at BASEGRID
{
LANG: C
OPTIONS: meta
} "check boundaries treatment"

schedule group ApplyBCs as SimpleWaveScript_ApplyBCs in MoL_PostStep after SimpleWaveScript_SelectBoundConds
{
# no language specified
} "Apply boundary conditions controlled by thorn Boundary"

0 comments on commit 84f1b6a

Please sign in to comment.