ensightPart.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) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2016-2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "ensightPart.H"
30
31// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32
33namespace Foam
34{
36}
37
38
39// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
40
42{
43 for (label& val : address_)
44 {
45 val += off;
46 }
47}
48
49
51{
52 for (label& val : address_)
53 {
54 val -= off;
55 }
56}
57
58
59// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
60
62:
63 index_(0),
64 identifier_(-1),
65 name_(),
66 address_()
67{}
68
69
70Foam::ensightPart::ensightPart(const string& description)
71:
73{
74 if (!description.empty())
75 {
76 name_ = description;
77 }
78}
79
80
81// ************************************************************************* //
Base class for ensightCells, ensightFaces, ensightOutputSurfaces.
Definition: ensightPart.H:54
void incrAddressing(const label off)
Increase addressing by specified offset value.
Definition: ensightPart.C:41
ensightPart()
Default construct. Index=0, identifier = -1.
Definition: ensightPart.C:61
void decrAddressing(const label off)
Decrease addressing by specified offset value.
Definition: ensightPart.C:50
#define defineTypeName(Type)
Define the typeName.
Definition: className.H:96
Namespace for OpenFOAM.