aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/CodeGen')
-rw-r--r--Tools/CodeGen/KrancThorn.m3
-rw-r--r--Tools/CodeGen/MoL.m8
2 files changed, 9 insertions, 2 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m
index f67906f..a08eb43 100644
--- a/Tools/CodeGen/KrancThorn.m
+++ b/Tools/CodeGen/KrancThorn.m
@@ -176,8 +176,7 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[
calcs = MoLReplaceDots[calcs];
(* Add the RHS groups *)
- evolvedGroupDefinitions = Map[groupFromName[#, groups] &, evolvedGroups];
- rhsGroupDefinitions = Map[EvolvedGroupToRHSGroup[#, evolvedGroupDefinitions] &, evolvedGroups];
+ rhsGroupDefinitions = MoLRHSGroupDefinitions[groups, evolvedGroups];
groups = Join[groups, rhsGroupDefinitions];
evolvedODEGroupDefinitions = Map[groupFromName[#, groups] &, evolvedODEGroups];
diff --git a/Tools/CodeGen/MoL.m b/Tools/CodeGen/MoL.m
index 76acd90..cada495 100644
--- a/Tools/CodeGen/MoL.m
+++ b/Tools/CodeGen/MoL.m
@@ -31,6 +31,7 @@ EvolvedVariables;
MoLEvolvedGroups;
MoLNonevolvedGroups;
EvolvedGroupToRHSGroup::usage = "";
+MoLRHSGroupDefinitions;
Begin["`Private`"];
@@ -562,6 +563,13 @@ EvolvedGroupToRHSGroup[name_, groups_] :=
group = AddGroupTag[group, "Prolongation" -> "None"];
Return[group]];
+DefFn[
+ MoLRHSGroupDefinitions[groups_List, evolvedGroups_List] :=
+ Module[
+ {evolvedGroupDefinitions},
+ evolvedGroupDefinitions = Map[groupFromName[#, groups] &, evolvedGroups];
+ Map[EvolvedGroupToRHSGroup[#, evolvedGroupDefinitions] &, evolvedGroups]]];
+
End[];
EndPackage[];