MueLu
Version of the Day
|
Preconditioner (wrapped as a Xpetra::Operator) for Maxwell's equations in curl-curl form. More...
#include <MueLu_RefMaxwell_fwd.hpp>
Public Types | |
typedef Teuchos::ScalarTraits< Scalar >::magnitudeType | magnitudeType |
typedef Xpetra::MultiVector< magnitudeType, LO, GO, NO > | RealValuedMultiVector |
Public Member Functions | |
RefMaxwell () | |
Constructor. More... | |
RefMaxwell (Teuchos::RCP< Hierarchy > HH, Teuchos::RCP< Hierarchy > H22) | |
Constructor with Hierarchies. More... | |
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) | |
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) | |
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) | |
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) | |
RefMaxwell (const Teuchos::RCP< Matrix > &SM_Matrix, Teuchos::ParameterList &List, bool ComputePrec=true) | |
virtual | ~RefMaxwell () |
Destructor. More... | |
Teuchos::RCP< const Map > | getDomainMap () const |
Returns the Xpetra::Map object associated with the domain of this operator. More... | |
Teuchos::RCP< const Map > | getRangeMap () const |
Returns the Xpetra::Map object associated with the range of this operator. More... | |
const Teuchos::RCP< Matrix > & | getJacobian () const |
Returns Jacobian matrix SM. More... | |
void | setParameters (Teuchos::ParameterList &list) |
Set parameters. More... | |
void | compute () |
Setup the preconditioner. More... | |
void | buildProlongator () |
Setup the prolongator for the (1,1)-block. More... | |
void | formCoarseMatrix () |
Compute P11^{T}*A*P11 efficiently. More... | |
void | resetMatrix (Teuchos::RCP< Matrix > SM_Matrix_new) |
Reset system matrix. More... | |
void | applyInverseAdditive (const MultiVector &RHS, MultiVector &X) const |
apply additive algorithm for 2x2 solve More... | |
void | applyInverse121 (const MultiVector &RHS, MultiVector &X) const |
apply 1-2-1 algorithm for 2x2 solve More... | |
void | applyInverse212 (const MultiVector &RHS, MultiVector &X) const |
apply 2-1-2 algorithm for 2x2 solve More... | |
void | applyInverse11only (const MultiVector &RHS, MultiVector &X) const |
apply solve to 1-1 block only More... | |
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. More... | |
template<class NewNode > | |
Teuchos::RCP< RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, NewNode > > | clone (const RCP< NewNode > &new_node) const |
void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_HIGH) const |
![]() | |
VerbLevel | GetVerbLevel () const |
Get the verbosity level. More... | |
void | SetVerbLevel (const VerbLevel verbLevel) |
Set the verbosity level of this object. More... | |
int | GetProcRankVerbose () const |
Get proc rank used for printing. Do not use this information for any other purpose. More... | |
int | SetProcRankVerbose (int procRank) const |
Set proc rank used for printing. More... | |
bool | IsPrint (MsgType type, int thisProcRankOnly=-1) const |
Find out whether we need to print out information for a specific message type. More... | |
Teuchos::FancyOStream & | GetOStream (MsgType type, int thisProcRankOnly=0) const |
Get an output stream for outputting the input message type. More... | |
Teuchos::FancyOStream & | GetBlackHole () const |
VerboseObject () | |
virtual | ~VerboseObject () |
Destructor. More... | |
Private Member Functions | |
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) |
Private Attributes | |
Teuchos::RCP< Hierarchy > | HierarchyH_ |
Two hierarchies: one for the coarse (1,1)-block, another for the (2,2)-block. More... | |
Teuchos::RCP< Hierarchy > | Hierarchy22_ |
Teuchos::RCP< SmootherBase > | PreSmoother_ |
Teuchos::RCP< SmootherBase > | PostSmoother_ |
bool | useHiptmairSmoothing_ |
Teuchos::RCP< Matrix > | SM_Matrix_ |
Various matrices. More... | |
Teuchos::RCP< Matrix > | D0_Matrix_ |
Teuchos::RCP< Matrix > | D0_T_Matrix_ |
Teuchos::RCP< Matrix > | M0inv_Matrix_ |
Teuchos::RCP< Matrix > | M1_Matrix_ |
Teuchos::RCP< Matrix > | Ms_Matrix_ |
Teuchos::RCP< Matrix > | A_nodal_Matrix_ |
Teuchos::RCP< Matrix > | P11_ |
Teuchos::RCP< Matrix > | R11_ |
Teuchos::RCP< Matrix > | AH_ |
Teuchos::RCP< Matrix > | A22_ |
Teuchos::ArrayRCP< const bool > | BCrows_ |
Vectors for BCs. More... | |
Teuchos::ArrayRCP< const bool > | BCcols_ |
Teuchos::RCP< MultiVector > | Nullspace_ |
Nullspace. More... | |
Teuchos::RCP< RealValuedMultiVector > | Coords_ |
Coordinates. More... | |
Teuchos::RCP< RealValuedMultiVector > | CoordsH_ |
Teuchos::ParameterList | parameterList_ |
Parameter lists. More... | |
Teuchos::ParameterList | precList11_ |
Teuchos::ParameterList | precList22_ |
Teuchos::ParameterList | smootherList_ |
bool | disable_addon_ |
Some options. More... | |
bool | dump_matrices_ |
bool | useKokkos_ |
bool | use_as_preconditioner_ |
std::string | mode_ |
Teuchos::RCP< MultiVector > | P11res_ |
Temporary memory. More... | |
Teuchos::RCP< MultiVector > | P11x_ |
Teuchos::RCP< MultiVector > | D0res_ |
Teuchos::RCP< MultiVector > | D0x_ |
Teuchos::RCP< MultiVector > | residual_ |
Additional Inherited Members | |
![]() | |
static void | SetDefaultOStream (const Teuchos::RCP< Teuchos::FancyOStream > &defaultOStream) |
static Teuchos::RCP< Teuchos::FancyOStream > | GetDefaultOStream () |
static void | SetDefaultVerbLevel (const VerbLevel defaultVerbLevel) |
Set the default (global) verbosity level. More... | |
static VerbLevel | GetDefaultVerbLevel () |
Get the default (global) verbosity level. More... | |
Preconditioner (wrapped as a Xpetra::Operator) for Maxwell's equations in curl-curl form.
This uses a 2x2 block reformulation.
Reference: P. Bochev, J. Hu, C. Siefert, and R. Tuminaro. "An algebraic multigrid approach based on a compatible gauge reformulation of Maxwell's equations." SIAM Journal on Scientific Computing, 31(1), 557-583.
Parameter list options:
refmaxwell: mode
- a string
specifying the order of solve of the block system. Allowed values are: "additive" (default), "121", "212"refmaxwell: disable addon
- bool
specifing whether the addon should be built for stabilization. Default: "true"refmaxwell: use as preconditioner
- bool
specifing whether RefMaxwell is used as a preconditioner or as a solver.refmaxwell: dump matrices
- bool
specifing whether the matrices should be dumped. Default: "false"refmaxwell: prolongator compute algorithm
- a string
specifying the algorithm to build the prolongator. Allowed values are: "mat-mat" and "gustavson"refmaxwell: 11list
and refmaxwell: 22list
- parameter list for the multigrid hierarchies on 11 and 22 blocks Definition at line 54 of file MueLu_RefMaxwell_fwd.hpp.
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::magnitudeType |
Definition at line 123 of file MueLu_RefMaxwell_decl.hpp.
typedef Xpetra::MultiVector<magnitudeType,LO,GO,NO> MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::RealValuedMultiVector |
Definition at line 124 of file MueLu_RefMaxwell_decl.hpp.
|
inline |
Constructor.
Definition at line 127 of file MueLu_RefMaxwell_decl.hpp.
|
inline |
Constructor with Hierarchies.
Definition at line 136 of file MueLu_RefMaxwell_decl.hpp.
|
inline |
Constructor with Jacobian (with add on)
[in] | SM_Matrix | Jacobian |
[in] | D0_Matrix | Discrete Gradient |
[in] | M0inv_Matrix | Inverse of lumped nodal mass matrix (add on only) |
[in] | M1_Matrix | Edge mass matrix for the |
[in] | Nullspace | Null space (needed for periodic) |
[in] | Coords | Nodal coordinates |
[in] | List | Parameter list |
[in] | ComputePrec | If true, compute the preconditioner immediately |
Definition at line 155 of file MueLu_RefMaxwell_decl.hpp.
|
inline |
Constructor without Jacobian (with add on)
[in] | D0_Matrix | Discrete Gradient |
[in] | M0inv_Matrix | Inverse of lumped nodal mass matrix (add on only) |
[in] | M1_Matrix | Edge mass matrix for the |
[in] | Nullspace | Null space (needed for periodic) |
[in] | Coords | Nodal coordinates |
[in] | List | Parameter list |
Definition at line 182 of file MueLu_RefMaxwell_decl.hpp.
|
inline |
Constructor with Jacobian (no add on)
[in] | SM_Matrix | Jacobian |
[in] | D0_Matrix | Discrete Gradient |
[in] | M1_Matrix | Edge mass matrix for the |
[in] | Nullspace | Null space (needed for periodic) |
[in] | Coords | Nodal coordinates |
[in] | List | Parameter list |
[in] | ComputePrec | If true, compute the preconditioner immediately |
Definition at line 202 of file MueLu_RefMaxwell_decl.hpp.
|
inline |
Constructor without Jacobian (no add on)
[in] | D0_Matrix | Discrete Gradient |
[in] | M1_Matrix | Edge mass matrix for the |
[in] | Nullspace | Null space (needed for periodic) |
[in] | Coords | Nodal coordinates |
[in] | List | Parameter list |
Definition at line 227 of file MueLu_RefMaxwell_decl.hpp.
|
inline |
Constructor with parameter list
[in] | SM_Matrix | Jacobian |
[in] | List | Parameter list |
[in] | ComputePrec | If true, compute the preconditioner immediately |
Definition at line 242 of file MueLu_RefMaxwell_decl.hpp.
|
inlinevirtual |
Destructor.
Definition at line 264 of file MueLu_RefMaxwell_decl.hpp.
Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap | ( | ) | const |
Returns the Xpetra::Map object associated with the domain of this operator.
Definition at line 99 of file MueLu_RefMaxwell_def.hpp.
Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap | ( | ) | const |
Returns the Xpetra::Map object associated with the range of this operator.
Definition at line 105 of file MueLu_RefMaxwell_def.hpp.
|
inline |
Returns Jacobian matrix SM.
Definition at line 273 of file MueLu_RefMaxwell_decl.hpp.
void MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::setParameters | ( | Teuchos::ParameterList & | list | ) |
Set parameters.
Definition at line 111 of file MueLu_RefMaxwell_def.hpp.
void MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::compute | ( | ) |
Setup the preconditioner.
Definition at line 141 of file MueLu_RefMaxwell_def.hpp.
void MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::buildProlongator | ( | ) |
Setup the prolongator for the (1,1)-block.
Definition at line 559 of file MueLu_RefMaxwell_def.hpp.
void MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::formCoarseMatrix | ( | ) |
Compute P11^{T}*A*P11 efficiently.
Definition at line 1048 of file MueLu_RefMaxwell_def.hpp.
void MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::resetMatrix | ( | Teuchos::RCP< Matrix > | SM_Matrix_new | ) |
Reset system matrix.
Definition at line 1136 of file MueLu_RefMaxwell_def.hpp.
void MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::applyInverseAdditive | ( | const MultiVector & | RHS, |
MultiVector & | X | ||
) | const |
apply additive algorithm for 2x2 solve
Definition at line 1142 of file MueLu_RefMaxwell_def.hpp.
void MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::applyInverse121 | ( | const MultiVector & | RHS, |
MultiVector & | X | ||
) | const |
apply 1-2-1 algorithm for 2x2 solve
Definition at line 1164 of file MueLu_RefMaxwell_def.hpp.
void MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::applyInverse212 | ( | const MultiVector & | RHS, |
MultiVector & | X | ||
) | const |
apply 2-1-2 algorithm for 2x2 solve
Definition at line 1195 of file MueLu_RefMaxwell_def.hpp.
void MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::applyInverse11only | ( | const MultiVector & | RHS, |
MultiVector & | X | ||
) | const |
apply solve to 1-1 block only
Definition at line 1225 of file MueLu_RefMaxwell_def.hpp.
void MueLu::RefMaxwell< 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.
[in] | X | - MultiVector of dimension NumVectors to multiply with matrix. |
[out] | Y | - MultiVector of dimension NumVectors containing result. |
Definition at line 1244 of file MueLu_RefMaxwell_def.hpp.
bool MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::hasTransposeApply | ( | ) | const |
Indicates whether this operator supports applying the adjoint operator.
Definition at line 1302 of file MueLu_RefMaxwell_def.hpp.
|
inline |
Definition at line 317 of file MueLu_RefMaxwell_decl.hpp.
void MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node >::describe | ( | Teuchos::FancyOStream & | out, |
const Teuchos::EVerbosityLevel | verbLevel = Teuchos::VERB_HIGH |
||
) | const |
Definition at line 1339 of file MueLu_RefMaxwell_def.hpp.
|
private |
Initialize with matrices except the Jacobian (don't compute the preconditioner)
[in] | D0_Matrix | Discrete Gradient |
[in] | M0inv_Matrix | Inverse of lumped nodal mass matrix (add on only) |
[in] | M1_Matrix | Edge mass matrix |
[in] | Nullspace | Null space (needed for periodic) |
[in] | Coords | Nodal coordinates |
[in] | List | Parameter list |
Definition at line 1309 of file MueLu_RefMaxwell_def.hpp.
|
private |
Two hierarchies: one for the coarse (1,1)-block, another for the (2,2)-block.
Definition at line 344 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 344 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 345 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 345 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 349 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Various matrices.
Definition at line 351 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 351 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 351 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 351 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 351 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 351 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 352 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 352 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 352 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 352 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 352 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Vectors for BCs.
Definition at line 358 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 359 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Nullspace.
Definition at line 361 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Coordinates.
Definition at line 363 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 363 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Parameter lists.
Definition at line 365 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 365 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 365 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 365 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Some options.
Definition at line 367 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 367 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 367 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 367 of file MueLu_RefMaxwell_decl.hpp.
|
private |
Definition at line 368 of file MueLu_RefMaxwell_decl.hpp.
|
mutableprivate |
Temporary memory.
Definition at line 370 of file MueLu_RefMaxwell_decl.hpp.
|
mutableprivate |
Definition at line 370 of file MueLu_RefMaxwell_decl.hpp.
|
mutableprivate |
Definition at line 370 of file MueLu_RefMaxwell_decl.hpp.
|
mutableprivate |
Definition at line 370 of file MueLu_RefMaxwell_decl.hpp.
|
mutableprivate |
Definition at line 370 of file MueLu_RefMaxwell_decl.hpp.