Loading...
Searching...
No Matches
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
37(
38 const faPatch& p,
41:
42 fixedValueFaPatchVectorField(p, iF),
43 refValue_(p.size(), Zero)
44{}
45
46
49(
50 const faPatch& p,
52 const scalar refValue
54:
55 fixedValueFaPatchVectorField(p, iF),
56 refValue_(p.size(), refValue)
57{}
58
59
62(
64 const faPatch& p,
66 const faPatchFieldMapper& mapper
68:
69 fixedValueFaPatchVectorField(ptf, p, iF, mapper),
70 refValue_(ptf.refValue_, mapper)
71{}
72
73
76(
77 const faPatch& p,
79 const dictionary& dict
80)
81:
82 fixedValueFaPatchVectorField(p, iF, dict, IOobjectOption::NO_READ),
83 refValue_("refValue", dict, p.size())
93(
96:
97 fixedValueFaPatchVectorField(pivpvf),
98 refValue_(pivpvf.refValue_)
99{}
100
101
104(
107)
108:
109 fixedValueFaPatchVectorField(pivpvf, iF),
110 refValue_(pivpvf.refValue_)
111{}
112
113
114// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
115
117(
118 const faPatchFieldMapper& m
120{
121 fixedValueFaPatchVectorField::autoMap(m);
122 refValue_.autoMap(m);
123}
124
125
127(
128 const faPatchVectorField& ptf,
129 const labelList& addr
130)
131{
132 fixedValueFaPatchVectorField::rmap(ptf, addr);
133
136
137 refValue_.rmap(tiptf.refValue_, addr);
138}
139
140
142{
143 if (updated())
144 {
145 return;
146 }
147
148 tmp<vectorField> tvalues(refValue_*patch().edgeNormals());
149
152}
153
154
156{
158 refValue_.writeEntry("refValue", os);
160
161
162// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
163
164namespace Foam
165{
167 (
169 edgeNormalFixedValueFaPatchVectorField
170 );
171}
172
173
174// ************************************************************************* //
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...
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Edge normal fixed value vector field finite area boundary condition.
edgeNormalFixedValueFaPatchVectorField(const faPatch &, const DimensionedField< vector, areaMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write includes "value" entry.
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.
virtual void operator=(const UList< vector > &)
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition faPatch.H:76
virtual void write(Ostream &) const
Write.
A class for managing temporary objects.
Definition tmp.H:75
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
#define makeFaPatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete faPatchField type and add to run-time tables Example, (faPatchScalarField,...
Namespace for OpenFOAM.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
Definition typeInfo.H:172
List< label > labelList
A List of labels.
Definition List.H:62
faPatchField< vector > faPatchVectorField
static constexpr const zero Zero
Global zero (0).
Definition zero.H:127
dictionary dict