lduInterface.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) 2011 OpenFOAM Foundation
9 Copyright (C) 2019 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::lduInterface
29
30Description
31 An abstract base class for implicitly-coupled interfaces
32 e.g. processor and cyclic patches.
33
34SourceFiles
35 lduInterface.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef Foam_lduInterface_H
40#define Foam_lduInterface_H
41
42#include "labelField.H"
43#include "typeInfo.H"
44#include "Pstream.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51// Forward Declarations
52class lduInterface;
53
54/*---------------------------------------------------------------------------*\
55 Class lduInterface Declaration
56\*---------------------------------------------------------------------------*/
58class lduInterface
59{
60public:
61
62 //- Runtime type information
63 TypeName("lduInterface");
64
65
66 // Constructors
67
68 //- Construct null
69 lduInterface() = default;
70
71
72 //- Destructor
73 virtual ~lduInterface() = default;
74
75
76 // Member Functions
77
78
79 // Access
80
81 //- Return faceCell addressing
82 virtual const labelUList& faceCells() const = 0;
83
84
85 // Interface transfer functions
86
87 //- Return the values of the given internal data adjacent to
88 // the interface as a field
90 (
91 const labelUList& internalData
92 ) const = 0;
93
94 //- Return the values of the given internal data adjacent to
95 //- the interface as a field using faceCell mapping
97 (
98 const labelUList& internalData,
100 ) const = 0;
101
102 //- Initialise transfer of internal field adjacent to the interface
103 virtual void initInternalFieldTransfer
104 (
105 const Pstream::commsTypes commsType,
106 const labelUList& iF
107 ) const
108 {}
109
110 //- Initialise transfer of internal field adjacent to the interface
111 //- using faceCells mapping
112 virtual void initInternalFieldTransfer
113 (
114 const Pstream::commsTypes commsType,
115 const labelUList& iF,
116 const labelUList& faceCells
117 ) const
118 {}
119
120 //- Transfer and return internal field adjacent to the interface
122 (
123 const Pstream::commsTypes commsType,
124 const labelUList& iF
125 ) const = 0;
126
127};
128
129
130// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131
132} // End namespace Foam
133
134// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136#endif
137
138// ************************************************************************* //
commsTypes
Types of communications.
Definition: UPstream.H:67
Smooth ATC in cells next to a set of patches supplied by type.
Definition: faceCells.H:59
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
Definition: lduInterface.H:58
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF, const labelUList &faceCells) const
Definition: lduInterface.H:112
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Initialise transfer of internal field adjacent to the interface.
Definition: lduInterface.H:103
virtual ~lduInterface()=default
Destructor.
virtual const labelUList & faceCells() const =0
Return faceCell addressing.
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const =0
Transfer and return internal field adjacent to the interface.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const =0
Return the values of the given internal data adjacent to.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData, const labelUList &faceCells) const =0
TypeName("lduInterface")
Runtime type information.
lduInterface()=default
Construct null.
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73