Stokhos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Stokhos_OrthogPolyExpansion.hpp
Go to the documentation of this file.
1// $Id$
2// $Source$
3// @HEADER
4// ***********************************************************************
5//
6// Stokhos Package
7// Copyright (2009) Sandia Corporation
8//
9// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
10// license for use of this work by or on behalf of the U.S. Government.
11//
12// Redistribution and use in source and binary forms, with or without
13// modification, are permitted provided that the following conditions are
14// met:
15//
16// 1. Redistributions of source code must retain the above copyright
17// notice, this list of conditions and the following disclaimer.
18//
19// 2. Redistributions in binary form must reproduce the above copyright
20// notice, this list of conditions and the following disclaimer in the
21// documentation and/or other materials provided with the distribution.
22//
23// 3. Neither the name of the Corporation nor the names of the
24// contributors may be used to endorse or promote products derived from
25// this software without specific prior written permission.
26//
27// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
28// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
31// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
33// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
34// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
35// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
36// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
37// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38//
39// Questions? Contact Eric T. Phipps (etphipp@sandia.gov).
40//
41// ***********************************************************************
42// @HEADER
43
44#ifndef STOKHOS_ORTHOGPOLYEXPANSION_HPP
45#define STOKHOS_ORTHOGPOLYEXPANSION_HPP
46
47#include <cmath>
48#include <algorithm> // for std::min and std::max
49
52
53namespace Stokhos {
54
56 template <typename ordinal_type, typename value_type,
58 value_type> >
60 public:
61
64
67
70
72 virtual ordinal_type size() const = 0;
73
75 virtual Teuchos::RCP<const OrthogPolyBasis<ordinal_type, value_type> >
76 getBasis() const = 0;
77
79 virtual Teuchos::RCP<const Sparse3Tensor<ordinal_type, value_type> >
80 getTripleProduct() const = 0;
81
82 // Operations
83 virtual void unaryMinus(
86
87 virtual void plusEqual(
89 const value_type& x) = 0;
90 virtual void minusEqual(
92 const value_type& x) = 0;
93 virtual void timesEqual(
95 const value_type& x) = 0;
96 virtual void divideEqual(
98 const value_type& x) = 0;
99
100 virtual void plusEqual(
103 virtual void minusEqual(
106 virtual void timesEqual(
109 virtual void divideEqual(
112
113 virtual void plus(
117 virtual void plus(
119 const value_type& a,
121 virtual void plus(
124 const value_type& b) = 0;
125 virtual void minus(
129 virtual void minus(
131 const value_type& a,
133 virtual void minus(
136 const value_type& b) = 0;
137 virtual void times(
141 virtual void times(
143 const value_type& a,
145 virtual void times(
148 const value_type& b) = 0;
149 virtual void divide(
153 virtual void divide(
155 const value_type& a,
157 virtual void divide(
160 const value_type& b) = 0;
161
162 virtual void exp(
165 virtual void log(
168 virtual void log10(
171 virtual void sqrt(
174 virtual void cbrt(
177 virtual void pow(
181 virtual void pow(
183 const value_type& a,
185 virtual void pow(
188 const value_type& b) = 0;
189 virtual void cos(
192 virtual void sin(
195 virtual void tan(
198 virtual void cosh(
201 virtual void sinh(
204 virtual void tanh(
207 virtual void acos(
210 virtual void asin(
213 virtual void atan(
216// virtual void atan2(OrthogPolyApprox<ordinal_type, value_type, node_type>& c,
217// const OrthogPolyApprox<ordinal_type, value_type, node_type>& a,
218// const OrthogPolyApprox<ordinal_type, value_type, node_type>& b) = 0;
219// virtual void atan2(OrthogPolyApprox<ordinal_type, value_type, node_type>& c,
220// const T& a,
221// const OrthogPolyApprox<ordinal_type, value_type, node_type>& b) = 0;
222// virtual void atan2(OrthogPolyApprox<ordinal_type, value_type, node_type>& c,
223// const OrthogPolyApprox<ordinal_type, value_type, node_type>& a,
224// const T& b) = 0;
225 virtual void acosh(
228 virtual void asinh(
231 virtual void atanh(
234 virtual void abs(
237 virtual void fabs(
240 virtual void max(
244 virtual void max(
246 const value_type& a,
248 virtual void max(
251 const value_type& b) = 0;
252 virtual void min(
256 virtual void min(
258 const value_type& a,
260 virtual void min(
263 const value_type& b) = 0;
264
265 private:
266
267 // Prohibit copying
269
270 // Prohibit Assignment
272
273 }; // class OrthogPolyExpansion
274
275} // namespace Stokhos
276
277#endif // STOKHOS_ORTHOGPOLYEXPANSION_HPP
Kokkos::Serial node_type
Class to store coefficients of a projection onto an orthogonal polynomial basis.
Abstract base class for orthogonal polynomial-based expansions.
virtual void tanh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void log10(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void divide(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void divide(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const value_type &b)=0
virtual void atan(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void times(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void unaryMinus(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void divideEqual(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &x)=0
virtual void timesEqual(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &x)=0
virtual void asinh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void plusEqual(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &x)=0
virtual void min(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void minusEqual(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &x)=0
virtual void pow(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void min(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const value_type &b)=0
virtual ordinal_type size() const =0
Get expansion size.
virtual void minus(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void cosh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void timesEqual(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &x)=0
virtual void sin(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void acosh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void sinh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void max(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void times(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const value_type &b)=0
virtual void pow(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const value_type &b)=0
virtual void minusEqual(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &x)=0
OrthogPolyExpansion & operator=(const OrthogPolyExpansion &b)
virtual void exp(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void minus(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const value_type &b)=0
virtual void max(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const value_type &b)=0
virtual void divide(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void min(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void abs(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void plus(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void tan(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void max(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void atanh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void sqrt(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void asin(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void cos(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void pow(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void acos(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual Teuchos::RCP< const OrthogPolyBasis< ordinal_type, value_type > > getBasis() const =0
Get basis.
OrthogPolyExpansion(const OrthogPolyExpansion &)
virtual void plus(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const value_type &b)=0
virtual Teuchos::RCP< const Sparse3Tensor< ordinal_type, value_type > > getTripleProduct() const =0
Get triple product.
Sparse3Tensor< ordinal_type, value_type > tp_type
Typename of TripleProduct tensor.
virtual void plus(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void fabs(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void times(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
virtual void log(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void cbrt(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)=0
virtual void plusEqual(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &x)=0
virtual void divideEqual(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &x)=0
virtual void minus(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const value_type &a, const OrthogPolyApprox< ordinal_type, value_type, node_type > &b)=0
Data structure storing a sparse 3-tensor C(i,j,k) in a a compressed format.
Top-level namespace for Stokhos classes and functions.