Hi,
a better option than computing the inverse is to factorize the matrix. This 
can be done using the SparseDirectUMFPACK solver:

https://www.dealii.org/current/doxygen/deal.II/classSparseDirectUMFPACK.html

You might want to take a look at step 22, which uses this solver:

https://www.dealii.org/current/doxygen/deal.II/step_22.html

Best,
Simon

On Tuesday, June 2, 2020 at 12:04:38 PM UTC+2, Andreas Kyritsakis wrote:
>
> Dear all,
>
> I have a problem where a Poisson-like equation has to be solved again and 
> again in many time steps. At each timestep the LHS remains the same while 
> the RHS changes (slightly). My current implementation is to use the 
> standard SolverCG, passing the old solution as initial, which already 
> reduces the number of CG steps required. Yet, I wonder whether my approach 
> is naive and there is a faster way to implement this, taking better 
> advantage of the fact that the LHS stays always the same. I initially 
> thought about calculating the inverse matrix once and just doing matrix 
> multiplication, but since the mass matrix is a huge sparse matrix, only 
> storing the inverse (which in general is not sparse) would require huge 
> memory. I also thought about the LinearOperator concepts, but if I 
> understood correctly, they just implement a nice wrapper to call a solver 
> each time. Am I missing something?
>
> Cheers,
> Andreas
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/4bc6a09b-834c-485e-a26c-cbbbc6a45338%40googlegroups.com.

Reply via email to