Loading...
Searching...
No Matches
clampedPlateFaPatchField.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) 2020 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::clampedPlateFaPatchField
28
29Description
30 This BC provides a clamped BC. It sets zero fixed value and zeroGradient.
31
32Usage
33 Example of the boundary condition specification:
34 \verbatim
35 <patchName>
36 {
37 // Mandatory entries (unmodifiable)
38 type clampedPlate;
39
40 // Mandatory/Optional (inherited) entries
41 ...
42 }
43 \endverbatim
44
45 where the entries mean:
46 \table
47 Property | Description | Type | Reqd | Dflt
48 type | Type name: clampedPlate | word | yes | -
49 \endtable
50
51 The inherited entries are elaborated in:
52 - \link faPatchFields.H \endlink
53
54SourceFiles
55 clampedPlateFaPatchField.C
56
57\*---------------------------------------------------------------------------*/
58
59#ifndef clampedPlateFaPatchField_H
60#define clampedPlateFaPatchField_H
61
62#include "faPatchField.H"
63
64// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65
66namespace Foam
67{
68
69/*---------------------------------------------------------------------------*\
70 Class clampedPlateFaPatch Declaration
71\*---------------------------------------------------------------------------*/
72
73template<class Type>
75:
76 public faPatchField<Type>
77{
78public:
79
80 //- Runtime type information
81 TypeName("clampedPlate");
82
83
84 // Constructors
85
86 //- Construct from patch and internal field
88 (
89 const faPatch&,
91 );
92
93 //- Construct from patch, internal field and dictionary
94 // The "value" entry: NO_READ
96 (
97 const faPatch&,
99 const dictionary&
100 );
101
102 //- Construct by mapping the given clampedPlate patch field
103 //- onto a new patch
105 (
107 const faPatch&,
109 const faPatchFieldMapper&
110 );
111
112 //- Construct as copy
114 (
116 );
117
118 //- Construct as copy setting internal field reference
120 (
123 );
124
125 //- Return clone
126 virtual tmp<faPatchField<Type>> clone() const
127 {
128 return faPatchField<Type>::Clone(*this);
129 }
130
131 //- Clone with an internal field reference
133 (
135 ) const
136 {
137 return faPatchField<Type>::Clone(*this, iF);
138 }
139
140
141 //- Destructor
142 virtual ~clampedPlateFaPatchField() = default;
143
144
145 // Member Functions
146
147 // Evaluation
149 //- Return gradient at boundary
150 virtual tmp<Field<Type>> snGrad() const
151 {
152 return tmp<Field<Type>>::New(this->size(), Foam::zero{});
153 }
154
155 //- Evaluate the patch field
156 virtual void evaluate
157 (
159 );
160
161 //- Return the matrix diagonal coefficients corresponding to the
162 //- evaluation of the value of this patchField with given weights
164 (
165 const tmp<scalarField>&
166 ) const;
167
168 //- Return the matrix source coefficients corresponding to the
169 //- evaluation of the value of this patchField with given weights
171 (
172 const tmp<scalarField>&
173 ) const;
174
175 //- Return the matrix diagonal coefficients corresponding to the
176 //- evaluation of the gradient of this patchField
179 //- Return the matrix source coefficients corresponding to the
180 //- evaluation of the gradient of this patchField
182
183
184 // IO
185
186 //- Write includes "value" entry
187 virtual void write(Ostream&) const;
188};
189
190
191// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192
193} // End namespace Foam
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197#ifdef NoRepository
199#endif
200
201// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202
203#endif
204
205// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
void size(const label n)
Definition UList.H:118
commsTypes
Communications types.
Definition UPstream.H:81
@ buffered
"buffered" : (MPI_Bsend, MPI_Recv)
Definition UPstream.H:82
This BC provides a clamped BC. It sets zero fixed value and zeroGradient.
virtual tmp< faPatchField< Type > > clone() const
Return clone.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the evaluation of the value of this patchFie...
TypeName("clampedPlate")
Runtime type information.
clampedPlateFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual ~clampedPlateFaPatchField()=default
Destructor.
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 evaluation of the value of this patchField...
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the evaluation of the gradient of this patchFi...
virtual tmp< faPatchField< Type > > clone(const DimensionedField< Type, areaMesh > &iF) const
Clone with an internal field reference.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the evaluation of the gradient of this patch...
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-area patch fields.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
faPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
static tmp< faPatchField< Type > > Clone(const DerivedPatchField &pf)
Clone a patch field with its own internal field reference.
static tmp< faPatchField< Type > > New(const word &patchFieldType, const word &actualPatchType, const faPatch &, const DimensionedField< Type, areaMesh > &)
Return a pointer to a new patchField created on freestore given patch and internal field.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition faPatch.H:76
A class for managing temporary objects.
Definition tmp.H:75
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition zero.H:58
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68