Dear LAMMPS Users,
In script “in.elastic”, I found that variables like pxx1,pyy1,pzz1,pyz1,pxz1,pxy1 are used without prior definition
The file path is lammps/examples/ELASTIC. Part of the script is as follows
#These formulas define the derivatives w.r.t strain components
Constants uses $, variables use v_
variable d1 equal -(v_pxx1-{pxx0})/(v_delta/v_len0)*{cfac}
variable d2 equal -(v_pyy1-{pyy0})/(v_delta/v_len0)*{cfac}
variable d3 equal -(v_pzz1-{pzz0})/(v_delta/v_len0)*{cfac}
variable d4 equal -(v_pyz1-{pyz0})/(v_delta/v_len0)*{cfac}
variable d5 equal -(v_pxz1-{pxz0})/(v_delta/v_len0)*{cfac}
variable d6 equal -(v_pxy1-{pxy0})/(v_delta/v_len0)*{cfac}
Although these variables are defined in file “displace.mod”, I think the order sames to be wrong.
The correct order should be: define the variable first and then use it.
How to explain this? Or can you tell me the grammar rules?
Thanks for your help