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 | Copyright (C) 2016 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 
58 TemplateName(OppositeFaceCellWave);
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,
107  );
108 
109 
110  //- Destructor
111  virtual ~OppositeFaceCellWave()
112  {};
113 
114 
115  // Member Functions
116 
117  //- Propagate from face to cell. Returns total number of cells
118  // (over all processors) changed.
119  virtual label faceToCell();
120 
121  //- Propagate from cell to face. Returns total number of faces
122  // (over all processors) changed. (Faces on processorpatches are
123  // counted double)
124  virtual label cellToFace();
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #ifdef NoRepository
136  #include "OppositeFaceCellWave.C"
137 #endif
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
TemplateName(blendedSchemeBase)
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
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:75
UList< Type > & allFaceInfo()
Access allFaceInfo.
Definition: FaceCellWave.H:325
virtual ~OppositeFaceCellWave()
Destructor.
void opposingFaceLabels(const label celli, const label facei, DynamicList< label > &) const
Determine &#39;opposite&#39; faces (= faces not sharing a vertex) on cell.
Version of FaceCellWave that walks through prismatic cells only.
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_)
Construct from mesh and list of changed faces with the Type.
virtual label faceToCell()
Propagate from face to cell. Returns total number of cells.
UList< Type > & allCellInfo()
Access allCellInfo.
Definition: FaceCellWave.H:331
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
DynamicList< label > changedOppositeFaces_
For every entry in changedCells (i.e. the cell front) gives.
Namespace for OpenFOAM.