10 #ifndef __Teko_PreconditionerState_hpp__
11 #define __Teko_PreconditionerState_hpp__
13 #include "Teuchos_ParameterListAcceptor.hpp"
50 void setParameterList(
const Teuchos::RCP<Teuchos::ParameterList>& paramList);
76 virtual void addInverse(
const std::string& name,
const Teko::InverseLinearOp& ilo) {
81 virtual Teko::InverseLinearOp
getInverse(
const std::string& name)
const {
82 std::map<std::string, Teko::InverseLinearOp>::const_iterator itr;
84 if (itr ==
inverses_.end())
return Teuchos::null;
89 virtual void addLinearOp(
const std::string& name,
const Teko::LinearOp& lo) {
90 linearOps_[name] = lo;
94 virtual Teko::LinearOp
getLinearOp(
const std::string& name) {
return linearOps_[name]; }
97 virtual void addModifiableOp(
const std::string& name,
const Teko::ModifiableLinearOp& mlo) {
98 modifiableOp_[name] = mlo;
103 std::map<std::string, Teko::ModifiableLinearOp>::iterator itr;
104 itr = modifiableOp_.find(name);
105 if (itr == modifiableOp_.end())
return modifiableOp_[name];
113 unsigned int getTag()
const;
116 void setTag(
unsigned int tag);
127 std::map<std::string, Teko::ModifiableLinearOp> modifiableOp_;
128 std::map<std::string, Teko::LinearOp> linearOps_;
Teuchos::RCP< Teuchos::ParameterList > paramList_
for ParameterListAcceptor
virtual Teko::InverseLinearOp getInverse(const std::string &name) const
Get a named inverse from the state object.
virtual void setSourceVector(const Teko::MultiVector &srcVec)
Set the vector associated with this operator (think nonlinear system)
virtual void addLinearOp(const std::string &name, const Teko::LinearOp &lo)
Add a named operator to the state object.
bool isInitialized_
Stores the initialization state.
virtual const Teko::MultiVector getSourceVector() const
Set the vector associated with this operator (think nonlinear system)
std::map< std::string, Teko::InverseLinearOp > inverses_
Store a map of inverse linear operators.
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
Get the parameter list that was set using setParameterList().
virtual void merge(const PreconditionerState &ps, int position=-1)
Merge internal storage of another PreconditionerState object into this one.
virtual Teko::LinearOp getLinearOp(const std::string &name)
Add a named operator to the state object.
virtual bool isInitialized() const
virtual void addInverse(const std::string &name, const Teko::InverseLinearOp &ilo)
Add a named inverse to the state object.
void setTag(unsigned int tag)
Set the tag for this operator.
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > ¶mList)
Set parameters from a parameter list and return with default values.
virtual void addModifiableOp(const std::string &name, const Teko::ModifiableLinearOp &mlo)
Add a named operator to the state object.
An implementation of a state object preconditioners.
Teko::MultiVector srcVector_
Store a source vector.
virtual void setInitialized(bool init=true)
unsigned int getTag() const
Get the tag for this operator.
virtual Teko::ModifiableLinearOp & getModifiableOp(const std::string &name)
Add a named operator to the state object.
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Unset the parameter list that was set using setParameterList().