Skip to content

Commit

Permalink
KrancThorn.m: Add IntParameters from thorn options into each calculation
Browse files Browse the repository at this point in the history
This is needed for determining the stencil size in some cases, where
only the calculation is available.
  • Loading branch information
ianhinder committed Jan 15, 2015
1 parent 607e2f4 commit 7aff8b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/CodeGen/Calculation.m
Expand Up @@ -407,7 +407,7 @@

allowedKeys = {BodyFunction, CallerFunction, ExecuteOn,
GFAccessFunction, Groups, Implementation, InitFDVariables,
LoopFunction, MacroPointer, Name, ODEGroups, Parameters,
LoopFunction, MacroPointer, Name, ODEGroups, Parameters, IntParameters,
PartialDerivatives, PreDefinitions, Schedule,Equations,
Shorthands, ConditionalOnKeyword, Before, After,
ConditionalOnTextuals, Where, ConditionalOnKeywords,
Expand Down
5 changes: 5 additions & 0 deletions Tools/CodeGen/KrancThorn.m
Expand Up @@ -224,6 +224,11 @@ Thorn generation (main entry point for non-tensorial thorns)
calcs = Map[Append[#, PartialDerivatives -> GetObjectField[c, "PartialDerivatives"]] &, calcs];
calcs = Map[Append[#, ThornName -> GetObjectField[c, "Name"]] &, calcs];

(* TODO: Replace this with the parameter database, and change
the code in CalculationStencilSize to get the list of integer
parameters from the parameter database *)
calcs = Map[Append[#, IntParameters -> OptionValue[IntParameters]] &, calcs];

SetObjectField[c, "Calculations", calcs]];

(* ------------------------------------------------------------------------
Expand Down

0 comments on commit 7aff8b2

Please sign in to comment.