> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/7126F8FD-80F7-4766-B3C3-985274A281F0%40gmail.com.

Reply via email to