MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

Preconditioner (wrapped as a Xpetra::Operator) for solving MultiPhysics PDEs. More...

#include <MueLu_MultiPhys_decl.hpp>

Inheritance diagram for MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
MueLu::VerboseObject

Public Types

typedef Teuchos::ScalarTraits< Scalar >::magnitudeType magnitudeType
typedef Teuchos::ScalarTraits< Scalar >::coordinateType coordinateType
typedef Xpetra::MultiVector< coordinateType, LO, GO, NO > RealValuedMultiVector

Public Member Functions

 MultiPhys ()
 Constructor.
 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)
virtual ~MultiPhys ()
 Destructor.
const Teuchos::RCP< const Map > getDomainMap () const
 Returns the Xpetra::Map object associated with the domain of this operator.
const Teuchos::RCP< const Map > getRangeMap () const
 Returns the Xpetra::Map object associated with the range of this operator.
void setParameters (Teuchos::ParameterList &list)
 Set parameters.
void compute (bool reuse=false)
 Setup the preconditioner.
void resetMatrix (Teuchos::RCP< Matrix > SM_Matrix_new, bool ComputePrec=true)
 Reset system matrix.
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
bool hasTransposeApply () const
 Indicates whether this operator supports applying the adjoint operator.
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_HIGH) const
void residual (const MultiVector &X, const MultiVector &B, MultiVector &R) const
 Compute a residual R = B - (*this) * X.
 VerboseObject ()
virtual ~VerboseObject ()
 Destructor.
VerbLevel GetVerbLevel () const
 Get the verbosity level.
void SetVerbLevel (const VerbLevel verbLevel)
 Set the verbosity level of this object.
int GetProcRankVerbose () const
 Get proc rank used for printing. Do not use this information for any other purpose..
int SetProcRankVerbose (int procRank) const
 Set proc rank used for printing.
bool IsPrint (MsgType type, int thisProcRankOnly=-1) const
 Find out whether we need to print out information for a specific message type.
Teuchos::FancyOStream & GetOStream (MsgType type, int thisProcRankOnly=0) const
 Get an output stream for outputting the input message type.
Teuchos::FancyOStream & GetBlackHole () const

Private Member Functions

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 applyInverse (const MultiVector &RHS, MultiVector &X) const
 apply standard MultiPhys cycle
void allocateMemory (int numVectors) const
 allocate multivectors for solve
Teuchos::RCP< Teuchos::TimeMonitor > getTimer (std::string name, RCP< const Teuchos::Comm< int > > comm=Teuchos::null) const
 get a (synced) timer

Private Attributes

Teuchos::ParameterList parameterList_
 ParameterLists.
Teuchos::RCP< Matrix > AmatMultiphysics_
 Hierarchies: used to define P for (0,0)-block, .... (nBlks_-1,nBlks_-1) block.
Teuchos::RCP< Teuchos::ParameterList > paramListMultiphysics_
Teuchos::RCP< HierarchyhierarchyMultiphysics_
Teuchos::ArrayRCP< Teuchos::RCP< Teuchos::ParameterList > > arrayOfParamLists_
Teuchos::ArrayRCP< Teuchos::RCP< Hierarchy > > arrayOfHierarchies_
Teuchos::ArrayRCP< Teuchos::RCP< Matrix > > arrayOfAuxMatrices_
Teuchos::ArrayRCP< Teuchos::RCP< MultiVector > > arrayOfNullspaces_
Teuchos::ArrayRCP< Teuchos::RCP< RealValuedMultiVector > > arrayOfCoords_
int nBlks_
bool useKokkos_
bool enable_reuse_
bool syncTimers_

Additional Inherited Members

static void SetDefaultVerbLevel (const VerbLevel defaultVerbLevel)
 Set the default (global) verbosity level.
static VerbLevel GetDefaultVerbLevel ()
 Get the default (global) verbosity level.
static void SetMueLuOStream (const Teuchos::RCP< Teuchos::FancyOStream > &mueluOStream)
static void SetMueLuOFileStream (const std::string &filename)
static Teuchos::RCP< Teuchos::FancyOStream > GetMueLuOStream ()

