Blocked Thyra to Epetra Conversion
Created by: jmgate
I have a matrix, A, and vector, x. A is a 2x2
Thyra::BlockedLinearOpBase, where A00 is a
Thyra::LinearOpBase and the other blocks are
Thyra::MultiVectorBases. Likewise, x is a
Thyra::ProductVectorBase with two sub-vectors. I'm in a situation where I need to make A an
Epetra_CrsMatrix and x an
Epetra_Vector, but I'm at a bit of a loss to do just that. I see Thyra has a
get_Epetra_Vector() routine, but that requires passing in an
Epetra_Map. I see there's also a
get_Epetra_Map() routine, which takes a
Thyra::VectorSpaceBase, but if you give it a
DefaultProductVectorSpace instead, it doesn't seem to work (I'm seeing
MPI_Abort being called).
- Is there a way to convert the objects that I have to the ones that I need directly?
- Is there a way to cram a
BlockedLinearOpBaseinto a single
ProductVectorBaseinto a single
VectorBase, such that these Epetra/Thyra wrappers work?
- If I'm able to convert the various pieces of my blocked objects into their Epetra counterparts, is there some way to cram four
Epetra_CrsMatrixes into one, and two
Epetra_Vectors into one?
Motivation and Context
In Charon I've got a
ModelEvaluator decorator that takes the original physics
ModelEvaluator and augments it with blocks corresponding to constraints/parameters. Solving the blocked system via a Teko blocked preconditioner is proving to be more finicky than we'd like in certain situations, so we're investigating collapsing the blocked system and throwing a standard solver at it to see what happens.
@mhoemmen, this seems like the kind of thing you'd chime in on.