FieldField, DimensionedField, GeometricField: Simplified tmp reuse and cleanup

This commit is contained in:
Henry Weller
2016-02-25 18:29:00 +00:00
parent 85fa6c2649
commit e1405f2260
14 changed files with 318 additions and 434 deletions

View File

@ -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; \
} \