Anna, > The main reason I do this is that I do not understand how to reuse this > decomposition in deal.ii. > I am relatively new to deal.ii and C++, and I have never used MUMPS before.
Well, this has nothing to do with MUMPS or deal.II. It sounds like you are struggling because you are not familiar with c++ templates and template specialization and how we use it in step-22. I also think you are hung up on a detail ("how can I switch between solvers based on the dimension?"), while you could just always use MUMPS. > since PETScWrappers::SparseDirectMUMPS does not have member function vmult. You could create a specialized InverseMatrix class that does something different depending on the type PreconditionerType. I would just unconditionally replace the vmult() inside InverseMatrix to call ::solve() of SparseDirectMUMPS. > I would appreciate any advice on this. Maybe there is some example in > deal.ii that use MUMPS to construct a preconditioner. for example: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dealii_dealii_blob_master_tests_mpi_step-2D40-5Fdirect-5Fsolver.cc&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=uMnkipA0_Q1Sqba93dRnQ4Sg2_vE74W35qmO5qny_HU&s=yIxjkjwXu_nX2OcEMuXTJD50rGqnh8G1J6qvEp3tT7I&e= https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dealii_dealii_blob_master_tests_petsc_sparse-5Fdirect-5Fmumps.cc&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=uMnkipA0_Q1Sqba93dRnQ4Sg2_vE74W35qmO5qny_HU&s=pF_uHK7JsU8Qn2h7uzEU6DSwyeprAg3-2k1hwM3rr_A&e= -- Timo Heister http://www.math.clemson.edu/~heister/ -- 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.