diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-13 18:31:38 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-13 18:31:38 +0200 |
commit | 32d0ab3bffed254af57e5842eebe8a264bce9421 (patch) | |
tree | 0e0146feb392c3ac2c217617e0a5ec572b4f9b93 | |
parent | 5a2501ad37e2c1e38693acc3ba50a5aadb214668 (diff) |
KrancThorn.m: Move input parameter checking earlier in CreateKrancThorn
-rw-r--r-- | Tools/CodeGen/KrancThorn.m | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m index 20f8550..5125290 100644 --- a/Tools/CodeGen/KrancThorn.m +++ b/Tools/CodeGen/KrancThorn.m @@ -93,9 +93,12 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ Read named arguments and apply nontrivial defaults ------------------------------------------------------------------------ *) + InfoMessage[Terse, "Verifying arguments"]; cktCheckNamedArgs[{opts}]; - CheckGroups[groupsOrig]; + VerifyGroups[groupsOrig]; + VerifyString[parentDirectory]; + VerifyString[thornName]; c = NewObject[ Code, @@ -115,6 +118,10 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ "PartialDerivatives" -> OptionValue[PartialDerivatives], "Sources" -> {}}]; + VerifyString[GetObjectField[c, "Implementation"]]; + VerifyGroupNames[GetObjectField[c, "DeclaredGroups"]]; + VerifyGroupNames[GetObjectField[c, "ODEGroups"]]; + (* ------------------------------------------------------------------------ GenericFD ------------------------------------------------------------------------ *) @@ -186,14 +193,6 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ Check input parameters ------------------------------------------------------------------------ *) - InfoMessage[Terse, "Verifying arguments"]; - VerifyGroups[GetObjectField[c, "Groups"]]; - VerifyString[parentDirectory]; - VerifyString[GetObjectField[c, "Name"]]; - VerifyString[GetObjectField[c, "Implementation"]]; - VerifyGroupNames[GetObjectField[c, "DeclaredGroups"]]; - VerifyGroupNames[GetObjectField[c, "ODEGroups"]]; - If[OptionValue[UseJacobian], JacobianCheckGroups[GetObjectField[c, "Groups"]]]; (* ------------------------------------------------------------------------ |