Skip to content

Commit

Permalink
Update grid.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Aug 31, 2024
1 parent f05a287 commit d3207c2
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1424,9 +1424,7 @@ void setup_grid_spherical1d() {
for (int cellindex = 0; cellindex < get_npts_model(); cellindex++) {
const int mgi = cellindex; // interchangeable in this mode
const double v_inner = mgi > 0 ? vout_model[mgi - 1] : 0.;
cell[cellindex].pos_min[0] = v_inner * globals::tmin;
cell[cellindex].pos_min[1] = 0.;
cell[cellindex].pos_min[2] = 0.;
cell[cellindex].pos_min = {v_inner * globals::tmin, 0., 0.};
}
}

Expand All @@ -1436,9 +1434,7 @@ void setup_grid_cylindrical_2d() {
assert_always(vmax_corner < CLIGHT);

assert_always(get_model_type() == GridType::CYLINDRICAL2D);
coordlabel[0] = 'r';
coordlabel[1] = 'z';
coordlabel[2] = '_';
coordlabel = {'r', 'z', '_'};

ncoordgrid = ncoord_model;

Expand All @@ -1449,9 +1445,8 @@ void setup_grid_cylindrical_2d() {
const int n_rcyl = get_cellcoordpointnum(cellindex, 0);
const int n_z = get_cellcoordpointnum(cellindex, 1);

cell[cellindex].pos_min[0] = n_rcyl * globals::rmax / ncoord_model[0];
cell[cellindex].pos_min[1] = globals::rmax * (-1 + n_z * 2. / ncoord_model[1]);
cell[cellindex].pos_min[2] = 0.;
cell[cellindex].pos_min = {n_rcyl * globals::rmax / ncoord_model[0],
globals::rmax * (-1 + n_z * 2. / ncoord_model[1]), 0.};
}
}

Expand Down

0 comments on commit d3207c2

Please sign in to comment.