OppositeFaceCellWave.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 OpenFOAM Foundation
9 Copyright (C) 2020 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::OppositeFaceCellWave
29
30Description
31 Version of FaceCellWave that walks through prismatic cells only.
32
33 Used to determine mesh structure. In the front walking routines
34 (faceToCell and faceToCell) it
35 - walks across prismatic cells only
36 - and only to a single opposite face
37
38 Notes:
39 A cell with a split faces will be marked but not walked through (since
40 there is no single opposite face.
41
42SourceFiles
43 OppositeFaceCellWave.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef OppositeFaceCellWave_H
48#define OppositeFaceCellWave_H
49
50#include "FaceCellWave.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56
57/*---------------------------------------------------------------------------*\
58 Class OppositeFaceCellWaveName Declaration
59\*---------------------------------------------------------------------------*/
62
63
64/*---------------------------------------------------------------------------*\
65 Class OppositeFaceCellWave Declaration
66\*---------------------------------------------------------------------------*/
67
68template<class Type, class TrackingData = int>
70:
71 public FaceCellWave<Type, TrackingData>,
72 public OppositeFaceCellWaveName
73{
74protected:
75
76 // Protected Data
77
78 //- For every entry in changedCells (i.e. the cell front) gives
79 // the face that it needs to transfer to
81
82
83 // Protected Member Functions
84
85 //- Determine 'opposite' faces (= faces not sharing a vertex) on cell
87 (
88 const label celli,
89 const label facei,
91 ) const;
92
93
94public:
95
96 // Constructors
97
98 //- Construct from mesh and list of changed faces with the Type
99 //- for these faces.
100 // Iterates until nothing changes or maxIter reached.
101 // (maxIter can be 0)
103 (
104 const polyMesh&,
105 const labelList& initialChangedFaces,
106 const List<Type>& changedFacesInfo,
109 const label maxIter,
111 );
112
113
114 //- Destructor
115 virtual ~OppositeFaceCellWave() = default;
116
117
118 // Member Functions
119
120 //- Propagate from face to cell. Returns total number of cells
121 // (over all processors) changed.
122 virtual label faceToCell();
123
124 //- Propagate from cell to face. Returns total number of faces
125 // (over all processors) changed. (Faces on processorpatches are
126 // counted double)
127 virtual label cellToFace();
128};
129
130
131// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133} // End namespace Foam
134
135
136// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138#ifdef NoRepository
139 #include "OppositeFaceCellWave.C"
140#endif
141
142// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144#endif
145
146// ************************************************************************* //
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:72
Wave propagation of information through grid. Every iteration information goes through one layer of c...
Definition: FaceCellWave.H:81
UList< Type > & allCellInfo()
Access allCellInfo.
Definition: FaceCellWave.H:342
UList< Type > & allFaceInfo()
Access allFaceInfo.
Definition: FaceCellWave.H:336
Version of FaceCellWave that walks through prismatic cells only.
DynamicList< label > changedOppositeFaces_
For every entry in changedCells (i.e. the cell front) gives.
virtual ~OppositeFaceCellWave()=default
Destructor.
void opposingFaceLabels(const label celli, const label facei, DynamicList< label > &) const
Determine 'opposite' faces (= faces not sharing a vertex) on cell.
virtual label faceToCell()
Propagate from face to cell. Returns total number of cells.
virtual label cellToFace()
Propagate from cell to face. Returns total number of faces.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: UList.H:94
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
#define TemplateName(TemplateNameString)
Add typeName information from argument TypeNameString to a.
Definition: className.H:79
Namespace for OpenFOAM.