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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::cyclicACMIGAMGInterfaceField
29 
30 Description
31  GAMG agglomerated cyclic interface for Arbitrarily Coupled Mesh Interface
32  (ACMI) fields.
33 
34 SourceFiles
35  cyclicACMIGAMGInterfaceField.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef cyclicACMIGAMGInterfaceField_H
40 #define cyclicACMIGAMGInterfaceField_H
41 
42 #include "GAMGInterfaceField.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class cyclicACMIGAMGInterfaceField Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public GAMGInterfaceField,
58  virtual public cyclicACMILduInterfaceField
59 {
60  // Private data
61 
62  //- Local reference cast into the cyclic interface
63  const cyclicACMIGAMGInterface& cyclicACMIInterface_;
64 
65  //- Is the transform required
66  bool doTransform_;
67 
68  //- Rank of component for transformation
69  int rank_;
70 
71 
72  // Private Member Functions
73 
74  //- No copy construct
76  (
78  ) = delete;
79 
80  //- No copy assignment
81  void operator=(const cyclicACMIGAMGInterfaceField&) = delete;
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("cyclicACMI");
88 
89 
90  // Constructors
91 
92  //- Construct from GAMG interface and fine level interface field
94  (
95  const GAMGInterface& GAMGCp,
96  const lduInterfaceField& fineInterfaceField
97  );
98 
99  //- Construct from GAMG interface and fine level interface field
101  (
102  const GAMGInterface& GAMGCp,
103  const bool doTransform,
104  const int rank
105  );
106 
107 
108  //- Destructor
110 
111 
112  // Member Functions
113 
114  // Access
115 
116  //- Return size
117  label size() const
118  {
119  return cyclicACMIInterface_.size();
120  }
121 
122 
123  // Interface matrix update
124 
125  //- Update result field based on interface functionality
126  virtual void updateInterfaceMatrix
127  (
128  solveScalarField& result,
129  const bool add,
130  const lduAddressing& lduAddr,
131  const label patchId,
132  const solveScalarField& psiInternal,
133  const scalarField& coeffs,
134  const direction cmpt,
135  const Pstream::commsTypes commsType
136  ) const;
137 
138 
139  //- Cyclic interface functions
140 
141  //- Does the interface field perform the transformation
142  virtual bool doTransform() const
143  {
144  return doTransform_;
145  }
146 
147  //- Return face transformation tensor
148  virtual const tensorField& forwardT() const
149  {
150  return cyclicACMIInterface_.forwardT();
151  }
152 
153  //- Return neighbour-cell transformation tensor
154  virtual const tensorField& reverseT() const
155  {
156  return cyclicACMIInterface_.reverseT();
157  }
158 
159  //- Return rank of component for transform
160  virtual int rank() const
161  {
162  return rank_;
163  }
164 };
165 
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 } // End namespace Foam
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************************************************************* //
Foam::lduAddressing
The class contains the addressing required by the lduMatrix: upper, lower and losort.
Definition: lduAddressing.H:114
Foam::cyclicACMIGAMGInterfaceField::rank
virtual int rank() const
Return rank of component for transform.
Definition: cyclicACMIGAMGInterfaceField.H:159
Foam::GAMGInterface::size
virtual label size() const
Return size.
Definition: GAMGInterface.H:205
Foam::cyclicACMIGAMGInterfaceField::updateInterfaceMatrix
virtual void updateInterfaceMatrix(solveScalarField &result, const bool add, const lduAddressing &lduAddr, const label patchId, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Update result field based on interface functionality.
Definition: cyclicACMIGAMGInterfaceField.C:97
Foam::cyclicACMIGAMGInterfaceField::TypeName
TypeName("cyclicACMI")
Runtime type information.
Foam::cyclicACMIGAMGInterfaceField
GAMG agglomerated cyclic interface for Arbitrarily Coupled Mesh Interface (ACMI) fields.
Definition: cyclicACMIGAMGInterfaceField.H:54
Foam::cyclicACMIGAMGInterface
GAMG agglomerated cyclic ACMI interface.
Definition: cyclicACMIGAMGInterface.H:51
Foam::cyclicACMILduInterfaceField
Abstract base class for cyclic ACMI coupled interfaces.
Definition: cyclicACMILduInterfaceField.H:51
Foam::cyclicACMIGAMGInterfaceField::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: cyclicACMIGAMGInterfaceField.H:147
Foam::cyclicACMIGAMGInterface::reverseT
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Definition: cyclicACMIGAMGInterface.H:146
Foam::Field< solveScalar >
Foam::GAMGInterface
Abstract base class for GAMG agglomerated interfaces.
Definition: GAMGInterface.H:54
Foam::cyclicACMIGAMGInterface::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: cyclicACMIGAMGInterface.H:140
Foam::GAMGInterfaceField
Abstract base class for GAMG agglomerated interface fields.
Definition: GAMGInterfaceField.H:54
Foam::add
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:939
cyclicACMILduInterfaceField.H
GAMGInterfaceField.H
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
cyclicACMIGAMGInterface.H
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:69
Foam::cyclicACMIGAMGInterfaceField::reverseT
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Definition: cyclicACMIGAMGInterfaceField.H:153
Foam::direction
uint8_t direction
Definition: direction.H:52
Foam::cyclicACMIGAMGInterfaceField::doTransform
virtual bool doTransform() const
Cyclic interface functions.
Definition: cyclicACMIGAMGInterfaceField.H:141
patchId
label patchId(-1)
Foam::cyclicACMIGAMGInterfaceField::~cyclicACMIGAMGInterfaceField
virtual ~cyclicACMIGAMGInterfaceField()
Destructor.
Definition: cyclicACMIGAMGInterfaceField.C:90
Foam::cyclicACMIGAMGInterfaceField::size
label size() const
Return size.
Definition: cyclicACMIGAMGInterfaceField.H:116