MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu::ML2MueLuParameterTranslator Class Reference

Class that accepts ML-style parameters and builds a MueLu parameter list (easy input deck) More...

#include <MueLu_ML2MueLuParameterTranslator.hpp>

Static Private Member Functions

static std::string & ltrim (std::string &s)
 
static std::string & rtrim (std::string &s)
 
static std::string & trim (std::string &s)
 

Constructors/Destructors.

 ML2MueLuParameterTranslator ()
 Constructor. More...
 
virtual ~ML2MueLuParameterTranslator ()
 Destructor. More...
 

Parameter translation from ML to MueLu

static std::string translate (Teuchos::ParameterList &paramList, const std::string &defaultVals="")
 : Translate ML parameters to MueLu parameter XML string More...
 
static std::string translate (const std::string &xmlFileName, const std::string &defaultVals="")
 : Translate ML parameters to MueLu parameter XML string More...
 
static int SetDefaults (std::string ProblemType, Teuchos::ParameterList &List, int *options=0, double *params=0, const bool OverWrite=true)
 Sets ML's (not MueLu's) default parameters for aggregation-based preconditioners. More...
 
static int SetDefaultsDD (Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > &params, bool Overwrite=true)
 Sets default parameters for aggregation-based 2-level domain decomposition preconditioners. More...
 
static int SetDefaultsDD_LU (Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > &params, bool Overwrite=true)
 Sets default parameters for aggregation-based 2-level domain decomposition preconditioners, using LU on each subdomain. More...
 
static int SetDefaultsDD_3Levels (Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > &params, bool Overwrite=true)
 Sets default parameters for aggregation-based 3-level domain decomposition preconditioners. More...
 
static int SetDefaultsDD_3Levels_LU (Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > &params, bool Overwrite=true)
 Sets default parameters for aggregation-based 3-level domain decomposition preconditioners with LU. More...
 
static int SetDefaultsMaxwell (Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > &params, bool Overwrite=true)
 Sets default parameters for the eddy current equations equations. More...
 
static int SetDefaultsSA (Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > &params, bool Overwrite=true)
 Sets default parameters for classical smoothed aggregation. More...
 
static int SetDefaultsNSSA (Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > &params, bool Overwrite=true)
 Sets defaults for energy minimization preconditioning for nonsymmetric problems. More...
 
static int SetDefaultsClassicalAMG (Teuchos::ParameterList &List, Teuchos::RCP< std::vector< int > > &options, Teuchos::RCP< std::vector< double > > &params, bool Overwrite=true)
 Sets defaults for classical amg. More...
 
static int SetDefaultsRefMaxwell (Teuchos::ParameterList &inList, bool OverWrite=true)
 Sets defaults for RefMaxwell / Maxwell2. More...
 

Parameter handling

static std::string SetParameterList (const Teuchos::ParameterList &paramList_in, const std::string &defaultVals)
 : Interpret parameter list More...
 
static std::string GetSmootherFactory (const Teuchos::ParameterList &paramList, Teuchos::ParameterList &adaptingParamList, const std::string &pname, const std::string &value)
 : Helper function which translates ML smoother/solver paramters to MueLu XML string More...
 

Detailed Description

Class that accepts ML-style parameters and builds a MueLu parameter list (easy input deck)

This interpreter class is meant to make the transition from ML to MueLu easier.

Definition at line 33 of file MueLu_ML2MueLuParameterTranslator.hpp.

Constructor & Destructor Documentation

MueLu::ML2MueLuParameterTranslator::ML2MueLuParameterTranslator ( )
inline

Constructor.

Definition at line 39 of file MueLu_ML2MueLuParameterTranslator.hpp.

virtual MueLu::ML2MueLuParameterTranslator::~ML2MueLuParameterTranslator ( )
inlinevirtual

Destructor.

Definition at line 42 of file MueLu_ML2MueLuParameterTranslator.hpp.

Member Function Documentation

static std::string MueLu::ML2MueLuParameterTranslator::translate ( Teuchos::ParameterList paramList,
const std::string &  defaultVals = "" 
)
inlinestatic

