diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C index acc8ecdd8e..d2aeffbfd0 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,9 @@ Foam::XiEqModels::Gulder::~Gulder() Foam::tmp Foam::XiEqModels::Gulder::XiEq() const { volScalarField up(sqrt((2.0/3.0)*turbulence_.k())); - const volScalarField& epsilon = turbulence_.epsilon(); + + tmp tepsilon = turbulence_.epsilon(); + const volScalarField& epsilon = tepsilon(); if (subGridSchelkin_) { diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index 1b2e413c80..1aa6771ac1 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,8 +76,11 @@ Foam::XiEqModels::SCOPEXiEq::~SCOPEXiEq() Foam::tmp Foam::XiEqModels::SCOPEXiEq::XiEq() const { - const volScalarField& k = turbulence_.k(); - const volScalarField& epsilon = turbulence_.epsilon(); + tmp tk = turbulence_.k(); + const volScalarField& k = tk(); + + tmp tepsilon = turbulence_.epsilon(); + const volScalarField& epsilon = tepsilon(); volScalarField up(sqrt((2.0/3.0)*k)); if (subGridSchelkin_) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C index a94739255e..c7ecbc27af 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,7 +64,9 @@ Foam::XiGModels::KTS::~KTS() Foam::tmp Foam::XiGModels::KTS::G() const { volScalarField up(sqrt((2.0/3.0)*turbulence_.k())); - const volScalarField& epsilon = turbulence_.epsilon(); + + tmp tepsilon = turbulence_.epsilon(); + const volScalarField& epsilon = tepsilon(); volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)))); diff --git a/applications/solvers/modules/compressibleMultiphaseVoF/pressureCorrector.C b/applications/solvers/modules/compressibleMultiphaseVoF/pressureCorrector.C index a5249e2ef5..5cbaccba86 100644 --- a/applications/solvers/modules/compressibleMultiphaseVoF/pressureCorrector.C +++ b/applications/solvers/modules/compressibleMultiphaseVoF/pressureCorrector.C @@ -80,7 +80,7 @@ void Foam::solvers::compressibleMultiphaseVoF::pressureCorrector() { const compressibleVoFphase& phase = phases[phasei]; const rhoThermo& thermo = phase.thermo(); - const volScalarField& rho = thermo.rho()(); + const volScalarField& rho = phases[phasei].thermo().rho(); p_rghEqnComps.set ( diff --git a/applications/solvers/modules/compressibleVoF/compressibleVoF.C b/applications/solvers/modules/compressibleVoF/compressibleVoF.C index 31e1f24ad6..d9b391e8fd 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleVoF.C +++ b/applications/solvers/modules/compressibleVoF/compressibleVoF.C @@ -143,8 +143,8 @@ void Foam::solvers::compressibleVoF::prePredictor() { twoPhaseVoFSolver::prePredictor(); - const volScalarField& rho1 = mixture.thermo1().rho(); - const volScalarField& rho2 = mixture.thermo2().rho(); + const volScalarField& rho1 = mixture_.thermo1().rho(); + const volScalarField& rho2 = mixture_.thermo2().rho(); alphaRhoPhi1 = fvc::interpolate(rho1)*alphaPhi1; alphaRhoPhi2 = fvc::interpolate(rho2)*(phi - alphaPhi1); diff --git a/applications/solvers/modules/isothermalFilm/isothermalFilm.C b/applications/solvers/modules/isothermalFilm/isothermalFilm.C index 404b871c30..eb5ae5a554 100644 --- a/applications/solvers/modules/isothermalFilm/isothermalFilm.C +++ b/applications/solvers/modules/isothermalFilm/isothermalFilm.C @@ -233,7 +233,7 @@ Foam::wordList Foam::solvers::isothermalFilm::alphaTypes() const Foam::solvers::isothermalFilm::isothermalFilm ( fvMesh& mesh, - autoPtr thermoPtr + autoPtr thermoPtr ) : solver(mesh), @@ -403,7 +403,7 @@ Foam::solvers::isothermalFilm::isothermalFilm Foam::solvers::isothermalFilm::isothermalFilm(fvMesh& mesh) : - isothermalFilm(mesh, fluidThermo::New(mesh)) + isothermalFilm(mesh, rhoThermo::New(mesh)) {} diff --git a/applications/solvers/modules/isothermalFilm/isothermalFilm.H b/applications/solvers/modules/isothermalFilm/isothermalFilm.H index f258d19742..bfda1bd8ae 100644 --- a/applications/solvers/modules/isothermalFilm/isothermalFilm.H +++ b/applications/solvers/modules/isothermalFilm/isothermalFilm.H @@ -46,7 +46,7 @@ See also #define isothermalFilm_H #include "solver.H" -#include "fluidThermo.H" +#include "rhoThermo.H" #include "filmCompressibleMomentumTransportModel.H" #include "uniformDimensionedFields.H" @@ -93,10 +93,10 @@ protected: // Thermophysical properties //- Pointer to the fluid thermophysical properties - autoPtr thermoPtr_; + autoPtr thermoPtr_; //- Reference to the fluid thermophysical properties - fluidThermo& thermo_; + rhoThermo& thermo_; //- The thermodynamic pressure field volScalarField& p; @@ -276,7 +276,7 @@ public: const volScalarField& alpha; //- Reference to the fluid thermophysical properties - const fluidThermo& thermo; + const rhoThermo& thermo; //- Reference to the thermodynamic density field const volScalarField& rho; @@ -300,7 +300,7 @@ public: // Constructors //- Construct from region mesh and thermophysical properties - isothermalFilm(fvMesh& mesh, autoPtr); + isothermalFilm(fvMesh& mesh, autoPtr); //- Construct from region mesh isothermalFilm(fvMesh& mesh); diff --git a/applications/solvers/modules/multiphaseEuler/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/modules/multiphaseEuler/interfacialModels/dragModels/segregated/segregated.C index ca6ca45c86..d80f41b80f 100644 --- a/applications/solvers/modules/multiphaseEuler/interfacialModels/dragModels/segregated/segregated.C +++ b/applications/solvers/modules/multiphaseEuler/interfacialModels/dragModels/segregated/segregated.C @@ -131,7 +131,7 @@ Foam::tmp Foam::dragModels::segregated::K() const const volScalarField::Internal ReI ( - (interface_.rho()()()*interface_.magUr()()()) + (interface_.rho()()*interface_.magUr()()()) /(magGradI*limitedAlpha1*limitedAlpha2*muI) ); diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C b/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C index 760d9ccc61..30586592bf 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -157,8 +157,6 @@ JohnsonJacksonSchaeffer::nu } const fvPatchList& patches = phase.mesh().boundary(); - const volVectorField& U = phase.U(); - volScalarField::Boundary& nufBf = nuf.boundaryFieldRef(); forAll(patches, patchi) @@ -169,7 +167,7 @@ JohnsonJacksonSchaeffer::nu ( pf.boundaryField()[patchi]*sin(phi_.value()) /( - mag(U.boundaryField()[patchi].snGrad()) + mag(phase.U()().boundaryField()[patchi].snGrad()) + small ) ); diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C index 1b06cb3c49..5d5d780c32 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -146,8 +146,6 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu } const fvPatchList& patches = phase.mesh().boundary(); - const volVectorField& U = phase.U(); - volScalarField::Boundary& nufBf = nuf.boundaryFieldRef(); forAll(patches, patchi) @@ -158,7 +156,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu ( pf.boundaryField()[patchi]*sin(phi_.value()) /( - mag(U.boundaryField()[patchi].snGrad()) + mag(phase.U()().boundaryField()[patchi].snGrad()) + small ) ); diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 33f824a750..62e588757f 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -410,7 +410,9 @@ void Foam::RASModels::kineticTheoryModel::correct() const volScalarField& rho = phase_.rho(); const surfaceScalarField& alphaRhoPhi = alphaRhoPhi_; const volVectorField& U = U_; - const volVectorField& Uc_ = continuousPhase.U(); + + tmp tUc(continuousPhase.U()); + const volVectorField& Uc = tUc(); const scalar sqrtPi = sqrt(constant::mathematical::pi); const dimensionedScalar ThetaSmall("ThetaSmall", Theta_.dimensions(), 1e-6); @@ -470,7 +472,7 @@ void Foam::RASModels::kineticTheoryModel::correct() const volScalarField J2 ( "J2", - 0.25*sqr(beta)*da*magSqr(U - Uc_) + 0.25*sqr(beta)*da*magSqr(U - Uc) /( max(alpha, residualAlpha_)*rho *sqrtPi*(ThetaSqrt + ThetaSmallSqrt) diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C index 86f25a8931..7ff9603b91 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C @@ -63,7 +63,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() fvc::interpolate ( max(alpha.oldTime(), phase.residualAlpha()) - *phase.rho()().oldTime() + *phase.rho().oldTime() ) ).ptr() ); diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshiiDepartureDiameter/KocamustafaogullariIshiiDepartureDiameter.C b/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshiiDepartureDiameter/KocamustafaogullariIshiiDepartureDiameter.C index e002ca553c..2013de4605 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshiiDepartureDiameter/KocamustafaogullariIshiiDepartureDiameter.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshiiDepartureDiameter/KocamustafaogullariIshiiDepartureDiameter.C @@ -133,8 +133,14 @@ KocamustafaogullariIshiiDepartureDiameter::dDeparture Tl, Tsatw, L, - liquid.thermo().rho(patchi)(), - vapour.thermo().rho(patchi)(), + static_cast + ( + liquid.rho().boundaryField()[patchi] + ), + static_cast + ( + vapour.rho().boundaryField()[patchi] + ), liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour), patchi)() ); } @@ -158,8 +164,8 @@ KocamustafaogullariIshiiDepartureDiameter::dDeparture liquid.thermo().T(), Tsatw, L, - liquid.thermo().rho()(), - vapour.thermo().rho()(), + liquid.rho(), + vapour.rho(), liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour))() ); } diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C b/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C index 9f4d3ba58a..600f8fbe37 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C @@ -143,8 +143,8 @@ Foam::wallBoilingModels::departureFrequencyModels::Cole::fDeparture ( liquid.mesh(), dDep, - liquid.thermo().rho()(), - vapour.thermo().rho()() + liquid.rho(), + vapour.rho() ); } diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureFrequencyModels/KocamustafaogullariIshiiDepartureFrequency/KocamustafaogullariIshiiDepartureFrequency.C b/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureFrequencyModels/KocamustafaogullariIshiiDepartureFrequency/KocamustafaogullariIshiiDepartureFrequency.C index 2d1422f968..054de652d3 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureFrequencyModels/KocamustafaogullariIshiiDepartureFrequency/KocamustafaogullariIshiiDepartureFrequency.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/departureFrequencyModels/KocamustafaogullariIshiiDepartureFrequency/KocamustafaogullariIshiiDepartureFrequency.C @@ -128,8 +128,14 @@ KocamustafaogullariIshiiDepartureFrequency::fDeparture ( liquid.mesh(), dDep, - liquid.thermo().rho(patchi)(), - vapour.thermo().rho(patchi)(), + static_cast + ( + liquid.rho().boundaryField()[patchi] + ), + static_cast + ( + vapour.rho().boundaryField()[patchi] + ), liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour), patchi)() ); } @@ -153,8 +159,8 @@ KocamustafaogullariIshiiDepartureFrequency::fDeparture ( liquid.mesh(), dDep, - liquid.thermo().rho()(), - vapour.thermo().rho()(), + liquid.rho(), + vapour.rho(), liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour))() ); } diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/nucleationSiteModels/KocamustafaogullariIshiiNucleationSite/KocamustafaogullariIshiiNucleationSite.C b/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/nucleationSiteModels/KocamustafaogullariIshiiNucleationSite/KocamustafaogullariIshiiNucleationSite.C index 257590925e..42b9893cdd 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/nucleationSiteModels/KocamustafaogullariIshiiNucleationSite/KocamustafaogullariIshiiNucleationSite.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/wallBoilingSubModels/nucleationSiteModels/KocamustafaogullariIshiiNucleationSite/KocamustafaogullariIshiiNucleationSite.C @@ -145,8 +145,14 @@ KocamustafaogullariIshiiNucleationSite::nucleationSiteDensity L, dDep, Tw, - liquid.thermo().rho(patchi)(), - vapour.thermo().rho(patchi)(), + static_cast + ( + liquid.rho().boundaryField()[patchi] + ), + static_cast + ( + vapour.rho().boundaryField()[patchi] + ), liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour), patchi)() ); } @@ -172,8 +178,8 @@ KocamustafaogullariIshiiNucleationSite::nucleationSiteDensity L, dDep, Tf, - liquid.thermo().rho()(), - vapour.thermo().rho()(), + liquid.rho(), + vapour.rho(), liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour))() ); } diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C index c1483c339e..626b1f1312 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -693,7 +693,7 @@ correctInterfaceThermo() const volScalarField rhoKDL ( - phase.thermo().rho() + phase.rho() *diffusiveMassTransferModel.modelInThe(phase).K() *compositionModel.modelInThe(phase).D(specie) *this->Li diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C index 5a8fa84e0d..441d4b30ef 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C @@ -280,7 +280,9 @@ Foam::MomentumTransferPhaseSystem::momentumTransfer() fvVectorMatrix& eqn = *eqns[phase.name()]; const volVectorField& U = eqn.psi(); - const surfaceScalarField& phi = phase.phi(); + + tmp tphi(phase.phi()); + const surfaceScalarField& phi = tphi(); const tmp taphi(fvc::absolute(phi, U)); const surfaceScalarField& aphi(taphi()); @@ -420,8 +422,11 @@ Foam::MomentumTransferPhaseSystem::momentumTransferf() if (!phase.stationary()) { - const volVectorField& U = phase.U(); - const surfaceScalarField& phi = phase.phi(); + tmp tU = phase.U(); + const volVectorField& U = tU(); + + tmp tphi(phase.phi()); + const surfaceScalarField& phi = tphi(); const tmp taphi(fvc::absolute(phi, U)); const surfaceScalarField& aphi(taphi()); @@ -1132,7 +1137,7 @@ Foam::MomentumTransferPhaseSystem::ddtCorrs() const fvc::ddtCorr ( phase, - phase.rho()(), + phase.rho(), phase.U()(), phase.phi()(), phase.Uf() diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.C index efb0972b06..392dd7950f 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/diameterModels/IATE/IATE.C @@ -129,7 +129,7 @@ void Foam::diameterModels::IATE::correct() + fvc::div(phase().alphaPhi()) ) - ( - fvc::ddt(phase(), phase().rho()()) + fvc::ddt(phase(), phase().rho()) + fvc::div(phase().alphaRhoPhi()) )/phase().rho() ), diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 361d0a94ce..c0a255488d 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -170,7 +170,7 @@ Foam::MovingPhaseModel::MovingPhaseModel phaseCompressible::momentumTransportModel::New ( *this, - this->thermo().rho(), + this->rho(), U_, alphaRhoPhi_, phi_, @@ -335,7 +335,7 @@ Foam::tmp Foam::MovingPhaseModel::UEqn() { const volScalarField& alpha = *this; - const volScalarField& rho = this->thermo().rho(); + const volScalarField& rho = this->rho(); return ( @@ -355,7 +355,7 @@ Foam::MovingPhaseModel::UfEqn() // As the "normal" U-eqn but without the ddt terms const volScalarField& alpha = *this; - const volScalarField& rho = this->thermo().rho(); + const volScalarField& rho = this->rho(); return ( diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/MulticomponentPhaseModel/MulticomponentPhaseModel.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/MulticomponentPhaseModel/MulticomponentPhaseModel.C index 372ac85346..0b79b2270a 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/MulticomponentPhaseModel/MulticomponentPhaseModel.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/MulticomponentPhaseModel/MulticomponentPhaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -91,7 +91,7 @@ Foam::tmp Foam::MulticomponentPhaseModel::YiEqn(volScalarField& Yi) { const volScalarField& alpha = *this; - const volScalarField& rho = this->thermo().rho(); + const volScalarField& rho = this->rho(); const tmp talphaRhoPhi(this->alphaRhoPhi()); const surfaceScalarField& alphaRhoPhi(talphaRhoPhi()); diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C index c4d0d0278d..35d11a5cc1 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,7 +90,7 @@ Foam::ThermoPhaseModel::thermoRef() template -Foam::tmp +const Foam::volScalarField& Foam::ThermoPhaseModel::rho() const { return thermo_->rho(); diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H index fa61cc16af..ac8de31b51 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,7 +103,7 @@ public: virtual rhoThermo& thermoRef(); //- Return the density field - virtual tmp rho() const; + virtual const volScalarField& rho() const; // Transport diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.C index 30d7e7d37e..cdb025be8c 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -210,7 +210,9 @@ void Foam::phaseModel::correctInflowOutflow(surfaceScalarField& alphaPhi) const { surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef(); const volScalarField::Boundary& alphaBf = boundaryField(); - const surfaceScalarField::Boundary& phiBf = phi()().boundaryField(); + + tmp tphi(phi()); + const surfaceScalarField::Boundary& phiBf = tphi().boundaryField(); forAll(alphaPhiBf, patchi) { diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.H b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.H index 489f404ee4..80b137e4ae 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.H +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.H @@ -261,7 +261,7 @@ public: virtual rhoThermo& thermoRef() = 0; //- Return the density field - virtual tmp rho() const = 0; + virtual const volScalarField& rho() const = 0; //- Return whether the phase is isothermal virtual bool isothermal() const = 0; diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseSystem/phaseSystem.C index 80bafef5b2..292b52e922 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseSystem/phaseSystem.C @@ -701,7 +701,8 @@ void Foam::phaseSystem::correctBoundaryFlux() { phaseModel& phase = movingPhases()[movingPhasei]; - const volVectorField::Boundary& UBf = phase.U()().boundaryField(); + tmp tU(phase.U()); + const volVectorField::Boundary& UBf = tU().boundaryField(); FieldField phiRelBf ( @@ -806,7 +807,7 @@ void Foam::phaseSystem::correctPhi phaseModel& phase = phases()[phasei]; const volScalarField& alpha = phase; - psi += alpha*phase.thermo().psi()/phase.thermo().rho(); + psi += alpha*phase.thermo().psi()/phase.rho(); } fv::correctPhi diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/binaryBreakupModels/Liao/LiaoBase.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/binaryBreakupModels/Liao/LiaoBase.C index 0819347615..ac634168f8 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/binaryBreakupModels/Liao/LiaoBase.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/binaryBreakupModels/Liao/LiaoBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -126,14 +126,14 @@ void Foam::diameterModels::LiaoBase::precompute() ( "rhoc", dimDensity, - gAverage(populationBalance_.continuousPhase().rho()()) + gAverage(populationBalance_.continuousPhase().rho()) ); const dimensionedScalar rhod ( "rhod", dimDensity, - gAverage(populationBalance_.sizeGroups()[1].phase().rho()()) + gAverage(populationBalance_.sizeGroups()[1].phase().rho()) ); const dimensionedScalar sigma diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/BrownianCollisions/BrownianCollisions.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/BrownianCollisions/BrownianCollisions.C index 92ef58504e..137c82f24a 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/BrownianCollisions/BrownianCollisions.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/BrownianCollisions/BrownianCollisions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,7 +107,9 @@ addToCoalescenceRate const sizeGroup& fj = popBal_.sizeGroups()[j]; const volScalarField& T = popBal_.continuousPhase().thermo().T(); - const volScalarField& mu = popBal_.continuousPhase().thermo().mu(); + + tmp tmu(popBal_.continuousPhase().thermo().mu()); + const volScalarField& mu = tmu(); const volScalarField Cci ( diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/LiaoCoalescence/LiaoCoalescence.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/LiaoCoalescence/LiaoCoalescence.C index 037feb873b..ae25c55f68 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/LiaoCoalescence/LiaoCoalescence.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/LiaoCoalescence/LiaoCoalescence.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -178,7 +178,7 @@ void Foam::diameterModels::coalescenceModels::LiaoCoalescence::precompute() ( popBal_.sigmaWithContinuousPhase(popBal_.sizeGroups()[1].phase())() /(mag(g)*(popBal_.continuousPhase().rho() - - popBal_.sizeGroups()[1].phase().rho()())) + - popBal_.sizeGroups()[1].phase().rho())) ); } diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/turbulentShear/turbulentShear.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/turbulentShear/turbulentShear.C index de5f3636bb..c913febdc8 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/turbulentShear/turbulentShear.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/coalescenceModels/turbulentShear/turbulentShear.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -74,9 +74,9 @@ addToCoalescenceRate const sizeGroup& fi = popBal_.sizeGroups()[i]; const sizeGroup& fj = popBal_.sizeGroups()[j]; - const volScalarField& epsilon = popBal_.continuousTurbulence().epsilon(); const volScalarField& rho = popBal_.continuousPhase().rho(); - const volScalarField& mu = popBal_.continuousPhase().thermo().mu(); + tmp epsilon(popBal_.continuousTurbulence().epsilon()); + tmp mu(popBal_.continuousPhase().thermo().mu()); coalescenceRate += C_*sqrt(epsilon*rho/mu)*pow3(fi.d() + fj.d()); } diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/driftModels/densityChange/densityChange.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/driftModels/densityChange/densityChange.C index d01d7344f0..c3c95fecf2 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/driftModels/densityChange/densityChange.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/driftModels/densityChange/densityChange.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,7 +67,7 @@ void Foam::diameterModels::driftModels::densityChangeDrift::addToDriftRate const sizeGroup& fi = popBal_.sizeGroups()[i]; const phaseModel& phase = fi.phase(); const volScalarField& alpha = phase; - const volScalarField& rho = phase.thermo().rho(); + const volScalarField& rho = phase.rho(); driftRate -= fi.x() diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C index 1bbd8749c6..c907230f5b 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C @@ -695,7 +695,7 @@ void Foam::diameterModels::populationBalanceModel::correctDilatationError() const phaseModel& phase = fluid_.phases()[phaseName]; const velocityGroup& velGroup = *velocityGroupPtrs_[phaseName]; const volScalarField& alpha = phase; - const volScalarField& rho = phase.thermo().rho(); + const volScalarField& rho = phase.rho(); dilatationError = fvc::ddt(alpha) + fvc::div(phase.alphaPhi()) @@ -1167,7 +1167,7 @@ void Foam::diameterModels::populationBalanceModel::solve() sizeGroup& fi = sizeGroups_[i]; const phaseModel& phase = fi.phase(); const volScalarField& alpha = phase; - const volScalarField& rho = phase.thermo().rho(); + const volScalarField& rho = phase.rho(); const volScalarField& dilatationError = dilatationErrors_[phase.name()]; diff --git a/applications/solvers/modules/solid/solid.C b/applications/solvers/modules/solid/solid.C index e2755de4c3..68eb611de0 100644 --- a/applications/solvers/modules/solid/solid.C +++ b/applications/solvers/modules/solid/solid.C @@ -203,7 +203,7 @@ void Foam::solvers::solid::momentumPredictor() void Foam::solvers::solid::thermophysicalPredictor() { volScalarField& e = thermo_.he(); - const volScalarField& rho = thermo.rho(); + const volScalarField& rho = thermo_.rho(); while (pimple.correctNonOrthogonal()) { diff --git a/applications/solvers/modules/solidDisplacement/solidDisplacement.C b/applications/solvers/modules/solidDisplacement/solidDisplacement.C index 7b6945910c..24086fe25a 100644 --- a/applications/solvers/modules/solidDisplacement/solidDisplacement.C +++ b/applications/solvers/modules/solidDisplacement/solidDisplacement.C @@ -171,7 +171,7 @@ void Foam::solvers::solidDisplacement::pressureCorrector() { volVectorField& D(D_); - const volScalarField& rho = thermo.rho(); + const volScalarField& rho = thermo_.rho(); int iCorr = 0; scalar initialResidual = 0; diff --git a/applications/utilities/thermophysical/chemkinToFoam/chemkinReader/chemkinReader.C b/applications/utilities/thermophysical/chemkinToFoam/chemkinReader/chemkinReader.C index 8f697b40b5..d329ce919a 100644 --- a/applications/utilities/thermophysical/chemkinToFoam/chemkinReader/chemkinReader.C +++ b/applications/utilities/thermophysical/chemkinToFoam/chemkinReader/chemkinReader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -741,9 +741,9 @@ void Foam::chemkinReader::addReaction default: { FatalErrorInFunction - << "Reaction rate type " << reactionRateTypeNames[rrType] + << "Reaction rate type index " << rrType << " on line " << lineNo_-1 - << " not implemented" + << " unknown" << exit(FatalError); } } diff --git a/src/OSspecific/POSIX/POSIX.C b/src/OSspecific/POSIX/POSIX.C index 74a801a302..96f9118a60 100644 --- a/src/OSspecific/POSIX/POSIX.C +++ b/src/OSspecific/POSIX/POSIX.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1354,7 +1354,7 @@ Foam::fileNameList Foam::dlLoaded() << " : determined loaded libraries :" << libs.size() << std::endl; } - return move(libs); + return libs; } diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H index 723ab544e4..0d2358d4a1 100644 --- a/src/OpenFOAM/containers/Lists/List/List.H +++ b/src/OpenFOAM/containers/Lists/List/List.H @@ -55,7 +55,7 @@ using std::move; template inline T clone(const T& t) { - return move(T(t)); + return T(t); } // Forward declaration of classes diff --git a/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.C b/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.C index 3be50415dd..114a1c71ed 100644 --- a/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.C +++ b/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -93,7 +93,7 @@ Foam::wordList Foam::functionObjects::writeObjectsBase::objectNames() } } - return move(allNames); + return allNames; } diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H index 6f33333ce0..c3cfcde9ee 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -115,6 +115,11 @@ public: const Pstream::commsTypes commsType = Pstream::commsTypes::blocking ); + + + // Member Operators + + using pointPatchField::operator=; }; diff --git a/src/OpenFOAM/global/fileOperations/collatedFileOperation/hostCollatedFileOperation.C b/src/OpenFOAM/global/fileOperations/collatedFileOperation/hostCollatedFileOperation.C index fa122cb032..d63bfa722a 100644 --- a/src/OpenFOAM/global/fileOperations/collatedFileOperation/hostCollatedFileOperation.C +++ b/src/OpenFOAM/global/fileOperations/collatedFileOperation/hostCollatedFileOperation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -119,7 +119,7 @@ Foam::labelList Foam::fileOperations::hostCollatedFileOperation::subRanks } } - return move(subRanks); + return subRanks; } diff --git a/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C b/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C index 901acb0a0a..fee6b69ac3 100644 --- a/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C +++ b/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C @@ -112,7 +112,8 @@ Foam::labelList Foam::fileOperations::masterUncollatedFileOperation::subRanks break; } } - return move(subRanks); + + return subRanks; } } diff --git a/src/OpenFOAM/meshes/meshObjects/DemandDrivenMeshObject.C b/src/OpenFOAM/meshes/meshObjects/DemandDrivenMeshObject.C index 1c0ca94dd3..38f6475f8a 100644 --- a/src/OpenFOAM/meshes/meshObjects/DemandDrivenMeshObject.C +++ b/src/OpenFOAM/meshes/meshObjects/DemandDrivenMeshObject.C @@ -87,9 +87,7 @@ Type& Foam::DemandDrivenMeshObject::New Type* objectPtr = new Type(mesh); - regIOobject::store(objectPtr); - - return *objectPtr; + return regIOobject::store(objectPtr); } } @@ -120,9 +118,7 @@ Type& Foam::DemandDrivenMeshObject::New Type* objectPtr = new Type(mesh, args...); - regIOobject::store(objectPtr); - - return *objectPtr; + return regIOobject::store(objectPtr); } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index a478ebcd88..f79cfd4ce9 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -680,7 +680,7 @@ Foam::labelList Foam::polyBoundaryMesh::findIndices } } - return move(indices); + return indices; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C index df63e00e8c..e476bcb49b 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -551,7 +551,7 @@ Foam::List Foam::polyMeshTetDecomposition::cellTetIndices cellTets.append(faceTetIndices(mesh, fI, cI)); } - return move(cellTets); + return cellTets; } diff --git a/src/conversion/polyDualMesh/polyDualMesh.C b/src/conversion/polyDualMesh/polyDualMesh.C index 78b2c6ad5e..488ef6743d 100644 --- a/src/conversion/polyDualMesh/polyDualMesh.C +++ b/src/conversion/polyDualMesh/polyDualMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -317,7 +317,7 @@ Foam::labelList Foam::polyDualMesh::collectPatchSideFace reverse(dualFace); } - return move(dualFace); + return dualFace; } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H index a7989ca6bc..755599af1c 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -121,6 +121,11 @@ public: //- Return face-gradient transform diagonal virtual tmp> snGradTransformDiag() const; + + + // Member Operators + + using transformFvPatchField::operator=; }; diff --git a/src/finiteVolume/fvMeshToFvMesh/patchToPatchFvPatchFieldMapper.H b/src/finiteVolume/fvMeshToFvMesh/patchToPatchFvPatchFieldMapper.H index 6092773866..ef4d4644e1 100644 --- a/src/finiteVolume/fvMeshToFvMesh/patchToPatchFvPatchFieldMapper.H +++ b/src/finiteVolume/fvMeshToFvMesh/patchToPatchFvPatchFieldMapper.H @@ -82,6 +82,8 @@ public: //- Map a label field (not implemented) DEFINE_FIELD_MAPPER_OPERATOR(label, ); + using fvPatchFieldMapper::operator(); + //- Map a temporary field template void operator()(Field& f, const tmp>& tmapF) const; diff --git a/src/functionObjects/forces/forces/forces.C b/src/functionObjects/forces/forces/forces.C index 2a720ac78d..f0410361c8 100644 --- a/src/functionObjects/forces/forces/forces.C +++ b/src/functionObjects/forces/forces/forces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,7 +71,7 @@ Foam::wordList Foam::functionObjects::forces::createFileNames } } - return move(names); + return names; } diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C index 24172fa5ad..e497d56487 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C @@ -77,7 +77,7 @@ Foam::labelList Foam::medialAxisMeshMover::getFixedValueBCs } } - return Foam::move(adaptPatchIDs); + return adaptPatchIDs; } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index eadeef0bb8..eb195a4b8a 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -2067,7 +2067,7 @@ Foam::labelList Foam::meshRefinement::meshedPatches() const } } - return move(patchIDs); + return patchIDs; } diff --git a/src/mesh/snappyHexMesh/refinementRegions/refinementRegions.C b/src/mesh/snappyHexMesh/refinementRegions/refinementRegions.C index 01fd4447de..45d5960a0b 100644 --- a/src/mesh/snappyHexMesh/refinementRegions/refinementRegions.C +++ b/src/mesh/snappyHexMesh/refinementRegions/refinementRegions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -222,11 +222,12 @@ void Foam::refinementRegions::orient() if (shell.triSurface::size()) { - const pointField& points = shell.points(); + tmp tpoints(shell.points()); + const pointField& points = tpoints(); hasSurface = true; - boundBox shellBb(points[0], points[0]); + // Assume surface is compact! forAll(points, i) { diff --git a/src/meshTools/meshSearch/meshSearch.C b/src/meshTools/meshSearch/meshSearch.C index c1ddadac28..3ba51aa1cd 100644 --- a/src/meshTools/meshSearch/meshSearch.C +++ b/src/meshTools/meshSearch/meshSearch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -882,7 +882,7 @@ Foam::List Foam::meshSearch::intersections hits.shrink(); - return move(hits); + return hits; } diff --git a/src/meshTools/patchToPatch/patchToPatchStabilisation/patchToPatchStabilisation.C b/src/meshTools/patchToPatch/patchToPatchStabilisation/patchToPatchStabilisation.C index e0e89cd544..e266c8163c 100644 --- a/src/meshTools/patchToPatch/patchToPatchStabilisation/patchToPatchStabilisation.C +++ b/src/meshTools/patchToPatch/patchToPatchStabilisation/patchToPatchStabilisation.C @@ -191,12 +191,13 @@ void Foam::patchToPatchStabilisation::update + "_connections.obj" ); - pointField fcs(patch.faceCentres()); - stabilise(fcs); + const pointField fcs(patch.faceCentres()); + pointField sfcs(fcs); + stabilise(sfcs); forAll(fcs, celli) { - const point& c = patch.faceCentres()[celli]; + const point& c = fcs[celli]; if (magSqr(c - fcs[celli]) == 0) continue; obj.write(linePointRef(fcs[celli], c)); } diff --git a/src/meshTools/searchableSurfaces/triSurfaceMesh/extractCloseness.C b/src/meshTools/searchableSurfaces/triSurfaceMesh/extractCloseness.C index 755b896960..58a6e9308d 100644 --- a/src/meshTools/searchableSurfaces/triSurfaceMesh/extractCloseness.C +++ b/src/meshTools/searchableSurfaces/triSurfaceMesh/extractCloseness.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,7 +43,8 @@ void Foam::triSurfaceMesh::drawHitProblem if (debug) { const List& tris = *this; - const pointField& points = this->points(); + tmp tpoints = points(); + const pointField& points = tpoints(); Info<< nl << "# findLineAll did not hit its own face." << nl << "# fi " << fi @@ -316,7 +317,8 @@ Foam::triSurfaceMesh::extractPointCloseness // Prepare start and end points for intersection tests - const pointField& points = this->points(); + tmp tpoints = points(); + const pointField& points = tpoints(); const labelList& meshPoints = this->meshPoints(); const pointField& faceCentres = this->faceCentres(); const vectorField& normals = this->faceNormals(); diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C index 51b5e68f2c..8d3c35da68 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1114,7 +1114,7 @@ Foam::faceList Foam::intersectedSurface::splitFace } } - return move(faces); + return faces; } diff --git a/src/parallel/decompose/decompositionMethods/manualDecomp/manualDecomp.C b/src/parallel/decompose/decompositionMethods/manualDecomp/manualDecomp.C index 894d1560b4..a114d9ebb9 100644 --- a/src/parallel/decompose/decompositionMethods/manualDecomp/manualDecomp.C +++ b/src/parallel/decompose/decompositionMethods/manualDecomp/manualDecomp.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -115,7 +115,7 @@ Foam::labelList Foam::manualDecomp::decompose << exit(FatalError); } - return move(finalDecomp); + return finalDecomp; } diff --git a/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C b/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C index fa4e440f39..0530a28121 100644 --- a/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C +++ b/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C @@ -395,7 +395,7 @@ Foam::labelList Foam::multiLevelDecomp::decompose finalDecomp ); - return move(finalDecomp); + return finalDecomp; } @@ -420,7 +420,7 @@ Foam::labelList Foam::multiLevelDecomp::decompose finalDecomp ); - return move(finalDecomp); + return finalDecomp; } diff --git a/src/renumber/renumberMethods/manualRenumber/manualRenumber.C b/src/renumber/renumberMethods/manualRenumber/manualRenumber.C index 101dbf0f7b..77d765fe2f 100644 --- a/src/renumber/renumberMethods/manualRenumber/manualRenumber.C +++ b/src/renumber/renumberMethods/manualRenumber/manualRenumber.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,7 +122,7 @@ Foam::labelList Foam::manualRenumber::renumber } } - return move(newToOld); + return newToOld; } diff --git a/src/specieTransfer/derivedFvPatchFields/specieTransferMassFraction/specieTransferMassFractionFvPatchScalarField.H b/src/specieTransfer/derivedFvPatchFields/specieTransferMassFraction/specieTransferMassFractionFvPatchScalarField.H index 91aebcab61..084452815e 100644 --- a/src/specieTransfer/derivedFvPatchFields/specieTransferMassFraction/specieTransferMassFractionFvPatchScalarField.H +++ b/src/specieTransfer/derivedFvPatchFields/specieTransferMassFraction/specieTransferMassFractionFvPatchScalarField.H @@ -181,6 +181,11 @@ public: virtual void updateCoeffs(); + // Member Operators + + using mixedFvPatchScalarField::operator=; + + //- Write virtual void write(Ostream&) const; };