Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/constantstenciloperator.jl @ 560:d1929491180b
Change variable names for som indecies to make them all concistent
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 30 Nov 2020 09:13:13 +0100 |
parents | 1a53eb83ed24 |
children |
comparison
equal
deleted
inserted
replaced
556:37a81dad36b9 | 560:d1929491180b |
---|---|
26 apply_quadrature(op::ConstantStencilOperator, h::Real, v::T, i::Index{Upper}, N::Integer) where T = v*h*op.quadratureClosure[N-Int(i)+1] | 26 apply_quadrature(op::ConstantStencilOperator, h::Real, v::T, i::Index{Upper}, N::Integer) where T = v*h*op.quadratureClosure[N-Int(i)+1] |
27 apply_quadrature(op::ConstantStencilOperator, h::Real, v::T, i::Index{Interior}, N::Integer) where T = v*h | 27 apply_quadrature(op::ConstantStencilOperator, h::Real, v::T, i::Index{Interior}, N::Integer) where T = v*h |
28 | 28 |
29 function apply_quadrature(op::ConstantStencilOperator, h::Real, v::T, i, N::Integer) where T | 29 function apply_quadrature(op::ConstantStencilOperator, h::Real, v::T, i, N::Integer) where T |
30 r = getregion(i, closuresize(op), N) | 30 r = getregion(i, closuresize(op), N) |
31 i = Index(i, r) | 31 return apply_quadrature(op, h, v, Index(i, r), N) |
32 return apply_quadrature(op, h, v, i, N) | |
33 end | 32 end |
34 export apply_quadrature | 33 export apply_quadrature |
35 | 34 |
36 # TODO: Evaluate if divisions affect performance | 35 # TODO: Evaluate if divisions affect performance |
37 apply_inverse_quadrature(op::ConstantStencilOperator, h_inv::Real, v::T, i::Index{Lower}, N::Integer) where T = h_inv*v/op.quadratureClosure[Int(i)] | 36 apply_inverse_quadrature(op::ConstantStencilOperator, h_inv::Real, v::T, i::Index{Lower}, N::Integer) where T = h_inv*v/op.quadratureClosure[Int(i)] |
38 apply_inverse_quadrature(op::ConstantStencilOperator, h_inv::Real, v::T, i::Index{Upper}, N::Integer) where T = h_inv*v/op.quadratureClosure[N-Int(i)+1] | 37 apply_inverse_quadrature(op::ConstantStencilOperator, h_inv::Real, v::T, i::Index{Upper}, N::Integer) where T = h_inv*v/op.quadratureClosure[N-Int(i)+1] |
39 apply_inverse_quadrature(op::ConstantStencilOperator, h_inv::Real, v::T, i::Index{Interior}, N::Integer) where T = v*h_inv | 38 apply_inverse_quadrature(op::ConstantStencilOperator, h_inv::Real, v::T, i::Index{Interior}, N::Integer) where T = v*h_inv |
40 | 39 |
41 function apply_inverse_quadrature(op::ConstantStencilOperator, h_inv::Real, v::T, i, N::Integer) where T | 40 function apply_inverse_quadrature(op::ConstantStencilOperator, h_inv::Real, v::T, i, N::Integer) where T |
42 r = getregion(i, closuresize(op), N) | 41 r = getregion(i, closuresize(op), N) |
43 i = Index(i, r) | 42 return apply_inverse_quadrature(op, h_inv, v, Index(i, r), N) |
44 return apply_inverse_quadrature(op, h_inv, v, i, N) | |
45 end | 43 end |
46 | 44 |
47 export apply_inverse_quadrature | 45 export apply_inverse_quadrature |
48 | 46 |
49 function apply_normal_derivative_transpose(op::ConstantStencilOperator, h_inv::Real, v::AbstractVector, ::Type{Lower}) | 47 function apply_normal_derivative_transpose(op::ConstantStencilOperator, h_inv::Real, v::AbstractVector, ::Type{Lower}) |