UQTk: Uncertainty Quantification Toolkit  3.1.1
inference.h
Go to the documentation of this file.
1 /* =====================================================================================
2 
3  The UQ Toolkit (UQTk) version 3.1.1
4  Copyright (2021) NTESS
5  https://www.sandia.gov/UQToolkit/
6  https://github.com/sandialabs/UQTk
7 
8  Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
9  Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government
10  retains certain rights in this software.
11 
12  This file is part of The UQ Toolkit (UQTk)
13 
14  UQTk is open source software: you can redistribute it and/or modify
15  it under the terms of BSD 3-Clause License
16 
17  UQTk is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  BSD 3 Clause License for more details.
21 
22  You should have received a copy of the BSD 3 Clause License
23  along with UQTk. If not, see https://choosealicense.com/licenses/bsd-3-clause/.
24 
25  Questions? Contact the UQTk Developers at <uqtk-developers@software.sandia.gov>
26  Sandia National Laboratories, Livermore, CA, USA
27 ===================================================================================== */
31 
32 #include <string>
33 
34 #include "Array1D.h"
35 #include "Array2D.h"
36 
37 
87 void infer_model(Array1D< Array2D<double> (*)(Array2D<double>&, Array2D<double>&, Array2D<double>&, void *) > forwardFuncs, void* funcInfo,
88  string likType,
89  string priorType, double priora, double priorb,
90  Array2D<double>& xdata,Array2D<double>& ydata, Array2D<double>& xgrid,
91  int dataNoiseInference, Array1D<double>& datanoise_array,
92  int pdim,int order,Array1D<int>& rndInd,Array2D<double>& fixIndNom,string pdfType,string pcType,
93  int seed, int nmcmc, double mcmcgamma, bool optimflag, Array1D<double>& chstart, Array1D<double>& chsig,
94  double likParam, int likParam_int,
95  Array2D<double>& pgrid,Array2D<double>& pchain, int nburn, int nstep,
96  Array1D<double>& mapparam, Array1D<double>& datavar_map,
97  Array1D<double>& pmean_map, Array1D<double>& pvar_map,
98  Array1D<double>& fmean_map, Array1D<double>& fvar_map,
99  Array1D<double>& postave_datavar,
100  Array1D<double>& p_postave_mean, Array1D<double>& p_postave_var, Array1D<double>& p_postvar_mean,
101  Array2D<double>& f_postsam_mean, Array1D<double>& f_postave_mean, Array1D<double>& f_postave_var, Array1D<double>& f_postvar_mean,
102  Array2D<double>& paramPCcfs);
103 
105 double LogPosterior(Array1D<double>& m, void* mypost_void);
106 
107 
1D Array class for any type T
2D Array class for any type T
Definition: Array1D.h:472
Definition: Array1D.h:262
Stores data of any type T in a 1D array.
Definition: Array1D.h:61
void infer_model(Array1D< Array2D< double >(*)(Array2D< double > &, Array2D< double > &, Array2D< double > &, void *) > forwardFuncs, void *funcInfo, string likType, string priorType, double priora, double priorb, Array2D< double > &xdata, Array2D< double > &ydata, Array2D< double > &xgrid, int dataNoiseInference, Array1D< double > &datanoise_array, int pdim, int order, Array1D< int > &rndInd, Array2D< double > &fixIndNom, string pdfType, string pcType, int seed, int nmcmc, double mcmcgamma, bool optimflag, Array1D< double > &chstart, Array1D< double > &chsig, double likParam, int likParam_int, Array2D< double > &pgrid, Array2D< double > &pchain, int nburn, int nstep, Array1D< double > &mapparam, Array1D< double > &datavar_map, Array1D< double > &pmean_map, Array1D< double > &pvar_map, Array1D< double > &fmean_map, Array1D< double > &fvar_map, Array1D< double > &postave_datavar, Array1D< double > &p_postave_mean, Array1D< double > &p_postave_var, Array1D< double > &p_postvar_mean, Array2D< double > &f_postsam_mean, Array1D< double > &f_postave_mean, Array1D< double > &f_postave_var, Array1D< double > &f_postvar_mean, Array2D< double > &paramPCcfs)
Main function for inferring model parameters.
Definition: inference.cpp:52
double LogPosterior(Array1D< double > &m, void *mypost_void)
Log-posterior function given a vector of parameters (chain state) and a void* set of auxiliary variab...
Definition: inference.cpp:311