Skip to content

Namespace rayx

Namespace List > rayx

Namespaces

Type Name
namespace BlockSizeConstraint
namespace complex
namespace detail
namespace xml

Classes

Type Name
class BeamlineNode
Base class for all nodes in the beamline hierarchy (scene/model graph).
class CircleSource
struct CollisionPoint
struct CollisionWithElement
struct ComplexFresnelCoeffs
struct ConstState
stores all constant buffers
struct DatEntry
struct DatFile
struct Deg
class DesignElement
class DesignMap
class DesignSource
struct DeviceConfig
class DeviceTracer
DeviceTracer is an interface to a tracer implementation we need this interface to remove the actual implementation from the rayx api.
class DipoleSource
struct EnergyDistributionDataBase
struct EnergyDistributionList
struct Exit
struct FresnelCoeffs
struct GenRays <typename Acc>
class Group
struct HardEdge
struct IgnoreLog
class InstrumentationTimer
class LightSourceBase
struct Log
struct MaterialTables
class MatrixSource
class MegaKernelTracer <typename AccTag>
struct MutableState
stores all mutable buffers
struct NffEntry
This struct represents one line of a .nff file.
struct NffTable
class ObjectIndexMask
class ObjectMask
struct ObjectTransform
struct OpticalElement
Structure to represent an element in the ray tracing simulation.
struct OpticalElementAndTransform
struct PalikEntry
This struct represents one line of a .NKP file.
struct PalikTable
class PixelSource
class PointSource
struct PsiAndStokes
struct Rad
struct Rand
struct RayListSource
struct Rays
A structure representing a collection of rays and their attributes. Each attribute is stored as a vector, allowing for efficient storage and manipulation of multiple rays. The Rays structure supports move semantics for efficient transfers, but disables copy semantics to prevent accidental costly copies. Use thecopy() method to create an explicit copy when needed.
struct RaysBuf <typename Acc>
struct RaysPtr
class ResourceHandler
struct Resources <typename Acc>
struct RotationBase
struct SeparateEnergies
If there is only one spike (i.e. m_numberOfEnergies = 1), then this spike is at m_centerEnergy .
class SimpleUndulatorSource
struct SlopeError
Structure to represent slope error parameters.
struct SoftEdge
class Tracer
class Undefined
class Variant <typename Base, Ts>
struct Verb
struct Warn

Public Types

Type Name
typedef Group Beamline
enum BehaveType
typedef Variant< detail::BehaviourTypes, detail::BehaviourTypes::Mirror, detail::BehaviourTypes::Grating, detail::BehaviourTypes::Slit, detail::BehaviourTypes::RZP, detail::BehaviourTypes::ImagePlane, detail::BehaviourTypes::Crystal, detail::BehaviourTypes::Foil > Behaviour
enum BehaviourType
enum CentralBeamstop
typedef Variant< detail::CoatingTypes, detail::CoatingTypes::SubstrateOnly, detail::CoatingTypes::OneCoating, detail::CoatingTypes::MultilayerCoating > Coating
enum CurvatureType
typedef Variant< detail::CutoutTypes, detail::CutoutTypes::Rect, detail::CutoutTypes::Elliptical, detail::CutoutTypes::Trapezoid, detail::CutoutTypes::Unlimited > Cutout
enum CutoutType
enum CylinderDirection
typedef xml::Parser DesignObject
enum DesignPlane
typedef cvec3 ElectricField
enum ElectronEnergyOrientation
enum ElementType
typedef Variant< EnergyDistributionDataBase, EnergyDistributionDataBase::HardEdge, EnergyDistributionDataBase::SoftEdge, SeparateEnergies, EnergyDistributionDataBase::EnergyDistributionList > EnergyDistributionDataVariant
enum EnergyDistributionType
typedef std::variant< DatFile, HardEdge, SoftEdge, SeparateEnergies > EnergyDistributionVariant
enum EnergySpreadUnit
enum uint32_t EventType
enum std::underlying_type_t< EventType > EventTypeMask
enum FigureRotation
enum GratingMount
typedef cvec2 LocalElectricField
typedef std::unordered_map< std::string, std::shared_ptr< DesignMap > > Map
enum Material
typedef std::optional< alpaka::Buf< Acc, T, alpaka::DimInt< 1 >, int32_t > > OptBuf
typedef std::optional< CollisionPoint > OptCollisionPoint
typedef std::optional< CollisionWithElement > OptCollisionWithElement
enum ParaboloidType
enum RZPType
typedef uint64_t RandCounter
Internal type for the random counter-based RNG.
enum Sequential
enum SigmaType
enum SourceDist
enum SourcePulseType
enum SpreadType
typedef glm::dvec4 Stokes
typedef Variant< detail::SurfaceTypes, detail::SurfaceTypes::Plane, detail::SurfaceTypes::Quadric, detail::SurfaceTypes::Toroid, detail::SurfaceTypes::Cubic > Surface
enum SurfaceCoatingType
enum ToroidType
enum ValueType
typedef glm::tmat3x3< complex::Complex > cmat3
typedef glm::tvec2< complex::Complex > cvec2
typedef glm::tvec3< complex::Complex > cvec3

Public Attributes

