2#ifndef STORMM_MOTION_SWEEPER_H
3#define STORMM_MOTION_SWEEPER_H
6#include "Accelerator/hybrid.h"
7#include "Constants/fixed_precision.h"
8#include "DataTypes/stormm_vector_types.h"
9#include "Synthesis/phasespace_synthesis.h"
14using card::HybridTargetLevel;
15using numerics::default_momentum_scale_bits;
16using numerics::default_com_scale_bits;
17using numerics::default_inertia_scale_bits;
18using synthesis::PhaseSpaceSynthesis;
27 double com_scale_in,
double mv_scale_in,
double inrt_scale_in, llint* xcom_in,
28 llint* ycom_in, llint* zcom_in, llint* xcom_nxt_in, llint* ycom_nxt_in,
29 llint* zcom_nxt_in,
int* xcom_ovrf_in,
int* ycom_ovrf_in,
int* zcom_ovrf_in,
30 int* xcom_nxt_ovrf_in,
int* ycom_nxt_ovrf_in,
int* zcom_nxt_ovrf_in,
31 llint* xmv_in, llint* ymv_in, llint* zmv_in, llint* xmv_nxt_in,
32 llint* ymv_nxt_in, llint* zmv_nxt_in,
int* xmv_ovrf_in,
int* ymv_ovrf_in,
33 int* zmv_ovrf_in,
int* xmv_nxt_ovrf_in,
int* ymv_nxt_ovrf_in,
34 int* zmv_nxt_ovrf_in, llint* rxmv_in, llint* rymv_in, llint* rzmv_in,
35 llint* rxmv_nxt_in, llint* rymv_nxt_in, llint* rzmv_nxt_in,
int* rxmv_ovrf_in,
36 int* rymv_ovrf_in,
int* rzmv_ovrf_in,
int* rxmv_nxt_ovrf_in,
37 int* rymv_nxt_ovrf_in,
int* rzmv_nxt_ovrf_in, llint* inrt_in,
38 llint* inrt_nxt_in,
int* inrt_ovrf_in,
int* inrt_nxt_ovrf_in);
125 double com_scale_in,
double mv_scale_in,
double inrt_scale,
126 const llint* xcom_in,
const llint* ycom_in,
const llint* zcom_in,
127 const llint* xcom_nxt_in,
const llint* ycom_nxt_in,
const llint* zcom_nxt_in,
128 const int* xcom_ovrf_in,
const int* ycom_ovrf_in,
const int* zcom_ovrf_in,
129 const int* xcom_nxt_ovrf_in,
const int* ycom_nxt_ovrf_in,
130 const int* zcom_nxt_ovrf_in,
const llint* xmv_in,
const llint* ymv_in,
131 const llint* zmv_in,
const llint* xmv_nxt_in,
const llint* ymv_nxt_in,
132 const llint* zmv_nxt_in,
const int* xmv_ovrf_in,
const int* ymv_ovrf_in,
133 const int* zmv_ovrf_in,
const int* xmv_nxt_ovrf_in,
const int* ymv_nxt_ovrf_in,
134 const int* zmv_nxt_ovrf_in,
const llint* rxmv_in,
const llint* rymv_in,
135 const llint* rzmv_in,
const llint* rxmv_nxt_in,
const llint* rymv_nxt_in,
136 const llint* rzmv_nxt_in,
const int* rxmv_ovrf_in,
const int* rymv_ovrf_in,
137 const int* rzmv_ovrf_in,
const int* rxmv_nxt_ovrf_in,
138 const int* rymv_nxt_ovrf_in,
const int* rzmv_nxt_ovrf_in,
const llint* inrt_in,
139 const llint* inrt_nxt_in,
const int* inrt_ovrf_in,
140 const int* inrt_nxt_ovrf_in);
233 int momentum_bit_count_in = default_momentum_scale_bits,
234 int center_of_mass_bit_count_in = default_com_scale_bits,
235 int inertia_bit_count_in = default_inertia_scale_bits);
238 int momentum_bit_count_in = default_momentum_scale_bits,
239 int center_of_mass_bit_count_in = default_com_scale_bits,
240 int inertia_bit_count_in = default_inertia_scale_bits);
290 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
320 MotionSweepWriter
data(CoordinateCycle orientation,
321 HybridTargetLevel tier = HybridTargetLevel::HOST);
323 MotionSweepWriter
data(HybridTargetLevel tier = HybridTargetLevel::HOST);
325 const MotionSweepReader
data(CoordinateCycle orientation,
326 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
328 const MotionSweepReader
data(HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
333 void uploadWorkUnits();
336 void downloadWorkUnits();
347 CoordinateCycle cycle_position;
350 int center_of_mass_bit_count;
352 int momentum_bit_count;
354 int inertia_bit_count;
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
MotionSweeper(const PhaseSpaceSynthesis *poly_ps, int momentum_bit_count_in=default_momentum_scale_bits, int center_of_mass_bit_count_in=default_com_scale_bits, int inertia_bit_count_in=default_inertia_scale_bits)
Class constructors take as their argument the PhaseSpaceSynthesis which the object will serve....
Definition motion_sweeper.cpp:122
A fixed-precision representation of coordinates, velocities, and forces to manage a set of simulation...
Definition phasespace_synthesis.h:325
int getSystemCount() const
Get the number of systems that the object is set up to serve.
Definition motion_sweeper.cpp:462
void updateCyclePosition()
Modify the object's stage in the coordinate cycle.
Definition motion_sweeper.cpp:672
int getInertialTensorBitCount() const
Get the number of bits used for fixed-precision accumulation of the rotational moment of inertia tens...
Definition motion_sweeper.cpp:487
MotionSweepWriter data(CoordinateCycle orientation, HybridTargetLevel tier=HybridTargetLevel::HOST)
Get the abstract.
Definition motion_sweeper.cpp:684
CoordinateCycle getCyclePosition() const
Get the object's current place in the time cycle.
Definition motion_sweeper.cpp:472
std::vector< double > getInertialTensor(int idx, HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get the inertial tensor accumulated for a specific system. Descriptions of input parameters follow fr...
Definition motion_sweeper.cpp:582
double3 getNetVelocity(int idx, HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get the net velocity of a specific system, relative to the coordinate origin.
Definition motion_sweeper.cpp:492
int getCenterOfMassBitCount() const
Get the number of bits used for fixed-precision accumulation in the center of mass computation.
Definition motion_sweeper.cpp:482
double3 getCenterOfMass(int idx, HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get the center of mass as found for a specific system. Like the other accessors, above,...
Definition motion_sweeper.cpp:534
int getMomentumBitCount() const
Get the number of bits used for fixed-precision accumulation of the momentum.
Definition motion_sweeper.cpp:477
MotionSweeper(const PhaseSpaceSynthesis *poly_ps, int momentum_bit_count_in=default_momentum_scale_bits, int center_of_mass_bit_count_in=default_com_scale_bits, int inertia_bit_count_in=default_inertia_scale_bits)
Class constructors take as their argument the PhaseSpaceSynthesis which the object will serve....
Definition motion_sweeper.cpp:122
int getWorkUnitCount() const
Get the total number of work units spanning all systems.
Definition motion_sweeper.cpp:467
double3 getAngularVelocity(int idx, HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get the angular velocity of the system about its center of mass. Descriptions of input parameters fol...
Definition motion_sweeper.cpp:632
Definition stormm_vector_types.h:117
Definition stormm_vector_types.h:33
const llint * inrt
Definition motion_sweeper.h:213
const int * rymv_ovrf
Overflow bits for angular momentum about the Y axis.
Definition motion_sweeper.h:208
const double com_scale
Definition motion_sweeper.h:165
const llint * inrt_nxt
Accumulators for the intertial tensor in the next iteration.
Definition motion_sweeper.h:217
const llint * ymv_nxt
Accumulators for net momentum in Y in the next iteration.
Definition motion_sweeper.h:193
const int * rzmv_ovrf
Overflow bits for angular momentum about the Z axis.
Definition motion_sweeper.h:209
const int * rymv_nxt_ovrf
Overflow bits for Y axis angular momentum in the next iteration.
Definition motion_sweeper.h:211
const llint * rymv
Accumulators for angular momentum about the Y axis.
Definition motion_sweeper.h:202
const llint * zmv
Accumulators for net momentum along the Z dimension.
Definition motion_sweeper.h:191
const int * zcom_ovrf
Overflow bits for center of mass in the Z dimension.
Definition motion_sweeper.h:185
const int * xmv_nxt_ovrf
Overflow bits for net momentum in X in the next iteration.
Definition motion_sweeper.h:198
const llint * xmv_nxt
Accumulators for net momentum in X in the next iteration.
Definition motion_sweeper.h:192
const llint * xcom
Accumulators for center of mass along the X dimension.
Definition motion_sweeper.h:177
const double * total_mass
Total masses of each system in the synthesis.
Definition motion_sweeper.h:164
const llint * ycom_nxt
Accumulators for COM along Y in the next iteration.
Definition motion_sweeper.h:181
const int * zcom_nxt_ovrf
Overflow bits for COM along Z in the next iteration.
Definition motion_sweeper.h:188
const int * rzmv_nxt_ovrf
Overflow bits for Z axis angular momentum in the next iteration.
Definition motion_sweeper.h:212
const llint * zmv_nxt
Accumulators for net momentum in Z in the next iteration.
Definition motion_sweeper.h:194
const llint * ycom
Accumulators for center of mass along the Y dimension.
Definition motion_sweeper.h:178
const int * ymv_nxt_ovrf
Overflow bits for net momentum in Y in the next iteration.
Definition motion_sweeper.h:199
const int * inrt_nxt_ovrf
Overflow bits for the intertial tensor in the next iteration.
Definition motion_sweeper.h:219
const int * xcom_nxt_ovrf
Overflow bits for COM along X in the next iteration.
Definition motion_sweeper.h:186
const int nwu
The number of work units.
Definition motion_sweeper.h:157
const int * ycom_nxt_ovrf
Overflow bits for COM along Y in the next iteration.
Definition motion_sweeper.h:187
const int * xcom_ovrf
Overflow bits for center of mass in the X dimension.
Definition motion_sweeper.h:183
const int * ycom_ovrf
Overflow bits for center of mass in the Y dimension.
Definition motion_sweeper.h:184
const llint * xcom_nxt
Accumulators for COM along X in the next iteration.
Definition motion_sweeper.h:180
const int * inrt_ovrf
Overflow bits for the intertial tensor.
Definition motion_sweeper.h:218
const int * zmv_ovrf
Overflow bits for net momentum in the Z dimension.
Definition motion_sweeper.h:197
const int * xmv_ovrf
Overflow bits for net momentum in the X dimension.
Definition motion_sweeper.h:195
MotionSweepReader(int nwu_in, const int4 *work_units_in, const double *total_mass_in, double com_scale_in, double mv_scale_in, double inrt_scale, const llint *xcom_in, const llint *ycom_in, const llint *zcom_in, const llint *xcom_nxt_in, const llint *ycom_nxt_in, const llint *zcom_nxt_in, const int *xcom_ovrf_in, const int *ycom_ovrf_in, const int *zcom_ovrf_in, const int *xcom_nxt_ovrf_in, const int *ycom_nxt_ovrf_in, const int *zcom_nxt_ovrf_in, const llint *xmv_in, const llint *ymv_in, const llint *zmv_in, const llint *xmv_nxt_in, const llint *ymv_nxt_in, const llint *zmv_nxt_in, const int *xmv_ovrf_in, const int *ymv_ovrf_in, const int *zmv_ovrf_in, const int *xmv_nxt_ovrf_in, const int *ymv_nxt_ovrf_in, const int *zmv_nxt_ovrf_in, const llint *rxmv_in, const llint *rymv_in, const llint *rzmv_in, const llint *rxmv_nxt_in, const llint *rymv_nxt_in, const llint *rzmv_nxt_in, const int *rxmv_ovrf_in, const int *rymv_ovrf_in, const int *rzmv_ovrf_in, const int *rxmv_nxt_ovrf_in, const int *rymv_nxt_ovrf_in, const int *rzmv_nxt_ovrf_in, const llint *inrt_in, const llint *inrt_nxt_in, const int *inrt_ovrf_in, const int *inrt_nxt_ovrf_in)
As with other abstracts, the constructor takes critical constants and pointers to initialize each of ...
Definition motion_sweeper.cpp:49
const int * rxmv_ovrf
Overflow bits for angular momentum about the X axis.
Definition motion_sweeper.h:207
const int * ymv_ovrf
Overflow bits for net momentum in the Y dimension.
Definition motion_sweeper.h:196
const double mv_scale
Definition motion_sweeper.h:167
const llint * ymv
Accumulators for net momentum along the Y dimension.
Definition motion_sweeper.h:190
const llint * rxmv_nxt
Angular momentum about the X axis in the next iteration.
Definition motion_sweeper.h:204
const double inrt_scale
Definition motion_sweeper.h:170
const llint * rxmv
Accumulators for angular momentum about the X axis.
Definition motion_sweeper.h:201
const llint * zcom
Accumulators for center of mass along the Z dimension.
Definition motion_sweeper.h:179
const llint * xmv
Accumulators for net momentum along the X dimension.
Definition motion_sweeper.h:189
const int * rxmv_nxt_ovrf
Overflow bits for X axis angular momentum in the next iteration.
Definition motion_sweeper.h:210
const int * zmv_nxt_ovrf
Overflow bits for net momentum in Z in the next iteration.
Definition motion_sweeper.h:200
const llint * zcom_nxt
Accumulators for COM along Z in the next iteration.
Definition motion_sweeper.h:182
MotionSweepReader(const MotionSweepReader &original)=default
As with other abstracts, the presence of any const members invalidates the copy and move assignment o...
const llint * rymv_nxt
Angular momentum about the Y axis in the next iteration.
Definition motion_sweeper.h:205
const llint * rzmv
Accumulators for angular momentum about the Z axis.
Definition motion_sweeper.h:203
const int4 * work_units
Definition motion_sweeper.h:158
const llint * rzmv_nxt
Angular momentum about the Z axis in the next iteration.
Definition motion_sweeper.h:206
Abstract of the MotionSweeper class, below, with non-const pointers to modifiable data.
Definition motion_sweeper.h:21
llint * rxmv
Accumulators for angular momentum about the X axis.
Definition motion_sweeper.h:94
int * rymv_ovrf
Overflow bits for angular momentum about the Y axis.
Definition motion_sweeper.h:101
llint * inrt_nxt
Accumulators for the inertial tensor in the next iteration.
Definition motion_sweeper.h:110
int * inrt_nxt_ovrf
Overflow bits for the inertial tensor in the next iteration.
Definition motion_sweeper.h:112
MotionSweepWriter(const MotionSweepWriter &original)=default
As with other abstracts, the presence of any const members invalidates the copy and move assignment o...
int * rxmv_ovrf
Overflow bits for angular momentum about the X axis.
Definition motion_sweeper.h:100
int * inrt_ovrf
Overflow bits for the inertial tensor.
Definition motion_sweeper.h:111
const double * total_mass
Total masses of each system in the synthesis.
Definition motion_sweeper.h:57
int * ycom_nxt_ovrf
Overflow bits for COM along Y in the next iteration.
Definition motion_sweeper.h:80
llint * rymv
Accumulators for angular momentum about the Y axis.
Definition motion_sweeper.h:95
llint * xmv_nxt
Accumulators for net momentum in X in the next iteration.
Definition motion_sweeper.h:85
int * zmv_ovrf
Overflow bits for net momentum in the Z dimension.
Definition motion_sweeper.h:90
int * xcom_ovrf
Overflow bits for center of mass in the X dimension.
Definition motion_sweeper.h:76
MotionSweepWriter(int nwu_in, const int4 *work_units_in, const double *total_mass_in, double com_scale_in, double mv_scale_in, double inrt_scale_in, llint *xcom_in, llint *ycom_in, llint *zcom_in, llint *xcom_nxt_in, llint *ycom_nxt_in, llint *zcom_nxt_in, int *xcom_ovrf_in, int *ycom_ovrf_in, int *zcom_ovrf_in, int *xcom_nxt_ovrf_in, int *ycom_nxt_ovrf_in, int *zcom_nxt_ovrf_in, llint *xmv_in, llint *ymv_in, llint *zmv_in, llint *xmv_nxt_in, llint *ymv_nxt_in, llint *zmv_nxt_in, int *xmv_ovrf_in, int *ymv_ovrf_in, int *zmv_ovrf_in, int *xmv_nxt_ovrf_in, int *ymv_nxt_ovrf_in, int *zmv_nxt_ovrf_in, llint *rxmv_in, llint *rymv_in, llint *rzmv_in, llint *rxmv_nxt_in, llint *rymv_nxt_in, llint *rzmv_nxt_in, int *rxmv_ovrf_in, int *rymv_ovrf_in, int *rzmv_ovrf_in, int *rxmv_nxt_ovrf_in, int *rymv_nxt_ovrf_in, int *rzmv_nxt_ovrf_in, llint *inrt_in, llint *inrt_nxt_in, int *inrt_ovrf_in, int *inrt_nxt_ovrf_in)
As with other abstracts, the constructor takes critical constants and pointers to initialize each of ...
Definition motion_sweeper.cpp:15
int * zcom_ovrf
Overflow bits for center of mass in the Z dimension.
Definition motion_sweeper.h:78
llint * ymv_nxt
Accumulators for net momentum in Y in the next iteration.
Definition motion_sweeper.h:86
llint * ycom
Accumulators for center of mass along the Y dimension.
Definition motion_sweeper.h:71
int * ycom_ovrf
Overflow bits for center of mass in the Y dimension.
Definition motion_sweeper.h:77
llint * xcom_nxt
Accumulators for COM along X in the next iteration.
Definition motion_sweeper.h:73
int * rxmv_nxt_ovrf
Overflow bits for X axis angular momentum in the next iteration.
Definition motion_sweeper.h:103
int * xmv_ovrf
Overflow bits for net momentum in the X dimension.
Definition motion_sweeper.h:88
llint * zmv_nxt
Accumulators for net momentum in Z in the next iteration.
Definition motion_sweeper.h:87
llint * rzmv_nxt
Angular momentum about the Z axis in the next iteration.
Definition motion_sweeper.h:99
llint * rxmv_nxt
Angular momentum about the X axis in the next iteration.
Definition motion_sweeper.h:97
llint * ycom_nxt
Accumulators for COM along Y in the next iteration.
Definition motion_sweeper.h:74
llint * xmv
Accumulators for net momentum along the X dimension.
Definition motion_sweeper.h:82
llint * ymv
Accumulators for net momentum along the Y dimension.
Definition motion_sweeper.h:83
int * ymv_ovrf
Overflow bits for net momentum in the Y dimension.
Definition motion_sweeper.h:89
llint * rymv_nxt
Angular momentum about the Y axis in the next iteration.
Definition motion_sweeper.h:98
int * zcom_nxt_ovrf
Overflow bits for COM along Z in the next iteration.
Definition motion_sweeper.h:81
const double mv_scale
Definition motion_sweeper.h:60
int * xcom_nxt_ovrf
Overflow bits for COM along X in the next iteration.
Definition motion_sweeper.h:79
llint * zmv
Accumulators for net momentum along the Z dimension.
Definition motion_sweeper.h:84
int * rzmv_ovrf
Overflow bits for angular momentum about the Z axis.
Definition motion_sweeper.h:102
const double com_scale
Definition motion_sweeper.h:58
const int4 * work_units
Definition motion_sweeper.h:51
llint * inrt
Definition motion_sweeper.h:106
llint * xcom
Accumulators for center of mass along the X dimension.
Definition motion_sweeper.h:70
int * ymv_nxt_ovrf
Overflow bits for net momentum in Y in the next iteration.
Definition motion_sweeper.h:92
int * xmv_nxt_ovrf
Overflow bits for net momentum in X in the next iteration.
Definition motion_sweeper.h:91
int * zmv_nxt_ovrf
Overflow bits for net momentum in Z in the next iteration.
Definition motion_sweeper.h:93
llint * zcom
Accumulators for center of mass along the Z dimension.
Definition motion_sweeper.h:72
int * rymv_nxt_ovrf
Overflow bits for Y axis angular momentum in the next iteration.
Definition motion_sweeper.h:104
llint * rzmv
Accumulators for angular momentum about the Z axis.
Definition motion_sweeper.h:96
const double inrt_scale
Definition motion_sweeper.h:63
llint * zcom_nxt
Accumulators for COM along Z in the next iteration.
Definition motion_sweeper.h:75
const int nwu
The number of work units.
Definition motion_sweeper.h:50
int * rzmv_nxt_ovrf
Overflow bits for Z axis angular momentum in the next iteration.
Definition motion_sweeper.h:105