queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
ValidationCycle.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_VALIDATION_CYCLE_H
26 #define UQ_VALIDATION_CYCLE_H
27 
28 #include <queso/VectorFunction.h>
29 #include <queso/GenericVectorFunction.h>
30 #include <queso/StatisticalInverseProblem.h>
31 #include <queso/StatisticalForwardProblem.h>
32 
33 namespace QUESO {
34 
35 class GslVector;
36 class GslMatrix;
37 
53 template <class P_V = GslVector, class P_M = GslMatrix, class Q_V = GslVector, class Q_M = GslMatrix>
55 {
56 public:
58 
61  const char* prefix,
62  const VectorSpace<P_V,P_M>& paramSpace,
63  const VectorSpace<P_V,P_M>& qoiSpace);
64 
68 
70 
71  const BaseEnvironment& env() const;
74 
76 
77  void instantiateCalIP(SipOptionsValues* optionsValues,
79  const BaseVectorRV <P_V,P_M>& priorRv,
80  const BaseScalarFunction<P_V,P_M>& likelihoodFunctionObj);
81  //double (*likelihoodRoutinePtr)(const P_V& paramValues, const void* routineDataPtr),
82  //const void* likelihoodRoutineDataPtr,
83  //bool routineComputesMinus2LogOfDensity);
84 
86  void instantiateCalFP(SfpOptionsValues* optionsValues,
87  void (*qoiRoutinePtr)(const P_V& domainVector,
88  const P_V* domainDirection,
89  const void* functionDataPtr,
90  Q_V& imageVector,
91  DistArray<P_V*>* gradVectors,
92  DistArray<P_M*>* hessianMatrices,
93  DistArray<P_V*>* hessianEffects),
94  const void* qoiRoutineDataPtr);
95 
97 
99 
101 
103 
105 
107 
109 
111 
113  void instantiateValIP(SipOptionsValues* optionsValues,
114  const BaseScalarFunction<P_V,P_M>& likelihoodFunctionObj);
115  //double (*likelihoodRoutinePtr)(const P_V& paramValues, const void* routineDataPtr),
116  //const void* likelihoodRoutineDataPtr,
117  //bool routineComputesMinus2LogOfDensity);
118 
120  void instantiateValFP(SfpOptionsValues* optionsValues,
121  void (*qoiRoutinePtr)(const P_V& domainVector,
122  const P_V* domainDirection,
123  const void* functionDataPtr,
124  Q_V& imageVector,
125  DistArray<P_V*>* gradVectors,
126  DistArray<P_M*>* hessianMatrices,
127  DistArray<P_V*>* hessianEffects),
128  const void* qoiRoutineDataPtr);
129 
131 
133 
135 
137 
139 
141 
143 
146 private:
148  std::string m_prefix;
151 
152  const BaseVectorRV <P_V,P_M>* m_calPriorRv; // instantiated outside this class!!
153  const BaseScalarFunction <P_V,P_M>* m_calLikelihoodFunctionObj; // instantiated outside this class!!
156 
160 
161  const BaseScalarFunction <P_V,P_M>* m_valLikelihoodFunctionObj; // instantiated outside this class!!
164 
168 };
169 
170 } // End namespace QUESO
171 
172 #endif // UQ_VALIDATION_CYCLE_H
~ValidationCycle()
Destructor.
void instantiateCalFP(SfpOptionsValues *optionsValues, void(*qoiRoutinePtr)(const P_V &domainVector, const P_V *domainDirection, const void *functionDataPtr, Q_V &imageVector, DistArray< P_V * > *gradVectors, DistArray< P_M * > *hessianMatrices, DistArray< P_V * > *hessianEffects), const void *qoiRoutineDataPtr)
Instantiate a forward problem for the calibration stage.
void instantiateValFP(SfpOptionsValues *optionsValues, void(*qoiRoutinePtr)(const P_V &domainVector, const P_V *domainDirection, const void *functionDataPtr, Q_V &imageVector, DistArray< P_V * > *gradVectors, DistArray< P_M * > *hessianMatrices, DistArray< P_V * > *hessianEffects), const void *qoiRoutineDataPtr)
Instantiate a forward problem for the validation stage.
This class provides options for a Statistical Forward Problem if no input file is available...
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:198
StatisticalInverseProblem< P_V, P_M > * m_valIP
ValidationCycle(const BaseEnvironment &env, const char *prefix, const VectorSpace< P_V, P_M > &paramSpace, const VectorSpace< P_V, P_M > &qoiSpace)
Constructor.
const StatisticalInverseProblem< P_V, P_M > & calIP() const
Inverse problem of the calibration stage (const) .
GenericVectorRV< Q_V, Q_M > * m_valQoiRv
const BaseEnvironment & env() const
Access to the environment variable (m_env).
This class provides options for a Statistical Inverse Problem if no input file is available...
const BaseScalarFunction< P_V, P_M > * m_calLikelihoodFunctionObj
This templated class represents a Statistical Forward Problem.
A class for handling generic vector functions.
const VectorSpace< P_V, P_M > & m_paramSpace
StatisticalForwardProblem< P_V, P_M, Q_V, Q_M > * m_calFP
void instantiateCalIP(SipOptionsValues *optionsValues, const BaseVectorRV< P_V, P_M > &priorRv, const BaseScalarFunction< P_V, P_M > &likelihoodFunctionObj)
Instantiate an inverse problem for the calibration stage.
GenericVectorFunction< P_V, P_M, Q_V, Q_M > * m_calQoiFunctionObj
const BaseScalarFunction< P_V, P_M > * m_valLikelihoodFunctionObj
const VectorSpace< Q_V, Q_M > & m_qoiSpace
const BaseEnvironment & m_env
const StatisticalForwardProblem< P_V, P_M, Q_V, Q_M > & valFP() const
Forward problem of the validation stage (const) .
This templated class represents a Statistical Inverse Problem.
A class for partitioning vectors and matrices.
Definition: DistArray.h:56
StatisticalForwardProblem< P_V, P_M, Q_V, Q_M > * m_valFP
StatisticalInverseProblem< P_V, P_M > * m_calIP
void instantiateValIP(SipOptionsValues *optionsValues, const BaseScalarFunction< P_V, P_M > &likelihoodFunctionObj)
Instantiate an inverse problem for the validation stage.
const StatisticalInverseProblem< P_V, P_M > & valIP() const
Inverse problem of the validation stage (const) .
const BaseVectorRV< P_V, P_M > * m_calPriorRv
GenericVectorRV< Q_V, Q_M > * m_calQoiRv
GenericVectorRV< P_V, P_M > * m_calPostRv
const StatisticalForwardProblem< P_V, P_M, Q_V, Q_M > & calFP() const
Forward problem of the calibration stage (const) .
GenericVectorRV< P_V, P_M > * m_valPostRv
GenericVectorFunction< P_V, P_M, Q_V, Q_M > * m_valQoiFunctionObj
A templated class for validation cycle of the examples validationCycle and validationCycle2.

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