/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2026 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::fvMesh Description Mesh data needed to do the Finite Volume discretisation. NOTE ON USAGE: fvMesh contains all the topological and geometric information related to the mesh. It is also responsible for keeping the data up-to-date. This is done by deleting the cell volume, face area, cell/face centre, addressing and other derived information as required and recalculating it as necessary. The fvMesh therefore reserves the right to delete the derived information upon every topological (mesh refinement/morphing) or geometric change (mesh motion). It is therefore unsafe to keep local references to the derived data outside of the time loop. SourceFiles fvMesh.C fvMeshGeometry.C \*---------------------------------------------------------------------------*/ #ifndef fvMesh_H #define fvMesh_H #include "polyMesh.H" #include "surfaceMesh.H" #include "lduMesh.H" #include "primitiveMesh.H" #include "fvBoundaryMesh.H" #include "surfaceInterpolation.H" #include "fvSchemes.H" #include "fvSolution.H" #include "DimensionedField.H" #include "SlicedDimensionedField.H" #include "volFieldsFwd.H" #include "surfaceFieldsFwd.H" #include "pointFieldsFwd.H" #include "slicedVolFieldsFwd.H" #include "slicedSurfaceFieldsFwd.H" #include "className.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { class fvMeshLduAddressing; class fvMeshStitcher; class fvMeshTopoChanger; class fvMeshDistributor; class fvMeshMover; class fvMesh; class polyDistributionMap; template class UCompactListList; namespace fvMeshTopoChangers { class list; } /*---------------------------------------------------------------------------*\ Class fvMesh Declaration \*---------------------------------------------------------------------------*/ class fvMesh : public polyMesh, public lduMesh, public surfaceMesh, public surfaceInterpolation { public: // Public data types //- Enumeration defining the state of the mesh after a read update. // Used for post-processing applications, where the mesh // needs to update based on the files written in time directories. enum readUpdateState { UNCHANGED, POINTS_MOVED, STITCHED, TOPO_CHANGE, TOPO_PATCH_CHANGE }; //- Extent to which to stitch on read and readUpdate. By default, a // full geometric stitch is performed. A non-geometric stitch can be // done as an optimisation in situations when finite volume geometry // is not needed (e.g., decomposition). Stitching can also be // prevented altogether if that is appropriate (e.g., if the mesh is // loaded for mapping in an un-stitched state). enum class stitchType { none, nonGeometric, geometric }; private: // Private Data //- Boundary mesh fvBoundaryMesh boundary_; //- The stitcher function class autoPtr stitcher_; //- The topo-changer function class autoPtr topoChanger_; //- The distributor function class autoPtr distributor_; //- The mover function class autoPtr mover_; // Demand-driven data //- Matrix addressing mutable fvMeshLduAddressing* lduPtr_; //- Face-poly-face IO mutable IOobject* polyFacesBfIOPtr_; //- Face-poly-face addressing mutable GeometricBoundaryField* polyFacesBfPtr_; //- Offsets for poly-bFace-patch and patch-face addressing mutable labelList* polyBFaceOffsetsPtr_; //- Poly-bFace-patch addressing mutable labelList* polyBFaceOffsetPatchesPtr_; //- Poly-bFace-patch-face addressing mutable labelList* polyBFaceOffsetPatchFacesPtr_; //- Poly-bFace-patch addressing mutable UCompactListList