Skip to content

Commit

Permalink
MueLu: fix ETI in muelu-adapters
Browse files Browse the repository at this point in the history
Thyra::XpetraLinearOp was not correctly included in muelu-adapters ETI.
Make sure that all template parameters are propagated to Thyra::XpetraLinearOp.

This fixes issue #204
  • Loading branch information
tawiesn committed Mar 11, 2016
1 parent 6f6a1be commit 9f0f59b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/muelu/adapters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ IF(${PACKAGE_NAME}_ENABLE_EXPLICIT_INSTANTIATION)
IF (${PACKAGE_NAME}_ENABLE_Stratimikos)
APPEND_GLOBAL_SET(MUELUADAPTERS_ETI_CLASSES
Thyra::MueLuPreconditionerFactory
Thyra::XpetraLinearOp
)
ENDIF()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,14 +459,13 @@ namespace Thyra {
TEUCHOS_TEST_FOR_EXCEPT(Teuchos::nonnull(thyraPrecOp));

typedef MueLu::XpetraOperator<Scalar,LocalOrdinal,GlobalOrdinal,Node> MueXpOp;
//typedef Thyra::XpetraLinearOp<Scalar,LocalOrdinal,GlobalOrdinal,Node> ThyXpLinOp; // unused
const RCP<MueXpOp> muelu_xpetraOp = rcp(new MueXpOp(H));

RCP<const VectorSpaceBase<Scalar> > thyraRangeSpace = Xpetra::ThyraUtils<Scalar,LocalOrdinal,GlobalOrdinal,Node>::toThyra(muelu_xpetraOp->getRangeMap());
RCP<const VectorSpaceBase<Scalar> > thyraDomainSpace = Xpetra::ThyraUtils<Scalar,LocalOrdinal,GlobalOrdinal,Node>::toThyra(muelu_xpetraOp->getDomainMap());

RCP <Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal, Node> > xpOp = Teuchos::rcp_dynamic_cast<Xpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> >(muelu_xpetraOp);
thyraPrecOp = Thyra::xpetraLinearOp(thyraRangeSpace, thyraDomainSpace,xpOp);
thyraPrecOp = Thyra::xpetraLinearOp<Scalar, LocalOrdinal, GlobalOrdinal, Node>(thyraRangeSpace, thyraDomainSpace,xpOp);
}

TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraPrecOp));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ namespace Thyra {
RCP<const VectorSpaceBase<Scalar> > thyraDomainSpace = Xpetra::ThyraUtils<Scalar,LocalOrdinal,GlobalOrdinal,Node>::toThyra(muelu_xpetraOp->getDomainMap());

RCP <Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal, Node> > xpOp = Teuchos::rcp_dynamic_cast<Xpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> >(muelu_xpetraOp);
thyraPrecOp = Thyra::xpetraLinearOp(thyraRangeSpace, thyraDomainSpace,xpOp);
thyraPrecOp = Thyra::xpetraLinearOp<Scalar, LocalOrdinal, GlobalOrdinal, Node>(thyraRangeSpace, thyraDomainSpace,xpOp);
}

TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraPrecOp));
Expand Down

0 comments on commit 9f0f59b

Please sign in to comment.