oversetGAMGInterface.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) 2021,2023 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::oversetGAMGInterface
28 
29 Description
30  GAMG agglomerated cyclic AMI interface.
31 
32 SourceFiles
33  oversetGAMGInterface.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef oversetGAMGInterface_H
38 #define oversetGAMGInterface_H
39 
40 #include "GAMGInterface.H"
41 #include "oversetLduInterface.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class oversetGAMGInterface Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public GAMGInterface,
55  virtual public oversetLduInterface
56 {
57  // Private Member Functions
58 
59  //- No copy construct
61 
62  //- No copy assignment
63  void operator=(const oversetGAMGInterface&) = delete;
64 
65 
66 public:
67 
68  //- Runtime type information
69  TypeName("overset");
70 
71 
72  // Constructors
73 
74  //- Construct from fine level interface,
75  //- local and neighbour restrict addressing
77  (
78  const label index,
80  const lduInterface& fineInterface,
81  const labelField& restrictAddressing,
82  const labelField& neighbourRestrictAddressing,
83  const label fineLevelIndex,
84  const label coarseComm
85  );
86 
87  //- Construct from Istream
89  (
90  const label index,
92  Istream& is
93  );
94 
95  //- Construct from fine level interface,
96  //- local and neighbour restrict addressing
98  (
99  const label index,
101  const lduInterface& fineInterface,
102  const labelList& interfaceMap,
103  const labelUList& faceCells,
104  const labelUList& faceRestrictAddresssing,
105  const labelUList& faceOffsets,
106  const lduInterfacePtrsList& allInterfaces
107  );
108 
109  //- Construct by assembling and returning a clone.
111  (
112  const label index,
114  const labelList& interfaceMap,
115  const labelUList& faceCells,
116  const labelUList& faceRestrictAddresssing,
117  const labelUList& faceOffsets,
118  const lduInterfacePtrsList& allInterfaces,
119  const label coarseComm,
120  const label myProcNo,
121  const labelList& procAgglomMap
122  ) const
123  {
125  (
127  (
128  index,
130  *this,
131  interfaceMap,
132  faceCells,
133  faceRestrictAddresssing,
134  faceOffsets,
135  allInterfaces
136  )
137  );
138  }
139 
140 
141  //- Destructor
142  virtual ~oversetGAMGInterface() = default;
143 
144 
145  // Member Functions
146 
147  // Interface transfer functions
148 
149  //- Transfer and return internal field adjacent to the interface
151  (
152  const Pstream::commsTypes commsType,
153  const labelUList& iF
154  ) const;
155 
156 
157  // I/O
158 
159  //- Write to stream
160  virtual void write(Ostream&) const;
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
virtual autoPtr< GAMGInterface > clone(const label index, const lduInterfacePtrsList &coarseInterfaces, const labelList &interfaceMap, const labelUList &faceCells, const labelUList &faceRestrictAddresssing, const labelUList &faceOffsets, const lduInterfacePtrsList &allInterfaces, const label coarseComm, const label myProcNo, const labelList &procAgglomMap) const
Construct by assembling and returning a clone.
commsTypes
Communications types.
Definition: UPstream.H:72
GAMG agglomerated cyclic AMI interface.
virtual label index() const
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
Smooth ATC in cells next to a set of patches supplied by type.
Definition: faceCells.H:52
virtual ~oversetGAMGInterface()=default
Destructor.
TypeName("overset")
Runtime type information.
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Transfer and return internal field adjacent to the interface.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
Abstract base class for GAMG agglomerated interfaces.
Definition: GAMGInterface.H:50
virtual const lduInterfacePtrsList & coarseInterfaces() const
An abstract base class for overset coupled interfaces.
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches...
Definition: lduInterface.H:53
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A class for managing temporary objects.
Definition: HashPtrTable.H:50
virtual void write(Ostream &) const
Write to stream.
Namespace for OpenFOAM.