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

constantAlphaContactAngleFvPatchScalarField.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 "constantAlphaContactAngleFvPatchScalarField.H"
00027 #include <OpenFOAM/addToRunTimeSelectionTable.H>
00028 #include <finiteVolume/volMesh.H>
00029 #include <finiteVolume/fvPatchFieldMapper.H>
00030 
00031 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00032 
00033 Foam::constantAlphaContactAngleFvPatchScalarField::
00034 constantAlphaContactAngleFvPatchScalarField
00035 (
00036     const fvPatch& p,
00037     const DimensionedField<scalar, volMesh>& iF
00038 )
00039 :
00040     alphaContactAngleFvPatchScalarField(p, iF),
00041     theta0_(0.0)
00042 {}
00043 
00044 
00045 Foam::constantAlphaContactAngleFvPatchScalarField::
00046 constantAlphaContactAngleFvPatchScalarField
00047 (
00048     const constantAlphaContactAngleFvPatchScalarField& gcpsf,
00049     const fvPatch& p,
00050     const DimensionedField<scalar, volMesh>& iF,
00051     const fvPatchFieldMapper& mapper
00052 )
00053 :
00054     alphaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper),
00055     theta0_(gcpsf.theta0_)
00056 {}
00057 
00058 
00059 Foam::constantAlphaContactAngleFvPatchScalarField::
00060 constantAlphaContactAngleFvPatchScalarField
00061 (
00062     const fvPatch& p,
00063     const DimensionedField<scalar, volMesh>& iF,
00064     const dictionary& dict
00065 )
00066 :
00067     alphaContactAngleFvPatchScalarField(p, iF, dict),
00068     theta0_(readScalar(dict.lookup("theta0")))
00069 {
00070     evaluate();
00071 }
00072 
00073 
00074 Foam::constantAlphaContactAngleFvPatchScalarField::
00075 constantAlphaContactAngleFvPatchScalarField
00076 (
00077     const constantAlphaContactAngleFvPatchScalarField& gcpsf
00078 )
00079 :
00080     alphaContactAngleFvPatchScalarField(gcpsf),
00081     theta0_(gcpsf.theta0_)
00082 {}
00083 
00084 
00085 Foam::constantAlphaContactAngleFvPatchScalarField::
00086 constantAlphaContactAngleFvPatchScalarField
00087 (
00088     const constantAlphaContactAngleFvPatchScalarField& gcpsf,
00089     const DimensionedField<scalar, volMesh>& iF
00090 )
00091 :
00092     alphaContactAngleFvPatchScalarField(gcpsf, iF),
00093     theta0_(gcpsf.theta0_)
00094 {}
00095 
00096 
00097 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00098 
00099 Foam::tmp<Foam::scalarField>
00100 Foam::constantAlphaContactAngleFvPatchScalarField::theta
00101 (
00102     const fvPatchVectorField&,
00103     const fvsPatchVectorField&
00104 ) const
00105 {
00106     return tmp<scalarField>(new scalarField(size(), theta0_));
00107 }
00108 
00109 
00110 void Foam::constantAlphaContactAngleFvPatchScalarField::write
00111 (
00112     Ostream& os
00113 ) const
00114 {
00115     alphaContactAngleFvPatchScalarField::write(os);
00116     os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl;
00117     writeEntry("value", os);
00118 }
00119 
00120 
00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00122 
00123 namespace Foam
00124 {
00125     makePatchTypeField
00126     (
00127         fvPatchScalarField,
00128         constantAlphaContactAngleFvPatchScalarField
00129     );
00130 }
00131 
00132 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines