Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-20 Thread 陈敏
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 于2022年4月20日周三

Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-20 Thread Luca Heltai
> 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

Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-20 Thread Luca Heltai
The issue is within Trilinos itself. The TrilinosPayload (thanks JP!) provides an interface to Epetra_LinearOperator (Trilinos version of our LinearOperator). However, it cannot access matrix elements, as it is not thought for matrix based operations. You can, however, create a direct solver,

Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-19 Thread hkch...@gmail.com
Thanks, Bruno and Jean-Paul. I will not use the TrilinosWrapper::SolverDirect in inverse_operator, replaced by an iterative solver. But Bruno, this example initializes a precondition by a matrix preconditioner.initialize(system_matrix, data); While I can't get the entity of the matrix, I want

Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-19 Thread Jean-Paul Pelteret
Dear Chen, Bruno pointed you to the exact example that I was going to. It is certainly possible to use linear operators as preconditioners for solvers. It looks like support for TrilinosWrappers::SolverDirect has not yet been implemented:

Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-19 Thread Bruno Turcksin
Chen, I am not sure if TrilinosWrappers::SolverDirect is supported but for your second point, you can use the linear_operator as a preconditioner. That's exactly what's done here for example. The

Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-19 Thread hkch...@gmail.com
Hi everyone, More questions: 1. where can I find the supported linear solver of Trilinos of linear_operator? TrilinosWrappers::SolverDirect seems not to be supported by the linear_operator 2. Does linear_operator can be a preconditioner? for example, SparseMatrix A, B, C, D, E, F; Matrix

Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-19 Thread hkch...@gmail.com
One more question: where I can find the support linear solver of Trilinos of linear_operator? TrilinosWrappers::SolverDirect seem not be supported by the linear_operator best chen 在2022年4月18日星期一 UTC+8 22:07:36 写道: > Bruno Turcksin > Thank you! it really helpful! > > best > chen >

Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-18 Thread hkch...@gmail.com
Bruno Turcksin Thank you! it really helpful! best chen 在2022年4月18日星期一 UTC+8 21:07:45 写道: > Chen, > > Yes, LinearOperator does support Trilinos and PETSc matrices. > LinearOperator even supports your own matrix type as long as you define > vmult and Tvmult (see here >

Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-18 Thread Bruno Turcksin
Chen, Yes, LinearOperator does support Trilinos and PETSc matrices. LinearOperator even supports your own matrix type as long as you define vmult and Tvmult (see here ) Best, Bruno On

[deal.II] Supported matrix/vector to LinearOperator

2022-04-18 Thread 陈敏
Hi everyone, When solving a block matrix system, the LinearOperator is a useful tool. My question is whether the LinearOpertor supports Matrix type (the same as the Vector type) like PETSCWrapper::MPI::SparseMatrix or TrilinosWrapper::MPI::SparseMatrix? Best Chen -- The deal.II project is