AMIInterpolationI.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 Copyright (C) 2016-2022 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
30{
31 if (!tsrcPatch0_)
32 {
34 << "tsrcPatch0Ptr_ not set"
35 << abort(FatalError);
36 }
37
38 return tsrcPatch0_();
39}
40
41
43{
44
45 if (!ttgtPatch0_)
46 {
48 << "ttgtPatch0Ptr_ not set"
49 << abort(FatalError);
50 }
51
52 return ttgtPatch0_();
53}
54
55
57{
58 return upToDate_;
59}
60
61
63{
64 return upToDate_;
65}
66
67
69{
70 return singlePatchProc_ == -1;
71}
72
73
75{
76 return requireMatch_;
77}
78
79
80inline bool Foam::AMIInterpolation::setRequireMatch(const bool flag)
81{
82 requireMatch_ = flag;
83 return requireMatch_;
84}
85
86
88{
89 return requireMatch_ && !applyLowWeightCorrection();
90}
91
92
94{
95 return reverseTarget_;
96}
97
98
100{
101 return lowWeightCorrection_;
102}
103
104
106{
107 return lowWeightCorrection_ > 0;
108}
109
110
112{
113 return singlePatchProc_;
114}
115
116
118{
119 return srcMagSf_;
120}
121
122
124{
125 return srcMagSf_;
126}
127
128
130{
131 return srcAddress_;
132}
133
134
136{
137 return srcAddress_;
138}
139
140
142{
143 return srcWeights_;
144}
145
146
148{
149 return srcWeights_;
150}
151
152
154{
155 return srcWeightsSum_;
156}
157
158
160{
161 return srcWeightsSum_;
162}
163
164
166{
167 return srcCentroids_;
168}
169
170
172{
173 return srcCentroids_;
174}
175
176
178{
179 return *srcMapPtr_;
180}
181
182
184{
185 return tgtMagSf_;
186}
187
188
190{
191 return tgtMagSf_;
192}
193
194
196{
197 return tgtAddress_;
198}
199
200
202{
203 return tgtAddress_;
204}
205
206
208{
209 return tgtWeights_;
210}
211
212
214{
215 return tgtWeights_;
216}
217
218
220{
221 return tgtWeightsSum_;
222}
223
224
226{
227 return tgtWeightsSum_;
228}
229
230
232{
233 return *tgtMapPtr_;
234}
235
236// ************************************************************************* //
const mapDistribute & srcMap() const
refPtr< primitivePatch > tsrcPatch0_
Source patch using manipulated input points.
bool reverseTarget() const
Access to the reverseTarget flag.
bool mustMatchFaces() const
Return true if requireMatch and lowWeightCorrectionin active.
bool upToDate() const
Access to the up-to-date flag.
const scalarField & srcWeightsSum() const
bool distributed() const
Access to the distributed flag.
const mapDistribute & tgtMap() const
const scalarListList & tgtWeights() const
Return const access to target patch weights.
const labelListList & srcAddress() const
Return const access to source patch addressing.
const scalarField & tgtWeightsSum() const
bool requireMatch() const
Access to the requireMatch flag.
const primitivePatch & tgtPatch0() const
Return the orginal tgt patch with optionally updated points.
const scalarListList & srcWeights() const
Return const access to source patch weights.
const pointListList & srcCentroids() const
Return const access to source patch face centroids.
scalar lowWeightCorrection() const
Threshold weight below which interpolation is deactivated.
bool setRequireMatch(const bool flag)
Access to the requireMatch flag.
bool applyLowWeightCorrection() const
Return true if employing a 'lowWeightCorrection'.
const List< scalar > & srcMagSf() const
Return const access to source patch face areas.
const primitivePatch & srcPatch0() const
Return the orginal src patch with optionally updated points.
const List< scalar > & tgtMagSf() const
Return const access to target patch face areas.
const labelListList & tgtAddress() const
Return const access to target patch addressing.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
A list of faces which address into the list of points.
Class containing processor-to-processor mapping information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
errorManip< error > abort(error &err)
Definition: errorManip.H:144
error FatalError