Skip to content

Commit

Permalink
Merge branch 'fix.wallSample.speciesZero' into 'master.dev'
Browse files Browse the repository at this point in the history
[fix.wallSample.speciesZero] Do not perform CalcWallSample for a particle that has been deleted

See merge request piclas/piclas!923
  • Loading branch information
pnizenkov committed Mar 11, 2024
2 parents 9db4449 + 94b7cae commit 8cf7ce8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/particles/surfacemodel/surfacemodel_main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ SUBROUTINE SurfaceModel(PartID,SideID,GlobalElemID,n_Loc)
TrackInfo%q = INT((Etatild+1.0)/dXiEQ_SurfSample)+1
END IF
SurfSideID = GlobalSide2SurfSide(SURF_SIDEID,SideID)
! Sample momentum, heatflux and collision counter on surface
CALL CalcWallSample(PartID,SurfSideID,'old',SurfaceNormal_opt=n_loc)
! Sample momentum, heatflux and collision counter on surface (Check if particle is still inside is required, since particles can
! be removed in the case of UseCircularInflow and nPorousBC. These particles shall not be sampled.)
IF(PDM%ParticleInside(PartID)) CALL CalcWallSample(PartID,SurfSideID,'old',SurfaceNormal_opt=n_loc)
END IF
!===================================================================================================================================
! 2.) Species Swap
Expand Down

0 comments on commit 8cf7ce8

Please sign in to comment.