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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 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::LduInterfaceField
29 
30 Description
31  An abstract base class for implicitly-coupled interface fields
32  e.g. processor and cyclic patch fields.
33 
34 SourceFiles
35  LduInterfaceField.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef LduInterfaceField_H
40 #define LduInterfaceField_H
41 
42 #include "lduInterfaceField.H"
43 #include "primitiveFieldsFwd.H"
44 #include "Pstream.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 class lduMatrix;
54 
55 /*---------------------------------------------------------------------------*\
56  Class LduInterfaceField Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 template<class Type>
61 :
62  public lduInterfaceField
63 {
64  // Private Member Functions
65 
66  //- No copy construct
67  LduInterfaceField(const LduInterfaceField&) = delete;
68 
69  //- No copy assignment
70  void operator=(const LduInterfaceField&) = delete;
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("LduInterfaceField");
77 
78 
79  // Constructors
80 
81  //- Construct given coupled patch
83  :
85  {}
86 
87 
88  //- Destructor
89  virtual ~LduInterfaceField() = default;
90 
91 
92  // Member Functions
93 
94  // Coupled interface functionality
95 
96  //- Inherit initInterfaceMatrixUpdate from lduInterfaceField
98 
99  //- Initialise neighbour matrix update
101  (
102  Field<Type>&,
103  const bool add,
104  const Field<Type>&,
105  const scalarField&,
106  const Pstream::commsTypes commsType
107  ) const
108  {}
109 
110  //- Inherit updateInterfaceMatrix from lduInterfaceField
112 
113  //- Update result field based on interface functionality
114  virtual void updateInterfaceMatrix
115  (
116  Field<Type>&,
117  const bool add,
118  const Field<Type>&,
119  const scalarField&,
120  const Pstream::commsTypes commsType
121  ) const = 0;
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #endif
132 
133 // ************************************************************************* //
primitiveFieldsFwd.H
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
Foam::LduInterfaceField::updateInterfaceMatrix
virtual void updateInterfaceMatrix(Field< Type > &, const bool add, const Field< Type > &, const scalarField &, const Pstream::commsTypes commsType) const =0
Update result field based on interface functionality.
Foam::lduInterface
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
Definition: lduInterface.H:54
Foam::lduInterfaceField::initInterfaceMatrixUpdate
virtual void initInterfaceMatrixUpdate(solveScalarField &result, const bool add, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Definition: lduInterfaceField.H:139
Foam::Field
Generic templated field type.
Definition: Field.H:63
Foam::LduInterfaceField::~LduInterfaceField
virtual ~LduInterfaceField()=default
Destructor.
Foam::LduInterfaceField::TypeName
TypeName("LduInterfaceField")
Runtime type information.
Foam::LduInterfaceField
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
Definition: LduInterfaceField.H:59
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
Pstream.H
Foam::lduInterfaceField::updateInterfaceMatrix
virtual void updateInterfaceMatrix(solveScalarField &result, const bool add, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const =0
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
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:69
Foam::foamVersion::patch
const std::string patch
OpenFOAM patch number as a std::string.
lduInterfaceField.H
Foam::LduInterfaceField::initInterfaceMatrixUpdate
virtual void initInterfaceMatrixUpdate(Field< Type > &, const bool add, const Field< Type > &, const scalarField &, const Pstream::commsTypes commsType) const
Initialise neighbour matrix update.
Definition: LduInterfaceField.H:100
Foam::LduInterfaceField::LduInterfaceField
LduInterfaceField(const lduInterface &patch)
Construct given coupled patch.
Definition: LduInterfaceField.H:81