You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/systems/diffeqs/odesystem.jl
+4-3
Original file line number
Diff line number
Diff line change
@@ -454,8 +454,8 @@ Generates a function that computes the observed value(s) `ts` in the system `sys
454
454
- `checkbounds = true` checks bounds if true when destructuring parameters
455
455
- `op = Operator` sets the recursion terminator for the walk done by `vars` to identify the variables that appear in `ts`. See the documentation for `vars` for more detail.
456
456
- `throw = true` if true, throw an error when generating a function for `ts` that reference variables that do not exist.
457
-
- `mkarray`; only used if the output is an array (that is, `!isscalar(ts)` and `ts` is not a tuple, in which case the result will always be a tuple). Called as `mkarray(ts, output_type)` where `ts` are the expressions to put in
458
-
the array and `output_type` is the argument of the same name passed to build_explicit_observed_function.
457
+
- `mkarray`: only used if the output is an array (that is, `!isscalar(ts)` and `ts` is not a tuple, in which case the result will always be a tuple). Called as `mkarray(ts, output_type)` where `ts` are the expressions to put in the array and `output_type` is the argument of the same name passed to build_explicit_observed_function.
458
+
- `cse = true`: Whether to use Common Subexpression Elimination (CSE) to generate a more efficient function.
459
459
460
460
## Returns
461
461
@@ -493,6 +493,7 @@ function build_explicit_observed_function(sys, ts;
493
493
param_only =false,
494
494
op = Operator,
495
495
throw =true,
496
+
cse =true,
496
497
mkarray =nothing)
497
498
is_tuple = ts isa Tuple
498
499
if is_tuple
@@ -579,7 +580,7 @@ function build_explicit_observed_function(sys, ts;
Copy file name to clipboardExpand all lines: src/systems/discrete_system/implicit_discrete_system.jl
+3-3
Original file line number
Diff line number
Diff line change
@@ -369,13 +369,13 @@ function SciMLBase.ImplicitDiscreteFunction{iip, specialize}(
369
369
t =nothing,
370
370
eval_expression =false,
371
371
eval_module =@__MODULE__,
372
-
analytic =nothing,
372
+
analytic =nothing, cse =true,
373
373
kwargs...) where {iip, specialize}
374
374
if!iscomplete(sys)
375
375
error("A completed `ImplicitDiscreteSystem` is required. Call `complete` or `structural_simplify` on the system before creating a `ImplicitDiscreteProblem`")
0 commit comments