Loading...
Searching...
No Matches
slicedFvPatchField.C
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) 2017-2025 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
27\*---------------------------------------------------------------------------*/
28
29#include "slicedFvPatchField.H"
30
31// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
32
33template<class Type>
35(
36 const fvPatch& p,
38 const Field<Type>& completeOrBoundaryField,
39 const bool isBoundaryOnly
40)
41:
42 fvPatchField<Type>(p, iF, Field<Type>())
43{
44 if (isBoundaryOnly)
45 {
46 // Set to a slice of the boundary field
47 UList<Type>::shallowCopy(p.boundarySlice(completeOrBoundaryField));
48 }
49 else
50 {
51 // Set to a slice of the complete field
52 UList<Type>::shallowCopy(p.patchSlice(completeOrBoundaryField));
53 }
54}
55
56
57template<class Type>
59(
60 const fvPatch& p,
61 const DimensionedField<Type, volMesh>& iF
63:
64 fvPatchField<Type>(p, iF, Field<Type>())
65{}
66
67
68template<class Type>
70(
71 const fvPatch& p,
73 const dictionary& dict
74)
75:
76 fvPatchField<Type>(p, iF) // bypass dictionary constructor
77{
79 // Read "value" if present...
80
82}
83
84
85template<class Type>
87(
88 const slicedFvPatchField<Type>& ptf,
89 const fvPatch& p,
91 const fvPatchFieldMapper& mapper
92)
93:
94 fvPatchField<Type>(ptf, p, iF, mapper)
95{
97}
98
99
100template<class Type>
102(
103 const slicedFvPatchField<Type>& ptf,
105)
106:
107 fvPatchField<Type>(ptf.patch(), iF, Field<Type>())
109 // Transfer the slice from the argument
111}
112
113
114template<class Type>
116(
117 const slicedFvPatchField<Type>& ptf
118)
119:
121{}
122
123
124// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
125
126template<class Type>
128{
129 // Set to nullptr to avoid deletion of underlying field
131}
132
133
134// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
135
136template<class Type>
138{
140 return nullptr;
141}
142
143
144template<class Type>
149 return nullptr;
150}
151
152
153template<class Type>
157}
158
159
160template<class Type>
165 return nullptr;
166}
167
168
169template<class Type>
179(
180 const tmp<scalarField>&
181) const
182{
184 return nullptr;
185}
186
187
188template<class Type>
191(
192 const tmp<scalarField>&
193) const
194{
196 return nullptr;
197}
198
199
200template<class Type>
203{
205 return nullptr;
206}
207
208
209template<class Type>
214 return nullptr;
215}
216
217
218template<class Type>
220{
223}
224
225
226// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition UList.H:89
void shallowCopy(T *__restrict__ ptr, const label len) noexcept
Copy the pointer and size.
Definition UListI.H:318
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
virtual void readDict(const dictionary &dict)
Read dictionary entries.
const fvPatch & patch() const noexcept
Return the patch.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
const DimensionedField< Type, volMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
fvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
Specialization of fvPatchField which creates the underlying fvPatchField as a slice of the given comp...
virtual void write(Ostream &) const
Write.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
slicedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &, const Field< Type > &completeOrBoundaryField, const bool isBoundaryOnly=false)
Construct from patch, internal field and field to slice.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
virtual ~slicedFvPatchField()
Destructor, resets pointers to avoid deletion of underlying field.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
virtual tmp< Field< Type > > patchNeighbourField() const
Return patchField on the opposite patch of a coupled patch.
A class for managing temporary objects.
Definition tmp.H:75
volScalarField & p
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition error.H:688
OBJstream os(runTime.globalPath()/outputName)
dictionary dict