From d3207c2f7bfcd3c23404bd24b364d44d478b865d Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Sat, 31 Aug 2024 16:13:36 +0100 Subject: [PATCH] Update grid.cc --- grid.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/grid.cc b/grid.cc index 5366bb27c..17a67d2a1 100644 --- a/grid.cc +++ b/grid.cc @@ -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.}; } } @@ -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; @@ -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.}; } }