interRegionHeatTransferModelTemplates.C
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-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
28template<class Type>
31(
32 const interRegionHeatTransferModel& nbrModel,
33 const Field<Type>& field
34) const
35{
36 if (master_)
37 {
39 }
40 else
41 {
43 }
44}
45
46
47template<class Type>
50(
51 const Field<Type>& field
52) const
53{
54 return interpolate(nbrModel(), field);
55}
56
57
58template<class Type>
60(
61 const interRegionHeatTransferModel& nbrModel,
62 const Field<Type>& field,
63 Field<Type>& result
64) const
65{
66 if (master_)
67 {
68 meshInterp().mapTgtToSrc(field, plusEqOp<scalar>(), result);
69 }
70 else
71 {
72 nbrModel.meshInterp().mapSrcToTgt(field, plusEqOp<scalar>(), result);
73 }
74}
75
76
77template<class Type>
79(
80 const Field<Type>& field,
81 Field<Type>& result
82) const
83{
84 return interpolate(nbrModel(), field, result);
85}
86
87
88// ************************************************************************* //
Generic templated field type.
Definition: Field.H:82
Intermediate class for handling inter-region heat exchanges.
const interRegionHeatTransferModel & nbrModel() const
Return const access to the neighbour model.
const meshToMesh & meshInterp() const
Return const access to the mapToMap pointer.
bool master_
Master or slave region.
void mapTgtToSrc(const UList< Type > &tgtFld, const CombineOp &cop, List< Type > &result) const
Map field from tgt to src mesh with defined operation.
void mapSrcToTgt(const UList< Type > &srcFld, const CombineOp &cop, List< Type > &result) const
Map field from src to tgt mesh with defined operation.
bool interpolate() const noexcept
Same as isPointData()
A class for managing temporary objects.
Definition: tmp.H:65
rDeltaTY field()
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
Definition: curveTools.C:75