/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . Class Foam::LayerInfoData Description Class to be used with FaceCellWave which enumerates layers of cells and transports data through those layers SourceFiles LayerInfoDataI.H \*---------------------------------------------------------------------------*/ #ifndef LayerInfoData_H #define LayerInfoData_H #include "layerInfo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Forward declaration of classes class polyPatch; class polyMesh; class transformer; // Forward declaration of friend functions and operators template class LayerInfoData; template inline Ostream& operator<<(Ostream&, const LayerInfoData&); template inline Istream& operator>>(Istream&, LayerInfoData&); /*---------------------------------------------------------------------------*\ Class LayerInfoData Declaration \*---------------------------------------------------------------------------*/ template class LayerInfoData : public layerInfo { // Private Data //- Data Type data_; public: // Constructors //- Construct null inline LayerInfoData(); //- Construct given the face layer index and direction inline LayerInfoData ( const label faceLayer, const label direction, const Type& data ); // Member Functions // Access //- Return the data inline const Type& data() const; // Needed by FaceCellWave //- Transform across an interface template inline void transform ( const polyPatch& patch, const label patchFacei, const transformer& transform, TrackingData& td ); //- Influence of neighbouring face template inline bool updateCell ( const polyMesh&, const label thisCelli, const label nbrFacei, const LayerInfoData& nbrInfo, const scalar tol, TrackingData& td ); //- Influence of neighbouring cell template inline bool updateFace ( const polyMesh&, const label thisFacei, const label nbrCelli, const LayerInfoData& nbrInfo, const scalar tol, TrackingData& td ); //- Influence of different value on same face template inline bool updateFace ( const polyMesh&, const label thisFacei, const LayerInfoData& nbrInfo, const scalar tol, TrackingData& td ); //- Test equality template inline bool equal ( const LayerInfoData&, TrackingData& td ) const; // Member Operators inline bool operator==(const LayerInfoData&) const; inline bool operator!=(const LayerInfoData&) const; // IOstream Operators friend Ostream& operator<< ( Ostream&, const LayerInfoData& ); friend Istream& operator>> ( Istream&, LayerInfoData& ); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #define DefineContiguousLayerInfoDataType(Type, nullArg) \ template<> \ inline bool contiguous>() \ { \ return true; \ } DefineContiguousLayerInfoDataType(bool, ); DefineContiguousLayerInfoDataType(label, ); FOR_ALL_FIELD_TYPES(DefineContiguousLayerInfoDataType); #undef DefineContiguousLayerInfoDataType // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "LayerInfoDataI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //