File abstract_vectors_scatter_device.hpp

This file contains an refined version of the abstract scatter device, used for performing vector based orientationally averaged scattering calculations.

Author

Benjamin Lindner ben@benlabs.net

Version

See VERSION in CMakeLists.txt

Copyright

GNU General Public License

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

Public Functions

AbstractVectorsScatterDevice(boost::mpi::communicator allcomm, boost::mpi::communicator partitioncomm, Sample &sample, std::vector<CartesianCoor3D> &&vectors, size_t NAF, boost::asio::ip::tcp::endpoint fileservice_endpoint, boost::asio::ip::tcp::endpoint monitorservice_endpoint)

Constructs the AbstractVectorsScatterDevice.

Parameters:
  • allcomm – MPI communicator for all participating nodes.

  • partitioncomm – MPI communicator for the local partition of nodes.

  • sample – The sample data (see Sample class), including set of atom coordinates and types.

  • vectors – The subset of q-vectors assigned to this partition.

  • NAF – The number of work units (atoms or frames).

  • fileservice_endpoint – Network endpoint for the file writing service.

  • monitorservice_endpoint – Network endpoint for the progress monitoring service.

Protected Functions

virtual double progress() override
void init_subvectors(CartesianCoor3D &q)
virtual void print_pre_stage_info() override
inline virtual void print_post_stage_info() override
virtual void print_pre_runner_info() override
inline virtual void print_post_runner_info() override

Protected Attributes

size_t NM
std::vector<CartesianCoor3D> subvector_index_
size_t current_subvector_