cyclicAMIPointPatch.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) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::cyclicAMIPointPatch
28 
29 Description
30  Cyclic AMI point patch - place holder only
31 
32 SourceFiles
33  cyclicAMIPointPatch.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef cyclicAMIPointPatch_H
38 #define cyclicAMIPointPatch_H
39 
40 #include "coupledFacePointPatch.H"
41 #include "cyclicAMIPolyPatch.H"
42 #include "pointBoundaryMesh.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class cyclicAMIPointPatch Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
56 {
57  // Private data
58 
59  //- Local reference cast into the cyclic AMI patch
60  const cyclicAMIPolyPatch& cyclicAMIPolyPatch_;
61 
62 
63  // Private Member Functions
64 
65  //- No copy construct
67 
68  //- No copy assignment
69  void operator=(const cyclicAMIPointPatch&) = delete;
70 
71 
72 protected:
73 
74  // Protected Member Functions
75 
76  //- Initialise the calculation of the patch geometry
77  virtual void initGeometry(PstreamBuffers&);
78 
79  //- Calculate the patch geometry
80  virtual void calcGeometry(PstreamBuffers&);
81 
82  //- Initialise the patches for moving points
83  virtual void initMovePoints(PstreamBuffers&, const pointField&);
84 
85  //- Correct patches after moving points
86  virtual void movePoints(PstreamBuffers&, const pointField&);
87 
88  //- Initialise the update of the patch topology
89  virtual void initUpdateMesh(PstreamBuffers&);
90 
91  //- Update of the patch topology
92  virtual void updateMesh(PstreamBuffers&);
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName(cyclicAMIPolyPatch::typeName_());
99 
100 
101  // Constructors
102 
103  //- Construct from components
105  (
106  const polyPatch& patch,
107  const pointBoundaryMesh& bm
108  );
109 
110 
111  //- Destructor
112  virtual ~cyclicAMIPointPatch();
113 
114 
115  // Member Functions
116 
117  //- Return true if this patch field is coupled
118  virtual bool coupled() const;
119 
120  //- Return the constraint type this pointPatch implements.
121  virtual const word& constraintType() const
122  {
123  return type();
124  }
125 
126  //- Return the underlying cyclicAMIPolyPatch
127  const cyclicAMIPolyPatch& cyclicAMIPatch() const
128  {
129  return cyclicAMIPolyPatch_;
130  }
131 
132  //- Return neighbour point patch
133  const cyclicAMIPointPatch& neighbPatch() const
134  {
135  label patchi = cyclicAMIPolyPatch_.neighbPatchID();
136  const pointPatch& pp = this->boundaryMesh()[patchi];
137  return refCast<const cyclicAMIPointPatch>(pp);
138  }
139 
140  //- Are the cyclic planes parallel
141  bool parallel() const
142  {
143  return cyclicAMIPolyPatch_.parallel();
144  }
145 
146  //- Return face transformation tensor
147  const tensorField& forwardT() const
148  {
149  return cyclicAMIPolyPatch_.forwardT();
150  }
151 
152  //- Return neighbour-cell transformation tensor
153  const tensorField& reverseT() const
154  {
155  return cyclicAMIPolyPatch_.reverseT();
156  }
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
Foam::cyclicAMIPointPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: cyclicAMIPointPatch.C:77
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::cyclicAMIPointPatch::parallel
bool parallel() const
Are the cyclic planes parallel.
Definition: cyclicAMIPointPatch.H:140
Foam::cyclicAMIPointPatch
Cyclic AMI point patch - place holder only.
Definition: cyclicAMIPointPatch.H:52
Foam::coupledPolyPatch::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: coupledPolyPatch.H:301
Foam::PstreamBuffers
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Definition: PstreamBuffers.H:88
Foam::cyclicAMIPointPatch::TypeName
TypeName(cyclicAMIPolyPatch::typeName_())
Runtime type information.
Foam::coupledPolyPatch::reverseT
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Definition: coupledPolyPatch.H:307
Foam::facePointPatch::patch
virtual const polyPatch & patch() const
Return the polyPatch.
Definition: facePointPatch.H:148
Foam::pointPatch
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:58
Foam::cyclicAMIPointPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: cyclicAMIPointPatch.C:57
pointBoundaryMesh.H
Foam::cyclicAMIPointPatch::coupled
virtual bool coupled() const
Return true if this patch field is coupled.
Definition: cyclicAMIPointPatch.C:112
Foam::coupledPolyPatch::parallel
virtual bool parallel() const
Are the cyclic planes parallel.
Definition: coupledPolyPatch.H:295
Foam::cyclicAMIPointPatch::cyclicAMIPatch
const cyclicAMIPolyPatch & cyclicAMIPatch() const
Return the underlying cyclicAMIPolyPatch.
Definition: cyclicAMIPointPatch.H:126
Foam::Field< vector >
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::coupledFacePointPatch
coupled patch for post-processing. Used as the base class for processor and cyclic pointPatches
Definition: coupledFacePointPatch.H:55
Foam::cyclicAMIPointPatch::reverseT
const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Definition: cyclicAMIPointPatch.H:152
Foam::cyclicAMIPointPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: cyclicAMIPointPatch.C:66
Foam::cyclicAMIPolyPatch::neighbPatchID
virtual label neighbPatchID() const
Neighbour patch ID.
Definition: cyclicAMIPolyPatch.C:902
Foam::cyclicAMIPointPatch::neighbPatch
const cyclicAMIPointPatch & neighbPatch() const
Return neighbour point patch.
Definition: cyclicAMIPointPatch.H:132
Foam::cyclicAMIPointPatch::movePoints
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
Definition: cyclicAMIPointPatch.C:73
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
cyclicAMIPolyPatch.H
Foam::pointBoundaryMesh
Foam::pointBoundaryMesh.
Definition: pointBoundaryMesh.H:56
Foam::cyclicAMIPointPatch::calcGeometry
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: cyclicAMIPointPatch.C:61
coupledFacePointPatch.H
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::cyclicAMIPointPatch::forwardT
const tensorField & forwardT() const
Return face transformation tensor.
Definition: cyclicAMIPointPatch.H:146
Foam::pointPatch::boundaryMesh
const pointBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: pointPatch.H:135
Foam::cyclicAMIPointPatch::~cyclicAMIPointPatch
virtual ~cyclicAMIPointPatch()
Destructor.
Definition: cyclicAMIPointPatch.C:106
Foam::cyclicAMIPointPatch::constraintType
virtual const word & constraintType() const
Return the constraint type this pointPatch implements.
Definition: cyclicAMIPointPatch.H:120
Foam::cyclicAMIPolyPatch
Cyclic patch for Arbitrary Mesh Interface (AMI)
Definition: cyclicAMIPolyPatch.H:68
Foam::cyclicAMIPointPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: cyclicAMIPointPatch.C:84