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-2022 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::OppositeFaceCellWave
29 
30 Description
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 
42 SourceFiles
43  OppositeFaceCellWave.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef Foam_OppositeFaceCellWave_H
48 #define Foam_OppositeFaceCellWave_H
49 
50 #include "FaceCellWave.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class OppositeFaceCellWaveBase Declaration
59 \*---------------------------------------------------------------------------*/
60 
62 {
63 protected:
64 
65  // Protected Data
66 
67  //- For every entry in changedCells (i.e. the cell front) gives
68  // the face that it needs to transfer to
70 
71 
72 public:
73 
74  //- Runtime type information
75  ClassName("OppositeFaceCellWave");
76 
77 
78  // Constructors
79 
80  //- Construct with mesh reference (for sizing)
82 };
83 
84 
85 /*---------------------------------------------------------------------------*\
86  Class OppositeFaceCellWave Declaration
87 \*---------------------------------------------------------------------------*/
88 
89 template<class Type, class TrackingData = int>
91 :
92  public FaceCellWave<Type, TrackingData>,
94 {
95 protected:
96 
97  // Protected Member Functions
98 
99  //- Determine 'opposite' faces (= faces not sharing a vertex) on cell
100  void opposingFaceLabels
101  (
102  const label celli,
103  const label facei,
105  ) const;
106 
107 
108 public:
109 
110  // Constructors
111 
112  //- Construct from mesh and list of changed faces with the Type
113  //- for these faces.
114  // Iterates until nothing changes or maxIter reached.
115  // (maxIter can be 0)
117  (
118  const polyMesh&,
119  const labelList& initialChangedFaces,
120  const List<Type>& changedFacesInfo,
123  const label maxIter,
124  TrackingData& td = FaceCellWaveBase::dummyTrackData_
125  );
126 
127 
128  //- Destructor
129  virtual ~OppositeFaceCellWave() = default;
130 
131 
132  // Member Functions
133 
134  //- Propagate from face to cell. Returns total number of cells
135  // (over all processors) changed.
136  virtual label faceToCell();
137 
138  //- Propagate from cell to face. Returns total number of faces
139  // (over all processors) changed. (Faces on processorpatches are
140  // counted double)
141  virtual label cellToFace();
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace Foam
148 
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #ifdef NoRepository
153  #include "OppositeFaceCellWave.C"
154 #endif
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
static int dummyTrackData_
Default trackData value (for default template argument)
Definition: FaceCellWave.H:125
DynamicList< label > changedOppositeFaces_
For every entry in changedCells (i.e. the cell front) gives.
OppositeFaceCellWave(const polyMesh &, const labelList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=FaceCellWaveBase::dummyTrackData_)
Construct from mesh and list of changed faces with the Type for these faces.
virtual label cellToFace()
Propagate from cell to face. Returns total number of faces.
Wave propagation of information through grid. Every iteration information goes through one layer of c...
Definition: FaceCellWave.H:206
virtual ~OppositeFaceCellWave()=default
Destructor.
dynamicFvMesh & mesh
OppositeFaceCellWaveBase(const polyMesh &mesh)
Construct with mesh reference (for sizing)
void opposingFaceLabels(const label celli, const label facei, DynamicList< label > &) const
Determine &#39;opposite&#39; faces (= faces not sharing a vertex) on cell.
ClassName("OppositeFaceCellWave")
Runtime type information.
Version of FaceCellWave that walks through prismatic cells only.
virtual label faceToCell()
Propagate from face to cell. Returns total number of cells.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
UList< Type > & allCellInfo() noexcept
Access allCellInfo.
Definition: FaceCellWave.H:498
UList< Type > & allFaceInfo() noexcept
Access allFaceInfo.
Definition: FaceCellWave.H:490
Namespace for OpenFOAM.