Thanks, Luca.

I learn a lot. Since I use TrilinosWrapper::MPI::Vector,
TrilinosWrapper::SolveDirect can't use in linear_operator.
Since I can't get the precondition from linear_operator directly, I will
creat a inverse_operator without precondition.

Best,
Chen

Luca Heltai <luca.hel...@gmail.com> 于2022年4月20日周三 15:25写道:

> > While I can't get the entity of the matrix, I want to get the
> precondition directly from a linear_operator.
>
>
> > SparseMatrix M;
> > auto op_M = linear_operator(M);
> > TrilinosWrapper::PreconditionILU prec_M(op_M);
>
> This you cannot do. It is the other way around. Preconditioners need
> matrices (linear operator only store information about the *action* of the
> matrix, or of the various operations. Think of it this way: A*B*C*D_inv is
> still a linear operator. What matrix should this return to you?)
>
> This is how you should use it, if you want your preconditioner to be a
> linear operator:
>
> TrilinosWrapper::PreconditionILU prec_M_mat(M);
> auto op prec_M = linear_operator(M, prec_M_mat);
>
> > Can I get the entity of matrix G by TrilinosWrapper::MPI::SparseMatrix G
> = op_G; or the precondition of op_G?
>
> Nope. This, again, does not make sense.
>
> A Matrix is a linear operator (therefore you can create a linear operator
> from a matrix), but a linear operator is just an action (therefore you
> cannot create a matrix from a linear operator).
>
> L
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/7126F8FD-80F7-4766-B3C3-985274A281F0%40gmail.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CADr3Od%2Bk_oD_Z3XDhbd-t7u40cArzwL0SHG%2BqMGSjNWFHUMApA%40mail.gmail.com.

Reply via email to