FreeFOAM The Cross-Platform CFD Toolkit
cyclicGAMGInterface.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) 1991-2010 OpenCFD Ltd.
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::cyclicGAMGInterface
26 
27 Description
28  GAMG agglomerated cyclic interface.
29 
30 SourceFiles
31  cyclicGAMGInterface.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cyclicGAMGInterface_H
36 #define cyclicGAMGInterface_H
37 
38 #include <OpenFOAM/GAMGInterface.H>
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class cyclicGAMGInterface Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public GAMGInterface,
53  virtual public cyclicLduInterface
54 {
55  // Private data
56 
57  //- Reference tor the cyclicLduInterface from which this is
58  // agglomerated
59  const cyclicLduInterface& fineCyclicInterface_;
60 
61 
62  // Private Member Functions
63 
64  //- Disallow default bitwise copy construct
66 
67  //- Disallow default bitwise assignment
68  void operator=(const cyclicGAMGInterface&);
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("cyclic");
75 
76 
77  // Constructors
78 
79  //- Construct from fine level interface,
80  // local and neighbour restrict addressing
82  (
83  const lduInterface& fineInterface,
84  const labelField& restrictAddressing,
85  const labelField& neighbourRestrictAddressing
86  );
87 
88 
89  // Destructor
90 
91  virtual ~cyclicGAMGInterface();
92 
93 
94  // Member Functions
95 
96  // Interface transfer functions
97 
98  //- Transfer and return neighbour field
100  (
101  const Pstream::commsTypes commsType,
102  const unallocLabelList& interfaceData
103  ) const;
104 
105  //- Transfer and return internal field adjacent to the interface
107  (
108  const Pstream::commsTypes commsType,
109  const unallocLabelList& iF
110  ) const;
111 
112 
113  //- Cyclic interface functions
114 
115  //- Return face transformation tensor
116  virtual const tensorField& forwardT() const
117  {
118  return fineCyclicInterface_.forwardT();
119  }
120 
121  //- Return neighbour-cell transformation tensor
122  virtual const tensorField& reverseT() const
123  {
124  return fineCyclicInterface_.reverseT();
125  }
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************ vim: set sw=4 sts=4 et: ************************ //