OpenFOAM: Updated all libraries, solvers and utilities to use the new const-safe tmp

The deprecated non-const tmp functionality is now on the compiler switch
NON_CONST_TMP which can be enabled by adding -DNON_CONST_TMP to EXE_INC
in the Make/options file.  However, it is recommended to upgrade all
code to the new safer tmp by using the '.ref()' member function rather
than the non-const '()' dereference operator when non-const access to
the temporary object is required.

Please report any problems on Mantis.

Henry G. Weller
CFD Direct.
This commit is contained in:
Henry Weller
2016-02-26 17:31:28 +00:00
parent f4ba71ddd0
commit cd852be3da
169 changed files with 511 additions and 477 deletions

View File

@ -62,7 +62,7 @@
if (MULESCorr)
{
talphaPhiCorr() -= talphaPhi();
talphaPhiCorr.ref() -= talphaPhi();
volScalarField alpha100("alpha100", alpha10);
alpha10 = alpha1;
@ -72,7 +72,7 @@
geometricOneField(),
alpha1,
talphaPhi(),
talphaPhiCorr(),
talphaPhiCorr.ref(),
vDotvmcAlphal,
(
divU*(alpha10 - alpha100)
@ -85,12 +85,12 @@
// Under-relax the correction for all but the 1st corrector
if (aCorr == 0)
{
talphaPhi() += talphaPhiCorr();
talphaPhi.ref() += talphaPhiCorr();
}
else
{
alpha1 = 0.5*alpha1 + 0.5*alpha10;
talphaPhi() += 0.5*talphaPhiCorr();
talphaPhi.ref() += 0.5*talphaPhiCorr();
}
}
else
@ -100,7 +100,7 @@
geometricOneField(),
alpha1,
phi,
talphaPhiCorr(),
talphaPhiCorr.ref(),
vDotvmcAlphal,
(divU*alpha1 + vDotcAlphal)(),
1,