diff --git a/src_json_parser/smbjson.F90 b/src_json_parser/smbjson.F90 index 10cd2e4e..9e7d125b 100644 --- a/src_json_parser/smbjson.F90 +++ b/src_json_parser/smbjson.F90 @@ -931,9 +931,10 @@ function readVolProbe(p) result(res) res%cordinates(i)%Or = buildVolProbeType(fieldType, component) end do else - res%cordinates(i) = cs(1) + allocate(res%cordinates(1)) + res%cordinates(1) = cs(1) component = J_DIR_M - res%cordinates(i)%Or = buildVolProbeType(fieldType, component) + res%cordinates(1)%Or = buildVolProbeType(fieldType, component) endif res%len_cor = size(res%cordinates) @@ -1205,13 +1206,15 @@ function findSourcePositionInLinels(srcElemIds, linels) result(res) type(pixel_t), dimension(:), allocatable :: pixels integer :: res integer :: i + pixels = this%mesh%convertNodeToPixels(this%mesh%getNode(srcElemIds(1))) do i = 1, size(linels) - if (all(linels(i)%cell ==pixels(1)%cell)) then + if (linels(i)%tag == pixels(1)%tag) then res = i return end if end do + write (error_unit, * ) "ERROR: Source could not be found in linels." end function