A parsed Jacobi preconditioner which uses parameter files to choose between different options. More...
#include <jacobi.h>
Public Member Functions | |
JacobiPreconditioner (const std::string &name="", const double &omega=1, const double &min_diagonal=0, const unsigned int &n_sweeps=1) | |
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 | |
double | omega |
This specifies the relaxation parameter in the Jacobi preconditioner. More... | |
double | min_diagonal |
This specifies the minimum value the diagonal elements should have. More... | |
unsigned int | n_sweeps |
Sets how many times the given operation should be applied during the vmult() operation. 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 Jacobi preconditioner which uses parameter files to choose between different options.
This object is a TrilinosWrappers::PreconditionJacobi which can be called in place of the preconditioner.
ParsedLAC::JacobiPreconditioner::JacobiPreconditioner | ( | const std::string & | name = "" , |
const double & | omega = 1 , |
||
const double & | min_diagonal = 0 , |
||
const unsigned int & | n_sweeps = 1 |
||
) |
Constructor.
Build the preconditioner of a matrix using Jacobi.
Definition at line 24 of file jacobi.cc.
References add_parameters().
void ParsedLAC::JacobiPreconditioner::initialize_preconditioner | ( | const Matrix & | matrix | ) |
Initialize the preconditioner using matrix
.
Definition at line 61 of file jacobi.cc.
References ParameterAcceptor::initialize(), TrilinosWrappers::PreconditionJacobi::AdditionalData::min_diagonal, min_diagonal, TrilinosWrappers::PreconditionJacobi::AdditionalData::n_sweeps, n_sweeps, TrilinosWrappers::PreconditionJacobi::AdditionalData::omega, and omega.
|
private |
Declare preconditioner options.
Definition at line 38 of file jacobi.cc.
References ParameterAcceptor::add_parameter(), min_diagonal, n_sweeps, and omega.
Referenced by JacobiPreconditioner().
|
private |
This specifies the relaxation parameter in the Jacobi preconditioner.
Definition at line 69 of file jacobi.h.
Referenced by add_parameters(), and initialize_preconditioner().
|
private |
This specifies the minimum value the diagonal elements should have.
This might be necessary when the Jacobi preconditioner is used on matrices with zero diagonal elements. In that case, a straight- forward application would not be possible since we would divide by zero.
Definition at line 78 of file jacobi.h.
Referenced by add_parameters(), and initialize_preconditioner().
|
private |
Sets how many times the given operation should be applied during the vmult() operation.
Definition at line 84 of file jacobi.h.
Referenced by add_parameters(), and initialize_preconditioner().