GiD - The personal pre and post processor

vector_sum

objarray vector_sum ?-type <type>? <obj_1> <obj_2> ... <obj_n>

Return a vector sum of other 'n' vectors

if -type is specified all the arguments are converted from any representation (including text or list) to this type

<type>: chararray shortarray intarray longarray longlongarray floatarray doublearray

the default type is doublearray, but if first argument, if it is some kind of objarray try to preserve it and is used as type.

<obj_1> … <obj_n> are objarrays (or can be converted to objarrays of <type>) all with the same length

e.g.

set obj_1 [objarray new doublearray -values {3.5 2.1}] set obj_2 [objarray new doublearray -values {0.3 3.5}] set obj_3 [objarray new doublearray -values {2.6 0.4}] set obj_sum [objarray vector_sum $obj_1 $obj_2 $obj_3] ->6.4 6.0



 

COPYRIGHT © 2022 · GID · CIMNE