matchingPatchToPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::patchToPatches::matching
26 
27 Description
28  Class to generate patchToPatch coupling geometry. Couples a face to the
29  single matching opposite face only. This is functionally identical to the
30  nearest algorithm. It just adds some checking to ensure that the coupling
31  is perfectly one-to-one.
32 
33 SourceFiles
34  matching.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef matchingPatchToPatch_H
39 #define matchingPatchToPatch_H
40 
41 #include "nearestPatchToPatch.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace patchToPatches
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class matching Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class matching
55 :
56  public nearest
57 {
58  // Private Member Functions
59 
60  //- Finalise the intersection
61  virtual label finalise
62  (
63  const primitiveOldTimePatch& srcPatch,
64  const vectorField& srcPointNormals,
65  const vectorField& srcPointNormals0,
66  const primitiveOldTimePatch& tgtPatch,
67  const transformer& tgtToSrc
68  );
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("matching");
75 
76 
77  // Constructors
78 
79  //- Construct from components
80  matching(const bool reverse);
81 
82 
83  //- Destructor
84  ~matching();
85 };
86 
87 
88 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
89 
90 } // End namespace patchToPatches
91 } // End namespace Foam
92 
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95 #endif
96 
97 // ************************************************************************* //
tmp< Field< Type > > tgtToSrc(const Field< Type > &tgtFld) const
Interpolate a target patch field to the source with no left.
bool reverse() const
Flag to indicate that the two patches are co-directional and.
Definition: patchToPatchI.H:31
Class to generate patchToPatch coupling geometry. Couples a face to the single matching opposite face...
matching(const bool reverse)
Construct from components.
TypeName("matching")
Runtime type information.
Class to generate patchToPatch coupling geometry. Couples a face to the single nearest opposite face ...
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space.
Definition: transformer.H:84
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59