mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField()
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.
This commit is contained in:
@ -904,8 +904,8 @@ Foam::backgroundMeshDecomposition::distribute
|
||||
{
|
||||
Info<< " cellWeightLimit " << cellWeightLimit << endl;
|
||||
|
||||
Pout<< " sum(cellWeights) " << sum(cellWeights.internalField())
|
||||
<< " max(cellWeights) " << max(cellWeights.internalField())
|
||||
Pout<< " sum(cellWeights) " << sum(cellWeights.primitiveField())
|
||||
<< " max(cellWeights) " << max(cellWeights.primitiveField())
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
@ -1137,7 +1137,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
scalarField& cellSize = targetCellSize.internalFieldRef();
|
||||
scalarField& cellSize = targetCellSize.primitiveFieldRef();
|
||||
|
||||
const vectorField& C = mesh.cellCentres();
|
||||
|
||||
@ -1163,7 +1163,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes
|
||||
// zeroGradientFvPatchScalarField::typeName
|
||||
// );
|
||||
|
||||
// targetCellVolume.internalFieldRef() = pow3(cellSize);
|
||||
// targetCellVolume.primitiveFieldRef() = pow3(cellSize);
|
||||
|
||||
// Info<< nl << "Create actualCellVolume volScalarField" << endl;
|
||||
|
||||
@ -1182,7 +1182,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes
|
||||
// zeroGradientFvPatchScalarField::typeName
|
||||
// );
|
||||
|
||||
// actualCellVolume.internalFieldRef() = mesh.cellVolumes();
|
||||
// actualCellVolume.primitiveFieldRef() = mesh.cellVolumes();
|
||||
|
||||
// Info<< nl << "Create equivalentCellSize volScalarField" << endl;
|
||||
|
||||
@ -1201,9 +1201,9 @@ void Foam::conformalVoronoiMesh::writeCellSizes
|
||||
// zeroGradientFvPatchScalarField::typeName
|
||||
// );
|
||||
|
||||
// equivalentCellSize.internalFieldRef() = pow
|
||||
// equivalentCellSize.primitiveFieldRef() = pow
|
||||
// (
|
||||
// actualCellVolume.internalField(),
|
||||
// actualCellVolume.primitiveField(),
|
||||
// 1.0/3.0
|
||||
// );
|
||||
|
||||
@ -1247,7 +1247,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes
|
||||
// pointPatchVectorField::calculatedType()
|
||||
// );
|
||||
|
||||
// scalarField& cellSize = ptTargetCellSize.internalFieldRef();
|
||||
// scalarField& cellSize = ptTargetCellSize.primitiveFieldRef();
|
||||
|
||||
// const vectorField& P = tetMesh.points();
|
||||
|
||||
@ -1283,7 +1283,7 @@ void Foam::conformalVoronoiMesh::writeCellAlignments
|
||||
// zeroGradientFvPatchTensorField::typeName
|
||||
// );
|
||||
//
|
||||
// tensorField& cellAlignment = cellAlignments.internalFieldRef();
|
||||
// tensorField& cellAlignment = cellAlignments.primitiveFieldRef();
|
||||
//
|
||||
// const vectorField& C = mesh.cellCentres();
|
||||
//
|
||||
|
||||
@ -117,7 +117,7 @@ bool Foam::conformalVoronoiMesh::distributeBackground(const Triangulation& mesh)
|
||||
}
|
||||
}
|
||||
|
||||
scalarField& cwi = cellWeights.internalFieldRef();
|
||||
scalarField& cwi = cellWeights.primitiveFieldRef();
|
||||
|
||||
forAll(cellVertices, cI)
|
||||
{
|
||||
|
||||
@ -636,7 +636,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
{
|
||||
// Internal field
|
||||
cellDistance.internalFieldRef() = signedDistance
|
||||
cellDistance.primitiveFieldRef() = signedDistance
|
||||
(
|
||||
distSqr,
|
||||
fvm.C(),
|
||||
@ -701,7 +701,7 @@ int main(int argc, char *argv[])
|
||||
-sqr(GREAT) // null value
|
||||
);
|
||||
|
||||
pointDistance.internalFieldRef() = signedDistance
|
||||
pointDistance.primitiveFieldRef() = signedDistance
|
||||
(
|
||||
pointDistSqr,
|
||||
fvm.points(),
|
||||
|
||||
@ -82,7 +82,7 @@ int main(int argc, char *argv[])
|
||||
pointField newPoints
|
||||
(
|
||||
zeroPoints
|
||||
+ scaleFactor*pInterp.interpolate(U)().internalField()
|
||||
+ scaleFactor*pInterp.interpolate(U)().primitiveField()
|
||||
);
|
||||
|
||||
mesh.polyMesh::movePoints(newPoints);
|
||||
|
||||
Reference in New Issue
Block a user