33#include "simpleControl.H"
39#define _USE_MATH_DEFINES
43#include "MUQ/Modeling/Distributions/Gaussian.h"
52int main(
int argc,
char* argv[])
54 solverPerformance::debug = 1;
62 example.
k = para->
ITHACAdict->lookupOrDefault<
double>(
"thermalConductivity", 0);
63 M_Assert(example.
k > 0,
"thermalConductivity, k, not specified");
64 example.
rho = para->
ITHACAdict->lookupOrDefault<
double>(
"density", 0);
65 M_Assert(example.
rho > 0,
"Density, rho, not specified");
66 example.
Cp = para->
ITHACAdict->lookupOrDefault<
double>(
"heatCapacity", 0);
67 M_Assert(example.
Cp > 0,
"heatCapacity, Cp, not specified");
70 volScalarField&
T = example.
_T();
71 int stateSize =
T.size();
72 scalar initialField =
T.internalField()[0];
75 int Ntimes = example.
Ntimes;
81 Eigen::MatrixXd posteriorSamples(stateSize, Nseeds);
82 Eigen::MatrixXd priorSamples(stateSize, Nseeds);
85 Eigen::MatrixXd posteriorMean(stateSize, Ntimes);
86 Eigen::MatrixXd minConfidence = posteriorMean;
87 Eigen::MatrixXd maxConfidence = minConfidence;
88 posteriorMean.col(0) = posteriorSamples.rowwise().mean();
int main(int argc, char *argv[])
Header file of the Foam2Eigen class.
#define M_Assert(Expr, Msg)
Header file of the ITHACAutilities namespace.
Class where the UQ tutorial number 2 is implemented.
void priorSetup(double mean, double cov)
Setup of the prior distribution.
void measNoiseSetup(double mean, double cov)
Setup of the measurement noise distribution.
void modelErrorSetup(double mean, double cov)
Setup of the model error distribution.
void reconstruct()
Reconstruction phase.
void solveDirect()
Preforming a true solution.
void priorSampling()
Samples the prior density.
Class for the definition of some general parameters, the parameters must be defined from the file ITH...
IOdictionary * ITHACAdict
Dictionary for input objects from file.
static ITHACAparameters * getInstance()
Gets an instance of ITHACAparameters, to be used if the instance is already existing.
autoPtr< volScalarField > _T
Temperature field.
autoPtr< fvMesh > _mesh
Mesh.
autoPtr< Time > _runTime
Time.
Header file of the laplacianProblem class.
Header file of the muq2ithaca namespace.