FreeFOAM The Cross-Platform CFD Toolkit
cyclicGAMGInterfaceField.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::cyclicGAMGInterfaceField
26 
27 Description
28  GAMG agglomerated cyclic interface field.
29 
30 SourceFiles
31  cyclicGAMGInterfaceField.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cyclicGAMGInterfaceField_H
36 #define cyclicGAMGInterfaceField_H
37 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class cyclicGAMGInterfaceField Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public GAMGInterfaceField,
54  virtual public cyclicLduInterfaceField
55 {
56  // Private data
57 
58  //- Local reference cast into the cyclic interface
59  const cyclicGAMGInterface& cyclicInterface_;
60 
61  //- Is the transform required
62  bool doTransform_;
63 
64  //- Rank of component for transformation
65  int rank_;
66 
67 
68  // Private Member Functions
69 
70  //- Disallow default bitwise copy construct
72 
73  //- Disallow default bitwise assignment
74  void operator=(const cyclicGAMGInterfaceField&);
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("cyclic");
81 
82 
83  // Constructors
84 
85  //- Construct from GAMG interface and fine level interface field
87  (
88  const GAMGInterface& GAMGCp,
89  const lduInterfaceField& fineInterfaceField
90  );
91 
92 
93  // Destructor
94 
95  virtual ~cyclicGAMGInterfaceField();
96 
97 
98  // Member Functions
99 
100  // Access
101 
102  //- Return size
103  label size() const
104  {
105  return cyclicInterface_.size();
106  }
107 
108 
109  // Interface matrix update
110 
111  //- Update result field based on interface functionality
112  virtual void updateInterfaceMatrix
113  (
114  const scalarField& psiInternal,
115  scalarField& result,
116  const lduMatrix&,
117  const scalarField& coeffs,
118  const direction cmpt,
119  const Pstream::commsTypes commsType
120  ) const;
121 
122 
123  //- Cyclic interface functions
124 
125  //- Does the interface field perform the transfromation
126  virtual bool doTransform() const
127  {
128  return doTransform_;
129  }
130 
131  //- Return face transformation tensor
132  virtual const tensorField& forwardT() const
133  {
134  return cyclicInterface_.forwardT();
135  }
136 
137  //- Return neighbour-cell transformation tensor
138  virtual const tensorField& reverseT() const
139  {
140  return cyclicInterface_.reverseT();
141  }
142 
143  //- Return rank of component for transform
144  virtual int rank() const
145  {
146  return rank_;
147  }
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #endif
158 
159 // ************************ vim: set sw=4 sts=4 et: ************************ //