Hi all,

Currently I use the "compute reduce sum" command to calculate the total contact region between two different particle clusters using "compute voronoi/atom". Since the structure containing the free surface which may lead to some extreme large calculated values of surface area and volume for some atoms when calculated with "compute voronoi/atom" command. So only 0.1<surface area<50 and volume<20 are used for doing the contact area summation. The command is written as

compute DropletSurface Droplet voronoi/atom surface NveLayer face_threshold 1e-1

variable S atom ((c_DropletSurface[1]<=20)*(c_DropletSurface[3]>=1e-1)*(c_DropletSurface[3]<=50))*c_DropletSurface[3]

compute ContactRegion1 all reduce ave v_S

compute ContactRegion2 all reduce sum v_S

I also use the thermo_style to print this value to the screen using

thermo_style custom step lz c_ContactRegion1 c_ContactRegion2

The printed results on the screen are

Step Lz ContactR ContactR

0 408.69901 0.013069324 0.013069324

Since all the calculated values in atom-vector S >0 and I have also checked that some of the atoms have S>10, why the "compute reduce ave and sum" give the same results, not c_ContactRegion1 (ave of S)<c_ContactRegion2 (sum of S)?

Is there anyone know where is the problem? Thanks for your help in advance.

Best,