28 #include <queso/GpmsaComputerModelOptions.h>
29 #include <queso/ExperimentStorage.h>
30 #include <queso/ExperimentModel.h>
31 #include <queso/SimulationStorage.h>
32 #include <queso/SimulationModel.h>
33 #include <queso/GcmSimulationInfo.h>
34 #include <queso/GcmExperimentInfo.h>
35 #include <queso/GcmJointInfo.h>
36 #include <queso/GcmZInfo.h>
37 #include <queso/GcmTotalInfo.h>
38 #include <queso/GcmSimulationTildeInfo.h>
39 #include <queso/GcmJointTildeInfo.h>
40 #include <queso/GcmZTildeInfo.h>
41 #include <queso/VectorRV.h>
42 #include <queso/InstantiateIntersection.h>
43 #include <queso/Miscellaneous.h>
51 template <
class S_V = GslVector,
class S_M = GslMatrix,
class D_V = GslVector,
52 class D_M = GslMatrix,
class P_V = GslVector,
class P_M = GslMatrix,
53 class Q_V = GslVector,
class Q_M = GslMatrix>
67 const P_V& totalInitialValues,
68 const P_M* totalInitialProposalCovMatrix);
70 const P_V& totalInitialValues,
71 const P_M* totalInitialProposalCovMatrix);
80 const P_V& newParameterVec,
91 const P_V& newParameterVec,
92 const P_V* forcingSampleVecForDebug,
96 const D_M& newKmat_interp,
98 D_V& simulationOutputMeanVec,
99 D_V& discrepancyMeanVec);
101 const P_V& newParameterVec,
102 Q_V& simulationOutputMeanVec);
109 void print (std::ostream& os)
const;
121 const P_V* totalDirection,
122 const void* functionDataPtr,
130 const P_V* totalDirection,
131 const void* functionDataPtr,
140 const P_V& input_2lambdaWVec,
141 const P_V& input_3rhoWVec,
142 const P_V& input_4lambdaSVec,
143 const P_V& input_5lambdaYVec,
144 const P_V& input_6lambdaVVec,
145 const P_V& input_7rhoVVec,
146 const P_V& input_8thetaVec,
147 unsigned int outerCounter);
149 const P_V& input_2lambdaWVec,
150 const P_V& input_3rhoWVec,
151 const P_V& input_4lambdaSVec,
152 unsigned int outerCounter);
158 const P_V& input_2lambdaWVec,
159 const P_V& input_3rhoWVec,
160 const P_V& input_4lambdaSVec,
161 const P_V& input_5lambdaYVec,
162 const P_V& input_6lambdaVVec,
163 const P_V& input_7rhoVVec,
164 const P_V& input_8thetaVec,
165 unsigned int outerCounter);
174 const P_V& input_3rhoWVec,
175 const P_V& input_4lambdaSVec,
176 const P_V& input_6lambdaVVec,
177 const P_V& input_7rhoVVec,
178 const P_V& input_8thetaVec,
179 unsigned int outerCounter);
181 const P_V& input_3rhoWVec,
182 const P_V& input_4lambdaSVec,
183 unsigned int outerCounter);
187 const P_V& input_2lambdaWVec,
188 const P_V& input_3rhoWVec,
189 const P_V& input_4lambdaSVec,
190 const P_V& input_8thetaVec,
191 unsigned int outerCounter);
194 const P_V& rho_v_vec,
196 unsigned int outerCounter);
199 const P_V& rho_w_vec,
201 unsigned int outerCounter);
206 const std::vector<const P_V* >& tVecs,
207 const P_V& rho_w_vec,
209 unsigned int outerCounter);
212 const std::vector<const S_V* >& xVecs2,
213 const std::vector<const P_V* >& tVecs2,
214 const P_V& rho_w_vec,
216 unsigned int outerCounter);
219 const std::vector<const P_V* >& tVecs1,
222 const P_V& rho_v_vec,
224 unsigned int outerCounter);
226 const std::vector<const P_V* >& tVecs1,
229 const P_V& rho_w_vec,
231 unsigned int outerCounter);
233 const std::vector<const P_V* >& tVecs1,
236 const P_V& rho_w_vec,
238 unsigned int outerCounter);
240 const std::vector<const P_V* >& tVecs1,
243 const P_V& rho_w_vec,
245 unsigned int outerCounter);
GcmSimulationInfo< S_V, S_M, P_V, P_M, Q_V, Q_M > * m_s
bool m_thereIsExperimentalData
GpmsaComputerModel(const char *prefix, const GcmOptionsValues *alternativeOptionsValues, const SimulationStorage< S_V, S_M, P_V, P_M, Q_V, Q_M > &simulationStorage, const SimulationModel< S_V, S_M, P_V, P_M, Q_V, Q_M > &simulationModel, const ExperimentStorage< S_V, S_M, D_V, D_M > *experimentStorage, const ExperimentModel< S_V, S_M, D_V, D_M > *experimentModel, const BaseVectorRV< P_V, P_M > *thetaPriorRv)
const BaseVectorRV< P_V, P_M > & totalPriorRv() const
friend std::ostream & operator<<(std::ostream &os, const GpmsaComputerModel< S_V, S_M, D_V, D_M, P_V, P_M, Q_V, Q_M > &obj)
void fillR_formula2_for_Sigma_v(const std::vector< const S_V * > &xVecs, const P_V &rho_v_vec, D_M &Rmat, unsigned int outerCounter)
void memoryCheck(unsigned int codePositionId)
void fillR_formula1_for_Sigma_w_hat_u_asterisk(const std::vector< const S_V * > &xVecs1, const std::vector< const P_V * > &tVecs1, const S_V &xVec2, const P_V &tVec2, const P_V &rho_w_vec, D_M &Rmat, unsigned int outerCounter)
bool m_allOutputsAreScalar
void calibrateWithLanlMcmc(const MhOptionsValues *alternativeOptionsValues, const P_V &totalInitialValues, const P_M *totalInitialProposalCovMatrix)
void formSigma_z_hat(const P_V &input_1lambdaEtaVec, const P_V &input_2lambdaWVec, const P_V &input_3rhoWVec, const P_V &input_4lambdaSVec, const P_V &input_5lambdaYVec, const P_V &input_6lambdaVVec, const P_V &input_7rhoVVec, const P_V &input_8thetaVec, unsigned int outerCounter)
const GcmOptionsValues * m_optionsObj
FilePtrSetStruct m_dataOutputFilePtrSet
Struct for handling data input and output from files.
void fillR_formula1_for_Sigma_u_hat_u_asterisk(const std::vector< const S_V * > &xVecs1, const std::vector< const P_V * > &tVecs1, const S_V &xVec2, const P_V &tVec2, const P_V &rho_w_vec, D_M &Rmat, unsigned int outerCounter)
void predictSimulationOutputs(const S_V &newScenarioVec, const P_V &newParameterVec, Q_V &simulationOutputMeanVec)
const VectorSpace< P_V, P_M > & totalSpace() const
void formSigma_w_hat(const P_V &input_1lambdaEtaVec, const P_V &input_2lambdaWVec, const P_V &input_3rhoWVec, const P_V &input_4lambdaSVec, const P_V &input_8thetaVec, unsigned int outerCounter)
GcmJointInfo< S_V, S_M, D_V, D_M, P_V, P_M, Q_V, Q_M > * m_j
void fillR_formula1_for_Sigma_u(const std::vector< const S_V * > &xVecs, const P_V &tVec, const P_V &rho_w_vec, D_M &Rmat, unsigned int outerCounter)
unsigned int m_like_counter
GcmSimulationTildeInfo< S_V, S_M, P_V, P_M, Q_V, Q_M > * m_st
void calibrateWithBayesMLSampling()
void fillR_formula1_for_Sigma_w_hat_w_asterisk(const std::vector< const S_V * > &xVecs1, const std::vector< const P_V * > &tVecs1, const S_V &xVec2, const P_V &tVec2, const P_V &rho_w_vec, D_M &Rmat, unsigned int outerCounter)
GcmZTildeInfo< S_V, S_M, D_V, D_M, P_V, P_M, Q_V, Q_M > * m_zt
bool m_cMatIsRankDefficient
const BaseEnvironment & m_env
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
GcmExperimentInfo< S_V, S_M, D_V, D_M, P_V, P_M > * m_e
GcmTotalInfo< S_V, S_M, D_V, D_M, P_V, P_M, Q_V, Q_M > * m_t
This class provides options for the Metropolis-Hastings generator of samples if no input file is avai...
double likelihoodRoutine(const P_V &totalValues, const P_V *totalDirection, const void *functionDataPtr, P_V *gradVector, P_M *hessianMatrix, P_V *hessianEffect)
const VectorSpace< P_V, P_M > & unique_vu_space() const
void predictWsAtGridPoint(const S_V &newScenarioVec, const P_V &newParameterVec, const P_V *forcingSampleVecForDebug, P_V &wMeanVec, P_M &wCovMatrix)
void predictVUsAtGridPoint(const S_V &newScenarioVec, const P_V &newParameterVec, P_V &vuMeanVec, P_M &vuCovMatrix, P_V &vMeanVec, P_M &vCovMatrix, P_V &uMeanVec, P_M &uCovMatrix)
void calibrateWithBayesMetropolisHastings(const MhOptionsValues *alternativeOptionsValues, const P_V &totalInitialValues, const P_M *totalInitialProposalCovMatrix)
GcmZInfo< S_V, S_M, D_V, D_M, P_V, P_M, Q_V, Q_M > * m_z
GcmJointTildeInfo< S_V, S_M, D_V, D_M, P_V, P_M, Q_V, Q_M > * m_jt
void formSigma_z(const P_V &input_2lambdaWVec, const P_V &input_3rhoWVec, const P_V &input_4lambdaSVec, const P_V &input_6lambdaVVec, const P_V &input_7rhoVVec, const P_V &input_8thetaVec, unsigned int outerCounter)
void formSigma_z_tilde_hat(const P_V &input_1lambdaEtaVec, const P_V &input_2lambdaWVec, const P_V &input_3rhoWVec, const P_V &input_4lambdaSVec, const P_V &input_5lambdaYVec, const P_V &input_6lambdaVVec, const P_V &input_7rhoVVec, const P_V &input_8thetaVec, unsigned int outerCounter)
void fillR_formula2_for_Sigma_v_hat_v_asterisk(const std::vector< const S_V * > &xVecs1, const std::vector< const P_V * > &tVecs1, const S_V &xVec2, const P_V &tVec2, const P_V &rho_v_vec, D_M &Rmat, unsigned int outerCounter)
void fillR_formula1_for_Sigma_w(const std::vector< const S_V * > &xVecs, const std::vector< const P_V * > &tVecs, const P_V &rho_w_vec, D_M &Rmat, unsigned int outerCounter)
void fillR_formula1_for_Sigma_uw(const std::vector< const S_V * > &xVecs1, const P_V &tVec1, const std::vector< const S_V * > &xVecs2, const std::vector< const P_V * > &tVecs2, const P_V &rho_w_vec, D_M &Rmat, unsigned int outerCounter)
BaseScalarFunction< P_V, P_M > * m_likelihoodFunction
static double staticLikelihoodRoutine(const P_V &totalValues, const P_V *totalDirection, const void *functionDataPtr, P_V *gradVector, P_M *hessianMatrix, P_V *hessianEffect)
void predictExperimentResults(const S_V &newScenarioVec, const D_M &newKmat_interp, const D_M &newDmat, D_V &simulationOutputMeanVec, D_V &discrepancyMeanVec)
const GenericVectorRV< P_V, P_M > & totalPostRv() const
void print(std::ostream &os) const