changeset 292:3747e5636eef

Remove field a from laplace tensor operator
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 22 Jun 2020 21:46:45 +0200
parents 0f94dc29c4bf
children f63232aeb1c6
files SbpOperators/src/constantlaplace.jl
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/SbpOperators/src/constantlaplace.jl	Mon Jun 22 21:43:05 2020 +0200
+++ b/SbpOperators/src/constantlaplace.jl	Mon Jun 22 21:46:45 2020 +0200
@@ -10,7 +10,6 @@
 """
 struct ConstantLaplaceOperator{T<:Real,N,M,K} <: TensorOperator{T,1}
     h_inv::T # The grid spacing could be included in the stencil already. Preferable?
-    a::T # TODO: Better name?
     innerStencil::Stencil{T,N}
     closureStencils::NTuple{M,Stencil{T,K}}
     parity::Parity
@@ -30,16 +29,16 @@
 
 # Apply for different regions Lower/Interior/Upper or Unknown region
 @inline function LazyTensors.apply(L::ConstantLaplaceOperator, v::AbstractVector, i::Index{Lower})
-    return @inbounds L.a*L.h_inv*L.h_inv*apply_stencil(L.closureStencils[Int(i)], v, Int(i))
+    return @inbounds L.h_inv*L.h_inv*apply_stencil(L.closureStencils[Int(i)], v, Int(i))
 end
 
 @inline function LazyTensors.apply(L::ConstantLaplaceOperator, v::AbstractVector, i::Index{Interior})
-    return @inbounds L.a*L.h_inv*L.h_inv*apply_stencil(L.innerStencil, v, Int(i))
+    return @inbounds L.h_inv*L.h_inv*apply_stencil(L.innerStencil, v, Int(i))
 end
 
 @inline function LazyTensors.apply(L::ConstantLaplaceOperator, v::AbstractVector, i::Index{Upper})
     N = length(v) # TODO: Use domain_size here instead?
-    return @inbounds L.a*L.h_inv*L.h_inv*Int(L.parity)*apply_stencil_backwards(L.closureStencils[N-Int(i)+1], v, Int(i))
+    return @inbounds L.h_inv*L.h_inv*Int(L.parity)*apply_stencil_backwards(L.closureStencils[N-Int(i)+1], v, Int(i))
 end
 
 @inline function LazyTensors.apply(L::ConstantLaplaceOperator, v::AbstractVector, index::Index{Unknown})