OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
TestParticleContainer.cpp File Reference

Unit tests for ParticleContainer<double, 3>. More...

#include <gtest/gtest.h>
#include <mpi.h>
#include <array>
#include <cmath>
#include <cstdint>
#include <memory>
#include <vector>
#include "Ippl.h"
#include "PartBunch/FieldContainer.hpp"
#include "PartBunch/ImageChargeScatterController.h"
#include "PartBunch/ParticleContainer.hpp"
#include "Utilities/Options.h"
Include dependency graph for TestParticleContainer.cpp:

Go to the source code of this file.

Detailed Description

Unit tests for ParticleContainer<double, 3>.

Covers:

  • Charge / mass storage in both SingleValue and Attributes QM modes.
  • Round-trip scaleDtByCharge / unscaleDtByCharge in both QM modes.
  • Moment computation stability (empty and known-data cases).
  • Min / max position computation.
  • markParticlesOutside and deleteInvalidParticles mask-driven deletion.

The fixture constructs a lightweight ParticleContainer on a minimal 8^3 periodic mesh without a full PartBunch, so no field-solver or DataSink infrastructure is required.

Definition in file TestParticleContainer.cpp.