Type Name
RAYX_X_MACRO_RAY_ATTR enum RAYX_API All = (1 &lt;&lt; RayAttrMaskCount) - 1
bool RAYX_API BENCH_FLAG
const std::map< BehaviourType, std::string > BehaviourTypeToString = /* multi line expression */
const std::map< CentralBeamstop, std::string > CentralBeamstopToString = /* multi line expression */
const std::map< CurvatureType, std::string > CurvatureTypeToString = /* multi line expression */
const std::map< CutoutType, std::string > CutoutTypeToString = /* multi line expression */
int DEFAULT_BATCH_SIZE = 100000
RAYX_X_MACRO_RAY_ATTR enum RAYX_API Direction = DirectionX \| DirectionY \| DirectionZ
RAYX_X_MACRO_RAY_ATTR enum RAYX_API DirectionX = 1 &lt;&lt; 5
RAYX_X_MACRO_RAY_ATTR enum RAYX_API DirectionY = 1 &lt;&lt; 6
RAYX_X_MACRO_RAY_ATTR enum RAYX_API DirectionZ = 1 &lt;&lt; 7
double ELECTRIC_PERMITIVITY_MULTIPLIES_SPEED_OF_LIGHT = 2.6544187279929558624e-3
electric permitivity multiplied by speed of light
double ELECTRIC_PERMITTIVITY = 8.8541878128e-12
\(\epsilon_0\) [As/Vm]. vacuum electric permittivity.
double ELECTRON_MASS = 9.1093837015e-31
m_e [kg]. electron mass.
double ELECTRON_RADIUS = 2.8179403205e-6
double ELECTRON_VOLT = 1.602176634e-19
eV_J ElectronVolt to Joule.
double ELEMENTARY_CHARGE = 1.602176634e-19
e_0 [As]. elementary charge.
RAYX_X_MACRO_RAY_ATTR enum RAYX_API ElectricFieldX = 1 &lt;&lt; 8
RAYX_X_MACRO_RAY_ATTR enum RAYX_API ElectricFieldY = 1 &lt;&lt; 9
RAYX_X_MACRO_RAY_ATTR enum RAYX_API ElectricFieldZ = 1 &lt;&lt; 10
const std::map< ElectronEnergyOrientation, std::string > ElectronEnergyOrientationToString = /* multi line expression */
const std::map< ElementType, std::string > ElementTypeToString = /* multi line expression */
RAYX_X_MACRO_RAY_ATTR enum RAYX_API Energy = 1 &lt;&lt; 12
const std::map< EnergyDistributionType, std::string > EnergyDistributionTypeToString = /* multi line expression */
const std::map< EnergySpreadUnit, std::string > EnergySpreadUnitToString = {{EnergySpreadUnit::EU\_PERCENT, "Percent"}, {EnergySpreadUnit::EU\_eV, "eV"}}
RAYX_X_MACRO_RAY_ATTR enum RAYX_API EventType = 1 &lt;&lt; 16
const std::map< EventType, std::string > EventTypeToString = /* multi line expression */
double FACTOR_ELECTRON_ENERGY_SC = 1957
RAY-UI shortcut for getFactorElectronEnergy.
double FACTOR_SCHWINGER_RAY = 1.2556937e15
\(G\) [?]. RAY's factor appearing in Schwinger equation context
double FINE_STRUCTURE_CONSTANT = 7.2973525693e-3
const uint32_t FIXED_SEED = 42
const std::map< FigureRotation, std::string > FigureRotationToString = /* multi line expression */
const std::map< GratingMount, std::string > GratingMountToString = {{GratingMount::Deviation, "Deviation"}, {GratingMount::Incidence, "Incidence"}}
double INV_NM_TO_EVOLT = 1239.841984332002622
inverse nanometer-electron volt relationship / reziprocal factor
int IT_ASTIGMATIC2ASTIGMATIC = 12
int IT_POINT2HORIZONTAL_DIVERGENT_LINE = 5
int IT_POINT2HORIZONTAL_LINE = 4
int IT_POINT2POINT = 0
const std::map< Material, std::string > MaterialToString = /* multi line expression */
RAYX_X_MACRO_RAY_ATTR enum RAYX_API None = 0
RAYX_X_MACRO_RAY_ATTR enum RAYX_API ObjectId = 1 &lt;&lt; 14
RAYX_X_MACRO_RAY_ATTR enum RAYX_API OpticalPathLength = 1 &lt;&lt; 11
RAYX_X_MACRO_RAY_ATTR enum RAYX_API Order = 1 &lt;&lt; 13
double PI = 3.14159265358979323846264338327950
double PLANCK = 6.62607015e-34
double PLANCK_BAR = PLANCK / (2 \* PI)
\(\hbar\) [Js]. Planck's bar constant.
const std::map< ParaboloidType, std::string > ParaboloidTypeToString = /* multi line expression */
RAYX_X_MACRO_RAY_ATTR enum RAYX_API PathEventId = 1 &lt;&lt; 1
RAYX_X_MACRO_RAY_ATTR enum RAYX_API Position = PositionX \| PositionY \| PositionZ
RAYX_X_MACRO_RAY_ATTR enum RAYX_API PositionX = 1 &lt;&lt; 2
RAYX_X_MACRO_RAY_ATTR enum RAYX_API PositionY = 1 &lt;&lt; 3
RAYX_X_MACRO_RAY_ATTR enum RAYX_API PositionZ = 1 &lt;&lt; 4
const std::map< RZPType, std::string > RZPTypeToString = {{RZPType::Elliptical, "Elliptical"}, {RZPType::Meriodional, "Meriodional"}}
RAYX_X_MACRO_RAY_ATTR enum RAYX_API RayAttrMask
Mask to specify ray attributes. Each attribute is represented as a bit flag, allowing for efficient combination and checking of multiple attributes. It is used to represent the various attributes that can be recorded for rays during ray tracing.
RAYX_X_MACRO_RAY_ATTR enum RAYX_API RayAttrMaskCount = 18
double SPEED_OF_LIGHT = 299792458
c_0 [m/s]. speed of light in vacuum.
const std::map< SigmaType, std::string > SigmaTypeToString = {{SigmaType::ST\_STANDARD, "Standard"}, {SigmaType::ST\_ACCURATE, "Accurate"}}
const std::map< SourceDist, std::string > SourceDistToString = /* multi line expression */
RAYX_X_MACRO_RAY_ATTR enum RAYX_API SourceId = 1 &lt;&lt; 15
const std::map< SpreadType, std::string > SpreadTypeToString = /* multi line expression */
const std::map< std::string, BehaviourType > StringToBehaviourType = /* multi line expression */
const std::map< std::string, CentralBeamstop > StringToCentralBeamstop = /* multi line expression */
const std::map< std::string, CurvatureType > StringToCurvatureType = /* multi line expression */
const std::map< std::string, CutoutType > StringToCutoutType = /* multi line expression */
const std::map< std::string, ElectronEnergyOrientation > StringToElectronEnergyOrientation = /* multi line expression */
const std::map< std::string, ElementType > StringToElementType = /* multi line expression */
const std::map< std::string, EnergyDistributionType > StringToEnergyDistributionType = /* multi line expression */
const std::map< std::string, EnergySpreadUnit > StringToEnergySpreadUnit = {{"Percent", EnergySpreadUnit::EU\_PERCENT}, {"eV", EnergySpreadUnit::EU\_eV}}
const std::map< std::string, EventType > StringToEventType = /* multi line expression */
const std::map< std::string, FigureRotation > StringToFigureRotation = /* multi line expression */
const std::map< std::string, GratingMount > StringToGratingMount = {{"Deviation", GratingMount::Deviation}, {"Incidence", GratingMount::Incidence}}
const std::map< std::string, Material > StringToMaterial = /* multi line expression */
const std::map< std::string, ParaboloidType > StringToParaboloidType = /* multi line expression */
const std::map< std::string, RZPType > StringToRZPType = {{"Elliptical", RZPType::Elliptical}, {"Meriodional", RZPType::Meriodional}}
const std::map< std::string, SigmaType > StringToSigmaType = {{"Standard", SigmaType::ST\_STANDARD}, {"Accurate", SigmaType::ST\_ACCURATE}}
const std::map< std::string, SourceDist > StringToSourceDist = /* multi line expression */
const std::map< std::string, SpreadType > StringToSpreadType = /* multi line expression */
void RAYX_API(* error_fn

Public Functions

Type Name
RAYX_FN_ACC void RAYX_API RZPLineDensity (const glm::dvec3 &__restrict position, const glm::dvec3 &__restrict normal, const Behaviour::RZP &__restrict b, double &__restrict DX, double &__restrict DZ)
RAYX_FN_ACC ElectricField advanceElectricField (const ElectricField field, double waveLength, const double opticalPathLength)
void allocBuf (Queue q, std::optional< Buf > & buf, const int size)
void allocRaysBuf (Queue q, const RayAttrMask attrMask, RaysBuf< Acc > & raysBuf, const int size)
RAYX_FN_ACC double angleBetweenUnitVectors (glm::dvec3 a, glm::dvec3 b)
calculates the angle in rad, between two unit vectors
RAYX_API void appendH5 (const std::filesystem::path & filepath, const Rays & rays, const RayAttrMask attr=RayAttrMask::All)
RAYX_FN_ACC glm::dvec3 applySlopeError (glm::dvec3 normal, SlopeError error, int O_type, Rand &__restrict rand)
RAYX_FN_ACC void RAYX_API assertCutoutSubset (Cutout c1, Cutout c2)
RAYX_FN_ACC void behave (detail::Ray &__restrict ray, const CollisionPoint &__restrict col, const OpticalElement &__restrict element, const int *__restrict materialIndices, const double *__restrict materialTable)
RAYX_FN_ACC void behaveCrystal (detail::Ray &__restrict ray, const Behaviour::Crystal &__restrict crystal, const CollisionPoint &__restrict col)
RAYX_FN_ACC void behaveFoil (detail::Ray &__restrict ray, const Behaviour::Foil &__restrict foil, const CollisionPoint &__restrict col, int material, const int *__restrict materialIndices, const double *__restrict materialTable)
RAYX_FN_ACC void behaveGrating (detail::Ray &__restrict ray, const Behaviour::Grating &__restrict grating, const CollisionPoint &__restrict col)
RAYX_FN_ACC void behaveImagePlane (detail::Ray &__restrict ray)
RAYX_FN_ACC void behaveMirror (detail::Ray &__restrict ray, const CollisionPoint &__restrict col, const Coating &__restrict coating, int material, const int *__restrict materialIndices, const double *__restrict materialTable)
RAYX_FN_ACC void behaveRZP (detail::Ray &__restrict ray, const Behaviour::RZP &__restrict rzp, const CollisionPoint &__restrict col)
RAYX_FN_ACC void behaveSlit (detail::Ray &__restrict ray, const Behaviour::Slit &__restrict slit)
RAYX_FN_ACC double RAYX_API bessel1 (double v)
RAYX_FN_ACC void bessel_diff (double radius, double wl, double & dphi, double & dpsi, Rand & rand)
RAYX_FN_ACC complex::Complex calcBrewstersAngle (const complex::Complex iorI, const complex::Complex iorT)
RAYX_FN_ACC complex::Complex calcCriticalAngle (const complex::Complex iorI, const complex::Complex iorT)
RAYX_API RAYX_FN_ACC PsiAndStokes calcDipoleFold (double psi, double photonEnergy, double sigpsi, double electronEnergy, double criticalEnergy, ElectronEnergyOrientation electronEnergyOrientation, Rand &__restrict rand)
RAYX_API double calcGamma (double electronEnergy)
RAYX_FN_ACC cmat3 calcJonesMatrix (const ComplexFresnelCoeffs amplitude)
RAYX_API double calcMaxFlux (double photonEnergy, double energySpread, double criticalEnergy, double gamma)
RAYX_API double calcMaxIntensity (double photonEnergy, double verDivergence, double electronEnergy, double criticalEnergy, ElectronEnergyOrientation electronEnergyOrientation, Rand &__restrict rand)
RAYX_FN_ACC cmat3 calcPolaririzationMatrix (const glm::dvec3 incidentVec, const glm::dvec3 reflectOrRefractVec, const glm::dvec3 normalVec, const ComplexFresnelCoeffs amplitude)
RAYX_FN_ACC cmat3 calcPolaririzationMatrixFoil (const glm::dvec3 incidentVec, const glm::dvec3 normalVec, const ComplexFresnelCoeffs amplitude)
RAYX_FN_ACC ComplexFresnelCoeffs calcReflectAmplitude (const complex::Complex incidentAngle, const complex::Complex refractAngle, const complex::Complex iorI, const complex::Complex iorT)
RAYX_FN_ACC FresnelCoeffs calcReflectIntensity (const ComplexFresnelCoeffs reflectAmplitude)
RAYX_FN_ACC cmat3 calcReflectPolarizationMatrixAtNormalIncidence (const ComplexFresnelCoeffs amplitude)
RAYX_FN_ACC ComplexFresnelCoeffs calcRefractAmplitude (const complex::Complex incidentAngle, const complex::Complex refractAngle, const complex::Complex iorI, const complex::Complex iorT)
RAYX_FN_ACC complex::Complex calcRefractAngle (const complex::Complex incidentAngle, const complex::Complex iorI, const complex::Complex iorT)
RAYX_FN_ACC FresnelCoeffs calcRefractIntensity (const ComplexFresnelCoeffs refract_amplitude, const complex::Complex incidentAngle, const complex::Complex refractAngle, const complex::Complex iorI, const complex::Complex iorT)
RAYX_API glm::dmat4 calcTransformationMatrices (glm::dvec4 position, glm::dmat4 orientation, bool calcInMatrix, DesignPlane plane)
RAYX_API double calcVerDivergence (double energy, double sigv, double electronEnergy, double criticalEnergy)
std::filesystem::path RAYX_API canonicalizeRepositoryPath (const std::filesystem::path & relPath)
std::filesystem::path RAYX_API canonicalizeUserPath (const std::filesystem::path & relPath)
int ceilIntDivision (const int dividend, const int divisor)
RAYX_FN_ACC complex::Complex computeEta (double theta, double bragg, double asymmetry, double structureFactorReFH, double structureFactorImFH, double structureFactorReFHC, double structureFactorImFHC, double structureFactorReF0, double structureFactorImF0, double polFactor, double gamma)
Computes the normalized angular deviation parameter η (Eta) for dynamical X-ray diffraction.
RAYX_FN_ACC ComplexFresnelCoeffs computeMultilayerReflectance (const complex::Complex incidentAngle, const double wavelength, int numLayers, const double *__restrict thicknesses, const complex::Complex *__restrict iors)
RAYX_FN_ACC complex::Complex computeR (complex::Complex eta, double structureFactorReFH, double structureFactorImFH, double structureFactorReFHC, double structureFactorImFHC)
Computes the reflection coefficient R based on eta This function is based on Equation (103) from Batterman & Cole (1964), p. 706,.
RAYX_FN_ACC ComplexFresnelCoeffs computeSingleCoatingReflectance (const complex::Complex incidentAngle, const double wavelength, const double thickness, const complex::Complex iorI, const complex::Complex iorC, const complex::Complex iorS)
RAYX_FN_ACC ComplexFresnelCoeffs computeTransmittance (double wavelength, complex::Complex theta0, const complex::Complex & indexVacuum, const complex::Complex & indexMaterial, double thickness)
Calculates the transmission through a single thin film layer using Fresnel equations.
RAYX_API RAYX_FN_ACC constexpr bool contains (const RayAttrMask haystack, const RayAttrMask needle)
Check if a RayAttrMask (haystack) contains another RayAttrMask (needle).
RAYX_API int countSetBits (const RayAttrMask mask)
Count the number of set bits (i.e., attributes) in a RayAttrMask.
RAYX_FN_ACC glm::dvec3 RAYX_API cubicDirection (const glm::dvec3 &__restrict rayDirection, double alph)
RAYX_FN_ACC glm::dvec3 RAYX_API cubicPosition (const glm::dvec3 &__restrict rayPosition, const double alpha)
RAYX_FN_ACC glm::dvec2 RAYX_API cutoutBoundingBox (Cutout cutout)
void dbg (const std::string & filename, int line, std::string name, std::vector< double > v)
int defaultMaxEvents (const int numObjects)
RAYX_FN_ACC double degreeOfPolarization (const Stokes stokes)
RAYX_API RAYX_FN_ACC double dipoleBessel (double hnue, double zeta)
RAYX_FN_ACC void RAYX_API directionToSphericalCoords (glm::dvec3 direction, double & out_phi, double & out_psi)
RAYX_FN_ACC double RAYX_API dpow (double a, int b)
RAYX_FN_ACC ElectricField electricFieldToStokes (const ElectricField field, const glm::dvec3 forward, const glm::dvec3 up)
RAYX_FN_ACC ElectricField electricFieldToStokes (const ElectricField field, const glm::dmat3 rotation)
RAYX_FN_ACC ElectricField electricFieldToStokesWithBaseConvention (const ElectricField field, const glm::dvec3 forward)
RAYX_FN_ACC double RAYX_API energyToWaveLength (double x)
RAYX_FN_ACC constexpr EventTypeMask eventTypeToMask (const EventType eventType)
RAYX_API RAYX_FN_ACC constexpr RayAttrMask exclude (const RayAttrMask haystack, const RayAttrMask needle)
void execWithValidWorkDiv (DevAcc devAcc, Queue q, const int numElements, BlockSizeConstraint::Variant blockSizeConstraint, const Kernel & kernel, Args &&... args)
RAYX_FN_ACC double RAYX_API fact (int n)
RAYX_FN_ACC OptCollisionPoint findCollisionInElementCoords (const glm::dvec3 &__restrict rayPosition, const glm::dvec3 &__restrict rayDirection, const OpticalElement &__restrict element, Rand &__restrict rand)
RAYX_FN_ACC OptCollisionPoint RAYX_API findCollisionInElementCoordsWithoutSlopeError (const glm::dvec3 &__restrict rayPosition, const glm::dvec3 &__restrict rayDirection, const Surface &__restrict surface, const Cutout &__restrict cutout, bool isTriangul)
RAYX_FN_ACC OptCollisionWithElement findCollisionWithElements (glm::dvec3 rayPosition, glm::dvec3 rayDirection, const OpticalElement *__restrict elements, const ObjectTransform * __restrict, const int numSources, const int numElements, Rand &__restrict rand)
void RAYX_API fixSeed (uint32_t x)
std::vector< double > formatAsVec (T)
std::vector< double > formatAsVec (int arg)
std::vector< double > formatAsVec (RandCounter arg)
std::vector< double > formatAsVec (EventType arg)
std::vector< double > formatAsVec (double arg)
std::vector< double > formatAsVec (complex::Complex arg)
std::vector< double > formatAsVec (const glm::mat< N, M, T > arg)
std::vector< double > formatAsVec (const glm::vec< N, T > arg)
std::vector< double > formatAsVec (const std::array< T, N > arg)
std::vector< double > formatAsVec (const std::vector< T > arg)
std::vector< double > formatAsVec (const Rays & rays)
std::vector< double > formatAsVec< double > (const std::vector< double > arg)
RAYX_FN_ACC RotationBase forwardVectorToBaseConvention (const glm::dvec3 forward)
RAYX_FN_ACC void fraun_diff (double dim, double wl, double & dAngle, Rand & rand)
RAYX_FN_ACC double getAsymmetryFactor (double braggAngle, double alpha)
Computes the asymmetry factor b from the Bragg angle and surface tilt angle.
RAYX_FN_ACC glm::dvec2 RAYX_API getAtomicMassAndRho (int material)
auto getBlockSize ()
RAYX_FN_ACC double getBraggAngle (double energy, double dSpacing2)
Computes the bragg angle.
void getCone (xml::Parser parser, DesignElement * de)
void getCrystal (xml::Parser parser, DesignElement * de)
RAYX_FN_ACC OptCollisionPoint getCubicCollision (const glm::dvec3 &__restrict rayPosition, const glm::dvec3 &__restrict rayDirection, const Surface::Cubic &__restrict cu)
void getCylinder (xml::Parser parser, DesignElement * de)
bool RAYX_API getDebugVerbose ()
RAYX_FN_ACC double getDiffractionPrefactor (double wavelength, double unitCellVolume)
Computes the diffraction prefactor Γ used in dynamical X-ray diffraction theory. Defined in Batterman & Cole (1964), p. 685.
RAYX_API RAYX_FN_ACC double getDipoleInterpolation (double energy)
void getEllipsoid (xml::Parser parser, DesignElement * de)
void getExpertsCubic (xml::Parser parser, DesignElement * de)
void getExpertsOptics (xml::Parser parser, DesignElement * de)
void getFoil (xml::Parser parser, DesignElement * de)
void getGrating (xml::Parser parser, DesignElement * de)
void getImageplane (xml::Parser parser, DesignElement * de)
RAYX_FN_ACC NffEntry RAYX_API getNffEntry (int index, int material, const int * materialIndices, const double * materialTable)
RAYX_FN_ACC int RAYX_API getNffEntryCount (int material, const int * materialIndices)
RAYX_FN_ACC PalikEntry RAYX_API getPalikEntry (int index, int material, const int * materialIndices, const double * materialTable)
RAYX_FN_ACC int RAYX_API getPalikEntryCount (int material, const int * materialIndices)
void getParaboloid (xml::Parser parser, DesignElement * de)
void getPlaneGrating (xml::Parser parser, DesignElement * de)
void getPlaneMirror (xml::Parser parser, DesignElement * de)
RAYX_FN_ACC OptCollisionPoint getQuadricCollision (const glm::dvec3 &__restrict rayPosition, const glm::dvec3 &__restrict rayDirection, const Surface::Quadric &__restrict quadric)
void getRZP (xml::Parser parser, DesignElement * de)
RAYX_API std::vector< std::string > getRayAttrNames ()
Get a list of all possible ray attribute names.
RAYX_FN_ACC int getRecordIndex (const int gid, const int numRecorded, const int gridStride)
RAYX_FN_ACC complex::Complex RAYX_API getRefractiveIndex (double energy, int material, const int * materialIndices, const double * materialTable)
void getSlit (xml::Parser parser, DesignElement * de)
void getSphereGrating (xml::Parser parser, DesignElement * de)
void getSphereMirror (xml::Parser parser, DesignElement * de)
RAYX_API RAYX_FN_ACC glm::dvec4 getStokesSyn (double energy, double psi1, double psi2, double electronEnergy, double criticalEnergy, ElectronEnergyOrientation electronEnergyOrientation)
void getSurfaceCoating (xml::Parser parser, DesignElement * de)
RAYX_FN_ACC double getTheta (const glm::dvec3 &__restrict rayDirection, const glm::dvec3 &__restrict normal, double offsetAngle)
RAYX_FN_ACC OptCollisionPoint getToroidCollision (const glm::dvec3 &__restrict rayPosition, const glm::dvec3 &__restrict rayDirection, const Surface::Toroid &__restrict toroid, bool isTriangul)
void getToroidMirror (xml::Parser parser, DesignElement * de)
void getToroidalGrating (xml::Parser parser, DesignElement * de)
auto getWorkDivForAcc (alpaka::Idx< Acc > numElements)
RAYX_API double get_factorCriticalEnergy ()
RAYX_API double get_factorElectronEnergy ()
RAYX_API double get_factorOmega ()
RAYX_FN_ACC LocalElectricField globalToLocalElectricField (const ElectricField field, const glm::dvec3 forward, const glm::dvec3 up)
RAYX_FN_ACC LocalElectricField globalToLocalElectricField (const ElectricField field, const glm::dmat3 rotation)
RAYX_FN_ACC LocalElectricField globalToLocalElectricFieldWithBaseConvention (const ElectricField field, const glm::dvec3 forward)
RAYX_API Beamline importBeamline (const std::filesystem::path &)
RAYX_FN_ACC bool RAYX_API inCutout (Cutout cutout, double x, double z)
RAYX_FN_ACC double intensity (const LocalElectricField field)
RAYX_FN_ACC double intensity (const ElectricField field)
RAYX_FN_ACC double intensity (const Stokes stokes)
RAYX_FN_ACC ElectricField interceptFoil (const ElectricField incidentElectricField, const glm::dvec3 incidentVec, const glm::dvec3 normalVec, ComplexFresnelCoeffs transCoeffs)
RAYX_FN_ACC ElectricField interceptReflect (const ElectricField incidentElectricField, const glm::dvec3 incidentVec, const glm::dvec3 reflectVec, const glm::dvec3 normalVec, const complex::Complex iorI, const complex::Complex iorT)
RAYX_FN_ACC ElectricField interceptReflectCrystal (const ElectricField incidentElectricField, const glm::dvec3 incidentVec, const glm::dvec3 reflectVec, const glm::dvec3 normalVec, ComplexFresnelCoeffs reflectAmplitude)
RAYX_API bool isFlag (const RayAttrMask attr)
Check if a RayAttrMask represents a single attribute (i.e., is a flag).
RAYX_FN_ACC bool isRayTerminated (const EventType eventType)
RAYX_FN_ACC glm::dmat4 RAYX_API keyCutoutPoints (Cutout cutout)
MaterialTables RAYX_API loadMaterialTables (std::array< bool, 92 > relevantMaterials)
RAYX_FN_ACC detail::Ray loadRay (const int i, const RaysPtr &__restrict rays)
RAYX_FN_ACC Stokes localElectricFieldToStokes (const LocalElectricField field)
RAYX_FN_ACC ElectricField localToGlobalElectricField (const LocalElectricField localField, const glm::dvec3 forward, const glm::dvec3 up)
RAYX_FN_ACC ElectricField localToGlobalElectricField (const LocalElectricField localField, const glm::dmat3 rotation)
RAYX_FN_ACC ElectricField localToGlobalElectricFieldWithBaseConvention (const LocalElectricField localField, const glm::dvec3 forward)
Behaviour makeBehaviour (const DesignElement & dele)
Surface makeCone (const DesignElement & dele)
Behaviour makeCrystal (const DesignElement & dele)
Surface makeCubic (const DesignElement & dele)
Surface makeCylinder (const DesignElement & dele)
OpticalElementAndTransform makeElement (const DesignElement & dele, Behaviour behaviour, Surface surface, DesignPlane plane=DesignPlane::XZ, std::optional< Cutout > cutout={})
Surface makeEllipsoid (const DesignElement & dele)
Behaviour makeFoil (const DesignElement & dele)
Behaviour makeGrating (const DesignElement & dele)
Surface makeParaboloid (const DesignElement & dele)
Surface makePlane ()
Surface makeQuadric (const DesignElement & dele)
Behaviour makeRZPBehaviour (const DesignElement & dele)
Behaviour makeSlit (const DesignElement & dele)
Surface makeSphere (double radius)
Surface makeSurface (const DesignElement & dele)
Surface makeToroid (const DesignElement & dele)
bool materialFromString (const char * matname, Material * out)
int nextMultiple (const int value, const int divisor)
int nextPowerOfTwo (const int value)
RAYX_FN_ACC glm::dvec3 RAYX_API normalCartesian (glm::dvec3 normal, double x_rad, double z_rad)
RAYX_FN_ACC glm::dvec3 RAYX_API normalCylindrical (glm::dvec3 normal, double x_rad, double z_rad)
RAYX_API RAYX_FN_ACC constexpr bool operator! (const RayAttrMask lhs)
RAYX_FN_ACC constexpr bool operator! (const EventTypeMask lhs)
bool RAYX_API operator!= (const Rays & lhs, const Rays & rhs)
RAYX_API RAYX_FN_ACC constexpr RayAttrMask operator& (const RayAttrMask lhs, const RayAttrMask rhs)
RAYX_FN_ACC constexpr EventTypeMask operator& (const EventTypeMask lhs, const EventTypeMask rhs)
RAYX_API RAYX_FN_ACC constexpr RayAttrMask & operator&= (RayAttrMask & lhs, const RayAttrMask rhs)
RAYX_FN_ACC constexpr EventTypeMask operator&= (EventTypeMask & lhs, const EventTypeMask rhs)
std::ostream & operator<< (std::ostream & os, const SpreadType v)
std::ostream & operator<< (std::ostream & os, const EnergyDistributionType v)
std::ostream & operator<< (std::ostream & os, const SourceDist v)
std::ostream & operator<< (std::ostream & os, const ElectronEnergyOrientation v)
std::ostream & operator<< (std::ostream & os, const EnergySpreadUnit v)
std::ostream & operator<< (std::ostream & os, const RZPType v)
std::ostream & operator<< (std::ostream & os, const CentralBeamstop v)
std::ostream & operator<< (std::ostream & os, const GratingMount v)
std::ostream & operator<< (std::ostream & os, const ParaboloidType v)
std::ostream & operator<< (std::ostream & os, const CurvatureType v)
std::ostream & operator<< (std::ostream & os, const BehaviourType v)
std::ostream & operator<< (std::ostream & os, const FigureRotation v)
std::ostream & operator<< (std::ostream & os, const SigmaType v)
std::ostream & operator<< (std::ostream & os, const Material v)
std::ostream & operator<< (std::ostream & os, const ElementType v)
std::ostream & operator<< (std::ostream & os, const EventType v)
std::ostream & operator<< (std::ostream & os, const CutoutType v)
std::ostream & operator<< (std::ostream & os, const complex::Complex & c)
std::ostream & operator<< (std::ostream & os, const glm::tvec2< T > & v)
std::ostream & operator<< (std::ostream & os, const glm::tvec3< T > & v)
std::ostream & operator<< (std::ostream & os, const glm::tvec4< T > & v)
bool RAYX_API operator== (const Rays & lhs, const Rays & rhs)
RAYX_API RAYX_FN_ACC constexpr RayAttrMask operator^ (const RayAttrMask lhs, const RayAttrMask rhs)
RAYX_FN_ACC constexpr EventTypeMask operator^ (const EventTypeMask lhs, const EventTypeMask rhs)
RAYX_API RAYX_FN_ACC constexpr RayAttrMask & operator^= (RayAttrMask & lhs, const RayAttrMask rhs)
RAYX_FN_ACC constexpr EventTypeMask operator^= (EventTypeMask & lhs, const EventTypeMask rhs)
RAYX_X_MACRO_RAY_ATTR enum RAYX_API RAYX_API RAYX_FN_ACC constexpr RayAttrMask operator| (const RayAttrMask lhs, const RayAttrMask rhs)
RAYX_FN_ACC constexpr EventTypeMask operator| (const EventTypeMask lhs, const EventTypeMask rhs)
RAYX_API RAYX_FN_ACC constexpr RayAttrMask & operator|= (RayAttrMask & lhs, const RayAttrMask rhs)
RAYX_FN_ACC constexpr EventTypeMask operator|= (EventTypeMask & lhs, const EventTypeMask rhs)
RAYX_API RAYX_FN_ACC constexpr RayAttrMask operator~ (const RayAttrMask lhs)
RAYX_FN_ACC constexpr EventTypeMask operator~ (const EventTypeMask lhs)
double RAYX_API randomDouble ()
double RAYX_API randomDoubleInRange (double a, double b)
int randomIntInRange (int a, int b)
double RAYX_API randomNormal (double mean, double stddev)
void RAYX_API randomSeed ()
uint32_t randomUint ()
RAYX_API RayAttrMask rayAttrStringsToRayAttrMask (const std::vector< std::string > & strings)
Convert a list of ray attribute names to a RayAttrMask.
RAYX_FN_ACC void RAYX_API rayMatrixMult (const glm::dmat4 &__restrict m, glm::dvec3 &__restrict rayPosition, glm::dvec3 &__restrict rayDirection)
RAYX_FN_ACC void RAYX_API rayMatrixMult (const glm::dmat4 &__restrict m, glm::dvec3 &__restrict rayPosition, glm::dvec3 &__restrict rayDirection, ElectricField &__restrict rayElectricField)
RaysPtr raysBufToRaysPtr (RaysBuf< Acc > & buf)
Rays RAYX_API readCsv (const std::filesystem::path & filepath)
std::optional< std::vector< uint8_t > > RAYX_API readFile (const std::string & filename, const uint32_t count=0)
std::optional< std::vector< uint32_t > > readFileAlign32 (const std::string & filename, const uint32_t count=0)
RAYX_API std::vector< std::string > readH5ObjectNames (const std::filesystem::path & filepath)
RAYX_API Rays readH5Rays (const std::filesystem::path & filepath, const RayAttrMask attr=RayAttrMask::All)
RAYX_FN_ACC void refrac2D (detail::Ray &__restrict ray, glm::dvec3 normal, double az, double ax)
RAYX_FN_ACC glm::dvec3 refract_dvec3 (glm::dvec3 I, glm::dvec3 N, double eta)
RAYX_FN_ACC glm::dmat3 rotationMatrix (const glm::dvec3 forward, const glm::dvec3 up)
RAYX_FN_ACC glm::dmat3 rotationMatrixWithBaseConvention (const glm::dvec3 forward)
RAYX_API RAYX_FN_ACC double schwinger (double energy, double gamma, double criticalEnergy)
calculate probability for chosen energy with edge-cases according to H.Wiedemann Synchrotron Radiation P. 259 (D.21)
RAYX_FN_ACC double selectEnergy (const HardEdge &__restrict hardEdge, Rand &__restrict rand)
RAYX_FN_ACC double selectEnergy (const SoftEdge &__restrict softEdge, Rand &__restrict rand)
RAYX_FN_ACC double selectEnergy (const SeparateEnergies &__restrict separateEnergies, Rand &__restrict rand)
RAYX_FN_ACC double selectEnergy (const EnergyDistributionList &__restrict energyDistributionList, Rand &__restrict rand)
RAYX_FN_ACC double selectEnergy (const EnergyDistributionDataVariant &__restrict energyDistribution, Rand &__restrict rand)
void setAllMandatory (xml::Parser parser, DesignElement * de, DesignPlane dp)
void setAllMandatory (xml::Parser parser, DesignSource * ds)
void setCircleSource (xml::Parser parser, DesignSource * ds)
void RAYX_API setDebugVerbose (bool)
void setDefaultEnergy (xml::Parser parser, DesignSource * ds)
void setDefaultOrientation (xml::Parser parser, DesignSource * ds)
void setDefaultPosition (xml::Parser parser, DesignSource * ds)
void setDipoleSource (xml::Parser parser, DesignSource * ds)
void setMatrixSource (xml::Parser parser, DesignSource * ds)
void setPixelSource (xml::Parser parser, DesignSource * ds)
void setPointSource (xml::Parser parser, DesignSource * ds)
void setSimpleUndulatorSource (xml::Parser parser, DesignSource * ds)
void setStokes (xml::Parser parser, DesignSource * ds)
RAYX_FN_ACC void RAYX_API sphericalCoordsToDirection (double phi, double psi, glm::dvec3 & out_direction)
RAYX_FN_ACC RandCounter RAYX_API squares64 (RandCounter & ctr)
RAYX_FN_ACC double RAYX_API squaresDoubleRNG (RandCounter & ctr)
RAYX_FN_ACC double RAYX_API squaresNormalRNG (RandCounter & ctr, double mu, double sigma)
RAYX_FN_ACC ElectricField stokesToElectricField (const Stokes stokes, const glm::dvec3 forward, const glm::dvec3 up)
RAYX_FN_ACC ElectricField stokesToElectricField (const Stokes stokes, const glm::dmat3 rotation)
RAYX_FN_ACC ElectricField stokesToElectricFieldWithBaseConvention (const Stokes stokes, const glm::dvec3 forward)
RAYX_FN_ACC LocalElectricField stokesToLocalElectricField (const Stokes stokes)
RAYX_FN_ACC void storeRay (const int i, RaysPtr &__restrict rays, const detail::Ray &__restrict ray)
RAYX_FN_ACC bool storeRay (const int i, bool *__restrict storedFlags, RaysPtr &__restrict rays, detail::Ray &__restrict ray, const bool *__restrict objectRecordMask, const int objectIndex, const RayAttrMask attrRecordMask)
std::ostream & streamEnum (std::ostream & os, const Enum value, const std::map< Enum, std::string > & toStringMap)
RAYX_FN_ACC void terminateRay (EventType &__restrict dstEventType, const EventType srcEventType)
RAYX_API std::string to_string (const RayAttrMask attr)
RAYX_FN_ACC void traceNonSequential (const int gid, const ConstState &__restrict constState, MutableState &__restrict mutableState)
RAYX_FN_ACC void traceSequential (const int gid, const ConstState &__restrict constState, MutableState &__restrict mutableState)
RAYX_FN_ACC double RAYX_API vlsGrating (double lineDensity, glm::dvec3 normal, double z, const double vls)
RAYX_FN_ACC double waveLengthToEnergy (const double waveLength)
void RAYX_API writeCsv (const std::filesystem::path & filepath, const Rays & rays)
void RAYX_API writeFile (const std::vector< uint8_t > & data, const std::string & filename, const uint32_t count=0)
RAYX_API void writeH5 (const std::filesystem::path & filepath, const std::vector< std::string > & object_names, const Rays & rays, const RayAttrMask attr=RayAttrMask::All, const bool overwrite=true)

Public Types Documentation

typedef Beamline

using rayx::Beamline =  Group;

enum BehaveType

enum rayx::BehaveType {
    Mirror,
    Grating,
    Slit,
    RZP,
    ImagePlane,
    Crystal,
    Foil
};

typedef Behaviour

using rayx::Behaviour = 
    Variant<detail::BehaviourTypes, detail::BehaviourTypes::Mirror, detail::BehaviourTypes::Grating, detail::BehaviourTypes::Slit,
            detail::BehaviourTypes::RZP, detail::BehaviourTypes::ImagePlane, detail::BehaviourTypes::Crystal, detail::BehaviourTypes::Foil>;

enum BehaviourType

enum rayx::BehaviourType {
    Mirror,
    Grating,
    Slit,
    Rzp,
    ImagePlane,
    Crystal,
    Foil
};

enum CentralBeamstop

enum rayx::CentralBeamstop {
    None,
    Rectangle,
    Elliptical
};

typedef Coating

using rayx::Coating = 
    Variant<detail::CoatingTypes, detail::CoatingTypes::SubstrateOnly, detail::CoatingTypes::OneCoating, detail::CoatingTypes::MultilayerCoating>;

enum CurvatureType

enum rayx::CurvatureType {
    Plane,
    Toroidal,
    Spherical,
    Cubic,
    Cone,
    Cylinder,
    Ellipsoid,
    Paraboloid,
    Quadric,
    RzpSphere
};

typedef Cutout

using rayx::Cutout =  Variant<detail::CutoutTypes, detail::CutoutTypes::Rect, detail::CutoutTypes::Elliptical, detail::CutoutTypes::Trapezoid,
                       detail::CutoutTypes::Unlimited>;

enum CutoutType

enum rayx::CutoutType {
    Rect,
    Elliptical,
    Trapezoid,
    Unlimited
};

enum CylinderDirection

enum rayx::CylinderDirection {
    LongRadiusR,
    ShortRadiusRho
};

typedef DesignObject

using rayx::DesignObject =  xml::Parser;

The DesignObject contains the design parameters. But the actual OpticalElements does not contain them. The DesignObject is utilized to construct OpticalElements from it's parameters.

For now objects can only be created from XML, but later on - when the GUI is around, we might want to add an abstract superclass DesignObject. DesignObject would have child classes xml::Parser and gui::ObjectBuilder or something. This superclass DesignObject could mostly keep the API of the xml::Parser, to make the transition trivial.


enum DesignPlane

enum rayx::DesignPlane {
    XY,
    XZ
};

typedef ElectricField

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::ElectricField =  cvec3;

enum ElectronEnergyOrientation

enum rayx::ElectronEnergyOrientation {
    Clockwise,
    Counterclockwise
};

enum ElementType

enum rayx::ElementType {
    Undefined,
    ImagePlane,
    ConeMirror,
    Crystal,
    CylinderMirror,
    EllipsoidMirror,
    ExpertsMirror,
    Foil,
    ParaboloidMirror,
    PlaneGrating,
    PlaneMirror,
    ReflectionZoneplate,
    Slit,
    SphereGrating,
    Sphere,
    SphereMirror,
    ToroidMirror,
    ToroidGrating,
    PointSource,
    MatrixSource,
    DipoleSource,
    PixelSource,
    CircleSource,
    SimpleUndulatorSource,
    RayListSource
};

typedef EnergyDistributionDataVariant

using rayx::EnergyDistributionDataVariant =  Variant<EnergyDistributionDataBase, EnergyDistributionDataBase::HardEdge, EnergyDistributionDataBase::SoftEdge,
                                              SeparateEnergies, EnergyDistributionDataBase::EnergyDistributionList>;

enum EnergyDistributionType

enum rayx::EnergyDistributionType {
    File,
    Values,
    Total,
    Param
};

typedef EnergyDistributionVariant

using rayx::EnergyDistributionVariant =  std::variant<DatFile, HardEdge, SoftEdge, SeparateEnergies>;

enum EnergySpreadUnit

enum rayx::EnergySpreadUnit {
    EU_PERCENT,
    EU_eV
};

enum EventType

enum rayx::EventType {
    Uninitialized = 0,
    Emitted = 1,
    HitElement = 2,
    FatalError = 3,
    Absorbed = 4,
    BeyondHorizon = 5,
    TooManyEvents = 6
};

enum EventTypeMask

enum rayx::EventTypeMask {
    None = 0,
    Uninitialized = 1 << static_cast<int>(EventType::Uninitialized),
    Emitted = 1 << static_cast<int>(EventType::Emitted),
    HitElement = 1 << static_cast<int>(EventType::HitElement),
    FatalError = 1 << static_cast<int>(EventType::FatalError),
    Absorbed = 1 << static_cast<int>(EventType::Absorbed),
    BeyondHorizon = 1 << static_cast<int>(EventType::BeyondHorizon),
    TooManyEvents = 1 << static_cast<int>(EventType::TooManyEvents)
};

enum FigureRotation

enum rayx::FigureRotation {
    Yes,
    Plane,
    A11
};

enum GratingMount

enum rayx::GratingMount {
    Deviation,
    Incidence
};

typedef LocalElectricField

using rayx::LocalElectricField =  cvec2;

typedef Map

using rayx::Map =  std::unordered_map<std::string, std::shared_ptr<DesignMap>>;

This Map is the foundation for the DesignELement ad DesignSource All Parameter are defined by a string set in DesignElement.cpp and a Value. The Value describes the possible Types. It is defined as a shared pointer because of the recursive call.


enum Material

enum rayx::Material {
    REFLECTIVE = -2,
    VACUUM = -1,
    X =(H, 1, 1.00794, 0.0708)
X(He, 2, 4.0026, 0.122)
X(Li, 3, 6.941, 0.533)
X(Be, 4, 9.01218, 1.845)
X(B, 5, 10.81, 2.34)
X(C, 6, 12.011, 2.26)

X(N, 7, 14.0067, 0.81)
X(O, 8, 15.9994, 1.14)
X(F, 9, 18.998403, 1.108)
X(Ne, 10, 20.179, 1.207)
X(Na, 11, 22.98977, 0.969)
X(Mg, 12, 24.305, 1.735)
X(Al, 13, 26.98154, 2.6941)
X(Si, 14, 28.0855, 2.32)
X(P, 15, 30.97376, 1.82)
X(S, 16, 32.06, 2.07)
X(Cl, 17, 35.453, 1.56)
X(Ar, 18, 39.948, 1.40)
X(K, 19, 39.0983, 0.860)
X(Ca, 20, 40.08, 1.55)
X(Sc, 21, 44.9559, 2.980)
X(Ti, 22, 47.88, 4.53)
X(V, 23, 50.9415, 6.10)
X(Cr, 24, 51.996, 7.18)
X(Mn, 25, 54.9380, 7.43)
X(Fe, 26, 55.847, 7.860)


X(Co, 27, 58.9332, 8.9)
X(Ni, 28, 58.69, 8.876)
X(Cu, 29, 63.546, 8.94)
X(Zn, 30, 65.38, 7.112)
X(Ga, 31, 69.72, 5.877)
X(Ge, 32, 72.59, 5.307)
X(As, 33, 74.9216, 5.72)
X(Se, 34, 78.96, 4.78)
X(Br, 35, 79.904, 3.11)
X(Kr, 36, 83.80, 2.6)
X(Rb, 37, 85.4678, 1.529)
X(Sr, 38, 87.62, 2.54)
X(Y, 39, 88.9059, 4.456)
X(Zr, 40, 91.22, 6.494)
X(Nb, 41, 92.9064, 8.55)
X(Mo, 42, 95.94, 10.20)
X(Tc, 43, 98.0, 11.48)
X(Ru, 44, 101.07, 12.39)
X(Rh, 45, 102.9055, 12.39)
X(Pd, 46, 106.42, 12.00)
X(Ag, 47, 107.8682, 10.48)
X(Cd, 48, 112.41, 8.63)
X(In, 49, 114.82, 7.30)
X(Sn, 50, 118.69, 7.30)
X(Sb, 51, 121.75, 6.679)
X(Te, 52, 127.60, 6.23)
X(I, 53, 126.9045, 4.92)
X(Xe, 54, 131.29, 3.52)
X(Cs, 55, 132.9054, 1.870)
X(Ba, 56, 137.33, 3.5)
X(La, 57, 138.9055, 6.127)
X(Ce, 58, 140.12, 6.637)
X(Pr, 59, 140.9077, 6.761)
X(Nd, 60, 144.24, 6.994)
X(Pm, 61, 145.0, 7.20)
X(Sm, 62, 150.36, 7.51)
X(Eu, 63, 151.96, 5.228)
X(Gd, 64, 157.25, 7.8772)
X(Tb, 65, 158.9254, 8.214)
X(Dy, 66, 162.50, 8.525)
X(Ho, 67, 164.9304, 8.769)
X(Er, 68, 167.26, 9.039)
X(Tm, 69, 168.9342, 9.294)
X(Yb, 70, 173.04, 6.953)
X(Lu, 71, 174.967, 9.811)
X(Hf, 72, 178.49, 13.29)
X(Ta, 73, 180.9479, 16.624)
X(W, 74, 183.85, 19.3)
X(Re, 75, 186.207, 20.98)
X(Os, 76, 190.2, 22.53)
X(Ir, 77, 192.22, 22.39)
X(Pt, 78, 195.08, 21.41)
X(Au, 79, 196.9665, 19.3)
X(Hg, 80, 200.59, 13.522)
X(Tl, 81, 204.383, 11.83)
X(Pb, 82, 207.2, 11.33)
X(Bi, 83, 208.9804, 9.730)
X(Po, 84, 209.0, 9.30)
X(At, 85, 210.0, 9999.)
X(Rn, 86, 222.0, 4.4)
X(Fr, 87, 223.0, 9999.)
X(Ra, 88, 226.0254, 5.0)
X(Ac, 89, 227.0278, 10.05)
X(Th, 90, 232.0381, 11.70)
X(Pa, 91, 231.0359, 15.34)
X(U, 92, 238.0289, 18.92)
# 24 "/home/jonas/Projects/hzb/rayx/Intern/rayx-core/src/Material/Material.h" 2
};

This enum class is the c++ perspective on the Materials stored in "materials.xmacro". Whenever you want to add a material, just add a line in materials.xmacro: everything else is done automagically. This makes heavy use of X Macros, see https://en.wikipedia.org/wiki/X_Macro


typedef OptBuf

using rayx::OptBuf =  std::optional<alpaka::Buf<Acc, T, alpaka::DimInt<1>, int32_t>>;

typedef OptCollisionPoint

using rayx::OptCollisionPoint =  std::optional<CollisionPoint>;

typedef OptCollisionWithElement

using rayx::OptCollisionWithElement =  std::optional<CollisionWithElement>;

enum ParaboloidType

enum rayx::ParaboloidType {
    Focussing,
    Collimate
};

enum RZPType

enum rayx::RZPType {
    Elliptical,
    Meriodional
};

typedef RandCounter

Internal type for the random counter-based RNG.

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::RandCounter =  uint64_t;


enum Sequential

enum rayx::Sequential {
    No,
    Yes
};

Expresses whether we force sequential tracing, or we use dynamic tracing. We prefer this over a boolean, as calling eg. the trace function with an argument of true has no obvious meaning. On the other hand calling it with Sequential::Yes makes the meaning more clear.


enum SigmaType

enum rayx::SigmaType {
    ST_STANDARD,
    ST_ACCURATE
};

enum SourceDist

enum rayx::SourceDist {
    Uniform,
    Gaussian,
    Thirds,
    Circle
};

enum SourcePulseType

enum rayx::SourcePulseType {
    None
};

enum SpreadType

enum rayx::SpreadType {
    HardEdge,
    SoftEdge,
    SeparateEnergies
};

typedef Stokes

using rayx::Stokes =  glm::dvec4;

typedef Surface

using rayx::Surface =  Variant<detail::SurfaceTypes, detail::SurfaceTypes::Plane, detail::SurfaceTypes::Quadric, detail::SurfaceTypes::Toroid,
                        detail::SurfaceTypes::Cubic>;

enum SurfaceCoatingType

enum rayx::SurfaceCoatingType {
    SubstrateOnly,
    OneCoating,
    MultipleCoatings
};

enum ToroidType

enum rayx::ToroidType {
    Convex,
    Concave
};

enum ValueType

enum rayx::ValueType {
    Undefined,
    Double,
    Int,
    String,
    Map,
    Dvec4,
    Dmat4x4,
    Bool,
    Rad,
    Material,
    CentralBeamstop,
    Cutout,
    CutoutType,
    EventType,
    CylinderDirection,
    FigureRotation,
    CurvatureType,
    Surface,
    SourceDist,
    SpreadType,
    EnergyDistributionType,
    EnergySpreadUnit,
    ElectronEnergyOrientation,
    SigmaType,
    BehaviourType,
    ElementType,
    GratingMount,
    CrystalType,
    DesignPlane,
    SurfaceCoatingType,
    RayList
};

typedef cmat3

using rayx::cmat3 =  glm::tmat3x3<complex::Complex>;

typedef cvec2

using rayx::cvec2 =  glm::tvec2<complex::Complex>;

typedef cvec3

using rayx::cvec3 =  glm::tvec3<complex::Complex>;

Public Attributes Documentation

variable All

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::All;

variable BENCH_FLAG

bool RAYX_API rayx::BENCH_FLAG;

variable BehaviourTypeToString

const std::map<BehaviourType, std::string> rayx::BehaviourTypeToString;

variable CentralBeamstopToString

const std::map<CentralBeamstop, std::string> rayx::CentralBeamstopToString;

variable CurvatureTypeToString

const std::map<CurvatureType, std::string> rayx::CurvatureTypeToString;

variable CutoutTypeToString

const std::map<CutoutType, std::string> rayx::CutoutTypeToString;

variable DEFAULT_BATCH_SIZE

int rayx::DEFAULT_BATCH_SIZE;

variable Direction

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::Direction;

variable DirectionX

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::DirectionX;

variable DirectionY

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::DirectionY;

variable DirectionZ

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::DirectionZ;

variable ELECTRIC_PERMITIVITY_MULTIPLIES_SPEED_OF_LIGHT

electric permitivity multiplied by speed of light

double rayx::ELECTRIC_PERMITIVITY_MULTIPLIES_SPEED_OF_LIGHT;


variable ELECTRIC_PERMITTIVITY

\(\epsilon_0\) [As/Vm]. vacuum electric permittivity.

double rayx::ELECTRIC_PERMITTIVITY;


variable ELECTRON_MASS

m_e [kg]. electron mass.

double rayx::ELECTRON_MASS;


variable ELECTRON_RADIUS

double rayx::ELECTRON_RADIUS;

variable ELECTRON_VOLT

eV_J ElectronVolt to Joule.

double rayx::ELECTRON_VOLT;


variable ELEMENTARY_CHARGE

e_0 [As]. elementary charge.

double rayx::ELEMENTARY_CHARGE;


variable ElectricFieldX

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::ElectricFieldX;

variable ElectricFieldY

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::ElectricFieldY;

variable ElectricFieldZ

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::ElectricFieldZ;

variable ElectronEnergyOrientationToString

const std::map<ElectronEnergyOrientation, std::string> rayx::ElectronEnergyOrientationToString;

variable ElementTypeToString

const std::map<ElementType, std::string> rayx::ElementTypeToString;

variable Energy

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::Energy;

variable EnergyDistributionTypeToString

const std::map<EnergyDistributionType, std::string> rayx::EnergyDistributionTypeToString;

variable EnergySpreadUnitToString

const std::map<EnergySpreadUnit, std::string> rayx::EnergySpreadUnitToString;

variable EventType

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::EventType;

variable EventTypeToString

const std::map<EventType, std::string> rayx::EventTypeToString;

variable FACTOR_ELECTRON_ENERGY_SC

RAY-UI shortcut for getFactorElectronEnergy.

double rayx::FACTOR_ELECTRON_ENERGY_SC;


variable FACTOR_SCHWINGER_RAY

\(G\) [?]. RAY's factor appearing in Schwinger equation context

double rayx::FACTOR_SCHWINGER_RAY;


variable FINE_STRUCTURE_CONSTANT

double rayx::FINE_STRUCTURE_CONSTANT;

variable FIXED_SEED

const uint32_t rayx::FIXED_SEED;

variable FigureRotationToString

const std::map<FigureRotation, std::string> rayx::FigureRotationToString;

variable GratingMountToString

const std::map<GratingMount, std::string> rayx::GratingMountToString;

variable INV_NM_TO_EVOLT

inverse nanometer-electron volt relationship / reziprocal factor

double rayx::INV_NM_TO_EVOLT;


variable IT_ASTIGMATIC2ASTIGMATIC

int rayx::IT_ASTIGMATIC2ASTIGMATIC;

variable IT_POINT2HORIZONTAL_DIVERGENT_LINE

int rayx::IT_POINT2HORIZONTAL_DIVERGENT_LINE;

variable IT_POINT2HORIZONTAL_LINE

int rayx::IT_POINT2HORIZONTAL_LINE;

variable IT_POINT2POINT

int rayx::IT_POINT2POINT;

variable MaterialToString

const std::map<Material, std::string> rayx::MaterialToString;

variable None

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::None;

variable ObjectId

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::ObjectId;

variable OpticalPathLength

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::OpticalPathLength;

variable Order

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::Order;

variable PI

double rayx::PI;

variable PLANCK

double rayx::PLANCK;

variable PLANCK_BAR

\(\hbar\) [Js]. Planck's bar constant.

double rayx::PLANCK_BAR;


variable ParaboloidTypeToString

const std::map<ParaboloidType, std::string> rayx::ParaboloidTypeToString;

variable PathEventId

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::PathEventId;

variable Position

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::Position;

variable PositionX

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::PositionX;

variable PositionY

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::PositionY;

variable PositionZ

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::PositionZ;

variable RZPTypeToString

const std::map<RZPType, std::string> rayx::RZPTypeToString;

variable RayAttrMask

Mask to specify ray attributes. Each attribute is represented as a bit flag, allowing for efficient combination and checking of multiple attributes. It is used to represent the various attributes that can be recorded for rays during ray tracing.

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::RayAttrMask;


variable RayAttrMaskCount

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::RayAttrMaskCount;

variable SPEED_OF_LIGHT

c_0 [m/s]. speed of light in vacuum.

double rayx::SPEED_OF_LIGHT;


variable SigmaTypeToString

const std::map<SigmaType, std::string> rayx::SigmaTypeToString;

variable SourceDistToString

const std::map<SourceDist, std::string> rayx::SourceDistToString;

variable SourceId

RAYX_X_MACRO_RAY_ATTR enum RAYX_API rayx::SourceId;

variable SpreadTypeToString

const std::map<SpreadType, std::string> rayx::SpreadTypeToString;

variable StringToBehaviourType

const std::map<std::string, BehaviourType> rayx::StringToBehaviourType;

variable StringToCentralBeamstop

const std::map<std::string, CentralBeamstop> rayx::StringToCentralBeamstop;

variable StringToCurvatureType

const std::map<std::string, CurvatureType> rayx::StringToCurvatureType;

variable StringToCutoutType

const std::map<std::string, CutoutType> rayx::StringToCutoutType;

variable StringToElectronEnergyOrientation

const std::map<std::string, ElectronEnergyOrientation> rayx::StringToElectronEnergyOrientation;

variable StringToElementType

const std::map<std::string, ElementType> rayx::StringToElementType;

variable StringToEnergyDistributionType

const std::map<std::string, EnergyDistributionType> rayx::StringToEnergyDistributionType;

variable StringToEnergySpreadUnit

const std::map<std::string, EnergySpreadUnit> rayx::StringToEnergySpreadUnit;

variable StringToEventType

const std::map<std::string, EventType> rayx::StringToEventType;

variable StringToFigureRotation

const std::map<std::string, FigureRotation> rayx::StringToFigureRotation;

variable StringToGratingMount

const std::map<std::string, GratingMount> rayx::StringToGratingMount;

variable StringToMaterial

const std::map<std::string, Material> rayx::StringToMaterial;

variable StringToParaboloidType

const std::map<std::string, ParaboloidType> rayx::StringToParaboloidType;

variable StringToRZPType

const std::map<std::string, RZPType> rayx::StringToRZPType;

variable StringToSigmaType

const std::map<std::string, SigmaType> rayx::StringToSigmaType;

variable StringToSourceDist

const std::map<std::string, SourceDist> rayx::StringToSourceDist;

variable StringToSpreadType

const std::map<std::string, SpreadType> rayx::StringToSpreadType;

variable error_fn

void RAYX_API(* rayx::error_fn) ();

Public Functions Documentation

function RZPLineDensity

RAYX_FN_ACC void RAYX_API rayx::RZPLineDensity (
    const glm::dvec3 &__restrict position,
    const glm::dvec3 &__restrict normal,
    const Behaviour::RZP &__restrict b,
    double &__restrict DX,
    double &__restrict DZ
) 

calculates DX and DZ (line spacing in x and z direction) at a given point for a given direction on the grating @params: lots

Returns:

: (inplace) DX, DZ


function advanceElectricField

inline RAYX_FN_ACC ElectricField rayx::advanceElectricField (
    const ElectricField field,
    double waveLength,
    const double opticalPathLength
) 

Advances an electric field propagating along a given optical path length.

Parameters:

  • field Electric field of incident photon
  • waveLength Wavelength of incident photon (in nanometers)
  • opticalPathLength Optical path length traveled (in millimeters)

Returns:

Advanced electric field


function allocBuf

template<typename Queue, typename Buf>
inline void rayx::allocBuf (
    Queue q,
    std::optional< Buf > & buf,
    const int size
) 

conditionally allocate buffer with specified minimum size. if the buffer already fulfills size requirements, this function does nothing. this function never shrinks a buffer. actual allocation size is nextPowerOfTwo(size). this function is designed to optimize the repetitive use of the buffer with potentially different size requirements (e.g. tracing multiple beamlines one after the other)


function allocRaysBuf

template<typename Queue, typename Acc>
inline void rayx::allocRaysBuf (
    Queue q,
    const RayAttrMask attrMask,
    RaysBuf < Acc > & raysBuf,
    const int size
) 

function angleBetweenUnitVectors

calculates the angle in rad, between two unit vectors

inline RAYX_FN_ACC double rayx::angleBetweenUnitVectors (
    glm::dvec3 a,
    glm::dvec3 b
) 


function appendH5

RAYX_API void rayx::appendH5 (
    const std::filesystem::path & filepath,
    const Rays & rays,
    const RayAttrMask attr=RayAttrMask::All
) 

function applySlopeError

RAYX_FN_ACC glm::dvec3 rayx::applySlopeError (
    glm::dvec3 normal,
    SlopeError error,
    int O_type,
    Rand &__restrict rand
) 

adds slope error to the normal @params: normal: normal vector error: the slope error to apply O_type: cartesian or cylindrical type of slope error (0=cartesian, 1=cylindrical) (1 only for ellipsis relevant) returns new normal if there is a slope error in either x or z direction or the unmodified normal otherwise.


function assertCutoutSubset

RAYX_FN_ACC void RAYX_API rayx::assertCutoutSubset (
    Cutout c1,
    Cutout c2
) 

function behave

RAYX_FN_ACC void rayx::behave (
    detail::Ray &__restrict ray,
    const CollisionPoint &__restrict col,
    const OpticalElement &__restrict element,
    const int *__restrict materialIndices,
    const double *__restrict materialTable
) 

function behaveCrystal

RAYX_FN_ACC void rayx::behaveCrystal (
    detail::Ray &__restrict ray,
    const Behaviour::Crystal &__restrict crystal,
    const CollisionPoint &__restrict col
) 

Each behave* function gets a Ray ray (in element-coords), the element itself, a randomness counter and the Collision col. col.hitpoint expresses where the given ray will hit the element (in element-coords). col.normal expresses the normal of the surface, at col.hitpoint (in element-coords). The ray has already been moved to the hitpoint, and it's lastElement has been set accordingly.

The behave* functions, will * change the rays direction, typically by reflecting using the normal * change the rays stokes vector * potentially absorb the ray (by calling recordFinalEvent(_, EventType::Absorbed))


function behaveFoil

RAYX_FN_ACC void rayx::behaveFoil (
    detail::Ray &__restrict ray,
    const Behaviour::Foil &__restrict foil,
    const CollisionPoint &__restrict col,
    int material,
    const int *__restrict materialIndices,
    const double *__restrict materialTable
) 

function behaveGrating

RAYX_FN_ACC void rayx::behaveGrating (
    detail::Ray &__restrict ray,
    const Behaviour::Grating &__restrict grating,
    const CollisionPoint &__restrict col
) 

function behaveImagePlane

RAYX_FN_ACC void rayx::behaveImagePlane (
    detail::Ray &__restrict ray
) 

function behaveMirror

RAYX_FN_ACC void rayx::behaveMirror (
    detail::Ray &__restrict ray,
    const CollisionPoint &__restrict col,
    const Coating &__restrict coating,
    int material,
    const int *__restrict materialIndices,
    const double *__restrict materialTable
) 

function behaveRZP

RAYX_FN_ACC void rayx::behaveRZP (
    detail::Ray &__restrict ray,
    const Behaviour::RZP &__restrict rzp,
    const CollisionPoint &__restrict col
) 

function behaveSlit

RAYX_FN_ACC void rayx::behaveSlit (
    detail::Ray &__restrict ray,
    const Behaviour::Slit &__restrict slit
) 

function bessel1

RAYX_FN_ACC double RAYX_API rayx::bessel1 (
    double v
) 

returns first bessel function of parameter v


function bessel_diff

RAYX_FN_ACC void rayx::bessel_diff (
    double radius,
    double wl,
    double & dphi,
    double & dpsi,
    Rand & rand
) 

calculates the Bessel diffraction effects on circular slits and on circular zoneplates @params: radius radius < 0 (mm) wl wavelength (nm) dphi, dpsi angles of diffracted ray

Returns:

results stored in dphi, dpsi (inout)


function calcBrewstersAngle

inline RAYX_FN_ACC complex::Complex rayx::calcBrewstersAngle (
    const complex::Complex iorI,
    const complex::Complex iorT
) 

function calcCriticalAngle

inline RAYX_FN_ACC complex::Complex rayx::calcCriticalAngle (
    const complex::Complex iorI,
    const complex::Complex iorT
) 

function calcDipoleFold

RAYX_API RAYX_FN_ACC PsiAndStokes rayx::calcDipoleFold (
    double psi,
    double photonEnergy,
    double sigpsi,
    double electronEnergy,
    double criticalEnergy,
    ElectronEnergyOrientation electronEnergyOrientation,
    Rand &__restrict rand
) 

function calcGamma

RAYX_API double rayx::calcGamma (
    double electronEnergy
) 

function calcJonesMatrix

inline RAYX_FN_ACC cmat3 rayx::calcJonesMatrix (
    const ComplexFresnelCoeffs amplitude
) 

function calcMaxFlux

RAYX_API double rayx::calcMaxFlux (
    double photonEnergy,
    double energySpread,
    double criticalEnergy,
    double gamma
) 

function calcMaxIntensity

RAYX_API double rayx::calcMaxIntensity (
    double photonEnergy,
    double verDivergence,
    double electronEnergy,
    double criticalEnergy,
    ElectronEnergyOrientation electronEnergyOrientation,
    Rand &__restrict rand
) 

function calcPolaririzationMatrix

inline RAYX_FN_ACC cmat3 rayx::calcPolaririzationMatrix (
    const glm::dvec3 incidentVec,
    const glm::dvec3 reflectOrRefractVec,
    const glm::dvec3 normalVec,
    const ComplexFresnelCoeffs amplitude
) 

function calcPolaririzationMatrixFoil

inline RAYX_FN_ACC cmat3 rayx::calcPolaririzationMatrixFoil (
    const glm::dvec3 incidentVec,
    const glm::dvec3 normalVec,
    const ComplexFresnelCoeffs amplitude
) 

function calcReflectAmplitude

inline RAYX_FN_ACC ComplexFresnelCoeffs rayx::calcReflectAmplitude (
    const complex::Complex incidentAngle,
    const complex::Complex refractAngle,
    const complex::Complex iorI,
    const complex::Complex iorT
) 

function calcReflectIntensity

inline RAYX_FN_ACC FresnelCoeffs rayx::calcReflectIntensity (
    const ComplexFresnelCoeffs reflectAmplitude
) 

function calcReflectPolarizationMatrixAtNormalIncidence

inline RAYX_FN_ACC cmat3 rayx::calcReflectPolarizationMatrixAtNormalIncidence (
    const ComplexFresnelCoeffs amplitude
) 

function calcRefractAmplitude

inline RAYX_FN_ACC ComplexFresnelCoeffs rayx::calcRefractAmplitude (
    const complex::Complex incidentAngle,
    const complex::Complex refractAngle,
    const complex::Complex iorI,
    const complex::Complex iorT
) 

function calcRefractAngle

inline RAYX_FN_ACC complex::Complex rayx::calcRefractAngle (
    const complex::Complex incidentAngle,
    const complex::Complex iorI,
    const complex::Complex iorT
) 

function calcRefractIntensity

inline RAYX_FN_ACC FresnelCoeffs rayx::calcRefractIntensity (
    const ComplexFresnelCoeffs refract_amplitude,
    const complex::Complex incidentAngle,
    const complex::Complex refractAngle,
    const complex::Complex iorI,
    const complex::Complex iorT
) 

function calcTransformationMatrices

RAYX_API glm::dmat4 rayx::calcTransformationMatrices (
    glm::dvec4 position,
    glm::dmat4 orientation,
    bool calcInMatrix,
    DesignPlane plane
) 

function calcVerDivergence

RAYX_API double rayx::calcVerDivergence (
    double energy,
    double sigv,
    double electronEnergy,
    double criticalEnergy
) 

function canonicalizeRepositoryPath

std::filesystem::path RAYX_API rayx::canonicalizeRepositoryPath (
    const std::filesystem::path & relPath
) 

relPath is a path relative to the root of the RAY-X git repository (i.e. where .git lies). canonicalizeRepositoryPath(relPath) yields an absolute path representing the same path. Examples: * canonicalizeRepositoryPath(/home/username/foo) = /home/username/foo # absolute paths are unchanged! * canonicalizeRepositoryPath(build/bin/python) = /home/username/path/to/RAY-X/build/bin/python * canonicalizeRepositoryPath(Tests/input) = /home/username/path/to/RAY-X/Tests/input


function canonicalizeUserPath

std::filesystem::path RAYX_API rayx::canonicalizeUserPath (
    const std::filesystem::path & relPath
) 

relPath is a path relative to the working directory of the user executing RAY-X at the point of execution. canonicalizeUserPath(relPath) yields an absolute path representing the same path. Examples: * canonicalizeUserPath(/home/username/file) = /home/username/file # absolute paths are unchanged! * if you are at /home/username/folder, then canonicalizeUserPath(file) = /home/username/folder/file

This function is used to find the correct path when the user executes ./TerminalApp -i <relPath>


function ceilIntDivision

inline int rayx::ceilIntDivision (
    const int dividend,
    const int divisor
) 

function computeEta

Computes the normalized angular deviation parameter η (Eta) for dynamical X-ray diffraction.

inline RAYX_FN_ACC complex::Complex rayx::computeEta (
    double theta,
    double bragg,
    double asymmetry,
    double structureFactorReFH,
    double structureFactorImFH,
    double structureFactorReFHC,
    double structureFactorImFHC,
    double structureFactorReF0,
    double structureFactorImF0,
    double polFactor,
    double gamma
) 

Parameters:

  • theta Angle of incidence relative to the crystal surface (radians)
  • bragg Bragg angle (radians)
  • asymmetry Asymmetry factor
  • structureFactorReFH Real part of structure factor
  • structureFactorImFH Imaginary part of structure factor
  • structureFactorReFHC Real part of structure factor
  • structureFactorImFHC Imaginary part of structure factor
  • structureFactorReF0 Real part of structure factor
  • structureFactorImF0 Imaginary part of structure factor
  • polFactor Polarization factor
  • gamma Diffraction prefactor

Returns:

Complex η parameter


function computeMultilayerReflectance

inline RAYX_FN_ACC ComplexFresnelCoeffs rayx::computeMultilayerReflectance (
    const complex::Complex incidentAngle,
    const double wavelength,
    int numLayers,
    const double *__restrict thicknesses,
    const complex::Complex *__restrict iors
) 

function computeR

Computes the reflection coefficient R based on eta This function is based on Equation (103) from Batterman & Cole (1964), p. 706,.

inline RAYX_FN_ACC complex::Complex rayx::computeR (
    complex::Complex eta,
    double structureFactorReFH,
    double structureFactorImFH,
    double structureFactorReFHC,
    double structureFactorImFHC
) 

Parameters:

  • eta Complex deviation parameter
  • structureFactorReFH Real part of structure factor
  • structureFactorImFH Imaginary part of structure factor
  • structureFactorReFHC Real part of structure factor
  • structureFactorImFHC Imaginary part of structure factor

Returns:

Complex reflection coefficient R


function computeSingleCoatingReflectance

inline RAYX_FN_ACC ComplexFresnelCoeffs rayx::computeSingleCoatingReflectance (
    const complex::Complex incidentAngle,
    const double wavelength,
    const double thickness,
    const complex::Complex iorI,
    const complex::Complex iorC,
    const complex::Complex iorS
) 

function computeTransmittance

Calculates the transmission through a single thin film layer using Fresnel equations.

inline RAYX_FN_ACC ComplexFresnelCoeffs rayx::computeTransmittance (
    double wavelength,
    complex::Complex theta0,
    const complex::Complex & indexVacuum,
    const complex::Complex & indexMaterial,
    double thickness
) 

This function computes the intensity transmission coefficient (T) for a plane wave incident on a single dielectric or absorbing film, including interference effects.

Parameters:

  • wavelength Wavelength of light in nanometers.
  • thickness Thickness of the film in nanometers.
  • n0 Complex refractive index of the incident medium (vakuum).
  • n1 Complex refractive index of the film layer.
  • incidentAngleRad Angle of incidence in radians (from normal).

Returns:

double Intensity transmission coefficient (range 0 to 1).


function contains

Check if a RayAttrMask (haystack) contains another RayAttrMask (needle).

inline RAYX_API RAYX_FN_ACC constexpr bool rayx::contains (
    const RayAttrMask haystack,
    const RayAttrMask needle
) 

Parameters:

  • haystack The RayAttrMask to check.
  • needle The RayAttrMask to look for.

Returns:

True if the haystack contains the needle, false otherwise.

Note:

When repeatedly checking on the same haystack, this function should be preferred over Rays::contains.


function countSetBits

Count the number of set bits (i.e., attributes) in a RayAttrMask.

RAYX_API int rayx::countSetBits (
    const RayAttrMask mask
) 

Parameters:

  • mask The RayAttrMask to count the set bits in.

Returns:

The number of set bits in the RayAttrMask.


function cubicDirection

RAYX_FN_ACC glm::dvec3 RAYX_API rayx::cubicDirection (
    const glm::dvec3 &__restrict rayDirection,
    double alph
) 

function cubicPosition

RAYX_FN_ACC glm::dvec3 RAYX_API rayx::cubicPosition (
    const glm::dvec3 &__restrict rayPosition,
    const double alpha
) 

function cutoutBoundingBox

RAYX_FN_ACC glm::dvec2 RAYX_API rayx::cutoutBoundingBox (
    Cutout cutout
) 

function dbg

void rayx::dbg (
    const std::string & filename,
    int line,
    std::string name,
    std::vector< double > v
) 

function defaultMaxEvents

int rayx::defaultMaxEvents (
    const int numObjects
) 

function degreeOfPolarization

inline RAYX_FN_ACC double rayx::degreeOfPolarization (
    const Stokes stokes
) 

function dipoleBessel

RAYX_API RAYX_FN_ACC double rayx::dipoleBessel (
    double hnue,
    double zeta
) 

function directionToSphericalCoords

RAYX_FN_ACC void RAYX_API rayx::directionToSphericalCoords (
    glm::dvec3 direction,
    double & out_phi,
    double & out_psi
) 

function dpow

RAYX_FN_ACC double RAYX_API rayx::dpow (
    double a,
    int b
) 

function electricFieldToStokes

inline RAYX_FN_ACC ElectricField rayx::electricFieldToStokes (
    const ElectricField field,
    const glm::dvec3 forward,
    const glm::dvec3 up
) 

function electricFieldToStokes

inline RAYX_FN_ACC ElectricField rayx::electricFieldToStokes (
    const ElectricField field,
    const glm::dmat3 rotation
) 

function electricFieldToStokesWithBaseConvention

inline RAYX_FN_ACC ElectricField rayx::electricFieldToStokesWithBaseConvention (
    const ElectricField field,
    const glm::dvec3 forward
) 

function energyToWaveLength

inline RAYX_FN_ACC double RAYX_API rayx::energyToWaveLength (
    double x
) 

converts energy (eV) to wavelength (nm)

Parameters:

  • energy energy of a photon in eV. must not be 0

Returns:

wavelength of photon in nm


function eventTypeToMask

inline RAYX_FN_ACC constexpr EventTypeMask rayx::eventTypeToMask (
    const EventType eventType
) 

function exclude

inline RAYX_API RAYX_FN_ACC constexpr RayAttrMask rayx::exclude (
    const RayAttrMask haystack,
    const RayAttrMask needle
) 

function execWithValidWorkDiv

template<typename Acc, typename DevAcc, typename Queue, typename Kernel, typename... Args>
inline void rayx::execWithValidWorkDiv (
    DevAcc devAcc,
    Queue q,
    const int numElements,
    BlockSizeConstraint::Variant blockSizeConstraint,
    const Kernel & kernel,
    Args &&... args
) 

function fact

RAYX_FN_ACC double RAYX_API rayx::fact (
    int n
) 

function findCollisionInElementCoords

RAYX_FN_ACC OptCollisionPoint rayx::findCollisionInElementCoords (
    const glm::dvec3 &__restrict rayPosition,
    const glm::dvec3 &__restrict rayDirection,
    const OpticalElement &__restrict element,
    Rand &__restrict rand
) 

function findCollisionInElementCoordsWithoutSlopeError

RAYX_FN_ACC OptCollisionPoint RAYX_API rayx::findCollisionInElementCoordsWithoutSlopeError (
    const glm::dvec3 &__restrict rayPosition,
    const glm::dvec3 &__restrict rayDirection,
    const Surface &__restrict surface,
    const Cutout &__restrict cutout,
    bool isTriangul
) 

function findCollisionWithElements

RAYX_FN_ACC OptCollisionWithElement rayx::findCollisionWithElements (
    glm::dvec3 rayPosition,
    glm::dvec3 rayDirection,
    const OpticalElement *__restrict elements,
    const ObjectTransform * __restrict,
    const int numSources,
    const int numElements,
    Rand &__restrict rand
) 

function fixSeed

void RAYX_API rayx::fixSeed (
    uint32_t x
) 

function formatAsVec

template<typename T>
inline std::vector< double > rayx::formatAsVec (
    T
) 

function formatAsVec

inline std::vector< double > rayx::formatAsVec (
    int arg
) 

function formatAsVec

inline std::vector< double > rayx::formatAsVec (
    RandCounter arg
) 

function formatAsVec

inline std::vector< double > rayx::formatAsVec (
    EventType arg
) 

function formatAsVec

inline std::vector< double > rayx::formatAsVec (
    double arg
) 

function formatAsVec

inline std::vector< double > rayx::formatAsVec (
    complex::Complex arg
) 

function formatAsVec

template<int N, int M, typename T>
inline std::vector< double > rayx::formatAsVec (
    const glm::mat< N, M, T > arg
) 

function formatAsVec

template<int N, typename T>
inline std::vector< double > rayx::formatAsVec (
    const glm::vec< N, T > arg
) 

function formatAsVec

template<size_t N, typename T>
inline std::vector< double > rayx::formatAsVec (
    const std::array< T, N > arg
) 

function formatAsVec

template<typename T>
inline std::vector< double > rayx::formatAsVec (
    const std::vector< T > arg
) 

function formatAsVec

inline std::vector< double > rayx::formatAsVec (
    const Rays & rays
) 

function formatAsVec< double >

template<>
inline std::vector< double > rayx::formatAsVec< double > (
    const std::vector< double > arg
) 

function forwardVectorToBaseConvention

inline RAYX_FN_ACC RotationBase rayx::forwardVectorToBaseConvention (
    const glm::dvec3 forward
) 

function fraun_diff

RAYX_FN_ACC void rayx::fraun_diff (
    double dim,
    double wl,
    double & dAngle,
    Rand & rand
) 

calculates fraunhofer diffraction effects on rectangular slits

Parameters:

  • dim dimension (x or y) (mm)
  • wl wavelength (nm)
  • dAngle diffraction angle (inout)

Returns:

result stored in dAngle


function getAsymmetryFactor

Computes the asymmetry factor b from the Bragg angle and surface tilt angle.

inline RAYX_FN_ACC double rayx::getAsymmetryFactor (
    double braggAngle,
    double alpha
) 

Parameters:

  • braggAngle Bragg angle θ_B (in radians)
  • alpha Tilt between surface and diffraction planes α (in radians) (offset Angle)

Returns:

Asymmetry factor b (dimensionless)


function getAtomicMassAndRho

RAYX_FN_ACC glm::dvec2 RAYX_API rayx::getAtomicMassAndRho (
    int material
) 

function getBlockSize

template<typename Acc>
inline auto rayx::getBlockSize () 

function getBraggAngle

Computes the bragg angle.

inline RAYX_FN_ACC double rayx::getBraggAngle (
    double energy,
    double dSpacing2
) 

Parameters:

  • energy photonenergy of the ray
  • d lattice spacing*2
  • order Diffraction order

Returns:

the bragg angle theta (rad)


function getCone

void rayx::getCone (
    xml::Parser parser,
    DesignElement * de
) 

function getCrystal

void rayx::getCrystal (
    xml::Parser parser,
    DesignElement * de
) 

function getCubicCollision

RAYX_FN_ACC OptCollisionPoint rayx::getCubicCollision (
    const glm::dvec3 &__restrict rayPosition,
    const glm::dvec3 &__restrict rayDirection,
    const Surface::Cubic &__restrict cu
) 

function getCylinder

void rayx::getCylinder (
    xml::Parser parser,
    DesignElement * de
) 

function getDebugVerbose

bool RAYX_API rayx::getDebugVerbose () 

function getDiffractionPrefactor

Computes the diffraction prefactor Γ used in dynamical X-ray diffraction theory. Defined in Batterman & Cole (1964), p. 685.

inline RAYX_FN_ACC double rayx::getDiffractionPrefactor (
    double wavelength,
    double unitCellVolume
) 

Parameters:

  • wavelength X-ray wavelength (in nm)
  • unitCellVolume Unit cell volume (in nm³)

Returns:

Diffraction prefactor Γ


function getDipoleInterpolation

RAYX_API RAYX_FN_ACC double rayx::getDipoleInterpolation (
    double energy
) 

function getEllipsoid

void rayx::getEllipsoid (
    xml::Parser parser,
    DesignElement * de
) 

function getExpertsCubic

void rayx::getExpertsCubic (
    xml::Parser parser,
    DesignElement * de
) 

function getExpertsOptics

void rayx::getExpertsOptics (
    xml::Parser parser,
    DesignElement * de
) 

function getFoil

void rayx::getFoil (
    xml::Parser parser,
    DesignElement * de
) 

function getGrating

void rayx::getGrating (
    xml::Parser parser,
    DesignElement * de
) 

function getImageplane

void rayx::getImageplane (
    xml::Parser parser,
    DesignElement * de
) 

function getNffEntry

RAYX_FN_ACC NffEntry RAYX_API rayx::getNffEntry (
    int index,
    int material,
    const int * materialIndices,
    const double * materialTable
) 

function getNffEntryCount

RAYX_FN_ACC int RAYX_API rayx::getNffEntryCount (
    int material,
    const int * materialIndices
) 

function getPalikEntry

RAYX_FN_ACC PalikEntry RAYX_API rayx::getPalikEntry (
    int index,
    int material,
    const int * materialIndices,
    const double * materialTable
) 

function getPalikEntryCount

RAYX_FN_ACC int RAYX_API rayx::getPalikEntryCount (
    int material,
    const int * materialIndices
) 

function getParaboloid

void rayx::getParaboloid (
    xml::Parser parser,
    DesignElement * de
) 

function getPlaneGrating

void rayx::getPlaneGrating (
    xml::Parser parser,
    DesignElement * de
) 

function getPlaneMirror

void rayx::getPlaneMirror (
    xml::Parser parser,
    DesignElement * de
) 

function getQuadricCollision

RAYX_FN_ACC OptCollisionPoint rayx::getQuadricCollision (
    const glm::dvec3 &__restrict rayPosition,
    const glm::dvec3 &__restrict rayDirection,
    const Surface::Quadric &__restrict quadric
) 

function getRZP

void rayx::getRZP (
    xml::Parser parser,
    DesignElement * de
) 

function getRayAttrNames

Get a list of all possible ray attribute names.

RAYX_API std::vector< std::string > rayx::getRayAttrNames () 

Returns:

A vector of strings containing all possible ray attribute names.


function getRecordIndex

inline RAYX_FN_ACC int rayx::getRecordIndex (
    const int gid,
    const int numRecorded,
    const int gridStride
) 

function getRefractiveIndex

RAYX_FN_ACC complex::Complex RAYX_API rayx::getRefractiveIndex (
    double energy,
    int material,
    const int * materialIndices,
    const double * materialTable
) 

function getSlit

void rayx::getSlit (
    xml::Parser parser,
    DesignElement * de
) 

function getSphereGrating

void rayx::getSphereGrating (
    xml::Parser parser,
    DesignElement * de
) 

function getSphereMirror

void rayx::getSphereMirror (
    xml::Parser parser,
    DesignElement * de
) 

function getStokesSyn

RAYX_API RAYX_FN_ACC glm::dvec4 rayx::getStokesSyn (
    double energy,
    double psi1,
    double psi2,
    double electronEnergy,
    double criticalEnergy,
    ElectronEnergyOrientation electronEnergyOrientation
) 

function getSurfaceCoating

void rayx::getSurfaceCoating (
    xml::Parser parser,
    DesignElement * de
) 

Set all Parameters for each optical Element a RML file can define. Set all mandatory parameters is called for every element without exception. This only works in combi with the xml parser.


function getTheta

inline RAYX_FN_ACC double rayx::getTheta (
    const glm::dvec3 &__restrict rayDirection,
    const glm::dvec3 &__restrict normal,
    double offsetAngle
) 

function getToroidCollision

RAYX_FN_ACC OptCollisionPoint rayx::getToroidCollision (
    const glm::dvec3 &__restrict rayPosition,
    const glm::dvec3 &__restrict rayDirection,
    const Surface::Toroid &__restrict toroid,
    bool isTriangul
) 

function getToroidMirror

void rayx::getToroidMirror (
    xml::Parser parser,
    DesignElement * de
) 

function getToroidalGrating

void rayx::getToroidalGrating (
    xml::Parser parser,
    DesignElement * de
) 

function getWorkDivForAcc

template<typename Acc>
inline auto rayx::getWorkDivForAcc (
    alpaka::Idx< Acc > numElements
) 

function get_factorCriticalEnergy

RAYX_API double rayx::get_factorCriticalEnergy () 

function get_factorElectronEnergy

RAYX_API double rayx::get_factorElectronEnergy () 

function get_factorOmega

RAYX_API double rayx::get_factorOmega () 

function globalToLocalElectricField

inline RAYX_FN_ACC LocalElectricField rayx::globalToLocalElectricField (
    const ElectricField field,
    const glm::dvec3 forward,
    const glm::dvec3 up
) 

function globalToLocalElectricField

inline RAYX_FN_ACC LocalElectricField rayx::globalToLocalElectricField (
    const ElectricField field,
    const glm::dmat3 rotation
) 

function globalToLocalElectricFieldWithBaseConvention

inline RAYX_FN_ACC LocalElectricField rayx::globalToLocalElectricFieldWithBaseConvention (
    const ElectricField field,
    const glm::dvec3 forward
) 

function importBeamline

RAYX_API Beamline rayx::importBeamline (
    const std::filesystem::path &
) 

function inCutout

RAYX_FN_ACC bool RAYX_API rayx::inCutout (
    Cutout cutout,
    double x,
    double z
) 

function intensity

inline RAYX_FN_ACC double rayx::intensity (
    const LocalElectricField field
) 

function intensity

inline RAYX_FN_ACC double rayx::intensity (
    const ElectricField field
) 

function intensity

inline RAYX_FN_ACC double rayx::intensity (
    const Stokes stokes
) 

function interceptFoil

inline RAYX_FN_ACC ElectricField rayx::interceptFoil (
    const ElectricField incidentElectricField,
    const glm::dvec3 incidentVec,
    const glm::dvec3 normalVec,
    ComplexFresnelCoeffs transCoeffs
) 

function interceptReflect

inline RAYX_FN_ACC ElectricField rayx::interceptReflect (
    const ElectricField incidentElectricField,
    const glm::dvec3 incidentVec,
    const glm::dvec3 reflectVec,
    const glm::dvec3 normalVec,
    const complex::Complex iorI,
    const complex::Complex iorT
) 

function interceptReflectCrystal

inline RAYX_FN_ACC ElectricField rayx::interceptReflectCrystal (
    const ElectricField incidentElectricField,
    const glm::dvec3 incidentVec,
    const glm::dvec3 reflectVec,
    const glm::dvec3 normalVec,
    ComplexFresnelCoeffs reflectAmplitude
) 

function isFlag

Check if a RayAttrMask represents a single attribute (i.e., is a flag).

RAYX_API bool rayx::isFlag (
    const RayAttrMask attr
) 

Parameters:

  • attr The RayAttrMask to check.

Returns:

True if the RayAttrMask represents a single attribute, false otherwise.


function isRayTerminated

inline RAYX_FN_ACC bool rayx::isRayTerminated (
    const EventType eventType
) 

function keyCutoutPoints

RAYX_FN_ACC glm::dmat4 RAYX_API rayx::keyCutoutPoints (
    Cutout cutout
) 

function loadMaterialTables

MaterialTables RAYX_API rayx::loadMaterialTables (
    std::array< bool, 92 > relevantMaterials
) 

function loadRay

inline RAYX_FN_ACC detail::Ray rayx::loadRay (
    const int i,
    const RaysPtr &__restrict rays
) 

function localElectricFieldToStokes

inline RAYX_FN_ACC Stokes rayx::localElectricFieldToStokes (
    const LocalElectricField field
) 

function localToGlobalElectricField

inline RAYX_FN_ACC ElectricField rayx::localToGlobalElectricField (
    const LocalElectricField localField,
    const glm::dvec3 forward,
    const glm::dvec3 up
) 

function localToGlobalElectricField

inline RAYX_FN_ACC ElectricField rayx::localToGlobalElectricField (
    const LocalElectricField localField,
    const glm::dmat3 rotation
) 

function localToGlobalElectricFieldWithBaseConvention

inline RAYX_FN_ACC ElectricField rayx::localToGlobalElectricFieldWithBaseConvention (
    const LocalElectricField localField,
    const glm::dvec3 forward
) 

function makeBehaviour

Behaviour rayx::makeBehaviour (
    const DesignElement & dele
) 

function makeCone

Surface rayx::makeCone (
    const DesignElement & dele
) 

function makeCrystal

Behaviour rayx::makeCrystal (
    const DesignElement & dele
) 

function makeCubic

Surface rayx::makeCubic (
    const DesignElement & dele
) 

function makeCylinder

Surface rayx::makeCylinder (
    const DesignElement & dele
) 

function makeElement

OpticalElementAndTransform rayx::makeElement (
    const DesignElement & dele,
    Behaviour behaviour,
    Surface surface,
    DesignPlane plane=DesignPlane::XZ,
    std::optional< Cutout > cutout={}
) 

function makeEllipsoid

Surface rayx::makeEllipsoid (
    const DesignElement & dele
) 

function makeFoil

Behaviour rayx::makeFoil (
    const DesignElement & dele
) 

function makeGrating

Behaviour rayx::makeGrating (
    const DesignElement & dele
) 

function makeParaboloid

Surface rayx::makeParaboloid (
    const DesignElement & dele
) 

function makePlane

Surface rayx::makePlane () 

function makeQuadric

Surface rayx::makeQuadric (
    const DesignElement & dele
) 

function makeRZPBehaviour

Behaviour rayx::makeRZPBehaviour (
    const DesignElement & dele
) 

function makeSlit

Behaviour rayx::makeSlit (
    const DesignElement & dele
) 

function makeSphere

Surface rayx::makeSphere (
    double radius
) 

function makeSurface

Surface rayx::makeSurface (
    const DesignElement & dele
) 

function makeToroid

Surface rayx::makeToroid (
    const DesignElement & dele
) 

function materialFromString

bool rayx::materialFromString (
    const char * matname,
    Material * out
) 

returns whether a Material with the name matname has been found. it will be stored in out.


function nextMultiple

inline int rayx::nextMultiple (
    const int value,
    const int divisor
) 

function nextPowerOfTwo

inline int rayx::nextPowerOfTwo (
    const int value
) 

function normalCartesian

RAYX_FN_ACC glm::dvec3 RAYX_API rayx::normalCartesian (
    glm::dvec3 normal,
    double x_rad,
    double z_rad
) 

turn the normal vector through x_rad and z_rad @params: normal: the normal vector x_rad: angle in rad for x-axis z_rad: angle in rad for z-axis returns modified normal vector


function normalCylindrical

RAYX_FN_ACC glm::dvec3 RAYX_API rayx::normalCylindrical (
    glm::dvec3 normal,
    double x_rad,
    double z_rad
) 

turn the normal vector through x_rad and z_rad @params: normal: the normal vector x_rad: angle in rad for x-axis z_rad: angle in rad for z-axis returns modified normal vector


function operator!

inline RAYX_API RAYX_FN_ACC constexpr bool rayx::operator! (
    const RayAttrMask lhs
) 

function operator!

inline RAYX_FN_ACC constexpr bool rayx::operator! (
    const EventTypeMask lhs
) 

function operator!=

bool RAYX_API rayx::operator!= (
    const Rays & lhs,
    const Rays & rhs
) 

function operator&

inline RAYX_API RAYX_FN_ACC constexpr RayAttrMask rayx::operator& (
    const RayAttrMask lhs,
    const RayAttrMask rhs
) 

function operator&

inline RAYX_FN_ACC constexpr EventTypeMask rayx::operator& (
    const EventTypeMask lhs,
    const EventTypeMask rhs
) 

function operator&=

inline RAYX_API RAYX_FN_ACC constexpr RayAttrMask & rayx::operator&= (
    RayAttrMask & lhs,
    const RayAttrMask rhs
) 

function operator&=

inline RAYX_FN_ACC constexpr EventTypeMask rayx::operator&= (
    EventTypeMask & lhs,
    const EventTypeMask rhs
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const SpreadType v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const EnergyDistributionType v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const SourceDist v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const ElectronEnergyOrientation v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const EnergySpreadUnit v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const RZPType v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const CentralBeamstop v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const GratingMount v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const ParaboloidType v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const CurvatureType v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const BehaviourType v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const FigureRotation v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const SigmaType v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const Material v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const ElementType v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const EventType v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const CutoutType v
) 

function operator<<

inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const complex::Complex & c
) 

