Group scatter_devices

group Concrete Scatter Devices

A collection of concrete scatter device implementations.

class AbstractScatterDevice : public IScatterDevice
#include <abstract_scatter_device.hpp>

Base class for scatter devices (currently for CPU based calculations).

This class provides the common runtime structure for calculating scattering patterns, specifically for CPU-based implementations.

Subclassed by AbstractVectorsScatterDevice, MPCylinderScatterDevice, MPSphereScatterDevice

class AbstractVectorsScatterDevice : public AbstractScatterDevice
#include <abstract_vectors_scatter_device.hpp>

An abstract class for devices that perform vector-based orientational averaging.

This class extends AbstractScatterDevice by adding the logic to handle orientational averaging. For each primary q-vector processed by the main runner() loop, this class generates a set of “sub-vectors” (e.g., points on a sphere).

The final concrete class is then expected to perform its compute() operation over these sub-vectors to produce an orientationally averaged result for the single primary q-vector.

Subclassed by AllVectorsScatterDevice, SelfVectorsScatterDevice

class AllVectorsScatterDevice : public AbstractVectorsScatterDevice
#include <all_vectors_scatter_device.hpp>

Calculates scattering using a frame-based decomposition.

This device calculates the total coherent scattering amplitude A(q,t) by considering all pairs of atoms in the system. It is selected by the ScatterDeviceFactory when the configuration scattering.type is set to “all”.

The parallelization strategy is decomposition by frames. The stage_data() method, implemented via DataStagerByFrame, distributes subsets of the total simulation frames to each MPI node within a partition. The computation for each q-vector is then parallelized across these nodes.

class SelfVectorsScatterDevice : public AbstractVectorsScatterDevice
#include <self_vectors_scatter_device.hpp>

Calculates scattering using an atom-based decomposition.

This device calculates the incoherent scattering contribution, which arises from the correlation of each atom with itself over time. It is selected by the ScatterDeviceFactory when scattering.type is set to “self”.

The parallelization strategy is decomposition by atoms. The stage_data() method, using DataStagerByAtom, distributes the full time-trajectories of a subset of atoms to each MPI rank. The computation is then parallelized over these atoms.