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 -------------------------------------------------------------------------------
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 OppositeFaceCellWave_H
48 #define OppositeFaceCellWave_H
49 
50 #include "FaceCellWave.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class OppositeFaceCellWaveName Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 TemplateName(OppositeFaceCellWave);
62 
63 
64 /*---------------------------------------------------------------------------*\
65  Class OppositeFaceCellWave Declaration
66 \*---------------------------------------------------------------------------*/
67 
68 template<class Type, class TrackingData = int>
70 :
71  public FaceCellWave<Type, TrackingData>,
72  public OppositeFaceCellWaveName
73 {
74 protected:
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 
94 public:
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 // ************************************************************************* //
Foam::OppositeFaceCellWave::faceToCell
virtual label faceToCell()
Propagate from face to cell. Returns total number of cells.
Definition: OppositeFaceCellWave.C:141
OppositeFaceCellWave.C
Foam::DynamicList< label >
Foam::FaceCellWave::allFaceInfo
UList< Type > & allFaceInfo()
Access allFaceInfo.
Definition: FaceCellWave.H:336
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::TemplateName
TemplateName(blendedSchemeBase)
Foam::OppositeFaceCellWave::opposingFaceLabels
void opposingFaceLabels(const label celli, const label facei, DynamicList< label > &) const
Determine 'opposite' faces (= faces not sharing a vertex) on cell.
Definition: OppositeFaceCellWave.C:35
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::FaceCellWave
Wave propagation of information through grid. Every iteration information goes through one layer of c...
Definition: FaceCellWave.H:78
Foam::FaceCellWave::allCellInfo
UList< Type > & allCellInfo()
Access allCellInfo.
Definition: FaceCellWave.H:342
Foam::OppositeFaceCellWave::OppositeFaceCellWave
OppositeFaceCellWave(const polyMesh &, const labelList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=FaceCellWave< Type, TrackingData >::dummyTrackData_)
Definition: OppositeFaceCellWave.C:100
Foam::OppositeFaceCellWave::~OppositeFaceCellWave
virtual ~OppositeFaceCellWave()=default
Destructor.
Foam::List< label >
Foam::OppositeFaceCellWave::changedOppositeFaces_
DynamicList< label > changedOppositeFaces_
For every entry in changedCells (i.e. the cell front) gives.
Definition: OppositeFaceCellWave.H:79
FaceCellWave.H
Foam::UList< Type >
Foam::OppositeFaceCellWave
Version of FaceCellWave that walks through prismatic cells only.
Definition: OppositeFaceCellWave.H:68
Foam::OppositeFaceCellWave::cellToFace
virtual label cellToFace()
Propagate from cell to face. Returns total number of faces.
Definition: OppositeFaceCellWave.C:258