Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
lagrangian
basic
indexedParticle
indexedParticle.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
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.
15
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.
20
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/>.
23
24
Class
25
Foam::indexedParticle
26
27
Description
28
29
SourceFiles
30
indexedParticleI.H
31
indexedParticle.C
32
indexedParticleIO.C
33
34
\*---------------------------------------------------------------------------*/
35
36
#ifndef indexedParticle_H
37
#define indexedParticle_H
38
39
#include <
lagrangian/Particle.H
>
40
#include <
OpenFOAM/IOstream.H
>
41
#include <
OpenFOAM/autoPtr.H
>
42
43
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45
namespace
Foam
46
{
47
48
/*---------------------------------------------------------------------------*\
49
Class indexedParticle Declaration
50
\*---------------------------------------------------------------------------*/
51
52
class
indexedParticle
53
:
54
public
Particle
<indexedParticle>
55
{
56
// Private data
57
58
label index_;
59
60
61
public
:
62
63
// Constructors
64
65
//- Construct from components
66
indexedParticle
67
(
68
const
Cloud<indexedParticle>
& c,
69
const
vector
&
position
,
70
const
label celli,
71
const
label
index
= 0
72
)
73
:
74
Particle<indexedParticle>
(c,
position
, celli),
75
index_(
index
)
76
{}
77
78
//- Construct from Istream
79
indexedParticle
80
(
81
const
Cloud<indexedParticle>
& c,
82
Istream
& is,
83
bool
readFields
=
true
84
)
85
:
86
Particle<indexedParticle>
(c, is,
readFields
)
87
{}
88
89
//- Construct as a copy
90
indexedParticle
(
const
indexedParticle
&
p
)
91
:
92
Particle
<
indexedParticle
>(p)
93
{}
94
95
//- Construct and return a clone
96
autoPtr<indexedParticle>
clone
()
const
97
{
98
return
autoPtr<indexedParticle>
(
new
indexedParticle
(*
this
));
99
}
100
101
102
// Member functions
103
104
label
index
()
const
105
{
106
return
index_;
107
}
108
109
label&
index
()
110
{
111
return
index_;
112
}
113
};
114
115
116
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117
118
}
// End namespace Foam
119
120
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121
122
#endif
123
124
// ************************ vim: set sw=4 sts=4 et: ************************ //