Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/laplace/laplace.jl @ 1696:29b96fc75bee feature/sbp_operators/laplace_curvilinear
Merge feature/grids/manifolds
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 28 Aug 2024 10:50:15 +0200 |
| parents | 707fc9761c2b |
| children | f3d7e2d7a43f |
comparison
equal
deleted
inserted
replaced
| 1693:c7eee3952dcd | 1696:29b96fc75bee |
|---|---|
| 56 | 56 |
| 57 function laplace(grid::MappedGrid, stencil_set) | 57 function laplace(grid::MappedGrid, stencil_set) |
| 58 J = jacobian_determinant(grid) | 58 J = jacobian_determinant(grid) |
| 59 J⁻¹ = DiagonalTensor(map(inv, J)) | 59 J⁻¹ = DiagonalTensor(map(inv, J)) |
| 60 | 60 |
| 61 Jg = map(*, J, geometric_tensor_inverse(grid)) | 61 Jg = map(*, J, metric_tensor_inverse(grid)) |
| 62 lg = logicalgrid(grid) | 62 lg = logicalgrid(grid) |
| 63 | 63 |
| 64 return mapreduce(+, CartesianIndices(first(Jg))) do I | 64 return mapreduce(+, CartesianIndices(first(Jg))) do I |
| 65 i, j = I[1], I[2] | 65 i, j = I[1], I[2] |
| 66 Jgⁱʲ = componentview(Jg, i, j) | 66 Jgⁱʲ = componentview(Jg, i, j) |
