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 -------------------------------------------------------------------------------
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::GAMGInterfaceField
29 
30 Description
31  Abstract base class for GAMG agglomerated interface fields.
32 
33 SourceFiles
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 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class GAMGInterfaceField Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public lduInterfaceField
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
68  GAMGInterfaceField(const GAMGInterfaceField&) = delete;
69 
70  //- No copy assignment
71  void operator=(const GAMGInterfaceField&) = delete;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("GAMGInterfaceField");
78 
79 
80  // Declare run-time constructor selection tables
81 
83  (
84  autoPtr,
87  (
88  const GAMGInterface& GAMGCp,
89  const lduInterfaceField& fineInterface
90  ),
91  (GAMGCp, fineInterface)
92  );
93 
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 // ************************************************************************* //
Foam::lduInterface
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
Definition: lduInterface.H:54
Foam::GAMGInterfaceField::New
static autoPtr< GAMGInterfaceField > New(const GAMGInterface &GAMGCp, const lduInterfaceField &fineInterface)
Return a pointer to a new interface created on freestore given.
Definition: GAMGInterfaceFieldNew.C:34
GAMGInterface.H
Foam::GAMGInterface
Abstract base class for GAMG agglomerated interfaces.
Definition: GAMGInterface.H:54
Foam::GAMGInterfaceField::interface
const GAMGInterface & interface() const
Return interface.
Definition: GAMGInterfaceField.H:158
Foam::GAMGInterfaceField
Abstract base class for GAMG agglomerated interface fields.
Definition: GAMGInterfaceField.H:54
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::lduInterfaceField
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
Definition: lduInterfaceField.H:58
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::GAMGInterfaceField::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, GAMGInterfaceField, lduInterfaceField,(const GAMGInterface &GAMGCp, const lduInterfaceField &fineInterface),(GAMGCp, fineInterface))
Foam::GAMGInterfaceField::TypeName
TypeName("GAMGInterfaceField")
Runtime type information.
lduInterfaceField.H
autoPtr.H