MueLu Version of the Day
|
Preconditioner (wrapped as a Xpetra::Operator) for Maxwell's equations in curl-curl form. More...
#include <MueLu_Maxwell1_decl.hpp>
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 | |
Maxwell1 () | |
Constructor. | |
Maxwell1 (Teuchos::RCP< Hierarchy > H11, Teuchos::RCP< Hierarchy > H22) | |
Constructor with Hierarchies. | |
Maxwell1 (const Teuchos::RCP< Matrix > &SM_Matrix, const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< MultiVector > &Nullspace, const Teuchos::RCP< RealValuedMultiVector > &Coords, Teuchos::ParameterList &List, bool ComputePrec=true) | |
Maxwell1 (const Teuchos::RCP< Matrix > &SM_Matrix, const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &Kn_Matrix, const Teuchos::RCP< MultiVector > &Nullspace, const Teuchos::RCP< RealValuedMultiVector > &Coords, Teuchos::ParameterList &List, bool ComputePrec=true) | |
Maxwell1 (const Teuchos::RCP< Matrix > &SM_Matrix, const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &Kn_Matrix, const Teuchos::RCP< MultiVector > &Nullspace, const Teuchos::RCP< RealValuedMultiVector > &Coords, Teuchos::ParameterList &List, const Teuchos::RCP< Matrix > &GmhdA_Matrix, bool ComputePrec=true) | |
Maxwell1 (const Teuchos::RCP< Matrix > &SM_Matrix, Teuchos::ParameterList &List, bool ComputePrec=true) | |
virtual | ~Maxwell1 () |
Destructor. | |
Teuchos::RCP< const Map > | getDomainMap () const |
Returns the Xpetra::Map object associated with the domain of this operator. | |
Teuchos::RCP< const Map > | getRangeMap () const |
Returns the Xpetra::Map object associated with the range of this operator. | |
const Teuchos::RCP< Matrix > & | getJacobian () const |
Returns Jacobian matrix SM. | |
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 Types | |
enum | mode_type { MODE_STANDARD =0 , MODE_REFMAXWELL , MODE_EDGE_ONLY , MODE_GMHD_STANDARD } |
Execution modes. More... | |
Private Member Functions | |
Teuchos::RCP< Matrix > | generate_kn () const |
Generates the Kn matrix. | |
void | GMHDSetupHierarchy (Teuchos::ParameterList &List) const |
Sets up hiearchy for GMHD matrices that include generalized Ohms law equations. | |
void | initialize (const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &Kn_Matrix, const Teuchos::RCP< MultiVector > &Nullspace, const Teuchos::RCP< RealValuedMultiVector > &Coords, Teuchos::ParameterList &List) |
void | applyInverseRefMaxwellAdditive (const MultiVector &RHS, MultiVector &X) const |
apply RefMaxwell additive 2x2 style cycle | |
void | applyInverseStandard (const MultiVector &RHS, MultiVector &X) const |
apply standard Maxwell1 cycle | |
void | allocateMemory (int numVectors) const |
allocate multivectors for solve | |
void | dump (const Matrix &A, std::string name) const |
dump out matrix | |
void | dump (const MultiVector &X, std::string name) const |
dump out multivector | |
void | dumpCoords (const RealValuedMultiVector &X, std::string name) const |
dump out real-valued multivector | |
void | dump (const Teuchos::ArrayRCP< bool > &v, std::string name) const |
dump out boolean ArrayView | |
void | dump (const Kokkos::View< bool *, typename Node::device_type > &v, std::string name) const |
dump out boolean Kokkos::View | |
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::ParameterList | precList11_ |
Teuchos::ParameterList | precList22_ |
Teuchos::RCP< Hierarchy > | Hierarchy11_ |
Two hierarchies: one for the (1,1)-block, another for the (2,2)-block. | |
Teuchos::RCP< Hierarchy > | Hierarchy22_ |
Teuchos::RCP< Hierarchy > | HierarchyGmhd_ |
Teuchos::RCP< Matrix > | SM_Matrix_ |
Various matrices. | |
Teuchos::RCP< Matrix > | D0_Matrix_ |
Teuchos::RCP< Matrix > | Kn_Matrix_ |
Teuchos::RCP< Matrix > | GmhdA_Matrix_ |
Kokkos::View< bool *, typename Node::device_type > | BCrowsKokkos_ |
Vectors for BCs. | |
Kokkos::View< bool *, typename Node::device_type > | BCcolsKokkos_ |
Kokkos::View< bool *, typename Node::device_type > | BCdomainKokkos_ |
int | BCedges_ |
int | BCnodes_ |
Teuchos::ArrayRCP< bool > | BCrows_ |
Teuchos::ArrayRCP< bool > | BCcols_ |
Teuchos::ArrayRCP< bool > | BCdomain_ |
Teuchos::RCP< MultiVector > | Nullspace_ |
Nullspace. | |
Teuchos::RCP< RealValuedMultiVector > | Coords_ |
Coordinates. | |
bool | useKokkos_ |
Some options. | |
bool | allEdgesBoundary_ |
bool | allNodesBoundary_ |
bool | dump_matrices_ |
bool | enable_reuse_ |
bool | syncTimers_ |
bool | applyBCsTo22_ |
mode_type | mode_ |
RCP< Matrix > | P11_ |
Temporary memory (cached vectors for RefMaxwell-style) | |
Teuchos::RCP< MultiVector > | residualFine_ |
Teuchos::RCP< MultiVector > | residual11c_ |
Teuchos::RCP< MultiVector > | residual22_ |
Teuchos::RCP< MultiVector > | update11c_ |
Teuchos::RCP< MultiVector > | update22_ |
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 () |
Preconditioner (wrapped as a Xpetra::Operator) for Maxwell's equations in curl-curl form.
Definition at line 85 of file MueLu_Maxwell1_decl.hpp.
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType MueLu::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node >::magnitudeType |
Definition at line 92 of file MueLu_Maxwell1_decl.hpp.
typedef Teuchos::ScalarTraits<Scalar>::coordinateType MueLu::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node >::coordinateType |
Definition at line 93 of file MueLu_Maxwell1_decl.hpp.
typedef Xpetra::MultiVector<coordinateType,LO,GO,NO> MueLu::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node >::RealValuedMultiVector |
Definition at line 94 of file MueLu_Maxwell1_decl.hpp.
|
private |
Execution modes.
Enumerator | |
---|---|
MODE_STANDARD | |
MODE_REFMAXWELL | |
MODE_EDGE_ONLY | |
MODE_GMHD_STANDARD |
Definition at line 327 of file MueLu_Maxwell1_decl.hpp.
|
inline |
Constructor.
Definition at line 97 of file MueLu_Maxwell1_decl.hpp.
|
inline |
Constructor with Hierarchies.
Definition at line 106 of file MueLu_Maxwell1_decl.hpp.
|
inline |
Constructor with Jacobian
[in] | SM_Matrix | Jacobian |
[in] | D0_Matrix | Discrete Gradient |
[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 123 of file MueLu_Maxwell1_decl.hpp.
|
inline |
Constructor with Jacobian and nodal matrix
[in] | SM_Matrix | Jacobian |
[in] | D0_Matrix | Discrete Gradient |
[in] | Kn_Matrix | Nodal Laplacian |
[in] | Coords | Nodal coordinates |
[in] | List | Parameter list |
[in] | ComputePrec | If true, compute the preconditioner immediately |
Definition at line 145 of file MueLu_Maxwell1_decl.hpp.
|
inline |
Gmhd GMHD Constructor with Jacobian and nodal matrix AND Gmhd matrix
[in] | SM_Matrix | Jacobian |
[in] | D0_Matrix | Discrete Gradient |
[in] | Kn_Matrix | Nodal Laplacian |
[in] | Coords | Nodal coordinates |
[in] | List | Parameter list |
[in] | GmhdA_Matrix | Gmhd matrix including generalized Ohms law equations |
[in] | ComputePrec | If true, compute the preconditioner immediately |
Definition at line 168 of file MueLu_Maxwell1_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 190 of file MueLu_Maxwell1_decl.hpp.
|
inlinevirtual |
Destructor.
Definition at line 210 of file MueLu_Maxwell1_decl.hpp.
Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > MueLu::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap | ( | ) | const |
Returns the Xpetra::Map object associated with the domain of this operator.
Definition at line 86 of file MueLu_Maxwell1_def.hpp.
Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > MueLu::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap | ( | ) | const |
Returns the Xpetra::Map object associated with the range of this operator.
Definition at line 92 of file MueLu_Maxwell1_def.hpp.
|
inline |
Returns Jacobian matrix SM.
Definition at line 219 of file MueLu_Maxwell1_decl.hpp.
void MueLu::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node >::setParameters | ( | Teuchos::ParameterList & | list | ) |
Set parameters.
Definition at line 98 of file MueLu_Maxwell1_def.hpp.
void MueLu::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node >::compute | ( | bool | reuse = false | ) |
Setup the preconditioner.
Definition at line 268 of file MueLu_Maxwell1_def.hpp.
void MueLu::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node >::resetMatrix | ( | Teuchos::RCP< Matrix > | SM_Matrix_new, |
bool | ComputePrec = true ) |
Reset system matrix.
Definition at line 723 of file MueLu_Maxwell1_def.hpp.
void MueLu::Maxwell1< 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 794 of file MueLu_Maxwell1_def.hpp.
bool MueLu::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node >::hasTransposeApply | ( | ) | const |
Indicates whether this operator supports applying the adjoint operator.
Definition at line 812 of file MueLu_Maxwell1_def.hpp.
void MueLu::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node >::describe | ( | Teuchos::FancyOStream & | out, |
const Teuchos::EVerbosityLevel | verbLevel = Teuchos::VERB_HIGH ) const |
Definition at line 901 of file MueLu_Maxwell1_def.hpp.
|
inline |
Compute a residual R = B - (*this) * X.
Definition at line 246 of file MueLu_Maxwell1_decl.hpp.
|
private |
Generates the Kn matrix.
Definition at line 590 of file MueLu_Maxwell1_def.hpp.
|
private |
Sets up hiearchy for GMHD matrices that include generalized Ohms law equations.
Definition at line 249 of file MueLu_Maxwell1_def.hpp.
|
private |
Initialize with matrices except the Jacobian (don't compute the preconditioner)
[in] | D0_Matrix | Discrete Gradient |
[in] | Kn_Matrix | Kn nodal matrix |
[in] | Nullspace | Null space (needed for periodic) |
[in] | Coords | Nodal coordinates |
[in] | List | Parameter list |
Definition at line 818 of file MueLu_Maxwell1_def.hpp.
|
private |
apply RefMaxwell additive 2x2 style cycle
Definition at line 733 of file MueLu_Maxwell1_def.hpp.
|
private |
apply standard Maxwell1 cycle
Definition at line 789 of file MueLu_Maxwell1_def.hpp.
|
private |
allocate multivectors for solve
Definition at line 632 of file MueLu_Maxwell1_def.hpp.
|
private |
dump out matrix
Definition at line 656 of file MueLu_Maxwell1_def.hpp.
|
private |
dump out multivector
Definition at line 665 of file MueLu_Maxwell1_def.hpp.
|
private |
dump out real-valued multivector
Definition at line 674 of file MueLu_Maxwell1_def.hpp.
|
private |
dump out boolean ArrayView
Definition at line 683 of file MueLu_Maxwell1_def.hpp.
|
private |
dump out boolean Kokkos::View
Definition at line 693 of file MueLu_Maxwell1_def.hpp.
|
private |
get a (synced) timer
Definition at line 705 of file MueLu_Maxwell1_def.hpp.
|
mutableprivate |
ParameterLists.
Definition at line 306 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 306 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 306 of file MueLu_Maxwell1_decl.hpp.
|
private |
Two hierarchies: one for the (1,1)-block, another for the (2,2)-block.
Definition at line 309 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 309 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 309 of file MueLu_Maxwell1_decl.hpp.
|
private |
Various matrices.
Definition at line 312 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 312 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 312 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 312 of file MueLu_Maxwell1_decl.hpp.
|
private |
Vectors for BCs.
Definition at line 315 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 315 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 315 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 316 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 316 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 317 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 317 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 317 of file MueLu_Maxwell1_decl.hpp.
|
private |
Nullspace.
Definition at line 319 of file MueLu_Maxwell1_decl.hpp.
|
private |
Coordinates.
Definition at line 321 of file MueLu_Maxwell1_decl.hpp.
|
private |
Some options.
Definition at line 323 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 323 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 323 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 323 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 323 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 323 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 324 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 328 of file MueLu_Maxwell1_decl.hpp.
|
private |
Temporary memory (cached vectors for RefMaxwell-style)
Definition at line 331 of file MueLu_Maxwell1_decl.hpp.
|
mutableprivate |
Definition at line 332 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 332 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 332 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 332 of file MueLu_Maxwell1_decl.hpp.
|
private |
Definition at line 332 of file MueLu_Maxwell1_decl.hpp.