meshToMesh.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) 2012-2016 OpenFOAM Foundation
9 Copyright (C) 2015-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
27Class
28 Foam::meshToMesh
29
30Description
31 Class to calculate the cell-addressing between two overlapping meshes
32
33 Mapping is performed using a run-time selectable interpolation mothod
34
35SeeAlso
36 meshToMeshMethod
37
38SourceFiles
39 meshToMesh.C
40 meshToMeshParallelOps.C
41 meshToMeshTemplates.C
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef Foam_meshToMesh_H
46#define Foam_meshToMesh_H
47
48#include "polyMesh.H"
49#include "treeBoundBox.H"
50#include "mapDistribute.H"
51#include "volFieldsFwd.H"
52#include "Enum.H"
54#include "pointList.H"
55
56// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57
58namespace Foam
59{
60
61/*---------------------------------------------------------------------------*\
62 Class meshToMesh Declaration
63\*---------------------------------------------------------------------------*/
65class meshToMesh
66{
67public:
68
69 // Public data types
70
71 //- Enumeration specifying interpolation method
72 enum class interpolationMethod
73 {
78 };
81
82 //- Enumeration specifying processor parallel map construction method
83 enum class procMapMethod
84 {
85 pmAABB,
86 pmLOD
87 };
90
91private:
92
93 // Private data
94
95 //- Reference to the source mesh
96 const polyMesh& srcRegion_;
97
98 //- Reference to the target mesh
99 const polyMesh& tgtRegion_;
100
101 //- Processor parallel map construction method
102 procMapMethod procMapMethod_;
103
104 //- List of target patch IDs per source patch (local index)
105 List<label> srcPatchID_;
106
107 //- List of source patch IDs per target patch (local index)
108 List<label> tgtPatchID_;
109
110 //- List of AMIs between source and target patches
112
113 //- Cutting patches whose values are set using a zero-gradient condition
114 List<label> cuttingPatches_;
115
116 //- Source to target cell addressing
117 labelListList srcToTgtCellAddr_;
118
119 //- Target to source cell addressing
120 labelListList tgtToSrcCellAddr_;
121
122 //- Source to target cell interpolation weights
123 scalarListList srcToTgtCellWght_;
124
125 //- Target to source cell interpolation weights
126 scalarListList tgtToSrcCellWght_;
127
128 // Vectors from cell centre to overlap volume for 2nd order correction
129 // (only set for corrected methods)
130
131 //- Source to target cell offset vectors
132 pointListList srcToTgtCellVec_;
133
134 //- Target to source cell offset vectors
135 pointListList tgtToSrcCellVec_;
136
137 //- Cell total volume in overlap region [m3]
138 scalar V_;
139
140 //- Index of processor that holds all of both sides. -1 in all other
141 // cases
142 label singleMeshProc_;
143
144 //- Source map pointer - parallel running only
145 autoPtr<mapDistribute> srcMapPtr_;
146
147 //- Target map pointer - parallel running only
148 autoPtr<mapDistribute> tgtMapPtr_;
149
150
151 // Private Member Functions
152
153 //- Helper function to add a constant offset to a list
154 template<class Type>
155 void add(UList<Type>& fld, const label offset) const;
156
157 //- Helper function to interpolate internal field. Optionally uses
158 // gradient. Template specialisations for tensor types below
159 template<class Type, class CombineOp>
160 void mapInternalSrcToTgt
161 (
163 const CombineOp& cop,
164 VolumeField<Type>& result,
165 const bool secondOrder
166 ) const;
167
168 //- Helper function to interpolate internal field. Optionally uses
169 // gradient. Template specialisations for tensor types below
170 template<class Type, class CombineOp>
171 void mapInternalTgtToSrc
172 (
174 const CombineOp& cop,
175 VolumeField<Type>& result,
176 const bool secondOrder
177 ) const;
178
179 //- Helper function to interpolate patch field. Template
180 // specialisations below
181 template<class Type, class CombineOp>
182 void mapAndOpSrcToTgt
183 (
185 const Field<Type>& srcField,
186 Field<Type>& tgtField,
187 const CombineOp& cop
188 ) const;
189
190 //- Helper function to interpolate patch field. Template
191 // specialisations below
192 template<class Type, class CombineOp>
193 void mapAndOpTgtToSrc
194 (
196 Field<Type>& srcField,
197 const Field<Type>& tgtField,
198 const CombineOp& cop
199 ) const;
200
201 //- Return src cell IDs for the overlap region
202 labelList maskCells(const polyMesh& src, const polyMesh& tgt) const;
203
204 //- Normalise the interpolation weights
205 void normaliseWeights
206 (
207 const word& descriptor,
208 const labelListList& addr,
209 scalarListList& wght
210 ) const;
211
212 //- Calculate the addressing between overlapping regions of src and tgt
213 // meshes
214 void calcAddressing
215 (
216 const word& methodName,
217 const polyMesh& src,
218 const polyMesh& tgt
219 );
220
221 //- Calculate - main driver function
222 void calculate(const word& methodName, const bool normalise);
223
224 //- Calculate patch overlap
225 void calculatePatchAMIs(const word& amiMethodName);
226
227 //- Constructor helper
228 void constructNoCuttingPatches
229 (
230 const word& methodName,
231 const word& AMIMethodName,
232 const bool interpAllPatches
233 );
234
235 //- Constructor helper
236 void constructFromCuttingPatches
237 (
238 const word& methodName,
239 const word& AMIMethodName,
240 const HashTable<word>& patchMap,
241 const wordList& cuttingPatches,
242 const bool normalise
243 );
244
245 // Parallel operations
246
247 //- Determine whether the meshes are split across multiple
248 //- processors
249 label calcDistribution
250 (
251 const polyMesh& src,
252 const polyMesh& tgt
253 ) const;
254
255 //- Determine which processor bounding-boxes overlap
256 label calcOverlappingProcs
257 (
258 const List<treeBoundBoxList>& procBb,
259 const boundBox& bb,
260 boolList& overlaps
261 ) const;
262
263 //- Calculate the mapping between processors
264 autoPtr<mapDistribute> calcProcMap
265 (
266 const polyMesh& src,
267 const polyMesh& tgt
268 ) const;
269
270 //- Distribute mesh info from 'my' processor to others
271 void distributeCells
272 (
273 const mapDistribute& map,
274 const polyMesh& tgtMesh,
275 const globalIndex& globalI,
277 List<label>& nInternalFaces,
278 List<faceList>& faces,
279 List<labelList>& faceOwner,
280 List<labelList>& faceNeighbour,
282 List<labelList>& nbrProcIDs,
283 List<labelList>& procLocalFaceIDs
284 ) const;
285
286 //- Collect pieces of tgt mesh from other processors and restructure
287 void distributeAndMergeCells
288 (
289 const mapDistribute& map,
290 const polyMesh& tgt,
291 const globalIndex& globalI,
292 pointField& tgtPoints,
293 faceList& tgtFaces,
294 labelList& tgtFaceOwners,
295 labelList& tgtFaceNeighbours,
296 labelList& tgtCellIDs
297 ) const;
298
299
300 //- No copy construct
301 meshToMesh(const meshToMesh&) = delete;
302
303 //- No copy assignment
304 void operator=(const meshToMesh&) = delete;
305
306
307public:
308
309 //- Run-time type information
310 TypeName("meshToMesh");
311
312
313 //- Construct from source and target meshes
315 (
316 const polyMesh& src,
317 const polyMesh& tgt,
318 const interpolationMethod& method,
319 const procMapMethod& mapMethod = procMapMethod::pmAABB,
320 const bool interpAllPatches = true
321 );
322
323 //- Construct from source and target meshes, generic mapping methods
325 (
326 const polyMesh& src,
327 const polyMesh& tgt,
328 const word& methodName, // internal mapping
329 const word& AMIMethodName, // boundary mapping
330 const procMapMethod& mapMethod = procMapMethod::pmAABB,
331 const bool interpAllPatches = true
332 );
333
334 //- Construct from source and target meshes
336 (
337 const polyMesh& src,
338 const polyMesh& tgt,
339 const interpolationMethod& method,
340 const HashTable<word>& patchMap,
341 const wordList& cuttingPatches,
342 const procMapMethod& mapMethod = procMapMethod::pmAABB,
343 const bool normalise = true
344 );
345
346
347 //- Construct from source and target meshes, generic mapping methods
349 (
350 const polyMesh& src,
351 const polyMesh& tgt,
352 const word& methodName, // internal mapping
353 const word& AMIMethodName, // boundary mapping
354 const HashTable<word>& patchMap,
355 const wordList& cuttingPatches,
356 const procMapMethod& mapMethod = procMapMethod::pmAABB,
357 const bool normalise = true
358 );
359
360
361 //- Destructor
362 virtual ~meshToMesh();
363
364
365 // Member Functions
366
367 // Access
368
369 //- Return const access to the source mesh
370 inline const polyMesh& srcRegion() const;
371
372 //- Return const access to the target mesh
373 inline const polyMesh& tgtRegion() const;
374
375 //- Return const access to the source to target cell addressing
376 inline const labelListList& srcToTgtCellAddr() const;
377
378 //- Return const access to the target to source cell addressing
379 inline const labelListList& tgtToSrcCellAddr() const;
380
381 //- Return const access to the source to target cell weights
382 inline const scalarListList& srcToTgtCellWght() const;
383
384 //- Return const access to the target to source cell weights
385 inline const scalarListList& tgtToSrcCellWght() const;
386
387 //- Return const access to the source to target offset vectors
388 inline const pointListList& srcToTgtCellVec() const;
389
390 //- Return const access to the target to source offset vectors
391 inline const pointListList& tgtToSrcCellVec() const;
392
393 //- Return const access to the overlap volume
394 inline scalar V() const;
395
396 //- Conversion between mesh and patch interpolation methods
398 (
399 const interpolationMethod method
400 );
401
402 //- Return the list of AMIs between source and target patches
404 patchAMIs() const;
405
406
407 // Explicit access. Can probably be done with combine operator.
408
409 //- Source map pointer - valid if no singleMeshProc
410 inline const autoPtr<mapDistribute>& srcMap() const;
411
412 //- Target map pointer - valid if no singleMeshProc
413 inline const autoPtr<mapDistribute>& tgtMap() const;
414
415
416 // Evaluation
417
418 // Source-to-target field mapping
419
420 //- Map field from src to tgt mesh with defined operation.
421 // Values passed in via 'result' are used to initialise the
422 // return value
423 template<class Type, class CombineOp>
424 void mapSrcToTgt
425 (
426 const UList<Type>& srcFld,
427 const CombineOp& cop,
428 List<Type>& result
429 ) const;
430
431 //- Map extrapolated field (using gradient) from src to tgt
432 // mesh with defined operation. Falls back to non-extrapolated
433 // mapping (above) if not constructed with method that supports
434 // getting offset vectors. Extrapolation only for internal
435 // values. Values passed in via 'result' are used to
436 // initialise the return value.
437 template<class Type, class CombineOp>
438 void mapSrcToTgt
439 (
440 const UList<Type>& srcField,
442 const CombineOp& cop,
443 List<Type>& result
444 ) const;
445
446 //- Return the src field mapped to the tgt mesh with a defined
447 // operation. Initial values of the result are set to zero
448 template<class Type, class CombineOp>
450 (
451 const Field<Type>& srcFld,
452 const CombineOp& cop
453 ) const;
454
455 //- Convenience function to map a tmp field to the tgt mesh
456 // with a defined operation
457 template<class Type, class CombineOp>
459 (
460 const tmp<Field<Type>>& tsrcFld,
461 const CombineOp& cop
462 ) const;
463
464 //- Convenience function to map a field to the tgt mesh with a
465 // default operation (plusEqOp)
466 template<class Type>
468 (
469 const Field<Type>& srcFld
470 ) const;
471
472 //- Convenience function to map a tmp field to the tgt mesh
473 // with a default operation (plusEqOp)
474 template<class Type>
476 (
477 const tmp<Field<Type>>& tsrcFld
478 ) const;
479
480
481 // Target-to-source field mapping
482
483 //- Map field from tgt to src mesh with defined operation
484 // Values passed in via 'result' are used to initialise the
485 // return value
486 template<class Type, class CombineOp>
487 void mapTgtToSrc
488 (
489 const UList<Type>& tgtFld,
490 const CombineOp& cop,
491 List<Type>& result
492 ) const;
493
494 //- Map extrapolated field (using gradient) from tgt to src
495 // mesh with defined operation. Falls back to non-extrapolated
496 // mapping (above) if not constructed with method that supports
497 // getting offset vectors. Extrapolation only for internal
498 // values. Values passed in via 'result' are used to
499 // initialise the return value
500 template<class Type, class CombineOp>
501 void mapTgtToSrc
502 (
503 const UList<Type>& srcField,
505 const CombineOp& cop,
506 List<Type>& result
507 ) const;
508
509 //- Return the tgt field mapped to the src mesh with a defined
510 // operation. Initial values of the result are set to zero
511 template<class Type, class CombineOp>
513 (
514 const Field<Type>& tgtFld,
515 const CombineOp& cop
516 ) const;
517
518 //- Convenience function to map a tmp field to the src mesh
519 // with a defined operation
520 template<class Type, class CombineOp>
522 (
523 const tmp<Field<Type>>& ttgtFld,
524 const CombineOp& cop
525 ) const;
526
527 //- Convenience function to map a field to the src mesh with a
528 // default operation (plusEqOp)
529 template<class Type>
531 (
532 const Field<Type>& tgtFld
533 ) const;
534
535 //- Convenience function to map a tmp field to the src mesh
536 // with a default operation (plusEqOp)
537 template<class Type>
539 (
540 const tmp<Field<Type>>& ttgtFld
541 ) const;
542
543
544 // Source-to-target volume field mapping
545
546 //- Interpolate a field with a defined operation. Values
547 // passed in via 'result' are used to initialise the return
548 // value. Optionally uses gradient correction (internal
549 // field only) if interpolationMethod supports it
550 template<class Type, class CombineOp>
551 void mapSrcToTgt
552 (
554 const CombineOp& cop,
555 VolumeField<Type>& result,
556 const bool secondOrder = true
557 ) const;
558
559 //- Interpolate a field with a defined operation. The initial
560 // values of the result are set to zero
561 template<class Type, class CombineOp>
563 (
565 const CombineOp& cop,
566 const bool secondOrder = true
567 ) const;
568
569 //- Interpolate a tmp field with a defined operation. The
570 // initial values of the result are set to zero
571 template<class Type, class CombineOp>
573 (
574 const tmp<VolumeField<Type>>& tfield,
575 const CombineOp& cop,
576 const bool secondOrder = true
577 ) const;
578
579 //- Convenience function to map a field with a default
580 // operation (plusEqOp)
581 template<class Type>
583 (
585 const bool secondOrder = true
586 ) const;
587
588 //- Convenience function to map a tmp field with a default
589 // operation (plusEqOp)
590 template<class Type>
592 (
593 const tmp<VolumeField<Type>>& tfield,
594 const bool secondOrder = true
595 ) const;
596
597
598 // Target-to-source volume field mapping
599
600 //- Interpolate a field with a defined operation. Values
601 // passed in via 'result' are used to initialise the return
602 // value. Optionally uses gradient correction (internal
603 // field only) if interpolationMethod supports it
604 template<class Type, class CombineOp>
605 void mapTgtToSrc
606 (
608 const CombineOp& cop,
609 VolumeField<Type>& result,
610 const bool secondOrder = true
611 ) const;
612
613 //- Interpolate a field with a defined operation. The initial
614 // values of the result are set to zero
615 template<class Type, class CombineOp>
617 (
619 const CombineOp& cop,
620 const bool secondOrder = true
621 ) const;
622
623 //- Interpolate a tmp field with a defined operation. The
624 // initial values of the result are set to zero
625 template<class Type, class CombineOp>
627 (
628 const tmp<VolumeField<Type>>&
629 tfield,
630 const CombineOp& cop,
631 const bool secondOrder = true
632 ) const;
633
634 //- Convenience function to map a field with a default
635 // operation (plusEqOp)
636 template<class Type>
638 (
640 const bool secondOrder = true
641 ) const;
642
643 //- Convenience function to map a tmp field with a default
644 // operation (plusEqOp)
645 template<class Type>
647 (
648 const tmp<VolumeField<Type>>& tfield,
649 const bool secondOrder = true
650 ) const;
651};
652
653
654// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
655
656// Disable gradient 2nd order correction for tensor types
657
658template<>
659void meshToMesh::mapInternalSrcToTgt
660(
664 const bool
665) const;
666template<>
667void meshToMesh::mapInternalSrcToTgt
668(
672 const bool
673) const;
674template<>
675void meshToMesh::mapInternalSrcToTgt
676(
680 const bool
681) const;
682template<>
683void meshToMesh::mapInternalSrcToTgt
684(
688 const bool
689) const;
690template<>
691void meshToMesh::mapInternalSrcToTgt
692(
693 const VolumeField<tensor>&,
694 const plusEqOp<tensor>&,
696 const bool
697) const;
698template<>
699void meshToMesh::mapInternalSrcToTgt
700(
701 const VolumeField<tensor>&,
702 const minusEqOp<tensor>&,
704 const bool
705) const;
706template<>
707void meshToMesh::mapInternalTgtToSrc
708(
712 const bool
713) const;
714template<>
715void meshToMesh::mapInternalTgtToSrc
716(
720 const bool
721) const;
722template<>
723void meshToMesh::mapInternalTgtToSrc
724(
728 const bool
729) const;
730template<>
731void meshToMesh::mapInternalTgtToSrc
732(
736 const bool
737) const;
738template<>
739void meshToMesh::mapInternalTgtToSrc
740(
741 const VolumeField<tensor>&,
742 const plusEqOp<tensor>&,
744 const bool
745) const;
746template<>
747void meshToMesh::mapInternalTgtToSrc
748(
749 const VolumeField<tensor>&,
750 const minusEqOp<tensor>&,
752 const bool
753) const;
754
755
756// Disable fvPatchField value override after rmap
757
758template<>
759void meshToMesh::mapAndOpSrcToTgt
760(
762 const Field<scalar>& srcField,
763 Field<scalar>& tgtField,
764 const plusEqOp<scalar>& cop
765) const;
766template<>
767void meshToMesh::mapAndOpSrcToTgt
768(
770 const Field<vector>& srcField,
771 Field<vector>& tgtField,
772 const plusEqOp<vector>& cop
773) const;
774template<>
775void meshToMesh::mapAndOpSrcToTgt
776(
778 const Field<sphericalTensor>& srcField,
779 Field<sphericalTensor>& tgtField,
781) const;
782template<>
783void meshToMesh::mapAndOpSrcToTgt
784(
786 const Field<symmTensor>& srcField,
787 Field<symmTensor>& tgtField,
788 const plusEqOp<symmTensor>& cop
789) const;
790template<>
791void meshToMesh::mapAndOpSrcToTgt
792(
794 const Field<tensor>& srcField,
795 Field<tensor>& tgtField,
796 const plusEqOp<tensor>& cop
797) const;
798
799
800template<>
801void meshToMesh::mapAndOpTgtToSrc
802(
804 Field<scalar>& srcField,
805 const Field<scalar>& tgtField,
806 const plusEqOp<scalar>& cop
807) const;
808template<>
809void meshToMesh::mapAndOpTgtToSrc
810(
812 Field<vector>& srcField,
813 const Field<vector>& tgtField,
814 const plusEqOp<vector>& cop
815) const;
816template<>
817void meshToMesh::mapAndOpTgtToSrc
818(
820 Field<sphericalTensor>& srcField,
821 const Field<sphericalTensor>& tgtField,
823) const;
824template<>
825void meshToMesh::mapAndOpTgtToSrc
826(
828 Field<symmTensor>& srcField,
829 const Field<symmTensor>& tgtField,
830 const plusEqOp<symmTensor>& cop
831) const;
832template<>
833void meshToMesh::mapAndOpTgtToSrc
834(
836 Field<tensor>& srcField,
837 const Field<tensor>& tgtField,
838 const plusEqOp<tensor>& cop
839) const;
840
841
842} // End namespace Foam
843
844// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
845
846#include "meshToMeshI.H"
847
848// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
849
850#ifdef NoRepository
851 #include "meshToMeshTemplates.C"
852#endif
853
854// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
855
856#endif
857
858// ************************************************************************* //
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
labelList cellIDs
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: Enum.H:61
Generic templated field type.
Definition: Field.H:82
Generic GeometricField class.
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
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 pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: UList.H:94
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A bounding box defined in terms of min/max extrema points.
Definition: boundBox.H:64
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:68
Class containing processor-to-processor mapping information.
Class to calculate the cell-addressing between two overlapping meshes.
Definition: meshToMesh.H:65
virtual ~meshToMesh()
Destructor.
Definition: meshToMesh.C:990
interpolationMethod
Enumeration specifying interpolation method.
Definition: meshToMesh.H:72
tmp< Field< Type > > mapTgtToSrc(const tmp< Field< Type > > &ttgtFld, const CombineOp &cop) const
Convenience function to map a tmp field to the src mesh.
const labelListList & srcToTgtCellAddr() const
Return const access to the source to target cell addressing.
Definition: meshToMeshI.H:45
scalar V() const
Return const access to the overlap volume.
Definition: meshToMeshI.H:81
tmp< VolumeField< Type > > mapSrcToTgt(const VolumeField< Type > &field, const bool secondOrder=true) const
Convenience function to map a field with a default.
tmp< VolumeField< Type > > mapTgtToSrc(const VolumeField< Type > &field, const CombineOp &cop, const bool secondOrder=true) const
Interpolate a field with a defined operation. The initial.
tmp< Field< Type > > mapTgtToSrc(const Field< Type > &tgtFld, const CombineOp &cop) const
Return the tgt field mapped to the src mesh with a defined.
tmp< Field< Type > > mapSrcToTgt(const tmp< Field< Type > > &tsrcFld) const
Convenience function to map a tmp field to the tgt mesh.
procMapMethod
Enumeration specifying processor parallel map construction method.
Definition: meshToMesh.H:83
const autoPtr< mapDistribute > & srcMap() const
Source map pointer - valid if no singleMeshProc.
Definition: meshToMeshI.H:88
tmp< Field< Type > > mapTgtToSrc(const tmp< Field< Type > > &ttgtFld) const
Convenience function to map a tmp field to the src mesh.
const scalarListList & srcToTgtCellWght() const
Return const access to the source to target cell weights.
Definition: meshToMeshI.H:57
const scalarListList & tgtToSrcCellWght() const
Return const access to the target to source cell weights.
Definition: meshToMeshI.H:63
const pointListList & srcToTgtCellVec() const
Return const access to the source to target offset vectors.
Definition: meshToMeshI.H:69
tmp< VolumeField< Type > > mapSrcToTgt(const VolumeField< Type > &field, const CombineOp &cop, const bool secondOrder=true) const
Interpolate a field with a defined operation. The initial.
tmp< Field< Type > > mapSrcToTgt(const tmp< Field< Type > > &tsrcFld, const CombineOp &cop) const
Convenience function to map a tmp field to the tgt mesh.
const PtrList< AMIPatchToPatchInterpolation > & patchAMIs() const
Return the list of AMIs between source and target patches.
Definition: meshToMeshI.H:102
TypeName("meshToMesh")
Run-time type information.
const labelListList & tgtToSrcCellAddr() const
Return const access to the target to source cell addressing.
Definition: meshToMeshI.H:51
tmp< Field< Type > > mapSrcToTgt(const Field< Type > &srcFld, const CombineOp &cop) const
Return the src field mapped to the tgt mesh with a defined.
const pointListList & tgtToSrcCellVec() const
Return const access to the target to source offset vectors.
Definition: meshToMeshI.H:75
tmp< Field< Type > > mapTgtToSrc(const Field< Type > &tgtFld) const
Convenience function to map a field to the src mesh with a.
tmp< VolumeField< Type > > mapTgtToSrc(const tmp< VolumeField< Type > > &tfield, const bool secondOrder=true) const
Convenience function to map a tmp field with a default.
void mapTgtToSrc(const UList< Type > &tgtFld, const CombineOp &cop, List< Type > &result) const
Map field from tgt to src mesh with defined operation.
tmp< VolumeField< Type > > mapTgtToSrc(const VolumeField< Type > &field, const bool secondOrder=true) const
Convenience function to map a field with a default.
const polyMesh & srcRegion() const
Return const access to the source mesh.
Definition: meshToMeshI.H:33
tmp< Field< Type > > mapSrcToTgt(const Field< Type > &srcFld) const
Convenience function to map a field to the tgt mesh with a.
static word interpolationMethodAMI(const interpolationMethod method)
Conversion between mesh and patch interpolation methods.
Definition: meshToMesh.C:644
void mapSrcToTgt(const UList< Type > &srcFld, const CombineOp &cop, List< Type > &result) const
Map field from src to tgt mesh with defined operation.
static const Enum< procMapMethod > procMapMethodNames_
Definition: meshToMesh.H:88
static const Enum< interpolationMethod > interpolationMethodNames_
Definition: meshToMesh.H:79
tmp< VolumeField< Type > > mapSrcToTgt(const tmp< VolumeField< Type > > &tfield, const CombineOp &cop, const bool secondOrder=true) const
Interpolate a tmp field with a defined operation. The.
const autoPtr< mapDistribute > & tgtMap() const
Target map pointer - valid if no singleMeshProc.
Definition: meshToMeshI.H:95
const polyMesh & tgtRegion() const
Return const access to the target mesh.
Definition: meshToMeshI.H:39
tmp< VolumeField< Type > > mapTgtToSrc(const tmp< VolumeField< Type > > &tfield, const CombineOp &cop, const bool secondOrder=true) const
Interpolate a tmp field with a defined operation. The.
tmp< VolumeField< Type > > mapSrcToTgt(const tmp< VolumeField< Type > > &tfield, const bool secondOrder=true) const
Convenience function to map a tmp field with a default.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
A class for managing temporary objects.
Definition: tmp.H:65
type
Volume classification types.
Definition: volumeType.H:66
A class for handling words, derived from Foam::string.
Definition: word.H:68
rDeltaTY field()
const pointField & points
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73