Fluid structure interaction suite
ParsedLAC::ILUPreconditioner Class Reference

A parsed ILU preconditioner which uses parameter files to choose between different options. More...

#include <ilu.h>

Inheritance diagram for ParsedLAC::ILUPreconditioner:
[legend]

Public Member Functions

 ILUPreconditioner (const std::string &name="", const unsigned int &ilu_fill=0, const double &ilu_atol=0.0, const double &ilu_rtol=1.0, const unsigned int &overlap=0)
 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::PreconditionILU
void initialize (const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
 
void clear ()
 
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 ()
 Declare preconditioner options. More...
 

Private Attributes

unsigned int ilu_fill
 This specifies the amount of additional fill-in elements besides the original sparse matrix structure. More...
 
double ilu_atol
 The amount of perturbation to add to diagonal entries. More...
 
double ilu_rtol
 Scaling factor for diagonal entries. More...
 
unsigned int overlap
 Overlap between processors. More...
 

Additional Inherited Members

- Public Types inherited from TrilinosWrappers::PreconditionILU
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::PreconditionILU
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::PreconditionILU
Teuchos::RCP< Epetra_Operatorpreconditioner
 
Epetra_MpiComm communicator
 
- Protected Attributes inherited from TrilinosWrappers::PreconditionBase
Teuchos::RCP< Epetra_Operatorpreconditioner
 
Epetra_MpiComm communicator
 

Detailed Description

A parsed ILU preconditioner which uses parameter files to choose between different options.

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

Definition at line 39 of file ilu.h.

Constructor & Destructor Documentation

◆ ILUPreconditioner()

ParsedLAC::ILUPreconditioner::ILUPreconditioner ( const std::string &  name = "",
const unsigned int &  ilu_fill = 0,
const double &  ilu_atol = 0.0,
const double &  ilu_rtol = 1.0,
const unsigned int &  overlap = 0 
)

Constructor.

Build the preconditioner of a matrix using ILU.

Definition at line 26 of file ilu.cc.

References add_parameters().

Member Function Documentation

◆ initialize_preconditioner()

template<typename Matrix >
void ParsedLAC::ILUPreconditioner::initialize_preconditioner ( const Matrix &  matrix)

◆ add_parameters()

void ParsedLAC::ILUPreconditioner::add_parameters ( )
private

Declare preconditioner options.

Definition at line 42 of file ilu.cc.

References ParameterAcceptor::add_parameter(), ilu_atol, ilu_fill, ilu_rtol, and overlap.

Referenced by ILUPreconditioner().

Member Data Documentation

◆ ilu_fill

unsigned int ParsedLAC::ILUPreconditioner::ilu_fill
private

This specifies the amount of additional fill-in elements besides the original sparse matrix structure.

If \f \(k\f\) is fill, the sparsity pattern of \f \(Ak+1\f\) is used for the storage of the result of the Gaussian elimination. This is known as \f \(ILU( k)\f\) in the literature. When ilu_fill is large, the preconditioner comes closer to a (direct) sparse LU decomposition.

Note
however, that this will drastically increase the memory requirement, especially when the preconditioner is used in 3D.

Definition at line 78 of file ilu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ ilu_atol

double ParsedLAC::ILUPreconditioner::ilu_atol
private

The amount of perturbation to add to diagonal entries.

This parameter allows perturbation of the diagonal of the matrix, which sometimes can help to get better preconditioners especially in the case of bad conditioning. Before factorization, the diagonal entry \f \(a_{ii}\f\) is replaced by \f \(\alpha sign(a_{ii})+\beta a_{ii}\f\), where \f \(\alpha \geq 0\f\) is the absolute threshold ilu_atol and \f \(\beta \geq 1\f\) is the relative threshold ilu_rtol. The default values \f \((\alpha=1, \beta=1)\f\) therefore use the original, unmodified diagonal entry. Suggested values are in the order of \f \(10^{−5}\f\) to \f \(10^{−2}\f\) for ilu_atol and \f \(1.01\f\) for ilu_rtol.

Definition at line 94 of file ilu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ ilu_rtol

double ParsedLAC::ILUPreconditioner::ilu_rtol
private

Scaling factor for diagonal entries.

This parameter allows perturbation of the diagonal of the matrix, which sometimes can help to get better preconditioners especially in the case of bad conditioning. Before factorization, the diagonal entry \f \(a_{ii}\f\) is replaced by \f \(\alpha sign(a_{ii})+\beta a_{ii}\f\), where \f \(\alpha \geq 0\f\) is the absolute threshold ilu_atol and \f \(\beta \geq 1\f\) is the relative threshold ilu_rtol. The default values \f \((\alpha=1, \beta=1)\f\) therefore use the original, unmodified diagonal entry. Suggested values are in the order of \f \(10^{−5}\f\) to \f \(10^{−2}\f\) for ilu_atol and \f \(1.01\f\) for ilu_rtol.

Definition at line 110 of file ilu.h.

Referenced by add_parameters(), and initialize_preconditioner().

◆ overlap

unsigned int ParsedLAC::ILUPreconditioner::overlap
private

Overlap between processors.

This determines how large the overlap of the local matrix portions on each processor in a parallel application should be. An overlap of 0 corresponds to a block diagonal decomposition on each processor, an overlap of 1 will additionally include a row \f \(j\f\) if there is a nonzero entry in column \f \(j\f\) in one of the own rows. Higher overlap numbers work accordingly in a recursive fashion. Increasing overlap will increase communication and storage cost. According to the IFPACK documentation, an overlap of 1 is often effective and values of more than 3 are rarely needed.

Definition at line 125 of file ilu.h.

Referenced by add_parameters(), and initialize_preconditioner().


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