ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ClusterAnalysis::ClusterStructure Class Reference

Holds the result and parameters of a cluster analysis. More...

#include <ClusterStructure.hpp>

+ Collaboration diagram for ClusterAnalysis::ClusterStructure:

Public Member Functions

 ClusterStructure ()
 
void clear ()
 Clear data structures.
 
void run_for_all_pairs ()
 Run cluster analysis, consider all particle pairs.
 
void run_for_bonded_particles ()
 Run cluster analysis, consider pairs of particles connected by a bonded interaction.
 
bool part_of_cluster (const Particle &p)
 Is particle p part of a cluster.
 
void set_pair_criterion (std::shared_ptr< PairCriteria::PairCriterion > const &c)
 Sets the pair criterion which decides if two particles are neighbors.
 
PairCriteria::PairCriterion const & pair_criterion () const
 
void attach (std::weak_ptr< BoxGeometry const > const &box_geo)
 

Public Attributes

std::map< int, std::shared_ptr< Cluster > > clusters
 Map holding the individual clusters.
 
std::map< int, int > cluster_id
 Map between particle ids and corresponding cluster ids.
 

Detailed Description

Holds the result and parameters of a cluster analysis.

Definition at line 34 of file core/cluster_analysis/ClusterStructure.hpp.

Constructor & Destructor Documentation

◆ ClusterStructure()

ClusterAnalysis::ClusterStructure::ClusterStructure ( )

Definition at line 37 of file ClusterStructure.cpp.

References clear().

Member Function Documentation

◆ attach()

void ClusterAnalysis::ClusterStructure::attach ( std::weak_ptr< BoxGeometry const > const &  box_geo)
inline

Definition at line 61 of file core/cluster_analysis/ClusterStructure.hpp.

◆ clear()

void ClusterAnalysis::ClusterStructure::clear ( )

Clear data structures.

Definition at line 39 of file ClusterStructure.cpp.

References cluster_id, and clusters.

Referenced by ClusterStructure(), run_for_all_pairs(), and run_for_bonded_particles().

◆ pair_criterion()

PairCriteria::PairCriterion const & ClusterAnalysis::ClusterStructure::pair_criterion ( ) const
inline

Definition at line 57 of file core/cluster_analysis/ClusterStructure.hpp.

◆ part_of_cluster()

bool ClusterAnalysis::ClusterStructure::part_of_cluster ( const Particle p)
inline

Is particle p part of a cluster.

Definition at line 45 of file ClusterStructure.cpp.

References cluster_id, and Particle::id().

◆ run_for_all_pairs()

void ClusterAnalysis::ClusterStructure::run_for_all_pairs ( )

Run cluster analysis, consider all particle pairs.

Definition at line 50 of file ClusterStructure.cpp.

References clear(), and Utils::for_each_pair().

◆ run_for_bonded_particles()

void ClusterAnalysis::ClusterStructure::run_for_bonded_particles ( )

Run cluster analysis, consider pairs of particles connected by a bonded interaction.

Definition at line 66 of file ClusterStructure.cpp.

References clear(), and get_particle_data().

◆ set_pair_criterion()

void ClusterAnalysis::ClusterStructure::set_pair_criterion ( std::shared_ptr< PairCriteria::PairCriterion > const &  c)
inline

Sets the pair criterion which decides if two particles are neighbors.

Definition at line 53 of file core/cluster_analysis/ClusterStructure.hpp.

Member Data Documentation

◆ cluster_id

std::map<int, int> ClusterAnalysis::ClusterStructure::cluster_id

Map between particle ids and corresponding cluster ids.

Definition at line 41 of file core/cluster_analysis/ClusterStructure.hpp.

Referenced by clear(), and part_of_cluster().

◆ clusters

std::map<int, std::shared_ptr<Cluster> > ClusterAnalysis::ClusterStructure::clusters

Map holding the individual clusters.

The key is an integer cluster id

Definition at line 39 of file core/cluster_analysis/ClusterStructure.hpp.

Referenced by clear().


The documentation for this class was generated from the following files: