Skip to content

Commit

Permalink
fix indexing in grad at points
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylt committed Nov 16, 2023
1 parent 05f2b6a commit f2c153c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions interface/ceed-basis.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ int CeedBasisApplyAtPoints(CeedBasis basis, CeedInt num_points, CeedTransposeMod
else CeedCall(CeedChebyshevPolynomialsAtPoint(x_array_read[p * dim + d], Q_1d, chebyshev_x));
CeedCall(CeedTensorContractApply(basis->contract, pre, Q_1d, post, 1, chebyshev_x, t_mode, false,
d == 0 ? chebyshev_coeffs : tmp[d % 2],
d == (dim - 1) ? &v_array[p * num_comp * dim + pass] : tmp[(d + 1) % 2]));
d == (dim - 1) ? &v_array[(p * dim + pass) * num_comp] : tmp[(d + 1) % 2]));
pre /= Q_1d;
post *= 1;
}
Expand Down Expand Up @@ -1695,7 +1695,7 @@ int CeedBasisApplyAtPoints(CeedBasis basis, CeedInt num_points, CeedTransposeMod
else CeedCall(CeedChebyshevPolynomialsAtPoint(x_array_read[p * dim + d], Q_1d, chebyshev_x));
CeedCall(CeedTensorContractApply(
basis->contract, pre, 1, post, Q_1d, chebyshev_x, t_mode, (p > 0 || (p == 0 && pass > 0)) && d == (dim - 1),
d == 0 ? &u_array[p * num_comp * dim + pass] : tmp[d % 2], d == (dim - 1) ? chebyshev_coeffs : tmp[(d + 1) % 2]));
d == 0 ? &u_array[(p * dim + pass) * num_comp] : tmp[d % 2], d == (dim - 1) ? chebyshev_coeffs : tmp[(d + 1) % 2]));
pre /= 1;
post *= Q_1d;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/t591-operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CEED_QFUNCTION(setup)(void *ctx, const CeedInt Q, const CeedScalar *const *in, C
CeedScalar *q_data = out[0];

// Quadrature point loop
CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++) { q_data[i] = J[i][0][0] * J[i][1][0] - J[i][0][1] * J[i][1][1]; }
CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++) { q_data[i] = J[i][0][0] * J[i][1][1] - J[i][0][1] * J[i][1][0]; }
return 0;
}

Expand Down

0 comments on commit f2c153c

Please sign in to comment.