diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-13 19:05:30 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-13 19:05:30 +0200 |
commit | 20e7a8feb560e494efe6b00db07af8b350fc9783 (patch) | |
tree | 8c678856a3f2e42ae347a8e084af751ea7235e57 /Tools | |
parent | 883fc32fe2c5f619a03d663322a45132d2f3cfa9 (diff) |
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/CodeGen/KrancThorn.m | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m index 97cfc1f..3dd8482 100644 --- a/Tools/CodeGen/KrancThorn.m +++ b/Tools/CodeGen/KrancThorn.m @@ -107,6 +107,17 @@ DefFn[ GetObjectField[c, "Calculations"]]]; c]]; +DefFn[ + declaredGroupsProcessCode[cIn_Code, opts___] := + Module[ + {c = cIn}, + c = SetObjectField[ + c, "DeclaredGroups", + DeleteDuplicates[Join[GetObjectField[c, "DeclaredGroups"], + Flatten[Map[Map[groupName,lookup[#,LocalGroups,{}]] &, + GetObjectField[c, "Calculations"]],1]]]]; + c]]; + (* -------------------------------------------------------------------------- Thorn generation (main entry point for non-tensorial thorns) -------------------------------------------------------------------------- *) @@ -236,11 +247,11 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ c = ODEProcessCode[c, opts]; - c = SetObjectField[ - c, "DeclaredGroups", - DeleteDuplicates[Join[GetObjectField[c, "DeclaredGroups"], - Flatten[Map[Map[groupName,lookup[#,LocalGroups,{}]] &, - GetObjectField[c, "Calculations"]],1]]]]; + (* ------------------------------------------------------------------------ + Declared groups + ------------------------------------------------------------------------ *) + + c = declaredGroupsProcessCode[c, opts]; (* ------------------------------------------------------------------------ MoL |