From 627c2a1fbea4bef45f6e9cb96f960c63b6d08fc1 Mon Sep 17 00:00:00 2001 From: JonWel Date: Thu, 19 Feb 2015 13:59:47 +0100 Subject: [PATCH 1/7] Delete CoolProp.jl Moved to 0.4+ --- wrappers/Julia/0.4/CoolProp.jl | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 wrappers/Julia/0.4/CoolProp.jl diff --git a/wrappers/Julia/0.4/CoolProp.jl b/wrappers/Julia/0.4/CoolProp.jl deleted file mode 100644 index a971d39b..00000000 --- a/wrappers/Julia/0.4/CoolProp.jl +++ /dev/null @@ -1,23 +0,0 @@ -module CoolProp - -export F2K, HAPropsSI, PropsSI, PhaseSI - -function F2K(TF::Float64) - return ccall( (:F2K, "CoolProp"), Cdouble, (Cdouble,), TF) -end - -function HAPropsSI(Output::String, Name1::String, Value1::Float64, Name2::String, Value2::Float64, Name3::String, Value3::Float64) - return ccall( (:HAPropsSI, "CoolProp"), Cdouble, (Ptr{UInt8},Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8},Float64), Output,Name1,Value1,Name2,Value2,Name3,Value3) -end - -function PropsSI(Output::String, Name1::String, Value1::Float64, Name2::String, Value2::Float64, Fluid::String) - return ccall( (:PropsSI, "CoolProp"), Cdouble, (Ptr{UInt8},Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8}), Output,Name1,Value1,Name2,Value2,Fluid) -end - -function PhaseSI(Name1::String, Value1::Float64, Name2::String, Value2::Float64, Fluid::String) - outstring = Array(UInt8, 255) - val = ccall( (:PhaseSI, "CoolProp"), Int32, (Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8}, Ptr{UInt8}, Int), Name1,Value1,Name2,Value2,Fluid,outstring,length(outstring)) - return bytestring(convert(Ptr{UInt8}, outstring)) -end - -end #module From 9c002660a21131c71207f9e8995faab9e4bdd592 Mon Sep 17 00:00:00 2001 From: JonWel Date: Thu, 19 Feb 2015 14:00:10 +0100 Subject: [PATCH 2/7] Create CoolProp.jl --- wrappers/Julia/0.4/CoolProp.jl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 wrappers/Julia/0.4/CoolProp.jl diff --git a/wrappers/Julia/0.4/CoolProp.jl b/wrappers/Julia/0.4/CoolProp.jl new file mode 100644 index 00000000..a971d39b --- /dev/null +++ b/wrappers/Julia/0.4/CoolProp.jl @@ -0,0 +1,23 @@ +module CoolProp + +export F2K, HAPropsSI, PropsSI, PhaseSI + +function F2K(TF::Float64) + return ccall( (:F2K, "CoolProp"), Cdouble, (Cdouble,), TF) +end + +function HAPropsSI(Output::String, Name1::String, Value1::Float64, Name2::String, Value2::Float64, Name3::String, Value3::Float64) + return ccall( (:HAPropsSI, "CoolProp"), Cdouble, (Ptr{UInt8},Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8},Float64), Output,Name1,Value1,Name2,Value2,Name3,Value3) +end + +function PropsSI(Output::String, Name1::String, Value1::Float64, Name2::String, Value2::Float64, Fluid::String) + return ccall( (:PropsSI, "CoolProp"), Cdouble, (Ptr{UInt8},Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8}), Output,Name1,Value1,Name2,Value2,Fluid) +end + +function PhaseSI(Name1::String, Value1::Float64, Name2::String, Value2::Float64, Fluid::String) + outstring = Array(UInt8, 255) + val = ccall( (:PhaseSI, "CoolProp"), Int32, (Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8}, Ptr{UInt8}, Int), Name1,Value1,Name2,Value2,Fluid,outstring,length(outstring)) + return bytestring(convert(Ptr{UInt8}, outstring)) +end + +end #module From c4c57ccf8d7510885c87bd64f1cf3afdfc7212f2 Mon Sep 17 00:00:00 2001 From: JonWel Date: Thu, 19 Feb 2015 14:15:39 +0100 Subject: [PATCH 3/7] Create CoolProp.jl For Julia 0.4 an upper --- wrappers/Julia/CoolProp.jl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 wrappers/Julia/CoolProp.jl diff --git a/wrappers/Julia/CoolProp.jl b/wrappers/Julia/CoolProp.jl new file mode 100644 index 00000000..a971d39b --- /dev/null +++ b/wrappers/Julia/CoolProp.jl @@ -0,0 +1,23 @@ +module CoolProp + +export F2K, HAPropsSI, PropsSI, PhaseSI + +function F2K(TF::Float64) + return ccall( (:F2K, "CoolProp"), Cdouble, (Cdouble,), TF) +end + +function HAPropsSI(Output::String, Name1::String, Value1::Float64, Name2::String, Value2::Float64, Name3::String, Value3::Float64) + return ccall( (:HAPropsSI, "CoolProp"), Cdouble, (Ptr{UInt8},Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8},Float64), Output,Name1,Value1,Name2,Value2,Name3,Value3) +end + +function PropsSI(Output::String, Name1::String, Value1::Float64, Name2::String, Value2::Float64, Fluid::String) + return ccall( (:PropsSI, "CoolProp"), Cdouble, (Ptr{UInt8},Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8}), Output,Name1,Value1,Name2,Value2,Fluid) +end + +function PhaseSI(Name1::String, Value1::Float64, Name2::String, Value2::Float64, Fluid::String) + outstring = Array(UInt8, 255) + val = ccall( (:PhaseSI, "CoolProp"), Int32, (Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8}, Ptr{UInt8}, Int), Name1,Value1,Name2,Value2,Fluid,outstring,length(outstring)) + return bytestring(convert(Ptr{UInt8}, outstring)) +end + +end #module From e8f5f29bc87170922f480e6af0fc6094fc15c03c Mon Sep 17 00:00:00 2001 From: JonWel Date: Thu, 19 Feb 2015 14:16:10 +0100 Subject: [PATCH 4/7] Delete CoolProp.jl Moved to the Julia folder --- wrappers/Julia/0.4/CoolProp.jl | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 wrappers/Julia/0.4/CoolProp.jl diff --git a/wrappers/Julia/0.4/CoolProp.jl b/wrappers/Julia/0.4/CoolProp.jl deleted file mode 100644 index a971d39b..00000000 --- a/wrappers/Julia/0.4/CoolProp.jl +++ /dev/null @@ -1,23 +0,0 @@ -module CoolProp - -export F2K, HAPropsSI, PropsSI, PhaseSI - -function F2K(TF::Float64) - return ccall( (:F2K, "CoolProp"), Cdouble, (Cdouble,), TF) -end - -function HAPropsSI(Output::String, Name1::String, Value1::Float64, Name2::String, Value2::Float64, Name3::String, Value3::Float64) - return ccall( (:HAPropsSI, "CoolProp"), Cdouble, (Ptr{UInt8},Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8},Float64), Output,Name1,Value1,Name2,Value2,Name3,Value3) -end - -function PropsSI(Output::String, Name1::String, Value1::Float64, Name2::String, Value2::Float64, Fluid::String) - return ccall( (:PropsSI, "CoolProp"), Cdouble, (Ptr{UInt8},Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8}), Output,Name1,Value1,Name2,Value2,Fluid) -end - -function PhaseSI(Name1::String, Value1::Float64, Name2::String, Value2::Float64, Fluid::String) - outstring = Array(UInt8, 255) - val = ccall( (:PhaseSI, "CoolProp"), Int32, (Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8}, Ptr{UInt8}, Int), Name1,Value1,Name2,Value2,Fluid,outstring,length(outstring)) - return bytestring(convert(Ptr{UInt8}, outstring)) -end - -end #module From 5c0c2ee33022827e1c9676f5a4e8c2a1fbf29901 Mon Sep 17 00:00:00 2001 From: JonWel Date: Thu, 19 Feb 2015 14:23:01 +0100 Subject: [PATCH 5/7] Update index.rst Add information about the separation of the wrapper in two versions. --- Web/coolprop/wrappers/Julia/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Web/coolprop/wrappers/Julia/index.rst b/Web/coolprop/wrappers/Julia/index.rst index cca09dac..94977a51 100644 --- a/Web/coolprop/wrappers/Julia/index.rst +++ b/Web/coolprop/wrappers/Julia/index.rst @@ -20,7 +20,8 @@ Download a precompiled shared library appropriate to the computer you are using NB: For Linux users, the file libCoolProp.so must be renamed into CoolProp.so and copied into Julia's library folder (e.g. /usr/lib/x86_64-linux-gnu/julia/) -Download the module ``CoolProp.jl`` from :sfdownloads:`sourceforge ` or the development version from :sfnightly:`the nightly snapshots ` and place in the same folder as the shared library +Download the module ``CoolProp.jl`` from :sfdownloads:`sourceforge ` or the development version from :sfnightly:`the nightly snapshots ` and place in the same folder as the shared library. +The wrapper should be valid for Julia 0.4 and upper. For Julia 0.3 and lower, use the one in the 0.3 folder. Usage ----- From 4bd84ca19fc9899f28dd72917fe863a7faece264 Mon Sep 17 00:00:00 2001 From: JonWel Date: Thu, 19 Feb 2015 14:29:20 +0100 Subject: [PATCH 6/7] Updated Julia config to match the new folder wrappers/Julia/CoolProp.jl for Julia 0.4 and upper wrappers/Julia/0.3/CoolProp.jl for Julia 0.3 and lower --- dev/buildbot/master/master.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dev/buildbot/master/master.cfg b/dev/buildbot/master/master.cfg index 956a51ca..c2155808 100644 --- a/dev/buildbot/master/master.cfg +++ b/dev/buildbot/master/master.cfg @@ -630,10 +630,9 @@ def julia_builder(gitMode = 'incremental'): factory.addStep(RemoveDirectory(dir="build/install_root/Julia", haltOnFailure = True)) factory.addStep(MakeDirectory(dir='build/install_root/Julia', haltOnFailure = True)) factory.addStep(MakeDirectory(dir='build/install_root/Julia/0.3', haltOnFailure = True)) - factory.addStep(MakeDirectory(dir='build/install_root/Julia/0.4', haltOnFailure = True)) # Copy other files factory.addStep(ShellCommand(command=["cp", "wrappers/Julia/0.3/CoolProp.jl", "install_root/Julia/0.3"], workdir = 'build', haltOnFailure = True)) - factory.addStep(ShellCommand(command=["cp", "wrappers/Julia/0.4/CoolProp.jl", "install_root/Julia/0.4"], workdir = 'build', haltOnFailure = True)) + factory.addStep(ShellCommand(command=["cp", "wrappers/Julia/CoolProp.jl", "install_root/Julia/"], workdir = 'build', haltOnFailure = True)) # Upload the files - TODO: Is this the correct directory? factory.addStep(DirectoryUpload(slavesrc="install_root",masterdest=masterdestLocation,url="binaries",compress="bz2")) return factory From 0d782a1ead0d1262c3596a95b7e1e66a14f2c3e8 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Thu, 19 Feb 2015 21:47:43 -0500 Subject: [PATCH 7/7] Slight wording change to Julia docs --- Web/coolprop/wrappers/Julia/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/coolprop/wrappers/Julia/index.rst b/Web/coolprop/wrappers/Julia/index.rst index 94977a51..6c401e70 100644 --- a/Web/coolprop/wrappers/Julia/index.rst +++ b/Web/coolprop/wrappers/Julia/index.rst @@ -21,7 +21,7 @@ Download a precompiled shared library appropriate to the computer you are using NB: For Linux users, the file libCoolProp.so must be renamed into CoolProp.so and copied into Julia's library folder (e.g. /usr/lib/x86_64-linux-gnu/julia/) Download the module ``CoolProp.jl`` from :sfdownloads:`sourceforge ` or the development version from :sfnightly:`the nightly snapshots ` and place in the same folder as the shared library. -The wrapper should be valid for Julia 0.4 and upper. For Julia 0.3 and lower, use the one in the 0.3 folder. +The wrapper should be valid for Julia 0.4 and above. For Julia 0.3 and lower, use the one in the 0.3 folder. Usage -----