Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/laplace/laplace.jl @ 870:c4dd4ceb2d40 feature/laplace_opset
REVIEW: Remove extra newlines in docstrings
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 25 Jan 2022 08:05:02 +0100 |
| parents | 4bd35ba8f34a |
| children | 86776d06b883 |
comparison
equal
deleted
inserted
replaced
| 869:4bd35ba8f34a | 870:c4dd4ceb2d40 |
|---|---|
| 27 using `laplace(grid,...)`. | 27 using `laplace(grid,...)`. |
| 28 | 28 |
| 29 Note that all properties of Laplace, excluding the differential operator `Laplace.D`, are | 29 Note that all properties of Laplace, excluding the differential operator `Laplace.D`, are |
| 30 abstract types. For performance reasons, they should therefore be | 30 abstract types. For performance reasons, they should therefore be |
| 31 accessed via the provided getter functions (e.g `inner_product(::Laplace)`). | 31 accessed via the provided getter functions (e.g `inner_product(::Laplace)`). |
| 32 | |
| 33 """ | 32 """ |
| 34 struct Laplace{T, Dim, TMdiffop<:TensorMapping{T,Dim,Dim}} <: TensorMapping{T,Dim,Dim} | 33 struct Laplace{T, Dim, TMdiffop<:TensorMapping{T,Dim,Dim}} <: TensorMapping{T,Dim,Dim} |
| 35 D::TMdiffop # Differential operator | 34 D::TMdiffop # Differential operator |
| 36 H::TensorMapping # Inner product operator | 35 H::TensorMapping # Inner product operator |
| 37 H_inv::TensorMapping # Inverse inner product operator | 36 H_inv::TensorMapping # Inverse inner product operator |
| 81 | 80 |
| 82 """ | 81 """ |
| 83 inner_product(L::Laplace) | 82 inner_product(L::Laplace) |
| 84 | 83 |
| 85 Returns the inner product operator associated with `L` | 84 Returns the inner product operator associated with `L` |
| 86 | |
| 87 """ | 85 """ |
| 88 inner_product(L::Laplace) = L.H | 86 inner_product(L::Laplace) = L.H |
| 89 export inner_product | 87 export inner_product |
| 90 | 88 |
| 91 | 89 |
| 92 """ | 90 """ |
| 93 inverse_inner_product(L::Laplace) | 91 inverse_inner_product(L::Laplace) |
| 94 | 92 |
| 95 Returns the inverse of the inner product operator associated with `L` | 93 Returns the inverse of the inner product operator associated with `L` |
| 96 | |
| 97 """ | 94 """ |
| 98 inverse_inner_product(L::Laplace) = L.H_inv | 95 inverse_inner_product(L::Laplace) = L.H_inv |
| 99 export inverse_inner_product | 96 export inverse_inner_product |
| 100 | 97 |
| 101 | 98 |
| 104 boundary_restriction(L::Laplace, ids::Tuple) | 101 boundary_restriction(L::Laplace, ids::Tuple) |
| 105 boundary_restriction(L::Laplace, ids...) | 102 boundary_restriction(L::Laplace, ids...) |
| 106 | 103 |
| 107 Returns boundary restriction operator(s) associated with `L` for the boundary(s) | 104 Returns boundary restriction operator(s) associated with `L` for the boundary(s) |
| 108 identified by id(s). | 105 identified by id(s). |
| 109 | |
| 110 """ | 106 """ |
| 111 boundary_restriction(L::Laplace, id::BoundaryIdentifier) = L.e[id] | 107 boundary_restriction(L::Laplace, id::BoundaryIdentifier) = L.e[id] |
| 112 boundary_restriction(L::Laplace, ids::Tuple) = map(id-> L.e[id], ids) | 108 boundary_restriction(L::Laplace, ids::Tuple) = map(id-> L.e[id], ids) |
| 113 boundary_restriction(L::Laplace, ids...) = boundary_restriction(L, ids) | 109 boundary_restriction(L::Laplace, ids...) = boundary_restriction(L, ids) |
| 114 # REVIEW: I propose changing the following implementations according to the | 110 # REVIEW: I propose changing the following implementations according to the |
| 126 normal_derivative(L::Laplace, ids::NTuple{N,BoundaryIdentifier}) | 122 normal_derivative(L::Laplace, ids::NTuple{N,BoundaryIdentifier}) |
| 127 normal_derivative(L::Laplace, ids...) | 123 normal_derivative(L::Laplace, ids...) |
| 128 | 124 |
| 129 Returns normal derivative operator(s) associated with `L` for the boundary(s) | 125 Returns normal derivative operator(s) associated with `L` for the boundary(s) |
| 130 identified by id(s). | 126 identified by id(s). |
| 131 | |
| 132 """ | 127 """ |
| 133 normal_derivative(L::Laplace, id::BoundaryIdentifier) = L.d[id] | 128 normal_derivative(L::Laplace, id::BoundaryIdentifier) = L.d[id] |
| 134 normal_derivative(L::Laplace, ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.d[ids[i]],N) | 129 normal_derivative(L::Laplace, ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.d[ids[i]],N) |
| 135 normal_derivative(L::Laplace, ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.d[ids[i]],N) | 130 normal_derivative(L::Laplace, ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.d[ids[i]],N) |
| 136 export normal_derivative | 131 export normal_derivative |
| 141 boundary_quadrature(L::Laplace, ids::NTuple{N,BoundaryIdentifier}) | 136 boundary_quadrature(L::Laplace, ids::NTuple{N,BoundaryIdentifier}) |
| 142 boundary_quadrature(L::Laplace, ids...) | 137 boundary_quadrature(L::Laplace, ids...) |
| 143 | 138 |
| 144 Returns boundary quadrature operator(s) associated with `L` for the boundary(s) | 139 Returns boundary quadrature operator(s) associated with `L` for the boundary(s) |
| 145 identified by id(s). | 140 identified by id(s). |
| 146 | |
| 147 """ | 141 """ |
| 148 boundary_quadrature(L::Laplace, id::BoundaryIdentifier) = L.H_boundary[id] | 142 boundary_quadrature(L::Laplace, id::BoundaryIdentifier) = L.H_boundary[id] |
| 149 boundary_quadrature(L::Laplace, ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.H_boundary[ids[i]],N) | 143 boundary_quadrature(L::Laplace, ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.H_boundary[ids[i]],N) |
| 150 boundary_quadrature(L::Laplace, ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.H_boundary[ids[i]],N) | 144 boundary_quadrature(L::Laplace, ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.H_boundary[ids[i]],N) |
| 151 export boundary_quadrature | 145 export boundary_quadrature |
