Unverified Commit 22ed1756 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #2151 from akohlmey/move-ubuf-to-lmptype

Move definition(s) of union ubuf to lmptype.h
parents 5f86bac4 6b783d31
Loading
Loading
Loading
Loading
+39 −7
Original line number Diff line number Diff line
@@ -8,7 +8,14 @@ Syntax

.. code-block:: LAMMPS

   reset_ids
   reset_ids keyword values ...

   * zero or more keyword/value pairs may be appended
   * keyword = *sort*

.. parsed-literal::

   *sort* value = *yes* or *no*

Examples
""""""""
@@ -16,6 +23,7 @@ Examples
.. code-block:: LAMMPS

   reset_ids
   reset_ids sort yes

Description
"""""""""""
@@ -33,11 +41,32 @@ e.g. due to atoms moving outside a simulation box with fixed
boundaries (see the "boundary command"), or due to evaporation (see
the "fix evaporate" command).

Note that the resetting of IDs is not really a compression, where gaps
in atom IDs are removed by decrementing atom IDs that are larger.
Instead the IDs for all atoms are erased, and new IDs are assigned so
that the atoms owned by an individual processor have consecutive IDs,
as the :doc:`create_atoms <create_atoms>` command explains.
If the *sort* keyword is used with a setting of *yes*, then the
assignment of new atom IDs will be the same no matter how many
processors LAMMPS is running on.  This is done by first doing a
spatial sort of all the atoms into bins and sorting them within each
bin.  Because the set of bins is independent of the number of
processors, this enables a consistent assignment of new IDs to each
atom.

This can be useful to do after using the "create_atoms" command and/or
"replicate" command.  In general those commands do not guarantee
assignment of the same atom ID to the same physical atom when LAMMPS
is run on different numbers of processors.  Enforcing consistent IDs
can be useful for debugging or comparing output from two different
runs.

Note that the spatial sort requires communication of atom IDs and
coordinates between processors in an all-to-all manner.  This is done
efficiently in LAMMPS, but it is more expensive than how atom IDs are
reset without sorting.

Note that whether sorting or not, the resetting of IDs is not a
compression, where gaps in atom IDs are removed by decrementing atom
IDs that are larger.  Instead the IDs for all atoms are erased, and
new IDs are assigned so that the atoms owned by an individual
processor have consecutive IDs, as the :doc:`create_atoms
<create_atoms>` command explains.

.. note::

@@ -59,4 +88,7 @@ Related commands

:doc:`delete_atoms <delete_atoms>`

**Default:** none
Default
"""""""

By default, *sort* is no.
+1 −1
Original line number Diff line number Diff line
@@ -554,7 +554,7 @@ void PairADP::read_file(char *filename)
      ValueTokenizer values = reader.next_values(1);
      file->nelements = values.next_int();

      if (values.count() != file->nelements + 1)
      if ((int)values.count() != file->nelements + 1)
        error->one(FLERR,"Incorrect element names in ADP potential file");

      file->elements = new char*[file->nelements];
+1 −1
Original line number Diff line number Diff line
@@ -3488,7 +3488,7 @@ void PairAIREBO::read_file(char *filename)
      // global parameters
      current_section = "global parameters";

      for(int i = 0; i < params.size(); i++) {
      for(int i = 0; i < (int)params.size(); i++) {
        *params[i] = reader.next_double();
      }

+1 −1
Original line number Diff line number Diff line
@@ -312,7 +312,7 @@ double PairComb3::init_one(int i, int j)

void PairComb3::read_lib()
{
  int i,j,k,l,m;
  int i,j,k,l;
  int ii,jj,kk,ll,mm,iii;

  // open library file on proc 0
+0 −2
Original line number Diff line number Diff line
@@ -469,8 +469,6 @@ void PairEAM::read_file(char *filename)
    PotentialFileReader reader(lmp, filename, "EAM");

    try {
      char * line = nullptr;

      reader.skip_line();

      ValueTokenizer values = reader.next_values(2);
Loading