cyclicAMIGAMGInterfaceField.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::cyclicAMIGAMGInterfaceField
26 
27 Description
28  GAMG agglomerated cyclic interface field.
29 
30 SourceFiles
31  cyclicAMIGAMGInterfaceField.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cyclicAMIGAMGInterfaceField_H
36 #define cyclicAMIGAMGInterfaceField_H
37 
38 #include "GAMGInterfaceField.H"
39 #include "cyclicAMIGAMGInterface.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class cyclicAMIGAMGInterfaceField Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public GAMGInterfaceField,
55 {
56  // Private Data
57 
58  //- Local reference cast into the cyclic interface
59  const cyclicAMIGAMGInterface& cyclicAMIInterface_;
60 
61  //- Is the transform required
62  bool doTransform_;
63 
64  //- Rank of component for transformation
65  int rank_;
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("cyclicAMI");
72 
73 
74  // Constructors
75 
76  //- Construct from GAMG interface and fine level interface field
78  (
79  const GAMGInterface& GAMGCp,
80  const lduInterfaceField& fineInterfaceField
81  );
82 
83  //- Construct from GAMG interface and fine level interface field
85  (
86  const GAMGInterface& GAMGCp,
87  const bool doTransform,
88  const int rank
89  );
90 
91  //- Disallow default bitwise copy construction
93  (
95  ) = delete;
96 
97 
98  //- Destructor
100 
101 
102  // Member Functions
103 
104  // Access
105 
106  //- Return size
107  label size() const
108  {
109  return cyclicAMIInterface_.size();
110  }
111 
112 
113  // Interface matrix update
114 
115  //- Update result field based on interface functionality
116  virtual void updateInterfaceMatrix
117  (
118  scalarField& result,
119  const scalarField& psiInternal,
120  const scalarField& coeffs,
121  const direction cmpt,
122  const Pstream::commsTypes commsType
123  ) const;
124 
125 
126  //- Cyclic interface functions
127 
128  //- Does the interface field perform the transformation
129  virtual bool doTransform() const
130  {
131  return doTransform_;
132  }
133 
134  //- Return face transformation tensor
135  virtual const tensorField& forwardT() const
136  {
137  return cyclicAMIInterface_.forwardT();
138  }
139 
140  //- Return neighbour-cell transformation tensor
141  virtual const tensorField& reverseT() const
142  {
143  return cyclicAMIInterface_.reverseT();
144  }
145 
146  //- Return rank of component for transform
147  virtual int rank() const
148  {
149  return rank_;
150  }
151 
152 
153  // Member Operators
154 
155  //- Disallow default bitwise assignment
156  void operator=(const cyclicAMIGAMGInterfaceField&) = delete;
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
virtual label size() const
Return size.
GAMG agglomerated cyclic interface field.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
GAMG agglomerated cyclic AMI interface.
commsTypes
Types of communications.
Definition: UPstream.H:64
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
uint8_t direction
Definition: direction.H:45
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
TypeName("cyclicAMI")
Runtime type information.
virtual int rank() const
Return rank of component for transform.
Abstract base class for cyclic AMI coupled interfaces.
virtual const tensorField & forwardT() const
Return face transformation tensor.
cyclicAMIGAMGInterfaceField(const GAMGInterface &GAMGCp, const lduInterfaceField &fineInterfaceField)
Construct from GAMG interface and fine level interface field.
Abstract base class for GAMG agglomerated interfaces.
Definition: GAMGInterface.H:51
void operator=(const cyclicAMIGAMGInterfaceField &)=delete
Disallow default bitwise assignment.
virtual void updateInterfaceMatrix(scalarField &result, const scalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Update result field based on interface functionality.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Abstract base class for GAMG agglomerated interface fields.
virtual const tensorField & forwardT() const
Return face transformation tensor.
virtual bool doTransform() const
Cyclic interface functions.
Namespace for OpenFOAM.