PatchFields: Removed simple copy constructors and clone functions

These do not necessarily set the internal field reference correctly and it is
safer that the correct internal field is provided as an argument.
This commit is contained in:
Henry Weller
2020-10-03 22:16:10 +01:00
parent cdd2db01cc
commit 7e3f4976a8
470 changed files with 733 additions and 5738 deletions

View File

@ -79,18 +79,19 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::yPlus::calcYPlus
volScalarField::Boundary& yPlusBf = tyPlus.ref().boundaryFieldRef();
volScalarField::Boundary d = nearWallDist(mesh_).y();
const nearWallDist nwd(mesh_);
const volScalarField::Boundary& d = nwd.y();
const volScalarField::Boundary nutBf =
turbModel.nut()().boundaryField();
const tmp<volScalarField> tnut = turbModel.nut();
const volScalarField::Boundary& nutBf = tnut().boundaryField();
const volScalarField::Boundary nuEffBf =
turbModel.nuEff()().boundaryField();
const tmp<volScalarField> tnuEff = turbModel.nuEff();
const volScalarField::Boundary& nuEffBf = tnuEff().boundaryField();
const volScalarField::Boundary nuBf =
turbModel.nu()().boundaryField();
const tmp<volScalarField> tnu = turbModel.nu();
const volScalarField::Boundary& nuBf = tnu().boundaryField();
const fvPatchList& patches = mesh_.boundary();
const fvPatchList& patches = mesh_.boundary();
forAll(patches, patchi)
{