42#include "Teuchos_Assert.hpp"
44template <
typename ordinal_type,
typename value_type>
49 const Teuchos::RCP<Teuchos::ParameterList>& params_) :
54template <
typename ordinal_type,
typename value_type>
63 c[0] = std::exp(a[0]);
66 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
67 "Stokhos::AlgebraicOrthogPolyExpansion::exp()"
68 <<
": Method not implemented!");
72template <
typename ordinal_type,
typename value_type>
81 c[0] = std::log(a[0]);
84 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
85 "Stokhos::AlgebraicOrthogPolyExpansion::log()"
86 <<
": Method not implemented!");
89template <
typename ordinal_type,
typename value_type>
98 c[0] = std::log10(a[0]);
101 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
102 "Stokhos::AlgebraicOrthogPolyExpansion::log10()"
103 <<
": Method not implemented!");
106template <
typename ordinal_type,
typename value_type>
115 c[0] = std::sqrt(a[0]);
118 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
119 "Stokhos::AlgebraicOrthogPolyExpansion::sqrt()"
120 <<
": Method not implemented!");
123template <
typename ordinal_type,
typename value_type>
132 c[0] = std::cbrt(a[0]);
135 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
136 "Stokhos::AlgebraicOrthogPolyExpansion::cbrt()"
137 <<
": Method not implemented!");
140template <
typename ordinal_type,
typename value_type>
147 if (a.
size() == 1 && b.
size() == 1) {
150 c[0] = std::pow(a[0], b[0]);
153 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
154 "Stokhos::AlgebraicOrthogPolyExpansion::pow()"
155 <<
": Method not implemented!");
158template <
typename ordinal_type,
typename value_type>
168 c[0] = std::pow(a, b[0]);
171 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
172 "Stokhos::AlgebraicOrthogPolyExpansion::pow()"
173 <<
": Method not implemented!");
176template <
typename ordinal_type,
typename value_type>
186 c[0] = std::pow(a[0], b);
189 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
190 "Stokhos::AlgebraicOrthogPolyExpansion::pow()"
191 <<
": Method not implemented!");
194template <
typename ordinal_type,
typename value_type>
203 s[0] = std::sin(a[0]);
206 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
207 "Stokhos::AlgebraicOrthogPolyExpansion::sin()"
208 <<
": Method not implemented!");
211template <
typename ordinal_type,
typename value_type>
220 c[0] = std::cos(a[0]);
223 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
224 "Stokhos::AlgebraicOrthogPolyExpansion::cos()"
225 <<
": Method not implemented!");
228template <
typename ordinal_type,
typename value_type>
237 t[0] = std::tan(a[0]);
240 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
241 "Stokhos::AlgebraicOrthogPolyExpansion::tan()"
242 <<
": Method not implemented!");
245template <
typename ordinal_type,
typename value_type>
254 s[0] = std::sinh(a[0]);
257 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
258 "Stokhos::AlgebraicOrthogPolyExpansion::sinh()"
259 <<
": Method not implemented!");
262template <
typename ordinal_type,
typename value_type>
271 c[0] = std::cosh(a[0]);
274 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
275 "Stokhos::AlgebraicOrthogPolyExpansion::cosh()"
276 <<
": Method not implemented!");
279template <
typename ordinal_type,
typename value_type>
288 t[0] = std::tanh(a[0]);
291 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
292 "Stokhos::AlgebraicOrthogPolyExpansion::tanh()"
293 <<
": Method not implemented!");
296template <
typename ordinal_type,
typename value_type>
305 c[0] = std::acos(a[0]);
308 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
309 "Stokhos::AlgebraicOrthogPolyExpansion::acos()"
310 <<
": Method not implemented!");
313template <
typename ordinal_type,
typename value_type>
322 c[0] = std::asin(a[0]);
325 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
326 "Stokhos::AlgebraicOrthogPolyExpansion::asin()"
327 <<
": Method not implemented!");
330template <
typename ordinal_type,
typename value_type>
339 c[0] = std::atan(a[0]);
342 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
343 "Stokhos::AlgebraicOrthogPolyExpansion::atan()"
344 <<
": Method not implemented!");
347template <
typename ordinal_type,
typename value_type>
354 if (a.
size() == 1 && b.
size() == 1) {
357 c[0] = std::atan2(a[0], b[0]);
360 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
361 "Stokhos::AlgebraicOrthogPolyExpansion::atan2()"
362 <<
": Method not implemented!");
365template <
typename ordinal_type,
typename value_type>
375 c[0] = std::atan2(a, b[0]);
378 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
379 "Stokhos::AlgebraicOrthogPolyExpansion::atan2()"
380 <<
": Method not implemented!");
383template <
typename ordinal_type,
typename value_type>
393 c[0] = std::atan2(a[0], b);
396 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
397 "Stokhos::AlgebraicOrthogPolyExpansion::atan2()"
398 <<
": Method not implemented!");
401template <
typename ordinal_type,
typename value_type>
410 c[0] = std::log(a[0]+std::sqrt(a[0]*a[0]-value_type(1.0)));
413 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
414 "Stokhos::AlgebraicOrthogPolyExpansion::acosh()"
415 <<
": Method not implemented!");
418template <
typename ordinal_type,
typename value_type>
427 c[0] = std::log(a[0]+std::sqrt(a[0]*a[0]+value_type(1.0)));
430 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
431 "Stokhos::AlgebraicOrthogPolyExpansion::asinh()"
432 <<
": Method not implemented!");
435template <
typename ordinal_type,
typename value_type>
444 c[0] = 0.5*std::log((value_type(1.0)+a[0])/(value_type(1.0)-a[0]));
447 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
448 "Stokhos::AlgebraicOrthogPolyExpansion::atanh()"
449 <<
": Method not implemented!");
void atan(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void atan2(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)
void tanh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void cos(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
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)
void tan(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void atanh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void log(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void sin(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void cbrt(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void acosh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void log10(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void exp(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void sqrt(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void cosh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
AlgebraicOrthogPolyExpansion(const Teuchos::RCP< const OrthogPolyBasis< ordinal_type, value_type > > &basis, const Teuchos::RCP< const Stokhos::Sparse3Tensor< ordinal_type, value_type > > &Cijk, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor.
void asin(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void asinh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void acos(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
void sinh(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
Class to store coefficients of a projection onto an orthogonal polynomial basis.
void resize(ordinal_type sz)
Resize coefficient array (coefficients are preserved)
ordinal_type size() const
Return size.
Abstract base class for multivariate orthogonal polynomials.
Data structure storing a sparse 3-tensor C(i,j,k) in a a compressed format.