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 f8e7ed1 commit 733996d
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,7 @@ void read_3d_model() {
assert_always(ncoord_model[0] * ncoord_model[1] * ncoord_model[2] == npts_model_in);

// for a 3D input model, the progation cells will match the input cells exactly
ncoordgrid[0] = ncoord_model[0];
ncoordgrid[1] = ncoord_model[1];
ncoordgrid[2] = ncoord_model[2];
ncoordgrid = ncoord_model;
ngrid = npts_model_in;

double t_model_days{NAN};
Expand Down Expand Up @@ -1376,18 +1374,12 @@ void setup_grid_cartesian_3d() {
// Set grid size for uniform xyz grid
if (get_model_type() == GridType::CARTESIAN3D) {
// if we used in a 3D ejecta model, the propagation grid must match the input grid exactly
ncoordgrid[0] = ncoord_model[0];
ncoordgrid[1] = ncoord_model[1];
ncoordgrid[2] = ncoord_model[2];

// in case the user specified a grid size, we should ensure that it matches
assert_always(ncoordgrid[0] == CUBOID_NCOORDGRID_X || CUBOID_NCOORDGRID_X < 0);
assert_always(ncoordgrid[1] == CUBOID_NCOORDGRID_Y || CUBOID_NCOORDGRID_Y < 0);
assert_always(ncoordgrid[2] == CUBOID_NCOORDGRID_Z || CUBOID_NCOORDGRID_Z < 0);
} else {
ncoordgrid[0] = CUBOID_NCOORDGRID_X;
ncoordgrid[1] = CUBOID_NCOORDGRID_Y;
ncoordgrid[2] = CUBOID_NCOORDGRID_Z;
ncoordgrid = {CUBOID_NCOORDGRID_X, CUBOID_NCOORDGRID_Y, CUBOID_NCOORDGRID_Z};
}

// artis assumes in some places that the cells are cubes, not cubioids
Expand Down

0 comments on commit 733996d

Please sign in to comment.