aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2013-09-12 14:04:55 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2013-09-12 14:04:55 +0200
commit539804b61c2e8996c843313d1c10f48640eb2ce7 (patch)
tree061caa92c875fd38a06f21e894d5a1df00e1232f /Tools
parentec87414a06d535cb244184192bef38f2d82692af (diff)
KrancThorn.m: Localise pDefs variable
Diffstat (limited to 'Tools')
-rw-r--r--Tools/CodeGen/KrancThorn.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m
index c19d063..73740dd 100644
--- a/Tools/CodeGen/KrancThorn.m
+++ b/Tools/CodeGen/KrancThorn.m
@@ -72,7 +72,7 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[
evolvedODEGroups, nonevolvedODEGroups,
evolvedODEGroupDefinitions, rhsODEGroups,
boundarySources, reflectionSymmetries,
- pDefs, consCalcs, consCalcsIn, consGroups, cakernel,
+ consCalcs, consCalcsIn, consGroups, cakernel,
sources = {}},
InfoMessage[Terse, "Processing arguments to CreateKrancThorn"];
@@ -341,11 +341,12 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[
------------------------------------------------------------------------ *)
Module[
- {diffHeader},
+ {diffHeader, pDefs},
InfoMessage[Terse, "Creating differencing header file"];
{pDefs, diffHeader} = CreateDifferencingHeader[
partialDerivs, OptionValue[ZeroDimensions],
OptionValue[UseVectors], OptionValue[IntParameters]];
+ calcs = Map[Join[#, {PreDefinitions -> pDefs}] &, calcs];
diffHeader = Join[
If[OptionValue[UseVectors] && ! OptionValue[UseOpenCL],
{"#include <assert.h>\n",
@@ -360,7 +361,6 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[
Add predefinitions to calculations
------------------------------------------------------------------------ *)
- calcs = Map[Join[#, {PreDefinitions -> pDefs}] &, calcs];
(* ------------------------------------------------------------------------
Create calculation source files