LifeV
|
PreconditionerLinearSolver - Class to wrap linear solver. More...
#include <PreconditionerLinearSolver.hpp>
Private Attributes | |
solverPtr_Type | M_solver |
preconditionerPtr_Type | M_preconditioner |
GetPot | M_dataFile |
bool | M_printSubiterationCount |
std::string | M_precName |
std::string | M_precDataSection |
Public Types | |
typedef Epetra_Operator | prec_raw_type |
typedef std::shared_ptr< prec_raw_type > | prec_type |
typedef LinearSolver | solver_Type |
typedef std::shared_ptr< solver_Type > | solverPtr_Type |
typedef MatrixEpetra< Real > | operator_raw_type |
typedef std::shared_ptr< operator_raw_type > | operator_type |
typedef Preconditioner | preconditioner_Type |
typedef std::shared_ptr< preconditioner_Type > | preconditionerPtr_Type |
typedef Displayer::comm_Type | comm_Type |
typedef Displayer::commPtr_Type | commPtr_Type |
typedef Teuchos::ParameterList | list_Type |
Constructors & Destructor | |
PreconditionerLinearSolver (std::shared_ptr< Epetra_Comm > comm=std::shared_ptr< Epetra_Comm >(new Epetra_MpiComm(MPI_COMM_WORLD))) | |
Default constructor. More... | |
virtual | ~PreconditionerLinearSolver () |
Destructor. More... | |
Methods | |
virtual void | createParametersList (list_Type &list, const GetPot &dataFile, const std::string §ion, const std::string &subSection) |
Create the list of parameters of the preconditioner. More... | |
virtual Int | buildPreconditioner (operator_type &matrix) |
Build a preconditioner based on the given matrix. More... | |
virtual void | resetPreconditioner () |
Reset the preconditioner. More... | |
virtual Real | condest () |
Return An estimation of the condition number of the preconditioner. More... | |
virtual void | showMe (std::ostream &output=std::cout) const |
Show informations about the preconditioner. More... | |
static void | createLinearSolverList (list_Type &list, const GetPot &dataFile, const std::string §ion, const std::string &subSection="SolverLinear", const bool &verbose=true) |
Create the list of parameters of the preconditioner. More... | |
Epetra Operator Interface Methods | |
Int | SetUseTranspose (const bool useTranspose=false) |
Set the matrix to be used transposed (or not) More... | |
bool | UseTranspose () |
Return true if the preconditioner is transposed. More... | |
Int | Apply (const Epetra_MultiVector &vector1, Epetra_MultiVector &vector2) const |
Apply the inverse of the preconditioner on vector1 and store the result in vector2. More... | |
Int | ApplyInverse (const Epetra_MultiVector &vector1, Epetra_MultiVector &vector2) const |
Apply the inverse of the preconditioner on vector1 and store the result in vector2. More... | |
const Epetra_Map & | OperatorRangeMap () const |
Return the Range map of the operator. More... | |
const Epetra_Map & | OperatorDomainMap () const |
Return the Domain map of the operator. More... | |
Set Methods | |
void | setDataFromGetPot (const GetPot &dataFile, const std::string §ion) |
Set the data of the preconditioner using a GetPot object. More... | |
void | setSolver (SolverAztecOO &) |
Set the internal solver. More... | |
Get Methods | |
bool | isPreconditionerSet () const |
Return true if the preconditioner is set. More... | |
prec_raw_type * | preconditioner () |
Return a raw pointer on the preconditioner. More... | |
prec_type | preconditionerPtr () |
Return a shared pointer on the preconditioner. More... | |
solverPtr_Type | solverPtr () |
Return a shared pointer on the solver. More... | |
std::string | preconditionerType () |
Return the type of preconditioner. More... | |
Additional Inherited Members | |
Public Types inherited from Preconditioner | |
typedef Epetra_Operator | prec_raw_type |
typedef std::shared_ptr< prec_raw_type > | prec_type |
typedef MatrixEpetra< Real > | operator_raw_type |
typedef std::shared_ptr< operator_raw_type > | operator_type |
typedef Displayer::comm_Type | comm_Type |
typedef Displayer::commPtr_Type | commPtr_Type |
typedef Teuchos::ParameterList | list_Type |
Public Member Functions inherited from Preconditioner | |
Preconditioner (const commPtr_Type &comm=commPtr_Type()) | |
Constructor. More... | |
Preconditioner (const Preconditioner &preconditioner, const commPtr_Type &comm=commPtr_Type()) | |
Copy constructor. More... | |
virtual | ~Preconditioner () |
Destructor. More... | |
void | setParametersList (const list_Type &list) |
The the internal list. More... | |
const bool & | preconditionerCreated () |
Return true if the preconditioner has been created. More... | |
const list_Type & | parametersList () const |
Return the parameters list. More... | |
list_Type & | parametersList () |
Return the parameters list. More... | |
Protected Attributes inherited from Preconditioner | |
std::string | M_precType |
Displayer | M_displayer |
list_Type | M_list |
bool | M_preconditionerCreated |
PreconditionerLinearSolver - Class to wrap linear solver.
Definition at line 63 of file PreconditionerLinearSolver.hpp.
typedef Epetra_Operator prec_raw_type |
Definition at line 71 of file PreconditionerLinearSolver.hpp.
typedef std::shared_ptr<prec_raw_type> prec_type |
Definition at line 72 of file PreconditionerLinearSolver.hpp.
typedef LinearSolver solver_Type |
Definition at line 74 of file PreconditionerLinearSolver.hpp.
typedef std::shared_ptr<solver_Type> solverPtr_Type |
Definition at line 75 of file PreconditionerLinearSolver.hpp.
typedef MatrixEpetra<Real> operator_raw_type |
Definition at line 77 of file PreconditionerLinearSolver.hpp.
typedef std::shared_ptr<operator_raw_type> operator_type |
Definition at line 78 of file PreconditionerLinearSolver.hpp.
typedef Preconditioner preconditioner_Type |
Definition at line 80 of file PreconditionerLinearSolver.hpp.
typedef std::shared_ptr<preconditioner_Type> preconditionerPtr_Type |
Definition at line 81 of file PreconditionerLinearSolver.hpp.
typedef Displayer::comm_Type comm_Type |
Definition at line 83 of file PreconditionerLinearSolver.hpp.
typedef Displayer::commPtr_Type commPtr_Type |
Definition at line 84 of file PreconditionerLinearSolver.hpp.
typedef Teuchos::ParameterList list_Type |
Definition at line 86 of file PreconditionerLinearSolver.hpp.
PreconditionerLinearSolver | ( | std::shared_ptr< Epetra_Comm > | comm = std::shared_ptr<Epetra_Comm> ( new Epetra_MpiComm ( MPI_COMM_WORLD ) ) | ) |
Default constructor.
comm | The communicator. |
Definition at line 48 of file PreconditionerLinearSolver.cpp.
|
virtual |
Destructor.
Definition at line 57 of file PreconditionerLinearSolver.cpp.
|
virtual |
Create the list of parameters of the preconditioner.
list | A Parameter list to be filled |
dataFile | A GetPot object containing the data about the preconditioner |
section | The section in "dataFile" where to find data about the preconditioner |
subSection | The subsection in "dataFile" where to find data about the preconditioner |
Implements Preconditioner.
Definition at line 68 of file PreconditionerLinearSolver.cpp.
|
static |
Create the list of parameters of the preconditioner.
list | A Parameter list to be filled |
dataFile | A GetPot object containing the data about the preconditioner |
section | The section in "dataFile" where to find data about the preconditioner |
subSection | The subsection in "dataFile" where to find data about the preconditioner |
Definition at line 77 of file PreconditionerLinearSolver.cpp.
|
virtual |
Build a preconditioner based on the given matrix.
matrix | Matrix upon which construct the preconditioner |
Implements Preconditioner.
Definition at line 99 of file PreconditionerLinearSolver.cpp.
|
virtual |
Reset the preconditioner.
Implements Preconditioner.
Definition at line 121 of file PreconditionerLinearSolver.cpp.
|
virtual |
Return An estimation of the condition number of the preconditioner.
Implements Preconditioner.
Definition at line 128 of file PreconditionerLinearSolver.cpp.
|
virtual |
Show informations about the preconditioner.
Reimplemented from Preconditioner.
Definition at line 134 of file PreconditionerLinearSolver.cpp.
|
virtual |
Set the matrix to be used transposed (or not)
useTranspose | If true the preconditioner is transposed |
Reimplemented from Preconditioner.
Definition at line 143 of file PreconditionerLinearSolver.cpp.
|
virtual |
Return true if the preconditioner is transposed.
Reimplemented from Preconditioner.
Definition at line 149 of file PreconditionerLinearSolver.cpp.
|
virtual |
Apply the inverse of the preconditioner on vector1 and store the result in vector2.
vector1 | Vector to which we apply the preconditioner |
vector2 | Vector to the store the result |
Reimplemented from Preconditioner.
Definition at line 155 of file PreconditionerLinearSolver.cpp.
|
virtual |
Apply the inverse of the preconditioner on vector1 and store the result in vector2.
vector1 | Vector to which we apply the preconditioner |
vector2 | Vector to the store the result |
Reimplemented from Preconditioner.
Definition at line 161 of file PreconditionerLinearSolver.cpp.
|
virtual |
Return the Range map of the operator.
Reimplemented from Preconditioner.
Definition at line 175 of file PreconditionerLinearSolver.cpp.
|
virtual |
Return the Domain map of the operator.
Reimplemented from Preconditioner.
Definition at line 181 of file PreconditionerLinearSolver.cpp.
|
virtual |
Set the data of the preconditioner using a GetPot object.
dataFile | A GetPot object containing the data about the preconditioner |
section | The section in "dataFile" where to find data about the preconditioner |
Implements Preconditioner.
Definition at line 190 of file PreconditionerLinearSolver.cpp.
|
virtual |
Set the internal solver.
Note: the argument is unused
solver | SolverAztecOO |
Reimplemented from Preconditioner.
Definition at line 200 of file PreconditionerLinearSolver.cpp.
bool isPreconditionerSet | ( | ) | const |
Return true if the preconditioner is set.
Definition at line 210 of file PreconditionerLinearSolver.cpp.
|
virtual |
Return a raw pointer on the preconditioner.
Implements Preconditioner.
Definition at line 216 of file PreconditionerLinearSolver.cpp.
|
virtual |
Return a shared pointer on the preconditioner.
Implements Preconditioner.
Definition at line 222 of file PreconditionerLinearSolver.cpp.
PreconditionerLinearSolver::solverPtr_Type solverPtr | ( | ) |
Return a shared pointer on the solver.
Definition at line 228 of file PreconditionerLinearSolver.cpp.
|
virtual |
Return the type of preconditioner.
Implements Preconditioner.
Definition at line 234 of file PreconditionerLinearSolver.cpp.
|
private |
Definition at line 232 of file PreconditionerLinearSolver.hpp.
|
private |
Definition at line 233 of file PreconditionerLinearSolver.hpp.
|
private |
Definition at line 234 of file PreconditionerLinearSolver.hpp.
|
private |
Definition at line 236 of file PreconditionerLinearSolver.hpp.
|
private |
Definition at line 237 of file PreconditionerLinearSolver.hpp.
|
private |
Definition at line 238 of file PreconditionerLinearSolver.hpp.