Seems are a bit better
There is still less density in the axis. I don't find a reason why. There must be a modification to the weight...
This commit is contained in:
parent
5386114d15
commit
4cadfe5367
2 changed files with 6 additions and 23 deletions
|
|
@ -306,8 +306,6 @@ MODULE moduleInject
|
|||
|
||||
nMin = nMin + 1
|
||||
nMax = nMin + self%nParticles - 1
|
||||
!Assign weight to particle.
|
||||
partInj(nMin:nMax)%weight = self%species%weight
|
||||
!Particle is considered to be outside the domain
|
||||
partInj(nMin:nMax)%n_in = .FALSE.
|
||||
!$OMP END SINGLE
|
||||
|
|
@ -315,10 +313,11 @@ MODULE moduleInject
|
|||
!$OMP DO
|
||||
DO n = nMin, nMax
|
||||
randomX = randomWeighted(self%cumWeight, self%sumWeight)
|
||||
|
||||
randomEdge => mesh%edges(self%edges(randomX))%obj
|
||||
!Random position in edge
|
||||
partInj(n)%r = randomEdge%randPos()
|
||||
!Assign weight to particle.
|
||||
partInj(n)%weight = self%species%weight
|
||||
!Volume associated to the edge:
|
||||
IF (ASSOCIATED(randomEdge%e1)) THEN
|
||||
partInj(n)%cell = randomEdge%e1%n
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue