diff --git a/src/common.jl b/src/common.jl index 1adf2dfb..450c6a6d 100644 --- a/src/common.jl +++ b/src/common.jl @@ -46,7 +46,7 @@ export AbstractBoundaryConditions, include("MiniKernels.jl") include("phases/phases.jl") -export fn_ratio, phase_ratios_center! +export fn_ratio, phase_ratios_center!, numphases, nphases include("rheology/BuoyancyForces.jl") export compute_ρg! diff --git a/test/test_diffusion2D_multiphase.jl b/test/test_diffusion2D_multiphase.jl index 52dea225..49ec80e7 100644 --- a/test/test_diffusion2D_multiphase.jl +++ b/test/test_diffusion2D_multiphase.jl @@ -193,19 +193,20 @@ function diffusion_2D(; nx=32, ny=32, lx=100e3, ly=100e3, Cp0=1.2e3, K0=3.0) t += dt end - return thermal + return thermal, phase_ratios end @testset "Diffusion_2D_Multiphase" begin @suppress begin nx=32; ny=32; - thermal = diffusion_2D(; nx = nx, ny = ny) + thermal, phase_ratios = diffusion_2D(; nx = nx, ny = ny) nx_T, ny_T = size(thermal.T) if backend_JR === CPUBackend @test thermal.T[nx_T >>> 1 + 1, ny_T >>> 1 + 1] ≈ 1819.2297931741878 atol=1e-1 @test thermal.Tc[ nx >>> 1 , nx >>> 1 ] ≈ 1824.3532934301472 atol=1e-1 + @test nphases(phase_ratios)=== Val{2}() else @test true == true end diff --git a/test/test_traits.jl b/test/test_traits.jl index 93d0e090..2034a2ee 100644 --- a/test/test_traits.jl +++ b/test/test_traits.jl @@ -56,6 +56,7 @@ end # test PTArray @test PTArray(backend) === A + @test PTArray() === A @test_throws ArgumentError PTArray(bk(rand())) @test_throws ArgumentError PTArray(bk("potato"))