GeometricField: Rationalized and simplified access to the dimensioned internal field
Given that the type of the dimensioned internal field is encapsulated in the GeometricField class the name need not include "Field"; the type name is "Internal" so volScalarField::DimensionedInternalField -> volScalarField::Internal In addition to the ".dimensionedInternalField()" access function the simpler "()" de-reference operator is also provided to greatly simplify FV equation source term expressions which need not evaluate boundary conditions. To demonstrate this kEpsilon.C has been updated to use dimensioned internal field expressions in the k and epsilon equation source terms.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -175,19 +175,19 @@ void calc
|
||||
|
||||
// Read vol-internal fields.
|
||||
|
||||
PtrList<volScalarField::DimensionedInternalField> vsiFlds;
|
||||
PtrList<volScalarField::Internal> vsiFlds;
|
||||
ReadFields(mesh, objects, vsiFlds);
|
||||
|
||||
PtrList<volVectorField::DimensionedInternalField> vviFlds;
|
||||
PtrList<volVectorField::Internal> vviFlds;
|
||||
ReadFields(mesh, objects, vviFlds);
|
||||
|
||||
PtrList<volSphericalTensorField::DimensionedInternalField> vstiFlds;
|
||||
PtrList<volSphericalTensorField::Internal> vstiFlds;
|
||||
ReadFields(mesh, objects, vstiFlds);
|
||||
|
||||
PtrList<volSymmTensorField::DimensionedInternalField> vsymtiFlds;
|
||||
PtrList<volSymmTensorField::Internal> vsymtiFlds;
|
||||
ReadFields(mesh, objects, vsymtiFlds);
|
||||
|
||||
PtrList<volTensorField::DimensionedInternalField> vtiFlds;
|
||||
PtrList<volTensorField::Internal> vtiFlds;
|
||||
ReadFields(mesh, objects, vtiFlds);
|
||||
|
||||
// Read surface fields.
|
||||
|
||||
Reference in New Issue
Block a user