diff --git a/src/hdf5_interface.F90 b/src/hdf5_interface.F90 index 33a7cb6c56..6f081dfd32 100644 --- a/src/hdf5_interface.F90 +++ b/src/hdf5_interface.F90 @@ -172,7 +172,7 @@ contains type(Cell), pointer :: c => null() type(Surface), pointer :: s => null() type(Universe), pointer :: u => null() - type(Lattice), pointer :: l => null() + type(Lattice), pointer :: lat => null() ! Create group for geometry call h5gcreate_f(hdf5_output_file, "/geometry", geometry_group, hdf5_err) @@ -355,14 +355,14 @@ contains ! Write information on each lattice do i = 1, n_lattices - l => lattices(i) + lat => lattices(i) ! Create group for i-th lattice - call h5gcreate_f(lattice_group, "lattice " // trim(to_str(l % id)), & + call h5gcreate_f(lattice_group, "lattice " // trim(to_str(lat % id)), & temp_group, hdf5_err) ! Write lattice type - select case(l % type) + select case(lat % type) case (LATTICE_RECT) call h5ltmake_dataset_string_f(temp_group, "type", "rectangular", hdf5_err) case (LATTICE_HEX) @@ -372,20 +372,20 @@ contains ! Write lattice dimensions, lower left corner, and width of element dims(1) = 2 call h5ltmake_dataset_int_f(temp_group, "n_elements", 1, dims, & - (/ l % n_x, l % n_y /), hdf5_err) + (/ lat % n_x, lat % n_y /), hdf5_err) call h5ltmake_dataset_double_f(temp_group, "lower_left", 1, dims, & - (/ l % x0, l % y0 /), hdf5_err) + (/ lat % x0, lat % y0 /), hdf5_err) call h5ltmake_dataset_double_f(temp_group, "element_width", 1, dims, & - (/ l % width_x, l % width_y /), hdf5_err) + (/ lat % width_x, lat % width_y /), hdf5_err) ! Write lattice elements - allocate(lattice_universes(l % n_x, l % n_y)) - do j = 1, l % n_x - do k = 1, l % n_y - lattice_universes(j,k) = universes(l % element(j,k)) % id + allocate(lattice_universes(lat % n_x, lat % n_y)) + do j = 1, lat % n_x + do k = 1, lat % n_y + lattice_universes(j,k) = universes(lat % element(j,k)) % id end do end do - dims2 = (/ l % n_x, l % n_y /) + dims2 = (/ lat % n_x, lat % n_y /) call h5ltmake_dataset_int_f(temp_group, "elements", 2, dims2, & lattice_universes, hdf5_err) deallocate(lattice_universes) diff --git a/src/initialize.F90 b/src/initialize.F90 index 1df088badd..fdca8549e5 100644 --- a/src/initialize.F90 +++ b/src/initialize.F90 @@ -421,7 +421,7 @@ contains integer :: i_array ! index in surfaces/materials array integer :: id ! user-specified id type(Cell), pointer :: c => null() - type(Lattice), pointer :: l => null() + type(Lattice), pointer :: lat => null() type(TallyObject), pointer :: t => null() do i = 1, n_cells @@ -490,11 +490,11 @@ contains ! ADJUST UNIVERSE INDICES FOR EACH LATTICE do i = 1, n_lattices - l => lattices(i) - n_x = l % dimension(1) - n_y = l % dimension(2) - if (l % n_dimension == 3) then - n_z = l % dimension(3) + lat => lattices(i) + n_x = lat % dimension(1) + n_y = lat % dimension(2) + if (lat % n_dimension == 3) then + n_z = lat % dimension(3) else n_z = 1 end if @@ -502,12 +502,12 @@ contains do m = 1, n_z do k = 1, n_y do j = 1, n_x - id = l % element(j,k,m) + id = lat % element(j,k,m) if (universe_dict % has_key(id)) then - l % element(j,k,m) = universe_dict % get_key(id) + lat % element(j,k,m) = universe_dict % get_key(id) else message = "Invalid universe number " // trim(to_str(id)) & - // " specified on lattice " // trim(to_str(l % id)) + // " specified on lattice " // trim(to_str(lat % id)) call fatal_error() end if end do diff --git a/src/input_xml.F90 b/src/input_xml.F90 index b32a314000..f0a8acd5da 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -579,7 +579,7 @@ contains character(MAX_WORD_LEN) :: word type(Cell), pointer :: c => null() type(Surface), pointer :: s => null() - type(Lattice), pointer :: l => null() + type(Lattice), pointer :: lat => null() ! Display output message message = "Reading geometry XML file..." @@ -871,19 +871,19 @@ contains allocate(lattices(n_lattices)) do i = 1, n_lattices - l => lattices(i) + lat => lattices(i) ! ID of lattice - l % id = lattice_(i) % id + lat % id = lattice_(i) % id ! Read lattice type word = lattice_(i) % type call lower_case(word) select case (trim(word)) case ('rect', 'rectangle', 'rectangular') - l % type = LATTICE_RECT + lat % type = LATTICE_RECT case ('hex', 'hexagon', 'hexagonal') - l % type = LATTICE_HEX + lat % type = LATTICE_HEX case default message = "Invalid lattice type: " // trim(lattice_(i) % type) call fatal_error() @@ -896,9 +896,9 @@ contains call fatal_error() end if - l % n_dimension = n - allocate(l % dimension(n)) - l % dimension = lattice_(i) % dimension + lat % n_dimension = n + allocate(lat % dimension(n)) + lat % dimension = lattice_(i) % dimension ! Read lattice lower-left location if (size(lattice_(i) % dimension) /= size(lattice_(i) % lower_left)) then @@ -907,8 +907,8 @@ contains call fatal_error() end if - allocate(l % lower_left(n)) - l % lower_left = lattice_(i) % lower_left + allocate(lat % lower_left(n)) + lat % lower_left = lattice_(i) % lower_left ! Read lattice widths if (size(lattice_(i) % width) /= size(lattice_(i) % lower_left)) then @@ -917,23 +917,23 @@ contains call fatal_error() end if - allocate(l % width(n)) - l % width = lattice_(i) % width + allocate(lat % width(n)) + lat % width = lattice_(i) % width ! Copy number of dimensions - n_x = l % dimension(1) - n_y = l % dimension(2) - if (l % n_dimension == 3) then - n_z = l % dimension(3) + n_x = lat % dimension(1) + n_y = lat % dimension(2) + if (lat % n_dimension == 3) then + n_z = lat % dimension(3) else n_z = 1 end if - allocate(l % element(n_x, n_y, n_z)) + allocate(lat % element(n_x, n_y, n_z)) ! Check that number of universes matches size if (size(lattice_(i) % universes) /= n_x*n_y*n_z) then message = "Number of universes on does not match size of & - &lattice " // trim(to_str(l % id)) // "." + &lattice " // trim(to_str(lat % id)) // "." call fatal_error() end if @@ -941,14 +941,14 @@ contains do m = 1, n_z do k = 0, n_y - 1 do j = 1, n_x - l % element(j, n_y - k, m) = lattice_(i) % & + lat % element(j, n_y - k, m) = lattice_(i) % & universes(j + n_x*k + n_x*n_y*(m-1)) end do end do end do ! Add lattice to dictionary - call lattice_dict % add_key(l % id, i) + call lattice_dict % add_key(lat % id, i) end do