XGC1
shift.hpp
Go to the documentation of this file.
1 #ifndef SHIFT_HPP
2 #define SHIFT_HPP
3 
4 #include "plasma.hpp"
6 #include "grid.hpp"
7 #include "sort.hpp"
8 
9 struct ShiftOptions{
10  bool plane_sort_only; // Skip the triangle search; send particles to the MPI process with the same plane rank on the correct plane
11  bool evenly_distribute_ptl; // Ignore poloidal domain decomposition; distribute particles evenly on the plane.
12 
16  {}
17 };
18 
19 #ifdef USE_MPI
20 template<class DataType>
21 void transpose_and_shift(Kokkos::View<int*,HostType>& sendcnt, Kokkos::View<int*,HostType>& sdispls, Kokkos::View<int*,HostType>& recvcnt, Kokkos::View<int*,HostType>& rdispls, Cabana::AoSoA<DataType,DeviceType,VEC_LEN>& local_particles, int n_staying, int n_leaving, int n_arriving, const MyMPI& mpi);
22 #endif
23 
25 
26 void shift_all_species(Plasma& plasma, const Grid<DeviceType>& grid, const MagneticField<DeviceType>& magnetic_field, const DomainDecomposition<DeviceType>& pol_decomp, bool evenly_distribute_ptl=false);
27 
28 #endif
Definition: magnetic_field.hpp:12
Definition: plasma.hpp:13
Definition: species.hpp:75
Definition: magnetic_field.F90:1
type(ptl_type), dimension(:), allocatable, target local_particles
Definition: resamp_mod.F90:150
logical false
Definition: module.F90:103
subroutine plasma(grid, itr, p, dene_out, deni_out, Te_out, Ti_out, Vparai_out, ignore_vacuum)
Calculate the plasma density, temperature, and parallel velocity for a point in triangle itr using pl...
Definition: neutral_totalf.F90:1541
void transpose_and_shift(Kokkos::View< int *, HostType > &sendcnt, Kokkos::View< int *, HostType > &sdispls, Kokkos::View< int *, HostType > &recvcnt, Kokkos::View< int *, HostType > &rdispls, Cabana::AoSoA< DataType, DeviceType, VEC_LEN > &local_particles, int n_staying, int n_leaving, int n_arriving, const MyMPI &mpi)
Definition: shift.cpp:168
void shift(Species< DeviceType > &species, SortViews< DeviceType > &sort_views, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, ShiftOptions shift_options=ShiftOptions())
Definition: shift.cpp:305
void shift_all_species(Plasma &plasma, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, bool evenly_distribute_ptl=false)
Definition: shift.cpp:440
Definition: my_mpi.hpp:19
Definition: shift.hpp:9
bool plane_sort_only
Definition: shift.hpp:10
bool evenly_distribute_ptl
Definition: shift.hpp:11
ShiftOptions()
Definition: shift.hpp:13
Definition: sort.hpp:9