function operator<<

template<typename T>
inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const glm::tvec2< T > & v
) 

function operator<<

template<typename T>
inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const glm::tvec3< T > & v
) 

function operator<<

template<typename T>
inline std::ostream & rayx::operator<< (
    std::ostream & os,
    const glm::tvec4< T > & v
) 

function operator==

bool RAYX_API rayx::operator== (
    const Rays & lhs,
    const Rays & rhs
) 

function operator^

inline RAYX_API RAYX_FN_ACC constexpr RayAttrMask rayx::operator^ (
    const RayAttrMask lhs,
    const RayAttrMask rhs
) 

function operator^

inline RAYX_FN_ACC constexpr EventTypeMask rayx::operator^ (
    const EventTypeMask lhs,
    const EventTypeMask rhs
) 

function operator^=

inline RAYX_API RAYX_FN_ACC constexpr RayAttrMask & rayx::operator^= (
    RayAttrMask & lhs,
    const RayAttrMask rhs
) 

function operator^=

inline RAYX_FN_ACC constexpr EventTypeMask rayx::operator^= (
    EventTypeMask & lhs,
    const EventTypeMask rhs
) 

function operator|

inline RAYX_X_MACRO_RAY_ATTR enum RAYX_API RAYX_API RAYX_FN_ACC constexpr RayAttrMask rayx::operator| (
    const RayAttrMask lhs,
    const RayAttrMask rhs
) 

