comparison diffOp.jl @ 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
comparison
equal deleted inserted replaced
171:d407611ed71a 172:a8bc71608588
103 grid::EquidistantGrid 103 grid::EquidistantGrid
104 bId::CartesianBoundary 104 bId::CartesianBoundary
105 end 105 end
106 106
107 function apply_transpose(d::NormalDerivative, v::AbstractArray, I::Integer) 107 function apply_transpose(d::NormalDerivative, v::AbstractArray, I::Integer)
108 u = selectdim(v,dim(d.bId),I) 108 u = selectdim(v,3-dim(d.bId),I)
109 return apply_d(d.op, d.grid.inverse_spacing[dim(d.bId)], u, region(d.bId)) 109 return apply_d(d.op, d.grid.inverse_spacing[dim(d.bId)], u, region(d.bId))
110 end 110 end
111 111
112 # Not correct abstraction level 112 # Not correct abstraction level
113 # TODO: Not type stable D:< 113 # TODO: Not type stable D:<
192 return e.op.eClosure[N_i-j]*v[j] 192 return e.op.eClosure[N_i-j]*v[j]
193 end 193 end
194 end 194 end
195 195
196 function apply_transpose(e::BoundaryValue, v::AbstractArray, I::Integer) 196 function apply_transpose(e::BoundaryValue, v::AbstractArray, I::Integer)
197 u = selectdim(v,dim(e.bId),I) 197 u = selectdim(v,3-dim(e.bId),I)
198 return apply_e(e.op, u, region(e.bId)) 198 return apply_e(e.op, u, region(e.bId))
199 end 199 end
200 200
201 201
202 """ 202 """