@@ -8,13 +8,13 @@ namespace RAYX {
88// Thus, when you want to get some concrete palik entry for a particular element, you need the materialIndices table to "know where to look" in
99// materialTable:
1010// * materialIndices[i] is the beginning of the Palik Table in materialTable for the element with atomic number i+1, for i in [0, 91].
11- // * materialIndices[i+92 ] is the beginning of the Nff Table in materialTable for the element with atomic number i+1, for i in [0, 91].
11+ // * materialIndices[i+99 ] is the beginning of the Nff Table in materialTable for the element with atomic number i+1, for i in [0, 91].
1212// The `i+1` is necessary as atomic numbers start at 1 (Hydrogen), while array indices start at 0.
1313// See InvocationState.cpp for more information about these tables.
1414
15- // If you will, the materialTable table is a "sparse" 4d-datastructure of shape (2, 92 , N, 3).
15+ // If you will, the materialTable table is a "sparse" 4d-datastructure of shape (2, 99 , N, 3).
1616// - 2 because we store a Palik-table, and an Nff-table
17- // - 92 , because we support 92 elements of the periodic table (from Hydrogen to Uranium)
17+ // - 99 , because we support 99 elements of the periodic table (from Hydrogen to Uranium)
1818// - N is the number of entries in a given Palik/Nff table (this number depends on the periodic element)
1919// - 3 because each Palik / Nff entry consists of three doubles.
2020// - It is a "sparse" data structure as most of the entries are actually missing, we only load the actually "used" materials into the shader, not all
@@ -38,9 +38,9 @@ int RAYX_API getPalikEntryCount(const int material, const int* materialIndices)
3838RAYX_FN_ACC
3939int RAYX_API getNffEntryCount (const int material, const int * materialIndices) {
4040 int m = material - 1 ; // in [0, 91]
41- // the offset of 92 (== number of materials), skips the palik table and
41+ // the offset of 99 (== number of materials), skips the palik table and
4242 // reaches into the nff table. the rest of the logic is as above.
43- return (materialIndices[92 + m + 1 ] - materialIndices[92 + m]) / 3 ;
43+ return (materialIndices[99 + m + 1 ] - materialIndices[99 + m]) / 3 ;
4444
4545}
4646
@@ -72,9 +72,9 @@ PalikEntry RAYX_API getPalikEntry(int index, int material, const int* __restrict
7272RAYX_FN_ACC
7373NffEntry RAYX_API getNffEntry (int index, int material, const int * __restrict materialIndices, const double * __restrict materialTable) {
7474 int m = material - 1 ; // in [0, 91]
75- // materialIndices[92 +m] is the start of the Nff table of material m.
75+ // materialIndices[99 +m] is the start of the Nff table of material m.
7676 // 3*index skips 'index'-many entries.
77- int i = materialIndices[92 + m] + 3 * index;
77+ int i = materialIndices[99 + m] + 3 * index;
7878
7979 NffEntry e;
8080 e.m_energy = materialTable[i];
@@ -108,7 +108,7 @@ complex::Complex RAYX_API getRefractiveIndex(double energy, int material, const
108108 }
109109
110110 // out of range check
111- if (material < 1 || material > 92 ) {
111+ if (material < 1 || material > 99 ) {
112112 _throw (" getRefractiveIndex material out of range!" );
113113 return complex::Complex (-1.0 , -1.0 );
114114 }
0 commit comments