Mercurial > repos > public > sbplib_julia
changeset 871:86776d06b883 feature/laplace_opset
REVIEW: Move export statements. Some to the top of the file and some to SbpOperators.jl since they seem more general
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 25 Jan 2022 08:19:02 +0100 |
parents | c4dd4ceb2d40 |
children | 6a4d36eccf39 |
files | src/SbpOperators/SbpOperators.jl src/SbpOperators/boundaryops/boundary_restriction.jl src/SbpOperators/boundaryops/normal_derivative.jl src/SbpOperators/volumeops/inner_products/inner_product.jl src/SbpOperators/volumeops/inner_products/inverse_inner_product.jl src/SbpOperators/volumeops/laplace/laplace.jl |
diffstat | 6 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/SbpOperators/SbpOperators.jl Tue Jan 25 08:05:02 2022 +0100 +++ b/src/SbpOperators/SbpOperators.jl Tue Jan 25 08:19:02 2022 +0100 @@ -22,4 +22,11 @@ include("boundaryops/boundary_restriction.jl") include("boundaryops/normal_derivative.jl") + +export inner_product +export inverse_inner_product +export boundary_restriction +export normal_derivative +export boundary_quadrature + end # module
--- a/src/SbpOperators/boundaryops/boundary_restriction.jl Tue Jan 25 08:05:02 2022 +0100 +++ b/src/SbpOperators/boundaryops/boundary_restriction.jl Tue Jan 25 08:19:02 2022 +0100 @@ -14,5 +14,3 @@ return SbpOperators.boundary_operator(grid, converted_stencil, boundary) end boundary_restriction(grid::EquidistantGrid{1}, closure_stencil, region::Region) = boundary_restriction(grid, closure_stencil, CartesianBoundary{1,typeof(region)}()) - -export boundary_restriction
--- a/src/SbpOperators/boundaryops/normal_derivative.jl Tue Jan 25 08:05:02 2022 +0100 +++ b/src/SbpOperators/boundaryops/normal_derivative.jl Tue Jan 25 08:19:02 2022 +0100 @@ -15,4 +15,3 @@ return SbpOperators.boundary_operator(grid, scale(closure_stencil,h_inv), boundary) end normal_derivative(grid::EquidistantGrid{1}, closure_stencil, region::Region) = normal_derivative(grid, closure_stencil, CartesianBoundary{1,typeof(region)}()) -export normal_derivative
--- a/src/SbpOperators/volumeops/inner_products/inner_product.jl Tue Jan 25 08:05:02 2022 +0100 +++ b/src/SbpOperators/volumeops/inner_products/inner_product.jl Tue Jan 25 08:19:02 2022 +0100 @@ -22,7 +22,6 @@ return foldl(⊗, Hs) end -export inner_product function inner_product(grid::EquidistantGrid{1}, interior_weight, closure_weights) h = spacing(grid)[1]
--- a/src/SbpOperators/volumeops/inner_products/inverse_inner_product.jl Tue Jan 25 08:05:02 2022 +0100 +++ b/src/SbpOperators/volumeops/inner_products/inverse_inner_product.jl Tue Jan 25 08:19:02 2022 +0100 @@ -25,6 +25,5 @@ H⁻¹ = SbpOperators.ConstantInteriorScalingOperator(grid, h⁻¹*1/interior_weight, h⁻¹./closure_weights) return H⁻¹ end -export inverse_inner_product inverse_inner_product(grid::EquidistantGrid{0}, interior_weight, closure_weights) = IdentityMapping{eltype(grid)}()
--- a/src/SbpOperators/volumeops/laplace/laplace.jl Tue Jan 25 08:05:02 2022 +0100 +++ b/src/SbpOperators/volumeops/laplace/laplace.jl Tue Jan 25 08:19:02 2022 +0100 @@ -1,3 +1,8 @@ +export Laplace +export laplace +# REVIEW: Makes more sense to me to have the exports at the top of the file. +# Might as well start fixing that. + # REVIEW: The style of name `Laplace` might clash with other concepts. When # thinking about implementing the variable second derivative I think I will # have to create it as a full TM for the full dimensional problem instead of @@ -38,7 +43,6 @@ d::StaticDict{<:BoundaryIdentifier,<:TensorMapping} # Normal derivative operators H_boundary::StaticDict{<:BoundaryIdentifier,<:TensorMapping} # Boundary quadrature operators end -export Laplace function Laplace(grid, filename; order) @@ -84,7 +88,6 @@ Returns the inner product operator associated with `L` """ inner_product(L::Laplace) = L.H -export inner_product """ @@ -93,7 +96,6 @@ Returns the inverse of the inner product operator associated with `L` """ inverse_inner_product(L::Laplace) = L.H_inv -export inverse_inner_product """ @@ -114,7 +116,6 @@ # out the interface for that now or if we save it for the future but either # way these methods will be affected. -export boundary_restriction """ @@ -128,7 +129,6 @@ normal_derivative(L::Laplace, id::BoundaryIdentifier) = L.d[id] normal_derivative(L::Laplace, ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.d[ids[i]],N) normal_derivative(L::Laplace, ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.d[ids[i]],N) -export normal_derivative """ @@ -142,7 +142,6 @@ boundary_quadrature(L::Laplace, id::BoundaryIdentifier) = L.H_boundary[id] boundary_quadrature(L::Laplace, ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.H_boundary[ids[i]],N) boundary_quadrature(L::Laplace, ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.H_boundary[ids[i]],N) -export boundary_quadrature """ @@ -165,4 +164,3 @@ end return Δ end -export laplace