Commit a1aabfa2 authored by Henry's avatar Henry
Browse files

OpenFOAM: Correct the handling of non-tmp construction from tmp if the tmp is cached

parent 8a991fea
......@@ -124,11 +124,7 @@ DimensionedField<Type, GeoMesh>::DimensionedField
const DimensionedField<Type, GeoMesh>& df
)
:
# ifdef ConstructFromTmp
regIOobject(df),
# else
regIOobject(df, true),
# endif
Field<Type>(df),
mesh_(df.mesh_),
dimensions_(df.dimensions_)
......@@ -142,7 +138,7 @@ DimensionedField<Type, GeoMesh>::DimensionedField
bool reUse
)
:
regIOobject(df, true),
regIOobject(df, reUse),
Field<Type>(df, reUse),
mesh_(df.mesh_),
dimensions_(df.dimensions_)
......@@ -169,7 +165,7 @@ DimensionedField<Type, GeoMesh>::DimensionedField
const tmp<DimensionedField<Type, GeoMesh> >& tdf
)
:
regIOobject(tdf(), true),
regIOobject(tdf(), tdf.isTmp()),
Field<Type>
(
const_cast<DimensionedField<Type, GeoMesh>&>(tdf()),
......
Supports Markdown
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