33#include "simpleControl.H"
39#define _USE_MATH_DEFINES
43#include "MUQ/Modeling/Distributions/Gaussian.h"
47#include "02enKF_1DinverseHeatTransfer.H"
49using namespace SPLINTER;
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");
69 fvMesh& mesh = example._mesh();
70 volScalarField& T = example._T();
71 int stateSize = T.size();
72 scalar initialField = T.internalField()[0];
74 example.solveDirect();
75 int Ntimes = example.Ntimes;
78 example.priorSetup(initialField, 0.7);
79 example.modelErrorSetup(0.0, 0.7);
80 example.measNoiseSetup(0.0, 0.05);
81 Eigen::MatrixXd posteriorSamples(stateSize, Nseeds);
82 Eigen::MatrixXd priorSamples(stateSize, Nseeds);
84 example.priorSampling();
85 Eigen::MatrixXd posteriorMean(stateSize, Ntimes);
86 Eigen::MatrixXd minConfidence = posteriorMean;
87 Eigen::MatrixXd maxConfidence = minConfidence;
88 posteriorMean.col(0) = posteriorSamples.rowwise().mean();
90 example.reconstruct();
Header file of the Foam2Eigen class.
Header file of the ITHACAutilities namespace.
Class where the UQ tutorial number 2 is implemented.
Class for the definition of some general parameters, the parameters must be defined from the file ITH...
static ITHACAparameters * getInstance()
Gets an instance of ITHACAparameters, to be used if the instance is already existing.
Header file of the laplacianProblem class.
Header file of the muq2ithaca namespace.