Teko Version of the Day
Loading...
Searching...
No Matches
Teko_InverseFactoryOperator.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_InverseFactoryOperator_hpp__
11#define __Teko_InverseFactoryOperator_hpp__
12
13#include "Teuchos_ConstNonconstObjectContainer.hpp"
14
15#include "Teko_InverseFactory.hpp"
16#include "Teko_EpetraInverseOpWrapper.hpp"
17
18namespace Teko {
19namespace Epetra {
20
31class InverseFactoryOperator : public EpetraInverseOpWrapper {
32 public:
39 InverseFactoryOperator(const Teuchos::RCP<const InverseFactory> &bfp);
40
53 virtual void initInverse(bool clearOld = false);
54
67 virtual void buildInverseOperator(const Teuchos::RCP<const Epetra_Operator> &A,
68 bool clear = true);
69
82 virtual void buildInverseOperator(const Teuchos::RCP<Epetra_Operator> &A, bool clear = true);
83
96 virtual void rebuildInverseOperator(const Teuchos::RCP<const Epetra_Operator> &A);
97
110 virtual void rebuildInverseOperator(const Teuchos::RCP<Epetra_Operator> &A);
111
115 Teuchos::RCP<const Epetra_Operator> getForwardOp() const { return fwdOp_.getConstObj(); }
116
120 Teuchos::RCP<Epetra_Operator> getNonconstForwardOp() const { return fwdOp_.getNonconstObj(); }
121
122 protected:
123 Teuchos::RCP<const Thyra::LinearOpBase<double> > extractLinearOp(
124 const Teuchos::RCP<const Epetra_Operator> &A) const;
125 Teuchos::RCP<const MappingStrategy> extractMappingStrategy(
126 const Teuchos::RCP<const Epetra_Operator> &A) const;
127
130
131 Teuchos::RCP<const Teko::InverseFactory> inverseFactory_;
132 Teko::ModifiableLinearOp invOperator_;
133 bool firstBuildComplete_;
134
135 Teuchos::ConstNonconstObjectContainer<Epetra_Operator> fwdOp_;
136 bool setConstFwdOp_;
137};
138
139} // end namespace Epetra
140} // end namespace Teko
141
142#endif
A single Epetra wrapper for all operators constructed from an inverse operator.
virtual void buildInverseOperator(const Teuchos::RCP< const Epetra_Operator > &A, bool clear=true)
Build this inverse operator from an Epetra_Operator passed in to this object.
InverseFactoryOperator(const Teuchos::RCP< const InverseFactory > &bfp)
Constructor that takes the InverseFactory that will build the operator.
virtual void initInverse(bool clearOld=false)
Build the underlying data structure for the inverse operator.
Teuchos::RCP< Epetra_Operator > getNonconstForwardOp() const
virtual void rebuildInverseOperator(const Teuchos::RCP< const Epetra_Operator > &A)
Rebuild this inverse from an Epetra_Operator passed in this to object.
Teuchos::RCP< const Epetra_Operator > getForwardOp() const