queso-0.51.1
StatisticalForwardProblem.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,2009,2010,2011,2012,2013 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_SFP_H
26 #define UQ_SFP_H
27 
28 #include <queso/StatisticalForwardProblemOptions.h>
29 #include <queso/VectorFunction.h>
30 #include <queso/MonteCarloSG.h>
31 #include <queso/VectorRV.h>
32 #include <queso/GenericVectorRV.h>
33 #include <queso/SequenceOfVectors.h>
34 
35 namespace QUESO {
36 
76 template <class P_V,class P_M,class Q_V,class Q_M>
78 {
79 public:
81 
82 
90  StatisticalForwardProblem(const char* prefix,
91  const SfpOptionsValues* alternativeOptionsValues, // dakota
92  const BaseVectorRV <P_V,P_M>& paramRv,
93  const BaseVectorFunction<P_V,P_M,Q_V,Q_M>& qoiFunction,
95 
99 
101 
102  bool computeSolutionFlag() const;
104 
106 
118 //<item> computes the CDFs of the components of 'm_qoiRv' as instances of 'SampledVectorCdf<Q_V,Q_M>'
119  void solveWithMonteCarlo(const McOptionsValues* alternativeOptionsValues); // dakota
120 
122  const GenericVectorRV<Q_V,Q_M>& qoiRv () const;
123 
126 
127 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
128 
129  //<item> CDFs of QoI components through the operation 'qoiRv().unifiedCdf()',
130  // which returns an instance of the class 'BaseVectorCdf<Q_V,Q_M>'
131  const BaseVectorCdf <Q_V,Q_M>& qoiRv_unifiedCdf () const;
132 
133 #endif
134 
135 
137 
138 
140  void print(std::ostream& os) const;
141  friend std::ostream& operator<<(std::ostream& os,
143  obj.print(os);
144  return os;
145  }
147 
148 private:
150 
151  void commonConstructor();
152 
154 
157  GenericVectorRV <Q_V,Q_M>& m_qoiRv; // FIX ME: Maybe not always generic ?
158 
162 
164 
166 
169 
170 #ifdef UQ_ALSO_COMPUTE_MDFS_WITHOUT_KDE
171  ArrayOfOneDGrids <Q_V,Q_M>* m_subMdfGrids;
172  ArrayOfOneDTables <Q_V,Q_M>* m_subMdfValues;
173 #endif
174 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
175  BaseVectorMdf <Q_V,Q_M>* m_subSolutionMdf;
176  ArrayOfOneDGrids <Q_V,Q_M>* m_subCdfGrids;
177  ArrayOfOneDTables <Q_V,Q_M>* m_subCdfValues;
178  BaseVectorCdf <Q_V,Q_M>* m_subSolutionCdf;
179 
180  ArrayOfOneDGrids <Q_V,Q_M>* m_unifiedCdfGrids;
181  ArrayOfOneDTables <Q_V,Q_M>* m_unifiedCdfValues;
182  BaseVectorCdf <Q_V,Q_M>* m_unifiedSolutionCdf;
183 #endif
184 };
185 
186 } // End namespace QUESO
187 
188 #endif // UQ_SFP_H
A templated class that implements a Monte Carlo generator of samples.
Definition: MonteCarloSG.h:49
const GenericVectorRV< Q_V, Q_M > & qoiRv() const
Returns the QoI RV; access to private attribute m_qoiRv.
Class to accommodate arrays of one-dimensional grid.
StatisticalForwardProblemOptions * m_optionsObj
StatisticalForwardProblem(const char *prefix, const SfpOptionsValues *alternativeOptionsValues, const BaseVectorRV< P_V, P_M > &paramRv, const BaseVectorFunction< P_V, P_M, Q_V, Q_M > &qoiFunction, GenericVectorRV< Q_V, Q_M > &qoiRv)
Constructor.
This class provides options for a Statistical Forward Problem if no input file is available...
void print(std::ostream &os) const
TODO: Prints the sequence.
const BaseVectorFunction< P_V, P_M, Q_V, Q_M > & m_qoiFunction
void commonConstructor()
TODO: Common constructor.
This class reads option values for a Statistical Forward Problem from an input file.
friend std::ostream & operator<<(std::ostream &os, const StatisticalForwardProblem< P_V, P_M, Q_V, Q_M > &obj)
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:187
BaseVectorSequence< Q_V, Q_M > * m_paramChain
GenericVectorRV< Q_V, Q_M > & m_qoiRv
bool computeSolutionFlag() const
Whether or not compute the solution.
BaseJointPdf< Q_V, Q_M > * m_solutionPdf
MonteCarloSG< P_V, P_M, Q_V, Q_M > * m_mcSeqGenerator
This templated class represents a Statistical Forward Problem.
BaseVectorRealizer< Q_V, Q_M > * m_solutionRealizer
void solveWithMonteCarlo(const McOptionsValues *alternativeOptionsValues)
Solves the problem through Monte Carlo algorithm.
This class provides options for the Monte Carlo sequence generator if no input file is available...
Class to accommodate arrays of one-dimensional tables.
const BaseVectorRV< P_V, P_M > & m_paramRv
const BaseVectorSequence< Q_V, Q_M > & getParamChain() const
Returns the parameter chain; access to private attribute m_paramChain.
A templated (base) class for handling vector functions.
BaseVectorSequence< Q_V, Q_M > * m_qoiChain

Generated on Thu Apr 23 2015 19:26:15 for queso-0.51.1 by  doxygen 1.8.5