slicedFvsPatchField.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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "slicedFvsPatchField.H"
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32 
33 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
34 
35 template<class Type>
37 (
38  const fvPatch& p,
40  const Field<Type>& completeField
41 )
42 :
44 {
45  // Set the fvsPatchField to a slice of the given complete field
46  UList<Type>::operator=(p.patchSlice(completeField));
47 }
48 
49 
50 template<class Type>
52 (
53  const fvPatch& p,
55 )
56 :
58 {}
59 
60 
61 template<class Type>
63 (
64  const slicedFvsPatchField<Type>& ptf,
65  const fvPatch& p,
67  const fvPatchFieldMapper& mapper
68 )
69 :
70  fvsPatchField<Type>(ptf, p, iF, mapper)
71 {
73 }
74 
75 
76 template<class Type>
78 (
79  const fvPatch& p,
81  const dictionary& dict
82 )
83 :
84  fvsPatchField<Type>(p, iF, Field<Type>("value", dict, p.size()))
85 {
87 }
88 
89 
90 template<class Type>
92 (
93  const slicedFvsPatchField<Type>& ptf,
95 )
96 :
98 {
99  // Transfer the slice from the argument
101 }
102 
103 template<class Type>
105 {
106  return tmp<fvsPatchField<Type> >
107  (
108  new slicedFvsPatchField<Type>(*this)
109  );
110 }
111 
112 
113 template<class Type>
115 (
116  const slicedFvsPatchField<Type>& ptf
117 )
118 :
120  (
121  ptf.patch(),
123  Field<Type>()
124  )
125 {
126  // Transfer the slice from the argument
128 }
129 
130 
131 template<class Type>
133 (
135 ) const
136 {
137  return tmp<fvsPatchField<Type> >
138  (
139  new slicedFvsPatchField<Type>(*this, iF)
140  );
141 }
142 
143 
144 template<class Type>
146 {
147  // Set the fvsPatchField storage pointer to NULL before its destruction
148  // to protect the field it a slice of.
150 }
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace Foam
156 
157 // ************************************************************************* //
p
p
Definition: pEqn.H:62
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::fvsPatchField< Type >
slicedFvsPatchField.H
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
Foam::Field< Type >
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::slicedFvsPatchField
Specialization of fvsPatchField which creates the underlying fvsPatchField as a slice of the given co...
Definition: slicedFvsPatchField.H:55
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::fvsPatchField< Type >::dimensionedInternalField
const DimensionedField< Type, surfaceMesh > & dimensionedInternalField() const
Return dimensioned internal field reference.
Definition: fvsPatchField.H:285
Foam::fvsPatchField< Type >::patch
const fvPatch & patch() const
Return patch.
Definition: fvsPatchField.H:278
Foam::slicedFvsPatchField::clone
virtual tmp< fvsPatchField< Type > > clone() const
Construct and return a clone.
Definition: slicedFvsPatchField.C:104
Foam::slicedFvsPatchField::slicedFvsPatchField
slicedFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &, const Field< Type > &)
Construct from patch, internal field and field to slice.
Definition: slicedFvsPatchField.C:37
Foam::UList< Type >
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::UList::operator=
void operator=(const T &)
Assignment of all entries to the given value.
Definition: UList.C:70
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51