Files
lammps/examples/numdiff/log.28Jan2022.log.numdiff.g++.4
2022-01-28 18:34:30 -07:00

176 lines
9.3 KiB
Groff

LAMMPS (7 Jan 2022)
# Numerical difference calculation
# of error in forces and virial stress
# adjustable parameters
variable nsteps index 500 # length of run
variable nthermo index 10 # thermo output interval
variable ndump index 500 # dump output interval
variable nlat index 3 # size of box
variable fdelta index 1.0e-4 # displacement size
variable vdelta index 1.0e-6 # strain size
variable temp index 10.0 # temperature
units metal
atom_style atomic
atom_modify map yes
lattice fcc 5.358000
Lattice spacing in x,y,z = 5.358 5.358 5.358
region box block 0 ${nlat} 0 ${nlat} 0 ${nlat}
region box block 0 3 0 ${nlat} 0 ${nlat}
region box block 0 3 0 3 0 ${nlat}
region box block 0 3 0 3 0 3
create_box 1 box
Created orthogonal box = (0 0 0) to (16.074 16.074 16.074)
1 by 2 by 2 MPI processor grid
create_atoms 1 box
Created 108 atoms
using lattice units in orthogonal box = (0 0 0) to (16.074 16.074 16.074)
create_atoms CPU = 0.000 seconds
mass 1 39.903
velocity all create ${temp} 2357 mom yes dist gaussian
velocity all create 10.0 2357 mom yes dist gaussian
pair_style lj/cubic
pair_coeff * * 0.0102701 3.42
neighbor 0.0 bin
neigh_modify every 1 delay 0 check no
timestep 0.001
fix nve all nve
# define numerical force calculation
fix numforce all numdiff ${nthermo} ${fdelta}
fix numforce all numdiff 10 ${fdelta}
fix numforce all numdiff 10 1.0e-4
variable ferrx atom f_numforce[1]-fx
variable ferry atom f_numforce[2]-fy
variable ferrz atom f_numforce[3]-fz
variable ferrsq atom v_ferrx^2+v_ferry^2+v_ferrz^2
compute faverrsq all reduce ave v_ferrsq
variable fsq atom fx^2+fy^2+fz^2
compute favsq all reduce ave v_fsq
variable frelerr equal sqrt(c_faverrsq/c_favsq)
dump errors all custom ${ndump} force_error.dump v_ferrx v_ferry v_ferrz
dump errors all custom 500 force_error.dump v_ferrx v_ferry v_ferrz
# define numerical virial stress tensor calculation
compute myvirial all pressure NULL virial
fix numvirial all numdiff/virial ${nthermo} ${vdelta}
fix numvirial all numdiff/virial 10 ${vdelta}
fix numvirial all numdiff/virial 10 1.0e-6
variable errxx equal f_numvirial[1]-c_myvirial[1]
variable erryy equal f_numvirial[2]-c_myvirial[2]
variable errzz equal f_numvirial[3]-c_myvirial[3]
variable erryz equal f_numvirial[4]-c_myvirial[6]
variable errxz equal f_numvirial[5]-c_myvirial[5]
variable errxy equal f_numvirial[6]-c_myvirial[4]
variable verrsq equal "v_errxx^2 + v_erryy^2 + v_errzz^2 + v_erryz^2 + v_errxz^2 + v_errxy^2"
variable vsq equal "c_myvirial[1]^2 + c_myvirial[3]^2 + c_myvirial[3]^2 + c_myvirial[4]^2 + c_myvirial[5]^2 + c_myvirial[6]^2"
variable vrelerr equal sqrt(v_verrsq/v_vsq)
thermo_style custom step temp pe etotal press v_frelerr v_vrelerr
thermo ${nthermo}
thermo 10
run ${nsteps}
run 500
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check no
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 5.9407173
ghost atom cutoff = 5.9407173
binsize = 2.9703587, bins = 6 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cubic, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 6.067 | 6.067 | 6.067 Mbytes
Step Temp PotEng TotEng Press v_frelerr v_vrelerr
0 10 -7.0259569 -6.8876486 28.564278 10664.391 9.1481187e-08
10 9.9388179 -7.0251107 -6.8876486 30.21736 1.4771865e-08 1.3452512e-07
20 9.7572185 -7.022599 -6.8876485 35.123527 1.437525e-08 8.0966999e-07
30 9.4606673 -7.0184974 -6.8876484 43.132052 1.4375468e-08 1.990012e-08
40 9.0579092 -7.0129268 -6.8876483 54.000927 1.4350331e-08 1.7239028e-08
50 8.5607685 -7.0060508 -6.8876482 67.403151 1.4353284e-08 7.813181e-09
60 7.9838726 -6.9980717 -6.8876481 82.935358 1.4398078e-08 2.022316e-08
70 7.3442875 -6.9892255 -6.8876479 100.12892 1.434409e-08 7.5938179e-09
80 6.6610579 -6.9797757 -6.8876477 118.46358 1.4324787e-08 7.1972571e-09
90 5.9546462 -6.9700053 -6.8876476 137.38365 1.4322718e-08 4.3978378e-09
100 5.2462727 -6.9602077 -6.8876474 156.31651 1.4273172e-08 4.6728038e-09
110 4.5571706 -6.9506767 -6.8876472 174.69294 1.4266163e-08 3.522225e-09
120 3.9077807 -6.9416949 -6.887647 191.96859 1.42241e-08 3.5357511e-09
130 3.3169241 -6.9335227 -6.8876469 207.64566 1.4203813e-08 2.5182488e-09
140 2.8010028 -6.926387 -6.8876468 221.29333 1.4164215e-08 2.3112509e-09
150 2.3732854 -6.9204712 -6.8876467 232.5658 1.4134122e-08 1.9368963e-09
160 2.0433329 -6.9159076 -6.8876466 241.21647 1.4095473e-08 3.6806452e-09
170 1.8166184 -6.912772 -6.8876466 247.10715 1.4049531e-08 2.5319322e-09
180 1.6943727 -6.9110813 -6.8876467 250.21143 1.3997912e-08 1.952404e-09
190 1.6736731 -6.910795 -6.8876467 250.61203 1.3915487e-08 1.4271767e-09
200 1.7477659 -6.9118199 -6.8876468 248.49223 1.3850618e-08 2.4515718e-09
210 1.9065921 -6.9140167 -6.8876469 244.12226 1.3747916e-08 1.7957531e-09
220 2.1374676 -6.91721 -6.887647 237.84173 1.3674779e-08 2.6613511e-09
230 2.4258607 -6.9211989 -6.8876472 230.0395 1.3565712e-08 3.0777067e-09
240 2.7562034 -6.9257679 -6.8876473 221.13265 1.3440442e-08 1.7111501e-09
250 3.1126827 -6.9306984 -6.8876474 211.54566 1.3270914e-08 1.6690112e-09
260 3.4799641 -6.9357784 -6.8876476 201.69126 1.3105092e-08 2.1637558e-09
270 3.8438148 -6.9408108 -6.8876477 191.95361 1.2962846e-08 4.4613506e-09
280 4.191607 -6.9456212 -6.8876478 182.6745 1.2846383e-08 3.3730203e-09
290 4.5126922 -6.9500621 -6.8876478 174.14285 1.2710692e-08 2.2809889e-09
300 4.7986487 -6.9540172 -6.8876479 166.58747 1.2657778e-08 6.9880891e-09
310 5.0434083 -6.9574025 -6.8876479 160.17316 1.266381e-08 4.2486217e-09
320 5.243275 -6.9601668 -6.8876479 154.99974 1.279856e-08 5.1505673e-09
330 5.3968455 -6.9622908 -6.8876479 151.1038 1.2981831e-08 3.3339333e-09
340 5.5048468 -6.9637845 -6.8876479 148.46296 1.3159021e-08 1.7881393e-09
350 5.569902 -6.9646843 -6.8876479 147.00205 1.3439465e-08 5.6876219e-09
360 5.5962378 -6.9650485 -6.8876478 146.60113 1.3645943e-08 7.233847e-09
370 5.5893468 -6.9649531 -6.8876478 147.10471 1.3829581e-08 4.5514318e-09
380 5.5556199 -6.9644866 -6.8876477 148.33195 1.4005893e-08 4.2971846e-09
390 5.5019639 -6.9637444 -6.8876476 150.08725 1.4157454e-08 3.3564262e-09
400 5.4354239 -6.962824 -6.8876476 152.17073 1.4226422e-08 4.2393923e-09
410 5.3628267 -6.9618199 -6.8876475 154.38825 1.4302679e-08 3.8937698e-09
420 5.2904639 -6.960819 -6.8876475 156.56034 1.4381099e-08 4.315875e-09
430 5.2238282 -6.9598973 -6.8876474 158.52969 1.4426567e-08 4.2658185e-09
440 5.1674149 -6.9591171 -6.8876474 160.16704 1.4453381e-08 5.7055268e-09
450 5.1245913 -6.9585248 -6.8876474 161.37513 1.4449488e-08 4.4308801e-09
460 5.0975361 -6.9581506 -6.8876474 162.09077 1.4445596e-08 5.8269923e-09
470 5.0872416 -6.9580082 -6.8876474 162.28517 1.4444348e-08 4.8263194e-09
480 5.0935712 -6.9580957 -6.8876474 161.96268 1.4411666e-08 6.222228e-09
490 5.115362 -6.9583971 -6.8876474 161.15816 1.4369716e-08 3.3926077e-09
500 5.1505605 -6.958884 -6.8876474 159.9333 1.4288515e-08 3.8845251e-09
Loop time of 0.252598 on 4 procs for 500 steps with 108 atoms
Performance: 171.023 ns/day, 0.140 hours/ns, 1979.430 timesteps/s
99.8% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.0021545 | 0.0022845 | 0.0023794 | 0.2 | 0.90
Neigh | 0.0063887 | 0.0067604 | 0.0069752 | 0.3 | 2.68
Comm | 0.01048 | 0.010916 | 0.011408 | 0.3 | 4.32
Output | 0.0026603 | 0.0027399 | 0.0029738 | 0.3 | 1.08
Modify | 0.2295 | 0.22952 | 0.22954 | 0.0 | 90.86
Other | | 0.0003814 | | | 0.15
Nlocal: 27 ave 29 max 25 min
Histogram: 1 0 1 0 0 0 0 1 0 1
Nghost: 325 ave 327 max 323 min
Histogram: 1 0 1 0 0 0 0 1 0 1
Neighs: 243 ave 273 max 228 min
Histogram: 1 1 1 0 0 0 0 0 0 1
Total # of neighbors = 972
Ave neighs/atom = 9
Neighbor list builds = 500
Dangerous builds not checked
Total wall time: 0:00:00