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

Remove default creation of Param types for strat boundaries

parent 99c0100c
No related branches found
No related tags found
1 merge request!90Preparatory changes for adding water processes
......@@ -57,10 +57,8 @@ struct Stratigraphy{N,TComponents,TBoundaries}
@assert length(sub) > 0 "At least one subsurface layer must be specified"
names = map(componentname, map(last, sub))
@assert length(unique(names)) == length(names) "All layer names in Stratigraphy must be unique"
boundary(x) = x
boundary(x::DistQuantity) = Param(ustrip(u"m", x), units=u"m", bounds=(0.0,Inf), layer=:strat)
boundaries = Tuple(map(boundary first, (top, sub..., bot)))
@assert issorted(filter(Base.Fix2(isa, Param), boundaries), by=p -> p.val) "Stratigraphy boundary locations must be in strictly increasing order."
boundaries = Tuple(map(first, (top, sub..., bot)))
@assert issorted(boundaries) "Stratigraphy boundary locations must be in strictly increasing order."
# get components
components = Tuple(map(last, (top, sub..., bot)))
# construct type
......
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