Inside SparseDirectMUMPS::solve  there is 
https://www.dealii.org/developer/doxygen/deal.II/petsc__solver_8cc_source.html#l00703

 if (solver_data.get() == 0)
  {
         solver_data.reset (new SolverDataMUMPS ());
        …
        ierr = KSPSetOperators (solver_data->ksp, A, A);
        …
  }
ierr = KSPSolve (solver_data->ksp, b, x);


so i think Alexander is right that it will reuse factorisation.

However, this is wrong because you might be calling the same solver consequently
but with different matrices and RHS vectors. In other words, the second time 
you call solve() 
matrix is ignored altogether.

So i would say that it would still be good to refactor this solver similar to 
the director solver in Trilinos 
to make it (a) more user friendly (b) have less surprises when one calls 
solve() for different matrices consequently.

Kind regards,
Denis 

> On 25 Jul 2016, at 22:25, shanglong zhang <shanglongzh...@gmail.com> wrote:
> 
> Hi Alexander,
> 
> The versions of library I am using are listed below:
> deal.II 8.4.0
> petsc 3.3.0.3
> MUMPS 4.10.0-p3
> I run the first two mesh refining loops of the step-17. So the matrix size is 
> 162*162 and 302*302 respectively. The symmetry direct solver doesn't give the 
> 'right solution' for both cases.
> 
> Sorry, I am not familiar with the petsc library. You meant if I call 
> solver.solve(system_matrix,solution,system_rhs) twice, internally, it would 
> use the factorization from the first time for the second solving process? (of 
> course the system matrix is the same.) Do i understand this correctly? Thanks.
> 
> Best,
> Shanglong
> 
> 在 2016年7月25日星期一 UTC-4下午3:24:25,Alexander写道:
> 
> I modify the step-17 so that it uses PETScWrappers::SparseDirectMUMPS as 
> solver. However, when I active the option of set_symmetric_mode, the solution 
> has discrepancy from CG or MUMPS without the symmetry option. (The solutions 
> from CG and MUMPS without symmetry option are identical though.) Any 
> suggestion?
> 
> Which version of PETSc, MUMPS and deal.II do you use? What is the matrix size 
> you work with? 
>  
> 
> And it seems to me that  PETScWrappers::SparseDirectMUMPS doesn't have the 
> functionality of reusing the factorization of system matrix for different 
> right-hand side vector. Do I miss anything?
> 
> Yes, it does. The first time you call solve it performs factorization, but 
> the following calls will reuse it (since you don't call KSPSetOperators). 
>  
> 
> Thank you very much.
> 
> Best,
> Shanglong
> 
> -- 
> 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 a topic in the Google 
> Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/dealii/Sw0wHKEFuiA/unsubscribe 
> <https://groups.google.com/d/topic/dealii/Sw0wHKEFuiA/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> dealii+unsubscr...@googlegroups.com 
> <mailto:dealii+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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