-
Notifications
You must be signed in to change notification settings - Fork 225
Calculate better seeds #1046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate better seeds #1046
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /** | ||
| * Copyright 2013-2014 Axel Huebl, Heiko Burau, Rene Widera | ||
| * Copyright 2013-2015 Axel Huebl, Heiko Burau, Rene Widera, | ||
| * Alexander Grund | ||
| * | ||
| * This file is part of PIConGPU. | ||
| * | ||
|
|
@@ -54,8 +55,10 @@ struct TemperatureImpl : private T_ValueFunctor | |
|
|
||
| GlobalSeed globalSeed; | ||
| mpi::SeedPerRank<simDim> seedPerRank; | ||
| seed = seedPerRank(globalSeed(), PMacc::traits::GetUniqueTypeId<FrameType, uint32_t>::uid()); | ||
| seed ^= TEMPERATURE_SEED; | ||
| seed = globalSeed() ^ | ||
| PMacc::traits::GetUniqueTypeId<FrameType, uint32_t>::uid() ^ | ||
| TEMPERATURE_SEED; | ||
| seed = seedPerRank(seed) ^ currentStep; | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can now be used at each time step, pls add the |
||
| const SubGrid<simDim>& subGrid = Environment<simDim>::get().SubGrid(); | ||
| localCells = subGrid.getLocalDomain().size; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,8 +53,11 @@ struct RandomImpl | |
| typedef typename SpeciesType::FrameType FrameType; | ||
|
|
||
| mpi::SeedPerRank<simDim> seedPerRank; | ||
| seed = seedPerRank(GlobalSeed()(), PMacc::traits::GetUniqueTypeId<FrameType, uint32_t>::uid()); | ||
| seed ^= POSITION_SEED; | ||
| GlobalSeed globalSeed; | ||
| seed = globalSeed() ^ | ||
| PMacc::traits::GetUniqueTypeId<FrameType, uint32_t>::uid() ^ | ||
| POSITION_SEED; | ||
| seed = seedPerRank(seed) ^ currentStep; | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pls add the |
||
| const uint32_t numSlides = MovingWindow::getInstance( ).getSlideCounter( currentStep ); | ||
| const SubGrid<simDim>& subGrid = Environment<simDim>::get().SubGrid(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think to remember that we discuss this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? I thought we agreed on just reversing the rank and xor the localShift. If localShift is a globally constant value of whatever size it doesn't matter though if it is also reversed. Not reversing it and assuming localshift to be small we'd get some more bits set. Only problem would be, if localshift is also counted (e.g. 1 increasing value per species) then XORing this before the reversing would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I agree with that.