diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-09-24 17:05:02 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-09-24 17:05:02 +0200 |
commit | 518f51ee918d6b44a9bca755cc49db0ead083108 (patch) | |
tree | 8029bf0eb8ffa2e6f93ea0acd1c2d5a11a951b26 /m | |
parent | 0e9103e1d2393af2d51c49645569767d1e8544c7 (diff) |
Use kranc script instead of calling Mathematica directly
This allows use of better error handling provided by Kranc
Diffstat (limited to 'm')
-rw-r--r-- | m/McLachlan_ADM.m | 5 | ||||
-rw-r--r-- | m/McLachlan_ADMConstraints.m | 4 | ||||
-rw-r--r-- | m/McLachlan_ADMQuantities.m | 4 | ||||
-rw-r--r-- | m/McLachlan_BSSN.m | 4 | ||||
-rw-r--r-- | m/McLachlan_BSSN_Peter.m | 4 | ||||
-rw-r--r-- | m/McLachlan_WeylScalars.m | 4 | ||||
-rw-r--r-- | m/McLachlantmp.m | 4 | ||||
-rw-r--r-- | m/WaveToy.m | 4 | ||||
-rw-r--r-- | m/WaveToyFO.m | 4 | ||||
-rwxr-xr-x | m/runmath.sh | 17 |
10 files changed, 3 insertions, 51 deletions
diff --git a/m/McLachlan_ADM.m b/m/McLachlan_ADM.m index ab611b0..1f778b5 100644 --- a/m/McLachlan_ADM.m +++ b/m/McLachlan_ADM.m @@ -1,8 +1,3 @@ -$Path = Join[$Path, {"../../../repos/Kranc/Tools/CodeGen", - "../../../repos/Kranc/Tools/MathematicaMisc"}]; - -Get["KrancThorn`"]; - SetEnhancedTimes[False]; SetSourceLanguage["C"]; diff --git a/m/McLachlan_ADMConstraints.m b/m/McLachlan_ADMConstraints.m index bb9447b..8a63258 100644 --- a/m/McLachlan_ADMConstraints.m +++ b/m/McLachlan_ADMConstraints.m @@ -1,7 +1,3 @@ -$Path = Join[$Path, {"../../../repos/Kranc/Tools/CodeGen", - "../../../repos/Kranc/Tools/MathematicaMisc"}]; - -Get["KrancThorn`"]; SetEnhancedTimes[False]; SetSourceLanguage["C"]; diff --git a/m/McLachlan_ADMQuantities.m b/m/McLachlan_ADMQuantities.m index 14131f8..003a9f8 100644 --- a/m/McLachlan_ADMQuantities.m +++ b/m/McLachlan_ADMQuantities.m @@ -1,7 +1,3 @@ -$Path = Join[$Path, {"../../../repos/Kranc/Tools/CodeGen", - "../../../repos/Kranc/Tools/MathematicaMisc"}]; - -Get["KrancThorn`"]; SetEnhancedTimes[False]; SetSourceLanguage["C"]; diff --git a/m/McLachlan_BSSN.m b/m/McLachlan_BSSN.m index 7d2543e..21aa53f 100644 --- a/m/McLachlan_BSSN.m +++ b/m/McLachlan_BSSN.m @@ -1,7 +1,3 @@ -$Path = Join[$Path, {"../../../repos/Kranc/Tools/CodeGen", - "../../../repos/Kranc/Tools/MathematicaMisc"}]; - -Get["KrancThorn`"]; SetEnhancedTimes[False]; SetSourceLanguage["C"]; diff --git a/m/McLachlan_BSSN_Peter.m b/m/McLachlan_BSSN_Peter.m index 3631867..c5b5b7d 100644 --- a/m/McLachlan_BSSN_Peter.m +++ b/m/McLachlan_BSSN_Peter.m @@ -1,7 +1,3 @@ -$Path = Join[$Path, {"../../../repos/Kranc/Tools/CodeGen",
- "../../../repos/Kranc/Tools/MathematicaMisc"}];
-
-Get["KrancThorn`"];
SetEnhancedTimes[False];
SetSourceLanguage["C"];
diff --git a/m/McLachlan_WeylScalars.m b/m/McLachlan_WeylScalars.m index 86b4a36..5e8d805 100644 --- a/m/McLachlan_WeylScalars.m +++ b/m/McLachlan_WeylScalars.m @@ -1,7 +1,3 @@ -$Path = Join[$Path, {"../../../repos/Kranc/Tools/CodeGen", - "../../../repos/Kranc/Tools/MathematicaMisc"}]; - -Get["KrancThorn`"]; SetEnhancedTimes[False]; SetSourceLanguage["C"]; diff --git a/m/McLachlantmp.m b/m/McLachlantmp.m index 1d652c9..54581e2 100644 --- a/m/McLachlantmp.m +++ b/m/McLachlantmp.m @@ -1,7 +1,3 @@ -$Path = Join[$Path, {"../../../repos/Kranc/Tools/CodeGen", - "../../../repos/Kranc/Tools/MathematicaMisc"}]; - -Get["KrancThorn`"]; SetEnhancedTimes[False]; SetSourceLanguage["C"]; diff --git a/m/WaveToy.m b/m/WaveToy.m index dfc0862..de2c73e 100644 --- a/m/WaveToy.m +++ b/m/WaveToy.m @@ -1,7 +1,3 @@ -$Path = Join[$Path, {"../../../repos/Kranc/Tools/CodeGen", - "../../../repos/Kranc/Tools/MathematicaMisc"}]; - -Get["KrancThorn`"]; SetEnhancedTimes[False]; SetSourceLanguage["C"]; diff --git a/m/WaveToyFO.m b/m/WaveToyFO.m index 4864131..f80b0b2 100644 --- a/m/WaveToyFO.m +++ b/m/WaveToyFO.m @@ -1,7 +1,3 @@ -$Path = Join[$Path, {"../../../repos/Kranc/Tools/CodeGen", - "../../../repos/Kranc/Tools/MathematicaMisc"}]; - -Get["KrancThorn`"]; SetEnhancedTimes[False]; SetSourceLanguage["C"]; diff --git a/m/runmath.sh b/m/runmath.sh index 306b2e1..18196d1 100755 --- a/m/runmath.sh +++ b/m/runmath.sh @@ -3,8 +3,6 @@ # Abort on errors set -e -MATHEMATICA="math" - script=$1 if test -z "$script"; then @@ -18,17 +16,8 @@ output=$(basename $script .m).out rm -f $output -# Run Mathematica to regenerate the code -< $script "$MATHEMATICA" | tee $error - -if grep 'KrancError' $error; then - echo - echo "There was an error when running Kranc on $script." - echo "The file $error contains details." - echo - echo "*** The Cactus thorns have NOT been updated. ***" - echo - exit 1 -fi +# Run Kranc to regenerate the code +../../../repos/Kranc/Bin/kranc $script | tee $error +[ $PIPESTATUS -eq 0 ] || exit $PIPESTATUS mv $error $output |