comparison src/Grids/tensor_grid.jl @ 1289:3b7ebd135918 refactor/grids

Remove _component_type and replace with eltype
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 03 Mar 2023 15:44:39 +0100
parents dcbac783e4c1
children 5f05a708d730
comparison
equal deleted inserted replaced
1288:7de1df0aad6a 1289:3b7ebd135918
77 end 77 end
78 78
79 79
80 function combined_coordinate_vector_type(coordinate_types...) 80 function combined_coordinate_vector_type(coordinate_types...)
81 combined_coord_length = mapreduce(_ncomponents, +, coordinate_types) 81 combined_coord_length = mapreduce(_ncomponents, +, coordinate_types)
82 combined_coord_type = mapreduce(_component_type, promote_type, coordinate_types) 82 combined_coord_type = mapreduce(eltype, promote_type, coordinate_types)
83 83
84 if combined_coord_length == 1 84 if combined_coord_length == 1
85 return combined_coord_type 85 return combined_coord_type
86 else 86 else
87 return SVector{combined_coord_length, combined_coord_type} 87 return SVector{combined_coord_length, combined_coord_type}