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

#include <MueLu_SparseConstraint_decl.hpp>

Inheritance diagram for MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
MueLu::Constraint< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::BaseClass MueLu::VerboseObject MueLu::Describable

Public Types

using MagnitudeType = typename Teuchos::ScalarTraits< Scalar >::magnitudeType
 
- Public Types inherited from MueLu::Constraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >
using MagnitudeType = typename Teuchos::ScalarTraits< Scalar >::magnitudeType
 

Constructors

RCP< Matrix > P_nodal_
 Nodal prolongator.
 
RCP< Matrix > D_
 Fine nullspace.
 
RCP< Matrix > Dc_
 Coarse nullspace.
 
RCP< Matrix > big_Dc_
 
RCP< const CrsGraph > RHS_pattern_
 Pattern for RHS.
 
Kokkos::View< bool * > block_is_singular_
 block_is_singular(i) indicates whether matrix for ith constraint is singular
 
 SparseConstraint ()=default
 
 SparseConstraint (const RCP< Matrix > &P_nodal, const RCP< Matrix > &D, const RCP< Matrix > &Dc, RCP< const CrsGraph > Ppattern, const std::string &solverType)
 Constructor.
 
void Setup ()
 
CrsGraph::local_graph_type FindBlocks (RCP< const CrsGraph > &) override
 
MagnitudeType ResidualNorm (RCP< const Matrix > P) const override
 
void AssignMatrixEntriesToConstraintVector (const Matrix &A, MultiVector &vecC) const
 

Additional Inherited Members

- Public Member Functions inherited from MueLu::Constraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >
 Constraint ()=default
 
virtual const RCP< const Map > getDomainMap () const
 The Map associated with the domain of this operator, which must be compatible with X.getMap().
 
virtual const RCP< const Map > getRangeMap () const
 The Map associated with the range of this operator, which must be compatible with Y.getMap().
 
