14 #define UQ_PREP_F77 F77_FUNC_(uq_prep,UQ_PREP)
15 #define UQ_PROD2_F77 F77_FUNC_(uq_prod2,UQ_PROD2)
16 #define UQ_DIV_F77 F77_FUNC_(uq_div,UQ_DIV)
17 #define UQ_EXP_F77 F77_FUNC_(uq_exp,UQ_EXP)
18 #define UQ_LOG_F77 F77_FUNC_(uq_log,UQ_LOG)
19 #define UQ_SQRT_F77 F77_FUNC_(uq_sqrt,UQ_SQRT)
20 #define UQ_EXP_INT_F77 F77_FUNC_(uq_exp_int,UQ_EXP)
21 #define UQ_LOG_INT_F77 F77_FUNC_(uq_log_int,UQ_LOG)
25 void UQ_PROD2_F77(
const double*,
const double*,
double*,
int*);
26 void UQ_DIV_F77(
const double*,
const double*,
double*,
int*);
27 void UQ_EXP_F77(
const double*,
double*,
int*,
int*,
double*,
int*);
28 void UQ_LOG_F77(
const double*,
double*,
int*,
int*,
double*,
int*);
29 void UQ_SQRT_F77(
const double*,
double*,
int*,
int*);
34 template <
typename ordinal_type,
typename value_type>
35 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
36 ForUQTKOrthogPolyExpansion(
39 EXPANSION_METHOD method_,
45 order = this->basis->order();
46 dim = this->basis->dimension();
52 template <
typename ordinal_type,
typename value_type>
54 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
58 OrthogPolyExpansionBase<ordinal_type, value_type, node_type>::timesEqual(c,val);
61 template <
typename ordinal_type,
typename value_type>
63 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
67 OrthogPolyExpansionBase<ordinal_type, value_type, node_type>::divideEqual(c,val);
70 template <
typename ordinal_type,
typename value_type>
72 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
85 "Stokhos::ForUQTKOrthogPolyExpansion::timesEqual()" <<
86 ": Expansion size (" << sz <<
87 ") is too small for computation.");
94 if (p > 1 && xp > 1) {
96 "Stokhos::ForUQTKOrthogPolyExpansion::timesEqual()"
97 <<
": Arguments have incompatible sizes: "
98 <<
"x.size() = " << xp <<
", c.size() = " << pc <<
".");
121 template <
typename ordinal_type,
typename value_type>
123 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
125 const OrthogPolyApprox<ordinal_type, value_type, node_type>& x)
135 "Stokhos::ForUQTKOrthogPolyExpansion::divideEqual()" <<
136 ": Expansion size (" << sz <<
137 ") is too small for computation.");
146 "Stokhos::ForUQTKOrthogPolyExpansion::divideEqual()"
147 <<
": Arguments have incompatible sizes: "
148 <<
"x.size() = " << xp <<
", c.size() = " << pc <<
".");
163 template <
typename ordinal_type,
typename value_type>
165 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
173 if (pa > 1 && pb > 1)
178 "Stokhos::ForUQTKOrthogPolyExpansion::times()" <<
179 ": Expansion size (" << sz <<
180 ") is too small for computation.");
188 if (pa > 1 && pb > 1) {
190 "Stokhos::ForUQTKOrthogPolyExpansion::times()"
191 <<
": Arguments have incompatible sizes: "
192 <<
"a.size() = " << pa <<
", b.size() = " << pb
193 <<
", required size = " << pc <<
".");
211 template <
typename ordinal_type,
typename value_type>
213 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
218 OrthogPolyExpansionBase<ordinal_type, value_type, node_type>::times(c,a,b);
221 template <
typename ordinal_type,
typename value_type>
223 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
228 OrthogPolyExpansionBase<ordinal_type, value_type, node_type>::times(c,a,b);
231 template <
typename ordinal_type,
typename value_type>
233 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
246 "Stokhos::ForUQTKOrthogPolyExpansion::divide()" <<
247 ": Expansion size (" << sz <<
248 ") is too small for computation.");
258 "Stokhos::ForUQTKOrthogPolyExpansion::divide()"
259 <<
": Arguments have incompatible sizes: "
260 <<
"a.size() = " << pa <<
", b.size() = " << pb
261 <<
", required size = " << pc <<
".");
272 template <
typename ordinal_type,
typename value_type>
274 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
293 "Stokhos::ForUQTKOrthogPolyExpansion::divide()"
294 <<
": Arguments have incompatible sizes: "
295 <<
"b.size() = " << pb
296 <<
", required size = " << pc <<
".");
307 template <
typename ordinal_type,
typename value_type>
309 Stokhos::ForUQTKOrthogPolyExpansion<ordinal_type, value_type>::
314 OrthogPolyExpansionBase<ordinal_type, value_type, node_type>::divide(c,a,b);
317 template <
typename ordinal_type,
typename value_type>
337 "Stokhos::ForUQTKOrthogPolyExpansion::exp()"
338 <<
": Arguments have incompatible sizes: "
339 <<
"a.size() = " << pa <<
", c.size() = " << pc
342 if (method == TAYLOR) {
353 template <
typename ordinal_type,
typename value_type>
373 "Stokhos::ForUQTKOrthogPolyExpansion::log()"
374 <<
": Arguments have incompatible sizes: "
375 <<
"a.size() = " << pa <<
", c.size() = " << pc
378 if (method == TAYLOR) {
389 template <
typename ordinal_type,
typename value_type>
406 template <
typename ordinal_type,
typename value_type>
426 "Stokhos::ForUQTKOrthogPolyExpansion::sqrt()"
427 <<
": Arguments have incompatible sizes: "
428 <<
"a.size() = " << pa <<
", c.size() = " << pc
438 template <
typename ordinal_type,
typename value_type>
456 template <
typename ordinal_type,
typename value_type>
475 template <
typename ordinal_type,
typename value_type>
493 template <
typename ordinal_type,
typename value_type>
512 template <
typename ordinal_type,
typename value_type>
525 "Stokhos::ForUQTKOrthogPolyExpansion::sin()"
526 <<
": Method not implemented!");
529 template <
typename ordinal_type,
typename value_type>
542 "Stokhos::ForUQTKOrthogPolyExpansion::cos()"
543 <<
": Method not implemented!");
546 template <
typename ordinal_type,
typename value_type>
559 "Stokhos::ForUQTKOrthogPolyExpansion::tan()"
560 <<
": Method not implemented!");
563 template <
typename ordinal_type,
typename value_type>
575 this->minusEqual(s, t);
585 template <
typename ordinal_type,
typename value_type>
597 this->plusEqual(c, t);
607 template <
typename ordinal_type,
typename value_type>
620 this->minus(t, c, s);
621 this->plusEqual(c, s);
631 template <
typename ordinal_type,
typename value_type>
644 "Stokhos::ForUQTKOrthogPolyExpansion::acos()"
645 <<
": Method not implemented!");
648 template <
typename ordinal_type,
typename value_type>
661 "Stokhos::ForUQTKOrthogPolyExpansion::asin()"
662 <<
": Method not implemented!");
665 template <
typename ordinal_type,
typename value_type>
678 "Stokhos::ForUQTKOrthogPolyExpansion::atan()"
679 <<
": Method not implemented!");
682 template <
typename ordinal_type,
typename value_type>
689 if (a.
size() == 1 && b.
size() == 1) {
696 "Stokhos::ForUQTKOrthogPolyExpansion::atan2()"
697 <<
": Method not implemented!");
700 template <
typename ordinal_type,
typename value_type>
714 "Stokhos::ForUQTKOrthogPolyExpansion::atan2()"
715 <<
": Method not implemented!");
718 template <
typename ordinal_type,
typename value_type>
732 "Stokhos::ForUQTKOrthogPolyExpansion::atan2()"
733 <<
": Method not implemented!");
736 template <
typename ordinal_type,
typename value_type>
749 "Stokhos::ForUQTKOrthogPolyExpansion::acosh()"
750 <<
": Method not implemented!");
753 template <
typename ordinal_type,
typename value_type>
766 "Stokhos::ForUQTKOrthogPolyExpansion::asinh()"
767 <<
": Method not implemented!");
770 template <
typename ordinal_type,
typename value_type>
783 "Stokhos::ForUQTKOrthogPolyExpansion::atanh()"
784 <<
": Method not implemented!");
KOKKOS_INLINE_FUNCTION PCE< Storage > sqrt(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > tan(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > sinh(const PCE< Storage > &a)
void resize(ordinal_type sz)
Resize coefficient array (coefficients are preserved)
Data structure storing a sparse 3-tensor C(i,j,k) in a a compressed format.
KOKKOS_INLINE_FUNCTION PCE< Storage > pow(const PCE< Storage > &a, const PCE< Storage > &b)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
pointer coeff()
Return coefficient array.
KOKKOS_INLINE_FUNCTION PCE< Storage > tanh(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > cbrt(const PCE< Storage > &a)
static T * get_and_fill(int sz)
Get memory for new array of length sz and fill with zeros.
KOKKOS_INLINE_FUNCTION PCE< Storage > acos(const PCE< Storage > &a)
atan2(expr1.val(), expr2.val())
Abstract base class for multivariate orthogonal polynomials.
KOKKOS_INLINE_FUNCTION PCE< Storage > cosh(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > atan(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > exp(const PCE< Storage > &a)
Class to store coefficients of a projection onto an orthogonal polynomial basis.
static void copy(const T *src, T *dest, int sz)
Copy array from src to dest of length sz.
KOKKOS_INLINE_FUNCTION PCE< Storage > sin(const PCE< Storage > &a)
ordinal_type size() const
Return size.
KOKKOS_INLINE_FUNCTION PCE< Storage > log(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > log10(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > asin(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > cos(const PCE< Storage > &a)