OpenFOAM: Updated for gcc-13

gcc-13 has new code checking and warning mechanisms which are useful but not
entirely robust and produce many false positives, particularly with respect to
local references:

    warning: possibly dangling reference to a temporary

This commit resolves many of the new warning messages but the above false
warnings remain.  It is possible to switch off this warning but as it also
provides some useful checks it is currently left on.
This commit is contained in:
Henry Weller
2023-05-23 10:47:56 +01:00
parent 9d7c3d8768
commit fec6705dc9
59 changed files with 180 additions and 129 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,7 +70,9 @@ Foam::XiEqModels::Gulder::~Gulder()
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
{ {
volScalarField up(sqrt((2.0/3.0)*turbulence_.k())); volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
const volScalarField& epsilon = turbulence_.epsilon();
tmp<volScalarField> tepsilon = turbulence_.epsilon();
const volScalarField& epsilon = tepsilon();
if (subGridSchelkin_) if (subGridSchelkin_)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,8 +76,11 @@ Foam::XiEqModels::SCOPEXiEq::~SCOPEXiEq()
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
{ {
const volScalarField& k = turbulence_.k(); tmp<volScalarField> tk = turbulence_.k();
const volScalarField& epsilon = turbulence_.epsilon(); const volScalarField& k = tk();
tmp<volScalarField> tepsilon = turbulence_.epsilon();
const volScalarField& epsilon = tepsilon();
volScalarField up(sqrt((2.0/3.0)*k)); volScalarField up(sqrt((2.0/3.0)*k));
if (subGridSchelkin_) if (subGridSchelkin_)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -64,7 +64,9 @@ Foam::XiGModels::KTS::~KTS()
Foam::tmp<Foam::volScalarField> Foam::XiGModels::KTS::G() const Foam::tmp<Foam::volScalarField> Foam::XiGModels::KTS::G() const
{ {
volScalarField up(sqrt((2.0/3.0)*turbulence_.k())); volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
const volScalarField& epsilon = turbulence_.epsilon();
tmp<volScalarField> tepsilon = turbulence_.epsilon();
const volScalarField& epsilon = tepsilon();
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)))); volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));

View File

