Public Member Functions | Private Attributes | List of all members
oomph::OomphLibPreconditionerEpetraOperator Class Reference

An Epetra_Operator class for oomph-lib preconditioners. A helper class for TrilinosOomphLibPreconditioner to allow an oomph-lib preconditioner (i.e. one derived from Preconditioner) to be used with a trilinos solver (TrilinosAztecOOSolver) More...

#include <trilinos_solver.h>

+ Inheritance diagram for oomph::OomphLibPreconditionerEpetraOperator:

Public Member Functions

 OomphLibPreconditionerEpetraOperator (Preconditioner *preconditioner_pt, bool use_epetra_values=false)
 Constructor - takes the pointer to the oomph-lib preconditioner and the distribution of the preconditioner Note: the oomph-lib preconditioner must be setup. If use_eptra_values is true then the epetra vector values is used within the vectors passed to the oomph-lib preconditioner. If this is true none of the vector rebuild methods can be called. More...
 
 OomphLibPreconditionerEpetraOperator (const OomphLibPreconditionerEpetraOperator &)=delete
 Broken copy constructor. More...
 
void operator= (const OomphLibPreconditionerEpetraOperator &)=delete
 Broken assignment operator. More...
 
int SetUseTranspose (bool UseTranspose)
 Broken Epetra_Operator member - SetUseTranspose. More...
 
int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Broken Epetra_Operator member - Apply. More...
 
int ApplyInverse (const Epetra_MultiVector &epetra_r, Epetra_MultiVector &epetra_z) const
 applies the oomph-lib preconditioner. Converts the Epetra vector applys the preconditioner by calling the oomph-lib preconditioner's preconditioner_solve functionality. NOTE : the oomph-lib preconditioner is setup prior to being passed to this class More...
 
double NormInf () const
 Broken Epetra_Operator member - NormInf. More...
 
const char * Label () const
 Epetra_Operator::Label - returns a string describing the operator. More...
 
bool UseTranspose () const
 Broken Epetra_Operator member - UseTranspose. More...
 
bool HasNormInf () const
 Broken Epetra_Operator member - HasNormInf. More...
 
const Epetra_Comm & Comm () const
 Returns the Epetra MPI_Comm object. More...
 
const Epetra_Map & OperatorDomainMap () const
 Epetra_Operator member - OperatorDomainMap. More...
 
const Epetra_Map & OperatorRangeMap () const
 Epetra_Operator member - OperatorRangeMap. More...
 

Private Attributes

PreconditionerOomph_lib_preconditioner_pt
 A pointer to the oomph-lib preconditioner. More...
 
Epetra_MpiComm Operator_comm
 An Epetra MPI Comm object. More...
 
Epetra_SerialComm Operator_comm
 An Epetra Serial Comm object. More...
 
bool Use_epetra_values
 Use the epetra data within the vectors passed to the oomph-lib preconditioner. If this is true none of the vector rebuild methods can be called. More...
 
Epetra_Map * Operator_map_pt
 A pointer to an Epetra_Map object - describes distribution of the preconditioner, in this instance it is primarily used to prescribe the distribution of the residual and solution vector. More...
 
std::string Preconditioner_label
 a label for the preconditioner ( for Epetra_Operator::Label() ) More...
 

Detailed Description

An Epetra_Operator class for oomph-lib preconditioners. A helper class for TrilinosOomphLibPreconditioner to allow an oomph-lib preconditioner (i.e. one derived from Preconditioner) to be used with a trilinos solver (TrilinosAztecOOSolver)

Definition at line 42 of file trilinos_solver.h.

Constructor & Destructor Documentation

◆ OomphLibPreconditionerEpetraOperator() [1/2]

oomph::OomphLibPreconditionerEpetraOperator::OomphLibPreconditionerEpetraOperator ( Preconditioner preconditioner_pt,
bool  use_epetra_values = false 
)
inline

Constructor - takes the pointer to the oomph-lib preconditioner and the distribution of the preconditioner Note: the oomph-lib preconditioner must be setup. If use_eptra_values is true then the epetra vector values is used within the vectors passed to the oomph-lib preconditioner. If this is true none of the vector rebuild methods can be called.

Definition at line 52 of file trilinos_solver.h.

References oomph::TrilinosEpetraHelpers::create_epetra_map(), oomph::DistributableLinearAlgebraObject::distribution_pt(), Oomph_lib_preconditioner_pt, Operator_map_pt, and Preconditioner_label.

◆ OomphLibPreconditionerEpetraOperator() [2/2]

oomph::OomphLibPreconditionerEpetraOperator::OomphLibPreconditionerEpetraOperator ( const OomphLibPreconditionerEpetraOperator )
delete

Broken copy constructor.

Member Function Documentation

◆ Apply()

int oomph::OomphLibPreconditionerEpetraOperator::Apply ( const Epetra_MultiVector &  X,
Epetra_MultiVector &  Y 
) const
inline

Broken Epetra_Operator member - Apply.

Definition at line 100 of file trilinos_solver.h.

