Loading...
Searching...
No Matches
PODTemplateH1.H
1#ifndef IthacaFVPODVectorH1_H
2#define IthacaFVPODVectorH1_H
3
4#include "PODTemplate.H"
5#include "fvCFD.H"
6
7
8namespace ITHACAPOD {
9
10// Class that compute POD (spatial modes and temporal modes)
11template<typename T, typename G>
12class PODTemplateH1 : public PODTemplate<T>
13{
14 using PODTemplate<T>::m_parameters;
15 using PODTemplate<T>::field_name;
16 using PODTemplate<T>::casenameData;
17 using PODTemplate<T>::l_nSnapshot;
18 using PODTemplate<T>::l_nBlocks;
19 using PODTemplate<T>::l_nmodes;
20 using PODTemplate<T>::l_hilbertSp;
21 using PODTemplate<T>::weightH1;
22 using PODTemplate<T>::l_startTime;
23 using PODTemplate<T>::l_endTime;
24 using PODTemplate<T>::l_nSnapshotSimulation;
25 using PODTemplate<T>::l_endTimeSimulation;
26 using PODTemplate<T>::timeFolders;
27 using PODTemplate<T>::name_covMatrix;
28 using PODTemplate<T>::folder_covMatrix;
29 using PODTemplate<T>::exist_covMatrix;
30 using PODTemplate<T>::name_eigenValues;
31 using PODTemplate<T>::name_eigenValuesNormalized;
32 using PODTemplate<T>::name_cumEigenValues;
33 using PODTemplate<T>::name_eigenVector;
34 using PODTemplate<T>::folder_eigen;
35 using PODTemplate<T>::exist_eigenDecomposition;
36 using PODTemplate<T>::folder_spatialModes;
37 using PODTemplate<T>::exist_spatialModes;
38 using PODTemplate<T>::folder_temporalModes;
39 using PODTemplate<T>::exist_temporalModes;
40 using PODTemplate<T>::folder_temporalModesSimulation;
41 using PODTemplate<T>::exist_temporalModesSimulation;
42 using PODTemplate<T>::f_field;
43 using PODTemplate<T>::b_centeredOrNot;
44 using PODTemplate<T>::f_meanField;
45 using PODTemplate<T>::folder_mean;
46 using PODTemplate<T>::exist_noMean;
47 using PODTemplate<T>::eigenValueseigLam;
48 using PODTemplate<T>::lambda;
49 using PODTemplate<T>::w_eigensolver;
50 using PODTemplate<T>::i_precision;
51 using PODTemplate<T>::ios_outytpe;
52 using PODTemplate<T>::runTime2;
53
54 public :
55 word gradfield_name;
56
57 // Constructor
58 PODTemplateH1<T,G>(Parameters* myParameters, const word& myfield_name);
59
60 ~PODTemplateH1<T,G>() override {};
61
62 // First step : computation of covariance matrix
63 // -------------------------------------------------------------------------------------------
64 // method to compute the covariance matrix
65 // add a L2 covariances of U and of grad(U)
66 // param[out] : the covariance matrix
67 Eigen::MatrixXd buildCovMatrix() override;
68
69 // Precompute grad(U) and save it
70 void precomputeGradients();
71
72
73 // Change the result folder name and the number of snapshots
74 // for the eigenValues UnitTest
75 void changeEigenFolderUnitTest(const word& name = "");
76
77};
78
80
82}
83
84#endif
namespace for the computation of the POD, it exploits bot the method of snapshots and SVD.