MueLu Version of the Day
|
#include <MueLu_ParameterListInterpreter_decl.hpp>
Private Types | |
typedef std::pair< std::string, const FactoryBase * > | keep_pair |
Constructors/Destructors | |
typedef std::map< std::string, RCP< const FactoryBase > > | FactoryMap |
typedef std::map< std::string, RCP< FactoryManagerBase > > | FactoryManagerMap |
int | blockSize_ |
block size of matrix (fixed block size) | |
CycleType | Cycle_ |
multigrid cycle type (V-cycle or W-cycle) | |
int | WCycleStartLevel_ |
in case of W-cycle, level on which cycle should start | |
double | scalingFactor_ |
prolongator scaling factor | |
GlobalOrdinal | dofOffset_ |
global offset variable describing offset of DOFs in operator | |
bool | changedPRrebalance_ |
Easy interpreter stuff. | |
bool | changedImplicitTranspose_ |
bool | useCoordinates_ |
bool | useBlockNumber_ |
bool | useKokkos_ |
Teuchos::RCP< FactoryFactory > | factFact_ |
Internal factory for factories. | |
Teuchos::RCP< MueLu::FacadeClassFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | facadeFact_ |
FacadeClass factory. | |
ParameterListInterpreter () | |
Empty constructor. | |
ParameterListInterpreter (Teuchos::ParameterList ¶mList, Teuchos::RCP< const Teuchos::Comm< int > > comm=Teuchos::null, Teuchos::RCP< FactoryFactory > factFact=Teuchos::null, Teuchos::RCP< FacadeClassFactory > facadeFact=Teuchos::null) | |
Constructor that accepts a user-provided ParameterList. | |
ParameterListInterpreter (const std::string &xmlFileName, const Teuchos::Comm< int > &comm, Teuchos::RCP< FactoryFactory > factFact=Teuchos::null, Teuchos::RCP< FacadeClassFactory > facadeFact=Teuchos::null) | |
Constructor that reads parameters from an XML file. | |
virtual | ~ParameterListInterpreter () |
Destructor. | |
void | SetParameterList (const Teuchos::ParameterList ¶mList) |
Set parameter list for Parameter list interpreter. | |
void | SetupHierarchy (Hierarchy &H) const |
Call the SetupHierarchy routine from the HiearchyManager object. | |
virtual void | SetupOperator (Operator &A) const |
Setup Operator object. | |
void | SetEasyParameterList (const Teuchos::ParameterList ¶mList) |
void | Validate (const Teuchos::ParameterList ¶mList) const |
void | UpdateFactoryManager (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_Smoothers (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_CoarseSolvers (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_Aggregation_TentativeP (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_Restriction (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_RAP (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_Coordinates (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_Repartition (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps, RCP< Factory > &nullSpaceFactory) const |
void | UpdateFactoryManager_LowPrecision (ParameterList ¶mList, const ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_Nullspace (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps, RCP< Factory > &nullSpaceFactory) const |
void | UpdateFactoryManager_BlockNumber (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_LocalOrdinalTransfer (const std::string &VarName, const std::string &multigridAlgo, Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_SemiCoarsen (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_PCoarsen (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_SA (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_Reitzinger (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_Emin (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_PG (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_Replicate (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | UpdateFactoryManager_Matlab (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
void | SetFactoryParameterList (const Teuchos::ParameterList ¶mList) |
Factory interpreter stuff. | |
void | BuildFactoryMap (const Teuchos::ParameterList ¶mList, const FactoryMap &factoryMapIn, FactoryMap &factoryMapOut, FactoryManagerMap &factoryManagers) const |
Interpret "Factories" sublist. | |
Additional Inherited Members | |
![]() | |
typedef std::map< std::string, RCP< const FactoryBase > > | FactoryMap |
![]() | |
HierarchyManager (int numDesiredLevel=MasterList::getDefault< int >("max levels")) | |
Constructor. | |
virtual | ~HierarchyManager ()=default |
Destructor. | |
void | AddFactoryManager (int startLevel, int numDesiredLevel, RCP< FactoryManagerBase > manager) |
RCP< FactoryManagerBase > | GetFactoryManager (int levelID) const |
size_t | getNumFactoryManagers () const |
returns number of factory managers stored in levelManagers_ vector. | |
void | CheckConfig () |
virtual RCP< Hierarchy > | CreateHierarchy () const |
Create an empty Hierarchy object. | |
virtual RCP< Hierarchy > | CreateHierarchy (const std::string &label) const |
Create a labeled empty Hierarchy object. | |
![]() | |
virtual | ~HierarchyFactory () |
Destructor. | |
![]() | |
virtual | ~BaseClass () |
Destructor. | |
![]() | |
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 |
![]() | |
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 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 () |
![]() | |
virtual void | SetupExtra (Hierarchy &) const |
Setup extra data. | |
Teuchos::RCP< FactoryManagerBase > | LvlMngr (int levelID, int lastLevelID) const |
![]() | |
int | numDesiredLevel_ |
Xpetra::global_size_t | maxCoarseSize_ |
MsgType | verbosity_ |
bool | doPRrebalance_ |
bool | implicitTranspose_ |
bool | fuseProlongationAndUpdate_ |
bool | suppressNullspaceDimensionCheck_ |
Flag to indicate whether the check of the nullspace dimension is suppressed. | |
int | sizeOfMultiVectors_ |
int | graphOutputLevel_ |
-2 = no output, -1 = all levels | |
Teuchos::Array< int > | nullspaceToPrint_ |
Lists of entities to be exported (or saved) | |
Teuchos::Array< int > | coordinatesToPrint_ |
Teuchos::Array< int > | aggregatesToPrint_ |
Teuchos::Array< int > | elementToNodeMapsToPrint_ |
Teuchos::Array< std::string > | dataToSave_ |
std::map< std::string, Teuchos::Array< int > > | matricesToPrint_ |
Teuchos::RCP< Teuchos::ParameterList > | matvecParams_ |
std::map< int, std::vector< keep_pair > > | keep_ |
Definition at line 123 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 127 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 279 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 280 of file MueLu_ParameterListInterpreter_decl.hpp.
|
inlineprotected |
Empty constructor.
Constructor for derived classes
Definition at line 138 of file MueLu_ParameterListInterpreter_decl.hpp.
MueLu::ParameterListInterpreter< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ParameterListInterpreter | ( | Teuchos::ParameterList & | paramList, |
Teuchos::RCP< const Teuchos::Comm< int > > | comm = Teuchos::null, | ||
Teuchos::RCP< FactoryFactory > | factFact = Teuchos::null, | ||
Teuchos::RCP< FacadeClassFactory > | facadeFact = Teuchos::null ) |
Constructor that accepts a user-provided ParameterList.
Constructor for parameter list interpreter which directly interprets Teuchos::ParameterLists
The parameter list can be either in the easy parameter list format or in the factory driven parameter list format.
[in] | paramList | (Teuchos::ParameterList): ParameterList containing the MueLu parameters |
[in] | comm | (RCP<Teuchos::Comm<int> >): Optional RCP of a Teuchos communicator (default: Teuchos::null) |
[in] | factFact | (RCP<FactoryFactory>): Optional parameter allowing to define user-specific factory interpreters for user-specific extensions of the XML interface. (default: Teuchos::null) |
[in] | facadeFact | (RCP<FacadeFactory>): Optional parameter containing a FacadeFactory class. The user can register its own facade classes in the FacadeFactory and provide it to the ParameterListInterpreter. (default: Teuchos::null, means, only standard FacadeClass that come with MueLu are available) |
MueLu::ParameterListInterpreter< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ParameterListInterpreter | ( | const std::string & | xmlFileName, |
const Teuchos::Comm< int > & | comm, | ||
Teuchos::RCP< FactoryFactory > | factFact = Teuchos::null, | ||
Teuchos::RCP< FacadeClassFactory > | facadeFact = Teuchos::null ) |
Constructor that reads parameters from an XML file.
XML options are converted to ParameterList entries by Teuchos.
[in] | xmlFileName | (std::string): XML file to read |
[in] | comm | (Teuchos::Comm<int>): Teuchos communicator |
[in] | factFact | (RCP<FactoryFactory>): Optional parameter allowing to define user-specific factory interpreters for user-specific extensions of the XML interface. (default: Teuchos::null) |
[in] | facadeFact | (RCP<FacadeFactory>): Optional parameter containing a FacadeFactory class. The user can register its own facade classes in the FacadeFactory and provide it to the ParameterListInterpreter. (default: Teuchos::null, means, only standard FacadeClass that come with MueLu are available) |
Definition at line 163 of file MueLu_ParameterListInterpreter_def.hpp.
|
inlinevirtual |
Destructor.
Definition at line 171 of file MueLu_ParameterListInterpreter_decl.hpp.
void MueLu::ParameterListInterpreter< Scalar, LocalOrdinal, GlobalOrdinal, Node >::SetParameterList | ( | const Teuchos::ParameterList & | paramList | ) |
Set parameter list for Parameter list interpreter.
The routine checks whether it is a parameter list in the easy parameter format or the more advanced factory-based parameter format and calls the corresponding interpreter routine.
When finished, the parameter list is set that will used by the hierarchy build phase.
This method includes validation and some pre-parsing of the list for:
[in] | paramList | ParameterList containing the MueLu parameters. |
Definition at line 176 of file MueLu_ParameterListInterpreter_def.hpp.
|
virtual |
Call the SetupHierarchy routine from the HiearchyManager object.
Reimplemented from MueLu::HierarchyManager< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 2694 of file MueLu_ParameterListInterpreter_def.hpp.
|
privatevirtual |
Setup Operator object.
Reimplemented from MueLu::HierarchyManager< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 2674 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 246 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 2190 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 563 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 726 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 945 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1037 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1513 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1306 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1427 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1576 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1809 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1840 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1494 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1460 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1872 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1934 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1986 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1004 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 2054 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 2129 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 2148 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 2166 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Factory interpreter stuff.
Definition at line 2268 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Interpret "Factories" sublist.
paramList | [in]: "Factories" ParameterList |
factoryMapIn | [in]: FactoryMap maps variable names to factories. This factory map is used to resolve data dependencies of previously defined factories. |
factoryMapOut | [out]: FactoryMap maps variable names to factories. New factory entries are added to that FactoryMap. Usually, factoryMapIn and factoryMapOut should use the same object, such that new factories are added. We have to distinguish input and output if we build sub-factory managers, though. |
factoryManagers | [in/out]: FacotryManagerMap maps group names to a FactoryManager object. |
Interpret "Factories" parameter list. For each "factory" entry, add a new entry in the factoryMapOut map or create a new FacotryManager
Parameter List Parsing:
<ParameterList name="..."> <Parameter name="smootherFact0" type="string" value="TrilinosSmoother">
<ParameterList name="smootherFact1"> <Parameter name="type" type="string" value="TrilinosSmoother"> ... </ParameterList> </ParameterList>
Group factories We can group factories using parameter sublists with the "group" parameter
<ParameterList name="myFirstGroup"> <Parameter name="group" type="string" value="FactoryManager"> <Parameter name="A" type="string" value="mySubBlockAFactory1"> <Parameter name="P" type="string" value="myTentativePFact1"> <Parameter name="Aggregates" type="string" value="myAggFact1"> <Parameter name="Nullspace" type="string" value="myNspFact1"> <Parameter name="CoarseMap" type="string" value="myCoarseMap1"> </ParameterList> <ParameterList name="mySecondGroup"> <Parameter name="group" type="string" value="FactoryManager"> <Parameter name="A" type="string" value="mySubBlockAFactory2"> <Parameter name="P" type="string" value="myTentativePFact2"> <Parameter name="Aggregates" type="string" value="myAggFact1"> <Parameter name="Nullspace" type="string" value="myNspFact2"> <Parameter name="CoarseMap" type="string" value="myCoarseMap2"> </ParameterList>
These factory groups can be used with factories for blocked operators (such as the BlockedPFactory) to easily define the operations on the sub-blocks.
<ParameterList name="myBlockedPFact"> <Parameter name="factory" type="string" value="BlockedPFactory">
<ParameterList name="block1"> <Parameter name="group" type="string" value="myFirstGroup"> </ParameterList>
<ParameterList name="block2"> <Parameter name="group" type="string" value="mySecondGroup"> </ParameterList> </ParameterList>
As an alternative one can also directly specify the factories in the sublists "block1", "block2", etc..., of course. But using blocks has the advantage that one can reuse them in all blocked factories.
<ParameterList name="myBlockedPFact"> <Parameter name="factory" type="string" value="BlockedPFactory">
<ParameterList name="block1"> <Parameter name="A" type="string" value="mySubBlockAFactory1"> <Parameter name="P" type="string" value="myTentativePFact1"> <Parameter name="Aggregates" type="string" value="myAggFact1"> <Parameter name="Nullspace" type="string" value="myNspFact1"> <Parameter name="CoarseMap" type="string" value="myCoarseMap1"> </ParameterList>
<ParameterList name="block2"> <Parameter name="A" type="string" value="mySubBlockAFactory2"> <Parameter name="P" type="string" value="myTentativePFact2"> <Parameter name="Aggregates" type="string" value="myAggFact1"> <Parameter name="Nullspace" type="string" value="myNspFact2"> <Parameter name="CoarseMap" type="string" value="myCoarseMap2"> </ParameterList> </ParameterList>
As an alternative one can also directly specify the factories in the sublists "block1", "block2", etc..., of course.
add more dependencies (circular dependencies)
The NullspaceFactory needs to know which factory generates the null space on the coarse level (e.g., the TentativePFactory or the RebalancedPFactory). However, we cannot set the information in this place in the xml file, since the tentative prolongator facotry is typically defined later. We have to add that dependency later to the NullspaceFactory:
<ParameterList name="myNspFact"> <Parameter name="factory" type="string" value="NullspaceFactory">
</ParameterList>
<ParameterList name="myTentativePFact"> <Parameter name="factory" type="string" value="TentativePFactory"> <...> <Parameter name="Nullspace" type="string" value="myNspFact"> <Parameter name="CoarseMap" type="string" value="myCoarseMap"> </ParameterList>
<ParameterList name="myRebalanceProlongatorFact"> <Parameter name="factory" type="string" value="RebalanceTransferFactory"> <...> <Parameter name="Nullspace" type="string" value="myTentativePFact"> </ParameterList>
After the definition of the generating factory for the nullspace (in this case myRebalanceProlongatorFact) we add that dependency to the NullspaceFactory instance myNspFact
<ParameterList name="myNspFactDeps"> <Parameter name="dependency for" type="string" value="myNspFact"> <Parameter name="Nullspace" type="string" value="myRebalanceProlongatorFact"> </ParameterList>
We have to create a new block (with a different name than myNspFact). In the example we use "myNspFactDeps". It should contain a parameter "dependency for" with the name of the factory that we want the dependencies to be addded to. With above block we do not need the entry for the Nullspace in the global FactoryManager any more.
Definition at line 2570 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
block size of matrix (fixed block size)
Definition at line 200 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
multigrid cycle type (V-cycle or W-cycle)
Definition at line 201 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
in case of W-cycle, level on which cycle should start
Definition at line 202 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
prolongator scaling factor
Definition at line 203 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
global offset variable describing offset of DOFs in operator
Definition at line 204 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Easy interpreter stuff.
Definition at line 209 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 210 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 263 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 264 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 265 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Internal factory for factories.
Definition at line 285 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
FacadeClass factory.
Definition at line 288 of file MueLu_ParameterListInterpreter_decl.hpp.