// @HEADER // ***************************************************************************** // Stokhos Package // // Copyright 2009 NTESS and the Stokhos contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER template Stokhos::ConstantOrthogPolyExpansion:: ConstantOrthogPolyExpansion() { } template void Stokhos::ConstantOrthogPolyExpansion:: unaryMinus( Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = -a[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: plusEqual(Stokhos::OrthogPolyApprox& c, const value_type& val) { if (c.size() < 1) c.resize(1); c[0] += val; } template void Stokhos::ConstantOrthogPolyExpansion:: minusEqual(Stokhos::OrthogPolyApprox& c, const value_type& val) { if (c.size() < 1) c.resize(1); c[0] -= val; } template void Stokhos::ConstantOrthogPolyExpansion:: timesEqual(Stokhos::OrthogPolyApprox& c, const value_type& val) { if (c.size() < 1) c.resize(1); c[0] *= val; } template void Stokhos::ConstantOrthogPolyExpansion:: divideEqual(Stokhos::OrthogPolyApprox& c, const value_type& val) { if (c.size() < 1) c.resize(1); c[0] /= val; } template void Stokhos::ConstantOrthogPolyExpansion:: plusEqual( Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& x) { if (c.size() < 1) c.resize(1); c[0] += x[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: minusEqual( Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& x) { if (c.size() < 1) c.resize(1); c[0] -= x[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: timesEqual( Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& x) { if (c.size() < 1) c.resize(1); c[0] *= x[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: divideEqual(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& x) { if (c.size() < 1) c.resize(1); c[0] /= x[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: plus(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = a[0] + b[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: plus(Stokhos::OrthogPolyApprox& c, const value_type& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = a + b[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: plus(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const value_type& b) { if (c.size() < 1) c.resize(1); c[0] = a[0] + b; } template void Stokhos::ConstantOrthogPolyExpansion:: minus(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = a[0] - b[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: minus(Stokhos::OrthogPolyApprox& c, const value_type& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = a - b[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: minus(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const value_type& b) { if (c.size() < 1) c.resize(1); c[0] = a[0] - b; } template void Stokhos::ConstantOrthogPolyExpansion:: times(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = a[0] * b[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: times(Stokhos::OrthogPolyApprox& c, const value_type& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = a * b[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: times(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const value_type& b) { if (c.size() < 1) c.resize(1); c[0] = a[0] * b; } template void Stokhos::ConstantOrthogPolyExpansion:: divide(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = a[0] / b[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: divide(Stokhos::OrthogPolyApprox& c, const value_type& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = a / b[0]; } template void Stokhos::ConstantOrthogPolyExpansion:: divide(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const value_type& b) { if (c.size() < 1) c.resize(1); c[0] = a[0] / b; } template void Stokhos::ConstantOrthogPolyExpansion:: exp(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::exp(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: log(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::log(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: log10(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::log10(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: sqrt(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::sqrt(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: cbrt(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::cbrt(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: pow(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = std::pow(a[0], b[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: pow(Stokhos::OrthogPolyApprox& c, const value_type& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = std::pow(a, b[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: pow(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const value_type& b) { if (c.size() < 1) c.resize(1); c[0] = std::pow(a[0], b); } template void Stokhos::ConstantOrthogPolyExpansion:: sin(Stokhos::OrthogPolyApprox& s, const Stokhos::OrthogPolyApprox& a) { if (s.size() < 1) s.resize(1); s[0] = std::sin(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: cos(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::cos(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: tan(Stokhos::OrthogPolyApprox& t, const Stokhos::OrthogPolyApprox& a) { if (t.size() < 1) t.resize(1); t[0] = std::tan(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: sinh(Stokhos::OrthogPolyApprox& s, const Stokhos::OrthogPolyApprox& a) { if (s.size() < 1) s.resize(1); s[0] = std::sinh(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: cosh(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::cosh(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: tanh(Stokhos::OrthogPolyApprox& t, const Stokhos::OrthogPolyApprox& a) { if (t.size() < 1) t.resize(1); t[0] = std::tanh(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: acos(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::acos(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: asin(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::asin(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: atan(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::atan(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: atan2(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = std::atan2(a[0], b[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: atan2(Stokhos::OrthogPolyApprox& c, const value_type& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = std::atan2(a, b[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: atan2(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const value_type& b) { c[0] = std::atan2(a[0], b); } template void Stokhos::ConstantOrthogPolyExpansion:: acosh(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::log(a[0]+std::sqrt(a[0]*a[0]-value_type(1.0))); } template void Stokhos::ConstantOrthogPolyExpansion:: asinh(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::log(a[0]+std::sqrt(a[0]*a[0]+value_type(1.0))); } template void Stokhos::ConstantOrthogPolyExpansion:: atanh(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = 0.5*std::log((value_type(1.0)+a[0])/(value_type(1.0)-a[0])); } template void Stokhos::ConstantOrthogPolyExpansion:: fabs(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::fabs(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: abs(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a) { if (c.size() < 1) c.resize(1); c[0] = std::fabs(a[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: max(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = std::max(a[0], b[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: max(Stokhos::OrthogPolyApprox& c, const value_type& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = std::max(a, b[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: max(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const value_type& b) { if (c.size() < 1) c.resize(1); c[0] = std::max(a[0], b); } template void Stokhos::ConstantOrthogPolyExpansion:: min(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = std::min(a[0], b[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: min(Stokhos::OrthogPolyApprox& c, const value_type& a, const Stokhos::OrthogPolyApprox& b) { if (c.size() < 1) c.resize(1); c[0] = std::min(a, b[0]); } template void Stokhos::ConstantOrthogPolyExpansion:: min(Stokhos::OrthogPolyApprox& c, const Stokhos::OrthogPolyApprox& a, const value_type& b) { if (c.size() < 1) c.resize(1); c[0] = std::min(a[0], b); }