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-------------------------------------------------------------------------------
11License
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
62inline 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// ************************************************************************* //
static bool & parRun() noexcept
Test if this a parallel run.
Definition: UPstream.H:433
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Definition: boundaryMesh.H:63
const bMesh & mesh() const
Definition: boundaryMesh.H:206
vectorField & faceAreas0() const
Return access to the initial face areas.
const scalarField & weightsSum() const
Helper function to return the weights sum.
const word & neighbPatchName() const
Neighbour patch name.
const scalarListList & weights() const
Helper function to return the weights.
bool canResetAMI() const
Flag to indicate whether the AMI can be reset.
const vector & separationVector() const
Translation vector for translational cyclic AMI.
scalar fraction() const
Particle fraction increase between AMI pathces.
const point & rotationCentre() const
Point on axis of rotation for rotational cyclic AMI.
const vector & rotationAxis() const
Axis of rotation for rotational cyclic AMI.
vectorField & faceCentres0() const
Return access to the initial face centres.
bool createAMIFaces() const
Return access to the createAMIFaces flag.
bool updatingAMI() const
Return access to the updated flag.
A class for handling words, derived from Foam::string.
Definition: word.H:68