Boundary Conditions

Boundary conditions for TMI.

TMI.BoundaryConditionType
struct 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
source
TMI.getboundaryconditionFunction

Get boundary condition by extracting from N-dimensional tracer and returning (N-1)-dimensional array

source
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 grid
  • dim: dimension number (1,2,3) that the boundary plane has constant value
  • dimval: index number in dimension dim that defines boundary plane

Output

  • b::BoundaryCondition: boundary condition on a plane with metadata and grid
source
Missing docstring.

Missing docstring for TMI.zerosurfaceboundary. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.zeronorthboundary. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.zeroeastboundary. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.zerosouthboundary. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.zerowestboundary. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.onesurfaceboundary. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.getsurfaceboundary. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.getnorthboundary. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.geteastboundary. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.getsouthboundary. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.getwestboundary. Check Documenter's build log for details.

TMI.setboundarycondition!Function
function setboundarycondition!(d::Field,b::BoundaryCondition)
apply boundary condition to the equation constraints

Arguments

  • d::Field, equation constraints (i.e., right hand side)
  • b::BoundaryCondition
source
function setboundarycondition!(d::Field{T},b::NamedTuple{<:Any, NTuple{N,BoundaryCondition{T}}}) where {N, T <: Real}

set all boundary conditions in a Named Tuple
source
TMI.gsetboundaryconditionFunction
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
source
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
source
TMI.adjustboundarycondition!Function
function 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.
source
Missing docstring.

Missing docstring for TMI.gadjustboundarycondition. Check Documenter's build log for details.

TMI.gadjustboundarycondition!Function
function 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
source