44 _args = autoPtr<argList>
46 new argList(argc, argv)
49 if (!
_args->checkRootCase())
51 Foam::FatalError.exit();
54 argList& args =
_args();
57 _simple = autoPtr<simpleControl>
88 volVectorField&
U =
_U();
89 surfaceScalarField&
phi =
_phi();
92 dimensionedScalar&
nu =
_nu();
101 auto start = std::chrono::system_clock::now();
102 Info <<
"Time = " <<
_runTime().timeName() << nl << endl;
104 while (
simple.correctNonOrthogonal())
110 - fvm::laplacian(
nu,
U)
114 phi = linearInterpolate(
U) &
mesh.Sf();
116 auto end = std::chrono::system_clock::now();
117 auto elapsed = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
118 Info <<
"Elapsed: " << elapsed.count() <<
" microseconds\n";
139 argList& args =
_args();
Header file of the Burgers class.
autoPtr< fvMesh > _mesh
Mesh.
autoPtr< fv::options > _fvOptions
fvOptions
autoPtr< volVectorField > _U
Velocity field.
PtrList< volVectorField > Ufield
List of pointers used to form the velocity snapshots matrix.
autoPtr< dimensionedScalar > _nu
Burgers()
Null constructor.
autoPtr< Time > _runTime
Time.
autoPtr< surfaceScalarField > _phi
Flux.
autoPtr< IOdictionary > _transportProperties
void restart()
Function to restart the fields of the Burgers problem.
autoPtr< simpleControl > _simple
simpleControl
static ITHACAparameters * getInstance()
Gets an instance of ITHACAparameters, to be used if the instance is already existing.
bool checkWrite(Time &timeObject)
Function to check if the solution must be exported.
scalar startTime
Start Time (initial time to start storing the snapshots)
void setTimes(Time &timeObject)
scalar writeEvery
Time step of the writing procedure.
scalar nextWrite
Auxiliary variable to store the next writing instant.
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.
label folderN
Counter to save intermediate steps in the correct folder, for unsteady and some stationary cases.
IOdictionary * ITHACAdict
dictionary to store input output infos
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.
void exportSolution(GeometricField< Type, PatchField, GeoMesh > &s, fileName subfolder, fileName folder, word fieldName)
Export a field to file in a certain folder and subfolder.
bool check_pod()
Check if the POD data folder "./ITHACAoutput/POD" exists.
bool check_off()
Check if the offline data folder "./ITHACAoutput/Offline" exists.
simpleControl simple(mesh)