mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -84,7 +84,7 @@ tmp<volScalarField> createScalarField
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
volScalarField& fld = tfld();
|
||||
volScalarField& fld = tfld.ref();
|
||||
|
||||
forAll(fld, cellI)
|
||||
{
|
||||
|
||||
@ -181,7 +181,7 @@ void subsetVolFields
|
||||
{
|
||||
if (addedPatches.found(patchI))
|
||||
{
|
||||
tSubFld().boundaryField()[patchI] ==
|
||||
tSubFld.ref().boundaryField()[patchI] ==
|
||||
pTraits<typename GeoField::value_type>::zero;
|
||||
}
|
||||
}
|
||||
@ -233,7 +233,7 @@ void subsetSurfaceFields
|
||||
{
|
||||
if (addedPatches.found(patchI))
|
||||
{
|
||||
tSubFld().boundaryField()[patchI] ==
|
||||
tSubFld.ref().boundaryField()[patchI] ==
|
||||
pTraits<typename GeoField::value_type>::zero;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user