AMIInterpolation.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-2017 OpenFOAM Foundation
9  Copyright (C) 2016-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 Class
28  Foam::AMIInterpolation
29 
30 Description
31  Interpolation class dealing with transfer of data between two
32  primitive patches with an arbitrary mesh interface (AMI).
33 
34  Based on the algorithm given in:
35 
36  Conservative interpolation between volume meshes by local Galerkin
37  projection, Farrell PE and Maddison JR, 2011, Comput. Methods Appl.
38  Mech Engrg, Volume 200, Issues 1-4, pp 89-100
39 
40  Interpolation requires that the two patches should have opposite
41  orientations (opposite normals). The 'reverseTarget' flag can be used to
42  reverse the orientation of the target patch.
43 
44 SourceFiles
45  AMIInterpolation.C
46  AMIInterpolationName.C
47  AMIInterpolationParallelOps.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef AMIInterpolation_H
52 #define AMIInterpolation_H
53 
54 #include "className.H"
55 #include "searchableSurface.H"
56 #include "treeBoundBoxList.H"
57 #include "boolList.H"
58 #include "primitivePatch.H"
59 #include "faceAreaIntersect.H"
60 #include "globalIndex.H"
61 #include "ops.H"
62 #include "refPtr.H"
63 #include "Enum.H"
64 #include "pointList.H"
65 #include "indexedOctree.H"
66 #include "treeDataPrimitivePatch.H"
67 
68 #include "runTimeSelectionTables.H"
69 
70 
71 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73 namespace Foam
74 {
75 
76 /*---------------------------------------------------------------------------*\
77  Class AMIInterpolation Declaration
78 \*---------------------------------------------------------------------------*/
79 
80 class AMIInterpolation
81 {
82 public:
83 
84  // Public data types
85 
86  static bool cacheIntersections_;
87 
88 
89 protected:
90 
91  //- Local typedef to octree tree-type
93 
94  // Protected data
95 
96  //- Flag to indicate that the two patches must be matched/an overlap
97  //- exists between them
98  bool requireMatch_;
99 
100  //- Flag to indicate that the two patches are co-directional and
101  //- that the orientation of the target patch should be reversed
102  const bool reverseTarget_;
103 
104  //- Threshold weight below which interpolation is deactivated
105  scalar lowWeightCorrection_;
106 
107  //- Index of processor that holds all of both sides. -1 in all other
108  //- cases
109  label singlePatchProc_;
110 
111 
112  // Source patch
113 
114  //- Source face areas
116 
117  //- Addresses of target faces per source face
119 
120  //- Weights of target faces per source face
122 
123  //- Sum of weights of target faces per source face
125 
126  //- Centroid of target faces per source face
128 
129  //- Source patch points if input points are manipulated, e.g.
130  //- projected
132 
133  //- Source patch using manipulated input points
135 
136  //- Source map pointer - parallel running only
138 
139 
140  // Target patch
141 
142  //- Target face areas
144 
145  //- Addresses of source faces per target face
147 
148  //- Weights of source faces per target face
150 
151  //- Sum of weights of source faces per target face
153 
154  //- Centroid of source faces per target face
156 
157  //- Target patch points if input points are manipulated, e.g.
158  //- projected
160 
161  //- Target patch using manipulated input points
163 
164  //- Target map pointer - parallel running only
166 
167  //- Up-to-date flag
168  bool upToDate_;
169 
170 
171  // Protected Member Functions
172 
173  //- No copy assignment
174  void operator=(const AMIInterpolation&) = delete;
175 
176 
177  // Initialisation
178 
179  //- Reset the octree for the patch face search
181  (
182  const primitivePatch& patch
183  ) const;
184 
185  //- Calculate if patches are on multiple processors
186  label calcDistribution
187  (
188  const primitivePatch& srcPatch,
189  const primitivePatch& tgtPatch
190  ) const;
191 
192  //- Project points to surface
194  (
195  const searchableSurface& surf,
196  pointField& pts
197  ) const;
198 
199 
200  // Access
201 
202  //- Return the orginal src patch with optionally updated points
203  inline const primitivePatch& srcPatch0() const;
204 
205  //- Return the orginal tgt patch with optionally updated points
206  inline const primitivePatch& tgtPatch0() const;
207 
208 
209  // Evaluation
210 
211  //- Normalise the (area) weights - suppresses numerical error in
212  //- weights calculation
213  // NOTE: if area weights are incorrect by 'a significant amount'
214  // normalisation may stabilise the solution, but will introduce
215  // numerical error!
216  static void normaliseWeights
217  (
218  const scalarList& patchAreas,
219  const word& patchName,
220  const labelListList& addr,
221  scalarListList& wght,
222  scalarField& wghtSum,
223  const bool conformal,
224  const bool output,
225  const scalar lowWeightTol
226  );
227 
228 
229  // Constructor helpers
230 
231  static void agglomerate
232  (
233  const autoPtr<mapDistribute>& targetMap,
234  const scalarList& fineSrcMagSf,
235  const labelListList& fineSrcAddress,
236  const scalarListList& fineSrcWeights,
237 
238  const labelList& sourceRestrictAddressing,
239  const labelList& targetRestrictAddressing,
240 
246  );
247 
248 
249 public:
250 
251  //- Runtime type information
252  TypeName("AMIInterpolation");
253 
254  // Selection tables
255 
256  //- Selection table for dictionary construction
258  (
259  autoPtr,
261  dict,
262  (
263  const dictionary& dict,
264  const bool reverseTarget
265  ),
266  (
267  dict,
269  )
270  );
271 
272  //- Selection table for component-wise construction
274  (
275  autoPtr,
277  component,
278  (
279  const bool requireMatch,
280  const bool reverseTarget,
281  const scalar lowWeightCorrection
282  ),
283  (
284  requireMatch,
287  )
288  );
289 
290  //- Selector for dictionary
292  (
293  const word& modelName,
294  const dictionary& dict,
295  const bool reverseTarget = false
296  );
297 
298  //- Selector for components
300  (
301  const word& modelName,
302  const bool requireMatch = true,
303  const bool reverseTarget = false,
304  const scalar lowWeightCorrection = -1
305  );
306 
307 
308  // Constructors
309 
310  //- Construct from dictionary
312  (
313  const dictionary& dict,
314  const bool reverseTarget = false
315  );
316 
317  //- Construct from components
319  (
320  const bool requireMatch = true,
321  const bool reverseTarget = false,
322  const scalar lowWeightCorrection = -1
323  );
324 
325  //- Construct from agglomeration of AMIInterpolation. Agglomeration
326  //- passed in as new coarse size and addressing from fine from coarse
328  (
329  const AMIInterpolation& fineAMI,
330  const labelList& sourceRestrictAddressing,
331  const labelList& neighbourRestrictAddressing
332  );
333 
334  //- Construct as copy
336 
337  //- Construct and return a clone
338  virtual autoPtr<AMIInterpolation> clone() const
339  {
340  return autoPtr<AMIInterpolation>::New(*this);
341  }
342 
343 
344  //- Destructor
345  virtual ~AMIInterpolation() = default;
346 
347 
348  // Member Functions
349 
350  // Access
351 
352  //- Access to the up-to-date flag
353  inline bool upToDate() const;
354 
355  //- Access to the up-to-date flag
356  inline bool& upToDate();
357 
358  //- Access to the distributed flag
359  inline bool distributed() const;
360 
361  //- Access to the requireMatch flag
362  inline bool requireMatch() const;
363 
364  //- Access to the requireMatch flag
365  inline bool setRequireMatch(const bool flag);
366 
367  //- Access to the reverseTarget flag
368  inline bool reverseTarget() const;
369 
370  //- Threshold weight below which interpolation is deactivated
371  inline scalar lowWeightCorrection() const;
372 
373  //- Return true if employing a 'lowWeightCorrection'
374  inline bool applyLowWeightCorrection() const;
375 
376  //- Set to -1, or the processor holding all faces (both sides) of
377  //- the AMI
378  inline label singlePatchProc() const;
379 
380 
381  // Source patch
382 
383  //- Return const access to source patch face areas
384  inline const List<scalar>& srcMagSf() const;
385 
386  //- Return access to source patch face areas
387  inline List<scalar>& srcMagSf();
388 
389  //- Return const access to source patch addressing
390  inline const labelListList& srcAddress() const;
391 
392  //- Return access to source patch addressing
393  inline labelListList& srcAddress();
394 
395  //- Return const access to source patch weights
396  inline const scalarListList& srcWeights() const;
397 
398  //- Return access to source patch weights
399  inline scalarListList& srcWeights();
400 
401  //- Return const access to normalisation factor of source
402  //- patch weights (i.e. the sum before normalisation)
403  inline const scalarField& srcWeightsSum() const;
404 
405  //- Return access to normalisation factor of source
406  //- patch weights (i.e. the sum before normalisation)
407  inline scalarField& srcWeightsSum();
408 
409  //- Return const access to source patch face centroids
410  inline const pointListList& srcCentroids() const;
411 
412  //- Return access to source patch face centroids
413  inline pointListList& srcCentroids();
414 
415  //- Source map pointer - valid only if singlePatchProc = -1
416  //- This gets source data into a form to be consumed by
417  //- tgtAddress, tgtWeights
418  inline const mapDistribute& srcMap() const;
419 
420 
421  // Target patch
422 
423  //- Return const access to target patch face areas
424  inline const List<scalar>& tgtMagSf() const;
425 
426  //- Return access to target patch face areas
427  inline List<scalar>& tgtMagSf();
428 
429  //- Return const access to target patch addressing
430  inline const labelListList& tgtAddress() const;
431 
432  //- Return access to target patch addressing
433  inline labelListList& tgtAddress();
434 
435  //- Return const access to target patch weights
436  inline const scalarListList& tgtWeights() const;
437 
438  //- Return access to target patch weights
439  inline scalarListList& tgtWeights();
440 
441  //- Return const access to normalisation factor of target
442  //- patch weights (i.e. the sum before normalisation)
443  inline const scalarField& tgtWeightsSum() const;
444 
445  //- Return access to normalisation factor of target
446  //- patch weights (i.e. the sum before normalisation)
447  inline scalarField& tgtWeightsSum();
448 
449  //- Target map pointer - valid only if singlePatchProc=-1.
450  //- This gets target data into a form to be consumed by
451  //- srcAddress, srcWeights
452  inline const mapDistribute& tgtMap() const;
453 
454 
455  // Manipulation
456 
457  //- Update addressing, weights and (optional) centroids
458  virtual bool calculate
459  (
460  const primitivePatch& srcPatch,
461  const primitivePatch& tgtPatch,
462  const autoPtr<searchableSurface>& surfPtr = nullptr
463  );
464 
465  //- Set the maps, addresses and weights from an external source
466  void reset
467  (
468  autoPtr<mapDistribute>&& srcToTgtMap,
469  autoPtr<mapDistribute>&& tgtToSrcMap,
474  );
475 
476  //- Append additional addressing and weights
477  void append
478  (
479  const primitivePatch& srcPatch,
480  const primitivePatch& tgtPatch
481  );
482 
483  //- Normalise the weights
484  void normaliseWeights(const bool conformal, const bool output);
485 
486 
487  // Evaluation
488 
489  // Low-level
490 
491  //- Interpolate from target to source with supplied op
492  //- to combine existing value with remote value and weight
493  template<class Type, class CombineOp>
495  (
496  const UList<Type>& fld,
497  const CombineOp& cop,
498  List<Type>& result,
499  const UList<Type>& defaultValues = UList<Type>::null()
500  ) const;
501 
502  //- Interpolate from source to target with supplied op
503  //- to combine existing value with remote value and weight
504  template<class Type, class CombineOp>
506  (
507  const UList<Type>& fld,
508  const CombineOp& cop,
509  List<Type>& result,
510  const UList<Type>& defaultValues = UList<Type>::null()
511  ) const;
512 
513 
514  //- Interpolate from target to source with supplied op
515  template<class Type, class CombineOp>
517  (
518  const Field<Type>& fld,
519  const CombineOp& cop,
520  const UList<Type>& defaultValues = UList<Type>::null()
521  ) const;
522 
523  //- Interpolate from target tmp field to source with supplied op
524  template<class Type, class CombineOp>
526  (
527  const tmp<Field<Type>>& tFld,
528  const CombineOp& cop,
529  const UList<Type>& defaultValues = UList<Type>::null()
530  ) const;
531 
532  //- Interpolate from source to target with supplied op
533  template<class Type, class CombineOp>
535  (
536  const Field<Type>& fld,
537  const CombineOp& cop,
538  const UList<Type>& defaultValues = UList<Type>::null()
539  ) const;
540 
541  //- Interpolate from source tmp field to target with supplied op
542  template<class Type, class CombineOp>
544  (
545  const tmp<Field<Type>>& tFld,
546  const CombineOp& cop,
547  const UList<Type>& defaultValues = UList<Type>::null()
548  ) const;
549 
550  //- Interpolate from target to source
551  template<class Type>
553  (
554  const Field<Type>& fld,
555  const UList<Type>& defaultValues = UList<Type>::null()
556  ) const;
557 
558  //- Interpolate from target tmp field
559  template<class Type>
561  (
562  const tmp<Field<Type>>& tFld,
563  const UList<Type>& defaultValues = UList<Type>::null()
564  ) const;
565 
566  //- Interpolate from source to target
567  template<class Type>
569  (
570  const Field<Type>& fld,
571  const UList<Type>& defaultValues = UList<Type>::null()
572  ) const;
573 
574  //- Interpolate from source tmp field
575  template<class Type>
577  (
578  const tmp<Field<Type>>& tFld,
579  const UList<Type>& defaultValues = UList<Type>::null()
580  ) const;
581 
582 
583  // Point intersections
584 
585  //- Return source patch face index of point on target patch face
586  label srcPointFace
587  (
588  const primitivePatch& srcPatch,
589  const primitivePatch& tgtPatch,
590  const vector& n,
591  const label tgtFacei,
592  point& tgtPoint
593  )
594  const;
595 
596  //- Return target patch face index of point on source patch face
597  label tgtPointFace
598  (
599  const primitivePatch& srcPatch,
600  const primitivePatch& tgtPatch,
601  const vector& n,
602  const label srcFacei,
603  point& srcPoint
604  )
605  const;
606 
607 
608  // Checks
609 
610  //- Check if src addresses are present in tgt addresses and
611  //- viceversa
612  bool checkSymmetricWeights(const bool log) const;
613 
614  //- Write face connectivity as OBJ file
616  (
617  const primitivePatch& srcPatch,
618  const primitivePatch& tgtPatch,
620  ) const;
621 
622 
623  // I-O
624 
625  //- Write
626  virtual void write(Ostream& os) const;
627 };
628 
629 
630 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
631 
632 } // End namespace Foam
633 
634 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
635 
636 #include "AMIInterpolationI.H"
637 
638 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
639 
640 #ifdef NoRepository
641  #include "AMIInterpolationTemplates.C"
642 #endif
643 
644 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
645 
646 #endif
647 
648 // ************************************************************************* //
Foam::autoPtr::New
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
Foam::AMIInterpolation::upToDate
bool upToDate() const
Access to the up-to-date flag.
Definition: AMIInterpolationI.H:56
Foam::AMIInterpolation::calculate
virtual bool calculate(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const autoPtr< searchableSurface > &surfPtr=nullptr)
Update addressing, weights and (optional) centroids.
Definition: AMIInterpolation.C:734
AMIInterpolationI.H
Foam::component
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Definition: FieldFieldFunctions.C:44
Foam::AMIInterpolation::tgtMapPtr_
autoPtr< mapDistribute > tgtMapPtr_
Target map pointer - parallel running only.
Definition: AMIInterpolation.H:164
Foam::output
static Ostream & output(Ostream &os, const IntRange< T > &range)
Definition: IntRanges.C:66
boolList.H
Foam::AMIInterpolation::srcWeights_
scalarListList srcWeights_
Weights of target faces per source face.
Definition: AMIInterpolation.H:120
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::AMIInterpolation::operator=
void operator=(const AMIInterpolation &)=delete
No copy assignment.
searchableSurface.H
Foam::AMIInterpolation::srcCentroids
const pointListList & srcCentroids() const
Return const access to source patch face centroids.
Definition: AMIInterpolationI.H:159
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
refPtr.H
Foam::AMIInterpolation::srcPointFace
label srcPointFace(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const vector &n, const label tgtFacei, point &tgtPoint) const
Return source patch face index of point on target patch face.
Definition: AMIInterpolation.C:1050
Foam::AMIInterpolation::tgtWeightsSum
const scalarField & tgtWeightsSum() const
Definition: AMIInterpolationI.H:213
Foam::AMIInterpolation::distributed
bool distributed() const
Access to the distributed flag.
Definition: AMIInterpolationI.H:68
Foam::AMIInterpolation::tsrcPatch0_
refPtr< primitivePatch > tsrcPatch0_
Source patch using manipulated input points.
Definition: AMIInterpolation.H:133
Foam::AMIInterpolation::srcAddress_
labelListList srcAddress_
Addresses of target faces per source face.
Definition: AMIInterpolation.H:117
globalIndex.H
Foam::AMIInterpolation::singlePatchProc_
label singlePatchProc_
Definition: AMIInterpolation.H:108
Foam::AMIInterpolation::tgtWeights_
scalarListList tgtWeights_
Weights of source faces per target face.
Definition: AMIInterpolation.H:148
indexedOctree.H
Foam::AMIInterpolation::writeFaceConnectivity
void writeFaceConnectivity(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const labelListList &srcAddress) const
Write face connectivity as OBJ file.
Definition: AMIInterpolation.C:1212
ops.H
Various functors for unary and binary operations. Can be used for parallel combine-reduce operations ...
Foam::AMIInterpolation::srcWeightsSum
const scalarField & srcWeightsSum() const
Definition: AMIInterpolationI.H:147
Foam::AMIInterpolation::tgtPatchPts_
pointField tgtPatchPts_
Definition: AMIInterpolation.H:158
Foam::AMIInterpolation::srcPatchPts_
pointField srcPatchPts_
Definition: AMIInterpolation.H:130
Foam::AMIInterpolation::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, AMIInterpolation, dict,(const dictionary &dict, const bool reverseTarget),(dict, reverseTarget))
Selection table for dictionary construction.
Foam::AMIInterpolation::New
static autoPtr< AMIInterpolation > New(const word &modelName, const dictionary &dict, const bool reverseTarget=false)
Selector for dictionary.
Definition: AMIInterpolationNew.C:33
Foam::AMIInterpolation::setRequireMatch
bool setRequireMatch(const bool flag)
Access to the requireMatch flag.
Definition: AMIInterpolationI.H:80
Foam::AMIInterpolation::tgtAddress
const labelListList & tgtAddress() const
Return const access to target patch addressing.
Definition: AMIInterpolationI.H:189
Foam::AMIInterpolation::tgtWeights
const scalarListList & tgtWeights() const
Return const access to target patch weights.
Definition: AMIInterpolationI.H:201
Foam::AMIInterpolation::interpolateToTarget
void interpolateToTarget(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Definition: AMIInterpolationTemplates.C:36
faceAreaIntersect.H
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::AMIInterpolation::tgtMap
const mapDistribute & tgtMap() const
Definition: AMIInterpolationI.H:225
Foam::AMIInterpolation::calcDistribution
label calcDistribution(const primitivePatch &srcPatch, const primitivePatch &tgtPatch) const
Calculate if patches are on multiple processors.
Definition: AMIInterpolation.C:77
Foam::AMIInterpolation::interpolateToSource
void interpolateToSource(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Definition: AMIInterpolationTemplates.C:122
Foam::Field< scalar >
Foam::AMIInterpolation::srcWeightsSum_
scalarField srcWeightsSum_
Sum of weights of target faces per source face.
Definition: AMIInterpolation.H:123
Foam::AMIInterpolation::cacheIntersections_
static bool cacheIntersections_
Definition: AMIInterpolation.H:85
Foam::AMIInterpolation::requireMatch_
bool requireMatch_
Definition: AMIInterpolation.H:97
Foam::AMIInterpolation::srcPatch0
const primitivePatch & srcPatch0() const
Return the orginal src patch with optionally updated points.
Definition: AMIInterpolationI.H:29
Foam::searchableSurface
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Definition: searchableSurface.H:69
Foam::mapDistribute
Class containing processor-to-processor mapping information.
Definition: mapDistribute.H:163
className.H
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Foam::AMIInterpolation::AMIInterpolation
AMIInterpolation(const dictionary &dict, const bool reverseTarget=false)
Construct from dictionary.
Definition: AMIInterpolation.C:550
pointList.H
AMIInterpolationTemplates.C
Foam::AMIInterpolation::write
virtual void write(Ostream &os) const
Write.
Definition: AMIInterpolation.C:1243
treeDataPrimitivePatch.H
Foam::AMIInterpolation::srcMapPtr_
autoPtr< mapDistribute > srcMapPtr_
Source map pointer - parallel running only.
Definition: AMIInterpolation.H:136
Foam::AMIInterpolation::requireMatch
bool requireMatch() const
Access to the requireMatch flag.
Definition: AMIInterpolationI.H:74
Foam::AMIInterpolation::clone
virtual autoPtr< AMIInterpolation > clone() const
Construct and return a clone.
Definition: AMIInterpolation.H:337
Foam::AMIInterpolation::~AMIInterpolation
virtual ~AMIInterpolation()=default
Destructor.
Foam::AMIInterpolation::append
void append(const primitivePatch &srcPatch, const primitivePatch &tgtPatch)
Append additional addressing and weights.
Definition: AMIInterpolation.C:839
fld
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Definition: gmvOutputLagrangian.H:23
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::AMIInterpolation::singlePatchProc
label singlePatchProc() const
Definition: AMIInterpolationI.H:105
Foam::AMIInterpolation::normaliseWeights
static void normaliseWeights(const scalarList &patchAreas, const word &patchName, const labelListList &addr, scalarListList &wght, scalarField &wghtSum, const bool conformal, const bool output, const scalar lowWeightTol)
Definition: AMIInterpolation.C:168
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::AMIInterpolation::tgtPatch0
const primitivePatch & tgtPatch0() const
Return the orginal tgt patch with optionally updated points.
Definition: AMIInterpolationI.H:42
Foam::log
dimensionedScalar log(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:262
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::AMIInterpolation::srcMagSf
const List< scalar > & srcMagSf() const
Return const access to source patch face areas.
Definition: AMIInterpolationI.H:111
Foam::AMIInterpolation::TypeName
TypeName("AMIInterpolation")
Runtime type information.
Foam::AMIInterpolation::tgtCentroids_
pointListList tgtCentroids_
Centroid of source faces per target face.
Definition: AMIInterpolation.H:154
treeBoundBoxList.H
Foam::AMIInterpolation::srcCentroids_
pointListList srcCentroids_
Centroid of target faces per source face.
Definition: AMIInterpolation.H:126
Foam::AMIInterpolation::ttgtPatch0_
refPtr< primitivePatch > ttgtPatch0_
Target patch using manipulated input points.
Definition: AMIInterpolation.H:161
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::AMIInterpolation::lowWeightCorrection
scalar lowWeightCorrection() const
Threshold weight below which interpolation is deactivated.
Definition: AMIInterpolationI.H:93
Foam::AMIInterpolation::reset
void reset(autoPtr< mapDistribute > &&srcToTgtMap, autoPtr< mapDistribute > &&tgtToSrcMap, labelListList &&srcAddress, scalarListList &&srcWeights, labelListList &&tgtAddress, scalarListList &&tgtWeights)
Set the maps, addresses and weights from an external source.
Definition: AMIInterpolation.C:802
Foam::AMIInterpolation::lowWeightCorrection_
scalar lowWeightCorrection_
Threshold weight below which interpolation is deactivated.
Definition: AMIInterpolation.H:104
Foam::AMIInterpolation::srcMap
const mapDistribute & srcMap() const
Definition: AMIInterpolationI.H:171
Foam::AMIInterpolation::tgtAddress_
labelListList tgtAddress_
Addresses of source faces per target face.
Definition: AMIInterpolation.H:145
Foam::AMIInterpolation::applyLowWeightCorrection
bool applyLowWeightCorrection() const
Return true if employing a 'lowWeightCorrection'.
Definition: AMIInterpolationI.H:99
Foam::foamVersion::patch
const std::string patch
OpenFOAM patch number as a std::string.
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::Vector< scalar >
Foam::AMIInterpolation::treeType
treeDataPrimitivePatch< primitivePatch > treeType
Local typedef to octree tree-type.
Definition: AMIInterpolation.H:91
Foam::AMIInterpolation::agglomerate
static void agglomerate(const autoPtr< mapDistribute > &targetMap, const scalarList &fineSrcMagSf, const labelListList &fineSrcAddress, const scalarListList &fineSrcWeights, const labelList &sourceRestrictAddressing, const labelList &targetRestrictAddressing, scalarList &srcMagSf, labelListList &srcAddress, scalarListList &srcWeights, scalarField &srcWeightsSum, autoPtr< mapDistribute > &tgtMap)
Definition: AMIInterpolation.C:246
Foam::AMIInterpolation::tgtWeightsSum_
scalarField tgtWeightsSum_
Sum of weights of source faces per target face.
Definition: AMIInterpolation.H:151
Foam::treeDataPrimitivePatch
Encapsulation of data needed to search on PrimitivePatches.
Definition: treeDataPrimitivePatch.H:63
Foam::List< scalar >
Foam::AMIInterpolation
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
Definition: AMIInterpolation.H:79
Foam::UList< Type >
Foam::AMIInterpolation::srcMagSf_
scalarList srcMagSf_
Source face areas.
Definition: AMIInterpolation.H:114
Foam::AMIInterpolation::checkSymmetricWeights
bool checkSymmetricWeights(const bool log) const
Definition: AMIInterpolation.C:1148
Foam::AMIInterpolation::upToDate_
bool upToDate_
Up-to-date flag.
Definition: AMIInterpolation.H:167
Foam::AMIInterpolation::reverseTarget_
const bool reverseTarget_
Definition: AMIInterpolation.H:101
Foam::AMIInterpolation::reverseTarget
bool reverseTarget() const
Access to the reverseTarget flag.
Definition: AMIInterpolationI.H:87
Foam::AMIInterpolation::projectPointsToSurface
void projectPointsToSurface(const searchableSurface &surf, pointField &pts) const
Project points to surface.
Definition: AMIInterpolation.C:128
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::AMIInterpolation::tgtMagSf
const List< scalar > & tgtMagSf() const
Return const access to target patch face areas.
Definition: AMIInterpolationI.H:177
Foam::AMIInterpolation::tgtMagSf_
scalarList tgtMagSf_
Target face areas.
Definition: AMIInterpolation.H:142
primitivePatch.H
Foam::AMIInterpolation::tgtPointFace
label tgtPointFace(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const vector &n, const label srcFacei, point &srcPoint) const
Return target patch face index of point on source patch face.
Definition: AMIInterpolation.C:1099
Foam::AMIInterpolation::createTree
autoPtr< indexedOctree< treeType > > createTree(const primitivePatch &patch) const
Reset the octree for the patch face search.
Definition: AMIInterpolation.C:53
Foam::AMIInterpolation::srcAddress
const labelListList & srcAddress() const
Return const access to source patch addressing.
Definition: AMIInterpolationI.H:123
Foam::AMIInterpolation::srcWeights
const scalarListList & srcWeights() const
Return const access to source patch weights.
Definition: AMIInterpolationI.H:135
Foam::refPtr
A class for managing references or pointers (no reference counting)
Definition: PtrList.H:60
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatch.H:85
Enum.H