Boundary Conditions
Boundary conditions for TMI.
TMI.BoundaryCondition
— Typestruct BoundaryCondition
a plane defined at `dim=dimval`
Attributes
`tracer::Array{T,2}`: values on plane
`i::Vector{T}`: coordinate values on local x-plane
`j::Vector{T}`: coordinate values on local y-plane
`k::T`: fixed coordinate value on local z-plane that defines the Boundary Condition plane
`dim::Int64`: dimension (1,2, or 3) along which the plane's index is fixed
`dimval::Int64`: plane defined at dim = dimval where dimval is a 1-based index number
`wet::BitArray{2}`: ocean mask for boundary condition
TMI.getboundarycondition
— FunctionGet boundary condition by extracting from N-dimensional tracer and returning (N-1)-dimensional array
function getboundarycondition(field::Field,dim,dimval)::BoundaryCondition
Get boundary condition by extracting from Field (i.e., 3D tracer)
Arguments
field::Field
: 3D tracer field with metadata and griddim
: dimension number (1,2,3) that the boundary plane has constant valuedimval
: index number in dimensiondim
that defines boundary plane
Output
b::BoundaryCondition
: boundary condition on a plane with metadata and grid
Missing docstring for TMI.zerosurfaceboundary
. Check Documenter's build log for details.
Missing docstring for TMI.zeronorthboundary
. Check Documenter's build log for details.
Missing docstring for TMI.zeroeastboundary
. Check Documenter's build log for details.
Missing docstring for TMI.zerosouthboundary
. Check Documenter's build log for details.
Missing docstring for TMI.zerowestboundary
. Check Documenter's build log for details.
Missing docstring for TMI.onesurfaceboundary
. Check Documenter's build log for details.
Missing docstring for TMI.getsurfaceboundary
. Check Documenter's build log for details.
Missing docstring for TMI.getnorthboundary
. Check Documenter's build log for details.
Missing docstring for TMI.geteastboundary
. Check Documenter's build log for details.
Missing docstring for TMI.getsouthboundary
. Check Documenter's build log for details.
Missing docstring for TMI.getwestboundary
. Check Documenter's build log for details.
TMI.setboundarycondition!
— Functionfunction setboundarycondition!(d::Field,b::BoundaryCondition)
apply boundary condition to the equation constraints
Arguments
d
::Field, equation constraints (i.e., right hand side)b
::BoundaryCondition
function setboundarycondition!(d::Field{T},b::NamedTuple{<:Any, NTuple{N,BoundaryCondition{T}}}) where {N, T <: Real}
set all boundary conditions in a Named Tuple
TMI.gsetboundarycondition
— Functionfunction gsetboundarycondition(gd::Field{T},b::BoundaryCondition{T}) where T<: Real
ADJOINT: apply boundary condition to the equation constraints
Arguments
d
::Field, equation constraints (i.e., right hand side)b
::BoundaryCondition
function gsetboundarycondition(gd::Field{T},b::BoundaryCondition{T}) where T<: Real
ADJOINT: apply boundary condition to the equation constraints
Arguments
d
::Field, equation constraints (i.e., right hand side)b
::BoundaryCondition
TMI.adjustboundarycondition!
— Functionfunction adjustboundarycondition!(b::Union{BoundaryCondition,NamedTuple},u::Union{BoundaryCondition,NamedTuple})
adjust all boundary conditions b that are described in u
warning: if u doesn't contain any boundary condition adjustments,
nothing will change.
Missing docstring for TMI.gadjustboundarycondition
. Check Documenter's build log for details.
TMI.gadjustboundarycondition!
— Functionfunction gadjustboundarycondition!(b::BoundaryCondition{T},u::BoundaryCondition{T}) where T <: Real
adjust the (one) boundary condition
Just copy the variable.
Keep this function so that calling functions can look alike.
Could probably combine with lower function, use Union type