Loading...
Searching...
No Matches
oversetFvPatch.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-2021 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::oversetFvPatch
28
29Description
30 Patch for indicating interpolated boundaries (in overset meshes).
31
32SourceFiles
33 oversetFvPatch.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef oversetFvPatch_H
38#define oversetFvPatch_H
39
40#include "coupledFvPatch.H"
41#include "oversetLduInterface.H"
42#include "lduInterface.H"
43#include "fvPatch.H"
44#include "oversetPolyPatch.H"
45#include "fvBoundaryMesh.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
52/*---------------------------------------------------------------------------*\
53 Class oversetFvPatch Declaration
54\*---------------------------------------------------------------------------*/
55
57:
58 public fvPatch,
59 public lduInterface,
61{
62 // Private Data
63
64 const oversetPolyPatch& oversetPolyPatch_;
65
66
67public:
68
69 //- Runtime type information
70 TypeName(oversetPolyPatch::typeName_());
71
72
73 // Constructors
74
75 //- Construct from polyPatch
77 :
78 fvPatch(patch, bm),
79 oversetPolyPatch_(refCast<const oversetPolyPatch>(patch))
80 {}
81
82
83 // Member Functions
84
85 // Access
86
87 //- Return local reference cast into the overset patch
88 const oversetPolyPatch& oversetPatch() const
89 {
90 return oversetPolyPatch_;
91 }
92
93 //- Return faceCell addressing
94 virtual const labelUList& faceCells() const
95 {
96 return oversetPolyPatch_.faceCells();
97 }
98
99 //- Am I the master interface
100 virtual bool master() const
101 {
102 return oversetPolyPatch_.master();
103 }
104
106 // Interface Transfer Functions
107
108 //- Return the values of the given internal data adjacent to
109 //- the interface as a field
111 (
112 const labelUList& internalData
113 ) const;
114
115 //- Return the values of the given internal data adjacent to
116 //- the interface as a field using faceCell mapping
118 (
119 const labelUList& internalData,
120 const labelUList& faceCells
121 ) const;
122
123 //- Initialise transfer of internal field adjacent to the interface
124 virtual void initInternalFieldTransfer
125 (
126 const Pstream::commsTypes commsType,
127 const labelUList& iF
128 ) const;
129
130 //- Initialise transfer of internal field adjacent to the interface
131 //- using faceCells mapping
132 virtual void initInternalFieldTransfer
133 (
134 const Pstream::commsTypes commsType,
135 const labelUList& iF,
136 const labelUList& faceCells
137 ) const;
138
139 //- Transfer and return internal field adjacent to the interface
141 (
142 const Pstream::commsTypes commsType,
143 const labelUList& iF
144 ) const;
145
146 //- Transfer and return internal field adjacent to the interface
147 //- using nbrFaceCells mapping
149 (
150 const Pstream::commsTypes commsType,
151 const labelUList& iF,
152 const labelUList& nbrFaceCells
153 ) const;
154};
155
156
157// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158
159} // End namespace Foam
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163#endif
164
165// ************************************************************************* //
commsTypes
Communications types.
Definition UPstream.H:81
Smooth ATC in cells next to a set of patches supplied by type.
Definition faceCells.H:55
const polyPatch & patch() const noexcept
Return the polyPatch.
Definition fvPatch.H:202
friend class fvBoundaryMesh
Definition fvPatch.H:140
lduInterface() noexcept=default
Default construct.
TypeName(oversetPolyPatch::typeName_())
Runtime type information.
oversetFvPatch(const polyPatch &patch, const fvBoundaryMesh &bm)
Construct from polyPatch.
virtual const labelUList & faceCells() const
Return faceCell addressing.
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Initialise transfer of internal field adjacent to the interface.
const oversetPolyPatch & oversetPatch() const
Return local reference cast into the overset patch.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
Return the values of the given internal data adjacent to the interface as a field.
virtual bool master() const
Am I the master interface.
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Transfer and return internal field adjacent to the interface.
oversetLduInterface() noexcept=default
Default construct.
Patch for indicating interpolated boundaries (in overset meshes).
bool master() const
Am I master patch? The master is responsible for doing all.
A patch is a list of labels that address the faces in the global face list.
Definition polyPatch.H:73
const labelUList & faceCells() const
Return face-cell addressing.
Definition polyPatch.C:401
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
Definition typeInfo.H:172
UList< label > labelUList
A UList of labels.
Definition UList.H:75
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68