Merge branch 'develop' into gran-temp
This commit is contained in:
52
src/atom.cpp
52
src/atom.cpp
@ -188,12 +188,6 @@ Atom::Atom(LAMMPS *_lmp) : Pointers(_lmp)
|
||||
cc = cc_flux = nullptr;
|
||||
edpd_temp = edpd_flux = edpd_cv = nullptr;
|
||||
|
||||
// MESONT package
|
||||
|
||||
length = nullptr;
|
||||
buckling = nullptr;
|
||||
bond_nt = nullptr;
|
||||
|
||||
// MACHDYN package
|
||||
|
||||
contact_radius = nullptr;
|
||||
@ -532,12 +526,6 @@ void Atom::peratom_create()
|
||||
add_peratom("cc",&cc,DOUBLE,1);
|
||||
add_peratom("cc_flux",&cc_flux,DOUBLE,1,1); // set per-thread flag
|
||||
|
||||
// MESONT package
|
||||
|
||||
add_peratom("length",&length,DOUBLE,0);
|
||||
add_peratom("buckling",&buckling,INT,0);
|
||||
add_peratom("bond_nt",&bond_nt,tagintsize,2);
|
||||
|
||||
// SPH package
|
||||
|
||||
add_peratom("rho",&rho,DOUBLE,0);
|
||||
@ -1083,7 +1071,7 @@ void Atom::data_atoms(int n, char *buf, tagint id_offset, tagint mol_offset,
|
||||
*next = '\n';
|
||||
// set bounds for my proc
|
||||
// if periodic and I am lo/hi proc, adjust bounds by EPSILON
|
||||
// insures all data atoms will be owned even with round-off
|
||||
// ensures all data atoms will be owned even with round-off
|
||||
|
||||
int triclinic = domain->triclinic;
|
||||
|
||||
@ -1932,11 +1920,15 @@ void Atom::set_mass(const char *file, int line, const char *str, int type_offset
|
||||
|
||||
void Atom::set_mass(const char *file, int line, int itype, double value)
|
||||
{
|
||||
if (mass == nullptr) error->all(file,line, "Cannot set mass for atom style {}", atom_style);
|
||||
if (mass == nullptr)
|
||||
error->all(file,line, "Cannot set per-type mass for atom style {}", atom_style);
|
||||
if (itype < 1 || itype > ntypes)
|
||||
error->all(file,line,"Invalid type {} for atom mass {}", itype, value);
|
||||
if (value <= 0.0) error->all(file,line,"Invalid atom mass value {}", value);
|
||||
|
||||
if (value <= 0.0) {
|
||||
if (comm->me == 0)
|
||||
error->warning(file,line,"Ignoring invalid mass value {} for atom type {}", value, itype);
|
||||
return;
|
||||
}
|
||||
mass[itype] = value;
|
||||
mass_setflag[itype] = 1;
|
||||
}
|
||||
@ -2219,7 +2211,7 @@ void Atom::add_label_map()
|
||||
|
||||
void Atom::first_reorder()
|
||||
{
|
||||
// insure there is one extra atom location at end of arrays for swaps
|
||||
// ensure there is one extra atom location at end of arrays for swaps
|
||||
|
||||
if (nlocal == nmax) avec->grow(0);
|
||||
|
||||
@ -2270,7 +2262,7 @@ void Atom::sort()
|
||||
memory->create(permute,maxnext,"atom:permute");
|
||||
}
|
||||
|
||||
// insure there is one extra atom location at end of arrays for swaps
|
||||
// ensure there is one extra atom location at end of arrays for swaps
|
||||
|
||||
if (nlocal == nmax) avec->grow(0);
|
||||
|
||||
@ -2363,6 +2355,18 @@ void Atom::setup_sort_bins()
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef LMP_GPU
|
||||
if (userbinsize == 0.0) {
|
||||
auto ifix = dynamic_cast<FixGPU *>(modify->get_fix_by_id("package_gpu"));
|
||||
if (ifix) {
|
||||
const double subx = domain->subhi[0] - domain->sublo[0];
|
||||
const double suby = domain->subhi[1] - domain->sublo[1];
|
||||
const double subz = domain->subhi[2] - domain->sublo[2];
|
||||
binsize = ifix->binsize(subx, suby, subz, atom->nlocal, 0.5 * neighbor->cutneighmax);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
double bininv = 1.0/binsize;
|
||||
|
||||
// nbin xyz = local bins
|
||||
@ -2935,12 +2939,6 @@ void *Atom::extract(const char *name)
|
||||
if (strcmp(name,"cv") == 0) return (void *) cv;
|
||||
if (strcmp(name,"vest") == 0) return (void *) vest;
|
||||
|
||||
// MESONT package
|
||||
|
||||
if (strcmp(name,"length") == 0) return (void *) length;
|
||||
if (strcmp(name,"buckling") == 0) return (void *) buckling;
|
||||
if (strcmp(name,"bond_nt") == 0) return (void *) bond_nt;
|
||||
|
||||
// MACHDYN package
|
||||
|
||||
if (strcmp(name, "contact_radius") == 0) return (void *) contact_radius;
|
||||
@ -3061,12 +3059,6 @@ int Atom::extract_datatype(const char *name)
|
||||
if (strcmp(name,"cv") == 0) return LAMMPS_DOUBLE;
|
||||
if (strcmp(name,"vest") == 0) return LAMMPS_DOUBLE_2D;
|
||||
|
||||
// MESONT package
|
||||
|
||||
if (strcmp(name,"length") == 0) return LAMMPS_DOUBLE;
|
||||
if (strcmp(name,"buckling") == 0) return LAMMPS_INT;
|
||||
if (strcmp(name,"bond_nt") == 0) return LAMMPS_TAGINT_2D;
|
||||
|
||||
// MACHDYN package
|
||||
|
||||
if (strcmp(name, "contact_radius") == 0) return LAMMPS_DOUBLE;
|
||||
|
||||
Reference in New Issue
Block a user