Ferrite-FEM / Ferrite.jl

Finite element toolbox for Julia
https://ferrite-fem.github.io
Other
346 stars 92 forks source link

Dof distribution methods #378

Closed termi-official closed 1 year ago

termi-official commented 3 years ago

The DofHandler can be improved for multi-field problems. Currently only one distribution mode is implemented. For example taking two scalar fields a and b the call to close! yields the discrete algebraic vector (a_1, b_1, a_2, b_2, ..., a_N, b_N). However, this form is not always preferable, because it yields a locally blocked system matrix. For problems like for example the steady state incompressible Navier-Stokes flows some preconditioners need globally blocked system - see deal ii example 57 for a concise description. The corresponding algebraic vector then becomes (a_1, a_2, ... , a_N, b_1, b_2, ... , b_N). This can be achieved by either calling renumber! with a properly constructed permutation vector or by modifying __close!. Block preconditioners can then be constructed via BlockArrays.jl

This requires to add corresponding tests and a small example to showcase the usage.

fredrikekre commented 1 year ago

Fixed by #545 I think. You have to explicitly renumber after close!, but I don't think things would be more efficient if we let users pass the order to close! and it would simply call renumber! after distributing dofs.