◆ ApplyInverse()

int oomph::OomphLibPreconditionerEpetraOperator::ApplyInverse ( const Epetra_MultiVector &  epetra_r,
Epetra_MultiVector &  epetra_z 
) const
inline

applies the oomph-lib preconditioner. Converts the Epetra vector applys the preconditioner by calling the oomph-lib preconditioner's preconditioner_solve functionality. NOTE : the oomph-lib preconditioner is setup prior to being passed to this class

Definition at line 115 of file trilinos_solver.h.

References oomph::DoubleVector::build(), oomph::DistributableLinearAlgebraObject::distribution_pt(), i, oomph::LinearAlgebraDistribution::nrow_local(), Oomph_lib_preconditioner_pt, oomph::Preconditioner::preconditioner_solve(), oomph::DoubleVector::set_external_values(), and Use_epetra_values.

◆ Comm()

const Epetra_Comm& oomph::OomphLibPreconditionerEpetraOperator::Comm ( ) const
inline

Returns the Epetra MPI_Comm object.

Definition at line 211 of file trilinos_solver.h.

References Operator_comm.

◆ HasNormInf()

bool oomph::OomphLibPreconditionerEpetraOperator::HasNormInf ( ) const
inline

Broken Epetra_Operator member - HasNormInf.

Definition at line 201 of file trilinos_solver.h.

◆ Label()

const char* oomph::OomphLibPreconditionerEpetraOperator::Label ( ) const
inline

Epetra_Operator::Label - returns a string describing the operator.

Definition at line 184 of file trilinos_solver.h.

References Preconditioner_label.

◆ NormInf()

double oomph::OomphLibPreconditionerEpetraOperator::NormInf ( ) const
inline

Broken Epetra_Operator member - NormInf.

Definition at line 174 of file trilinos_solver.h.

◆ operator=()

void oomph::OomphLibPreconditionerEpetraOperator::operator= ( const OomphLibPreconditionerEpetraOperator )
delete

Broken assignment operator.

◆ OperatorDomainMap()

const Epetra_Map& oomph::OomphLibPreconditionerEpetraOperator::OperatorDomainMap ( ) const
inline

Epetra_Operator member - OperatorDomainMap.

Definition at line 217 of file trilinos_solver.h.

References Operator_map_pt.

◆ OperatorRangeMap()

const Epetra_Map& oomph::OomphLibPreconditionerEpetraOperator::OperatorRangeMap ( ) const
inline

Epetra_Operator member - OperatorRangeMap.

Definition at line 223 of file trilinos_solver.h.

References Operator_map_pt.

◆ SetUseTranspose()

int oomph::OomphLibPreconditionerEpetraOperator::SetUseTranspose ( bool  UseTranspose)
inline

Broken Epetra_Operator member - SetUseTranspose.

Definition at line 89 of file trilinos_solver.h.

◆ UseTranspose()

bool oomph::OomphLibPreconditionerEpetraOperator::UseTranspose ( ) const
inline

Broken Epetra_Operator member - UseTranspose.

Definition at line 190 of file trilinos_solver.h.

Member Data Documentation

◆ Oomph_lib_preconditioner_pt

Preconditioner* oomph::OomphLibPreconditionerEpetraOperator::Oomph_lib_preconditioner_pt
private

A pointer to the oomph-lib preconditioner.

Definition at line 231 of file trilinos_solver.h.

Referenced by ApplyInverse(), and OomphLibPreconditionerEpetraOperator().

◆ Operator_comm [1/2]

Epetra_MpiComm oomph::OomphLibPreconditionerEpetraOperator::Operator_comm
private

An Epetra MPI Comm object.

Definition at line 235 of file trilinos_solver.h.

Referenced by Comm().

◆ Operator_comm [2/2]

Epetra_SerialComm oomph::OomphLibPreconditionerEpetraOperator::Operator_comm
private

An Epetra Serial Comm object.

Definition at line 238 of file trilinos_solver.h.

◆ Operator_map_pt

Epetra_Map* oomph::OomphLibPreconditionerEpetraOperator::Operator_map_pt
private

A pointer to an Epetra_Map object - describes distribution of the preconditioner, in this instance it is primarily used to prescribe the distribution of the residual and solution vector.

Definition at line 250 of file trilinos_solver.h.

Referenced by OomphLibPreconditionerEpetraOperator(), OperatorDomainMap(), and OperatorRangeMap().

◆ Preconditioner_label

std::string oomph::OomphLibPreconditionerEpetraOperator::Preconditioner_label
private

a label for the preconditioner ( for Epetra_Operator::Label() )

Definition at line 253 of file trilinos_solver.h.

Referenced by Label(), and OomphLibPreconditionerEpetraOperator().

◆ Use_epetra_values

bool oomph::OomphLibPreconditionerEpetraOperator::Use_epetra_values
private

Use the epetra data within the vectors passed to the oomph-lib preconditioner. If this is true none of the vector rebuild methods can be called.

Definition at line 244 of file trilinos_solver.h.

Referenced by ApplyInverse().


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