Version 2, position dependent E/B, kinetic ions, boris mover, terminator
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#include "simulation/logger.h"
|
||||
|
||||
DeletionLogger::DeletionLogger(std::vector<DeletionType> used_types) {
|
||||
for (auto& type : used_types) {
|
||||
num_deletions[type] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void DeletionLogger::logDeletion(const Coordinate& coordinate,
|
||||
DeletionType type) {
|
||||
if (num_deletions.count(type) > 0) {
|
||||
num_deletions.at(type) += 1;
|
||||
}
|
||||
}
|
||||
|
||||
std::map<DeletionType, long int> DeletionLogger::numDeletions() const {
|
||||
return num_deletions;
|
||||
}
|
||||
|
||||
void DeletionLogger::numDeletions(long int new_value, DeletionType type) {
|
||||
if (num_deletions.count(type)) {
|
||||
num_deletions.at(type) = new_value;
|
||||
}
|
||||
}
|
||||
|
||||
long int DeletionLogger::numDeletions(DeletionType type) const {
|
||||
if (num_deletions.count(type)) {
|
||||
return num_deletions.at(type);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user