@ -80,7 +80,7 @@ void Foam::solvers::compressibleMultiphaseVoF::pressureCorrector()
{ {
const compressibleVoFphase& phase = phases[phasei]; const compressibleVoFphase& phase = phases[phasei];
const rhoThermo& thermo = phase.thermo(); const rhoThermo& thermo = phase.thermo();
const volScalarField& rho = thermo.rho()(); const volScalarField& rho = phases[phasei].thermo().rho();
p_rghEqnComps.set p_rghEqnComps.set
( (

View File

@ -143,8 +143,8 @@ void Foam::solvers::compressibleVoF::prePredictor()
{ {
twoPhaseVoFSolver::prePredictor(); twoPhaseVoFSolver::prePredictor();
const volScalarField& rho1 = mixture.thermo1().rho(); const volScalarField& rho1 = mixture_.thermo1().rho();
const volScalarField& rho2 = mixture.thermo2().rho(); const volScalarField& rho2 = mixture_.thermo2().rho();
alphaRhoPhi1 = fvc::interpolate(rho1)*alphaPhi1; alphaRhoPhi1 = fvc::interpolate(rho1)*alphaPhi1;
alphaRhoPhi2 = fvc::interpolate(rho2)*(phi - alphaPhi1); alphaRhoPhi2 = fvc::interpolate(rho2)*(phi - alphaPhi1);

View File

@ -233,7 +233,7 @@ Foam::wordList Foam::solvers::isothermalFilm::alphaTypes() const
Foam::solvers::isothermalFilm::isothermalFilm Foam::solvers::isothermalFilm::isothermalFilm
( (
fvMesh& mesh, fvMesh& mesh,
autoPtr<fluidThermo> thermoPtr autoPtr<rhoThermo> thermoPtr
) )
: :
solver(mesh), solver(mesh),
@ -403,7 +403,7 @@ Foam::solvers::isothermalFilm::isothermalFilm
Foam::solvers::isothermalFilm::isothermalFilm(fvMesh& mesh) Foam::solvers::isothermalFilm::isothermalFilm(fvMesh& mesh)
: :
isothermalFilm(mesh, fluidThermo::New(mesh)) isothermalFilm(mesh, rhoThermo::New(mesh))
{} {}

View File

@ -46,7 +46,7 @@ See also
#define isothermalFilm_H #define isothermalFilm_H
#include "solver.H" #include "solver.H"
#include "fluidThermo.H" #include "rhoThermo.H"
#include "filmCompressibleMomentumTransportModel.H" #include "filmCompressibleMomentumTransportModel.H"
#include "uniformDimensionedFields.H" #include "uniformDimensionedFields.H"
@ -93,10 +93,10 @@ protected:
// Thermophysical properties // Thermophysical properties
//- Pointer to the fluid thermophysical properties //- Pointer to the fluid thermophysical properties
autoPtr<fluidThermo> thermoPtr_; autoPtr<rhoThermo> thermoPtr_;
//- Reference to the fluid thermophysical properties //- Reference to the fluid thermophysical properties
fluidThermo& thermo_; rhoThermo& thermo_;
//- The thermodynamic pressure field //- The thermodynamic pressure field
volScalarField& p; volScalarField& p;
@ -276,7 +276,7 @@ public:
const volScalarField& alpha; const volScalarField& alpha;
//- Reference to the fluid thermophysical properties //- Reference to the fluid thermophysical properties
const fluidThermo& thermo; const rhoThermo& thermo;
//- Reference to the thermodynamic density field //- Reference to the thermodynamic density field
const volScalarField& rho; const volScalarField& rho;
@ -300,7 +300,7 @@ public:
// Constructors // Constructors
//- Construct from region mesh and thermophysical properties //- Construct from region mesh and thermophysical properties
isothermalFilm(fvMesh& mesh, autoPtr<fluidThermo>); isothermalFilm(fvMesh& mesh, autoPtr<rhoThermo>);
//- Construct from region mesh //- Construct from region mesh
isothermalFilm(fvMesh& mesh); isothermalFilm(fvMesh& mesh);

View File

@ -131,7 +131,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const
const volScalarField::Internal ReI const volScalarField::Internal ReI
( (
(interface_.rho()()()*interface_.magUr()()()) (interface_.rho()()*interface_.magUr()()())
/(magGradI*limitedAlpha1*limitedAlpha2*muI) /(magGradI*limitedAlpha1*limitedAlpha2*muI)
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -157,8 +157,6 @@ JohnsonJacksonSchaeffer::nu
} }
const fvPatchList& patches = phase.mesh().boundary(); const fvPatchList& patches = phase.mesh().boundary();
const volVectorField& U = phase.U();
volScalarField::Boundary& nufBf = nuf.boundaryFieldRef(); volScalarField::Boundary& nufBf = nuf.boundaryFieldRef();
forAll(patches, patchi) forAll(patches, patchi)
@ -169,7 +167,7 @@ JohnsonJacksonSchaeffer::nu
( (
pf.boundaryField()[patchi]*sin(phi_.value()) pf.boundaryField()[patchi]*sin(phi_.value())
/( /(
mag(U.boundaryField()[patchi].snGrad()) mag(phase.U()().boundaryField()[patchi].snGrad())
+ small + small
) )
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -146,8 +146,6 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu
} }
const fvPatchList& patches = phase.mesh().boundary(); const fvPatchList& patches = phase.mesh().boundary();
const volVectorField& U = phase.U();
volScalarField::Boundary& nufBf = nuf.boundaryFieldRef(); volScalarField::Boundary& nufBf = nuf.boundaryFieldRef();
forAll(patches, patchi) forAll(patches, patchi)
@ -158,7 +156,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu
( (
pf.boundaryField()[patchi]*sin(phi_.value()) pf.boundaryField()[patchi]*sin(phi_.value())
/( /(
mag(U.boundaryField()[patchi].snGrad()) mag(phase.U()().boundaryField()[patchi].snGrad())
+ small + small
) )
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -410,7 +410,9 @@ void Foam::RASModels::kineticTheoryModel::correct()
const volScalarField& rho = phase_.rho(); const volScalarField& rho = phase_.rho();
const surfaceScalarField& alphaRhoPhi = alphaRhoPhi_; const surfaceScalarField& alphaRhoPhi = alphaRhoPhi_;
const volVectorField& U = U_; const volVectorField& U = U_;
const volVectorField& Uc_ = continuousPhase.U();
tmp<volVectorField> tUc(continuousPhase.U());
const volVectorField& Uc = tUc();
const scalar sqrtPi = sqrt(constant::mathematical::pi); const scalar sqrtPi = sqrt(constant::mathematical::pi);
const dimensionedScalar ThetaSmall("ThetaSmall", Theta_.dimensions(), 1e-6); const dimensionedScalar ThetaSmall("ThetaSmall", Theta_.dimensions(), 1e-6);
@ -470,7 +472,7 @@ void Foam::RASModels::kineticTheoryModel::correct()
const volScalarField J2 const volScalarField J2
( (
"J2", "J2",
0.25*sqr(beta)*da*magSqr(U - Uc_) 0.25*sqr(beta)*da*magSqr(U - Uc)
/( /(
max(alpha, residualAlpha_)*rho max(alpha, residualAlpha_)*rho
*sqrtPi*(ThetaSqrt + ThetaSmallSqrt) *sqrtPi*(ThetaSqrt + ThetaSmallSqrt)

View File

@ -63,7 +63,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector()
fvc::interpolate fvc::interpolate
( (
max(alpha.oldTime(), phase.residualAlpha()) max(alpha.oldTime(), phase.residualAlpha())
*phase.rho()().oldTime() *phase.rho().oldTime()
) )
).ptr() ).ptr()
); );

View File

@ -133,8 +133,14 @@ KocamustafaogullariIshiiDepartureDiameter::dDeparture
Tl, Tl,
Tsatw, Tsatw,
L, L,
liquid.thermo().rho(patchi)(), static_cast<const scalarField&>
vapour.thermo().rho(patchi)(), (
liquid.rho().boundaryField()[patchi]
),
static_cast<const scalarField&>
(
vapour.rho().boundaryField()[patchi]
),
liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour), patchi)() liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour), patchi)()
); );
} }
@ -158,8 +164,8 @@ KocamustafaogullariIshiiDepartureDiameter::dDeparture
liquid.thermo().T(), liquid.thermo().T(),
Tsatw, Tsatw,
L, L,
liquid.thermo().rho()(), liquid.rho(),
vapour.thermo().rho()(), vapour.rho(),
liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour))() liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour))()
); );
} }

