Consistently indent continuation backslashes in macro definitions

This commit is contained in:
Henry Weller
2016-01-11 13:00:56 +00:00
parent 56fa7c0906
commit f19f48132e
167 changed files with 7803 additions and 7803 deletions

View File

@ -475,31 +475,31 @@ cmptAv(const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf)
}
#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc) \
\
template<class Type, template<class> class PatchField, class GeoMesh> \
dimensioned<returnType> func \
( \
const GeometricField<Type, PatchField, GeoMesh>& gf \
) \
{ \
return dimensioned<Type> \
( \
#func "(" + gf.name() + ')', \
gf.dimensions(), \
Foam::func(gFunc(gf.internalField()), gFunc(gf.boundaryField())) \
); \
} \
\
template<class Type, template<class> class PatchField, class GeoMesh> \
dimensioned<returnType> func \
( \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1 \
) \
{ \
dimensioned<returnType> res = func(tgf1()); \
tgf1.clear(); \
return res; \
#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc) \
\
template<class Type, template<class> class PatchField, class GeoMesh> \
dimensioned<returnType> func \
( \
const GeometricField<Type, PatchField, GeoMesh>& gf \
) \
{ \
return dimensioned<Type> \
( \
#func "(" + gf.name() + ')', \
gf.dimensions(), \
Foam::func(gFunc(gf.internalField()), gFunc(gf.boundaryField())) \
); \
} \
\
template<class Type, template<class> class PatchField, class GeoMesh> \
dimensioned<returnType> func \
( \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1 \
) \
{ \
dimensioned<returnType> res = func(tgf1()); \
tgf1.clear(); \
return res; \
}
UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, max, gMax)
@ -508,31 +508,31 @@ UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, min, gMin)
#undef UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY
#define UNARY_REDUCTION_FUNCTION(returnType, func, gFunc) \
\
template<class Type, template<class> class PatchField, class GeoMesh> \
dimensioned<returnType> func \
( \
const GeometricField<Type, PatchField, GeoMesh>& gf \
) \
{ \
return dimensioned<Type> \
( \
#func "(" + gf.name() + ')', \
gf.dimensions(), \
gFunc(gf.internalField()) \
); \
} \
\
template<class Type, template<class> class PatchField, class GeoMesh> \
dimensioned<returnType> func \
( \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1 \
) \
{ \
dimensioned<returnType> res = func(tgf1()); \
tgf1.clear(); \
return res; \
#define UNARY_REDUCTION_FUNCTION(returnType, func, gFunc) \
\
template<class Type, template<class> class PatchField, class GeoMesh> \
dimensioned<returnType> func \
( \
const GeometricField<Type, PatchField, GeoMesh>& gf \
) \
{ \
return dimensioned<Type> \
( \
#func "(" + gf.name() + ')', \
gf.dimensions(), \
gFunc(gf.internalField()) \
); \
} \
\
template<class Type, template<class> class PatchField, class GeoMesh> \
dimensioned<returnType> func \
( \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1 \
) \
{ \
dimensioned<returnType> res = func(tgf1()); \
tgf1.clear(); \
return res; \
}
UNARY_REDUCTION_FUNCTION(Type, sum, gSum)
@ -569,380 +569,380 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, '|', divide)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define PRODUCT_OPERATOR(product, op, opFunc) \
\
template \
<class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
void opFunc \
( \
GeometricField \
<typename product<Type1, Type2>::type, PatchField, GeoMesh>& gf, \
const GeometricField<Type1, PatchField, GeoMesh>& gf1, \
const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
) \
{ \
#define PRODUCT_OPERATOR(product, op, opFunc) \
\
template \
<class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
void opFunc \
( \
GeometricField \
<typename product<Type1, Type2>::type, PatchField, GeoMesh>& gf, \
const GeometricField<Type1, PatchField, GeoMesh>& gf1, \
const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
) \
{ \
Foam::opFunc(gf.internalField(), gf1.internalField(), gf2.internalField());\
Foam::opFunc(gf.boundaryField(), gf1.boundaryField(), gf2.boundaryField());\
} \
\
template \
<class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
tmp \
< \
} \
\
template \
<class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
tmp \
< \
GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
> \
operator op \
( \
const GeometricField<Type1, PatchField, GeoMesh>& gf1, \
const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
) \
{ \
typedef typename product<Type1, Type2>::type productType; \
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes \
( \
new GeometricField<productType, PatchField, GeoMesh> \
( \
IOobject \
( \
'(' + gf1.name() + #op + gf2.name() + ')', \
gf1.instance(), \
gf1.db(), \
IOobject::NO_READ, \
IOobject::NO_WRITE \
), \
gf1.mesh(), \
gf1.dimensions() op gf2.dimensions() \
) \
); \
\
Foam::opFunc(tRes(), gf1, gf2); \
\
return tRes; \
} \
\
template \
<class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
tmp \
< \
> \
operator op \
( \
const GeometricField<Type1, PatchField, GeoMesh>& gf1, \
const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
) \
{ \
typedef typename product<Type1, Type2>::type productType; \
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes \
( \
new GeometricField<productType, PatchField, GeoMesh> \
( \
IOobject \
( \
'(' + gf1.name() + #op + gf2.name() + ')', \
gf1.instance(), \
gf1.db(), \
IOobject::NO_READ, \
IOobject::NO_WRITE \
), \
gf1.mesh(), \
gf1.dimensions() op gf2.dimensions() \
) \
); \
\
Foam::opFunc(tRes(), gf1, gf2); \
\
return tRes; \
} \
\
template \
<class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
tmp \
< \
GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
> \
operator op \
( \
const GeometricField<Type1, PatchField, GeoMesh>& gf1, \
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2 \
) \
{ \
typedef typename product<Type1, Type2>::type productType; \
\
const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2(); \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes = \
reuseTmpGeometricField<productType, Type2, PatchField, GeoMesh>::New \
( \
tgf2, \
'(' + gf1.name() + #op + gf2.name() + ')', \
gf1.dimensions() op gf2.dimensions() \
); \
\
Foam::opFunc(tRes(), gf1, gf2); \
\
reuseTmpGeometricField<productType, Type2, PatchField, GeoMesh> \
::clear(tgf2); \
\
return tRes; \
} \
\
template \
<class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
tmp \
< \
> \
operator op \
( \
const GeometricField<Type1, PatchField, GeoMesh>& gf1, \
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2 \
) \
{ \
typedef typename product<Type1, Type2>::type productType; \
\
const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2(); \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes = \
reuseTmpGeometricField<productType, Type2, PatchField, GeoMesh>::New \
( \
tgf2, \
'(' + gf1.name() + #op + gf2.name() + ')', \
gf1.dimensions() op gf2.dimensions() \
); \
\
Foam::opFunc(tRes(), gf1, gf2); \
\
reuseTmpGeometricField<productType, Type2, PatchField, GeoMesh> \
::clear(tgf2); \
\
return tRes; \
} \
\
template \
<class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
tmp \
< \
GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
> \
operator op \
( \
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1, \
const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
) \
{ \
typedef typename product<Type1, Type2>::type productType; \
\
const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1(); \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes = \
reuseTmpGeometricField<productType, Type1, PatchField, GeoMesh>::New \
( \
tgf1, \
'(' + gf1.name() + #op + gf2.name() + ')', \
gf1.dimensions() op gf2.dimensions() \
); \
\
Foam::opFunc(tRes(), gf1, gf2); \
\
reuseTmpGeometricField<productType, Type1, PatchField, GeoMesh> \
::clear(tgf1); \
\
return tRes; \
} \
\
template \
<class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
tmp \
< \
> \
operator op \
( \
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1, \
const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
) \
{ \
typedef typename product<Type1, Type2>::type productType; \
\
const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1(); \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes = \
reuseTmpGeometricField<productType, Type1, PatchField, GeoMesh>::New \
( \
tgf1, \
'(' + gf1.name() + #op + gf2.name() + ')', \
gf1.dimensions() op gf2.dimensions() \
); \
\
Foam::opFunc(tRes(), gf1, gf2); \
\
reuseTmpGeometricField<productType, Type1, PatchField, GeoMesh> \
::clear(tgf1); \
\
return tRes; \
} \
\
template \
<class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
tmp \
< \
GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
> \
operator op \
( \
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1, \
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2 \
) \
{ \
typedef typename product<Type1, Type2>::type productType; \
\
const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1(); \
const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2(); \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes = \
reuseTmpTmpGeometricField \
<productType, Type1, Type1, Type2, PatchField, GeoMesh>::New \
( \
tgf1, \
tgf2, \
'(' + gf1.name() + #op + gf2.name() + ')', \
gf1.dimensions() op gf2.dimensions() \
); \
\
Foam::opFunc(tRes(), gf1, gf2); \
\
reuseTmpTmpGeometricField \
<productType, Type1, Type1, Type2, PatchField, GeoMesh> \
::clear(tgf1, tgf2); \
\
return tRes; \
} \
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
void opFunc \
( \
GeometricField \
<typename product<Type, Form>::type, PatchField, GeoMesh>& gf, \
const GeometricField<Type, PatchField, GeoMesh>& gf1, \
const dimensioned<Form>& dvs \
) \
{ \
Foam::opFunc(gf.internalField(), gf1.internalField(), dvs.value()); \
Foam::opFunc(gf.boundaryField(), gf1.boundaryField(), dvs.value()); \
} \
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
> \
operator op \
( \
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1, \
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2 \
) \
{ \
typedef typename product<Type1, Type2>::type productType; \
\
const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1(); \
const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2(); \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes = \
reuseTmpTmpGeometricField \
<productType, Type1, Type1, Type2, PatchField, GeoMesh>::New \
( \
tgf1, \
tgf2, \
'(' + gf1.name() + #op + gf2.name() + ')', \
gf1.dimensions() op gf2.dimensions() \
); \
\
Foam::opFunc(tRes(), gf1, gf2); \
\
reuseTmpTmpGeometricField \
<productType, Type1, Type1, Type2, PatchField, GeoMesh> \
::clear(tgf1, tgf2); \
\
return tRes; \
} \
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
void opFunc \
( \
GeometricField \
<typename product<Type, Form>::type, PatchField, GeoMesh>& gf, \
const GeometricField<Type, PatchField, GeoMesh>& gf1, \
const dimensioned<Form>& dvs \
) \
{ \
Foam::opFunc(gf.internalField(), gf1.internalField(), dvs.value()); \
Foam::opFunc(gf.boundaryField(), gf1.boundaryField(), dvs.value()); \
} \
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
tmp<GeometricField<typename product<Type, Form>::type, PatchField, GeoMesh>> \
operator op \
( \
const GeometricField<Type, PatchField, GeoMesh>& gf1, \
const dimensioned<Form>& dvs \
) \
{ \
typedef typename product<Type, Form>::type productType; \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes \
( \
new GeometricField<productType, PatchField, GeoMesh> \
( \
IOobject \
( \
'(' + gf1.name() + #op + dvs.name() + ')', \
gf1.instance(), \
gf1.db(), \
IOobject::NO_READ, \
IOobject::NO_WRITE \
), \
gf1.mesh(), \
gf1.dimensions() op dvs.dimensions() \
) \
); \
\
Foam::opFunc(tRes(), gf1, dvs); \
\
return tRes; \
} \
\
template \
< \
class Form, \
class Cmpt, \
int nCmpt, \
class Type, template<class> class PatchField, \
class GeoMesh \
> \
operator op \
( \
const GeometricField<Type, PatchField, GeoMesh>& gf1, \
const dimensioned<Form>& dvs \
) \
{ \
typedef typename product<Type, Form>::type productType; \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes \
( \
new GeometricField<productType, PatchField, GeoMesh> \
( \
IOobject \
( \
'(' + gf1.name() + #op + dvs.name() + ')', \
gf1.instance(), \
gf1.db(), \
IOobject::NO_READ, \
IOobject::NO_WRITE \
), \
gf1.mesh(), \
gf1.dimensions() op dvs.dimensions() \
) \
); \
\
Foam::opFunc(tRes(), gf1, dvs); \
\
return tRes; \
} \
\
template \
< \
class Form, \
class Cmpt, \
int nCmpt, \
class Type, template<class> class PatchField, \
class GeoMesh \
> \
tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>> \
operator op \
( \
const GeometricField<Type, PatchField, GeoMesh>& gf1, \
const VectorSpace<Form,Cmpt,nCmpt>& vs \
) \
{ \
return gf1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
} \
\
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
operator op \
( \
const GeometricField<Type, PatchField, GeoMesh>& gf1, \
const VectorSpace<Form,Cmpt,nCmpt>& vs \
) \
{ \
return gf1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
} \
\
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
tmp<GeometricField<typename product<Type, Form>::type, PatchField, GeoMesh>> \
operator op \
( \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1, \
const dimensioned<Form>& dvs \
) \
{ \
typedef typename product<Type, Form>::type productType; \
\
const GeometricField<Type, PatchField, GeoMesh>& gf1 = tgf1(); \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes = \
reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>::New \
( \
tgf1, \
'(' + gf1.name() + #op + dvs.name() + ')', \
gf1.dimensions() op dvs.dimensions() \
); \
\
Foam::opFunc(tRes(), gf1, dvs); \
\
reuseTmpGeometricField<productType, Type, PatchField, GeoMesh> \
::clear(tgf1); \
\
return tRes; \
} \
\
template \
< \
class Form, \
class Cmpt, \
int nCmpt, \
class Type, template<class> class PatchField, \
class GeoMesh \
> \
operator op \
( \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1, \
const dimensioned<Form>& dvs \
) \
{ \
typedef typename product<Type, Form>::type productType; \
\
const GeometricField<Type, PatchField, GeoMesh>& gf1 = tgf1(); \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes = \
reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>::New \
( \
tgf1, \
'(' + gf1.name() + #op + dvs.name() + ')', \
gf1.dimensions() op dvs.dimensions() \
); \
\
Foam::opFunc(tRes(), gf1, dvs); \
\
reuseTmpGeometricField<productType, Type, PatchField, GeoMesh> \
::clear(tgf1); \
\
return tRes; \
} \
\
template \
< \
class Form, \
class Cmpt, \
int nCmpt, \
class Type, template<class> class PatchField, \
class GeoMesh \
> \
tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>> \
operator op \
( \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1, \
const VectorSpace<Form,Cmpt,nCmpt>& vs \
) \
{ \
return tgf1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
} \
\
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
void opFunc \
( \
GeometricField \
<typename product<Form, Type>::type, PatchField, GeoMesh>& gf, \
const dimensioned<Form>& dvs, \
const GeometricField<Type, PatchField, GeoMesh>& gf1 \
) \
{ \
Foam::opFunc(gf.internalField(), dvs.value(), gf1.internalField()); \
Foam::opFunc(gf.boundaryField(), dvs.value(), gf1.boundaryField()); \
} \
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
operator op \
( \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1, \
const VectorSpace<Form,Cmpt,nCmpt>& vs \
) \
{ \
return tgf1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
} \
\
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
void opFunc \
( \
GeometricField \
<typename product<Form, Type>::type, PatchField, GeoMesh>& gf, \
const dimensioned<Form>& dvs, \
const GeometricField<Type, PatchField, GeoMesh>& gf1 \
) \
{ \
Foam::opFunc(gf.internalField(), dvs.value(), gf1.internalField()); \
Foam::opFunc(gf.boundaryField(), dvs.value(), gf1.boundaryField()); \
} \
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>> \
operator op \
( \
const dimensioned<Form>& dvs, \
const GeometricField<Type, PatchField, GeoMesh>& gf1 \
) \
{ \
typedef typename product<Form, Type>::type productType; \
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes \
( \
new GeometricField<productType, PatchField, GeoMesh> \
( \
IOobject \
( \
'(' + dvs.name() + #op + gf1.name() + ')', \
gf1.instance(), \
gf1.db(), \
IOobject::NO_READ, \
IOobject::NO_WRITE \
), \
gf1.mesh(), \
dvs.dimensions() op gf1.dimensions() \
) \
); \
\
Foam::opFunc(tRes(), dvs, gf1); \
\
return tRes; \
} \
\
template \
< \
class Form, \
class Cmpt, \
int nCmpt, \
class Type, template<class> class PatchField, \
class GeoMesh \
> \
operator op \
( \
const dimensioned<Form>& dvs, \
const GeometricField<Type, PatchField, GeoMesh>& gf1 \
) \
{ \
typedef typename product<Form, Type>::type productType; \
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes \
( \
new GeometricField<productType, PatchField, GeoMesh> \
( \
IOobject \
( \
'(' + dvs.name() + #op + gf1.name() + ')', \
gf1.instance(), \
gf1.db(), \
IOobject::NO_READ, \
IOobject::NO_WRITE \
), \
gf1.mesh(), \
dvs.dimensions() op gf1.dimensions() \
) \
); \
\
Foam::opFunc(tRes(), dvs, gf1); \
\
return tRes; \
} \
\
template \
< \
class Form, \
class Cmpt, \
int nCmpt, \
class Type, template<class> class PatchField, \
class GeoMesh \
> \
tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>> \
operator op \
( \
const VectorSpace<Form,Cmpt,nCmpt>& vs, \
const GeometricField<Type, PatchField, GeoMesh>& gf1 \
) \
{ \
return dimensioned<Form>(static_cast<const Form&>(vs)) op gf1; \
} \
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
operator op \
( \
const VectorSpace<Form,Cmpt,nCmpt>& vs, \
const GeometricField<Type, PatchField, GeoMesh>& gf1 \
) \
{ \
return dimensioned<Form>(static_cast<const Form&>(vs)) op gf1; \
} \
\
template \
<class Form, class Type, template<class> class PatchField, class GeoMesh> \
tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>> \
operator op \
( \
const dimensioned<Form>& dvs, \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1 \
) \
{ \
typedef typename product<Form, Type>::type productType; \
\
const GeometricField<Type, PatchField, GeoMesh>& gf1 = tgf1(); \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes = \
reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>::New \
( \
tgf1, \
'(' + dvs.name() + #op + gf1.name() + ')', \
dvs.dimensions() op gf1.dimensions() \
); \
\
Foam::opFunc(tRes(), dvs, gf1); \
\
reuseTmpGeometricField<productType, Type, PatchField, GeoMesh> \
::clear(tgf1); \
\
return tRes; \
} \
\
template \
< \
class Form, \
class Cmpt, \
int nCmpt, \
class Type, template<class> class PatchField, \
class GeoMesh \
> \
operator op \
( \
const dimensioned<Form>& dvs, \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1 \
) \
{ \
typedef typename product<Form, Type>::type productType; \
\
const GeometricField<Type, PatchField, GeoMesh>& gf1 = tgf1(); \
\
tmp<GeometricField<productType, PatchField, GeoMesh>> tRes = \
reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>::New \
( \
tgf1, \
'(' + dvs.name() + #op + gf1.name() + ')', \
dvs.dimensions() op gf1.dimensions() \
); \
\
Foam::opFunc(tRes(), dvs, gf1); \
\
reuseTmpGeometricField<productType, Type, PatchField, GeoMesh> \
::clear(tgf1); \
\
return tRes; \
} \
\
template \
< \
class Form, \
class Cmpt, \
int nCmpt, \
class Type, template<class> class PatchField, \
class GeoMesh \
> \
tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>> \
operator op \
( \
const VectorSpace<Form,Cmpt,nCmpt>& vs, \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1 \
) \
{ \
return dimensioned<Form>(static_cast<const Form&>(vs)) op tgf1; \
operator op \
( \
const VectorSpace<Form,Cmpt,nCmpt>& vs, \
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1 \
) \
{ \
return dimensioned<Form>(static_cast<const Form&>(vs)) op tgf1; \
}
PRODUCT_OPERATOR(typeOfSum, +, add)