Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
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 Foam_OppositeFaceCellWave_H
48#define Foam_OppositeFaceCellWave_H
49
50#include "FaceCellWave.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
57/*---------------------------------------------------------------------------*\
58 Class OppositeFaceCellWaveBase Declaration
59\*---------------------------------------------------------------------------*/
60
62{
63protected:
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
72public:
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
89template<class Type, class TrackingData = int>
91:
92 public FaceCellWave<Type, TrackingData>,
94{
95protected:
96
97 // Protected Member Functions
98
99 //- Determine 'opposite' faces (= faces not sharing a vertex) on cell
101 (
102 const label celli,
103 const label facei,
105 ) const;
106
107
108public:
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,
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// ************************************************************************* //
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition DynamicList.H:68
static int dummyTrackData_
Default trackData value (for default template argument).
FaceCellWave(const FaceCellWave &)=delete
UList< Type > & allFaceInfo() noexcept
UList< Type > & allCellInfo() noexcept
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
ClassName("OppositeFaceCellWave")
Runtime type information.
DynamicList< label > changedOppositeFaces_
For every entry in changedCells (i.e. the cell front) gives.
OppositeFaceCellWaveBase(const polyMesh &mesh)
Construct with mesh reference (for sizing).
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=FaceCellWaveBase::dummyTrackData_)
Construct from mesh and list of changed faces with the Type for these faces.
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:89
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
dynamicFvMesh & mesh
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62