Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
DANA-Laboratory committed Jan 4, 2017
1 parent f037439 commit cd40fdb
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 106 deletions.
6 changes: 3 additions & 3 deletions test/CoolPropConfig.jl
Expand Up @@ -19,7 +19,7 @@ ALTERNATIVE_REFPROP_HMX_BNC_PATH | "" | An alternative path to the HMX.BNC file.
VTPR_UNIFAQ_PATH | "" | The path to the directory containing the UNIFAQ JSON files. Should be slash terminated
"""
function set_config(key::AbstractString, val::AbstractString)
ccall( (:set_config_string, "CoolProp"), Void, (Ptr{UInt8},Ptr{UInt8}), key,val)
ccall( (:set_config_string, "CoolProp"), Void, (Cstring, Cstring), key,val)
return get_global_param_string("errstring")
end

Expand All @@ -40,7 +40,7 @@ R_U_CODATA | 8.3144598 | The value for the ideal gas constant in J/mol/K accord
SPINODAL_MINIMUM_DELTA | 0.5 | The minimal delta to be used in tracing out the spinodal; make sure that the EOS has a spinodal at this value of delta=rho/rho_r
"""
function set_config(key::AbstractString, val::Real)
ccall( (:set_config_double, "CoolProp"), Void, (Ptr{UInt8}, Float64), key, val)
ccall( (:set_config_double, "CoolProp"), Void, (Cstring, Cdouble), key, val)
return get_global_param_string("errstring")
end

Expand Down Expand Up @@ -70,6 +70,6 @@ OVERWRITE_DEPARTURE_FUNCTION | false | If true, and a departure function to be
OVERWRITE_BINARY_INTERACTION | false | If true, and a pair of binary interaction pairs to be added is already there, rather than not adding the binary interaction pair (and probably throwing an exception), overwrite it
"""
function set_config(key::AbstractString, val::Bool)
ccall( (:set_config_bool, "CoolProp"), Void, (Ptr{UInt8}, UInt8), key, val)
ccall( (:set_config_bool, "CoolProp"), Void, (Cstring, UInt8), key, val)
return get_global_param_string("errstring")
end
6 changes: 3 additions & 3 deletions test/CoolPropHA.jl
Expand Up @@ -60,7 +60,7 @@ julia> T = hapropssi("T","H",h,"R",1.0,"P",101325)
HumidAir::HAPropsSI(const char* OutputName, const char* Input1Name, double Input1, const char* Input2Name, double Input2, const char* Input3Name, double Input3);
"""
function hapropssi(output::AbstractString, name1::AbstractString, value1::Real, name2::AbstractString, value2::Real, name3::AbstractString, value3::Real)
val = ccall( (:HAPropsSI, "CoolProp"), Cdouble, (Ptr{UInt8},Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8},Float64), output,name1,value1,name2,value2,name3,value3)
val = ccall( (:HAPropsSI, "CoolProp"), Cdouble, (Cstring, Cstring, Cdouble, Cstring, Cdouble, Cstring, Cdouble), output,name1,value1,name2,value2,name3,value3)
if val == Inf
error("CoolProp: ", get_global_param_string("errstring"))
end
Expand All @@ -81,7 +81,7 @@ HumidAir::cair_sat(double);
# Note
No error bound checking is carried out
"""
function cair_sat(t::Number)
val = ccall( (:cair_sat, "CoolProp"), Cdouble, (Float64, ), t)
function cair_sat(t::Real)
val = ccall( (:cair_sat, "CoolProp"), Cdouble, (Cdouble, ), t)
return val;
end
8 changes: 4 additions & 4 deletions test/CoolPropHighLevel.jl
Expand Up @@ -21,7 +21,7 @@ julia> propssi("n-Butane","rhomolar_critical")
CoolProp::Props1SI(std::string, std::string)
"""
function propssi(fluid::AbstractString, output::AbstractString)
val = ccall( (:Props1SI, "CoolProp"), Cdouble, (Ptr{UInt8}, Ptr{UInt8}), fluid, output)
val = ccall( (:Props1SI, "CoolProp"), Cdouble, (Cstring, Cstring), fluid, output)
if val == Inf
error("CoolProp: ", get_global_param_string("errstring"))
end
Expand Down Expand Up @@ -64,7 +64,7 @@ julia> propssi("Dmass","T",300,"P",101325,"100-41-4[0.5]&106-42-3[0.5]") # ethyl
CoolProp::PropsSI(const std::string &, const std::string &, double, const std::string &, double, const std::string&)
"""
function propssi(output::AbstractString, name1::AbstractString, value1::Real, name2::AbstractString, value2::Real, fluid::AbstractString)
val = ccall( (:PropsSI, "CoolProp"), Cdouble, (Ptr{UInt8}, Ptr{UInt8}, Float64, Ptr{UInt8}, Float64, Ptr{UInt8}), output, name1, value1, name2, value2, fluid)
val = ccall( (:PropsSI, "CoolProp"), Cdouble, (Cstring, Cstring, Cdouble, Cstring, Cdouble, Cstring), output, name1, value1, name2, value2, fluid)
if val == Inf
error("CoolProp: ", get_global_param_string("errstring"))
end
Expand Down Expand Up @@ -101,7 +101,7 @@ julia> phasesi("T",300,"P",3541,"Water")
CoolProp::PhaseSI(const std::string &, double, const std::string &, double, const std::string&)
"""
function phasesi(name1::AbstractString, value1::Real, name2::AbstractString, value2::Real, fluid::AbstractString)
val = ccall( (:PhaseSI, "CoolProp"), Int32, (Ptr{UInt8},Float64,Ptr{UInt8},Float64,Ptr{UInt8}, Ptr{UInt8}, Int), name1,value1,name2,value2,fluid,message_buffer::Array{UInt8,1},buffer_length)
val = ccall( (:PhaseSI, "CoolProp"), Int32, (Cstring, Cdouble, Cstring, Cdouble, Cstring, Ptr{UInt8}, Int), name1, value1, name2, value2, fluid, message_buffer::Array{UInt8,1}, buffer_length)
val = unsafe_string(convert(Ptr{UInt8}, pointer(message_buffer::Array{UInt8,1})))
if val == ""
error("CoolProp: ", get_global_param_string("errstring"))
Expand Down Expand Up @@ -131,7 +131,7 @@ end
@returns error_code 1 = Ok 0 = error
"""
function set_reference_stateS(Ref::AbstractString, reference_state::AbstractString)
val = ccall( (:set_reference_stateS, "CoolProp"), Cint, (Ptr{UInt8},Ptr{UInt8}), Ref,reference_state)
val = ccall( (:set_reference_stateS, "CoolProp"), Cint, (Cstring, Cstring), Ref, reference_state)
if val == 0
error("CoolProp: ", get_global_param_string("errstring"))
end
Expand Down

0 comments on commit cd40fdb

Please sign in to comment.