define nlocal outside of OpenMP region

This commit is contained in:
Axel Kohlmeyer
2013-03-08 19:23:11 +01:00
parent 8b71c157de
commit 8861fa1340
4 changed files with 8 additions and 8 deletions

View File

@ -403,6 +403,7 @@ void PPPMDispOMP::make_rho_c()
// no local atoms => nothing else to do
const int nlocal = atom->nlocal;
if (nlocal == 0) return;
const int ix = nxhi_out - nxlo_out + 1;
@ -433,7 +434,6 @@ void PPPMDispOMP::make_rho_c()
// (dx,dy,dz) = distance to "lower left" grid pt
// loop over all local atoms for all threads
const int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++) {
const int nx = p2g[i].a;
@ -491,6 +491,7 @@ void PPPMDispOMP::make_rho_g()
// no local atoms => nothing else to do
const int nlocal = atom->nlocal;
if (nlocal == 0) return;
const int ix = nxhi_out_6 - nxlo_out_6 + 1;
@ -520,7 +521,6 @@ void PPPMDispOMP::make_rho_g()
// (dx,dy,dz) = distance to "lower left" grid pt
// loop over all local atoms for all threads
const int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++) {
const int nx = p2g[i].a;
@ -593,6 +593,7 @@ void PPPMDispOMP::make_rho_a()
// no local atoms => nothing else to do
const int nlocal = atom->nlocal;
if (nlocal == 0) return;
const int ix = nxhi_out_6 - nxlo_out_6 + 1;
@ -622,7 +623,6 @@ void PPPMDispOMP::make_rho_a()
// (dx,dy,dz) = distance to "lower left" grid pt
// loop over all local atoms for all threads
const int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++) {
const int nx = p2g[i].a;

View File

@ -480,6 +480,7 @@ void PPPMDispTIP4POMP::make_rho_c()
// no local atoms => nothing else to do
const int nlocal = atom->nlocal;
if (nlocal == 0) return;
const int ix = nxhi_out - nxlo_out + 1;
@ -512,7 +513,6 @@ void PPPMDispTIP4POMP::make_rho_c()
// (dx,dy,dz) = distance to "lower left" grid pt
// loop over all local atoms for all threads
const int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++) {
const int nx = p2g[i].a;
@ -575,6 +575,7 @@ void PPPMDispTIP4POMP::make_rho_g()
// no local atoms => nothing else to do
const int nlocal = atom->nlocal;
if (nlocal == 0) return;
const int ix = nxhi_out_6 - nxlo_out_6 + 1;
@ -604,7 +605,6 @@ void PPPMDispTIP4POMP::make_rho_g()
// (dx,dy,dz) = distance to "lower left" grid pt
// loop over all local atoms for all threads
const int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++) {
const int nx = p2g[i].a;
@ -677,6 +677,7 @@ void PPPMDispTIP4POMP::make_rho_a()
// no local atoms => nothing else to do
const int nlocal = atom->nlocal;
if (nlocal == 0) return;
const int ix = nxhi_out_6 - nxlo_out_6 + 1;
@ -706,7 +707,6 @@ void PPPMDispTIP4POMP::make_rho_a()
// (dx,dy,dz) = distance to "lower left" grid pt
// loop over all local atoms for all threads
const int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++) {
const int nx = p2g[i].a;

View File

@ -338,6 +338,7 @@ void PPPMOMP::make_rho()
// no local atoms => nothing else to do
const int nlocal = atom->nlocal;
if (nlocal == 0) return;
const int ix = nxhi_out - nxlo_out + 1;
@ -368,7 +369,6 @@ void PPPMOMP::make_rho()
// (dx,dy,dz) = distance to "lower left" grid pt
// loop over all local atoms for all threads
const int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++) {
const int nx = p2g[i].a;

View File

@ -394,6 +394,7 @@ void PPPMTIP4POMP::make_rho()
// no local atoms => nothing else to do
const int nlocal = atom->nlocal;
if (nlocal == 0) return;
const int ix = nxhi_out - nxlo_out + 1;
@ -426,7 +427,6 @@ void PPPMTIP4POMP::make_rho()
// (dx,dy,dz) = distance to "lower left" grid pt
// loop over all local atoms for all threads
const int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++) {
const int nx = p2g[i].a;