// @HEADER // ***************************************************************************** // Stokhos Package // // Copyright 2009 NTESS and the Stokhos contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER #ifndef STOKHOS_CONSTANTORTHOGPOLYEXPANSION_HPP #define STOKHOS_CONSTANTORTHOGPOLYEXPANSION_HPP #include "Stokhos_OrthogPolyExpansion.hpp" namespace Stokhos { //! Orthogonal polynomial expansion class for constant (size 1) expansions /*! * This is used primarily by the Sacado overloaded operators to provide * an expansion for constant expressions, which simplifies the logic of * the overloaded operators signficantly. */ template class ConstantOrthogPolyExpansion : public OrthogPolyExpansion { public: typedef Stokhos::StandardStorage node_type; //! Constructor ConstantOrthogPolyExpansion(); //! Destructor virtual ~ConstantOrthogPolyExpansion() {} //! Get expansion size ordinal_type size() const { return 1; } //! Get basis Teuchos::RCP< const OrthogPolyBasis > getBasis() const {return Teuchos::null; } //! Get triple product virtual Teuchos::RCP > getTripleProduct() const { return Teuchos::null; } // Operations void unaryMinus( OrthogPolyApprox& c, const OrthogPolyApprox& a); void plusEqual(OrthogPolyApprox& c, const value_type& x); void minusEqual(OrthogPolyApprox& c, const value_type& x); void timesEqual(OrthogPolyApprox& c, const value_type& x); void divideEqual(OrthogPolyApprox& c, const value_type& x); void plusEqual( OrthogPolyApprox& c, const OrthogPolyApprox& x); void minusEqual( OrthogPolyApprox& c, const OrthogPolyApprox& x); void timesEqual( OrthogPolyApprox& c, const OrthogPolyApprox& x); void divideEqual( OrthogPolyApprox& c, const OrthogPolyApprox& x); void plus(OrthogPolyApprox& c, const OrthogPolyApprox& a, const OrthogPolyApprox& b); void plus(OrthogPolyApprox& c, const value_type& a, const OrthogPolyApprox& b); void plus(OrthogPolyApprox& c, const OrthogPolyApprox& a, const value_type& b); void minus(OrthogPolyApprox& c, const OrthogPolyApprox& a, const OrthogPolyApprox& b); void minus(OrthogPolyApprox& c, const value_type& a, const OrthogPolyApprox& b); void minus(OrthogPolyApprox& c, const OrthogPolyApprox& a, const value_type& b); void times(OrthogPolyApprox& c, const OrthogPolyApprox& a, const OrthogPolyApprox& b); void times(OrthogPolyApprox& c, const value_type& a, const OrthogPolyApprox& b); void times(OrthogPolyApprox& c, const OrthogPolyApprox& a, const value_type& b); void divide(OrthogPolyApprox& c, const OrthogPolyApprox& a, const OrthogPolyApprox& b); void divide(OrthogPolyApprox& c, const value_type& a, const OrthogPolyApprox& b); void divide(OrthogPolyApprox& c, const OrthogPolyApprox& a, const value_type& b); void exp(OrthogPolyApprox& c, const OrthogPolyApprox& a); void log(OrthogPolyApprox& c, const OrthogPolyApprox& a); void log10(OrthogPolyApprox& c, const OrthogPolyApprox& a); void sqrt(OrthogPolyApprox& c, const OrthogPolyApprox& a); void cbrt(OrthogPolyApprox& c, const OrthogPolyApprox& a); void pow(OrthogPolyApprox& c, const OrthogPolyApprox& a, const OrthogPolyApprox& b); void pow(OrthogPolyApprox& c, const value_type& a, const OrthogPolyApprox& b); void pow(OrthogPolyApprox& c, const OrthogPolyApprox& a, const value_type& b); void cos(OrthogPolyApprox& c, const OrthogPolyApprox& a); void sin(OrthogPolyApprox& c, const OrthogPolyApprox& a); void tan(OrthogPolyApprox& c, const OrthogPolyApprox& a); void cosh(OrthogPolyApprox& c, const OrthogPolyApprox& a); void sinh(OrthogPolyApprox& c, const OrthogPolyApprox& a); void tanh(OrthogPolyApprox& c, const OrthogPolyApprox& a); void acos(OrthogPolyApprox& c, const OrthogPolyApprox& a); void asin(OrthogPolyApprox& c, const OrthogPolyApprox& a); void atan(OrthogPolyApprox& c, const OrthogPolyApprox& a); void atan2(OrthogPolyApprox& c, const OrthogPolyApprox& a, const OrthogPolyApprox& b); void atan2(OrthogPolyApprox& c, const value_type& a, const OrthogPolyApprox& b); void atan2(OrthogPolyApprox& c, const OrthogPolyApprox& a, const value_type& b); void acosh(OrthogPolyApprox& c, const OrthogPolyApprox& a); void asinh(OrthogPolyApprox& c, const OrthogPolyApprox& a); void atanh(OrthogPolyApprox& c, const OrthogPolyApprox& a); void abs(OrthogPolyApprox& c, const OrthogPolyApprox& a); void fabs(OrthogPolyApprox& c, const OrthogPolyApprox& a); void max(OrthogPolyApprox& c, const OrthogPolyApprox& a, const OrthogPolyApprox& b); void max(OrthogPolyApprox& c, const value_type& a, const OrthogPolyApprox& b); void max(OrthogPolyApprox& c, const OrthogPolyApprox& a, const value_type& b); void min(OrthogPolyApprox& c, const OrthogPolyApprox& a, const OrthogPolyApprox& b); void min(OrthogPolyApprox& c, const value_type& a, const OrthogPolyApprox& b); void min(OrthogPolyApprox& c, const OrthogPolyApprox& a, const value_type& b); private: // Prohibit copying ConstantOrthogPolyExpansion(const ConstantOrthogPolyExpansion&); // Prohibit Assignment ConstantOrthogPolyExpansion& operator=(const ConstantOrthogPolyExpansion& b); }; // class ConstantOrthogPolyExpansion } // namespace Stokhos #include "Stokhos_ConstantOrthogPolyExpansionImp.hpp" #endif // STOKHOS_CONSTANTORTHOGPOLYEXPANSION_HPP