LAMMPS实现for循环,打印二维数组

label       loopx
variable    x loop 5
	  label     loopy
	  variable  y loop 5

	  variable x equal $x
	  variable y equal $y
print       "-----------------------"
print       "now x is ${x}"
print       "now y is ${y}"
print       "-----------------------"


	  next      y
	  jump      test.in loopy


next        x
jump        test.in loopx

# 1 1  1 2  1 3  1 4  1 5
# 2 1  2 2  2 3  2 4  2 5 
# 3 1  3 2  3 3  3 4  3 5 
# 4 1  4 2  4 3  4 4  4 5 
# 5 1  5 2  5 3  5 4  5 5 

猜你喜欢

转载自blog.csdn.net/qq_43689832/article/details/108552793

相关文章