Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions alpine/BumponTailInstabilityManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ class BumponTailInstabilityManager : public AlpineManager<T, Dim> {

this->pcontainer_m->create(nlocal);

view_type* R = &(this->pcontainer_m->R.getView());
samplingR.generate(*R, rand_pool64);
view_type R = this->pcontainer_m->R.getView();
samplingR.generate(R, rand_pool64);

view_type* P = &(this->pcontainer_m->P.getView());
view_type P = this->pcontainer_m->P.getView();
Comment thread
aaadelmann marked this conversation as resolved.

double mu[Dim];
double sd[Dim];
Expand All @@ -288,12 +288,12 @@ class BumponTailInstabilityManager : public AlpineManager<T, Dim> {
// sample first nlocBulk with muBulk as mean velocity
mu[Dim - 1] = muBulk_m;
Kokkos::parallel_for(Kokkos::RangePolicy<int>(0, nlocBulk),
ippl::random::randn<double, Dim>(*P, rand_pool64, mu, sd));
ippl::random::randn<double, Dim>(P, rand_pool64, mu, sd));

// sample remaining with muBeam as mean velocity
mu[Dim - 1] = muBeam_m;
Kokkos::parallel_for(Kokkos::RangePolicy<int>(nlocBulk, nlocal),
ippl::random::randn<double, Dim>(*P, rand_pool64, mu, sd));
ippl::random::randn<double, Dim>(P, rand_pool64, mu, sd));

Kokkos::fence();
ippl::Comm->barrier();
Expand Down
8 changes: 4 additions & 4 deletions alpine/LandauDampingManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,18 +226,18 @@ class LandauDampingManager : public AlpineManager<T, Dim> {

this->pcontainer_m->create(nlocal);

view_type* R = &(this->pcontainer_m->R.getView());
samplingR.generate(*R, rand_pool64);
view_type R = this->pcontainer_m->R.getView();
samplingR.generate(R, rand_pool64);

view_type* P = &(this->pcontainer_m->P.getView());
view_type P = this->pcontainer_m->P.getView();

double mu[Dim];
double sd[Dim];
for (unsigned int i = 0; i < Dim; i++) {
mu[i] = 0.0;
sd[i] = 1.0;
}
Kokkos::parallel_for(nlocal, ippl::random::randn<double, Dim>(*P, rand_pool64, mu, sd));
Kokkos::parallel_for(nlocal, ippl::random::randn<double, Dim>(P, rand_pool64, mu, sd));
Kokkos::fence();
ippl::Comm->barrier();

Expand Down
8 changes: 4 additions & 4 deletions alpine/PenningTrapManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,14 @@ class PenningTrapManager : public AlpineManager<T, Dim> {

this->pcontainer_m->create(nlocal);

view_type* R = &(this->pcontainer_m->R.getView());
samplingR.generate(*R, rand_pool64);
view_type R = this->pcontainer_m->R.getView();
samplingR.generate(R, rand_pool64);

view_type* P = &(this->pcontainer_m->P.getView());
view_type P = this->pcontainer_m->P.getView();

double muP[Dim] = {0.0, 0.0, 0.0};
double sdP[Dim] = {1.0, 1.0, 1.0};
Kokkos::parallel_for(nlocal, ippl::random::randn<double, Dim>(*P, rand_pool64, muP, sdP));
Kokkos::parallel_for(nlocal, ippl::random::randn<double, Dim>(P, rand_pool64, muP, sdP));

Kokkos::fence();
ippl::Comm->barrier();
Expand Down
Loading
Loading