reverting
This commit is contained in:
@@ -2397,83 +2397,31 @@ int ScaLBL_Communicator::MemoryOptimizedLayoutAA(IntArray &Map, int *neighborLis
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ********* Exterior **********
|
||||
// Step 1/2: Index the outer walls of the grid only
|
||||
idx=0; next=0;
|
||||
for (k=1; k<Nz-1; k++){
|
||||
for (j=1; j<Ny-1; j++){
|
||||
for (i=1; i<Nx-1; i++){
|
||||
// domain interior
|
||||
Map(i,j,k) = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ********* Exterior **********
|
||||
// Step 1/2: Index the outer walls of the grid only
|
||||
idx=0; next=0;
|
||||
k=1;
|
||||
for (j=1; j<Ny-1; j++){
|
||||
for (i=1; i<Nx-1; i++){
|
||||
// Local index
|
||||
n = k*Nx*Ny+j*Nx+i;
|
||||
if (id[n] != 0){
|
||||
// Counts for the z faces
|
||||
Map(n)=idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
i=1;
|
||||
for (k=2; k<Nz-2; k++){
|
||||
for (j=1; j<Ny-1; j++){
|
||||
// Local index
|
||||
n = k*Nx*Ny+j*Nx+i;
|
||||
if (id[n] != 0){
|
||||
// Counts for the six faces
|
||||
Map(n)=idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
i=Nx-2;
|
||||
for (k=2; k<Nz-2; k++){
|
||||
for (j=1; j<Ny-1; j++){
|
||||
// Local index
|
||||
n = k*Nx*Ny+j*Nx+i;
|
||||
if (id[n] != 0){
|
||||
// Counts for the six faces
|
||||
Map(n)=idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
j=1;
|
||||
for (k=2; k<Nz-2; k++){
|
||||
for (i=2; i<Nx-2; i++){
|
||||
// Local index
|
||||
n = k*Nx*Ny+j*Nx+i;
|
||||
if (id[n] != 0){
|
||||
Map(n)=idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
j=Ny-2;
|
||||
for (k=2; k<Nz-2; k++){
|
||||
for (i=2; i<Nx-2; i++){
|
||||
// Local index
|
||||
n = k*Nx*Ny+j*Nx+i;
|
||||
if (id[n] != 0){
|
||||
Map(n)=idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
k=Nz-2;
|
||||
for (j=1; j<Ny-1; j++){
|
||||
for (i=1; i<Nx-1; i++){
|
||||
// Local index
|
||||
n = k*Nx*Ny+j*Nx+i;
|
||||
if (id[n] != 0){
|
||||
// Counts for the z faces
|
||||
Map(n)=idx++;
|
||||
// Local index
|
||||
n = k*Nx*Ny+j*Nx+i;
|
||||
if (id[n] != 0){
|
||||
// Counts for the six faces
|
||||
if (i==1) Map(n)=idx++;
|
||||
else if (j==1) Map(n)=idx++;
|
||||
else if (k==1) Map(n)=idx++;
|
||||
else if (i==Nx-2) Map(n)=idx++;
|
||||
else if (j==Ny-2) Map(n)=idx++;
|
||||
else if (k==Nz-2) Map(n)=idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
next=idx;
|
||||
|
||||
|
||||
// ********* Interior **********
|
||||
// align the next read
|
||||
|
||||
Reference in New Issue
Block a user