Fluid structure interaction suite
ParsedLAC::AMGMueLuPreconditioner Class Reference

A parsed AMG preconditioner based on MueLu which uses parameter files to choose between different options. More...

#include <amg_muelu.h>

Inheritance diagram for ParsedLAC::AMGMueLuPreconditioner:
[legend]

Public Member Functions

 AMGMueLuPreconditioner (const std::string &name="", const bool &elliptic=true, const unsigned int &n_cycles=1, const bool &w_cycle=false, const double &aggregation_threshold=1e-4, const unsigned int &smoother_sweeps=2, const unsigned int &smoother_overlap=0, const bool &output_details=false, const std::string &smoother_type="Chebyshev", const std::string &coarse_type="Amesos-KLU")
 Constructor. More...
 
template<typename Matrix >
void initialize_preconditioner (const Matrix &matrix)
 Initialize the preconditioner using matrix. More...
 
- Public Member Functions inherited from ParameterAcceptor
 ParameterAcceptor (const std::string &section_name="")
 
unsigned int get_acceptor_id () const
 
virtual ~ParameterAcceptor () override
 
virtual void declare_parameters (ParameterHandler &prm)
 
virtual void parse_parameters (ParameterHandler &prm)
 
std::string get_section_name () const
 
std::vector< std::string > get_section_path () const
 
void add_parameter (const std::string &entry, ParameterType &parameter, const std::string &documentation="", ParameterHandler &prm_=prm, const Patterns::PatternBase &pattern=*Patterns::Tools::Convert< ParameterType >::to_pattern())
 
void enter_subsection (const std::string &subsection)
 
void leave_subsection ()
 
void enter_my_subsection (ParameterHandler &prm)
 
void leave_my_subsection (ParameterHandler &prm)
 
void serialize (Archive &ar, const unsigned int version)
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void serialize (Archive &ar, const unsigned int version)
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
- Public Member Functions inherited from TrilinosWrappers::PreconditionAMGMueLu
 PreconditionAMGMueLu ()
 
virtual ~PreconditionAMGMueLu () override=default
 
