PFASST++
particle.hpp
Go to the documentation of this file.
1
5
#ifndef _EXAMPLES__BORIS__PARTICLE_HPP_
6
#define _EXAMPLES__BORIS__PARTICLE_HPP_
7
8
#include <memory>
9
#include <vector>
10
using namespace
std
;
11
12
#include <
pfasst/logging.hpp
>
13
14
15
namespace
pfasst
16
{
17
namespace
examples
18
{
19
namespace
boris
20
{
24
template
<
25
typename
precision
26
>
27
using
ParticleComponent
= vector<precision>;
28
32
template
<
typename
T>
33
inline
el::base::type::ostream_t& operator<<(el::base::type::ostream_t& os, const vector<T>& vec);
34
35
39
template
<
40
typename
precision
41
>
42
class
Particle
43
:
public
el::Loggable
44
{
45
protected
:
46
size_t
_dim
;
47
precision
_charge
;
48
precision
_mass
;
49
ParticleComponent<precision>
_pos
;
50
ParticleComponent<precision>
_vel
;
51
52
public
:
53
explicit
Particle
(
const
size_t
dim = 3);
54
Particle
(
const
size_t
dim,
const
precision charge,
const
precision mass);
55
virtual
~
Particle
();
56
57
inline
size_t
dim()
const
;
58
ParticleComponent<precision>
& pos();
59
const
ParticleComponent<precision>
& pos()
const
;
60
ParticleComponent<precision>
& vel();
61
const
ParticleComponent<precision>
& vel()
const
;
62
const
precision charge()
const
;
63
const
precision mass()
const
;
64
const
precision alpha()
const
;
65
66
void
set_charge(
const
precision& charge);
67
void
set_mass(
const
precision& mass);
68
69
virtual
void
log(el::base::type::ostream_t& os)
const
;
70
};
71
72
76
template
<
typename
precision>
77
inline
el::base::type::ostream_t&
operator<<
(el::base::type::ostream_t& os,
78
const
shared_ptr<
Particle<precision>
>& sp_particle);
79
}
// ::pfasst::examples::boris
80
}
// ::pfasst::examples
81
}
// ::pfasst
82
83
// #include "particle_util.hpp"
84
#include "
particle_impl.hpp
"
85
86
#endif // _EXAMPLES__BORIS__PARTICLE_HPP_
pfasst::examples::boris::Particle::_mass
precision _mass
Definition:
particle.hpp:48
pfasst::examples::boris::operator<<
el::base::type::ostream_t & operator<<(el::base::type::ostream_t &os, const shared_ptr< Particle< precision >> &sp_particle)
Definition:
particle_impl.hpp:115
std
STL namespace.
pfasst::examples::boris::Particle
Definition:
particle.hpp:42
pfasst::examples::boris::Particle::_pos
ParticleComponent< precision > _pos
Definition:
particle.hpp:49
pfasst::examples::boris::Particle::_dim
size_t _dim
Definition:
particle.hpp:46
pfasst::examples::boris::ParticleComponent
vector< precision > ParticleComponent
Definition:
particle.hpp:27
pfasst::examples::boris::Particle::_charge
precision _charge
Definition:
particle.hpp:47
pfasst
Definition:
config.hpp:22
logging.hpp
pfasst::examples::boris::Particle::_vel
ParticleComponent< precision > _vel
Definition:
particle.hpp:50
particle_impl.hpp
examples
boris
particle.hpp
Generated on Fri Jan 22 2016 09:50:06 for PFASST++ by
1.8.9.1