Skip to content

Commit

Permalink
Put inherited parameters in Chemora.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmkoppelman committed Aug 18, 2017
1 parent 14a5430 commit 00ce49d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tools/CodeGen/Kranc.m
Expand Up @@ -23,6 +23,10 @@

BeginPackage["Kranc`"];

(* Param.m *)

{ usedParameters };

(* CodeGen.m *)

{INV, SQR, CUB, QAD, ScalarINV, ScalarSQR, ScalarCUB, ScalarQAD,
Expand Down
5 changes: 5 additions & 0 deletions Tools/CodeGen/KrancThorn.m
Expand Up @@ -438,6 +438,11 @@ Thorn generation (main entry point for non-tensorial thorns)
" set_parameter(" <> chemoraQuote[lookup[#,Name]]
<> ", \"CCTK_REAL\");\n" &
/@ lookup[GetObjectField[c,"Parameters"],"Reals"] ]
<> StringJoin[
" set_parameter(" <> chemoraQuote[lookup[#,Name]]
<> ", \"" <> lookup[#,Type] <> "\");\n" &
/@ Join @@ ( lookupDefault[#, UsedParameters, {}]&
/@ usedParameters[GetObjectField[c,"Parameters"],opts] ) ]
<> lookup[#,ChemoraContents] &,
Select[ GetObjectField[c, "Calculations"],
CalculationOnDevice[#] &] ] ]
Expand Down

0 comments on commit 00ce49d

Please sign in to comment.