Skip to content

Commit

Permalink
Add dt variable for use in calculations
Browse files Browse the repository at this point in the history
This adds to the dx, dy, dz that are already available.
  • Loading branch information
eschnett authored and ianhinder committed May 27, 2011
1 parent f12da40 commit 58a28be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Tools/CodeGen/CodeGen.m
Expand Up @@ -463,11 +463,13 @@
""],
DeclareAssignVariable[DataType[], "dx", "ToReal(CCTK_DELTA_SPACE(0))"],
DeclareAssignVariable[DataType[], "dy", "ToReal(CCTK_DELTA_SPACE(1))"],
DeclareAssignVariable[DataType[], "dz", "ToReal(CCTK_DELTA_SPACE(2))"]
DeclareAssignVariable[DataType[], "dz", "ToReal(CCTK_DELTA_SPACE(2))"],
DeclareAssignVariable[DataType[], "dt", "ToReal(CCTK_DELTA_TIME)"]
};

InitialiseFDSpacingVariablesFortran[] :=
{
AssignVariable["dt", "CCTK_DELTA_TIME"],
AssignVariable["dx", "CCTK_DELTA_SPACE(1)"],
AssignVariable["dy", "CCTK_DELTA_SPACE(2)"],
AssignVariable["dz", "CCTK_DELTA_SPACE(3)"]
Expand Down
4 changes: 2 additions & 2 deletions Tools/CodeGen/Kranc.m
Expand Up @@ -25,7 +25,7 @@
{INV, SQR, CUB, QAD, IfThen, ToReal, sqrt, exp, pow, fmax, fmin,
kmadd, kmsub, knmadd, knmsub, kpos, kneg, kadd, ksub, kmul, kdiv,
kfabs, kfmax, kfmin, ksqrt, kexp, klog, kpow,
dir1, dir2, dir3, dx, dy, dz,
dir1, dir2, dir3, dt, dx, dy, dz,
khalf, kthird, ktwothird, kfourthird, keightthird};

(* Helpers.m *)
Expand All @@ -38,7 +38,7 @@
LoopPreIncludes, GroupImplementations, PartialDerivatives, NoSimplify,
Boundary, Interior, InteriorNoSync, Where, AddToStencilWidth,
Everywhere, normal1, normal2, normal3, INV, SQR, CUB, QAD, dot, pow,
exp, dx, dy, dz, idx, idy, idz}
exp, dt, dx, dy, dz, idx, idy, idz}

{ConditionalOnKeyword, ConditionalOnKeywords, CollectList, Interior,
InteriorNoSync, Boundary, BoundaryWithGhosts, Where, PreDefinitions,
Expand Down

0 comments on commit 58a28be

Please sign in to comment.