aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2013-09-13 19:03:29 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2013-09-13 19:03:29 +0200
commit883fc32fe2c5f619a03d663322a45132d2f3cfa9 (patch)
treecfc88c4b498c988ecf1f72d6956926d1fdbb53f3 /Tools
parent508c5fdca83aff15eee3e4f811a478f52e8defd2 (diff)
KrancThorn.m: Move ODE code processing into a separate function
Diffstat (limited to 'Tools')
-rw-r--r--Tools/CodeGen/KrancThorn.m13
1 files changed, 11 insertions, 2 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m
index 4fde955..97cfc1f 100644
--- a/Tools/CodeGen/KrancThorn.m
+++ b/Tools/CodeGen/KrancThorn.m
@@ -55,6 +55,16 @@ DefFn[
Append[#, GridType -> "array"],
#] &, groups]];
+Options[ODEProcessCode] = ThornOptions;
+
+DefFn[
+ ODEProcessCode[cIn_Code, opts:OptionsPattern[]] :=
+ Module[
+ {c = cIn},
+ c = SetObjectField[c, "Groups", processODEGroups[GetObjectField[c, "ODEGroups"],
+ GetObjectField[c, "Groups"]]];
+ c]];
+
DefFn[
coordinatesProcessCode[cIn_Code, opts___] :=
Module[
@@ -224,8 +234,7 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[
ODEs
------------------------------------------------------------------------ *)
- c = SetObjectField[c, "Groups", processODEGroups[GetObjectField[c, "ODEGroups"],
- GetObjectField[c, "Groups"]]];
+ c = ODEProcessCode[c, opts];
c = SetObjectField[
c, "DeclaredGroups",