A parsed ILU preconditioner which uses parameter files to choose between different options. More...
#include <ilu.h>
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... | |
![]() | |
ParameterAcceptor (const std::string §ion_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 ¶meter, 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 |
![]() | |
Subscriptor () | |
Subscriptor (const Subscriptor &) | |
Subscriptor (Subscriptor &&) noexcept | |
virtual | ~Subscriptor () |
Subscriptor & | operator= (const Subscriptor &) |
Subscriptor & | operator= (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 |
![]() | |
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_Operator & | trilinos_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_Operator & | trilinos_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 |
![]() | |
PreconditionBase () | |
void | clear () |
MPI_Comm | get_mpi_communicator () const |
void | transpose () |
void | serialize (Archive &ar, const unsigned int version) |
Epetra_Operator & | trilinos_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_Operator & | trilinos_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 | |
![]() | |
typedef ::types::global_dof_index | size_type |
![]() | |
typedef ::types::global_dof_index | size_type |
![]() | |
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 ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
![]() | |
static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
![]() | |
static ::ExceptionBase & | ExcNonMatchingMaps (std::string arg1) |
static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
![]() | |
static ::ExceptionBase & | ExcNonMatchingMaps (std::string arg1) |
static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
![]() | |
boost::signals2::signal< void()> | declare_parameters_call_back |
boost::signals2::signal< void()> | parse_parameters_call_back |
![]() | |
static ParameterHandler | prm |
![]() | |
const std::string | section_name |
std::vector< std::string > | subsections |
![]() | |
Teuchos::RCP< Epetra_Operator > | preconditioner |
Epetra_MpiComm | communicator |
![]() | |
Teuchos::RCP< Epetra_Operator > | preconditioner |
Epetra_MpiComm | communicator |
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.
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().
void ParsedLAC::ILUPreconditioner::initialize_preconditioner | ( | const Matrix & | matrix | ) |
Initialize the preconditioner using matrix
.
Definition at line 57 of file ilu.cc.
References TrilinosWrappers::PreconditionILU::AdditionalData::ilu_atol, ilu_atol, TrilinosWrappers::PreconditionILU::AdditionalData::ilu_fill, ilu_fill, TrilinosWrappers::PreconditionILU::AdditionalData::ilu_rtol, ilu_rtol, ParameterAcceptor::initialize(), TrilinosWrappers::PreconditionILU::AdditionalData::overlap, and overlap.
|
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().
|
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.
Definition at line 78 of file ilu.h.
Referenced by add_parameters(), and initialize_preconditioner().
|
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().
|
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().
|
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().