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:
Henry Weller
2016-04-27 21:32:45 +01:00
parent d82049c0b2
commit a25a449c9e
40 changed files with 196 additions and 167 deletions

View File

@ -148,8 +148,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement()
decompositionMethod& decomposer = decomposerPtr_();
volScalarField::InternalField& icellWeights = cellWeights.internalField();
volScalarField::Internal& icellWeights = cellWeights;
// For each cell in the mesh has it been determined if it is fully
// inside, outside, or overlaps the surface
@ -632,7 +631,7 @@ Foam::labelList Foam::backgroundMeshDecomposition::selectRefinementCells
volScalarField& cellWeights
) const
{
volScalarField::InternalField& icellWeights = cellWeights.internalField();
volScalarField::Internal& icellWeights = cellWeights;
labelHashSet cellsToRefine;
@ -873,7 +872,7 @@ Foam::backgroundMeshDecomposition::distribute
mesh_.write();
}
volScalarField::InternalField& icellWeights = cellWeights.internalField();
volScalarField::Internal& icellWeights = cellWeights;
while (true)
{