47 #ifndef __Teko_PreconditionerState_hpp__
48 #define __Teko_PreconditionerState_hpp__
50 #include "Teuchos_ParameterListAcceptor.hpp"
87 void setParameterList(
const Teuchos::RCP<Teuchos::ParameterList> & paramList);
117 virtual void addInverse(
const std::string & name,
const Teko::InverseLinearOp & ilo)
121 virtual Teko::InverseLinearOp
getInverse(
const std::string & name)
const
122 { std::map<std::string,Teko::InverseLinearOp>::const_iterator itr;
124 if(itr==
inverses_.end())
return Teuchos::null;
125 return itr->second; }
128 virtual void addLinearOp(
const std::string & name,
const Teko::LinearOp & lo)
129 { linearOps_[name] = lo; }
133 {
return linearOps_[name]; }
136 virtual void addModifiableOp(
const std::string & name,
const Teko::ModifiableLinearOp & mlo)
137 { modifiableOp_[name] = mlo; }
140 virtual Teko::ModifiableLinearOp &
142 { std::map<std::string,Teko::ModifiableLinearOp>::iterator itr;
143 itr = modifiableOp_.find(name);
144 if(itr==modifiableOp_.end())
145 return modifiableOp_[name];
146 return itr->second; }
152 unsigned int getTag()
const;
155 void setTag(
unsigned int tag);
166 std::map<std::string,Teko::ModifiableLinearOp> modifiableOp_;
167 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)
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.
std::map< std::string, Teko::InverseLinearOp > inverses_
Store a map of inverse linear operators.
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().