Skip to content

Commit

Permalink
MoL.m: Add MoLProcessGroups
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
ianhinder committed Sep 10, 2013
1 parent 10daf4a commit 47a648e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tools/CodeGen/Kranc.m
Expand Up @@ -57,6 +57,10 @@

{Name, Definitions, shift, spacing, SBPDerivative};

(* Interface.m *)

{InterfaceTimelevels};

(* KrancThorn.m *)

ThornOptions =
Expand Down
14 changes: 14 additions & 0 deletions Tools/CodeGen/MoL.m
Expand Up @@ -34,6 +34,7 @@
MoLRHSGroupDefinitions;
MoLRHSODEGroupDefinitions;
MoLUsedFunctions;
MoLProcessGroups;

Begin["`Private`"];

Expand Down Expand Up @@ -597,6 +598,19 @@
*)
}];

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[];

0 comments on commit 47a648e

Please sign in to comment.