Skip to content

Commit

Permalink
Thorn.m: Default to symmetries of a scalar if reflection symmetries h…
Browse files Browse the repository at this point in the history
…ave not been provided (and print a warning)

This is a temporary hack that needs to be fixed later.
  • Loading branch information
ianhinder committed Oct 1, 2010
1 parent 6fca009 commit 723ef25
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Tools/CodeGen/Thorn.m
Expand Up @@ -548,8 +548,16 @@
];

(* syms is a list of rules mapping gridfunctions to their symmetry structures *)
calcSymmetry[gf_, syms_] :=
gf /. syms;
calcSymmetry[gf_, syms_] :=
Module[{},
If[mapContains[syms, gf],
Return[lookup[syms,gf]],
(* FIXME: We are defaulting to scalar symmetries if no information is
available. This shouldn't happen, but I am bypassing this check
temporarily. *)
Print["WARNING: defaulting to symmetries of a scalar for "<>ToString[gf]];
Return[{1,1,1}]]];


(* This function guesses the symmetries based on component names as we
have not been given them *)
Expand Down

0 comments on commit 723ef25

Please sign in to comment.