File scatter_device_factory.hpp

This file contains a class which generates the scattering device based on user input provides through the CONTROL module. The constructing routine only return a pointer to the interface.

Author

Benjamin Lindner ben@benlabs.net

Version

See VERSION in CMakeLists.txt

Copyright

GNU General Public License

class ScatterDeviceFactory
#include <scatter_device_factory.hpp>

A factory class for creating different types of scattering devices.

This class inspects the user’s configuration and the parallel environment to decide which concrete IScatterDevice implementation to instantiate.

Public Static Functions

static std::unique_ptr<IScatterDevice> create(boost::mpi::communicator &scatter_comm, Sample &sample, const boost::asio::ip::tcp::endpoint &fileservice_endpoint, const boost::asio::ip::tcp::endpoint &monitorservice_endpoint, std::vector<CartesianCoor3D> &qvectors)

Creates and configures a scatter device based on the application’s parameters.

Parameters:
  • scatter_comm – The MPI communicator for all nodes involved in the calculation.

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

  • fileservice_endpoint – The network endpoint for the HDF5 file writing service.

  • monitorservice_endpoint – The network endpoint for the progress monitoring service.

  • qvectors – The list of q-vectors (computational tasks) to be processed.

Returns:

A std::unique_ptr to a concrete IScatterDevice implementation. The specific type of device created depends on the configuration parameters, particularly scattering.type and scattering.average.orientation.type. Possible returned types include: