Skip to content

Commit

Permalink
fix ambiguous guard in relaxation
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeolson committed Jun 19, 2018
1 parent 8ced735 commit 0989b73
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pyamg/amg_core/relaxation.h
Expand Up @@ -688,16 +688,18 @@ void block_jacobi(const I Ap[], const int Ap_size,
// Carry out a block dot product between block row i and x
for(I jj = start; jj < end; jj++){
I j = Aj[jj];
if (i == j)
if (i == j) {
//diagonal, do nothing
continue;
else
}
else {
gemm(&(Ax[jj*blocksize_sq]), blocksize, blocksize, 'F',
&(temp[j*blocksize]), blocksize, 1, 'F',
&(v[0]), blocksize, 1, 'F',
'T');
for(I k = 0; k < blocksize; k++) {
rsum[k] += v[k]; }
}
}

// x[i*blocksize:(i+1)*blocksize] = (one - omega2) * temp[i*blocksize:(i+1)*blocksize] + omega2 *
Expand Down Expand Up @@ -773,17 +775,18 @@ void block_gauss_seidel(const I Ap[], const int Ap_size,
// Carry out a block dot product between block row i and x
for(I jj = start; jj < end; jj++){
I j = Aj[jj];
if (i == j)
if (i == j) {
//diagonal, do nothing
continue;
else
}
else {
gemm(&(Ax[jj*blocksize_sq]), blocksize, blocksize, 'F',
&(x[j*blocksize]), blocksize, 1, 'F',
&(v[0]), blocksize, 1, 'F',
'T');

for(I k = 0; k < blocksize; k++) {
rsum[k] += v[k]; }
}
}

// x[i*blocksize:(i+1)*blocksize] = (Dinv[i*blocksize_sq : (i+1)*blocksize_sq]*(b[i*blocksize:(i+1)*blocksize] - rsum[0:blocksize]));
Expand Down

0 comments on commit 0989b73

Please sign in to comment.