Skip to content

Commit baed9cd

Browse files
authored
Fix generate_sensitivity_code=False for event sensitivity functions (#3044)
With `generate_sensitivity_code=False`, amici still generated some unnecessary event sensivity functions. This is fixed here.
1 parent 9c82549 commit baed9cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/sdist/amici/exporters/sundials/cxx_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ def var_in_signature(self, varname: str, ode: bool = True) -> bool:
434434
func_name
435435
for func_name, func_info in functions.items()
436436
if "const int ip" in func_info.arguments()
437-
]
437+
] + ["deltaxB", "dzdx", "drzdx"]
438438

439439
#: list of sparse sensitivity functions
440440
sparse_sensi_functions = [
@@ -454,6 +454,7 @@ def var_in_signature(self, varname: str, ode: bool = True) -> bool:
454454
]
455455

456456
#: list of event sensitivity functions
457+
# (really only those that take `ie` and `ip` as arguments)
457458
event_sensi_functions = [
458459
func_name
459460
for func_name, func_info in functions.items()

0 commit comments

Comments
 (0)