edgeNormalFixedValueFaPatchVectorField.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2016-2017 Wikki Ltd
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
30#include "areaFields.H"
31#include "faPatchFieldMapper.H"
32
33// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
34
35Foam::edgeNormalFixedValueFaPatchVectorField::
36edgeNormalFixedValueFaPatchVectorField
37(
38 const faPatch& p,
40)
41:
42 fixedValueFaPatchVectorField(p, iF),
43 refValue_(p.size(), 0)
44{}
45
46
47Foam::edgeNormalFixedValueFaPatchVectorField::
48edgeNormalFixedValueFaPatchVectorField
49(
51 const faPatch& p,
53 const faPatchFieldMapper& mapper
54)
55:
56 fixedValueFaPatchVectorField(ptf, p, iF, mapper),
57 refValue_(ptf.refValue_, mapper)
58{}
59
60
61Foam::edgeNormalFixedValueFaPatchVectorField::
62edgeNormalFixedValueFaPatchVectorField
63(
64 const faPatch& p,
66 const dictionary& dict
67)
68:
69 fixedValueFaPatchVectorField(p, iF, dict),
70 refValue_("refValue", dict, p.size())
71{}
72
73
74Foam::edgeNormalFixedValueFaPatchVectorField::
75edgeNormalFixedValueFaPatchVectorField
76(
78)
79:
80 fixedValueFaPatchVectorField(pivpvf),
81 refValue_(pivpvf.refValue_)
82{}
83
84
85Foam::edgeNormalFixedValueFaPatchVectorField::
86edgeNormalFixedValueFaPatchVectorField
87(
90)
91:
92 fixedValueFaPatchVectorField(pivpvf, iF),
93 refValue_(pivpvf.refValue_)
94{}
95
96
97// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
98
100(
101 const faPatchFieldMapper& m
102)
103{
104 fixedValueFaPatchVectorField::autoMap(m);
105 refValue_.autoMap(m);
106}
107
108
110(
111 const faPatchVectorField& ptf,
112 const labelList& addr
113)
114{
115 fixedValueFaPatchVectorField::rmap(ptf, addr);
116
118 refCast<const edgeNormalFixedValueFaPatchVectorField>(ptf);
119
120 refValue_.rmap(tiptf.refValue_, addr);
121}
122
123
125{
126 if (updated())
127 {
128 return;
129 }
130
131 operator==(refValue_*patch().edgeNormals());
132}
133
134
136{
137 fixedValueFaPatchVectorField::write(os);
138 refValue_.writeEntry("refValue", os);
139}
140
141
142// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144namespace Foam
145{
146
148(
151);
152
153} // End namespace Foam
154
155
156// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Edge normal fixed value vector field finite area boundary condition.
virtual void rmap(const faPatchVectorField &, const labelList &)
Reverse map the given faPatchField onto this faPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void autoMap(const faPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A FieldMapper for finite-area patch fields.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:78
virtual bool write()
Write the output fields.
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
#define makeFaPatchTypeField(PatchTypeField, typePatchTypeField)
Definition: faPatchField.H:525
Namespace for OpenFOAM.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
dictionary dict