46 #ifndef MUELU_REFMAXWELL_DECL_HPP 47 #define MUELU_REFMAXWELL_DECL_HPP 60 #ifdef HAVE_MUELU_KOKKOS_REFACTOR 70 #include "MueLu_TrilinosSmoother.hpp" 71 #include "MueLu_Hierarchy.hpp" 73 #include "Xpetra_Map_fwd.hpp" 74 #include "Xpetra_Matrix_fwd.hpp" 75 #include "Xpetra_MatrixFactory_fwd.hpp" 76 #include "Xpetra_MultiVectorFactory_fwd.hpp" 77 #include "Xpetra_VectorFactory_fwd.hpp" 78 #include "Xpetra_CrsMatrixWrap_fwd.hpp" 79 #include "Xpetra_ExportFactory_fwd.hpp" 81 #if defined(HAVE_MUELU_IFPACK2) && (!defined(HAVE_MUELU_EPETRA) || defined(HAVE_MUELU_INST_DOUBLE_INT_INT)) 83 #include "Ifpack2_Hiptmair.hpp" 112 template <
class Scalar,
116 class RefMaxwell :
public VerboseObject,
public Xpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> {
118 #undef MUELU_REFMAXWELL_SHORT 162 bool ComputePrec =
true)
164 initialize(D0_Matrix,M0inv_Matrix,M1_Matrix,Nullspace,Coords,List);
189 initialize(D0_Matrix,M0inv_Matrix,M1_Matrix,Nullspace,Coords,List);
208 bool ComputePrec =
true)
210 initialize(D0_Matrix,Teuchos::null,M1_Matrix,Nullspace,Coords,List);
233 initialize(D0_Matrix,Teuchos::null,M1_Matrix,Nullspace,Coords,List);
244 bool ComputePrec =
true)
253 initialize(D0_Matrix,M0inv_Matrix,M1_Matrix,Nullspace,Coords,List);
255 if (SM_Matrix != Teuchos::null)
315 template <
class NewNode>
346 #if defined(HAVE_MUELU_IFPACK2) && (!defined(HAVE_MUELU_EPETRA) || defined(HAVE_MUELU_INST_DOUBLE_INT_INT)) 354 #ifdef HAVE_MUELU_KOKKOS_REFACTOR 355 Kokkos::View<const bool*, typename Node::device_type> BCrowsKokkos_;
356 Kokkos::View<const bool*, typename Node::device_type> BCcolsKokkos_;
375 #define MUELU_REFMAXWELL_SHORT 376 #endif // MUELU_REFMAXWELL_DECL_HPP
Teuchos::RCP< SmootherBase > PostSmoother_
Teuchos::RCP< Matrix > D0_T_Matrix_
Teuchos::ArrayRCP< const bool > BCrows_
Vectors for BCs.
Teuchos::RCP< Matrix > Ms_Matrix_
RefMaxwell(const Teuchos::RCP< Matrix > &SM_Matrix, const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &M0inv_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace, const Teuchos::RCP< RealValuedMultiVector > &Coords, Teuchos::ParameterList &List, bool ComputePrec=true)
Teuchos::RCP< Matrix > D0_Matrix_
T & get(const std::string &name, T def_value)
Teuchos::RCP< Matrix > SM_Matrix_
Various matrices.
Teuchos::RCP< MultiVector > D0res_
RefMaxwell(const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace, const Teuchos::RCP< RealValuedMultiVector > &Coords, Teuchos::ParameterList &List)
Teuchos::ParameterList smootherList_
Teuchos::ArrayRCP< const bool > BCcols_
Teuchos::RCP< Matrix > A22_
Namespace for MueLu classes and methods.
bool useHiptmairSmoothing_
void setParameters(Teuchos::ParameterList &list)
Set parameters.
void applyInverseAdditive(const MultiVector &RHS, MultiVector &X) const
apply additive algorithm for 2x2 solve
void buildProlongator()
Setup the prolongator for the (1,1)-block.
Teuchos::ScalarTraits< Scalar >::magnitudeType magnitudeType
Teuchos::RCP< MultiVector > P11res_
Temporary memory.
RefMaxwell(const Teuchos::RCP< Matrix > &SM_Matrix, const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace, const Teuchos::RCP< RealValuedMultiVector > &Coords, Teuchos::ParameterList &List, bool ComputePrec=true)
Preconditioner (wrapped as a Xpetra::Operator) for Maxwell's equations in curl-curl form...
Xpetra::MultiVector< magnitudeType, LO, GO, NO > RealValuedMultiVector
Teuchos::RCP< Matrix > M0inv_Matrix_
Teuchos::RCP< MultiVector > residual_
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_HIGH) const
Teuchos::RCP< MultiVector > D0x_
void applyInverse121(const MultiVector &RHS, MultiVector &X) const
apply 1-2-1 algorithm for 2x2 solve
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::ParameterList precList11_
void compute()
Setup the preconditioner.
Teuchos::RCP< const Map > getRangeMap() const
Returns the Xpetra::Map object associated with the range of this operator.
Teuchos::RCP< Matrix > P11_
Teuchos::RCP< Matrix > A_nodal_Matrix_
Teuchos::RCP< Hierarchy > Hierarchy22_
Teuchos::RCP< Matrix > M1_Matrix_
Teuchos::RCP< RealValuedMultiVector > CoordsH_
void initialize(const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &M0inv_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace, const Teuchos::RCP< RealValuedMultiVector > &Coords, Teuchos::ParameterList &List)
Teuchos::RCP< SmootherBase > PreSmoother_
bool disable_addon_
Some options.
virtual ~RefMaxwell()
Destructor.
Teuchos::ParameterList parameterList_
Parameter lists.
Teuchos::RCP< RealValuedMultiVector > Coords_
Coordinates.
RefMaxwell(const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &M0inv_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace, const Teuchos::RCP< RealValuedMultiVector > &Coords, Teuchos::ParameterList &List)
bool hasTransposeApply() const
Indicates whether this operator supports applying the adjoint operator.
void applyInverse212(const MultiVector &RHS, MultiVector &X) const
apply 2-1-2 algorithm for 2x2 solve
bool use_as_preconditioner_
Teuchos::RCP< RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, NewNode > > clone(const RCP< NewNode > &new_node) const
Classes::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > MultiVector
Teuchos::RCP< MultiVector > P11x_
Teuchos::RCP< Matrix > R11_
const Teuchos::RCP< Matrix > & getJacobian() const
Returns Jacobian matrix SM.
Teuchos::RCP< Matrix > AH_
void formCoarseMatrix()
Compute P11^{T}*A*P11 efficiently.
void applyInverse11only(const MultiVector &RHS, MultiVector &X) const
apply solve to 1-1 block only
void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const
Teuchos::RCP< Hierarchy > HierarchyH_
Two hierarchies: one for the coarse (1,1)-block, another for the (2,2)-block.
RefMaxwell(Teuchos::RCP< Hierarchy > HH, Teuchos::RCP< Hierarchy > H22)
Constructor with Hierarchies.
Teuchos::ParameterList precList22_
Teuchos::RCP< MultiVector > Nullspace_
Nullspace.
void resetMatrix(Teuchos::RCP< Matrix > SM_Matrix_new)
Reset system matrix.
Teuchos::RCP< const Map > getDomainMap() const
Returns the Xpetra::Map object associated with the domain of this operator.
RefMaxwell(const Teuchos::RCP< Matrix > &SM_Matrix, Teuchos::ParameterList &List, bool ComputePrec=true)