Skip to content
Snippets Groups Projects
Commit 12dd3c9c authored by Henry Weller's avatar Henry Weller
Browse files

GeometricField: corrected assignment to tmp which wraps a non-tmp

parent 5991e30f
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -1164,11 +1164,18 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=
this->dimensions() = gf.dimensions();
// Transfer the storage from the tmp
primitiveFieldRef().transfer
(
const_cast<Field<Type>&>(gf.primitiveField())
);
if (tgf.isTmp())
{
// Transfer the storage from the tmp
primitiveFieldRef().transfer
(
const_cast<Field<Type>&>(gf.primitiveField())
);
}
else
{
primitiveFieldRef() = gf.primitiveField();
}
boundaryFieldRef() = gf.boundaryField();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment