LduInterfaceField.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) 2011-2015 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  // Private Member Functions
62 
63  //- Disallow default bitwise copy construct
65 
66  //- Disallow default bitwise assignment
67  void operator=(const LduInterfaceField&);
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("LduInterfaceField");
74 
75 
76  // Constructors
77 
78  //- Construct given coupled patch
79  LduInterfaceField(const lduInterface& patch)
80  :
81  lduInterfaceField(patch)
82  {}
83 
84 
85  //- Destructor
86  virtual ~LduInterfaceField();
87 
88 
89  // Member Functions
90 
91  // Coupled interface functionality
92 
93  //- Inherit initInterfaceMatrixUpdate from lduInterfaceField
95 
96  //- Initialise neighbour matrix update
98  (
99  Field<Type>&,
100  const Field<Type>&,
101  const scalarField&,
102  const Pstream::commsTypes commsType
103  ) const
104  {}
105 
106  //- Inherit updateInterfaceMatrix from lduInterfaceField
108 
109  //- Update result field based on interface functionality
110  virtual void updateInterfaceMatrix
111  (
112  Field<Type>&,
113  const Field<Type>&,
114  const scalarField&,
115  const Pstream::commsTypes commsType
116  ) const = 0;
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #ifdef NoRepository
127 # include "LduInterfaceField.C"
128 #endif
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
virtual ~LduInterfaceField()
Destructor.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
Namespace for OpenFOAM.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches...
Definition: lduInterface.H:53
TypeName("LduInterfaceField")
Runtime type information.
commsTypes
Types of communications.
Definition: UPstream.H:64
Pre-declare SubField and related Field type.
Definition: Field.H:57
virtual void initInterfaceMatrixUpdate(scalarField &, const scalarField &, const scalarField &, const direction, const Pstream::commsTypes commsType) const
Initialise neighbour matrix update.
virtual void updateInterfaceMatrix(Field< Type > &, const Field< Type > &, const scalarField &, const Pstream::commsTypes commsType) const =0
Update result field based on interface functionality.
virtual void initInterfaceMatrixUpdate(Field< Type > &, const Field< Type > &, const scalarField &, const Pstream::commsTypes commsType) const
Initialise neighbour matrix update.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
virtual void updateInterfaceMatrix(scalarField &, const scalarField &, const scalarField &, const direction, const Pstream::commsTypes commsType) const =0
Update result field based on interface functionality.