View File

@ -143,8 +143,8 @@ Foam::wallBoilingModels::departureFrequencyModels::Cole::fDeparture
( (
liquid.mesh(), liquid.mesh(),
dDep, dDep,
liquid.thermo().rho()(), liquid.rho(),
vapour.thermo().rho()() vapour.rho()
); );
} }

View File

@ -128,8 +128,14 @@ KocamustafaogullariIshiiDepartureFrequency::fDeparture
( (
liquid.mesh(), liquid.mesh(),
dDep, dDep,
liquid.thermo().rho(patchi)(), static_cast<const scalarField&>
vapour.thermo().rho(patchi)(), (
liquid.rho().boundaryField()[patchi]
),
static_cast<const scalarField&>
(
vapour.rho().boundaryField()[patchi]
),
liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour), patchi)() liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour), patchi)()
); );
} }
@ -153,8 +159,8 @@ KocamustafaogullariIshiiDepartureFrequency::fDeparture
( (
liquid.mesh(), liquid.mesh(),
dDep, dDep,
liquid.thermo().rho()(), liquid.rho(),
vapour.thermo().rho()(), vapour.rho(),
liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour))() liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour))()
); );
} }

View File

@ -145,8 +145,14 @@ KocamustafaogullariIshiiNucleationSite::nucleationSiteDensity
L, L,
dDep, dDep,
Tw, Tw,
liquid.thermo().rho(patchi)(), static_cast<const scalarField&>
vapour.thermo().rho(patchi)(), (
liquid.rho().boundaryField()[patchi]
),
static_cast<const scalarField&>
(
vapour.rho().boundaryField()[patchi]
),
liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour), patchi)() liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour), patchi)()
); );
} }
@ -172,8 +178,8 @@ KocamustafaogullariIshiiNucleationSite::nucleationSiteDensity
L, L,
dDep, dDep,
Tf, Tf,
liquid.thermo().rho()(), liquid.rho(),
vapour.thermo().rho()(), vapour.rho(),
liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour))() liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour))()
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -693,7 +693,7 @@ correctInterfaceThermo()
const volScalarField rhoKDL const volScalarField rhoKDL
( (
phase.thermo().rho() phase.rho()
*diffusiveMassTransferModel.modelInThe(phase).K() *diffusiveMassTransferModel.modelInThe(phase).K()
*compositionModel.modelInThe(phase).D(specie) *compositionModel.modelInThe(phase).D(specie)
*this->Li *this->Li

View File

@ -280,7 +280,9 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::momentumTransfer()
fvVectorMatrix& eqn = *eqns[phase.name()]; fvVectorMatrix& eqn = *eqns[phase.name()];
const volVectorField& U = eqn.psi(); const volVectorField& U = eqn.psi();
const surfaceScalarField& phi = phase.phi();
tmp<surfaceScalarField> tphi(phase.phi());
const surfaceScalarField& phi = tphi();
const tmp<surfaceScalarField> taphi(fvc::absolute(phi, U)); const tmp<surfaceScalarField> taphi(fvc::absolute(phi, U));
const surfaceScalarField& aphi(taphi()); const surfaceScalarField& aphi(taphi());
@ -420,8 +422,11 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::momentumTransferf()
if (!phase.stationary()) if (!phase.stationary())
{ {
const volVectorField& U = phase.U(); tmp<volVectorField> tU = phase.U();
const surfaceScalarField& phi = phase.phi(); const volVectorField& U = tU();
tmp<surfaceScalarField> tphi(phase.phi());
const surfaceScalarField& phi = tphi();
const tmp<surfaceScalarField> taphi(fvc::absolute(phi, U)); const tmp<surfaceScalarField> taphi(fvc::absolute(phi, U));
const surfaceScalarField& aphi(taphi()); const surfaceScalarField& aphi(taphi());
@ -1132,7 +1137,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::ddtCorrs() const
fvc::ddtCorr fvc::ddtCorr
( (
phase, phase,
phase.rho()(), phase.rho(),
phase.U()(), phase.U()(),
phase.phi()(), phase.phi()(),
phase.Uf() phase.Uf()

View File

@ -129,7 +129,7 @@ void Foam::diameterModels::IATE::correct()
+ fvc::div(phase().alphaPhi()) + fvc::div(phase().alphaPhi())
) )
- ( - (
fvc::ddt(phase(), phase().rho()()) fvc::ddt(phase(), phase().rho())
+ fvc::div(phase().alphaRhoPhi()) + fvc::div(phase().alphaRhoPhi())
)/phase().rho() )/phase().rho()
), ),

View File

@ -170,7 +170,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
phaseCompressible::momentumTransportModel::New phaseCompressible::momentumTransportModel::New
( (
*this, *this,
this->thermo().rho(), this->rho(),
U_, U_,
alphaRhoPhi_, alphaRhoPhi_,
phi_, phi_,
@ -335,7 +335,7 @@ Foam::tmp<Foam::fvVectorMatrix>
Foam::MovingPhaseModel<BasePhaseModel>::UEqn() Foam::MovingPhaseModel<BasePhaseModel>::UEqn()
{ {
const volScalarField& alpha = *this; const volScalarField& alpha = *this;
const volScalarField& rho = this->thermo().rho(); const volScalarField& rho = this->rho();
return return
( (
@ -355,7 +355,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::UfEqn()
// As the "normal" U-eqn but without the ddt terms // As the "normal" U-eqn but without the ddt terms
const volScalarField& alpha = *this; const volScalarField& alpha = *this;
const volScalarField& rho = this->thermo().rho(); const volScalarField& rho = this->rho();
return return
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -91,7 +91,7 @@ Foam::tmp<Foam::fvScalarMatrix>
Foam::MulticomponentPhaseModel<BasePhaseModel>::YiEqn(volScalarField& Yi) Foam::MulticomponentPhaseModel<BasePhaseModel>::YiEqn(volScalarField& Yi)
{ {
const volScalarField& alpha = *this; const volScalarField& alpha = *this;
const volScalarField& rho = this->thermo().rho(); const volScalarField& rho = this->rho();
const tmp<surfaceScalarField> talphaRhoPhi(this->alphaRhoPhi()); const tmp<surfaceScalarField> talphaRhoPhi(this->alphaRhoPhi());
const surfaceScalarField& alphaRhoPhi(talphaRhoPhi()); const surfaceScalarField& alphaRhoPhi(talphaRhoPhi());

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -90,7 +90,7 @@ Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::thermoRef()
template<class BasePhaseModel, class ThermoModel> template<class BasePhaseModel, class ThermoModel>
Foam::tmp<Foam::volScalarField> const Foam::volScalarField&
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::rho() const Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::rho() const
{ {
return thermo_->rho(); return thermo_->rho();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -103,7 +103,7 @@ public:
virtual rhoThermo& thermoRef(); virtual rhoThermo& thermoRef();
//- Return the density field //- Return the density field
virtual tmp<volScalarField> rho() const; virtual const volScalarField& rho() const;
// Transport // Transport

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -210,7 +210,9 @@ void Foam::phaseModel::correctInflowOutflow(surfaceScalarField& alphaPhi) const
{ {
surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef(); surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef();
const volScalarField::Boundary& alphaBf = boundaryField(); const volScalarField::Boundary& alphaBf = boundaryField();
const surfaceScalarField::Boundary& phiBf = phi()().boundaryField();
tmp<surfaceScalarField> tphi(phi());
const surfaceScalarField::Boundary& phiBf = tphi().boundaryField();
forAll(alphaPhiBf, patchi) forAll(alphaPhiBf, patchi)
{ {

View File

@ -261,7 +261,7 @@ public:
virtual rhoThermo& thermoRef() = 0; virtual rhoThermo& thermoRef() = 0;
//- Return the density field //- Return the density field
virtual tmp<volScalarField> rho() const = 0; virtual const volScalarField& rho() const = 0;
//- Return whether the phase is isothermal //- Return whether the phase is isothermal
virtual bool isothermal() const = 0; virtual bool isothermal() const = 0;

View File

@ -701,7 +701,8 @@ void Foam::phaseSystem::correctBoundaryFlux()
{ {
phaseModel& phase = movingPhases()[movingPhasei]; phaseModel& phase = movingPhases()[movingPhasei];
const volVectorField::Boundary& UBf = phase.U()().boundaryField(); tmp<volVectorField> tU(phase.U());
const volVectorField::Boundary& UBf = tU().boundaryField();
FieldField<fvsPatchField, scalar> phiRelBf FieldField<fvsPatchField, scalar> phiRelBf
( (
@ -806,7 +807,7 @@ void Foam::phaseSystem::correctPhi
phaseModel& phase = phases()[phasei]; phaseModel& phase = phases()[phasei];
const volScalarField& alpha = phase; const volScalarField& alpha = phase;
psi += alpha*phase.thermo().psi()/phase.thermo().rho(); psi += alpha*phase.thermo().psi()/phase.rho();
} }
fv::correctPhi fv::correctPhi

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -126,14 +126,14 @@ void Foam::diameterModels::LiaoBase::precompute()
( (
"rhoc", "rhoc",
dimDensity, dimDensity,
gAverage(populationBalance_.continuousPhase().rho()()) gAverage(populationBalance_.continuousPhase().rho())
); );
const dimensionedScalar rhod const dimensionedScalar rhod
( (
"rhod", "rhod",
dimDensity, dimDensity,
gAverage(populationBalance_.sizeGroups()[1].phase().rho()()) gAverage(populationBalance_.sizeGroups()[1].phase().rho())
); );
const dimensionedScalar sigma const dimensionedScalar sigma

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -107,7 +107,9 @@ addToCoalescenceRate
const sizeGroup& fj = popBal_.sizeGroups()[j]; const sizeGroup& fj = popBal_.sizeGroups()[j];
const volScalarField& T = popBal_.continuousPhase().thermo().T(); const volScalarField& T = popBal_.continuousPhase().thermo().T();
const volScalarField& mu = popBal_.continuousPhase().thermo().mu();
tmp<volScalarField> tmu(popBal_.continuousPhase().thermo().mu());
const volScalarField& mu = tmu();
const volScalarField Cci const volScalarField Cci
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -178,7 +178,7 @@ void Foam::diameterModels::coalescenceModels::LiaoCoalescence::precompute()
( (
popBal_.sigmaWithContinuousPhase(popBal_.sizeGroups()[1].phase())() popBal_.sigmaWithContinuousPhase(popBal_.sizeGroups()[1].phase())()
/(mag(g)*(popBal_.continuousPhase().rho() /(mag(g)*(popBal_.continuousPhase().rho()
- popBal_.sizeGroups()[1].phase().rho()())) - popBal_.sizeGroups()[1].phase().rho()))
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -74,9 +74,9 @@ addToCoalescenceRate
const sizeGroup& fi = popBal_.sizeGroups()[i]; const sizeGroup& fi = popBal_.sizeGroups()[i];
const sizeGroup& fj = popBal_.sizeGroups()[j]; const sizeGroup& fj = popBal_.sizeGroups()[j];
const volScalarField& epsilon = popBal_.continuousTurbulence().epsilon();
const volScalarField& rho = popBal_.continuousPhase().rho(); const volScalarField& rho = popBal_.continuousPhase().rho();
const volScalarField& mu = popBal_.continuousPhase().thermo().mu(); tmp<volScalarField> epsilon(popBal_.continuousTurbulence().epsilon());
tmp<volScalarField> mu(popBal_.continuousPhase().thermo().mu());
coalescenceRate += C_*sqrt(epsilon*rho/mu)*pow3(fi.d() + fj.d()); coalescenceRate += C_*sqrt(epsilon*rho/mu)*pow3(fi.d() + fj.d());
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -67,7 +67,7 @@ void Foam::diameterModels::driftModels::densityChangeDrift::addToDriftRate
const sizeGroup& fi = popBal_.sizeGroups()[i]; const sizeGroup& fi = popBal_.sizeGroups()[i];
const phaseModel& phase = fi.phase(); const phaseModel& phase = fi.phase();
const volScalarField& alpha = phase; const volScalarField& alpha = phase;
const volScalarField& rho = phase.thermo().rho(); const volScalarField& rho = phase.rho();
driftRate -= driftRate -=
fi.x() fi.x()

View File

@ -695,7 +695,7 @@ void Foam::diameterModels::populationBalanceModel::correctDilatationError()
const phaseModel& phase = fluid_.phases()[phaseName]; const phaseModel& phase = fluid_.phases()[phaseName];
const velocityGroup& velGroup = *velocityGroupPtrs_[phaseName]; const velocityGroup& velGroup = *velocityGroupPtrs_[phaseName];
const volScalarField& alpha = phase; const volScalarField& alpha = phase;
const volScalarField& rho = phase.thermo().rho(); const volScalarField& rho = phase.rho();
dilatationError = dilatationError =
fvc::ddt(alpha) + fvc::div(phase.alphaPhi()) fvc::ddt(alpha) + fvc::div(phase.alphaPhi())
@ -1167,7 +1167,7 @@ void Foam::diameterModels::populationBalanceModel::solve()
sizeGroup& fi = sizeGroups_[i]; sizeGroup& fi = sizeGroups_[i];
const phaseModel& phase = fi.phase(); const phaseModel& phase = fi.phase();
const volScalarField& alpha = phase; const volScalarField& alpha = phase;
const volScalarField& rho = phase.thermo().rho(); const volScalarField& rho = phase.rho();
const volScalarField& dilatationError = const volScalarField& dilatationError =
dilatationErrors_[phase.name()]; dilatationErrors_[phase.name()];

View File

@ -203,7 +203,7 @@ void Foam::solvers::solid::momentumPredictor()
void Foam::solvers::solid::thermophysicalPredictor() void Foam::solvers::solid::thermophysicalPredictor()
{ {
volScalarField& e = thermo_.he(); volScalarField& e = thermo_.he();
const volScalarField& rho = thermo.rho(); const volScalarField& rho = thermo_.rho();
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {

View File

@ -171,7 +171,7 @@ void Foam::solvers::solidDisplacement::pressureCorrector()
{ {
volVectorField& D(D_); volVectorField& D(D_);
const volScalarField& rho = thermo.rho(); const volScalarField& rho = thermo_.rho();
int iCorr = 0; int iCorr = 0;
scalar initialResidual = 0; scalar initialResidual = 0;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -741,9 +741,9 @@ void Foam::chemkinReader::addReaction
default: default:
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Reaction rate type " << reactionRateTypeNames[rrType] << "Reaction rate type index " << rrType
<< " on line " << lineNo_-1 << " on line " << lineNo_-1
<< " not implemented" << " unknown"
<< exit(FatalError); << exit(FatalError);
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -1354,7 +1354,7 @@ Foam::fileNameList Foam::dlLoaded()
<< " : determined loaded libraries :" << libs.size() << std::endl; << " : determined loaded libraries :" << libs.size() << std::endl;
} }
return move(libs); return libs;
} }

View File

@ -55,7 +55,7 @@ using std::move;
template<class T> template<class T>
inline T clone(const T& t) inline T clone(const T& t)
{ {
return move(T(t)); return T(t);
} }
// Forward declaration of classes // Forward declaration of classes

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -93,7 +93,7 @@ Foam::wordList Foam::functionObjects::writeObjectsBase::objectNames()
} }
} }
return move(allNames); return allNames;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -115,6 +115,11 @@ public:
const Pstream::commsTypes commsType = const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking Pstream::commsTypes::blocking
); );
// Member Operators
using pointPatchField<Type>::operator=;
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -119,7 +119,7 @@ Foam::labelList Foam::fileOperations::hostCollatedFileOperation::subRanks
} }
} }
return move(subRanks); return subRanks;
} }

View File

@ -112,7 +112,8 @@ Foam::labelList Foam::fileOperations::masterUncollatedFileOperation::subRanks
break; break;
} }
} }
return move(subRanks);
return subRanks;
} }
} }

View File

@ -87,9 +87,7 @@ Type& Foam::DemandDrivenMeshObject<Mesh, MeshObjectType, Type>::New
Type* objectPtr = new Type(mesh); Type* objectPtr = new Type(mesh);
regIOobject::store(objectPtr); return regIOobject::store(objectPtr);
return *objectPtr;
} }
} }
@ -120,9 +118,7 @@ Type& Foam::DemandDrivenMeshObject<Mesh, MeshObjectType, Type>::New
Type* objectPtr = new Type(mesh, args...); Type* objectPtr = new Type(mesh, args...);
regIOobject::store(objectPtr); return regIOobject::store(objectPtr);
return *objectPtr;
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -680,7 +680,7 @@ Foam::labelList Foam::polyBoundaryMesh::findIndices
} }
} }
return move(indices); return indices;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -551,7 +551,7 @@ Foam::List<Foam::tetIndices> Foam::polyMeshTetDecomposition::cellTetIndices
cellTets.append(faceTetIndices(mesh, fI, cI)); cellTets.append(faceTetIndices(mesh, fI, cI));
} }
return move(cellTets); return cellTets;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -317,7 +317,7 @@ Foam::labelList Foam::polyDualMesh::collectPatchSideFace
reverse(dualFace); reverse(dualFace);
} }
return move(dualFace); return dualFace;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -121,6 +121,11 @@ public:
//- Return face-gradient transform diagonal //- Return face-gradient transform diagonal
virtual tmp<Field<Type>> snGradTransformDiag() const; virtual tmp<Field<Type>> snGradTransformDiag() const;
// Member Operators
using transformFvPatchField<Type>::operator=;
}; };