function operator|

inline RAYX_FN_ACC constexpr EventTypeMask rayx::operator| (
    const EventTypeMask lhs,
    const EventTypeMask rhs
) 

function operator|=

inline RAYX_API RAYX_FN_ACC constexpr RayAttrMask & rayx::operator|= (
    RayAttrMask & lhs,
    const RayAttrMask rhs
) 

function operator|=

inline RAYX_FN_ACC constexpr EventTypeMask rayx::operator|= (
    EventTypeMask & lhs,
    const EventTypeMask rhs
) 

function operator~

inline RAYX_API RAYX_FN_ACC constexpr RayAttrMask rayx::operator~ (
    const RayAttrMask lhs
) 

function operator~

inline RAYX_FN_ACC constexpr EventTypeMask rayx::operator~ (
    const EventTypeMask lhs
) 

function randomDouble

double RAYX_API rayx::randomDouble () 

function randomDoubleInRange

double RAYX_API rayx::randomDoubleInRange (
    double a,
    double b
) 

function randomIntInRange

int rayx::randomIntInRange (
    int a,
    int b
) 

function randomNormal

double RAYX_API rayx::randomNormal (
    double mean,
    double stddev
) 

function randomSeed

void RAYX_API rayx::randomSeed () 

function randomUint

uint32_t rayx::randomUint () 

