queso-0.53.0
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-2015 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/Environment.h>
29 #include <queso/Defines.h>
30 #include <vector>
31 #include <math.h>
32 #include <fstream>
33 
34 namespace QUESO {
35 
39 //*****************************************************
40 // Base 1D quadrature class
41 //*****************************************************
47 class
49 public:
51 
52  Base1DQuadrature(double minDomainValue,
54  double maxDomainValue,
55  unsigned int order);
57  virtual ~Base1DQuadrature();
59 
61 
62  double minDomainValue() const;
64 
66  double maxDomainValue() const;
67 
69  unsigned int order () const;
70 
72  const std::vector<double>& positions () const;
73 
75  const std::vector<double>& weights () const;
76 
78  virtual void dumbRoutine () const = 0;
80 
81 protected:
84  unsigned int m_order;
85  std::vector<double> m_positions;
86  std::vector<double> m_weights;
87 };
88 
89 //*****************************************************
90 // Generic 1D quadrature class
91 //*****************************************************
98 public:
100 
103  double maxDomainValue,
104  const std::vector<double>& positions,
105  const std::vector<double>& weights);
106 
110 
112 
113  void dumbRoutine() const;
116 protected:
122 };
123 
124 //*****************************************************
125 // Uniform/Legendre 1D quadrature class
126 //*****************************************************
163 public:
165 
166 
174  double maxDomainValue,
175  unsigned int order,
176  bool densityIsNormalized);
180 
182 
183  void dumbRoutine() const;
186 protected:
192 };
193 
194 //*****************************************************
195 // Gaussian/Hermite 1D quadrature class
196 //*****************************************************
220 public:
222 
223 
227  GaussianHermite1DQuadrature(double mean,
228  double stddev,
229  unsigned int order);
233 
235 
236  void dumbRoutine() const;
239 protected:
245 
246  double m_mean;
247  double m_stddev;
248 };
249 
250 //*****************************************************
251 // Wigner/Chebyshev1st 1D quadrature class
252 //*****************************************************
268 public:
270 
271 
277  double maxDomainValue,
278  unsigned int order);
282 
284 
285  void dumbRoutine() const;
288 protected:
294 };
295 
296 //*****************************************************
297 // Wigner/Chebyshev2nd 1D quadrature class
298 //*****************************************************
314 public:
316 
317 
324  double maxDomainValue,
325  unsigned int order);
329 
331 
332  void dumbRoutine() const;
335 protected:
341 };
342 
343 } // End namespace QUESO
344 
345 #endif // UQ_1D_1D_QUADRATURE_H
double minDomainValue() const
Returns the minimum value of the domain of the (one-dimensional) function.
Definition: 1DQuadrature.C:55
void dumbRoutine() const
Bogus routine.
Definition: 1DQuadrature.C:110
const std::vector< double > & positions() const
Array of the positions for the numerical integration.
Definition: 1DQuadrature.C:73
Class for second type Chebyshev-Gauss quadrature rule for one-dimensional functions.
Definition: 1DQuadrature.h:313
std::vector< double > m_positions
Definition: 1DQuadrature.h:85
unsigned int order() const
Returns the order of the quadrature rule.
Definition: 1DQuadrature.C:67
void dumbRoutine() const
A bogus method.
Definition: 1DQuadrature.C:649
void dumbRoutine() const
A bogus method.
Definition: 1DQuadrature.C:686
WignerChebyshev2nd1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
Default constructor.
Definition: 1DQuadrature.C:694
GaussianHermite1DQuadrature(double mean, double stddev, unsigned int order)
Default constructor.
Definition: 1DQuadrature.C:428
WignerInverseChebyshev1st1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
TODO: Default constructor.
Definition: 1DQuadrature.C:657
void dumbRoutine() const
Bogus routine.
Definition: 1DQuadrature.C:726
~Generic1DQuadrature()
Destructor.
Definition: 1DQuadrature.C:105
UniformLegendre1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order, bool densityIsNormalized)
Default constructor.
Definition: 1DQuadrature.C:118
Class for one-dimensional generic quadrature rules (numerical integration of functions).
Definition: 1DQuadrature.h:97
double maxDomainValue() const
Returns the maximum value of the domain of the (one-dimensional) function.
Definition: 1DQuadrature.C:61
Base class for one-dimensional quadrature rules (numerical integration of functions).
Definition: 1DQuadrature.h:47
Class for first type Chebyshev-Gauss quadrature rule for one-dimensional functions.
Definition: 1DQuadrature.h:267
Class for Hermite-Gauss quadrature rule for one-dimensional functions.
Definition: 1DQuadrature.h:219
const std::vector< double > & weights() const
Array of the weights used in the numerical integration.
Definition: 1DQuadrature.C:80
void dumbRoutine() const
A bogus method.
Definition: 1DQuadrature.C:420
Generic1DQuadrature(double minDomainValue, double maxDomainValue, const std::vector< double > &positions, const std::vector< double > &weights)
Default constructor.
Definition: 1DQuadrature.C:89
std::vector< double > m_weights
Definition: 1DQuadrature.h:86
Class for Legendre-Gauss quadrature rule for one-dimensional functions.
Definition: 1DQuadrature.h:162

Generated on Thu Jun 11 2015 13:52:32 for queso-0.53.0 by  doxygen 1.8.5