areaFaMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016-2017 Wikki Ltd
9  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::areaMesh
29 
30 Description
31  Mesh data needed to do the Finite Area discretisation.
32 
33 Author
34  Zeljko Tukovic, FMENA
35  Hrvoje Jasak, Wikki Ltd.
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef areaFaMesh_H
40 #define areaFaMesh_H
41 
42 #include "GeoMesh.H"
43 #include "faMesh.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class areaMesh Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class areaMesh
55 :
56  public GeoMesh<faMesh>
57 {
58 public:
59 
60  // Constructors
61 
62  //- Construct finite-area mesh from faMesh reference
63  explicit areaMesh(const faMesh& mesh)
64  :
66  {}
67 
68 
69  // Member Functions
70 
71  //- Return size. Number of faces
72  static label size(const Mesh& mesh)
73  {
74  return mesh.nFaces();
75  }
76 
77  //- Return size. Number of faces
78  label size() const
79  {
80  return size(mesh_);
81  }
82 
83  //- Field of face centres
84  const areaVectorField& C() const
85  {
86  return mesh_.areaCentres();
87  }
88 };
89 
90 
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92 
93 } // End namespace Foam
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 #endif
98 
99 // ************************************************************************* //
Foam::areaMesh::size
label size() const
Return size. Number of faces.
Definition: areaFaMesh.H:77
faMesh.H
Foam::GeoMesh< faMesh >::mesh_
const faMesh & mesh_
Reference to Mesh.
Definition: GeoMesh.H:55
Foam::areaMesh::C
const areaVectorField & C() const
Field of face centres.
Definition: areaFaMesh.H:83
Foam::areaMesh
Mesh data needed to do the Finite Area discretisation.
Definition: areaFaMesh.H:53
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::GeoMesh
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Definition: GeoMesh.H:48
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::areaMesh::areaMesh
areaMesh(const faMesh &mesh)
Construct finite-area mesh from faMesh reference.
Definition: areaFaMesh.H:62
Foam::areaMesh::size
static label size(const Mesh &mesh)
Return size. Number of faces.
Definition: areaFaMesh.H:71
Foam::faMesh
Finite area mesh. Used for 2-D non-Euclidian finite area method.
Definition: faMesh.H:82
Foam::GeometricField< vector, faPatchField, areaMesh >
GeoMesh.H
Foam::faMesh::areaCentres
const areaVectorField & areaCentres() const
Return face centres as areaVectorField.
Definition: faMesh.C:609