Commit 3ea6b6b5 authored by frozar's avatar frozar

[OUTPUT] Enhance the final print.

parent 2880ad20
...@@ -20,15 +20,23 @@ module test_type ...@@ -20,15 +20,23 @@ module test_type
subroutine print_type(ft) bind(c, name='print_type') subroutine print_type(ft) bind(c, name='print_type')
type(myftype) :: ft type(myftype) :: ft
! !
integer(c_int) :: i,j
real(c_double), dimension(:,:), pointer :: tab real(c_double), dimension(:,:), pointer :: tab
call c_f_pointer(fptr=tab,cptr=ft%my_mat,shape=(/ft%j,ft%i/)) call c_f_pointer(fptr=tab,cptr=ft%my_mat,shape=(/ft%j,ft%i/))
print *,'my mat : ' print *,'my mat :'
print *, ft%i print *, 'i :', ft%i
print *, ft%j print *, 'j :', ft%j
print *, tab print *, 'tab :'
print *,'param vector : ', ft%params do i = 1, ft%i
do j = 1, ft%j
write( *, '(f16.14, A)', advance = 'no' ), tab(j,i), ' '
end do
print *, ''
end do
print *,'param vector :', ft%params
print *,''
end subroutine end subroutine
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment