1#ifndef SRC_MOLECULES_MOLECULEIDPOOL_H_
2#define SRC_MOLECULES_MOLECULEIDPOOL_H_
4#include "utils/mardyn_assert.h"
19 MoleculeIdPool(
unsigned long poolsize,
int numProcs,
int myProcRank) :
20 _poolSize(poolsize), _numProcesses(numProcs), _myProcRank(myProcRank), _moleculesFromThisProcess(0) {}
25 return myIDoffset() + _moleculesFromThisProcess++;
38 unsigned long myIDoffset() {
43 unsigned long _poolSize;
46 unsigned long _moleculesFromThisProcess;
The MoleculeIdPool manages molecule ID handling.
Definition: MoleculeIdPool.h:14
int getOwnerRank(unsigned long id)
Definition: MoleculeIdPool.h:28
unsigned long localIdRangeSize()
Definition: MoleculeIdPool.h:32
unsigned long getNewMoleculeId()
Definition: MoleculeIdPool.h:23