symcrys 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/cell.d.ts +19 -16
- package/dist/cell.d.ts.map +1 -1
- package/dist/cell.js +63 -35
- package/dist/cell.js.map +1 -1
- package/dist/checks.d.ts +29 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +79 -0
- package/dist/checks.js.map +1 -0
- package/dist/closure.d.ts +43 -0
- package/dist/closure.d.ts.map +1 -0
- package/dist/closure.js +201 -0
- package/dist/closure.js.map +1 -0
- package/dist/crystalClasses.d.ts +145 -117
- package/dist/crystalClasses.d.ts.map +1 -1
- package/dist/crystalClasses.js +161 -121
- package/dist/crystalClasses.js.map +1 -1
- package/dist/freeze.d.ts +7 -0
- package/dist/freeze.d.ts.map +1 -0
- package/dist/freeze.js +15 -0
- package/dist/freeze.js.map +1 -0
- package/dist/index.d.ts +11 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/indices.d.ts +31 -5
- package/dist/indices.d.ts.map +1 -1
- package/dist/indices.js +104 -13
- package/dist/indices.js.map +1 -1
- package/dist/lattice.d.ts +15 -1
- package/dist/lattice.d.ts.map +1 -1
- package/dist/lattice.js +30 -1
- package/dist/lattice.js.map +1 -1
- package/dist/linalg.d.ts +2 -2
- package/dist/linalg.d.ts.map +1 -1
- package/dist/linalg.js +3 -3
- package/dist/linalg.js.map +1 -1
- package/dist/magnetic.d.ts +12 -10
- package/dist/magnetic.d.ts.map +1 -1
- package/dist/magnetic.js +8 -6
- package/dist/magnetic.js.map +1 -1
- package/dist/notation.d.ts +16 -0
- package/dist/notation.d.ts.map +1 -0
- package/dist/notation.js +66 -0
- package/dist/notation.js.map +1 -0
- package/dist/operations.d.ts +40 -26
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +48 -60
- package/dist/operations.js.map +1 -1
- package/dist/plane.d.ts +141 -79
- package/dist/plane.d.ts.map +1 -1
- package/dist/plane.js +147 -77
- package/dist/plane.js.map +1 -1
- package/dist/pointGroups/crystalForms.d.ts +6 -21
- package/dist/pointGroups/crystalForms.d.ts.map +1 -1
- package/dist/pointGroups/crystalForms.js +9 -16
- package/dist/pointGroups/crystalForms.js.map +1 -1
- package/dist/pointGroups/crystalFormsData.d.ts +4 -1
- package/dist/pointGroups/crystalFormsData.d.ts.map +1 -1
- package/dist/pointGroups/crystalFormsData.js +64 -1
- package/dist/pointGroups/crystalFormsData.js.map +1 -1
- package/dist/pointGroups/elements.d.ts +19 -17
- package/dist/pointGroups/elements.d.ts.map +1 -1
- package/dist/pointGroups/elements.js +65 -83
- package/dist/pointGroups/elements.js.map +1 -1
- package/dist/pointGroups/identify.d.ts +10 -18
- package/dist/pointGroups/identify.d.ts.map +1 -1
- package/dist/pointGroups/identify.js +27 -79
- package/dist/pointGroups/identify.js.map +1 -1
- package/dist/pointGroups/itaOrder.d.ts +15 -14
- package/dist/pointGroups/itaOrder.d.ts.map +1 -1
- package/dist/pointGroups/itaOrder.js +116 -94
- package/dist/pointGroups/itaOrder.js.map +1 -1
- package/dist/pointGroups/itcData.d.ts +96 -0
- package/dist/pointGroups/itcData.d.ts.map +1 -0
- package/dist/pointGroups/itcData.js +336 -0
- package/dist/pointGroups/itcData.js.map +1 -0
- package/dist/pointGroups/itcMagneticData.d.ts +55 -0
- package/dist/pointGroups/itcMagneticData.d.ts.map +1 -0
- package/dist/pointGroups/itcMagneticData.js +172 -0
- package/dist/pointGroups/itcMagneticData.js.map +1 -0
- package/dist/pointGroups/keys.d.ts +32 -0
- package/dist/pointGroups/keys.d.ts.map +1 -0
- package/dist/pointGroups/keys.js +120 -0
- package/dist/pointGroups/keys.js.map +1 -0
- package/dist/pointGroups/magneticSymbols.d.ts +6 -5
- package/dist/pointGroups/magneticSymbols.d.ts.map +1 -1
- package/dist/pointGroups/magneticSymbols.js +15 -12
- package/dist/pointGroups/magneticSymbols.js.map +1 -1
- package/dist/pointGroups/orbits.d.ts +23 -42
- package/dist/pointGroups/orbits.d.ts.map +1 -1
- package/dist/pointGroups/orbits.js +20 -62
- package/dist/pointGroups/orbits.js.map +1 -1
- package/dist/pointGroups/pointGroups.d.ts +135 -67
- package/dist/pointGroups/pointGroups.d.ts.map +1 -1
- package/dist/pointGroups/pointGroups.js +409 -244
- package/dist/pointGroups/pointGroups.js.map +1 -1
- package/dist/pointGroups/properties.d.ts +21 -22
- package/dist/pointGroups/properties.d.ts.map +1 -1
- package/dist/pointGroups/properties.js +40 -37
- package/dist/pointGroups/properties.js.map +1 -1
- package/dist/pointGroups/seitzData.d.ts +26 -0
- package/dist/pointGroups/seitzData.d.ts.map +1 -0
- package/dist/pointGroups/seitzData.js +130 -0
- package/dist/pointGroups/seitzData.js.map +1 -0
- package/dist/pointGroups/wyckoff.d.ts +70 -40
- package/dist/pointGroups/wyckoff.d.ts.map +1 -1
- package/dist/pointGroups/wyckoff.js +98 -91
- package/dist/pointGroups/wyckoff.js.map +1 -1
- package/dist/pointGroups/wyckoffData.d.ts +7 -4
- package/dist/pointGroups/wyckoffData.d.ts.map +1 -1
- package/dist/pointGroups/wyckoffData.js +789 -168
- package/dist/pointGroups/wyckoffData.js.map +1 -1
- package/dist/siteSymmetry.d.ts +8 -16
- package/dist/siteSymmetry.d.ts.map +1 -1
- package/dist/siteSymmetry.js +34 -24
- package/dist/siteSymmetry.js.map +1 -1
- package/dist/spaceGroups/affine.d.ts.map +1 -1
- package/dist/spaceGroups/affine.js +3 -2
- package/dist/spaceGroups/affine.js.map +1 -1
- package/dist/spaceGroups/cell.d.ts +43 -31
- package/dist/spaceGroups/cell.d.ts.map +1 -1
- package/dist/spaceGroups/cell.js +173 -85
- package/dist/spaceGroups/cell.js.map +1 -1
- package/dist/spaceGroups/describe.d.ts +12 -10
- package/dist/spaceGroups/describe.d.ts.map +1 -1
- package/dist/spaceGroups/describe.js +11 -10
- package/dist/spaceGroups/describe.js.map +1 -1
- package/dist/spaceGroups/planeGroupData.d.ts +1 -1
- package/dist/spaceGroups/planeGroupData.d.ts.map +1 -1
- package/dist/spaceGroups/planeGroupData.js +8 -8
- package/dist/spaceGroups/planeGroupData.js.map +1 -1
- package/dist/spaceGroups/planeGroups.d.ts.map +1 -1
- package/dist/spaceGroups/planeGroups.js +2 -1
- package/dist/spaceGroups/planeGroups.js.map +1 -1
- package/dist/spaceGroups/positions.d.ts +48 -19
- package/dist/spaceGroups/positions.d.ts.map +1 -1
- package/dist/spaceGroups/positions.js +166 -67
- package/dist/spaceGroups/positions.js.map +1 -1
- package/dist/tensors/propertyTable.d.ts +3 -1
- package/dist/tensors/propertyTable.d.ts.map +1 -1
- package/dist/tensors/propertyTable.js +17 -10
- package/dist/tensors/propertyTable.js.map +1 -1
- package/dist/tensors/rowEchelon.d.ts +3 -3
- package/dist/tensors/rowEchelon.d.ts.map +1 -1
- package/dist/tensors/rowEchelon.js +4 -4
- package/dist/tensors/rowEchelon.js.map +1 -1
- package/dist/tensors/tensorForm.d.ts +75 -34
- package/dist/tensors/tensorForm.d.ts.map +1 -1
- package/dist/tensors/tensorForm.js +171 -67
- package/dist/tensors/tensorForm.js.map +1 -1
- package/dist/tensors/tensorProperties.d.ts +10 -9
- package/dist/tensors/tensorProperties.d.ts.map +1 -1
- package/dist/tensors/tensorProperties.js +22 -12
- package/dist/tensors/tensorProperties.js.map +1 -1
- package/dist/tolerances.d.ts +56 -1
- package/dist/tolerances.d.ts.map +1 -1
- package/dist/tolerances.js +51 -1
- package/dist/tolerances.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/cell.ts +78 -51
- package/src/checks.ts +84 -0
- package/src/closure.ts +214 -0
- package/src/crystalClasses.ts +232 -157
- package/src/freeze.ts +14 -0
- package/src/index.ts +21 -10
- package/src/indices.ts +108 -18
- package/src/lattice.ts +41 -1
- package/src/linalg.ts +3 -3
- package/src/magnetic.ts +14 -9
- package/src/notation.ts +73 -0
- package/src/operations.ts +78 -71
- package/src/plane.ts +253 -127
- package/src/pointGroups/crystalForms.ts +11 -44
- package/src/pointGroups/crystalFormsData.ts +66 -1
- package/src/pointGroups/elements.ts +82 -92
- package/src/pointGroups/identify.ts +38 -97
- package/src/pointGroups/itaOrder.ts +117 -101
- package/src/pointGroups/itcData.ts +404 -0
- package/src/pointGroups/itcMagneticData.ts +206 -0
- package/src/pointGroups/keys.ts +144 -0
- package/src/pointGroups/magneticSymbols.ts +18 -17
- package/src/pointGroups/orbits.ts +41 -89
- package/src/pointGroups/pointGroups.ts +540 -297
- package/src/pointGroups/properties.ts +44 -40
- package/src/pointGroups/seitzData.ts +147 -0
- package/src/pointGroups/wyckoff.ts +137 -112
- package/src/pointGroups/wyckoffData.ts +793 -170
- package/src/siteSymmetry.ts +43 -40
- package/src/spaceGroups/affine.ts +3 -2
- package/src/spaceGroups/cell.ts +227 -116
- package/src/spaceGroups/describe.ts +22 -19
- package/src/spaceGroups/planeGroupData.ts +9 -9
- package/src/spaceGroups/planeGroups.ts +2 -1
- package/src/spaceGroups/positions.ts +202 -78
- package/src/tensors/propertyTable.ts +26 -14
- package/src/tensors/rowEchelon.ts +4 -3
- package/src/tensors/tensorForm.ts +258 -88
- package/src/tensors/tensorProperties.ts +34 -14
- package/src/tolerances.ts +66 -1
- package/src/version.ts +1 -1
- package/dist/pointGroups/data.d.ts +0 -75
- package/dist/pointGroups/data.d.ts.map +0 -1
- package/dist/pointGroups/data.js +0 -212
- package/dist/pointGroups/data.js.map +0 -1
- package/dist/pointGroups/magneticData.d.ts +0 -66
- package/dist/pointGroups/magneticData.d.ts.map +0 -1
- package/dist/pointGroups/magneticData.js +0 -184
- package/dist/pointGroups/magneticData.js.map +0 -1
- package/dist/spaceGroups/snap.d.ts +0 -20
- package/dist/spaceGroups/snap.d.ts.map +0 -1
- package/dist/spaceGroups/snap.js +0 -103
- package/dist/spaceGroups/snap.js.map +0 -1
- package/src/pointGroups/data.ts +0 -305
- package/src/pointGroups/magneticData.ts +0 -328
- package/src/spaceGroups/snap.ts +0 -121
|
@@ -23,7 +23,7 @@ export interface TensorProperty {
|
|
|
23
23
|
export declare const TENSOR_PROPERTIES: Readonly<{
|
|
24
24
|
/** Spontaneous polarization: a time-even polar vector. */
|
|
25
25
|
pyroelectric: TensorProperty;
|
|
26
|
-
/** Ferroaxial order: a time-even axial vector. */
|
|
26
|
+
/** Ferroaxial order: a time-even axial vector (not a term of ITC). */
|
|
27
27
|
ferroaxial: TensorProperty;
|
|
28
28
|
/** The piezoelectric effect (and second-harmonic generation, which has the same tensor): polar, rank 3, symmetric in j, k. */
|
|
29
29
|
piezoelectric: TensorProperty;
|
|
@@ -31,6 +31,8 @@ export declare const TENSOR_PROPERTIES: Readonly<{
|
|
|
31
31
|
gyrotropic: TensorProperty;
|
|
32
32
|
/** Spontaneous magnetization: a time-odd axial vector (magnetic API only). */
|
|
33
33
|
ferromagnetic: TensorProperty;
|
|
34
|
+
/** A spontaneous toroidal moment: a time-odd polar vector (magnetic API only). */
|
|
35
|
+
ferrotoroidic: TensorProperty;
|
|
34
36
|
/** The linear magnetoelectric effect: a time-odd axial tensor of rank 2 (magnetic API only). */
|
|
35
37
|
magnetoelectric: TensorProperty;
|
|
36
38
|
/** The piezomagnetic effect: a time-odd axial tensor of rank 3, symmetric in j, k (magnetic API only). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propertyTable.d.ts","sourceRoot":"","sources":["../../src/tensors/propertyTable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"propertyTable.d.ts","sourceRoot":"","sources":["../../src/tensors/propertyTable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,0FAA0F;AAC1F,MAAM,WAAW,cAAc;IAC7B,iFAAiF;IACjF,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,gDAAgD;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAKD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;IAC5B,0DAA0D;;IAM1D,sEAAsE;;IAMtE,8HAA8H;;IAM9H,8DAA8D;;IAM9D,8EAA8E;;IAM9E,kFAAkF;;IAMlF,gGAAgG;;IAMhG,0GAA0G;;EAMjE,CAAC;AAE5C,wDAAwD;AACxD,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAEhE,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,EAAoD,SAAS,kBAAkB,EAAE,CAAC;AAEpH,sFAAsF;AACtF,wBAAgB,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,kBAAkB,GAAG,UAAU,CAa9E"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* (`TensorSpec`) and the print source of that definition. `allowsProperty` and `tensorForm` look a
|
|
5
5
|
* name up here (docs/conventions.md, "Named tensor properties").
|
|
6
6
|
*/
|
|
7
|
+
import { shown } from '../checks.js';
|
|
7
8
|
const property = (spec, description, source) => Object.freeze({ spec: Object.freeze(spec), description, source });
|
|
8
9
|
/**
|
|
9
10
|
* The named tensor properties. For each name, the tensor that describes the property, what it is,
|
|
@@ -13,28 +14,34 @@ const property = (spec, description, source) => Object.freeze({ spec: Object.fre
|
|
|
13
14
|
*/
|
|
14
15
|
export const TENSOR_PROPERTIES = Object.freeze({
|
|
15
16
|
/** Spontaneous polarization: a time-even polar vector. */
|
|
16
|
-
pyroelectric: property({ rank: 1,
|
|
17
|
-
/** Ferroaxial order: a time-even axial vector. */
|
|
18
|
-
ferroaxial: property({ rank: 1,
|
|
17
|
+
pyroelectric: property({ rank: 1, kind: 'polar', timeParity: 'even', intrinsic: 'none' }, 'Spontaneous electric polarization, which changes with temperature: a polar vector p_i.', 'ITC Vol. D (2013), § 1.1.4.4.2, p. 12; classes: ITA (2016) Table 3.2.2.1, p. 738'),
|
|
18
|
+
/** Ferroaxial order: a time-even axial vector (not a term of ITC). */
|
|
19
|
+
ferroaxial: property({ rank: 1, kind: 'axial', timeParity: 'even', intrinsic: 'none' }, 'Ferroaxial (ferro-rotational) order, e.g. a net rotation of structural units about an axis: an axial vector A_i, the axial toroidal moment (Jahn symbol eV).', 'Not in ITC: Hlinka, Privratska, Ondrejkovic & Janovec, Phys. Rev. Lett. 116, 177602 (2016); Gallego et al., Acta Cryst. A75, 438 (2019), p. 440 (axial toroidal moment, type eV); classes: Birss (1966), Tables 4a and 4c, pp. 56–58'),
|
|
19
20
|
/** The piezoelectric effect (and second-harmonic generation, which has the same tensor): polar, rank 3, symmetric in j, k. */
|
|
20
|
-
piezoelectric: property({ rank: 3,
|
|
21
|
+
piezoelectric: property({ rank: 3, kind: 'polar', timeParity: 'even', intrinsic: 'symmetric-last-pair' }, 'Electric polarization linear in stress, P_i = d_ijk T_jk: a polar tensor of rank 3, symmetric in j, k.', 'ITC Vol. D (2013), § 1.1.4.4.3, p. 12, and § 1.1.4.10.1, eqs. (1.1.4.5), (1.1.4.7), p. 24; classes: ITA (2016) Table 3.2.2.1, p. 738'),
|
|
21
22
|
/** Optical activity: the symmetric axial tensor of rank 2. */
|
|
22
|
-
gyrotropic: property({ rank: 2,
|
|
23
|
+
gyrotropic: property({ rank: 2, kind: 'axial', timeParity: 'even', intrinsic: 'symmetric-first-pair' }, 'Optical activity (optical rotation), G = g_ij α_i α_j: the symmetric part of the axial gyration tensor of rank 2.', 'ITC Vol. D (2013), § 1.1.4.10.7.2, p. 30; classes: ITA (2016) Table 3.2.2.1, p. 738'),
|
|
23
24
|
/** Spontaneous magnetization: a time-odd axial vector (magnetic API only). */
|
|
24
|
-
ferromagnetic: property({ rank: 1,
|
|
25
|
+
ferromagnetic: property({ rank: 1, kind: 'axial', timeParity: 'odd', intrinsic: 'none' }, 'Spontaneous magnetization M_s (ferromagnets, ferrimagnets, weak ferromagnets): an axial vector that changes sign under time reversal.', 'ITC Vol. D (2013), § 1.5.2.1 with Table 1.5.2.4, p. 113'),
|
|
26
|
+
/** A spontaneous toroidal moment: a time-odd polar vector (magnetic API only). */
|
|
27
|
+
ferrotoroidic: property({ rank: 1, kind: 'polar', timeParity: 'odd', intrinsic: 'none' }, 'Spontaneous toroidal moment T_i (ferrotoroidic order): a polar vector that changes sign under time reversal (Jahn symbol aV); allowed exactly where the magnetoelectric tensor need not be symmetric.', 'ITC Vol. D (2013), § 1.5.4.3, p. 128 (the term), and § 1.5.8.1, footnote 3, p. 140 (the 31 groups of Table 1.5.8.1 whose magnetoelectric tensor need not be symmetric); Gallego et al., Acta Cryst. A75, 438 (2019), p. 440 (polar toroidal moment, type aV)'),
|
|
25
28
|
/** The linear magnetoelectric effect: a time-odd axial tensor of rank 2 (magnetic API only). */
|
|
26
|
-
magnetoelectric: property({ rank: 2,
|
|
29
|
+
magnetoelectric: property({ rank: 2, kind: 'axial', timeParity: 'odd', intrinsic: 'none' }, 'Linear magnetoelectric effect, P_i = α_ij H_j: an axial tensor of rank 2 that changes sign under time reversal.', 'ITC Vol. D (2013), § 1.5.8, eqs. (1.5.8.2), (1.5.8.3), p. 139, and § 1.5.8.1 with Table 1.5.8.1, pp. 139–140'),
|
|
27
30
|
/** The piezomagnetic effect: a time-odd axial tensor of rank 3, symmetric in j, k (magnetic API only). */
|
|
28
|
-
piezomagnetic: property({ rank: 3,
|
|
31
|
+
piezomagnetic: property({ rank: 3, kind: 'axial', timeParity: 'odd', intrinsic: 'symmetric-last-pair' }, 'Magnetization linear in stress, M_i = Λ_ijk T_jk: an axial tensor of rank 3, symmetric in j, k, that changes sign under time reversal.', 'ITC Vol. D (2013), § 1.5.7, eq. (1.5.7.2), and § 1.5.7.1 with Table 1.5.7.1, pp. 134–135'),
|
|
29
32
|
});
|
|
30
33
|
/** The names of the tensor properties, in the order of `TENSOR_PROPERTIES`. */
|
|
31
34
|
export const TENSOR_PROPERTY_NAMES = Object.freeze(Object.keys(TENSOR_PROPERTIES));
|
|
32
35
|
/** The specification behind a property name; a specification is returned as it is. */
|
|
33
36
|
export function specOf(specOrName) {
|
|
34
|
-
if (typeof specOrName !== 'string')
|
|
37
|
+
if (typeof specOrName !== 'string') {
|
|
38
|
+
if (typeof specOrName !== 'object' || specOrName === null || Array.isArray(specOrName)) {
|
|
39
|
+
throw new RangeError(`A tensor is given by its specification { rank, kind, timeParity, intrinsic } or the name of a property, not ${shown(specOrName)}`);
|
|
40
|
+
}
|
|
35
41
|
return specOrName;
|
|
42
|
+
}
|
|
36
43
|
if (!Object.hasOwn(TENSOR_PROPERTIES, specOrName)) {
|
|
37
|
-
throw new RangeError(`Unknown tensor property: ${
|
|
44
|
+
throw new RangeError(`Unknown tensor property: ${shown(specOrName)} (known: ${TENSOR_PROPERTY_NAMES.join(', ')})`);
|
|
38
45
|
}
|
|
39
46
|
return TENSOR_PROPERTIES[specOrName].spec;
|
|
40
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propertyTable.js","sourceRoot":"","sources":["../../src/tensors/propertyTable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"propertyTable.js","sourceRoot":"","sources":["../../src/tensors/propertyTable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAarC,MAAM,QAAQ,GAAG,CAAC,IAAgB,EAAE,WAAmB,EAAE,MAAc,EAAkB,EAAE,CACzF,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,0DAA0D;IAC1D,YAAY,EAAE,QAAQ,CACpB,EAAE,IAAI,E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0GAA0G;IAC1G,aAAa,EAAE,QAAQ,CACrB,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,EAC/E,wIAAwI,EACxI,0FAA0F,CAC3F;CACuC,CAAC,CAAC;AAK5C,+EAA+E;AAC/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAkC,CAAC;AAEpH,sFAAsF;AACtF,MAAM,UAAU,MAAM,CAAC,UAA2C;IAChE,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YACvF,MAAM,IAAI,UAAU,CAClB,+GAA+G,KAAK,CAAC,UAAU,CAAC,EAAE,CACnI,CAAC;QACJ,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,UAAU,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,UAAU,CAAC,4BAA4B,KAAK,CAAC,UAAU,CAAC,YAAY,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrH,CAAC;IACD,OAAO,iBAAiB,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;AAC5C,CAAC"}
|
|
@@ -12,10 +12,10 @@ export declare const ELIMINATION_EPSILON = 1e-12;
|
|
|
12
12
|
* row's pivot, pivots ascending. The rows are unique for a given span, so the pivots name the free
|
|
13
13
|
* parameters unambiguously: each is the lowest-index component that is independent of the ones
|
|
14
14
|
* before it. For operations with float noise a row can keep entries too small to be a pivot
|
|
15
|
-
* (below `PIVOT_EPSILON`) before its pivot, so the pivots are returned rather
|
|
16
|
-
* rows (#88); entries below `ELIMINATION_EPSILON` are set to zero.
|
|
15
|
+
* (below `PIVOT_EPSILON`, or `pivotThreshold`) before its pivot, so the pivots are returned rather
|
|
16
|
+
* than read off the rows (#88); entries below `ELIMINATION_EPSILON` are set to zero.
|
|
17
17
|
*/
|
|
18
|
-
export declare function rowEchelonWithPivots(vectors: readonly (readonly number[])[], dim: number): {
|
|
18
|
+
export declare function rowEchelonWithPivots(vectors: readonly (readonly number[])[], dim: number, pivotThreshold?: number): {
|
|
19
19
|
rows: number[][];
|
|
20
20
|
pivots: number[];
|
|
21
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rowEchelon.d.ts","sourceRoot":"","sources":["../../src/tensors/rowEchelon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sGAAsG;AACtG,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,0FAA0F;AAC1F,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACvC,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"rowEchelon.d.ts","sourceRoot":"","sources":["../../src/tensors/rowEchelon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sGAAsG;AACtG,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,0FAA0F;AAC1F,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACvC,GAAG,EAAE,MAAM,EACX,cAAc,SAAgB,GAC7B;IAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CA2BxC;AAED,qHAAqH;AACrH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAElG;AAED,+EAA+E;AAC/E,wBAAgB,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjF"}
|
|
@@ -12,10 +12,10 @@ export const ELIMINATION_EPSILON = 1e-12;
|
|
|
12
12
|
* row's pivot, pivots ascending. The rows are unique for a given span, so the pivots name the free
|
|
13
13
|
* parameters unambiguously: each is the lowest-index component that is independent of the ones
|
|
14
14
|
* before it. For operations with float noise a row can keep entries too small to be a pivot
|
|
15
|
-
* (below `PIVOT_EPSILON`) before its pivot, so the pivots are returned rather
|
|
16
|
-
* rows (#88); entries below `ELIMINATION_EPSILON` are set to zero.
|
|
15
|
+
* (below `PIVOT_EPSILON`, or `pivotThreshold`) before its pivot, so the pivots are returned rather
|
|
16
|
+
* than read off the rows (#88); entries below `ELIMINATION_EPSILON` are set to zero.
|
|
17
17
|
*/
|
|
18
|
-
export function rowEchelonWithPivots(vectors, dim) {
|
|
18
|
+
export function rowEchelonWithPivots(vectors, dim, pivotThreshold = PIVOT_EPSILON) {
|
|
19
19
|
const m = vectors.map((v) => Array.from(v));
|
|
20
20
|
const pivots = [];
|
|
21
21
|
let row = 0;
|
|
@@ -24,7 +24,7 @@ export function rowEchelonWithPivots(vectors, dim) {
|
|
|
24
24
|
for (let r = row + 1; r < m.length; r++)
|
|
25
25
|
if (Math.abs(m[r][c]) > Math.abs(m[pivot][c]))
|
|
26
26
|
pivot = r;
|
|
27
|
-
if (Math.abs(m[pivot][c]) <
|
|
27
|
+
if (Math.abs(m[pivot][c]) < pivotThreshold)
|
|
28
28
|
continue;
|
|
29
29
|
[m[row], m[pivot]] = [m[pivot], m[row]];
|
|
30
30
|
const p = m[row][c];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rowEchelon.js","sourceRoot":"","sources":["../../src/tensors/rowEchelon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sGAAsG;AACtG,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAElC,0FAA0F;AAC1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAuC,EACvC,GAAW;
|
|
1
|
+
{"version":3,"file":"rowEchelon.js","sourceRoot":"","sources":["../../src/tensors/rowEchelon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sGAAsG;AACtG,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAElC,0FAA0F;AAC1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAuC,EACvC,GAAW,EACX,cAAc,GAAG,aAAa;IAE9B,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/C,IAAI,KAAK,GAAG,GAAG,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE;YAAE,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;g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AC,EAAE,EAAE;QACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7B,IAAI,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;gBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;iBACzB,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,mBAAmB;gBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAChF,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC;AAED,qHAAqH;AACrH,MAAM,UAAU,iBAAiB,CAAC,OAAuC,EAAE,GAAW;IACpF,OAAO,oBAAoB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,IAAI,CAAC,OAAuC,EAAE,GAAW;IACvE,OAAO,iBAAiB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC;AAChD,CAAC"}
|
|
@@ -10,86 +10,127 @@
|
|
|
10
10
|
* `tensorProjection.ts`, `linalg.ts`, revision 2be5fe3).
|
|
11
11
|
*/
|
|
12
12
|
import { type Mat3 } from '../linalg.js';
|
|
13
|
-
import { type
|
|
13
|
+
import { type CartesianOperation } from '../operations.js';
|
|
14
|
+
import { type IdealGroup } from '../closure.js';
|
|
14
15
|
import { type MagneticPointGroupKey, type SettingOptions } from '../pointGroups/pointGroups.js';
|
|
15
16
|
import { type TensorPropertyName } from './propertyTable.js';
|
|
17
|
+
import { type ToleranceOptions } from '../tolerances.js';
|
|
16
18
|
/** Rank of a tensor: 0 (scalar) to 4. */
|
|
17
19
|
export type TensorRank = 0 | 1 | 2 | 3 | 4;
|
|
18
|
-
/** `'polar'`: transforms with R; `'axial'`: with det(R)·R (pseudotensor). */
|
|
19
|
-
export type TensorParity = 'polar' | 'axial';
|
|
20
|
-
/** `'i'`: time-even (invariant under time reversal); `'c'`: time-odd (changes sign). */
|
|
21
|
-
export type TimeParity = 'i' | 'c';
|
|
22
20
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* each of the two pairs symmetric, the pairs not interchangeable (e.g. electric-quadrupole SHG,
|
|
27
|
-
* photoelasticity); `'voigt'` (rank 4): `'ij_kl'` and the pairs interchangeable (elastic
|
|
28
|
-
* stiffness). At rank 2, `'ij'` and `'jk'` both mean a symmetric tensor.
|
|
21
|
+
* How the tensor behaves under an improper operation: `'polar'` transforms with R, `'axial'` with
|
|
22
|
+
* det(R)·R (a pseudotensor; the prefix e of its Jahn symbol, e.g. eV for an axial vector). ITC calls the behaviour under inversion "parity", under which a polar
|
|
23
|
+
* vector is odd, so the field is named `kind`.
|
|
29
24
|
*/
|
|
30
|
-
export type
|
|
31
|
-
/**
|
|
25
|
+
export type TensorKind = 'polar' | 'axial';
|
|
26
|
+
/**
|
|
27
|
+
* How the tensor behaves under time reversal (ITC Vol. D: time-even, time-odd or
|
|
28
|
+
* time-antisymmetric): `'even'` unchanged, `'odd'` changes sign (the prefix a, "magnetic", of its
|
|
29
|
+
* Jahn symbol, e.g. aeV for the magnetization; Gallego et al. (2019), p. 439).
|
|
30
|
+
*/
|
|
31
|
+
export type TimeParity = 'even' | 'odd';
|
|
32
|
+
/**
|
|
33
|
+
* Symmetry of the tensor under permutation of its own indices, independent of the crystal, with its
|
|
34
|
+
* Jahn symbol as Gallego et al. write them (_Acta Cryst._ A75, 438 (2019), pp. 439–440, after Jahn
|
|
35
|
+
* (1949): square brackets for a symmetric, curly brackets for an antisymmetric set of indices):
|
|
36
|
+
* - `'none'`: no index symmetry, Vⁿ;
|
|
37
|
+
* - `'symmetric-first-pair'` (rank 2 and above): the first two indices are interchangeable, [V²]V…;
|
|
38
|
+
* - `'symmetric-last-pair'` (rank 2 and above): the last two, V…[V²] (at rank 3 second-harmonic
|
|
39
|
+
* generation and the piezoelectric effect); at rank 2 both mean a symmetric tensor, [V²];
|
|
40
|
+
* - `'symmetric-pairs'` (rank 4): each of the two pairs symmetric, the pairs not interchangeable,
|
|
41
|
+
* [V²][V²] (e.g. electric-quadrupole SHG, photoelasticity; Jahn 1949 writes [V²]²);
|
|
42
|
+
* - `'symmetric-pairs-exchangeable'` (rank 4): in addition the pairs interchangeable, [[V²][V²]]
|
|
43
|
+
* (elastic stiffness, the symmetry Voigt's notation uses; Jahn 1949 writes [[V²]²]);
|
|
44
|
+
* - `'antisymmetric'` (rank 2): t_ij = −t_ji, {V²};
|
|
45
|
+
* - `'totally-symmetric'` (rank 2 and above): every index interchangeable, [Vⁿ] (e.g. second-harmonic
|
|
46
|
+
* generation under Kleinman's condition).
|
|
47
|
+
*/
|
|
48
|
+
export type IntrinsicSymmetry = 'none' | 'symmetric-first-pair' | 'symmetric-last-pair' | 'symmetric-pairs' | 'symmetric-pairs-exchangeable' | 'antisymmetric' | 'totally-symmetric';
|
|
49
|
+
/** The kind of tensor (#137 E1, E2). */
|
|
32
50
|
export interface TensorSpec {
|
|
33
51
|
/** Number of indices, 0 to 4. */
|
|
34
52
|
readonly rank: TensorRank;
|
|
35
53
|
/** `'polar'` or `'axial'`: whether an improper operation changes the sign (factor det R). */
|
|
36
|
-
readonly
|
|
37
|
-
/** `'
|
|
54
|
+
readonly kind: TensorKind;
|
|
55
|
+
/** `'even'` or `'odd'`: whether time reversal changes the sign. */
|
|
38
56
|
readonly timeParity: TimeParity;
|
|
39
57
|
/** The index symmetry of the tensor. */
|
|
40
58
|
readonly intrinsic: IntrinsicSymmetry;
|
|
41
59
|
}
|
|
42
60
|
/**
|
|
43
61
|
* The form of a tensor under a point group: the subspace of tensors invariant under every
|
|
44
|
-
* operation and with the requested index symmetry. Every entry is a plain number; a
|
|
45
|
-
*
|
|
62
|
+
* operation and with the requested index symmetry. Every entry is a plain number; a component is
|
|
63
|
+
* named by its flat index, the first index slowest (see the module documentation).
|
|
46
64
|
*/
|
|
47
65
|
export interface TensorForm {
|
|
48
66
|
/** The rank of the tensor. */
|
|
49
67
|
readonly rank: TensorRank;
|
|
50
68
|
/**
|
|
51
|
-
* A basis of the allowed tensors in reduced row echelon form: one
|
|
52
|
-
* at the parameter's own component and 0 at every other parameter's component. Every allowed
|
|
69
|
+
* A basis of the allowed tensors in reduced row echelon form: one tensor per free parameter, with
|
|
70
|
+
* 1 at the parameter's own component and 0 at every other parameter's component. Every allowed
|
|
53
71
|
* tensor is Σₖ pₖ·basis[k], where pₖ is the value of its component `parameters[k]`. Empty if the
|
|
54
72
|
* tensor vanishes.
|
|
55
73
|
*/
|
|
56
74
|
readonly basis: readonly (readonly number[])[];
|
|
57
75
|
/**
|
|
58
76
|
* The free parameters, as the index lists of their components (e.g. `[0, 1, 1]` for xyy), one per
|
|
59
|
-
* basis
|
|
77
|
+
* basis tensor and in its order: each is the lowest component independent of those before it.
|
|
60
78
|
*/
|
|
61
79
|
readonly parameters: readonly (readonly number[])[];
|
|
62
80
|
/**
|
|
63
81
|
* The constraints: one row r per component that is not a parameter, in ascending flat index,
|
|
64
|
-
* with r·t = 0 for every allowed tensor t
|
|
82
|
+
* with r·t = 0 for every allowed tensor t, both by flat index. Row c reads
|
|
83
|
+
* t_c − Σₖ b_{k,c}·t_{parameters[k]} = 0, with b_{k,c} the component c of basis[k];
|
|
65
84
|
* a row with a single 1 says that the component vanishes.
|
|
66
85
|
*/
|
|
67
86
|
readonly relations: readonly (readonly number[])[];
|
|
68
87
|
}
|
|
88
|
+
/** A permutation of the indices of a tensor (`out[k] = in[perm[k]]`) with the sign it gives. */
|
|
89
|
+
export interface SignedPermutation {
|
|
90
|
+
readonly perm: readonly number[];
|
|
91
|
+
readonly sign: 1 | -1;
|
|
92
|
+
}
|
|
69
93
|
/**
|
|
70
94
|
* The form of a tensor under a point group, a crystal class or a magnetic point group, in the
|
|
71
|
-
* requested setting (default: the default setting
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* gives the same form in both conventions (docs/conventions.md, "Tensors").
|
|
95
|
+
* requested setting (default: the ITC default setting). The tensor is given by its specification
|
|
96
|
+
* or by the name of a property in `TENSOR_PROPERTIES` (`'piezoelectric'`; docs/conventions.md,
|
|
97
|
+
* "Tensors").
|
|
75
98
|
*/
|
|
76
99
|
export declare function tensorForm(key: MagneticPointGroupKey, spec: TensorSpec | TensorPropertyName, options?: SettingOptions): TensorForm;
|
|
77
100
|
/**
|
|
78
101
|
* The form of a tensor under the group generated by `operations`, e.g. the site symmetry of a
|
|
79
102
|
* surface normal (`siteSymmetry`) or the operations of a distorted crystal. The tensor is given by
|
|
80
|
-
* its specification or by the name of a property in `TENSOR_PROPERTIES`.
|
|
81
|
-
* Cartesian
|
|
82
|
-
* (`timeReversal`, `true` or `false`)
|
|
83
|
-
*
|
|
84
|
-
*
|
|
103
|
+
* its specification or by the name of a property in `TENSOR_PROPERTIES`. Each operation is read by
|
|
104
|
+
* its Cartesian matrix (`cartesian`), which must be orthogonal, and each says whether it is
|
|
105
|
+
* combined with time reversal (`timeReversal`, `true` or `false`). The list is closed into a group
|
|
106
|
+
* within the tolerance, and that group is made exact before the form is computed, so that matrices
|
|
107
|
+
* with rounding errors (e.g. rounded to 6 decimals) give the form of the exact group, with its
|
|
108
|
+
* number of free parameters (docs/conventions.md, "Tolerances"). Throws a RangeError for an
|
|
109
|
+
* operation without an orthogonal Cartesian matrix (`cartesian`; within the tolerance), for an
|
|
110
|
+
* operation that does not say whether it is combined with time reversal, and for operations that
|
|
111
|
+
* generate no finite group within the tolerance.
|
|
112
|
+
*/
|
|
113
|
+
export declare function tensorFormOf(operations: readonly CartesianOperation[], spec: TensorSpec | TensorPropertyName, options?: ToleranceOptions): TensorForm;
|
|
114
|
+
/**
|
|
115
|
+
* The operations of a caller, checked (orthogonal within the tolerance, time reversal given),
|
|
116
|
+
* closed within the tolerance and made exact: the group the functions for a list of operations
|
|
117
|
+
* compute with.
|
|
85
118
|
*/
|
|
86
|
-
export declare function
|
|
119
|
+
export declare function callerGroup(operations: readonly CartesianOperation[], options?: ToleranceOptions): IdealGroup;
|
|
120
|
+
/** The form of a tensor (checked specification and its permutations) under a group made exact. */
|
|
121
|
+
export declare function formOfGroup(group: IdealGroup, spec: TensorSpec, perms: readonly SignedPermutation[]): TensorForm;
|
|
122
|
+
/** The specification of a tensor given by its specification or name, checked, with its permutations. */
|
|
123
|
+
export declare function checkedSpec(spec: TensorSpec | TensorPropertyName): {
|
|
124
|
+
spec: TensorSpec;
|
|
125
|
+
perms: readonly SignedPermutation[];
|
|
126
|
+
};
|
|
87
127
|
/**
|
|
88
|
-
* The
|
|
128
|
+
* The tensor `tensor` in a frame rotated by the orthogonal
|
|
89
129
|
* matrix `rotation`: t′_{i…} = f·Σ R_{ia}…R_{…}·t_{a…}, with f = det(R) for an axial tensor and 1
|
|
90
130
|
* for a polar one. To express a tensor in the frame of a surface, pass the matrix whose rows are
|
|
91
131
|
* the new axes in the old frame. Time parity plays no part. The kind of tensor is given by its
|
|
92
|
-
* specification or by the name of a property in `TENSOR_PROPERTIES`.
|
|
132
|
+
* specification or by the name of a property in `TENSOR_PROPERTIES`. Throws a RangeError for a
|
|
133
|
+
* rotation that is not orthogonal within the tolerance (per matrix entry of RᵀR).
|
|
93
134
|
*/
|
|
94
|
-
export declare function rotateTensor(tensor: readonly number[], rotation: Mat3,
|
|
135
|
+
export declare function rotateTensor(tensor: readonly number[], rotation: Mat3, spec: TensorSpec | TensorPropertyName, options?: ToleranceOptions): readonly number[];
|
|
95
136
|
//# sourceMappingURL=tensorForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tensorForm.d.ts","sourceRoot":"","sources":["../../src/tensors/tensorForm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"tensorForm.d.ts","sourceRoot":"","sources":["../../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