aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2013-09-11 11:52:47 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2013-09-11 11:52:47 +0200
commit006b20c44bc504f17fb9f47e012e823da972d97d (patch)
treee732d069084e5042193aaf2ac28778c9b59357f9
parent4eb575afa7fd89cfd1e140badbad569373b0c279 (diff)
Interface.m: Modernise type checking
-rw-r--r--Tools/CodeGen/Interface.m16
1 files changed, 6 insertions, 10 deletions
diff --git a/Tools/CodeGen/Interface.m b/Tools/CodeGen/Interface.m
index 2d4a62e..22671a7 100644
--- a/Tools/CodeGen/Interface.m
+++ b/Tools/CodeGen/Interface.m
@@ -26,7 +26,7 @@ CreateKrancInterface;
Begin["`Private`"];
-declaredGroupInterfaceStructure[group_] :=
+DefFn[declaredGroupInterfaceStructure[group_List] :=
Module[
{extras, gridType},
extras = GroupExtras[group];
@@ -41,19 +41,15 @@ declaredGroupInterfaceStructure[group_] :=
Tags -> GroupTags[group],
gridType /. {"array" -> Sequence[Dim -> 1, Size -> 1], _ -> Sequence[]},
Variables -> groupVariables[group]
- }];
+ }]];
Options[CreateKrancInterface] = ThornOptions;
-CreateKrancInterface[declaredGroups_, groups_,
- implementation_, inheritedImplementations_,
- includeFiles_, opts:OptionsPattern[]] :=
+DefFn[CreateKrancInterface[declaredGroups:{_String...}, groups_List,
+ implementation_String, inheritedImplementations:{_String...},
+ includeFiles:{_String...}, opts:OptionsPattern[]] :=
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 *)
diffCoeff =
@@ -85,7 +81,7 @@ CreateKrancInterface[declaredGroups_, groups_,
CactusBoundary`GetUsedFunctions[]]],
{If[OptionValue[UseCaKernel], CaKernelInterfaceCLL[], {}]}];
- Return[interface]];
+ Return[interface]]];
End[];