Well, yes, I'd like to have access to individual blocks as well (i.e., M
and B), but anyway, I know what to do now.
Thanks for the example and helpful discussion.
On Sunday, March 14, 2021 at 8:58:05 AM UTC-6 Wolfgang Bangerth wrote:
> On 3/14/21 3:23 PM, Andrey Volkov wrote:
> >
> > The system_matrix.block(0,0) gives access to a single block, namely *M
> > *(correct?). However, is there a way to access/extract _multiple blocks
> as a
> > whole block matrix_, let us say { [M B], [B 0] } or { [D E], [F G] }?
> >
> > Sure, I looked at step-20/22, as all I have done so far is based on
> these
> > tutorials.
>
> Not quite so easily, but ASPECT does this: It simply defines its own 2x2
> block
> matrix class that points to sub-blocks of a larger matrix. See here:
>
>
> https://github.com/geodynamics/aspect/blob/master/source/simulator/solver.cc#L47-L105
>
> Of course, if you don't actually need access to the M and B blocks
> individually, you don't have to structure your matrix that way. The
> structuring of the matrix based on solution variables is your choice, and
> you
> can have a 2x2 block pattern for a matrix even if you have 3 solution
> variables, and then you can put [[M, B],[B, 0]] all into one block.
>
> Best
> W.
>
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> www: http://www.math.colostate.edu/~bangerth/
>
>
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/9df3ff4c-19f5-454c-9b75-d8ceba7e1c48n%40googlegroups.com.