Skip to content

Commit

Permalink
Calculation.m: Add parameters used in partial derivative definitions …
Browse files Browse the repository at this point in the history
…to GetCalculationParameters
  • Loading branch information
ianhinder committed Feb 2, 2012
1 parent b03b756 commit 988885a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Tools/CodeGen/Calculation.m
Expand Up @@ -64,13 +64,18 @@
GetEquations[calc_List] :=
lookup[calc,Equations]];

DefFn[
GetPartialDerivatives[calc_List] :=
lookup[calc,PartialDerivatives]];

DefFn[
GetCalculationParameters[calc_List] :=
Module[
{syms,params},
{syms,pdSyms,params},
syms = Cases[GetEquations[calc], _?AtomQ|_String, {-1}];
pdSyms = Cases[GetPartialDerivatives[calc], _?AtomQ|_String, {-1}];
params = lookup[calc,Parameters];
Join[Intersection[params,syms],{Global`fdOrder}]]];
Intersection[params,Join[syms,pdSyms]]]];

DefFn[
GetCalculationName[calc_List] :=
Expand Down

0 comments on commit 988885a

Please sign in to comment.