Skip to content
Snippets Groups Projects
Commit f553260f authored by Brian Groenke's avatar Brian Groenke
Browse files

Do not export boundary style types to avoid namespace conflicts

parent 299ed8f8
No related branches found
No related tags found
1 merge request!74Fix unnecessary type bounds breaking autodiff
...@@ -12,8 +12,6 @@ using Reexport ...@@ -12,8 +12,6 @@ using Reexport
# Common types and methods # Common types and methods
export Layer, SubSurface, Top, Bottom export Layer, SubSurface, Top, Bottom
export Process, SubSurfaceProcess, BoundaryProcess, CoupledProcesses, Coupled export Process, SubSurfaceProcess, BoundaryProcess, CoupledProcesses, Coupled
export BoundaryStyle, Dirichlet, Neumann
export Callback, CallbackStyle
include("types.jl") include("types.jl")
export variables, initialcondition!, diagnosticstep!, prognosticstep!, interact! export variables, initialcondition!, diagnosticstep!, prognosticstep!, interact!
export boundaryflux, boundaryvalue, criterion, affect!, observe export boundaryflux, boundaryvalue, criterion, affect!, observe
......
...@@ -32,7 +32,7 @@ include("../../types.jl") ...@@ -32,7 +32,7 @@ include("../../types.jl")
Δk = Δ(x) Δk = Δ(x)
sub = TestGroundLayer() sub = TestGroundLayer()
heat = Heat() heat = Heat()
bc = ConstantBC(Dirichlet, 0.0u"°C") bc = ConstantBC(CryoGrid.Dirichlet, 0.0u"°C")
@testset "top: +, bot: -" begin @testset "top: +, bot: -" begin
T₀ = Vector(LinRange(-23,27,length(xc)))u"°C" T₀ = Vector(LinRange(-23,27,length(xc)))u"°C"
∂H = zeros(length(T₀))u"J/s/m^3" ∂H = zeros(length(T₀))u"J/s/m^3"
...@@ -62,7 +62,7 @@ include("../../types.jl") ...@@ -62,7 +62,7 @@ include("../../types.jl")
@test ∂H[end] < 0.0u"J/s/m^3" @test ∂H[end] < 0.0u"J/s/m^3"
end end
@testset "Neumann boundary" begin @testset "Neumann boundary" begin
bc = ConstantBC(Neumann, -1.0u"J/m^3") bc = ConstantBC(CryoGrid.Neumann, -1.0u"J/m^3")
T₀ = Vector(LinRange(-23,27,length(xc)))u"°C" T₀ = Vector(LinRange(-23,27,length(xc)))u"°C"
∂H = zeros(length(T₀))u"J/s/m^3" ∂H = zeros(length(T₀))u"J/s/m^3"
state = (T=T₀,k=k,dH=∂H,grids=(T=xc,k=x),t=0.0) state = (T=T₀,k=k,dH=∂H,grids=(T=xc,k=x),t=0.0)
...@@ -93,7 +93,7 @@ end ...@@ -93,7 +93,7 @@ end
f_analytic(x,t) = exp(-t*4π^2)*sin(2.0*π*x) f_analytic(x,t) = exp(-t*4π^2)*sin(2.0*π*x)
sub = TestGroundLayer() sub = TestGroundLayer()
heat = Heat() heat = Heat()
bc = ConstantBC(Dirichlet, 0.0u"°C") bc = ConstantBC(CryoGrid.Dirichlet, 0.0u"°C")
function dTdt(T,p,t) function dTdt(T,p,t)
dT = similar(T)u"J/s/m^3" dT = similar(T)u"J/s/m^3"
dT .= zero(eltype(dT)) dT .= zero(eltype(dT))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment