Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_AnisoSparseGridQuadrature.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef STOKHOS_ANISOSPARSEGRIDQUADRATURE
11 #define STOKHOS_ANISOSPARSEGRIDQUADRATURE
12 
13 #include "Stokhos_ConfigDefs.h"
14 #ifdef HAVE_STOKHOS_DAKOTA
15 
16 #include "Stokhos_Quadrature.hpp"
17 #include "Stokhos_ProductBasis.hpp"
18 #include "Teuchos_RCP.hpp"
19 #include "pecos_global_defs.hpp"
20 
21 namespace Stokhos {
22 
32  template <typename ordinal_type, typename value_type>
33  class AnisoSparseGridQuadrature : public Quadrature<ordinal_type,value_type> {
34  public:
35 
37 
43  AnisoSparseGridQuadrature(
44  const Teuchos::RCP<const ProductBasis<ordinal_type,value_type> >& product_basis,
45  ordinal_type sparse_grid_level,
46  value_type dim_weights[],
47  value_type duplicate_tol = 1.0e-12,
48  ordinal_type growth_rate = Pecos::MODERATE_RESTRICTED_GROWTH);
49 
51  virtual ~AnisoSparseGridQuadrature() {}
52 
54 
59  getQuadPoints() const;
60 
62 
65  virtual const Teuchos::Array<value_type>&
66  getQuadWeights() const;
67 
69 
74  getBasisAtQuadPoints() const;
75 
76  private:
77 
78  // Prohibit copying
79  AnisoSparseGridQuadrature(const AnisoSparseGridQuadrature&);
80 
81  // Prohibit Assignment
82  AnisoSparseGridQuadrature& operator=(const AnisoSparseGridQuadrature& b);
83 
84  static void getMyPoints( int order, int dim, double x[] );
85 
86  static void getMyWeights( int order, int dim, double w[] );
87 
88  protected:
89 
92 
95 
97  Teuchos::Array<value_type> quad_weights;
98 
101 
103  static AnisoSparseGridQuadrature *sgq;
104 
105  }; // class AnisoSparseGridQuadrature
106 
107 } // namespace Stokhos
109 
110 #endif // HAVE_STOKHOS_DAKOTA
111 
112 #endif // STOKHOS_ANISOSPARSEGRIDQUADRATURE