function rayAttrStringsToRayAttrMask

Convert a list of ray attribute names to a RayAttrMask.

RAYX_API RayAttrMask rayx::rayAttrStringsToRayAttrMask (
    const std::vector< std::string > & strings
) 

Parameters:

  • strings A vector of strings containing ray attribute names.

Returns:

A RayAttrMask representing the specified attributes.


function rayMatrixMult

inline RAYX_FN_ACC void RAYX_API rayx::rayMatrixMult (
    const glm::dmat4 &__restrict m,
    glm::dvec3 &__restrict rayPosition,
    glm::dvec3 &__restrict rayDirection
) 

function rayMatrixMult

inline RAYX_FN_ACC void RAYX_API rayx::rayMatrixMult (
    const glm::dmat4 &__restrict m,
    glm::dvec3 &__restrict rayPosition,
    glm::dvec3 &__restrict rayDirection,
    ElectricField &__restrict rayElectricField
) 

function raysBufToRaysPtr

template<typename Acc>
RaysPtr rayx::raysBufToRaysPtr (
    RaysBuf < Acc > & buf
) 

function readCsv

Rays RAYX_API rayx::readCsv (
    const std::filesystem::path & filepath
) 

function readFile

std::optional< std::vector< uint8_t > > RAYX_API rayx::readFile (
    const std::string & filename,
    const uint32_t count=0
) 

