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-2018 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:
55 
56  // Private member functions
57 
58  //- Update the patch areas after AMI update
59  void updateAreas() const;
60 
61 
62 protected:
63 
64  // Protected Member functions
65 
66  //- Make patch weighting factors
67  virtual void makeWeights(scalarField&) const;
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName(cyclicACMIPolyPatch::typeName_());
74 
75 
76  // Constructors
77 
78  //- Construct from polyPatch
80  :
81  cyclicAMIFvPatch(patch, bm)
82  {}
83 
84 
85  // Member functions
86 
87  // Access
88 
89  //- Return a reference to the AMI interpolators
90  virtual const PtrList<AMIPatchToPatchInterpolation>& AMIs() const
91  {
94 
95  updateAreas();
96 
97  return AMIs;
98  }
99 
100  //- Return a reference to the AMI transformations
101  virtual const List<vectorTensorTransform>& AMITransforms() const
102  {
105 
106  updateAreas();
107 
108  return AMITransforms;
109  }
110 
111  //- Return the poly patch
112  const cyclicACMIPolyPatch& cyclicACMIPatch() const
113  {
114  return refCast<const cyclicACMIPolyPatch>(this->patch());
115  }
116 
117  //- Return the neighbour patch
118  const cyclicACMIFvPatch& neighbFvPatch() const
119  {
120  return refCast<const cyclicACMIFvPatch>
121  (
122  this->boundaryMesh()[this->cyclicAMIPatch().neighbPatchID()]
123  );
124  }
125 
126  //- Return the non-overlap patch
127  const fvPatch& nonOverlapFvPatch() const
128  {
129  return this->boundaryMesh()
130  [
132  ];
133  }
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
const fvBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: fvPatch.H:185
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)
virtual label neighbPatchID() const
Neighbour patch ID.
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:60
Cyclic patch for Arbitrary Mesh Interface (AMI)
cyclicACMIFvPatch(const polyPatch &patch, const fvBoundaryMesh &bm)
Construct from polyPatch.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
virtual const PtrList< AMIPatchToPatchInterpolation > & AMIs() const
Return a reference to the AMI interpolators.
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:143
const fvPatch & nonOverlapFvPatch() const
Return the non-overlap patch.
virtual const PtrList< AMIPatchToPatchInterpolation > & AMIs() const
Return a reference to the AMI interpolators.
const cyclicACMIPolyPatch & cyclicACMIPatch() const
Return the poly patch.
TypeName(cyclicACMIPolyPatch::typeName_())
Runtime type information.
virtual const List< vectorTensorTransform > & AMITransforms() const
Return a reference to the AMI transforms.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:63
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 const List< vectorTensorTransform > & AMITransforms() const
Return a reference to the AMI transformations.
virtual label nonOverlapPatchID() const
Non-overlapping patch ID.
Namespace for OpenFOAM.