sysml-validate 0.11.0 → 0.14.3
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/LICENSE +27 -27
- package/README.md +200 -200
- package/out/main.js +598 -142
- package/out/main.js.map +4 -4
- package/package.json +57 -57
- package/resources/sysml.dimension-table.json +1 -1
- package/resources/sysml.library/Domain Libraries/Analysis/.meta.json +9 -9
- package/resources/sysml.library/Domain Libraries/Analysis/.project.json +26 -26
- package/resources/sysml.library/Domain Libraries/Analysis/AnalysisTooling.sysml +33 -33
- package/resources/sysml.library/Domain Libraries/Analysis/SampledFunctions.sysml +118 -118
- package/resources/sysml.library/Domain Libraries/Analysis/StateSpaceRepresentation.sysml +143 -143
- package/resources/sysml.library/Domain Libraries/Analysis/TradeStudies.sysml +170 -170
- package/resources/sysml.library/Domain Libraries/Cause and Effect/.meta.json +7 -7
- package/resources/sysml.library/Domain Libraries/Cause and Effect/.project.json +22 -22
- package/resources/sysml.library/Domain Libraries/Cause and Effect/CausationConnections.sysml +82 -82
- package/resources/sysml.library/Domain Libraries/Cause and Effect/CauseAndEffect.sysml +81 -81
- package/resources/sysml.library/Domain Libraries/Geometry/.meta.json +7 -7
- package/resources/sysml.library/Domain Libraries/Geometry/.project.json +26 -26
- package/resources/sysml.library/Domain Libraries/Geometry/ShapeItems.sysml +898 -898
- package/resources/sysml.library/Domain Libraries/Geometry/SpatialItems.sysml +167 -167
- package/resources/sysml.library/Domain Libraries/Metadata/.meta.json +9 -9
- package/resources/sysml.library/Domain Libraries/Metadata/.project.json +18 -18
- package/resources/sysml.library/Domain Libraries/Metadata/ImageMetadata.sysml +77 -77
- package/resources/sysml.library/Domain Libraries/Metadata/ModelingMetadata.sysml +142 -142
- package/resources/sysml.library/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml +38 -38
- package/resources/sysml.library/Domain Libraries/Metadata/RiskMetadata.sysml +99 -99
- package/resources/sysml.library/Domain Libraries/Quantities and Units/.meta.json +28 -28
- package/resources/sysml.library/Domain Libraries/Quantities and Units/.project.json +22 -22
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQ.sysml +42 -42
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQAcoustics.sysml +439 -439
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml +2726 -2726
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQBase.sysml +206 -206
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml +1991 -1991
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml +1353 -1353
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml +1223 -1223
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml +2333 -2333
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQInformation.sysml +958 -958
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQLight.sysml +1537 -1537
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQMechanics.sysml +1564 -1564
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml +1169 -1169
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml +1256 -1256
- package/resources/sysml.library/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml +30 -30
- package/resources/sysml.library/Domain Libraries/Quantities and Units/MeasurementReferences.sysml +526 -526
- package/resources/sysml.library/Domain Libraries/Quantities and Units/Quantities.sysml +107 -107
- package/resources/sysml.library/Domain Libraries/Quantities and Units/QuantityCalculations.sysml +70 -70
- package/resources/sysml.library/Domain Libraries/Quantities and Units/SI.sysml +378 -378
- package/resources/sysml.library/Domain Libraries/Quantities and Units/SIPrefixes.sysml +48 -48
- package/resources/sysml.library/Domain Libraries/Quantities and Units/TensorCalculations.sysml +49 -49
- package/resources/sysml.library/Domain Libraries/Quantities and Units/Time.sysml +274 -274
- package/resources/sysml.library/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml +260 -260
- package/resources/sysml.library/Domain Libraries/Quantities and Units/VectorCalculations.sysml +62 -62
- package/resources/sysml.library/Domain Libraries/Requirement Derivation/.meta.json +7 -7
- package/resources/sysml.library/Domain Libraries/Requirement Derivation/.project.json +18 -18
- package/resources/sysml.library/Domain Libraries/Requirement Derivation/DerivationConnections.sysml +62 -62
- package/resources/sysml.library/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml +38 -38
- package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/.meta.json +8 -8
- package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/.project.json +10 -10
- package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/Collections.kerml +176 -176
- package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml +23 -23
- package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml +63 -63
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/.meta.json +22 -22
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/.project.json +14 -14
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml +79 -79
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml +22 -22
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml +68 -68
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml +47 -47
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml +116 -116
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/DataFunctions.kerml +42 -42
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml +43 -43
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml +27 -27
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml +42 -42
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml +153 -153
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml +49 -49
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/RealFunctions.kerml +56 -56
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml +32 -32
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml +110 -110
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/StringFunctions.kerml +25 -25
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml +34 -34
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml +272 -272
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/.meta.json +21 -21
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/.project.json +14 -14
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Base.kerml +94 -94
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Clocks.kerml +155 -155
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml +134 -134
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml +189 -189
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/KerML.kerml +483 -483
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Links.kerml +66 -66
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml +57 -57
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Objects.kerml +212 -212
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Observation.kerml +160 -160
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml +992 -992
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Performances.kerml +292 -292
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml +196 -196
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml +144 -144
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Transfers.kerml +280 -280
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml +65 -65
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Triggers.kerml +187 -187
- package/resources/sysml.library/LICENSE +276 -276
- package/resources/sysml.library/NOTICE.md +20 -20
- package/resources/sysml.library/Systems Library/Actions.sysml +556 -556
- package/resources/sysml.library/Systems Library/Allocations.sysml +28 -28
- package/resources/sysml.library/Systems Library/AnalysisCases.sysml +37 -37
- package/resources/sysml.library/Systems Library/Attributes.sysml +24 -24
- package/resources/sysml.library/Systems Library/Calculations.sysml +36 -36
- package/resources/sysml.library/Systems Library/Cases.sysml +70 -70
- package/resources/sysml.library/Systems Library/Connections.sysml +59 -59
- package/resources/sysml.library/Systems Library/Constraints.sysml +43 -43
- package/resources/sysml.library/Systems Library/Flows.sysml +125 -125
- package/resources/sysml.library/Systems Library/Interfaces.sysml +88 -88
- package/resources/sysml.library/Systems Library/Items.sysml +152 -152
- package/resources/sysml.library/Systems Library/Metadata.sysml +31 -31
- package/resources/sysml.library/Systems Library/Parts.sysml +80 -80
- package/resources/sysml.library/Systems Library/Ports.sysml +53 -53
- package/resources/sysml.library/Systems Library/Requirements.sysml +193 -193
- package/resources/sysml.library/Systems Library/StandardViewDefinitions.sysml +123 -123
- package/resources/sysml.library/Systems Library/States.sysml +102 -102
- package/resources/sysml.library/Systems Library/SysML.sysml +539 -539
- package/resources/sysml.library/Systems Library/UseCases.sysml +56 -56
- package/resources/sysml.library/Systems Library/VerificationCases.sysml +102 -102
- package/resources/sysml.library/Systems Library/Views.sysml +163 -163
- package/resources/sysml.library.index.json +1 -1
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
standard library package SIPrefixes {
|
|
2
|
-
doc
|
|
3
|
-
/*
|
|
4
|
-
* Definition of SI unit prefixes as specified in ISO/IEC 80000-1
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
private import MeasurementReferences::*;
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* ISO/IEC 80000-1 prefixes for decimal multiples and sub-multiples
|
|
11
|
-
*
|
|
12
|
-
* See also https://en.wikipedia.org/wiki/Unit_prefix
|
|
13
|
-
*/
|
|
14
|
-
attribute yocto: UnitPrefix { :>> longName = "yocto"; :>> symbol = "y"; :>> conversionFactor = 1E-24; }
|
|
15
|
-
attribute zepto: UnitPrefix { :>> longName = "zepto"; :>> symbol = "z"; :>> conversionFactor = 1E-21; }
|
|
16
|
-
attribute atto: UnitPrefix { :>> longName = "atto"; :>> symbol = "a"; :>> conversionFactor = 1E-18; }
|
|
17
|
-
attribute femto: UnitPrefix { :>> longName = "femto"; :>> symbol = "f"; :>> conversionFactor = 1E-15; }
|
|
18
|
-
attribute pico: UnitPrefix { :>> longName = "pico"; :>> symbol = "p"; :>> conversionFactor = 1E-12; }
|
|
19
|
-
attribute nano: UnitPrefix { :>> longName = "nano"; :>> symbol = "n"; :>> conversionFactor = 1E-9; }
|
|
20
|
-
attribute micro: UnitPrefix { :>> longName = "micro"; :>> symbol = "μ"; :>> conversionFactor = 1E-6; }
|
|
21
|
-
attribute milli: UnitPrefix { :>> longName = "milli"; :>> symbol = "m"; :>> conversionFactor = 1E-3; }
|
|
22
|
-
attribute centi: UnitPrefix { :>> longName = "centi"; :>> symbol = "c"; :>> conversionFactor = 1E-2; }
|
|
23
|
-
attribute deci: UnitPrefix { :>> longName = "deci"; :>> symbol = "d"; :>> conversionFactor = 1E-1; }
|
|
24
|
-
attribute deca: UnitPrefix { :>> longName = "deca"; :>> symbol = "da"; :>> conversionFactor = 1E1; }
|
|
25
|
-
attribute hecto: UnitPrefix { :>> longName = "hecto"; :>> symbol = "h"; :>> conversionFactor = 1E2; }
|
|
26
|
-
attribute kilo: UnitPrefix { :>> longName = "kilo"; :>> symbol = "k"; :>> conversionFactor = 1E3; }
|
|
27
|
-
attribute mega: UnitPrefix { :>> longName = "mega"; :>> symbol = "M"; :>> conversionFactor = 1E6; }
|
|
28
|
-
attribute giga: UnitPrefix { :>> longName = "giga"; :>> symbol = "G"; :>> conversionFactor = 1E9; }
|
|
29
|
-
attribute tera: UnitPrefix { :>> longName = "tera"; :>> symbol = "T"; :>> conversionFactor = 1E12; }
|
|
30
|
-
attribute peta: UnitPrefix { :>> longName = "peta"; :>> symbol = "P"; :>> conversionFactor = 1E15; }
|
|
31
|
-
attribute exa: UnitPrefix { :>> longName = "exa"; :>> symbol = "E"; :>> conversionFactor = 1E18; }
|
|
32
|
-
attribute zetta: UnitPrefix { :>> longName = "zetta"; :>> symbol = "Z"; :>> conversionFactor = 1E21; }
|
|
33
|
-
attribute yotta: UnitPrefix { :>> longName = "yotta"; :>> symbol = "Y"; :>> conversionFactor = 1E24; }
|
|
34
|
-
|
|
35
|
-
/*
|
|
36
|
-
* ISO/IEC 80000-1 prefixes for binary multiples, i.e. multiples of 1024 (= 2^10)
|
|
37
|
-
*
|
|
38
|
-
* See also https://en.wikipedia.org/wiki/Binary_prefix
|
|
39
|
-
*/
|
|
40
|
-
attribute kibi: UnitPrefix { :>> longName = "kibi"; :>> symbol = "Ki"; :>> conversionFactor = 1024; }
|
|
41
|
-
attribute mebi: UnitPrefix { :>> longName = "mebi"; :>> symbol = "Mi"; :>> conversionFactor = 1024^2; }
|
|
42
|
-
attribute gibi: UnitPrefix { :>> longName = "gibi"; :>> symbol = "Gi"; :>> conversionFactor = 1024^3; }
|
|
43
|
-
attribute tebi: UnitPrefix { :>> longName = "tebi"; :>> symbol = "Ti"; :>> conversionFactor = 1024^4; }
|
|
44
|
-
attribute pebi: UnitPrefix { :>> longName = "pebi"; :>> symbol = "Pi"; :>> conversionFactor = 1024^5; }
|
|
45
|
-
attribute exbi: UnitPrefix { :>> longName = "exbi"; :>> symbol = "Ei"; :>> conversionFactor = 1024^6; }
|
|
46
|
-
attribute zebi: UnitPrefix { :>> longName = "zebi"; :>> symbol = "Zi"; :>> conversionFactor = 1024^7; }
|
|
47
|
-
attribute yobi: UnitPrefix { :>> longName = "yobi"; :>> symbol = "Yi"; :>> conversionFactor = 1024^8; }
|
|
48
|
-
}
|
|
1
|
+
standard library package SIPrefixes {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* Definition of SI unit prefixes as specified in ISO/IEC 80000-1
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
private import MeasurementReferences::*;
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* ISO/IEC 80000-1 prefixes for decimal multiples and sub-multiples
|
|
11
|
+
*
|
|
12
|
+
* See also https://en.wikipedia.org/wiki/Unit_prefix
|
|
13
|
+
*/
|
|
14
|
+
attribute yocto: UnitPrefix { :>> longName = "yocto"; :>> symbol = "y"; :>> conversionFactor = 1E-24; }
|
|
15
|
+
attribute zepto: UnitPrefix { :>> longName = "zepto"; :>> symbol = "z"; :>> conversionFactor = 1E-21; }
|
|
16
|
+
attribute atto: UnitPrefix { :>> longName = "atto"; :>> symbol = "a"; :>> conversionFactor = 1E-18; }
|
|
17
|
+
attribute femto: UnitPrefix { :>> longName = "femto"; :>> symbol = "f"; :>> conversionFactor = 1E-15; }
|
|
18
|
+
attribute pico: UnitPrefix { :>> longName = "pico"; :>> symbol = "p"; :>> conversionFactor = 1E-12; }
|
|
19
|
+
attribute nano: UnitPrefix { :>> longName = "nano"; :>> symbol = "n"; :>> conversionFactor = 1E-9; }
|
|
20
|
+
attribute micro: UnitPrefix { :>> longName = "micro"; :>> symbol = "μ"; :>> conversionFactor = 1E-6; }
|
|
21
|
+
attribute milli: UnitPrefix { :>> longName = "milli"; :>> symbol = "m"; :>> conversionFactor = 1E-3; }
|
|
22
|
+
attribute centi: UnitPrefix { :>> longName = "centi"; :>> symbol = "c"; :>> conversionFactor = 1E-2; }
|
|
23
|
+
attribute deci: UnitPrefix { :>> longName = "deci"; :>> symbol = "d"; :>> conversionFactor = 1E-1; }
|
|
24
|
+
attribute deca: UnitPrefix { :>> longName = "deca"; :>> symbol = "da"; :>> conversionFactor = 1E1; }
|
|
25
|
+
attribute hecto: UnitPrefix { :>> longName = "hecto"; :>> symbol = "h"; :>> conversionFactor = 1E2; }
|
|
26
|
+
attribute kilo: UnitPrefix { :>> longName = "kilo"; :>> symbol = "k"; :>> conversionFactor = 1E3; }
|
|
27
|
+
attribute mega: UnitPrefix { :>> longName = "mega"; :>> symbol = "M"; :>> conversionFactor = 1E6; }
|
|
28
|
+
attribute giga: UnitPrefix { :>> longName = "giga"; :>> symbol = "G"; :>> conversionFactor = 1E9; }
|
|
29
|
+
attribute tera: UnitPrefix { :>> longName = "tera"; :>> symbol = "T"; :>> conversionFactor = 1E12; }
|
|
30
|
+
attribute peta: UnitPrefix { :>> longName = "peta"; :>> symbol = "P"; :>> conversionFactor = 1E15; }
|
|
31
|
+
attribute exa: UnitPrefix { :>> longName = "exa"; :>> symbol = "E"; :>> conversionFactor = 1E18; }
|
|
32
|
+
attribute zetta: UnitPrefix { :>> longName = "zetta"; :>> symbol = "Z"; :>> conversionFactor = 1E21; }
|
|
33
|
+
attribute yotta: UnitPrefix { :>> longName = "yotta"; :>> symbol = "Y"; :>> conversionFactor = 1E24; }
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* ISO/IEC 80000-1 prefixes for binary multiples, i.e. multiples of 1024 (= 2^10)
|
|
37
|
+
*
|
|
38
|
+
* See also https://en.wikipedia.org/wiki/Binary_prefix
|
|
39
|
+
*/
|
|
40
|
+
attribute kibi: UnitPrefix { :>> longName = "kibi"; :>> symbol = "Ki"; :>> conversionFactor = 1024; }
|
|
41
|
+
attribute mebi: UnitPrefix { :>> longName = "mebi"; :>> symbol = "Mi"; :>> conversionFactor = 1024^2; }
|
|
42
|
+
attribute gibi: UnitPrefix { :>> longName = "gibi"; :>> symbol = "Gi"; :>> conversionFactor = 1024^3; }
|
|
43
|
+
attribute tebi: UnitPrefix { :>> longName = "tebi"; :>> symbol = "Ti"; :>> conversionFactor = 1024^4; }
|
|
44
|
+
attribute pebi: UnitPrefix { :>> longName = "pebi"; :>> symbol = "Pi"; :>> conversionFactor = 1024^5; }
|
|
45
|
+
attribute exbi: UnitPrefix { :>> longName = "exbi"; :>> symbol = "Ei"; :>> conversionFactor = 1024^6; }
|
|
46
|
+
attribute zebi: UnitPrefix { :>> longName = "zebi"; :>> symbol = "Zi"; :>> conversionFactor = 1024^7; }
|
|
47
|
+
attribute yobi: UnitPrefix { :>> longName = "yobi"; :>> symbol = "Yi"; :>> conversionFactor = 1024^8; }
|
|
48
|
+
}
|
package/resources/sysml.library/Domain Libraries/Quantities and Units/TensorCalculations.sysml
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
standard library package TensorCalculations {
|
|
2
|
-
doc
|
|
3
|
-
/*
|
|
4
|
-
* This package package defines calculations for the construction of and computations on TensorQuantityValues.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
private import ScalarValues::Boolean;
|
|
8
|
-
private import ScalarValues::Number;
|
|
9
|
-
private import Quantities::ScalarQuantityValue;
|
|
10
|
-
private import Quantities::VectorQuantityValue;
|
|
11
|
-
private import Quantities::TensorQuantityValue;
|
|
12
|
-
private import MeasurementReferences::TensorMeasurementReference;
|
|
13
|
-
private import MeasurementReferences::CoordinateTransformation;
|
|
14
|
-
|
|
15
|
-
calc def '[' specializes BaseFunctions::'[' {
|
|
16
|
-
in elements: Number[1..n] ordered nonunique;
|
|
17
|
-
in mRef: TensorMeasurementReference[1];
|
|
18
|
-
return quantity: TensorQuantityValue[1];
|
|
19
|
-
private attribute n = mRef.flattenedSize;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
calc def isZeroTensorQuantity {
|
|
23
|
-
in x : TensorQuantityValue[1];
|
|
24
|
-
return : Boolean[1];
|
|
25
|
-
}
|
|
26
|
-
calc def isUnitTensorQuantity {
|
|
27
|
-
in x : TensorQuantityValue[1];
|
|
28
|
-
return : Boolean[1];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* Addition and subtraction */
|
|
32
|
-
calc def '+' :> DataFunctions::'+' { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
33
|
-
calc def '-' :> DataFunctions::'-' { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
34
|
-
|
|
35
|
-
/* Multiplication and division */
|
|
36
|
-
calc def scalarTensorMult { in : Number[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
37
|
-
calc def TensorScalarMult { in : TensorQuantityValue[1]; in : Number[1]; return : TensorQuantityValue[1]; }
|
|
38
|
-
calc def scalarQuantityTensorMult { in : ScalarQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
39
|
-
calc def TensorScalarQuantityMult { in : TensorQuantityValue[1]; in : ScalarQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
40
|
-
calc def tensorVectorMult { in : TensorQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; }
|
|
41
|
-
calc def vectorTensorMult { in : VectorQuantityValue[1]; in : TensorQuantityValue[1]; return : VectorQuantityValue[1]; }
|
|
42
|
-
calc def tensorTensorMult { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
43
|
-
|
|
44
|
-
/* Tensor transformation */
|
|
45
|
-
calc def transform {
|
|
46
|
-
in transformation : CoordinateTransformation;
|
|
47
|
-
in sourceTensor : TensorQuantityValue;
|
|
48
|
-
return targetTensor : TensorQuantityValue;
|
|
49
|
-
}
|
|
1
|
+
standard library package TensorCalculations {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package package defines calculations for the construction of and computations on TensorQuantityValues.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
private import ScalarValues::Boolean;
|
|
8
|
+
private import ScalarValues::Number;
|
|
9
|
+
private import Quantities::ScalarQuantityValue;
|
|
10
|
+
private import Quantities::VectorQuantityValue;
|
|
11
|
+
private import Quantities::TensorQuantityValue;
|
|
12
|
+
private import MeasurementReferences::TensorMeasurementReference;
|
|
13
|
+
private import MeasurementReferences::CoordinateTransformation;
|
|
14
|
+
|
|
15
|
+
calc def '[' specializes BaseFunctions::'[' {
|
|
16
|
+
in elements: Number[1..n] ordered nonunique;
|
|
17
|
+
in mRef: TensorMeasurementReference[1];
|
|
18
|
+
return quantity: TensorQuantityValue[1];
|
|
19
|
+
private attribute n = mRef.flattenedSize;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
calc def isZeroTensorQuantity {
|
|
23
|
+
in x : TensorQuantityValue[1];
|
|
24
|
+
return : Boolean[1];
|
|
25
|
+
}
|
|
26
|
+
calc def isUnitTensorQuantity {
|
|
27
|
+
in x : TensorQuantityValue[1];
|
|
28
|
+
return : Boolean[1];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Addition and subtraction */
|
|
32
|
+
calc def '+' :> DataFunctions::'+' { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
33
|
+
calc def '-' :> DataFunctions::'-' { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
34
|
+
|
|
35
|
+
/* Multiplication and division */
|
|
36
|
+
calc def scalarTensorMult { in : Number[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
37
|
+
calc def TensorScalarMult { in : TensorQuantityValue[1]; in : Number[1]; return : TensorQuantityValue[1]; }
|
|
38
|
+
calc def scalarQuantityTensorMult { in : ScalarQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
39
|
+
calc def TensorScalarQuantityMult { in : TensorQuantityValue[1]; in : ScalarQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
40
|
+
calc def tensorVectorMult { in : TensorQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; }
|
|
41
|
+
calc def vectorTensorMult { in : VectorQuantityValue[1]; in : TensorQuantityValue[1]; return : VectorQuantityValue[1]; }
|
|
42
|
+
calc def tensorTensorMult { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
|
|
43
|
+
|
|
44
|
+
/* Tensor transformation */
|
|
45
|
+
calc def transform {
|
|
46
|
+
in transformation : CoordinateTransformation;
|
|
47
|
+
in sourceTensor : TensorQuantityValue;
|
|
48
|
+
return targetTensor : TensorQuantityValue;
|
|
49
|
+
}
|
|
50
50
|
}
|