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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::cyclicACMIGAMGInterfaceField
29
30Description
31 GAMG agglomerated cyclic interface for Arbitrarily Coupled Mesh Interface
32 (ACMI) fields.
33
34SourceFiles
35 cyclicACMIGAMGInterfaceField.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef cyclicACMIGAMGInterfaceField_H
40#define cyclicACMIGAMGInterfaceField_H
41
42#include "GAMGInterfaceField.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class cyclicACMIGAMGInterfaceField Declaration
53\*---------------------------------------------------------------------------*/
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
84public:
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// ************************************************************************* //
Abstract base class for GAMG agglomerated interface fields.
Abstract base class for GAMG agglomerated interfaces.
Definition: GAMGInterface.H:57
virtual label size() const
Return size.
commsTypes
Types of communications.
Definition: UPstream.H:67
GAMG agglomerated cyclic interface for Arbitrarily Coupled Mesh Interface (ACMI) fields.
virtual bool doTransform() const
Cyclic interface functions.
virtual int rank() const
Return rank of component for transform.
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.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
TypeName("cyclicACMI")
Runtime type information.
virtual const tensorField & forwardT() const
Return face transformation tensor.
GAMG agglomerated cyclic ACMI interface.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual const tensorField & forwardT() const
Return face transformation tensor.
Abstract base class for cyclic ACMI coupled interfaces.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
label patchId(-1)
Namespace for OpenFOAM.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
uint8_t direction
Definition: direction.H:56
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73