diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-10 16:43:32 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-10 16:43:53 +0200 |
commit | 47a648e371614492c31dd8ac5bf4beb78b34e39e (patch) | |
tree | c3290a67b966f0e62b4324318b74c25041d988e2 | |
parent | 10daf4a83a783a812c7b5a3aba0df115f0eac98f (diff) |
MoL.m: Add MoLProcessGroups
This function is called to modify the groups structure for MoL's requirements. At the moment, it adds an InterfaceTimelevels option to the group with a value of EvolutionTimelevels (passed in as an argument).
-rw-r--r-- | Tools/CodeGen/Kranc.m | 4 | ||||
-rw-r--r-- | Tools/CodeGen/MoL.m | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Tools/CodeGen/Kranc.m b/Tools/CodeGen/Kranc.m index c83fdde..31ff109 100644 --- a/Tools/CodeGen/Kranc.m +++ b/Tools/CodeGen/Kranc.m @@ -57,6 +57,10 @@ SimpleCode}; {Name, Definitions, shift, spacing, SBPDerivative}; +(* Interface.m *) + +{InterfaceTimelevels}; + (* KrancThorn.m *) ThornOptions = diff --git a/Tools/CodeGen/MoL.m b/Tools/CodeGen/MoL.m index 83b91fd..0425412 100644 --- a/Tools/CodeGen/MoL.m +++ b/Tools/CodeGen/MoL.m @@ -34,6 +34,7 @@ EvolvedGroupToRHSGroup::usage = ""; MoLRHSGroupDefinitions; MoLRHSODEGroupDefinitions; MoLUsedFunctions; +MoLProcessGroups; Begin["`Private`"]; @@ -597,6 +598,19 @@ DefFn[ *) }]; +DefFn[ + MoLProcessGroups[declaredGroups_List, calcs_List, groups_List, + evolutionTimelevels_Integer] := + Module[ + {evolvedGroups, groups2}, + evolvedGroups = MoLEvolvedGroups[declaredGroups, calcs, groups]; + + groups2 = Map[If[MemberQ[evolvedGroups, groupName[#]], + (* Print["Adding InterfaceTimelevels to ", groupName[#]]; *) + EnsureInterfaceTimelevels[#, evolutionTimelevels], + #] &, groups]; + groups2]]; + End[]; EndPackage[]; |