Skip to content

refactor: centralize all code generation #3360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Feb 3, 2025
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d90dda3
feat: allow specifying observed equations to `observed_equations_used…
AayushSabharwal Jan 30, 2025
cf40621
fix: fix `observed_equations_used_by` for `DiscreteSystem`
AayushSabharwal Jan 30, 2025
b50cb27
feat: add `build_function_wrapper` for centralized codegen
AayushSabharwal Jan 30, 2025
9166c74
refactor: use `build_function_wrapper` in `generate_tgrad`
AayushSabharwal Jan 30, 2025
2887ca4
refactor: use `build_function` in `generate_jacobian(::AbstractODESys…
AayushSabharwal Jan 30, 2025
3574e3f
refactor: use `build_function_wrapper` in `generate_control_jacobian`
AayushSabharwal Jan 30, 2025
f183e8e
refactor: use `build_function_wrapper` in `generate_dae_jacobian`
AayushSabharwal Jan 30, 2025
d162999
refactor: use `build_function_wrapper` in `generate_function(::Abstra…
AayushSabharwal Jan 30, 2025
7010d12
refactor: use new codegen in `ODEFunction`
AayushSabharwal Jan 30, 2025
92364b8
refactor: use new codegen in `DAEFunction`
AayushSabharwal Jan 30, 2025
141fcab
refactor: use new codegen in `ODEFunctionClosure`, `DAEFunctionClosure`
AayushSabharwal Jan 30, 2025
a3ff92f
refactor: use `build_function_wrapper` in `generate_diffusion_function`
AayushSabharwal Jan 30, 2025
b0fdacf
refactor: use new codegen in `SDEFunction`
AayushSabharwal Jan 30, 2025
cff74a9
refactor: use `build_function_wrapper` in `generate_jacobian(::Nonlin…
AayushSabharwal Jan 30, 2025
517c1a5
refactor: use `build_function_wrapper` in `generate_hessian(::Nonline…
AayushSabharwal Jan 30, 2025
4c7cffd
refactor: use `build_function_wrapper` in `generate_function(::Nonlin…
AayushSabharwal Jan 30, 2025
0bc240d
refactor: use new codegen in `NonlinearFunction`, `IntervalNonlinearF…
AayushSabharwal Jan 30, 2025
de83f70
fix: handle extra constants in `build_function_wrapper`
AayushSabharwal Jan 30, 2025
a845c2b
feat: better observed handling, optional `DestructuredArgs` binding i…
AayushSabharwal Jan 30, 2025
60d501b
fix: use `time_varying_as_func` in `build_function_wrapper`
AayushSabharwal Jan 30, 2025
1cab1c3
feat: better delay handling, preface handling in `build_function_wrap…
AayushSabharwal Jan 30, 2025
106b05a
refactor: use `build_function_wrapper` in callbacks
AayushSabharwal Jan 30, 2025
d6607f9
refactor: use `build_function_wrapper` in `generate_custom_function`
AayushSabharwal Jan 30, 2025
f9a5027
fix: don't consider parameters as delays
AayushSabharwal Jan 30, 2025
5637a0c
refactor: use `build_function_wrapper` in `SymbolicTstops`
AayushSabharwal Jan 30, 2025
6491c17
refactor: use `build_function_wrapper` for history functions
AayushSabharwal Jan 30, 2025
ead141a
refactor: refactor `generate_function(::DiscreteSystem)` to use new c…
AayushSabharwal Jan 30, 2025
dc09909
refactor: use `build_function_wrapper` in `JumpSystem` codegen
AayushSabharwal Jan 30, 2025
95a75ab
refactor: fix `linearize_symbolic` to respect new codegen
AayushSabharwal Jan 30, 2025
1600013
fix: refactor `modelingtoolkitize` to use new codegen
AayushSabharwal Jan 30, 2025
a42cec7
test: use new codegen in index reduction test
AayushSabharwal Jan 30, 2025
5e7b583
test: use new codegen in distributed test
AayushSabharwal Jan 30, 2025
8ce0eb2
test: use new codegen in jumpsystem test
AayushSabharwal Jan 30, 2025
f9069b1
test: use new codegen in odesystem test
AayushSabharwal Jan 30, 2025
ddce985
test: use new codegen in sdesystem test
AayushSabharwal Jan 30, 2025
b8d9de5
test: use new codegen in labelledarrays tests
AayushSabharwal Jan 30, 2025
5fb0eff
fix: add `collect_constants!` fallback for `Symbol`
AayushSabharwal Jan 31, 2025
3e33d96
feat: support `get_cmap(::OptimizationSystem)`
AayushSabharwal Jan 31, 2025
29ef316
fix: handle array symbolics in `observed_equations_used_by`
AayushSabharwal Jan 31, 2025
322b5db
feat: add output type support to `build_function_wrapper`
AayushSabharwal Jan 31, 2025
07f8206
fix: fix `all_symbols` not returning dependent parameters
AayushSabharwal Jan 31, 2025
0774860
feat: use `build_function_wrapper` in `build_explicit_observed_function`
AayushSabharwal Jan 31, 2025
14020bd
feat: allow opting out of destructuring `MTKParameters` in `build_fun…
AayushSabharwal Jan 31, 2025
4686893
refactor: use `build_function_wrapper` in `generate_control_function`
AayushSabharwal Jan 31, 2025
f28df16
fix: refactor `modelingtoolkitize(::OptimizationProblem)` to use new …
AayushSabharwal Jan 31, 2025
cff02c9
refactor: use `build_function_wrapper` in `OptimizationProblem` codegen
AayushSabharwal Jan 31, 2025
4274ec9
docs: add docstring for code generation utils
AayushSabharwal Jan 31, 2025
dfc49b4
feat: add `extra_assignments` to `build_function_wrapper`
AayushSabharwal Jan 31, 2025
884a0fb
refactor: use `build_function_wrapper` in `SCCNonlinearProblem`
AayushSabharwal Jan 31, 2025
4c39175
fix: search through filtered observed equations in `build_function_wr…
AayushSabharwal Feb 3, 2025
1fc081f
build: bump Symbolics compat
AayushSabharwal Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: use new codegen in index reduction test
  • Loading branch information
AayushSabharwal committed Feb 3, 2025
commit a42cec7a39dd5702cd2dd257879098e476b581a4
2 changes: 1 addition & 1 deletion test/structural_transformation/index_reduction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ first_order_idx1_pendulum = complete(ode_order_lowering(idx1_pendulum))

using OrdinaryDiffEq
using LinearAlgebra
prob = ODEProblem(ODEFunction(first_order_idx1_pendulum),
prob = ODEProblem(first_order_idx1_pendulum,
# [x, y, w, z, xˍt, yˍt, T]
[1, 0, 0, 0, 0, 0, 0.0],# 0, 0, 0, 0],
(0, 10.0),
Expand Down