Loading [MathJax]/extensions/TeX/AMSmath.js
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
_
a
b
c
f
g
i
k
m
n
o
p
r
s
w
Typedefs
a
b
c
d
e
f
g
h
i
l
m
o
p
q
t
v
Enumerations
Enumerator
d
h
m
n
r
s
t
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
i
j
k
l
m
o
p
q
r
s
t
u
v
Enumerations
Enumerator
a
i
l
n
o
p
s
u
v
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
Variables
a
b
c
g
h
i
m
p
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Macros
c
d
f
g
h
i
k
m
n
o
p
q
r
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Concepts
Loading...
Searching...
No Matches
properties.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2010-2022 The ESPResSo project
3
*
4
* This file is part of ESPResSo.
5
*
6
* ESPResSo is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* ESPResSo is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
#ifndef OBSERVABLES_PROPERTIES_HPP
20
#define OBSERVABLES_PROPERTIES_HPP
21
22
/** @file properties.hpp
23
* This file contains interface functionality for extracting particle properties
24
* via a particle traits class.
25
*/
26
namespace
ParticleObservables
{
27
template
<
class
DoF>
struct
traits
;
28
29
namespace
detail {
30
template
<
class
T>
struct
decay {
31
using
type =
typename
std::decay_t<T>;
32
};
33
34
template
<
class
U>
struct
decay<std::reference_wrapper<U>> {
35
using
type = std::decay_t<U>;
36
};
37
38
template
<
class
T>
using
decay_t =
typename
decay<T>::type;
39
}
// namespace detail
40
41
template
<
class
Particle>
42
using
default_traits
=
traits<detail::decay_t<Particle>
>;
43
44
struct
Identity
{
45
template
<
class
Particle,
class
Traits = default_traits<Particle>>
46
decltype
(
auto
)
operator
()(
Particle
const
&p,
47
Traits particle_traits = {})
const
{
48
return
particle_traits.id(p);
49
}
46
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
50
};
44
struct
Identity
{
…
};
51
52
struct
Force
{
53
template
<
class
Particle,
class
Traits = default_traits<Particle>>
54
decltype
(
auto
)
operator
()(
Particle
const
&p,
55
Traits particle_traits = {})
const
{
56
return
particle_traits.force(p);
57
}
54
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
58
};
52
struct
Force
{
…
};
59
60
struct
Position
{
61
template
<
class
Particle,
class
Traits = default_traits<Particle>>
62
decltype
(
auto
)
operator
()(
Particle
const
&p,
63
Traits particle_traits = {})
const
{
64
return
particle_traits.position(p);
65
}
62
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
66
};
60
struct
Position
{
…
};
67
68
struct
Velocity
{
69
template
<
class
Particle,
class
Traits = default_traits<Particle>>
70
decltype
(
auto
)
operator
()(
Particle
const
&p,
71
Traits particle_traits = {})
const
{
72
return
particle_traits.velocity(p);
73
}
70
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
74
};
68
struct
Velocity
{
…
};
75
76
struct
Director
{
77
template
<
class
Particle,
class
Traits = default_traits<Particle>>
78
decltype
(
auto
)
operator
()(
Particle
const
&p,
79
Traits particle_traits = {})
const
{
80
return
particle_traits.director(p);
81
}
78
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
82
};
76
struct
Director
{
…
};
83
84
struct
BodyVelocity
{
85
template
<
class
Particle,
class
Traits = default_traits<Particle>>
86
decltype
(
auto
)
operator
()(
Particle
const
&p,
87
Traits particle_traits = {})
const
{
88
return
particle_traits.velocity_body(p);
89
}
86
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
90
};
84
struct
BodyVelocity
{
…
};
91
92
struct
AngularVelocity
{
93
template
<
class
Particle,
class
Traits = default_traits<Particle>>
94
decltype
(
auto
)
operator
()(
Particle
const
&p,
95
Traits particle_traits = {})
const
{
96
return
particle_traits.angular_velocity(p);
97
}
94
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
98
};
92
struct
AngularVelocity
{
…
};
99
100
struct
BodyAngularVelocity
{
101
template
<
class
Particle,
class
Traits = default_traits<Particle>>
102
decltype
(
auto
)
operator
()(
Particle
const
&p,
103
Traits particle_traits = {})
const
{
104
return
particle_traits.angular_velocity_body(p);
105
}
102
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
106
};
100
struct
BodyAngularVelocity
{
…
};
107
108
struct
Mass
{
109
template
<
class
Particle,
class
Traits = default_traits<Particle>>
110
decltype
(
auto
)
operator
()(
Particle
const
&p,
111
Traits particle_traits = {})
const
{
112
return
particle_traits.mass(p);
113
}
110
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
114
};
108
struct
Mass
{
…
};
115
116
struct
Charge
{
117
template
<
class
Particle,
class
Traits = default_traits<Particle>>
118
decltype
(
auto
)
operator
()(
Particle
const
&p,
119
Traits particle_traits = {})
const
{
120
return
particle_traits.charge(p);
121
}
118
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
122
};
116
struct
Charge
{
…
};
123
124
struct
DipoleMoment
{
125
template
<
class
Particle,
class
Traits = default_traits<Particle>>
126
decltype
(
auto
)
operator
()(
Particle
const
&p,
127
Traits particle_traits = {})
const
{
128
return
particle_traits.dipole_moment(p);
129
}
126
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
130
};
124
struct
DipoleMoment
{
…
};
131
132
struct
DipoleField
{
133
template
<
class
Particle,
class
Traits = default_traits<Particle>>
134
decltype
(
auto
)
operator
()(
Particle
const
&p,
135
Traits particle_traits = {})
const
{
136
return
particle_traits.dipole_field(p);
137
}
134
decltype
(
auto
)
operator
()(
Particle
const
&p, {
…
}
138
};
132
struct
DipoleField
{
…
};
139
}
// namespace ParticleObservables
140
141
#endif
// OBSERVABLES_PROPERTIES_HPP
ParticleObservables
Definition
ParticleTraits.hpp:28
traits
Definition
traits.hpp:24
ParticleObservables::AngularVelocity
Definition
properties.hpp:92
ParticleObservables::BodyAngularVelocity
Definition
properties.hpp:100
ParticleObservables::BodyVelocity
Definition
properties.hpp:84
ParticleObservables::Charge
Definition
properties.hpp:116
ParticleObservables::DipoleField
Definition
properties.hpp:132
ParticleObservables::DipoleMoment
Definition
properties.hpp:124
ParticleObservables::Director
Definition
properties.hpp:76
ParticleObservables::Force
Definition
properties.hpp:52
ParticleObservables::Identity
Definition
properties.hpp:44
ParticleObservables::Mass
Definition
properties.hpp:108
ParticleObservables::Position
Definition
properties.hpp:60
ParticleObservables::Velocity
Definition
properties.hpp:68
ParticleObservables::traits
Definition
properties.hpp:27
Particle
Struct holding all information for one particle.
Definition
Particle.hpp:395
src
particle_observables
include
particle_observables
properties.hpp
Generated on Mon Apr 21 2025 01:14:20 for ESPResSo by
1.9.8