Min/Max of Global Data

Submitted by estefan31 on Tue, 05/09/2017 - 07:34

I'm trying to calculate the minimum height amongst different regions in my simulation. For each region, I use "compute region_height all reduce/region region_name max z" to calculate the highest particle. Now I'm trying to find the minimum of height 1, height 2, height 3, and so on. There doesn't seem to be a way I can simply call minimum(height1,height2,height3). Is there any built-in function or work-around that will allow me to find the minimum amongst different global scalars?

Gustavo Ruiz | Mon, 11/27/2017 - 15:46

Hello Estefan,

I had the same problem, maybe it's too late, but you can create functions for min or max in variable.cpp, you can be guided by the function atan2 that has two arguments.

Best regards

arnom's picture

arnom | Mon, 11/27/2017 - 18:09

If you need that info sporadically you can build yourself something using if commands in your input script. Potentially combined with the every keyword in the run command.

DCS team member & LIGGGHTS(R) core developer