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 | Copyright (C) 2011-2013 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  // Private Member Functions
63 
64  //- Disallow default bitwise copy construct
66 
67  //- Disallow default bitwise assignment
68  void operator=(const GAMGInterfaceField&);
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("GAMGInterfaceField");
75 
76 
77  // Declare run-time constructor selection tables
78 
80  (
81  autoPtr,
84  (
85  const GAMGInterface& GAMGCp,
86  const lduInterfaceField& fineInterface
87  ),
88  (GAMGCp, fineInterface)
89  );
90 
92  (
93  autoPtr,
96  (
97  const GAMGInterface& GAMGCp,
98  const bool doTransform,
99  const int rank
100  ),
101  (GAMGCp, doTransform, rank)
102  );
103 
104 
105  // Selectors
106 
107  //- Return a pointer to a new interface created on freestore given
108  // the fine interface
110  (
111  const GAMGInterface& GAMGCp,
112  const lduInterfaceField& fineInterface
113  );
114 
115  //- Return a pointer to a new interface created on freestore given
116  // the fine interface
118  (
119  const GAMGInterface& GAMGCp,
120  const bool doTransform,
121  const int rank
122  );
123 
124 
125  // Constructors
126 
127  //- Construct from GAMG interface and fine level interface field
129  (
130  const GAMGInterface& GAMGCp,
131  const lduInterfaceField&
132  )
133  :
134  lduInterfaceField(GAMGCp),
135  interface_(GAMGCp)
136  {}
137 
138  //- Construct from GAMG interface and fine level interface field
140  (
141  const GAMGInterface& GAMGCp,
142  const bool doTransform,
143  const int rank
144  )
145  :
146  lduInterfaceField(GAMGCp),
147  interface_(GAMGCp)
148  {}
149 
150 
151  // Member Functions
152 
153  // Access
154 
155  //- Return interface
156  const GAMGInterface& interface() const
157  {
158  return interface_;
159  }
160 
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
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
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:53
const GAMGInterface & interface() const
Return interface.
Namespace for OpenFOAM.