OppositeFaceCellWave.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::OppositeFaceCellWave
26 
27 Description
28  Version of FaceCellWave that walks through prismatic cells only.
29 
30  Used to determine mesh structure. In the front walking routines
31  (faceToCell and faceToCell) it
32  - walks across prismatic cells only
33  - and only to a single opposite face
34 
35  Notes:
36  A cell with a split faces will be marked but not walked through (since
37  there is no single opposite face.
38 
39 SourceFiles
40  OppositeFaceCellWave.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef OppositeFaceCellWave_H
45 #define OppositeFaceCellWave_H
46 
47 #include "FaceCellWave.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class OppositeFaceCellWaveName Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 
60 
61 /*---------------------------------------------------------------------------*\
62  Class OppositeFaceCellWave Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 template<class Type, class TrackingData = int>
67 :
68  public FaceCellWave<Type, TrackingData>,
69  public OppositeFaceCellWaveName
70 {
71 protected:
72 
73  // Protected data
74 
75  //- For every entry in changedCells (i.e. the cell front) gives
76  // the face that it needs to transfer to
78 
79 
80  // Protected Member Functions
81 
82  //- Determine 'opposite' faces (= faces not sharing a vertex) on cell
84  (
85  const label celli,
86  const label facei,
88  ) const;
89 
90 
91 public:
92 
93  // Constructors
94 
95  //- Construct from mesh and list of changed faces with the Type
96  // for these faces. Iterates until nothing changes or maxIter reached.
97  // (maxIter can be 0)
99  (
100  const polyMesh&,
101  const labelList& initialChangedFaces,
102  const List<Type>& changedFacesInfo,
105  const label maxIter,
106  TrackingData& td =
108  );
109 
110 
111  //- Destructor
112  virtual ~OppositeFaceCellWave()
113  {};
114 
115 
116  // Member Functions
117 
118  //- Propagate from face to cell. Returns total number of cells
119  // (over all processors) changed.
120  virtual label faceToCell();
121 
122  //- Propagate from cell to face. Returns total number of faces
123  // (over all processors) changed. (Faces on processorpatches are
124  // counted double)
125  virtual label cellToFace();
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace Foam
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #ifdef NoRepository
137  #include "OppositeFaceCellWave.C"
138 #endif
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
Wave propagation of information through grid. Every iteration information goes through one layer of c...
Definition: FaceCellWave.H:79
UList< Type > & allCellInfo()
Access allCellInfo.
Definition: FaceCellWave.H:302
UList< Type > & allFaceInfo()
Access allFaceInfo.
Definition: FaceCellWave.H:296
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()
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.
OppositeFaceCellWave(const polyMesh &, const labelList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=FaceCellWave< Type, TrackingData >::defaultTrackingData_)
Construct from mesh and list of changed faces with the Type.
virtual label cellToFace()
Propagate from cell to face. Returns total number of faces.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
TemplateName(FvFaceCellWave)