Changeset 25045
- Timestamp:
- 06/17/20 13:05:40 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/qmu/uniform_uncertain.py
r25028 r25045 14 14 15 15 Usage: 16 nuv = uniform_uncertain(16 uuv = uniform_uncertain( 17 17 'descriptor', descriptor, 18 18 'lower', lower, … … 21 21 ) 22 22 23 where nuv is the uniform_uncertain object returned by the constructor,23 where uuv is the uniform_uncertain object returned by the constructor, 24 24 lower and upper are the pdf distribution bounds, and partition is the 25 25 partition vector for distributed variables. Can be a partition vector … … 78 78 if uuv.isscaled(): 79 79 uuv.partition = options.getfieldvalue('partition') 80 nuv.nsteps = options.getfieldvalue('nsteps', 1)80 uuv.nsteps = options.getfieldvalue('nsteps', 1) 81 81 npart = qmupart2npart(uuv.partition) 82 if npart != nuv.upper.shape[0]:82 if npart != uuv.upper.shape[0]: 83 83 raise RuntimeError("uniform_uncertain constructor: for the scaled variable %s the upper field is not currently a vector of values for all the partitions described in the partition vector" % uuv.descriptor) 84 if npart != nuv.lower.shape[0]:84 if npart != uuv.lower.shape[0]: 85 85 raise RuntimeError("uniform_uncertain constructor: for the scaled variable %s the lower field is not currently a vector of values for all the partitions described in the partition vector" % uuv.descriptor) 86 if nuv.nsteps != nuv.upper.shape[1]:87 raise RuntimeError("uniform_uncertain constructor: for the scaled variable %s the col size of the upper field should be identical to the number of time steps" % nuv.descriptor)88 if nuv.nsteps != nuv.lower.shape[1]:89 raise RuntimeError("uniform_uncertain constructor: for the scaled variable %s the col size of the lower field should be identical to the number of time steps" % nuv.descriptor)86 if uuv.nsteps != uuv.upper.shape[1]: 87 raise RuntimeError("uniform_uncertain constructor: for the scaled variable %s the col size of the upper field should be identical to the number of time steps" % uuv.descriptor) 88 if uuv.nsteps != uuv.lower.shape[1]: 89 raise RuntimeError("uniform_uncertain constructor: for the scaled variable %s the col size of the lower field should be identical to the number of time steps" % uuv.descriptor) 90 90 91 91 return [uuv] # Always return a list, so we have something akin to a MATLAB single row matrix
Note:
See TracChangeset
for help on using the changeset viewer.