Namespace 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 the copy() 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¶
Public Attributes¶
| Type | Name |
|---|---|
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | All = (1 << 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 << 5 |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | DirectionY = 1 << 6 |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | DirectionZ = 1 << 7 |
| double | ELECTRIC_PERMITIVITY_MULTIPLIES_SPEED_OF_LIGHT = 2.6544187279929558624e-3electric permitivity multiplied by speed of light |
| double | ELECTRIC_PERMITTIVITY = 8.8541878128e-12\(\epsilon_0\) [As/Vm]. vacuum electric permittivity. |
| double | ELECTRON_MASS = 9.1093837015e-31m_e [kg]. electron mass. |
| double | ELECTRON_RADIUS = 2.8179403205e-6 |
| double | ELECTRON_VOLT = 1.602176634e-19eV_J ElectronVolt to Joule. |
| double | ELEMENTARY_CHARGE = 1.602176634e-19e_0 [As]. elementary charge. |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | ElectricFieldX = 1 << 8 |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | ElectricFieldY = 1 << 9 |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | ElectricFieldZ = 1 << 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 << 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 << 16 |
| const std::map< EventType, std::string > | EventTypeToString = /* multi line expression */ |
| double | FACTOR_ELECTRON_ENERGY_SC = 1957RAY-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.841984332002622inverse 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 << 14 |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | OpticalPathLength = 1 << 11 |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | Order = 1 << 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 << 1 |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | Position = PositionX \| PositionY \| PositionZ |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | PositionX = 1 << 2 |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | PositionY = 1 << 3 |
| RAYX_X_MACRO_RAY_ATTR enum RAYX_API | PositionZ = 1 << 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 = 299792458c_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 << 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¶
enum BehaveType¶
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 CentralBeamstop¶
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 CylinderDirection¶
typedef DesignObject¶
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¶
typedef ElectricField¶
enum ElectronEnergyOrientation¶
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¶
typedef EnergyDistributionVariant¶
using rayx::EnergyDistributionVariant = std::variant<DatFile, HardEdge, SoftEdge, SeparateEnergies>;
enum EnergySpreadUnit¶
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 GratingMount¶
typedef LocalElectricField¶
typedef Map¶
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¶
typedef OptCollisionPoint¶
typedef OptCollisionWithElement¶
enum ParaboloidType¶
enum RZPType¶
typedef RandCounter¶
Internal type for the random counter-based RNG.
enum Sequential¶
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 SourceDist¶
enum SourcePulseType¶
enum SpreadType¶
typedef Stokes¶
typedef Surface¶
using rayx::Surface = Variant<detail::SurfaceTypes, detail::SurfaceTypes::Plane, detail::SurfaceTypes::Quadric, detail::SurfaceTypes::Toroid,
detail::SurfaceTypes::Cubic>;
enum SurfaceCoatingType¶
enum ToroidType¶
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¶
typedef cvec2¶
typedef cvec3¶
Public Attributes Documentation¶
variable All¶
variable BENCH_FLAG¶
variable BehaviourTypeToString¶
variable CentralBeamstopToString¶
variable CurvatureTypeToString¶
variable CutoutTypeToString¶
variable DEFAULT_BATCH_SIZE¶
variable Direction¶
variable DirectionX¶
variable DirectionY¶
variable DirectionZ¶
variable ELECTRIC_PERMITIVITY_MULTIPLIES_SPEED_OF_LIGHT¶
electric permitivity multiplied by speed of light
variable ELECTRIC_PERMITTIVITY¶
\(\epsilon_0\) [As/Vm]. vacuum electric permittivity.
variable ELECTRON_MASS¶
m_e [kg]. electron mass.
variable ELECTRON_RADIUS¶
variable ELECTRON_VOLT¶
eV_J ElectronVolt to Joule.
variable ELEMENTARY_CHARGE¶
e_0 [As]. elementary charge.
variable ElectricFieldX¶
variable ElectricFieldY¶
variable ElectricFieldZ¶
variable ElectronEnergyOrientationToString¶
variable ElementTypeToString¶
variable Energy¶
variable EnergyDistributionTypeToString¶
variable EnergySpreadUnitToString¶
variable EventType¶
variable EventTypeToString¶
variable FACTOR_ELECTRON_ENERGY_SC¶
RAY-UI shortcut for getFactorElectronEnergy.
variable FACTOR_SCHWINGER_RAY¶
\(G\) [?]. RAY's factor appearing in Schwinger equation context
variable FINE_STRUCTURE_CONSTANT¶
variable FIXED_SEED¶
variable FigureRotationToString¶
variable GratingMountToString¶
variable INV_NM_TO_EVOLT¶
inverse nanometer-electron volt relationship / reziprocal factor
variable IT_ASTIGMATIC2ASTIGMATIC¶
variable IT_POINT2HORIZONTAL_DIVERGENT_LINE¶
variable IT_POINT2HORIZONTAL_LINE¶
variable IT_POINT2POINT¶
variable MaterialToString¶
variable None¶
variable ObjectId¶
variable OpticalPathLength¶
variable Order¶
variable PI¶
variable PLANCK¶
variable PLANCK_BAR¶
\(\hbar\) [Js]. Planck's bar constant.
variable ParaboloidTypeToString¶
variable PathEventId¶
variable Position¶
variable PositionX¶
variable PositionY¶
variable PositionZ¶
variable 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.
variable RayAttrMaskCount¶
variable SPEED_OF_LIGHT¶
c_0 [m/s]. speed of light in vacuum.
variable SigmaTypeToString¶
variable SourceDistToString¶
variable SourceId¶
variable SpreadTypeToString¶
variable StringToBehaviourType¶
variable StringToCentralBeamstop¶
variable StringToCurvatureType¶
variable StringToCutoutType¶
variable StringToElectronEnergyOrientation¶
variable StringToElementType¶
variable StringToEnergyDistributionType¶
variable StringToEnergySpreadUnit¶
variable StringToEventType¶
variable StringToFigureRotation¶
variable StringToGratingMount¶
variable StringToMaterial¶
variable StringToParaboloidType¶
variable StringToRZPType¶
variable StringToSigmaType¶
variable StringToSourceDist¶
variable StringToSpreadType¶
variable 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:
fieldElectric field of incident photonwaveLengthWavelength of incident photon (in nanometers)opticalPathLengthOptical 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
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¶
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¶
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¶
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¶
function calcJonesMatrix¶
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¶
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¶
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:
thetaAngle of incidence relative to the crystal surface (radians)braggBragg angle (radians)asymmetryAsymmetry factorstructureFactorReFHReal part of structure factorstructureFactorImFHImaginary part of structure factorstructureFactorReFHCReal part of structure factorstructureFactorImFHCImaginary part of structure factorstructureFactorReF0Real part of structure factorstructureFactorImF0Imaginary part of structure factorpolFactorPolarization factorgammaDiffraction 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:
etaComplex deviation parameterstructureFactorReFHReal part of structure factorstructureFactorImFHImaginary part of structure factorstructureFactorReFHCReal part of structure factorstructureFactorImFHCImaginary 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:
wavelengthWavelength of light in nanometers.thicknessThickness of the film in nanometers.n0Complex refractive index of the incident medium (vakuum).n1Complex refractive index of the film layer.incidentAngleRadAngle 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:
haystackThe RayAttrMask to check.needleThe 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.
Parameters:
maskThe 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¶
function dbg¶
void rayx::dbg (
const std::string & filename,
int line,
std::string name,
std::vector< double > v
)
function defaultMaxEvents¶
function degreeOfPolarization¶
function dipoleBessel¶
function directionToSphericalCoords¶
RAYX_FN_ACC void RAYX_API rayx::directionToSphericalCoords (
glm::dvec3 direction,
double & out_phi,
double & out_psi
)
function dpow¶
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¶
converts energy (eV) to wavelength (nm)
Parameters:
energyenergy of a photon in eV. must not be 0
Returns:
wavelength of photon in nm
function eventTypeToMask¶
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¶
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¶
function formatAsVec¶
function formatAsVec¶
function formatAsVec¶
function formatAsVec¶
function formatAsVec¶
function formatAsVec¶
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¶
function formatAsVec¶
function formatAsVec< double >¶
template<>
inline std::vector< double > rayx::formatAsVec< double > (
const std::vector< double > arg
)
function forwardVectorToBaseConvention¶
function fraun_diff¶
calculates fraunhofer diffraction effects on rectangular slits
Parameters:
dimdimension (x or y) (mm)wlwavelength (nm)dAnglediffraction angle (inout)
Returns:
result stored in dAngle
function getAsymmetryFactor¶
Computes the asymmetry factor b from the Bragg angle and surface tilt angle.
Parameters:
braggAngleBragg angle θ_B (in radians)alphaTilt between surface and diffraction planes α (in radians) (offset Angle)
Returns:
Asymmetry factor b (dimensionless)
function getAtomicMassAndRho¶
function getBlockSize¶
function getBraggAngle¶
Computes the bragg angle.
Parameters:
energyphotonenergy of the raydlattice spacing*2orderDiffraction order
Returns:
the bragg angle theta (rad)
function getCone¶
function getCrystal¶
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¶
function 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:
wavelengthX-ray wavelength (in nm)unitCellVolumeUnit cell volume (in nm³)
Returns:
Diffraction prefactor Γ
function getDipoleInterpolation¶
function getEllipsoid¶
function getExpertsCubic¶
function getExpertsOptics¶
function getFoil¶
function getGrating¶
function getImageplane¶
function getNffEntry¶
RAYX_FN_ACC NffEntry RAYX_API rayx::getNffEntry (
int index,
int material,
const int * materialIndices,
const double * materialTable
)
function getNffEntryCount¶
function getPalikEntry¶
RAYX_FN_ACC PalikEntry RAYX_API rayx::getPalikEntry (
int index,
int material,
const int * materialIndices,
const double * materialTable
)
function getPalikEntryCount¶
function getParaboloid¶
function getPlaneGrating¶
function getPlaneMirror¶
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¶
function getRayAttrNames¶
Get a list of all possible ray attribute names.
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¶
function getSphereGrating¶
function getSphereMirror¶
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¶
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¶
function getToroidalGrating¶
function getWorkDivForAcc¶
function get_factorCriticalEnergy¶
function get_factorElectronEnergy¶
function 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¶
function inCutout¶
function intensity¶
function intensity¶
function intensity¶
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).
Parameters:
attrThe RayAttrMask to check.
Returns:
True if the RayAttrMask represents a single attribute, false otherwise.
function isRayTerminated¶
function keyCutoutPoints¶
function loadMaterialTables¶
function loadRay¶
function localElectricFieldToStokes¶
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¶
function makeCone¶
function makeCrystal¶
function makeCubic¶
function makeCylinder¶
function makeElement¶
OpticalElementAndTransform rayx::makeElement (
const DesignElement & dele,
Behaviour behaviour,
Surface surface,
DesignPlane plane=DesignPlane::XZ,
std::optional< Cutout > cutout={}
)
function makeEllipsoid¶
function makeFoil¶
function makeGrating¶
function makeParaboloid¶
function makePlane¶
function makeQuadric¶
function makeRZPBehaviour¶
function makeSlit¶
function makeSphere¶
function makeSurface¶
function makeToroid¶
function materialFromString¶
returns whether a Material with the name matname has been found. it will be stored in out.
function nextMultiple¶
function nextPowerOfTwo¶
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!¶
function operator!¶
function operator!=¶
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<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
function operator<<¶
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==¶
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~¶
function operator~¶
function randomDouble¶
function randomDoubleInRange¶
function randomIntInRange¶
function randomNormal¶
function randomSeed¶
function 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:
stringsA 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¶
function readCsv¶
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¶
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¶
function schwinger¶
calculate probability for chosen energy with edge-cases according to H.Wiedemann Synchrotron Radiation P. 259 (D.21)
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¶
function setAllMandatory¶
function setCircleSource¶
function setDebugVerbose¶
function setDefaultEnergy¶
function setDefaultOrientation¶
function setDefaultPosition¶
function setDipoleSource¶
function setMatrixSource¶
function setPixelSource¶
function setPointSource¶
function setSimpleUndulatorSource¶
function setStokes¶
function sphericalCoordsToDirection¶
RAYX_FN_ACC void RAYX_API rayx::sphericalCoordsToDirection (
double phi,
double psi,
glm::dvec3 & out_direction
)
function squares64¶
function squaresDoubleRNG¶
function squaresNormalRNG¶
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¶
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¶
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¶
Convert photon wavelength (nm) to energy (eV)
Parameters:
wavelengthof photon in nm. must not be 0
Returns:
energy energy of a photon in eV
function writeCsv¶
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