[Trilinos-Users] using teko

Hoang Giang Bui hgbk2008 at gmail.com
Tue Dec 25 06:42:06 MST 2012


Hi

When using Teko to build the preconditioner operator for Aztec solver I
faced this error:

I tried to create the LinearOp of invS * B2 * invA. The invS is the
approximation of S^{-1} and invA is approximation of A^{-1}. I created invS
and invA by this code

const Teko::LinearOp invA = Teko::buildInverse(*invAfact_, A);
const Teko::LinearOp invS = Teko::buildInverse(*invSfact_, S);

Then

const Teko::LinearOp tmpP = Teko::explicitMultiply(invS,
Teko::explicitMultiply(B2, invA));

At this point, the program crashed and thow the error:

Throw number = 1

Throw test that evaluated to true: true

dyn_cast<Thyra::EpetraLinearOp>(Thyra::LinearOpBase<double>) : Error, the
object with the concrete type 'Thyra::DefaultInverseLinearOp<double>'
(passed in through the interface type 'Thyra::LinearOpBase<double>')  does
not support the interface 'Thyra::EpetraLinearOp' and the dynamic cast
failed!

As I assumed, the type of invA and invS is
Thyra::DefaultInverseLinearOp<double> and not inherited from
Thyra::EpetraLinearOp, hence the dynamic_cast is failed. I also think that
the InverseLinearOp does not try to create Crs_Matrix so it is not
compatible with EpetraLinearOp.

Please help me on this case. It's important for me to create a block
preconditioner for my problem.

BR
Giang Bui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20121225/6c96312d/attachment.html 


More information about the Trilinos-Users mailing list