Hi Chen,

You can work directly with LinearOperator(s). What you need is the *inverse 
operator* of op_M , and you can get it by giving a Solver and a 
corresponding preconditioner to inverse_operator() 
[https://www.dealii.org/current/doxygen/deal.II/group__LAOperators.html#ga87e38fbde431397c069a88692bd24ae7],
 
as explained in step-20. 
(https://www.dealii.org/current/doxygen/deal.II/step_20.html#TheLinearOperatorframeworkindealII)


Best,
Marco
Il giorno sabato 9 aprile 2022 alle 05:33:22 UTC+2 [email protected] ha 
scritto:

> Hello team,
> First, I got the linear_operator op_M(the matrix M). I want to get the 
> inverse of M named as M_inv. Because of the difficult of inverting the M 
> and that M is not symmetry, I used such codes to get M_inv:
>
>> SparseMatrix<double> M = op_M;
>
> solver SolverGMRES<Vector<double>> gmres(solver_control); 
>
> const auto M_inv = linear_operator(M, gmres, somepreconditioner);
>
>  There are some questions on it:
>
>    1. I don't know how to convert linear_operator to 
>    SparseMatrix<double>, the code "SparseMatrix<double> M = op_M;" get 
>    error.
>    2. Whether could I get the M_inv directly by op_M using iterator 
>    method  and don't need to convert linear_operator to SparseMatrix<double>?
>    3. Where I can find the support preconditioner for the iterator? it 
>    seems that the SolverGMRES don't supports the preconditoner of 
>    SparseILU<double> and SparseDirectUMFPACK. 
>
> best regards
> chen
>

-- 
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/ffc215e1-742b-4074-8b80-7e3ebfb365b5n%40googlegroups.com.

Reply via email to