46#ifndef MUELU_MULTIPHYS_DECL_HPP
47#define MUELU_MULTIPHYS_DECL_HPP
55#include "MueLu_TrilinosSmoother.hpp"
63#if defined(HAVE_MUELU_KOKKOS_REFACTOR)
64#include "MueLu_Utilities_kokkos_fwd.hpp"
67#include "Xpetra_Map_fwd.hpp"
68#include "Xpetra_Matrix_fwd.hpp"
69#include "Xpetra_MatrixFactory_fwd.hpp"
70#include "Xpetra_MultiVectorFactory_fwd.hpp"
71#include "Xpetra_VectorFactory_fwd.hpp"
72#include "Xpetra_CrsMatrixWrap_fwd.hpp"
88#undef MUELU_MULTIPHYS_SHORT
93 typedef typename Teuchos::ScalarTraits<Scalar>::magnitudeType
magnitudeType;
94 typedef typename Teuchos::ScalarTraits<Scalar>::coordinateType
coordinateType;
113 MultiPhys(
const Teuchos::RCP<Matrix> & AmatMultiPhysics,
114 const Teuchos::ArrayRCP<RCP<Matrix>> arrayOfAuxMatrices,
115 const Teuchos::ArrayRCP<Teuchos::RCP<MultiVector>> arrayOfNullspaces,
116 const Teuchos::ArrayRCP<Teuchos::RCP<RealValuedMultiVector>> arrayOfCoords,
118 Teuchos::ParameterList& List,
119 bool ComputePrec =
true):
123 initialize(AmatMultiPhysics, arrayOfAuxMatrices, arrayOfNullspaces, arrayOfCoords, nBlks, List);
140 void compute(
bool reuse=
false);
143 void resetMatrix(Teuchos::RCP<Matrix> SM_Matrix_new,
bool ComputePrec=
true);
148 void apply (
const MultiVector& X, MultiVector& Y,
149 Teuchos::ETransp mode = Teuchos::NO_TRANS,
150 Scalar alpha = Teuchos::ScalarTraits<Scalar>::one(),
151 Scalar beta = Teuchos::ScalarTraits<Scalar>::zero())
const;
156 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel = Teuchos::VERB_HIGH)
const;
160 const MultiVector & B,
161 MultiVector & R)
const {
162 using STS = Teuchos::ScalarTraits<Scalar>;
163 R.update(STS::one(),B,STS::zero());
164 this->
apply (X, R, Teuchos::NO_TRANS, -STS::one(), STS::one());
178 void initialize(
const Teuchos::RCP<Matrix> & AmatMultiPhysics,
179 const Teuchos::ArrayRCP<RCP<Matrix>> arrayOfAuxMatrices,
180 const Teuchos::ArrayRCP<Teuchos::RCP<MultiVector>> arrayOfNullspaces,
181 const Teuchos::ArrayRCP<Teuchos::RCP<RealValuedMultiVector>> arrayOfCoords,
183 Teuchos::ParameterList& List);
187 void applyInverse(
const MultiVector& RHS, MultiVector& X)
const;
218#define MUELU_MULTIPHYS_SHORT
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Teuchos::RCP< Hierarchy > hierarchyMultiphysics_
Teuchos::ArrayRCP< Teuchos::RCP< MultiVector > > arrayOfNullspaces_
Teuchos::RCP< Teuchos::TimeMonitor > getTimer(std::string name, RCP< const Teuchos::Comm< int > > comm=Teuchos::null) const
get a (synced) timer
Teuchos::ArrayRCP< Teuchos::RCP< Matrix > > arrayOfAuxMatrices_
void compute(bool reuse=false)
Setup the preconditioner.
Teuchos::ScalarTraits< Scalar >::magnitudeType magnitudeType
Teuchos::ParameterList parameterList_
ParameterLists.
void residual(const MultiVector &X, const MultiVector &B, MultiVector &R) const
Compute a residual R = B - (*this) * X.
void allocateMemory(int numVectors) const
allocate multivectors for solve
Teuchos::ScalarTraits< Scalar >::coordinateType coordinateType
void applyInverse(const MultiVector &RHS, MultiVector &X) const
apply standard MultiPhys cycle
Teuchos::RCP< const Map > getDomainMap() const
Returns the Xpetra::Map object associated with the domain of this operator.
void setParameters(Teuchos::ParameterList &list)
Set parameters.
void resetMatrix(Teuchos::RCP< Matrix > SM_Matrix_new, bool ComputePrec=true)
Reset system matrix.
Teuchos::RCP< Matrix > AmatMultiphysics_
Hierarchies: used to define P for (0,0)-block, .... (nBlks_-1,nBlks_-1) block.
Xpetra::MultiVector< coordinateType, LO, GO, NO > RealValuedMultiVector
virtual ~MultiPhys()
Destructor.
MultiPhys(const Teuchos::RCP< Matrix > &AmatMultiPhysics, const Teuchos::ArrayRCP< RCP< Matrix > > arrayOfAuxMatrices, const Teuchos::ArrayRCP< Teuchos::RCP< MultiVector > > arrayOfNullspaces, const Teuchos::ArrayRCP< Teuchos::RCP< RealValuedMultiVector > > arrayOfCoords, const int nBlks, Teuchos::ParameterList &List, bool ComputePrec=true)
Teuchos::ArrayRCP< Teuchos::RCP< Hierarchy > > arrayOfHierarchies_
bool hasTransposeApply() const
Indicates whether this operator supports applying the adjoint operator.
Teuchos::RCP< Teuchos::ParameterList > paramListMultiphysics_
Teuchos::ArrayRCP< Teuchos::RCP< RealValuedMultiVector > > arrayOfCoords_
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_HIGH) const
void initialize(const Teuchos::RCP< Matrix > &AmatMultiPhysics, const Teuchos::ArrayRCP< RCP< Matrix > > arrayOfAuxMatrices, const Teuchos::ArrayRCP< Teuchos::RCP< MultiVector > > arrayOfNullspaces, const Teuchos::ArrayRCP< Teuchos::RCP< RealValuedMultiVector > > arrayOfCoords, const int nBlks, Teuchos::ParameterList &List)
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< const Map > getRangeMap() const
Returns the Xpetra::Map object associated with the range of this operator.
Teuchos::ArrayRCP< Teuchos::RCP< Teuchos::ParameterList > > arrayOfParamLists_
Namespace for MueLu classes and methods.