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 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>& completeField
39)
40:
41 fvPatchField<Type>(p, iF, Field<Type>())
42{
43 // Set fvPatchField to a slice of the given complete field
44 UList<Type>::shallowCopy(p.patchSlice(completeField));
45}
46
47
48template<class Type>
50(
51 const fvPatch& p,
53)
54:
55 fvPatchField<Type>(p, iF, Field<Type>())
56{}
57
58
59template<class Type>
61(
62 const fvPatch& p,
64 const dictionary& dict
65)
66:
67 fvPatchField<Type>(p, iF, dict, false)
68{
70}
71
72
73template<class Type>
75(
76 const slicedFvPatchField<Type>& ptf,
77 const fvPatch& p,
79 const fvPatchFieldMapper& mapper
80)
81:
82 fvPatchField<Type>(ptf, p, iF, mapper)
83{
85}
86
87
88template<class Type>
90(
91 const slicedFvPatchField<Type>& ptf,
93)
94:
95 fvPatchField<Type>(ptf.patch(), iF, Field<Type>())
96{
97 // Transfer the slice from the argument
99}
100
101
102template<class Type>
105{
107 (
108 new slicedFvPatchField<Type>(*this)
109 );
110}
111
112
113template<class Type>
115(
116 const slicedFvPatchField<Type>& ptf
117)
118:
119 fvPatchField<Type>
120 (
121 ptf.patch(),
122 ptf.internalField(),
123 Field<Type>()
124 )
125{
126 // Transfer the slice from the argument
128}
129
130
131template<class Type>
134(
136) const
137{
139 (
140 new slicedFvPatchField<Type>(*this, iF)
141 );
142}
143
144
145template<class Type>
147{
148 // Set fvPatchField to nullptr to avoid deletion of underlying field
150}
151
152
153// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
154
155template<class Type>
157{
159
160 return Field<Type>::null();
161}
162
163
164template<class Type>
167{
169
170 return Field<Type>::null();
171}
172
173
174template<class Type>
176{
178}
179
180
181template<class Type>
184(
185 const Field<Type>& iField
186) const
187{
189
190 return Field<Type>::null();
191}
192
193
194template<class Type>
197{
199
200 return Field<Type>::null();
201}
202
203
204template<class Type>
207(
208 const tmp<scalarField>&
209) const
210{
212
213 return Field<Type>::null();
214}
215
216
217template<class Type>
220(
221 const tmp<scalarField>&
222) const
223{
225
226 return Field<Type>::null();
227}
228
229
230template<class Type>
233{
235
236 return Field<Type>::null();
237}
238
239
240template<class Type>
243{
245
246 return Field<Type>::null();
247}
248
249
250template<class Type>
252{
254 this->writeEntry("value", os);
255}
256
257
258// ************************************************************************* //
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
static const Field< Type > & null()
Return nullObject reference Field.
Definition: FieldI.H:31
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
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:94
void shallowCopy(const UList< T > &list)
Copy the pointer and size held by the given UList.
Definition: UListI.H:272
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
virtual bool write()
Write the output fields.
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...
Definition: fvPatchField.H:82
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 tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
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< fvPatchField< Type > > clone() const
Construct and return a clone.
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
virtual ~slicedFvPatchField()
Destructor.
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 of the values on the patch or on the.
A class for managing temporary objects.
Definition: tmp.H:65
volScalarField & p
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
OBJstream os(runTime.globalPath()/outputName)
dictionary dict