View File

@ -82,6 +82,8 @@ public:
//- Map a label field (not implemented) //- Map a label field (not implemented)
DEFINE_FIELD_MAPPER_OPERATOR(label, ); DEFINE_FIELD_MAPPER_OPERATOR(label, );
using fvPatchFieldMapper::operator();
//- Map a temporary field //- Map a temporary field
template<class Type> template<class Type>
void operator()(Field<Type>& f, const tmp<Field<Type>>& tmapF) const; void operator()(Field<Type>& f, const tmp<Field<Type>>& tmapF) const;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -71,7 +71,7 @@ Foam::wordList Foam::functionObjects::forces::createFileNames
} }
} }
return move(names); return names;
} }

View File

@ -77,7 +77,7 @@ Foam::labelList Foam::medialAxisMeshMover::getFixedValueBCs
} }
} }
return Foam::move(adaptPatchIDs); return adaptPatchIDs;
} }

View File

@ -2067,7 +2067,7 @@ Foam::labelList Foam::meshRefinement::meshedPatches() const
} }
} }
return move(patchIDs); return patchIDs;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -222,11 +222,12 @@ void Foam::refinementRegions::orient()
if (shell.triSurface::size()) if (shell.triSurface::size())
{ {
const pointField& points = shell.points(); tmp<pointField> tpoints(shell.points());
const pointField& points = tpoints();
hasSurface = true; hasSurface = true;
boundBox shellBb(points[0], points[0]); boundBox shellBb(points[0], points[0]);
// Assume surface is compact! // Assume surface is compact!
forAll(points, i) forAll(points, i)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -882,7 +882,7 @@ Foam::List<Foam::pointIndexHit> Foam::meshSearch::intersections
hits.shrink(); hits.shrink();
return move(hits); return hits;
} }

