FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

slicedFvsPatchField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::slicedFvsPatchField
00026 
00027 Description
00028     Specialization of fvsPatchField which creates the underlying
00029     fvsPatchField as a slice of the given complete field.
00030 
00031     The destructor is wrapped to avoid deallocation of the storage of the
00032     complete fields when this is destroyed.
00033 
00034     Should only used as a template argument for SlicedGeometricField.
00035 
00036 SourceFiles
00037     slicedFvsPatchField.C
00038 
00039 \*---------------------------------------------------------------------------*/
00040 
00041 #ifndef slicedFvsPatchField_H
00042 #define slicedFvsPatchField_H
00043 
00044 #include <finiteVolume/fvsPatchField.H>
00045 
00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00047 
00048 namespace Foam
00049 {
00050 
00051 /*---------------------------------------------------------------------------*\
00052                            Class slicedFvsPatch Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 template<class Type>
00056 class slicedFvsPatchField
00057 :
00058     public fvsPatchField<Type>
00059 {
00060 
00061 public:
00062 
00063     //- Runtime type information
00064     TypeName("sliced");
00065 
00066 
00067     // Constructors
00068 
00069         //- Construct from patch, internal field and field to slice
00070         slicedFvsPatchField
00071         (
00072             const fvPatch&,
00073             const DimensionedField<Type, surfaceMesh>&,
00074             const Field<Type>&
00075         );
00076 
00077         //- Construct from patch and internal field
00078         slicedFvsPatchField
00079         (
00080             const fvPatch&,
00081             const DimensionedField<Type, surfaceMesh>&
00082         );
00083 
00084         //- Construct from patch, internal field and dictionary
00085         slicedFvsPatchField
00086         (
00087             const fvPatch&,
00088             const DimensionedField<Type, surfaceMesh>&,
00089             const dictionary&
00090         );
00091 
00092         //- Construct by mapping the given slicedFvsPatchField<Type>
00093         //  onto a new patch
00094         slicedFvsPatchField
00095         (
00096             const slicedFvsPatchField<Type>&,
00097             const fvPatch&,
00098             const DimensionedField<Type, surfaceMesh>&,
00099             const fvPatchFieldMapper&
00100         );
00101 
00102         //- Construct as copy
00103         slicedFvsPatchField(const slicedFvsPatchField<Type>&);
00104 
00105         //- Construct and return a clone
00106         virtual tmp<fvsPatchField<Type> > clone() const;
00107 
00108         //- Construct as copy setting internal field reference
00109         slicedFvsPatchField
00110         (
00111             const slicedFvsPatchField<Type>&,
00112             const DimensionedField<Type, surfaceMesh>&
00113         );
00114 
00115         //- Construct and return a clone setting internal field reference
00116         virtual tmp<fvsPatchField<Type> > clone
00117         (
00118             const DimensionedField<Type, surfaceMesh>& iF
00119         ) const;
00120 
00121 
00122     // Destructor
00123 
00124         virtual ~slicedFvsPatchField<Type>();
00125 
00126 
00127     // Member functions
00128 
00129         // Access
00130 
00131             //- Return true if this patch field fixes a value.
00132             //  Needed to check if a level has to be specified while solving
00133             //  Poissons equations.
00134             virtual bool fixesValue() const
00135             {
00136                 return true;
00137             }
00138 
00139 
00140         //- Write
00141         virtual void write(Ostream&) const;
00142 
00143 
00144     // Member operators
00145 
00146         virtual void operator=(const UList<Type>&) {}
00147 
00148         virtual void operator=(const fvsPatchField<Type>&) {}
00149         virtual void operator+=(const fvsPatchField<Type>&) {}
00150         virtual void operator-=(const fvsPatchField<Type>&) {}
00151         virtual void operator*=(const fvsPatchField<scalar>&) {}
00152         virtual void operator/=(const fvsPatchField<scalar>&) {}
00153 
00154         virtual void operator+=(const Field<Type>&) {}
00155         virtual void operator-=(const Field<Type>&) {}
00156 
00157         virtual void operator*=(const Field<scalar>&) {}
00158         virtual void operator/=(const Field<scalar>&) {}
00159 
00160         virtual void operator=(const Type&) {}
00161         virtual void operator+=(const Type&) {}
00162         virtual void operator-=(const Type&) {}
00163         virtual void operator*=(const scalar) {}
00164         virtual void operator/=(const scalar) {}
00165 };
00166 
00167 
00168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00169 
00170 } // End namespace Foam
00171 
00172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00173 
00174 #ifdef NoRepository
00175 #   include <finiteVolume/slicedFvsPatchField.C>
00176 #endif
00177 
00178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00179 
00180 #endif
00181 
00182 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines