diff --git a/src/modules/mesh/moduleMesh@boundaryParticle.f90 b/src/modules/mesh/moduleMesh@boundaryParticle.f90 index 963116b..d5c4f62 100644 --- a/src/modules/mesh/moduleMesh@boundaryParticle.f90 +++ b/src/modules/mesh/moduleMesh@boundaryParticle.f90 @@ -479,7 +479,7 @@ submodule(moduleMesh) boundaryParticle type is(boundaryQuasiNeutrality) write(fileID, '(A,",",A)') '"Edge id"', '"alpha"' do e = 1, size(self%edges) - write(fileID, '('//fmtColInt//','//fmtReal//')') self%edges(e)%obj%n, self%alpha(self%edges(e)%obj%n) + write(fileID, '('//fmtColInt//','//fmtColReal//')') self%edges(e)%obj%n, self%alpha(self%edges(e)%obj%n) end do @@ -501,16 +501,12 @@ submodule(moduleMesh) boundaryParticle v_cut = 2.d0 * 40.d3/v_ref !This will be the drag velocity of the ions in the future - if (dot_product(part%v,-edge%normal) > v_cut) then - ! print *,part%v(1), v_cut - ! part%v = part%v + v_cut*edge%normal - part%v(1) = part%v(1) - v_cut - ! print *,part%v(1) - call genericReflection(edge, part) - ! print *,part%v(1) - ! print * + call genericReflection(edge, part) + + part%v(1) = part%v(1) + v_cut + + if (dot_product(part%v,edge%normal) <= 0.d0) then - else call genericTransparent(edge, part) end if