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

uniformFixedValueFvPatchField.C

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 \*---------------------------------------------------------------------------*/
00025 
00026 #include <finiteVolume/uniformFixedValueFvPatchField.H>
00027 
00028 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00029 
00030 namespace Foam
00031 {
00032 
00033 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00034 
00035 template<class Type>
00036 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
00037 (
00038     const fvPatch& p,
00039     const DimensionedField<Type, volMesh>& iF
00040 )
00041 :
00042     fixedValueFvPatchField<Type>(p, iF),
00043     uniformValue_(pTraits<Type>::zero)
00044 {}
00045 
00046 
00047 template<class Type>
00048 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
00049 (
00050     const uniformFixedValueFvPatchField<Type>& ptf,
00051     const fvPatch& p,
00052     const DimensionedField<Type, volMesh>& iF,
00053     const fvPatchFieldMapper&
00054 )
00055 :
00056     fixedValueFvPatchField<Type>(p, iF),
00057     uniformValue_(ptf.uniformValue_)
00058 {
00059     fvPatchField<Type>::operator==(uniformValue_);
00060 }
00061 
00062 
00063 template<class Type>
00064 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
00065 (
00066     const fvPatch& p,
00067     const DimensionedField<Type, volMesh>& iF,
00068     const dictionary& dict
00069 )
00070 :
00071     fixedValueFvPatchField<Type>(p, iF),
00072     uniformValue_(pTraits<Type>(dict.lookup("uniformValue")))
00073 {
00074     fvPatchField<Type>::operator==(uniformValue_);
00075 }
00076 
00077 
00078 template<class Type>
00079 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
00080 (
00081     const uniformFixedValueFvPatchField<Type>& ptf
00082 )
00083 :
00084     fixedValueFvPatchField<Type>(ptf),
00085     uniformValue_(ptf.uniformValue_)
00086 {
00087     fvPatchField<Type>::operator==(uniformValue_);
00088 }
00089 
00090 
00091 template<class Type>
00092 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
00093 (
00094     const uniformFixedValueFvPatchField<Type>& ptf,
00095     const DimensionedField<Type, volMesh>& iF
00096 )
00097 :
00098     fixedValueFvPatchField<Type>(ptf, iF),
00099     uniformValue_(ptf.uniformValue_)
00100 {
00101     fvPatchField<Type>::operator==(uniformValue_);
00102 }
00103 
00104 
00105 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00106 
00107 template<class Type>
00108 void uniformFixedValueFvPatchField<Type>::autoMap
00109 (
00110     const fvPatchFieldMapper& m
00111 )
00112 {
00113     this->setSize(m.size());
00114     fvPatchField<Type>::operator==(uniformValue_);
00115 }
00116 
00117 
00118 template<class Type>
00119 void uniformFixedValueFvPatchField<Type>::write(Ostream& os) const
00120 {
00121     fvPatchField<Type>::write(os);
00122     os.writeKeyword("uniformValue")
00123         << uniformValue_ << token::END_STATEMENT << nl;
00124 }
00125 
00126 
00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00128 
00129 } // End namespace Foam
00130 
00131 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines