GAMGInterfaceField.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-2013 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::GAMGInterfaceField
29
30Description
31 Abstract base class for GAMG agglomerated interface fields.
32
33SourceFiles
34 GAMGInterfaceField.C
35 GAMGInterfaceFieldNew.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef GAMGInterfaceField_H
40#define GAMGInterfaceField_H
41
42#include "lduInterfaceField.H"
43#include "GAMGInterface.H"
44#include "autoPtr.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class GAMGInterfaceField Declaration
53\*---------------------------------------------------------------------------*/
56:
58{
59 // Private data
60
61 //- Local reference cast into the interface
62 const GAMGInterface& interface_;
63
64
65 // Private Member Functions
66
67 //- No copy construct
69
70 //- No copy assignment
71 void operator=(const GAMGInterfaceField&) = delete;
72
73
74public:
75
76 //- Runtime type information
77 TypeName("GAMGInterfaceField");
78
79
80 // Declare run-time constructor selection tables
83 (
84 autoPtr,
87 (
88 const GAMGInterface& GAMGCp,
89 const lduInterfaceField& fineInterface
90 ),
91 (GAMGCp, fineInterface)
92 );
95 (
96 autoPtr,
99 (
100 const GAMGInterface& GAMGCp,
101 const bool doTransform,
102 const int rank
103 ),
104 (GAMGCp, doTransform, rank)
105 );
106
107
108 // Selectors
109
110 //- Return a pointer to a new interface created on freestore given
111 // the fine interface
113 (
114 const GAMGInterface& GAMGCp,
115 const lduInterfaceField& fineInterface
116 );
117
118 //- Return a pointer to a new interface created on freestore given
119 // the fine interface
121 (
122 const GAMGInterface& GAMGCp,
123 const bool doTransform,
124 const int rank
125 );
126
127
128 // Constructors
129
130 //- Construct from GAMG interface and fine level interface field
132 (
133 const GAMGInterface& GAMGCp,
134 const lduInterfaceField&
135 )
136 :
137 lduInterfaceField(GAMGCp),
138 interface_(GAMGCp)
139 {}
140
141 //- Construct from GAMG interface and fine level interface field
143 (
144 const GAMGInterface& GAMGCp,
145 const bool doTransform,
146 const int rank
147 )
148 :
149 lduInterfaceField(GAMGCp),
150 interface_(GAMGCp)
151 {}
152
153
154 // Member Functions
155
156 // Access
157
158 //- Return interface
159 const GAMGInterface& interface() const
160 {
161 return interface_;
162 }
163
164};
165
166
167// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168
169} // End namespace Foam
170
171// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173#endif
174
175// ************************************************************************* //
Abstract base class for GAMG agglomerated interface fields.
GAMGInterfaceField(const GAMGInterface &GAMGCp, const bool doTransform, const int rank)
Construct from GAMG interface and fine level interface field.
GAMGInterfaceField(const GAMGInterface &GAMGCp, const lduInterfaceField &)
Construct from GAMG interface and fine level interface field.
declareRunTimeSelectionTable(autoPtr, GAMGInterfaceField, lduInterfaceField,(const GAMGInterface &GAMGCp, const lduInterfaceField &fineInterface),(GAMGCp, fineInterface))
declareRunTimeSelectionTable(autoPtr, GAMGInterfaceField, lduInterface,(const GAMGInterface &GAMGCp, const bool doTransform, const int rank),(GAMGCp, doTransform, rank))
const GAMGInterface & interface() const
Return interface.
TypeName("GAMGInterfaceField")
Runtime type information.
static autoPtr< GAMGInterfaceField > New(const GAMGInterface &GAMGCp, const lduInterfaceField &fineInterface)
Return a pointer to a new interface created on freestore given.
Abstract base class for GAMG agglomerated interfaces.
Definition: GAMGInterface.H:57
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
Definition: lduInterface.H:58
Namespace for OpenFOAM.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73