How can we get the factorized system matrix when using SparseDirectMUMPS?

44 views
Skip to first unread message

Phạm Ngọc Kiên

unread,
Jun 26, 2019, 10:20:38 PM6/26/19
to deal.II User Group
Hi colleagues,
I am trying to build codes using  PETScWrappers::SparseDirectMUMPS solver.
Step-62 shows a very good example for using it.
However, I really want to know if  we can choose the factorization method in MUMPS by deal.II codes.

The second question is: do we have a way to get the factorized system matrix when using this direct solver?
Because I want to reuse the factorized system matrix to solve the problem again with other right hand side.

I would like to thank you very much for your support.

Best regards,
Kien

Bruno Turcksin

unread,
Jun 27, 2019, 8:42:26 AM6/27/19
to deal.II User Group
Kien,


On Wednesday, June 26, 2019 at 10:20:38 PM UTC-4, Phạm Ngọc Kiên wrote:
Hi colleagues,
I am trying to build codes using  PETScWrappers::SparseDirectMUMPS solver.
Step-62 shows a very good example for using it.
However, I really want to know if  we can choose the factorization method in MUMPS by deal.II codes.
According to the documentation (see here), you can. I don't use PETSc but I think this done using the command line
 

The second question is: do we have a way to get the factorized system matrix when using this direct solver?
Because I want to reuse the factorized system matrix to solve the problem again with other right hand side.
Just call solve() with a different right-hand-side. The factorization should only be done the first time the function is called.

Best,

Bruno

Phạm Ngọc Kiên

unread,
Jun 27, 2019, 8:58:43 PM6/27/19
to dea...@googlegroups.com
Bruno,
Thank you very much.
I would check the time for the solve() function with different right hand side.
If the factorization only be done the first time it is called, the time for solving the next right hand side should be lesser.

I looked through the documentation in Deal.II before. 
I think it could be done, too. It would be easier if there is an example to use the PETSc parameters for MATSOLVERMUMPS package in deal.II.
Currently, I don't know where to put it in my codes.

Best regards,
Kien

Vào Th 5, 27 thg 6, 2019 vào lúc 21:42 Bruno Turcksin <bruno.t...@gmail.com> đã viết:
--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/24c660f9-1450-4c1f-b0f7-d9c0a629fde8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sebastian Stark

unread,
Jun 28, 2019, 3:31:33 AM6/28/19
to deal.II User Group
Kien,
 
I looked through the documentation in Deal.II before. 
I think it could be done, too. It would be easier if there is an example to use the PETSc parameters for MATSOLVERMUMPS package in deal.II.
Currently, I don't know where to put it in my codes.

As Bruno has said this should work using the command line. When you run the program you could e.g. append some option like -mat_mumps_icntl_4 3 to set ICNTL(4) to 3. Not sure, but maybe you could do some trickery to modify argc and argv if you want to hard code (though this is certainly not a nice solution). Anyway, the SparseDirectMUMPS class is rather compact - so if you really want to customize, it shouldn't be too hard to write your own class using SparseDirectMUMPS as a sample. But it really depends on what you want to achieve. If you only want to select the factorization method, you can just use set_symmetric_mode(false/true) to switch between "LU" and "Cholesky" (which actually is LDL^T).

Regards, Sebastian

Phạm Ngọc Kiên

unread,
Jun 28, 2019, 3:53:30 AM6/28/19
to dea...@googlegroups.com
Dear Sebastian,
Thank you very much.
I will try the way you mentioned.
Best regards,
Kien

Vào Th 6, 28 thg 6, 2019 vào lúc 16:31 'Sebastian Stark' via deal.II User Group <dea...@googlegroups.com> đã viết:
--
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+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages