fvMeshStitcherTools.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) 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 Namespace
25  Foam::fvMeshStitcherTools
26 
27 Description
28  Collection of free functions utilised by the stitching process
29 
30 SourceFiles
31  fvMeshStitcherTools.C
32  fvMeshStitcherToolsTemplates.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef fvMeshStitcherTools_H
37 #define fvMeshStitcherTools_H
38 
39 #include "fvMesh.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace fvMeshStitcherTools
46 {
47 
48 //- Map a field with an (optional) addressing offset
49 template<class Type>
51 (
52  const Field<Type>& f,
53  const labelUList& addr,
54  const label addr0 = 0
55 );
56 
57 //- Tmp variant of above
58 template<class Type>
60 (
61  const tmp<Field<Type>>& f,
62  const labelUList& addr,
63  const label addr0 = 0
64 );
65 
66 //- Reverse map a field with an (optional) addressing offset, initialising the
67 // value to zero and summing repeated indices
68 template<class Type>
70 (
71  const Field<Type>& f,
72  const label size,
73  const labelUList& addr,
74  const label addr0 = 0
75 );
76 
77 //- Tmp variant of above
78 template<class Type>
80 (
81  const tmp<Field<Type>>& f,
82  const label size,
83  const labelUList& addr,
84  const label addr0 = 0
85 );
86 
87 //- Alias for surface boundary fields to reduce verbosity of method
88 // definitions below
89 template<class Type>
92 
93 //- Return the total non-conformal area associated with each original face
95 
96 //- Extract the non-conformal parts of the boundary field and store it on the
97 // conformal faces
98 template<class Type>
100 (
101  const SurfaceFieldBoundary<Type>& fieldb
102 );
103 
104 //- Extract the original parts of the boundary field and store it
105 // on the conformal faces
106 template<class Type>
108 (
109  const SurfaceFieldBoundary<Type>& fieldb
110 );
111 
112 //- Combine non-conformal and original parts of the boundary field from the
113 // conformal faces to construct the complete non-conformal boundary field
114 template<class Type>
116 (
117  const SurfaceFieldBoundary<Type>& ncFieldb,
118  const SurfaceFieldBoundary<Type>& origFieldb
119 );
120 
121 //- Synchronise the boundary field by combining corresponding
122 // values across couplings with the given weightings
123 template<class Type>
125 (
126  const SurfaceFieldBoundary<Type>& fieldb,
127  const bool flip,
128  const scalar ownerWeight,
129  const scalar neighbourWeight
130 );
131 
132 //- Synchronise the boundary field by combining corresponding
133 // values across couplings with equal weightings
134 template<class Type>
136 (
137  const SurfaceFieldBoundary<Type>& fieldb
138 );
139 
140 } // End namespace patchToPatchTools
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #ifdef NoRepository
147 #endif
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
Pre-declare SubField and related Field type.
Definition: Field.H:83
Generic GeometricBoundaryField class.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
A class for managing temporary objects.
Definition: tmp.H:55
tmp< SurfaceFieldBoundary< scalar > > origNcMagSfb(const fvMesh &mesh)
Return the total non-conformal area associated with each original face.
tmp< SurfaceFieldBoundary< Type > > conformedNcBoundaryField(const SurfaceFieldBoundary< Type > &fieldb)
Extract the non-conformal parts of the boundary field and store it on the.
tmp< Field< Type > > fieldMap(const Field< Type > &f, const labelUList &addr, const label addr0=0)
Map a field with an (optional) addressing offset.
tmp< Field< Type > > fieldRMapSum(const Field< Type > &f, const label size, const labelUList &addr, const label addr0=0)
Reverse map a field with an (optional) addressing offset, initialising the.
tmp< SurfaceFieldBoundary< Type > > synchronisedBoundaryField(const SurfaceFieldBoundary< Type > &fieldb, const bool flip, const scalar ownerWeight, const scalar neighbourWeight)
Synchronise the boundary field by combining corresponding.
tmp< SurfaceFieldBoundary< Type > > unconformedBoundaryField(const SurfaceFieldBoundary< Type > &ncFieldb, const SurfaceFieldBoundary< Type > &origFieldb)
Combine non-conformal and original parts of the boundary field from the.
tmp< SurfaceFieldBoundary< Type > > conformedOrigBoundaryField(const SurfaceFieldBoundary< Type > &fieldb)
Extract the original parts of the boundary field and store it.
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
labelList f(nPoints)