cutCell.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 DHI
9 Copyright (C) 2018-2019 Johan Roenby
10 Copyright (C) 2020 DLR
11-------------------------------------------------------------------------------
12License
13 This file is part of OpenFOAM.
14
15 OpenFOAM is free software: you can redistribute it and/or modify it
16 under the terms of the GNU General Public License as published by
17 the Free Software Foundation, either version 3 of the License, or
18 (at your option) any later version.
19
20 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27
28Class
29 Foam::cutCell
30
31Description
32 Service routines for cutting a cell, celli, of an fvMesh, mesh_,
33 at its intersection with a surface
34
35 Original code supplied by
36 Johan Roenby, DHI (2016)
37 Henning Scheufler, DLR (2019)
38
39SourceFiles
40 cutCell.C
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef cutCell_H
45#define cutCell_H
46
47#include "fvMesh.H"
48#include "volFields.H"
49#include "surfaceFields.H"
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55
56/*---------------------------------------------------------------------------*\
57 Class cutCell Declaration
58\*---------------------------------------------------------------------------*/
60class cutCell
61{
62protected:
63
64 // Protected Member Functions
65
66 //- Calculates volume and centre of the cutted cell
67 static void calcCellData
68 (
69 const DynamicList<point>& cutFaceCentres,
70 const DynamicList<vector>& cutFaceAreas,
71 vector& subCellCentre,
72 scalar& subCellVolume
73 );
74
75 //- Calculates area and centre of the cutting face
76 static void calcGeomDataCutFace
77 (
78 const DynamicList<DynamicList<point>>& faceEdges,
79 const vector& subCellCentre,
80 vector& faceArea,
81 vector& faceCentre
82 );
83
84 //- Calculates the point of the cutting face
86 (
87 const vector& faceArea,
88 const vector& faceCentre,
89 const DynamicList<DynamicList<point>> & faceEdges,
90 DynamicList<point>& facePoints
91 );
92
93public:
94
95 // Static Data
96 static int debug;
97
98
99 // Constructors
100
101 //- Construct from fvMesh
102 explicit cutCell(const fvMesh& mesh);
103};
104
105
106// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107
108} // End namespace Foam
109
110// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111
112#endif
113
114// ************************************************************************* //
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:72
Service routines for cutting a cell, celli, of an fvMesh, mesh_, at its intersection with a surface.
Definition: cutCell.H:60
static void calcCellData(const DynamicList< point > &cutFaceCentres, const DynamicList< vector > &cutFaceAreas, vector &subCellCentre, scalar &subCellVolume)
Calculates volume and centre of the cutted cell.
Definition: cutCell.C:56
static int debug
Definition: cutCell.H:95
static void calcIsoFacePointsFromEdges(const vector &faceArea, const vector &faceCentre, const DynamicList< DynamicList< point > > &faceEdges, DynamicList< point > &facePoints)
Calculates the point of the cutting face.
Definition: cutCell.C:165
static void calcGeomDataCutFace(const DynamicList< DynamicList< point > > &faceEdges, const vector &subCellCentre, vector &faceArea, vector &faceCentre)
Calculates area and centre of the cutting face.
Definition: cutCell.C:95
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
dynamicFvMesh & mesh
Namespace for OpenFOAM.
Foam::surfaceFields.