47 #ifndef THYRA_MUELU_REFMAXWELL_PRECONDITIONER_FACTORY_DECL_HPP
48 #define THYRA_MUELU_REFMAXWELL_PRECONDITIONER_FACTORY_DECL_HPP
52 #if defined(HAVE_MUELU_STRATIMIKOS) && defined(HAVE_MUELU_THYRA)
55 #include "Thyra_DefaultPreconditioner.hpp"
56 #include "Thyra_BlockedLinearOpBase.hpp"
57 #include "Thyra_DiagonalLinearOpBase.hpp"
59 #ifdef HAVE_MUELU_TPETRA
60 #include "Thyra_TpetraLinearOp.hpp"
61 #include "Thyra_TpetraThyraWrappers.hpp"
63 #ifdef HAVE_MUELU_EPETRA
64 #include "Thyra_EpetraLinearOp.hpp"
65 #include "Thyra_EpetraThyraWrappers.hpp"
68 #include "Teuchos_Ptr.hpp"
70 #include "Teuchos_Assert.hpp"
73 #include <Xpetra_CrsMatrixWrap.hpp>
74 #include <Xpetra_CrsMatrix.hpp>
75 #include <Xpetra_Matrix.hpp>
76 #include <Xpetra_ThyraUtils.hpp>
78 #include <MueLu_Hierarchy.hpp>
80 #include <MueLu_HierarchyUtils.hpp>
81 #include <MueLu_Utilities.hpp>
82 #include <MueLu_ParameterListInterpreter.hpp>
83 #include <MueLu_MLParameterListInterpreter.hpp>
86 #include <MueLu_RefMaxwell.hpp>
87 #ifdef HAVE_MUELU_TPETRA
88 #include <MueLu_TpetraOperator.hpp>
90 #ifdef HAVE_MUELU_EPETRA
92 #include <Xpetra_EpetraOperator.hpp>
95 #include "Thyra_PreconditionerFactoryBase.hpp"
97 #include "Kokkos_DefaultNode.hpp"
110 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node = KokkosClassic::DefaultNode::DefaultNodeType>
111 class MueLuRefMaxwellPreconditionerFactory :
public PreconditionerFactoryBase<Scalar> {
118 MueLuRefMaxwellPreconditionerFactory();
125 bool isCompatible(
const LinearOpSourceBase<Scalar>& fwdOp)
const;
129 void initializePrec(
const Teuchos::RCP<
const LinearOpSourceBase<Scalar> >& fwdOp,
130 PreconditionerBase<Scalar>* prec,
131 const ESupportSolveUse supportSolveUse
134 void uninitializePrec(PreconditionerBase<Scalar>* prec,
136 ESupportSolveUse* supportSolveUse
160 std::string description()
const;
172 #ifdef HAVE_MUELU_EPETRA
181 class MueLuRefMaxwellPreconditionerFactory<double,int,int,Xpetra::
EpetraNode> :
public PreconditionerFactoryBase<double> {
192 MueLuRefMaxwellPreconditionerFactory() : paramList_(
rcp(new ParameterList())) { }
200 bool isCompatible(
const LinearOpSourceBase<Scalar>& fwdOpSrc)
const {
201 const RCP<const LinearOpBase<Scalar> > fwdOp = fwdOpSrc.getOp();
203 #ifdef HAVE_MUELU_TPETRA
204 if (Xpetra::ThyraUtils<Scalar,LocalOrdinal,GlobalOrdinal,Node>::isTpetra(fwdOp))
return true;
207 #ifdef HAVE_MUELU_EPETRA
208 if (Xpetra::ThyraUtils<Scalar,LocalOrdinal,GlobalOrdinal,Node>::isEpetra(fwdOp))
return true;
211 if (Xpetra::ThyraUtils<Scalar,LocalOrdinal,GlobalOrdinal,Node>::isBlockedOperator(fwdOp))
return true;
222 void initializePrec(
const Teuchos::RCP<
const LinearOpSourceBase<Scalar> >& fwdOpSrc,
223 PreconditionerBase<Scalar>* prec,
224 const ESupportSolveUse
226 using Teuchos::rcp_dynamic_cast;
229 typedef Xpetra::Map<LocalOrdinal,GlobalOrdinal,Node> XpMap;
230 typedef Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal, Node> XpOp;
231 typedef Xpetra::ThyraUtils<Scalar,LocalOrdinal,GlobalOrdinal,Node> XpThyUtils;
232 typedef Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node> XpCrsMatWrap;
233 typedef Xpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> XpCrsMat;
234 typedef Xpetra::BlockedCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> XpBlockedCrsMat;
235 typedef Xpetra::Matrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> XpMat;
236 typedef Xpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> XpMultVec;
238 typedef Thyra::LinearOpBase<Scalar> ThyLinOpBase;
239 typedef Thyra::DiagonalLinearOpBase<Scalar> ThyDiagLinOpBase;
240 #if defined(HAVE_MUELU_EPETRA)
241 typedef Xpetra::EpetraCrsMatrixT<GlobalOrdinal,Node> XpEpCrsMat;
250 ParameterList paramList = *paramList_;
253 const RCP<const ThyLinOpBase> fwdOp = fwdOpSrc->getOp();
257 bool bIsEpetra = XpThyUtils::isEpetra(fwdOp);
258 bool bIsTpetra = XpThyUtils::isTpetra(fwdOp);
259 bool bIsBlocked = XpThyUtils::isBlockedOperator(fwdOp);
264 RCP<XpMat> A = Teuchos::null;
267 Teuchos::rcp_dynamic_cast<
const Thyra::BlockedLinearOpBase<Scalar> >(fwdOp);
275 RCP<const XpCrsMat > xpetraFwdCrsMat00 = XpThyUtils::toXpetra(b00);
279 RCP<XpCrsMat> xpetraFwdCrsMatNonConst00 = Teuchos::rcp_const_cast<XpCrsMat>(xpetraFwdCrsMat00);
283 RCP<XpMat> A00 =
rcp(
new Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node>(xpetraFwdCrsMatNonConst00));
286 RCP<const XpMap> rowmap00 = A00->getRowMap();
287 RCP< const Teuchos::Comm< int > > comm = rowmap00->getComm();
290 RCP<XpBlockedCrsMat> bMat =
Teuchos::rcp(
new XpBlockedCrsMat(ThyBlockedOp, comm));
296 RCP<const XpCrsMat > xpetraFwdCrsMat = XpThyUtils::toXpetra(fwdOp);
300 RCP<XpCrsMat> xpetraFwdCrsMatNonConst = Teuchos::rcp_const_cast<XpCrsMat>(xpetraFwdCrsMat);
304 A =
rcp(
new Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node>(xpetraFwdCrsMatNonConst));
313 RCP<ThyLinOpBase> thyra_precOp = Teuchos::null;
314 thyra_precOp = rcp_dynamic_cast<Thyra::LinearOpBase<Scalar> >(defaultPrec->getNonconstUnspecifiedPrecOp(),
true);
317 RCP<MueLu::RefMaxwell<Scalar,LocalOrdinal,GlobalOrdinal,Node> > preconditioner = Teuchos::null;
322 const bool startingOver = (thyra_precOp.is_null() || !paramList.isParameter(
"reuse: type") || paramList.get<std::string>(
"reuse: type") ==
"none");
324 if (startingOver ==
true) {
328 paramList.set<RCP<XpMultVecDouble> >(
"Coordinates", coordinates);
331 #ifdef HAVE_MUELU_TPETRA
333 #if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT))) || \
334 (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT))))
335 typedef Tpetra::Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node> tV;
336 typedef Tpetra::MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node> tMV;
337 typedef Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> TpCrsMat;
339 RCP<tMV> tpetra_nullspace = paramList.get<RCP<tMV> >(
"Nullspace");
340 paramList.remove(
"Nullspace");
341 RCP<XpMultVec> nullspace = MueLu::TpetraMultiVector_To_XpetraMultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node>(tpetra_nullspace);
342 paramList.set<RCP<XpMultVec> >(
"Nullspace", nullspace);
346 if (paramList.isParameter(
"M1")) {
348 RCP<TpCrsMat> tM1 = paramList.get<RCP<TpCrsMat> >(
"M1");
349 paramList.remove(
"M1");
350 RCP<XpCrsMat> xM1 = rcp_dynamic_cast<XpCrsMat>(tM1,
true);
351 paramList.set<RCP<XpCrsMat> >(
"M1", xM1);
353 RCP<const ThyLinOpBase> thyM1 = paramList.get<RCP<const ThyLinOpBase> >(
"M1");
354 paramList.remove(
"M1");
355 RCP<const XpCrsMat> crsM1 = XpThyUtils::toXpetra(thyM1);
358 RCP<XpCrsMat> crsM1NonConst = Teuchos::rcp_const_cast<XpCrsMat>(crsM1);
361 RCP<XpMat> M1 =
rcp(
new Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node>(crsM1NonConst));
362 paramList.set<RCP<XpMat> >(
"M1", M1);
370 if (paramList.isParameter(
"Ms")) {
372 RCP<TpCrsMat> tMs = paramList.get<RCP<TpCrsMat> >(
"Ms");
373 paramList.remove(
"Ms");
374 RCP<XpCrsMat> xMs = rcp_dynamic_cast<XpCrsMat>(tMs,
true);
375 paramList.set<RCP<XpCrsMat> >(
"Ms", xMs);
377 RCP<const ThyLinOpBase> thyMs = paramList.get<RCP<const ThyLinOpBase> >(
"Ms");
378 paramList.remove(
"Ms");
379 RCP<const XpCrsMat> crsMs = XpThyUtils::toXpetra(thyMs);
382 RCP<XpCrsMat> crsMsNonConst = Teuchos::rcp_const_cast<XpCrsMat>(crsMs);
385 RCP<XpMat> Ms =
rcp(
new Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node>(crsMsNonConst));
386 paramList.set<RCP<XpMat> >(
"Ms", Ms);
393 if (paramList.isParameter(
"D0")) {
395 RCP<TpCrsMat> tD0 = paramList.get<RCP<TpCrsMat> >(
"D0");
396 paramList.remove(
"D0");
397 RCP<XpCrsMat> xD0 = rcp_dynamic_cast<XpCrsMat>(tD0,
true);
398 paramList.set<RCP<XpCrsMat> >(
"D0", xD0);
400 RCP<const ThyLinOpBase> thyD0 = paramList.get<RCP<const ThyLinOpBase> >(
"D0");
401 paramList.remove(
"D0");
402 RCP<const XpCrsMat> crsD0 = XpThyUtils::toXpetra(thyD0);
405 RCP<XpCrsMat> crsD0NonConst = Teuchos::rcp_const_cast<XpCrsMat>(crsD0);
408 RCP<XpMat> D0 =
rcp(
new Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node>(crsD0NonConst));
409 paramList.set<RCP<XpMat> >(
"D0", D0);
417 if (paramList.isParameter(
"M0inv")) {
419 RCP<TpCrsMat> tM0inv = paramList.get<RCP<TpCrsMat> >(
"M0inv");
420 paramList.remove(
"M0inv");
421 RCP<XpCrsMat> xM0inv = rcp_dynamic_cast<XpCrsMat>(tM0inv,
true);
422 paramList.set<RCP<XpCrsMat> >(
"M0inv", xM0inv);
424 RCP<const ThyDiagLinOpBase> thyM0inv = paramList.get<RCP<const ThyDiagLinOpBase> >(
"M0inv");
425 paramList.remove(
"M0inv");
426 RCP<const Thyra::VectorBase<Scalar> > diag = thyM0inv->getDiag();
427 RCP<const Thyra::TpetraVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> > ttDiag = rcp_dynamic_cast<
const Thyra::TpetraVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> >(diag);
428 RCP<const tV> tDiag = Thyra::TpetraOperatorVectorExtraction<Scalar,LocalOrdinal,GlobalOrdinal,Node>::getConstTpetraVector(diag);
429 RCP<XpMat> M0inv = Xpetra::MatrixFactory<Scalar,LocalOrdinal,GlobalOrdinal,Node>::Build(Xpetra::toXpetra(tDiag));
430 paramList.set<RCP<XpMat> >(
"M0inv", M0inv);
432 RCP<const ThyLinOpBase> thyM0inv = paramList.get<RCP<const ThyLinOpBase> >(
"M0inv");
433 paramList.remove(
"M0inv");
434 RCP<const XpCrsMat> crsM0inv = XpThyUtils::toXpetra(thyM0inv);
437 RCP<XpCrsMat> crsM0invNonConst = Teuchos::rcp_const_cast<XpCrsMat>(crsM0inv);
440 RCP<XpMat> M0inv =
rcp(
new Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node>(crsM0invNonConst));
441 paramList.set<RCP<XpMat> >(
"M0inv", M0inv);
450 "Thyra::MueLuRefMaxwellPreconditionerFactory: Tpetra does not support GO=int and or EpetraNode.");
454 #ifdef HAVE_MUELU_EPETRA
456 if (paramList.isType<RCP<Epetra_MultiVector> >(
"Nullspace")) {
457 RCP<Epetra_MultiVector> epetra_nullspace = Teuchos::null;
458 epetra_nullspace = paramList.get<RCP<Epetra_MultiVector> >(
"Nullspace");
459 paramList.remove(
"Nullspace");
460 RCP<Xpetra::EpetraMultiVectorT<int,Node> > xpEpNullspace =
Teuchos::rcp(
new Xpetra::EpetraMultiVectorT<int,Node>(epetra_nullspace));
461 RCP<Xpetra::MultiVector<typename Teuchos::ScalarTraits<Scalar>::magnitudeType,int,int,
Node> > xpEpNullspaceMult = rcp_dynamic_cast<Xpetra::MultiVector<typename Teuchos::ScalarTraits<Scalar>::magnitudeType,int,int,
Node> >(xpEpNullspace,
true);
462 RCP<XpMultVec> nullspace = rcp_dynamic_cast<XpMultVec>(xpEpNullspaceMult,
true);
463 paramList.set<RCP<XpMultVec> >(
"Nullspace", nullspace);
466 if (paramList.isParameter(
"M1")) {
468 RCP<Epetra_CrsMatrix> eM1 = paramList.get<RCP<Epetra_CrsMatrix> >(
"M1");
469 paramList.remove(
"M1");
470 RCP<XpEpCrsMat> xeM1 =
Teuchos::rcp(
new XpEpCrsMat(eM1));
471 RCP<XpCrsMat> xCrsM1 = rcp_dynamic_cast<XpCrsMat>(xeM1,
true);
472 RCP<XpCrsMatWrap> xwM1 =
Teuchos::rcp(
new XpCrsMatWrap(xCrsM1));
473 RCP<XpMat> xM1 = rcp_dynamic_cast<XpMat>(xwM1);
474 paramList.set<RCP<XpMat> >(
"M1", xM1);
477 RCP<const ThyLinOpBase> thyM1 = paramList.get<RCP<const ThyLinOpBase> >(
"M1");
478 paramList.remove(
"M1");
479 RCP<const XpCrsMat> crsM1 = XpThyUtils::toXpetra(thyM1);
482 RCP<XpCrsMat> crsM1NonConst = Teuchos::rcp_const_cast<XpCrsMat>(crsM1);
485 RCP<XpMat> M1 =
rcp(
new Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node>(crsM1NonConst));
486 paramList.set<RCP<XpMat> >(
"M1", M1);
494 if (paramList.isParameter(
"Ms")) {
496 RCP<Epetra_CrsMatrix> eMs = paramList.get<RCP<Epetra_CrsMatrix> >(
"Ms");
497 paramList.remove(
"Ms");
498 RCP<XpEpCrsMat> xeMs =
Teuchos::rcp(
new XpEpCrsMat(eMs));
499 RCP<XpCrsMat> xCrsMs = rcp_dynamic_cast<XpCrsMat>(xeMs,
true);
500 RCP<XpCrsMatWrap> xwMs =
Teuchos::rcp(
new XpCrsMatWrap(xCrsMs));
501 RCP<XpMat> xMs = rcp_dynamic_cast<XpMat>(xwMs);
502 paramList.set<RCP<XpMat> >(
"Ms", xMs);
505 RCP<const ThyLinOpBase> thyMs = paramList.get<RCP<const ThyLinOpBase> >(
"Ms");
506 paramList.remove(
"Ms");
507 RCP<const XpCrsMat> crsMs = XpThyUtils::toXpetra(thyMs);
510 RCP<XpCrsMat> crsMsNonConst = Teuchos::rcp_const_cast<XpCrsMat>(crsMs);
513 RCP<XpMat> Ms =
rcp(
new Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node>(crsMsNonConst));
514 paramList.set<RCP<XpMat> >(
"Ms", Ms);
521 if (paramList.isParameter(
"D0")) {
523 RCP<Epetra_CrsMatrix> eD0 = paramList.get<RCP<Epetra_CrsMatrix> >(
"D0");
524 paramList.remove(
"D0");
525 RCP<XpEpCrsMat> xeD0 =
Teuchos::rcp(
new XpEpCrsMat(eD0));
526 RCP<XpCrsMat> xCrsD0 = rcp_dynamic_cast<XpCrsMat>(xeD0,
true);
527 RCP<XpCrsMatWrap> xwD0 =
Teuchos::rcp(
new XpCrsMatWrap(xCrsD0));
528 RCP<XpMat> xD0 = rcp_dynamic_cast<XpMat>(xwD0);
529 paramList.set<RCP<XpMat> >(
"D0", xD0);
532 RCP<const ThyLinOpBase> thyD0 = paramList.get<RCP<const ThyLinOpBase> >(
"D0");
533 paramList.remove(
"D0");
534 RCP<const XpCrsMat> crsD0 = XpThyUtils::toXpetra(thyD0);
537 RCP<XpCrsMat> crsD0NonConst = Teuchos::rcp_const_cast<XpCrsMat>(crsD0);
540 RCP<XpMat> D0 =
rcp(
new Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node>(crsD0NonConst));
541 paramList.set<RCP<XpMat> >(
"D0", D0);
549 if (paramList.isParameter(
"M0inv")) {
551 RCP<Epetra_CrsMatrix> eM0inv = paramList.get<RCP<Epetra_CrsMatrix> >(
"M0inv");
552 paramList.remove(
"M0inv");
553 RCP<XpEpCrsMat> xeM0inv =
Teuchos::rcp(
new XpEpCrsMat(eM0inv));
554 RCP<XpCrsMat> xCrsM0inv = rcp_dynamic_cast<XpCrsMat>(xeM0inv,
true);
555 RCP<XpCrsMatWrap> xwM0inv =
Teuchos::rcp(
new XpCrsMatWrap(xCrsM0inv));
556 RCP<XpMat> xM0inv = rcp_dynamic_cast<XpMat>(xwM0inv);
557 paramList.set<RCP<XpMat> >(
"M0inv", xM0inv);
560 RCP<const ThyDiagLinOpBase> thyM0inv = paramList.get<RCP<const ThyDiagLinOpBase> >(
"M0inv");
561 paramList.remove(
"M0inv");
563 RCP<const Teuchos::Comm<int> > comm = A->getDomainMap()->getComm();
564 RCP<const Epetra_Map> map = Thyra::get_Epetra_Map(*(thyM0inv->range()), Xpetra::toEpetra(comm));
566 RCP<const Thyra::VectorBase<double> > diag = thyM0inv->getDiag();
567 RCP<const Epetra_Vector> eDiag = Thyra::get_Epetra_Vector(*map, diag);
568 RCP<Epetra_Vector> nceDiag = Teuchos::rcp_const_cast<
Epetra_Vector>(eDiag);
569 RCP<Xpetra::EpetraVectorT<int,Node> > xpEpDiag =
Teuchos::rcp(
new Xpetra::EpetraVectorT<int,Node>(nceDiag));
570 RCP<const Xpetra::Vector<typename Teuchos::ScalarTraits<Scalar>::magnitudeType,int,int,
Node> > xpDiag = rcp_dynamic_cast<
const Xpetra::Vector<typename Teuchos::ScalarTraits<Scalar>::magnitudeType,int,int,
Node> >(xpEpDiag,
true);
571 RCP<XpMat> M0inv = Xpetra::MatrixFactory<double,int,int,Node>::Build(xpDiag);
572 paramList.set<RCP<XpMat> >(
"M0inv", M0inv);
574 RCP<const ThyLinOpBase> thyM0inv = paramList.get<RCP<const ThyLinOpBase> >(
"M0inv");
575 paramList.remove(
"M0inv");
576 RCP<const XpCrsMat> crsM0inv = XpThyUtils::toXpetra(thyM0inv);
579 RCP<XpCrsMat> crsM0invNonConst = Teuchos::rcp_const_cast<XpCrsMat>(crsM0inv);
582 RCP<XpMat> M0inv =
rcp(
new Xpetra::CrsMatrixWrap<Scalar,LocalOrdinal,GlobalOrdinal,Node>(crsM0invNonConst));
583 paramList.set<RCP<XpMat> >(
"M0inv", M0inv);
593 paramList.set<
bool>(
"refmaxwell: use as preconditioner",
true);
598 preconditioner->resetMatrix(A);
602 RCP<ThyLinOpBase > thyraPrecOp = Teuchos::null;
603 RCP<const VectorSpaceBase<Scalar> > thyraRangeSpace = Xpetra::ThyraUtils<Scalar,LocalOrdinal,GlobalOrdinal,Node>::toThyra(preconditioner->getRangeMap());
604 RCP<const VectorSpaceBase<Scalar> > thyraDomainSpace = Xpetra::ThyraUtils<Scalar,LocalOrdinal,GlobalOrdinal,Node>::toThyra(preconditioner->getDomainMap());
606 RCP<XpOp> xpOp = Teuchos::rcp_dynamic_cast<XpOp>(preconditioner);
607 thyraPrecOp = Thyra::xpetraLinearOp<Scalar, LocalOrdinal, GlobalOrdinal, Node>(thyraRangeSpace, thyraDomainSpace,xpOp);
611 defaultPrec->initializeUnspecified(thyraPrecOp);
615 void uninitializePrec(PreconditionerBase<Scalar>* prec,
617 ESupportSolveUse* supportSolveUse
627 *fwdOp = Teuchos::null;
630 if (supportSolveUse) {
632 *supportSolveUse = Thyra::SUPPORT_SOLVE_UNSPECIFIED;
635 defaultPrec->uninitialize();
646 paramList_ = paramList;
650 RCP<ParameterList> savedParamList = paramList_;
651 paramList_ = Teuchos::null;
652 return savedParamList;
660 static RCP<const ParameterList> validPL;
663 validPL =
rcp(
new ParameterList());
673 std::string description()
const {
return "Thyra::MueLuRefMaxwellPreconditionerFactory"; }
683 #endif // HAVE_MUELU_EPETRA
687 #endif // #ifdef HAVE_MUELU_STRATIMIKOS
689 #endif // THYRA_MUELU_REFMAXWELL_PRECONDITIONER_FACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
static RCP< Xpetra::MultiVector< typename Teuchos::ScalarTraits< Scalar >::magnitudeType, LocalOrdinal, GlobalOrdinal, Node > > ExtractCoordinatesFromParameterList(ParameterList ¶mList)
bool nonnull(const std::shared_ptr< T > &p)
bool is_null(const std::shared_ptr< T > &p)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Preconditioner (wrapped as a Xpetra::Operator) for Maxwell's equations in curl-curl form...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Exception throws to report errors in the internal logical of the program.
Kokkos::Compat::KokkosSerialWrapperNode EpetraNode
#define TEUCHOS_ASSERT(assertion_test)
void getValidParameters(Teuchos::ParameterList ¶ms)
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)