00001 //*****************************************************************// 00002 // Albany 2.0: Copyright 2012 Sandia Corporation // 00003 // This Software is released under the BSD license detailed // 00004 // in the file "license.txt" in the top-level Albany directory // 00005 //*****************************************************************// 00006 #ifndef MOR_PETROVGALERKINOPERATORFACTOR_HPP 00007 #define MOR_PETROVGALERKINOPERATORFACTOR_HPP 00008 00009 #include "MOR_ReducedOperatorFactory.hpp" 00010 00011 class Epetra_MultiVector; 00012 class Epetra_Operator; 00013 class Epetra_CrsMatrix; 00014 00015 #include "MOR_ReducedJacobianFactory.hpp" 00016 00017 #include "Teuchos_RCP.hpp" 00018 00019 namespace MOR { 00020 00021 class PetrovGalerkinOperatorFactory : public ReducedOperatorFactory { 00022 public: 00023 explicit PetrovGalerkinOperatorFactory(const Teuchos::RCP<const Epetra_MultiVector> &reducedBasis); 00024 PetrovGalerkinOperatorFactory(const Teuchos::RCP<const Epetra_MultiVector> &reducedBasis, 00025 const Teuchos::RCP<const Epetra_MultiVector> &projectionBasis); 00026 00027 virtual bool fullJacobianRequired(bool residualRequested, bool jacobianRequested) const; 00028 00029 virtual const Epetra_MultiVector &leftProjection(const Epetra_MultiVector &fullVector, 00030 Epetra_MultiVector &result) const; 00031 00032 virtual Teuchos::RCP<Epetra_CrsMatrix> reducedJacobianNew(); 00033 virtual const Epetra_CrsMatrix &reducedJacobian(Epetra_CrsMatrix &result) const; 00034 00035 virtual void fullJacobianIs(const Epetra_Operator &op); 00036 00037 private: 00038 Teuchos::RCP<const Epetra_MultiVector> reducedBasis_, projectionBasis_; 00039 00040 ReducedJacobianFactory jacobianFactory_; 00041 }; 00042 00043 } // namespace MOR 00044 00045 #endif /* MOR_PETROVGALERKINOPERATORFACTOR_HPP */