|
IPPL (Independent Parallel Particle Layer)
IPPL
|
Concepts | |
| concept | HasMemberValueType |
Typedefs | |
| typedef std::size_t | size_type |
| template<typename MemorySpace> | |
| using | hash_type = typename detail::ViewType<int, 1, MemorySpace>::view_type |
| template<bool B, typename T> | |
| using | ConditionalType = std::conditional_t<B, T, void> |
| template<typename... Types> | |
| using | VariantFromConditionalTypes |
| template<typename... Types> | |
| using | VariantFromUniqueTypes |
| template<template< typename... > class Verifier, typename... Types> | |
| using | VariantWithVerifier |
Enumerations | |
| enum | e_functor_type { FOR , REDUCE , SCAN } |
Functions | |
| template<typename Field> | |
| std::ostream & | operator<< (std::ostream &, const BCondBase< Field > &) |
| bool | isUpper (unsigned int face) |
| unsigned int | getFaceDim (unsigned int face) |
| KOKKOS_INLINE_FUNCTION constexpr unsigned int | countHypercubes (unsigned int dim) |
| constexpr unsigned int | factorial (unsigned x) |
| constexpr unsigned int | binomialCoefficient (unsigned a, unsigned b) |
| template<unsigned Dim> | |
| constexpr unsigned int | countCubes (unsigned m) |
| template<unsigned Dim> | |
| unsigned int | indexToFace (unsigned int index) |
| template<unsigned Dim, typename... CubeTags, typename = std::enable_if_t<sizeof...(CubeTags) == Dim - 1>, typename = std::enable_if_t<std::conjunction_v<std::is_same<e_cube_tag, CubeTags>...>>> | |
| unsigned int | getCube (e_cube_tag tag, CubeTags... tags) |
| template<size_t... Idx> | |
| unsigned int | getFace_impl (const std::array< e_cube_tag, sizeof...(Idx)> &args, const std::index_sequence< Idx... > &) |
| template<unsigned Dim> | |
| unsigned int | getFace (unsigned int axis, e_cube_tag side) |
| template<unsigned long Point, unsigned long Index, typename Weights> | |
| KOKKOS_INLINE_FUNCTION constexpr Weights::value_type | interpolationWeight (const Weights &wlo, const Weights &whi) |
| template<unsigned long Point, unsigned long Index, typename Indices> | |
| KOKKOS_INLINE_FUNCTION constexpr Indices::value_type | interpolationIndex (const Indices &args) |
| template<unsigned long ScatterPoint, unsigned long... Index, typename View, typename T, typename IndexType = size_t> | |
| KOKKOS_INLINE_FUNCTION constexpr void | scatterToPoint (const std::index_sequence< Index... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args, const T &val) |
| template<unsigned long... ScatterPoint, typename View, typename T, typename IndexType = size_t> | |
| KOKKOS_INLINE_FUNCTION constexpr void | scatterToField (const std::index_sequence< ScatterPoint... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args, T val=1) |
| template<unsigned long GatherPoint, unsigned long... Index, typename View, typename T, typename IndexType = size_t> | |
| KOKKOS_INLINE_FUNCTION constexpr View::value_type | gatherFromPoint (const std::index_sequence< Index... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args) |
| template<unsigned long... GatherPoint, typename View, typename T, typename IndexType = size_t> | |
| KOKKOS_INLINE_FUNCTION constexpr View::value_type | gatherFromField (const std::index_sequence< GatherPoint... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args) |
| bool | checkOption (const char *arg, const char *lstr, const char *sstr) |
| template<typename T, typename> | |
| T | getNumericalOption (const char *arg) |
| template<typename ParticleContainer, typename index_type> | |
| void | copyAttributes (ParticleContainer &pc, const index_type &boundaryIndices) |
| template<typename ParticleContainer, typename index_type> | |
| void | sortParticles (ParticleContainer &pc, const index_type &newIndex) |
| template<typename T, unsigned Dim, class Mesh> | |
| std::ostream & | operator<< (std::ostream &, const RegionLayout< T, Dim, Mesh > &) |
| template<typename T, unsigned Dim, class Mesh, class... Properties> | |
| std::ostream & | operator<< (std::ostream &out, const RegionLayout< T, Dim, Mesh > &rl) |
| template<e_functor_type Type, typename Policy, typename... Acc, typename Functor> | |
| auto | functorize (const Functor &f) |
| template<typename Functor> | |
| void | runForAllSpaces (Functor &&f) |
| template<unsigned Dim, unsigned Current = 0, class BeginFunctor, class EndFunctor, class Functor, typename Check = std::nullptr_t> | |
| constexpr void | nestedLoop (BeginFunctor &&begin, EndFunctor &&end, Functor &&body, Check &&check=nullptr) |
| template<typename View, class Functor, typename Check = std::nullptr_t> | |
| constexpr void | nestedViewLoop (View &view, int shift, Functor &&body, Check &&check=nullptr) |
| template<typename T, unsigned Dim, class... Properties> | |
| void | write (const typename ViewType< T, Dim, Properties... >::view_type &view, std::ostream &out=std::cout) |
| template<typename View, size_t... Idx> | |
| decltype(auto) | shrinkView_impl (std::string label, const View &view, int nghost, const std::index_sequence< Idx... > &) |
| template<typename View> | |
| decltype(auto) | shrinkView (std::string label, const View &view, int nghost) |
| using ippl::detail::ConditionalType = std::conditional_t<B, T, void> |
Convenience alias for types that should or should not be included in variants constructed with ConstructVariant (defined below) based on some compile-time constant
| B | whether the type should be enabled |
| T | the type |
Definition at line 56 of file TypeUtils.h.
| using ippl::detail::hash_type = typename detail::ViewType<int, 1, MemorySpace>::view_type |
Definition at line 49 of file ViewTypes.h.
| typedef std::size_t ippl::detail::size_type |
Definition at line 13 of file IpplTypes.h.
| using ippl::detail::VariantFromConditionalTypes |
A variant containing all the enabled types, where "enabled" types are assumed to be void when disabled (i.e. std::conditional_t<B, T, void>)
Definition at line 146 of file TypeUtils.h.
| using ippl::detail::VariantFromUniqueTypes |
A variant containing just the unique types from the pack
Definition at line 154 of file TypeUtils.h.
| using ippl::detail::VariantWithVerifier |
A variant containing the types enabled by a custom verifier; to implement a custom verifier, provide the following:
template <typename Next, typename... Added> Next: the next input type to check Added: the types that have already been added
bool enable: whether the type should be added
typename type: the output type to be added
Definition at line 167 of file TypeUtils.h.
| Enumerator | |
|---|---|
| FOR | |
| REDUCE | |
| SCAN | |
Definition at line 122 of file ParallelDispatch.h.
|
constexpr |
Compile-time evaluation of binomial coefficients, aka elements of Pascal's triangle, aka choices from combinatorics, etc
| a | number of options |
| b | number of choices |
Definition at line 68 of file FieldLayout.h.
References factorial().
Referenced by countCubes().
| bool ippl::detail::checkOption | ( | const char * | arg, |
| const char * | lstr, | ||
| const char * | sstr ) |
Definition at line 115 of file Ippl.cpp.
Referenced by ippl::initialize().
|
inline |
Definition at line 144 of file ParticleSpatialOverlapLayout.hpp.
References ippl::ParticleBase< PLayout, IDProperties >::getLocalNum(), runForAllSpaces(), and ippl::ParticleBase< PLayout, IDProperties >::setLocalNum().
Referenced by ippl::ParticleSpatialOverlapLayout< T, Dim, Mesh, PositionProperties >::createPeriodicGhostParticles().
|
constexpr |
Compile-time evaluation of the number of hypercubes of dimension m in a hypercube of dimension Dim
| Dim | parent hypercube dimension |
| m | sub-hypercube dimension |
Definition at line 80 of file FieldLayout.h.
References binomialCoefficient(), and Dim.
|
constexpr |
Counts the hypercubes in a given dimension
| dim | the dimension |
Definition at line 44 of file FieldLayout.h.
Referenced by ippl::detail::HaloCells< T, Dim, ViewArgs >::exchangeBoundaries(), ippl::FieldLayout< Dim >::findNeighbors(), ippl::ParticleSpatialOverlapLayout< T, Dim, Mesh, PositionProperties >::forEachPair(), ippl::ParticleSpatialOverlapLayout< T, Dim, Mesh, PositionProperties >::getCellNeighbors(), ippl::FieldLayout< Dim >::getMatchingIndex(), ippl::ParticleSpatialOverlapLayout< T, Dim, Mesh, PositionProperties >::getParticleNeighbors(), ippl::ParticleSpatialOverlapLayout< T, Dim, Mesh, PositionProperties >::getParticleNeighbors(), and indexToFace().
|
constexpr |
Compile-time evaluation of x!
| x | input value |
Definition at line 57 of file FieldLayout.h.
References factorial().
Referenced by binomialCoefficient(), and factorial().
| auto ippl::detail::functorize | ( | const Functor & | f | ) |
Convenience function for wrapping a functor with the wrapper struct.
| Functor | the functor type |
| Type | the parallel dispatch type |
| Policy | the range policy type |
| Acc... | the accumulator type(s) |
Definition at line 203 of file ParallelDispatch.h.
References Dim.
Referenced by ippl::parallel_for(), and ippl::parallel_reduce().
|
constexpr |
Gathers the particle attribute from a field (see scatter_field for more details)
| GatherPoint... | the indices of the points from which to gather (sequence 0 to 2^Dim) |
| View | the field view type |
| T | the field data type |
| IndexType | the index type for accessing the field (default size_t) |
| view | the field view on which to scatter |
| wlo | lower weights for interpolation |
| whi | upper weights for interpolation |
| args | the indices at which to access the field |
Definition at line 68 of file CIC.hpp.
References gatherFromPoint().
|
constexpr |
Gathers from a field at a single point
| GatherPoint | the index of the point from which data is gathered |
| Index | the sequence 0...Dim - 1 |
| View | the field view type |
| T | the field data type |
| IndexType | the index type for accessing the field (default size_t) |
| view | the field view on which to scatter |
| wlo | lower weights for interpolation |
| whi | upper weights for interpolation |
| args | the indices at which to access the field |
Definition at line 59 of file CIC.hpp.
References interpolationIndex(), and interpolationWeight().
Referenced by gatherFromField().
| unsigned int ippl::detail::getCube | ( | e_cube_tag | tag, |
| CubeTags... | tags ) |
Computes the ternary-encoded index of a hypercube
| Dim | the number of dimensions in the full hypercube |
| CubeTags... | variadic argument list, must be all e_cube_tag |
| tag(s...) | the tags describing the hypercube of interest |
Definition at line 132 of file FieldLayout.h.
References Dim, and getCube().
Referenced by getCube(), and getFace_impl().
| unsigned int ippl::detail::getFace | ( | unsigned int | axis, |
| e_cube_tag | side ) |
Convenience alias for getCube for getting facets
| Dim | the number of dimensions in the parent hypercube |
| axis | the axis perpendicular to the facet |
| side | whether the facet is an upper or lower facet |
Definition at line 157 of file FieldLayout.h.
References getFace_impl(), and ippl::IS_PARALLEL.
| unsigned int ippl::detail::getFace_impl | ( | const std::array< e_cube_tag, sizeof...(Idx)> & | args, |
| const std::index_sequence< Idx... > & | ) |
Utility function for getFace
Definition at line 144 of file FieldLayout.h.
References getCube().
Referenced by getFace().
| unsigned int ippl::detail::getFaceDim | ( | unsigned int | face | ) |
Determine the axis perpendicular to a given facet (throws an exception if the index does not correspond to a facet)
| face | the facet's index |
Definition at line 14 of file FieldLayout.cpp.
Definition at line 120 of file Ippl.cpp.
Referenced by ippl::initialize().
| unsigned int ippl::detail::indexToFace | ( | unsigned int | index | ) |
Converts between ternary encoding and face set indexing
| Dim | the number of dimensions |
| index | the ternary-encoded index of a facet in [0, 3^Dim) |
Definition at line 110 of file FieldLayout.h.
References countHypercubes(), and Dim.
|
constexpr |
Computes the index for a given point for a given axis
| Point | index of the point |
| Index | index of the axis |
| Indices | the index vector type |
| args | the indices of the source point |
Definition at line 24 of file CIC.hpp.
Referenced by gatherFromPoint(), and scatterToPoint().
|
constexpr |
Computes the weight for a given point for a given axial direction
| Point | index of the point |
| Index | index of the axis |
| Weights | the weight vector type |
| wlo | lower weights for interpolation |
| whi | upper weights for interpolation |
Definition at line 11 of file CIC.hpp.
Referenced by gatherFromPoint(), and scatterToPoint().
| bool ippl::detail::isUpper | ( | unsigned int | face | ) |
Determines whether a facet is on the upper boundary of its domain. For lower dimension hypercubes, determines whether the component is on the upper boundary of the domain along at least one axis
| face | the hypercube's index |
Definition at line 5 of file FieldLayout.cpp.
Referenced by ippl::detail::ParticleLayout< T, Dim, PositionProperties >::applyBC(), ippl::detail::HaloCells< T, Dim, ViewArgs >::exchangeBoundaries(), ippl::detail::ParticleBC< T, Dim, ViewType >::ParticleBC(), ippl::detail::PeriodicBC< T, Dim, ViewType >::PeriodicBC(), ippl::detail::ReflectiveBC< T, Dim, ViewType >::ReflectiveBC(), and ippl::detail::SinkBC< T, Dim, ViewType >::SinkBC().
|
constexpr |
Expands into a nested loop via templating Source: https://stackoverflow.com/questions/34535795/n-dimensionally-nested-metaloops-with-templates
| Dim | the number of nested levels |
| BeginFunctor | functor type for determining the start index of each loop |
| EndFunctor | functor type for determining the end index of each loop |
| Functor | functor type for the loop body |
| Check | functor type for loop check |
| begin | a functor that returns the starting index for each level of the loop |
| end | a functor that returns the ending index (exclusive) for each level of the loop |
| body | a functor to be called in each iteration of the loop with the indices as arguments |
| check | a check function to be run after each loop; takes the current axis as an argument (default none) |
Definition at line 33 of file ViewUtils.h.
References Dim, and nestedLoop().
Referenced by nestedLoop(), and nestedViewLoop().
|
constexpr |
Convenience function for nested looping through a view
| View | the view type |
| Functor | the loop body functor type |
| Check | functor type for loop check |
| view | the view |
| shift | the number of ghost cells |
| body | the functor to be called in each iteration |
| check | a check function to be run after each loop; takes the current axis as an argument (default none) |
Definition at line 62 of file ViewUtils.h.
References nestedLoop().
Referenced by write().
|
inline |
Definition at line 28 of file BcTypes.hpp.
References ippl::detail::BCondBase< Field >::write().
| std::ostream & ippl::detail::operator<< | ( | std::ostream & | , |
| const RegionLayout< T, Dim, Mesh > & | ) |
| std::ostream & ippl::detail::operator<< | ( | std::ostream & | out, |
| const RegionLayout< T, Dim, Mesh > & | rl ) |
Definition at line 125 of file RegionLayout.hpp.
References ippl::detail::RegionLayout< T, Dim, Mesh, Properties >::write().
| void ippl::detail::runForAllSpaces | ( | Functor && | f | ) |
Performs an action for all memory spaces
| Functor | the functor type |
| f | a functor object whose call operator takes a memory space as a template parameter |
Definition at line 428 of file TypeUtils.h.
Referenced by copyAttributes(), ippl::ParticleBase< ippl::ParticleSpatialLayout< T, Dim > >::getAttributeNum(), ippl::ParticleBase< PLayout, IDProperties >::internalDestroy(), ippl::ParticleBase< PLayout, IDProperties >::pack(), ippl::ParticleBase< PLayout, IDProperties >::recvFromRank(), sortParticles(), and ippl::ParticleBase< PLayout, IDProperties >::unpack().
|
constexpr |
Scatters the particle attribute to the field.
The coordinates to which an attribute must be scattered is given by 2^n, where n is the number of dimensions. Example: the point (x, y) is scattered to (x, y), (x - 1, y), (x, y - 1), and (x - 1, y - 1). In other words, for each coordinate, we choose between the unchanged coordinate and a neighboring value. We can identify each point to which the attribute is scattered by interpreting this set of choices as a binary number.
| ScatterPoint... | the indices of the points to which to scatter (sequence 0 to 2^Dim) |
| View | the field view type |
| T | the field data type |
| IndexType | the index type for accessing the field (default size_t) |
| view | the field view on which to scatter |
| wlo | lower weights for interpolation |
| whi | upper weights for interpolation |
| args | the indices at which to access the field |
| val | the value to interpolate |
Definition at line 47 of file CIC.hpp.
References scatterToPoint().
|
constexpr |
Scatters to a field at a single point
| ScatterPoint | the index of the point to which we are scattering |
| Index | the sequence 0...Dim - 1 |
| View | the field view type |
| T | the field data type |
| IndexType | the index type for accessing the field (default size_t) |
| view | the field view on which to scatter |
| wlo | lower weights for interpolation |
| whi | upper weights for interpolation |
| args | the indices at which to access the field |
| val | the value to interpolate |
Definition at line 38 of file CIC.hpp.
References interpolationIndex(), and interpolationWeight().
Referenced by scatterToField().
| decltype(auto) ippl::detail::shrinkView | ( | std::string | label, |
| const View & | view, | ||
| int | nghost ) |
Constructs a new view with size equal to that of the given view, minus the ghost cells (used for heFFTe, which expects the data to have a certain layout and no ghost cells)
| label | the new view's name |
| view | the view to shrink |
| nghost | the number of ghost cells on the view's boundary |
Definition at line 122 of file ViewUtils.h.
References shrinkView_impl().
Referenced by ippl::FFT< CCTransform, ComplexField >::transform(), ippl::FFT< Cos1Transform, Field >::transform(), ippl::FFT< CosTransform, Field >::transform(), ippl::FFT< RCTransform, RealField >::transform(), and ippl::FFT< SineTransform, Field >::transform().
| decltype(auto) ippl::detail::shrinkView_impl | ( | std::string | label, |
| const View & | view, | ||
| int | nghost, | ||
| const std::index_sequence< Idx... > & | ) |
Utility function for shrinkView
Definition at line 106 of file ViewUtils.h.
Referenced by shrinkView().
|
inline |
Definition at line 804 of file ParticleSpatialOverlapLayout.hpp.
References runForAllSpaces().
Referenced by ippl::ParticleSpatialOverlapLayout< T, Dim, Mesh, PositionProperties >::buildCells().
| void ippl::detail::write | ( | const typename ViewType< T, Dim, Properties... >::view_type & | view, |
| std::ostream & | out = std::cout ) |
Writes a view to an output stream
| T | view data type |
| Dim | view dimension |
| Properties | further template parameters of Kokkos |
| view | to write |
| out | stream |
Definition at line 84 of file ViewUtils.h.
References Dim, and nestedViewLoop().
Referenced by ippl::BareField< T, Dim, ViewArgs >::write().