All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LduInterfaceField.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::LduInterfaceField
26 
27 Description
28  An abstract base class for implicitly-coupled interface fields
29  e.g. processor and cyclic patch fields.
30 
31 SourceFiles
32  LduInterfaceField.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef LduInterfaceField_H
37 #define LduInterfaceField_H
38 
39 #include "lduInterfaceField.H"
40 #include "primitiveFieldsFwd.H"
41 #include "Pstream.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 class lduMatrix;
51 
52 /*---------------------------------------------------------------------------*\
53  Class LduInterfaceField Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class Type>
58 :
59  public lduInterfaceField
60 {
61 
62 public:
63 
64  //- Runtime type information
65  TypeName("LduInterfaceField");
66 
67 
68  // Constructors
69 
70  //- Construct given coupled patch
71  LduInterfaceField(const lduInterface& patch)
72  :
73  lduInterfaceField(patch)
74  {}
75 
76  //- Disallow default bitwise copy construction
77  LduInterfaceField(const LduInterfaceField&) = delete;
78 
79 
80  //- Destructor
81  virtual ~LduInterfaceField();
82 
83 
84  // Member Functions
85 
86  // Coupled interface functionality
87 
88  //- Inherit initInterfaceMatrixUpdate from lduInterfaceField
90 
91  //- Initialise neighbour matrix update
93  (
94  Field<Type>&,
95  const Field<Type>&,
96  const scalarField&,
97  const Pstream::commsTypes commsType
98  ) const
99  {}
100 
101  //- Inherit updateInterfaceMatrix from lduInterfaceField
103 
104  //- Update result field based on interface functionality
105  virtual void updateInterfaceMatrix
106  (
107  Field<Type>&,
108  const Field<Type>&,
109  const scalarField&,
110  const Pstream::commsTypes commsType
111  ) const = 0;
112 
113 
114  // Member Operators
115 
116  //- Disallow default bitwise assignment
117  void operator=(const LduInterfaceField&) = delete;
118 };
119 
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace Foam
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #ifdef NoRepository
128  #include "LduInterfaceField.C"
129 #endif
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
virtual void initInterfaceMatrixUpdate(Field< Type > &, const Field< Type > &, const scalarField &, const Pstream::commsTypes commsType) const
Initialise neighbour matrix update.
TypeName("LduInterfaceField")
Runtime type information.
commsTypes
Types of communications.
Definition: UPstream.H:64
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
LduInterfaceField(const lduInterface &patch)
Construct given coupled patch.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
virtual void updateInterfaceMatrix(Field< Type > &, const Field< Type > &, const scalarField &, const Pstream::commsTypes commsType) const =0
Update result field based on interface functionality.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
Pre-declare SubField and related Field type.
Definition: Field.H:56
virtual void updateInterfaceMatrix(scalarField &, const scalarField &, const scalarField &, const direction, const Pstream::commsTypes commsType) const =0
Update result field based on interface functionality.
void operator=(const LduInterfaceField &)=delete
Disallow default bitwise assignment.
virtual void initInterfaceMatrixUpdate(scalarField &, const scalarField &, const scalarField &, const direction, const Pstream::commsTypes commsType) const
Initialise neighbour matrix update.
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches...
Definition: lduInterface.H:53
virtual ~LduInterfaceField()
Destructor.
Namespace for OpenFOAM.