mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -38,10 +38,10 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField::DimensionedInternalField>
|
||||
Foam::tmp<Foam::volScalarField::Internal>
|
||||
Foam::CourantNo::byRho
|
||||
(
|
||||
const tmp<volScalarField::DimensionedInternalField>& Co
|
||||
const tmp<volScalarField::Internal>& Co
|
||||
) const
|
||||
{
|
||||
if (Co().dimensions() == dimDensity)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -81,9 +81,9 @@ class CourantNo
|
||||
// Private Member Functions
|
||||
|
||||
//- Divide Co by rho if required
|
||||
tmp<volScalarField::DimensionedInternalField> byRho
|
||||
tmp<volScalarField::Internal> byRho
|
||||
(
|
||||
const tmp<volScalarField::DimensionedInternalField>& Co
|
||||
const tmp<volScalarField::Internal>& Co
|
||||
) const;
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
|
||||
Reference in New Issue
Block a user