43 _args = autoPtr<argList>
45 new argList(argc, argv)
48 if (!
_args->checkRootCase())
50 Foam::FatalError.exit();
53 argList& args =
_args();
66 volScalarField&
T =
_T();
67 volScalarField&
S =
_S();
83 for (label
i = 0;
i < mu_now.size();
i++)
106 volScalarField&
S =
_S();
112 for (label j = 0; j < Nmodes; j++)
119 for (label k = 0; k < Nmodes; k++)
126 if (Pstream::parRun())
132 if (Pstream::parRun())
134 reduce(
source, sumOp<Eigen::MatrixXd>());
139 "./ITHACAoutput/Matrices/");
141 "./ITHACAoutput/Matrices/");
143 "./ITHACAoutput/Matrices/A_matrices");
PtrList< volScalarField > nu_list
Nu (diffusivity)
List< scalar > theta
Theta (coefficients of the affine expansion)
PtrList< fvScalarMatrix > operator_list
List of operators.
autoPtr< volScalarField > _T
Temperature field.
List< Eigen::MatrixXd > A_matrices
A matrices.
volScalarModes Tmodes
List of POD modes.
Eigen::MatrixXd source
Source vector.
autoPtr< volScalarField > _S
Source Term.
PtrList< volScalarField > Tfield
List of snapshots for the solution.
label NTmodes
Number of modes reduced problem.
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.
Eigen::MatrixXd mu_samples
Matrix of parameters to be used for PODI, where each row corresponds to a sample point....
label counter
Counter used for the output of the full order solutions.
bool offline
Boolean variable, it is 1 if the Offline phase has already been computed, else 0.
Eigen::MatrixXd mu
Row matrix of parameters.
autoPtr< argList > _args
argList
bool podex
Boolean variable, it is 1 if the POD has already been computed, else 0.
void truthSolve()
Perform a TruthSolve.
Header file of the laplacianProblem class.
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 ...
bool check_pod()
Check if the POD data folder "./ITHACAoutput/POD" exists.
bool check_off()
Check if the offline data folder "./ITHACAoutput/Offline" exists.
volScalarField S(IOobject("S", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), T.mesh(), dimensionedScalar("zero", dimensionSet(0, 0, -1, 1, 0, 0, 0), 0))