Teko Version of the Day
Teko_ALOperator.hpp
00001 /*
00002  * Author: Zhen Wang
00003  * Email: wangz@ornl.gov
00004  *        zhen.wang@alum.emory.edu
00005  */
00006 
00007 #ifndef __Teko_ALOperator_hpp__
00008 #define __Teko_ALOperator_hpp__
00009 
00010 #include "Teko_BlockedEpetraOperator.hpp"
00011 #include "Teko_Utilities.hpp"
00012 
00013 namespace Teko
00014 {
00015 
00016 namespace NS
00017 {
00018 
00083 class ALOperator : public Teko::Epetra::BlockedEpetraOperator
00084 {
00085 public:
00086 
00102    ALOperator(const std::vector<std::vector<int> > & vars,
00103          const Teuchos::RCP<Epetra_Operator> & content,
00104          LinearOp pressureMassMatrix,
00105          double gamma = 0.05, const std::string & label = "<ANYM>");
00106 
00120    ALOperator(const std::vector<std::vector<int> > & vars,
00121          const Teuchos::RCP<Epetra_Operator> & content,
00122          double gamma = 0.05, const std::string & label = "<ANYM>");
00123 
00124    // Destructor
00125    virtual
00126    ~ALOperator()
00127    {
00128    }
00129 
00136    void
00137    setPressureMassMatrix(LinearOp pressureMassMatrix);
00138 
00142    const LinearOp &
00143    getPressureMassMatrix() const
00144    {
00145       return pressureMassMatrix_;
00146    }
00147 
00153    void
00154    setGamma(double gamma);
00155 
00160    const double &
00161    getGamma() const
00162    {
00163       return gamma_;
00164    }
00165 
00172    void
00173    augmentRHS(const Epetra_MultiVector & b, Epetra_MultiVector & bAugmented);
00174 
00178    int
00179    getNumberOfBlockRows() const
00180    {
00181       return numBlockRows_;
00182    }
00183 
00188    virtual void
00189    RebuildOps()
00190    {
00191       BuildALOperator();
00192    }
00193 
00201    const Teuchos::RCP<const Epetra_Operator>
00202    GetBlock(int i, int j) const;
00203 
00204 protected:
00205 
00209    Teuchos::RCP<Thyra::LinearOpBase<double> > alOperator_;
00210 
00214    Teuchos::RCP<Thyra::LinearOpBase<double> > alOperatorRhs_;
00215 
00219    LinearOp pressureMassMatrix_;
00220 
00224    LinearOp invPressureMassMatrix_;
00225 
00229    double gamma_;
00230 
00234    int dim_;
00235 
00239    int numBlockRows_;
00240 
00244    void
00245    checkDim(const std::vector<std::vector<int> > & vars);
00246 
00250    void
00251    BuildALOperator();
00252 };
00253 
00254 } // end namespace NS
00255 
00256 } // end namespace Teko
00257 
00258 #endif /* __Teko_ALOperator_hpp__ */
 All Classes Files Functions Variables