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 
62 {
63  if (owner())
64  {
65  return AMI().srcWeights();
66  }
67 
68  return neighbPatch().AMI().tgtWeights();
69 }
70 
71 
73 {
74  if (owner())
75  {
76  return AMI().srcWeightsSum();
77  }
78 
79  return neighbPatch().AMI().tgtWeightsSum();
80 }
81 
82 
84 {
85  return faceAreas0_;
86 }
87 
88 
90 {
91  return faceCentres0_;
92 }
93 
95 {
96  return rotationAxis_;
97 }
98 
99 
101 {
102  return rotationCentre_;
103 }
104 
105 
107 {
108  return separationVector_;
109 }
110 
111 
112 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::objectRegistry::time
const Time & time() const
Return time.
Definition: objectRegistry.H:186
Foam::UPstream::parRun
static bool & parRun()
Is this a parallel run?
Definition: UPstream.H:415
Foam::cyclicAMIPolyPatch::weights
const scalarListList & weights() const
Helper function to return the weights.
Definition: cyclicAMIPolyPatchI.H:61
Foam::cyclicAMIPolyPatch::separationVector
const vector & separationVector() const
Translation vector for translational cyclic AMI.
Definition: cyclicAMIPolyPatchI.H:106
Foam::cyclicAMIPolyPatch::canResetAMI
bool canResetAMI() const
Flag to indicate whether the AMI can be reset.
Definition: cyclicAMIPolyPatchI.H:31
Foam::cyclicAMIPolyPatch::weightsSum
const scalarField & weightsSum() const
Helper function to return the weights sum.
Definition: cyclicAMIPolyPatchI.H:72
Foam::Field< scalar >
Foam::polyPatch::boundaryMesh
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: polyPatch.C:307
patchID
label patchID
Definition: boundaryProcessorFaPatchPoints.H:5
Foam::polyBoundaryMesh::mesh
const polyMesh & mesh() const
Return the mesh reference.
Definition: polyBoundaryMesh.H:144
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:94
Foam::Vector< scalar >
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:100
Foam::TimePaths::processorCase
bool processorCase() const
Return true if this is a processor case.
Definition: TimePathsI.H:36
Foam::cyclicAMIPolyPatch::faceAreas0
vectorField & faceAreas0() const
Return access to the initial face areas.
Definition: cyclicAMIPolyPatchI.H:83
Foam::cyclicAMIPolyPatch::faceCentres0
vectorField & faceCentres0() const
Return access to the initial face centres.
Definition: cyclicAMIPolyPatchI.H:89