mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
src/OpenFOAM: changed template rank type from int to Foam::direction
Foam::direction is an unsigned type which makes it easier for the compiler to pickup and report errors in the instantiation of VectorSpaces and associated types.
This commit is contained in:
@ -447,7 +447,7 @@ void Foam::dimensioned<Type>::operator/=
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type, int r>
|
||||
template<class Type, Foam::direction r>
|
||||
Foam::dimensioned<typename Foam::powProduct<Type, r>::type>
|
||||
Foam::pow(const dimensioned<Type>& dt, typename powProduct<Type, r>::type)
|
||||
{
|
||||
@ -747,7 +747,7 @@ Foam::operator op \
|
||||
); \
|
||||
} \
|
||||
\
|
||||
template<class Type, class Form, class Cmpt, int nCmpt> \
|
||||
template<class Type, class Form, class Cmpt, Foam::direction nCmpt> \
|
||||
Foam::dimensioned<typename Foam::product<Type, Form>::type> \
|
||||
Foam::operator op \
|
||||
( \
|
||||
@ -763,7 +763,7 @@ Foam::operator op \
|
||||
); \
|
||||
} \
|
||||
\
|
||||
template<class Type, class Form, class Cmpt, int nCmpt> \
|
||||
template<class Type, class Form, class Cmpt, Foam::direction nCmpt> \
|
||||
Foam::dimensioned<typename Foam::product<Form, Type>::type> \
|
||||
Foam::operator op \
|
||||
( \
|
||||
|
||||
@ -231,7 +231,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type, int r>
|
||||
template<class Type, direction r>
|
||||
dimensioned<typename powProduct<Type, r>::type>
|
||||
pow
|
||||
(
|
||||
@ -306,7 +306,7 @@ template<class Type1, class Type2> \
|
||||
dimensioned<typename product<Type1, Type2>::type> \
|
||||
operator op(const dimensioned<Type1>&, const dimensioned<Type2>&); \
|
||||
\
|
||||
template<class Type, class Form, class Cmpt, int nCmpt> \
|
||||
template<class Type, class Form, class Cmpt, direction nCmpt> \
|
||||
dimensioned<typename product<Type, Form>::type> \
|
||||
operator op \
|
||||
( \
|
||||
@ -314,7 +314,7 @@ operator op \
|
||||
const VectorSpace<Form,Cmpt,nCmpt>& \
|
||||
); \
|
||||
\
|
||||
template<class Type, class Form, class Cmpt, int nCmpt> \
|
||||
template<class Type, class Form, class Cmpt, direction nCmpt> \
|
||||
dimensioned<typename product<Form, Type>::type> \
|
||||
operator op \
|
||||
( \
|
||||
|
||||
@ -35,7 +35,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type, class GeoMesh, int r>
|
||||
template<class Type, class GeoMesh, direction r>
|
||||
tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh>>
|
||||
pow
|
||||
(
|
||||
@ -66,7 +66,7 @@ pow
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class GeoMesh, int r>
|
||||
template<class Type, class GeoMesh, direction r>
|
||||
tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh>>
|
||||
pow
|
||||
(
|
||||
@ -510,7 +510,7 @@ operator op \
|
||||
return tRes; \
|
||||
} \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
|
||||
tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -549,7 +549,7 @@ operator op \
|
||||
return tRes; \
|
||||
} \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
|
||||
tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -590,7 +590,7 @@ operator op \
|
||||
return tRes; \
|
||||
} \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
|
||||
tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -628,7 +628,7 @@ operator op \
|
||||
return tRes; \
|
||||
} \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
|
||||
tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
|
||||
operator op \
|
||||
( \
|
||||
|
||||
@ -35,7 +35,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type, class GeoMesh, int r>
|
||||
template<class Type, class GeoMesh, direction r>
|
||||
tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh>>
|
||||
pow
|
||||
(
|
||||
@ -43,7 +43,7 @@ pow
|
||||
typename powProduct<Type, r>::type
|
||||
);
|
||||
|
||||
template<class Type, class GeoMesh, int r>
|
||||
template<class Type, class GeoMesh, direction r>
|
||||
tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh>>
|
||||
pow
|
||||
(
|
||||
@ -191,7 +191,7 @@ operator op \
|
||||
const dimensioned<Form>& dvs \
|
||||
); \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
|
||||
tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -207,7 +207,7 @@ operator op \
|
||||
const dimensioned<Form>& dvs \
|
||||
); \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
|
||||
tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -223,7 +223,7 @@ operator op \
|
||||
const DimensionedField<Type, GeoMesh>& df1 \
|
||||
); \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
|
||||
tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -239,7 +239,7 @@ operator op \
|
||||
const tmp<DimensionedField<Type, GeoMesh>>& tdf1 \
|
||||
); \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \
|
||||
tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \
|
||||
operator op \
|
||||
( \
|
||||
|
||||
@ -61,7 +61,7 @@ void T(FieldField<Field, Type>& f1, const FieldField<Field, Type>& f2)
|
||||
}
|
||||
|
||||
|
||||
template<template<class> class Field, class Type, int r>
|
||||
template<template<class> class Field, class Type, direction r>
|
||||
void pow
|
||||
(
|
||||
FieldField<Field, typename powProduct<Type, r>::type>& f,
|
||||
@ -74,7 +74,7 @@ void pow
|
||||
}
|
||||
}
|
||||
|
||||
template<template<class> class Field, class Type, int r>
|
||||
template<template<class> class Field, class Type, direction r>
|
||||
tmp<FieldField<Field, typename powProduct<Type, r>::type>>
|
||||
pow
|
||||
(
|
||||
@ -90,7 +90,7 @@ pow
|
||||
return tRes;
|
||||
}
|
||||
|
||||
template<template<class> class Field, class Type, int r>
|
||||
template<template<class> class Field, class Type, direction r>
|
||||
tmp<FieldField<Field, typename powProduct<Type, r>::type>>
|
||||
pow
|
||||
(
|
||||
@ -761,7 +761,13 @@ operator op \
|
||||
} \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
void opFunc \
|
||||
( \
|
||||
FieldField<Field, typename product<Type, Form>::type>& f, \
|
||||
@ -776,7 +782,13 @@ void opFunc \
|
||||
} \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
tmp<FieldField<Field, typename product<Type, Form>::type>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -794,7 +806,13 @@ operator op \
|
||||
} \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
tmp<FieldField<Field, typename product<Type, Form>::type>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -813,7 +831,13 @@ operator op \
|
||||
} \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
void opFunc \
|
||||
( \
|
||||
FieldField<Field, typename product<Form, Type>::type>& f, \
|
||||
@ -828,7 +852,13 @@ void opFunc \
|
||||
} \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
tmp<FieldField<Field, typename product<Form, Type>::type>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -846,7 +876,13 @@ operator op \
|
||||
} \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
tmp<FieldField<Field, typename product<Form, Type>::type>> \
|
||||
operator op \
|
||||
( \
|
||||
|
||||
@ -47,14 +47,14 @@ template<template<class> class Field, class Type>
|
||||
void T(FieldField<Field, Type>& f1, const FieldField<Field, Type>& f2);
|
||||
|
||||
|
||||
template<template<class> class Field, class Type, int r>
|
||||
template<template<class> class Field, class Type, direction r>
|
||||
void pow
|
||||
(
|
||||
FieldField<Field, typename powProduct<Type, r>::type>& f,
|
||||
const FieldField<Field, Type>& vf
|
||||
);
|
||||
|
||||
template<template<class> class Field, class Type, int r>
|
||||
template<template<class> class Field, class Type, direction r>
|
||||
tmp<FieldField<Field, typename powProduct<Type, r>::type>>
|
||||
pow
|
||||
(
|
||||
@ -62,7 +62,7 @@ pow
|
||||
= pTraits<typename powProduct<Type, r>::type>::zero
|
||||
);
|
||||
|
||||
template<template<class> class Field, class Type, int r>
|
||||
template<template<class> class Field, class Type, direction r>
|
||||
tmp<FieldField<Field, typename powProduct<Type, r>::type>>
|
||||
pow
|
||||
(
|
||||
@ -346,7 +346,13 @@ operator op \
|
||||
); \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
void opFunc \
|
||||
( \
|
||||
FieldField<Field, typename product<Type, Form>::type>& f, \
|
||||
@ -355,7 +361,13 @@ void opFunc \
|
||||
); \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
tmp<FieldField<Field, typename product<Type, Form>::type>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -364,7 +376,13 @@ operator op \
|
||||
); \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
tmp<FieldField<Field, typename product<Type, Form>::type>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -373,7 +391,13 @@ operator op \
|
||||
); \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
void opFunc \
|
||||
( \
|
||||
FieldField<Field, typename product<Form, Type>::type>& f, \
|
||||
@ -382,7 +406,13 @@ void opFunc \
|
||||
); \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
tmp<FieldField<Field, typename product<Form, Type>::type>> \
|
||||
operator op \
|
||||
( \
|
||||
@ -391,7 +421,13 @@ operator op \
|
||||
); \
|
||||
\
|
||||
template \
|
||||
<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \
|
||||
< \
|
||||
template<class> class Field, \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
direction nCmpt \
|
||||
> \
|
||||
tmp<FieldField<Field, typename product<Form, Type>::type>> \
|
||||
operator op \
|
||||
( \
|
||||
|
||||
@ -701,7 +701,7 @@ void Foam::Field<Type>::operator=(const Type& t)
|
||||
|
||||
|
||||
template<class Type>
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, Foam::direction nCmpt>
|
||||
void Foam::Field<Type>::operator=(const VectorSpace<Form,Cmpt,nCmpt>& vs)
|
||||
{
|
||||
TFOR_ALL_F_OP_S(Type, *this, =, VSType, vs)
|
||||
|
||||
@ -345,7 +345,7 @@ public:
|
||||
void operator=(const tmp<Field<Type>>&);
|
||||
void operator=(const Type&);
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
void operator=(const VectorSpace<Form,Cmpt,nCmpt>&);
|
||||
|
||||
void operator+=(const UList<Type>&);
|
||||
|
||||
@ -59,7 +59,7 @@ void T(Field<Type>& res, const UList<Type>& f)
|
||||
}
|
||||
|
||||
|
||||
template<class Type, int r>
|
||||
template<class Type, direction r>
|
||||
void pow
|
||||
(
|
||||
Field<typename powProduct<Type, r>::type>& res,
|
||||
@ -74,7 +74,7 @@ void pow
|
||||
)
|
||||
}
|
||||
|
||||
template<class Type, int r>
|
||||
template<class Type, direction r>
|
||||
tmp<Field<typename powProduct<Type, r>::type>>
|
||||
pow
|
||||
(
|
||||
@ -91,7 +91,7 @@ pow
|
||||
return tRes;
|
||||
}
|
||||
|
||||
template<class Type, int r>
|
||||
template<class Type, direction r>
|
||||
tmp<Field<typename powProduct<Type, r>::type>>
|
||||
pow
|
||||
(
|
||||
@ -692,7 +692,7 @@ operator Op(const tmp<Field<Type1>>& tf1, const tmp<Field<Type2>>& tf2) \
|
||||
return tRes; \
|
||||
} \
|
||||
\
|
||||
template<class Type, class Form, class Cmpt, int nCmpt> \
|
||||
template<class Type, class Form, class Cmpt, direction nCmpt> \
|
||||
void OpFunc \
|
||||
( \
|
||||
Field<typename product<Type, Form>::type>& res, \
|
||||
@ -705,7 +705,7 @@ void OpFunc \
|
||||
(productType, res, =,Type, f1, Op, Form, static_cast<const Form&>(vs)) \
|
||||
} \
|
||||
\
|
||||
template<class Type, class Form, class Cmpt, int nCmpt> \
|
||||
template<class Type, class Form, class Cmpt, direction nCmpt> \
|
||||
tmp<Field<typename product<Type, Form>::type>> \
|
||||
operator Op(const UList<Type>& f1, const VectorSpace<Form,Cmpt,nCmpt>& vs) \
|
||||
{ \
|
||||
@ -715,7 +715,7 @@ operator Op(const UList<Type>& f1, const VectorSpace<Form,Cmpt,nCmpt>& vs) \
|
||||
return tRes; \
|
||||
} \
|
||||
\
|
||||
template<class Type, class Form, class Cmpt, int nCmpt> \
|
||||
template<class Type, class Form, class Cmpt, direction nCmpt> \
|
||||
tmp<Field<typename product<Type, Form>::type>> \
|
||||
operator Op \
|
||||
( \
|
||||
@ -730,7 +730,7 @@ operator Op \
|
||||
return tRes; \
|
||||
} \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type> \
|
||||
void OpFunc \
|
||||
( \
|
||||
Field<typename product<Form, Type>::type>& res, \
|
||||
@ -743,7 +743,7 @@ void OpFunc \
|
||||
(productType, res, =,Form,static_cast<const Form&>(vs), Op, Type, f1) \
|
||||
} \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type> \
|
||||
tmp<Field<typename product<Form, Type>::type>> \
|
||||
operator Op(const VectorSpace<Form,Cmpt,nCmpt>& vs, const UList<Type>& f1) \
|
||||
{ \
|
||||
@ -753,7 +753,7 @@ operator Op(const VectorSpace<Form,Cmpt,nCmpt>& vs, const UList<Type>& f1) \
|
||||
return tRes; \
|
||||
} \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type> \
|
||||
tmp<Field<typename product<Form, Type>::type>> \
|
||||
operator Op \
|
||||
( \
|
||||
|
||||
@ -47,7 +47,7 @@ template<class Type>
|
||||
void T(Field<Type>& res, const UList<Type>& f);
|
||||
|
||||
|
||||
template<class Type, int r>
|
||||
template<class Type, direction r>
|
||||
void pow
|
||||
(
|
||||
Field<typename powProduct<Type, r>::type>& res,
|
||||
@ -55,7 +55,7 @@ void pow
|
||||
);
|
||||
|
||||
|
||||
template<class Type, int r>
|
||||
template<class Type, direction r>
|
||||
tmp<Field<typename powProduct<Type, r>::type>>
|
||||
pow
|
||||
(
|
||||
@ -64,7 +64,7 @@ pow
|
||||
= pTraits<typename powProduct<Type, r>::type>::zero
|
||||
);
|
||||
|
||||
template<class Type, int r>
|
||||
template<class Type, direction r>
|
||||
tmp<Field<typename powProduct<Type, r>::type>>
|
||||
pow
|
||||
(
|
||||
@ -307,7 +307,7 @@ template<class Type1, class Type2> \
|
||||
tmp<Field<typename product<Type1, Type2>::type>> \
|
||||
operator Op(const tmp<Field<Type1>>& tf1, const tmp<Field<Type2>>& tf2); \
|
||||
\
|
||||
template<class Type, class Form, class Cmpt, int nCmpt> \
|
||||
template<class Type, class Form, class Cmpt, direction nCmpt> \
|
||||
void OpFunc \
|
||||
( \
|
||||
Field<typename product<Type, Form>::type>& res, \
|
||||
@ -315,15 +315,15 @@ void OpFunc \
|
||||
const VectorSpace<Form,Cmpt,nCmpt>& vs \
|
||||
); \
|
||||
\
|
||||
template<class Type, class Form, class Cmpt, int nCmpt> \
|
||||
template<class Type, class Form, class Cmpt, direction nCmpt> \
|
||||
tmp<Field<typename product<Type, Form>::type>> \
|
||||
operator Op(const UList<Type>& f1, const VectorSpace<Form,Cmpt,nCmpt>& vs); \
|
||||
\
|
||||
template<class Type, class Form, class Cmpt, int nCmpt> \
|
||||
template<class Type, class Form, class Cmpt, direction nCmpt> \
|
||||
tmp<Field<typename product<Type, Form>::type>> \
|
||||
operator Op(const tmp<Field<Type>>&tf1,const VectorSpace<Form,Cmpt,nCmpt>&vs);\
|
||||
operator Op(const tmp<Field<Type>>&tf1,const VectorSpace<Form,Cmpt,nCmpt>&vs); \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type> \
|
||||
void OpFunc \
|
||||
( \
|
||||
Field<typename product<Form, Type>::type>& res, \
|
||||
@ -331,11 +331,11 @@ void OpFunc \
|
||||
const UList<Type>& f1 \
|
||||
); \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type> \
|
||||
tmp<Field<typename product<Form, Type>::type>> \
|
||||
operator Op(const VectorSpace<Form,Cmpt,nCmpt>& vs, const UList<Type>& f1); \
|
||||
\
|
||||
template<class Form, class Cmpt, int nCmpt, class Type> \
|
||||
template<class Form, class Cmpt, direction nCmpt, class Type> \
|
||||
tmp<Field<typename product<Form, Type>::type>> \
|
||||
operator Op(const VectorSpace<Form,Cmpt,nCmpt>&vs,const tmp<Field<Type>>&tf1);
|
||||
|
||||
|
||||
@ -66,7 +66,13 @@ void T
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh, int r>
|
||||
template
|
||||
<
|
||||
class Type,
|
||||
template<class> class PatchField,
|
||||
class GeoMesh,
|
||||
direction r
|
||||
>
|
||||
void pow
|
||||
(
|
||||
GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh>& gf,
|
||||
@ -77,7 +83,13 @@ void pow
|
||||
pow(gf.boundaryField(), gf1.boundaryField(), r);
|
||||
}
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh, int r>
|
||||
template
|
||||
<
|
||||
class Type,
|
||||
template<class> class PatchField,
|
||||
class GeoMesh,
|
||||
direction r
|
||||
>
|
||||
tmp<GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh>>
|
||||
pow
|
||||
(
|
||||
@ -110,7 +122,13 @@ pow
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh, int r>
|
||||
template
|
||||
<
|
||||
class Type,
|
||||
template<class> class PatchField,
|
||||
class GeoMesh,
|
||||
direction r
|
||||
>
|
||||
tmp<GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh>>
|
||||
pow
|
||||
(
|
||||
@ -768,7 +786,7 @@ template \
|
||||
< \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
int nCmpt, \
|
||||
direction nCmpt, \
|
||||
class Type, template<class> class PatchField, \
|
||||
class GeoMesh \
|
||||
> \
|
||||
@ -815,7 +833,7 @@ template \
|
||||
< \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
int nCmpt, \
|
||||
direction nCmpt, \
|
||||
class Type, template<class> class PatchField, \
|
||||
class GeoMesh \
|
||||
> \
|
||||
@ -880,7 +898,7 @@ template \
|
||||
< \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
int nCmpt, \
|
||||
direction nCmpt, \
|
||||
class Type, template<class> class PatchField, \
|
||||
class GeoMesh \
|
||||
> \
|
||||
@ -926,7 +944,7 @@ template \
|
||||
< \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
int nCmpt, \
|
||||
direction nCmpt, \
|
||||
class Type, template<class> class PatchField, \
|
||||
class GeoMesh \
|
||||
> \
|
||||
|
||||
@ -56,14 +56,26 @@ void T
|
||||
const GeometricField<Type, PatchField, GeoMesh>& gf1
|
||||
);
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh, int r>
|
||||
template
|
||||
<
|
||||
class Type,
|
||||
template<class> class PatchField,
|
||||
class GeoMesh,
|
||||
direction r
|
||||
>
|
||||
void pow
|
||||
(
|
||||
GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh>& gf,
|
||||
const GeometricField<Type, PatchField, GeoMesh>& gf1
|
||||
);
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh, int r>
|
||||
template
|
||||
<
|
||||
class Type,
|
||||
template<class> class PatchField,
|
||||
class GeoMesh,
|
||||
direction r
|
||||
>
|
||||
tmp
|
||||
<
|
||||
GeometricField
|
||||
@ -75,7 +87,13 @@ pow
|
||||
typename powProduct<Type, r>::type
|
||||
);
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh, int r>
|
||||
template
|
||||
<
|
||||
class Type,
|
||||
template<class> class PatchField,
|
||||
class GeoMesh,
|
||||
direction r
|
||||
>
|
||||
tmp
|
||||
<
|
||||
GeometricField
|
||||
@ -353,7 +371,7 @@ template \
|
||||
< \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
int nCmpt, \
|
||||
direction nCmpt, \
|
||||
class Type, template<class> class PatchField, \
|
||||
class GeoMesh \
|
||||
> \
|
||||
@ -385,7 +403,7 @@ template \
|
||||
< \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
int nCmpt, \
|
||||
direction nCmpt, \
|
||||
class Type, template<class> class PatchField, \
|
||||
class GeoMesh \
|
||||
> \
|
||||
@ -427,7 +445,7 @@ template \
|
||||
< \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
int nCmpt, \
|
||||
direction nCmpt, \
|
||||
class Type, template<class> class PatchField, \
|
||||
class GeoMesh \
|
||||
> \
|
||||
@ -459,7 +477,7 @@ template \
|
||||
< \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
int nCmpt, \
|
||||
direction nCmpt, \
|
||||
class Type, template<class> class PatchField, \
|
||||
class GeoMesh \
|
||||
> \
|
||||
|
||||
@ -47,7 +47,7 @@ inline void T
|
||||
{}
|
||||
|
||||
|
||||
template<class Type, int r>
|
||||
template<class Type, direction r>
|
||||
inline void pow
|
||||
(
|
||||
Field<typename powProduct<Type, r>::type>& f,
|
||||
@ -206,7 +206,7 @@ template \
|
||||
class Type, \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
int nCmpt \
|
||||
direction nCmpt \
|
||||
> \
|
||||
inline void opFunc \
|
||||
( \
|
||||
@ -221,7 +221,7 @@ template \
|
||||
< \
|
||||
class Form, \
|
||||
class Cmpt, \
|
||||
int nCmpt, \
|
||||
direction nCmpt, \
|
||||
class Type \
|
||||
> \
|
||||
inline void opFunc \
|
||||
|
||||
@ -64,10 +64,8 @@ public:
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
rank = 2 // Rank of DiagTensor is 2
|
||||
};
|
||||
//- Rank of DiagTensor is 2
|
||||
static const direction rank = 2;
|
||||
|
||||
|
||||
//- Component labeling enumeration
|
||||
|
||||
@ -53,14 +53,18 @@ public:
|
||||
//- Equivalent type of labels used for valid component indexing
|
||||
typedef label labelType;
|
||||
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
dim = 3, //!< Dimensionality of space
|
||||
rank = 0, //!< Rank of Scalar is 0
|
||||
nComponents = 1 //!< Number of components in Scalar is 1
|
||||
};
|
||||
//- Dimensionality of space
|
||||
static const direction dim = 3;
|
||||
|
||||
//- Rank of Scalar is 0
|
||||
static const direction rank = 0;
|
||||
|
||||
//- Number of components in Scalar is 1
|
||||
static const direction nComponents = 1;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -73,6 +77,7 @@ public:
|
||||
static const Scalar rootMax;
|
||||
static const Scalar rootMin;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from primitive
|
||||
|
||||
@ -62,10 +62,8 @@ public:
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
rank = 2 // Rank of SphericalTensor is 2
|
||||
};
|
||||
//- Rank of SphericalTensor is 2
|
||||
static const direction rank = 2;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -58,10 +58,8 @@ public:
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
rank = 2 // Rank of SphericalTensor2D is 2
|
||||
};
|
||||
//- Rank of SphericalTensor2D is 2
|
||||
static const direction rank = 2;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -64,10 +64,8 @@ public:
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
rank = 2 // Rank of SymmTensor is 2
|
||||
};
|
||||
//- Rank of SymmTensor is 2
|
||||
static const direction rank = 2;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -64,10 +64,8 @@ public:
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
rank = 2 // Rank of SymmTensor2D is 2
|
||||
};
|
||||
//- Rank of SymmTensor2D is 2
|
||||
static const direction rank = 2;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -67,10 +67,8 @@ public:
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
rank = 2 // Rank of Tensor is 2
|
||||
};
|
||||
//- Rank of Tensor is 2
|
||||
static const direction rank = 2;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -67,10 +67,8 @@ public:
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
rank = 2 // Rank of Tensor2D is 2
|
||||
};
|
||||
//- Rank of Tensor2D is 2
|
||||
static const direction rank = 2;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -68,10 +68,8 @@ public:
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
rank = 1 // Rank of Vector is 1
|
||||
};
|
||||
//- Rank of Vector is 1
|
||||
static const direction rank = 1;
|
||||
|
||||
|
||||
//- Component labeling enumeration
|
||||
|
||||
@ -62,10 +62,8 @@ public:
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
rank = 1 // Rank of Vector2D is 1
|
||||
};
|
||||
//- Rank of Vector2D is 1
|
||||
static const direction rank = 1;
|
||||
|
||||
|
||||
//- Component labeling enumeration
|
||||
|
||||
@ -30,7 +30,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, Foam::direction nCmpt>
|
||||
Foam::VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
|
||||
(
|
||||
Istream& is
|
||||
@ -39,7 +39,7 @@ Foam::VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
|
||||
// Read beginning of VectorSpace<Cmpt>
|
||||
is.readBegin("VectorSpace<Form, Cmpt, nCmpt>");
|
||||
|
||||
for (int i=0; i<nCmpt; i++)
|
||||
for (direction i=0; i<nCmpt; i++)
|
||||
{
|
||||
is >> v_[i];
|
||||
}
|
||||
@ -52,9 +52,8 @@ Foam::VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
Foam::word
|
||||
Foam::name
|
||||
template<class Form, class Cmpt, Foam::direction nCmpt>
|
||||
Foam::word Foam::name
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
)
|
||||
@ -63,7 +62,7 @@ Foam::name
|
||||
|
||||
buf << '(';
|
||||
|
||||
for (int i=0; i<nCmpt-1; i++)
|
||||
for (direction i=0; i<nCmpt-1; i++)
|
||||
{
|
||||
buf << vs.v_[i] << ',';
|
||||
}
|
||||
@ -76,7 +75,7 @@ Foam::name
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, Foam::direction nCmpt>
|
||||
Foam::Istream& Foam::operator>>
|
||||
(
|
||||
Istream& is,
|
||||
@ -86,7 +85,7 @@ Foam::Istream& Foam::operator>>
|
||||
// Read beginning of VectorSpace<Cmpt, nCmpt>
|
||||
is.readBegin("VectorSpace<Form, Cmpt, nCmpt>");
|
||||
|
||||
for (int i=0; i<nCmpt; i++)
|
||||
for (direction i=0; i<nCmpt; i++)
|
||||
{
|
||||
is >> vs.v_[i];
|
||||
}
|
||||
@ -101,21 +100,21 @@ Foam::Istream& Foam::operator>>
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, Foam::direction nCmpt>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
)
|
||||
{
|
||||
os << token::BEGIN_LIST;
|
||||
os << token::BEGIN_LIST << vs.v_[0];
|
||||
|
||||
for (int i=0; i<nCmpt-1; i++)
|
||||
for (direction i=1; i<nCmpt; i++)
|
||||
{
|
||||
os << vs.v_[i] << token::SPACE;
|
||||
os << token::SPACE << vs.v_[i];
|
||||
}
|
||||
|
||||
os << vs.v_[nCmpt-1] << token::END_LIST;
|
||||
os << token::END_LIST;
|
||||
|
||||
// Check state of Ostream
|
||||
os.check("operator<<(Ostream&, const VectorSpace<Form, Cmpt, nCmpt>&)");
|
||||
|
||||
@ -51,16 +51,16 @@ namespace Foam
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt> class VectorSpace;
|
||||
template<class Form, class Cmpt, direction nCmpt> class VectorSpace;
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
Istream& operator>>
|
||||
(
|
||||
Istream&,
|
||||
VectorSpace<Form, Cmpt, nCmpt>&
|
||||
);
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
@ -72,7 +72,7 @@ Ostream& operator<<
|
||||
Class VectorSpace Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
class VectorSpace
|
||||
{
|
||||
|
||||
@ -115,6 +115,9 @@ public:
|
||||
//- Construct null
|
||||
inline VectorSpace();
|
||||
|
||||
//- Construct initialized to zero
|
||||
inline VectorSpace(const Foam::zero);
|
||||
|
||||
//- Construct from Istream
|
||||
VectorSpace(Istream&);
|
||||
|
||||
@ -174,7 +177,7 @@ public:
|
||||
// * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * * //
|
||||
|
||||
//- Return a string representation of a VectorSpace
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
word name(const VectorSpace<Form, Cmpt, nCmpt>&);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -35,12 +35,19 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace()
|
||||
{}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace(const Foam::zero z)
|
||||
{
|
||||
VectorSpaceOps<nCmpt,0>::eqOpS(*this, 0, eqOp<Cmpt>());
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -50,7 +57,7 @@ inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
template<class Form2, class Cmpt2>
|
||||
inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
|
||||
(
|
||||
@ -63,14 +70,14 @@ inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline label VectorSpace<Form, Cmpt, nCmpt>::size() const
|
||||
{
|
||||
return nCmpt;
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline const Cmpt& VectorSpace<Form, Cmpt, nCmpt>::component
|
||||
(
|
||||
const direction d
|
||||
@ -89,7 +96,7 @@ inline const Cmpt& VectorSpace<Form, Cmpt, nCmpt>::component
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Cmpt& VectorSpace<Form, Cmpt, nCmpt>::component
|
||||
(
|
||||
const direction d
|
||||
@ -108,7 +115,7 @@ inline Cmpt& VectorSpace<Form, Cmpt, nCmpt>::component
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline void VectorSpace<Form, Cmpt, nCmpt>::component
|
||||
(
|
||||
Cmpt& c,
|
||||
@ -128,7 +135,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::component
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline void VectorSpace<Form, Cmpt, nCmpt>::replace
|
||||
(
|
||||
const direction d,
|
||||
@ -148,7 +155,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::replace
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form VectorSpace<Form, Cmpt, nCmpt>::uniform(const Cmpt& s)
|
||||
{
|
||||
Form v;
|
||||
@ -159,7 +166,7 @@ inline Form VectorSpace<Form, Cmpt, nCmpt>::uniform(const Cmpt& s)
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline const Cmpt& VectorSpace<Form, Cmpt, nCmpt>::operator[]
|
||||
(
|
||||
const direction d
|
||||
@ -178,7 +185,7 @@ inline const Cmpt& VectorSpace<Form, Cmpt, nCmpt>::operator[]
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Cmpt& VectorSpace<Form, Cmpt, nCmpt>::operator[]
|
||||
(
|
||||
const direction d
|
||||
@ -197,7 +204,7 @@ inline Cmpt& VectorSpace<Form, Cmpt, nCmpt>::operator[]
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline void VectorSpace<Form, Cmpt, nCmpt>::operator=
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -207,7 +214,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator=
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline void VectorSpace<Form, Cmpt, nCmpt>::operator+=
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -217,7 +224,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator+=
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline void VectorSpace<Form, Cmpt, nCmpt>::operator-=
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -227,14 +234,14 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator-=
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline void VectorSpace<Form, Cmpt, nCmpt>::operator=(const Foam::zero)
|
||||
{
|
||||
VectorSpaceOps<nCmpt,0>::eqOpS(*this, 0, eqOp<Cmpt>());
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline void VectorSpace<Form, Cmpt, nCmpt>::operator*=
|
||||
(
|
||||
const scalar s
|
||||
@ -244,7 +251,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator*=
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline void VectorSpace<Form, Cmpt, nCmpt>::operator/=
|
||||
(
|
||||
const scalar s
|
||||
@ -256,7 +263,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator/=
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Cmpt& setComponent
|
||||
(
|
||||
VectorSpace<Form, Cmpt, nCmpt>& vs,
|
||||
@ -267,7 +274,7 @@ inline Cmpt& setComponent
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline const Cmpt& component
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs,
|
||||
@ -281,7 +288,7 @@ inline const Cmpt& component
|
||||
// Powers of a Form
|
||||
// Equivalent to outer-products between the Form and itself
|
||||
// Form^0 = 1.0
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline typename powProduct<Form, 0>::type pow
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>&,
|
||||
@ -293,7 +300,7 @@ inline typename powProduct<Form, 0>::type pow
|
||||
}
|
||||
|
||||
// Form^1 = Form
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline typename powProduct<Form, 1>::type pow
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& v,
|
||||
@ -306,7 +313,7 @@ inline typename powProduct<Form, 1>::type pow
|
||||
|
||||
|
||||
// Form^2 = sqr(Form)
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline typename powProduct<Form, 2>::type pow
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& v,
|
||||
@ -318,7 +325,7 @@ inline typename powProduct<Form, 2>::type pow
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline scalar magSqr
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -330,7 +337,7 @@ inline scalar magSqr
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline scalar mag
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -340,7 +347,7 @@ inline scalar mag
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline VectorSpace<Form, Cmpt, nCmpt> cmptMultiply
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -353,7 +360,7 @@ inline VectorSpace<Form, Cmpt, nCmpt> cmptMultiply
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline VectorSpace<Form, Cmpt, nCmpt> cmptPow
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -366,7 +373,7 @@ inline VectorSpace<Form, Cmpt, nCmpt> cmptPow
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline VectorSpace<Form, Cmpt, nCmpt> cmptDivide
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -379,7 +386,7 @@ inline VectorSpace<Form, Cmpt, nCmpt> cmptDivide
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline VectorSpace<Form, Cmpt, nCmpt> stabilise
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs,
|
||||
@ -392,7 +399,7 @@ inline VectorSpace<Form, Cmpt, nCmpt> stabilise
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Cmpt cmptMax
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -404,7 +411,7 @@ inline Cmpt cmptMax
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Cmpt cmptMin
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -416,7 +423,7 @@ inline Cmpt cmptMin
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Cmpt cmptSum
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -428,7 +435,7 @@ inline Cmpt cmptSum
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Cmpt cmptAv
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -437,7 +444,7 @@ inline Cmpt cmptAv
|
||||
return cmptSum(vs)/nCmpt;
|
||||
}
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Cmpt cmptProduct
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -449,7 +456,7 @@ inline Cmpt cmptProduct
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form cmptMag
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -461,7 +468,7 @@ inline Form cmptMag
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form max
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -474,7 +481,7 @@ inline Form max
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form min
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -487,7 +494,7 @@ inline Form min
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form minMod
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -516,8 +523,8 @@ inline Type dot(const Type& t, const scalar s)
|
||||
|
||||
template
|
||||
<
|
||||
class Form1, class Cmpt1, int nCmpt1,
|
||||
class Form2, class Cmpt2, int nCmpt2
|
||||
class Form1, class Cmpt1, direction nCmpt1,
|
||||
class Form2, class Cmpt2, direction nCmpt2
|
||||
>
|
||||
inline typename innerProduct<Form1, Form2>::type dot
|
||||
(
|
||||
@ -531,7 +538,7 @@ inline typename innerProduct<Form1, Form2>::type dot
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form operator-
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
@ -543,7 +550,7 @@ inline Form operator-
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form operator+
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -555,7 +562,7 @@ inline Form operator+
|
||||
return v;
|
||||
}
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form operator-
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -568,7 +575,7 @@ inline Form operator-
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form operator*
|
||||
(
|
||||
scalar s,
|
||||
@ -581,7 +588,7 @@ inline Form operator*
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form operator*
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs,
|
||||
@ -594,7 +601,7 @@ inline Form operator*
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form operator/
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs,
|
||||
@ -607,7 +614,7 @@ inline Form operator/
|
||||
}
|
||||
|
||||
/*
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form operator/
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -620,7 +627,7 @@ inline Form operator/
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Form operator/
|
||||
(
|
||||
scalar s,
|
||||
@ -634,7 +641,7 @@ inline Form operator/
|
||||
*/
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline Cmpt operator&&
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -642,7 +649,7 @@ inline Cmpt operator&&
|
||||
)
|
||||
{
|
||||
Cmpt ddProd = vs1.v_[0]*vs2.v_[0];
|
||||
for (int i=1; i<nCmpt; ++i)
|
||||
for (direction i=1; i<nCmpt; ++i)
|
||||
{
|
||||
ddProd += vs1.v_[i]*vs2.v_[i];
|
||||
}
|
||||
@ -650,7 +657,7 @@ inline Cmpt operator&&
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline bool operator==
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -658,7 +665,7 @@ inline bool operator==
|
||||
)
|
||||
{
|
||||
bool eq = true;
|
||||
for (int i=0; i<nCmpt; ++i)
|
||||
for (direction i=0; i<nCmpt; ++i)
|
||||
{
|
||||
if (!(eq &= (equal(vs1.v_[i], vs2.v_[i])))) break;
|
||||
}
|
||||
@ -666,7 +673,7 @@ inline bool operator==
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline bool operator!=
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -677,7 +684,7 @@ inline bool operator!=
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline bool operator>
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -685,7 +692,7 @@ inline bool operator>
|
||||
)
|
||||
{
|
||||
bool gt = true;
|
||||
for (int i=0; i<nCmpt; ++i)
|
||||
for (direction i=0; i<nCmpt; ++i)
|
||||
{
|
||||
if (!(gt &= vs1.v_[i] > vs2.v_[i])) break;
|
||||
}
|
||||
@ -693,7 +700,7 @@ inline bool operator>
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline bool operator<
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -701,7 +708,7 @@ inline bool operator<
|
||||
)
|
||||
{
|
||||
bool lt = true;
|
||||
for (int i=0; i<nCmpt; ++i)
|
||||
for (direction i=0; i<nCmpt; ++i)
|
||||
{
|
||||
if (!(lt &= vs1.v_[i] < vs2.v_[i])) break;
|
||||
}
|
||||
@ -709,7 +716,7 @@ inline bool operator<
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline bool operator>=
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
@ -720,7 +727,7 @@ inline bool operator>=
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, int nCmpt>
|
||||
template<class Form, class Cmpt, direction nCmpt>
|
||||
inline bool operator<=
|
||||
(
|
||||
const VectorSpace<Form, Cmpt, nCmpt>& vs1,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -39,7 +39,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<int N, int I>
|
||||
template<direction N, direction I>
|
||||
class VectorSpaceOps
|
||||
{
|
||||
public:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,12 +41,12 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Cmpt, int rank>
|
||||
template<class Cmpt, direction rank>
|
||||
class typeOfRank
|
||||
{};
|
||||
|
||||
|
||||
template<class Cmpt, int rank>
|
||||
template<class Cmpt, direction rank>
|
||||
class symmTypeOfRank
|
||||
{};
|
||||
|
||||
@ -68,7 +68,7 @@ public:
|
||||
typedef typename typeOfRank
|
||||
<
|
||||
typename pTraits<arg1>::cmptType,
|
||||
int(pTraits<arg1>::rank) + int(pTraits<arg2>::rank)
|
||||
direction(pTraits<arg1>::rank) + direction(pTraits<arg2>::rank)
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
typedef typename typeOfRank
|
||||
<
|
||||
typename pTraits<arg2>::cmptType,
|
||||
int(pTraits<arg1>::rank) + int(pTraits<arg2>::rank) - 1
|
||||
direction(pTraits<arg1>::rank) + direction(pTraits<arg2>::rank) - 1
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -93,7 +93,7 @@ public:
|
||||
typedef typename typeOfRank
|
||||
<
|
||||
typename pTraits<arg1>::cmptType,
|
||||
int(pTraits<arg1>::rank) + int(pTraits<arg2>::rank) - 2
|
||||
direction(pTraits<arg1>::rank) + direction(pTraits<arg2>::rank) - 2
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -106,7 +106,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
template<class arg1, int arg2>
|
||||
template<class arg1, direction arg2>
|
||||
class powProduct
|
||||
{
|
||||
public:
|
||||
@ -114,7 +114,7 @@ public:
|
||||
typedef typename symmTypeOfRank
|
||||
<
|
||||
typename pTraits<arg1>::cmptType,
|
||||
arg2*int(pTraits<arg1>::rank)
|
||||
arg2*direction(pTraits<arg1>::rank)
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
@ -56,6 +56,7 @@ bool readBool(Istream&);
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "pTraits.H"
|
||||
#include "direction.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
@ -73,12 +74,14 @@ public:
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
dim = 3, //!< Dimensionality of space
|
||||
rank = 0, //!< Rank of bool is 0
|
||||
nComponents = 1 //!< Number of components in bool is 1
|
||||
};
|
||||
//- Dimensionality of space
|
||||
static const direction dim = 3;
|
||||
|
||||
//- Rank of bool is 0
|
||||
static const direction rank = 0;
|
||||
|
||||
//- Number of components in bool is 1
|
||||
static const direction nComponents = 1;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -89,14 +89,17 @@ public:
|
||||
//- Component type
|
||||
typedef int32_t cmptType;
|
||||
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
dim = 3, //!< Dimensionality of space
|
||||
rank = 0, //!< Rank of int32_t is 0
|
||||
nComponents = 1 //!< Number of components in int32_t is 1
|
||||
};
|
||||
//- Dimensionality of space
|
||||
static const direction dim = 3;
|
||||
|
||||
//- Rank of int32_t is 0
|
||||
static const direction rank = 0;
|
||||
|
||||
//- Number of components in int32_t is 1
|
||||
static const direction nComponents = 1;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -80,14 +80,17 @@ public:
|
||||
//- Component type
|
||||
typedef int64_t cmptType;
|
||||
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
dim = 3, //!< Dimensionality of space
|
||||
rank = 0, //!< Rank of int64_t is 0
|
||||
nComponents = 1 //!< Number of components in int64_t is 1
|
||||
};
|
||||
//- Dimensionality of space
|
||||
static const direction dim = 3;
|
||||
|
||||
//- Rank of int64_t is 0
|
||||
static const direction rank = 0;
|
||||
|
||||
//- Number of components in int64_t is 1
|
||||
static const direction nComponents = 1;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -80,14 +80,17 @@ public:
|
||||
//- Component type
|
||||
typedef uint32_t cmptType;
|
||||
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
dim = 3, //!< Dimensionality of space
|
||||
rank = 0, //!< Rank of uint32_t is 0
|
||||
nComponents = 1 //!< Number of components in uint32_t is 1
|
||||
};
|
||||
//- Dimensionality of space
|
||||
static const direction dim = 3;
|
||||
|
||||
//- Rank of uint32_t is 0
|
||||
static const direction rank = 0;
|
||||
|
||||
//- Number of components in uint32_t is 1
|
||||
static const direction nComponents = 1;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -80,14 +80,17 @@ public:
|
||||
//- Component type
|
||||
typedef uint64_t cmptType;
|
||||
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
dim = 3, //!< Dimensionality of space
|
||||
rank = 0, //!< Rank of uint64_t is 0
|
||||
nComponents = 1 //!< Number of components in uint64_t is 1
|
||||
};
|
||||
//- Dimensionality of space
|
||||
static const direction dim = 3;
|
||||
|
||||
//- Rank of uint64_t is 0
|
||||
static const direction rank = 0;
|
||||
|
||||
//- Number of components in uint64_t is 1
|
||||
static const direction nComponents = 1;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -78,12 +78,11 @@ public:
|
||||
//- Component type
|
||||
typedef scalar cmptType;
|
||||
|
||||
|
||||
// Member constants
|
||||
|
||||
enum
|
||||
{
|
||||
rank = 1 // Rank of quaternion is 1
|
||||
};
|
||||
//- Rank of quaternion is 1
|
||||
static const direction rank = 1;
|
||||
|
||||
|
||||
// Static data members
|
||||
|
||||
Reference in New Issue
Block a user