autopdex.SimState.add_local_subsystem
- SimState.add_local_subsystem(key: str, local_dae: ~typing.Callable, fields: str | ~typing.List[str] | ~typing.Tuple[str, ...], root_solver: ~typing.Callable = <function newton_solver>)[source]
Register a local (element-level) DAE subsystem for internal variables.
The subsystem is solved on demand from a model integrand via
ModelContext.solve_local(key, ...)and is materialized ininitialize(...).- Parameters:
key – Unique, non-empty name used to invoke the subsystem.
local_dae – Callable
(q_fun, t, settings)defining the local residual/DAE.fields – Internal variable field name(s) the subsystem solves for. All must be registered as internal variables (not primary fields) and have a time integrator set via
add_temporal_discretization(...).root_solver – Root solver for the local system (default:
dae.newton_solver).