Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
oomph::TrilinosMLPreconditioner Class Reference

An interface to the Trilinos ML class - provides a function to construct a serial ML object, and functions to modify some of the ML paramaters. More...

#include <trilinos_preconditioners.h>

+ Inheritance diagram for oomph::TrilinosMLPreconditioner:

Public Member Functions

 TrilinosMLPreconditioner ()
 Constructor. Build with Smooth Aggretation (SA) default settings, but our own default number of V cycles (initialised to 1 to replicate TrilinosML's own behaviour). More...
 
virtual ~TrilinosMLPreconditioner ()
 Destructor empty – clean up is done in base class. More...
 
 TrilinosMLPreconditioner (const TrilinosMLPreconditioner &)
 Broken copy constructor. More...
 
void set_NSSA_default_values ()
 Broken assignment operator. More...
 
void set_DD_default_values ()
 Set control flags to values for classical smoothed aggregation- based 2-level domain decomposition. More...
 
void set_DDML_default_values ()
 Set control flags to values 3-level algebraic domain decomposition. More...
 
void set_SA_default_values ()
 Set control flags to values for classical smoothed aggregation preconditioning. More...
 
void set_max_levels (int max_levels)
 Function to set maximum number of levels. More...
 
void set_n_cycles (int n_cycles)
 Function to set the number of cycles used. More...
 
void set_smoother_damping (double smoother_damping)
 Function to set Smoother_damping. More...
 
void set_smoother_sweeps (int smoother_sweeps)
 Function to set Smoother_sweeps. More...
 
void set_smoother_jacobi ()
 Function to set smoother type to "Jacobi". More...
 
void set_smoother_gauss_seidel ()
 Function to set smoother type to "symmetric Gauss-Seidel". More...
 
void set_output (int output)
 Function to set output - controls level of information output by ML. More...
 
- Public Member Functions inherited from oomph::TrilinosPreconditionerBase
 TrilinosPreconditionerBase ()
 Constructor. More...
 
virtual ~TrilinosPreconditionerBase ()
 Destructor. More...
 
void clean_up_memory ()
 deletes the preconditioner, matrices and maps More...
 
 TrilinosPreconditionerBase (const TrilinosPreconditionerBase &)
 Broken copy constructor. More...
 
void setup ()
 Broken assignment operator. More...
 
void setup (Epetra_CrsMatrix *epetra_matrix_pt)
 Function to setup a preconditioner for the linear system defined by the oomph-lib oomph_matrix_pt and Epetra epetra_matrix_pt matrices. This method is called by Trilinos solvers. More...
 
void preconditioner_solve (const DoubleVector &r, DoubleVector &z)
 applies the preconditioner More...
 
Epetra_Operator *& epetra_operator_pt ()
 
Epetra_Operator * epetra_operator_pt () const
 
- Public Member Functions inherited from oomph::Preconditioner
 Preconditioner ()
 Constructor. More...
 
 Preconditioner (const Preconditioner &)
 Broken copy constructor. More...
 
void operator= (const Preconditioner &)
 Broken assignment operator. More...
 
virtual ~Preconditioner ()
 Destructor (empty) More...
 
void setup (DoubleMatrixBase *matrix_pt)
 Setup the preconditioner: store the matrix pointer and the communicator pointer then call preconditioner specific setup() function. More...
 
void setup (const Problem *problem_pt, DoubleMatrixBase *matrix_pt)
 Compatability layer for old preconditioners where problem pointers were needed. The problem pointer is only used to get a communicator pointer. More...
 
virtual DoubleMatrixBasematrix_pt () const
 Get function for matrix pointer. More...
 
virtual void set_matrix_pt (DoubleMatrixBase *matrix_pt)
 Set the matrix pointer. More...
 
virtual const OomphCommunicatorcomm_pt () const
 Get function for comm pointer. More...
 
virtual void set_comm_pt (const OomphCommunicator *const comm_pt)
 Set the communicator pointer. More...
 
double setup_time () const
 Returns the time to setup the preconditioner. More...
 
virtual void turn_into_subsidiary_block_preconditioner (BlockPreconditioner< CRDoubleMatrix > *master_block_prec_pt, const Vector< unsigned > &doftype_in_master_preconditioner_coarse)
 
virtual void turn_into_subsidiary_block_preconditioner (BlockPreconditioner< CRDoubleMatrix > *master_block_prec_pt, const Vector< unsigned > &doftype_in_master_preconditioner_coarse, const Vector< Vector< unsigned > > &doftype_coarsen_map_coarse)
 
- Public Member Functions inherited from oomph::DistributableLinearAlgebraObject
 DistributableLinearAlgebraObject ()
 Default constructor - create a distribution. More...
 
 DistributableLinearAlgebraObject (const DistributableLinearAlgebraObject &matrix)
 Broken copy constructor. More...
 
void operator= (const DistributableLinearAlgebraObject &)
 Broken assignment operator. More...
 
virtual ~DistributableLinearAlgebraObject ()
 Destructor. More...
 
LinearAlgebraDistributiondistribution_pt () const
 access to the LinearAlgebraDistribution More...
 
unsigned nrow () const
 access function to the number of global rows. More...
 
unsigned nrow_local () const
 access function for the num of local rows on this processor. More...
 
unsigned nrow_local (const unsigned &p) const
 access function for the num of local rows on this processor. More...
 
unsigned first_row () const
 access function for the first row on this processor More...
 
unsigned first_row (const unsigned &p) const
 access function for the first row on this processor More...
 
bool distributed () const
 distribution is serial or distributed More...
 
bool distribution_built () const
 
void build_distribution (const LinearAlgebraDistribution *const dist_pt)
 setup the distribution of this distributable linear algebra object More...
 
void build_distribution (const LinearAlgebraDistribution &dist)
 setup the distribution of this distributable linear algebra object More...
 

Static Public Attributes

static int Default_n_cycles =1
 Default number of V cycles (one to be consistent with previous default) (It's an int because Trilinos wants it to be!) More...
 
- Static Public Attributes inherited from oomph::TrilinosPreconditionerBase
static double Cumulative_preconditioner_solve_time =0.0
 Static double that accumulates the preconditioner solve time of all instantiations of this class. Reset it manually, e.g. after every Newton solve. More...
 

Protected Member Functions

void setup_trilinos_preconditioner (Epetra_CrsMatrix *epetra_matrix_pt)
 Function to set up the ML preconditioner. It is assumed Trilinos_matrix_pt points to a suitable matrix. More...
 
- Protected Member Functions inherited from oomph::DistributableLinearAlgebraObject
void clear_distribution ()
 clear the distribution of this distributable linear algebra object More...
 

Protected Attributes

Teuchos::ParameterList ML_parameters
 
- Protected Attributes inherited from oomph::TrilinosPreconditionerBase
Epetra_Operator * Epetra_preconditioner_pt
 The preconditioner which will be set up using function setup_trilinos_preconditioner(...) More...
 
Epetra_CrsMatrix * Epetra_matrix_pt
 Pointer used to store the epetra matrix - only used when this preconditioner is setup using the oomph-lib interface. More...
 

Detailed Description

An interface to the Trilinos ML class - provides a function to construct a serial ML object, and functions to modify some of the ML paramaters.

Definition at line 165 of file trilinos_preconditioners.h.

Constructor & Destructor Documentation

◆ TrilinosMLPreconditioner() [1/2]

oomph::TrilinosMLPreconditioner::TrilinosMLPreconditioner ( )
inline

Constructor. Build with Smooth Aggretation (SA) default settings, but our own default number of V cycles (initialised to 1 to replicate TrilinosML's own behaviour).

Definition at line 172 of file trilinos_preconditioners.h.

◆ ~TrilinosMLPreconditioner()

virtual oomph::TrilinosMLPreconditioner::~TrilinosMLPreconditioner ( )
inlinevirtual

Destructor empty – clean up is done in base class.

Definition at line 182 of file trilinos_preconditioners.h.

◆ TrilinosMLPreconditioner() [2/2]

oomph::TrilinosMLPreconditioner::TrilinosMLPreconditioner ( const TrilinosMLPreconditioner )
inline

Broken copy constructor.

Definition at line 185 of file trilinos_preconditioners.h.

References oomph::BrokenCopy::broken_copy().

Member Function Documentation

◆ set_DD_default_values()

void oomph::TrilinosMLPreconditioner::set_DD_default_values ( )
inline

Set control flags to values for classical smoothed aggregation- based 2-level domain decomposition.

Definition at line 206 of file trilinos_preconditioners.h.

◆ set_DDML_default_values()

void oomph::TrilinosMLPreconditioner::set_DDML_default_values ( )
inline

Set control flags to values 3-level algebraic domain decomposition.

Definition at line 213 of file trilinos_preconditioners.h.

◆ set_max_levels()

void oomph::TrilinosMLPreconditioner::set_max_levels ( int  max_levels)
inline

Function to set maximum number of levels.

Definition at line 226 of file trilinos_preconditioners.h.

◆ set_n_cycles()

void oomph::TrilinosMLPreconditioner::set_n_cycles ( int  n_cycles)
inline

Function to set the number of cycles used.

Definition at line 232 of file trilinos_preconditioners.h.

◆ set_NSSA_default_values()

void oomph::TrilinosMLPreconditioner::set_NSSA_default_values ( )
inline

Broken assignment operator.

Set control flags to values for Petrov-Galerkin preconditioning - for non symmetric systems

Definition at line 198 of file trilinos_preconditioners.h.

◆ set_output()

void oomph::TrilinosMLPreconditioner::set_output ( int  output)
inline

Function to set output - controls level of information output by ML.

Definition at line 262 of file trilinos_preconditioners.h.

◆ set_SA_default_values()

void oomph::TrilinosMLPreconditioner::set_SA_default_values ( )
inline

Set control flags to values for classical smoothed aggregation preconditioning.

Definition at line 220 of file trilinos_preconditioners.h.

◆ set_smoother_damping()

void oomph::TrilinosMLPreconditioner::set_smoother_damping ( double  smoother_damping)
inline

Function to set Smoother_damping.

Definition at line 238 of file trilinos_preconditioners.h.

◆ set_smoother_gauss_seidel()

void oomph::TrilinosMLPreconditioner::set_smoother_gauss_seidel ( )
inline

Function to set smoother type to "symmetric Gauss-Seidel".

Definition at line 256 of file trilinos_preconditioners.h.

◆ set_smoother_jacobi()

void oomph::TrilinosMLPreconditioner::set_smoother_jacobi ( )
inline

Function to set smoother type to "Jacobi".

Definition at line 250 of file trilinos_preconditioners.h.

◆ set_smoother_sweeps()

void oomph::TrilinosMLPreconditioner::set_smoother_sweeps ( int  smoother_sweeps)
inline

Function to set Smoother_sweeps.

Definition at line 244 of file trilinos_preconditioners.h.

◆ setup_trilinos_preconditioner()

void oomph::TrilinosMLPreconditioner::setup_trilinos_preconditioner ( Epetra_CrsMatrix *  epetra_matrix_pt)
protectedvirtual

Member Data Documentation

◆ Default_n_cycles

int oomph::TrilinosMLPreconditioner::Default_n_cycles =1
static

Default number of V cycles (one to be consistent with previous default) (It's an int because Trilinos wants it to be!)

(Static) default number of V cycles (one to be consistent with previous default). (It's an int because Trilinos wants it to be!)

Definition at line 270 of file trilinos_preconditioners.h.

Referenced by oomph::TrilinosPreconditionerBase::preconditioner_solve().

◆ ML_parameters

Teuchos::ParameterList oomph::TrilinosMLPreconditioner::ML_parameters
protected

Definition at line 279 of file trilinos_preconditioners.h.


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