Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_PseudoSpectralOperator.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef STOKHOS_PSEUDO_SPECTRAL_OPERATOR_HPP
11 #define STOKHOS_PSEUDO_SPECTRAL_OPERATOR_HPP
12 
13 #include <map>
14 #include "Teuchos_Array.hpp"
15 
17 
18 namespace Stokhos {
19 
21  template <typename ordinal_type, typename value_type>
25  };
26 
30  template <typename ordinal_t,
31  typename value_t,
32  typename point_compare_type =
35  public:
36 
37  typedef ordinal_t ordinal_type;
38  typedef value_t value_type;
40  typedef std::map<point_type, std::pair<value_type,ordinal_type>,
41  point_compare_type> point_set_type;
43 
46  typedef typename point_set_type::iterator set_iterator;
47  typedef typename point_set_type::const_iterator const_set_iterator;
48 
51 
54 
56  virtual ordinal_type point_size() const = 0;
57 
59  virtual ordinal_type coeff_size() const = 0;
60 
62  virtual iterator begin() = 0;
63 
65  virtual iterator end() = 0;
66 
68  virtual const_iterator begin() const = 0;
69 
71  virtual const_iterator end() const = 0;
72 
74  virtual set_iterator set_begin() = 0;
75 
77  virtual set_iterator set_end() = 0;
78 
80  virtual const_set_iterator set_begin() const = 0;
81 
83  virtual const_set_iterator set_end() const = 0;
84 
86  virtual ordinal_type index(const point_type& point) const = 0;
87 
89  virtual const point_type& point(ordinal_type n) const = 0;
90 
92 
99  virtual void transformQP2PCE(
100  const value_type& alpha,
103  const value_type& beta,
104  bool trans = false) const = 0;
105 
107 
114  virtual void transformPCE2QP(
115  const value_type& alpha,
118  const value_type& beta,
119  bool trans = false) const = 0;
120 
121  };
122 
123 }
124 
125 #endif
A functor for comparing floating-point numbers to some tolerance.
std::map< point_type, std::pair< value_type, ordinal_type >, point_compare_type > point_set_type
virtual set_iterator set_end()=0
Iterator to end of point set.
TensorProductElement< ordinal_type, value_type > point_type
Container storing a term in a generalized tensor product.
virtual iterator end()=0
Iterator to end of point set.
An operator interface for building pseudo-spectral approximations.
virtual ordinal_type index(const point_type &point) const =0
Get point index for given point.
virtual void transformQP2PCE(const value_type &alpha, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &input, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &result, const value_type &beta, bool trans=false) const =0
Transform values at quadrature points to PCE coefficients.
virtual void transformPCE2QP(const value_type &alpha, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &input, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &result, const value_type &beta, bool trans=false) const =0
Transform PCE coefficients to quadrature values.
virtual ordinal_type point_size() const =0
Number of points.
Struct defining default point compare type.
virtual ordinal_type coeff_size() const =0
Number of coefficients.
std::vector< T >::const_iterator const_iterator
A comparison functor implementing a strict weak ordering based lexographic ordering.
virtual set_iterator set_begin()=0
Iterator to begining of point set.
point_map_type::const_iterator const_iterator
LexographicLess< TensorProductElement< ordinal_type, value_type >, FloatingPointLess< value_type > > type
std::vector< T >::iterator iterator
virtual iterator begin()=0
Iterator to begining of point set.
point_set_type::const_iterator const_set_iterator
virtual const point_type & point(ordinal_type n) const =0
Get point for given index.