|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
Unit tests for the particle binning subsystem (tools, histogram, and adaptive binning workflow). More...
#include "Ippl.h"#include "Utilities/OpalException.h"#include "gtest/gtest.h"#include "PartBunch/Binning/AdaptBins.h"#include "PartBunch/Binning/BinHisto.h"#include "PartBunch/Binning/BinningTools.h"#include "PartBunch/Binning/ParallelReduceTools.h"#include <algorithm>#include <cmath>#include <iostream>#include <numeric>#include <random>#include <string>#include <vector>
Go to the source code of this file.
Classes | |
| struct | TestBunch |
| Minimal particle bunch for binning unit tests. More... | |
| class | BinningTest |
| struct | FillPolicyHistogram1 |
| struct | FillPolicyHistogram2 |
Typedefs | |
| template<unsigned Dim> | |
| using | Mesh_t = ippl::UniformCartesian< double, Dim > |
| template<unsigned Dim> | |
| using | Centering_t = typename Mesh_t< Dim >::DefaultCentering |
| template<typename T , unsigned Dim, class... ViewArgs> | |
| using | Field = ippl::Field< T, Dim, Mesh_t< Dim >, Centering_t< Dim >, ViewArgs... > |
| template<typename T , unsigned Dim> | |
| using | Vector_t = ippl::Vector< T, Dim > |
| template<typename T , unsigned Dim, class... ViewArgs> | |
| using | VField_t = Field< Vector_t< T, Dim >, Dim, ViewArgs... > |
| template<typename T , unsigned Dim> | |
| using | Vector = ippl::Vector< T, Dim > |
| using | size_type = ippl::detail::size_type |
| using | TestT = double |
| using | TestMesh_t = ippl::UniformCartesian< TestT, TestDim > |
| using | TestPLayout_t = ippl::ParticleSpatialLayout< TestT, TestDim, TestMesh_t > |
| using | TestFL_t = ippl::FieldLayout< TestDim > |
| using | Container_t = TestBunch |
| using | Selector_t = ParticleBinning::CoordinateSelector< Container_t > |
| using | AdaptBins_t = ParticleBinning::AdaptBins< Container_t, Selector_t > |
| using | bin_index_type = Container_t::bin_index_type |
| using | value_type = TestT |
Functions | |
| TEST_F (BinningTest, ArrayReductionDefaultInit) | |
| TEST_F (BinningTest, ArrayReductionCopy) | |
| TEST_F (BinningTest, ArrayReductionPlusEquals) | |
| TEST_F (BinningTest, CreateReductionObjectValid) | |
| TEST_F (BinningTest, CreateReductionObjectInvalid) | |
| TEST_F (BinningTest, HostArrayReductionBasics) | |
| TEST_F (BinningTest, KokkosReductionIdentityArrayReduction) | |
| TEST_F (BinningTest, KokkosReductionIdentityHostArrayReduction) | |
| TEST_F (BinningTest, DetermineHistoReductionModeStandard) | |
| TEST_F (BinningTest, DetermineHistoReductionModeForced) | |
| TEST_F (BinningTest, ComputeFixSum) | |
| TEST_F (BinningTest, ViewIsSortedTrue) | |
| TEST_F (BinningTest, ViewIsSortedFalse) | |
| TEST_F (BinningTest, HistogramConstruction) | |
| TEST_F (BinningTest, HistogramInitSetsWidthsAndPostSum) | |
| TEST_F (BinningTest, HistogramGetNPartInBin) | |
| TEST_F (BinningTest, HistogramCopyConstructor) | |
| TEST_F (BinningTest, HistogramAssignmentOperator) | |
| TEST_F (BinningTest, HistogramGetBinIterationPolicy) | |
| TEST_F (BinningTest, HistogramMergeBins) | |
| TEST_F (BinningTest, HistogramDualViewConstruction) | |
| TEST_F (BinningTest, CoordinateSelectorReturnsNormalizedValues) | |
| TEST_F (BinningTest, GetBinBasic) | |
| TEST_F (BinningTest, GetBinClampsOutOfRange) | |
| TEST_F (BinningTest, GetBinOnBoundary) | |
| TEST_F (BinningTest, AdaptBinsConstruction) | |
| TEST_F (BinningTest, AdaptBinsSetCurrentBinCount) | |
| TEST_F (BinningTest, AdaptBinsInitLimits) | |
| TEST_F (BinningTest, AdaptBinsDoFullRebin) | |
| TEST_F (BinningTest, AdaptBinsGlobalHistogramSumsToTotal) | |
| TEST_F (BinningTest, AdaptBinsBinsAssignedInRange) | |
| TEST_F (BinningTest, AdaptBinsSortContainerByBin) | |
| TEST_F (BinningTest, AdaptBinsBinIterationPolicyCoversAllParticles) | |
| TEST_F (BinningTest, AdaptBinsGenAdaptiveHistogramReducesBins) | |
| TEST_F (BinningTest, AdaptBinsRebinWithDifferentBinCounts) | |
| TEST_F (BinningTest, AdaptBinsRepeatedDoFullRebin) | |
| TEST_F (BinningTest, AdaptBinsSortAndPoliciesConsistent) | |
| TEST_F (BinningTest, AdaptBinsHistoReductionModes) | |
| TEST_F (BinningTest, AdaptBinsUniformDistributionEvenBins) | |
| TEST_F (BinningTest, AdaptBinsFullWorkflow) | |
Variables | |
| constexpr unsigned | TestDim = 3 |
Unit tests for the particle binning subsystem (tools, histogram, and adaptive binning workflow).
Unit tests for the Binning module:
A minimal bunch type (TestBunch) is constructed with a mesh and field layout, similar to how it is done for IPPL's GatherScatterTest.
Definition in file TestBinning.cpp.
Definition at line 93 of file TestBinning.cpp.
Definition at line 94 of file TestBinning.cpp.
| using Centering_t = typename Mesh_t<Dim>::DefaultCentering |
Definition at line 25 of file TestBinning.cpp.
| using Container_t = TestBunch |
Definition at line 91 of file TestBinning.cpp.
| using Field = ippl::Field<T, Dim, Mesh_t<Dim>, Centering_t<Dim>, ViewArgs...> |
Definition at line 28 of file TestBinning.cpp.
Definition at line 22 of file TestBinning.cpp.
Definition at line 92 of file TestBinning.cpp.
| using size_type = ippl::detail::size_type |
Definition at line 45 of file TestBinning.cpp.
Definition at line 63 of file TestBinning.cpp.
| using TestMesh_t = ippl::UniformCartesian<TestT, TestDim> |
Definition at line 61 of file TestBinning.cpp.
| using TestPLayout_t = ippl::ParticleSpatialLayout<TestT, TestDim, TestMesh_t> |
Definition at line 62 of file TestBinning.cpp.
| using TestT = double |
Definition at line 59 of file TestBinning.cpp.
| using value_type = TestT |
Definition at line 95 of file TestBinning.cpp.
Definition at line 38 of file TestBinning.cpp.
Definition at line 31 of file TestBinning.cpp.
| using VField_t = Field<Vector_t<T, Dim>, Dim, ViewArgs...> |
Definition at line 34 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsBinIterationPolicyCoversAllParticles | |||
| ) |
Definition at line 846 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsBinsAssignedInRange | |||
| ) |
Definition at line 802 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsConstruction | |||
| ) |
Definition at line 741 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsDoFullRebin | |||
| ) |
Definition at line 771 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsFullWorkflow | |||
| ) |
Definition at line 1004 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsGenAdaptiveHistogramReducesBins | |||
| ) |
Definition at line 863 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsGlobalHistogramSumsToTotal | |||
| ) |
Definition at line 787 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsHistoReductionModes | |||
| ) |
Definition at line 952 of file TestBinning.cpp.
References ParticleBinning::HostOnly.
| TEST_F | ( | BinningTest | , |
| AdaptBinsInitLimits | |||
| ) |
Definition at line 760 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsRebinWithDifferentBinCounts | |||
| ) |
Definition at line 892 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsRepeatedDoFullRebin | |||
| ) |
Definition at line 910 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsSetCurrentBinCount | |||
| ) |
Definition at line 748 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsSortAndPoliciesConsistent | |||
| ) |
Definition at line 927 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsSortContainerByBin | |||
| ) |
Definition at line 819 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| AdaptBinsUniformDistributionEvenBins | |||
| ) |
Definition at line 977 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| ArrayReductionCopy | |||
| ) |
Definition at line 225 of file TestBinning.cpp.
References ParticleBinning::ArrayReduction< SizeType, IndexType, N >::the_array.
| TEST_F | ( | BinningTest | , |
| ArrayReductionDefaultInit | |||
| ) |
Definition at line 216 of file TestBinning.cpp.
References ParticleBinning::ArrayReduction< SizeType, IndexType, N >::the_array.
| TEST_F | ( | BinningTest | , |
| ArrayReductionPlusEquals | |||
| ) |
Definition at line 238 of file TestBinning.cpp.
References ParticleBinning::ArrayReduction< SizeType, IndexType, N >::the_array.
| TEST_F | ( | BinningTest | , |
| ComputeFixSum | |||
| ) |
Definition at line 377 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| CoordinateSelectorReturnsNormalizedValues | |||
| ) |
Definition at line 669 of file TestBinning.cpp.
References ParticleBinning::CoordinateSelector< bunch_type >::updateDataArr().

