Skip to content

Commit

Permalink
Fixed last changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KseniaBastrakova committed Jul 27, 2020
1 parent be717f7 commit be2a62a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/TBG_macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ TBG_<species>_pngYX="--<species>_png.period 10 --<species>_png.axis yx --<specie
TBG_<species>_merger="--<species>_merger.period 100 --<species>_merger.minParticlesToMerge 8 --<species>_merger.posSpreadThreshold 0.2 --<species>_merger.absMomSpreadThreshold 0.01"

# Enable probabilistic version of particle merging
TBG_<species>_randomizedMerger="--<species>_randomizedMerger.period 100 --<species>_randomizedMerger.maxParticlesToMerge 8 --<species>_randomizedMerger.ratioDeletedParticles 0.9"
TBG_<species>_randomizedMerger="--<species>_randomizedMerger.period 100 --<species>_randomizedMerger.maxParticlesToMerge 8 \
--<species>_randomizedMerger.ratioDeletedParticles 0.9 --<species>_merger.posSpreadThreshold 0.01 \
--<species>_merger.momSpreadThreshold 0.0005"

# Notification period of position plugin (single-particle debugging)
TBG_<species>_pos_dbg="--<species>_position.period 1"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage/plugins/particleMergerProbabilistic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ PIConGPU command line option Description
============================================ ================================================================================================================
``--<species>_merger.period`` The ouput periodicity of the plugin. A value of ``100`` would mean an output at simulation time step *0, 100, 200, ...*.

``--<species>_merger.ratioOfDeletedParticles`` The ratio of particles to delete. The parameter have to be in Range *[0:1]*.
``--<species>_merger.ratioDeletedParticles`` The ratio of particles to delete. The parameter have to be in Range *[0:1]*.

``--<species>_merger.maxParticlesToMerge`` Maximum number of macroparticles that can be merged into a single macroparticle.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ namespace randomizedParticleMerger
if ( voronoiCell.numMacroParticles == 2 )
subdivisionProbability = voronoiCell.expectedNumMacroParticles - 1.0_X;
if ( voronoiCell.numMacroParticles == 3 )
subdivisionProbability = ( voronoiCell.expectedNumMacroParticles - 1 ) / 2.0_X;
subdivisionProbability = ( voronoiCell.expectedNumMacroParticles - 1.0_X ) / 2.0_X;

return randomGen() < subdivisionProbability;
}
Expand Down

0 comments on commit be2a62a

Please sign in to comment.