Loading...
Searching...
No Matches
mappedPatchBase.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) 2020-2021 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
27Class
28 Foam::mappedPatchBase
29
30Description
31 Determines a mapping between patch face centres and mesh cell or face
32 centres and processors they're on.
33
34 If constructed from dictionary:
35 \verbatim
36 // Optional world to sample (default is all)
37 //sampleWorld solidSim;
38
39 // Optional explicit coupling (requires functionObject to synchronise
40 // databases. Default is close coupling (bc to bc)
41 //sampleDatabase true;
42
43 // Region to sample (default is region0)
44 sampleRegion region0;
45
46 // What to sample:
47 // - nearestCell : sample cell containing point
48 // - nearestOnlyCell : nearest sample cell (even if not containing
49 // point)
50 // - nearestPatchFace : nearest face on selected patch
51 // - nearestPatchFaceAMI : nearest face on selected patch
52 - patches need not conform
53 - uses AMI interpolation
54 // - nearestFace : nearest boundary face on any patch
55 // - nearestPatchPoint : nearest patch point (for coupled points
56 // this might be any of the points so you have
57 // to guarantee the point data is synchronised
58 // beforehand)
59 sampleMode nearestCell;
60
61 // If sampleMode is nearestPatchFace : patch to find faces of
62 samplePatch movingWall;
63
64 // If sampleMode is nearestPatchFace : specify patchgroup to find
65 // samplePatch and sampleRegion (if not provided)
66 coupleGroup baffleGroup;
67
68 // How to supply offset (w.r.t. my patch face centres):
69 // - uniform : single offset vector
70 // - nonuniform : per-face offset vector
71 // - normal : using supplied distance and face normal
72 offsetMode uniform;
73
74 // According to offsetMode (see above) supply one of
75 // offset, offsets or distance
76 offset (1 0 0);
77 \endverbatim
78
79 Note: if offsetMode is \c normal it uses outwards pointing normals. So
80 supply a negative distance if sampling inside the domain.
81
82Note
83 Storage is not optimal. It temporary collects all (patch)face centres
84 on all processors to keep the addressing calculation simple.
85
86SourceFiles
87 mappedPatchBase.C
88
89\*---------------------------------------------------------------------------*/
90
91#ifndef Foam_mappedPatchBase_H
92#define Foam_mappedPatchBase_H
93
94#include "pointField.H"
95#include "Tuple2.H"
96#include "pointIndexHit.H"
100
101// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102
103namespace Foam
104{
105
106// Forward Declarations
107class polyPatch;
108class polyMesh;
109class mapDistribute;
111/*---------------------------------------------------------------------------*\
112 Class mappedPatchBase Declaration
113\*---------------------------------------------------------------------------*/
114
115class mappedPatchBase
116{
117public:
118
119 // Type enumerations
120
121 //- Mesh items to sample
130 };
131
132 //- How to project face centres
133 enum offsetMode
137 NORMAL
138 };
143
144
145 //- Helper class for finding nearest
146 // Nearest:
147 // - point+local index
148 // - sqr(distance)
149 // - processor
151
153 {
154 public:
155
156 void operator()(nearInfo& x, const nearInfo& y) const
157 {
158 if (y.first().hit())
159 {
160 if (!x.first().hit())
161 {
162 x = y;
163 }
164 else if (y.second().first() < x.second().first())
165 {
166 x = y;
167 }
168 }
169 }
170 };
171
172 class maxProcEqOp
173 {
174 public:
175
176 void operator()(nearInfo& x, const nearInfo& y) const
177 {
178 if (y.first().hit())
179 {
180 if (!x.first().hit())
181 {
182 x = y;
183 }
184 else if (y.second().second() > x.second().second())
185 {
186 x = y;
187 }
188 }
189 }
190 };
191
192
193 //- nearest + world
194 // Used to only look at entries from same world
195 typedef Tuple2<nearInfo, label> nearInfoWorld;
196
197 class nearestWorldEqOp
198 {
199 public:
201 void operator()(nearInfoWorld& x, const nearInfoWorld& y) const
203 // Is there a hit and is it sampling the same world
204 const nearInfo& xi = x.first();
205 const nearInfo& yi = y.first();
206 if (yi.first().hit())
207 {
208 if (x.second() == y.second())
209 {
210 if (!xi.first().hit())
211 {
212 x = y;
213 }
214 else if (yi.second().first() < xi.second().first())
215 {
216 x = y;
217 }
218 }
219 }
220 }
221 };
222
223
224protected:
225
226 // Protected Data
227
228 //- Patch to sample
229 const polyPatch& patch_;
230
231 //- World to sample
232 mutable word sampleWorld_;
233
234 //- Region to sample
235 mutable word sampleRegion_;
237 //- What to sample
238 const sampleMode mode_;
239
240 //- Patch (if in sampleMode NEARESTPATCH*)
242
243 //- PatchGroup (if in sampleMode NEARESTPATCH*)
245
246 //- Empty or location of database
248
249 //- How to obtain samples
252 //- Offset vector (uniform)
254
255 //- Offset vector (nonuniform)
257
258 //- Offset distance (normal)
259 scalar distance_;
260
261 //- Communicator
262 label communicator_;
263
264 //- Same region
265 mutable bool sameRegion_;
267
268 // Derived information
269
270 //- Communication schedule:
271 //
272 // - Cells/faces to sample per processor
273 // - Patch faces to receive per processor
274 // - schedule
277
278 // AMI interpolator (only for NEARESTPATCHFACEAMI)
279
280 //- Flag to indicate that slave patch should be reversed for AMI
281 const bool AMIReverse_;
282
283 //- Pointer to AMI interpolator
285
286 //- Pointer to projection surface employed by AMI interpolator
288
289 //- Dictionary storing projection surface description
292
293 // Mesh update IOobjects
294
295 //- Local mesh update time
297
298 //- Sample mesh update time
301
302
303 // Protected Member Functions
304
305 // polyPatch callbacks
306
307 //- Initialise the calculation of the patch geometry
308 virtual void initGeometry(PstreamBuffers&)
309 {}
310
311 //- Calculate the patch geometry
312 virtual void calcGeometry(PstreamBuffers&)
313 {}
314
315 //- Initialise the patches for moving points
316 virtual void initMovePoints(PstreamBuffers&, const pointField&)
317 {}
318
319 //- Correct patches after moving points
320 virtual void movePoints(PstreamBuffers&, const pointField&)
321 {}
323 //- Initialise the update of the patch topology
324 virtual void initUpdateMesh(PstreamBuffers&)
325 {}
326
327 //- Update of the patch topology
328 virtual void updateMesh(PstreamBuffers&);
329
330
331 //- Add a world-world connection
333
334 //- Get the communicator for the world-world connection
335 label getWorldCommunicator() const;
336
337 //- Lookup mesh
338 const polyMesh& lookupMesh(const word& region) const;
339
340 //- Lookup patch
342 (
343 const word& sampleRegion,
344 const word& samplePatch
345 ) const;
347
348 //- Get the points from face-centre-decomposition face centres
349 //- and project them onto the face-diagonal-decomposition triangles.
351
352 //- Collect single list of samples and originating processor+face +
353 //- wanted world
354 void collectSamples
355 (
356 const label mySampleWorld, // My wanted sampling world
357 const pointField& facePoints,
358 pointField& samples, // Per sample: coordinate
359 labelList& patchFaceWorlds, // Per sample: wanted world
360 labelList& patchFaceProcs, // Per sample: originating proc
361 labelList& patchFaces, // Per sample: originating face
362 pointField& patchFc
363 ) const;
364
365 //- Find (local) cells/faces containing samples
367 (
369 const label sampleWorld, // my world as index
370 const word& sampleRegion,
371 const word& samplePatch,
373
375 ) const;
376
377 //- Find (global) cells/faces containing samples
378 void findSamples
379 (
380 const sampleMode mode, // search mode
381 const label myWorldIndex, // my world (in index form)
382
383 const pointField&,
384 const labelList& wantedWorlds,
385 const labelList& origProcs, // per sample the originating proc
386
387 labelList& sampleProcs, // processor containing sample
388 labelList& sampleIndices, // local index of cell/face
389 pointField& sampleLocations // actual representative location
390 ) const;
391
392 //- Get the sample points given the face points
394
395 //- Calculate mapping
396 void calcMapping() const;
397
398 //- Calculate AMI interpolator
399 void calcAMI() const;
400
401
402 // Database Handling
403
404 //- Read optional database name from dictionary
406
407 //- Lookup (sub)objectRegistry by following names of sub registries.
408 //- Creates non-existing intermediate ones.
410 static const objectRegistry& subRegistry
411 (
412 const objectRegistry& obr,
413 const wordList& names,
414 const label index
415 );
416
417 //- Attempt to detect an IOField<Type> and write to dictionary
418 template<class Type>
419 static bool writeIOField
420 (
421 const regIOobject& obj,
423 );
424
425 //- Attempt to read an IOField<Type> and store on objectRegistry
426 template<class Type>
427 static bool constructIOField
428 (
429 const word& name,
430 token& tok,
431 Istream& is,
432 objectRegistry& obr
433 );
434
435public:
436
437 //- Runtime type information
438 TypeName("mappedPatchBase");
439
440
441 // Constructors
442
443 //- Construct from patch
444 explicit mappedPatchBase(const polyPatch&);
445
446 //- Construct with offsetMode=non-uniform
448 (
449 const polyPatch& pp,
450 const word& sampleRegion,
452 const word& samplePatch,
453 const vectorField& offsets
454 );
455
456 //- Construct from offsetMode=uniform
458 (
459 const polyPatch& pp,
460 const word& sampleRegion,
462 const word& samplePatch,
463 const vector& uniformOffset
464 );
465
466 //- Construct from offsetMode=normal and distance
468 (
469 const polyPatch& pp,
470 const word& sampleRegion,
472 const word& samplePatch,
473 const scalar normalDistance
474 );
475
476 //- Construct from dictionary
477 mappedPatchBase(const polyPatch&, const dictionary&);
478
479 //- Construct from dictionary and (collocated) sample mode
480 // (only for nearestPatchFace, nearestPatchFaceAMI, nearestPatchPoint)
481 // Assumes zero offset.
482 mappedPatchBase(const polyPatch&, const sampleMode, const dictionary&);
483
484 //- Construct as copy, resetting patch
486
487 //- Construct as copy, resetting patch, map original data
489 (
490 const polyPatch&,
491 const mappedPatchBase&,
492 const labelUList& mapAddressing
493 );
494
495
496 //- Destructor
497 virtual ~mappedPatchBase();
498
499
500 // Member Functions
501
502 // Edit
503
504 void clearOut();
505
506 //- Change to normal offset with given distance
507 void setOffset(const scalar normalDist);
508
509 //- Change to uniform offset with value
510 void setOffset(const vector& uniformOffset);
511
512 //- Change to non-uniform offsets
513 void setOffset(const vectorField& offsets);
514
515
516 // Access
517
518 //- What to sample
519 inline sampleMode mode() const noexcept;
520
521 //- World to sample
522 inline const word& sampleWorld() const noexcept;
523
524 //- Region to sample
525 inline const word& sampleRegion() const;
526
527 //- Patch (only if NEARESTPATCHFACE)
528 inline const word& samplePatch() const;
529
530 //- PatchGroup (only if NEARESTPATCHFACE)
531 inline const word& coupleGroup() const;
532
533 //- Return size of mapped mesh/patch/boundary
534 inline label sampleSize() const;
535
536 //- Offset vector (from patch faces to destination mesh objects)
537 inline const vector& offset() const noexcept;
538
539 //- Offset vectors (from patch faces to destination mesh objects)
540 inline const vectorField& offsets() const noexcept;
541
542 //- Get the communicator (worldComm or world-to-world)
543 inline label getCommunicator() const;
544
545 //- Identical to getCommunicator()
546 inline label comm() const;
547
548 //- Is sample world the local world?
549 inline bool sameWorld() const;
550
551 //- Is my world ordered before the sampleWorld?
552 inline bool masterWorld() const;
553
554 //- Cached sampleRegion != mesh.name()
555 inline bool sameRegion() const noexcept;
556
557 //- Local mesh update time
559
560 //- Sample mesh upate time
562
563 bool upToDate() const;
564
565 //- Return reference to the parallel distribution map
566 inline const mapDistribute& map() const;
567
568 //- Return reference to the AMI interpolator
570 (
571 const bool forceUpdate = false
572 ) const;
573
574 //- Is it owner
575 inline bool owner() const;
576
577 //- Return a pointer to the AMI projection surface
578 const autoPtr<Foam::searchableSurface>& surfPtr() const;
579
580 //- Get the region mesh
581 const polyMesh& sampleMesh() const;
582
583 //- Get the patch on the region
584 const polyPatch& samplePolyPatch() const;
585
586
587 // Helpers
588
589 //- Get the sample points
590 tmp<pointField> samplePoints() const;
591
592 //- Get a point on the face given a face decomposition method:
593 // face-centre-tet : face centre. Returns index of face.
594 // face-planes : face centre. Returns index of face.
595 // face-diagonal : intersection of ray from cellcentre to
596 // facecentre with any of the triangles.
597 // Returns index (0..size-2) of triangle.
599 (
600 const polyMesh&,
601 const label facei,
602 const polyMesh::cellDecomposition
603 );
604
605
606 // For database storage
607
608 const fileName& sampleDatabasePath() const
609 {
610 return *sampleDatabasePtr_;
611 }
612
613 bool sampleDatabase() const noexcept
614 {
615 return bool(sampleDatabasePtr_);
616 }
617
618 //- Helper: return path to store data to be sent to processor i
619 static fileName sendPath(const fileName& root, const label proci);
620
621 virtual fileName sendPath(const label proci) const;
622
623 //- Helper: return path to store data to be received from
624 //- processor i
625 static fileName receivePath
626 (
627 const fileName& root,
628 const label proci
629 );
630
631 virtual fileName receivePath(const label proci) const;
632
633 //- Lookup (sub)objectRegistry from '/' separated path (relative to
634 //- objectRegistry). Creates non-existing intermediate ones.
636 static const objectRegistry& subRegistry
637 (
638 const objectRegistry& obr,
639 const fileName& path
640 );
641
642 //- Store an IOField on the objectRegistry relative to obr
643 template<class Type>
644 static void storeField
645 (
646 objectRegistry& obr,
647 const word& fieldName,
648 const Field<Type>& values
649 );
650
651 //- Convert objectRegistry contents into dictionary
652 static void writeDict
653 (
654 const objectRegistry& obr,
656 );
657
658 //- (recursively) construct and register IOFields from dictionary
659 static void readDict(const dictionary& d, objectRegistry& obr);
660
661
662 // Distribute
663
664 //- Wrapper around map/interpolate data distribution
665 template<class Type>
666 void distribute(List<Type>& lst) const;
667
668 //- Wrapper around map/interpolate data distribution with operation
669 template<class Type, class CombineOp>
670 void distribute(List<Type>& lst, const CombineOp& cop) const;
671
672 //- Wrapper around map/interpolate data distribution
673 template<class Type>
674 void reverseDistribute(List<Type>& lst) const;
675
676 //- Wrapper around map/interpolate data distribution with operation
677 template<class Type, class CombineOp>
678 void reverseDistribute(List<Type>& lst, const CombineOp& cop) const;
679
680
681 // I/O
682
683 //- Write as a dictionary
684 virtual void write(Ostream& os) const;
685};
686
687
688// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
689
690} // End namespace Foam
691
692// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
693
694#include "mappedPatchBaseI.H"
695
696// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
697
698#ifdef NoRepository
700#endif
701
702// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
703
704#endif
705
706// ************************************************************************* //
scalar y
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition Enum.H:57
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
bool hit() const noexcept
Is there a hit?
Buffers for inter-processor communications streams (UOPstream, UIPstream).
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
Definition Tuple2.H:51
const T1 & first() const noexcept
Access the first element.
Definition Tuple2.H:132
const T2 & second() const noexcept
Access the second element.
Definition Tuple2.H:142
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
Encapsulates using "patchGroups" to specify coupled patch.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A class for handling file names.
Definition fileName.H:75
Class containing processor-to-processor mapping information.
void operator()(nearInfo &x, const nearInfo &y) const
void operator()(nearInfo &x, const nearInfo &y) const
void operator()(nearInfoWorld &x, const nearInfoWorld &y) const
const fileName & sampleDatabasePath() const
label communicator_
Communicator.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
tmp< pointField > facePoints(const polyPatch &) const
Get the points from face-centre-decomposition face centres and project them onto the face-diagonal-de...
label getWorldCommunicator() const
Get the communicator for the world-world connection.
tmp< pointField > samplePoints(const pointField &) const
Get the sample points given the face points.
const mapDistribute & map() const
Return reference to the parallel distribution map.
bool sameRegion() const noexcept
Cached sampleRegion != mesh.name().
scalar distance_
Offset distance (normal).
const vector & offset() const noexcept
Offset vector (from patch faces to destination mesh objects).
void reverseDistribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
uniformDimensionedScalarField & updateSampleMeshTime() const
Local mesh update time.
TypeName("mappedPatchBase")
Runtime type information.
static FOAM_NO_DANGLING_REFERENCE const objectRegistry & subRegistry(const objectRegistry &obr, const wordList &names, const label index)
Lookup (sub)objectRegistry by following names of sub registries. Creates non-existing intermediate on...
bool owner() const
Is it owner.
const polyPatch & patch_
Patch to sample.
autoPtr< searchableSurface > surfPtr_
Pointer to projection surface employed by AMI interpolator.
vectorField offsets_
Offset vector (nonuniform).
const vectorField & offsets() const noexcept
Offset vectors (from patch faces to destination mesh objects).
void findSamples(const sampleMode mode, const label myWorldIndex, const pointField &, const labelList &wantedWorlds, const labelList &origProcs, labelList &sampleProcs, labelList &sampleIndices, pointField &sampleLocations) const
Find (global) cells/faces containing samples.
Tuple2< pointIndexHit, Tuple2< scalar, label > > nearInfo
Helper class for finding nearest.
uniformDimensionedScalarField & updateMeshTime() const
Sample mesh upate time.
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
static void readDict(const dictionary &d, objectRegistry &obr)
(recursively) construct and register IOFields from dictionary
sampleMode
Mesh items to sample.
@ NEARESTPATCHPOINT
nearest point on selected patch
@ NEARESTONLYCELL
nearest cell (even if not containing cell)
@ NEARESTCELL
nearest cell containing sample
@ NEARESTPATCHFACE
nearest face on selected patch
@ NEARESTPATCHFACEAMI
nearest patch face + AMI interpolation
void findLocalSamples(const sampleMode mode, const label sampleWorld, const word &sampleRegion, const word &samplePatch, const pointField &samplePoints, List< nearInfoWorld > &nearest) const
Find (local) cells/faces containing samples.
const bool AMIReverse_
Flag to indicate that slave patch should be reversed for AMI.
void calcAMI() const
Calculate AMI interpolator.
static fileName sendPath(const fileName &root, const label proci)
Helper: return path to store data to be sent to processor i.
static autoPtr< fileName > readDatabase(const dictionary &dict)
Read optional database name from dictionary.
static const Enum< sampleMode > sampleModeNames_
const polyPatch & lookupPatch(const word &sampleRegion, const word &samplePatch) const
Lookup patch.
const sampleMode mode_
What to sample.
const polyMesh & sampleMesh() const
Get the region mesh.
bool sameRegion_
Same region.
word sampleRegion_
Region to sample.
static bool writeIOField(const regIOobject &obj, dictionary &dict)
Attempt to detect an IOField<Type> and write to dictionary.
label sampleSize() const
Return size of mapped mesh/patch/boundary.
label comm() const
Identical to getCommunicator().
tmp< pointField > samplePoints() const
Get the sample points.
bool addWorldConnection()
Add a world-world connection.
word samplePatch_
Patch (if in sampleMode NEARESTPATCH*).
autoPtr< mapDistribute > mapPtr_
Communication schedule:
const polyPatch & samplePolyPatch() const
Get the patch on the region.
mappedPatchBase(const polyPatch &)
Construct from patch.
autoPtr< uniformDimensionedScalarField > updateSampleMeshTimePtr_
Sample mesh update time.
void collectSamples(const label mySampleWorld, const pointField &facePoints, pointField &samples, labelList &patchFaceWorlds, labelList &patchFaceProcs, labelList &patchFaces, pointField &patchFc) const
Collect single list of samples and originating processor+face + wanted world.
const autoPtr< Foam::searchableSurface > & surfPtr() const
Return a pointer to the AMI projection surface.
bool sampleDatabase() const noexcept
bool masterWorld() const
Is my world ordered before the sampleWorld?
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
static fileName receivePath(const fileName &root, const label proci)
Helper: return path to store data to be received from processor i.
label getCommunicator() const
Get the communicator (worldComm or world-to-world).
offsetMode
How to project face centres.
@ NORMAL
use face normal + distance
@ UNIFORM
single offset vector
@ NONUNIFORM
per-face offset vector
const word & sampleWorld() const noexcept
World to sample.
const AMIPatchToPatchInterpolation & AMI(const bool forceUpdate=false) const
Return reference to the AMI interpolator.
dictionary surfDict_
Dictionary storing projection surface description.
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
static bool constructIOField(const word &name, token &tok, Istream &is, objectRegistry &obr)
Attempt to read an IOField<Type> and store on objectRegistry.
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE).
static const Enum< offsetMode > offsetModeNames_
virtual ~mappedPatchBase()
Destructor.
void calcMapping() const
Calculate mapping.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
static pointIndexHit facePoint(const polyMesh &, const label facei, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
Tuple2< nearInfo, label > nearInfoWorld
nearest + world
sampleMode mode() const noexcept
What to sample.
const coupleGroupIdentifier coupleGroup_
PatchGroup (if in sampleMode NEARESTPATCH*).
const word & sampleRegion() const
Region to sample.
void setOffset(const scalar normalDist)
Change to normal offset with given distance.
const autoPtr< fileName > sampleDatabasePtr_
Empty or location of database.
const polyMesh & lookupMesh(const word &region) const
Lookup mesh.
vector offset_
Offset vector (uniform).
offsetMode offsetMode_
How to obtain samples.
autoPtr< uniformDimensionedScalarField > updateMeshTimePtr_
Local mesh update time.
static void storeField(objectRegistry &obr, const word &fieldName, const Field< Type > &values)
Store an IOField on the objectRegistry relative to obr.
bool sameWorld() const
Is sample world the local world?
static void writeDict(const objectRegistry &obr, dictionary &dict)
Convert objectRegistry contents into dictionary.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
autoPtr< AMIPatchToPatchInterpolation > AMIPtr_
Pointer to AMI interpolator.
const word & coupleGroup() const
PatchGroup (only if NEARESTPATCHFACE).
word sampleWorld_
World to sample.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
A patch is a list of labels that address the faces in the global face list.
Definition polyPatch.H:73
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition regIOobject.H:71
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
A class for managing temporary objects.
Definition tmp.H:75
A token holds an item read from Istream.
Definition token.H:70
A class for handling words, derived from Foam::string.
Definition word.H:66
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
OBJstream os(runTime.globalPath()/outputName)
auto & names
Namespace for OpenFOAM.
List< word > wordList
List of word.
Definition fileName.H:60
List< label > labelList
A List of labels.
Definition List.H:62
UniformDimensionedField< scalar > uniformDimensionedScalarField
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
Definition POSIX.C:775
AMIInterpolation AMIPatchToPatchInterpolation
Patch-to-patch interpolation == Foam::AMIInterpolation.
Field< vector > vectorField
Specialisation of Field<T> for vector.
const direction noexcept
Definition scalarImpl.H:265
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
vectorField pointField
pointField is a vectorField.
Vector< scalar > vector
Definition vector.H:57
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
UList< label > labelUList
A UList of labels.
Definition UList.H:75
runTime write()
dictionary dict
#define FOAM_NO_DANGLING_REFERENCE
Definition stdFoam.H:80
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68
Various UniformDimensionedField types.
scalarField samples(nIntervals, Zero)