Skip to content
Snippets Groups Projects
Commit e1c1dfb6 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Add support for assembling on subspace basis only

When using a subspace basis, the `DuneFunctions*`-assemblers
still partly assembled pattern and entries for the full basis.
To be precise:

a)The local matrix/vector was set to `localView.size()` which is
  the size of the full space. Hence this still works for a subspace
  basis, if the local assembler always uses `localIndex()` when
  accessing the local matrix/vector. However, it would only
  change local entries associated to the subspace.
b)All entries of the local matrix where added to the matrix patter
  and the entries. This also included the non-touched local entries
  associated to DOFs which are not in the subspace.

This MR leaves a) as it is but changes b). a) is kept, because otherwise
it's hard to get proper local indices. b) is changed such that only
local entries from the subspace are added to the matrix pattern/entries.

This allows to only assemble those parts of the matrix associated to the
subtree and thus avoids adding many zeros for the other entries. If the
pattern is also assembled for the subspace, it will not contain entries
for other DOFs.

There's one corner case where this may break existing code: If you
have used these assemblers on a subspace basis and rely on the fact
that it always builds the pattern for the full matrix.
parent f18ff649
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment