On 03/19/2018 12:47 PM, Ben Shields wrote:
It is setting up the matrices which is the bottleneck, specifically setting up the off-diagonal blocks of the matrix. For context, with a moderately sized system of 200,000 dofs, setting up the main NxN sparsity pattern using DoFTools::make_sparsity_pattern and reinitializing the matrix using that sparsity pattern takes 0.1
seconds per call. The piece of code I posted above, which makes a
sparsity pattern for the 1xN and Nx1 matrix blocks and reinitializes
those matrices, takes 20 seconds per call.

Hm, interesting. Of course, these are full matrices of size 200,000-by-1, stored in sparse format.

Can you narrow down where the time is lost? Is it in setting up the sparsity patterns in these two lines

  added_sp.block(0, 1).copy_from(col);
  added_sp.block(1, 0).copy_from(row);

or later when you associate the sparsity pattern with the corresponding matrix block?


The linear solver itself averages about 40 seconds per call.

To solve the entire system?

What do you actually later put into the (1,0) and (0,1) blocks of the matrix? The row and col vectors you build above, which are just ones?

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           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 dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to