﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6377	Avoid generating dense Jacobian above a certain size and set default solvers accordingly	Francesco Casella	Karim Adbdelhak	"From what I can understand, the choice between using dense and sparse solvers is deferred to the runtime, since simulation flags such as {{{-s}}}, {{{-idaLS}}}, {{{-nls}}}, {{{-nlsLS}}} etc. allow to pick which one is used after the code has been compiled. This is relevant in several contexts where Jacobians are needed:
- initial equations
- lambda0-initial equations
- algebraic loops in {{{odeMode}}}
- symbolic Jacobians for stiff ODE solvers
- DAE Jacobians in {{{daeMode}}}

I guess setting {{{-daeMode}}} avoids the generation and use of dense Jacobians for the direct DAE solution, which is really only possible with sparse solvers. @Karim, @AnHeuermann, could you please confirm that?

Anyway, I guess we should also skip building, analyzing, and generating code for dense jacobians in all other contexts, as soon as their size/density exceeds a certain threshold, which should be defined by compiler flags, and later read and used as default by the runtime. 

For sure it makes no sense to waste time and memory handling dense matrices with more than a few hundred lines and columns, if they are sparse and sparse solvers are available.

See also #6342 for a discussion on the criteria.

Doing this should automatically ensure that reasonable choices are taken by default in terms of whether or not generating code for sparse/dense solvers, and in terms of automatic choice of the right solver given the structure and size of the problem."	defect	assigned	blocker	1.19.0	*unknown*	1.18.0-dev			Andreas Heuermann Philip Hannebohm Martin Sjölund
