OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

directMappedFixedValueFvPatchField.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-2007 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00024 
00025 Class
00026     directMappedFixedValueFvPatchField
00027 
00028 Description
00029     Recycles the value at a set of internal faces back to *this.
00030 
00031 SourceFiles
00032     directMappedFixedValueFvPatchField.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef directMappedFixedValueFvPatchField_H
00037 #define directMappedFixedValueFvPatchField_H
00038 
00039 #include "fixedValueFvPatchFields.H"
00040 #include "directMappedFvPatch.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048               Class directMappedFixedValueFvPatch Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 template<class Type>
00052 class directMappedFixedValueFvPatchField
00053 :
00054     public fixedValueFvPatchField<Type>
00055 {
00056     // Private data
00057 
00058         //- If true adjust the mapped field to maintain average value average_
00059         bool setAverage_;
00060 
00061         //- Average value the mapped field is adjusted to maintain if
00062         //  setAverage_ is set true
00063         Type average_;
00064 
00065 
00066 public:
00067 
00068     //- Runtime type information
00069     TypeName("directMapped");
00070 
00071 
00072     // Constructors
00073 
00074         //- Construct from patch and internal field
00075         directMappedFixedValueFvPatchField
00076         (
00077             const fvPatch&,
00078             const DimensionedField<Type, volMesh>&
00079         );
00080 
00081         //- Construct from patch, internal field and dictionary
00082         directMappedFixedValueFvPatchField
00083         (
00084             const fvPatch&,
00085             const DimensionedField<Type, volMesh>&,
00086             const dictionary&
00087         );
00088 
00089         //- Construct by mapping given directMappedFixedValueFvPatchField
00090         //  onto a new patch
00091         directMappedFixedValueFvPatchField
00092         (
00093             const directMappedFixedValueFvPatchField<Type>&,
00094             const fvPatch&,
00095             const DimensionedField<Type, volMesh>&,
00096             const fvPatchFieldMapper&
00097         );
00098 
00099         //- Construct as copy
00100         directMappedFixedValueFvPatchField
00101         (
00102             const directMappedFixedValueFvPatchField<Type>&
00103         );
00104 
00105         //- Construct and return a clone
00106         virtual tmp<fvPatchField<Type> > clone() const
00107         {
00108             return tmp<fvPatchField<Type> >
00109             (
00110                 new directMappedFixedValueFvPatchField<Type>(*this)
00111             );
00112         }
00113 
00114         //- Construct as copy setting internal field reference
00115         directMappedFixedValueFvPatchField
00116         (
00117             const directMappedFixedValueFvPatchField<Type>&,
00118             const DimensionedField<Type, volMesh>&
00119         );
00120 
00121         //- Construct and return a clone setting internal field reference
00122         virtual tmp<fvPatchField<Type> > clone
00123         (
00124             const DimensionedField<Type, volMesh>& iF
00125         ) const
00126         {
00127             return tmp<fvPatchField<Type> >
00128             (
00129                 new directMappedFixedValueFvPatchField<Type>(*this, iF)
00130             );
00131         }
00132 
00133 
00134     // Member functions
00135 
00136         // Evaluation functions
00137 
00138             //- Update the coefficients associated with the patch field
00139             virtual void updateCoeffs();
00140 
00141         //- Write
00142         virtual void write(Ostream&) const;
00143 };
00144 
00145 
00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00147 
00148 } // End namespace Foam
00149 
00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00151 
00152 #ifdef NoRepository
00153 #   include "directMappedFixedValueFvPatchField.C"
00154 #endif
00155 
00156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00157 
00158 #endif
00159 
00160 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd