10 #ifndef __Teko_MLPrecondtionerFactory_hpp__
11 #define __Teko_MLPrecondtionerFactory_hpp__
13 #include "Teko_BlockPreconditionerFactory.hpp"
15 #include "ml_include.h"
16 #include "ml_operator.h"
19 class MultiLevelPreconditioner;
31 const Teuchos::ParameterList &mainList,
32 const std::vector<Teuchos::RCP<const Teuchos::ParameterList> > &coarseningParams);
56 static void cleanup_ML_Comm(ML_Comm *mlComm);
57 static void cleanup_ML_Operator(ML_Operator *mlComm);
60 Teuchos::RCP<ML_Comm> mlComm_;
61 Teuchos::RCP<ML_Operator> mlOp_;
63 std::vector<Epetra_RowMatrix *> diagonalOps_;
64 Teuchos::RCP<ML_Epetra::MultiLevelPreconditioner> mlPreconditioner_;
99 std::vector<Teuchos::RCP<const Teuchos::ParameterList> > coarseningParams_;
100 Teuchos::ParameterList mainParams_;
void setIsFilled(bool value)
Set if ML internals been constructed yet.
void fillMLPreconditionerState(const BlockedLinearOp &blo, MLPreconditionerState &mlState) const
Fills an ML preconditioner state object.
void initializeFromParameterList(const Teuchos::ParameterList &settings)
This function builds the internals of the preconditioner factory from a parameter list...
Class that constructs and returns an ML preconditioner object that is capable of doing block smoothin...
Abstract class which block preconditioner factories in Teko should be based on.
void setAggregationMatrices(const std::vector< Epetra_RowMatrix * > &diags)
Set matrices to build multigrid hierarcy from.
Contains operator internals need for ML.
An implementation of a state object for block preconditioners.
Teuchos::RCP< ML_Epetra::MultiLevelPreconditioner > constructMLPreconditioner(const Teuchos::ParameterList &mainList, const std::vector< Teuchos::RCP< const Teuchos::ParameterList > > &coarseningParams)
Build an ML preconditioner object using the set of coarsening parameters.
virtual LinearOp buildPreconditionerOperator(BlockedLinearOp &blo, BlockPreconditionerState &state) const
Function that is called to build the preconditioner for the linear operator that is passed in...
bool isFilled() const
Has this object been filled yet.
void setMLComm(ML_Comm *comm)
set ML Comm pointer...it will be automatically cleaned up
void setMLOperator(ML_Operator *op)
set ML Operator pointer...it will be automatically cleaned up
virtual Teuchos::RCP< PreconditionerState > buildPreconditionerState() const
Function that permits the construction of an arbitrary PreconditionerState object.