1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "surfaceNormalFixedValueFvPatchVectorField.H"
27 #include "addToRunTimeSelectionTable.H"
28 #include "volFields.H"
29 #include "fvPatchFieldMapper.H"
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
33 Foam::surfaceNormalFixedValueFvPatchVectorField::
34 surfaceNormalFixedValueFvPatchVectorField
37 const DimensionedField<vector, volMesh>& iF
40 fixedValueFvPatchVectorField(p, iF),
45 Foam::surfaceNormalFixedValueFvPatchVectorField::
46 surfaceNormalFixedValueFvPatchVectorField
48 const surfaceNormalFixedValueFvPatchVectorField& ptf,
50 const DimensionedField<vector, volMesh>& iF,
51 const fvPatchFieldMapper& mapper
54 fixedValueFvPatchVectorField(p, iF),
55 refValue_(ptf.refValue_, mapper)
57 fvPatchVectorField::operator=(refValue_*patch().nf());
61 Foam::surfaceNormalFixedValueFvPatchVectorField::
62 surfaceNormalFixedValueFvPatchVectorField
65 const DimensionedField<vector, volMesh>& iF,
66 const dictionary& dict
69 fixedValueFvPatchVectorField(p, iF),
70 refValue_("refValue", dict, p.size())
72 fvPatchVectorField::operator=(refValue_*patch().nf());
76 Foam::surfaceNormalFixedValueFvPatchVectorField::
77 surfaceNormalFixedValueFvPatchVectorField
79 const surfaceNormalFixedValueFvPatchVectorField& pivpvf
82 fixedValueFvPatchVectorField(pivpvf),
83 refValue_(pivpvf.refValue_)
87 Foam::surfaceNormalFixedValueFvPatchVectorField::
88 surfaceNormalFixedValueFvPatchVectorField
90 const surfaceNormalFixedValueFvPatchVectorField& pivpvf,
91 const DimensionedField<vector, volMesh>& iF
94 fixedValueFvPatchVectorField(pivpvf, iF),
95 refValue_(pivpvf.refValue_)
99 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
101 void Foam::surfaceNormalFixedValueFvPatchVectorField::autoMap
103 const fvPatchFieldMapper& m
106 fixedValueFvPatchVectorField::autoMap(m);
107 refValue_.autoMap(m);
111 void Foam::surfaceNormalFixedValueFvPatchVectorField::rmap
113 const fvPatchVectorField& ptf,
114 const labelList& addr
117 fixedValueFvPatchVectorField::rmap(ptf, addr);
119 const surfaceNormalFixedValueFvPatchVectorField& tiptf =
120 refCast<const surfaceNormalFixedValueFvPatchVectorField>(ptf);
122 refValue_.rmap(tiptf.refValue_, addr);
126 void Foam::surfaceNormalFixedValueFvPatchVectorField::write(Ostream& os) const
128 fvPatchVectorField::write(os);
129 refValue_.writeEntry("refValue", os);
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 surfaceNormalFixedValueFvPatchVectorField
144 // ************************************************************************* //