function readFileAlign32

std::optional< std::vector< uint32_t > > rayx::readFileAlign32 (
    const std::string & filename,
    const uint32_t count=0
) 

function readH5ObjectNames

RAYX_API std::vector< std::string > rayx::readH5ObjectNames (
    const std::filesystem::path & filepath
) 

function readH5Rays

RAYX_API Rays rayx::readH5Rays (
    const std::filesystem::path & filepath,
    const RayAttrMask attr=RayAttrMask::All
) 

function refrac2D

RAYX_FN_ACC void rayx::refrac2D (
    detail::Ray &__restrict ray,
    glm::dvec3 normal,
    double az,
    double ax
) 

calculates refracted ray @params: ray: Ray normal: normal at intersection point of ray and element -> for planes normal is always the same (0,1,0) -> no need to rotate but we do anyways. az: linedensity in z direction ax: linedensity in x direction

Returns:

: refracted ray (position unchanged, direction changed), weight = EventType::BeyondHorizon if "ray beyond horizon"


function refract_dvec3

RAYX_FN_ACC glm::dvec3 rayx::refract_dvec3 (
    glm::dvec3 I,
    glm::dvec3 N,
    double eta
) 

Simple refraction for double precision vectors @params: I: incident vector N: normal vector at the point of intersection eta: ratio of refractive indices (n1/n2)

