ftnlf

Check-in [8188e952f3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Another test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:8188e952f35ad73be171da04b75189e317167876
User & Date: vadim 2018-05-15 12:13:39
Context
2018-05-16
06:42
Replace LuaBinaries files with self-compiled Lua libraries. Also do some cleanup and fixes. check-in: d0702e682c user: vadim tags: trunk
2018-05-15
12:13
Another test. check-in: 8188e952f3 user: vadim tags: trunk
11:58
Try to remove unneeded stub file. check-in: e5a8015fca user: vadim tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test.f90.

110
111
112
113
114
115
116




117
118
119
120
121

    ! Generic iface, array I/O
    arr_m(1) = -0.9d0
    r = luafuna('', 'tbl1', 'valN', [1.d0,-3.5d0], fvals(1:2), &
        & [1.1d0, 1.2d0, 1.3d0, 1.4d0], arr_m, arr_o)
    write (*,'(L2,6(1X,1PE11.4))') r, fvals(1:2), arr_m(1:1), arr_o(1:3)





    ! Finalize
    call ftnlf_done()
    write (0,'(A)') 'Done.'

end program test







>
>
>
>





110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

    ! Generic iface, array I/O
    arr_m(1) = -0.9d0
    r = luafuna('', 'tbl1', 'valN', [1.d0,-3.5d0], fvals(1:2), &
        & [1.1d0, 1.2d0, 1.3d0, 1.4d0], arr_m, arr_o)
    write (*,'(L2,6(1X,1PE11.4))') r, fvals(1:2), arr_m(1:1), arr_o(1:3)

    r = luafuna('', 'tbl1', 'pk2', [10.d0, 20.d0], fvals(1:0), &
        & [ real(8) :: ], arr_m(1:0), arr_o(1:2))
    write (*,'(L2,6(1X,1PE11.4))') r, fvals(1:2), arr_m(1:1), arr_o(1:3)

    ! Finalize
    call ftnlf_done()
    write (0,'(A)') 'Done.'

end program test

Changes to testdb.lua.

7
8
9
10
11
12
13
14



15
16
17
18
19
20
21
valN = function(x,y,ai,am)
   local ao = FXC.array(10)
   ao[1] = (x+y)*ai[1]
   ao[2] = (x*y)/ai[2]
   ao[3] = math.atan2(y*ai[3],x*ai[4])
   am[1] = am[1]*(-10.)
   return x-y, x+y, ao
end



}

dir1 = {
   tbl1 = { v5 = function(x,y) return x-y end },
   tbl2 = { v6 = FXC.interp({-10,1,10,70}), v7 = -29.3e-4},

}







|
>
>
>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
valN = function(x,y,ai,am)
   local ao = FXC.array(10)
   ao[1] = (x+y)*ai[1]
   ao[2] = (x*y)/ai[2]
   ao[3] = math.atan2(y*ai[3],x*ai[4])
   am[1] = am[1]*(-10.)
   return x-y, x+y, ao
end,
pk2 = function(x,y)
   return FXC.apackt({x,y})
end,
}

dir1 = {
   tbl1 = { v5 = function(x,y) return x-y end },
   tbl2 = { v6 = FXC.interp({-10,1,10,70}), v7 = -29.3e-4},

}