void initialize (const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
 
void initialize (const Epetra_CrsMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
 
void initialize (const SparseMatrix &matrix, Teuchos::ParameterList &muelu_parameters)
 
void initialize (const Epetra_CrsMatrix &matrix, Teuchos::ParameterList &muelu_parameters)
 
void initialize (const ::SparseMatrix< number > &deal_ii_sparse_matrix, const AdditionalData &additional_data=AdditionalData(), const double drop_tolerance=1e-13, const ::SparsityPattern *use_this_sparsity=nullptr)
 
void clear ()
 
size_type memory_consumption () const
 
MPI_Comm get_mpi_communicator () const
 
void transpose ()
 
virtual void vmult (MPI::Vector &dst, const MPI::Vector &src) const
 
virtual void vmult (::Vector< double > &dst, const ::Vector< double > &src) const
 
virtual void vmult (::LinearAlgebra::distributed::Vector< double > &dst, const ::LinearAlgebra::distributed::Vector< double > &src) const
 
virtual void Tvmult (MPI::Vector &dst, const MPI::Vector &src) const
 
virtual void Tvmult (::Vector< double > &dst, const ::Vector< double > &src) const
 
virtual void Tvmult (::LinearAlgebra::distributed::Vector< double > &dst, const ::LinearAlgebra::distributed::Vector< double > &src) const
 
void serialize (Archive &ar, const unsigned int version)
 
Epetra_Operatortrilinos_operator () const
 
IndexSet locally_owned_domain_indices () const
 
IndexSet locally_owned_range_indices () const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
Epetra_Operatortrilinos_operator () const
 
IndexSet locally_owned_domain_indices () const
 
IndexSet locally_owned_range_indices () const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
- Public Member Functions inherited from TrilinosWrappers::PreconditionBase
 PreconditionBase ()
 
void clear ()
 
MPI_Comm get_mpi_communicator () const
 
void transpose ()
 
void serialize (Archive &ar, const unsigned int version)
 
Epetra_Operatortrilinos_operator () const
 
IndexSet locally_owned_domain_indices () const
 
IndexSet locally_owned_range_indices () const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
Epetra_Operatortrilinos_operator () const
 
IndexSet locally_owned_domain_indices () const
 
IndexSet locally_owned_range_indices () const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 

Private Member Functions

void add_parameters ()
 Add all parameter options. More...
 

Private Attributes

bool elliptic
 Determines whether the AMG preconditioner should be optimized for elliptic problems (ML option smoothed aggregation SA, using a Chebyshev smoother) or for non-elliptic problems (ML option non- symmetric smoothed aggregation NSSA, smoother is SSOR with underrelaxation). More...
 
unsigned int n_cycles
 Defines how many multigrid cycles should be performed by the preconditioner. More...
 
bool w_cycle
 Defines whether a w-cycle should be used instead of the standard setting of a v-cycle. More...
 
double aggregation_threshold
 This threshold tells the AMG setup how the coarsening should be performed. More...
 
unsigned int smoother_sweeps
 Determines how many sweeps of the smoother should be performed. More...
 
unsigned int smoother_overlap
 Determines the overlap in the SSOR/Chebyshev error smoother when run in parallel. More...
 
bool output_details
 If this flag is set to true, then internal information from the ML preconditioner is printed to screen. More...
 
std::string smoother_type
 Determines which smoother to use for the AMG cycle. More...
 
std::string coarse_type
 Determines which solver to use on the coarsest level. More...
 

Additional Inherited Members

- Public Types inherited from TrilinosWrappers::PreconditionAMGMueLu
typedef ::types::global_dof_index size_type
 
- Public Types inherited from TrilinosWrappers::PreconditionBase
typedef ::types::global_dof_index size_type
 
- Static Public Member Functions inherited from ParameterAcceptor
static void initialize (const std::string &filename="", const std::string &output_filename="", const ParameterHandler::OutputStyle output_style_for_output_filename=ParameterHandler::Short, ParameterHandler &prm=ParameterAcceptor::prm, const ParameterHandler::OutputStyle output_style_for_filename=ParameterHandler::DefaultStyle)
 
static void initialize (std::istream &input_stream, ParameterHandler &prm=ParameterAcceptor::prm)
 
static void clear ()
 
static void parse_all_parameters (ParameterHandler &prm=ParameterAcceptor::prm)
 
static void declare_all_parameters (ParameterHandler &prm=ParameterAcceptor::prm)
 
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Static Public Member Functions inherited from TrilinosWrappers::PreconditionAMGMueLu
static ::ExceptionBaseExcNonMatchingMaps (std::string arg1)
 
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Static Public Member Functions inherited from TrilinosWrappers::PreconditionBase
static ::ExceptionBaseExcNonMatchingMaps (std::string arg1)
 
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Public Attributes inherited from ParameterAcceptor
boost::signals2::signal< void()> declare_parameters_call_back
 
boost::signals2::signal< void()> parse_parameters_call_back
 
- Static Public Attributes inherited from ParameterAcceptor
static ParameterHandler prm
 
- Protected Attributes inherited from ParameterAcceptor
const std::string section_name
 
std::vector< std::string > subsections
 
- Protected Attributes inherited from TrilinosWrappers::PreconditionAMGMueLu
Teuchos::RCP< Epetra_Operatorpreconditioner
 
Epetra_MpiComm communicator
 
- Protected Attributes inherited from TrilinosWrappers::PreconditionBase
Teuchos::RCP< Epetra_Operatorpreconditioner
 
Epetra_MpiComm communicator
 

Detailed Description

A parsed AMG preconditioner based on MueLu which uses parameter files to choose between different options.

This object is a TrilinosWrappers::PreconditionAMGMueLu which can be called in place of the preconditioner.

Definition at line 35 of file amg_muelu.h.

Constructor & Destructor Documentation

◆ AMGMueLuPreconditioner()

ParsedLAC::AMGMueLuPreconditioner::AMGMueLuPreconditioner ( const std::string &  name = "",
const bool &  elliptic = true,
const unsigned int &  n_cycles = 1,
const bool &  w_cycle = false,
const double &  aggregation_threshold = 1e-4,
const unsigned int &  smoother_sweeps = 2,
const unsigned int &  smoother_overlap = 0,
const bool &  output_details = false,
const std::string &  smoother_type = "Chebyshev",
const std::string &  coarse_type = "Amesos-KLU" 
)

Constructor.

Build the preconditioner of a matrix using AMG.

Definition at line 28 of file amg_muelu.cc.

References add_parameters().

Member Function Documentation

◆ initialize_preconditioner()

◆ add_parameters()

void ParsedLAC::AMGMueLuPreconditioner::add_parameters ( )
private

Member Data Documentation

◆ elliptic

bool ParsedLAC::AMGMueLuPreconditioner::elliptic
private

Determines whether the AMG preconditioner should be optimized for elliptic problems (ML option smoothed aggregation SA, using a Chebyshev smoother) or for non-elliptic problems (ML option non- symmetric smoothed aggregation NSSA, smoother is SSOR with underrelaxation).

Definition at line 77 of file amg_muelu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ n_cycles

unsigned int ParsedLAC::AMGMueLuPreconditioner::n_cycles
private

Defines how many multigrid cycles should be performed by the preconditioner.

Definition at line 83 of file amg_muelu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ w_cycle

bool ParsedLAC::AMGMueLuPreconditioner::w_cycle
private

Defines whether a w-cycle should be used instead of the standard setting of a v-cycle.

Definition at line 89 of file amg_muelu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ aggregation_threshold

double ParsedLAC::AMGMueLuPreconditioner::aggregation_threshold
private

This threshold tells the AMG setup how the coarsening should be performed.

In the AMG used by ML, all points that strongly couple with the tentative coarse-level point form one aggregate. The term strong coupling is controlled by the variable aggregation_threshold, meaning that all elements that are not smaller than aggregation_threshold times the diagonal element do couple strongly.

Definition at line 100 of file amg_muelu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ smoother_sweeps

unsigned int ParsedLAC::AMGMueLuPreconditioner::smoother_sweeps
private

Determines how many sweeps of the smoother should be performed.

When the flag elliptic is set to true, i.e., for elliptic or almost elliptic problems, the polynomial degree of the Chebyshev smoother is set to smoother_sweeps. The term sweeps refers to the number of matrix-vector products performed in the Chebyshev case. In the non-elliptic case, smoother_sweeps sets the number of SSOR relaxation sweeps for post-smoothing to be performed.

Definition at line 112 of file amg_muelu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ smoother_overlap

unsigned int ParsedLAC::AMGMueLuPreconditioner::smoother_overlap
private

Determines the overlap in the SSOR/Chebyshev error smoother when run in parallel.

Definition at line 118 of file amg_muelu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ output_details

bool ParsedLAC::AMGMueLuPreconditioner::output_details
private

If this flag is set to true, then internal information from the ML preconditioner is printed to screen.

This can be useful when debugging the preconditioner.

Definition at line 125 of file amg_muelu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ smoother_type

std::string ParsedLAC::AMGMueLuPreconditioner::smoother_type
private

Determines which smoother to use for the AMG cycle.

Possibilities for smoother_type are the following: "Aztec", "IFPACK", "Jacobi", "ML symmetric Gauss-Seidel", "symmetric Gauss-Seidel", "ML Gauss-Seidel", "Gauss-Seidel", "block Gauss-Seidel", "symmetric block Gauss-Seidel", "Chebyshev", "MLS", "Hiptmair", "Amesos-KLU", "Amesos-Superlu", "Amesos-UMFPACK", "Amesos-Superludist", "Amesos-MUMPS", "user-defined", "SuperLU", "IFPACK-Chebyshev", "self", "do-nothing", "IC", "ICT", "ILU", "ILUT", "Block Chebyshev", "IFPACK-Block Chebyshev"

Definition at line 138 of file amg_muelu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ coarse_type

std::string ParsedLAC::AMGMueLuPreconditioner::coarse_type
private

Determines which solver to use on the coarsest level.

The same settings as for the smoother type are possible.

Definition at line 144 of file amg_muelu.h.

Referenced by add_parameters(), and initialize_preconditioner().


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