Skip to content

Commit

Permalink
Merge pull request #9 from atpham88/main
Browse files Browse the repository at this point in the history
Fixed issues & tested
  • Loading branch information
atpham88 authored Feb 22, 2024
2 parents 33e754b + 99fdd79 commit a80110e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
Empty file modified ghxmodel/tess_windows.so
100644 → 100755
Empty file.
18 changes: 15 additions & 3 deletions src/GhpGhx.jl
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,18 @@ function size_borefield(p)
(Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int64}, Ptr{Int64}),
TimeArray, XIN, OUT, PAR, INFO, ErrorFound)
elseif p.ghx_model == "TESS"
if Sys.islinux() || Sys.isapple()
if Sys.islinux()
ccall((:type1373_, normpath(joinpath(@__DIR__,"../ghxmodel/tess_linux.so"))), Cvoid,
(Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int64}, Ptr{Int64}),
TimeArray, XIN, OUT, PAR, INFO, ErrorFound)
elseif Sys.iswindows()
ccall((:type1373_, normpath(joinpath(@__DIR__,"../ghxmodel/tess_windows.so"))), Cvoid,
(Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int64}, Ptr{Int64}),
TimeArray, XIN, OUT, PAR, INFO, ErrorFound)
elseif Sys.isapple()
ccall((:type1373_, normpath(joinpath(@__DIR__,"../ghxmodel/tess_mac.so"))), Cvoid,
(Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int64}, Ptr{Int64}),
TimeArray, XIN, OUT, PAR, INFO, ErrorFound)
end
end
INFO[13] = 0
Expand Down Expand Up @@ -746,28 +750,36 @@ function init_ghx_calls_2x!(p, TimeArray, XIN, OUT, PAR, INFO)
XIN[4] = 20.0

# First time
if Sys.islinux() || Sys.isapple()
if Sys.islinux()
ccall((:type1373_, normpath(joinpath(@__DIR__,"../ghxmodel/tess_linux.so"))), Cvoid,
(Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int64}, Ptr{Int64}),
TimeArray, XIN, OUT, PAR, INFO, ErrorFound)
elseif Sys.iswindows()
ccall((:type1373_, normpath(joinpath(@__DIR__,"../ghxmodel/tess_windows.so"))), Cvoid,
(Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int64}, Ptr{Int64}),
TimeArray, XIN, OUT, PAR, INFO, ErrorFound)
elseif Sys.isapple()
ccall((:type1373_, normpath(joinpath(@__DIR__,"../ghxmodel/tess_mac.so"))), Cvoid,
(Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int64}, Ptr{Int64}),
TimeArray, XIN, OUT, PAR, INFO, ErrorFound)
end

INFO[7] = 0
INFO[8] = 3

# Second time
if Sys.islinux() || Sys.isapple()
if Sys.islinux()
ccall((:type1373_, normpath(joinpath(@__DIR__,"../ghxmodel/tess_linux.so"))), Cvoid,
(Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int64}, Ptr{Int64}),
TimeArray, XIN, OUT, PAR, INFO, ErrorFound)
elseif Sys.iswindows()
ccall((:type1373_, normpath(joinpath(@__DIR__,"../ghxmodel/tess_windows.so"))), Cvoid,
(Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int64}, Ptr{Int64}),
TimeArray, XIN, OUT, PAR, INFO, ErrorFound)
elseif Sys.isapple()
ccall((:type1373_, normpath(joinpath(@__DIR__,"../ghxmodel/tess_mac.so"))), Cvoid,
(Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int64}, Ptr{Int64}),
TimeArray, XIN, OUT, PAR, INFO, ErrorFound)
end
end
end
Expand Down

0 comments on commit a80110e

Please sign in to comment.