|
Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
|
Manages background order parameter calculations, multi-frame caching, and visual updates. More...
#include <PhaseSearchService.hpp>

Public Types | |
| using | CellProvider |
| using | ActiveFrameProvider = std::function<std::size_t()> |
| using | TotalFramesProvider = std::function<std::size_t()> |
| using | UpdateCallback = std::function<void()> |
| using | GpuDescriptorEvaluator |
Public Member Functions | |
| PhaseSearchService (CellProvider cell_provider, ActiveFrameProvider active_frame_provider, TotalFramesProvider total_frames_provider, UpdateCallback on_phase_updated, std::shared_ptr< std::atomic< bool > > alive) | |
| Constructs PhaseSearchService and spawns the background worker. | |
| ~PhaseSearchService () | |
| Destructor stopping the background worker thread. | |
| PhaseSearchService (const PhaseSearchService &)=delete | |
| PhaseSearchService & | operator= (const PhaseSearchService &)=delete |
| PhaseSearchService (PhaseSearchService &&)=delete | |
| PhaseSearchService & | operator= (PhaseSearchService &&)=delete |
| void | setEnabled (bool enabled) |
| bool | isEnabled () const noexcept |
| void | setDescriptor (PhaseDescriptor descriptor) |
| PhaseDescriptor | descriptor () const noexcept |
| void | setCrystalPreset (CrystalPreset preset) |
| CrystalPreset | crystalPreset () const noexcept |
| void | setThresholds (float min_threshold, float max_threshold) |
| float | minThreshold () const noexcept |
| float | maxThreshold () const noexcept |
| void | setColormap (plotters::ColormapType colormap) |
| plotters::ColormapType | colormap () const noexcept |
| void | setHaloIntensity (float intensity) |
| float | haloIntensity () const noexcept |
| void | setHaloRadiusRatio (float ratio) |
| float | haloRadiusRatio () const noexcept |
| void | setAtomScale (float scale) |
| float | atomScale () const noexcept |
| void | setDimNonMatching (bool dim) |
| bool | isDimNonMatching () const noexcept |
| void | setHideNonMatching (bool hide) |
| bool | isHideNonMatching () const noexcept |
| void | set2DMode (bool is_2d) |
| bool | is2DMode () const noexcept |
| void | setDescriptorY (PhaseDescriptor desc_y) |
| PhaseDescriptor | descriptorY () const noexcept |
| void | setThresholds2D (float min_x, float max_x, float min_y, float max_y) |
| float | minThresholdY () const noexcept |
| float | maxThresholdY () const noexcept |
| PhaseSearchSettings | settings () const noexcept |
| PhaseHistogram | latestHistogram () const |
| PhaseHeatmap2D | latestHeatmap () const |
| const PhaseDescriptorsLRUCache & | lruCache () const noexcept |
| PhaseDescriptorsLRUCache & | lruCache () noexcept |
| void | requestCalculation (std::size_t frame_index) |
| void | startPrebake () |
| void | cancelPrebake () |
| bool | isFrameReady (std::size_t frame_index) const |
| PhasePrebakeStatus | prebakeStatus () const |
| void | applyVisualsToScene (render3d::Scene3D &scene, std::size_t active_frame) |
| void | setGpuDescriptorEvaluator (GpuDescriptorEvaluator evaluator) |
| void | clearCache () |
| std::shared_ptr< const FramePhaseDescriptors > | getOrComputeDescriptors (std::size_t frame_index) |
| std::shared_ptr< const calculators::SteinhardtCalculator::SteinhardtParams > | getOrComputeSteinhardt (std::size_t frame_index) |
| PhaseHistogram | computePhaseHistogram (const FramePhaseDescriptors *descriptors) const |
| PhaseHeatmap2D | computePhaseHeatmap (const FramePhaseDescriptors *descriptors) const |
| std::shared_ptr< const FramePhaseDescriptors > | computeDescriptorsSync (std::size_t frame_index) |
Private Member Functions | |
| void | phaseWorkerLoop () |
| int64_t | waitForNextPhaseFrame () |
| void | processTargetPhaseFrame (int64_t target_frame) |
| int64_t | findNextUncachedPrebakeFrame (const PhaseSearchSettings &settings) const |
| void | startPrebakeLocked () |
| void | cancelPrebakeLocked () |
| std::shared_ptr< const analysis::StructureAnalyzer > | getOrBuildFrame0Analyzer () |
| void | populateDeformationDescriptors (FramePhaseDescriptors &descriptors, std::size_t frame_index, const core::Cell &target_cell, const PhaseSearchSettings &settings) |
| void | applyPhaseVisualsToSceneInternal (render3d::Scene3D &scene, const FramePhaseDescriptors *descriptors) |
Private Attributes | |
| CellProvider | cell_provider_ |
| ActiveFrameProvider | active_frame_provider_ |
| TotalFramesProvider | total_frames_provider_ |
| UpdateCallback | on_phase_updated_ |
| GpuDescriptorEvaluator | gpu_evaluator_ |
| std::shared_ptr< std::atomic< bool > > | alive_ |
| PhaseSearchSettings | phase_settings_ |
| PhaseHistogram | latest_histogram_ |
| PhaseHeatmap2D | latest_heatmap_ |
| PhaseDescriptorsLRUCache | lru_cache_ |
| std::shared_ptr< const analysis::StructureAnalyzer > | ref_frame0_analyzer_ |
| std::mutex | phase_mutex_ |
| std::condition_variable | phase_cv_ |
| std::atomic< bool > | stop_phase_worker_ {false} |
| std::atomic< bool > | prebake_active_ {false} |
| std::atomic< bool > | is_computing_ {false} |
| std::atomic< int64_t > | requested_phase_frame_ {-1} |
| std::jthread | phase_worker_ |
Manages background order parameter calculations, multi-frame caching, and visual updates.
| using correlation::app::PhaseSearchService::ActiveFrameProvider = std::function<std::size_t()> |
| using correlation::app::PhaseSearchService::TotalFramesProvider = std::function<std::size_t()> |
| using correlation::app::PhaseSearchService::UpdateCallback = std::function<void()> |
| correlation::app::PhaseSearchService::PhaseSearchService | ( | CellProvider | cell_provider, |
| ActiveFrameProvider | active_frame_provider, | ||
| TotalFramesProvider | total_frames_provider, | ||
| UpdateCallback | on_phase_updated, | ||
| std::shared_ptr< std::atomic< bool > > | alive ) |
Constructs PhaseSearchService and spawns the background worker.
| cell_provider | Callback returning a cell and its bond cutoffs for a frame. |
| active_frame_provider | Callback returning the active frame index. |
| total_frames_provider | Callback returning the total number of frames. |
| on_phase_updated | Callback invoked when asynchronous calculation updates active scene. |
| alive | Shared cancellation token indicating controller lifecycle. |


