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-2022 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::LduInterfaceField
29
30Description
31 An abstract base class for implicitly-coupled interface fields
32 e.g. processor and cyclic patch fields.
33
34SourceFiles
35 LduInterfaceField.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef Foam_LduInterfaceField_H
40#define Foam_LduInterfaceField_H
41
42#include "lduInterfaceField.H"
43#include "primitiveFieldsFwd.H"
44#include "Pstream.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51// Forward Declarations
52class lduMatrix;
53template<class Type> class LduInterfaceField;
54
55/*---------------------------------------------------------------------------*\
56 Class LduInterfaceField Declaration
57\*---------------------------------------------------------------------------*/
58
59template<class Type>
61:
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
73public:
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
100 virtual void initInterfaceMatrixUpdate
101 (
103 const bool add,
104 const lduAddressing&,
105 const label interfacei,
106 const Field<Type>&,
107 const scalarField&,
108 const Pstream::commsTypes commsType
109 ) const
110 {}
111
112 //- Inherit updateInterfaceMatrix from lduInterfaceField
114
115 //- Update result field based on interface functionality
116 virtual void updateInterfaceMatrix
117 (
119 const bool add,
120 const lduAddressing&,
121 const label interfacei,
122 const Field<Type>&,
123 const scalarField&,
124 const Pstream::commsTypes commsType
125 ) const = 0;
126};
127
128
129// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131} // End namespace Foam
132
133// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134
135#endif
136
137// ************************************************************************* //
Generic templated field type.
Definition: Field.H:82
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
virtual ~LduInterfaceField()=default
Destructor.
LduInterfaceField(const lduInterface &patch)
Construct given coupled patch.
virtual void updateInterfaceMatrix(Field< Type > &, const bool add, const lduAddressing &, const label interfacei, const Field< Type > &, const scalarField &, const Pstream::commsTypes commsType) const =0
Update result field based on interface functionality.
virtual void initInterfaceMatrixUpdate(Field< Type > &, const bool add, const lduAddressing &, const label interfacei, 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:67
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...
virtual void updateInterfaceMatrix(solveScalarField &result, const bool add, const lduAddressing &, const label interfacei, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const =0
virtual void initInterfaceMatrixUpdate(solveScalarField &result, const bool add, const lduAddressing &, const label interfacei, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
Definition: lduInterface.H:58
Namespace for OpenFOAM.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73