Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #13 from OpenSEMBA/feature/smbjson
Browse files Browse the repository at this point in the history
MInor in volprobes reading
  • Loading branch information
lmdiazangulo authored Apr 16, 2024
2 parents 153da74 + 6088de0 commit 71296f7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src_json_parser/smbjson.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 71296f7

Please sign in to comment.