aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2013-09-11 11:35:56 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2013-09-11 11:35:56 +0200
commit4eb575afa7fd89cfd1e140badbad569373b0c279 (patch)
tree571fc08b45d6b0ebee26506167caf1bf4dd845ff
parent04da452636ed006901602e924900ea71378f55b5 (diff)
Remove now-unused arguments and code from interface file generation
-rw-r--r--Tools/CodeGen/Interface.m148
-rw-r--r--Tools/CodeGen/KrancThorn.m4
2 files changed, 3 insertions, 149 deletions
diff --git a/Tools/CodeGen/Interface.m b/Tools/CodeGen/Interface.m
index 5ea6b08..2d4a62e 100644
--- a/Tools/CodeGen/Interface.m
+++ b/Tools/CodeGen/Interface.m
@@ -26,88 +26,6 @@ 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 -> GroupTags[group],
- Variables -> groupVariables[group]
-}
-
-nonevolvedODEGroupInterfaceStructure[group_] :=
-{
- Name -> groupName[group],
- VariableType -> "CCTK_REAL",
- Timelevels -> NonevolvedTimelevels[group],
- GridType -> "array",
- Comment -> groupName[group],
- Visibility -> "public",
- Tags -> GroupTags[group],
- Dim -> 1,
- Size -> 1,
- 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]
-}
-
-evolvedODEGroupInterfaceStructure[group_, timelevels_] :=
-{
- Name -> groupName[group],
- VariableType -> "CCTK_REAL",
- Timelevels -> timelevels,
- GridType -> "array",
- Comment -> groupName[group],
- Visibility -> "public",
- Tags -> GroupTags[group],
- Dim -> 1,
- Size -> 1,
- 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]
-}
-
-rhsODEGroupInterfaceStructure[group_, timelevels_] :=
-{
- Name -> groupName[group],
- VariableType -> "CCTK_REAL",
- Timelevels -> timelevels,
- GridType -> "array",
- Comment -> groupName[group],
- Visibility -> "public",
- Tags -> GroupTags[group],
- Dim -> 1,
- Size -> 1,
- Variables -> groupVariables[group]
-}
-
declaredGroupInterfaceStructure[group_] :=
Module[
{extras, gridType},
@@ -127,37 +45,17 @@ declaredGroupInterfaceStructure[group_] :=
Options[CreateKrancInterface] = ThornOptions;
-CreateKrancInterface[nonevolvedGroups_, evolvedGroups_, rhsGroups_,
- nonevolvedODEGroups_, evolvedODEGroups_, rhsODEGroups_, declaredGroups_, groups_,
+CreateKrancInterface[declaredGroups_, groups_,
implementation_, inheritedImplementations_,
includeFiles_, opts:OptionsPattern[]] :=
- Module[{registerEvolved, (*registerConstrained,*)
- nonevolvedGroupStructures, evolvedGroupStructures, rhsGroupStructures,
- nonevolvedODEGroupStructures, evolvedODEGroupStructures, rhsODEGroupStructures,
- groupStructures, interface, getMap, declaredGroupStructures, oldDeclaredGroups},
- VerifyGroupNames[nonevolvedGroups];
- VerifyGroupNames[evolvedGroups];
- VerifyGroupNames[rhsGroups];
- VerifyGroupNames[nonevolvedODEGroups];
- VerifyGroupNames[evolvedODEGroups];
- VerifyGroupNames[rhsODEGroups];
+ Module[{diffCoeff, getMap, declaredGroupStructures, interface},
VerifyGroups[groups];
VerifyString[implementation];
VerifyStringList[inheritedImplementations, "InheritedImplementations"];
VerifyStringList[includeFiles, "IncludeFiles"];
(* These are the aliased functions that are USED by this thorn from other thorns *)
- oldDeclaredGroups = Join[nonevolvedGroups, evolvedGroups, rhsGroups, nonevolvedODEGroups,
- evolvedODEGroups, rhsODEGroups];
-
- If[Union@oldDeclaredGroups =!= Union@declaredGroups,
- Print["Group name mismatch:"];
- Print["allGroupNames = ", Union@oldDeclaredGroups];
- Print["declaredGroups = ", Union@Global`declaredGroups];
- Print[""];
- Quit[1]];
-
diffCoeff =
{
Name -> "Diff_coeff",
@@ -172,51 +70,10 @@ CreateKrancInterface[nonevolvedGroups_, evolvedGroups_, rhsGroups_,
ArgString -> "CCTK_POINTER_TO_CONST IN cctkGH"
};
- nonevolvedGroupStructures =
- Map[nonevolvedGroupInterfaceStructure[groupFromName[#, groups]] &,
- nonevolvedGroups];
-
- evolvedGroupStructures =
- Map[evolvedGroupInterfaceStructure[groupFromName[#, groups],
- OptionValue[EvolutionTimelevels]] &, evolvedGroups];
-
- rhsGroupStructures =
- Map[rhsGroupInterfaceStructure[groupFromName[#, groups],
- OptionValue[EvolutionTimelevels]] &, rhsGroups];
-
- nonevolvedODEGroupStructures =
- Map[nonevolvedODEGroupInterfaceStructure[groupFromName[#, groups]] &,
- nonevolvedODEGroups];
-
- evolvedODEGroupStructures =
- Map[evolvedODEGroupInterfaceStructure[groupFromName[#, groups],
- OptionValue[EvolutionTimelevels]] &, evolvedODEGroups];
-
- rhsODEGroupStructures =
- Map[rhsODEGroupInterfaceStructure[groupFromName[#, groups],
- OptionValue[EvolutionTimelevels]] &, rhsODEGroups];
-
declaredGroupStructures =
Map[declaredGroupInterfaceStructure[groupFromName[#, groups]] &,
declaredGroups];
-
- groupStructures = Join[nonevolvedGroupStructures,
- evolvedGroupStructures, rhsGroupStructures,
- nonevolvedODEGroupStructures,
- evolvedODEGroupStructures, rhsODEGroupStructures];
-
- If[Union@groupStructures =!= Union@declaredGroupStructures,
- Print["groupStructures =!= declaredGroupStructures:"];
- (* Print["groupStructures = ", Union@groupStructures]; *)
- Print["groups = "];
- PrintStructure[groups];
- Print["groupStructures = "];
- PrintStructure[Union@groupStructures];
- Print["declaredGroupStructures = "];
- PrintStructure[Union@declaredGroupStructures];
- Quit[1]];
-
interface = Join[CreateInterface[implementation, inheritedImplementations,
Join[includeFiles, {CactusBoundary`GetIncludeFiles[]},
{"loopcontrol.h"},
@@ -230,7 +87,6 @@ CreateKrancInterface[nonevolvedGroups_, evolvedGroups_, rhsGroups_,
Return[interface]];
-
End[];
EndPackage[];
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m
index 8b6ed15..7377505 100644
--- a/Tools/CodeGen/KrancThorn.m
+++ b/Tools/CodeGen/KrancThorn.m
@@ -223,9 +223,7 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[
(* Construct the interface file *)
InfoMessage[Terse, "Creating interface file"];
- interface = CreateKrancInterface[nonevolvedGroups,
- evolvedGroups, rhsGroups, nonevolvedODEGroups, evolvedODEGroups,
- rhsODEGroups, declaredGroups, groups,
+ interface = CreateKrancInterface[declaredGroups, groups,
implementation, inheritedImplementations, includeFiles, opts];
(* Construct the param file *)