Hi Andreas, I concur with Simon. Additionally, if you’re using the Trilinos linear algebra classes, then the TrilinosWrappers::SolverDirect solver will do the same https://dealii.org/developer/doxygen/deal.II/classTrilinosWrappers_1_1SolverDirect.html#a6c0fecc921bc93f2c005e265cfbdd882 <https://dealii.org/developer/doxygen/deal.II/classTrilinosWrappers_1_1SolverDirect.html#a6c0fecc921bc93f2c005e265cfbdd882> Its hard to tell (from the documentation) what PETScWrappers::SparseDirectMUMPS does, but if it doesn’t retain the factorisation then I’m sure some light refactoring of the class could address that issue.
Best, Jean-Paul > On 02 Jun 2020, at 12:53, Andreas Kyritsakis <[email protected]> wrote: > > Thanks a lot!! > > On Tuesday, June 2, 2020 at 1:21:37 PM UTC+3, Simon Sticko wrote: > 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 > <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 > <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/ > <http://www.dealii.org/> > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > <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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/072b1775-eaae-486e-a874-2fba0ca4e36d%40googlegroups.com > > <https://groups.google.com/d/msgid/dealii/072b1775-eaae-486e-a874-2fba0ca4e36d%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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/6CA6B59B-BF7E-4B21-A287-500FA3FBBA78%40gmail.com.
