Many, many more comments
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <vector>
|
||||
#include "simulation/coordinates.h"
|
||||
|
||||
// enum that defines the different types of deletions that can be counted
|
||||
enum class DeletionType {
|
||||
wall,
|
||||
recombination,
|
||||
@@ -13,19 +14,35 @@ enum class DeletionType {
|
||||
cluster_formation
|
||||
};
|
||||
|
||||
// class that keeps track of the DeletionType that caused a particle to be deleted
|
||||
class DeletionLogger {
|
||||
public:
|
||||
// Constructor: vector used_types defines for which DeletionType elements the
|
||||
// deletion is supposed to be tracked (i.e. if recombination is not
|
||||
// specified in the used_types vector, then particles that are
|
||||
// removed due to recombination are not counted)
|
||||
DeletionLogger(std::vector<DeletionType> used_types);
|
||||
|
||||
// increase the count corresponding to DeletionType by 1
|
||||
// Coordinate coordinate is not used (i.e. can be chosen arbitrarily)
|
||||
virtual void logDeletion(const Coordinate& coordinate, DeletionType type);
|
||||
|
||||
// returns the map with the keys being the tracked DeletionTypes and the
|
||||
// value the long int count of how many particles have been logged by the
|
||||
// corresponding key
|
||||
std::map<DeletionType, long int> numDeletions() const;
|
||||
// set the count for DeletionType type to new_value
|
||||
void numDeletions(long int new_value, DeletionType type);
|
||||
// return the count for DeletionType type; if the type was not specified
|
||||
// as used in the creation of the object return 0
|
||||
long int numDeletions(DeletionType type) const;
|
||||
|
||||
// make private member variable accessable for the cpu synchronization
|
||||
friend class CpuSynchronizer;
|
||||
|
||||
private:
|
||||
// map with keys being the used DeletionTypes and the value being the count
|
||||
// of how many particles have been deleted due to the DeletionType of the key
|
||||
std::map<DeletionType, long int> num_deletions;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user