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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::lduInterface
29 
30 Description
31  An abstract base class for implicitly-coupled interfaces
32  e.g. processor and cyclic patches.
33 
34 SourceFiles
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 
48 namespace Foam
49 {
50 
51 // Forward Declarations
52 class lduInterface;
53 
54 /*---------------------------------------------------------------------------*\
55  Class lduInterface Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class lduInterface
59 {
60 public:
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;
74 
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,
98  const labelUList& faceCells
99  ) const = 0;
100 
101  //- Initialise transfer of internal field adjacent to the interface
102  virtual void initInternalFieldTransfer
103  (
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
112  (
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 // ************************************************************************* //
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const =0
Return the values of the given internal data adjacent to.
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const =0
Transfer and return internal field adjacent to the interface.
virtual ~lduInterface()=default
Destructor.
virtual const labelUList & faceCells() const =0
Return faceCell addressing.
commsTypes
Communications types.
Definition: UPstream.H:72
lduInterface() noexcept=default
Default construct.
Smooth ATC in cells next to a set of patches supplied by type.
Definition: faceCells.H:52
TypeNameNoDebug("lduInterface")
Runtime type information.
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Initialise transfer of internal field adjacent to the interface.
Definition: lduInterface.H:113
const direction noexcept
Definition: Scalar.H:258
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches...
Definition: lduInterface.H:53
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.