layerInfo: Corrected function inlining and contiguous trait
This commit is contained in:
@ -171,6 +171,23 @@ public:
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define DefineContiguousLayerInfoDataType(Type, nullArg) \
|
||||
template<> \
|
||||
inline bool contiguous<LayerInfoData<Type>>() \
|
||||
{ \
|
||||
return true; \
|
||||
}
|
||||
|
||||
DefineContiguousLayerInfoDataType(bool, );
|
||||
DefineContiguousLayerInfoDataType(label, );
|
||||
FOR_ALL_FIELD_TYPES(DefineContiguousLayerInfoDataType);
|
||||
|
||||
#undef DefineContiguousLayerInfoDataType
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -185,7 +185,7 @@ inline bool Foam::LayerInfoData<Type>::operator!=
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
inline Foam::Ostream& Foam::operator<<
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const LayerInfoData<Type>& l
|
||||
@ -196,7 +196,7 @@ inline Foam::Ostream& Foam::operator<<
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::Istream& Foam::operator>>(Istream& is, LayerInfoData<Type>& l)
|
||||
Foam::Istream& Foam::operator>>(Istream& is, LayerInfoData<Type>& l)
|
||||
{
|
||||
return is >> static_cast<layerInfo&>(l) >> l.data_;
|
||||
}
|
||||
|
||||
@ -177,6 +177,22 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define DefineContiguousPointEdgeLayerInfoDataType(Type, nullArg) \
|
||||
template<> \
|
||||
inline bool contiguous<PointEdgeLayerInfoData<Type>>() \
|
||||
{ \
|
||||
return true; \
|
||||
}
|
||||
|
||||
DefineContiguousPointEdgeLayerInfoDataType(bool, );
|
||||
DefineContiguousPointEdgeLayerInfoDataType(label, );
|
||||
FOR_ALL_FIELD_TYPES(DefineContiguousPointEdgeLayerInfoDataType);
|
||||
|
||||
#undef DefineContiguousPointEdgeLayerInfoDataType
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -205,7 +205,7 @@ inline bool Foam::PointEdgeLayerInfoData<Type>::operator!=
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
inline Foam::Ostream& Foam::operator<<
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const PointEdgeLayerInfoData<Type>& l
|
||||
@ -220,11 +220,7 @@ inline Foam::Ostream& Foam::operator<<
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::Istream& Foam::operator>>
|
||||
(
|
||||
Istream& is,
|
||||
PointEdgeLayerInfoData<Type>& l
|
||||
)
|
||||
Foam::Istream& Foam::operator>>(Istream& is, PointEdgeLayerInfoData<Type>& l)
|
||||
{
|
||||
return is >> static_cast<pointEdgeLayerInfo&>(l) >> l.data_;
|
||||
}
|
||||
|
||||
@ -181,10 +181,20 @@ public:
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Ostream& operator<<(Ostream&, const layerInfo&);
|
||||
friend Istream& operator>>(Istream&, layerInfo&);
|
||||
inline friend Ostream& operator<<(Ostream&, const layerInfo&);
|
||||
inline friend Istream& operator>>(Istream&, layerInfo&);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<>
|
||||
inline bool contiguous<layerInfo>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -182,7 +182,8 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//- Data associated with pointEdgeLayerInfo type are contiguous
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<>
|
||||
inline bool contiguous<pointEdgeLayerInfo>()
|
||||
{
|
||||
|
||||
@ -29,11 +29,17 @@ License
|
||||
#include "FaceCellWave.H"
|
||||
#include "PointEdgeWave.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(mappedExtrudedPatchBase, 0);
|
||||
|
||||
template<>
|
||||
inline bool contiguous<LayerInfoData<Pair<vector>>>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user