2Info <<
"*********************************************************" << endl;
3Info <<
"Testing CG inverse solver with NOISY data" << endl;
4Info <<
"Performing " << Ntests <<
" tests." << endl;
6word outputFolder =
"./ITHACAoutput/CGnoiseTest/";
7volScalarField gTrueField = example_CG.list2Field(example_CG.gTrue);
11example_CG.saveSolInLists = 1;
12Eigen::VectorXd TmeasOrig = example_CG.Tmeas;
14for (label
i = 0;
i < Ntests;
i++)
16 Info <<
"Test " <<
i << endl;
17 example_CG.addNoise(noiseLevel);
18 Info <<
"Stopping for J < " << example_CG.Jtol << endl;
20 if (example_CG.conjugateGradient())
22 Info <<
"CG converged" << endl;
24 example_CG.gList[example_CG.gList.size() - 1]);
26 std::to_string(
i + 1), outputFolder,
28 Info <<
"************************************" << endl;
33 Info <<
"CG did not converged" << endl;
34 Info <<
"************************************" << endl;
38 example_CG.Tmeas = TmeasOrig;
41example_CG.postProcess(outputFolder,
"g_CG");
42Info <<
"*********************************************************" << endl;
std::cout<< "Duration = "<< duration<< " seconds"<< std::endl;Info<< "CG converged"<< endl;PtrList< volScalarField > heatFluxField
void exportSolution(GeometricField< Type, PatchField, GeoMesh > &s, fileName subfolder, fileName folder, word fieldName)
Export a field to file in a certain folder and subfolder.