virtual void apply (const MultiVector &P, MultiVector &Projected, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const
 Apply constraint.
 
void residual (const MultiVector &X, const MultiVector &B, MultiVector &R) const
 Compute a residual R = B - (*this) * X.
 
RCP< const CrsGraph > GetPattern () const
 
void SetPattern (RCP< const CrsGraph > &Ppattern)
 
void SetConstraintsMatrix (RCP< Matrix > &X)
 
RCP< Matrix > GetConstraintMatrix ()
 
void AssignMatrixEntriesToVector (const Matrix &P, const RCP< const CrsGraph > &pattern, MultiVector &vecP) const
 
void AssignMatrixEntriesToVector (const Matrix &P, MultiVector &vecP) const
 
RCP< Matrix > GetMatrixWithEntriesFromVector (MultiVector &vecP) const
 
void LeastSquaresSolve (const MultiVector &B, MultiVector &C) const
 
- Public Member Functions inherited from MueLu::BaseClass
virtual ~BaseClass ()
 Destructor.
 
- Public Member Functions inherited from MueLu::VerboseObject
 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
 
- Public Member Functions inherited from MueLu::Describable
virtual ~Describable ()
 Destructor.
 
virtual void describe (Teuchos::FancyOStream &out_arg, const VerbLevel verbLevel=Default) const
 
virtual std::string description () const
 Return a simple one-line description of this object.
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Print the object with some verbosity level to an FancyOStream object.
 
virtual std::string ShortClassName () const
 Return the class name of the object, without template parameters and without namespace.
 
- Static Public Member Functions inherited from MueLu::VerboseObject
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 ()
 
- Protected Member Functions inherited from MueLu::Constraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >
void PrepareLeastSquaresSolve (const std::string &solverType, bool detect_singular_blocks=false)
 

Detailed Description

template<class Scalar = DefaultScalar, class LocalOrdinal = DefaultLocalOrdinal, class GlobalOrdinal = DefaultGlobalOrdinal, class Node = DefaultNode>
class MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Definition at line 30 of file MueLu_SparseConstraint_decl.hpp.

Member Typedef Documentation

◆ MagnitudeType

template<class Scalar = DefaultScalar, class LocalOrdinal = DefaultLocalOrdinal, class GlobalOrdinal = DefaultGlobalOrdinal, class Node = DefaultNode>
using MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MagnitudeType = typename Teuchos::ScalarTraits<Scalar>::magnitudeType

Definition at line 40 of file MueLu_SparseConstraint_decl.hpp.

Constructor & Destructor Documentation

◆ SparseConstraint() [1/2]

template<class Scalar = DefaultScalar, class LocalOrdinal = DefaultLocalOrdinal, class GlobalOrdinal = DefaultGlobalOrdinal, class Node = DefaultNode>
MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::SparseConstraint ( )
default

◆ SparseConstraint() [2/2]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::SparseConstraint ( const RCP< Matrix > &  P_nodal,
const RCP< Matrix > &  D,
const RCP< Matrix > &  Dc,
RCP< const CrsGraph >  Ppattern,
const std::string &  solverType 
)

Constructor.

Parameters
P_nodal– Nodal prolongator matrix
D– Fine matrix
Dc– Coarse matrix
Ppattern– Nonzero sparsity pattern for the prolongator

Definition at line 32 of file MueLu_SparseConstraint_def.hpp.

Member Function Documentation

◆ Setup()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Setup ( )

Definition at line 48 of file MueLu_SparseConstraint_def.hpp.

◆ FindBlocks()

template<class Scalar = DefaultScalar, class LocalOrdinal = DefaultLocalOrdinal, class GlobalOrdinal = DefaultGlobalOrdinal, class Node = DefaultNode>
Xpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::local_graph_type MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::FindBlocks ( RCP< const CrsGraph > &  )
overridevirtual

◆ ResidualNorm()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ScalarTraits< Scalar >::magnitudeType MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ResidualNorm ( RCP< const Matrix >  P) const
overridevirtual

◆ AssignMatrixEntriesToConstraintVector()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::AssignMatrixEntriesToConstraintVector ( const Matrix &  A,
MultiVector &  vecC 
) const

Definition at line 308 of file MueLu_SparseConstraint_def.hpp.

Member Data Documentation

◆ P_nodal_

template<class Scalar = DefaultScalar, class LocalOrdinal = DefaultLocalOrdinal, class GlobalOrdinal = DefaultGlobalOrdinal, class Node = DefaultNode>
RCP<Matrix> MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::P_nodal_
private

Nodal prolongator.

Definition at line 67 of file MueLu_SparseConstraint_decl.hpp.

◆ D_

template<class Scalar = DefaultScalar, class LocalOrdinal = DefaultLocalOrdinal, class GlobalOrdinal = DefaultGlobalOrdinal, class Node = DefaultNode>
RCP<Matrix> MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::D_
private

Fine nullspace.

Definition at line 70 of file MueLu_SparseConstraint_decl.hpp.

◆ Dc_

template<class Scalar = DefaultScalar, class LocalOrdinal = DefaultLocalOrdinal, class GlobalOrdinal = DefaultGlobalOrdinal, class Node = DefaultNode>
RCP<Matrix> MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Dc_
private

Coarse nullspace.

Definition at line 73 of file MueLu_SparseConstraint_decl.hpp.

◆ big_Dc_

template<class Scalar = DefaultScalar, class LocalOrdinal = DefaultLocalOrdinal, class GlobalOrdinal = DefaultGlobalOrdinal, class Node = DefaultNode>
RCP<Matrix> MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::big_Dc_
private

Definition at line 74 of file MueLu_SparseConstraint_decl.hpp.

◆ RHS_pattern_

template<class Scalar = DefaultScalar, class LocalOrdinal = DefaultLocalOrdinal, class GlobalOrdinal = DefaultGlobalOrdinal, class Node = DefaultNode>
RCP<const CrsGraph> MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::RHS_pattern_
private

Pattern for RHS.

Definition at line 77 of file MueLu_SparseConstraint_decl.hpp.

◆ block_is_singular_

template<class Scalar = DefaultScalar, class LocalOrdinal = DefaultLocalOrdinal, class GlobalOrdinal = DefaultGlobalOrdinal, class Node = DefaultNode>
Kokkos::View<bool*> MueLu::SparseConstraint< Scalar, LocalOrdinal, GlobalOrdinal, Node >::block_is_singular_
private

block_is_singular(i) indicates whether matrix for ith constraint is singular

Definition at line 80 of file MueLu_SparseConstraint_decl.hpp.


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