initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / transportModels / interfaceProperties / alphaContactAngle / constantAlphaContactAngle / constantAlphaContactAngleFvPatchScalarField.C
blob95a9b9b8209ceb9c67d391b8b30e39e965333772
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "constantAlphaContactAngleFvPatchScalarField.H"
28 #include "addToRunTimeSelectionTable.H"
29 #include "volMesh.H"
30 #include "fvPatchFieldMapper.H"
32 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
34 Foam::constantAlphaContactAngleFvPatchScalarField::
35 constantAlphaContactAngleFvPatchScalarField
37     const fvPatch& p,
38     const DimensionedField<scalar, volMesh>& iF
41     alphaContactAngleFvPatchScalarField(p, iF),
42     theta0_(0.0)
46 Foam::constantAlphaContactAngleFvPatchScalarField::
47 constantAlphaContactAngleFvPatchScalarField
49     const constantAlphaContactAngleFvPatchScalarField& gcpsf,
50     const fvPatch& p,
51     const DimensionedField<scalar, volMesh>& iF,
52     const fvPatchFieldMapper& mapper
55     alphaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper),
56     theta0_(gcpsf.theta0_)
60 Foam::constantAlphaContactAngleFvPatchScalarField::
61 constantAlphaContactAngleFvPatchScalarField
63     const fvPatch& p,
64     const DimensionedField<scalar, volMesh>& iF,
65     const dictionary& dict
68     alphaContactAngleFvPatchScalarField(p, iF),
69     theta0_(readScalar(dict.lookup("theta0")))
71     evaluate();
75 Foam::constantAlphaContactAngleFvPatchScalarField::
76 constantAlphaContactAngleFvPatchScalarField
78     const constantAlphaContactAngleFvPatchScalarField& gcpsf
81     alphaContactAngleFvPatchScalarField(gcpsf),
82     theta0_(gcpsf.theta0_)
86 Foam::constantAlphaContactAngleFvPatchScalarField::
87 constantAlphaContactAngleFvPatchScalarField
89     const constantAlphaContactAngleFvPatchScalarField& gcpsf,
90     const DimensionedField<scalar, volMesh>& iF
93     alphaContactAngleFvPatchScalarField(gcpsf, iF),
94     theta0_(gcpsf.theta0_)
98 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
100 Foam::tmp<Foam::scalarField>
101 Foam::constantAlphaContactAngleFvPatchScalarField::theta
103     const fvPatchVectorField&,
104     const fvsPatchVectorField&
105 ) const
107     return tmp<scalarField>(new scalarField(size(), theta0_));
111 void Foam::constantAlphaContactAngleFvPatchScalarField::write
113     Ostream& os
114 ) const
116     fvPatchScalarField::write(os);
117     os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl;
118     writeEntry("value", os);
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 namespace Foam
126     makePatchTypeField
127     (
128         fvPatchScalarField,
129         constantAlphaContactAngleFvPatchScalarField
130     );
133 // ************************************************************************* //