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 | Copyright (C) 2011 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  // Private Member Functions
57 
58  //- Disallow default bitwise copy construct
59  lduInterface(const lduInterface&);
60 
61  //- Disallow default bitwise assignment
62  void operator=(const lduInterface&);
63 
64 
65 public:
66 
67  //- Runtime type information
68  TypeName("lduInterface");
69 
70 
71  // Constructors
72 
73  //- Construct null
74  lduInterface()
75  {}
76 
77 
78  //- Destructor
79  virtual ~lduInterface();
80 
81 
82  // Member Functions
83 
84  // Access
85 
86  //- Return faceCell addressing
87  virtual const labelUList& faceCells() const = 0;
88 
89 
90  // Interface transfer functions
91 
92  //- Return the values of the given internal data adjacent to
93  // the interface as a field
95  (
96  const labelUList& internalData
97  ) const = 0;
98 
99  //- Initialise transfer of internal field adjacent to the interface
101  (
102  const Pstream::commsTypes commsType,
103  const labelUList& iF
104  ) const
105  {}
106 
107  //- Transfer and return internal field adjacent to the interface
109  (
110  const Pstream::commsTypes commsType,
111  const labelUList& iF
112  ) const = 0;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
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 const labelUList & faceCells() const =0
Return faceCell addressing.
commsTypes
Types of communications.
Definition: UPstream.H:64
TypeName("lduInterface")
Runtime type information.
lduInterface()
Construct null.
Definition: lduInterface.H:73
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Initialise transfer of internal field adjacent to the interface.
Definition: lduInterface.H:100
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
virtual ~lduInterface()
Destructor.
Definition: lduInterface.C:38
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: PtrList.H:54
Namespace for OpenFOAM.