aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen/KrancThorn.m
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/CodeGen/KrancThorn.m')
-rw-r--r--Tools/CodeGen/KrancThorn.m18
1 files changed, 10 insertions, 8 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m
index e4a0478..53d7bba 100644
--- a/Tools/CodeGen/KrancThorn.m
+++ b/Tools/CodeGen/KrancThorn.m
@@ -70,6 +70,14 @@ DefFn[
c = AppendObjectField[c, "InheritedImplementations", "Grid"];
c]];
+DefFn[
+ genericFDProcessCode[cIn_Code, opts___] :=
+ Module[
+ {c = cIn},
+ c = AppendObjectField[c, "IncludeFiles", "GenericFD.h"];
+ c = AppendObjectField[c, "InheritedImplementations", "GenericFD"];
+ c]];
+
(* --------------------------------------------------------------------------
Thorn generation (main entry point for non-tensorial thorns)
-------------------------------------------------------------------------- *)
@@ -106,10 +114,10 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[
"Sources" -> {}}];
(* ------------------------------------------------------------------------
- Add required include files
+ GenericFD
------------------------------------------------------------------------ *)
- c = AppendObjectField[c, "IncludeFiles", "GenericFD.h"];
+ c = genericFDProcessCode[c, opts];
(* ------------------------------------------------------------------------
Add conservation differencing operators to partialDerivs
@@ -175,12 +183,6 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[
GetObjectField[c, "Calculations"]],1]]]];
(* ------------------------------------------------------------------------
- Inherited implementations
- ------------------------------------------------------------------------ *)
-
- c = AppendObjectField[c, "InheritedImplementations", "GenericFD"];
-
- (* ------------------------------------------------------------------------
Check input parameters
------------------------------------------------------------------------ *)