Teko  Version of the Day
 All Classes Files Functions Variables Pages
Teko_LU2x2PreconditionerFactory.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_LU2x2PreconditionerFactory_hpp__
11 #define __Teko_LU2x2PreconditionerFactory_hpp__
12 
13 #include "Teuchos_RCP.hpp"
14 
15 #include "Teko_BlockPreconditionerFactory.hpp"
16 #include "Teko_LU2x2Strategy.hpp"
17 
18 namespace Teko {
19 
105  public:
107 
108 
110  LU2x2PreconditionerFactory(LinearOp& invA00, LinearOp& invS);
111 
113  LU2x2PreconditionerFactory(LinearOp& hatInvA00, LinearOp& tildeInvA00, LinearOp& invS);
114 
123  LU2x2PreconditionerFactory(const Teuchos::RCP<LU2x2Strategy>& strategy);
124 
130 
132 
139  LinearOp buildPreconditionerOperator(BlockedLinearOp& blo, BlockPreconditionerState& state) const;
140 
153  virtual void initializeFromParameterList(const Teuchos::ParameterList& settings);
154 
169  virtual Teuchos::RCP<Teuchos::ParameterList> getRequestedParameters() const;
170 
184  virtual bool updateRequestedParameters(const Teuchos::ParameterList& pl);
185 
198  virtual bool useFullLDU() const { return useFullLDU_; }
199 
210  virtual void setFullLDU(bool value) { useFullLDU_ = value; }
211 
212  protected:
214 
216  Teuchos::RCP<LU2x2Strategy> invOpsStrategy_;
217 
223 
224  public:
237  static RCP<LU2x2Strategy> buildStrategy(const std::string& name,
238  const Teuchos::ParameterList& settings,
239  const RCP<const InverseLibrary>& invLib,
240  const RCP<RequestHandler>& rh);
241 
255  static void addStrategy(const std::string& name, const RCP<Cloneable>& clone);
256 
257  private:
259  static CloneFactory<LU2x2Strategy> strategyBuilder_;
260 
262  static void initializeStrategyBuilder();
263 };
264 
265 } // end namespace Teko
266 
267 #endif
LinearOp buildPreconditionerOperator(BlockedLinearOp &blo, BlockPreconditionerState &state) const
Create the LU 2x2 preconditioner operator.
Construct a preconditioner using a LDU dcomposition of a block 2x2 matrix.
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...
virtual bool updateRequestedParameters(const Teuchos::ParameterList &pl)
Update this object with the fields from a parameter list.
static RCP< LU2x2Strategy > buildStrategy(const std::string &name, const Teuchos::ParameterList &settings, const RCP< const InverseLibrary > &invLib, const RCP< RequestHandler > &rh)
Builder function for creating strategies.
Abstract class which block preconditioner factories in Teko should be based on.
Teuchos::RCP< LU2x2Strategy > invOpsStrategy_
some members
An implementation of a state object for block preconditioners.
virtual void setFullLDU(bool value)
Set the type of inverse operation to use.
static void addStrategy(const std::string &name, const RCP< Cloneable > &clone)
Add a strategy to the builder. This is done using the clone pattern.
LU2x2PreconditionerFactory()
Default constructor for use with AutoClone.
virtual bool useFullLDU() const
Determine the type of inverse operator to build.
virtual Teuchos::RCP< Teuchos::ParameterList > getRequestedParameters() const
Request the additional parameters this preconditioner factory needs.
virtual void initializeFromParameterList(const Teuchos::ParameterList &settings)
This function builds the internals of the preconditioner factory from a parameter list...