All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cyclicACMIFvPatch.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) 2013-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::cyclicACMIFvPatch
26 
27 Description
28  Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)
29 
30 SourceFiles
31  cyclicACMIFvPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cyclicACMIFvPatch_H
36 #define cyclicACMIFvPatch_H
37 
38 #include "cyclicAMIFvPatch.H"
39 #include "cyclicACMIPolyPatch.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class cyclicACMIFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public cyclicAMIFvPatch
53 {
54  // Private Member Functions
55 
56  //- Update the patch areas after AMI update
57  void updateAreas() const;
58 
59 
60 protected:
61 
62  // Protected Member functions
63 
64  //- Make patch weighting factors
65  virtual void makeWeights(scalarField&) const;
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName(cyclicACMIPolyPatch::typeName_());
72 
73 
74  // Constructors
75 
76  //- Construct from polyPatch
78  :
79  cyclicAMIFvPatch(patch, bm)
80  {}
81 
82 
83  // Member Functions
84 
85  // Access
86 
87  //- Return a reference to the AMI interpolators
88  virtual const PtrList<AMIInterpolation>& AMIs() const
89  {
92 
93  updateAreas();
94 
95  return AMIs;
96  }
97 
98  //- Return a reference to the AMI transformations
99  virtual const List<transformer>& AMITransforms() const
100  {
103 
104  updateAreas();
105 
106  return AMITransforms;
107  }
108 
109  //- Return the poly patch
110  const cyclicACMIPolyPatch& cyclicACMIPatch() const
111  {
112  return refCast<const cyclicACMIPolyPatch>(this->patch());
113  }
114 
115  //- Return the neighbour patch
116  const cyclicACMIFvPatch& neighbFvPatch() const
117  {
118  return refCast<const cyclicACMIFvPatch>
119  (
120  this->boundaryMesh()[this->cyclicAMIPatch().nbrPatchID()]
121  );
122  }
123 
124  //- Return the non-overlap patch
125  const fvPatch& nonOverlapFvPatch() const
126  {
127  return this->boundaryMesh()
128  [
130  ];
131  }
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
const fvBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: fvPatch.H:179
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)
virtual void makeWeights(scalarField &) const
Make patch weighting factors.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Cyclic patch for Arbitrary Mesh Interface (AMI)
cyclicACMIFvPatch(const polyPatch &patch, const fvBoundaryMesh &bm)
Construct from polyPatch.
virtual const List< transformer > & AMITransforms() const
Return a reference to the AMI transformations.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
virtual const PtrList< AMIInterpolation > & AMIs() const
Return a reference to the AMI interpolators.
virtual label nbrPatchID() const
Neighbour patch ID.
const cyclicAMIPolyPatch & cyclicAMIPatch() const
Return local reference cast into the cyclic patch.
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)
const polyPatch & patch() const
Return the polyPatch.
Definition: fvPatch.H:137
virtual const PtrList< AMIInterpolation > & AMIs() const
Return a reference to the AMI interpolators.
const fvPatch & nonOverlapFvPatch() const
Return the non-overlap patch.
const cyclicACMIPolyPatch & cyclicACMIPatch() const
Return the poly patch.
TypeName(cyclicACMIPolyPatch::typeName_())
Runtime type information.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
Foam::fvBoundaryMesh.
const cyclicACMIFvPatch & neighbFvPatch() const
Return the neighbour patch.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
virtual label nonOverlapPatchID() const
Non-overlapping patch ID.
Namespace for OpenFOAM.
virtual const List< transformer > & AMITransforms() const
Return a reference to the AMI transforms.