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 
32 {
33  return Pstream::parRun() || !boundaryMesh().mesh().time().processorCase();
34 }
35 
36 
38 {
39  return createAMIFaces_;
40 }
41 
42 
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:65
Foam::TimePaths::processorCase
bool processorCase() const noexcept
Return true if this is a processor case.
Definition: TimePathsI.H:36
Foam::cyclicAMIPolyPatch::weights
const scalarListList & weights() const
Helper function to return the weights.
Definition: cyclicAMIPolyPatchI.H:68
Foam::cyclicAMIPolyPatch::separationVector
const vector & separationVector() const
Translation vector for translational cyclic AMI.
Definition: cyclicAMIPolyPatchI.H:113
Foam::cyclicAMIPolyPatch::canResetAMI
bool canResetAMI() const
Flag to indicate whether the AMI can be reset.
Definition: cyclicAMIPolyPatchI.H:31
Foam::polyBoundaryMesh::mesh
const polyMesh & mesh() const noexcept
Return the mesh reference.
Definition: polyBoundaryMesh.H:152
Foam::cyclicAMIPolyPatch::weightsSum
const scalarField & weightsSum() const
Helper function to return the weights sum.
Definition: cyclicAMIPolyPatchI.H:79
Foam::Field< scalar >
Foam::polyPatch::boundaryMesh
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: polyPatch.C:315
patchID
label patchID
Definition: boundaryProcessorFaPatchPoints.H:5
Foam::cyclicAMIPolyPatch::updatingAMI
bool updatingAMI() const
Return access to the updated flag.
Definition: cyclicAMIPolyPatchI.H:43
Foam::cyclicAMIPolyPatch::createAMIFaces
bool createAMIFaces() const
Return access to the createAMIFaces flag.
Definition: cyclicAMIPolyPatchI.H:37
Foam::cyclicAMIPolyPatch::rotationAxis
const vector & rotationAxis() const
Axis of rotation for rotational cyclic AMI.
Definition: cyclicAMIPolyPatchI.H:101
Foam::cyclicAMIPolyPatch::fraction
scalar fraction() const
Particle fraction increase between AMI pathces.
Definition: cyclicAMIPolyPatchI.H:62
Foam::Vector< scalar >
Foam::UPstream::parRun
static bool & parRun() noexcept
Test if this a parallel run.
Definition: UPstream.H:433
Foam::List< scalarList >
Foam::cyclicAMIPolyPatch::neighbPatchName
const word & neighbPatchName() const
Neighbour patch name.
Definition: cyclicAMIPolyPatchI.H:49
Foam::boundaryMesh
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Definition: boundaryMesh.H:62
Foam::cyclicAMIPolyPatch::rotationCentre
const point & rotationCentre() const
Point on axis of rotation for rotational cyclic AMI.
Definition: cyclicAMIPolyPatchI.H:107
Foam::objectRegistry::time
const Time & time() const noexcept
Return time registry.
Definition: objectRegistry.H:178
Foam::cyclicAMIPolyPatch::faceAreas0
vectorField & faceAreas0() const
Return access to the initial face areas.
Definition: cyclicAMIPolyPatchI.H:90
Foam::cyclicAMIPolyPatch::faceCentres0
vectorField & faceCentres0() const
Return access to the initial face centres.
Definition: cyclicAMIPolyPatchI.H:96