You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it should be possible to cast between integer and floating point types in tpf_data, but I'm not 100% sure if this simply can be changes without side effects.
The problem is, that the ParaView plugin cannot read grids with grid coordinates stored as integers.
The point type is i.e. hardcoded here as floating point type:
The problem is when point_t is floating point, the array is expected to contain float or double values. But I think it should also cast any integer array type to point_t. In general casting int to float should not be worse than casting double to float. Warnings about the precision lost are thrown anyway.
But this is only the perspective from the grid coordinates array, this function probably is also used for data arrays in general and I don't know if casting is then wanted in all cases.
The text was updated successfully, but these errors were encountered:
I think it should be possible to cast between integer and floating point types in tpf_data, but I'm not 100% sure if this simply can be changes without side effects.
The problem is, that the ParaView plugin cannot read grids with grid coordinates stored as integers.
The point type is i.e. hardcoded here as floating point type:
tpf/src/paraview/basic/modules/plic/tpf_plic.cpp
Line 66 in def9ba3
The grid coordinates are extracted here:
tpf/include/tpf/vtk/tpf_grid.inl
Line 60 in def9ba3
So basically the array is read and should be casted to point_t. (side note: i think
vtkFloatArray
should be changed tovtk_array<point_t>::type
)And finally the dynamic casting happens here:
tpf/include/tpf/vtk/tpf_data.inl
Lines 127 to 142 in def9ba3
The problem is when
point_t
is floating point, the array is expected to contain float or double values. But I think it should also cast any integer array type topoint_t
. In general casting int to float should not be worse than casting double to float. Warnings about the precision lost are thrown anyway.But this is only the perspective from the grid coordinates array, this function probably is also used for data arrays in general and I don't know if casting is then wanted in all cases.
The text was updated successfully, but these errors were encountered: