diff options
author | Roland Haas <roland.haas@physics.gatech.edu> | 2010-05-04 00:02:38 -0400 |
---|---|---|
committer | Roland Haas <roland.haas@physics.gatech.edu> | 2010-05-06 09:32:40 -0400 |
commit | 77fb1506cf84a0036f71b7f8b255c7a62b193ea1 (patch) | |
tree | 25f25918fa85e7c9463e440b0580b5d7293e09f6 | |
parent | 60f1e8fba52b52d38beed9d6702de40703b11d06 (diff) |
use integers in tags if number is a integer
this helps with tensor parities which have to be integers. Cactus is fine with
float that look like ints but does not really like 1 written as 1.0 for
itnegers
-rw-r--r-- | Tools/CodeGen/Thorn.m | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Tools/CodeGen/Thorn.m b/Tools/CodeGen/Thorn.m index c59bae1..a60517a 100644 --- a/Tools/CodeGen/Thorn.m +++ b/Tools/CodeGen/Thorn.m @@ -254,6 +254,9 @@ interfaceGroupBlock[spec_] := interfaceTag[tagName_String -> tagValue_String] := tagName <> "=" <> "\"" <> tagValue <> "\""; +interfaceTag[tagName_String -> tagValue_?IntegerQ] := + tagName <> "=" <> ToString[tagValue]; + interfaceTag[tagName_String -> tagValue_?NumberQ] := tagName <> "=" <> ToString[N[tagValue, 20]]; |