diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index de184b347b..6471fb7378 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -756,7 +756,7 @@ endif() # Basic system tests (standard libraries, headers, functions, types) # ######################################################################## include(CheckIncludeFileCXX) -foreach(HEADER math.h) +foreach(HEADER cmath) check_include_file_cxx(${HEADER} FOUND_${HEADER}) if(NOT FOUND_${HEADER}) message(FATAL_ERROR "Could not find needed header - ${HEADER}") diff --git a/doc/github-development-workflow.md b/doc/github-development-workflow.md index e4cd7cbbdb..ddc19daad9 100644 --- a/doc/github-development-workflow.md +++ b/doc/github-development-workflow.md @@ -50,8 +50,8 @@ This is indicated by who the pull request is assigned to. LAMMPS core developers can self-assign or they can decide to assign a pull request to a different LAMMPS developer. Being assigned to a pull request means, that this pull request may need some work and the assignee is tasked to -determine what this might be needed or not, and may either implement the -required changes or ask the submitter of the pull request to implement +determine whether this might be needed or not, and may either implement +the required changes or ask the submitter of the pull request to implement them. Even though, all LAMMPS developers may have write access to pull requests (if enabled by the submitter, which is the default), only the submitter or the assignee of a pull request may do so. During this @@ -76,12 +76,15 @@ People can be assigned to review a pull request in two ways: Reviewers are requested to state their appraisal of the proposed changes and either approve or request changes. People may unassign themselves from review, if they feel not competent about the changes proposed. At -least one review from a LAMMPS developer with write access is required -before merging in addition to the automated compilation tests. The -feature, that reviews from code owners are "hard" reviews (i.e. they -must all be approved before merging is allowed), is currently disabled -and it is in the discretion of the merge maintainer to assess when -a sufficient degree of approval has been reached. Reviews may be +least two approvals from LAMMPS developers with write access are required +before merging in addition to the automated compilation tests. +Merging counts as implicit approval, so does submission of a pull request +(by a LAMMPS developer). So the person doing the merge may not also submit +an approving review. The feature, that reviews from code owners are "hard" +reviews (i.e. they must all be approved before merging is allowed), is +currently disabled and it is in the discretion of the merge maintainer to +assess when a sufficient degree of approval, especially from external +contributors, has been reached in these cases. Reviews may be (automatically) dismissed, when the reviewed code has been changed, and then approval is required a second time. diff --git a/doc/src/Build_link.txt b/doc/src/Build_link.txt index 1a1b387f3f..706c51d6bc 100644 --- a/doc/src/Build_link.txt +++ b/doc/src/Build_link.txt @@ -78,7 +78,7 @@ description of the Python interface to LAMMPS, which wraps the C-style interface. See the sample codes in examples/COUPLE/simple for examples of C++ and -C and Fortran codes that invoke LAMMPS thru its library interface. +C and Fortran codes that invoke LAMMPS through its library interface. Other examples in the COUPLE directory use coupling ideas discussed on the "Howto couple"_Howto_couple.html doc page. diff --git a/doc/src/Errors_messages.txt b/doc/src/Errors_messages.txt index d9a9f15ba0..23a7405f87 100644 --- a/doc/src/Errors_messages.txt +++ b/doc/src/Errors_messages.txt @@ -6917,7 +6917,7 @@ types. :dd {Invalid use of library file() function} :dt -This function is called thru the library interface. This +This function is called through the library interface. This error should not occur. Contact the developers if it does. :dd {Invalid value in set command} :dt diff --git a/doc/src/Howto_bash.txt b/doc/src/Howto_bash.txt old mode 100755 new mode 100644 diff --git a/doc/src/Howto_client_server.txt b/doc/src/Howto_client_server.txt index 61d99f7572..96939809dc 100644 --- a/doc/src/Howto_client_server.txt +++ b/doc/src/Howto_client_server.txt @@ -82,7 +82,7 @@ Monte Carlo client code as the driver. The lammps_vasp dir shows how to couple LAMMPS as a client code running MD timestepping to VASP acting as a server providing quantum -DFT forces, thru a Python wrapper script on VASP. +DFT forces, through a Python wrapper script on VASP. Here is how to launch a client and server code together for any of the 4 modes of message exchange that the "message"_message.html command diff --git a/doc/src/Howto_couple.txt b/doc/src/Howto_couple.txt index 0214db1ece..6fa740d529 100644 --- a/doc/src/Howto_couple.txt +++ b/doc/src/Howto_couple.txt @@ -50,7 +50,7 @@ In this scenario, the other code can be called as a library, as in (1), or it could be a stand-alone code, invoked by a system() call made by the command (assuming your parallel machine allows one or more processors to start up another program). In the latter case the -stand-alone code could communicate with LAMMPS thru files that the +stand-alone code could communicate with LAMMPS through files that the command writes and reads. See the "Modify command"_Modify_command.html doc page for info on how diff --git a/doc/src/Howto_library.txt b/doc/src/Howto_library.txt index 796c5b2e2d..40a8bf0a70 100644 --- a/doc/src/Howto_library.txt +++ b/doc/src/Howto_library.txt @@ -87,7 +87,7 @@ commands to LAMMPS to execute, the same as if they were coming from an input script. Via these functions, the calling code can read or generate a series of -LAMMPS commands one or multiple at a time and pass it thru the library +LAMMPS commands one or multiple at a time and pass it through the library interface to setup a problem and then run it in stages. The caller can interleave the command function calls with operations it performs, calls to extract information from or set information within LAMMPS, or diff --git a/doc/src/Install_windows.txt b/doc/src/Install_windows.txt index 0f306ec64c..78de4f09f7 100644 --- a/doc/src/Install_windows.txt +++ b/doc/src/Install_windows.txt @@ -42,7 +42,7 @@ environment manipulations. Note that to update to a newer version of LAMMPS, you should typically uninstall the version you currently have, download a new installer, -and go thru the install procedure described above. I.e. the same +and go through the install procedure described above. I.e. the same procedure for installing/updating most Windows programs. You can install multiple versions of LAMMPS (in different directories), but only the executable for the last-installed package will be found diff --git a/doc/src/Intro_features.txt b/doc/src/Intro_features.txt index 66874e79e0..629e8210b7 100644 --- a/doc/src/Intro_features.txt +++ b/doc/src/Intro_features.txt @@ -40,7 +40,7 @@ General features :h4,link(general) syntax for defining and using variables and formulas syntax for looping over runs and breaking out of loops run one or multiple simulations simultaneously (in parallel) from one script - build as library, invoke LAMMPS thru library interface or provided Python wrapper + build as library, invoke LAMMPS through library interface or provided Python wrapper couple with other codes: LAMMPS calls other code, other code calls LAMMPS, umbrella code calls both :ul Particle and model types :h4,link(particle) diff --git a/doc/src/Intro_nonfeatures.txt b/doc/src/Intro_nonfeatures.txt index 079d25ed54..22e827bb2d 100644 --- a/doc/src/Intro_nonfeatures.txt +++ b/doc/src/Intro_nonfeatures.txt @@ -15,7 +15,7 @@ functionality for setting up simulations and analyzing their output. Specifically, LAMMPS was not conceived and designed for: -being run thru a GUI +being run through a GUI building molecular systems, or building molecular topologies assign force-field coefficients automagically perform sophisticated analysis of your MD simulation diff --git a/doc/src/PDF/SPH_LAMMPS_userguide.pdf b/doc/src/PDF/SPH_LAMMPS_userguide.pdf old mode 100755 new mode 100644 diff --git a/doc/src/PDF/kspace.pdf b/doc/src/PDF/kspace.pdf old mode 100755 new mode 100644 diff --git a/doc/src/Python_examples.txt b/doc/src/Python_examples.txt index 13ef99bdf2..181181dfb2 100644 --- a/doc/src/Python_examples.txt +++ b/doc/src/Python_examples.txt @@ -15,7 +15,7 @@ things that are possible when Python wraps LAMMPS. If you create your own scripts, send them to us and we can include them in the LAMMPS distribution. -trivial.py, read/run a LAMMPS input script thru Python, +trivial.py, read/run a LAMMPS input script through Python, demo.py, invoke various LAMMPS library interface routines, simple.py, run in parallel, similar to examples/COUPLE/simple/simple.cpp, split.py, same as simple.py but running in parallel on a subset of procs, diff --git a/doc/src/Python_run.txt b/doc/src/Python_run.txt index 963248efce..8974d1469a 100644 --- a/doc/src/Python_run.txt +++ b/doc/src/Python_run.txt @@ -31,7 +31,7 @@ language is, and that it can be run interactively, enabling rapid development and debugging. If you use it to mostly invoke costly operations within LAMMPS, such as running a simulation for a reasonable number of timesteps, then the overhead cost of invoking -LAMMPS thru Python will be negligible. +LAMMPS through Python will be negligible. The Python wrapper for LAMMPS uses the "ctypes" package in Python, which auto-generates the interface code needed between Python and a diff --git a/doc/src/Python_test.txt b/doc/src/Python_test.txt index 2bfec91bd6..3909ea9979 100644 --- a/doc/src/Python_test.txt +++ b/doc/src/Python_test.txt @@ -32,7 +32,7 @@ first importing from the lammps.py file: >>> from ctypes import CDLL >>> CDLL("liblammps.so") :pre -If an error occurs, carefully go thru the steps on the +If an error occurs, carefully go through the steps on the "Build_basics"_Build_basics.html doc page about building a shared library and the "Python_install"_Python_install.html doc page about insuring Python can find the necessary two files it needs. diff --git a/doc/src/compute_angmom_chunk.txt b/doc/src/compute_angmom_chunk.txt index 7e49ff3024..f542ab51ab 100644 --- a/doc/src/compute_angmom_chunk.txt +++ b/doc/src/compute_angmom_chunk.txt @@ -37,7 +37,7 @@ they can be used to measure properties of a system. This compute calculates the 3 components of the angular momentum vector for each chunk, due to the velocity/momentum of the individual atoms in the chunk around the center-of-mass of the chunk. The -calculation includes all effects due to atoms passing thru periodic +calculation includes all effects due to atoms passing through periodic boundaries. Note that only atoms in the specified group contribute to the diff --git a/doc/src/compute_com.txt b/doc/src/compute_com.txt index fdc631a263..35cdd37c4d 100644 --- a/doc/src/compute_com.txt +++ b/doc/src/compute_com.txt @@ -22,7 +22,7 @@ compute 1 all com :pre [Description:] Define a computation that calculates the center-of-mass of the group -of atoms, including all effects due to atoms passing thru periodic +of atoms, including all effects due to atoms passing through periodic boundaries. A vector of three quantities is calculated by this compute, which diff --git a/doc/src/compute_com_chunk.txt b/doc/src/compute_com_chunk.txt index b982f0d901..9c14a554d7 100644 --- a/doc/src/compute_com_chunk.txt +++ b/doc/src/compute_com_chunk.txt @@ -35,7 +35,7 @@ doc pages for details of how chunks can be defined and examples of how they can be used to measure properties of a system. This compute calculates the x,y,z coordinates of the center-of-mass -for each chunk, which includes all effects due to atoms passing thru +for each chunk, which includes all effects due to atoms passing through periodic boundaries. Note that only atoms in the specified group contribute to the diff --git a/doc/src/compute_dipole_chunk.txt b/doc/src/compute_dipole_chunk.txt index d45fde9af2..2a3d1d9b56 100644 --- a/doc/src/compute_dipole_chunk.txt +++ b/doc/src/compute_dipole_chunk.txt @@ -38,7 +38,7 @@ they can be used to measure properties of a system. This compute calculates the x,y,z coordinates of the dipole vector and the total dipole moment for each chunk, which includes all effects -due to atoms passing thru periodic boundaries. For chunks with a net +due to atoms passing through periodic boundaries. For chunks with a net charge the resulting dipole is made position independent by subtracting the position vector of the center of mass or geometric center times the net charge from the computed dipole vector. diff --git a/doc/src/compute_displace_atom.txt b/doc/src/compute_displace_atom.txt index 141d0cc51b..27111b2c67 100644 --- a/doc/src/compute_displace_atom.txt +++ b/doc/src/compute_displace_atom.txt @@ -29,7 +29,7 @@ compute 1 all displace/atom refresh myVar :pre Define a computation that calculates the current displacement of each atom in the group from its original (reference) coordinates, including -all effects due to atoms passing thru periodic boundaries. +all effects due to atoms passing through periodic boundaries. A vector of four quantities per atom is calculated by this compute. The first 3 elements of the vector are the dx,dy,dz displacements. diff --git a/doc/src/compute_gyration.txt b/doc/src/compute_gyration.txt index 4dc883ad0b..8deeddf585 100644 --- a/doc/src/compute_gyration.txt +++ b/doc/src/compute_gyration.txt @@ -22,7 +22,7 @@ compute 1 molecule gyration :pre [Description:] Define a computation that calculates the radius of gyration Rg of the -group of atoms, including all effects due to atoms passing thru +group of atoms, including all effects due to atoms passing through periodic boundaries. Rg is a measure of the size of the group of atoms, and is computed as diff --git a/doc/src/compute_gyration_chunk.txt b/doc/src/compute_gyration_chunk.txt index dcbfc65393..4d2c30d9c7 100644 --- a/doc/src/compute_gyration_chunk.txt +++ b/doc/src/compute_gyration_chunk.txt @@ -40,7 +40,7 @@ doc pages for details of how chunks can be defined and examples of how they can be used to measure properties of a system. This compute calculates the radius of gyration Rg for each chunk, -which includes all effects due to atoms passing thru periodic +which includes all effects due to atoms passing through periodic boundaries. Rg is a measure of the size of a chunk, and is computed by this diff --git a/doc/src/compute_inertia_chunk.txt b/doc/src/compute_inertia_chunk.txt index d6cdb3fe79..6ded3312c5 100644 --- a/doc/src/compute_inertia_chunk.txt +++ b/doc/src/compute_inertia_chunk.txt @@ -36,7 +36,7 @@ they can be used to measure properties of a system. This compute calculates the 6 components of the symmetric inertia tensor for each chunk, ordered Ixx,Iyy,Izz,Ixy,Iyz,Ixz. The -calculation includes all effects due to atoms passing thru periodic +calculation includes all effects due to atoms passing through periodic boundaries. Note that only atoms in the specified group contribute to the diff --git a/doc/src/compute_msd.txt b/doc/src/compute_msd.txt index 50f8b103d3..dbbe0d637d 100644 --- a/doc/src/compute_msd.txt +++ b/doc/src/compute_msd.txt @@ -29,7 +29,7 @@ compute 1 upper msd com yes average yes :pre Define a computation that calculates the mean-squared displacement (MSD) of the group of atoms, including all effects due to atoms -passing thru periodic boundaries. For computation of the non-Gaussian +passing through periodic boundaries. For computation of the non-Gaussian parameter of mean-squared displacement, see the "compute msd/nongauss"_compute_msd_nongauss.html command. diff --git a/doc/src/compute_msd_chunk.txt b/doc/src/compute_msd_chunk.txt index 7ff57c9844..12f54408d1 100644 --- a/doc/src/compute_msd_chunk.txt +++ b/doc/src/compute_msd_chunk.txt @@ -38,7 +38,7 @@ Four quantities are calculated by this compute for each chunk. The first 3 quantities are the squared dx,dy,dz displacements of the center-of-mass. The 4th component is the total squared displacement, i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass. These -calculations include all effects due to atoms passing thru periodic +calculations include all effects due to atoms passing through periodic boundaries. Note that only atoms in the specified group contribute to the diff --git a/doc/src/compute_msd_nongauss.txt b/doc/src/compute_msd_nongauss.txt index c22b458178..b745cf5a5b 100644 --- a/doc/src/compute_msd_nongauss.txt +++ b/doc/src/compute_msd_nongauss.txt @@ -28,7 +28,7 @@ compute 1 upper msd/nongauss com yes :pre Define a computation that calculates the mean-squared displacement (MSD) and non-Gaussian parameter (NGP) of the group of atoms, -including all effects due to atoms passing thru periodic boundaries. +including all effects due to atoms passing through periodic boundaries. A vector of three quantities is calculated by this compute. The first element of the vector is the total squared dx,dy,dz displacements diff --git a/doc/src/compute_omega_chunk.txt b/doc/src/compute_omega_chunk.txt index 84b25ac6f2..393440759c 100644 --- a/doc/src/compute_omega_chunk.txt +++ b/doc/src/compute_omega_chunk.txt @@ -38,7 +38,7 @@ This compute calculates the 3 components of the angular velocity vector for each chunk, via the formula L = Iw where L is the angular momentum vector of the chunk, I is its moment of inertia tensor, and w is omega = angular velocity of the chunk. The calculation includes -all effects due to atoms passing thru periodic boundaries. +all effects due to atoms passing through periodic boundaries. Note that only atoms in the specified group contribute to the calculation. The "compute chunk/atom"_compute_chunk_atom.html command diff --git a/doc/src/compute_rigid_local.txt b/doc/src/compute_rigid_local.txt index 294c70cda2..73e9e4a609 100644 --- a/doc/src/compute_rigid_local.txt +++ b/doc/src/compute_rigid_local.txt @@ -107,7 +107,7 @@ mass (COM) of the body. The {x}, {y}, {z} attributes write the COM "unscaled", in the appropriate distance "units"_units.html (Angstroms, sigma, etc). Use {xu}, {yu}, {zu} if you want the COM "unwrapped" by the image flags for each body. Unwrapped means that if the body -COM has passed thru a periodic boundary one or more times, the value +COM has passed through a periodic boundary one or more times, the value is generated what the COM coordinate would be if it had not been wrapped back into the periodic box. diff --git a/doc/src/compute_sna_atom.txt b/doc/src/compute_sna_atom.txt index ab652daf83..efbf2e9ea3 100644 --- a/doc/src/compute_sna_atom.txt +++ b/doc/src/compute_sna_atom.txt @@ -24,7 +24,7 @@ twojmax = band limit for bispectrum components (non-negative integer) :l R_1, R_2,... = list of cutoff radii, one for each type (distance units) :l w_1, w_2,... = list of neighbor weights, one for each type :l zero or more keyword/value pairs may be appended :l -keyword = {diagonal} or {rmin0} or {switchflag} or {bzeroflag} or {quadraticflag}:l +keyword = {diagonal} or {rmin0} or {switchflag} or {bzeroflag} or {quadraticflag} :l {diagonal} value = {0} or {1} or {2} or {3} {0} = all j1, j2, j <= twojmax, j2 <= j1 {1} = subset satisfying j1 == j2 diff --git a/doc/src/compute_torque_chunk.txt b/doc/src/compute_torque_chunk.txt index 6484076b37..8121c42781 100644 --- a/doc/src/compute_torque_chunk.txt +++ b/doc/src/compute_torque_chunk.txt @@ -37,7 +37,7 @@ they can be used to measure properties of a system. This compute calculates the 3 components of the torque vector for eqch chunk, due to the forces on the individual atoms in the chunk around the center-of-mass of the chunk. The calculation includes all effects -due to atoms passing thru periodic boundaries. +due to atoms passing through periodic boundaries. Note that only atoms in the specified group contribute to the calculation. The "compute chunk/atom"_compute_chunk_atom.html command diff --git a/doc/src/displace_atoms.txt b/doc/src/displace_atoms.txt index b4afd5c3a9..b0fa2d3bc4 100644 --- a/doc/src/displace_atoms.txt +++ b/doc/src/displace_atoms.txt @@ -83,7 +83,7 @@ used in such a way that the displacement of a particular atom is the same, regardless of how many processors are being used. The {rotate} style rotates each atom in the group by the angle {theta} -around a rotation axis {R} = (Rx,Ry,Rz) that goes thru a point {P} = +around a rotation axis {R} = (Rx,Ry,Rz) that goes through a point {P} = (Px,Py,Pz). The direction of rotation for the atoms around the rotation axis is consistent with the right-hand rule: if your right-hand thumb points along {R}, then your fingers wrap around the diff --git a/doc/src/dump.txt b/doc/src/dump.txt index 8b630cc706..9999f5bbff 100644 --- a/doc/src/dump.txt +++ b/doc/src/dump.txt @@ -312,7 +312,7 @@ so that any machine which supports XDR should be able to read them. The number of atoms per snapshot cannot change with the {xtc} style. The {unwrap} option of the "dump_modify"_dump_modify.html command allows XTC coordinates to be written "unwrapped" by the image flags for each -atom. Unwrapped means that if the atom has passed thru a periodic +atom. Unwrapped means that if the atom has passed through a periodic boundary one or more times, the value is printed for what the coordinate would be if it had not been wrapped back into the periodic box. Note that these coordinates may thus be far outside the box size @@ -534,7 +534,7 @@ on the "Howto triclinic"_Howto_triclinic.html doc page. Use {xu}, {yu}, {zu} if you want the coordinates "unwrapped" by the image flags for each atom. Unwrapped means that if the atom has -passed thru a periodic boundary one or more times, the value is +passed through a periodic boundary one or more times, the value is printed for what the coordinate would be if it had not been wrapped back into the periodic box. Note that using {xu}, {yu}, {zu} means that the coordinate values may be far outside the box bounds printed diff --git a/doc/src/dump_modify.txt b/doc/src/dump_modify.txt index a600e04aa5..9a35956055 100644 --- a/doc/src/dump_modify.txt +++ b/doc/src/dump_modify.txt @@ -344,7 +344,7 @@ The {image} keyword applies only to the dump {atom} style. If the image value is {yes}, 3 flags are appended to each atom's coords which are the absolute box image of the atom in each dimension. For example, an x image flag of -2 with a normalized coord of 0.5 means -the atom is in the center of the box, but has passed thru the box +the atom is in the center of the box, but has passed through the box boundary 2 times and is really 2 box lengths to the left of its current coordinate. Note that for dump style {custom} these various values can be printed in the dump file by using the appropriate atom @@ -622,7 +622,7 @@ threshold criterion is met. Otherwise it is not met. The {unwrap} keyword only applies to the dump {dcd} and {xtc} styles. If set to {yes}, coordinates will be written "unwrapped" by the image -flags for each atom. Unwrapped means that if the atom has passed thru +flags for each atom. Unwrapped means that if the atom has passed through a periodic boundary one or more times, the value is printed for what the coordinate would be if it had not been wrapped back into the periodic box. Note that these coordinates may thus be far outside the diff --git a/doc/src/fix_ave_histo.txt b/doc/src/fix_ave_histo.txt index f1da130ff7..79f4d53481 100644 --- a/doc/src/fix_ave_histo.txt +++ b/doc/src/fix_ave_histo.txt @@ -241,7 +241,7 @@ first bin and values > {hi} are counted in the last bin. If {beyond} is set to {extend} then two extra bins are created, so that there are Nbins+2 total bins. Values < {lo} are counted in the first bin and values > {hi} are counted in the last bin (Nbins+1). Values between -{lo} and {hi} (inclusive) are counted in bins 2 thru Nbins+1. The +{lo} and {hi} (inclusive) are counted in bins 2 through Nbins+1. The "coordinate" stored and printed for these two extra bins is {lo} and {hi}. diff --git a/doc/src/fix_meso_move.txt b/doc/src/fix_meso_move.txt index 1b8e7b76d7..abd6e0cca1 100644 --- a/doc/src/fix_meso_move.txt +++ b/doc/src/fix_meso_move.txt @@ -56,7 +56,7 @@ by other fixes (e.g. "fix meso"_fix_meso.html, "fix meso/stationary"_fix_meso_stationary.html), since that will change their positions and velocities twice. -NOTE: As particles move due to this fix, they will pass thru periodic +NOTE: As particles move due to this fix, they will pass through periodic boundaries and be remapped to the other side of the simulation box, just as they would during normal time integration (e.g. via the "fix meso"_fix_meso.html command). It is up to you to decide whether periodic @@ -126,7 +126,7 @@ variable v equal v_omega*($A-cwiggle(0.0,$A,$T)) fix 1 boundary move variable v_x NULL NULL v_v NULL NULL :pre The {rotate} style rotates particles around a rotation axis {R} = -(Rx,Ry,Rz) that goes thru a point {P} = (Px,Py,Pz). The {period} of +(Rx,Ry,Rz) that goes through a point {P} = (Px,Py,Pz). The {period} of the rotation is also specified. The direction of rotation for the particles around the rotation axis is consistent with the right-hand rule: if your right-hand thumb points along {R}, then your fingers wrap diff --git a/doc/src/fix_move.txt b/doc/src/fix_move.txt index 08f38d0ed6..b8ccfbebfe 100644 --- a/doc/src/fix_move.txt +++ b/doc/src/fix_move.txt @@ -51,7 +51,7 @@ integrated by other fixes (e.g. "fix nve"_fix_nve.html, "fix nvt"_fix_nh.html), since that will change their positions and velocities twice. -NOTE: As atoms move due to this fix, they will pass thru periodic +NOTE: As atoms move due to this fix, they will pass through periodic boundaries and be remapped to the other side of the simulation box, just as they would during normal time integration (e.g. via the "fix nve"_fix_nve.html command). It is up to you to decide whether @@ -121,7 +121,7 @@ variable v equal v_omega*($A-cwiggle(0.0,$A,$T)) fix 1 boundary move variable v_x NULL NULL v_v NULL NULL :pre The {rotate} style rotates atoms around a rotation axis {R} = -(Rx,Ry,Rz) that goes thru a point {P} = (Px,Py,Pz). The {period} of +(Rx,Ry,Rz) that goes through a point {P} = (Px,Py,Pz). The {period} of the rotation is also specified. The direction of rotation for the atoms around the rotation axis is consistent with the right-hand rule: if your right-hand thumb points along {R}, then your fingers wrap diff --git a/doc/src/fix_srd.txt b/doc/src/fix_srd.txt index 1cc8dad178..018813c361 100644 --- a/doc/src/fix_srd.txt +++ b/doc/src/fix_srd.txt @@ -117,7 +117,7 @@ Lamda cannot be smaller than 0.6 * hgrid, else an error is generated SRD particles are bounded by Vmax, which is set so that an SRD particle will not advect further than Dmax = 4*lamda in dt_SRD. This means that roughly speaking, Dmax should not be larger than a big -particle diameter, else SRDs may pass thru big particles without +particle diameter, else SRDs may pass through big particles without colliding. A warning is generated if this is the case. Collisions between SRD particles and big particles or walls are diff --git a/doc/src/fix_wall_reflect.txt b/doc/src/fix_wall_reflect.txt index d43cafbf09..9f787c721f 100644 --- a/doc/src/fix_wall_reflect.txt +++ b/doc/src/fix_wall_reflect.txt @@ -41,7 +41,7 @@ fix top all wall/reflect zhi v_pressdown :pre [Description:] Bound the simulation with one or more walls which reflect particles -in the specified group when they attempt to move thru them. +in the specified group when they attempt to move through them. Reflection means that if an atom moves outside the wall on a timestep by a distance delta (e.g. due to "fix nve"_fix_nve.html), then it is diff --git a/doc/src/if.txt b/doc/src/if.txt index 513e451034..20caf1a1ef 100644 --- a/doc/src/if.txt +++ b/doc/src/if.txt @@ -107,7 +107,7 @@ print "ALL DONE" :pre Here is an example of a double loop which uses the if and "jump"_jump.html commands to break out of the inner loop when a -condition is met, then continues iterating thru the outer loop. +condition is met, then continues iterating through the outer loop. label loopa variable a loop 5 diff --git a/doc/src/jump.txt b/doc/src/jump.txt index 2e26d32c40..5bda178515 100644 --- a/doc/src/jump.txt +++ b/doc/src/jump.txt @@ -100,7 +100,7 @@ print "ALL DONE" :pre Here is an example of a double loop which uses the if and "jump"_jump.html commands to break out of the inner loop when a -condition is met, then continues iterating thru the outer loop. +condition is met, then continues iterating through the outer loop. label loopa variable a loop 5 diff --git a/doc/src/minimize.txt b/doc/src/minimize.txt index ffda749ec5..00de86c5f5 100644 --- a/doc/src/minimize.txt +++ b/doc/src/minimize.txt @@ -82,12 +82,12 @@ coordinates: where the first term is the sum of all non-bonded "pairwise interactions"_pair_style.html including "long-range Coulombic -interactions"_kspace_style.html, the 2nd thru 5th terms are +interactions"_kspace_style.html, the 2nd through 5th terms are "bond"_bond_style.html, "angle"_angle_style.html, "dihedral"_dihedral_style.html, and "improper"_improper_style.html interactions respectively, and the last term is energy due to "fixes"_fix.html which can act as constraints or apply force to atoms, -such as thru interaction with a wall. See the discussion below about +such as through interaction with a wall. See the discussion below about how fix commands affect minimization. The starting point for the minimization is the current configuration diff --git a/doc/src/next.txt b/doc/src/next.txt index aefb2ca594..3f43b1b752 100644 --- a/doc/src/next.txt +++ b/doc/src/next.txt @@ -79,7 +79,7 @@ and after such a LAMMPS run. Here is an example of running a series of simulations using the next command with an {index}-style variable. If this input script is named in.polymer, 8 simulations would be run using data files from -directories run1 thru run8. +directories run1 through run8. variable d index run1 run2 run3 run4 run5 run6 run7 run8 shell cd $d @@ -114,7 +114,7 @@ jump in.script :pre Here is an example of a double loop which uses the "if"_if.html and "jump"_jump.html commands to break out of the inner loop when a -condition is met, then continues iterating thru the outer loop. +condition is met, then continues iterating through the outer loop. label loopa variable a loop 5 diff --git a/doc/src/region.txt b/doc/src/region.txt index e343557b7f..d163f62dcb 100644 --- a/doc/src/region.txt +++ b/doc/src/region.txt @@ -298,7 +298,7 @@ variable dysame equal 5*sin(2*PI*elaplong*dt/100) region 2 sphere 10.0 10.0 0.0 5 move NULL v_dy NULL :pre The {rotate} keyword rotates the region around a rotation axis {R} = -(Rx,Ry,Rz) that goes thru a point {P} = (Px,Py,Pz). The rotation +(Rx,Ry,Rz) that goes through a point {P} = (Px,Py,Pz). The rotation angle is calculated, presumably as a function of time, by a variable specified as v_theta, where theta is the variable name. The variable should generate its result in radians. The direction of rotation for diff --git a/python/lammps.py b/python/lammps.py index 598e4c506f..c393ee7ec7 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -265,7 +265,7 @@ class lammps(object): def extract_setting(self, name): if name: name = name.encode() - self.lib.lammps_extract_atom.restype = c_int + self.lib.lammps_extract_setting.restype = c_int return int(self.lib.lammps_extract_setting(self.lmp,name)) # extract global info @@ -986,7 +986,7 @@ class PyLammps(object): elif line.startswith("Dihedrals"): parts = self._split_values(line) system['ndihedrals'] = int(self._get_pair(parts[0])[1]) - system['nangletypes'] = int(self._get_pair(parts[1])[1]) + system['ndihedraltypes'] = int(self._get_pair(parts[1])[1]) system['dihedral_style'] = self._get_pair(parts[2])[1] elif line.startswith("Impropers"): parts = self._split_values(line) diff --git a/src/Makefile b/src/Makefile index ee3159b588..1f0a294e8a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,6 +13,7 @@ ARLIB = liblammps_$@.a SHLIB = liblammps_$@.so ARLINK = liblammps.a SHLINK = liblammps.so +TMPNAME= tmp_$@_name OBJDIR = Obj_$@ OBJSHDIR = Obj_shared_$@ @@ -154,17 +155,17 @@ help: lmpinstalledpkgs.h: $(SRC) $(INC) @echo 'Gathering installed package information (may take a little while)' - @echo '#ifndef LMP_INSTALLED_PKGS_H' > lmpinstalledpkgs.tmp - @echo '#define LMP_INSTALLED_PKGS_H' >> lmpinstalledpkgs.tmp - @echo 'const char * LAMMPS_NS::LAMMPS::installed_packages[] = {' >> lmpinstalledpkgs.tmp + @echo '#ifndef LMP_INSTALLED_PKGS_H' > ${TMPNAME}.lmpinstalled + @echo '#define LMP_INSTALLED_PKGS_H' >> ${TMPNAME}.lmpinstalled + @echo 'const char * LAMMPS_NS::LAMMPS::installed_packages[] = {' >> ${TMPNAME}.lmpinstalled @for p in $(PACKAGEUC) $(PACKUSERUC); do info=$$($(SHELL) Package.sh $$p installed); \ - [ -n "$$info" ] && echo "\"$$info\"" | sed -e 's/".*package \(.*\)"/"\1",/' >> lmpinstalledpkgs.tmp || :; done - @echo ' NULL };' >> lmpinstalledpkgs.tmp - @echo '#endif' >> lmpinstalledpkgs.tmp + [ -n "$$info" ] && echo "\"$$info\"" | sed -e 's/".*package \(.*\)"/"\1",/' >> ${TMPNAME}.lmpinstalled || :; done + @echo ' NULL };' >> ${TMPNAME}.lmpinstalled + @echo '#endif' >> ${TMPNAME}.lmpinstalled @if [ -f lmpinstalledpkgs.h ]; \ - then test "`diff --brief lmpinstalledpkgs.tmp lmpinstalledpkgs.h`" != "" && \ - mv lmpinstalledpkgs.tmp lmpinstalledpkgs.h || rm lmpinstalledpkgs.tmp ; \ - else mv lmpinstalledpkgs.tmp lmpinstalledpkgs.h ; fi + then test "`diff --brief ${TMPNAME}.lmpinstalled lmpinstalledpkgs.h`" != "" && \ + mv ${TMPNAME}.lmpinstalled lmpinstalledpkgs.h || rm ${TMPNAME}.lmpinstalled ; \ + else mv ${TMPNAME}.lmpinstalled lmpinstalledpkgs.h ; fi # Build LAMMPS in one of 4 modes # exe = exe with static compile in Obj_machine (default) diff --git a/src/Purge.list b/src/Purge.list index 4eea4cb950..32b42f5ef1 100644 --- a/src/Purge.list +++ b/src/Purge.list @@ -35,6 +35,9 @@ fix_reax_bonds.cpp fix_reax_bonds.h pair_meam.cpp pair_meam.h +# removed on 27 September 2018 +pair_nb3b_harmonic_omp.h +pair_nb3b_harmonic_omp.cpp # renamed on 25 September 2018 compute_smd_triangle_mesh_vertices.h compute_smd_triangle_mesh_vertices.cpp diff --git a/src/USER-INTEL/intel_intrinsics_airebo.h b/src/USER-INTEL/intel_intrinsics_airebo.h index b20f9c8ad1..2b55b41ad1 100644 --- a/src/USER-INTEL/intel_intrinsics_airebo.h +++ b/src/USER-INTEL/intel_intrinsics_airebo.h @@ -1027,7 +1027,7 @@ VEC_INLINE inline __m256 _mm256_compress_ps(__m256 mask, __m256 a) { _mm256_store_ps(a_buf, a); int k = 0; for (int i = 0; i < 8; i++) { - if (mask[i]) { + if (mask_buf[i]) { dst_buf[k++] = a_buf[i]; } } @@ -1052,7 +1052,7 @@ VEC_INLINE inline __m256 _mm256_expand_ps(__m256 mask, __m256 a) { _mm256_store_ps(a_buf, a); int k = 0; for (int i = 0; i < 8; i++) { - if (mask[i]) { + if (mask_buf[i]) { dst_buf[i] = a_buf[k++]; } } diff --git a/src/USER-PLUMED/fix_plumed.cpp b/src/USER-PLUMED/fix_plumed.cpp index f8b06fdbed..635d08c573 100644 --- a/src/USER-PLUMED/fix_plumed.cpp +++ b/src/USER-PLUMED/fix_plumed.cpp @@ -213,8 +213,8 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) : // Define compute to calculate potential energy - id_pe = new char[7]; - id_pe = (char *) "plmd_pe"; + id_pe = new char[8]; + strcpy(id_pe,"plmd_pe"); char **newarg = new char*[3]; newarg[0] = id_pe; newarg[1] = (char *) "all"; @@ -226,8 +226,8 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) : // Define compute to calculate pressure tensor - id_press = new char[9]; - id_press = (char *) "plmd_press"; + id_press = new char[11]; + strcpy(id_press,"plmd_press"); newarg = new char*[5]; newarg[0] = id_press; newarg[1] = (char *) "all"; diff --git a/src/atom.cpp b/src/atom.cpp index 315097261b..9958fefc88 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -2044,9 +2044,7 @@ void Atom::delete_callback(const char *id, int flag) { if (id == NULL) return; - int ifix; - for (ifix = 0; ifix < modify->nfix; ifix++) - if (strcmp(id,modify->fix[ifix]->id) == 0) break; + int ifix = modify->find_fix(id); // compact the list of callbacks @@ -2054,6 +2052,8 @@ void Atom::delete_callback(const char *id, int flag) int match; for (match = 0; match < nextra_grow; match++) if (extra_grow[match] == ifix) break; + if ((nextra_grow == 0) || (match == nextra_grow)) + error->all(FLERR,"Trying to delete non-existent Atom::grow() callback"); for (int i = match; i < nextra_grow-1; i++) extra_grow[i] = extra_grow[i+1]; nextra_grow--; @@ -2062,6 +2062,8 @@ void Atom::delete_callback(const char *id, int flag) int match; for (match = 0; match < nextra_restart; match++) if (extra_restart[match] == ifix) break; + if ((nextra_restart == 0) || (match == nextra_restart)) + error->all(FLERR,"Trying to delete non-existent Atom::restart() callback"); for (int i = match; i < nextra_restart-1; i++) extra_restart[i] = extra_restart[i+1]; nextra_restart--; @@ -2070,6 +2072,8 @@ void Atom::delete_callback(const char *id, int flag) int match; for (match = 0; match < nextra_border; match++) if (extra_border[match] == ifix) break; + if ((nextra_border == 0) || (match == nextra_border)) + error->all(FLERR,"Trying to delete non-existent Atom::border() callback"); for (int i = match; i < nextra_border-1; i++) extra_border[i] = extra_border[i+1]; nextra_border--; diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index c3d55d76a4..83175b9afb 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -68,6 +68,7 @@ void CreateAtoms::command(int narg, char **arg) if (strcmp(arg[1],"box") == 0) { style = BOX; iarg = 2; + nregion = -1; } else if (strcmp(arg[1],"region") == 0) { style = REGION; if (narg < 3) error->all(FLERR,"Illegal create_atoms command"); @@ -708,6 +709,7 @@ void CreateAtoms::add_lattice() xmin = ymin = zmin = BIG; xmax = ymax = zmax = -BIG; + // convert to lattice coordinates and set bounding box domain->lattice->bbox(1,bboxlo[0],bboxlo[1],bboxlo[2], xmin,ymin,zmin,xmax,ymax,zmax); domain->lattice->bbox(1,bboxhi[0],bboxlo[1],bboxlo[2], @@ -727,13 +729,15 @@ void CreateAtoms::add_lattice() // narrow down min/max further by extent of the region, if possible - if (domain->regions[nregion]->bboxflag) { - const double rxmin = domain->regions[nregion]->extent_xlo; - const double rxmax = domain->regions[nregion]->extent_xhi; - const double rymin = domain->regions[nregion]->extent_ylo; - const double rymax = domain->regions[nregion]->extent_yhi; - const double rzmin = domain->regions[nregion]->extent_zlo; - const double rzmax = domain->regions[nregion]->extent_zhi; + if ((style == REGION) && domain->regions[nregion]->bboxflag) { + double rxmin = domain->regions[nregion]->extent_xlo; + double rxmax = domain->regions[nregion]->extent_xhi; + double rymin = domain->regions[nregion]->extent_ylo; + double rymax = domain->regions[nregion]->extent_yhi; + double rzmin = domain->regions[nregion]->extent_zlo; + double rzmax = domain->regions[nregion]->extent_zhi; + domain->lattice->box2lattice(rxmin,rymin,rzmin); + domain->lattice->box2lattice(rxmax,rymax,rzmax); if (rxmin > xmin) xmin = (rxmin > xmax) ? xmax : rxmin; if (rxmax < xmax) xmax = (rxmax < xmin) ? xmin : rxmax; diff --git a/src/info.cpp b/src/info.cpp index ec4e3ce9a9..76fb75d7d7 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -532,6 +532,12 @@ void Info::command(int narg, char **arg) fprintf(out,"Region[%3d]: %s, style = %s, side = %s\n", i, regs[i]->id, regs[i]->style, regs[i]->interior ? "in" : "out"); + if (regs[i]->bboxflag) + fprintf(out," Boundary: lo %g %g %g hi %g %g %g\n", + regs[i]->extent_xlo, regs[i]->extent_ylo, + regs[i]->extent_zlo, regs[i]->extent_xhi, + regs[i]->extent_yhi, regs[i]->extent_zhi); + else fprintf(out," No Boundary\n"); } } diff --git a/src/variable.cpp b/src/variable.cpp index 9c837719f2..2b15e1570f 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -1352,7 +1352,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (index1 > compute->size_vector && compute->size_vector_variable == 0) print_var_error(FLERR,"Variable formula compute vector " - "is accessed out-of-range",ivar); + "is accessed out-of-range",ivar,0); if (update->whichflag == 0) { if (compute->invoked_vector != update->ntimestep) print_var_error(FLERR,"Compute used in variable between runs " @@ -1381,10 +1381,10 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (index1 > compute->size_array_rows && compute->size_array_rows_variable == 0) print_var_error(FLERR,"Variable formula compute array " - "is accessed out-of-range",ivar); + "is accessed out-of-range",ivar,0); if (index2 > compute->size_array_cols) print_var_error(FLERR,"Variable formula compute array " - "is accessed out-of-range",ivar); + "is accessed out-of-range",ivar,0); if (update->whichflag == 0) { if (compute->invoked_array != update->ntimestep) print_var_error(FLERR,"Compute used in variable between runs " @@ -1494,7 +1494,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (index2 > compute->size_peratom_cols) print_var_error(FLERR,"Variable formula compute " - "array is accessed out-of-range",ivar); + "array is accessed out-of-range",ivar,0); if (update->whichflag == 0) { if (compute->invoked_peratom != update->ntimestep) print_var_error(FLERR,"Compute used in variable " @@ -1555,7 +1555,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) "vector-style variable formula",ivar); if (index1 > compute->size_peratom_cols) print_var_error(FLERR,"Variable formula compute array " - "is accessed out-of-range",ivar); + "is accessed out-of-range",ivar,0); if (update->whichflag == 0) { if (compute->invoked_peratom != update->ntimestep) print_var_error(FLERR,"Compute used in variable " @@ -1649,7 +1649,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (index1 > fix->size_vector && fix->size_vector_variable == 0) print_var_error(FLERR,"Variable formula fix vector is " - "accessed out-of-range",ivar); + "accessed out-of-range",ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) print_var_error(FLERR,"Fix in variable not computed " "at a compatible time",ivar); @@ -1671,10 +1671,10 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (index1 > fix->size_array_rows && fix->size_array_rows_variable == 0) print_var_error(FLERR,"Variable formula fix array is " - "accessed out-of-range",ivar); + "accessed out-of-range",ivar,0); if (index2 > fix->size_array_cols) print_var_error(FLERR,"Variable formula fix array is " - "accessed out-of-range",ivar); + "accessed out-of-range",ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) print_var_error(FLERR,"Fix in variable not computed at a " "compatible time",ivar); @@ -1775,7 +1775,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (index2 > fix->size_peratom_cols) print_var_error(FLERR,"Variable formula fix array is " - "accessed out-of-range",ivar); + "accessed out-of-range",ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->peratom_freq) print_var_error(FLERR,"Fix in variable not computed " @@ -1822,7 +1822,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) "equal-style variable formula",ivar); if (index1 > fix->size_peratom_cols) print_var_error(FLERR,"Variable formula fix array " - "is accessed out-of-range",ivar); + "is accessed out-of-range",ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->peratom_freq) print_var_error(FLERR,"Fix in variable not computed at " @@ -2202,18 +2202,18 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) argstack[nargstack++] = value1 * value2; else if (opprevious == DIVIDE) { if (value2 == 0.0) - print_var_error(FLERR,"Divide by 0 in variable formula",ivar); + print_var_error(FLERR,"Divide by 0 in variable formula",ivar,0); argstack[nargstack++] = value1 / value2; } else if (opprevious == MODULO) { if (value2 == 0.0) - print_var_error(FLERR,"Modulo 0 in variable formula",ivar); + print_var_error(FLERR,"Modulo 0 in variable formula",ivar,0); argstack[nargstack++] = fmod(value1,value2); } else if (opprevious == CARAT) { if (value2 == 0.0) argstack[nargstack++] = 1.0; else if ((value1 == 0.0) && (value2 < 0.0)) print_var_error(FLERR,"Invalid power expression in " - "variable formula",ivar); + "variable formula",ivar,0); else argstack[nargstack++] = pow(value1,value2); } else if (opprevious == UNARY) { argstack[nargstack++] = -value2; @@ -3372,7 +3372,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, else { if (value1 < 0.0) print_var_error(FLERR,"Sqrt of negative value in " - "variable formula",ivar); + "variable formula",ivar,0); argstack[nargstack++] = sqrt(value1); } @@ -3388,7 +3388,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, else { if (value1 <= 0.0) print_var_error(FLERR,"Log of zero/negative value in " - "variable formula",ivar); + "variable formula",ivar,0); argstack[nargstack++] = log(value1); } } else if (strcmp(word,"log") == 0) { @@ -3398,7 +3398,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, else { if (value1 <= 0.0) print_var_error(FLERR,"Log of zero/negative value in " - "variable formula",ivar); + "variable formula",ivar,0); argstack[nargstack++] = log10(value1); } } else if (strcmp(word,"abs") == 0) { @@ -3429,7 +3429,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, if (tree) newtree->type = ASIN; else { if (value1 < -1.0 || value1 > 1.0) - print_var_error(FLERR,"Arcsin of invalid value in variable formula",ivar); + print_var_error(FLERR,"Arcsin of invalid value in variable formula",ivar,0); argstack[nargstack++] = asin(value1); } } else if (strcmp(word,"acos") == 0) { @@ -3438,7 +3438,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, if (tree) newtree->type = ACOS; else { if (value1 < -1.0 || value1 > 1.0) - print_var_error(FLERR,"Arccos of invalid value in variable formula",ivar); + print_var_error(FLERR,"Arccos of invalid value in variable formula",ivar,0); argstack[nargstack++] = acos(value1); } } else if (strcmp(word,"atan") == 0) { @@ -4032,7 +4032,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, } else if (index && compute->array_flag) { if (index > compute->size_array_cols) print_var_error(FLERR,"Variable formula compute array " - "is accessed out-of-range",ivar); + "is accessed out-of-range",ivar,0); if (update->whichflag == 0) { if (compute->invoked_array != update->ntimestep) print_var_error(FLERR,"Compute used in variable between runs " @@ -4652,14 +4652,22 @@ char *Variable::find_next_comma(char *str) ------------------------------------------------------------------------- */ void Variable::print_var_error(const char *srcfile, int lineno, - const char *errmsg, int ivar) + const char *errmsg, int ivar, int global) { if ((ivar >= 0) && (ivar < nvar)) { char msg[128]; snprintf(msg,128,"Variable %s: %s",names[ivar],errmsg); - error->all(srcfile,lineno,msg); - } else error->all(srcfile,lineno,errmsg); + if (global) + error->all(srcfile,lineno,msg); + else + error->one(srcfile,lineno,msg); + } else { + if (global) + error->all(srcfile,lineno,errmsg); + else + error->one(srcfile,lineno,errmsg); + } } /* ---------------------------------------------------------------------- diff --git a/src/variable.h b/src/variable.h index f0f3b2e6b6..a37ee4cff7 100644 --- a/src/variable.h +++ b/src/variable.h @@ -125,7 +125,7 @@ class Variable : protected Pointers { double constant(char *); int parse_args(char *, char **); char *find_next_comma(char *); - void print_var_error(const char *, int, const char *, int); + void print_var_error(const char *, int, const char *, int, int global=1); void print_tree(Tree *, int); };