2Info <<
"*********************************************************" << endl;
3Info <<
"Performing test for the parameterized BC inverse solver" << endl;
5word outputFolder =
"./ITHACAoutput/parameterizedBCtest/";
6volScalarField gTrueField = example_paramBC.list2Field(example_paramBC.gTrue);
15auto tO1 = std::chrono::high_resolution_clock::now();
16example_paramBC.set_gParametrized(
"rbf", rbfShapePar);
17example_paramBC.parameterizedBCoffline();
18auto tO2 = std::chrono::high_resolution_clock::now();
19auto duration = std::chrono::duration_cast<std::chrono::microseconds>
20 (
tO2 -
tO1 ).count() / 1e6;
21std::cout <<
"Duration offline part = " <<
duration <<
" seconds" << std::endl;
26 auto t1 = std::chrono::high_resolution_clock::now();
28 auto t2 = std::chrono::high_resolution_clock::now();
29 auto duration = std::chrono::duration_cast<std::chrono::microseconds>
30 ( t2 - t1 ).count() / 1e6;
31 std::cout <<
"Duration online part = " <<
duration <<
" seconds" << std::endl;
32 volScalarField gParametrizedField = example_paramBC.list2Field(
35 std::to_string(solverI + 1),
38 volScalarField&
T(example_paramBC._T());
40 std::to_string(solverI + 1),
44 example_paramBC.residual.squaredNorm());
46Eigen::MatrixXd
A = example_paramBC.Theta.transpose() * example_paramBC.Theta;
49example_paramBC.postProcess(outputFolder,
"gParametrized");
50Info <<
"*********************************************************" << endl;
forAll(example_CG.gList, solutionI)
void exportSolution(GeometricField< Type, PatchField, GeoMesh > &s, fileName subfolder, fileName folder, word fieldName)
Export a field to file in a certain folder and subfolder.
void exportMatrix(Eigen::Matrix< T, -1, dim > &matrix, word Name, word type, word folder)
Export the reduced matrices in numpy (type=python), matlab (type=matlab) and txt (type=eigen) format ...
Eigen::VectorXd residualNorms
Info<< endl;Info<< "*********************************************************"<< endl;Info<< "Performing test for the parameterized BC inverse solver"<< endl;Info<< endl;word outputFolder="./ITHACAoutput/parameterizedBCtest/";volScalarField gTrueField=example_paramBC.list2Field(example_paramBC.gTrue);ITHACAstream::exportSolution(gTrueField, "1", outputFolder, "gTrue");List< word > linSys_solvers