aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2011-10-13 02:34:37 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2011-10-28 18:47:56 +0200
commitbe14e6c67c4ee0dbbae1ed6008004b230a7c37c8 (patch)
tree2a916a8f532bc9936f85937e5931ee648565134d /Tools
parentaddefdfd556a2e33f341bc0dca3e751a0581b3b5 (diff)
CalculationFunction.m: Use DefFn for two important functions
Diffstat (limited to 'Tools')
-rw-r--r--Tools/CodeGen/CalculationFunction.m10
-rw-r--r--Tools/MathematicaMisc/Errors.m2
2 files changed, 7 insertions, 5 deletions
diff --git a/Tools/CodeGen/CalculationFunction.m b/Tools/CodeGen/CalculationFunction.m
index 4d27134..a8dde0b 100644
--- a/Tools/CodeGen/CalculationFunction.m
+++ b/Tools/CodeGen/CalculationFunction.m
@@ -373,7 +373,8 @@ pdCanonicalOrdering[name_[inds___] -> x_] :=
Options[CreateCalculationFunction] = ThornOptions;
-CreateCalculationFunction[calcp_, debug_, imp_, opts:OptionsPattern[]] :=
+DefFn[
+ CreateCalculationFunction[calcp_, debug_, imp_, opts:OptionsPattern[]] :=
Module[{gfs, allSymbols, knownSymbols,
shorts, eqs, parameters, parameterRules,
functionName, dsUsed, groups, pddefs, cleancalc, eqLoop, where,
@@ -568,11 +569,12 @@ CreateCalculationFunction[calcp_, debug_, imp_, opts:OptionsPattern[]] :=
ConditionalOnParameterTextual["verbose > 1",
"CCTK_VInfo(CCTK_THORNSTRING,\"Leaving " <> bodyFunctionName <> "\");\n"]
}]]
- }];
+ }]];
Options[equationLoop] = ThornOptions;
-equationLoop[eqs_, cleancalc_, gfs_, shorts_, incs_, groups_, pddefs_,
+DefFn[
+ equationLoop[eqs_, cleancalc_, gfs_, shorts_, incs_, groups_, pddefs_,
where_, addToStencilWidth_,
opts:OptionsPattern[]] :=
Module[{rhss, lhss, gfsInRHS, gfsInLHS, gfsOnlyInRHS, localGFs,
@@ -761,7 +763,7 @@ equationLoop[eqs_, cleancalc_, gfs_, shorts_, incs_, groups_, pddefs_,
CommentedBlock["Copy local copies back to grid functions",
Map[AssignVariableInLoop[GridName[#], localName[#]] &, gfsInLHS]]],
- If[debugInLoop, Map[InfoVariable[GridName[#]] &, gfsInLHS], ""]}, opts]];
+ If[debugInLoop, Map[InfoVariable[GridName[#]] &, gfsInLHS], ""]}, opts]]];
End[];
diff --git a/Tools/MathematicaMisc/Errors.m b/Tools/MathematicaMisc/Errors.m
index 34c19b0..131997a 100644
--- a/Tools/MathematicaMisc/Errors.m
+++ b/Tools/MathematicaMisc/Errors.m
@@ -1,5 +1,5 @@
-BeginPackage["Errors`"];
+BeginPackage["Errors`", {"Profile`"}];
PrintError::usage = "";
ThrowError::usage = "";