|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
#include "Algorithms/DefaultVisitor.h"#include "Algorithms/ParallelTracker.h"#include "Attributes/Attributes.h"#include "BeamlineCore/LaserRep.h"#include "BeamlineCore/RBendRep.h"#include "BeamlineCore/SBendRep.h"#include "Beamlines/FlaggedElmPtr.h"#include "Beamlines/TBeamline.h"#include "Elements/OpalLaser.h"#include "Physics/Physics.h"#include "Utilities/LogicalError.h"#include "Utilities/OpalException.h"#include "gtest/gtest.h"#include <cmath>
Go to the source code of this file.
Functions | |
| TEST (TestLaser, UpdateStoresValidatedParameters) | |
| TEST (TestLaser, UpdateDefaultsStokesToZero) | |
| TEST (TestLaser, UpdateRequiresWavelength) | |
| TEST (TestLaser, UpdateRejectsNonPositivePulseEnergy) | |
| TEST (TestLaser, UpdateRejectsBadDirectionSize) | |
| TEST (TestLaser, UpdateRejectsZeroDirection) | |
| TEST (TestLaser, UpdateRejectsBadStokesSize) | |
| TEST (TestLaser, UpdateRejectsStokesNormAboveOne) | |
| TEST (TestLaser, UpdateRejectsNegativeLength) | |
| TEST (TestLaser, LinearComptonForwardPhotonEnergyMatchesExactNinetyDegreeKinematics) | |
| Benchmark the CAIN-inspired linear Compton helper for a 90 degree laser crossing. | |
| TEST (TestLaser, BeamlineVisitorDispatchesLaserAndBendsToSpecificHooks) | |
| TEST | ( | TestLaser | , |
| BeamlineVisitorDispatchesLaserAndBendsToSpecificHooks | |||
| ) |
Definition at line 200 of file TestLaser.cpp.
References Laser::accept(), RBend::accept(), and SBend::accept().

| TEST | ( | TestLaser | , |
| LinearComptonForwardPhotonEnergyMatchesExactNinetyDegreeKinematics | |||
| ) |
Benchmark the CAIN-inspired linear Compton helper for a 90 degree laser crossing.
The configuration is the simplest fixed-angle case used as a physics-facing unit test: an electron with total energy \(E_e\) moves along \(+\hat z\), the laser propagates along \(+\hat x\), and the scattered photon is evaluated in the forward electron direction \(+\hat z\).
The exact reference formulas used in this test are
\[ \omega_L = \frac{2\pi \hbar c}{\lambda_L}, \]
\[ p_e = \sqrt{E_e^2 - m_e^2}, \]
\[ x = \frac{2 E_e \omega_L}{m_e^2}, \]
and the forward scattered photon energy from exact energy-momentum conservation, written in a numerically stable form,
\[ \omega_\gamma^{\prime} = \frac{E_e\,\omega_L}{\omega_L + m_e^2/(E_e + p_e)}. \]
The stable denominator avoids catastrophic cancellation in the equivalent expression \(E_e - p_e + \omega_L\) for relativistic electrons.
Definition at line 167 of file TestLaser.cpp.
References OpalLaser::DIR, Element::getElement(), Object::itsAttr, Physics::m_e, Attributes::setRealArray(), and OpalLaser::update().

| TEST | ( | TestLaser | , |
| UpdateDefaultsStokesToZero | |||
| ) |
Definition at line 67 of file TestLaser.cpp.
References Element::getElement(), and OpalLaser::update().

| TEST | ( | TestLaser | , |
| UpdateRejectsBadDirectionSize | |||
| ) |
Definition at line 99 of file TestLaser.cpp.
References OpalLaser::DIR, Object::itsAttr, Attributes::setRealArray(), and OpalLaser::update().

| TEST | ( | TestLaser | , |
| UpdateRejectsBadStokesSize | |||
| ) |
Definition at line 115 of file TestLaser.cpp.
References Object::itsAttr, Attributes::setRealArray(), OpalLaser::STOKES, and OpalLaser::update().

| TEST | ( | TestLaser | , |
| UpdateRejectsNegativeLength | |||
| ) |
Definition at line 131 of file TestLaser.cpp.
References Object::itsAttr, OpalElement::LENGTH, Attributes::setReal(), and OpalLaser::update().

| TEST | ( | TestLaser | , |
| UpdateRejectsNonPositivePulseEnergy | |||
| ) |
Definition at line 91 of file TestLaser.cpp.
References Object::itsAttr, OpalLaser::PULSEENERGY, Attributes::setReal(), and OpalLaser::update().

| TEST | ( | TestLaser | , |
| UpdateRejectsStokesNormAboveOne | |||
| ) |
Definition at line 123 of file TestLaser.cpp.
References Object::itsAttr, Attributes::setRealArray(), OpalLaser::STOKES, and OpalLaser::update().

| TEST | ( | TestLaser | , |
| UpdateRejectsZeroDirection | |||
| ) |
Definition at line 107 of file TestLaser.cpp.
References OpalLaser::DIR, Object::itsAttr, Attributes::setRealArray(), and OpalLaser::update().

| TEST | ( | TestLaser | , |
| UpdateRequiresWavelength | |||
| ) |
Definition at line 80 of file TestLaser.cpp.
References OpalLaser::DIR, Object::itsAttr, OpalLaser::PULSEENERGY, OpalLaser::PULSELENGTH, Attributes::setReal(), Attributes::setRealArray(), OpalLaser::update(), OpalLaser::WAISTX, and OpalLaser::WAISTY.

| TEST | ( | TestLaser | , |
| UpdateStoresValidatedParameters | |||
| ) |
Definition at line 45 of file TestLaser.cpp.
References Element::getElement(), Object::itsAttr, OpalElement::LENGTH, Attributes::setReal(), Attributes::setRealArray(), OpalLaser::STOKES, and OpalLaser::update().
