Merge of friend function declaration

This commit is contained in:
Hrvoje Jasak 2019-04-25 11:12:34 +01:00
parent 84121da55f
commit 109b8456d8
28 changed files with 170 additions and 84 deletions

View file

@ -172,7 +172,7 @@ if ( ! $?WM_NCOMPPROCS ) setenv WM_NCOMPPROCS `$WM_PROJECT_DIR/bin/foamGetSystem
# Run options (floating-point signal handling and memory initialisation) # Run options (floating-point signal handling and memory initialisation)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv FOAM_SIGFPE setenv FOAM_SIGFPE
# setenv FOAM_SETNAN setenv FOAM_SETNAN
# Detect system type and set environment variables # Detect system type and set environment variables

View file

@ -56,7 +56,6 @@ template<class Type> class octree;
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class octreeDataPoint; class octreeDataPoint;
Ostream& operator<<(Ostream&, const octreeDataPoint&); Ostream& operator<<(Ostream&, const octreeDataPoint&);

View file

@ -71,7 +71,6 @@ class Random;
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class treeBoundBox; class treeBoundBox;
bool operator==(const treeBoundBox&, const treeBoundBox&); bool operator==(const treeBoundBox&, const treeBoundBox&);
bool operator!=(const treeBoundBox&, const treeBoundBox&); bool operator!=(const treeBoundBox&, const treeBoundBox&);

View file

@ -148,7 +148,6 @@ class boundBox;
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class coordinateSystem; class coordinateSystem;
bool operator!=(const coordinateSystem&, const coordinateSystem&); bool operator!=(const coordinateSystem&, const coordinateSystem&);
Ostream& operator<<(Ostream&, const coordinateSystem&); Ostream& operator<<(Ostream&, const coordinateSystem&);

View file

@ -264,9 +264,9 @@ void Foam::Pstream::allocatePstreamCommunicator
if (index == PstreamGlobals::MPIGroups_.size()) if (index == PstreamGlobals::MPIGroups_.size())
{ {
// Extend storage with dummy values // Extend storage with dummy values
MPI_Group newGroup; MPI_Group newGroup = MPI_GROUP_NULL;
PstreamGlobals::MPIGroups_.append(newGroup); PstreamGlobals::MPIGroups_.append(newGroup);
MPI_Comm newComm; MPI_Comm newComm = MPI_COMM_NULL;
PstreamGlobals::MPICommunicators_.append(newComm); PstreamGlobals::MPICommunicators_.append(newComm);
} }
else if (index > PstreamGlobals::MPIGroups_.size()) else if (index > PstreamGlobals::MPIGroups_.size())

View file

@ -53,7 +53,6 @@ namespace Foam
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class dictionaryEntry; class dictionaryEntry;
Ostream& operator<<(Ostream&, const dictionaryEntry&); Ostream& operator<<(Ostream&, const dictionaryEntry&);

View file

@ -48,7 +48,6 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
Ostream& operator<<(Ostream&, const CoeffField<diagTensor>&); Ostream& operator<<(Ostream&, const CoeffField<diagTensor>&);
Ostream& operator<<(Ostream&, const tmp<CoeffField<diagTensor> >&); Ostream& operator<<(Ostream&, const tmp<CoeffField<diagTensor> >&);

View file

@ -46,7 +46,6 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
Ostream& operator<<(Ostream&, const CoeffField<scalar>&); Ostream& operator<<(Ostream&, const CoeffField<scalar>&);
Ostream& operator<<(Ostream&, const tmp<CoeffField<scalar> >&); Ostream& operator<<(Ostream&, const tmp<CoeffField<scalar> >&);

View file

@ -48,7 +48,6 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
Ostream& operator<<(Ostream&, const CoeffField<sphericalTensor>&); Ostream& operator<<(Ostream&, const CoeffField<sphericalTensor>&);
Ostream& operator<<(Ostream&, const tmp<CoeffField<sphericalTensor> >&); Ostream& operator<<(Ostream&, const tmp<CoeffField<sphericalTensor> >&);

View file

@ -48,7 +48,6 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
Ostream& operator<<(Ostream&, const CoeffField<symmTensor4thOrder>&); Ostream& operator<<(Ostream&, const CoeffField<symmTensor4thOrder>&);
Ostream& operator<<(Ostream&, const tmp<CoeffField<symmTensor4thOrder> >&); Ostream& operator<<(Ostream&, const tmp<CoeffField<symmTensor4thOrder> >&);

View file

@ -48,7 +48,6 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
Ostream& operator<<(Ostream&, const CoeffField<symmTensor>&); Ostream& operator<<(Ostream&, const CoeffField<symmTensor>&);
Ostream& operator<<(Ostream&, const tmp<CoeffField<symmTensor> >&); Ostream& operator<<(Ostream&, const tmp<CoeffField<symmTensor> >&);

View file

@ -48,7 +48,6 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
Ostream& operator<<(Ostream&, const CoeffField<tensor>&); Ostream& operator<<(Ostream&, const CoeffField<tensor>&);
Ostream& operator<<(Ostream&, const tmp<CoeffField<tensor> >&); Ostream& operator<<(Ostream&, const tmp<CoeffField<tensor> >&);

View file

@ -273,6 +273,7 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
<< " Zero rate of change." << " Zero rate of change."
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
[[fallthrough]];
} }
case interpolationTable::CLAMP: case interpolationTable::CLAMP:
{ {
@ -306,6 +307,7 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
<< " Zero rate of change." << " Zero rate of change."
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
[[fallthrough]];
} }
case interpolationTable::CLAMP: case interpolationTable::CLAMP:
{ {
@ -415,6 +417,7 @@ Foam::interpolationTable<Type>::operator[](const label i) const
<< " Continuing with the first entry" << " Continuing with the first entry"
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
[[fallthrough]];
} }
case interpolationTable::CLAMP: case interpolationTable::CLAMP:
{ {
@ -449,6 +452,7 @@ Foam::interpolationTable<Type>::operator[](const label i) const
<< " Continuing with the last entry" << " Continuing with the last entry"
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
[[fallthrough]];
} }
case interpolationTable::CLAMP: case interpolationTable::CLAMP:
{ {
@ -502,6 +506,7 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
<< " Continuing with the first entry" << " Continuing with the first entry"
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
[[fallthrough]];
} }
case interpolationTable::CLAMP: case interpolationTable::CLAMP:
{ {
@ -535,6 +540,7 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
<< " Continuing with the last entry" << " Continuing with the last entry"
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
[[fallthrough]];
} }
case interpolationTable::CLAMP: case interpolationTable::CLAMP:
{ {

View file

@ -48,7 +48,6 @@ class lduInterfaceField;
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class procLduInterface; class procLduInterface;
Ostream& operator<<(Ostream&, const procLduInterface&); Ostream& operator<<(Ostream&, const procLduInterface&);

View file

@ -48,7 +48,6 @@ namespace Foam
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class crAddressing; class crAddressing;
Ostream& operator<<(Ostream&, const crAddressing&); Ostream& operator<<(Ostream&, const crAddressing&);

View file

@ -48,7 +48,6 @@ namespace Foam
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class crMatrix; class crMatrix;
Ostream& operator<<(Ostream&, const crMatrix&); Ostream& operator<<(Ostream&, const crMatrix&);

View file

@ -39,10 +39,11 @@ Description
namespace Foam namespace Foam
{ {
// Forward declaration of friend functions and operators
class boundBox;
template<class T> class tmp; template<class T> class tmp;
// Forward declaration of friend functions and operators
class boundBox;
Istream& operator>>(Istream& is, boundBox&); Istream& operator>>(Istream& is, boundBox&);
Ostream& operator<<(Ostream& os, const boundBox&); Ostream& operator<<(Ostream& os, const boundBox&);

View file

@ -43,7 +43,6 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
Ostream& operator<<(Ostream&, const BlockCoeff<scalar>&); Ostream& operator<<(Ostream&, const BlockCoeff<scalar>&);

View file

@ -107,7 +107,10 @@ public:
// Access // Access
//- Return component
inline const Cmpt& ii() const; inline const Cmpt& ii() const;
//- Return access to component
inline Cmpt& ii(); inline Cmpt& ii();
@ -116,6 +119,32 @@ public:
}; };
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// VectorSpace operations with component loops need specialisation
// HJ, 24/Apr/2019
template<class Cmpt>
inline Cmpt cmptMax(const SphericalTensor<Cmpt>& st)
{
return st.ii();
}
template<class Cmpt>
inline Cmpt cmptMin(const SphericalTensor<Cmpt>& st)
{
return st.ii();
}
template<class Cmpt>
inline Cmpt cmptSum(const SphericalTensor<Cmpt>& st)
{
return st.ii();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View file

@ -25,8 +25,9 @@ Class
SphericalTensorN SphericalTensorN
Description Description
Templated NXN SphericalTensor derived from VectorSpace adding construction from Templated NXN SphericalTensor derived from VectorSpace adding construction
N components, and the inner-product (dot-product) and outer-product operators. from N components, and the inner-product (dot-product) and
outer-product operators.
SourceFiles SourceFiles
SphericalTensorNI.H SphericalTensorNI.H
@ -44,7 +45,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class DiagTensor Declaration Class SphericalTensorN Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Cmpt, int length> template <class Cmpt, int length>
@ -73,13 +74,20 @@ public:
static const SphericalTensorN I; static const SphericalTensorN I;
//- Component labeling enumeration
enum components { II };
// Constructors // Constructors
//- Construct null //- Construct null
inline SphericalTensorN(); inline SphericalTensorN();
//- Construct given VectorSpace //- Construct given VectorSpace
inline SphericalTensorN(const VectorSpace<SphericalTensorN<Cmpt, length>, Cmpt, 1>&); inline SphericalTensorN
(
const VectorSpace<SphericalTensorN<Cmpt, length>, Cmpt, 1>&
);
//- Construct from Istream //- Construct from Istream
inline SphericalTensorN(Istream&); inline SphericalTensorN(Istream&);
@ -90,6 +98,15 @@ public:
// Member Functions // Member Functions
// Access
//- Return component
inline const Cmpt& ii() const;
//- Return access to component
inline Cmpt& ii();
//- Diagonal //- Diagonal
inline SphericalTensorN<Cmpt, length> diag() const; inline SphericalTensorN<Cmpt, length> diag() const;
@ -98,6 +115,32 @@ public:
}; };
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// VectorSpace operations with component loops need specialisation
// HJ, 24/Apr/2019
template<class Cmpt, int length>
inline Cmpt cmptMax(const SphericalTensorN<Cmpt, length>& st)
{
return st.ii();
}
template<class Cmpt, int length>
inline Cmpt cmptMin(const SphericalTensorN<Cmpt, length>& st)
{
return st.ii();
}
template<class Cmpt, int length>
inline Cmpt cmptSum(const SphericalTensorN<Cmpt, length>& st)
{
return st.ii();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View file

@ -658,7 +658,7 @@ inline Cmpt operator&&
) )
{ {
Cmpt ddProd = vs1.v_[0]*vs2.v_[0]; Cmpt ddProd = vs1.v_[0]*vs2.v_[0];
for (int i=1; i<nCmpt; ++i) for (int i = 1; i < nCmpt; ++i)
{ {
ddProd += vs1.v_[i]*vs2.v_[i]; ddProd += vs1.v_[i]*vs2.v_[i];
} }

View file

@ -239,6 +239,7 @@ bool Foam::Function1Types::TableBase<Type>::checkMinBounds
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
[[fallthrough]];
} }
case CLAMP: case CLAMP:
{ {
@ -289,6 +290,7 @@ bool Foam::Function1Types::TableBase<Type>::checkMaxBounds
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
[[fallthrough]];
} }
case CLAMP: case CLAMP:
{ {

View file

@ -187,7 +187,7 @@ Description
// acceptable. Do NOT use for cryptographic purposes. // acceptable. Do NOT use for cryptographic purposes.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
//- specialized little-endian code // Specialized little-endian code
#if !defined (__BYTE_ORDER) || (__BYTE_ORDER == __LITTLE_ENDIAN) #if !defined (__BYTE_ORDER) || (__BYTE_ORDER == __LITTLE_ENDIAN)
static unsigned jenkins_hashlittle static unsigned jenkins_hashlittle
( (
@ -224,16 +224,16 @@ static unsigned jenkins_hashlittle
switch (length) switch (length)
{ {
case 12: c += k[2]; b += k[1]; a += k[0]; break; case 12: c += k[2]; b += k[1]; a += k[0]; break;
case 11: c += static_cast<uint32_t>(k8[10]) << 16; // fall through case 11: c += static_cast<uint32_t>(k8[10]) << 16; [[fallthrough]];
case 10: c += static_cast<uint32_t>(k8[9]) << 8; // fall through case 10: c += static_cast<uint32_t>(k8[9]) << 8; [[fallthrough]];
case 9 : c += k8[8]; // fall through case 9 : c += k8[8]; [[fallthrough]];
case 8 : b += k[1]; a += k[0]; break; case 8 : b += k[1]; a += k[0]; break;
case 7 : b += static_cast<uint32_t>(k8[6]) << 16; // fall through case 7 : b += static_cast<uint32_t>(k8[6]) << 16; [[fallthrough]];
case 6 : b += static_cast<uint32_t>(k8[5]) << 8; // fall through case 6 : b += static_cast<uint32_t>(k8[5]) << 8; [[fallthrough]];
case 5 : b += k8[4]; // fall through case 5 : b += k8[4]; [[fallthrough]];
case 4 : a += k[0]; break; case 4 : a += k[0]; break;
case 3 : a += static_cast<uint32_t>(k8[2]) << 16; // fall through case 3 : a += static_cast<uint32_t>(k8[2]) << 16; [[fallthrough]];
case 2 : a += static_cast<uint32_t>(k8[1]) << 8; // fall through case 2 : a += static_cast<uint32_t>(k8[1]) << 8; [[fallthrough]];
case 1 : a += k8[0]; break; case 1 : a += k8[0]; break;
case 0 : return c; // zero-length requires no mixing case 0 : return c; // zero-length requires no mixing
} }
@ -265,7 +265,7 @@ static unsigned jenkins_hashlittle
break; break;
case 11: case 11:
c += static_cast<uint32_t>(k8[10]) << 16; c += static_cast<uint32_t>(k8[10]) << 16;
// fall through [[fallthrough]];
case 10: case 10:
c += k[4]; c += k[4];
b += k[2] + (static_cast<uint32_t>(k[3]) << 16); b += k[2] + (static_cast<uint32_t>(k[3]) << 16);
@ -273,27 +273,27 @@ static unsigned jenkins_hashlittle
break; break;
case 9 : case 9 :
c += k8[8]; c += k8[8];
// fall through [[fallthrough]];
case 8 : case 8 :
b += k[2] + (static_cast<uint32_t>(k[3]) << 16); b += k[2] + (static_cast<uint32_t>(k[3]) << 16);
a += k[0] + (static_cast<uint32_t>(k[1]) << 16); a += k[0] + (static_cast<uint32_t>(k[1]) << 16);
break; break;
case 7 : case 7 :
b += static_cast<uint32_t>(k8[6]) << 16; b += static_cast<uint32_t>(k8[6]) << 16;
// fall through [[fallthrough]];
case 6 : case 6 :
b += k[2]; b += k[2];
a += k[0] + (static_cast<uint32_t>(k[1]) << 16); a += k[0] + (static_cast<uint32_t>(k[1]) << 16);
break; break;
case 5 : case 5 :
b += k8[4]; b += k8[4];
// fall through [[fallthrough]];
case 4 : case 4 :
a += k[0] + (static_cast<uint32_t>(k[1]) << 16); a += k[0] + (static_cast<uint32_t>(k[1]) << 16);
break; break;
case 3 : case 3 :
a += static_cast<uint32_t>(k8[2]) << 16; a += static_cast<uint32_t>(k8[2]) << 16;
// fall through [[fallthrough]];
case 2 : case 2 :
a += k[0]; a += k[0];
break; break;
@ -331,19 +331,19 @@ static unsigned jenkins_hashlittle
// last block: affect all 32 bits of (c) // last block: affect all 32 bits of (c)
switch (length) // most case statements fall through switch (length) // most case statements fall through
{ {
case 12: c += static_cast<uint32_t>(k[11]) << 24; case 12: c += static_cast<uint32_t>(k[11]) << 24; [[fallthrough]];
case 11: c += static_cast<uint32_t>(k[10]) << 16; case 11: c += static_cast<uint32_t>(k[10]) << 16; [[fallthrough]];
case 10: c += static_cast<uint32_t>(k[9]) << 8; case 10: c += static_cast<uint32_t>(k[9]) << 8; [[fallthrough]];
case 9 : c += k[8]; case 9 : c += k[8]; [[fallthrough]];
case 8 : b += static_cast<uint32_t>(k[7]) << 24; case 8 : b += static_cast<uint32_t>(k[7]) << 24; [[fallthrough]];
case 7 : b += static_cast<uint32_t>(k[6]) << 16; case 7 : b += static_cast<uint32_t>(k[6]) << 16; [[fallthrough]];
case 6 : b += static_cast<uint32_t>(k[5]) << 8; case 6 : b += static_cast<uint32_t>(k[5]) << 8; [[fallthrough]];
case 5 : b += k[4]; case 5 : b += k[4]; [[fallthrough]];
case 4 : a += static_cast<uint32_t>(k[3]) << 24; case 4 : a += static_cast<uint32_t>(k[3]) << 24; [[fallthrough]];
case 3 : a += static_cast<uint32_t>(k[2]) << 16; case 3 : a += static_cast<uint32_t>(k[2]) << 16; [[fallthrough]];
case 2 : a += static_cast<uint32_t>(k[1]) << 8; case 2 : a += static_cast<uint32_t>(k[1]) << 8; [[fallthrough]];
case 1 : a += k[0]; case 1 : a += k[0];
break; break;
@ -403,16 +403,16 @@ static unsigned jenkins_hashbig
switch (length) // most the case statements fall through switch (length) // most the case statements fall through
{ {
case 12: c += k[2]; b += k[1]; a += k[0]; break; case 12: c += k[2]; b += k[1]; a += k[0]; break;
case 11: c += static_cast<uint32_t>(k8[10]) << 8; // fall through case 11: c += static_cast<uint32_t>(k8[10]) << 8; [[fallthrough]];
case 10: c += static_cast<uint32_t>(k8[9]) << 16; // fall through case 10: c += static_cast<uint32_t>(k8[9]) << 16; [[fallthrough]];
case 9 : c += static_cast<uint32_t>(k8[8]) << 24; // fall through case 9 : c += static_cast<uint32_t>(k8[8]) << 24; [[fallthrough]];
case 8 : b += k[1]; a += k[0]; break; case 8 : b += k[1]; a += k[0]; break;
case 7 : b += static_cast<uint32_t>(k8[6]) << 8; // fall through case 7 : b += static_cast<uint32_t>(k8[6]) << 8; [[fallthrough]];
case 6 : b += static_cast<uint32_t>(k8[5]) << 16; // fall through case 6 : b += static_cast<uint32_t>(k8[5]) << 16; [[fallthrough]];
case 5 : b += static_cast<uint32_t>(k8[4]) << 24; // fall through case 5 : b += static_cast<uint32_t>(k8[4]) << 24; [[fallthrough]];
case 4 : a += k[0]; break; case 4 : a += k[0]; break;
case 3 : a += static_cast<uint32_t>(k8[2]) << 8; // fall through case 3 : a += static_cast<uint32_t>(k8[2]) << 8; [[fallthrough]];
case 2 : a += static_cast<uint32_t>(k8[1]) << 16; // fall through case 2 : a += static_cast<uint32_t>(k8[1]) << 16; [[fallthrough]];
case 1 : a += static_cast<uint32_t>(k8[0]) << 24; break; case 1 : a += static_cast<uint32_t>(k8[0]) << 24; break;
case 0 : return c; case 0 : return c;
} }
@ -446,18 +446,18 @@ static unsigned jenkins_hashbig
// last block: affect all 32 bits of (c) // last block: affect all 32 bits of (c)
switch (length) // the case statements fall through switch (length) // the case statements fall through
{ {
case 12: c += k[11]; case 12: c += k[11]; [[fallthrough]];
case 11: c += static_cast<uint32_t>(k[10]) << 8; case 11: c += static_cast<uint32_t>(k[10]) << 8; [[fallthrough]];
case 10: c += static_cast<uint32_t>(k[9]) << 16; case 10: c += static_cast<uint32_t>(k[9]) << 16; [[fallthrough]];
case 9 : c += static_cast<uint32_t>(k[8]) << 24; case 9 : c += static_cast<uint32_t>(k[8]) << 24; [[fallthrough]];
case 8 : b += k[7]; case 8 : b += k[7]; [[fallthrough]];
case 7 : b += static_cast<uint32_t>(k[6]) << 8; case 7 : b += static_cast<uint32_t>(k[6]) << 8; [[fallthrough]];
case 6 : b += static_cast<uint32_t>(k[5]) << 16; case 6 : b += static_cast<uint32_t>(k[5]) << 16; [[fallthrough]];
case 5 : b += static_cast<uint32_t>(k[4]) << 24; case 5 : b += static_cast<uint32_t>(k[4]) << 24; [[fallthrough]];
case 4 : a += k[3]; case 4 : a += k[3]; [[fallthrough]];
case 3 : a += static_cast<uint32_t>(k[2]) << 8; case 3 : a += static_cast<uint32_t>(k[2]) << 8; [[fallthrough]];
case 2 : a += static_cast<uint32_t>(k[1]) << 16; case 2 : a += static_cast<uint32_t>(k[1]) << 16; [[fallthrough]];
case 1 : a += static_cast<uint32_t>(k[0]) << 24; case 1 : a += static_cast<uint32_t>(k[0]) << 24; [[fallthrough]];
break; break;
case 0 : return c; case 0 : return c;
} }
@ -480,11 +480,11 @@ unsigned Foam::Hasher
) )
{ {
#ifdef __BYTE_ORDER #ifdef __BYTE_ORDER
# if (__BYTE_ORDER == __BIG_ENDIAN) #if (__BYTE_ORDER == __BIG_ENDIAN)
return jenkins_hashbig(key, length, initval); return jenkins_hashbig(key, length, initval);
# else #else
return jenkins_hashlittle(key, length, initval); return jenkins_hashlittle(key, length, initval);
# endif #endif
#else #else
// endian-ness not known at compile-time: runtime endian test // endian-ness not known at compile-time: runtime endian test
const short endianTest = 0x0100; const short endianTest = 0x0100;
@ -539,10 +539,11 @@ unsigned Foam::HasherInt
// handle the last 3 uint32_t's // handle the last 3 uint32_t's
switch (length) // all case statements fall through switch (length) // all case statements fall through
{ {
case 3 : c += k[2]; case 3 : c += k[2]; [[fallthrough]];
case 2 : b += k[1]; case 2 : b += k[1]; [[fallthrough]];
case 1 : a += k[0]; case 1 : a += k[0];
bitMixerFinal(a,b,c); bitMixerFinal(a,b,c);
[[fallthrough]];
case 0 : // case 0: nothing left to add case 0 : // case 0: nothing left to add
break; break;
} }
@ -585,10 +586,11 @@ unsigned Foam::HasherDual
// handle the last 3 uint32_t's // handle the last 3 uint32_t's
switch (length) // all case statements fall through switch (length) // all case statements fall through
{ {
case 3 : c += k[2]; case 3 : c += k[2]; [[fallthrough]];
case 2 : b += k[1]; case 2 : b += k[1]; [[fallthrough]];
case 1 : a += k[0]; case 1 : a += k[0];
bitMixerFinal(a,b,c); bitMixerFinal(a,b,c);
[[fallthrough]];
case 0 : // case 0: nothing left to add case 0 : // case 0: nothing left to add
break; break;
} }

View file

@ -51,7 +51,6 @@ class Ostream;
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class keyType; class keyType;
Istream& operator>>(Istream&, keyType&); Istream& operator>>(Istream&, keyType&);
Ostream& operator<<(Ostream&, const keyType&); Ostream& operator<<(Ostream&, const keyType&);

View file

@ -47,7 +47,6 @@ namespace Foam
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class surfZoneIOList; class surfZoneIOList;
Ostream& operator<<(Ostream&, const surfZoneIOList&); Ostream& operator<<(Ostream&, const surfZoneIOList&);

View file

@ -46,7 +46,6 @@ namespace Foam
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class STLtriangle; class STLtriangle;
Ostream& operator<<(Ostream&, const STLtriangle&); Ostream& operator<<(Ostream&, const STLtriangle&);

View file

@ -128,9 +128,9 @@ void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs()
if if
( (
!this->db().objectRegistry::found(UName) !this->db().objectRegistry::foundObject<volVectorField>(UName)
|| !this->db().objectRegistry::found(URotName) || !this->db().objectRegistry::foundObject<volVectorField>(URotName)
|| !this->db().objectRegistry::found(UThetaName) || !this->db().objectRegistry::foundObject<volScalarField>(UThetaName)
) )
{ {
// Velocities not available, do not update // Velocities not available, do not update
@ -144,6 +144,7 @@ void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs()
<< "Performing enthalpy value update for field " << "Performing enthalpy value update for field "
<< this->dimensionedInternalField().name() << this->dimensionedInternalField().name()
<< " and patch " << patchi << " and patch " << patchi
<< nl << "objects" << this->db().objectRegistry::sortedToc()
<< endl; << endl;
gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad()

View file

@ -16,4 +16,23 @@ $(reactions)/makeChemkinReactions.C
$(reactions)/makeReactionThermoReactions.C $(reactions)/makeReactionThermoReactions.C
$(reactions)/makeLangmuirHinshelwoodReactions.C $(reactions)/makeLangmuirHinshelwoodReactions.C
DegussaProcess = reaction/reactionRate/DegussaProcess
$(DegussaProcess)/DegussaConstants.C
$(DegussaProcess)/Degussa1ReactionRate.C
$(DegussaProcess)/Degussa1aReactionRate.C
$(DegussaProcess)/Degussa2ReactionRate.C
$(DegussaProcess)/Degussa3ReactionRate.C
$(DegussaProcess)/Degussa4ReactionRate.C
$(DegussaProcess)/Degussa5ReactionRate.C
$(DegussaProcess)/Degussa6ReactionRate.C
$(DegussaProcess)/Degussa7ReactionRate.C
$(DegussaProcess)/Degussa8ReactionRate.C
$(DegussaProcess)/Degussa9ReactionRate.C
$(DegussaProcess)/Degussa10ReactionRate.C
$(DegussaProcess)/Degussa11ReactionRate.C
$(DegussaProcess)/Degussa12ReactionRate.C
$(DegussaProcess)/Degussa13aReactionRate.C
$(DegussaProcess)/Degussa13bReactionRate.C
$(reactions)/makeDegussaProcessReactions.C
LIB = $(FOAM_LIBBIN)/libspecie LIB = $(FOAM_LIBBIN)/libspecie