Detailed Description

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
class MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Preconditioner (wrapped as a Xpetra::Operator) for solving MultiPhysics PDEs.

Definition at line 46 of file MueLu_MultiPhys_decl.hpp.

Member Typedef Documentation

◆ magnitudeType

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::magnitudeType

Definition at line 51 of file MueLu_MultiPhys_decl.hpp.

◆ coordinateType

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
typedef Teuchos::ScalarTraits<Scalar>::coordinateType MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::coordinateType

Definition at line 52 of file MueLu_MultiPhys_decl.hpp.

◆ RealValuedMultiVector

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
typedef Xpetra::MultiVector<coordinateType, LO, GO, NO> MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::RealValuedMultiVector

Definition at line 53 of file MueLu_MultiPhys_decl.hpp.

Constructor & Destructor Documentation

◆ MultiPhys() [1/2]

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MultiPhys ( )
inline

Constructor.

Definition at line 56 of file MueLu_MultiPhys_decl.hpp.

◆ MultiPhys() [2/2]

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::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 )
inline

Constructor

Parameters
[in]AmatMultiPhysicsMultiphysics discretization matrix
[in]arrayOfAuxMatricesAuxiliary matrices used to generate subblock prolongators for multiphysics system
[in]arrayOfNullspacesNullspace multivectors used to generate subblock prolongators for multiphysics system
[in]arrayOfCoordsCoordinate multivectors used to generate subblock prolongators for multiphysics system
[in]nBlksnBlks x nBlks gives the block dimensions of the multiphysics operator
[in]ListParameter list
[in]ComputePrecIf true, compute the preconditioner immediately

Definition at line 72 of file MueLu_MultiPhys_decl.hpp.

◆ ~MultiPhys()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
virtual MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~MultiPhys ( )
inlinevirtual

Destructor.

Definition at line 89 of file MueLu_MultiPhys_decl.hpp.

Member Function Documentation

◆ getDomainMap()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
const Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap ( ) const

Returns the Xpetra::Map object associated with the domain of this operator.

Definition at line 43 of file MueLu_MultiPhys_def.hpp.

◆ getRangeMap()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
const Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap ( ) const

Returns the Xpetra::Map object associated with the range of this operator.

Definition at line 48 of file MueLu_MultiPhys_def.hpp.

◆ setParameters()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
void MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::setParameters ( Teuchos::ParameterList & list)

Set parameters.

Definition at line 53 of file MueLu_MultiPhys_def.hpp.

◆ compute()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
void MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::compute ( bool reuse = false)

Setup the preconditioner.

Definition at line 84 of file MueLu_MultiPhys_def.hpp.

◆ resetMatrix()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
void MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::resetMatrix ( Teuchos::RCP< Matrix > SM_Matrix_new,
bool ComputePrec = true )

Reset system matrix.

Definition at line 194 of file MueLu_MultiPhys_def.hpp.

◆ apply()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
void MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::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

Returns in Y the result of a Xpetra::Operator applied to a Xpetra::MultiVector X.

Parameters
[in]X- MultiVector of dimension NumVectors to multiply with matrix.
[out]Y- MultiVector of dimension NumVectors containing result.

Definition at line 206 of file MueLu_MultiPhys_def.hpp.

◆ hasTransposeApply()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
bool MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::hasTransposeApply ( ) const

Indicates whether this operator supports applying the adjoint operator.

Definition at line 215 of file MueLu_MultiPhys_def.hpp.

◆ describe()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
void MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::describe ( Teuchos::FancyOStream & out,
const Teuchos::EVerbosityLevel verbLevel = Teuchos::VERB_HIGH ) const

Definition at line 241 of file MueLu_MultiPhys_def.hpp.

◆ residual()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
void MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::residual ( const MultiVector & X,
const MultiVector & B,
MultiVector & R ) const
inline

Compute a residual R = B - (*this) * X.

