Skip to content

Commit ac1ac49

Browse files
authored
Merge pull request ITHACA-FV#623 from giovastabile/update_muq
added new MUQ implementations
2 parents a8d1ac3 + ff9211a commit ac1ac49

File tree

15 files changed

+4169
-0
lines changed

15 files changed

+4169
-0
lines changed

src/ITHACA_FOMPROBLEMS/Make/files

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ inverseLaplacianProblem/inverseLaplacianProblem.C
2020
inverseLaplacianProblem_CG/inverseLaplacianProblem_CG.C
2121
inverseLaplacianProblem_paramBC/inverseLaplacianProblem_paramBC.C
2222
CompressibleSteadyNS/CompressibleSteadyNS.C
23+
sequentialIHTP/sequentialIHTP.C
2324

2425
LIB = $(FOAM_USER_LIBBIN)/libITHACA_FOMPROBLEMS
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*---------------------------------------------------------------------------*\
2+
██╗████████╗██╗ ██╗ █████╗ ██████╗ █████╗ ███████╗██╗ ██╗
3+
██║╚══██╔══╝██║ ██║██╔══██╗██╔════╝██╔══██╗ ██╔════╝██║ ██║
4+
██║ ██║ ███████║███████║██║ ███████║█████╗█████╗ ██║ ██║
5+
██║ ██║ ██╔══██║██╔══██║██║ ██╔══██║╚════╝██╔══╝ ╚██╗ ██╔╝
6+
██║ ██║ ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ╚████╔╝
7+
╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═══╝
8+
9+
* In real Time Highly Advanced Computational Applications for Finite Volumes
10+
* Copyright (C) 2017 by the ITHACA-FV authors
11+
-------------------------------------------------------------------------------
12+
License
13+
This file is part of ITHACA-FV
14+
ITHACA-FV is free software: you can redistribute it and/or modify
15+
it under the terms of the GNU Lesser General Public License as published by
16+
the Free Software Foundation, either version 3 of the License, or
17+
(at your option) any later version.
18+
ITHACA-FV is distributed in the hope that it will be useful,
19+
but WITHOUT ANY WARRANTY; without even the implied warranty of
20+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+
GNU Lesser General Public License for more details.
22+
You should have received a copy of the GNU Lesser General Public License
23+
along with ITHACA-FV. If not, see <http://www.gnu.org/licenses/>.
24+
\*---------------------------------------------------------------------------*/
25+
Info << "Create field T" << endl;
26+
_T = autoPtr<volScalarField>
27+
(
28+
new volScalarField
29+
(
30+
IOobject
31+
(
32+
"T",
33+
runTime.timeName(),
34+
mesh,
35+
IOobject::MUST_READ,
36+
IOobject::NO_WRITE
37+
),
38+
mesh
39+
)
40+
);
41+
42+
43+
//_DT = autoPtr<dimensionedScalar>
44+
//(
45+
// "DT",
46+
// dimensionSet(1, 1, -3, -1, 0, 0, 0),
47+
// 1.0
48+
//);
49+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
IOdictionary regularizationDict
2+
(
3+
IOobject
4+
(
5+
"regularizationDict",
6+
runTime.constant(),
7+
mesh,
8+
IOobject::MUST_READ,
9+
IOobject::NO_WRITE
10+
)
11+
);
12+
13+
linSys_solver = regularizationDict.lookupOrDefault<word>("regularizationTechnique", "fullPivLU");
14+
TSVD_filter = regularizationDict.lookupOrDefault<int>("TSVD_filter", 0);
15+
Tikhonov_filter = regularizationDict.lookupOrDefault<double>("Tikhonov_filter", 0.0);
16+
CG_Nsteps = regularizationDict.lookupOrDefault<int>("CG_Nsteps", 0);
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
IOdictionary thermocouplesPosition // Kabir: "Right now, thermocouplesPosition has as many thermocouples as thermocouplesDict has. It means that thermocouplesNum is equal to the number of thermocouples in thermocouplesDict."
2+
(
3+
IOobject
4+
(
5+
"thermocouplesDict", // inside 06enKFwDF_3dIHTP.H the function named int getObservationSize() reads measurementsDict
6+
runTime.constant(), // inside 06enKFwDF_3dIHTP.H the function named Eigen::VectorXd observe(volScalarField field) reads measurementsDict
7+
mesh, // inside 06enKFwDF_3dIHTP.H the function named Eigen::VectorXd observe(Eigen::VectorXd field) reads measurementsDict
8+
IOobject::MUST_READ, // inside 06enKFwDF_3dIHTP.H the function named void readObservationTimes() reads observationDeltaTimesteps and observationStartTimestep
9+
IOobject::NO_WRITE
10+
)
11+
);
12+
13+
List<vector> TCpos(thermocouplesPosition.lookup("positions"));
14+
thermocouplesNum = TCpos.size();
15+
thermocouplesPosition.lookup("timeSamplesT0") >> timeSamplesT0; // timeSamplesT0 1.0;
16+
thermocouplesPosition.lookup("timeSamplesDeltaT") >> timeSamplesDeltaT; // timeSamplesDeltaT 1.0;
17+
timeSamplesNum = (runTime.endTime().value() - timeSamplesT0) / timeSamplesDeltaT + 1; // 20, This is wrong. (It should be runTime.endTime().value()/Ntimes)/observationDeltaTimesteps
18+
Info << "First sampling time = " << timeSamplesT0 << endl; // 1
19+
Info << "Delta time between samples = " << timeSamplesDeltaT << endl; // 1
20+
Info << "Number of samplings = " << timeSamplesNum << endl; // 20, This is wrong. (It should be runTime.endTime().value()/Ntimes)/observationDeltaTimesteps
21+
Info << "Number of samplings should be calculated by (endtime / Ntimes) / observationDeltaTimesteps, so, the above calculated one is inncorect " << endl;
22+
23+
24+
25+
// timeSamplesT0 1.0; First sampling time
26+
// timeSamplesDeltaT 1.0; Delta time between samples
27+
28+
29+
// observationDeltaTimesteps 2; inside 06enKFwDF_3dIHTP.H
30+
// observationStartTimestep 1; inside 06enKFwDF_3dIHTP.H
31+
32+
// Number of samples in time = 50 it is equal to equal measurements.cols() inside 06enKFwDF_3dIHTP.H, Ntimes/observationDeltaTimesteps
33+
// Number of sample in space = 100 it is equal to equal measurements.rows() inside 06enKFwDF_3dIHTP.H, number of thermocouples in thermocouplesDict."
34+

0 commit comments

Comments
 (0)