diff --git a/src/meshTools/layerInfo/LayerInfoData.H b/src/meshTools/layerInfo/LayerInfoData.H index e1e33fd942..6a41c6c693 100644 --- a/src/meshTools/layerInfo/LayerInfoData.H +++ b/src/meshTools/layerInfo/LayerInfoData.H @@ -171,6 +171,23 @@ public: ); }; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define DefineContiguousLayerInfoDataType(Type, nullArg) \ + template<> \ + inline bool contiguous>() \ + { \ + return true; \ + } + +DefineContiguousLayerInfoDataType(bool, ); +DefineContiguousLayerInfoDataType(label, ); +FOR_ALL_FIELD_TYPES(DefineContiguousLayerInfoDataType); + +#undef DefineContiguousLayerInfoDataType + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/meshTools/layerInfo/LayerInfoDataI.H b/src/meshTools/layerInfo/LayerInfoDataI.H index 454ef4207a..7d49f61411 100644 --- a/src/meshTools/layerInfo/LayerInfoDataI.H +++ b/src/meshTools/layerInfo/LayerInfoDataI.H @@ -185,7 +185,7 @@ inline bool Foam::LayerInfoData::operator!= // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // template -inline Foam::Ostream& Foam::operator<< +Foam::Ostream& Foam::operator<< ( Ostream& os, const LayerInfoData& l @@ -196,7 +196,7 @@ inline Foam::Ostream& Foam::operator<< template -inline Foam::Istream& Foam::operator>>(Istream& is, LayerInfoData& l) +Foam::Istream& Foam::operator>>(Istream& is, LayerInfoData& l) { return is >> static_cast(l) >> l.data_; } diff --git a/src/meshTools/layerInfo/PointEdgeLayerInfoData.H b/src/meshTools/layerInfo/PointEdgeLayerInfoData.H index efaac6007e..9c952df988 100644 --- a/src/meshTools/layerInfo/PointEdgeLayerInfoData.H +++ b/src/meshTools/layerInfo/PointEdgeLayerInfoData.H @@ -177,6 +177,22 @@ public: }; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define DefineContiguousPointEdgeLayerInfoDataType(Type, nullArg) \ + template<> \ + inline bool contiguous>() \ + { \ + return true; \ + } + +DefineContiguousPointEdgeLayerInfoDataType(bool, ); +DefineContiguousPointEdgeLayerInfoDataType(label, ); +FOR_ALL_FIELD_TYPES(DefineContiguousPointEdgeLayerInfoDataType); + +#undef DefineContiguousPointEdgeLayerInfoDataType + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/meshTools/layerInfo/PointEdgeLayerInfoDataI.H b/src/meshTools/layerInfo/PointEdgeLayerInfoDataI.H index 91e2b76c46..4b933f37d3 100644 --- a/src/meshTools/layerInfo/PointEdgeLayerInfoDataI.H +++ b/src/meshTools/layerInfo/PointEdgeLayerInfoDataI.H @@ -205,7 +205,7 @@ inline bool Foam::PointEdgeLayerInfoData::operator!= // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // template -inline Foam::Ostream& Foam::operator<< +Foam::Ostream& Foam::operator<< ( Ostream& os, const PointEdgeLayerInfoData& l @@ -220,11 +220,7 @@ inline Foam::Ostream& Foam::operator<< template -inline Foam::Istream& Foam::operator>> -( - Istream& is, - PointEdgeLayerInfoData& l -) +Foam::Istream& Foam::operator>>(Istream& is, PointEdgeLayerInfoData& l) { return is >> static_cast(l) >> l.data_; } diff --git a/src/meshTools/layerInfo/layerInfo.H b/src/meshTools/layerInfo/layerInfo.H index 62cd337f49..eaa46e8fdd 100644 --- a/src/meshTools/layerInfo/layerInfo.H +++ b/src/meshTools/layerInfo/layerInfo.H @@ -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() +{ + return true; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/meshTools/layerInfo/pointEdgeLayerInfo.H b/src/meshTools/layerInfo/pointEdgeLayerInfo.H index 5266d65464..cd1d7d5cfb 100644 --- a/src/meshTools/layerInfo/pointEdgeLayerInfo.H +++ b/src/meshTools/layerInfo/pointEdgeLayerInfo.H @@ -182,7 +182,8 @@ public: }; -//- Data associated with pointEdgeLayerInfo type are contiguous +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + template<> inline bool contiguous() { diff --git a/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.C b/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.C index 43c84772c5..31ecc2386b 100644 --- a/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.C @@ -29,11 +29,17 @@ License #include "FaceCellWave.H" #include "PointEdgeWave.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { defineTypeNameAndDebug(mappedExtrudedPatchBase, 0); + + template<> + inline bool contiguous>>() + { + return true; + } }