lduInterface.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) 2011-2020 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 Class
25  Foam::lduInterface
26 
27 Description
28  An abstract base class for implicitly-coupled interfaces
29  e.g. processor and cyclic patches.
30 
31 SourceFiles
32  lduInterface.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef lduInterface_H
37 #define lduInterface_H
38 
39 #include "labelField.H"
40 #include "typeInfo.H"
41 #include "Pstream.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 /*---------------------------------------------------------------------------*\
51  Class lduInterface Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class lduInterface
55 {
56 
57 public:
58 
59  //- Runtime type information
60  TypeName("lduInterface");
61 
62 
63  // Constructors
64 
65  //- Construct null
66  lduInterface()
67  {}
68 
69  //- Disallow default bitwise copy construction
70  lduInterface(const lduInterface&) = delete;
71 
72 
73  //- Destructor
74  virtual ~lduInterface();
75 
76 
77  // Member Functions
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  //- Initialise transfer of internal field adjacent to the interface
95  virtual void initInternalFieldTransfer
96  (
97  const Pstream::commsTypes commsType,
98  const labelUList& iF
99  ) const
100  {}
101 
102  //- Transfer and return internal field adjacent to the interface
104  (
105  const Pstream::commsTypes commsType,
106  const labelUList& iF
107  ) const = 0;
108 
109 
110  // Member Operators
111 
112  //- Disallow default bitwise assignment
113  void operator=(const lduInterface&) = delete;
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
commsTypes
Types of communications.
Definition: UPstream.H:65
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
Definition: lduInterface.H:54
lduInterface()
Construct null.
Definition: lduInterface.H:65
virtual const labelUList & faceCells() const =0
Return faceCell addressing.
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Initialise transfer of internal field adjacent to the interface.
Definition: lduInterface.H:95
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const =0
Transfer and return internal field adjacent to the interface.
void operator=(const lduInterface &)=delete
Disallow default bitwise assignment.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const =0
Return the values of the given internal data adjacent to.
virtual ~lduInterface()
Destructor.
Definition: lduInterface.C:38
TypeName("lduInterface")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...