changeset 172:a8bc71608588 boundary_conditions

Fix bug in dimension selection in apply_tanspose of boundary operators
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 21 May 2019 16:27:15 +0200
parents d407611ed71a
children fabd475bb258
files diffOp.jl
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
diff -r d407611ed71a -r a8bc71608588 diffOp.jl
--- a/diffOp.jl	Tue May 21 16:11:16 2019 +0200
+++ b/diffOp.jl	Tue May 21 16:27:15 2019 +0200
@@ -105,7 +105,7 @@
 end
 
 function apply_transpose(d::NormalDerivative, v::AbstractArray, I::Integer)
-	u = selectdim(v,dim(d.bId),I)
+	u = selectdim(v,3-dim(d.bId),I)
 	return apply_d(d.op, d.grid.inverse_spacing[dim(d.bId)], u, region(d.bId))
 end
 
@@ -194,7 +194,7 @@
 end
 
 function apply_transpose(e::BoundaryValue, v::AbstractArray, I::Integer)
-	u = selectdim(v,dim(e.bId),I)
+	u = selectdim(v,3-dim(e.bId),I)
 	return apply_e(e.op, u, region(e.bId))
 end