Stokhos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Stokhos_Sacado_MathFunctions.hpp
Go to the documentation of this file.
1// @HEADER
2// ***********************************************************************
3//
4// Stokhos Package
5// Copyright (2009) Sandia Corporation
6//
7// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8// license for use of this work by or on behalf of the U.S. Government.
9//
10// Redistribution and use in source and binary forms, with or without
11// modification, are permitted provided that the following conditions are
12// met:
13//
14// 1. Redistributions of source code must retain the above copyright
15// notice, this list of conditions and the following disclaimer.
16//
17// 2. Redistributions in binary form must reproduce the above copyright
18// notice, this list of conditions and the following disclaimer in the
19// documentation and/or other materials provided with the distribution.
20//
21// 3. Neither the name of the Corporation nor the names of the
22// contributors may be used to endorse or promote products derived from
23// this software without specific prior written permission.
24//
25// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36//
37// Questions? Contact Eric T. Phipps (etphipp@sandia.gov).
38//
39// ***********************************************************************
40// @HEADER
41
42#ifndef STOKHOS_SACADO_MATH_FUNCTIONS_HPP
43#define STOKHOS_SACADO_MATH_FUNCTIONS_HPP
44
45#define UNARYFUNC_MACRO(OP,FADOP) \
46namespace Sacado { \
47 \
48 namespace PCE { \
49 template <typename T, typename S> class OrthogPoly; \
50 template <typename T, typename S> \
51 OrthogPoly<T,S> OP (const OrthogPoly<T,S>&); \
52 } \
53 \
54 namespace ETPCE { \
55 template <typename T> class FADOP; \
56 template <typename T> class Expr; \
57 template <typename T> \
58 Expr< FADOP< Expr<T> > > OP (const Expr<T>&); \
59 } \
60 \
61} \
62 \
63namespace std { \
64 using Sacado::PCE::OP; \
65 using Sacado::ETPCE::OP; \
66}
67
69UNARYFUNC_MACRO(log, LogOp)
87
88#undef UNARYFUNC_MACRO
89
90#define BINARYFUNC_MACRO(OP,FADOP) \
91namespace Sacado { \
92 \
93 namespace PCE { \
94 template <typename T, typename S> class OrthogPoly; \
95 template <typename T, typename S> \
96 OrthogPoly<T,S> OP (const OrthogPoly<T,S>&, \
97 const OrthogPoly<T,S>&); \
98 template <typename T, typename S> \
99 OrthogPoly<T,S> OP (const T&, \
100 const OrthogPoly<T,S>&); \
101 template <typename T, typename S> \
102 OrthogPoly<T,S> OP (const OrthogPoly<T,S>&, \
103 const T&); \
104 } \
105 \
106 namespace ETPCE { \
107 template <typename T1, typename T2> class FADOP; \
108 template <typename T> class Expr; \
109 template <typename T> class ConstExpr; \
110 template <typename T1, typename T2> \
111 Expr< FADOP< Expr<T1>, Expr<T2> > > \
112 OP (const Expr<T1>&, const Expr<T2>&); \
113 \
114 template <typename T> \
115 Expr< FADOP< Expr<T>, Expr<T> > > \
116 OP (const Expr<T>&, const Expr<T>&); \
117 \
118 template <typename T> \
119 Expr< FADOP< typename Expr<T>::value_type, Expr<T> > > \
120 OP (const typename Expr<T>::value_type&, const Expr<T>&); \
121 \
122 template <typename T> \
123 Expr< FADOP< Expr<T>, typename Expr<T>::value_type > > \
124 OP (const Expr<T>&, const typename Expr<T>::value_type&); \
125 } \
126 \
127} \
128 \
129namespace std { \
130 using Sacado::PCE::OP; \
131 using Sacado::ETPCE::OP; \
132}
133
135BINARYFUNC_MACRO(pow, PowerOp)
138
139#undef BINARYFUNC_MACRO
140
141#endif // STOKHOS_SACADO_MATH_FUNCTIONS_HPP
fabs(expr.val())
asinh(expr.val())
tan(expr.val())
abs(expr.val())
expr expr SinOp
expr expr SinhOp
cos(expr.val())
expr expr SqrtOp
expr expr ACosOp
expr expr ATanOp
expr2 j expr1 expr1 expr2 expr2 j expr1 c c c c MinOp
cosh(expr.val())
expr expr ACoshOp
acos(expr.val())
sin(expr.val())
sinh(expr.val())
expr expr ASinOp
cbrt(expr.val())
log10(expr.val())
expr expr TanhOp
expr expr TanOp
expr expr CoshOp
expr expr ASinhOp
expr1 expr1 expr1 expr2 expr1 expr1 c expr2 expr1 c expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 j expr1 expr1 expr1 expr1 j expr1 c *expr2 expr1 c expr1 c expr1 c expr1 expr1 expr1 expr1 j *expr1 expr2 expr1 expr1 j *expr1 c expr2 expr1 c expr1 expr2 expr1 expr2 expr1 Atan2Op
exp(expr.val())
atan(expr.val())
acosh(expr.val())
expr expr AbsOp
atan2(expr1.val(), expr2.val())
sqrt(expr.val())
expr expr ATanhOp
expr expr expr expr ExpOp
tanh(expr.val())
atanh(expr.val())
expr expr CosOp
expr2 j expr1 expr1 expr2 expr2 j expr1 c c c c MaxOp
asin(expr.val())
#define UNARYFUNC_MACRO(OP, FADOP)
#define BINARYFUNC_MACRO(OP, FADOP)