patchToPatchNormalisedFieldMapper.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-2023 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::patchToPatchNormalisedFieldMapper
26 
27 Description
28  Patch-to-patch fieldMapper which fills values for non-overlapping parts of
29  the target patch by normalisation (for partly non-overlapping faces), or by
30  referencing values from the nearest overlapping part (for completely
31  non-overlapping faces).
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef patchToPatchNormalisedFieldMapper_H
36 #define patchToPatchNormalisedFieldMapper_H
37 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class patchToPatchNormalisedFieldMapper Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
53 {
54  // Private Data
55 
56  //- Patch stabilisation engine
57  const patchToPatchStabilisation& pS_;
58 
59 
60  // Private Member Functions
61 
62  //- Map from one field to another
63  template<class Type>
64  void map(Field<Type>& f, const Field<Type>& mapF) const;
65 
66  //- Map a field and return the result as tmp
67  template<class Type>
68  tmp<Field<Type>> map(const Field<Type>& mapF) const;
69 
70 
71 public:
72 
73  // Constructors
74 
75  //- Construct given a patch-to-patch interpolation and stabilisation
77  (
78  const patchToPatch& pToP,
80  )
81  :
83  pS_(pS)
84  {}
85 
86 
87  //- Destructor
89  {}
90 
91 
92  // Member Operators
93 
94  //- Map a field
96 };
97 
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 } // End namespace Foam
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 #endif
106 
107 // ************************************************************************* //
Pre-declare SubField and related Field type.
Definition: Field.H:83
Base class for fieldMappers which uses a patchToPatch object to map from another patch....
DEFINE_FIELD_MAPPER_MAP_OPERATOR(label,)
Map a label field (not implemented)
Patch-to-patch fieldMapper which fills values for non-overlapping parts of the target patch by normal...
patchToPatchNormalisedFieldMapper(const patchToPatch &pToP, const patchToPatchStabilisation &pS)
Construct given a patch-to-patch interpolation and stabilisation.
FOR_ALL_FIELD_TYPES(DEFINE_FIELD_MAPPER_MAP_OPERATOR,)
Map a field.
Stabilisation data and routines for patch-to-patch interpolations.
Class to generate coupling geometry between two primitive patches.
Definition: patchToPatch.H:56
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
labelList f(nPoints)