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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::GAMGInterfaceField
28 
29 Description
30  Abstract base class for GAMG agglomerated interface fields.
31 
32 SourceFiles
33  GAMGInterfaceField.C
34  GAMGInterfaceFieldNew.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef GAMGInterfaceField_H
39 #define GAMGInterfaceField_H
40 
41 #include "lduInterfaceField.H"
42 #include "GAMGInterface.H"
43 #include "autoPtr.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class GAMGInterfaceField Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public lduInterfaceField
57 {
58  // Private data
59 
60  //- Local reference cast into the interface
61  const GAMGInterface& interface_;
62 
63 
64  // Private Member Functions
65 
66  //- No copy construct
67  GAMGInterfaceField(const GAMGInterfaceField&) = delete;
68 
69  //- No copy assignment
70  void operator=(const GAMGInterfaceField&) = delete;
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("GAMGInterfaceField");
77 
78 
79  // Declare run-time constructor selection tables
80 
82  (
83  autoPtr,
86  (
87  const GAMGInterface& GAMGCp,
88  const lduInterfaceField& fineInterface
89  ),
90  (GAMGCp, fineInterface)
91  );
92 
94  (
95  autoPtr,
98  (
99  const GAMGInterface& GAMGCp,
100  const bool doTransform,
101  const int rank
102  ),
103  (GAMGCp, doTransform, rank)
104  );
105 
106 
107  // Selectors
108 
109  //- Return a pointer to a new interface created on freestore given
110  // the fine interface
112  (
113  const GAMGInterface& GAMGCp,
114  const lduInterfaceField& fineInterface
115  );
116 
117  //- Return a pointer to a new interface created on freestore given
118  // the fine interface
120  (
121  const GAMGInterface& GAMGCp,
122  const bool doTransform,
123  const int rank
124  );
125 
126 
127  // Constructors
128 
129  //- Construct from GAMG interface and fine level interface field
131  (
132  const GAMGInterface& GAMGCp,
133  const lduInterfaceField&
134  )
135  :
136  lduInterfaceField(GAMGCp),
137  interface_(GAMGCp)
138  {}
139 
140  //- Construct from GAMG interface and fine level interface field
142  (
143  const GAMGInterface& GAMGCp,
144  const bool doTransform,
145  const int rank
146  )
147  :
148  lduInterfaceField(GAMGCp),
149  interface_(GAMGCp)
150  {}
151 
152 
153  // Member Functions
154 
155  // Access
156 
157  //- Return interface
158  const GAMGInterface& interface() const
159  {
160  return interface_;
161  }
162 
163 };
164 
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 } // End namespace Foam
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //
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:53
Foam::GAMGInterfaceField::interface
const GAMGInterface & interface() const
Return interface.
Definition: GAMGInterfaceField.H:157
Foam::GAMGInterfaceField
Abstract base class for GAMG agglomerated interface fields.
Definition: GAMGInterfaceField.H:53
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