Skip to content

Commit

Permalink
Merge bdd8f00 into f481161
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Jan 8, 2018
2 parents f481161 + bdd8f00 commit 6d80c87
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ os:
- linux
- osx
julia:
- 0.5
- 0.6
- nightly
notifications:
Expand Down
3 changes: 1 addition & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
julia 0.5
Compat 0.17.0
julia 0.6
QuadGK 0.1.1
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
environment:
matrix:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
Expand Down
17 changes: 8 additions & 9 deletions src/Cosmology.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module Cosmology

using Compat
using QuadGK

export cosmology,
Expand All @@ -17,12 +16,12 @@ export cosmology,
lookback_time_gyr,
scale_factor

@compat abstract type AbstractCosmology end
@compat abstract type AbstractClosedCosmology <: AbstractCosmology end
@compat abstract type AbstractFlatCosmology <: AbstractCosmology end
@compat abstract type AbstractOpenCosmology <: AbstractCosmology end
abstract type AbstractCosmology end
abstract type AbstractClosedCosmology <: AbstractCosmology end
abstract type AbstractFlatCosmology <: AbstractCosmology end
abstract type AbstractOpenCosmology <: AbstractCosmology end

immutable FlatLCDM{T<:Real} <: AbstractFlatCosmology
struct FlatLCDM{T<:Real} <: AbstractFlatCosmology
h::T
Ω_Λ::T
Ω_m::T
Expand All @@ -34,7 +33,7 @@ FlatLCDM(h::Real, Ω_Λ::Real, Ω_m::Real, Ω_r::Real) =

a2E(c::FlatLCDM, a::Float64) = sqrt(c.Ω_r + c.Ω_m*a + c.Ω_Λ*a^4)

immutable ClosedLCDM{T<:Real} <: AbstractClosedCosmology
struct ClosedLCDM{T<:Real} <: AbstractClosedCosmology
h::T
Ω_k::T
Ω_Λ::T
Expand All @@ -46,7 +45,7 @@ ClosedLCDM(h::Real, Ω_k::Real, Ω_Λ::Real, Ω_m::Real, Ω_r::Real) =
float(Ω_r))...)


immutable OpenLCDM{T<:Real} <: AbstractOpenCosmology
struct OpenLCDM{T<:Real} <: AbstractOpenCosmology
h::T
Ω_k::T
Ω_Λ::T
Expand All @@ -66,7 +65,7 @@ end
for c in ("Flat", "Open", "Closed")
name = Symbol("$(c)WCDM")
@eval begin
immutable $(name){T<:Real} <: $(Symbol("Abstract$(c)Cosmology"))
struct $(name){T<:Real} <: $(Symbol("Abstract$(c)Cosmology"))
h::T
Ω_k::T
Ω_Λ::T
Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include("../src/Cosmology.jl")
using Cosmology
using Base.Test

Expand Down

0 comments on commit 6d80c87

Please sign in to comment.