Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::oversetGAMGInterface
28
29Description
30 GAMG agglomerated cyclic AMI interface.
31
32SourceFiles
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
45namespace Foam
46{
48/*---------------------------------------------------------------------------*\
49 Class oversetGAMGInterface Declaration
50\*---------------------------------------------------------------------------*/
51
52class oversetGAMGInterface
53:
54 public GAMGInterface,
55 virtual public oversetLduInterface
56{
57 // Private Member Functions
58
59 //- No copy construct
60 oversetGAMGInterface(const oversetGAMGInterface&) = delete;
61
62 //- No copy assignment
63 void operator=(const oversetGAMGInterface&) = delete;
64
65
66public:
67
68 //- Runtime type information
69 TypeName("overset");
71
72 // Constructors
73
74 //- Construct from fine level interface,
75 //- local and neighbour restrict addressing
76 oversetGAMGInterface
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
88 oversetGAMGInterface
89 (
90 const label index,
92 Istream& is
93 );
94
95 //- Construct from fine level interface,
96 //- local and neighbour restrict addressing
97 oversetGAMGInterface
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 (
126 new oversetGAMGInterface
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 label index() const
virtual const lduInterfacePtrsList & coarseInterfaces() const
virtual const labelUList & faceCells() const
Return faceCell addressing.
GAMGInterface(const GAMGInterface &)=delete
No copy construct.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
commsTypes
Communications types.
Definition UPstream.H:81
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
TypeName("overset")
Runtime type information.
virtual ~oversetGAMGInterface()=default
Destructor.
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.
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Transfer and return internal field adjacent to the interface.
oversetLduInterface() noexcept=default
Default construct.
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
UPtrList< const lduInterface > lduInterfacePtrsList
Store lists of lduInterface as a UPtrList.
Field< label > labelField
Specialisation of Field<T> for label.
Definition labelField.H:48
UList< label > labelUList
A UList of labels.
Definition UList.H:75
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68