Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
GPUSQCalculator.hpp
Go to the documentation of this file.
1
13
14#pragma once
15
18
20
35public:
37
38 [[nodiscard]] std::string_view getName() const override {
39 return "Static Structure Factor (GPU)";
40 }
41 [[nodiscard]] std::string_view getShortName() const override { return "S_Q_GPU"; }
42 [[nodiscard]] std::string_view getGroup() const override { return "Scattering"; }
43 [[nodiscard]] std::string_view getDescription() const override {
44 return "GPU-accelerated static structure factor S(Q). Falls back to CPU "
45 "when no compatible GPU is detected.";
46 }
47
48 [[nodiscard]] bool isFrameCalculator() const override { return true; }
49 [[nodiscard]] bool isTrajectoryCalculator() const override { return false; }
50
57 const correlation::analysis::AnalysisSettings &settings) const override;
58
60 [[nodiscard]] bool hasGPU() const noexcept { return has_gpu_; }
61
62private:
63 bool has_gpu_{false};
64};
65
66} // namespace correlation::calculators
Abstract base class for all analysis calculators.
Manager for distribution function calculations (RDF, PAD, S(Q), etc.).
Manages the calculation and storage of various distribution functions.
Definition DistributionFunctions.hpp:259
std::string_view getDescription() const override
Returns a brief description of the calculator's purpose.
Definition GPUSQCalculator.hpp:43
std::string_view getGroup() const override
Returns the UI group this calculator belongs to (e.g., "Radial", "Angular", "Dynamic",...
Definition GPUSQCalculator.hpp:42
std::string_view getShortName() const override
Returns a short, UI-friendly name of the calculator (e.g. "g_r", "S_q").
Definition GPUSQCalculator.hpp:41
bool isTrajectoryCalculator() const override
Check if this calculator runs on the whole trajectory (e.g. VACF).
Definition GPUSQCalculator.hpp:49
bool isFrameCalculator() const override
Check if this calculator runs per-frame (e.g. RDF, PAD).
Definition GPUSQCalculator.hpp:48
bool has_gpu_
Definition GPUSQCalculator.hpp:63
void calculateFrame(correlation::analysis::DistributionFunctions &dists, const correlation::analysis::AnalysisSettings &settings) const override
Calculates static structure factor S(Q) on a frame using GPU if available.
bool hasGPU() const noexcept
Returns true when a usable CUDA device was found at construction.
Definition GPUSQCalculator.hpp:60
std::string_view getName() const override
Returns the unique identifier/name of the calculator.
Definition GPUSQCalculator.hpp:38
Definition OptionsSyncService.hpp:18
Configuration settings for distribution function analysis.
Definition DistributionFunctions.hpp:106