60   double operator() (
const double& a, 
const double& b)
 const {
 
   74     const unsigned int d = 2;
 
   75     const unsigned int p = 5;
 
   79     for (
unsigned int i=0; i<d; i++)
 
   86       w(basis), w2(basis), w3(basis);
 
   87     for (
unsigned int i=0; i<d; i++) {
 
   97       basis->computeTripleProductTensor();
 
  105     quad_exp.
times(w,v,u);
 
  119     u_st.term(0, 0) = u.mean();
 
  120     u_st.term(0, 1) = 1.0;
 
  121     v_st.term(0, 0) = v.mean();
 
  122     v_st.term(1, 1) = 1.0;
 
  128     st_bases[0]->getQuadPoints(p+1, st_points_0, st_weights_0, st_values_0);
 
  132     st_bases[1]->getQuadPoints(p+1, st_points_1, st_weights_1, st_values_1);
 
  134     for (
int i=0; i<st_points_0.
size(); i++) {
 
  136       st_points[i][0] = st_points_0[i];
 
  137       st_points[i][1] = st_points_1[i];
 
  160       gs_basis->computeTripleProductTensor();
 
  171     gs_basis->transformCoeffs(u_st.coeff(), u_gs.coeff());
 
  172     gs_basis->transformCoeffs(v_st.coeff(), v_gs.coeff());
 
  175     gs_quad_exp.
times(w_gs, u_gs, v_gs);
 
  183       st_basis->computeTripleProductTensor();
 
  195     st_quad_exp.
times(w_st, u_st, v_st);
 
  201     std::cout.precision(12);
 
  202     std::cout << 
"w = " << std::endl << w;
 
  203     std::cout << 
"w2 = " << std::endl << w2;
 
  204     std::cout << 
"w3 = " << std::endl << w3;
 
  205     std::cout << 
"w_gs = " << std::endl << w_gs;
 
  206     std::cout << 
"w_st = " << std::endl << w_st;
 
  208     std::cout.setf(std::ios::scientific);
 
  209     std::cout << 
"w.mean()       = " << w.
mean() << std::endl
 
  210         << 
"w2.mean()      = " << w2.mean() << std::endl
 
  211         << 
"w3.mean()      = " << w3.mean() << std::endl
 
  212         << 
"w_gs.mean()    = " << w_gs.mean() << std::endl
 
  213         << 
"w_st.mean()    = " << w_st.mean() << std::endl
 
  214         << 
"w.std_dev()    = " << w.standard_deviation() << std::endl
 
  215         << 
"w2.std_dev()   = " << w2.standard_deviation() << std::endl
 
  216         << 
"w3.std_dev()   = " << w3.standard_deviation() << std::endl
 
  217         << 
"w_gs.std_dev() = " << w_gs.standard_deviation() << std::endl
 
  218         << 
"w_st.std_dev() = " << w_st.standard_deviation() << std::endl;
 
  220   catch (std::exception& e) {
 
  221     std::cout << e.what() << std::endl;
 
void binary_op(const FuncT &func, 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)
Nonlinear binary function. 
void sin(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
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)
value_type evaluate(const Teuchos::Array< value_type > &point) const 
Evaluate polynomial approximation at a point. 
void exp(OrthogPolyApprox< ordinal_type, value_type, node_type > &c, const OrthogPolyApprox< ordinal_type, value_type, node_type > &a)
pce_quad_func(const Stokhos::OrthogPolyApprox< int, double > &pce_, const Stokhos::OrthogPolyBasis< int, double > &basis_)
Teuchos::Array< double > vec
Stokhos::LegendreBasis< int, double > basis_type
Generates three-term recurrence using the Discretized Stieltjes procedure applied to a polynomial cha...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
const Stokhos::OrthogPolyBasis< int, double > & basis
Transforms a non-orthogonal multivariate basis to an orthogonal one using the Gram-Schmit procedure...
double operator()(const double &a, const double &b) const 
const Stokhos::OrthogPolyApprox< int, double > & pce
void resize(size_type new_size, const value_type &x=value_type())
value_type mean() const 
Compute mean of expansion. 
Legendre polynomial basis. 
int main(int argc, char **argv)
Defines quadrature for a tensor product basis by tensor products of 1-D quadrature rules...