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 lduInterface_H
40 #define lduInterface_H
41 
42 #include "labelField.H"
43 #include "typeInfo.H"
44 #include "Pstream.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class lduInterface Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class lduInterface
56 {
57 public:
58 
59  //- Runtime type information
60  TypeName("lduInterface");
61 
62 
63  // Constructors
64 
65  //- Construct null
66  lduInterface() = default;
67 
68 
69  //- Destructor
70  virtual ~lduInterface() = default;
71 
72 
73  // Member Functions
74 
75  // Access
76 
77  //- Return faceCell addressing
78  virtual const labelUList& faceCells() const = 0;
79 
80 
81  // Interface transfer functions
82 
83  //- Return the values of the given internal data adjacent to
84  // the interface as a field
86  (
87  const labelUList& internalData
88  ) const = 0;
89 
90  //- Initialise transfer of internal field adjacent to the interface
92  (
93  const Pstream::commsTypes commsType,
94  const labelUList& iF
95  ) const
96  {}
97 
98  //- Transfer and return internal field adjacent to the interface
100  (
101  const Pstream::commsTypes commsType,
102  const labelUList& iF
103  ) const = 0;
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************************************************************* //
typeInfo.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::lduInterface
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
Definition: lduInterface.H:54
Foam::lduInterface::internalFieldTransfer
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const =0
Transfer and return internal field adjacent to the interface.
Foam::lduInterface::initInternalFieldTransfer
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Initialise transfer of internal field adjacent to the interface.
Definition: lduInterface.H:91
Foam::lduInterface::TypeName
TypeName("lduInterface")
Runtime type information.
Pstream.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:69
Foam::UList< label >
Foam::lduInterface::~lduInterface
virtual ~lduInterface()=default
Destructor.
labelField.H
Foam::lduInterface::lduInterface
lduInterface()=default
Construct null.
Foam::lduInterface::interfaceInternalField
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const =0
Return the values of the given internal data adjacent to.
Foam::lduInterface::faceCells
virtual const labelUList & faceCells() const =0
Return faceCell addressing.