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 
76  // Access
77 
78  //- Return faceCell addressing
79  virtual const labelUList& faceCells() const = 0;
80 
81 
82  // Interface transfer functions
83 
84  //- Return the values of the given internal data adjacent to
85  // the interface as a field
87  (
88  const labelUList& internalData
89  ) const = 0;
90 
91  //- Return the values of the given internal data adjacent to
92  //- the interface as a field using faceCell mapping
94  (
95  const labelUList& internalData,
96  const labelUList& faceCells
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  //- Initialise transfer of internal field adjacent to the interface
108  //- using faceCells mapping
110  (
111  const Pstream::commsTypes commsType,
112  const labelUList& iF,
113  const labelUList& faceCells
114  ) const
115  {}
116 
117  //- Transfer and return internal field adjacent to the interface
119  (
120  const Pstream::commsTypes commsType,
121  const labelUList& iF
122  ) const = 0;
123 
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
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:100
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::faceCells
Smooth ATC in cells next to a set of patches supplied by type.
Definition: faceCells.H:56
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.