mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Add Doxygen comments, remove unused variables
This commit is contained in:
parent
f1fb400f92
commit
50dcae1772
10 changed files with 64 additions and 33 deletions
|
|
@ -140,7 +140,6 @@ extern "C" {
|
|||
extern int32_t n_filters;
|
||||
extern int32_t n_lattices;
|
||||
extern int32_t n_materials;
|
||||
extern int32_t n_meshes;
|
||||
extern int n_nuclides;
|
||||
extern int32_t n_plots;
|
||||
extern int32_t n_realizations;
|
||||
|
|
|
|||
|
|
@ -28,26 +28,76 @@ public:
|
|||
RegularMesh(pugi::xml_node node);
|
||||
|
||||
// Methods
|
||||
|
||||
//! Determine which bins were crossed by a particle
|
||||
//!
|
||||
//! \param[in] p Particle to check
|
||||
//! \param[out] bins Bins that were crossed
|
||||
//! \param[out] lengths Fraction of tracklength in each bin
|
||||
void bins_crossed(const Particle* p, std::vector<int>& bins,
|
||||
std::vector<double>& lengths);
|
||||
|
||||
//! 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<int>& bins);
|
||||
|
||||
//! Get bin at a given position in space
|
||||
//!
|
||||
//! \param[in] r Position to get bin for
|
||||
//! \return Mesh bin
|
||||
int get_bin(Position r);
|
||||
|
||||
//! Get bin given mesh indices
|
||||
//!
|
||||
//! \param[in] Array of mesh indices
|
||||
//! \return Mesh bin
|
||||
int get_bin_from_indices(const int* ijk);
|
||||
|
||||
//! Get mesh indices given a position
|
||||
//!
|
||||
//! \param[in] r Position to get indices for
|
||||
//! \param[out] ijk Array of mesh indices
|
||||
//! \param[out] in_mesh Whether position is in mesh
|
||||
void get_indices(Position r, int* ijk, bool* in_mesh);
|
||||
|
||||
//! Get mesh indices corresponding to a mesh bin
|
||||
//!
|
||||
//! \param[in] bin Mesh bin
|
||||
//! \param[out] ijk Mesh indices
|
||||
void get_indices_from_bin(int bin, int* ijk);
|
||||
|
||||
//! Check if a line connected by two points intersects the mesh
|
||||
//!
|
||||
//! \param[in] r0 Starting position
|
||||
//! \param[in] r1 Ending position
|
||||
//! \return Whether line connecting r0 and r1 intersects mesh
|
||||
bool intersects(Position r0, Position r1);
|
||||
|
||||
//! Write mesh data to an HDF5 group
|
||||
//!
|
||||
//! \param[in] group HDF5 group
|
||||
void to_hdf5(hid_t group);
|
||||
|
||||
//! Count number of bank sites in each mesh bin / energy bin
|
||||
//!
|
||||
//! \param[in] n Number of bank sites
|
||||
//! \param[in] bank Array of bank sites
|
||||
//! \param[in] n_energy Number of energies
|
||||
//! \param[in] energies Array of energies
|
||||
//! \param[out] Whether any bank sites are outside the mesh
|
||||
//! \return Array indicating number of sites in each mesh/energy bin
|
||||
xt::xarray<double> count_sites(int64_t n, const Bank* bank,
|
||||
int n_energy, const double* energies, bool* outside);
|
||||
|
||||
int id_ {-1}; //!< User-specified ID
|
||||
int n_dimension_;
|
||||
double volume_frac_;
|
||||
xt::xarray<int> shape_;
|
||||
xt::xarray<double> lower_left_;
|
||||
xt::xarray<double> upper_right_;
|
||||
xt::xarray<double> width_;
|
||||
int n_dimension_; //!< Number of dimensions
|
||||
double volume_frac_; //!< Volume fraction of each mesh element
|
||||
xt::xarray<int> shape_; //!< Number of mesh elements in each dimension
|
||||
xt::xarray<double> lower_left_; //!< Lower-left coordinates of mesh
|
||||
xt::xarray<double> upper_right_; //!< Upper-right coordinates of mesh
|
||||
xt::xarray<double> width_; //!< Width of each mesh element
|
||||
|
||||
private:
|
||||
bool intersects_1d(Position r0, Position r1);
|
||||
|
|
|
|||
|
|
@ -263,8 +263,6 @@ contains
|
|||
integer :: i_filt ! index in filters array
|
||||
integer :: filt_id
|
||||
integer :: tally_id
|
||||
integer :: iarray3(3) ! temp integer array
|
||||
real(8) :: rarray3(3) ! temp double array
|
||||
real(C_DOUBLE), allocatable :: energies(:)
|
||||
type(XMLNode) :: node_mesh
|
||||
|
||||
|
|
|
|||
|
|
@ -203,22 +203,14 @@ contains
|
|||
subroutine read_settings_xml_f(root_ptr) bind(C)
|
||||
type(C_PTR), value :: root_ptr
|
||||
|
||||
character(MAX_LINE_LEN) :: temp_str
|
||||
integer :: i
|
||||
integer :: n
|
||||
integer :: temp_int
|
||||
integer :: temp_int_array3(3)
|
||||
integer(C_INT32_T) :: i_start, i_end
|
||||
integer(C_INT) :: err
|
||||
integer, allocatable :: temp_int_array(:)
|
||||
integer :: n_tracks
|
||||
type(XMLNode) :: root
|
||||
type(XMLNode) :: node_entropy
|
||||
type(XMLNode) :: node_ufs
|
||||
type(XMLNode) :: node_sp
|
||||
type(XMLNode) :: node_res_scat
|
||||
type(XMLNode) :: node_vol
|
||||
type(XMLNode), allocatable :: node_mesh_list(:)
|
||||
type(XMLNode), allocatable :: node_vol_list(:)
|
||||
|
||||
! Get proper XMLNode type given pointer
|
||||
|
|
@ -1164,13 +1156,11 @@ contains
|
|||
character(MAX_WORD_LEN), allocatable :: sarray(:)
|
||||
type(DictCharInt) :: trigger_scores
|
||||
type(TallyFilterContainer), pointer :: f
|
||||
type(RegularMesh), pointer :: m
|
||||
type(XMLDocument) :: doc
|
||||
type(XMLNode) :: root
|
||||
type(XMLNode) :: node_tal
|
||||
type(XMLNode) :: node_filt
|
||||
type(XMLNode) :: node_trigger
|
||||
type(XMLNode), allocatable :: node_mesh_list(:)
|
||||
type(XMLNode), allocatable :: node_tal_list(:)
|
||||
type(XMLNode), allocatable :: node_filt_list(:)
|
||||
type(XMLNode), allocatable :: node_trigger_list(:)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module multipole_header
|
||||
|
||||
use constants
|
||||
use dict_header, only: DictIntInt
|
||||
use error, only: fatal_error
|
||||
use hdf5_interface
|
||||
|
||||
|
|
@ -74,12 +73,11 @@ contains
|
|||
character(len=*), intent(in) :: filename
|
||||
|
||||
character(len=10) :: version
|
||||
integer :: i, n_poles, n_residues, n_windows
|
||||
integer :: n_poles, n_residues, n_windows
|
||||
integer(HSIZE_T) :: dims_1d(1), dims_2d(2), dims_3d(3)
|
||||
integer(HID_T) :: file_id
|
||||
integer(HID_T) :: group_id
|
||||
integer(HID_T) :: dset
|
||||
type(DictIntInt) :: l_val_dict
|
||||
|
||||
! Open file for reading and move into the /isotope group
|
||||
file_id = file_open(filename, 'r', parallel=.true.)
|
||||
|
|
|
|||
|
|
@ -600,7 +600,6 @@ contains
|
|||
|
||||
integer :: i, j, k, l
|
||||
integer :: t
|
||||
integer :: m
|
||||
integer :: n
|
||||
integer :: n_grid
|
||||
integer :: i_fission
|
||||
|
|
|
|||
|
|
@ -1181,7 +1181,6 @@ contains
|
|||
integer :: nu_d(MAX_DELAYED_GROUPS) ! number of delayed neutrons born
|
||||
integer :: i ! loop index
|
||||
integer :: nu ! actual number of neutrons produced
|
||||
integer :: mesh_bin ! mesh bin for source site
|
||||
real(8) :: nu_t ! total nu
|
||||
real(8) :: weight ! weight adjustment for ufs method
|
||||
type(Nuclide), pointer :: nuc
|
||||
|
|
|
|||
|
|
@ -167,7 +167,6 @@ contains
|
|||
integer :: dg ! delayed group
|
||||
integer :: gout ! group out
|
||||
integer :: nu ! actual number of neutrons produced
|
||||
integer :: mesh_bin ! mesh bin for source site
|
||||
real(8) :: nu_t ! total nu
|
||||
real(8) :: mu ! fission neutron angular cosine
|
||||
real(8) :: phi ! fission neutron azimuthal angle
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include <cmath> // for ceil, pow
|
||||
#include <limits> // for numeric_limits
|
||||
#include <sstream>
|
||||
#include <stdexcept> // for out_of_range
|
||||
#include <string>
|
||||
|
||||
#include <omp.h>
|
||||
|
|
@ -490,13 +489,13 @@ void read_settings_xml()
|
|||
// Shannon Entropy mesh
|
||||
if (check_for_node(root, "entropy_mesh")) {
|
||||
int temp = std::stoi(get_node_value(root, "entropy_mesh"));
|
||||
try {
|
||||
index_entropy_mesh = mesh_map.at(temp);
|
||||
} catch (const std::out_of_range& e) {
|
||||
if (mesh_map.find(temp) == mesh_map.end()) {
|
||||
std::stringstream msg;
|
||||
msg << "Mesh " << temp << " specified for Shannon entropy does not exist.";
|
||||
fatal_error(msg);
|
||||
}
|
||||
index_entropy_mesh = mesh_map.at(temp);
|
||||
|
||||
} else if (check_for_node(root, "entropy")) {
|
||||
warning("Specifying a Shannon entropy mesh via the <entropy> element "
|
||||
"is deprecated. Please create a mesh using <mesh> and then reference "
|
||||
|
|
@ -535,14 +534,14 @@ void read_settings_xml()
|
|||
// Uniform fission source weighting mesh
|
||||
if (check_for_node(root, "ufs_mesh")) {
|
||||
auto temp = std::stoi(get_node_value(root, "ufs_mesh"));
|
||||
try {
|
||||
index_ufs_mesh = mesh_map.at(temp);
|
||||
} catch (const std::out_of_range& e) {
|
||||
if (mesh_map.find(temp) == mesh_map.end()) {
|
||||
std::stringstream msg;
|
||||
msg << "Mesh " << temp << " specified for uniform fission site method "
|
||||
"does not exist.";
|
||||
fatal_error(msg);
|
||||
}
|
||||
index_ufs_mesh = mesh_map.at(temp);
|
||||
|
||||
} else if (check_for_node(root, "uniform_fs")) {
|
||||
warning("Specifying a UFS mesh via the <uniform_fs> element "
|
||||
"is deprecated. Please create a mesh using <mesh> and then reference "
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ contains
|
|||
integer :: i_xs
|
||||
integer, allocatable :: id_array(:)
|
||||
integer(HID_T) :: file_id
|
||||
integer(HID_T) :: cmfd_group, tallies_group, tally_group, meshes_group, &
|
||||
integer(HID_T) :: cmfd_group, tallies_group, tally_group, &
|
||||
filters_group, filter_group, derivs_group, &
|
||||
deriv_group, runtime_group
|
||||
integer(C_INT) :: ignored_err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue