Thyra::AmesosLinearOpWithSolveFactory Class Reference
[Amesos to Thyra Linear Solver Adapter Code]

Concrete LinearOpWithSolveFactoryBase adapter subclass that uses Amesos direct solvers. More...

#include <Thyra_AmesosLinearOpWithSolveFactory.hpp>

List of all members.

Constructors/initializers/accessors

typedef Teuchos::RefCountPtr<
Teuchos::ParameterList
paramList_ptr_t
 AmesosLinearOpWithSolveFactory (const Amesos::ESolverType solverType=Amesos::LAPACK, const Amesos::ERefactorizationPolicy refactorizationPolicy=Amesos::REPIVOT_ON_REFACTORIZATION, const Teuchos::RefCountPtr< Teuchos::ParameterList > &paramList=Teuchos::null, const bool throwOnPrecInput=true)
 Constructor which sets the defaults.
void solverType (const Amesos::ESolverType &solverType)
 Set the type of solver to use.
const Amesos::ESolverTypesolverType () const
void refactorizationPolicy (const Amesos::ERefactorizationPolicy &refactorizationPolicy)
 Set the refactorization policy.
const Amesos::ERefactorizationPolicyrefactorizationPolicy () const
void set_paramList (const Teuchos::RefCountPtr< Teuchos::ParameterList > &paramList)
 Set the parameter list that will be used to control the solver.
Teuchos::RefCountPtr< Teuchos::ParameterListget_paramList () const
Teuchos::ParameterListparamList () const
void throwOnPrecInput (const bool &throwOnPrecInput)
 Set if an exception is thrown when this->initializePreconditionedOp() is called or not.
const bool & throwOnPrecInput () const

Overridden public functions from LinearOpWithSolveFactoryBase

bool isCompatible (const LinearOpBase< double > &fwdOp) const
 Returns true if dynamic_cast<const EpetraLinearOpBase*>(fwdOp)!=NULL .
Teuchos::RefCountPtr< LinearOpWithSolveBase<
double > > 
createOp () const
 
void initializeOp (const Teuchos::RefCountPtr< const LinearOpBase< double > > &fwdOp, LinearOpWithSolveBase< double > *Op) const
 
bool supportsPreconditionerInputType (const EPreconditionerInputType precOpType) const
 Returns false .
void initializePreconditionedOp (const Teuchos::RefCountPtr< const LinearOpBase< double > > &fwdOp, const Teuchos::RefCountPtr< const LinearOpBase< double > > &precOp, const EPreconditionerInputType precOpType, LinearOpWithSolveBase< double > *Op) const
 Throws exception if this->throwOnPrecInput() == true and calls this->initializeOp(fwdOp,Op) otherwise.
void uninitializeOp (LinearOpWithSolveBase< double > *Op, Teuchos::RefCountPtr< const LinearOpBase< double > > *fwdOp, Teuchos::RefCountPtr< const LinearOpBase< double > > *precOp, EPreconditionerInputType *precOpType) const
 


Detailed Description

Concrete LinearOpWithSolveFactoryBase adapter subclass that uses Amesos direct solvers.

This class creates objects of type AmesosLinearOpWithSolve (through the LinearOpWithSolveBase interface) which can then be used to solve for linear systems. The AmesosLinearOpWithSolve objects created an initialized by this object are completely indpendent from *this. This allows for multiple AmesosLinearOpWithSolve objects to be created and maintained simultaneously and for *this factory object to be destroyed without affecting the created AmesosLinearOpWithSolve objects.

Development notes: This class has been designed to allow for "smart" EpetraLinearOpBase subclasses that can create an Epetra_Operator view on command where the underlying storage may not be an Epetra object. However, the current implementation of at least some of the Amesos_BaseSolver subclasses do not allow the Epetra_Operator object to change after construction. Therefore, this current flawed implementation requires that every call to the EpetraLinearOpBase::getEpetraOpView() function return the same Epetra_Operator object.

Definition at line 68 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.


Member Typedef Documentation

typedef Teuchos::RefCountPtr< Teuchos::ParameterList > Thyra::AmesosLinearOpWithSolveFactory::paramList_ptr_t
 

Definition at line 115 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.


Constructor & Destructor Documentation

Thyra::AmesosLinearOpWithSolveFactory::AmesosLinearOpWithSolveFactory const Amesos::ESolverType  solverType = Amesos::LAPACK,
const Amesos::ERefactorizationPolicy  refactorizationPolicy = Amesos::REPIVOT_ON_REFACTORIZATION,
const Teuchos::RefCountPtr< Teuchos::ParameterList > &  paramList = Teuchos::null,
const bool  throwOnPrecInput = true
 

Constructor which sets the defaults.

Definition at line 79 of file Thyra_AmesosLinearOpWithSolveFactory.cpp.


