On 12/04/2017 12:43 PM, Wolfgang Bangerth wrote:
>
>> Can I figure out the pattern of B*B or BA^{-1}B ?
>
> In general, A^{-1} is going to be a dense matrix even if A is a sparse
> matrix. So building this matrix is not efficient.
Of course, you say that A is diagonal, in which case this doesn't apply.
It is possible to compute the sparsity pattern of B^T B, but it is
generally much denser than that of B, and the more efficient way to deal
with this is to only implement the *action* of these operations, as is
done in step-20/22.