From c5a98a649684ec762d8350784514e6e7c658ad58 Mon Sep 17 00:00:00 2001 From: hinder Date: Sun, 25 Sep 2011 19:20:01 +0000 Subject: Use run-time finite difference order selection Keep the old method for backwards compatibility for now git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/WeylScal4/trunk@78 4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843 --- m/WeylScal4.m | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/m/WeylScal4.m b/m/WeylScal4.m index ed8bf4e..0ef79ab 100644 --- a/m/WeylScal4.m +++ b/m/WeylScal4.m @@ -25,6 +25,11 @@ derivatives = PDstandard4th[i_, j_] -> StandardCenteredDifferenceOperator[1,2,i] * StandardCenteredDifferenceOperator[1,2,j], + PDstandard[i_] -> StandardCenteredDifferenceOperator[1,fdOrder/2,i], + PDstandard[i_, i_] -> StandardCenteredDifferenceOperator[2,fdOrder/2,i], + PDstandard[i_, j_] -> StandardCenteredDifferenceOperator[1,fdOrder/2,i] * + StandardCenteredDifferenceOperator[1,fdOrder/2,j], + PDplus[i_] -> DPlus[i], PDminus[i_] -> DMinus[i], PDplus[i_,j_] -> DPlus[i] DPlus[j], @@ -277,8 +282,8 @@ PsisCalc[fdOrder_, PD_] := fdOrderParam = { Name -> "fd_order", - Default -> "2nd", - AllowedValues -> {"2nd", "4th"} + Default -> "Nth", + AllowedValues -> {"Nth", "2nd", "4th"} }; keywordParameters = @@ -286,8 +291,19 @@ keywordParameters = fdOrderParam }; +intParameters = +{ + { + Name -> fdOrder, + Default -> 2, + AllowedValues -> {2,4,6,8} + } +}; + + calculations = { + PsisCalc["Nth", PDstandard], PsisCalc["2nd", PDstandard2nd], PsisCalc["4th", PDstandard4th] }; @@ -299,4 +315,5 @@ CreateKrancThornTT[groups, ".", "WeylScal4", UseLoopControl -> True, KeywordParameters -> keywordParameters, RealParameters -> realParameters, + IntParameters -> intParameters, InheritedImplementations -> {"admbase", "methodoflines"}]; -- cgit v1.2.3