From e79932e44298a1cc6174ebbf06aa99850c3d15e4 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Wed, 4 Mar 2020 18:47:19 -0600 Subject: [PATCH] Fixes after rebase. --- include/openmc/mesh.h | 4 ++++ src/mesh.cpp | 13 +++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/openmc/mesh.h b/include/openmc/mesh.h index aa1693b69f..c0b1dbefcd 100644 --- a/include/openmc/mesh.h +++ b/include/openmc/mesh.h @@ -219,6 +219,10 @@ public: double negative_grid_boundary(int* ijk, int i) const override; + std::string bin_label(int bin) const override; + + int n_surface_bins() const override; + std::pair, std::vector> plot(Position plot_ll, Position plot_ur) const override; diff --git a/src/mesh.cpp b/src/mesh.cpp index f311448da5..e4edc3be42 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -1054,7 +1054,7 @@ RegularMesh::count_sites(const Particle::Bank* bank, return counts; } -std::string RegularMesh::get_label_for_bin(int bin) const { +std::string RegularMesh::bin_label(int bin) const { int ijk[n_dimension_]; get_indices_from_bin(bin, ijk); @@ -1067,10 +1067,6 @@ std::string RegularMesh::get_label_for_bin(int bin) const { return out.str(); } -double RegularMesh::get_volume_frac(int bin) const { - return volume_frac_; -} - //============================================================================== // RectilinearMesh implementation //============================================================================== @@ -1775,15 +1771,12 @@ UnstructuredMesh::bins_crossed(const Particle& p, auto tet = get_tet(segment_midpoint); if (tet) { bins.push_back(get_bin_from_ent_handle(tet)); - lengths.push_back((hit.first - last_dist) / track_len); + lengths.push_back((hit->first - last_dist) / track_len); } else { // if in the loop, we should always find a tet warning("No tet found for location between trianle hits"); } - bins.push_back(bin); - lengths.push_back(segment_length / track_len); - } // tally remaining portion of track after last hit if @@ -2334,7 +2327,7 @@ LibMesh::bins_crossed(const Particle* p, lengths.clear(); for (const auto& hit : hits) { - lengths.push_back(hit.first / track_len); + lengths.push_back(hit->first / track_len); bins.push_back(get_bin_from_element(hit.second)); } }