Skip to content

Commit

Permalink
KrancThorn.m: Add group options to indicate that a group is an ODE group
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Sep 10, 2013
1 parent 6e9cbe2 commit 3689926
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Tools/CodeGen/KrancThorn.m
Expand Up @@ -48,6 +48,13 @@
If[Length[unrecognized] > 0,
ThrowError["Unrecognized named arguments: ", unrecognized]]];

DefFn[
processODEGroups[odeGroups_List, groups_List] :=
Map[If[MemberQ[odeGroups, groupName[#]],
(* Print["Adding grid type array to ", groupName[#]]; *)
Append[#, GridType -> "array"],
#] &, groups]];

(* --------------------------------------------------------------------------
Thorn generation (main entry point for non-tensorial thorns)
-------------------------------------------------------------------------- *)
Expand Down Expand Up @@ -161,6 +168,9 @@ Thorn generation (main entry point for non-tensorial thorns)
Map[ConservationCalculationDeclaredGroups, consCalcsIn],1];

groups = Join[groups, consGroups];

groups = processODEGroups[odeGroups, groups];

declaredGroups = Join[declaredGroups, Map[groupName, consGroups]];

declaredGroups = DeleteDuplicates[Join[declaredGroups, Flatten[Map[Map[groupName,lookup[#,LocalGroups,{}]] &, calcs],1]]];
Expand Down

0 comments on commit 3689926

Please sign in to comment.