FreeFOAM The Cross-Platform CFD Toolkit
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) 1991-2010 OpenCFD Ltd.
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 <OpenFOAM/labelField.H>
40 #include <OpenFOAM/typeInfo.H>
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 /*---------------------------------------------------------------------------*\
50  Class lduInterface Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55  // Private Member Functions
56 
57  //- Disallow default bitwise copy construct
58  lduInterface(const lduInterface&);
59 
60  //- Disallow default bitwise assignment
61  void operator=(const lduInterface&);
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("lduInterface");
68 
69 
70  // Constructors
71 
72  //- Construct null
74  {}
75 
76 
77  // Destructor
78 
79  virtual ~lduInterface();
80 
81 
82  // Member Functions
83 
84  // Access
85 
86  //- Return faceCell addressing
87  virtual const unallocLabelList& 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 unallocLabelList& internalData
97  ) const = 0;
98 
99  //- Initialise interface data transfer
100  virtual void initTransfer
101  (
102  const Pstream::commsTypes commsType,
103  const unallocLabelList& interfaceData
104  ) const
105  {}
106 
107  //- Transfer and return neighbour field
108  virtual tmp<labelField> transfer
109  (
110  const Pstream::commsTypes commsType,
111  const unallocLabelList& interfaceData
112  ) const = 0;
113 
114  //- Initialise transfer of internal field adjacent to the interface
115  virtual void initInternalFieldTransfer
116  (
117  const Pstream::commsTypes commsType,
118  const unallocLabelList& iF
119  ) const
120  {}
121 
122  //- Transfer and return internal field adjacent to the interface
124  (
125  const Pstream::commsTypes commsType,
126  const unallocLabelList& iF
127  ) const = 0;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************ vim: set sw=4 sts=4 et: ************************ //