regionCoupledWallFvPatch.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) 2011-2020 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::regionCoupledWallFvPatch
26 
27 Description
28  Foam::regionCoupledWallFvPatch
29 
30 SourceFiles
31  regionCoupledWallFvPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef regionCoupledWallFvPatch_H
36 #define regionCoupledWallFvPatch_H
37 
38 #include "wallFvPatch.H"
39 #include "fvMesh.H"
40 #include "Time.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class regionCoupledWallFvPatch Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public lduInterface,
56  public wallFvPatch,
58 {
59 
60  // Private Data
61 
62  //- Const reference to regionCoupledWallPolyPatch
63  const regionCoupledWallPolyPatch& regionCoupledPolyPatch_;
64 
65 
66  // Private members
67 
68  //- Return regionCoupledBaseFvPatch nbr
69  const regionCoupledWallFvPatch& neighbFvPatch() const
70  {
71  return refCast<const regionCoupledWallFvPatch>
72  (
74  );
75  }
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName(regionCoupledWallPolyPatch::typeName_());
82 
83 
84  // Constructors
85 
86  //- Construct from components
88  (
89  const polyPatch& patch,
90  const fvBoundaryMesh& bm
91  )
92  :
93  wallFvPatch(patch, bm),
95  (
96  patch,
97  *this
98  ),
99  regionCoupledPolyPatch_
100  (
101  refCast<const regionCoupledWallPolyPatch>(patch)
102  )
103  {}
104 
105 
106  //- Destructor
108  {}
109 
110 
111  // Member Functions
112 
113 
114  // Access
115 
116  //- Return faceCell addressing
117  virtual const labelUList& faceCells() const
118  {
119  return fvPatch::faceCells();
120  }
121 
122  //- Return true because this patch is coupled
123  virtual bool coupled() const
124  {
125  return regionCoupledPolyPatch_.coupled();
126  }
127 
128 
129 
130  // Interface transfer functions
131 
132  //- Return the values of the given internal data adjacent to
133  // the interface as a field
135  (
136  const labelUList& internalData
137  ) const;
138 
139  //- Inherit initInternalFieldTransfer from lduInterface
141 
142  //- Initialise neighbour field transfer
144  (
145  const Pstream::commsTypes commsType,
146  labelUList& iF
147  ) const
148  {}
149 
150  //- Return neighbour field
152  (
153  const Pstream::commsTypes commsType,
154  const labelUList& iF
155  ) const;
156 };
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
Foam::wallFvPatch.
Definition: wallFvPatch.H:49
virtual const labelUList & faceCells() const
Return faceCell addressing.
TypeName(regionCoupledWallPolyPatch::typeName_())
Runtime type information.
commsTypes
Types of communications.
Definition: UPstream.H:64
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, labelUList &iF) const
Initialise neighbour field transfer.
To & refCast(From &r)
Reference type cast template function.
Definition: typeInfo.H:106
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
Definition: polyPatch.H:319
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Initialise transfer of internal field adjacent to the interface.
Definition: lduInterface.H:95
regionCoupledWallFvPatch(const polyPatch &patch, const fvBoundaryMesh &bm)
Construct from components.
Foam::regionCoupledWallFvPatch.
virtual const labelUList & faceCells() const
Return faceCells.
Definition: fvPatch.C:99
virtual label nbrPatchID() const
Return neighbour.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
Base class of regionCoupledFvPatch with common functionality for regionCoupledFvPatch and regionCoupl...
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
Return the values of the given internal data adjacent to.
const fvMesh & nbrFvMesh() const
Returns fvMesh.
Foam::fvBoundaryMesh.
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches...
Definition: lduInterface.H:53
A class for managing temporary objects.
Definition: PtrList.H:53
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Return neighbour field.
Namespace for OpenFOAM.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
Definition: fvMesh.C:540
virtual bool coupled() const
Return true because this patch is coupled.