aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen/KrancThorn.m
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2010-03-02 09:59:20 -0600
committerIan Hinder <ian.hinder@aei.mpg.de>2010-03-02 09:59:20 -0600
commitfb3ceef82392a3f5862c097cc70cff320fb0452b (patch)
treedf55e59a21b2ed989b84eaf6130eebe8e4e65bc3 /Tools/CodeGen/KrancThorn.m
parent7a0f65c45121d1fa7141b847acf246a68b9d8be8 (diff)
Add option ProhibitAssignmentToGridFunctionsRead
This option, which defaults to False, prevents having grid functions on the left hand side and the right hand side in any single calculation.
Diffstat (limited to 'Tools/CodeGen/KrancThorn.m')
-rw-r--r--Tools/CodeGen/KrancThorn.m66
1 files changed, 26 insertions, 40 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m
index aa21242..f47fb49 100644
--- a/Tools/CodeGen/KrancThorn.m
+++ b/Tools/CodeGen/KrancThorn.m
@@ -27,14 +27,30 @@
BeginPackage["sym`"];
-{Calculations, DeclaredGroups, RealParameters, IntParameters, KeywordParameters,
- InheritedRealParameters,InheritedIntParameters,InheritedKeywordParameters,
- ExtendedRealParameters,ExtendedIntParameters,ExtendedKeywordParameters,
- Parameters,
- EvolutionTimelevels, DefaultEvolutionTimelevels,
- UseCSE, ThornOptions,
-
-PartialDerivatives, InheritedImplementations, ConditionalOnKeyword, ConditionalOnKeywords, ReflectionSymmetries, ZeroDimensions, CollectList, Interior, InteriorNoSync, Boundary, BoundaryWithGhosts, Where, PreDefinitions, AllowedSymbols, UseLoopControl};
+ThornOptions =
+ {Calculations -> {},
+ DeclaredGroups -> {},
+ Implementation -> None,
+ InheritedImplementations -> {},
+ EvolutionTimelevels -> 3,
+ DefaultEvolutionTimelevels -> None,
+ RealParameters -> {},
+ IntParameters -> {},
+ KeywordParameters -> {},
+ InheritedRealParameters -> {},
+ InheritedIntParameters -> {},
+ InheritedKeywordParameters -> {},
+ ExtendedRealParameters -> {},
+ ExtendedIntParameters -> {},
+ ExtendedKeywordParameters -> {},
+ PartialDerivatives -> {},
+ ReflectionSymmetries -> {},
+ ZeroDimensions -> {},
+ UseLoopControl -> False,
+ UseCSE -> False,
+ ProhibitAssignmentToGridFunctionsRead -> False};
+
+{ConditionalOnKeyword, ConditionalOnKeywords, CollectList, Interior, InteriorNoSync, Boundary, BoundaryWithGhosts, Where, PreDefinitions, AllowedSymbols, UseLoopControl, Parameters};
EndPackage[];
@@ -82,18 +98,10 @@ VerifyNewCalculation[calc_] :=
cktCheckNamedArgs[l_] :=
-Module[{allowed = {Calculations,
- DeclaredGroups, Implementation, InheritedImplementations,
- EvolutionTimelevels, DefaultEvolutionTimelevels,
- RealParameters, IntParameters, KeywordParameters,
- InheritedRealParameters,InheritedIntParameters,InheritedKeywordParameters,
- ExtendedRealParameters,ExtendedIntParameters,ExtendedKeywordParameters,
- PartialDerivatives, ReflectionSymmetries, ZeroDimensions, UseLoopControl,
- UseCSE},
- used, unrecognized},
+Module[{used, unrecognized},
used = Map[First, l];
- unrecognized = Complement[used, allowed];
+ unrecognized = Complement[used, Map[First, ThornOptions]];
If[Length[unrecognized] > 0,
ThrowError["Unrecognized named arguments: ", unrecognized]]
@@ -102,28 +110,6 @@ Module[{allowed = {Calculations,
replaceDots[x_] :=
x /. (dot[y_] :> Symbol[ToString[y] <> "rhs"]);
-ThornOptions =
- {Calculations -> {},
- DeclaredGroups -> {},
- Implementation -> None,
- InheritedImplementations -> {},
- EvolutionTimelevels -> 3,
- DefaultEvolutionTimelevels -> None,
- RealParameters -> {},
- IntParameters -> {},
- KeywordParameters -> {},
- InheritedRealParameters -> {},
- InheritedIntParameters -> {},
- InheritedKeywordParameters -> {},
- ExtendedRealParameters -> {},
- ExtendedIntParameters -> {},
- ExtendedKeywordParameters -> {},
- PartialDerivatives -> {},
- ReflectionSymmetries -> {},
- ZeroDimensions -> {},
- UseLoopControl -> False,
- UseCSE -> False,
- ProhibitAssignmentToGridfunctionsRead -> False};
Options[CreateKrancThorn] = ThornOptions;