diff options
-rw-r--r-- | Tools/CodeGen/CactusBoundary.m | 10 | ||||
-rw-r--r-- | Tools/CodeGen/CalculationFunction.m | 16 | ||||
-rw-r--r-- | Tools/CodeGen/CodeGen.m | 6 | ||||
-rw-r--r-- | Tools/CodeGen/Differencing.m | 8 | ||||
-rw-r--r-- | Tools/CodeGen/Helpers.m | 6 | ||||
-rw-r--r-- | Tools/CodeGen/Interface.m | 140 | ||||
-rw-r--r-- | Tools/CodeGen/Kranc.m | 95 | ||||
-rw-r--r-- | Tools/CodeGen/KrancGroups.m | 6 | ||||
-rw-r--r-- | Tools/CodeGen/KrancThorn.m | 151 | ||||
-rw-r--r-- | Tools/CodeGen/Param.m | 8 | ||||
-rw-r--r-- | Tools/CodeGen/Schedule.m | 6 | ||||
-rw-r--r-- | Tools/CodeGen/TensorTools.m | 9 | ||||
-rw-r--r-- | Tools/CodeGen/Thorn.m | 29 |
13 files changed, 254 insertions, 236 deletions
diff --git a/Tools/CodeGen/CactusBoundary.m b/Tools/CodeGen/CactusBoundary.m index 8c8b81a..090151c 100644 --- a/Tools/CodeGen/CactusBoundary.m +++ b/Tools/CodeGen/CactusBoundary.m @@ -32,14 +32,8 @@ *) -BeginPackage["sym`"]; - -{}; - -EndPackage[]; - -BeginPackage["CactusBoundary`", {"CodeGen`", "sym`", "Thorn`", - "MapLookup`", "KrancGroups`", "Errors`", "Helpers`"}]; +BeginPackage["CactusBoundary`", {"CodeGen`", "Thorn`", + "MapLookup`", "KrancGroups`", "Errors`", "Helpers`", "Kranc`"}]; GetInheritedImplementations::usage = ""; GetIncludeFiles::usage = ""; diff --git a/Tools/CodeGen/CalculationFunction.m b/Tools/CodeGen/CalculationFunction.m index a4fcb46..d73adb6 100644 --- a/Tools/CodeGen/CalculationFunction.m +++ b/Tools/CodeGen/CalculationFunction.m @@ -18,19 +18,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) -BeginPackage["sym`"]; - -{GridFunctions, Shorthands, Equations, t, DeclarationIncludes, -LoopPreIncludes, GroupImplementations, PartialDerivatives, NoSimplify, -Boundary, Interior, InteriorNoSync, Where, AddToStencilWidth, -Everywhere, normal1, normal2, normal3, INV, SQR, CUB, QAD, dot, pow, -exp, dx, dy, dz, idx, idy, idz} - -EndPackage[]; - -BeginPackage["CalculationFunction`", {"CodeGen`", "sym`", +BeginPackage["CalculationFunction`", {"CodeGen`", "MapLookup`", "KrancGroups`", "Differencing`", "Errors`", - "Helpers`"}]; + "Helpers`", "Kranc`"}]; CreateCalculationFunction::usage = ""; VerifyCalculation::usage = ""; @@ -240,7 +230,7 @@ assignVariableFromExpression[dest_, expr_, declare_] := Module[{tSym, type, cleanExpr, code}, tSym = Unique[]; type = If[StringMatchQ[ToString[dest], "dir*"], "int", "CCTK_REAL"]; - cleanExpr = ReplacePowers[expr] /. sym`t -> tSym; + cleanExpr = ReplacePowers[expr] /. Kranc`t -> tSym; If[SOURCELANGUAGE == "C", code = If[declare, type <> " ", ""] <> ToString[dest] <> " = " <> diff --git a/Tools/CodeGen/CodeGen.m b/Tools/CodeGen/CodeGen.m index e1776ad..13f8ecc 100644 --- a/Tools/CodeGen/CodeGen.m +++ b/Tools/CodeGen/CodeGen.m @@ -19,12 +19,8 @@ along with Kranc; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) -BeginPackage["sym`"]; -{INV, SQR, CUB, QAD, exp, pow, fmax, fmin, dx, dy, dz, khalf, kthird, ktwothird, kfourthird, keightthird}; -EndPackage[]; - -BeginPackage["CodeGen`", {"sym`", "Errors`"}]; +BeginPackage["CodeGen`", {"Errors`", "Kranc`"}]; SOURCELANGUAGE::usage = "global variable == \"C\" or \"Fortran\" determines language for code generation"; diff --git a/Tools/CodeGen/Differencing.m b/Tools/CodeGen/Differencing.m index 7c7df2d..ceb332b 100644 --- a/Tools/CodeGen/Differencing.m +++ b/Tools/CodeGen/Differencing.m @@ -125,13 +125,7 @@ point. Should be checked by someone competent! *) -BeginPackage["sym`"]; - -{Name, Definitions, shift, spacing, SBPDerivative}; - -EndPackage[]; - -BeginPackage["Differencing`", {"CodeGen`", "sym`", "MapLookup`", +BeginPackage["Differencing`", {"CodeGen`", "Kranc`", "MapLookup`", "LinearAlgebra`MatrixManipulation`", "Errors`"}]; CreateDifferencingHeader::usage = ""; diff --git a/Tools/CodeGen/Helpers.m b/Tools/CodeGen/Helpers.m index ecc4dae..563c514 100644 --- a/Tools/CodeGen/Helpers.m +++ b/Tools/CodeGen/Helpers.m @@ -18,12 +18,8 @@ along with Kranc; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) -BeginPackage["sym`"]; -{dummy}; -EndPackage[]; - -BeginPackage["Helpers`", {"sym`"}]; +BeginPackage["Helpers`", {"Kranc`"}]; TensorName::usage = "get the base name of a tensor object, i.e. TensorName[g[la, lb]] -> TensorName"; diff --git a/Tools/CodeGen/Interface.m b/Tools/CodeGen/Interface.m new file mode 100644 index 0000000..393276b --- /dev/null +++ b/Tools/CodeGen/Interface.m @@ -0,0 +1,140 @@ + +(* Copyright 2004 Sascha Husa, Ian Hinder, Christiane Lechner + + This file is part of Kranc. + + Kranc is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Kranc is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Kranc; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*) + +BeginPackage["Interface`", {"Thorn`", "KrancGroups`", "MapLookup`", "Errors`", "Helpers`", "Kranc`", "Kranc`"}]; + +CreateKrancInterface; + +Begin["`Private`"]; + +(* -------------------------------------------------------------------------- + Interface and variable definitions + -------------------------------------------------------------------------- *) + +nonevolvedGroupInterfaceStructure[group_] := +{ + Name -> groupName[group], + VariableType -> "CCTK_REAL", + Timelevels -> NonevolvedTimelevels[group], + GridType -> "GF", + Comment -> groupName[group], + Visibility -> "public", + Tags -> Join[GroupTags[group]], + Variables -> groupVariables[group] +} + +evolvedGroupInterfaceStructure[group_, timelevels_] := +{ + Name -> groupName[group], + VariableType -> "CCTK_REAL", + Timelevels -> timelevels, + GridType -> "GF", + Comment -> groupName[group], + Visibility -> "public", + Tags -> GroupTags[group], + Variables -> groupVariables[group] +} + +rhsGroupInterfaceStructure[group_, timelevels_] := +{ + Name -> groupName[group], + VariableType -> "CCTK_REAL", + Timelevels -> timelevels, + GridType -> "GF", + Comment -> groupName[group], + Visibility -> "public", + Tags -> GroupTags[group], + Variables -> groupVariables[group] +} + + +Options[CreateKrancInterface] = ThornOptions; + +CreateKrancInterface[nonevolvedGroups_, evolvedGroups_, rhsGroups_, groups_, + implementation_, inheritedImplementations_, + includeFiles_, opts:OptionsPattern[]] := + + Module[{registerEvolved, (*registerConstrained,*) + nonevolvedGroupStructures, evolvedGroupStructures, rhsGroupStructures, + groupStructures, interface}, + VerifyGroupNames[nonevolvedGroups]; + VerifyGroupNames[evolvedGroups]; + VerifyGroupNames[rhsGroups]; + VerifyGroups[groups]; + VerifyString[implementation]; + VerifyStringList[inheritedImplementations]; + VerifyStringList[includeFiles]; + (* These are the aliased functions that are USED by this thorn from other thorns *) + registerEvolved = + { + Name -> "MoLRegisterEvolved", + Type -> "CCTK_INT", + ArgString -> "CCTK_INT IN EvolvedIndex, CCTK_INT IN RHSIndex" + }; + + (* + registerConstrained = + { + Name -> "MoLRegisterConstrained", + Type -> "CCTK_INT", + ArgString -> "CCTK_INT IN ConstrainedIndex" + }; + *) + + diffCoeff = + { + Name -> "Diff_coeff", + Type -> "SUBROUTINE", + ArgString -> "CCTK_POINTER_TO_CONST IN cctkGH, CCTK_INT IN dir, CCTK_INT IN nsize, CCTK_INT OUT ARRAY imin, CCTK_INT OUT ARRAY imax, CCTK_REAL OUT ARRAY q, CCTK_INT IN table_handle" + }; + + + (* For each group declared in this thorn, we need an entry in the + interface file. Each evolved group needs an associated rhs + group, but these are constructed at a higher level and are + listed in the nonevolved groups. *) + nonevolvedGroupStructures = + Map[nonevolvedGroupInterfaceStructure[groupFromName[#, groups]] &, + nonevolvedGroups]; + + evolvedGroupStructures = + Map[evolvedGroupInterfaceStructure[groupFromName[#, groups], + OptionValue[EvolutionTimelevels]] &, evolvedGroups]; + + rhsGroupStructures = + Map[rhsGroupInterfaceStructure[groupFromName[#, groups], + OptionValue[EvolutionTimelevels]] &, rhsGroups]; + + groupStructures = Join[nonevolvedGroupStructures, + evolvedGroupStructures, rhsGroupStructures]; + + interface = CreateInterface[implementation, inheritedImplementations, + Join[includeFiles, {CactusBoundary`GetIncludeFiles[]}, + If[OptionValue[UseLoopControl], {"loopcontrol.h"}, {}]], + groupStructures, + UsesFunctions -> + Join[{registerEvolved, (*registerConstrained,*) diffCoeff}, + CactusBoundary`GetUsedFunctions[]]]; + Return[interface]]; + + +End[]; + +EndPackage[]; diff --git a/Tools/CodeGen/Kranc.m b/Tools/CodeGen/Kranc.m new file mode 100644 index 0000000..fd07c53 --- /dev/null +++ b/Tools/CodeGen/Kranc.m @@ -0,0 +1,95 @@ + +(* Copyright 2004 Sascha Husa, Ian Hinder, Christiane Lechner + + This file is part of Kranc. + + Kranc is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Kranc is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Kranc; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*) + +BeginPackage["Kranc`"]; + +(* CodeGen.m *) + +{INV, SQR, CUB, QAD, exp, pow, fmax, fmin, dx, dy, dz, khalf, kthird, ktwothird, kfourthird, keightthird}; + +(* Helpers.m *) + +dummy; + +(* CalculationFunction.m *) + +{GridFunctions, Shorthands, Equations, t, DeclarationIncludes, +LoopPreIncludes, GroupImplementations, PartialDerivatives, NoSimplify, +Boundary, Interior, InteriorNoSync, Where, AddToStencilWidth, +Everywhere, normal1, normal2, normal3, INV, SQR, CUB, QAD, dot, pow, +exp, dx, dy, dz, idx, idy, idz} + +{ConditionalOnKeyword, ConditionalOnKeywords, CollectList, Interior, +InteriorNoSync, Boundary, BoundaryWithGhosts, Where, PreDefinitions, +AllowedSymbols, Parameters, ConditionalOnTextuals}; + +(* Differencing.m *) + +{Name, Definitions, shift, spacing, SBPDerivative}; + +(* KrancThorn.m *) + +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, + IncludeFiles -> {}}; + +(* Thorn.m *) + +{AccumulatorBase, ThornImplementation, Name, Type, Extend, Default, +Comment, Range, Implementation, Group, SchedulePoint, Language, +SynchronizedGroups, StorageGroups, Timelevels, MaxTimelevels, +VariableType, GridType, +Visibility, Variables, Implementations, Value, AllowedValues, +UsedParameters, Description, ExtendedParameters, NewParameters, +Directory, Configuration, Interface, Param, Schedule, Sources, Makefile, +Filename, +Contents, ThornName, BaseImplementation, EvolvedGFs, PrimitiveGFs, +Groups, Calculation, GridFunctions, Shorthands, Equations, Parameter, +Value, UsesFunctions, ArgString, Conditional, Conditionals, D1, D2, D3, D11, D22, +D33, D21, D31, D32, Textual, TriggerGroups, Include, RHSGroups, Tags, +Steerable, Never, Always, Recover}; + +{ExcisionGFs}; + +(* TensorTools.m *) + +{D1, D2, D3, D11, D22, D33, D21, D31, D32, D12, D13, D23, dot, Eps, Zero3} + +EndPackage[]; diff --git a/Tools/CodeGen/KrancGroups.m b/Tools/CodeGen/KrancGroups.m index a9670e2..05ebdea 100644 --- a/Tools/CodeGen/KrancGroups.m +++ b/Tools/CodeGen/KrancGroups.m @@ -24,12 +24,8 @@ (* Manipulate Kranc group structures *) (****************************************************************************) -BeginPackage["sym`"]; -{Timelevels} -EndPackage[]; - BeginPackage["KrancGroups`", - {"sym`", "Errors`", "MapLookup`"}]; + {"Kranc`", "Errors`", "MapLookup`"}]; CreateGroup; groupsFromGFs::usage = ""; diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m index d32b11f..9954ec6 100644 --- a/Tools/CodeGen/KrancThorn.m +++ b/Tools/CodeGen/KrancThorn.m @@ -24,42 +24,10 @@ (* Generate Cactus Thorns from a high-level interface *) (****************************************************************************) -BeginPackage["sym`"]; - -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, - IncludeFiles -> {}}; - -{ConditionalOnKeyword, ConditionalOnKeywords, CollectList, Interior, -InteriorNoSync, Boundary, BoundaryWithGhosts, Where, PreDefinitions, -AllowedSymbols, Parameters, ConditionalOnTextuals}; - -EndPackage[]; - -BeginPackage["KrancThorn`", {"CodeGen`", "sym`", "Thorn`", +BeginPackage["KrancThorn`", {"CodeGen`", "Thorn`", "MapLookup`", "KrancGroups`", "Differencing`", "CalculationFunction`", "Errors`", "Helpers`", "CactusBoundary`", - "TensorTools`", "Param`", "Schedule`"}]; + "TensorTools`", "Param`", "Schedule`", "Interface`", "Kranc`"}]; CreateKrancThorn::usage = "Construct a Kranc thorn"; CreateKrancThornTT::usage = "Construct a Kranc thorn using TensorTools"; @@ -157,7 +125,7 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ reflectionSymmetries = OptionValue[ReflectionSymmetries]; useCSE = OptionValue[UseCSE]; - coordGroup = {"grid::coordinates", {sym`x,sym`y,sym`z,sym`r}}; + coordGroup = {"grid::coordinates", {Kranc`x,Kranc`y,Kranc`z,Kranc`r}}; groups = Join[groupsOrig, {coordGroup}]; includeFiles = Join[includeFiles, {"GenericFD.h", "Symmetry.h", "sbp_calc_coeffs.h"}]; @@ -199,7 +167,7 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ (* Construct the interface file *) InfoMessage[Terse, "Creating interface file"]; - interface = createKrancInterface[nonevolvedGroups, + interface = CreateKrancInterface[nonevolvedGroups, evolvedGroups, rhsGroups, groups, implementation, inheritedImplementations, includeFiles, opts]; @@ -312,117 +280,6 @@ extractNonevolvedGroups[declaredGroups_, calcs_, groups_] := Return[nonevolvedGroups]]; -(* -------------------------------------------------------------------------- - Interface and variable definitions - -------------------------------------------------------------------------- *) - -nonevolvedGroupInterfaceStructure[group_] := -{ - Name -> groupName[group], - VariableType -> "CCTK_REAL", - Timelevels -> NonevolvedTimelevels[group], - GridType -> "GF", - Comment -> groupName[group], - Visibility -> "public", - Tags -> Join[GroupTags[group]], - Variables -> groupVariables[group] -} - -evolvedGroupInterfaceStructure[group_, timelevels_] := -{ - Name -> groupName[group], - VariableType -> "CCTK_REAL", - Timelevels -> timelevels, - GridType -> "GF", - Comment -> groupName[group], - Visibility -> "public", - Tags -> GroupTags[group], - Variables -> groupVariables[group] -} - -rhsGroupInterfaceStructure[group_, timelevels_] := -{ - Name -> groupName[group], - VariableType -> "CCTK_REAL", - Timelevels -> timelevels, - GridType -> "GF", - Comment -> groupName[group], - Visibility -> "public", - Tags -> GroupTags[group], - Variables -> groupVariables[group] -} - - -Options[createKrancInterface] = ThornOptions; - -createKrancInterface[nonevolvedGroups_, evolvedGroups_, rhsGroups_, groups_, - implementation_, inheritedImplementations_, - includeFiles_, opts:OptionsPattern[]] := - - Module[{registerEvolved, (*registerConstrained,*) - nonevolvedGroupStructures, evolvedGroupStructures, rhsGroupStructures, - groupStructures, interface}, - VerifyGroupNames[nonevolvedGroups]; - VerifyGroupNames[evolvedGroups]; - VerifyGroupNames[rhsGroups]; - VerifyGroups[groups]; - VerifyString[implementation]; - VerifyStringList[inheritedImplementations]; - VerifyStringList[includeFiles]; - (* These are the aliased functions that are USED by this thorn from other thorns *) - registerEvolved = - { - Name -> "MoLRegisterEvolved", - Type -> "CCTK_INT", - ArgString -> "CCTK_INT IN EvolvedIndex, CCTK_INT IN RHSIndex" - }; - - (* - registerConstrained = - { - Name -> "MoLRegisterConstrained", - Type -> "CCTK_INT", - ArgString -> "CCTK_INT IN ConstrainedIndex" - }; - *) - - diffCoeff = - { - Name -> "Diff_coeff", - Type -> "SUBROUTINE", - ArgString -> "CCTK_POINTER_TO_CONST IN cctkGH, CCTK_INT IN dir, CCTK_INT IN nsize, CCTK_INT OUT ARRAY imin, CCTK_INT OUT ARRAY imax, CCTK_REAL OUT ARRAY q, CCTK_INT IN table_handle" - }; - - - (* For each group declared in this thorn, we need an entry in the - interface file. Each evolved group needs an associated rhs - group, but these are constructed at a higher level and are - listed in the nonevolved groups. *) - nonevolvedGroupStructures = - Map[nonevolvedGroupInterfaceStructure[groupFromName[#, groups]] &, - nonevolvedGroups]; - - evolvedGroupStructures = - Map[evolvedGroupInterfaceStructure[groupFromName[#, groups], - OptionValue[EvolutionTimelevels]] &, evolvedGroups]; - - rhsGroupStructures = - Map[rhsGroupInterfaceStructure[groupFromName[#, groups], - OptionValue[EvolutionTimelevels]] &, rhsGroups]; - - groupStructures = Join[nonevolvedGroupStructures, - evolvedGroupStructures, rhsGroupStructures]; - - interface = CreateInterface[implementation, inheritedImplementations, - Join[includeFiles, {CactusBoundary`GetIncludeFiles[]}, - If[OptionValue[UseLoopControl], {"loopcontrol.h"}, {}]], - groupStructures, - UsesFunctions -> - Join[{registerEvolved, (*registerConstrained,*) diffCoeff}, - CactusBoundary`GetUsedFunctions[]]]; - Return[interface]]; - - Options[CreateSetterSourceWrapper] = ThornOptions; CreateSetterSourceWrapper[calc_, parameters_, derivs_, useCSE_, opts:OptionsPattern[]] := diff --git a/Tools/CodeGen/Param.m b/Tools/CodeGen/Param.m index 653da72..7821f40 100644 --- a/Tools/CodeGen/Param.m +++ b/Tools/CodeGen/Param.m @@ -18,13 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) -BeginPackage["sym`"]; - -Name; - -EndPackage[]; - -BeginPackage["Param`", {"Thorn`", "Errors`", "Helpers`", "MapLookup`", "sym`", "KrancGroups`"}]; +BeginPackage["Param`", {"Thorn`", "Errors`", "Helpers`", "MapLookup`", "KrancGroups`", "Kranc`"}]; CreateKrancParam; MakeFullParamDefs; diff --git a/Tools/CodeGen/Schedule.m b/Tools/CodeGen/Schedule.m index b4be59b..98105de 100644 --- a/Tools/CodeGen/Schedule.m +++ b/Tools/CodeGen/Schedule.m @@ -18,14 +18,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) -BeginPackage["sym`"]; +BeginPackage["Schedule`", {"Thorn`", "KrancGroups`", "MapLookup`", "Errors`", "Helpers`", "Kranc`"}]; CreateKrancScheduleFile; -EndPackage[]; - -BeginPackage["Blank`", {"Thorn`", "KrancGroups`", "MapLookup`", "Errors`", "Helpers`", "sym`"}]; - Begin["`Private`"]; (* -------------------------------------------------------------------------- diff --git a/Tools/CodeGen/TensorTools.m b/Tools/CodeGen/TensorTools.m index ec099ea..e05188c 100644 --- a/Tools/CodeGen/TensorTools.m +++ b/Tools/CodeGen/TensorTools.m @@ -18,16 +18,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *) -(* Place these symbols in the sym context *) -BeginPackage["sym`"]; -{D1, D2, D3, D11, D22, D33, D21, D31, D32, D12, D13, D23, dot, Eps, Zero3} -EndPackage[]; - -BeginPackage["TensorTools`", {"Errors`", "MapLookup`"}]; +BeginPackage["TensorTools`", {"Errors`", "MapLookup`", "Kranc`"}]; (* Cause the sym context to be added to the context of anyone loading this package *) -$ContextPath = Join[{"sym`"}, $ContextPath]; +(*$ContextPath = Join[{"sym`"}, $ContextPath]; *) (* Define usage messages for these functions. Mentioning them here adds them to the TensorTools context *) diff --git a/Tools/CodeGen/Thorn.m b/Tools/CodeGen/Thorn.m index 5de5dff..083e787 100644 --- a/Tools/CodeGen/Thorn.m +++ b/Tools/CodeGen/Thorn.m @@ -23,32 +23,7 @@ (* This package provides a set of functions to create the various parts of a Cactus thorn and assemble them. *) -BeginPackage["sym`"]; - -(* These symbols are used in this file. Whenever this package is - used, the symbols will be added into the sym` context. You will - need to make sure the sym` context is on your ContextPath to use - the symbols without the sym` prefix. *) - -{AccumulatorBase, ThornImplementation, Name, Type, Extend, Default, -Comment, Range, Implementation, Group, SchedulePoint, Language, -SynchronizedGroups, StorageGroups, Timelevels, MaxTimelevels, -VariableType, GridType, -Visibility, Variables, Implementations, Value, AllowedValues, -UsedParameters, Description, ExtendedParameters, NewParameters, -Directory, Configuration, Interface, Param, Schedule, Sources, Makefile, -Filename, -Contents, ThornName, BaseImplementation, EvolvedGFs, PrimitiveGFs, -Groups, Calculation, GridFunctions, Shorthands, Equations, Parameter, -Value, UsesFunctions, ArgString, Conditional, Conditionals, D1, D2, D3, D11, D22, -D33, D21, D31, D32, Textual, TriggerGroups, Include, RHSGroups, Tags, -Steerable, Never, Always, Recover}; - -{ExcisionGFs}; - -EndPackage[]; - -BeginPackage["Thorn`", "CodeGen`", "CalculationFunction`", "MapLookup`", "KrancGroups`", "Helpers`", "Errors`"]; +BeginPackage["Thorn`", "CodeGen`", "CalculationFunction`", "MapLookup`", "KrancGroups`", "Helpers`", "Errors`", "Kranc`"]; (* These functions are externally visible, and comprise the public interface to this package. *) @@ -70,7 +45,7 @@ CreatePrecompMacros::usage = ""; CreateStartupFile::usage = ""; (* Ensure that we can refer to symbols without the `sym prefix *) -$ContextPath = Join[{"sym`"}, $ContextPath]; +(*$ContextPath = Join[{"sym`"}, $ContextPath];*) Begin["`Private`"]; |