Skip to content

Commit

Permalink
KrancThorn.m: Move computation of allParams to before it is used
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Jan 31, 2012
1 parent 0e23b01 commit 864ad98
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Tools/CodeGen/KrancThorn.m
Expand Up @@ -197,6 +197,13 @@ Thorn generation (main entry point for non-tensorial thorns)
rhsGroups = Map[groupName, rhsGroupDefinitions];
rhsODEGroups = Map[groupName, rhsODEGroupDefinitions];

(* Construct a source file for each calculation *)
allParams = Join[Map[ParamName, realParamDefs],
Map[ParamName, intParamDefs],
Map[unqualifiedName, inheritedRealParams],
Map[unqualifiedName, inheritedIntParams],
Map[unqualifiedName, inheritedKeywordParams]];

calcs = Map[Join[#,
{ODEGroups -> Join[odeGroups, rhsODEGroups],
Parameters -> allParams,
Expand Down Expand Up @@ -272,12 +279,6 @@ Thorn generation (main entry point for non-tensorial thorns)

ext = CodeGenC`SOURCESUFFIX;

(* Construct a source file for each calculation *)
allParams = Join[Map[ParamName, realParamDefs],
Map[ParamName, intParamDefs],
Map[unqualifiedName, inheritedRealParams],
Map[unqualifiedName, inheritedIntParams],
Map[unqualifiedName, inheritedKeywordParams]];

InfoMessage[Terse, "Creating calculation source files"];

Expand All @@ -294,8 +295,6 @@ Thorn generation (main entry point for non-tensorial thorns)
If[!OptionValue[UseCaKernel], calcFilenames, {}],
Map[lookup[#, Filename] &, boundarySources]]];

If[OptionValue[UseCaKernel], make = {make, CaKernelEpilogue[]}];

(* Put all the above together and generate the Cactus thorn *)
thornspec = {Name -> thornName,
Directory -> parentDirectory,
Expand Down

0 comments on commit 864ad98

Please sign in to comment.