aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen/Jacobian.m
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/CodeGen/Jacobian.m')
-rw-r--r--Tools/CodeGen/Jacobian.m13
1 files changed, 12 insertions, 1 deletions
diff --git a/Tools/CodeGen/Jacobian.m b/Tools/CodeGen/Jacobian.m
index ea74e05..db787b6 100644
--- a/Tools/CodeGen/Jacobian.m
+++ b/Tools/CodeGen/Jacobian.m
@@ -19,7 +19,7 @@
*)
BeginPackage["Jacobian`", {"Errors`", "Helpers`", "Kranc`", "Differencing`", "MapLookup`",
- "CodeGen`", "CodeGenC`", "KrancGroups`"}];
+ "CodeGen`", "CodeGenC`", "KrancGroups`", "Code`", "Object`"}];
JacobianQ;
InsertJacobian;
@@ -29,6 +29,7 @@ JacobianSymbols;
JacobianGroups;
JacobianCheckGroups;
JacobianConditionalGridFunctions;
+JacobianProcessCode;
Begin["`Private`"];
@@ -194,6 +195,16 @@ JacobianConditionalGridFunctions[] :=
"use_jacobian",
None};
+Options[JacobianProcessCode] = ThornOptions;
+
+DefFn[
+ JacobianProcessCode[c_Code, opts:OptionsPattern[]] :=
+ Module[
+ {},
+ If[OptionValue[UseJacobian],
+ JacobianCheckGroups[GetObjectField[c, "Groups"]]];
+ c]];
+
End[];
EndPackage[];