Modeller.packDimensionality


packDimensionality(energyDim, forceDim, lengthDim, massDim, timeDim, temperatureDim, [perLengthDim])

Convert from separately specified dimensions into one convenient integer. This makes it easier to carry a dimensionality around as a single variable, and to pass that dimensionality to some other LPI functions. Please note that LUSAS expect to change the packing (and unpacking) algorithm for a future release, so this value should only ever be considered temporary, and never stored.

energyDimintegerexponent of energy
forceDimintegerexponent of force
lengthDimintegerexponent of length
massDimintegerexponent of mass
timeDimintegerexponent of time
temperatureDimintegerexponent of temperature
perLengthDimoptional integer 0 (the default) for most quantities. 1 for quantities that are 'per unit length' AND also have a non-zero exponent of length, such as "N.m/m". Similarly 2 and 3 for quantities that are per unit area or volume. It is possible to use a different UnitSet object to represent this 'extra' length/area/volume
Return valueintegerthe returned packed value

See also unpackDimensionality

Back to Modeller

Back to Overview