queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
1DQuadrature.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2017 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef UQ_1D_1D_QUADRATURE_H
26 #define UQ_1D_1D_QUADRATURE_H
27 
28 #include <queso/BaseQuadrature.h>
29 #include <queso/Environment.h>
30 #include <queso/Defines.h>
31 #include <vector>
32 #include <math.h>
33 #include <fstream>
34 
35 namespace QUESO {
36 
40 //*****************************************************
41 // Base 1D quadrature class
42 //*****************************************************
49 {
50 public:
52 
55  double maxDomainValue,
56  unsigned int order);
57 
59  virtual ~Base1DQuadrature() =0;
61 
63 
64  double minDomainValue() const;
66 
68  double maxDomainValue() const;
69 
71  unsigned int order () const;
72 
74  const std::vector<double> & positions() const
75  { queso_assert(!m_positions.empty());
76  return m_positions; }
78 
79 protected:
82  unsigned int m_order;
83  std::vector<double> m_positions;
84 };
85 
86 //*****************************************************
87 // Generic 1D quadrature class
88 //*****************************************************
95 public:
97 
100  double maxDomainValue,
101  const std::vector<double>& positions,
102  const std::vector<double>& weights);
103 
107 
108 };
109 
110 //*****************************************************
111 // Uniform/Legendre 1D quadrature class
112 //*****************************************************
149 public:
151 
152 
160  double maxDomainValue,
161  unsigned int order,
162  bool densityIsNormalized);
166 
167 };
168 
169 //*****************************************************
170 // Gaussian/Hermite 1D quadrature class
171 //*****************************************************
195 public:
197 
198 
202  GaussianHermite1DQuadrature(double mean,
203  double stddev,
204  unsigned int order);
208 
209 protected:
210 
211  double m_mean;
212  double m_stddev;
213 };
214 
215 //*****************************************************
216 // Wigner/Chebyshev1st 1D quadrature class
217 //*****************************************************
233 public:
235 
236 
242  double maxDomainValue,
243  unsigned int order);
247 
248 };
249 
250 //*****************************************************
251 // Wigner/Chebyshev2nd 1D quadrature class
252 //*****************************************************
268 public:
270 
271 
278  double maxDomainValue,
279  unsigned int order);
283 
284 };
285 
286 } // End namespace QUESO
287 
288 #endif // UQ_1D_1D_QUADRATURE_H
UniformLegendre1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order, bool densityIsNormalized)
Default constructor.
Definition: 1DQuadrature.C:98
double maxDomainValue() const
Returns the maximum value of the domain of the (one-dimensional) function.
Definition: 1DQuadrature.C:61
Class for second type Chebyshev-Gauss quadrature rule for one-dimensional functions.
Definition: 1DQuadrature.h:267
double minDomainValue() const
Returns the minimum value of the domain of the (one-dimensional) function.
Definition: 1DQuadrature.C:55
Class for one-dimensional generic quadrature rules (numerical integration of functions).
Definition: 1DQuadrature.h:94
WignerChebyshev2nd1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
Default constructor.
Definition: 1DQuadrature.C:653
GaussianHermite1DQuadrature(double mean, double stddev, unsigned int order)
Default constructor.
Definition: 1DQuadrature.C:402
const std::vector< double > & positions() const
Array of the positions for the numerical integration.
Definition: 1DQuadrature.h:74
WignerInverseChebyshev1st1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
TODO: Default constructor.
Definition: 1DQuadrature.C:622
Class for Hermite-Gauss quadrature rule for one-dimensional functions.
Definition: 1DQuadrature.h:194
Base class for one-dimensional quadrature rules (numerical integration of functions).
Definition: 1DQuadrature.h:48
Base1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
Default constructor.
Definition: 1DQuadrature.C:34
Generic1DQuadrature(double minDomainValue, double maxDomainValue, const std::vector< double > &positions, const std::vector< double > &weights)
Default constructor.
Definition: 1DQuadrature.C:75
Class for Legendre-Gauss quadrature rule for one-dimensional functions.
Definition: 1DQuadrature.h:148
const std::vector< double > & weights() const
Array of the weights used in the numerical integration.
std::vector< double > m_positions
Definition: 1DQuadrature.h:83
Class for first type Chebyshev-Gauss quadrature rule for one-dimensional functions.
Definition: 1DQuadrature.h:232
~Generic1DQuadrature()
Destructor.
Definition: 1DQuadrature.C:91
unsigned int order() const
Returns the order of the quadrature rule.
Definition: 1DQuadrature.C:67
virtual ~Base1DQuadrature()=0
Pure virtual destructor, forcing this to be an abstract object.
Definition: 1DQuadrature.C:50
Base class for quadrature rules.

Generated on Tue Jun 5 2018 19:48:55 for queso-0.57.1 by  doxygen 1.8.5