// @HEADER // ***************************************************************************** // Stokhos Package // // Copyright 2009 NTESS and the Stokhos contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER #ifndef STOKHOS_FULLY_ASSEMBLED_OPERATOR_HPP #define STOKHOS_FULLY_ASSEMBLED_OPERATOR_HPP #include "Stokhos_SGOperator.hpp" #include "EpetraExt_MultiComm.h" #include "Stokhos_OrthogPolyBasis.hpp" #include "Stokhos_EpetraSparse3Tensor.hpp" #include "Teuchos_ParameterList.hpp" #include "EpetraExt_BlockCrsMatrix.h" #include namespace Stokhos { /*! * \brief An Epetra operator representing the block stochastic Galerkin * operator generated by fully assembling the matrix. */ class FullyAssembledOperator : public Stokhos::SGOperator, public EpetraExt::BlockCrsMatrix { public: //! Constructor FullyAssembledOperator( const Teuchos::RCP& sg_comm, const Teuchos::RCP >& sg_basis, const Teuchos::RCP& epetraCijk, const Teuchos::RCP& base_graph, const Teuchos::RCP& domain_sg_map, const Teuchos::RCP& range_sg_map, const Teuchos::RCP& params); //! Destructor virtual ~FullyAssembledOperator(); /** \name Stokhos::SGOperator methods */ //@{ //! Setup operator virtual void setupOperator( const Teuchos::RCP& poly); //! Get SG polynomial virtual Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > getSGPolynomial(); //! Get SG polynomial virtual Teuchos::RCP getSGPolynomial() const; //@} /** \name Overloaded Epetra_Operator methods */ //@{ /*! * \brief Wrap Apply() to add a timer. */ virtual int Apply(const Epetra_MultiVector& Input, Epetra_MultiVector& Result) const; //@} private: //! Private to prohibit copying FullyAssembledOperator(const FullyAssembledOperator&); //! Private to prohibit copying FullyAssembledOperator& operator=(const FullyAssembledOperator&); protected: //! Stores SG parallel communicator Teuchos::RCP sg_comm; //! Stochastic Galerking basis Teuchos::RCP > sg_basis; //! Stores Epetra Cijk tensor Teuchos::RCP epetraCijk; //! Stores domain SG map Teuchos::RCP domain_sg_map; //! Stores range SG map Teuchos::RCP range_sg_map; //! Short-hand for Cijk typedef Stokhos::Sparse3Tensor Cijk_type; //! Stores triple product tensor Teuchos::RCP Cijk; //! Stores operators Teuchos::RCP block_ops; //! Flag indicating whether operator be scaled with <\psi_i^2> bool scale_op; //! Flag indicating whether to include mean term bool include_mean; //! Flag indicating whether to only use linear terms bool only_use_linear; }; // class FullyAssembledOperator } // namespace Stokhos #endif // STOKHOS_FULLY_ASSEMBLED_OPERATOR_HPP