edgeFaMesh.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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::edgeMesh
29
30Description
31 Mesh data needed to do the Finite Area discretisation.
32
33Author
34 Zeljko Tukovic, FMENA
35 Hrvoje Jasak, Wikki Ltd.
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef edgeFaMesh_H
40#define edgeFaMesh_H
41
42#include "GeoMesh.H"
43#include "faMesh.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class edgeMesh Declaration
52\*---------------------------------------------------------------------------*/
54class edgeMesh
55:
56 public GeoMesh<faMesh>
57{
58public:
59
60 // Constructors
61
62 //- Construct finite-area edge mesh faMesh reference
63 explicit edgeMesh(const faMesh& mesh)
64 :
66 {}
67
68 // Member Functions
69
70 //- Return size. Number of internal edges
71 static label size(const Mesh& mesh)
72 {
73 return mesh.nInternalEdges();
74 }
75
76 //- Return size. Number of internal edges
77 label size() const
78 {
79 return size(mesh_);
80 }
81
82 //- Field of edge centres
83 const edgeVectorField& C() const
84 {
85 return mesh_.edgeCentres();
86 }
87};
88
89
90// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91
92} // End namespace Foam
93
94// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95
96#endif
97
98// ************************************************************************* //
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Definition: GeoMesh.H:49
const faMesh & mesh_
Reference to Mesh.
Definition: GeoMesh.H:55
Generic GeometricField class.
Mesh data needed to do the Finite Area discretisation.
Definition: edgeFaMesh.H:56
static label size(const Mesh &mesh)
Return size. Number of internal edges.
Definition: edgeFaMesh.H:70
edgeMesh()
Default construct.
Definition: edgeMeshI.H:45
edgeMesh(const faMesh &mesh)
Construct finite-area edge mesh faMesh reference.
Definition: edgeFaMesh.H:62
label size() const
Return size. Number of internal edges.
Definition: edgeFaMesh.H:76
const edgeVectorField & C() const
Field of edge centres.
Definition: edgeFaMesh.H:82
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition: faMesh.H:100
const edgeVectorField & edgeCentres() const
Return edge centres as edgeVectorField.
Definition: faMesh.C:768
label nInternalEdges() const
Internal edges using 0,1 or 2 boundary points.
dynamicFvMesh & mesh
Namespace for OpenFOAM.