Skip to content

Commit

Permalink
Merge pull request #75 from porteri/speedup
Browse files Browse the repository at this point in the history
speedup by replacing individual call w/ array call
  • Loading branch information
porteri authored Feb 23, 2020
2 parents bd5d2f5 + bbfbac9 commit f4c188e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/legacy/VTK_attributes_procedures.f90
Original file line number Diff line number Diff line change
Expand Up @@ -300,17 +300,14 @@
!!
!! function converts an attribute to a dataarray
!!
integer(i4k) :: i

call array%initialize(name=trim(adjustl(me%dataname)), type=me%datatype)

do i = 1, me%nvals
if (allocated(me%ints)) then
call array%add([me%ints(i)])
else if (allocated(me%reals)) then
call array%add([me%reals(i)])
end if
end do
if (allocated(me%ints)) then
call array%add(me%ints)
else if (allocated(me%reals)) then
call array%add(me%reals)
end if

end procedure scalar_convert_to_dataarray

Expand Down

0 comments on commit f4c188e

Please sign in to comment.