oversetGAMGInterfaceField.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) 2021 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::oversetGAMGInterfaceField
28 
29 Description
30  GAMG agglomerated
31 
32 SourceFiles
33  oversetGAMGInterfaceField.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef oversetGAMGInterfaceField_H
38 #define oversetGAMGInterfaceField_H
39 
40 #include "GAMGInterfaceField.H"
41 #include "oversetGAMGInterface.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class oversetGAMGInterfaceField Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public GAMGInterfaceField,
56  virtual public oversetLduInterfaceField
57 {
58  // Private Member Functions
59 
60  //- No copy construct
62  (
64  ) = delete;
65 
66  //- No copy assignment
67  void operator=(const oversetGAMGInterfaceField&) = delete;
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("overset");
74 
75 
76  // Constructors
77 
78  //- Construct from GAMG interface and fine level interface field
80  (
81  const GAMGInterface& GAMGCp,
82  const lduInterfaceField& fineInterfaceField
83  );
84 
85  //- Construct from GAMG interface and fine level interface field
87  (
88  const GAMGInterface& GAMGCp,
89  const bool doTransform,
90  const int rank
91  );
92 
93  //- Construct from GAMG interface and Istream
95  (
96  const GAMGInterface& GAMGCp,
97  Istream& is
98  );
99 
100  //- Construct by assembling and return a clone.
102  (
103  const GAMGInterface& GAMGCp,
104  const UPtrList<lduInterfaceField>& other
105  ) const
106  {
108  return autoPtr<GAMGInterfaceField>(nullptr);
109  }
110 
112  //- Destructor
113  virtual ~oversetGAMGInterfaceField();
114 
115 
116  // Member Functions
117 
118  // Interface matrix update
119 
120  //- Update result field based on interface functionality
121  virtual void updateInterfaceMatrix
122  (
123  solveScalarField& result,
124  const bool add,
125  const lduAddressing& lduAddr,
126  const label patchId,
127  const solveScalarField& psiInternal,
128  const scalarField& coeffs,
129  const direction cmpt,
130  const Pstream::commsTypes commsType
131  ) const;
132 
133 
134  // I/O
135 
136  //- Write to stream
137  virtual void write(Ostream&) const;
138 };
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
label patchId(-1)
uint8_t direction
Definition: direction.H:46
commsTypes
Communications types.
Definition: UPstream.H:72
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
TypeName("overset")
Runtime type information.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition: HashTable.H:106
virtual autoPtr< GAMGInterfaceField > clone(const GAMGInterface &GAMGCp, const UPtrList< lduInterfaceField > &other) const
Construct by assembling and return a clone.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
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.
Abstract base class for GAMG agglomerated interfaces.
Definition: GAMGInterface.H:50
virtual ~oversetGAMGInterfaceField()
Destructor.
::Foam::direction rank(const expressions::valueTypeCode) noexcept
The vector-space rank associated with given valueTypeCode.
Definition: exprTraits.C:70
Abstract base class for GAMG agglomerated interface fields.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
The class contains the addressing required by the lduMatrix: upper, lower and losort.
virtual void write(Ostream &) const
Write to stream.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:686
Abstract base class for overset coupled interface fields.
Namespace for OpenFOAM.