Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/volumeops/derivatives/second_derivative_variable.jl @ 916:fc1f03fc8d65 feature/variable_derivatives
Remove comments
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 18 Feb 2022 07:19:08 +0100 |
parents | cad3a9f82009 |
children | eb054537fc63 |
line wrap: on
line diff
--- a/src/SbpOperators/volumeops/derivatives/second_derivative_variable.jl Fri Feb 18 07:18:59 2022 +0100 +++ b/src/SbpOperators/volumeops/derivatives/second_derivative_variable.jl Fri Feb 18 07:19:08 2022 +0100 @@ -1,34 +1,10 @@ export SecondDerivativeVariable -# """ -# SecondDerivativeVariable(grid, inner_stencil, closure_stencils, parity, direction) - -# Creates a volume operator on a `Dim`-dimensional grid acting along the -# specified coordinate `direction`. The action of the operator is determined by -# the stencils `inner_stencil` and `closure_stencils`. When `Dim=1`, the -# corresponding `SecondDerivativeVariable` tensor mapping is returned. When `Dim>1`, the -# returned operator is the appropriate outer product of a one-dimensional -# operators and `IdentityMapping`s, e.g for `Dim=3` the volume operator in the -# y-direction is `I⊗op⊗I`. -# """ -# function volume_operator(grid::EquidistantGrid, inner_stencil, closure_stencils, parity, direction) -# #TODO: Check that direction <= Dim? +# REVIEW: Fixa docs +""" + SecondDerivativeVariable{Dir,T,D,...} <: TensorMapping{T,D,D} -# # Create 1D volume operator in along coordinate direction -# op = SecondDerivativeVariable(restrict(grid, direction), inner_stencil, closure_stencils, parity) -# # Create 1D IdentityMappings for each coordinate direction -# one_d_grids = restrict.(Ref(grid), Tuple(1:dimension(grid))) -# Is = IdentityMapping{eltype(grid)}.(size.(one_d_grids)) -# # Formulate the correct outer product sequence of the identity mappings and -# # the volume operator -# parts = Base.setindex(Is, op, direction) -# return foldl(⊗, parts) -# end - -""" - SecondDerivativeVariable{T,N,M,K} <: TensorOperator{T,1} - -Implements the one-dimensional second derivative with variable coefficients. +A second derivative operator in direction `Dir` with a variable coefficient. """ struct SecondDerivativeVariable{Dir,T,D,M,IStencil<:NestedStencil{T},CStencil<:NestedStencil{T},TArray<:AbstractArray} <: TensorMapping{T,D,D} inner_stencil::IStencil @@ -122,5 +98,3 @@ I = Base.setindex(I, Index(i, r), dir) return LazyTensors.apply(op, v, I...) end - -# TODO: Rename SecondDerivativeVariable -> VariableSecondDerivative