Skip to content

Commit

Permalink
fix gcc error on gcc 4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Sep 9, 2023
1 parent 7426c8d commit 1758504
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mmc_mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,9 @@ float mesh_getreff(double n_in, double n_out) {
const double ostep = (M_PI / (2.0 * count));
double r_phi = 0.0, r_j = 0.0;
double o, cosop, coso, r_fres, tmp;
int i;

for (int i = 0; i < count; i++) {
for (i = 0; i < count; i++) {
o = i * ostep;
coso = cos(o);

Expand Down Expand Up @@ -845,7 +846,7 @@ void tracer_init(raytracer* tracer, tetmesh* pmesh, char methodid) {
*/

void tracer_prep(raytracer* tracer, mcconfig* cfg) {
int i, j, ne = tracer->mesh->ne;
int i, j, k, ne = tracer->mesh->ne;

if (tracer->n == NULL && tracer->m == NULL && tracer->d == NULL) {
if (tracer->mesh != NULL) {
Expand Down Expand Up @@ -917,7 +918,7 @@ void tracer_prep(raytracer* tracer, mcconfig* cfg) {
}
}

for (int k = 0; k < 3; k++) {
for (k = 0; k < 3; k++) {
int nid = elems[out[ifaceorder[j]][k]] - 1;

if (tracer->mesh->nvol[nid] > 0.f) { // change sign to prevent it from changing again
Expand Down

0 comments on commit 1758504

Please sign in to comment.