Teko Version of the Day
Loading...
Searching...
No Matches
Teko_SIMPLEPreconditionerFactory.hpp
1// @HEADER
2// *****************************************************************************
3// Teko: A package for block and physics based preconditioning
4//
5// Copyright 2010 NTESS and the Teko contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef __Teko_SIMPLEPreconditionerFactory_hpp__
11#define __Teko_SIMPLEPreconditionerFactory_hpp__
12
13#include "Teko_BlockPreconditionerFactory.hpp"
14#include "Teko_InverseFactory.hpp"
15
16namespace Teko {
17namespace NS {
18
19// Declaration of the preconditioner factory
36class SIMPLEPreconditionerFactory : public BlockPreconditionerFactory {
37 public:
38 // Constructor
39 SIMPLEPreconditionerFactory(const Teuchos::RCP<InverseFactory>& inverse, double alpha);
40
41 // Constructor
42 SIMPLEPreconditionerFactory(const Teuchos::RCP<InverseFactory>& invVelFactory,
43 const Teuchos::RCP<InverseFactory>& invPrsFactory, double alpha);
44
47
48 // Function inherited from BlockPreconditionerFactory
49 LinearOp buildPreconditionerOperator(BlockedLinearOp& blo, BlockPreconditionerState& state) const;
50
52 virtual void setMassMatrix(Teko::LinearOp& mass) { massMatrix_ = mass; }
53
55 virtual Teuchos::RCP<Teuchos::ParameterList> getRequestedParameters() const;
56
58 virtual bool updateRequestedParameters(const Teuchos::ParameterList& pl);
59
61 virtual void initializeFromParameterList(const Teuchos::ParameterList& pl);
62
63 protected:
65
66 // class members
67 Teuchos::RCP<InverseFactory> customHFactory_;
68 Teuchos::RCP<InverseFactory> invVelFactory_;
69 Teuchos::RCP<InverseFactory> precVelFactory_;
70 Teuchos::RCP<InverseFactory> invPrsFactory_;
71 Teuchos::RCP<InverseFactory> precPrsFactory_;
72 double alpha_;
73 DiagonalType fInverseType_;
74 // enum FInverseType {Diagonal,Lumped,AbsRowSum,Custom} fInverseType_;
75
76 bool useMass_;
77 Teko::LinearOp massMatrix_;
78
79 // Info for the block-diagonal approximation to H if used.
80 mutable Teuchos::ParameterList BlkDiagList_;
81};
82
83} // end namespace NS
84} // end namespace Teko
85
86#endif
Abstract class which block preconditioner factories in Teko should be based on.
virtual LinearOp buildPreconditionerOperator(BlockedLinearOp &blo, BlockPreconditionerState &state) const =0
Function that is called to build the preconditioner for the linear operator that is passed in.
An implementation of a state object for block preconditioners.
LinearOp buildPreconditionerOperator(BlockedLinearOp &blo, BlockPreconditionerState &state) const
Function that is called to build the preconditioner for the linear operator that is passed in.
virtual bool updateRequestedParameters(const Teuchos::ParameterList &pl)
For assisting in construction of the preconditioner.
virtual void initializeFromParameterList(const Teuchos::ParameterList &pl)
Initialize from a parameter list.
virtual void setMassMatrix(Teko::LinearOp &mass)
Set the mass matrix for this factory.
virtual Teuchos::RCP< Teuchos::ParameterList > getRequestedParameters() const
For assisting in construction of the preconditioner.