extrapolatedCalculatedFaPatchField.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 OpenFOAM Foundation
9  Copyright (C) 2023 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::extrapolatedCalculatedFaPatchField
29 
30 Group
31  grpGenericBoundaryConditions
32 
33 Description
34  This boundary condition applies a zero-gradient condition from the patch
35  internal field onto the patch faces when \c evaluated but may also be
36  assigned. \c snGrad returns the patch gradient evaluated from the current
37  internal and patch field values rather than returning zero.
38 
39 Usage
40  Example of the boundary condition specification:
41  \verbatim
42  <patchName>
43  {
44  type extrapolatedCalculated;
45  }
46  \endverbatim
47 
48 SourceFiles
49  extrapolatedCalculatedFaPatchField.C
50 
51 \*---------------------------------------------------------------------------*/
52 
53 #ifndef Foam_extrapolatedCalculatedFaPatchField_H
54 #define Foam_extrapolatedCalculatedFaPatchField_H
55 
56 #include "calculatedFaPatchField.H"
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class extrapolatedCalculatedFaPatchField Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 template<class Type>
69 :
70  public calculatedFaPatchField<Type>
71 {
72 public:
73 
74  //- Runtime type information
75  TypeName("extrapolatedCalculated");
76  // fieldTypes::extrapolatedCalculatedTypeName_()
77 
78 
79  // Constructors
80 
81  //- Construct from patch and internal field
83  (
84  const faPatch&,
86  );
87 
88  //- Construct from patch, internal field and dictionary
90  (
91  const faPatch&,
93  const dictionary&
94  );
95 
96  //- Construct by mapping given patchField onto a new patch
98  (
100  const faPatch&,
102  const faPatchFieldMapper&
103  );
104 
105  //- Construct as copy
107  (
109  );
110 
111  //- Construct as copy setting internal field reference
113  (
116  );
117 
118  //- Return clone
119  virtual tmp<faPatchField<Type>> clone() const
120  {
121  return faPatchField<Type>::Clone(*this);
122  }
123 
124  //- Clone with an internal field reference
126  (
128  ) const
129  {
130  return faPatchField<Type>::Clone(*this, iF);
131  }
132 
133 
134  // Member Functions
135 
136  //- Evaluate the patch field
137  virtual void evaluate
138  (
140  );
141 };
142 
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #ifdef NoRepository
152 #endif
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #endif
157 
158 // ************************************************************************* //
commsTypes
Communications types.
Definition: UPstream.H:77
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:129
extrapolatedCalculatedFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
virtual tmp< faPatchField< Type > > clone() const
Return clone.
static tmp< faPatchField< Type > > Clone(const DerivedPatchField &pf)
Clone a patch field with its own internal field reference.
Definition: faPatchField.H:513
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:72
TypeName("extrapolatedCalculated")
Runtime type information.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: HashPtrTable.H:50
"buffered" : (MPI_Bsend, MPI_Recv)
A FieldMapper for finite-area patch fields.
Namespace for OpenFOAM.