|
| template<class S2 , class LO2 , class GO2 , class N2 > |
| class | Hierarchy |
| |
| Xpetra::global_size_t | GetMaxCoarseSize () const |
| |
| bool | GetImplicitTranspose () const |
| |
| void | SetMaxCoarseSize (Xpetra::global_size_t maxCoarseSize) |
| |
| void | SetPRrebalance (bool doPRrebalance) |
| |
| void | SetImplicitTranspose (const bool &implicit) |
| |
| void | AddLevel (const RCP< Level > &level) |
| | Add a level at the end of the hierarchy. More...
|
| |
| void | AddNewLevel () |
| | Add a new level at the end of the hierarchy. More...
|
| |
| RCP< Level > & | GetLevel (const int levelID=0) |
| | Retrieve a certain level from hierarchy. More...
|
| |
| int | GetNumLevels () const |
| |
| int | GetGlobalNumLevels () const |
| |
| MagnitudeType | GetRate () const |
| |
| double | GetOperatorComplexity () const |
| |
| double | GetSmootherComplexity () const |
| |
| void | CheckLevel (Level &level, int levelID) |
| | Helper function. More...
|
| |
| bool | Setup (int coarseLevelID, const RCP< const FactoryManagerBase > fineLevelManager, const RCP< const FactoryManagerBase > coarseLevelManager, const RCP< const FactoryManagerBase > nextLevelManager=Teuchos::null) |
| | Multi-level setup phase: build a new level of the hierarchy. More...
|
| |
| void | Setup (const FactoryManagerBase &manager=FactoryManager(), int startLevel=0, int numDesiredLevels=GetDefaultMaxLevels()) |
| |
| void | SetupRe () |
| |
| void | Clear (int startLevel=0) |
| | Clear impermanent data from previous setup. More...
|
| |
| void | ExpertClear () |
| |
| CycleType | GetCycle () const |
| | Returns multigrid cycle type (supports VCYCLE and WCYCLE) More...
|
| |
| void | SetCycle (CycleType Cycle) |
| | Supports VCYCLE and WCYCLE types. More...
|
| |
| void | SetProlongatorScalingFactor (double scalingFactor) |
| | Specify damping factor alpha such that x = x + alpha*P*c, where c is the coarse grid correction. More...
|
| |
| ReturnType | Iterate (const MultiVector &B, MultiVector &X, ConvData conv=ConvData(), bool InitialGuessIsZero=false, LO startLevel=0) |
| | Apply the multigrid preconditioner. More...
|
| |
| void | Write (const LO &start=-1, const LO &end=-1, const std::string &suffix="") |
| | Print matrices in the multigrid hierarchy to file. More...
|
| |
| static CycleType | GetDefaultCycle () |
| |
| static bool | GetDefaultImplicitTranspose () |
| |
| static Xpetra::global_size_t | GetDefaultMaxCoarseSize () |
| |
| static int | GetDefaultMaxLevels () |
| |
| static bool | GetDefaultPRrebalance () |
| |
| int | LastLevelID () const |
| |
| void | DumpCurrentGraph () const |
| |
|
| virtual | ~BaseClass () |
| | Destructor. More...
|
| |
| | VerboseObject () |
| |
| virtual | ~VerboseObject () |
| | Destructor. More...
|
| |
| 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 (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) |
| |
| | VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) |
| |
| virtual const VerboseObject & | setVerbLevel (const EVerbosityLevel verbLevel) const |
| |
| virtual const VerboseObject & | setVerbLevel (const EVerbosityLevel verbLevel) const |
| |
| virtual const VerboseObject & | setOverridingVerbLevel (const EVerbosityLevel verbLevel) const |
| |
| virtual const VerboseObject & | setOverridingVerbLevel (const EVerbosityLevel verbLevel) const |
| |
| TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< const ParameterList > | getValidVerboseObjectSublist () |
| |
| TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void | setupVerboseObjectSublist (ParameterList *paramList) |
| |
| TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void | readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel) |
| |
| void | readVerboseObjectSublist (ParameterList *paramList, VerboseObject< ObjectType > *verboseObject) |
| |
| virtual EVerbosityLevel | getVerbLevel () const |
| |
| virtual | ~VerboseObjectBase () |
| |
| | VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) |
| |
| virtual const VerboseObjectBase & | setOStream (const RCP< FancyOStream > &oStream) const |
| |
| virtual const VerboseObjectBase & | setOverridingOStream (const RCP< FancyOStream > &oStream) const |
| |
| virtual VerboseObjectBase & | setLinePrefix (const std::string &linePrefix) |
| |
| virtual RCP< FancyOStream > | getOStream () const |
| |
| virtual RCP< FancyOStream > | getOverridingOStream () const |
| |
| virtual std::string | getLinePrefix () const |
| |
| virtual | ~VerboseObjectBase () |
| |
| | VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) |
| |
| virtual const VerboseObjectBase & | setOStream (const RCP< FancyOStream > &oStream) const |
| |
| virtual const VerboseObjectBase & | setOverridingOStream (const RCP< FancyOStream > &oStream) const |
| |
| virtual VerboseObjectBase & | setLinePrefix (const std::string &linePrefix) |
| |
| virtual RCP< FancyOStream > | getOStream () const |
| |
| virtual RCP< FancyOStream > | getOverridingOStream () const |
| |
| virtual std::string | getLinePrefix () const |
| |
| virtual OSTab | getOSTab (const int tabs=1, const std::string &linePrefix="") const |
| |
| virtual | ~Describable () |
| | Destructor. More...
|
| |
| virtual std::string | ShortClassName () const |
| | Return the class name of the object, without template parameters and without namespace. More...
|
| |
| void | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
| |
| DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
| |
| std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
| |
| void | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
| |
| | LabeledObject () |
| |
| virtual | ~LabeledObject () |
| |
| virtual void | setObjectLabel (const std::string &objectLabel) |
| |
| virtual std::string | getObjectLabel () const |
| |
| static void | SetDefaultVerbLevel (const VerbLevel defaultVerbLevel) |
| | Set the default (global) verbosity level. More...
|
| |
| static VerbLevel | GetDefaultVerbLevel () |
| | Get the default (global) verbosity level. More...
|
| |
| static void | SetDefaultOStream (const Teuchos::RCP< Teuchos::FancyOStream > &defaultOStream) |
| |
| static Teuchos::RCP< Teuchos::FancyOStream > | GetDefaultOStream () |
| |
| static void | setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel) |
| |
| static void | setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel) |
| |
| static EVerbosityLevel | getDefaultVerbLevel () |
| |
| static EVerbosityLevel | getDefaultVerbLevel () |
| |
| static void | setDefaultOStream (const RCP< FancyOStream > &defaultOStream) |
| |
| static RCP< FancyOStream > | getDefaultOStream () |
| |
| static void | setDefaultOStream (const RCP< FancyOStream > &defaultOStream) |
| |
| static RCP< FancyOStream > | getDefaultOStream () |
| |
| static const EVerbosityLevel | verbLevel_default |
| |
| void | initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) |
| |
| void | initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) |
| |
| virtual void | informUpdatedVerbosityState () const |
| |
template<class Scalar = Xpetra::Operator<>::scalar_type, class LocalOrdinal = typename Xpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Xpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
class MueLu::Hierarchy< Scalar, LocalOrdinal, GlobalOrdinal, Node >
Provides methods to build a multigrid hierarchy and apply multigrid cycles.
Allows users to manually populate operators at different levels within a multigrid method and push them into the hierarchy via SetLevel() and/or to supply factories for automatically generating prolongators, restrictors, and coarse level discretizations. Additionally, this class contains an apply method that supports V and W cycles.
Definition at line 104 of file MueLu_Hierarchy_decl.hpp.
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Multi-level setup phase: build a new level of the hierarchy.
This method is aimed to be used in a loop building the hierarchy level by level. See Hierarchy::Setup(manager, startLevel, numDesiredLevels) for an example of usage.
- Parameters
-
| coarseLevelID | ID of the level to be built. |
| fineLevelManager | defines how to build missing data of the fineLevel (example: aggregates) |
| coarseLevelManager | defines how to build the level |
| nextLevelManager | defines how the next coarse level will be built. This is used to post corresponding request before building the coarse level to keep useful data. |
CoarseLevel is considered to be the last level if:
- input parameter isLastLevel == true or
- Ac->getRowMap()->getGlobalNumElements() <= maxCoarseSize_ Method return true if CoarseLevel is the last level.
Pre-condition: FineLevel:
- must have kept useful data (TODO: not tested yet)
- must be Teuchos::null when Setup is called for finest level (Setup then automatically calls Request for "Smoother" and "CoarseSolver") CoarseLevel:
- already allocated (using Hierarchy::AddLevel())
- requests already posted (exception: for finest level (=fineLevelManager==null) requests are called within setup routine) NextLevel:
- do not need to be allocate but could (FIXME: will be deleted if lastlevel...).
- should be null when Setup is called for last level
Post-condition: FineLevel:
- temporary data have been used and released (this condition is not tested) CoarseLevel:
- built, requests have been used
- if it is the last level (due to input parameter isLastLevel or getGlobalNumElements() <= maxCoarseSize_), then the coarse solver factory of the factory manager have been used instead of the smoother factory. NextLevel: If input parameter isLastLevel == false:
- have been allocated
- requests already posted.
Definition at line 246 of file MueLu_Hierarchy_def.hpp.
template<class Scalar = Xpetra::Operator<>::scalar_type, class LocalOrdinal = typename Xpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Xpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
template<class Scalar = Xpetra::Operator<>::scalar_type, class LocalOrdinal = typename Xpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Xpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
template<class Scalar = Xpetra::Operator<>::scalar_type, class LocalOrdinal = typename Xpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Xpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
| void MueLu::Hierarchy< Scalar, LocalOrdinal, GlobalOrdinal, Node >::SetProlongatorScalingFactor |
( |
double |
scalingFactor | ) |
|
|
inline |
Specify damping factor alpha such that x = x + alpha*P*c, where c is the coarse grid correction.
Definition at line 253 of file MueLu_Hierarchy_decl.hpp.
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Apply the multigrid preconditioner.
In theory, more general cycle types than just V- and W-cycles are possible. However, the enumerated type CycleType would have to be extended.
- Parameters
-
| B | right-hand side of linear problem |
| X | initial and final (approximate) solution of linear problem |
| ConvData | struct which stores convergence criteria (maximum number of multigrid iterations or stopping tolerance) |
| InitialGuessIsZero | Indicates whether the initial guess is zero |
| startLevel | index of starting level to build multigrid hierarchy (default = 0) |
Definition at line 815 of file MueLu_Hierarchy_def.hpp.
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
| void MueLu::Hierarchy< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Write |
( |
const LO & |
start = -1, |
|
|
const LO & |
end = -1, |
|
|
const std::string & |
suffix = "" |
|
) |
| |
Print matrices in the multigrid hierarchy to file.
- Parameters
-
| [in] | start | start level |
| [in] | end | end level |
Default behavior is to print system and transfer matrices from the entire hierarchy. Files are named "A_0.m", "P_1.m", "R_1.m", etc, and are in matrix market coordinate format.
Definition at line 1104 of file MueLu_Hierarchy_def.hpp.
template<class Scalar = Xpetra::Operator<>::scalar_type, class LocalOrdinal = typename Xpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Xpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
template<class S2 , class LO2 , class GO2 , class N2 >
template<class Scalar = Xpetra::Operator<>::scalar_type, class LocalOrdinal = typename Xpetra::Operator<Scalar>::local_ordinal_type, class GlobalOrdinal = typename Xpetra::Operator<Scalar, LocalOrdinal>::global_ordinal_type, class Node = typename Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>