comparison src/SbpOperators/boundary_conditions/sat.jl @ 1603:fca4a01d60c9 feature/boundary_conditions

Remove module BoundaryConditions, moving its content to SbpOperators
author Vidar Stiernström <vidar.stiernstrom@gmail.com>
date Tue, 04 Jun 2024 16:46:14 -0700
parents src/BoundaryConditions/sat.jl@3e7438e2a033
children 77f192b05b1d
comparison
equal deleted inserted replaced
1602:3e7438e2a033 1603:fca4a01d60c9
1 """
2 sat_tensors(op, grid, bc::BoundaryCondition, params...)
3
4 The tensor and boundary operator used to construct a simultaneous-approximation-term
5 for imposing `bc` related to `op`.
6
7 For `penalty_tensor, L = sat_tensors(...)` then `SAT = penalty_tensor*(L*u - g)` where `g`
8 is the boundary data.
9 """
10 function sat_tensors end
11
12
13 """
14 sat(op, grid, bc::BoundaryCondition; kwargs...)
15
16 Simultaneous-Approximation-Term for a general `bc` to `op`.
17 Returns a function `SAT(u,g)` weakly imposing `bc` when added to `op*u`.
18
19 `op` must implement the function `sat_tensors`.
20 """
21 function sat(op, grid, bc::BoundaryCondition; kwargs...)
22 penalty_tensor, L = sat_tensors(op, grid, bc; kwargs...)
23 return SAT(u, g) = penalty_tensor*(L*u - g)
24 end