Skip to content

Commit

Permalink
save for later, maybe something
Browse files Browse the repository at this point in the history
  • Loading branch information
roryslange committed Dec 8, 2024
1 parent 8f7be1f commit ab56dc8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/CalculateEnergy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ SystemPotential CalculateEnergy::BoxForce(SystemPotential potential,
#else
#if defined _OPENMP && _OPENMP >= 201511 // check if OpenMP version is 4.5
#if GCC_VERSION >= 90000
#pragma omp parallel for default(none) shared(boxAxes, cellStartIndex, \
#pragma omp parallel for collapse(3) schedule(dynamic) default(none) shared(boxAxes, cellStartIndex, \
cellVector, coords, mapParticleToCell, box, neighborList) \
reduction(+:tempREn, tempLJEn, aForcex[:atomCount], aForcey[:atomCount], \
aForcez[:atomCount], mForcex[:molCount], mForcey[:molCount], mForcez[:molCount])
Expand All @@ -348,16 +348,16 @@ reduction(+:tempREn, tempLJEn, aForcex[:atomCount], aForcey[:atomCount], \
#endif
#endif
for(int currParticleIdx = 0; currParticleIdx < (int) cellVector.size(); currParticleIdx++) {
int currParticle = cellVector[currParticleIdx];
int currCell = mapParticleToCell[currParticle];
//int currCell = mapParticleToCell[currParticle];

for(int nCellIndex = 0; nCellIndex < NUMBER_OF_NEIGHBOR_CELL; nCellIndex++) {
int neighborCell = neighborList[currCell][nCellIndex];
//int neighborCell = neighborList[currCell][nCellIndex];
//int endIndex = cellStartIndex[neighborList[currCell][nCellIndex] + 1];

int endIndex = cellStartIndex[neighborCell + 1];
for(int nParticleIndex = cellStartIndex[neighborCell];
nParticleIndex < endIndex; nParticleIndex++) {
for(int nParticleIndex = cellStartIndex[neighborList[mapParticleToCell[cellVector[currParticleIdx]]][nCellIndex]];
nParticleIndex < cellStartIndex[neighborList[mapParticleToCell[cellVector[currParticleIdx]]][nCellIndex] + 1]; nParticleIndex++) {
int nParticle = cellVector[nParticleIndex];
int currParticle = cellVector[currParticleIdx];

if(currParticle < nParticle && particleMol[currParticle] != particleMol[nParticle]) {
double distSq;
Expand Down

0 comments on commit ab56dc8

Please sign in to comment.