initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvPatchFields / derived / surfaceNormalFixedValue / surfaceNormalFixedValueFvPatchVectorField.C
blob94d55e07857ae6b439c4f6fc1c8f48f434dc4261
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 "surfaceNormalFixedValueFvPatchVectorField.H"
28 #include "addToRunTimeSelectionTable.H"
29 #include "volFields.H"
30 #include "fvPatchFieldMapper.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace Foam
37 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
39 surfaceNormalFixedValueFvPatchVectorField::
40 surfaceNormalFixedValueFvPatchVectorField
42     const fvPatch& p,
43     const DimensionedField<vector, volMesh>& iF
46     fixedValueFvPatchVectorField(p, iF),
47     refValue_(p.size())
51 surfaceNormalFixedValueFvPatchVectorField::
52 surfaceNormalFixedValueFvPatchVectorField
54     const surfaceNormalFixedValueFvPatchVectorField& ptf,
55     const fvPatch& p,
56     const DimensionedField<vector, volMesh>& iF,
57     const fvPatchFieldMapper& mapper
60     fixedValueFvPatchVectorField(p, iF),
61     refValue_(ptf.refValue_, mapper)
63     fvPatchVectorField::operator=(refValue_*patch().nf());
67 surfaceNormalFixedValueFvPatchVectorField::
68 surfaceNormalFixedValueFvPatchVectorField
70     const fvPatch& p,
71     const DimensionedField<vector, volMesh>& iF,
72     const dictionary& dict
75     fixedValueFvPatchVectorField(p, iF),
76     refValue_("refValue", dict, p.size())
78     fvPatchVectorField::operator=(refValue_*patch().nf());
82 surfaceNormalFixedValueFvPatchVectorField::
83 surfaceNormalFixedValueFvPatchVectorField
85     const surfaceNormalFixedValueFvPatchVectorField& pivpvf
88     fixedValueFvPatchVectorField(pivpvf),
89     refValue_(pivpvf.refValue_)
93 surfaceNormalFixedValueFvPatchVectorField::
94 surfaceNormalFixedValueFvPatchVectorField
96     const surfaceNormalFixedValueFvPatchVectorField& pivpvf,
97     const DimensionedField<vector, volMesh>& iF
100     fixedValueFvPatchVectorField(pivpvf, iF),
101     refValue_(pivpvf.refValue_)
105 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
107 void surfaceNormalFixedValueFvPatchVectorField::autoMap
109     const fvPatchFieldMapper& m
112     fixedValueFvPatchVectorField::autoMap(m);
113     refValue_.autoMap(m);
117 void surfaceNormalFixedValueFvPatchVectorField::rmap
119     const fvPatchVectorField& ptf,
120     const labelList& addr
123     fixedValueFvPatchVectorField::rmap(ptf, addr);
125     const surfaceNormalFixedValueFvPatchVectorField& tiptf =
126         refCast<const surfaceNormalFixedValueFvPatchVectorField>(ptf);
128     refValue_.rmap(tiptf.refValue_, addr);
132 void surfaceNormalFixedValueFvPatchVectorField::write(Ostream& os) const
134     fvPatchVectorField::write(os);
135     refValue_.writeEntry("refValue", os);
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 makePatchTypeField
143     fvPatchVectorField,
144     surfaceNormalFixedValueFvPatchVectorField
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace Foam
152 // ************************************************************************* //