5#ifndef MARDYN_TRUNK_DENSITYPROFILE_H
6#define MARDYN_TRUNK_DENSITYPROFILE_H
8#include "ProfileBase.h"
9#include "plugins/SpatialProfile.h"
18 _localProfile[uID] += 1;
21 domainDecomp->collCommAppendInt(_localProfile[uID]);
24 _globalProfile[uID] = domainDecomp->collCommGetInt();
26 void output(
string prefix,
long unsigned accumulatedDatasets)
final;
27 void reset(
unsigned long uID)
final {
28 _localProfile[uID] = 0;
29 _globalProfile[uID] = 0;
33 int getGlobalNumber (
unsigned long uid)
const {
34 return _globalProfile.at(uid);
39 std::map<unsigned, int> _localProfile;
41 std::map<unsigned, int> _globalProfile;
43 void writeDataEntry(
unsigned long uID, ofstream &outfile)
const final;
Outputs the number density of molecules per bin specified by Sampling grid in KartesianProfile.
Definition: DensityProfile.h:14
void collectAppend(DomainDecompBase *domainDecomp, unsigned long uID) final
Append all necessary communication per bin to the DomainDecomposition. Append from e....
Definition: DensityProfile.h:20
int comms() final
1D profiles like a number density profile should return 1 here. 3D profiles that have 3 entries per b...
Definition: DensityProfile.h:31
void reset(unsigned long uID) final
Used to reset all array contents for a specific uID in order to start the next recording timeframe.
Definition: DensityProfile.h:27
void output(string prefix, long unsigned accumulatedDatasets) final
Whatever is necessary to output for this profile.
Definition: DensityProfile.cpp:8
void collectRetrieve(DomainDecompBase *domainDecomp, unsigned long uID) final
Get global values after AllReduceSum per bin. Write to e.g. _globalProfile.
Definition: DensityProfile.h:23
void record(Molecule &mol, unsigned long uID) final
The recording step defines what kind of data needs to be recorded for a single molecule with a corres...
Definition: DensityProfile.h:17
handle boundary region and multiple processes
Definition: DomainDecompBase.h:51
FullMolecule modeled as LJ sphere with point polarities.
Definition: FullMolecule.h:18
Base class for all Profile outputs used by KartesianProfile.
Definition: ProfileBase.h:34