diff --git a/include/openmc/mesh.h b/include/openmc/mesh.h index af02dc8cb9..d91549d63b 100644 --- a/include/openmc/mesh.h +++ b/include/openmc/mesh.h @@ -83,6 +83,12 @@ public: //! \param[in] group HDF5 group virtual void to_hdf5(hid_t group) const = 0; + //! \param[in] bank Array of bank sites + //! \param[out] Whether any bank sites are outside the mesh + //! \return Array indicating number of sites in each mesh/energy bin + virtual xt::xarray + count_sites(const std::vector& bank, bool* outside) const; + //! Find the mesh lines that intersect an axis-aligned slice plot // //! \param[in] plot_ll The lower-left coordinates of the slice plot. @@ -404,7 +410,59 @@ private: std::pair get_score_tags(std::string score) const; +<<<<<<< HEAD // data members +======= +public: + + std::pair, std::vector> + plot(Position plot_ll, Position plot_ur) const override; + + //! Determine which surface bins were crossed by a particle. + // + //! \param[in] p Particle to check + //! \param[out] bins Surface bins that were crossed + void surface_bins_crossed(const Particle* p, std::vector& bins) const; + + //! Write mesh data to an HDF5 group. + // + //! \param[in] group HDF5 group + void to_hdf5(hid_t group) const; + + //! Get bin at a given position. + // + //! \param[in] r Position to get bin for + //! \return Mesh bin + int get_bin(Position r) const; + + std::string get_label_for_bin(int bin) const; + + int n_bins() const override; + + int n_surface_bins() const override; + + Position centroid(moab::EntityHandle tet) const; + + std::string bin_label(int bin) const override; + + //! Add a score to the mesh instance + void add_score(std::string score) const; + + //! Set data for a score + void set_score_data(const std::string& score, + std::vector values, + std::vector std_dev) const; + + //! Write the mesh with any current tally data + void write(std::string base_filename) const; + std::string filename_; //>>>>>> Using a common count_sites implementation. moab::Range ehs_; //!< Range of tetrahedra EntityHandle's in the mesh moab::EntityHandle tetset_; //!< EntitySet containing all tetrahedra moab::EntityHandle kdtree_root_; //!< Root of the MOAB KDTree diff --git a/src/mesh.cpp b/src/mesh.cpp index ea1dc3eb7e..856d525f10 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -2021,6 +2021,7 @@ UnstructuredMesh::count_sites(const std::vector& bank, } double UnstructuredMesh::get_volume_frac(int bin = -1) const { + return 0.0; }