Loading...
Searching...
No Matches
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;
54/*---------------------------------------------------------------------------*\
55 Class lduInterface Declaration
56\*---------------------------------------------------------------------------*/
57
58class lduInterface
59{
60public:
61
62 //- Runtime type information
63 TypeNameNoDebug("lduInterface");
64
65
66 // Constructors
67
68 //- Default construct
69 lduInterface() noexcept = default;
70
71
72 //- Destructor
73 virtual ~lduInterface() = default;
75
76 // Member Functions
77
78 // Access
79
80 //- Return faceCell addressing
81 virtual const labelUList& faceCells() const = 0;
82
83
84 // Interface transfer functions
85
86 //- Return the values of the given internal data adjacent to
87 // the interface as a field
89 (
90 const labelUList& internalData
91 ) const = 0;
92
93 //- Return the values of the given internal data adjacent to
94 //- the interface as a field using faceCell mapping
96 (
97 const labelUList& internalData,
99 ) const = 0;
100
101 //- Initialise transfer of internal field adjacent to the interface
102 virtual void initInternalFieldTransfer
104 const Pstream::commsTypes commsType,
105 const labelUList& iF
106 ) const
107 {}
108
109 //- Initialise transfer of internal field adjacent to the interface
110 //- using faceCells mapping
111 virtual void initInternalFieldTransfer
113 const Pstream::commsTypes commsType,
114 const labelUList& iF,
115 const labelUList& faceCells
116 ) const
117 {}
118
119 //- Transfer and return internal field adjacent to the interface
121 (
122 const Pstream::commsTypes commsType,
123 const labelUList& iF
124 ) const = 0;
125};
126
127
128// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129
130} // End namespace Foam
131
132// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133
134#endif
135
136// ************************************************************************* //
Inter-processor communications stream.
Definition Pstream.H:59
commsTypes
Communications types.
Definition UPstream.H:81
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF, const labelUList &faceCells) const
Initialise transfer of internal field adjacent to the interface using faceCells mapping.
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Initialise transfer of internal field adjacent to the interface.
virtual const labelUList & faceCells() const =0
Return faceCell addressing.
TypeNameNoDebug("lduInterface")
Runtime type information.
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.
lduInterface() noexcept=default
Default construct.
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
Field< label > labelField
Specialisation of Field<T> for label.
Definition labelField.H:48
const direction noexcept
Definition scalarImpl.H:265
UList< label > labelUList
A UList of labels.
Definition UList.H:75
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
#define TypeNameNoDebug(TypeNameString)
Declare a ClassNameNoDebug() with extra virtual type info.
Definition typeInfo.H:61