Returns:

: refracted vector, or zero vector if total internal reflection occurs


function rotationMatrix

inline RAYX_FN_ACC glm::dmat3 rayx::rotationMatrix (
    const glm::dvec3 forward,
    const glm::dvec3 up
) 

function rotationMatrixWithBaseConvention

inline RAYX_FN_ACC glm::dmat3 rayx::rotationMatrixWithBaseConvention (
    const glm::dvec3 forward
) 

function schwinger

calculate probability for chosen energy with edge-cases according to H.Wiedemann Synchrotron Radiation P. 259 (D.21)

RAYX_API RAYX_FN_ACC double rayx::schwinger (
    double energy,
    double gamma,
    double criticalEnergy
) 


function selectEnergy

RAYX_FN_ACC double rayx::selectEnergy (
    const HardEdge &__restrict hardEdge,
    Rand &__restrict rand
) 

function selectEnergy

RAYX_FN_ACC double rayx::selectEnergy (
    const SoftEdge &__restrict softEdge,
    Rand &__restrict rand
) 

function selectEnergy

RAYX_FN_ACC double rayx::selectEnergy (
    const SeparateEnergies &__restrict separateEnergies,
    Rand &__restrict rand
) 

function selectEnergy

RAYX_FN_ACC double rayx::selectEnergy (
    const EnergyDistributionList &__restrict energyDistributionList,
    Rand &__restrict rand
) 