View File

@ -191,12 +191,13 @@ void Foam::patchToPatchStabilisation::update
+ "_connections.obj" + "_connections.obj"
); );
pointField fcs(patch.faceCentres()); const pointField fcs(patch.faceCentres());
stabilise(fcs); pointField sfcs(fcs);
stabilise(sfcs);
forAll(fcs, celli) forAll(fcs, celli)
{ {
const point& c = patch.faceCentres()[celli]; const point& c = fcs[celli];
if (magSqr(c - fcs[celli]) == 0) continue; if (magSqr(c - fcs[celli]) == 0) continue;
obj.write(linePointRef(fcs[celli], c)); obj.write(linePointRef(fcs[celli], c));
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -43,7 +43,8 @@ void Foam::triSurfaceMesh::drawHitProblem
if (debug) if (debug)
{ {
const List<labelledTri>& tris = *this; const List<labelledTri>& tris = *this;
const pointField& points = this->points(); tmp<pointField> tpoints = points();
const pointField& points = tpoints();
Info<< nl << "# findLineAll did not hit its own face." Info<< nl << "# findLineAll did not hit its own face."
<< nl << "# fi " << fi << nl << "# fi " << fi
@ -316,7 +317,8 @@ Foam::triSurfaceMesh::extractPointCloseness
// Prepare start and end points for intersection tests // Prepare start and end points for intersection tests
const pointField& points = this->points(); tmp<pointField> tpoints = points();
const pointField& points = tpoints();
const labelList& meshPoints = this->meshPoints(); const labelList& meshPoints = this->meshPoints();
const pointField& faceCentres = this->faceCentres(); const pointField& faceCentres = this->faceCentres();
const vectorField& normals = this->faceNormals(); const vectorField& normals = this->faceNormals();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -1114,7 +1114,7 @@ Foam::faceList Foam::intersectedSurface::splitFace
} }
} }
return move(faces); return faces;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -115,7 +115,7 @@ Foam::labelList Foam::manualDecomp::decompose
<< exit(FatalError); << exit(FatalError);
} }
return move(finalDecomp); return finalDecomp;
} }

View File

@ -395,7 +395,7 @@ Foam::labelList Foam::multiLevelDecomp::decompose
finalDecomp finalDecomp
); );
return move(finalDecomp); return finalDecomp;
} }
@ -420,7 +420,7 @@ Foam::labelList Foam::multiLevelDecomp::decompose
finalDecomp finalDecomp
); );
return move(finalDecomp); return finalDecomp;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -122,7 +122,7 @@ Foam::labelList Foam::manualRenumber::renumber
} }
} }
return move(newToOld); return newToOld;
} }

View File

@ -181,6 +181,11 @@ public:
virtual void updateCoeffs(); virtual void updateCoeffs();
// Member Operators
using mixedFvPatchScalarField::operator=;
//- Write //- Write
virtual void write(Ostream&) const; virtual void write(Ostream&) const;
}; };