39#ifndef reductionProblem_H
40#define reductionProblem_H
45#include "fixedFluxPressureFvPatchScalarField.H"
46#include "freestreamFvPatchField.H"
51#pragma GCC diagnostic push
52#pragma GCC diagnostic ignored "-Wold-style-cast"
53#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
54#pragma GCC diagnostic ignored "-Wreturn-type"
57#include <bsplinebuilder.h>
59#pragma GCC diagnostic pop
112#pragma GCC diagnostic push
113#pragma GCC diagnostic ignored "-Wcomment"
160#pragma GCC diagnostic pop
196 void assignBC(volVectorField& s, label BC_ind, Vector<double>& value);
205 void assignBC(volScalarField& s, label BC_ind,
double& value);
217 PtrList<volVectorField>& modes, label Nmodes, Eigen::MatrixXd coeff_matrix);
230 PtrList<volScalarField>& modes, label Nmodes, Eigen::MatrixXd coeff_matrix);
241 template<
typename T,
typename G>
277 void writeMu(List<scalar> mu_now);
289 snapshots, PtrList<volVectorField>& modes, word rbfBasis =
"GAUSSIAN");
301 snapshots, PtrList<volScalarField>& modes, word rbfBasis =
"GAUSSIAN");
313 snapshots, PtrList<volVectorField>& modes, label splDeg = 3);
324 snapshots, PtrList<volScalarField>& modes, label splDeg = 3);
Header file of the ITHACAstream class, it contains the implementation of several methods for input ou...
Header file of the ITHACAutilities namespace.
Class for parallel handling, it has several functions to deal with parallel problems,...
A general class for the implementation of a full order parametrized problem.
Eigen::MatrixXi inletIndexT
Eigen::MatrixXi inletPatch
Matrix that contains informations about the inlet boundaries without specifing the direction Rows = N...
void project()
General projection operation.
void writeMu(List< scalar > mu_now)
Write out a list of scalar corresponding to the parameters used in the truthSolve.
label Pnumber
Number of parameters.
void reconstructFromMatrix(PtrList< volVectorField > &rec_field2, PtrList< volVectorField > &modes, label Nmodes, Eigen::MatrixXd coeff_matrix)
Exact reconstruction using a certain number of modes for vector list of fields and the projection coe...
Eigen::MatrixXd mu_samples
Matrix of parameters to be used for PODI, where each row corresponds to a sample point....
reductionProblem()
Construct Null.
label counter
Counter used for the output of the full order solutions.
void assignBC(volVectorField &s, label BC_ind, Vector< double > &value)
Assign Boundary Condition to a volVectorField.
void assignIF(T &s, G &value)
Assign internal field condition.
label Tnumber
Dimension of the training set (used only when gerating parameters without input)
void computeLift(T &Lfield, T &liftfield, T &omfield)
Homogenize the snapshot matrix, it works with PtrList of volVectorField and volScalarField.
bool offline
Boolean variable, it is 1 if the Offline phase has already been computed, else 0.
ITHACAparallel * paral
parallel handling
void computeLiftT(T &Lfield, T &liftfield, T &omfield)
Virtual function to compute the lifting function.
label folderN
Counter to save intermediate steps in the correct folder, for unsteady and some stationary cases.
void genRandPar()
Generate Random Numbers.
IOdictionary * ITHACAdict
dictionary to store input output infos
double mu_cur
Current value of the parameter.
Eigen::MatrixXd mu
Row matrix of parameters.
Eigen::MatrixXd mu_range
Range of the parameter spaces.
autoPtr< argList > _args
argList
void setParameters()
Set Parameters Problems.
Eigen::MatrixXi inletIndex
Matrix that contains informations about the inlet boundaries.
void liftSolve()
Virtual function to compute the lifting function for scalar field.
bool podex
Boolean variable, it is 1 if the POD has already been computed, else 0.
void truthSolve()
Perform a TruthSolve.
std::vector< SPLINTER::BSpline > getCoeffManifoldSPL(PtrList< volVectorField > snapshots, PtrList< volVectorField > &modes, label splDeg=3)
Constructs the parameters-coefficients manifold for vector fields, based on the B-spline model.
std::vector< SPLINTER::RBFSpline > getCoeffManifoldRBF(PtrList< volVectorField > snapshots, PtrList< volVectorField > &modes, word rbfBasis="GAUSSIAN")
Constructs the parameters-coefficients manifold for vector fields, based on RBF-spline model.
void genEquiPar()
Generate Equidistributed Numbers.
Template file of the reductionProblem class.