Dear all, there are several discussions, e.g. https://groups.google.com/g/dealii/c/KU7g_YCNVRE/m/h7ab-2gRCAAJ?hl=en or https://groups.google.com/g/dealii/c/DdMiTjuPx6Q/m/UeH4fmmBAwAJ?hl=en about the usage of TrilinosWrappers::BlockSparseMatrix in the context of direct solvers in a distributed framework. Still, only TrilinosWrappers::SparseMatrix can be feeded to TrilinosWrappers::SparseDirect solvers.
I am solving a 2x2 block system with iterative and direct solvers (decision is made at run-time via .prm file). Clearly, I do not need a BlockSparseMatrix for a direct solve, however, to have a similar code base also for the iterative solve (where I need a block preconditioner), I decided to use block quantities for each solver type. It is not a big deal to copy a BlockVector into a Vector, but what is an efficient scheme (my problem is non-linear) to copy a BlockSparseMatrix into a SparseMatrix as needed for the direct solvers coming with trilinos? Conceptually, I am looking for a constructor SparseMatrix (const BlockSparseMatrix &) or a copy_from function. For instance, the std::memcpy function is used in SparseMatrix::reinit (const Epetra_CrsMatrix & *, **copy_values* = true) , but I am not sure whether it can be used when translating between Block and standard SparseMatrix. Can you think of an elegant solution or must the non-zero values be copied via a loop over the individual blocks? Best regards, Simon -- 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/70bcce5b-73c4-4550-ac0c-368ce549e0bfn%40googlegroups.com.
