Fixed bounds error
This commit is contained in:
@ -32,7 +32,8 @@ dump errors all custom 100 force_error.dump v_errx v_erry v_errz
|
|||||||
variable ferrsq atom (fx-f_numforce[1])^2+(fy-f_numforce[2])^2+(fz-f_numforce[3])^2
|
variable ferrsq atom (fx-f_numforce[1])^2+(fy-f_numforce[2])^2+(fz-f_numforce[3])^2
|
||||||
compute faverrsq all reduce ave v_ferrsq
|
compute faverrsq all reduce ave v_ferrsq
|
||||||
fix avfaverrsq all ave/time 100 1 100 c_faverrsq ave running
|
fix avfaverrsq all ave/time 100 1 100 c_faverrsq ave running
|
||||||
|
compute myvirial all pressure NULL virial
|
||||||
|
|
||||||
thermo_style custom step temp pe press c_faverrsq f_avfaverrsq pxx f_numstress[1]
|
thermo_style custom step temp pe press c_faverrsq f_avfaverrsq c_myvirial[1] f_numstress[1]
|
||||||
thermo 100
|
thermo 100
|
||||||
run 500
|
run 500
|
||||||
|
|||||||
@ -219,7 +219,7 @@ void FixNumDiffStress::calculate_stress()
|
|||||||
int flag,allflag;
|
int flag,allflag;
|
||||||
double denominator = 0.5 / delta;
|
double denominator = 0.5 / delta;
|
||||||
|
|
||||||
for (int idir = 0; idir <= NDIR_STRESS; idir++) {
|
for (int idir = 0; idir < NDIR_STRESS; idir++) {
|
||||||
displace_atoms(nall, idir, 1.0);
|
displace_atoms(nall, idir, 1.0);
|
||||||
energy = update_energy();
|
energy = update_energy();
|
||||||
stress[idir] += energy;
|
stress[idir] += energy;
|
||||||
|
|||||||
Reference in New Issue
Block a user