diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-12 10:46:20 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-12 10:46:20 +0200 |
commit | 9df401694aea2bd64a7fd5e5beca2f52f3fdacf9 (patch) | |
tree | 90f5389386073bbc206546f5405e8b3543eeb035 | |
parent | 587a1b8816cf603ce3ee2705de9d660a18a7e513 (diff) |
KrancThorn.m: Create a "sources" accumulator list and use it for the MoL registration source file
-rw-r--r-- | Tools/CodeGen/KrancThorn.m | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m index 30d3e2a..68bafcc 100644 --- a/Tools/CodeGen/KrancThorn.m +++ b/Tools/CodeGen/KrancThorn.m @@ -73,7 +73,7 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ evolvedODEGroupDefinitions, rhsODEGroupDefinitions, rhsODEGroups, boundarySources, reflectionSymmetries, pDefs, consCalcs, consCalcsIn, consGroups, cakernel, - hostCals, deviceCalcs, incFilenames}, + hostCals, deviceCalcs, incFilenames, sources = {}}, InfoMessage[Terse, "Processing arguments to CreateKrancThorn"]; @@ -241,7 +241,12 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ InfoMessage[Terse, "Creating MoL registration file"]; (* TODO: only do this for thorns with evolved variables *) - molregister = CreateKrancMoLRegister[evolvedGroups, nonevolvedGroups, evolvedODEGroups, nonevolvedODEGroups, groups, implementation, thornName]; + + AppendTo[sources, + {Filename -> "RegisterMoL.cc", + Contents -> CreateKrancMoLRegister[ + evolvedGroups, nonevolvedGroups, evolvedODEGroups, + nonevolvedODEGroups, groups, implementation, thornName]}]; (* ------------------------------------------------------------------------ Split calculations @@ -383,9 +388,8 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ Param -> param, CaKernel -> cakernel, Makefile -> make, - Sources -> Join[{ + Sources -> Join[sources, { {Filename -> "Startup.cc", Contents -> startup}, - {Filename -> "RegisterMoL.cc", Contents -> molregister}, {Filename -> "RegisterSymmetries.cc", Contents -> symregister}, {Filename -> "Differencing.h", Contents -> diffHeader}}, MapThread[{Filename -> #1, Contents -> #2} &, |