function selectEnergy

RAYX_FN_ACC double rayx::selectEnergy (
    const EnergyDistributionDataVariant &__restrict energyDistribution,
    Rand &__restrict rand
) 

function setAllMandatory

void rayx::setAllMandatory (
    xml::Parser parser,
    DesignElement * de,
    DesignPlane dp
) 

function setAllMandatory

void rayx::setAllMandatory (
    xml::Parser parser,
    DesignSource * ds
) 

function setCircleSource

void rayx::setCircleSource (
    xml::Parser parser,
    DesignSource * ds
) 

function setDebugVerbose

void RAYX_API rayx::setDebugVerbose (
    bool
) 

function setDefaultEnergy

void rayx::setDefaultEnergy (
    xml::Parser parser,
    DesignSource * ds
) 

function setDefaultOrientation

void rayx::setDefaultOrientation (
    xml::Parser parser,
    DesignSource * ds
) 

function setDefaultPosition

void rayx::setDefaultPosition (
    xml::Parser parser,
    DesignSource * ds
) 

function setDipoleSource

void rayx::setDipoleSource (
    xml::Parser parser,
    DesignSource * ds
) 

function setMatrixSource

void rayx::setMatrixSource (
    xml::Parser parser,
    DesignSource * ds
) 

function setPixelSource

void rayx::setPixelSource (
    xml::Parser parser,
    DesignSource * ds
) 

function setPointSource

void rayx::setPointSource (
    xml::Parser parser,
    DesignSource * ds
) 

function setSimpleUndulatorSource

void rayx::setSimpleUndulatorSource (
    xml::Parser parser,
    DesignSource * ds
) 

function setStokes

void rayx::setStokes (
    xml::Parser parser,
    DesignSource * ds
) 

function sphericalCoordsToDirection

RAYX_FN_ACC void RAYX_API rayx::sphericalCoordsToDirection (
    double phi,
    double psi,
    glm::dvec3 & out_direction
) 

function squares64

RAYX_FN_ACC RandCounter RAYX_API rayx::squares64 (
    RandCounter & ctr
) 

function squaresDoubleRNG

RAYX_FN_ACC double RAYX_API rayx::squaresDoubleRNG (
    RandCounter & ctr
) 

function squaresNormalRNG

RAYX_FN_ACC double RAYX_API rayx::squaresNormalRNG (
    RandCounter & ctr,
    double mu,
    double sigma
) 

function stokesToElectricField

inline RAYX_FN_ACC ElectricField rayx::stokesToElectricField (
    const Stokes stokes,
    const glm::dvec3 forward,
    const glm::dvec3 up
) 

function stokesToElectricField

inline RAYX_FN_ACC ElectricField rayx::stokesToElectricField (
    const Stokes stokes,
    const glm::dmat3 rotation
) 

function stokesToElectricFieldWithBaseConvention

inline RAYX_FN_ACC ElectricField rayx::stokesToElectricFieldWithBaseConvention (
    const Stokes stokes,
    const glm::dvec3 forward
) 

function stokesToLocalElectricField

inline RAYX_FN_ACC LocalElectricField rayx::stokesToLocalElectricField (
    const Stokes stokes
) 

function storeRay

inline RAYX_FN_ACC void rayx::storeRay (
    const int i,
    RaysPtr &__restrict rays,
    const detail::Ray &__restrict ray
) 

function storeRay

inline RAYX_FN_ACC bool rayx::storeRay (
    const int i,
    bool *__restrict storedFlags,
    RaysPtr &__restrict rays,
    detail::Ray &__restrict ray,
    const bool *__restrict objectRecordMask,
    const int objectIndex,
    const RayAttrMask attrRecordMask
) 

function streamEnum

template<typename Enum>
std::ostream & rayx::streamEnum (
    std::ostream & os,
    const Enum value,
    const std::map< Enum, std::string > & toStringMap
) 

function terminateRay

inline RAYX_FN_ACC void rayx::terminateRay (
    EventType &__restrict dstEventType,
    const EventType srcEventType
) 

function to_string

RAYX_API std::string rayx::to_string (
    const RayAttrMask attr
) 

function traceNonSequential

RAYX_FN_ACC void rayx::traceNonSequential (
    const int gid,
    const ConstState &__restrict constState,
    MutableState &__restrict mutableState
) 

function traceSequential

RAYX_FN_ACC void rayx::traceSequential (
    const int gid,
    const ConstState &__restrict constState,
    MutableState &__restrict mutableState
) 

function vlsGrating

RAYX_FN_ACC double RAYX_API rayx::vlsGrating (
    double lineDensity,
    glm::dvec3 normal,
    double z,
    const double vls
) 

variable line spacing for gratings @params lineDensity: general line density? z: z-coordinate of ray position vls[6]: 6 vls parameters given by user

Returns:

line density specifically for this z-coordinate


function waveLengthToEnergy

inline RAYX_FN_ACC double rayx::waveLengthToEnergy (
    const double waveLength
) 

Convert photon wavelength (nm) to energy (eV)

Parameters:

  • wavelength of photon in nm. must not be 0

Returns:

energy energy of a photon in eV


function writeCsv

void RAYX_API rayx::writeCsv (
    const std::filesystem::path & filepath,
    const Rays & rays
) 

function writeFile

void RAYX_API rayx::writeFile (
    const std::vector< uint8_t > & data,
    const std::string & filename,
    const uint32_t count=0
) 

function writeH5

RAYX_API void rayx::writeH5 (
    const std::filesystem::path & filepath,
    const std::vector< std::string > & object_names,
    const Rays & rays,
    const RayAttrMask attr=RayAttrMask::All,
    const bool overwrite=true
) 


The documentation for this class was generated from the following file Intern/rayx-core/src/Angle.h