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