| TEST_F | ( | BinningTest | , |
| CreateReductionObjectInvalid | |||
| ) |
Definition at line 268 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| CreateReductionObjectValid | |||
| ) |
Definition at line 253 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| DetermineHistoReductionModeForced | |||
| ) |
Definition at line 356 of file TestBinning.cpp.
References ParticleBinning::HostOnly, and ParticleBinning::TeamBased.
| TEST_F | ( | BinningTest | , |
| DetermineHistoReductionModeStandard | |||
| ) |
Definition at line 336 of file TestBinning.cpp.
References ParticleBinning::HostOnly, ParticleBinning::ParallelReduce, ParticleBinning::Standard, and ParticleBinning::TeamBased.
| TEST_F | ( | BinningTest | , |
| GetBinBasic | |||
| ) |
Definition at line 697 of file TestBinning.cpp.
References ParticleBinning::AdaptBins< BunchType, BinningSelector >::getBin().

| TEST_F | ( | BinningTest | , |
| GetBinClampsOutOfRange | |||
| ) |
Definition at line 711 of file TestBinning.cpp.
References ParticleBinning::AdaptBins< BunchType, BinningSelector >::getBin().

| TEST_F | ( | BinningTest | , |
| GetBinOnBoundary | |||
| ) |
Definition at line 725 of file TestBinning.cpp.
References ParticleBinning::AdaptBins< BunchType, BinningSelector >::getBin().

