Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/laplace/laplace.jl @ 1589:b22b9097d907 feature/sbp_operators/laplace_curvilinear
Add LinearAlgebra to Grids and fix a typo
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 26 Apr 2024 23:37:29 +0200 |
parents | d359d0d7fb12 |
children | 4f6f5e5daa35 |
comparison
equal
deleted
inserted
replaced
1588:f6774e98d223 | 1589:b22b9097d907 |
---|---|
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, ggeometric_tensor_inverse(grid)) | 61 Jg = map(*, J, geometric_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[1], I[2]) | 66 Jgⁱʲ = componentview(Jg, I[1], I[2]) |