Hello everybody,
I tried to do some math operations with arrays but it didn't work, e.g. an element-by-element-subtraction of a force array from a different force array. Is an element-by-element subtraction just possible for vectors?
Thanks a lot,
kind regards
Sebastian
Hello everybody,
I tried to do some math operations with arrays but it didn't work, e.g.
an element-by-element-subtraction of a force array from a different
force array. Is an element-by-element subtraction just possible for vectors?
can you provide a lammps script example, please?
it is difficult to discuss something that nobody but you can see.
thanks,
axel.
Sorry,
this would be an example:
fix force_1 all store/force
fix ywalls all wall/gran/hertz/history 1 0 yplane 0 2 1
fix force_2 all store/force
variable wallforce atom f_force_1-f_force_2
thanks,
Sebastian
If you mean you are using the variable command with a formula
to subtract 2 arrays, that won't work. There is no syntax in
the variable command for arrays, only per-atom vectors,
e.g. vx, not v.
Steve