Definition at line 120 of file MueLu_MultiPhys_decl.hpp.

◆ initialize()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
void MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::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 )
private

Initialize with matrices except the Jacobian (don't compute the preconditioner)

Parameters
[in]AmatMultiPhysicsMultiphysics discretization matrix
[in]arrayOfAuxMatricesArray of auxiliary matrices used to generate subblock prolongators for multiphysics system
[in]arrayOfNullspacesArray of nullspace multivectors used to generate subblock prolongators for multiphysics system
[in]arrayOfCoordsArray of coordinate multivectors used to generate subblock prolongators for multiphysics system
[in]nBlksnBlks x nBlks gives the block dimensions of the multiphysics operator
[in]ListParameter list

Definition at line 220 of file MueLu_MultiPhys_def.hpp.

◆ applyInverse()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
void MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::applyInverse ( const MultiVector & RHS,
MultiVector & X ) const
private

apply standard MultiPhys cycle

Definition at line 201 of file MueLu_MultiPhys_def.hpp.

◆ allocateMemory()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
void MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::allocateMemory ( int numVectors) const
private

allocate multivectors for solve

◆ getTimer()

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::RCP< Teuchos::TimeMonitor > MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getTimer ( std::string name,
RCP< const Teuchos::Comm< int > > comm = Teuchos::null ) const
private

get a (synced) timer

Definition at line 179 of file MueLu_MultiPhys_def.hpp.

Member Data Documentation

◆ parameterList_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::ParameterList MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::parameterList_
mutableprivate

ParameterLists.

Definition at line 155 of file MueLu_MultiPhys_decl.hpp.

◆ AmatMultiphysics_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::RCP<Matrix> MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::AmatMultiphysics_
private

Hierarchies: used to define P for (0,0)-block, .... (nBlks_-1,nBlks_-1) block.

Definition at line 159 of file MueLu_MultiPhys_decl.hpp.

◆ paramListMultiphysics_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::RCP<Teuchos::ParameterList> MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::paramListMultiphysics_
private

Definition at line 160 of file MueLu_MultiPhys_decl.hpp.

◆ hierarchyMultiphysics_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::RCP<Hierarchy> MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::hierarchyMultiphysics_
private

Definition at line 161 of file MueLu_MultiPhys_decl.hpp.

◆ arrayOfParamLists_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::ArrayRCP<Teuchos::RCP<Teuchos::ParameterList> > MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::arrayOfParamLists_
private

Definition at line 163 of file MueLu_MultiPhys_decl.hpp.

◆ arrayOfHierarchies_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::ArrayRCP<Teuchos::RCP<Hierarchy> > MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::arrayOfHierarchies_
private

Definition at line 164 of file MueLu_MultiPhys_decl.hpp.

◆ arrayOfAuxMatrices_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::ArrayRCP<Teuchos::RCP<Matrix> > MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::arrayOfAuxMatrices_
private

Definition at line 165 of file MueLu_MultiPhys_decl.hpp.

◆ arrayOfNullspaces_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::ArrayRCP<Teuchos::RCP<MultiVector> > MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::arrayOfNullspaces_
private

Definition at line 166 of file MueLu_MultiPhys_decl.hpp.

◆ arrayOfCoords_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::ArrayRCP<Teuchos::RCP<RealValuedMultiVector> > MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::arrayOfCoords_
private

Definition at line 167 of file MueLu_MultiPhys_decl.hpp.

◆ nBlks_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
int MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::nBlks_
private

Definition at line 169 of file MueLu_MultiPhys_decl.hpp.

◆ useKokkos_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
bool MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::useKokkos_
private

Definition at line 170 of file MueLu_MultiPhys_decl.hpp.

◆ enable_reuse_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
bool MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::enable_reuse_
private

Definition at line 170 of file MueLu_MultiPhys_decl.hpp.

◆ syncTimers_

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
bool MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node >::syncTimers_
private

Definition at line 170 of file MueLu_MultiPhys_decl.hpp.


The documentation for this class was generated from the following files: