DimensionedField, GeometricField: Consistent field-access interface

This commit is contained in:
Will Bainbridge
2024-03-19 16:19:43 +00:00
parent 5039aec60d
commit 24a3bfdd17
78 changed files with 630 additions and 377 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,7 +42,8 @@ void Foam::solvers::VoFSolver::setRDeltaT()
const volScalarField rDeltaT0("rDeltaT0", rDeltaT);
// Set the reciprocal time-step from the local Courant number
rDeltaT.ref() = fvc::surfaceSum(mag(phi))()()/((2*maxCo)*mesh.V());
rDeltaT.internalFieldRef() =
fvc::surfaceSum(mag(phi))()()/((2*maxCo)*mesh.V());
// Clip to user-defined maximum and minimum time-steps
scalar minRDeltaT = gMin(rDeltaT.primitiveField());