createK.H
Go to the documentation of this file.
1 Info<< "Creating field kinetic energy K\n" << endl;
2 volScalarField K("K", 0.5*magSqr(U));
3 
4 if (U.nOldTimes())
5 {
6  volVectorField* Uold = &U.oldTime();
7  volScalarField* Kold = &K.oldTime();
8  *Kold == 0.5*magSqr(*Uold);
9 
10  while (Uold->nOldTimes())
11  {
12  Uold = &Uold->oldTime();
13  Kold = &Kold->oldTime();
14  *Kold == 0.5*magSqr(*Uold);
15  }
16 }
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
Foam::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:58
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Kold
Kold
Definition: createK.H:13
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
U
U
Definition: pEqn.H:72