10
10
namespace dlext
11
11
{
12
12
13
+ using TimeStep = unsigned int ;
14
+
13
15
template <typename ExternalUpdater, template <typename > class Wrapper >
14
16
class DEFAULT_VISIBILITY Sampler : public HalfStepHook {
15
17
public:
@@ -24,7 +26,7 @@ class DEFAULT_VISIBILITY Sampler : public HalfStepHook {
24
26
{
25
27
_sysview = SystemView (sysdef);
26
28
}
27
- void update (unsigned int timestep) override
29
+ void update (TimeStep timestep) override
28
30
{
29
31
forward_data (_update_callback, _location, _mode, timestep);
30
32
}
@@ -36,12 +38,12 @@ class DEFAULT_VISIBILITY Sampler : public HalfStepHook {
36
38
// !
37
39
// ! The (non-typed) signature of `callback` is expected to be
38
40
// ! callback(positions, velocities, rtags, images, forces, n)
39
- // ! where `n` ìs an additional `unsigned int ` parameter.
41
+ // ! where `n` ìs an additional `TimeStep ` parameter.
40
42
// !
41
43
// ! The data for the particles information is requested at the given `location`
42
44
// ! and access `mode`. NOTE: Forces are always passed in readwrite mode.
43
45
template <typename Callback>
44
- void forward_data (Callback callback, AccessLocation location, AccessMode mode, unsigned int n)
46
+ void forward_data (Callback callback, AccessLocation location, AccessMode mode, TimeStep n)
45
47
{
46
48
auto pos_capsule = Wrapper<PositionsTypes>::wrap (_sysview, location, mode);
47
49
auto vel_capsule = Wrapper<VelocitiesMasses>::wrap (_sysview, location, mode);
0 commit comments