| TEST_F | ( | BinningTest | , |
| HistogramAssignmentOperator | |||
| ) |
Definition at line 523 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| HistogramConstruction | |||
| ) |
Definition at line 449 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| HistogramCopyConstructor | |||
| ) |
Definition at line 506 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| HistogramDualViewConstruction | |||
| ) |
Definition at line 645 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| HistogramGetBinIterationPolicy | |||
| ) |
Definition at line 554 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| HistogramGetNPartInBin | |||
| ) |
Definition at line 491 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| HistogramInitSetsWidthsAndPostSum | |||
| ) |
Definition at line 458 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| HistogramMergeBins | |||
| ) |
Definition at line 580 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| HostArrayReductionBasics | |||
| ) |
Definition at line 277 of file TestBinning.cpp.
References ParticleBinning::HostArrayReduction< SizeType, IndexType >::the_array.
| TEST_F | ( | BinningTest | , |
| KokkosReductionIdentityArrayReduction | |||
| ) |
Definition at line 307 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| KokkosReductionIdentityHostArrayReduction | |||
| ) |
Definition at line 317 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| ViewIsSortedFalse | |||
| ) |
Definition at line 423 of file TestBinning.cpp.
| TEST_F | ( | BinningTest | , |
| ViewIsSortedTrue | |||
| ) |
Definition at line 403 of file TestBinning.cpp.
|
constexpr |
Definition at line 58 of file TestBinning.cpp.
Referenced by BinningTest::createParticles(), BinningTest::createParticlesUniformP(), and BinningTest::SetUp().