diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-10-13 02:34:37 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-10-28 18:47:56 +0200 |
commit | be14e6c67c4ee0dbbae1ed6008004b230a7c37c8 (patch) | |
tree | 2a916a8f532bc9936f85937e5931ee648565134d /Tools/CodeGen | |
parent | addefdfd556a2e33f341bc0dca3e751a0581b3b5 (diff) |
CalculationFunction.m: Use DefFn for two important functions
Diffstat (limited to 'Tools/CodeGen')
-rw-r--r-- | Tools/CodeGen/CalculationFunction.m | 10 |
1 files changed, 6 insertions, 4 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[]; |