| correlation::app::PhaseSearchService::~PhaseSearchService | ( | ) |
Destructor stopping the background worker thread.
|
delete |

|
delete |

|
private |


| void correlation::app::PhaseSearchService::applyVisualsToScene | ( | render3d::Scene3D & | scene, |
| std::size_t | active_frame ) |


|
nodiscardnoexcept |

| void correlation::app::PhaseSearchService::cancelPrebake | ( | ) |


|
private |

| void correlation::app::PhaseSearchService::clearCache | ( | ) |


|
nodiscardnoexcept |

|
nodiscard |


|
nodiscard |


|
nodiscard |


|
nodiscardnoexcept |

|
nodiscardnoexcept |

|
nodiscardnoexcept |

|
nodiscardprivate |


|
nodiscardprivate |

|
nodiscard |


|
nodiscard |


|
nodiscardnoexcept |

|
nodiscardnoexcept |

|
nodiscardnoexcept |

|
nodiscardnoexcept |

|
nodiscardnoexcept |
|
nodiscard |

|
nodiscardnoexcept |

|
nodiscard |

|
nodiscard |

|
nodiscardnoexcept |

|
nodiscardnoexcept |
|
nodiscardnoexcept |

|
nodiscardnoexcept |

|
nodiscardnoexcept |

|
nodiscardnoexcept |

|
delete |

|
delete |
|
private |


|
private |


|
nodiscard |

|
private |


| void correlation::app::PhaseSearchService::requestCalculation | ( | std::size_t | frame_index | ) |

| void correlation::app::PhaseSearchService::set2DMode | ( | bool | is_2d | ) |


| void correlation::app::PhaseSearchService::setAtomScale | ( | float | scale | ) |

| void correlation::app::PhaseSearchService::setColormap | ( | plotters::ColormapType | colormap | ) |


| void correlation::app::PhaseSearchService::setCrystalPreset | ( | CrystalPreset | preset | ) |


| void correlation::app::PhaseSearchService::setDescriptor | ( | PhaseDescriptor | descriptor | ) |


| void correlation::app::PhaseSearchService::setDescriptorY | ( | PhaseDescriptor | desc_y | ) |


| void correlation::app::PhaseSearchService::setDimNonMatching | ( | bool | dim | ) |

| void correlation::app::PhaseSearchService::setEnabled | ( | bool | enabled | ) |

| void correlation::app::PhaseSearchService::setGpuDescriptorEvaluator | ( | GpuDescriptorEvaluator | evaluator | ) |

| void correlation::app::PhaseSearchService::setHaloIntensity | ( | float | intensity | ) |

| void correlation::app::PhaseSearchService::setHaloRadiusRatio | ( | float | ratio | ) |

| void correlation::app::PhaseSearchService::setHideNonMatching | ( | bool | hide | ) |

| void correlation::app::PhaseSearchService::setThresholds | ( | float | min_threshold, |
| float | max_threshold ) |

| void correlation::app::PhaseSearchService::setThresholds2D | ( | float | min_x, |
| float | max_x, | ||
| float | min_y, | ||
| float | max_y ) |

|
nodiscardnoexcept |

| void correlation::app::PhaseSearchService::startPrebake | ( | ) |


|
private |

|
nodiscardprivate |


|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |