Merge remote-tracking branch 'lammps-ro/master' into lammps-icms
# Resolved Conflicts: # doc/Manual.html # doc/Manual.txt # src/REAX/fix_reax_bonds.cpp # src/REAX/fix_reax_bonds.h # src/REAX/pair_reax.cpp # src/USER-MGPT/pair_mgpt.cpp # src/USER-SMTBQ/pair_smtbq.cpp # src/lammps.cpp # src/timer.cpp
This commit is contained in:
46
src/atom.cpp
46
src/atom.cpp
@ -11,12 +11,12 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "mpi.h"
|
||||
#include "math.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "limits.h"
|
||||
#include <mpi.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include "atom.h"
|
||||
#include "style_atom.h"
|
||||
#include "atom_vec.h"
|
||||
@ -611,11 +611,11 @@ void Atom::tag_check()
|
||||
|
||||
if (minall < 0) error->all(FLERR,"One or more Atom IDs is negative");
|
||||
if (maxall >= MAXTAGINT) error->all(FLERR,"One or more atom IDs is too big");
|
||||
if (maxall > 0 && minall == 0)
|
||||
if (maxall > 0 && minall == 0)
|
||||
error->all(FLERR,"One or more atom IDs is zero");
|
||||
if (maxall > 0 && tag_enable == 0)
|
||||
error->all(FLERR,"Non-zero atom IDs with atom_modify id = no");
|
||||
if (maxall == 0 && natoms && tag_enable)
|
||||
if (maxall == 0 && natoms && tag_enable)
|
||||
error->all(FLERR,"All atom IDs = 0 but atom_modify id = yes");
|
||||
if (tag_enable && maxall < natoms)
|
||||
error->all(FLERR,"Duplicate atom IDs exist");
|
||||
@ -735,23 +735,23 @@ void Atom::deallocate_topology()
|
||||
memory->destroy(atom->angle_atom3);
|
||||
atom->angle_type = NULL;
|
||||
atom->angle_atom1 = atom->angle_atom2 = atom->angle_atom3 = NULL;
|
||||
|
||||
|
||||
memory->destroy(atom->dihedral_type);
|
||||
memory->destroy(atom->dihedral_atom1);
|
||||
memory->destroy(atom->dihedral_atom2);
|
||||
memory->destroy(atom->dihedral_atom3);
|
||||
memory->destroy(atom->dihedral_atom4);
|
||||
atom->dihedral_type = NULL;
|
||||
atom->dihedral_atom1 = atom->dihedral_atom2 =
|
||||
atom->dihedral_atom1 = atom->dihedral_atom2 =
|
||||
atom->dihedral_atom3 = atom->dihedral_atom4 = NULL;
|
||||
|
||||
|
||||
memory->destroy(atom->improper_type);
|
||||
memory->destroy(atom->improper_atom1);
|
||||
memory->destroy(atom->improper_atom2);
|
||||
memory->destroy(atom->improper_atom3);
|
||||
memory->destroy(atom->improper_atom4);
|
||||
atom->improper_type = NULL;
|
||||
atom->improper_atom1 = atom->improper_atom2 =
|
||||
atom->improper_atom1 = atom->improper_atom2 =
|
||||
atom->improper_atom3 = atom->improper_atom4 = NULL;
|
||||
}
|
||||
|
||||
@ -760,7 +760,7 @@ void Atom::deallocate_topology()
|
||||
call style-specific routine to parse line
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Atom::data_atoms(int n, char *buf, tagint id_offset, int type_offset,
|
||||
void Atom::data_atoms(int n, char *buf, tagint id_offset, int type_offset,
|
||||
int shiftflag, double *shift)
|
||||
{
|
||||
int m,xptr,iptr;
|
||||
@ -865,7 +865,7 @@ void Atom::data_atoms(int n, char *buf, tagint id_offset, int type_offset,
|
||||
(((imageint) (atoi(values[iptr+2]) + IMGMAX) & IMGMASK) << IMG2BITS);
|
||||
else imagedata = ((imageint) IMGMAX << IMG2BITS) |
|
||||
((imageint) IMGMAX << IMGBITS) | IMGMAX;
|
||||
|
||||
|
||||
xdata[0] = atof(values[xptr]);
|
||||
xdata[1] = atof(values[xptr+1]);
|
||||
xdata[2] = atof(values[xptr+2]);
|
||||
@ -951,7 +951,7 @@ void Atom::data_vels(int n, char *buf, tagint id_offset)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Atom::data_bonds(int n, char *buf, int *count, tagint id_offset,
|
||||
int type_offset)
|
||||
int type_offset)
|
||||
{
|
||||
int m,tmp,itype;
|
||||
tagint atom1,atom2;
|
||||
@ -1004,7 +1004,7 @@ void Atom::data_bonds(int n, char *buf, int *count, tagint id_offset,
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Atom::data_angles(int n, char *buf, int *count, tagint id_offset,
|
||||
int type_offset)
|
||||
int type_offset)
|
||||
{
|
||||
int m,tmp,itype;
|
||||
tagint atom1,atom2,atom3;
|
||||
@ -1083,7 +1083,7 @@ void Atom::data_dihedrals(int n, char *buf, int *count, tagint id_offset,
|
||||
for (int i = 0; i < n; i++) {
|
||||
next = strchr(buf,'\n');
|
||||
*next = '\0';
|
||||
sscanf(buf,"%d %d "
|
||||
sscanf(buf,"%d %d "
|
||||
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT,
|
||||
&tmp,&itype,&atom1,&atom2,&atom3,&atom4);
|
||||
if (id_offset) {
|
||||
@ -1170,7 +1170,7 @@ void Atom::data_impropers(int n, char *buf, int *count, tagint id_offset,
|
||||
for (int i = 0; i < n; i++) {
|
||||
next = strchr(buf,'\n');
|
||||
*next = '\0';
|
||||
sscanf(buf,"%d %d "
|
||||
sscanf(buf,"%d %d "
|
||||
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT,
|
||||
&tmp,&itype,&atom1,&atom2,&atom3,&atom4);
|
||||
if (id_offset) {
|
||||
@ -1292,7 +1292,7 @@ void Atom::data_bonus(int n, char *buf, AtomVec *avec_bonus, tagint id_offset)
|
||||
call style-specific routine to parse line
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Atom::data_bodies(int n, char *buf, AtomVecBody *avec_body,
|
||||
void Atom::data_bodies(int n, char *buf, AtomVecBody *avec_body,
|
||||
tagint id_offset)
|
||||
{
|
||||
int j,m,tagdata,ninteger,ndouble;
|
||||
@ -1501,7 +1501,7 @@ void Atom::add_molecule(int narg, char **arg)
|
||||
{
|
||||
if (narg < 1) error->all(FLERR,"Illegal molecule command");
|
||||
|
||||
if (find_molecule(arg[0]) >= 0)
|
||||
if (find_molecule(arg[0]) >= 0)
|
||||
error->all(FLERR,"Reuse of molecule template ID");
|
||||
|
||||
// 1st molecule in set stores nset = # of mols, others store nset = 0
|
||||
@ -1548,7 +1548,7 @@ void Atom::add_molecule_atom(Molecule *onemol, int iatom,
|
||||
if (onemol->qflag && q_flag) q[ilocal] = onemol->q[iatom];
|
||||
if (onemol->radiusflag && radius_flag) radius[ilocal] = onemol->radius[iatom];
|
||||
if (onemol->rmassflag && rmass_flag) rmass[ilocal] = onemol->rmass[iatom];
|
||||
else if (rmass_flag)
|
||||
else if (rmass_flag)
|
||||
rmass[ilocal] = 4.0*MY_PI/3.0 *
|
||||
radius[ilocal]*radius[ilocal]*radius[ilocal];
|
||||
|
||||
@ -2050,9 +2050,9 @@ void *Atom::extract(char *name)
|
||||
if (strcmp(name, "contact_radius") == 0) return (void *) contact_radius;
|
||||
if (strcmp(name, "smd_data_9") == 0) return (void *) smd_data_9;
|
||||
if (strcmp(name, "smd_stress") == 0) return (void *) smd_stress;
|
||||
if (strcmp(name, "eff_plastic_strain") == 0)
|
||||
if (strcmp(name, "eff_plastic_strain") == 0)
|
||||
return (void *) eff_plastic_strain;
|
||||
if (strcmp(name, "eff_plastic_strain_rate") == 0)
|
||||
if (strcmp(name, "eff_plastic_strain_rate") == 0)
|
||||
return (void *) eff_plastic_strain_rate;
|
||||
if (strcmp(name, "damage") == 0) return (void *) damage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user