cyclicAMIPolyPatchI.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-2013 OpenFOAM Foundation
9  Copyright (C) 2019-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 
31 inline bool Foam::cyclicAMIPolyPatch::canResetAMI() const
32 {
33  return Pstream::parRun() || !boundaryMesh().mesh().time().processorCase();
34 }
35 
36 
38 {
39  return createAMIFaces_;
40 }
41 
42 
43 inline bool Foam::cyclicAMIPolyPatch::updatingAMI() const
44 {
45  return updatingAMI_;
46 }
47 
48 
50 {
51  if (nbrPatchName_.empty())
52  {
53  // Try and use patchGroup to find samplePatch and sampleRegion
54  label patchID = coupleGroup_.findOtherPatchID(*this);
55 
56  nbrPatchName_ = boundaryMesh()[patchID].name();
57  }
58  return nbrPatchName_;
59 }
60 
61 
62 inline Foam::scalar Foam::cyclicAMIPolyPatch::fraction() const
63 {
64  return fraction_;
65 }
66 
67 
69 {
70  if (owner())
71  {
72  return AMI().srcWeights();
73  }
74 
75  return neighbPatch().AMI().tgtWeights();
76 }
77 
78 
80 {
81  if (owner())
82  {
83  return AMI().srcWeightsSum();
84  }
85 
86  return neighbPatch().AMI().tgtWeightsSum();
87 }
88 
89 
91 {
92  return faceAreas0_;
93 }
94 
95 
97 {
98  return faceCentres0_;
99 }
100 
102 {
103  return rotationAxis_;
104 }
105 
106 
108 {
109  return rotationCentre_;
110 }
111 
112 
114 {
115  return separationVector_;
116 }
117 
118 
119 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:63
Foam::TimePaths::processorCase
bool processorCase() const noexcept
Definition: TimePathsI.H:29
Foam::cyclicAMIPolyPatch::weights
const scalarListList & weights() const
Definition: cyclicAMIPolyPatchI.H:61
Foam::cyclicAMIPolyPatch::separationVector
const vector & separationVector() const
Definition: cyclicAMIPolyPatchI.H:106
Foam::cyclicAMIPolyPatch::canResetAMI
bool canResetAMI() const
Definition: cyclicAMIPolyPatchI.H:24
Foam::polyBoundaryMesh::mesh
const polyMesh & mesh() const noexcept
Definition: polyBoundaryMesh.H:148
Foam::cyclicAMIPolyPatch::weightsSum
const scalarField & weightsSum() const
Definition: cyclicAMIPolyPatchI.H:72
Foam::Field
Generic templated field type.
Definition: Field.H:59
Foam::polyPatch::boundaryMesh
const polyBoundaryMesh & boundaryMesh() const
Definition: polyPatch.C:308
patchID
label patchID
Definition: boundaryProcessorFaPatchPoints.H:5
Foam::cyclicAMIPolyPatch::updatingAMI
bool updatingAMI() const
Definition: cyclicAMIPolyPatchI.H:36
Foam::cyclicAMIPolyPatch::createAMIFaces
bool createAMIFaces() const
Definition: cyclicAMIPolyPatchI.H:30
Foam::cyclicAMIPolyPatch::rotationAxis
const vector & rotationAxis() const
Definition: cyclicAMIPolyPatchI.H:94
Foam::cyclicAMIPolyPatch::fraction
scalar fraction() const
Definition: cyclicAMIPolyPatchI.H:55
Foam::Vector< scalar >
Foam::UPstream::parRun
static bool & parRun() noexcept
Definition: UPstream.H:429
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:58
Foam::cyclicAMIPolyPatch::neighbPatchName
const word & neighbPatchName() const
Definition: cyclicAMIPolyPatchI.H:42
Foam::boundaryMesh
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Definition: boundaryMesh.H:58
Foam::cyclicAMIPolyPatch::rotationCentre
const point & rotationCentre() const
Definition: cyclicAMIPolyPatchI.H:100
Foam::objectRegistry::time
const Time & time() const noexcept
Definition: objectRegistry.H:174
Foam::cyclicAMIPolyPatch::faceAreas0
vectorField & faceAreas0() const
Definition: cyclicAMIPolyPatchI.H:83
Foam::cyclicAMIPolyPatch::faceCentres0
vectorField & faceCentres0() const
Definition: cyclicAMIPolyPatchI.H:89