: Translate ML parameters to MueLu parameter XML string

Parameters
[in]paramList_in,:ML parameter list
Returns
std::string with MueLu XML parameters

Definition at line 53 of file MueLu_ML2MueLuParameterTranslator.hpp.

static std::string MueLu::ML2MueLuParameterTranslator::translate ( const std::string &  xmlFileName,
const std::string &  defaultVals = "" 
)
inlinestatic

: Translate ML parameters to MueLu parameter XML string

Parameters
[in]xmlFileName,:file name with ML xml parameters
Returns
std::string with MueLu XML parameters

Definition at line 61 of file MueLu_ML2MueLuParameterTranslator.hpp.

int MueLu::ML2MueLuParameterTranslator::SetDefaults ( std::string  ProblemType,
Teuchos::ParameterList List,
int *  options = 0,
double *  params = 0,
const bool  OverWrite = true 
)
static

Sets ML's (not MueLu's) default parameters for aggregation-based preconditioners.

This function is use to set ML's default parameters, as defined in ml_MultiLevelPreconditioner.h. This has been ported to MueLu as a backwards compatibility feature for ML users transitioning to MueLu. These routines are designed to be used with or without compiling ML.

NOTE: MueLu's SetDefaults does NOT support the AztecOO options supported by ML.

Parameters
ProblemType(In) : a std::string, whose possible values are:
  • "SA" : classical smoothed aggregation preconditioners;
  • "NSSA" : default values for Petrov-Galerkin preconditioner for nonsymmetric systems
  • "maxwell" : default values for aggregation preconditioner for eddy current systems
  • "DD" : defaults for 2-level domain decomposition preconditioners based on aggregation;
  • "DD-LU" : Like "DD", but use exact LU decompositions on each subdomain;
  • "DD-ML" : 3-level domain decomposition preconditioners, with coarser spaces defined by aggregation;
  • "DD-ML-LU" : Like "DD-ML", but with LU decompositions on each subdomain.
    Parameters
    List(Out) : list which will populated by the default parameters
    options(In/Out) : integer array, of size AZ_OPTIONS_SIZE. NOTE: MueLu will ignore this parameter.
    params(In/Out) : double array, of size AZ_PARAMS_SIZE. NOTE: MueLu will ignore this parameter.
    OverWrite(In) : boolean. If false, any pre-existing values in the parameter list will be preserved. Default value is true, i.e., any pre-existing values may be overwritten.

Definition at line 535 of file MueLu_ML2MueLuParameterTranslator.cpp.

int MueLu::ML2MueLuParameterTranslator::SetDefaultsDD ( Teuchos::ParameterList List,
Teuchos::RCP< std::vector< int > > &  options,
Teuchos::RCP< std::vector< double > > &  params,
bool  Overwrite = true 
)
static

Sets default parameters for aggregation-based 2-level domain decomposition preconditioners.

Definition at line 617 of file MueLu_ML2MueLuParameterTranslator.cpp.

int MueLu::ML2MueLuParameterTranslator::SetDefaultsDD_LU ( Teuchos::ParameterList List,
Teuchos::RCP< std::vector< int > > &  options,
Teuchos::RCP< std::vector< double > > &  params,
bool  Overwrite = true 
)
static

Sets default parameters for aggregation-based 2-level domain decomposition preconditioners, using LU on each subdomain.

Definition at line 765 of file MueLu_ML2MueLuParameterTranslator.cpp.

int MueLu::ML2MueLuParameterTranslator::SetDefaultsDD_3Levels ( Teuchos::ParameterList List,
Teuchos::RCP< std::vector< int > > &  options,
Teuchos::RCP< std::vector< double > > &  params,
bool  Overwrite = true 
)
static

Sets default parameters for aggregation-based 3-level domain decomposition preconditioners.

Definition at line 655 of file MueLu_ML2MueLuParameterTranslator.cpp.

int MueLu::ML2MueLuParameterTranslator::SetDefaultsDD_3Levels_LU ( Teuchos::ParameterList List,
Teuchos::RCP< std::vector< int > > &  options,
Teuchos::RCP< std::vector< double > > &  params,
bool  Overwrite = true 
)
static

