regionCoupledBaseFvPatch.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) 2011 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::regionCoupledBaseFvPatch
26 
27 Description
28  Base class of regionCoupledFvPatch with common functionality for
29  regionCoupledFvPatch and regionCoupledWallFvPatch
30 
31 SourceFiles
32  regionCoupledBaseFvPatch.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef regionCoupledBaseFvPatch_H
37 #define regionCoupledBaseFvPatch_H
38 
39 #include "regionCoupledBase.H"
40 #include "fvMesh.H"
41 #include "Time.H"
42 #include "polyPatch.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class regionCoupledBaseFvPatch Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
57 {
58 protected:
59 
60  // Protected data
61 
62  //- Reference to regionCoupledBase
64 
65  //- Reference to fvPatch
66  const fvPatch& patch_;
67 
68 
69  // Protected members
70 
71  //- Returns fvMesh
72  const fvMesh& nbrFvMesh() const
73  {
74  return
75  (
77  (
79  )
80  );
81  }
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("regionCoupledBase");
88 
89 
90  // Constructors
91 
92  //- Construct from polyPatch
94  (
95  const polyPatch& pp,
96  const fvPatch& patch
97  )
98  :
101  (
102  refCast<const regionCoupledBase>(pp)
103  ),
104  patch_(patch)
105  {}
106 
107 
108  //- Destructor
109  virtual ~regionCoupledBaseFvPatch()
110  {}
111 
112 
113  // Member Functions
114 
115  // Access
116 
117  //- Return neighbour
118  virtual label neighbPatchID() const
119  {
121  }
122 
123  //- Is it the owner?
124  virtual bool owner() const
125  {
126  return regionCoupledBase_.owner();
127  }
128 
129  //- Return regionCoupledBase neighb Patch
130  virtual const regionCoupledBaseFvPatch& neighbPatch() const
131  {
132  return refCast<const regionCoupledBaseFvPatch>
133  (
134  nbrFvMesh().boundary()
135  [
137  ]
138  );
139  }
140 
141  //- Return a reference to the AMI interpolator
142  virtual const AMIPatchToPatchInterpolation& AMI() const
143  {
144  return regionCoupledBase_.AMI();
145  }
146 
147  //- Returns neighbour polyMesh
148  virtual const polyMesh& nbrMesh() const
149  {
150  return
151  (
153  (
155  )
156  );
157  }
158 
159  //- Return fvPatch
160  const fvPatch& patch() const
161  {
162  return patch_;
163  }
164 
165  //- Returns if it is the same Region
166  bool sameRegion() const
167  {
169  }
170 
171  //- Return regionCoupledPolyPatch
173  {
174  return regionCoupledBase_;
175  }
176 
177  //- Return neighbor fvPatch
178  const fvPatch& neighbFvPatch() const
179  {
180  return refCast<const fvPatch>
181  (
182  nbrFvMesh().boundary()
183  [
185  ]
186  );
187  }
188 
189  //- Return the interface type
190  const word& regionCoupleType() const
191  {
193  }
194 
195 
196  //- Return faceCell addressing
197  virtual const labelUList& faceCells() const = 0;
198 
199 };
200 
201 
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 
204 } // End namespace Foam
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 #endif
209 
210 // ************************************************************************* //
Foam::regionCoupledBaseFvPatch::TypeName
TypeName("regionCoupledBase")
Runtime type information.
Foam::regionCoupledBaseFvPatch::nbrFvMesh
const fvMesh & nbrFvMesh() const
Returns fvMesh.
Definition: regionCoupledBaseFvPatch.H:71
regionCoupledLduInterface.H
Foam::regionCoupledBaseFvPatch::nbrMesh
virtual const polyMesh & nbrMesh() const
Returns neighbour polyMesh.
Definition: regionCoupledBaseFvPatch.H:147
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::regionCoupledBaseFvPatch
Base class of regionCoupledFvPatch with common functionality for regionCoupledFvPatch and regionCoupl...
Definition: regionCoupledBaseFvPatch.H:53
polyPatch.H
Foam::regionCoupledBaseFvPatch::faceCells
virtual const labelUList & faceCells() const =0
Return faceCell addressing.
Foam::regionCoupledBaseFvPatch::sameRegion
bool sameRegion() const
Returns if it is the same Region.
Definition: regionCoupledBaseFvPatch.H:165
Foam::regionCoupledBase::AMI
const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
Definition: regionCoupledBase.C:282
Foam::regionCoupledBaseFvPatch::neighbPatch
virtual const regionCoupledBaseFvPatch & neighbPatch() const
Return regionCoupledBase neighb Patch.
Definition: regionCoupledBaseFvPatch.H:129
boundary
faceListList boundary(nPatches)
regionCoupledBase.H
Foam::regionCoupledBase::nbrRegionName
const word & nbrRegionName() const
Neighbour region name.
Definition: regionCoupledBase.H:132
Foam::fvBoundaryMesh::mesh
const fvMesh & mesh() const
Return the mesh reference.
Definition: fvBoundaryMesh.H:99
Foam::regionCoupledBaseFvPatch::neighbFvPatch
const fvPatch & neighbFvPatch() const
Return neighbor fvPatch.
Definition: regionCoupledBaseFvPatch.H:177
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::fvPatch::boundaryMesh
const fvBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: fvPatch.H:185
Foam::regionCoupledLduInterface::regionCoupledLduInterface
regionCoupledLduInterface()
Construct null.
Definition: regionCoupledLduInterface.H:63
Foam::regionCoupledBaseFvPatch::neighbPatchID
virtual label neighbPatchID() const
Return neighbour.
Definition: regionCoupledBaseFvPatch.H:117
Foam::label
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
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::regionCoupledBaseFvPatch::patch_
const fvPatch & patch_
Reference to fvPatch.
Definition: regionCoupledBaseFvPatch.H:65
Foam::regionCoupledBaseFvPatch::regionCoupledBase_
const regionCoupledBase & regionCoupledBase_
Reference to regionCoupledBase.
Definition: regionCoupledBaseFvPatch.H:62
Foam::regionCoupledBaseFvPatch::owner
virtual bool owner() const
Is it the owner?
Definition: regionCoupledBaseFvPatch.H:123
Foam::regionCoupledBase::neighbPatchID
label neighbPatchID() const
Neighbour patch ID.
Definition: regionCoupledBase.C:186
Foam::regionCoupledBase
Base class with common functinality for regionCoupled polyPatch. It includes AMI.
Definition: regionCoupledBase.H:51
Foam::regionCoupledBaseFvPatch::patch
const fvPatch & patch() const
Return fvPatch.
Definition: regionCoupledBaseFvPatch.H:159
Foam::regionCoupledBaseFvPatch::~regionCoupledBaseFvPatch
virtual ~regionCoupledBaseFvPatch()
Destructor.
Definition: regionCoupledBaseFvPatch.H:108
Foam::regionCoupledBase::owner
bool owner() const
Does this side own the patch?
Definition: regionCoupledBase.C:237
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::refCast
To & refCast(From &r)
Reference type cast template function.
Definition: typeInfo.H:106
Foam::regionCoupledBase::sameRegion
bool sameRegion() const
Cached sampleRegion != mesh.name()
Definition: regionCoupledBase.H:138
Foam::regionCoupledBaseFvPatch::regionCoupledBaseFvPatch
regionCoupledBaseFvPatch(const polyPatch &pp, const fvPatch &patch)
Construct from polyPatch.
Definition: regionCoupledBaseFvPatch.H:93
Foam::regionCoupledBase::regionCoupleType
virtual const word & regionCoupleType() const =0
Return the type.
Foam::AMIInterpolation
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
Definition: AMIInterpolation.H:77
Foam::UList
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
Foam::fvMesh::time
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:243
Foam::regionCoupledBaseFvPatch::regionCoupleType
const word & regionCoupleType() const
Return the interface type.
Definition: regionCoupledBaseFvPatch.H:189
Foam::objectRegistry::lookupObject
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
Definition: objectRegistryTemplates.C:165
Foam::regionCoupledLduInterface
An abstract base class for region coupled interfaces.
Definition: regionCoupledLduInterface.H:51
Foam::regionCoupledBaseFvPatch::regionCoupledPatch
const regionCoupledBase & regionCoupledPatch() const
Return regionCoupledPolyPatch.
Definition: regionCoupledBaseFvPatch.H:171
Foam::regionCoupledBaseFvPatch::AMI
virtual const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
Definition: regionCoupledBaseFvPatch.H:141