OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

genericFvPatchField.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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::genericFvPatchField
00027 
00028 Description
00029     Foam::genericFvPatchField
00030 
00031 SourceFiles
00032     genericFvPatchField.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef genericFvPatchField_H
00037 #define genericFvPatchField_H
00038 
00039 #include "calculatedFvPatchField.H"
00040 #include "HashPtrTable.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                       Class genericFvPatch Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 template<class Type>
00052 class genericFvPatchField
00053 :
00054     public calculatedFvPatchField<Type>
00055 {
00056     // Private data
00057 
00058         word actualTypeName_;
00059         dictionary dict_;
00060 
00061         HashPtrTable<scalarField> scalarFields_;
00062         HashPtrTable<vectorField> vectorFields_;
00063         HashPtrTable<sphericalTensorField> sphericalTensorFields_;
00064         HashPtrTable<symmTensorField> symmTensorFields_;
00065         HashPtrTable<tensorField> tensorFields_;
00066 
00067 
00068 public:
00069 
00070     //- Runtime type information
00071     TypeName("generic");
00072 
00073 
00074     // Constructors
00075 
00076         //- Construct from patch and internal field
00077         genericFvPatchField
00078         (
00079             const fvPatch&,
00080             const DimensionedField<Type, volMesh>&
00081         );
00082 
00083         //- Construct from patch, internal field and dictionary
00084         genericFvPatchField
00085         (
00086             const fvPatch&,
00087             const DimensionedField<Type, volMesh>&,
00088             const dictionary&
00089         );
00090 
00091         //- Construct by mapping given patchField<Type> onto a new patch
00092         genericFvPatchField
00093         (
00094             const genericFvPatchField<Type>&,
00095             const fvPatch&,
00096             const DimensionedField<Type, volMesh>&,
00097             const fvPatchFieldMapper&
00098         );
00099 
00100         //- Construct as copy
00101         genericFvPatchField
00102         (
00103             const genericFvPatchField<Type>&
00104         );
00105 
00106         //- Construct and return a clone
00107         virtual tmp<fvPatchField<Type> > clone() const
00108         {
00109             return tmp<fvPatchField<Type> >
00110             (
00111                 new genericFvPatchField<Type>(*this)
00112             );
00113         }
00114 
00115         //- Construct as copy setting internal field reference
00116         genericFvPatchField
00117         (
00118             const genericFvPatchField<Type>&,
00119             const DimensionedField<Type, volMesh>&
00120         );
00121 
00122         //- Construct and return a clone setting internal field reference
00123         virtual tmp<fvPatchField<Type> > clone
00124         (
00125             const DimensionedField<Type, volMesh>& iF
00126         ) const
00127         {
00128             return tmp<fvPatchField<Type> >
00129             (
00130                 new genericFvPatchField<Type>(*this, iF)
00131             );
00132         }
00133 
00134 
00135     // Member functions
00136 
00137         // Mapping functions
00138 
00139             //- Map (and resize as needed) from self given a mapping object
00140             virtual void autoMap
00141             (
00142                 const fvPatchFieldMapper&
00143             );
00144 
00145             //- Reverse map the given fvPatchField onto this fvPatchField
00146             virtual void rmap
00147             (
00148                 const fvPatchField<Type>&,
00149                 const labelList&
00150             );
00151 
00152 
00153         // Evaluation functions
00154 
00155             //- Return the matrix diagonal coefficients corresponding to the
00156             //  evaluation of the value of this patchField with given weights
00157             virtual tmp<Field<Type> > valueInternalCoeffs
00158             (
00159                 const tmp<scalarField>&
00160             ) const;
00161 
00162             //- Return the matrix source coefficients corresponding to the
00163             //  evaluation of the value of this patchField with given weights
00164             virtual tmp<Field<Type> > valueBoundaryCoeffs
00165             (
00166                 const tmp<scalarField>&
00167             ) const;
00168 
00169             //- Return the matrix diagonal coefficients corresponding to the
00170             //  evaluation of the gradient of this patchField
00171             tmp<Field<Type> > gradientInternalCoeffs() const;
00172 
00173             //- Return the matrix source coefficients corresponding to the
00174             //  evaluation of the gradient of this patchField
00175             tmp<Field<Type> > gradientBoundaryCoeffs() const;
00176 
00177 
00178         //- Write
00179         virtual void write(Ostream&) const;
00180 };
00181 
00182 
00183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00184 
00185 } // End namespace Foam
00186 
00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00188 
00189 #ifdef NoRepository
00190 #   include "genericFvPatchField.C"
00191 #endif
00192 
00193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00194 
00195 #endif
00196 
00197 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd