zeroGradientFaPatchField.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) 2016-2017 Wikki Ltd
9 Copyright (C) 2019 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::zeroGradientFaPatchField
29
30Description
31
32Author
33 Zeljko Tukovic, FMENA
34 Hrvoje Jasak, Wikki Ltd.
35
36SourceFiles
37 zeroGradientFaPatchField.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef zeroGradientFaPatchField_H
42#define zeroGradientFaPatchField_H
43
44#include "faPatchField.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class zeroGradientFaPatchField Declaration
53\*---------------------------------------------------------------------------*/
54
55template<class Type>
57:
58 public faPatchField<Type>
59{
60
61public:
62
63 //- Runtime type information
64 TypeName("zeroGradient");
65
66
67 // Constructors
68
69 //- Construct from patch and internal field
71 (
72 const faPatch&,
74 );
75
76 //- Construct from patch, internal field and dictionary
78 (
79 const faPatch&,
81 const dictionary&
82 );
83
84 //- Construct by mapping the given zeroGradientFaPatchField<Type>
85 // onto a new patch
87 (
89 const faPatch&,
92 );
93
94 //- Construct as copy
96 (
98 );
99
100 //- Construct and return a clone
101 virtual tmp<faPatchField<Type>> clone() const
102 {
104 (
106 );
107 }
108
109 //- Construct as copy setting internal field reference
111 (
114 );
115
116 //- Construct and return a clone setting internal field reference
118 (
120 ) const
121 {
123 (
124 new zeroGradientFaPatchField<Type>(*this, iF)
125 );
126 }
127
128
129 //- Destructor
130 virtual ~zeroGradientFaPatchField<Type>() = default;
131
132
133 // Member functions
134
135 // Evaluation functions
136
137 //- Return gradient at boundary
138 virtual tmp<Field<Type>> snGrad() const
139 {
140 return tmp<Field<Type>>
141 (
142 new Field<Type>(this->size(), Zero)
143 );
144 }
145
146 //- Evaluate the patch field
147 virtual void evaluate
148 (
150 );
151
152 //- Return the matrix diagonal coefficients corresponding to the
153 // evaluation of the value of this patchField with given weights
155 (
156 const tmp<scalarField>&
157 ) const;
158
159 //- Return the matrix source coefficients corresponding to the
160 // evaluation of the value of this patchField with given weights
162 (
163 const tmp<scalarField>&
164 ) const;
165
166 //- Return the matrix diagonal coefficients corresponding to the
167 // evaluation of the gradient of this patchField
169
170 //- Return the matrix source coefficients corresponding to the
171 // evaluation of the gradient of this patchField
173};
174
175
176// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177
178} // End namespace Foam
179
180// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181
182#ifdef NoRepository
184#endif
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188#endif
189
190// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type.
Definition: Field.H:82
label size() const noexcept
The number of elements in the UList.
Definition: UListI.H:420
commsTypes
Types of communications.
Definition: UPstream.H:67
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-area patch fields.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
Definition: faPatchField.H:82
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:78
A class for managing temporary objects.
Definition: tmp.H:65
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
virtual tmp< faPatchField< Type > > clone() const
Construct and return a clone.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
zeroGradientFaPatchField(const zeroGradientFaPatchField< Type > &)
Construct as copy.
zeroGradientFaPatchField(const zeroGradientFaPatchField< Type > &, const DimensionedField< Type, areaMesh > &)
Construct as copy setting internal field reference.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
TypeName("zeroGradient")
Runtime type information.
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
virtual tmp< Field< Type > > snGrad() const
Return gradient at boundary.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
virtual tmp< faPatchField< Type > > clone(const DimensionedField< Type, areaMesh > &iF) const
Construct and return a clone setting internal field reference.
Namespace for OpenFOAM.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73