GAMGInterfaceField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::GAMGInterfaceField
26 
27 Description
28  Abstract base class for GAMG agglomerated interface fields.
29 
30 SourceFiles
31  GAMGInterfaceField.C
32  GAMGInterfaceFieldNew.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef GAMGInterfaceField_H
37 #define GAMGInterfaceField_H
38 
39 #include "lduInterfaceField.H"
40 #include "GAMGInterface.H"
41 #include "autoPtr.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class GAMGInterfaceField Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public lduInterfaceField
55 {
56  // Private Data
57 
58  //- Local reference cast into the interface
59  const GAMGInterface& interface_;
60 
61 
62 public:
63 
64  //- Runtime type information
65  TypeName("GAMGInterfaceField");
66 
67 
68  // Declare run-time constructor selection tables
69 
71  (
72  autoPtr,
75  (
76  const GAMGInterface& GAMGCp,
77  const lduInterfaceField& fineInterface
78  ),
79  (GAMGCp, fineInterface)
80  );
81 
83  (
84  autoPtr,
87  (
88  const GAMGInterface& GAMGCp,
89  const bool doTransform,
90  const int rank
91  ),
92  (GAMGCp, doTransform, rank)
93  );
94 
95 
96  // Selectors
97 
98  //- Return a pointer to a new interface created on freestore given
99  // the fine interface
101  (
102  const GAMGInterface& GAMGCp,
103  const lduInterfaceField& fineInterface
104  );
105 
106  //- Return a pointer to a new interface created on freestore given
107  // the fine interface
109  (
110  const GAMGInterface& GAMGCp,
111  const bool doTransform,
112  const int rank
113  );
114 
115 
116  // Constructors
117 
118  //- Construct from GAMG interface and fine level interface field
120  (
121  const GAMGInterface& GAMGCp,
122  const lduInterfaceField&
123  )
124  :
125  lduInterfaceField(GAMGCp),
126  interface_(GAMGCp)
127  {}
128 
129  //- Construct from GAMG interface and fine level interface field
131  (
132  const GAMGInterface& GAMGCp,
133  const bool doTransform,
134  const int rank
135  )
136  :
137  lduInterfaceField(GAMGCp),
138  interface_(GAMGCp)
139  {}
140 
141  //- Disallow default bitwise copy construction
142  GAMGInterfaceField(const GAMGInterfaceField&) = delete;
143 
144 
145  // Member Functions
146 
147  // Access
148 
149  //- Return interface
150  const GAMGInterface& interface() const
151  {
152  return interface_;
153  }
154 
155 
156  // Member Operators
157 
158  //- Disallow default bitwise assignment
159  void operator=(const GAMGInterfaceField&) = delete;
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
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))
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
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:51
TypeName("GAMGInterfaceField")
Runtime type information.
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches...
Definition: lduInterface.H:53
const GAMGInterface & interface() const
Return interface.
Abstract base class for GAMG agglomerated interface fields.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
void operator=(const GAMGInterfaceField &)=delete
Disallow default bitwise assignment.
Namespace for OpenFOAM.