You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a current application program I work with TrilinosWrappers::MPI::Vector. However in a subroutine I do a L2 projection of the gradient of the TrilinosWrappers::MPI::Vector. Therefore I looked into VectorTools::project and set up the mass matrix as MatrixFreeOperator. However, I need to transfer the TrilinosWrappers::MPI::Vector to a LinearAlgebra::distributed::Vector<double>. The problem is, that I consider a vector-valued problem and reorder the DOFs component wise. The assertion which is thrown requires locally_owned_indices.is_contiguous() == true. Is there a chance to transfer a TrilinosWrappers::MPI::Vector into a LinearAlgebra::distributed::Vector<double> overcomming this issue? If I turn of the component wise reordering it works, but this is not the way I can proceed, as I want to later develop a block-preconditioner for the problem.
Any suggestions how to proceed?
The text was updated successfully, but these errors were encountered:
The assumption of a contiguous index range for the locally owned dofs is to render certain operations more efficient.
Whichever way we put it, I think there will be some need for adaptations in the deal.II source code to support your case. Since you mention the desire to work on a block preconditioner later, would it be an option to fill a LinearAlgebra::distributed::BlockVector instead? In that case, we would need to make sure to be able to interface with a Trilinos vector from the block vector, and probably to detect the case in the VectorTools::project function. I think most interfaces are already prepared for that, so there are probably only small adaptations necessary. Do you want to give it a try?
Many thanks for your suggestion! Yesterday evening I was thinking a lot on this problem and using a LinearAlgebra::distributed::BlockVector<double> was also my final thought. I will work on this as I need it for my own project_gradient function. I have also #12699 open. Should I do the major revision of VectorTools::project there or open different minor PRs for this.
In a current application program I work with
TrilinosWrappers::MPI::Vector
. However in a subroutine I do a L2 projection of the gradient of theTrilinosWrappers::MPI::Vector
. Therefore I looked intoVectorTools::project
and set up the mass matrix as MatrixFreeOperator. However, I need to transfer theTrilinosWrappers::MPI::Vector
to aLinearAlgebra::distributed::Vector<double>
. The problem is, that I consider a vector-valued problem and reorder the DOFs component wise. The assertion which is thrown requireslocally_owned_indices.is_contiguous() == true
. Is there a chance to transfer aTrilinosWrappers::MPI::Vector
into aLinearAlgebra::distributed::Vector<double>
overcomming this issue? If I turn of the component wise reordering it works, but this is not the way I can proceed, as I want to later develop a block-preconditioner for the problem.Any suggestions how to proceed?
The text was updated successfully, but these errors were encountered: