Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/boundary_conditions/boundary_condition.jl @ 1616:e41eddc640f3 feature/boundary_conditions
Docs
author | Vidar Stiernström <vidar.stiernstrom@gmail.com> |
---|---|
date | Sun, 09 Jun 2024 17:51:57 -0700 |
parents | 1388149b54ad |
children | a00fa58e9fb0 |
line wrap: on
line diff
--- a/src/SbpOperators/boundary_conditions/boundary_condition.jl Sun Jun 09 17:04:01 2024 -0700 +++ b/src/SbpOperators/boundary_conditions/boundary_condition.jl Sun Jun 09 17:51:57 2024 -0700 @@ -1,7 +1,7 @@ """ BoundaryCondition{BID} -A type for implementing boundary_data needed in order to impose a boundary condition. +A type for implementing data needed in order to impose a boundary condition. Subtypes refer to perticular types of boundary conditions, e.g. Neumann conditions. """ abstract type BoundaryCondition{BID} end @@ -30,6 +30,12 @@ return eval_on(boundary_grid(grid, boundary(bc)), boundary_data(bc)) end +""" + DirichletCondition{DT,BID} + +A Dirichlet condition with `data::DT` on the boundary +specified by the boundary identifier `BID`. +""" struct DirichletCondition{DT,BID} <: BoundaryCondition{BID} data::DT function DirichletCondition(data, id) @@ -38,6 +44,12 @@ end boundary_data(bc::DirichletCondition) = bc.data +""" + DirichletCondition{DT,BID} + +A Neumann condition with `data::DT` on the boundary +specified by the boundary identifier `BID`. +""" struct NeumannCondition{DT,BID} <: BoundaryCondition{BID} data::DT function NeumannCondition(data, id)