initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / transportModels / interfaceProperties / gammaContactAngle / constantGammaContactAngle / constantGammaContactAngleFvPatchScalarField.C
blobd13c0c0c058e1d992a5ce710c1779fe4e6dc60ef
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 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 "constantGammaContactAngleFvPatchScalarField.H"
28 #include "addToRunTimeSelectionTable.H"
29 #include "volMesh.H"
30 #include "fvPatchFieldMapper.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace Foam
37 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
39 constantGammaContactAngleFvPatchScalarField::
40 constantGammaContactAngleFvPatchScalarField
42     const fvPatch& p,
43     const DimensionedField<scalar, volMesh>& iF
46     gammaContactAngleFvPatchScalarField(p, iF),
47     theta0_(0.0)
51 constantGammaContactAngleFvPatchScalarField::
52 constantGammaContactAngleFvPatchScalarField
54     const constantGammaContactAngleFvPatchScalarField& gcpsf,
55     const fvPatch& p,
56     const DimensionedField<scalar, volMesh>& iF,
57     const fvPatchFieldMapper& mapper
60     gammaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper),
61     theta0_(gcpsf.theta0_)
65 constantGammaContactAngleFvPatchScalarField::
66 constantGammaContactAngleFvPatchScalarField
68     const fvPatch& p,
69     const DimensionedField<scalar, volMesh>& iF,
70     const dictionary& dict
73     gammaContactAngleFvPatchScalarField(p, iF),
74     theta0_(readScalar(dict.lookup("theta0")))
76     evaluate();
80 constantGammaContactAngleFvPatchScalarField::
81 constantGammaContactAngleFvPatchScalarField
83     const constantGammaContactAngleFvPatchScalarField& gcpsf
86     gammaContactAngleFvPatchScalarField(gcpsf),
87     theta0_(gcpsf.theta0_)
91 constantGammaContactAngleFvPatchScalarField::
92 constantGammaContactAngleFvPatchScalarField
94     const constantGammaContactAngleFvPatchScalarField& gcpsf,
95     const DimensionedField<scalar, volMesh>& iF
98     gammaContactAngleFvPatchScalarField(gcpsf, iF),
99     theta0_(gcpsf.theta0_)
103 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
105 tmp<scalarField> constantGammaContactAngleFvPatchScalarField::theta
107     const fvPatchVectorField&,
108     const fvsPatchVectorField&
109 ) const
111     return tmp<scalarField>(new scalarField(size(), theta0_));
115 void constantGammaContactAngleFvPatchScalarField::write(Ostream& os) const
117     fvPatchScalarField::write(os);
118     os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl;
119     writeEntry("value", os);
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 makePatchTypeField
127     fvPatchScalarField,
128     constantGammaContactAngleFvPatchScalarField
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // ************************************************************************* //