Member Function Documentation

void Thyra::AmesosLinearOpWithSolveFactory::solverType const Amesos::ESolverType solverType  )  [inline]
 

Set the type of solver to use.

Note, do not change the solver type between refactorizations of the same matrix (i.e. in calls to this->initializeOp())! Doing so will have undefined behavior.

Definition at line 94 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.

const Amesos::ESolverType& Thyra::AmesosLinearOpWithSolveFactory::solverType  )  const [inline]
 

Definition at line 94 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.

void Thyra::AmesosLinearOpWithSolveFactory::refactorizationPolicy const Amesos::ERefactorizationPolicy refactorizationPolicy  )  [inline]
 

Set the refactorization policy.

This option can be changed inbetween refactorizations (i.e. between calls to this->initializeOp()).

Definition at line 101 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.

const Amesos::ERefactorizationPolicy& Thyra::AmesosLinearOpWithSolveFactory::refactorizationPolicy  )  const [inline]
 

Definition at line 101 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.

void Thyra::AmesosLinearOpWithSolveFactory::set_paramList const Teuchos::RefCountPtr< Teuchos::ParameterList > &  paramList  )  [inline]
 

Set the parameter list that will be used to control the solver.

See Amesos documentation for what these options are.

Developers note: From what I can tell of the documenatation and looking at some source code, this parameter list will not be modified but its use is very confused. I think that this should be changed to a constant parameter list but I don't want to do this because I don't want to be held accountable in case it is changed. If users needs to guarantee that their parameter list will not change, then a copy should be made before calling this function.

Definition at line 115 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.

Teuchos::RefCountPtr< Teuchos::ParameterList > Thyra::AmesosLinearOpWithSolveFactory::get_paramList  )  const [inline]
 

Definition at line 115 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.

Teuchos::ParameterList& Thyra::AmesosLinearOpWithSolveFactory::paramList  )  const [inline]
 

Definition at line 115 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.

void Thyra::AmesosLinearOpWithSolveFactory::throwOnPrecInput const bool &  throwOnPrecInput  )  [inline]
 

Set if an exception is thrown when this->initializePreconditionedOp() is called or not.

This option can be changed inbetween refactorizations (i.e. between calls to this->initializeOp()).

Definition at line 123 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.

const bool& Thyra::AmesosLinearOpWithSolveFactory::throwOnPrecInput  )  const [inline]
 

Definition at line 123 of file Thyra_AmesosLinearOpWithSolveFactory.hpp.

bool Thyra::AmesosLinearOpWithSolveFactory::isCompatible const LinearOpBase< double > &  fwdOp  )  const
 

Returns true if dynamic_cast<const EpetraLinearOpBase*>(fwdOp)!=NULL .

Definition at line 93 of file Thyra_AmesosLinearOpWithSolveFactory.cpp.

Teuchos::RefCountPtr< LinearOpWithSolveBase< double > > Thyra::AmesosLinearOpWithSolveFactory::createOp  )  const
 

Definition at line 115 of file Thyra_AmesosLinearOpWithSolveFactory.cpp.

void Thyra::AmesosLinearOpWithSolveFactory::initializeOp const Teuchos::RefCountPtr< const LinearOpBase< double > > &  fwdOp,
LinearOpWithSolveBase< double > *  Op
const
 

Definition at line 120 of file Thyra_AmesosLinearOpWithSolveFactory.cpp.

bool Thyra::AmesosLinearOpWithSolveFactory::supportsPreconditionerInputType const EPreconditionerInputType  precOpType  )  const
 

Returns false .

Definition at line 278 of file Thyra_AmesosLinearOpWithSolveFactory.cpp.

void Thyra::AmesosLinearOpWithSolveFactory::initializePreconditionedOp const Teuchos::RefCountPtr< const LinearOpBase< double > > &  fwdOp,
const Teuchos::RefCountPtr< const LinearOpBase< double > > &  precOp,
const EPreconditionerInputType  precOpType,
LinearOpWithSolveBase< double > *  Op
const
 

Throws exception if this->throwOnPrecInput() == true and calls this->initializeOp(fwdOp,Op) otherwise.

Definition at line 283 of file Thyra_AmesosLinearOpWithSolveFactory.cpp.

void Thyra::AmesosLinearOpWithSolveFactory::uninitializeOp LinearOpWithSolveBase< double > *  Op,
Teuchos::RefCountPtr< const LinearOpBase< double > > *  fwdOp,
Teuchos::RefCountPtr< const LinearOpBase< double > > *  precOp,
EPreconditionerInputType precOpType
const
 

Definition at line 298 of file Thyra_AmesosLinearOpWithSolveFactory.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:39:28 2008 for Amesos/Thyra Linear Solver Adapter Software by doxygen 1.3.9.1