mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
FieldField, DimensionedField, GeometricField: Simplified tmp reuse and cleanup
This commit is contained in:
@ -93,8 +93,7 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
|
||||
\
|
||||
Foam::Func(tRes.ref(), gf1); \
|
||||
\
|
||||
reuseTmpGeometricField \
|
||||
<ReturnType, Type1, PatchField, GeoMesh>::clear(tgf1); \
|
||||
tgf1.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
}
|
||||
@ -163,8 +162,7 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
|
||||
\
|
||||
Foam::OpFunc(tRes.ref(), gf1); \
|
||||
\
|
||||
reuseTmpGeometricField \
|
||||
<ReturnType, Type1, PatchField, GeoMesh>::clear(tgf1); \
|
||||
tgf1.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
}
|
||||
@ -236,8 +234,7 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
|
||||
\
|
||||
Foam::Func(tRes.ref(), gf1, gf2); \
|
||||
\
|
||||
reuseTmpGeometricField \
|
||||
<ReturnType, Type2, PatchField, GeoMesh>::clear(tgf2); \
|
||||
tgf2.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
} \
|
||||
@ -263,8 +260,7 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
|
||||
\
|
||||
Foam::Func(tRes.ref(), gf1, gf2); \
|
||||
\
|
||||
reuseTmpGeometricField \
|
||||
<ReturnType, Type1, PatchField, GeoMesh>::clear(tgf1); \
|
||||
tgf1.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
} \
|
||||
@ -294,9 +290,8 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
|
||||
\
|
||||
Foam::Func(tRes.ref(), gf1, gf2); \
|
||||
\
|
||||
reuseTmpTmpGeometricField \
|
||||
<ReturnType, Type1, Type1, Type2, PatchField, GeoMesh> \
|
||||
::clear(tgf1, tgf2); \
|
||||
tgf1.clear(); \
|
||||
tgf2.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
}
|
||||
@ -378,8 +373,7 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
|
||||
\
|
||||
Foam::Func(tRes.ref(), dt1, gf2); \
|
||||
\
|
||||
reuseTmpGeometricField \
|
||||
<ReturnType, Type2, PatchField, GeoMesh>::clear(tgf2); \
|
||||
tgf2.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
} \
|
||||
@ -470,8 +464,7 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func \
|
||||
\
|
||||
Foam::Func(tRes.ref(), gf1, dt2); \
|
||||
\
|
||||
reuseTmpGeometricField \
|
||||
<ReturnType, Type1, PatchField, GeoMesh>::clear(tgf1); \
|
||||
tgf1.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
} \
|
||||
@ -560,8 +553,7 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
|
||||
\
|
||||
Foam::OpFunc(tRes.ref(), gf1, gf2); \
|
||||
\
|
||||
reuseTmpGeometricField \
|
||||
<ReturnType, Type2, PatchField, GeoMesh>::clear(tgf2); \
|
||||
tgf2.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
} \
|
||||
@ -587,8 +579,7 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
|
||||
\
|
||||
Foam::OpFunc(tRes.ref(), gf1, gf2); \
|
||||
\
|
||||
reuseTmpGeometricField \
|
||||
<ReturnType, Type1, PatchField, GeoMesh>::clear(tgf1); \
|
||||
tgf1.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
} \
|
||||
@ -617,9 +608,8 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
|
||||
\
|
||||
Foam::OpFunc(tRes.ref(), gf1, gf2); \
|
||||
\
|
||||
reuseTmpTmpGeometricField \
|
||||
<ReturnType, Type1, Type1, Type2, PatchField, GeoMesh> \
|
||||
::clear(tgf1, tgf2); \
|
||||
tgf1.clear(); \
|
||||
tgf2.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
}
|
||||
@ -702,8 +692,7 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
|
||||
\
|
||||
Foam::OpFunc(tRes.ref(), dt1, gf2); \
|
||||
\
|
||||
reuseTmpGeometricField<ReturnType, Type2, PatchField, GeoMesh> \
|
||||
::clear(tgf2); \
|
||||
tgf2.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
} \
|
||||
@ -794,8 +783,7 @@ tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op \
|
||||
\
|
||||
Foam::OpFunc(tRes.ref(), gf1, dt2); \
|
||||
\
|
||||
reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh> \
|
||||
::clear(tgf1); \
|
||||
tgf1.clear(); \
|
||||
\
|
||||
return tRes; \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user