Teko Version of the Day
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Teko::TpetraHelpers::TpetraBlockPreconditioner Class Reference

A single Tpetra wrapper for all the BlockPreconditioners. More...

#include <Teko_TpetraBlockPreconditioner.hpp>

Inherits Teko::TpetraHelpers::TpetraInverseOpWrapper.

Public Member Functions

 TpetraBlockPreconditioner (const Teuchos::RCP< const PreconditionerFactory > &bfp)
 Constructor that takes the BlockPreconditionerFactory that will build the preconditioner.
 
virtual void initPreconditioner (bool clearOld=false)
 Build the underlying data structure for the preconditioner.
 
virtual void buildPreconditioner (const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &A, bool clear=true)
 Build this preconditioner from a Tpetra::Operator passed in to this object.
 
virtual void buildPreconditioner (const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &A, const Tpetra::MultiVector< ST, LO, GO, NT > &mv, bool clear=true)
 Build this preconditioner from a Tpetra::Operator passed in to this object. It is assumed that this Tpetra::Operator.
 
virtual void rebuildPreconditioner (const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &A)
 Rebuild this preconditioner from a Tpetra::Operator passed in this to object.
 
virtual void rebuildPreconditioner (const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &A, const Tpetra::MultiVector< ST, LO, GO, NT > &mv)
 Rebuild this preconditioner from a Tpetra::Operator passed in this to object.
 
virtual Teuchos::RCP< PreconditionerState > getPreconditionerState ()
 
virtual Teuchos::RCP< const PreconditionerState > getPreconditionerState () const
 

Detailed Description

A single Tpetra wrapper for all the BlockPreconditioners.

This class uses the Thyra based preconditioner factories to build a Tpetra::Operator that behaves like a preconditioner. This is done by using the BlockPreconditionerFactory, and letting it build whatever preconditioner is neccessary. Thus the Tpetra "layer" is just a single class that handles any generic BlockPreconditionerFactory.

Definition at line 30 of file Teko_TpetraBlockPreconditioner.hpp.

Constructor & Destructor Documentation

◆ TpetraBlockPreconditioner()

Teko::TpetraHelpers::TpetraBlockPreconditioner::TpetraBlockPreconditioner ( const Teuchos::RCP< const PreconditionerFactory > &  bfp)

Constructor that takes the BlockPreconditionerFactory that will build the preconditioner.

Constructor that takes the BlockPreconditionerFactory that will build the preconditioner.

Definition at line 39 of file Teko_TpetraBlockPreconditioner.cpp.

Member Function Documentation

◆ initPreconditioner()

void Teko::TpetraHelpers::TpetraBlockPreconditioner::initPreconditioner ( bool  clearOld = false)
virtual

Build the underlying data structure for the preconditioner.

Build the underlying data structure for the preconditioner. This permits the manipulation of the state object for a preconditioner. and is useful in that case some extra data needs to fill the preconditioner state.

Parameters
[in]clearOldIf true any previously constructed preconditioner will be wiped out and a new one created. If false, a preconditioner will be create only if the current one is empty (i.e. initPreconditioner had not been called).

Definition at line 43 of file Teko_TpetraBlockPreconditioner.cpp.

◆ buildPreconditioner() [1/2]

void Teko::TpetraHelpers::TpetraBlockPreconditioner::buildPreconditioner ( const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &  A,
bool  clear = true 
)
virtual

Build this preconditioner from a Tpetra::Operator passed in to this object.

Build this preconditioner from a Tpetra::Operator passed in to this object. It is assume that this Tpetra::Operator.

Build this preconditioner from a Tpetra::Operator passed in to this object. It is assumed that this Tpetra::Operator will be a TpetraOperatorWrapper object, so the block Thyra components can be easily extracted.

Parameters
[in]AThe Tpetra source operator. (Should be a TpetraOperatorWrapper!)
[in]clearIf true, than any previous state saved by the preconditioner is discarded.

Build this preconditioner from a Tpetra::Operator passed in to this object. It is assume that this Tpetra::Operator will be a TpetraOperatorWrapper object, so the block Thyra components can be easily extracted.

Parameters
[in]AThe Tpetra source operator. (Should be a TpetraOperatorWrapper!)
Note
This will clear any internal state stored by the state object

Definition at line 60 of file Teko_TpetraBlockPreconditioner.cpp.

◆ buildPreconditioner() [2/2]

void Teko::TpetraHelpers::TpetraBlockPreconditioner::buildPreconditioner ( const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &  A,
const Tpetra::MultiVector< ST, LO, GO, NT > &  tpetra_mv,
bool  clear = true 
)
virtual

Build this preconditioner from a Tpetra::Operator passed in to this object. It is assumed that this Tpetra::Operator.

