diff --git a/src/ace.F90 b/src/ace.F90 index 3ab71869f4..32894116c3 100644 --- a/src/ace.F90 +++ b/src/ace.F90 @@ -13,7 +13,7 @@ module ace use material_header, only: Material use output, only: write_message, print_nuclide, header use string, only: split_string, str_to_int, str_to_real, & - lower_case, int_to_str + lower_case, to_str implicit none @@ -203,7 +203,7 @@ contains ! Check to make sure S(a,b) table matched a nuclide if (mat % sab_nuclide == 0) then message = "S(a,b) table " // trim(mat % sab_name) // " did not match & - &any nuclide on material " // trim(int_to_str(mat % id)) + &any nuclide on material " // trim(to_str(mat % id)) call fatal_error() end if end if diff --git a/src/endf.F90 b/src/endf.F90 index 5f35da5b07..92103b5c7e 100644 --- a/src/endf.F90 +++ b/src/endf.F90 @@ -1,7 +1,7 @@ module endf use constants - use string, only: int_to_str + use string, only: to_str contains @@ -72,7 +72,7 @@ contains case (N_NPA) string = '(n,npa)' case (N_N1 : N_N40) - string = '(n,n' // trim(int_to_str(MT-50)) // ')' + string = '(n,n' // trim(to_str(MT-50)) // ')' case (N_NC) string = '(n,nc)' case (N_GAMMA) @@ -122,27 +122,27 @@ contains case (444) string = '(damage)' case (600 : 648) - string = '(n,p' // trim(int_to_str(MT-600)) // ')' + string = '(n,p' // trim(to_str(MT-600)) // ')' case (649) string = '(n,pc)' case (650 : 698) - string = '(n,d' // trim(int_to_str(MT-650)) // ')' + string = '(n,d' // trim(to_str(MT-650)) // ')' case (699) string = '(n,dc)' case (700 : 748) - string = '(n,t' // trim(int_to_str(MT-700)) // ')' + string = '(n,t' // trim(to_str(MT-700)) // ')' case (749) string = '(n,tc)' case (750 : 798) - string = '(n,3He' // trim(int_to_str(MT-750)) // ')' + string = '(n,3He' // trim(to_str(MT-750)) // ')' case (799) string = '(n,3Hec)' case (800 : 848) - string = '(n,a' // trim(int_to_str(MT-800)) // ')' + string = '(n,a' // trim(to_str(MT-800)) // ')' case (849) string = '(n,tc)' case default - string = 'MT=' // trim(int_to_str(MT)) + string = 'MT=' // trim(to_str(MT)) end select end function reaction_name diff --git a/src/geometry.F90 b/src/geometry.F90 index 0c5945c09b..983cf5d3c1 100644 --- a/src/geometry.F90 +++ b/src/geometry.F90 @@ -7,7 +7,7 @@ module geometry use global use output, only: write_message use particle_header, only: Particle, LocalCoord, deallocate_coord - use string, only: int_to_str + use string, only: to_str use tally, only: score_surface_current implicit none @@ -249,7 +249,7 @@ contains surf => surfaces(abs(p % surface)) if (verbosity >= 10 .or. trace) then - message = " Crossing surface " // trim(int_to_str(surf % id)) + message = " Crossing surface " // trim(to_str(surf % id)) call write_message() end if @@ -274,7 +274,7 @@ contains ! Display message if (verbosity >= 10 .or. trace) then - message = " Leaked out of surface " // trim(int_to_str(surf % id)) + message = " Leaked out of surface " // trim(to_str(surf % id)) call write_message() end if return @@ -383,7 +383,7 @@ contains p % coord0 % uvw = (/ u, v, w /) case default message = "Reflection not supported for surface " // & - trim(int_to_str(surf % id)) + trim(to_str(surf % id)) call fatal_error() end select @@ -396,7 +396,7 @@ contains ! Diagnostic message if (verbosity >= 10 .or. trace) then - message = " Reflected from surface " // trim(int_to_str(surf%id)) + message = " Reflected from surface " // trim(to_str(surf%id)) call write_message() end if return @@ -428,7 +428,7 @@ contains ! Couldn't find next cell anywhere! if ((.not. found) .and. (.not. plotting)) then - message = "After particle crossed surface " // trim(int_to_str( & + message = "After particle crossed surface " // trim(to_str( & surfaces(abs(p%surface)) % id)) // " it could not be located in & &any cell and it did not leak." call fatal_error() @@ -455,9 +455,9 @@ contains lat => lattices(p % coord % lattice) if (verbosity >= 10 .or. trace) then - message = " Crossing lattice " // trim(int_to_str(lat % id)) // & - ". Current position (" // trim(int_to_str(p % coord % lattice_x)) & - // "," // trim(int_to_str(p % coord % lattice_y)) // ")" + message = " Crossing lattice " // trim(to_str(lat % id)) // & + ". Current position (" // trim(to_str(p % coord % lattice_x)) & + // "," // trim(to_str(p % coord % lattice_y)) // ")" call write_message() end if @@ -495,14 +495,14 @@ contains i_x = p % coord % lattice_x i_y = p % coord % lattice_y if (i_x < 1 .or. i_x > lat % n_x) then - message = "Reached edge of lattice " // trim(int_to_str(lat % id)) // & - " at position (" // trim(int_to_str(i_x)) // "," // & - trim(int_to_str(i_y)) // ")." + message = "Reached edge of lattice " // trim(to_str(lat % id)) // & + " at position (" // trim(to_str(i_x)) // "," // & + trim(to_str(i_y)) // ")." call fatal_error() elseif (i_y < 1 .or. i_y > lat % n_y) then - message = "Reached edge of lattice " // trim(int_to_str(lat % id)) // & - " at position (" // trim(int_to_str(i_x)) // "," // & - trim(int_to_str(i_y)) // ")." + message = "Reached edge of lattice " // trim(to_str(lat % id)) // & + " at position (" // trim(to_str(i_x)) // "," // & + trim(to_str(i_y)) // ")." call fatal_error() end if @@ -512,8 +512,8 @@ contains ! Find cell in next lattice element call find_cell(p, found) if (.not. found) then - message = "Could not locate particle in universe: " // & - int_to_str(universes(p % coord % universe) % id) + message = "Could not locate particle " // trim(to_str(p % id)) // & + " in universe " // to_str(universes(p % coord % universe) % id) call fatal_error() end if diff --git a/src/initialize.F90 b/src/initialize.F90 index 248387a8b6..1bcae2ef36 100644 --- a/src/initialize.F90 +++ b/src/initialize.F90 @@ -17,7 +17,7 @@ module initialize print_plot, create_summary_file use random_lcg, only: initialize_prng use source, only: initialize_source - use string, only: int_to_str, starts_with, ends_with, lower_case + use string, only: to_str, starts_with, ends_with, lower_case use tally, only: create_tally_map, TallyObject use timing, only: timer_start, timer_stop @@ -375,8 +375,8 @@ contains i_array = dict_get_key(surface_dict, abs(id)) c % surfaces(j) = sign(i_array, id) else - message = "Could not find surface " // trim(int_to_str(abs(id))) // & - " specified on cell " // trim(int_to_str(c % id)) + message = "Could not find surface " // trim(to_str(abs(id))) // & + " specified on cell " // trim(to_str(c % id)) call fatal_error() end if end if @@ -389,8 +389,8 @@ contains if (dict_has_key(universe_dict, id)) then c % universe = dict_get_key(universe_dict, id) else - message = "Could not find universe " // trim(int_to_str(id)) // & - " specified on cell " // trim(int_to_str(c % id)) + message = "Could not find universe " // trim(to_str(id)) // & + " specified on cell " // trim(to_str(c % id)) call fatal_error() end if @@ -403,8 +403,8 @@ contains c % type = CELL_NORMAL c % material = dict_get_key(material_dict, id) else - message = "Could not find material " // trim(int_to_str(id)) // & - " specified on cell " // trim(int_to_str(c % id)) + message = "Could not find material " // trim(to_str(id)) // & + " specified on cell " // trim(to_str(c % id)) call fatal_error() end if else @@ -416,8 +416,8 @@ contains c % type = CELL_LATTICE c % fill = dict_get_key(lattice_dict, id) else - message = "Specified fill " // trim(int_to_str(id)) // " on cell " // & - trim(int_to_str(c % id)) // " is neither a universe nor a lattice." + message = "Specified fill " // trim(to_str(id)) // " on cell " // & + trim(to_str(c % id)) // " is neither a universe nor a lattice." call fatal_error() end if end if @@ -434,8 +434,8 @@ contains if (dict_has_key(universe_dict, id)) then l % element(j,k) = dict_get_key(universe_dict, id) else - message = "Invalid universe number " // trim(int_to_str(id)) & - // " specified on lattice " // trim(int_to_str(l % id)) + message = "Invalid universe number " // trim(to_str(id)) & + // " specified on lattice " // trim(to_str(l % id)) call fatal_error() end if end do @@ -454,8 +454,8 @@ contains if (dict_has_key(cell_dict, id)) then t % cell_bins(j) % scalar = dict_get_key(cell_dict, id) else - message = "Could not find cell " // trim(int_to_str(id)) // & - " specified on tally " // trim(int_to_str(t % id)) + message = "Could not find cell " // trim(to_str(id)) // & + " specified on tally " // trim(to_str(t % id)) call fatal_error() end if end do @@ -470,8 +470,8 @@ contains if (dict_has_key(surface_dict, id)) then t % surface_bins(j) % scalar = dict_get_key(surface_dict, id) else - message = "Could not find surface " // trim(int_to_str(id)) // & - " specified on tally " // trim(int_to_str(t % id)) + message = "Could not find surface " // trim(to_str(id)) // & + " specified on tally " // trim(to_str(t % id)) call fatal_error() end if end do @@ -486,8 +486,8 @@ contains if (dict_has_key(universe_dict, id)) then t % universe_bins(j) % scalar = dict_get_key(universe_dict, id) else - message = "Could not find universe " // trim(int_to_str(id)) // & - " specified on tally " // trim(int_to_str(t % id)) + message = "Could not find universe " // trim(to_str(id)) // & + " specified on tally " // trim(to_str(t % id)) call fatal_error() end if end do @@ -502,8 +502,8 @@ contains if (dict_has_key(material_dict, id)) then t % material_bins(j) % scalar = dict_get_key(material_dict, id) else - message = "Could not find material " // trim(int_to_str(id)) // & - " specified on tally " // trim(int_to_str(t % id)) + message = "Could not find material " // trim(to_str(id)) // & + " specified on tally " // trim(to_str(t % id)) call fatal_error() end if end do @@ -518,8 +518,8 @@ contains if (dict_has_key(cell_dict, id)) then t % cellborn_bins(j) % scalar = dict_get_key(cell_dict, id) else - message = "Could not find material " // trim(int_to_str(id)) // & - " specified on tally " // trim(int_to_str(t % id)) + message = "Could not find material " // trim(to_str(id)) // & + " specified on tally " // trim(to_str(t % id)) call fatal_error() end if end do @@ -533,8 +533,8 @@ contains if (dict_has_key(mesh_dict, id)) then t % mesh = dict_get_key(mesh_dict, id) else - message = "Could not find mesh " // trim(int_to_str(id)) // & - " specified on tally " // trim(int_to_str(t % id)) + message = "Could not find mesh " // trim(to_str(id)) // & + " specified on tally " // trim(to_str(t % id)) call fatal_error() end if end if @@ -626,7 +626,7 @@ contains if (.not. (all(mat%atom_percent > ZERO) .or. & all(mat%atom_percent < ZERO))) then message = "Cannot mix atom and weight percents in material " // & - int_to_str(mat % id) + to_str(mat % id) call fatal_error() end if diff --git a/src/input_xml.F90 b/src/input_xml.F90 index f96682724a..e6c46cba60 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -8,7 +8,7 @@ module input_xml use global use mesh_header, only: StructuredMesh use output, only: write_message - use string, only: lower_case, int_to_str, str_to_int, str_to_real, & + use string, only: lower_case, to_str, str_to_int, str_to_real, & split_string, starts_with, ends_with use tally_header, only: TallyObject @@ -224,7 +224,7 @@ contains ! Check to make sure that either material or fill was specified if (c % material == 0 .and. c % fill == 0) then message = "Neither material nor fill was specified for cell " // & - trim(int_to_str(c % id)) + trim(to_str(c % id)) call fatal_error() end if @@ -238,7 +238,7 @@ contains ! Check to make sure that surfaces were specified if (.not. associated(cell_(i) % surfaces)) then message = "No surfaces specified for cell " // & - trim(int_to_str(c % id)) + trim(to_str(c % id)) call fatal_error() end if @@ -334,11 +334,11 @@ contains n = size(surface_(i) % coeffs) if (n < coeffs_reqd) then message = "Not enough coefficients specified for surface: " // & - trim(int_to_str(s % id)) + trim(to_str(s % id)) call fatal_error() elseif (n > coeffs_reqd) then message = "Too many coefficients specified for surface: " // & - trim(int_to_str(s % id)) + trim(to_str(s % id)) call fatal_error() else allocate(s % coeffs(n)) @@ -359,7 +359,7 @@ contains s % bc = BC_PERIODIC case default message = "Unknown boundary condition '" // trim(word) // & - "' specified on surface " // trim(int_to_str(s % id)) + "' specified on surface " // trim(to_str(s % id)) call fatal_error() end select @@ -507,14 +507,14 @@ contains m % density = 1.0e-24 * val case default message = "Unkwown units '" // trim(material_(i) % density % units) & - // "' specified on material " // trim(int_to_str(m % id)) + // "' specified on material " // trim(to_str(m % id)) call fatal_error() end select ! Check to ensure material has at least one nuclide if (.not. associated(material_(i) % nuclides)) then message = "No nuclides specified on material " // & - trim(int_to_str(m % id)) + trim(to_str(m % id)) call fatal_error() end if @@ -534,7 +534,7 @@ contains ! Check for empty name on nuclide if (len_trim(nuc % name) == 0) then message = "No name specified on nuclide in material " // & - trim(int_to_str(m % id)) + trim(to_str(m % id)) call fatal_error() end if @@ -542,7 +542,7 @@ contains if (len_trim(nuc % xs) == 0) then if (default_xs == '') then message = "No cross section specified for nuclide in material " & - // trim(int_to_str(m % id)) + // trim(to_str(m % id)) call fatal_error() else nuc % xs = default_xs @@ -733,7 +733,7 @@ contains if (len_trim(tally_(i) % filters % cell) > 0 .and. & len_trim(tally_(i) % filters % surface) > 0) then message = "Cannot specify both cell and surface filters for tally " & - // trim(int_to_str(t % id)) + // trim(to_str(t % id)) call fatal_error() end if @@ -788,8 +788,8 @@ contains i_mesh = dict_get_key(mesh_dict, id) m => meshes(i_mesh) else - message = "Could not find mesh " // trim(int_to_str(id)) // & - " specified on tally " // trim(int_to_str(t % id)) + message = "Could not find mesh " // trim(to_str(id)) // & + " specified on tally " // trim(to_str(t % id)) call fatal_error() end if diff --git a/src/interpolation.F90 b/src/interpolation.F90 index 8e3f083ff5..549b720e0b 100644 --- a/src/interpolation.F90 +++ b/src/interpolation.F90 @@ -5,7 +5,7 @@ module interpolation use error, only: fatal_error use global, only: message use search, only: binary_search - use string, only: int_to_str + use string, only: to_str implicit none @@ -118,7 +118,7 @@ contains r = (log(x) - log(x0))/(log(x1) - log(x0)) y = exp((1-r)*log(y0) + r*log(y1)) case default - message = "Unsupported interpolation scheme: " // int_to_str(interp) + message = "Unsupported interpolation scheme: " // to_str(interp) call fatal_error() end select @@ -204,7 +204,7 @@ contains r = (log(x) - log(x0))/(log(x1) - log(x0)) y = exp((1-r)*log(y0) + r*log(y1)) case default - message = "Unsupported interpolation scheme: " // int_to_str(interp) + message = "Unsupported interpolation scheme: " // to_str(interp) call fatal_error() end select diff --git a/src/main.F90 b/src/main.F90 index 9586f8bc40..199da60dc0 100644 --- a/src/main.F90 +++ b/src/main.F90 @@ -10,7 +10,7 @@ program main use physics, only: transport use random_lcg, only: set_particle_seed use source, only: get_source_particle - use string, only: int_to_str + use string, only: to_str use tally, only: synchronize_tallies, write_tallies, & tally_statistics use timing, only: timer_start, timer_stop @@ -88,7 +88,7 @@ contains ! Start timer for computation call timer_start(time_compute) - message = "Simulating cycle " // trim(int_to_str(i_cycle)) // "..." + message = "Simulating cycle " // trim(to_str(i_cycle)) // "..." call write_message(8) ! Set all tallies to zero diff --git a/src/output.F90 b/src/output.F90 index b09b97fb52..7b2898528c 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -10,7 +10,7 @@ module output use global use mesh_header, only: StructuredMesh use particle_header, only: Particle, LocalCoord - use string, only: upper_case, int_to_str, real_to_str + use string, only: upper_case, to_str use tally_header, only: TallyObject implicit none @@ -67,9 +67,9 @@ contains ! Write information on number of processors #ifdef MPI write(UNIT=OUTPUT_UNIT, FMT='(1X,A)') ' MPI Processes: ' // & - trim(int_to_str(n_procs)) + trim(to_str(n_procs)) write(UNIT=UNIT_SUMMARY, FMT='(1X,"MPI Processes:",1X,A)') & - trim(int_to_str(n_procs)) + trim(to_str(n_procs)) #endif end subroutine title @@ -213,13 +213,13 @@ contains ! display type of particle select case (p % type) case (NEUTRON) - write(ou,*) 'Neutron ' // int_to_str(p % id) + write(ou,*) 'Neutron ' // to_str(p % id) case (PHOTON) - write(ou,*) 'Photon ' // int_to_str(p % id) + write(ou,*) 'Photon ' // to_str(p % id) case (ELECTRON) - write(ou,*) 'Electron ' // int_to_str(p % id) + write(ou,*) 'Electron ' // to_str(p % id) case default - write(ou,*) 'Unknown Particle ' // int_to_str(p % id) + write(ou,*) 'Unknown Particle ' // to_str(p % id) end select ! loop through each level of universes @@ -227,26 +227,26 @@ contains i = 0 do while(associated(coord)) ! Print level - write(ou,*) ' Level ' // trim(int_to_str(i)) + write(ou,*) ' Level ' // trim(to_str(i)) ! Print cell for this level if (coord % cell /= NONE) then c => cells(coord % cell) - write(ou,*) ' Cell = ' // trim(int_to_str(c % id)) + write(ou,*) ' Cell = ' // trim(to_str(c % id)) end if ! Print universe for this level if (coord % universe /= NONE) then u => universes(coord % universe) - write(ou,*) ' Universe = ' // trim(int_to_str(u % id)) + write(ou,*) ' Universe = ' // trim(to_str(u % id)) end if ! Print information on lattice if (coord % lattice /= NONE) then l => lattices(coord % lattice) - write(ou,*) ' Lattice = ' // trim(int_to_str(l % id)) - write(ou,*) ' Lattice position = (' // trim(int_to_str(& - p % coord % lattice_x)) // ',' // trim(int_to_str(& + write(ou,*) ' Lattice = ' // trim(to_str(l % id)) + write(ou,*) ' Lattice position = (' // trim(to_str(& + p % coord % lattice_x)) // ',' // trim(to_str(& p % coord % lattice_y)) // ')' end if @@ -261,13 +261,13 @@ contains ! Print surface if (p % surface /= NONE) then s => surfaces(p % surface) - write(ou,*) ' Surface = ' // int_to_str(s % id) + write(ou,*) ' Surface = ' // to_str(s % id) end if - write(ou,*) ' Weight = ' // real_to_str(p % wgt) - write(ou,*) ' Energy = ' // real_to_str(p % E) - write(ou,*) ' IE = ' // int_to_str(p % IE) - write(ou,*) ' Interpolation factor = ' // real_to_str(p % interp) + write(ou,*) ' Weight = ' // to_str(p % wgt) + write(ou,*) ' Energy = ' // to_str(p % E) + write(ou,*) ' IE = ' // to_str(p % IE) + write(ou,*) ' Interpolation factor = ' // to_str(p % interp) write(ou,*) end subroutine print_particle @@ -281,12 +281,12 @@ contains type(Reaction), pointer :: rxn write(ou,*) 'Reaction ' // reaction_name(rxn % MT) - write(ou,*) ' MT = ' // int_to_str(rxn % MT) - write(ou,*) ' Q-value = ' // real_to_str(rxn % Q_value) - write(ou,*) ' TY = ' // int_to_str(rxn % TY) - write(ou,*) ' Starting index = ' // int_to_str(rxn % IE) + write(ou,*) ' MT = ' // to_str(rxn % MT) + write(ou,*) ' Q-value = ' // to_str(rxn % Q_value) + write(ou,*) ' TY = ' // to_str(rxn % TY) + write(ou,*) ' Starting index = ' // to_str(rxn % IE) if (rxn % has_energy_dist) then - write(ou,*) ' Energy: Law ' // int_to_str(rxn % edist % law) + write(ou,*) ' Energy: Law ' // to_str(rxn % edist % law) end if write(ou,*) @@ -315,28 +315,28 @@ contains unit_ = OUTPUT_UNIT end if - write(unit_,*) 'Cell ' // int_to_str(c % id) + write(unit_,*) 'Cell ' // to_str(c % id) temp = dict_get_key(cell_dict, c % id) - write(unit_,*) ' Array Index = ' // int_to_str(temp) + write(unit_,*) ' Array Index = ' // to_str(temp) u => universes(c % universe) - write(unit_,*) ' Universe = ' // int_to_str(u % id) + write(unit_,*) ' Universe = ' // to_str(u % id) select case (c % type) case (CELL_NORMAL) write(unit_,*) ' Fill = NONE' case (CELL_FILL) u => universes(c % fill) - write(unit_,*) ' Fill = Universe ' // int_to_str(u % id) + write(unit_,*) ' Fill = Universe ' // to_str(u % id) case (CELL_LATTICE) l => lattices(c % fill) - write(unit_,*) ' Fill = Lattice ' // int_to_str(l % id) + write(unit_,*) ' Fill = Lattice ' // to_str(l % id) end select if (c % material == 0) then write(unit_,*) ' Material = NONE' else m => materials(c % material) - write(unit_,*) ' Material = ' // int_to_str(m % id) + write(unit_,*) ' Material = ' // to_str(m % id) end if - write(unit_,*) ' Parent Cell = ' // int_to_str(c % parent) + write(unit_,*) ' Parent Cell = ' // to_str(c % parent) string = "" do i = 1, c % n_surfaces select case (c % surfaces(i)) @@ -349,7 +349,7 @@ contains case (OP_DIFFERENCE) string = trim(string) // ' !' case default - string = trim(string) // ' ' // int_to_str(c % surfaces(i)) + string = trim(string) // ' ' // to_str(c % surfaces(i)) end select end do write(unit_,*) ' Surface Specification:' // trim(string) @@ -377,12 +377,12 @@ contains unit_ = OUTPUT_UNIT end if - write(unit_,*) 'Universe ' // int_to_str(univ % id) - write(unit_,*) ' Level = ' // int_to_str(univ % level) + write(unit_,*) 'Universe ' // to_str(univ % id) + write(unit_,*) ' Level = ' // to_str(univ % level) string = "" do i = 1, univ % n_cells c => cells(univ % cells(i)) - string = trim(string) // ' ' // int_to_str(c % id) + string = trim(string) // ' ' // to_str(c % id) end do write(unit_,*) ' Cells =' // trim(string) write(unit_,*) @@ -406,13 +406,13 @@ contains unit_ = OUTPUT_UNIT end if - write(unit_,*) 'Lattice ' // int_to_str(lat % id) - write(unit_,*) ' n_x = ' // int_to_str(lat % n_x) - write(unit_,*) ' n_y = ' // int_to_str(lat % n_y) - write(unit_,*) ' x0 = ' // real_to_str(lat % x0) - write(unit_,*) ' y0 = ' // real_to_str(lat % y0) - write(unit_,*) ' width_x = ' // real_to_str(lat % width_x) - write(unit_,*) ' width_y = ' // real_to_str(lat % width_y) + write(unit_,*) 'Lattice ' // to_str(lat % id) + write(unit_,*) ' n_x = ' // to_str(lat % n_x) + write(unit_,*) ' n_y = ' // to_str(lat % n_y) + write(unit_,*) ' x0 = ' // to_str(lat % x0) + write(unit_,*) ' y0 = ' // to_str(lat % y0) + write(unit_,*) ' width_x = ' // to_str(lat % width_x) + write(unit_,*) ' width_y = ' // to_str(lat % width_y) write(unit_,*) end subroutine print_lattice @@ -436,7 +436,7 @@ contains unit_ = OUTPUT_UNIT end if - write(unit_,*) 'Surface ' // int_to_str(surf % id) + write(unit_,*) 'Surface ' // to_str(surf % id) select case (surf % type) case (SURF_PX) string = "X Plane" @@ -465,14 +465,14 @@ contains string = "" do i = 1, size(surf % coeffs) - string = trim(string) // ' ' // real_to_str(surf % coeffs(i), 4) + string = trim(string) // ' ' // to_str(surf % coeffs(i), 4) end do write(unit_,*) ' Coefficients = ' // trim(string) string = "" if (allocated(surf % neighbor_pos)) then do i = 1, size(surf % neighbor_pos) - string = trim(string) // ' ' // int_to_str(surf % neighbor_pos(i)) + string = trim(string) // ' ' // to_str(surf % neighbor_pos(i)) end do end if write(unit_,*) ' Positive Neighbors = ' // trim(string) @@ -480,7 +480,7 @@ contains string = "" if (allocated(surf % neighbor_neg)) then do i = 1, size(surf % neighbor_neg) - string = trim(string) // ' ' // int_to_str(surf % neighbor_neg(i)) + string = trim(string) // ' ' // to_str(surf % neighbor_neg(i)) end do end if write(unit_,*) ' Negative Neighbors =' // trim(string) @@ -520,10 +520,10 @@ contains end if ! Write identifier for material - write(unit_,*) 'Material ' // int_to_str(mat % id) + write(unit_,*) 'Material ' // to_str(mat % id) ! Write total atom density in atom/b-cm - write(unit_,*) ' Atom Density = ' // trim(real_to_str(mat % density)) & + write(unit_,*) ' Atom Density = ' // trim(to_str(mat % density)) & // ' atom/b-cm' ! Write atom density for each nuclide in material @@ -532,7 +532,7 @@ contains nuc => nuclides(mat % nuclide(i)) density = mat % atom_density(i) string = ' ' // trim(nuc % name) // ' = ' // & - trim(real_to_str(density)) // ' atom/b-cm' + trim(to_str(density)) // ' atom/b-cm' write(unit_,*) trim(string) end do @@ -569,14 +569,14 @@ contains unit_ = OUTPUT_UNIT end if - write(unit_,*) 'Tally ' // int_to_str(t % id) + write(unit_,*) 'Tally ' // to_str(t % id) if (t % n_bins(T_CELL) > 0) then string = "" do i = 1, t % n_bins(T_CELL) id = t % cell_bins(i) % scalar c => cells(id) - string = trim(string) // ' ' // trim(int_to_str(c % id)) + string = trim(string) // ' ' // trim(to_str(c % id)) end do write(unit_, *) ' Cell Bins:' // trim(string) end if @@ -586,7 +586,7 @@ contains do i = 1, t % n_bins(T_SURFACE) id = t % surface_bins(i) % scalar s => surfaces(id) - string = trim(string) // ' ' // trim(int_to_str(s % id)) + string = trim(string) // ' ' // trim(to_str(s % id)) end do write(unit_, *) ' Surface Bins:' // trim(string) end if @@ -596,7 +596,7 @@ contains do i = 1, t % n_bins(T_UNIVERSE) id = t % universe_bins(i) % scalar u => universes(id) - string = trim(string) // ' ' // trim(int_to_str(u % id)) + string = trim(string) // ' ' // trim(to_str(u % id)) end do write(unit_, *) ' Material Bins:' // trim(string) end if @@ -606,7 +606,7 @@ contains do i = 1, t % n_bins(T_MATERIAL) id = t % material_bins(i) % scalar m => materials(id) - string = trim(string) // ' ' // trim(int_to_str(m % id)) + string = trim(string) // ' ' // trim(to_str(m % id)) end do write(unit_, *) ' Material Bins:' // trim(string) end if @@ -615,9 +615,9 @@ contains string = "" id = t % mesh sm => meshes(id) - string = trim(string) // ' ' // trim(int_to_str(sm % dimension(1))) + string = trim(string) // ' ' // trim(to_str(sm % dimension(1))) do i = 2, sm % n_dimension - string = trim(string) // ' x ' // trim(int_to_str(sm % dimension(i))) + string = trim(string) // ' x ' // trim(to_str(sm % dimension(i))) end do write(unit_, *) ' Mesh Bins:' // trim(string) end if @@ -627,7 +627,7 @@ contains do i = 1, t % n_bins(T_CELLBORN) id = t % cellborn_bins(i) % scalar c => cells(id) - string = trim(string) // ' ' // trim(int_to_str(c % id)) + string = trim(string) // ' ' // trim(to_str(c % id)) end do write(unit_, *) ' Birth Region Bins:' // trim(string) end if @@ -635,7 +635,7 @@ contains if (t % n_bins(T_ENERGYIN) > 0) then string = "" do i = 1, t % n_bins(T_ENERGYIN) + 1 - string = trim(string) // ' ' // trim(real_to_str(& + string = trim(string) // ' ' // trim(to_str(& t % energy_in(i))) end do write(unit_,*) ' Incoming Energy Bins:' // trim(string) @@ -644,7 +644,7 @@ contains if (t % n_bins(T_ENERGYOUT) > 0) then string = "" do i = 1, t % n_bins(T_ENERGYOUT) + 1 - string = trim(string) // ' ' // trim(real_to_str(& + string = trim(string) // ' ' // trim(to_str(& t % energy_out(i))) end do write(unit_,*) ' Outgoing Energy Bins:' // trim(string) @@ -751,14 +751,14 @@ contains ! Basic nuclide information write(unit_,*) 'Nuclide ' // trim(nuc % name) - write(unit_,*) ' zaid = ' // trim(int_to_str(nuc % zaid)) - write(unit_,*) ' awr = ' // trim(real_to_str(nuc % awr)) - write(unit_,*) ' kT = ' // trim(real_to_str(nuc % kT)) - write(unit_,*) ' # of grid points = ' // trim(int_to_str(nuc % n_grid)) + write(unit_,*) ' zaid = ' // trim(to_str(nuc % zaid)) + write(unit_,*) ' awr = ' // trim(to_str(nuc % awr)) + write(unit_,*) ' kT = ' // trim(to_str(nuc % kT)) + write(unit_,*) ' # of grid points = ' // trim(to_str(nuc % n_grid)) write(unit_,*) ' Fissionable = ', nuc % fissionable - write(unit_,*) ' # of fission reactions = ' // trim(int_to_str(nuc % n_fission)) - write(unit_,*) ' # of reactions = ' // trim(int_to_str(nuc % n_reaction)) - write(unit_,*) ' Size of cross sections = ' // trim(int_to_str(& + write(unit_,*) ' # of fission reactions = ' // trim(to_str(nuc % n_fission)) + write(unit_,*) ' # of reactions = ' // trim(to_str(nuc % n_reaction)) + write(unit_,*) ' Size of cross sections = ' // trim(to_str(& size_xs)) // ' bytes' write(unit_,*) ' Reaction Q-value Mult IE size(angle) size(energy)' @@ -792,18 +792,18 @@ contains if (nuc % urr_present) then urr => nuc % urr_data write(unit_,*) ' Unresolved resonance probability table:' - write(unit_,*) ' # of energies = ' // trim(int_to_str(urr % n_energy)) - write(unit_,*) ' # of probabilities = ' // trim(int_to_str(urr % n_prob)) - write(unit_,*) ' Interpolation = ' // trim(int_to_str(urr % interp)) - write(unit_,*) ' Inelastic flag = ' // trim(int_to_str(urr % inelastic_flag)) - write(unit_,*) ' Absorption flag = ' // trim(int_to_str(urr % absorption_flag)) + write(unit_,*) ' # of energies = ' // trim(to_str(urr % n_energy)) + write(unit_,*) ' # of probabilities = ' // trim(to_str(urr % n_prob)) + write(unit_,*) ' Interpolation = ' // trim(to_str(urr % interp)) + write(unit_,*) ' Inelastic flag = ' // trim(to_str(urr % inelastic_flag)) + write(unit_,*) ' Absorption flag = ' // trim(to_str(urr % absorption_flag)) write(unit_,*) ' Multiply by smooth? ', urr % multiply_smooth - write(unit_,*) ' Min energy = ', trim(real_to_str(urr % energy(1))) - write(unit_,*) ' Max energy = ', trim(real_to_str(urr % energy(urr % n_energy))) + write(unit_,*) ' Min energy = ', trim(to_str(urr % energy(1))) + write(unit_,*) ' Max energy = ', trim(to_str(urr % energy(urr % n_energy))) end if ! Write total memory used - write(unit_,*) ' Total memory used = ' // trim(int_to_str(size_total)) & + write(unit_,*) ' Total memory used = ' // trim(to_str(size_total)) & // ' bytes' ! Blank line at end of nuclide @@ -861,8 +861,8 @@ contains ! print summary of unionized energy grid call header("UNIONIZED ENERGY GRID", unit=UNIT_SUMMARY) - write(UNIT_SUMMARY,*) "Points on energy grid: " // trim(int_to_str(n_grid)) - write(UNIT_SUMMARY,*) "Extra storage required: " // trim(int_to_str(& + write(UNIT_SUMMARY,*) "Points on energy grid: " // trim(to_str(n_grid)) + write(UNIT_SUMMARY,*) "Extra storage required: " // trim(to_str(& n_grid*n_nuclides_total*4)) // " bytes" ! print summary of variance reduction @@ -872,9 +872,9 @@ contains else write(UNIT_SUMMARY,100) "Survival Biasing:", "off" end if - string = real_to_str(weight_cutoff) + string = to_str(weight_cutoff) write(UNIT_SUMMARY,100) "Weight Cutoff:", trim(string) - string = real_to_str(weight_survive) + string = to_str(weight_survive) write(UNIT_SUMMARY,100) "Survival weight:", trim(string) ! Format descriptor for columns @@ -893,16 +893,16 @@ contains call header("PLOTTING SUMMARY") ! Print plotting origin - write(ou,100) "Plotting Origin:", trim(real_to_str(plot_origin(1))) // & - " " // trim(real_to_str(plot_origin(2))) // " " // & - trim(real_to_str(plot_origin(3))) + write(ou,100) "Plotting Origin:", trim(to_str(plot_origin(1))) // & + " " // trim(to_str(plot_origin(2))) // " " // & + trim(to_str(plot_origin(3))) ! Print plotting width - write(ou,100) "Plotting Width:", trim(real_to_str(plot_width(1))) // & - " " // trim(real_to_str(plot_width(2))) + write(ou,100) "Plotting Width:", trim(to_str(plot_width(1))) // & + " " // trim(to_str(plot_width(2))) ! Print pixel width - write(ou,100) "Pixel Width:", trim(real_to_str(pixel)) + write(ou,100) "Pixel Width:", trim(to_str(pixel)) write(ou,*) ! Format descriptor for columns @@ -944,7 +944,7 @@ contains ! display calculate rate and final keff total_particles = n_particles * n_cycles speed = real(total_particles) / time_compute % elapsed - string = real_to_str(speed) + string = to_str(speed) write(ou,101) "Calculation Rate", trim(string) write(ou,102) "Final Keff", keff, keff_std write(ou,*) diff --git a/src/physics.F90 b/src/physics.F90 index 449ee990b5..685e379bd4 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -15,7 +15,7 @@ module physics use particle_header, only: Particle, LocalCoord use random_lcg, only: prn use search, only: binary_search - use string, only: int_to_str, real_to_str + use string, only: to_str use tally, only: score_tally, score_surface_current implicit none @@ -54,12 +54,12 @@ contains end if if (verbosity >= 9 .or. trace) then - message = "Simulating Particle " // trim(int_to_str(p % id)) + message = "Simulating Particle " // trim(to_str(p % id)) call write_message() end if if (verbosity >= 10 .or. trace) then - message = " Born in cell " // trim(int_to_str(& + message = " Born in cell " // trim(to_str(& cells(p % coord % cell) % id)) call write_message() end if @@ -126,7 +126,7 @@ contains ! If particle has too many events, display warning and kill it n_event = n_event + 1 if (n_event == MAX_EVENTS) then - message = "Particle " // trim(int_to_str(p%id)) // " underwent " & + message = "Particle " // trim(to_str(p%id)) // " underwent " & // "maximum number of events." call warning() p % alive = .false. @@ -168,7 +168,7 @@ contains ! Display information about collision if (verbosity >= 10 .or. trace) then message = " " // trim(reaction_name(MT)) // ". Energy = " // & - trim(real_to_str(p % E * 1e6_8)) // " eV." + trim(to_str(p % E * 1e6_8)) // " eV." call write_message() end if @@ -417,7 +417,7 @@ contains if (i > nuc % n_reaction) then message = "Did not sample any reaction for nuclide " // & trim(nuc % name) // " on material " // & - trim(int_to_str(mat % id)) + trim(to_str(mat % id)) call fatal_error() end if @@ -1136,7 +1136,7 @@ contains mu = mu0 + (sqrt(p0*p0 + 2*frac*(xi - c_k))-p0)/frac end if else - message = "Unknown interpolation type: " // trim(int_to_str(interp)) + message = "Unknown interpolation type: " // trim(to_str(interp)) call fatal_error() end if @@ -1148,7 +1148,7 @@ contains end if else - message = "Unknown angular distribution type: " // trim(int_to_str(type)) + message = "Unknown angular distribution type: " // trim(to_str(type)) call fatal_error() end if @@ -1455,7 +1455,7 @@ contains p_l_k)/frac end if else - message = "Unknown interpolation type: " // trim(int_to_str(INTT)) + message = "Unknown interpolation type: " // trim(to_str(INTT)) call fatal_error() end if @@ -1696,7 +1696,7 @@ contains KM_R = R_k + (R_k1 - R_k)*(E_out - E_l_k)/(E_l_k1 - E_l_k) KM_A = A_k + (A_k1 - A_k)*(E_out - E_l_k)/(E_l_k1 - E_l_k) else - message = "Unknown interpolation type: " // trim(int_to_str(INTT)) + message = "Unknown interpolation type: " // trim(to_str(INTT)) call fatal_error() end if @@ -1826,7 +1826,7 @@ contains p_l_k)/frac end if else - message = "Unknown interpolation type: " // trim(int_to_str(INTT)) + message = "Unknown interpolation type: " // trim(to_str(INTT)) call fatal_error() end if @@ -1879,7 +1879,7 @@ contains mu_out = mu_k + (sqrt(p_k*p_k + 2*frac*(r3 - c_k))-p_k)/frac end if else - message = "Unknown interpolation type: " // trim(int_to_str(JJ)) + message = "Unknown interpolation type: " // trim(to_str(JJ)) call fatal_error() end if diff --git a/src/source.F90 b/src/source.F90 index f296c2c5b6..1ecea63eda 100644 --- a/src/source.F90 +++ b/src/source.F90 @@ -9,7 +9,7 @@ module source use particle_header, only: Particle, initialize_particle use physics, only: watt_spectrum use random_lcg, only: prn, set_particle_seed - use string, only: int_to_str + use string, only: to_str implicit none @@ -51,7 +51,7 @@ contains bytes = maxwork * 64 / 8 #endif message = "Could not allocate source bank. Attempted to allocate " & - // trim(int_to_str(bytes)) // " bytes." + // trim(to_str(bytes)) // " bytes." call fatal_error() end if @@ -64,7 +64,7 @@ contains bytes = 3 * maxwork * 64 / 8 #endif message = "Could not allocate fission bank. Attempted to allocate " & - // trim(int_to_str(bytes)) // " bytes." + // trim(to_str(bytes)) // " bytes." call fatal_error() end if @@ -74,7 +74,7 @@ contains p_max = external_source%values(4:6) else message = "Unsupported external source type: " // & - int_to_str(external_source%type) + to_str(external_source%type) call fatal_error() end if diff --git a/src/string.F90 b/src/string.F90 index ae8991b849..2800d84c12 100644 --- a/src/string.F90 +++ b/src/string.F90 @@ -6,8 +6,8 @@ module string implicit none - interface int_to_str - module procedure int4_to_str, int8_to_str + interface to_str + module procedure int4_to_str, int8_to_str, real_to_str end interface contains diff --git a/src/tally.F90 b/src/tally.F90 index 23d0e9bc9e..a1d66674ec 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -7,7 +7,7 @@ module tally use mesh_header, only: StructuredMesh use output, only: header use search, only: binary_search - use string, only: int_to_str, real_to_str + use string, only: to_str use tally_header, only: TallyScore, TallyMapItem, TallyMapElement #ifdef MPI @@ -966,7 +966,7 @@ contains t => tallies(i) ! Write header block - call header("TALLY " // trim(int_to_str(t % id)), unit=UNIT_TALLY, level=3) + call header("TALLY " // trim(to_str(t % id)), unit=UNIT_TALLY, level=3) ! Handle surface current tallies separately if (t % surface_current) then @@ -1048,8 +1048,8 @@ contains do k = 1, t % n_macro_bins write(UNIT=UNIT_TALLY, FMT='(1X,2A,1X,A,"+/- ",A)') & repeat(" ", indent), macro_name(abs(t % macro_bins(k) % scalar)), & - real_to_str(t % scores(score_index,k) % val), & - trim(real_to_str(t % scores(score_index,k) % val_sq)) + to_str(t % scores(score_index,k) % val), & + trim(to_str(t % scores(score_index,k) % val_sq)) end do indent = indent - 2 @@ -1099,14 +1099,14 @@ contains end if do i = 1, m % dimension(1) - string = "Mesh Index (" // trim(int_to_str(i)) // ", " + string = "Mesh Index (" // trim(to_str(i)) // ", " len1 = len_trim(string) do j = 1, m % dimension(2) - string = string(1:len1+1) // trim(int_to_str(j)) // ", " + string = string(1:len1+1) // trim(to_str(j)) // ", " len2 = len_trim(string) do k = 1, m % dimension(3) ! Write mesh cell index - string = string(1:len2+1) // trim(int_to_str(k)) // ")" + string = string(1:len2+1) // trim(to_str(k)) // ")" write(UNIT=UNIT_TALLY, FMT='(1X,A)') trim(string) do l = 1, n @@ -1125,15 +1125,15 @@ contains score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Outgoing Current to Left", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) bins(TS_SURFACE) = OUT_RIGHT score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Incoming Current from Left", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) ! Right Surface bins(1:3) = (/ i, j, k /) + 1 @@ -1141,15 +1141,15 @@ contains score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Incoming Current from Right", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) bins(TS_SURFACE) = OUT_RIGHT score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Outgoing Current to Right", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) ! Back Surface bins(1:3) = (/ i, j-1, k /) + 1 @@ -1157,15 +1157,15 @@ contains score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Outgoing Current to Back", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) bins(TS_SURFACE) = OUT_FRONT score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Incoming Current from Back", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) ! Front Surface bins(1:3) = (/ i, j, k /) + 1 @@ -1173,15 +1173,15 @@ contains score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Incoming Current from Front", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) bins(TS_SURFACE) = OUT_FRONT score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Outgoing Current to Front", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) ! Bottom Surface bins(1:3) = (/ i, j, k-1 /) + 1 @@ -1189,15 +1189,15 @@ contains score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Outgoing Current to Bottom", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) bins(TS_SURFACE) = OUT_TOP score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Incoming Current from Bottom", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) ! Top Surface bins(1:3) = (/ i, j, k /) + 1 @@ -1205,15 +1205,15 @@ contains score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Incoming Current from Top", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) bins(TS_SURFACE) = OUT_TOP score_index = sum((bins - 1) * t % stride) + 1 write(UNIT=UNIT_TALLY, FMT='(5X,A,T35,A,"+/- ",A)') & "Outgoing Current to Top", & - real_to_str(t % scores(score_index,1) % val), & - trim(real_to_str(t % scores(score_index,1) % val_sq)) + to_str(t % scores(score_index,1) % val), & + trim(to_str(t % scores(score_index,1) % val_sq)) end do end do @@ -1243,38 +1243,38 @@ contains select case(filter_type) case (T_UNIVERSE) i = t % universe_bins(bin) % scalar - label = int_to_str(universes(i) % id) + label = to_str(universes(i) % id) case (T_MATERIAL) i = t % material_bins(bin) % scalar - label = int_to_str(materials(i) % id) + label = to_str(materials(i) % id) case (T_CELL) i = t % cell_bins(bin) % scalar - label = int_to_str(cells(i) % id) + label = to_str(cells(i) % id) case (T_CELLBORN) i = t % cellborn_bins(bin) % scalar - label = int_to_str(cells(i) % id) + label = to_str(cells(i) % id) case (T_SURFACE) i = t % surface_bins(bin) % scalar - label = int_to_str(surfaces(i) % id) + label = to_str(surfaces(i) % id) case (T_MESH) m => meshes(t % mesh) allocate(ijk(m % n_dimension)) call bin_to_mesh_indices(m, bin, ijk) if (m % n_dimension == 2) then - label = "Index (" // trim(int_to_str(ijk(1))) // ", " // & - trim(int_to_str(ijk(2))) // ")" + label = "Index (" // trim(to_str(ijk(1))) // ", " // & + trim(to_str(ijk(2))) // ")" elseif (m % n_dimension == 3) then - label = "Index (" // trim(int_to_str(ijk(1))) // ", " // & - trim(int_to_str(ijk(2))) // ", " // trim(int_to_str(ijk(3))) // ")" + label = "Index (" // trim(to_str(ijk(1))) // ", " // & + trim(to_str(ijk(2))) // ", " // trim(to_str(ijk(3))) // ")" end if case (T_ENERGYIN) E0 = t % energy_in(bin) E1 = t % energy_in(bin + 1) - label = "[" // trim(real_to_str(E0)) // ", " // trim(real_to_str(E1)) // ")" + label = "[" // trim(to_str(E0)) // ", " // trim(to_str(E1)) // ")" case (T_ENERGYOUT) E0 = t % energy_out(bin) E1 = t % energy_out(bin + 1) - label = "[" // trim(real_to_str(E0)) // ", " // trim(real_to_str(E1)) // ")" + label = "[" // trim(to_str(E0)) // ", " // trim(to_str(E1)) // ")" end select end function get_label