MueLu
Version of the Day
|
#include <MueLu_ParameterListInterpreter_decl.hpp>
Public Member Functions | |
void | SetParameterList (const Teuchos::ParameterList ¶mList) |
Set parameter list for Parameter list interpreter. More... | |
void | SetupHierarchy (Hierarchy &H) const |
Call the SetupHierarchy routine from the HiearchyManager object. More... | |
Public Member Functions inherited from MueLu::HierarchyManager< Scalar, LocalOrdinal, GlobalOrdinal, Node > | |
HierarchyManager (int numDesiredLevel=MasterList::getDefault< int >("max levels")) | |
virtual | ~HierarchyManager () |
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. More... | |
void | CheckConfig () |
virtual RCP< Hierarchy > | CreateHierarchy () const |
Create an empty Hierarchy object. More... | |
virtual RCP< Hierarchy > | CreateHierarchy (const std::string &label) const |
Create a labeled empty Hierarchy object. More... | |
Public Member Functions inherited from MueLu::HierarchyFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node > | |
virtual | ~HierarchyFactory () |
Destructor. More... | |
Public Member Functions inherited from MueLu::BaseClass | |
virtual | ~BaseClass () |
Destructor. More... | |
Public Member Functions inherited from MueLu::VerboseObject | |
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... | |
Public Member Functions inherited from Teuchos::VerboseObject< VerboseObject > | |
VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) | |
virtual const VerboseObject & | setVerbLevel (const EVerbosityLevel verbLevel) const |
virtual const VerboseObject & | setOverridingVerbLevel (const EVerbosityLevel verbLevel) const |
virtual EVerbosityLevel | getVerbLevel () 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) |
Public Member Functions inherited from Teuchos::VerboseObjectBase | |
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 |
Public Member Functions inherited from MueLu::Describable | |
virtual | ~Describable () |
Destructor. More... | |
virtual std::string | ShortClassName () const |
Return the class name of the object, without template parameters and without namespace. More... | |
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. More... | |
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. More... | |
Public Member Functions inherited from Teuchos::Describable | |
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 |
DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
Private Types | |
typedef std::pair< std::string, const FactoryBase * > | keep_pair |
Private Member Functions | |
virtual void | SetupOperator (Operator &A) const |
Setup Operator object. More... | |
Private Attributes | |
int | blockSize_ |
block size of matrix (fixed block size) More... | |
CycleType | Cycle_ |
multigrid cycle type (V-cycle or W-cycle) More... | |
double | scalingFactor_ |
prolongator scaling factor More... | |
GlobalOrdinal | dofOffset_ |
global offset variable describing offset of DOFs in operator More... | |
Constructors/Destructors | |
ParameterListInterpreter () | |
Empty constructor. More... | |
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. More... | |
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. More... | |
virtual | ~ParameterListInterpreter () |
Destructor. More... | |
bool | changedPRrebalance_ |
Easy interpreter stuff. More... | |
bool | changedImplicitTranspose_ |
bool | useCoordinates_ |
bool | useKokkos_ |
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_Nullspace (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps, RCP< Factory > &nullSpaceFactory) 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_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_Matlab (Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const |
typedef std::map< std::string, RCP< const FactoryBase > > | FactoryMap |
typedef std::map< std::string, RCP< FactoryManagerBase > > | FactoryManagerMap |
Teuchos::RCP< FactoryFactory > | factFact_ |
Internal factory for factories. More... | |
Teuchos::RCP < MueLu::FacadeClassFactory < Scalar, LocalOrdinal, GlobalOrdinal, Node > > | facadeFact_ |
FacadeClass factory. More... | |
void | SetFactoryParameterList (const Teuchos::ParameterList ¶mList) |
Factory interpreter stuff. More... | |
void | BuildFactoryMap (const Teuchos::ParameterList ¶mList, const FactoryMap &factoryMapIn, FactoryMap &factoryMapOut, FactoryManagerMap &factoryManagers) const |
Interpret "Factories" sublist. More... | |
Definition at line 114 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 118 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 255 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 256 of file MueLu_ParameterListInterpreter_decl.hpp.
|
inlineprotected |
Empty constructor.
Constructor for derived classes
Definition at line 129 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) |
Definition at line 127 of file MueLu_ParameterListInterpreter_def.hpp.
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 153 of file MueLu_ParameterListInterpreter_def.hpp.
|
inlinevirtual |
Destructor.
Definition at line 162 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 166 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 2192 of file MueLu_ParameterListInterpreter_def.hpp.
|
privatevirtual |
Setup Operator object.
Reimplemented from MueLu::HierarchyManager< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 2176 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 243 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1698 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 503 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 641 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 851 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 910 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1178 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1035 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1145 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1226 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1429 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1451 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1511 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1563 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1613 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1655 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Definition at line 1675 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
Factory interpreter stuff.
Definition at line 1777 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 2082 of file MueLu_ParameterListInterpreter_def.hpp.
|
private |
block size of matrix (fixed block size)
Definition at line 191 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
multigrid cycle type (V-cycle or W-cycle)
Definition at line 192 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
prolongator scaling factor
Definition at line 193 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
global offset variable describing offset of DOFs in operator
Definition at line 194 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Easy interpreter stuff.
Definition at line 199 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 200 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 240 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Definition at line 241 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
Internal factory for factories.
Definition at line 261 of file MueLu_ParameterListInterpreter_decl.hpp.
|
private |
FacadeClass factory.
Definition at line 264 of file MueLu_ParameterListInterpreter_decl.hpp.