Sets default parameters for aggregation-based 3-level domain decomposition preconditioners with LU.

Definition at line 804 of file MueLu_ML2MueLuParameterTranslator.cpp.

int MueLu::ML2MueLuParameterTranslator::SetDefaultsMaxwell ( Teuchos::ParameterList List,
Teuchos::RCP< std::vector< int > > &  options,
Teuchos::RCP< std::vector< double > > &  params,
bool  Overwrite = true 
)
static

Sets default parameters for the eddy current equations equations.

Definition at line 695 of file MueLu_ML2MueLuParameterTranslator.cpp.

int MueLu::ML2MueLuParameterTranslator::SetDefaultsSA ( Teuchos::ParameterList List,
Teuchos::RCP< std::vector< int > > &  options,
Teuchos::RCP< std::vector< double > > &  params,
bool  Overwrite = true 
)
static

Sets default parameters for classical smoothed aggregation.

Definition at line 585 of file MueLu_ML2MueLuParameterTranslator.cpp.

int MueLu::ML2MueLuParameterTranslator::SetDefaultsNSSA ( Teuchos::ParameterList List,
Teuchos::RCP< std::vector< int > > &  options,
Teuchos::RCP< std::vector< double > > &  params,
bool  Overwrite = true 
)
static

Sets defaults for energy minimization preconditioning for nonsymmetric problems.

Definition at line 734 of file MueLu_ML2MueLuParameterTranslator.cpp.

int MueLu::ML2MueLuParameterTranslator::SetDefaultsClassicalAMG ( Teuchos::ParameterList List,
Teuchos::RCP< std::vector< int > > &  options,
Teuchos::RCP< std::vector< double > > &  params,
bool  Overwrite = true 
)
static

Sets defaults for classical amg.

Definition at line 840 of file MueLu_ML2MueLuParameterTranslator.cpp.

int MueLu::ML2MueLuParameterTranslator::SetDefaultsRefMaxwell ( Teuchos::ParameterList inList,
bool  OverWrite = true 
)
static

Sets defaults for RefMaxwell / Maxwell2.

Definition at line 865 of file MueLu_ML2MueLuParameterTranslator.cpp.

std::string MueLu::ML2MueLuParameterTranslator::SetParameterList ( const Teuchos::ParameterList paramList_in,
const std::string &  defaultVals 
)
staticprivate

: Interpret parameter list

Parameters
[in]paramList_in,:ML parameter list
Returns
std::string with MueLu XML parameters

Definition at line 312 of file MueLu_ML2MueLuParameterTranslator.cpp.

std::string MueLu::ML2MueLuParameterTranslator::GetSmootherFactory ( const Teuchos::ParameterList paramList,
Teuchos::ParameterList adaptingParamList,
const std::string &  pname,
const std::string &  value 
)
staticprivate

: Helper function which translates ML smoother/solver paramters to MueLu XML string

Parameters
[in]paramList,:reference to Teuchos::ParameterList containing the ML smoother/solver parameters.
[in,out]adaptingParamList,:reference to Teuchos::ParameterList containing the ML smoother/solver parameters. Note that the processed parameters are removed from the ParameterList. It can be used to detect non-interpreted ML parameters.
[in]pname,:currently processed parameter TODO
[in]value,:currently processed value TODO

Definition at line 25 of file MueLu_ML2MueLuParameterTranslator.cpp.

static std::string& MueLu::ML2MueLuParameterTranslator::ltrim ( std::string &  s)
inlinestaticprivate

Definition at line 173 of file MueLu_ML2MueLuParameterTranslator.hpp.

static std::string& MueLu::ML2MueLuParameterTranslator::rtrim ( std::string &  s)
inlinestaticprivate

Definition at line 179 of file MueLu_ML2MueLuParameterTranslator.hpp.

static std::string& MueLu::ML2MueLuParameterTranslator::trim ( std::string &  s)
inlinestaticprivate

Definition at line 185 of file MueLu_ML2MueLuParameterTranslator.hpp.


The documentation for this class was generated from the following files: