diff --git a/examples/voronoi/in.voronoi.2d b/examples/voronoi/in.voronoi.2d new file mode 100644 index 0000000000..7c498d36e7 --- /dev/null +++ b/examples/voronoi/in.voronoi.2d @@ -0,0 +1,57 @@ +# Test volume definitions for 2d and finite systems + +variable rcut equal 10.0 +variable rskin equal 2.0 +variable rcomm equal 20.0 +variable len equal 4.0 +variable lenz equal 10.0 + +dimension 2 +units metal +boundary p p p + +#lattice sq 1.0 origin 0.5 0.5 0.0 +lattice hex 1.0 origin 0.5 0.5 0.0 + +atom_style atomic + +region box block 0 ${len} 0 ${len} 0.0 ${lenz} +region atoms block 0 ${len} 0 ${len} 0.0 0.0 +create_box 1 box +create_atoms 1 region atoms + +mass 1 1.0 + +pair_style lj/cut ${rcut} +pair_coeff 1 1 0.0 1.0 + +neighbor ${rskin} nsq +neigh_modify delay 10 + +# set the minimum communication cut-off +comm_modify cutoff ${rcomm} + +thermo 1 + +# +# TEST 1: Volume check for 2d bulk system +# + +compute v1 all voronoi/atom +dump d1 all custom 1 dump.voro id type x y z c_v1[1] c_v1[2] +compute volvor all reduce sum c_v1[1] +variable volsys equal lz*lx*ly +variable err equal c_volvor-v_volsys +thermo_style custom c_volvor v_volsys vol v_err +run 0 + +# +# TEST 2: Volume check for 2d finite system +# add margins in x and y directions +# + +change_box all boundary f f p +variable rless equal ${rcomm}<(${rcut}+${rskin}) +variable rmargin equal 0.01+${rcomm}*!${rless}+(${rcut}+${rskin})*${rless} +variable volsys equal (lx+2*${rmargin})*(ly+2*${rmargin})*lz +run 0