mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
These new names are more consistent and logical because:
primitiveField():
primitiveFieldRef():
Provides low-level access to the Field<Type> (primitive field)
without dimension or mesh-consistency checking. This should only be
used in the low-level functions where dimensional consistency is
ensured by careful programming and computational efficiency is
paramount.
internalField():
internalFieldRef():
Provides access to the DimensionedField<Type, GeoMesh> of values on
the internal mesh-type for which the GeometricField is defined and
supports dimension and checking and mesh-consistency checking.
13 lines
268 B
C
13 lines
268 B
C
#include "CourantNo.H"
|
|
|
|
{
|
|
scalar UrCoNum = 0.5*gMax
|
|
(
|
|
fvc::surfaceSum(mag(phi1 - phi2))().primitiveField()/mesh.V().field()
|
|
)*runTime.deltaTValue();
|
|
|
|
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
|
|
|
CoNum = max(CoNum, UrCoNum);
|
|
}
|