|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
Smoke tests for PartBunch::computeSelfFields() with and without particle binning enabled.
More...
#include <gtest/gtest.h>#include <cmath>#include <memory>#include <random>#include <string>#include "AbstractObjects/OpalData.h"#include "Attributes/Attributes.h"#include "Ippl.h"#include "PartBunch/PartBunch.h"#include "Structure/Beam.h"#include "Structure/BinningCmd.h"#include "Structure/DataSink.h"#include "Structure/FieldSolverCmd.h"#include "Utilities/Options.h"#include "Utility/Inform.h"
Go to the source code of this file.
Smoke tests for PartBunch::computeSelfFields() with and without particle binning enabled.
This file validates that the self-field computation pathway is stable across the "legacy" (no binning attached) and "binned" (adaptive bins attached) execution paths.
The tests construct a small PartBunch<double,3> with a minimal FieldSolverCmd configuration (type "NONE" and periodic FFT boundary conditions), populate a set of particles with deterministic random initial conditions, and then invoke PartBunch::computeSelfFields().
Key behaviors verified:
computeSelfFields() does not throw for a non-binned bunch.computeSelfFields() does not throw when adaptive binning is attached."NONE", the per-particle electric field E remains finite and (near) zero after the call.Notes:
Definition in file TestBinnedFieldSolver.cpp.