/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2022 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::wallFace Description Holds information regarding nearest wall point. Used in wall distance calculation. SourceFiles wallFaceI.H \*---------------------------------------------------------------------------*/ #ifndef wallFace_H #define wallFace_H #include "pointField.H" #include "face.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Forward declaration of classes class polyPatch; class polyMesh; class transformer; // Forward declaration of friend functions and operators template class WallFaceBase; template Ostream& operator<<(Ostream&, const WallFaceBase&); template Istream& operator>>(Istream&, WallFaceBase&); /*---------------------------------------------------------------------------*\ Class WallFaceBase Declaration \*---------------------------------------------------------------------------*/ template class WallFaceBase { // Private Data //- Face points pointField points_; //- Normal distance (squared) from cell center to face scalar distSqr_; protected: // Protected Member Functions //- ... template inline bool update ( const point& pt, const WallFaceBase& w2, const scalar tol, TrackingData& td ); public: // Constructors //- Construct null inline WallFaceBase(); //- Construct from face, distance inline WallFaceBase ( const face& f, const pointField& points, const scalar distSqr ); //- Construct from face, distance inline WallFaceBase ( const face& f, const pointField& points, const point& centre, const scalar distSqr ); // Member Functions // Access inline const pointField& points() const; inline pointField& points(); inline scalar distSqr() const; inline scalar& distSqr(); template inline scalar dist(TrackingData& td) const; // Needed by FaceCellWave //- Check whether the WallFaceBase has been changed at all or still // contains original (invalid) value. template inline bool valid(TrackingData& td) const; //- Check for identical geometrical data. Used for checking // consistency across cyclics. template inline bool sameGeometry ( const polyMesh&, const WallFaceBase&, const scalar, TrackingData& td ) const; //- 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 neighbourFacei, const WallFaceBase& neighbourInfo, const scalar tol, TrackingData& td ); //- Influence of neighbouring cell template inline bool updateFace ( const polyMesh&, const label thisFacei, const label neighbourCelli, const WallFaceBase& neighbourInfo, const scalar tol, TrackingData& td ); //- Influence of different value on same face template inline bool updateFace ( const polyMesh&, const label thisFacei, const WallFaceBase& neighbourInfo, const scalar tol, TrackingData& td ); //- Test equality template inline bool equal ( const WallFaceBase&, TrackingData& td ) const; // Member Operators inline bool operator==(const WallFaceBase&) const; inline bool operator!=(const WallFaceBase&) const; // IOstream Operators friend Ostream& operator<< ( Ostream&, const WallFaceBase& ); friend Istream& operator>> ( Istream&, WallFaceBase& ); }; /*---------------------------------------------------------------------------*\ Class wallFace Declaration \*---------------------------------------------------------------------------*/ class wallFace : public WallFaceBase { public: using WallFaceBase::WallFaceBase; template using type = WallFaceBase; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "wallFaceI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //