reverting
This commit is contained in:
@@ -2397,84 +2397,32 @@ 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 (k=1; k<Nz-1; k++){
|
||||||
for (j=1; j<Ny-1; j++){
|
for (j=1; j<Ny-1; j++){
|
||||||
for (i=1; i<Nx-1; i++){
|
for (i=1; i<Nx-1; i++){
|
||||||
// domain interior
|
// domain interior
|
||||||
Map(i,j,k) = -1;
|
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
|
// Local index
|
||||||
n = k*Nx*Ny+j*Nx+i;
|
n = k*Nx*Ny+j*Nx+i;
|
||||||
if (id[n] != 0){
|
if (id[n] != 0){
|
||||||
// Counts for the six faces
|
// Counts for the six faces
|
||||||
Map(n)=idx++;
|
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++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
next=idx;
|
next=idx;
|
||||||
|
|
||||||
|
|
||||||
// ********* Interior **********
|
// ********* Interior **********
|
||||||
// align the next read
|
// align the next read
|
||||||
first_interior=(next/16 + 1)*16;
|
first_interior=(next/16 + 1)*16;
|
||||||
|
|||||||
Reference in New Issue
Block a user