1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::slicedFvsPatchField
29 Specialization of fvsPatchField which creates the underlying
30 fvsPatchField as a slice of the given complete field.
32 The destructor is wrapped to avoid deallocation of the storage of the
33 complete fields when this is destroyed.
35 Should only used as a template argument for SlicedGeometricField.
40 \*---------------------------------------------------------------------------*/
42 #ifndef slicedFvsPatchField_H
43 #define slicedFvsPatchField_H
45 #include "fvsPatchField.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class slicedFvsPatch Declaration
54 \*---------------------------------------------------------------------------*/
57 class slicedFvsPatchField
59 public fvsPatchField<Type>
64 //- Runtime type information
70 //- Construct from patch, internal field and field to slice
74 const DimensionedField<Type, surfaceMesh>&,
78 //- Construct from patch and internal field
82 const DimensionedField<Type, surfaceMesh>&
85 //- Construct from patch, internal field and dictionary
89 const DimensionedField<Type, surfaceMesh>&,
93 //- Construct by mapping the given slicedFvsPatchField<Type>
97 const slicedFvsPatchField<Type>&,
99 const DimensionedField<Type, surfaceMesh>&,
100 const fvPatchFieldMapper&
103 //- Construct as copy
104 slicedFvsPatchField(const slicedFvsPatchField<Type>&);
106 //- Construct and return a clone
107 virtual tmp<fvsPatchField<Type> > clone() const;
109 //- Construct as copy setting internal field reference
112 const slicedFvsPatchField<Type>&,
113 const DimensionedField<Type, surfaceMesh>&
116 //- Construct and return a clone setting internal field reference
117 virtual tmp<fvsPatchField<Type> > clone
119 const DimensionedField<Type, surfaceMesh>& iF
125 virtual ~slicedFvsPatchField<Type>();
132 //- Return true if this patch field fixes a value.
133 // Needed to check if a level has to be specified while solving
134 // Poissons equations.
135 virtual bool fixesValue() const
142 virtual void write(Ostream&) const;
147 virtual void operator=(const UList<Type>&) {}
149 virtual void operator=(const fvsPatchField<Type>&) {}
150 virtual void operator+=(const fvsPatchField<Type>&) {}
151 virtual void operator-=(const fvsPatchField<Type>&) {}
152 virtual void operator*=(const fvsPatchField<scalar>&) {}
153 virtual void operator/=(const fvsPatchField<scalar>&) {}
155 virtual void operator+=(const Field<Type>&) {}
156 virtual void operator-=(const Field<Type>&) {}
158 virtual void operator*=(const Field<scalar>&) {}
159 virtual void operator/=(const Field<scalar>&) {}
161 virtual void operator=(const Type&) {}
162 virtual void operator+=(const Type&) {}
163 virtual void operator-=(const Type&) {}
164 virtual void operator*=(const scalar) {}
165 virtual void operator/=(const scalar) {}
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 } // End namespace Foam
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 # include "slicedFvsPatchField.C"
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 // ************************************************************************* //