Build this preconditioner from a Tpetra::Operator passed in to this object. It is assume that this Tpetra::Operator.

Build this preconditioner from a Tpetra::Operator passed in to this object. It is assumed that this Tpetra::Operator will be a TpetraOperatorWrapper object, so the block Thyra components can be easily extracted.

Parameters
[in]AThe Tpetra source operator. (Should be a TpetraOperatorWrapper!)
[in]mvA vector that was used to build the source operator.
[in]clearIf true, than any previous state saved by the preconditioner is discarded.

Build this preconditioner from a Tpetra::Operator passed in to this object. It is assume that this Tpetra::Operator will be a TpetraOperatorWrapper object, so the block Thyra components can be easily extracted.

Parameters
[in]AThe Tpetra source operator. (Should be a TpetraOperatorWrapper!)
[in]srcA vector that was used to build the source operator.
Note
This will clear any internal state stored by the state object

Definition at line 104 of file Teko_TpetraBlockPreconditioner.cpp.

◆ rebuildPreconditioner() [1/2]

void Teko::TpetraHelpers::TpetraBlockPreconditioner::rebuildPreconditioner ( const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &  A)
virtual

Rebuild this preconditioner from a Tpetra::Operator passed in this to object.

Rebuild this preconditioner from a Tpetra::Operator passed in this to object. If buildPreconditioner has not been called the preconditioner will be built instead. Otherwise efforts are taken to only rebuild what is neccessary. Also, it is assumed that this Tpetra::Operator will be an TpetraOperatorWrapper object, so the block Thyra components can be easily extracted.

Parameters
[in]AThe Tpetra source operator. (Should be a TpetraOperatorWrapper!)

Rebuild this preconditioner from a Tpetra::Operator passed in this to object. If buildPreconditioner has not been called the preconditioner will be built instead. Otherwise efforts are taken to only rebuild what is neccessary. Also, it is assumed that this Tpetra::Operator will be an TpetraOperatorWrapper object, so the block Thyra components can be easily extracted.

Parameters
[in]AThe Tpetra source operator. (Should be a TpetraOperatorWrapper!)
[in]mvA vector that was used to build the source operator.

Definition at line 153 of file Teko_TpetraBlockPreconditioner.cpp.

◆ rebuildPreconditioner() [2/2]

void Teko::TpetraHelpers::TpetraBlockPreconditioner::rebuildPreconditioner ( const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &  A,
const Tpetra::MultiVector< ST, LO, GO, NT > &  tpetra_mv 
)
virtual

Rebuild this preconditioner from a Tpetra::Operator passed in this to object.

Rebuild this preconditioner from a Tpetra::Operator passed in this to object. If buildPreconditioner has not been called the preconditioner will be built instead. Otherwise efforts are taken to only rebuild what is neccessary. Also, it is assumed that this Tpetra::Operator will be an TpetraOperatorWrapper object, so the block Thyra components can be easily extracted.

Parameters
[in]AThe Tpetra source operator. (Should be a TpetraOperatorWrapper!)
[in]mvA vector that was used to build the source operator.

Definition at line 201 of file Teko_TpetraBlockPreconditioner.cpp.

◆ getPreconditionerState() [1/2]

Teuchos::RCP< PreconditionerState > Teko::TpetraHelpers::TpetraBlockPreconditioner::getPreconditionerState ( )
virtual

Try to get a Teko::PreconditionerState object. This method attempts to cast its internal representation of a preconditioner object to a Teko::BlockPreconditioner object. If it suceeds a state object is returned. Otherwise, Teuchos::null is returned.

Returns
Get the state object associated with this preconditioner. If it doesn't exist for this type of preconditioner factory this method returns null.

Definition at line 254 of file Teko_TpetraBlockPreconditioner.cpp.

◆ getPreconditionerState() [2/2]

Teuchos::RCP< const PreconditionerState > Teko::TpetraHelpers::TpetraBlockPreconditioner::getPreconditionerState ( ) const
virtual

Try to get a Teko::PreconditionerState object. This method attempts to cast its internal representation of a preconditioner object to a Teko::BlockPreconditioner object. If it suceeds a state object is returned. Otherwise, Teuchos::null is returned.

Returns
Get the state object associated with this preconditioner. If it doesn't exist for this type of preconditioner factory this method returns null.

Try to get a Teko::PreconditionerState object. This method attempts to cast its internal representation of a preconditioner object to a Teko::Preconditioner object. If it suceeds a state object is returned. Otherwise, Teuchos::null is returned.

Returns
Get the state object associated with this preconditioner. If it doesn't exist for this type of preconditioner factory this method returns null.

Definition at line 271 of file Teko_TpetraBlockPreconditioner.cpp.


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