BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / finiteVolume / fields / fvsPatchFields / basic / sliced / slicedFvsPatchField.H
blob6ca5b373ad2a89261b9667801a46f87df6c86e46
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
13     the Free Software Foundation, either version 3 of the License, or
14     (at your 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
19     for more details.
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/>.
24 Class
25     Foam::slicedFvsPatchField
27 Description
28     Specialization of fvsPatchField which creates the underlying
29     fvsPatchField as a slice of the given complete field.
31     The destructor is wrapped to avoid deallocation of the storage of the
32     complete fields when this is destroyed.
34     Should only used as a template argument for SlicedGeometricField.
36 SourceFiles
37     slicedFvsPatchField.C
39 \*---------------------------------------------------------------------------*/
41 #ifndef slicedFvsPatchField_H
42 #define slicedFvsPatchField_H
44 #include "fvsPatchField.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 namespace Foam
51 /*---------------------------------------------------------------------------*\
52                            Class slicedFvsPatch Declaration
53 \*---------------------------------------------------------------------------*/
55 template<class Type>
56 class slicedFvsPatchField
58     public fvsPatchField<Type>
61 public:
63     //- Runtime type information
64     TypeName("sliced");
67     // Constructors
69         //- Construct from patch, internal field and field to slice
70         slicedFvsPatchField
71         (
72             const fvPatch&,
73             const DimensionedField<Type, surfaceMesh>&,
74             const Field<Type>&
75         );
77         //- Construct from patch and internal field
78         slicedFvsPatchField
79         (
80             const fvPatch&,
81             const DimensionedField<Type, surfaceMesh>&
82         );
84         //- Construct from patch, internal field and dictionary
85         slicedFvsPatchField
86         (
87             const fvPatch&,
88             const DimensionedField<Type, surfaceMesh>&,
89             const dictionary&
90         );
92         //- Construct by mapping the given slicedFvsPatchField<Type>
93         //  onto a new patch
94         slicedFvsPatchField
95         (
96             const slicedFvsPatchField<Type>&,
97             const fvPatch&,
98             const DimensionedField<Type, surfaceMesh>&,
99             const fvPatchFieldMapper&
100         );
102         //- Construct as copy
103         slicedFvsPatchField(const slicedFvsPatchField<Type>&);
105         //- Construct and return a clone
106         virtual tmp<fvsPatchField<Type> > clone() const;
108         //- Construct as copy setting internal field reference
109         slicedFvsPatchField
110         (
111             const slicedFvsPatchField<Type>&,
112             const DimensionedField<Type, surfaceMesh>&
113         );
115         //- Construct and return a clone setting internal field reference
116         virtual tmp<fvsPatchField<Type> > clone
117         (
118             const DimensionedField<Type, surfaceMesh>& iF
119         ) const;
122     //- Destructor
123     virtual ~slicedFvsPatchField<Type>();
126     // Member functions
128         // Access
130             //- Return true if this patch field fixes a value.
131             //  Needed to check if a level has to be specified while solving
132             //  Poissons equations.
133             virtual bool fixesValue() const
134             {
135                 return true;
136             }
139         //- Write
140         virtual void write(Ostream&) const;
143     // Member operators
145         virtual void operator=(const UList<Type>&) {}
147         virtual void operator=(const fvsPatchField<Type>&) {}
148         virtual void operator+=(const fvsPatchField<Type>&) {}
149         virtual void operator-=(const fvsPatchField<Type>&) {}
150         virtual void operator*=(const fvsPatchField<scalar>&) {}
151         virtual void operator/=(const fvsPatchField<scalar>&) {}
153         virtual void operator+=(const Field<Type>&) {}
154         virtual void operator-=(const Field<Type>&) {}
156         virtual void operator*=(const Field<scalar>&) {}
157         virtual void operator/=(const Field<scalar>&) {}
159         virtual void operator=(const Type&) {}
160         virtual void operator+=(const Type&) {}
161         virtual void operator-=(const Type&) {}
162         virtual void operator*=(const scalar) {}
163         virtual void operator/=(const scalar) {}
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 } // End namespace Foam
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 #ifdef NoRepository
174 #   include "slicedFvsPatchField.C"
175 #endif
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 #endif
181 // ************************************************************************* //