semidiscretize needs a proper rewrite now that the requirements are clear.
Generally speaking the given for
semidiscretize(model, discretization, mesh)
works fine. A critical missing piece so far has been that we were neither able to control the quadrature rule precisely enough, nor was it easy to properly control the subdomains. Subdomain instantiation is right now a responsibility of the model, which makes some parts really hard to optimize. I worked out the following so far for the rewrite
- semidiscretize accepts a dictionary (or similar) of subdomain-model pairs. If the only a model is passed, then we assume the model is defined on the full mesh (which is the current behavior)
- We need a resolver for the model which can extract the function (as in SciML model function) type, e.g. QuasiStaticModel .
- Coupled models get resolved sequentially into the most common function type to ensure a proper evaluation exists. If not, then we probably should just directly error.
- The FEM discretization object should come with a dictionary from symbols to quadrature rules. Each model should come with a set of symbols, one symbol for each form involved. In addition there should be a special spectral quadrature option to optimize mass matrix evaluations.
- Instead of using the symbols in the discretizations' interpolation dict, now the models should have a function which returns a vector of symbols for the involved unknowns. This is necessary, because in some problems we also want control over other interpolations involved (e.g. in Petrov-Galerkin).
This way we should be able to handle all monolithic models in a single semidiscretize. I am not sure yet if we can also get away with a generic semidiscretize for the split models. But that is a story for another day.
semidiscretize needs a proper rewrite now that the requirements are clear.
Generally speaking the given for
semidiscretize(model, discretization, mesh)works fine. A critical missing piece so far has been that we were neither able to control the quadrature rule precisely enough, nor was it easy to properly control the subdomains. Subdomain instantiation is right now a responsibility of the model, which makes some parts really hard to optimize. I worked out the following so far for the rewrite
This way we should be able to handle all monolithic models in a single semidiscretize. I am not sure yet if we can also get away with a generic semidiscretize for the split models. But that is a story for another day.