From e01ef140253b9d58ba4f19347e07390ca3dc0234 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Sun, 12 Jun 2022 10:06:16 -0600 Subject: [PATCH 001/445] Adding documentation and integration fix --- doc/src/atom_style.rst | 14 ++++--- doc/src/fix_temp_integrate.rst | 75 ++++++++++++++++++++++++++++++++++ doc/src/set.rst | 9 +++- 3 files changed, 91 insertions(+), 7 deletions(-) create mode 100644 doc/src/fix_temp_integrate.rst diff --git a/doc/src/atom_style.rst b/doc/src/atom_style.rst index bd0c193962..5b93c56887 100644 --- a/doc/src/atom_style.rst +++ b/doc/src/atom_style.rst @@ -121,6 +121,8 @@ quantities. +--------------+-----------------------------------------------------+--------------------------------------+ | *sphere* | diameter, mass, angular velocity | granular models | +--------------+-----------------------------------------------------+--------------------------------------+ +| *sphere/temp*| diameter, mass, angular velocity, temperature | thermal granular models | ++--------------+-----------------------------------------------------+--------------------------------------+ | *bpm/sphere* | diameter, mass, angular velocity, quaternion | granular bonded particle models (BPM)| +--------------+-----------------------------------------------------+--------------------------------------+ | *spin* | magnetic moment | system with magnetic particles | @@ -144,7 +146,7 @@ quantities. output the custom values. All of the above styles define point particles, except the *sphere*, -*bpm/sphere*, *ellipsoid*, *electron*, *peri*, *wavepacket*, *line*, +*sphere/temp*, *bpm/sphere*, *ellipsoid*, *electron*, *peri*, *wavepacket*, *line*, *tri*, and *body* styles, which define finite-size particles. See the :doc:`Howto spherical ` page for an overview of using finite-size particle models with LAMMPS. @@ -154,15 +156,15 @@ per-type basis, using the :doc:`mass ` command, The finite-size particle styles assign mass to individual particles on a per-particle basis. -For the *sphere* and *bpm/sphere* styles, the particles are spheres and each stores a -per-particle diameter and mass. If the diameter > 0.0, the particle -is a finite-size sphere. If the diameter = 0.0, it is a point -particle. Note that by use of the *disc* keyword with the :doc:`fix +For the *sphere*, *sphere/temp*, and *bpm/sphere* styles, the particles +are spheres and each stores a per-particle diameter and mass. If the +diameter > 0.0, the particle is a finite-size sphere. If the diameter = 0.0, +it is a point particle. Note that by use of the *disc* keyword with the :doc:`fix nve/sphere `, :doc:`fix nvt/sphere `, :doc:`fix nph/sphere `, :doc:`fix npt/sphere ` commands for the *sphere* style, spheres can be effectively treated as 2d discs for a 2d simulation if desired. See also the :doc:`set -density/disc ` command. The *sphere* and *bpm/sphere* styles take an optional 0 +density/disc ` command. These styles take an optional 0 or 1 argument. A value of 0 means the radius of each sphere is constant for the duration of the simulation. A value of 1 means the radii may vary dynamically during the simulation, e.g. due to use of diff --git a/doc/src/fix_temp_integrate.rst b/doc/src/fix_temp_integrate.rst new file mode 100644 index 0000000000..c2f1257075 --- /dev/null +++ b/doc/src/fix_temp_integrate.rst @@ -0,0 +1,75 @@ +.. index:: fix temp/integrate + +fix temp/integrate command +========================== + +Syntax +"""""" + +.. parsed-literal:: + + fix ID group-ID temp/integrate style values ... + +* ID, group-ID are documented in :doc:`fix ` command +* temp/integrate = style name of this fix command +* one style with corresponding value(s) needs to be listed + + .. parsed-literal:: + + style = *constant* or *type* + *constant* = cp + cp = value of specifc heat (energy/(mass * temperature) units) + *type* = cp1 ... cpN + cpN = value of specifc heat for type N (energy/(mass * temperature) units) + +* + +Examples +"""""""" + +.. code-block:: LAMMPS + + fix 1 all temp/integrate constant 1.0 + fix 1 all temp/integrate type 1.0 0.5 + +Description +""""""""""" + +Perform plain time integration to update temperature for atoms in the +group each timestep. The specific heat of atoms can be defined using either +the *constant* or *type* keywords. For style *constant*, the specific heat +is a constant value *cp* for all atoms. For style *type*, *N* different values +of the specific heat are defined, one for each of the *N* types of atoms. + + + +---------- + +.. include:: accel_styles.rst + +---------- + +Restart, fix_modify, output, run start/stop, minimize info +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +No information about this fix is written to :doc:`binary restart files `. None of the :doc:`fix_modify ` options +are relevant to this fix. No global or per-atom quantities are stored +by this fix for access by various :doc:`output commands `. +No parameter of this fix can be used with the *start/stop* keywords of +the :doc:`run ` command. This fix is not invoked during :doc:`energy minimization `. + +Restrictions +"""""""""""" + +This fix requires that atoms store temperature and a heat flux +as defined by the :doc:`atom_style sphere/temp ` command. + +Related commands +"""""""""""""""" + +:doc:`pair granular ` + +Default +""""""" + +none diff --git a/doc/src/set.rst b/doc/src/set.rst index cc1d2766e3..d11d3fc229 100644 --- a/doc/src/set.rst +++ b/doc/src/set.rst @@ -18,7 +18,7 @@ Syntax *dipole/random* or *quat* or *spin* or *spin/random* or *quat* or *quat/random* or *diameter* or *shape* or *length* or *tri* or *theta* or *theta/random* or *angmom* or - *omega* or *mass* or *density* or *density/disc* or + *omega* or *mass* or *density* or *density/disc* or *temperature* or *volume* or *image* or *bond* or *angle* or *dihedral* or *improper* or *sph/e* or *sph/cv* or *sph/rho* or *smd/contact/radius* or *smd/mass/density* or *dpd/theta* or @@ -95,6 +95,8 @@ Syntax value can be an atom-style variable (see below) *density/disc* value = particle density for a 2d disc or ellipse (mass/distance\^2 units) value can be an atom-style variable (see below) + *temperature* value = particle temperature for a finite-size particle particle (temperature units)s + value can be an atom-style variable (see below) *volume* value = particle volume for Peridynamic particle (distance\^3 units) value can be an atom-style variable (see below) *image* nx ny nz @@ -410,6 +412,11 @@ assumed to be in mass/distance\^2 units). If none of these cases are valid, then the mass is set to the density value directly (the input density is assumed to be in mass units). +Keyword *temperature* sets the temperature of a finite-size particle +as defined by the GRANULAR package. Currently, only +:doc:`atom_style sphere/temperature ` defines particles +with this attribute. The values for the temperature must be positive. + Keyword *volume* sets the volume of all selected particles. Currently, only the :doc:`atom_style peri ` command defines particles with a volume attribute. Note that this command does not adjust the From c6d59fc5267bede32772403f683c136e36d8528a Mon Sep 17 00:00:00 2001 From: jtclemm Date: Sun, 12 Jun 2022 10:09:26 -0600 Subject: [PATCH 002/445] adding documentation and integration fix --- src/.gitignore | 6 +- src/GRANULAR/atom_vec_sphere_temperature.cpp | 160 +++++++++++++++++++ src/GRANULAR/atom_vec_sphere_temperature.h | 51 ++++++ src/GRANULAR/fix_temp_integrate.cpp | 142 ++++++++++++++++ src/GRANULAR/fix_temp_integrate.h | 50 ++++++ src/atom.cpp | 18 +++ src/atom.h | 2 + src/set.cpp | 19 ++- 8 files changed, 445 insertions(+), 3 deletions(-) create mode 100644 src/GRANULAR/atom_vec_sphere_temperature.cpp create mode 100644 src/GRANULAR/atom_vec_sphere_temperature.h create mode 100644 src/GRANULAR/fix_temp_integrate.cpp create mode 100644 src/GRANULAR/fix_temp_integrate.h diff --git a/src/.gitignore b/src/.gitignore index 6657256e8f..7a6bc1beb4 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -421,14 +421,14 @@ /atom_vec_full.h /atom_vec_full_hars.cpp /atom_vec_full_hars.h -/atom_vec_granular.cpp -/atom_vec_granular.h /atom_vec_molecular.cpp /atom_vec_molecular.h /atom_vec_oxdna.cpp /atom_vec_oxdna.h /atom_vec_peri.cpp /atom_vec_peri.h +/atom_vec_sphere_temperature.cpp +/atom_vec_sphere_temperature.h /atom_vec_template.cpp /atom_vec_template.h /body_nparticle.cpp @@ -1510,6 +1510,8 @@ /fix_smd_wall_surface.h /fix_srp.cpp /fix_srp.h +/fix_temp_integrate.cpp +/fix_temp_integrate.h /fix_tfmc.cpp /fix_tfmc.h /fix_ttm.cpp diff --git a/src/GRANULAR/atom_vec_sphere_temperature.cpp b/src/GRANULAR/atom_vec_sphere_temperature.cpp new file mode 100644 index 0000000000..5b62a2c279 --- /dev/null +++ b/src/GRANULAR/atom_vec_sphere_temperature.cpp @@ -0,0 +1,160 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "atom_vec_sphere_temperature.h" + +#include "atom.h" +#include "error.h" +#include "fix.h" +#include "fix_adapt.h" +#include "math_const.h" +#include "modify.h" + +using namespace LAMMPS_NS; +using namespace MathConst; + +/* ---------------------------------------------------------------------- */ + +AtomVecSphereTemperature::AtomVecSphereTemperature(LAMMPS *lmp) : AtomVec(lmp) +{ + mass_type = PER_ATOM; + molecular = Atom::ATOMIC; + + atom->sphere_flag = 1; + atom->radius_flag = atom->rmass_flag = atom->omega_flag = atom->torque_flag = 1; + atom->temperature_flag = atom->heatflux_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file + + fields_grow = {"radius", "rmass", "omega", "torque", "temperature", "heatflux"}; + fields_copy = {"radius", "rmass", "omega", "temperature"}; + fields_comm_vel = {"omega", "temperature"}; + fields_reverse = {"torque", "heatflux"}; + fields_border = {"radius", "rmass", "temperature"}; + fields_border_vel = {"radius", "rmass", "omega", "temperature"}; + fields_exchange = {"radius", "rmass", "omega", "temperature"}; + fields_restart = {"radius", "rmass", "omega", "temperature"}; + fields_create = {"radius", "rmass", "omega", "temperature"}; + fields_data_atom = {"id", "type", "radius", "rmass", "x", "temperature"}; + fields_data_vel = {"id", "v", "omega"}; +} + +/* ---------------------------------------------------------------------- + process sub-style args + optional arg = 0/1 for static/dynamic particle radii +------------------------------------------------------------------------- */ + +void AtomVecSphereTemperature::process_args(int narg, char **arg) +{ + if (narg != 0 && narg != 1) error->all(FLERR, "Illegal atom_style sphere command"); + + radvary = 0; + if (narg == 1) { + radvary = utils::numeric(FLERR, arg[0], true, lmp); + if (radvary < 0 || radvary > 1) error->all(FLERR, "Illegal atom_style sphere command"); + } + + // dynamic particle radius and mass must be communicated every step + + if (radvary) { + fields_comm = {"radius", "rmass"}; + fields_comm_vel = {"radius", "rmass", "omega"}; + } + + // delay setting up of fields until now + + setup_fields(); +} + +/* ---------------------------------------------------------------------- */ + +void AtomVecSphereTemperature::init() +{ + AtomVec::init(); + + // check if optional radvary setting should have been set to 1 + + for (int i = 0; i < modify->nfix; i++) + if (strcmp(modify->fix[i]->style, "adapt") == 0) { + auto fix = dynamic_cast(modify->fix[i]); + if (fix->diamflag && radvary == 0) + error->all(FLERR, "Fix adapt changes particle radii but atom_style sphere is not dynamic"); + } +} + +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecSphereTemperature::grow_pointers() +{ + radius = atom->radius; + rmass = atom->rmass; + omega = atom->omega; +} + +/* ---------------------------------------------------------------------- + initialize non-zero atom quantities +------------------------------------------------------------------------- */ + +void AtomVecSphereTemperature::create_atom_post(int ilocal) +{ + radius[ilocal] = 0.5; + rmass[ilocal] = 4.0 * MY_PI / 3.0 * 0.5 * 0.5 * 0.5; +} + +/* ---------------------------------------------------------------------- + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities +------------------------------------------------------------------------- */ + +void AtomVecSphereTemperature::data_atom_post(int ilocal) +{ + radius_one = 0.5 * atom->radius[ilocal]; + radius[ilocal] = radius_one; + if (radius_one > 0.0) rmass[ilocal] *= 4.0 * MY_PI / 3.0 * radius_one * radius_one * radius_one; + + if (rmass[ilocal] <= 0.0) error->one(FLERR, "Invalid density in Atoms section of data file"); + + omega[ilocal][0] = 0.0; + omega[ilocal][1] = 0.0; + omega[ilocal][2] = 0.0; +} + +/* ---------------------------------------------------------------------- + modify values for AtomVec::pack_data() to pack +------------------------------------------------------------------------- */ + +void AtomVecSphereTemperature::pack_data_pre(int ilocal) +{ + radius_one = radius[ilocal]; + rmass_one = rmass[ilocal]; + + radius[ilocal] *= 2.0; + if (radius_one != 0.0) + rmass[ilocal] = rmass_one / (4.0 * MY_PI / 3.0 * radius_one * radius_one * radius_one); +} + +/* ---------------------------------------------------------------------- + unmodify values packed by AtomVec::pack_data() +------------------------------------------------------------------------- */ + +void AtomVecSphereTemperature::pack_data_post(int ilocal) +{ + radius[ilocal] = radius_one; + rmass[ilocal] = rmass_one; +} diff --git a/src/GRANULAR/atom_vec_sphere_temperature.h b/src/GRANULAR/atom_vec_sphere_temperature.h new file mode 100644 index 0000000000..6b1ca6f390 --- /dev/null +++ b/src/GRANULAR/atom_vec_sphere_temperature.h @@ -0,0 +1,51 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef ATOM_CLASS +// clang-format off +AtomStyle(sphere,AtomVecSphereTemperature); +// clang-format on +#else + +#ifndef LMP_ATOM_VEC_SPHERE_TEMPERATURE_H +#define LMP_ATOM_VEC_SPHERE_TEMPERATURE_H + +#include "atom_vec.h" + +namespace LAMMPS_NS { + +class AtomVecSphereTemperature : public AtomVec { + public: + AtomVecSphereTemperature(class LAMMPS *); + void process_args(int, char **) override; + void init() override; + + void grow_pointers() override; + void create_atom_post(int) override; + void data_atom_post(int) override; + void pack_data_pre(int) override; + void pack_data_post(int) override; + + private: + double *radius, *rmass; + double **omega; + double *temperature, *heatflux; + + int radvary; + double radius_one, rmass_one; +}; + +} // namespace LAMMPS_NS + +#endif +#endif diff --git a/src/GRANULAR/fix_temp_integrate.cpp b/src/GRANULAR/fix_temp_integrate.cpp new file mode 100644 index 0000000000..bb351d7db4 --- /dev/null +++ b/src/GRANULAR/fix_temp_integrate.cpp @@ -0,0 +1,142 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "fix_temp_integrate.h" + +#include "atom.h" +#include "error.h" +#include "force.h" +#include "memory.h" +#include "respa.h" +#include "update.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +enum {NONE, CONSTANT, TYPE}; + +/* ---------------------------------------------------------------------- */ + +FixTempIntegrate::FixTempIntegrate(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + if (narg < 4) error->all(FLERR,"Illegal fix command"); + + cp_style = NONE; + + int ntypes = atom->ntypes; + int iarg = 3; + while (iarg < narg) { + if (strcmp(arg[iarg+1],"constant") == 0) { + if (iarg+2 >= narg) error->all(FLERR,"Illegal fix command"); + cp_style = CONSTANT; + cp = utils::numeric(FLERR,arg[iarg+2],false,lmp); + if (cp < 0.0) error->all(FLERR,"Illegal fix command"); + iarg += 2; + } else if (strcmp(arg[iarg+1],"type") == 0) { + if (iarg+1+ntypes >= narg) error->all(FLERR,"Illegal fix command"); + cp_style = TYPE; + memory->create(cp_type,ntypes+1,"fix/temp/integrate:cp_type"); + for (int i = 1; i <= ntypes; i++) { + cp_type[i] = utils::numeric(FLERR,arg[iarg+1+i],false,lmp); + if (cp_type[i] < 0.0) error->all(FLERR,"Illegal fix command"); + } + iarg += 1+ntypes; + } else { + error->all(FLERR,"Illegal fix command"); + } + iarg += 1; + } + + if (cp_style == NONE) + error->all(FLERR, "Must specify specific heat in fix temp/integrate"); + dynamic_group_allow = 1; + time_integrate = 1; +} + +/* ---------------------------------------------------------------------- */ + +int FixTempIntegrate::setmask() +{ + int mask = 0; + mask |= FINAL_INTEGRATE; + mask |= FINAL_INTEGRATE_RESPA; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixTempIntegrate::init() +{ + dt = update->dt; + + if (!atom->temperature_flag) + error->all(FLERR,"Fix temp/integrate requires atom style with temperature property"); + if (!atom->heatflux_flag) + error->all(FLERR,"Fix temp/integrate requires atom style with heatflux property"); +} + +/* ---------------------------------------------------------------------- */ + +void FixTempIntegrate::final_integrate() +{ + // update temperature of atoms in group + + double *temperature = atom->temperature; + double *heatflux = atom->heatflux; + double *rmass = atom->rmass; + double *mass = atom->mass; + int *type = atom->type; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + if (rmass) { + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + temperature[i] += dt * heatflux[i] / (calc_cp(i) * rmass[i]); + } + } else { + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + temperature[i] += dt * heatflux[i] / (calc_cp(i) * mass[type[i]]); + } + } +} + +/* ---------------------------------------------------------------------- */ + +void FixTempIntegrate::final_integrate_respa(int ilevel, int /*iloop*/) +{ + dt = update->dt; + final_integrate(); +} + +/* ---------------------------------------------------------------------- */ + +void FixTempIntegrate::reset_dt() +{ + dt = update->dt; +} + +/* ---------------------------------------------------------------------- */ + +double FixTempIntegrate::calc_cp(int i) +{ + if (cp_style == TYPE) { + return cp_type[atom->type[i]]; + } else { + return cp; + } +} diff --git a/src/GRANULAR/fix_temp_integrate.h b/src/GRANULAR/fix_temp_integrate.h new file mode 100644 index 0000000000..738cb28a6f --- /dev/null +++ b/src/GRANULAR/fix_temp_integrate.h @@ -0,0 +1,50 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS +// clang-format off +FixStyle(temp/integrate,FixTempIntegrate); +// clang-format on +#else + +#ifndef LMP_FIX_TEMP_INTEGRATE_H +#define LMP_FIX_TEMP_INTEGRATE_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixTempIntegrate : public Fix { + public: + FixTempIntegrate(class LAMMPS *, int, char **); + + int setmask() override; + void init() override; + void final_integrate() override; + void final_integrate_respa(int, int) override; + void reset_dt() override; + + protected: + double dt; + double cp, *cp_type; + int cp_style; + + int mass_require; + + double calc_cp(int); +}; + +} // namespace LAMMPS_NS + +#endif +#endif diff --git a/src/atom.cpp b/src/atom.cpp index 8b3ab8c75d..ce66742779 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -123,6 +123,8 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) radius = rmass = nullptr; ellipsoid = line = tri = body = nullptr; quat = nullptr; + temperature = nullptr; + heatflux = nullptr; // molecular systems @@ -410,6 +412,9 @@ void Atom::peratom_create() add_peratom("tri",&tri,INT,0); add_peratom("body",&body,INT,0); + add_peratom("temperature",&temperature,DOUBLE,0); + add_peratom("heatflux",&heatflux,DOUBLE,0); + // BPM package add_peratom("quat",&quat,DOUBLE,4); @@ -612,6 +617,7 @@ void Atom::set_atomflag_defaults() molecule_flag = molindex_flag = molatom_flag = 0; q_flag = mu_flag = 0; rmass_flag = radius_flag = omega_flag = torque_flag = angmom_flag = 0; + temperature_flag = heatflux_flag = 0; vfrac_flag = spin_flag = eradius_flag = ervel_flag = erforce_flag = 0; cs_flag = csforce_flag = vforce_flag = ervelforce_flag = etag_flag = 0; rho_flag = esph_flag = cv_flag = vest_flag = 0; @@ -2602,6 +2608,14 @@ length of the data area, and a short description. - double - 4 - four quaternion components of the particles + * - temperature + - double + - 1 + - temperature of the particles + * - heatflux + - double + - 1 + - heatflux of the particles * - i_name - int - 1 @@ -2658,6 +2672,8 @@ void *Atom::extract(const char *name) if (strcmp(name,"tri") == 0) return (void *) tri; if (strcmp(name,"body") == 0) return (void *) body; if (strcmp(name,"quat") == 0) return (void *) quat; + if (strcmp(name,"temperature") == 0) return (void *) temperature; + if (strcmp(name,"heatflux") == 0) return (void *) heatflux; if (strcmp(name,"vfrac") == 0) return (void *) vfrac; if (strcmp(name,"s0") == 0) return (void *) s0; @@ -2781,6 +2797,8 @@ int Atom::extract_datatype(const char *name) if (strcmp(name,"tri") == 0) return LAMMPS_INT; if (strcmp(name,"body") == 0) return LAMMPS_INT; if (strcmp(name,"quat") == 0) return LAMMPS_DOUBLE_2D; + if (strcmp(name,"temperature") == 0) return LAMMPS_DOUBLE; + if (strcmp(name,"heatflux") == 0) return LAMMPS_DOUBLE; if (strcmp(name,"vfrac") == 0) return LAMMPS_DOUBLE; if (strcmp(name,"s0") == 0) return LAMMPS_DOUBLE; diff --git a/src/atom.h b/src/atom.h index 499e5f0d0f..7ac459317c 100644 --- a/src/atom.h +++ b/src/atom.h @@ -80,6 +80,7 @@ class Atom : protected Pointers { double **omega, **angmom, **torque; int *ellipsoid, *line, *tri, *body; double **quat; + double *temperature, *heatflux; // molecular systems @@ -182,6 +183,7 @@ class Atom : protected Pointers { int molecule_flag, molindex_flag, molatom_flag; int q_flag, mu_flag; int rmass_flag, radius_flag, omega_flag, torque_flag, angmom_flag, quat_flag; + int temperature_flag, heatflux_flag; int vfrac_flag, spin_flag, eradius_flag, ervel_flag, erforce_flag; int cs_flag, csforce_flag, vforce_flag, ervelforce_flag, etag_flag; int rho_flag, esph_flag, cv_flag, vest_flag; diff --git a/src/set.cpp b/src/set.cpp index 2843281d78..7c759873a2 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -47,7 +47,7 @@ enum{ATOM_SELECT,MOL_SELECT,TYPE_SELECT,GROUP_SELECT,REGION_SELECT}; enum{TYPE,TYPE_FRACTION,TYPE_RATIO,TYPE_SUBSET, MOLECULE,X,Y,Z,VX,VY,VZ,CHARGE,MASS,SHAPE,LENGTH,TRI, DIPOLE,DIPOLE_RANDOM,SPIN,SPIN_RANDOM,QUAT,QUAT_RANDOM, - THETA,THETA_RANDOM,ANGMOM,OMEGA, + THETA,THETA_RANDOM,ANGMOM,OMEGA,TEMPERATURE, DIAMETER,DENSITY,VOLUME,IMAGE,BOND,ANGLE,DIHEDRAL,IMPROPER, SPH_E,SPH_CV,SPH_RHO,EDPD_TEMP,EDPD_CV,CC,SMD_MASS_DENSITY, SMD_CONTACT_RADIUS,DPDTHETA,EPSILON,IVEC,DVEC,IARRAY,DARRAY}; @@ -389,6 +389,15 @@ void Set::command(int narg, char **arg) set(DENSITY); iarg += 2; + } else if (strcmp(arg[iarg],"temperature") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal set command"); + if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); + else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); + if (!atom->temperature_flag) + error->all(FLERR,"Cannot set this attribute for this atom style"); + set(TEMPERATURE); + iarg += 2; + } else if (strcmp(arg[iarg],"volume") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal set command"); if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); @@ -768,6 +777,7 @@ void Set::set(int keyword) case SHAPE: case DIAMETER: case DENSITY: + case TEMPERATURE: case QUAT: case IMAGE: if (modify->check_rigid_list_overlap(select)) @@ -1008,6 +1018,13 @@ void Set::set(int keyword) atom->omega[i][2] = zvalue; } + // set temperature of particle + + else if (keyword == ANGMOM) { + if (dvalue < 0.0) error->one(FLERR,"Invalid temperature in set command"); + atom->temperature[i] = dvalue; + } + // reset any or all of 3 image flags else if (keyword == IMAGE) { From 66188d9d572c7671b2a351fda086dee0ee89c37c Mon Sep 17 00:00:00 2001 From: jtclemm Date: Mon, 13 Jun 2022 09:00:15 -0600 Subject: [PATCH 003/445] unified naming scheme --- src/.gitignore | 4 ++-- ...emperature.cpp => atom_vec_sphere_temp.cpp} | 18 +++++++++--------- ...re_temperature.h => atom_vec_sphere_temp.h} | 10 +++++----- 3 files changed, 16 insertions(+), 16 deletions(-) rename src/GRANULAR/{atom_vec_sphere_temperature.cpp => atom_vec_sphere_temp.cpp} (91%) rename src/GRANULAR/{atom_vec_sphere_temperature.h => atom_vec_sphere_temp.h} (84%) diff --git a/src/.gitignore b/src/.gitignore index 7a6bc1beb4..acb509551c 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -427,8 +427,8 @@ /atom_vec_oxdna.h /atom_vec_peri.cpp /atom_vec_peri.h -/atom_vec_sphere_temperature.cpp -/atom_vec_sphere_temperature.h +/atom_vec_sphere_temp.cpp +/atom_vec_sphere_temp.h /atom_vec_template.cpp /atom_vec_template.h /body_nparticle.cpp diff --git a/src/GRANULAR/atom_vec_sphere_temperature.cpp b/src/GRANULAR/atom_vec_sphere_temp.cpp similarity index 91% rename from src/GRANULAR/atom_vec_sphere_temperature.cpp rename to src/GRANULAR/atom_vec_sphere_temp.cpp index 5b62a2c279..d4e30e3154 100644 --- a/src/GRANULAR/atom_vec_sphere_temperature.cpp +++ b/src/GRANULAR/atom_vec_sphere_temp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "atom_vec_sphere_temperature.h" +#include "atom_vec_sphere_temp.h" #include "atom.h" #include "error.h" @@ -25,7 +25,7 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -AtomVecSphereTemperature::AtomVecSphereTemperature(LAMMPS *lmp) : AtomVec(lmp) +AtomVecSphereTemp::AtomVecSphereTemp(LAMMPS *lmp) : AtomVec(lmp) { mass_type = PER_ATOM; molecular = Atom::ATOMIC; @@ -57,7 +57,7 @@ AtomVecSphereTemperature::AtomVecSphereTemperature(LAMMPS *lmp) : AtomVec(lmp) optional arg = 0/1 for static/dynamic particle radii ------------------------------------------------------------------------- */ -void AtomVecSphereTemperature::process_args(int narg, char **arg) +void AtomVecSphereTemp::process_args(int narg, char **arg) { if (narg != 0 && narg != 1) error->all(FLERR, "Illegal atom_style sphere command"); @@ -81,7 +81,7 @@ void AtomVecSphereTemperature::process_args(int narg, char **arg) /* ---------------------------------------------------------------------- */ -void AtomVecSphereTemperature::init() +void AtomVecSphereTemp::init() { AtomVec::init(); @@ -100,7 +100,7 @@ void AtomVecSphereTemperature::init() needed in replicate when 2 atom classes exist and it calls pack_restart() ------------------------------------------------------------------------- */ -void AtomVecSphereTemperature::grow_pointers() +void AtomVecSphereTemp::grow_pointers() { radius = atom->radius; rmass = atom->rmass; @@ -111,7 +111,7 @@ void AtomVecSphereTemperature::grow_pointers() initialize non-zero atom quantities ------------------------------------------------------------------------- */ -void AtomVecSphereTemperature::create_atom_post(int ilocal) +void AtomVecSphereTemp::create_atom_post(int ilocal) { radius[ilocal] = 0.5; rmass[ilocal] = 4.0 * MY_PI / 3.0 * 0.5 * 0.5 * 0.5; @@ -122,7 +122,7 @@ void AtomVecSphereTemperature::create_atom_post(int ilocal) or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecSphereTemperature::data_atom_post(int ilocal) +void AtomVecSphereTemp::data_atom_post(int ilocal) { radius_one = 0.5 * atom->radius[ilocal]; radius[ilocal] = radius_one; @@ -139,7 +139,7 @@ void AtomVecSphereTemperature::data_atom_post(int ilocal) modify values for AtomVec::pack_data() to pack ------------------------------------------------------------------------- */ -void AtomVecSphereTemperature::pack_data_pre(int ilocal) +void AtomVecSphereTemp::pack_data_pre(int ilocal) { radius_one = radius[ilocal]; rmass_one = rmass[ilocal]; @@ -153,7 +153,7 @@ void AtomVecSphereTemperature::pack_data_pre(int ilocal) unmodify values packed by AtomVec::pack_data() ------------------------------------------------------------------------- */ -void AtomVecSphereTemperature::pack_data_post(int ilocal) +void AtomVecSphereTemp::pack_data_post(int ilocal) { radius[ilocal] = radius_one; rmass[ilocal] = rmass_one; diff --git a/src/GRANULAR/atom_vec_sphere_temperature.h b/src/GRANULAR/atom_vec_sphere_temp.h similarity index 84% rename from src/GRANULAR/atom_vec_sphere_temperature.h rename to src/GRANULAR/atom_vec_sphere_temp.h index 6b1ca6f390..f42b844886 100644 --- a/src/GRANULAR/atom_vec_sphere_temperature.h +++ b/src/GRANULAR/atom_vec_sphere_temp.h @@ -13,20 +13,20 @@ #ifdef ATOM_CLASS // clang-format off -AtomStyle(sphere,AtomVecSphereTemperature); +AtomStyle(sphere/temp,AtomVecSphereTemp); // clang-format on #else -#ifndef LMP_ATOM_VEC_SPHERE_TEMPERATURE_H -#define LMP_ATOM_VEC_SPHERE_TEMPERATURE_H +#ifndef LMP_ATOM_VEC_SPHERE_TEMP_H +#define LMP_ATOM_VEC_SPHERE_TEMP_H #include "atom_vec.h" namespace LAMMPS_NS { -class AtomVecSphereTemperature : public AtomVec { +class AtomVecSphereTemp : public AtomVec { public: - AtomVecSphereTemperature(class LAMMPS *); + AtomVecSphereTemp(class LAMMPS *); void process_args(int, char **) override; void init() override; From c0078fda059b734417d1080ee1b7bb54cdcf77ac Mon Sep 17 00:00:00 2001 From: jtclemm Date: Tue, 14 Jun 2022 09:27:14 -0600 Subject: [PATCH 004/445] Begin refactoring of pair granular --- src/GRANULAR/pair_granular.cpp | 825 ++++++++++----------------------- src/GRANULAR/pair_granular.h | 12 + 2 files changed, 248 insertions(+), 589 deletions(-) diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 013c63172d..34edbc0ae3 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -28,6 +28,7 @@ #include "fix_neigh_history.h" #include "force.h" #include "math_const.h" +#include "math_extra.h" #include "math_special.h" #include "memory.h" #include "modify.h" @@ -149,37 +150,35 @@ PairGranular::~PairGranular() void PairGranular::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum,itype,jtype; - double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz,nx,ny,nz; + double dx[3],fx[3],nx[3]; double radi,radj,radsum,rsq,r,rinv,factor_lj; double Reff, delta, dR, dR2, dist_to_contact; - double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3; - double wr1,wr2,wr3; - double vtr1,vtr2,vtr3,vrel; + double vr[3],vnnr,vn[3],vt[3],wr[3],vtr[3],vrel[3]; + double temp[3], temp_dbl; - double knfac, damp_normal=0.0, damp_normal_prefactor; + double damp_normal=0.0, damp_normal_prefactor; double k_tangential, damp_tangential; double Fne, Ft, Fdamp, Fntot, Fncrit, Fscrit, Frcrit; - double fs, fs1, fs2, fs3, tor1, tor2, tor3; + double magfs, fs[3], tor[3]; double mi,mj,meff; - double relrot1,relrot2,relrot3,vrl1,vrl2,vrl3; + double relrot[3],vrl[3]; - // for JKR - double R2, coh, F_pulloff, delta_pulloff, dist_pulloff, a, a2, E; - double t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3; + ContactModel model; + ContactGeom geom; // rolling double k_roll, damp_roll; - double torroll1, torroll2, torroll3; + int rhist0, rhist1, rhist2; + double torroll[3]; double rollmag, rolldotn, scalefac; - double fr, fr1, fr2, fr3; + double magfr, fr[3]; // twisting double k_twist, damp_twist, mu_twist; double signtwist, magtwist, magtortwist, Mtcrit; - double tortwist1, tortwist2, tortwist3; + double tortwist[3]; double shrmag,rsht,prjmag; bool frameupdate; @@ -236,9 +235,6 @@ void PairGranular::compute(int eflag, int vflag) for (ii = 0; ii < inum; ii++) { i = ilist[ii]; itype = type[i]; - xtmp = x[i][0]; - ytmp = x[i][1]; - ztmp = x[i][2]; itype = type[i]; radi = radius[i]; if (use_history) { @@ -255,30 +251,21 @@ void PairGranular::compute(int eflag, int vflag) if (factor_lj == 0) continue; - delx = xtmp - x[j][0]; - dely = ytmp - x[j][1]; - delz = ztmp - x[j][2]; + MathExtra::sub3(x[i], x[j], dx); jtype = type[j]; - rsq = delx*delx + dely*dely + delz*delz; + rsq = MathExtra::lensq3(dx); radj = radius[j]; radsum = radi + radj; - - E = normal_coeffs[itype][jtype][0]; Reff = radi*radj/radsum; - touchflag = false; + // Copy data into structures to easily pass to functions + geom.rsq = rsq; + geom.Reff = Reff; + geom.radsum = radsum; + + touchflag = false; if (normal_model[itype][jtype] == JKR) { - E *= THREEQUARTERS; - if (touch[jj]) { - R2 = Reff*Reff; - coh = normal_coeffs[itype][jtype][3]; - a = cbrt(9.0*MY_PI*coh*R2/(4*E)); - delta_pulloff = a*a/Reff - 2*sqrt(MY_PI*coh*a/E); - dist_pulloff = radsum-delta_pulloff; - touchflag = (rsq < dist_pulloff*dist_pulloff); - } else { - touchflag = (rsq < radsum*radsum); - } + touchflag = touch_JKR(touch[jj], geom, model) } else { touchflag = (rsq < radsum*radsum); } @@ -294,22 +281,30 @@ void PairGranular::compute(int eflag, int vflag) r = sqrt(rsq); rinv = 1.0/r; - nx = delx*rinv; - ny = dely*rinv; - nz = delz*rinv; + // Copy data into structures to easily pass to functions + geom.r = r; + geom.rinv = rinv + geom.delta = radsum - r; + geom.dR = geom.delta*Reff; + + model.normal = normal_model[itype][jtype]; + model.damping = damping_model[itype][jtype]; + model.tangential = tangential_model[itype][jtype]; + model.roll = roll_model[itype][jtype]; + model.twist = twist_model[itype][jtype]; + model.E = normal_coeffs[itype][jtype][0]; + model.damp = normal_coeffs[itype][jtype][1]; + model.poisson = normal_coeffs[itype][jtype][2]; + model.coh = normal_coeffs[itype][jtype][3]; + + MathExtra::scale3(rinv, dx, nx); // relative translational velocity - - vr1 = v[i][0] - v[j][0]; - vr2 = v[i][1] - v[j][1]; - vr3 = v[i][2] - v[j][2]; + MathExtra::sub3(v[i], v[j], vr); // normal component - - vnnr = vr1*nx + vr2*ny + vr3*nz; //v_R . n - vn1 = nx*vnnr; - vn2 = ny*vnnr; - vn3 = nz*vnnr; + vnnr = MathExtra::dot3(vr, nx); //v_R . n + MathExtra::scale3(vnnr, nx, vn); // meff = effective mass of pair of particles // if I or J part of rigid body, use body mass @@ -322,60 +317,22 @@ void PairGranular::compute(int eflag, int vflag) if (mass_rigid[j] > 0.0) mj = mass_rigid[j]; } - meff = mi*mj / (mi+mj); + meff = mi * mj / (mi + mj); if (mask[i] & freeze_group_bit) meff = mj; if (mask[j] & freeze_group_bit) meff = mi; - delta = radsum - r; - dR = delta*Reff; - - if (normal_model[itype][jtype] == JKR) { + if (model.normal == JKR) { touch[jj] = 1; - R2=Reff*Reff; - coh = normal_coeffs[itype][jtype][3]; - dR2 = dR*dR; - t0 = coh*coh*R2*R2*E; - t1 = PI27SQ*t0; - t2 = 8*dR*dR2*E*E*E; - t3 = 4*dR2*E; - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0*(t1+2*t2)); - t4 = cbrt(t1+t2+THREEROOT3*MY_PI*sqrt(sqrt1)); - t5 = t3/t4 + t4/E; - sqrt2 = MAX(0, 2*dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4*dR - t5 + SIXROOT6*coh*MY_PI*R2/(E*t6)); - a = INVROOT6*(t6 + sqrt(sqrt3)); - a2 = a*a; - knfac = normal_coeffs[itype][jtype][0]*a; - Fne = knfac*a2/Reff - MY_2PI*a2*sqrt(4*coh*E/(MY_PI*a)); + normal_JKR(Fne, Fncrit, geom, model); + } else if (model.normal == DMT) { + normal_DMT(Fne, Fncrit, geom, model); } else { - knfac = E; // Hooke - Fne = knfac*delta; - a = sqrt(dR); - if (normal_model[itype][jtype] != HOOKE) { - Fne *= a; - knfac *= a; - } - if (normal_model[itype][jtype] == DMT) - Fne -= 4*MY_PI*normal_coeffs[itype][jtype][3]*Reff; + normal_hooke(Fne, Fncrit, geom, model); } // NOTE: consider restricting Hooke to only have // 'velocity' as an option for damping? - - if (damping_model[itype][jtype] == VELOCITY) { - damp_normal = 1; - } else if (damping_model[itype][jtype] == MASS_VELOCITY) { - damp_normal = meff; - } else if (damping_model[itype][jtype] == VISCOELASTIC) { - damp_normal = a*meff; - } else if (damping_model[itype][jtype] == TSUJI) { - damp_normal = sqrt(meff*knfac); - } else damp_normal = 0.0; - - damp_normal_prefactor = normal_coeffs[itype][jtype][1]*damp_normal; - Fdamp = -damp_normal_prefactor*vnnr; + Fdamp = normal_damping(vnnr, meff, geom, model); Fntot = Fne + Fdamp; if (limit_damping[itype][jtype] && (Fntot < 0.0)) Fntot = 0.0; @@ -391,21 +348,15 @@ void PairGranular::compute(int eflag, int vflag) // history = cumulative tangential elastic force // tangential component - vt1 = vr1 - vn1; - vt2 = vr2 - vn2; - vt3 = vr3 - vn3; + MathExtra::sub3(vr, vn, vt); // relative rotational velocity - wr1 = (radi*omega[i][0] + radj*omega[j][0]); - wr2 = (radi*omega[i][1] + radj*omega[j][1]); - wr3 = (radi*omega[i][2] + radj*omega[j][2]); + MathExtra::scaleadd3(radi, omega[i], radj, omega[j], wr); // relative tangential velocities - vtr1 = vt1 - (nz*wr2-ny*wr3); - vtr2 = vt2 - (nx*wr3-nz*wr1); - vtr3 = vt3 - (ny*wr1-nx*wr2); - vrel = vtr1*vtr1 + vtr2*vtr2 + vtr3*vtr3; - vrel = sqrt(vrel); + MathExtra::cross3(wr, nx, temp); + MathExtra::sub3(vt, temp, vtr); + vrel = MathExtra::len(vtr); // if any history is needed if (use_history) { @@ -413,20 +364,13 @@ void PairGranular::compute(int eflag, int vflag) history = &allhistory[size_history*jj]; } - if (normal_model[itype][jtype] == JKR) { - F_pulloff = 3*MY_PI*coh*Reff; - Fncrit = fabs(Fne + 2*F_pulloff); - } else if (normal_model[itype][jtype] == DMT) { - F_pulloff = 4*MY_PI*coh*Reff; - Fncrit = fabs(Fne + 2*F_pulloff); - } else { - Fncrit = fabs(Fntot); - } - Fscrit = tangential_coeffs[itype][jtype][2] * Fncrit; + Fncrit = critical_normal(Fne, Fntot, geom, model); + Fscrit = model.poisson * Fncrit; //------------------------------ // tangential forces //------------------------------ + k_tangential = tangential_coeffs[itype][jtype][0]; damp_tangential = tangential_coeffs[itype][jtype][1] * damp_normal_prefactor; @@ -443,9 +387,7 @@ void PairGranular::compute(int eflag, int vflag) // on unloading, rescale the shear displacements/force if (a < history[3]) { double factor = a/history[3]; - history[0] *= factor; - history[1] *= factor; - history[2] *= factor; + MathExtra::scale3(history, factor); } } // rotate and update displacements / force. @@ -455,40 +397,33 @@ void PairGranular::compute(int eflag, int vflag) if (tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_FORCE || tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_RESCALE_FORCE) - frameupdate = fabs(rsht) > EPSILON*Fscrit; + frameupdate = fabs(rsht) > EPSILON * Fscrit; else - frameupdate = fabs(rsht)*k_tangential > EPSILON*Fscrit; + frameupdate = fabs(rsht) * k_tangential > EPSILON * Fscrit; if (frameupdate) { shrmag = sqrt(history[0]*history[0] + history[1]*history[1] + history[2]*history[2]); // projection - history[0] -= rsht*nx; - history[1] -= rsht*ny; - history[2] -= rsht*nz; + MathExtra::scale3(rsht, nx, history); // also rescale to preserve magnitude - prjmag = sqrt(history[0]*history[0] + history[1]*history[1] + - history[2]*history[2]); + prjmag = MathExtra::len3(history); if (prjmag > 0) scalefac = shrmag/prjmag; else scalefac = 0; - history[0] *= scalefac; - history[1] *= scalefac; - history[2] *= scalefac; + MathExtra::scale3(scalefac, history); } // update history if (tangential_model[itype][jtype] == TANGENTIAL_HISTORY || tangential_model[itype][jtype] == TANGENTIAL_MINDLIN || tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_RESCALE) { // tangential displacement - history[0] += vtr1*dt; - history[1] += vtr2*dt; - history[2] += vtr3*dt; + MathExtra::scale3(dt, vtr, temp); + MathExtra::add3(temp, history, history); } else { // tangential force // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - history[0] -= k_tangential*vtr1*dt; - history[1] -= k_tangential*vtr2*dt; - history[2] -= k_tangential*vtr3*dt; + MathExtra::scale3(k_tangential*dt, vtr, temp); + MathExtra::sub3(history, temp, history); } if (tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_RESCALE || tangential_model[itype][jtype] == @@ -497,58 +432,41 @@ void PairGranular::compute(int eflag, int vflag) } // tangential forces = history + tangential velocity damping + MathExtra::scale3(-damp_tangential, vtr, fs); if (tangential_model[itype][jtype] == TANGENTIAL_HISTORY || tangential_model[itype][jtype] == TANGENTIAL_MINDLIN || tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_RESCALE) { - fs1 = -k_tangential*history[0] - damp_tangential*vtr1; - fs2 = -k_tangential*history[1] - damp_tangential*vtr2; - fs3 = -k_tangential*history[2] - damp_tangential*vtr3; - } else { - fs1 = history[0] - damp_tangential*vtr1; - fs2 = history[1] - damp_tangential*vtr2; - fs3 = history[2] - damp_tangential*vtr3; + MathExtra::scale3(-k_tangential, history, temp); + MathExtra::add3(fs, temp, fs); } // rescale frictional displacements and forces if needed - fs = sqrt(fs1*fs1 + fs2*fs2 + fs3*fs3); + magfs = MathExtra::len3(fs); if (fs > Fscrit) { - shrmag = sqrt(history[0]*history[0] + history[1]*history[1] + - history[2]*history[2]); + shrmag = MathExtra::len3(history); if (shrmag != 0.0) { + history[0] = Fscrit*fs[0]/magfs + damp_tangential*vtr[0]; + history[1] = Fscrit*fs[1]/magfs + damp_tangential*vtr[1]; + history[2] = Fscrit*fs[2]/magfs + damp_tangential*vtr[2]; if (tangential_model[itype][jtype] == TANGENTIAL_HISTORY || tangential_model[itype][jtype] == TANGENTIAL_MINDLIN || tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_RESCALE) { - history[0] = -1.0/k_tangential*(Fscrit*fs1/fs + - damp_tangential*vtr1); - history[1] = -1.0/k_tangential*(Fscrit*fs2/fs + - damp_tangential*vtr2); - history[2] = -1.0/k_tangential*(Fscrit*fs3/fs + - damp_tangential*vtr3); - } else { - history[0] = Fscrit*fs1/fs + damp_tangential*vtr1; - history[1] = Fscrit*fs2/fs + damp_tangential*vtr2; - history[2] = Fscrit*fs3/fs + damp_tangential*vtr3; + MathExtra::scale3(-1.0/k_tangential, history); } - fs1 *= Fscrit/fs; - fs2 *= Fscrit/fs; - fs3 *= Fscrit/fs; - } else fs1 = fs2 = fs3 = 0.0; + MathExtra::scale3(Fscrit/magfs, fs); + } else MathExtra::zero3(fs); } } else { // classic pair gran/hooke (no history) fs = damp_tangential*vrel; if (vrel != 0.0) Ft = MIN(Fscrit,fs) / vrel; else Ft = 0.0; - fs1 = -Ft*vtr1; - fs2 = -Ft*vtr2; - fs3 = -Ft*vtr3; + MathExtra::scale3(-Ft, vtr, fs); } if (roll_model[itype][jtype] != ROLL_NONE || twist_model[itype][jtype] != TWIST_NONE) { - relrot1 = omega[i][0] - omega[j][0]; - relrot2 = omega[i][1] - omega[j][1]; - relrot3 = omega[i][2] - omega[j][2]; + MathExtra::sub3(omega[i], omega[j], relrot); } //**************************************** // rolling resistance @@ -560,64 +478,63 @@ void PairGranular::compute(int eflag, int vflag) // this is different from the Marshall papers, // which use the Bagi/Kuhn formulation // for rolling velocity (see Wang et al for why the latter is wrong) - vrl1 = Reff*(relrot2*nz - relrot3*ny); - vrl2 = Reff*(relrot3*nx - relrot1*nz); - vrl3 = Reff*(relrot1*ny - relrot2*nx); + vrl[0] = Reff * (relrot[1] * n[2] - relrot[2] * nx[1]); + vrl[1] = Reff * (relrot[2] * n[0] - relrot[0] * nx[2]); + vrl[2] = Reff * (relrot[0] * n[1] - relrot[1] * nx[0]); - int rhist0 = roll_history_index; - int rhist1 = rhist0 + 1; - int rhist2 = rhist1 + 1; + rhist0 = roll_history_index; + rhist1 = rhist0 + 1; + rhist2 = rhist1 + 1; k_roll = roll_coeffs[itype][jtype][0]; damp_roll = roll_coeffs[itype][jtype][1]; Frcrit = roll_coeffs[itype][jtype][2] * Fncrit; if (historyupdate) { - rolldotn = history[rhist0]*nx + history[rhist1]*ny + history[rhist2]*nz; + temp[0] = history[rhist0]; + temp[1] = history[rhist1]; + temp[2] = history[rhist2]; + rolldotn = MathExtra::dot3(temp, nx); frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit; if (frameupdate) { // rotate into tangential plane - rollmag = sqrt(history[rhist0]*history[rhist0] + - history[rhist1]*history[rhist1] + - history[rhist2]*history[rhist2]); + rollmag = MathExtra::len3(temp); // projection - history[rhist0] -= rolldotn*nx; - history[rhist1] -= rolldotn*ny; - history[rhist2] -= rolldotn*nz; + temp[0] -= rolldotn*nx[0]; + temp[1] -= rolldotn*nx[1]; + temp[2] -= rolldotn*nx[2]; // also rescale to preserve magnitude - prjmag = sqrt(history[rhist0]*history[rhist0] + - history[rhist1]*history[rhist1] + - history[rhist2]*history[rhist2]); + prjmag = MathExtra::len3(temp); if (prjmag > 0) scalefac = rollmag/prjmag; else scalefac = 0; - history[rhist0] *= scalefac; - history[rhist1] *= scalefac; - history[rhist2] *= scalefac; + MathExtra::scale3(scalefac, temp); } - history[rhist0] += vrl1*dt; - history[rhist1] += vrl2*dt; - history[rhist2] += vrl3*dt; + temp[0] += vrl[0]*dt; + temp[1] += vrl[1]*dt; + temp[2] += vrl[2]*dt; } - fr1 = -k_roll*history[rhist0] - damp_roll*vrl1; - fr2 = -k_roll*history[rhist1] - damp_roll*vrl2; - fr3 = -k_roll*history[rhist2] - damp_roll*vrl3; + fr[0] = -k_roll*temp[0] - damp_roll*vrl[0]; + fr[1] = -k_roll*temp[1] - damp_roll*vrl[1]; + fr[2] = -k_roll*temp[2] - damp_roll*vrl[2]; // rescale frictional displacements and forces if needed - fr = sqrt(fr1*fr1 + fr2*fr2 + fr3*fr3); - if (fr > Frcrit) { - rollmag = sqrt(history[rhist0]*history[rhist0] + - history[rhist1]*history[rhist1] + - history[rhist2]*history[rhist2]); + magfr = MathExtra::len3(fr); + if (magfr > Frcrit) { + rollmag = MathExtra::len3(temp); if (rollmag != 0.0) { - history[rhist0] = -1.0/k_roll*(Frcrit*fr1/fr + damp_roll*vrl1); - history[rhist1] = -1.0/k_roll*(Frcrit*fr2/fr + damp_roll*vrl2); - history[rhist2] = -1.0/k_roll*(Frcrit*fr3/fr + damp_roll*vrl3); - fr1 *= Frcrit/fr; - fr2 *= Frcrit/fr; - fr3 *= Frcrit/fr; - } else fr1 = fr2 = fr3 = 0.0; + temp[0] = -1.0/k_roll*(Frcrit*fr[0]/magfr + damp_roll*vrl[0]); + temp[1] = -1.0/k_roll*(Frcrit*fr[1]/magfr + damp_roll*vrl[1]); + temp[2] = -1.0/k_roll*(Frcrit*fr[2]/magfr + damp_roll*vrl[2]); + fr[0] *= Frcrit/magfr; + fr[1] *= Frcrit/magfr; + fr[2] *= Frcrit/magfr; + } else MathExtra::zero3(fr); } + + history[rhist0] = temp[0]; + history[rhist1] = temp[1]; + history[rhist2] = temp[2]; } //**************************************** @@ -626,7 +543,7 @@ void PairGranular::compute(int eflag, int vflag) if (twist_model[itype][jtype] != TWIST_NONE) { // omega_T (eq 29 of Marshall) - magtwist = relrot1*nx + relrot2*ny + relrot3*nz; + magtwist = MathExtra::dot3(relrot, nx); if (twist_model[itype][jtype] == TWIST_MARSHALL) { k_twist = 0.5*k_tangential*a*a;; // eq 32 of Marshall paper damp_twist = 0.5*damp_tangential*a*a; @@ -652,72 +569,45 @@ void PairGranular::compute(int eflag, int vflag) // apply forces & torques - fx = nx*Fntot + fs1; - fy = ny*Fntot + fs2; - fz = nz*Fntot + fs3; - fx *= factor_lj; - fy *= factor_lj; - fz *= factor_lj; + MathExtra::scale3(Fntot, nx, fx); + MathExtra::add3(fx, fs, fx); + MathExtra::scale3(factor_lj, fx); + MathExtra::add3(f[i], fx, f[i]); - f[i][0] += fx; - f[i][1] += fy; - f[i][2] += fz; - - tor1 = ny*fs3 - nz*fs2; - tor2 = nz*fs1 - nx*fs3; - tor3 = nx*fs2 - ny*fs1; - tor1 *= factor_lj; - tor2 *= factor_lj; - tor3 *= factor_lj; + MathExtra::cross3(nx, fs, tor); + MathExtra::scale3(factor_lj, tor); dist_to_contact = radi-0.5*delta; - torque[i][0] -= dist_to_contact*tor1; - torque[i][1] -= dist_to_contact*tor2; - torque[i][2] -= dist_to_contact*tor3; + MathExtra::scale3(dist_to_contact, tor, temp); + MathExtra::sub3(torque[i], temp, torque[i]); if (twist_model[itype][jtype] != TWIST_NONE) { - tortwist1 = magtortwist * nx * factor_lj; - tortwist2 = magtortwist * ny * factor_lj; - tortwist3 = magtortwist * nz * factor_lj; - - torque[i][0] += tortwist1; - torque[i][1] += tortwist2; - torque[i][2] += tortwist3; + MathExtra::scale3(magtortwist, nx, tortwist); + MathExtra::scale3(factor_lj, tortwist); + MathExtra::add3(torque[i], tortwist, torque[i]); } if (roll_model[itype][jtype] != ROLL_NONE) { - torroll1 = Reff*(ny*fr3 - nz*fr2) * factor_lj; // n cross fr - torroll2 = Reff*(nz*fr1 - nx*fr3) * factor_lj; - torroll3 = Reff*(nx*fr2 - ny*fr1) * factor_lj; - - torque[i][0] += torroll1; - torque[i][1] += torroll2; - torque[i][2] += torroll3; + MathExtra::cross3(nx, fr, torroll); + MathExtra::scale3(Reff, torroll); + MathExtra::scale3(factor_lj, torroll); + MathExtra::add3(torque[i], torroll, torque[i]); } if (force->newton_pair || j < nlocal) { - f[j][0] -= fx; - f[j][1] -= fy; - f[j][2] -= fz; + MathExtra::sub3(f[j], fx, f[j]); dist_to_contact = radj-0.5*delta; - torque[j][0] -= dist_to_contact*tor1; - torque[j][1] -= dist_to_contact*tor2; - torque[j][2] -= dist_to_contact*tor3; + MathExtra::scale3(dist_to_contact, tor, temp); + MathExtra::sub3(torque[j], tor, torque[j]); - if (twist_model[itype][jtype] != TWIST_NONE) { - torque[j][0] -= tortwist1; - torque[j][1] -= tortwist2; - torque[j][2] -= tortwist3; - } - if (roll_model[itype][jtype] != ROLL_NONE) { - torque[j][0] -= torroll1; - torque[j][1] -= torroll2; - torque[j][2] -= torroll3; - } + if (twist_model[itype][jtype] != TWIST_NONE) + MathExtra::sub3(torque[j], tortwist, torque[j]); + if (roll_model[itype][jtype] != ROLL_NONE) + MathExtra::sub3(torque[j], torroll, torque[j]); } if (evflag) ev_tally_xyz(i,j,nlocal,force->newton_pair, - 0.0,0.0,fx,fy,fz,delx,dely,delz); + 0.0,0.0,fx[0],fx[1],fx[2],dx[0],dy[1],dx[2]); } } } @@ -1389,346 +1279,7 @@ double PairGranular::single(int i, int j, int itype, int jtype, double rsq, double /* factor_coul */, double /* factor_lj */, double &fforce) { - double radi,radj,radsum; - double r,rinv,delx,dely,delz, nx, ny, nz, Reff; - double dR, dR2; - double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3,wr1,wr2,wr3; - double vtr1,vtr2,vtr3,vrel; - double mi,mj,meff; - double relrot1,relrot2,relrot3,vrl1,vrl2,vrl3; - double knfac, damp_normal, damp_normal_prefactor; - double k_tangential, damp_tangential; - double Fne, Ft, Fdamp, Fntot, Fncrit, Fscrit, Frcrit; - double fs, fs1, fs2, fs3; - - // for JKR - double R2, coh, F_pulloff, delta_pulloff, dist_pulloff, a, a2, E; - double delta, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3; - - // rolling - double k_roll, damp_roll; - double rollmag; - double fr, fr1, fr2, fr3; - - // twisting - double k_twist, damp_twist, mu_twist; - double signtwist, magtwist, magtortwist, Mtcrit; - - double shrmag; - int jnum; - int *jlist; - double *history,*allhistory; - - int nall = atom->nlocal + atom->nghost; - if ((i >= nall) || (j >= nall)) - error->all(FLERR,"Not enough atoms for pair granular single function"); - - double *radius = atom->radius; - radi = radius[i]; - radj = radius[j]; - radsum = radi + radj; - Reff = (radsum > 0.0) ? radi*radj/radsum : 0.0; - - bool touchflag; - E = normal_coeffs[itype][jtype][0]; - if (normal_model[itype][jtype] == JKR) { - E *= THREEQUARTERS; - R2 = Reff*Reff; - coh = normal_coeffs[itype][jtype][3]; - a = cbrt(9.0*MY_PI*coh*R2/(4*E)); - delta_pulloff = a*a/Reff - 2*sqrt(MY_PI*coh*a/E); - dist_pulloff = radsum+delta_pulloff; - touchflag = (rsq <= dist_pulloff*dist_pulloff); - } else touchflag = (rsq <= radsum*radsum); - - if (!touchflag) { - fforce = 0.0; - for (int m = 0; m < single_extra; m++) svector[m] = 0.0; - return 0.0; - } - - double **x = atom->x; - delx = x[i][0] - x[j][0]; - dely = x[i][1] - x[j][1]; - delz = x[i][2] - x[j][2]; - r = sqrt(rsq); - rinv = 1.0/r; - - nx = delx*rinv; - ny = dely*rinv; - nz = delz*rinv; - - // relative translational velocity - - double **v = atom->v; - vr1 = v[i][0] - v[j][0]; - vr2 = v[i][1] - v[j][1]; - vr3 = v[i][2] - v[j][2]; - - // normal component - - vnnr = vr1*nx + vr2*ny + vr3*nz; - vn1 = nx*vnnr; - vn2 = ny*vnnr; - vn3 = nz*vnnr; - - // tangential component - - vt1 = vr1 - vn1; - vt2 = vr2 - vn2; - vt3 = vr3 - vn3; - - // relative rotational velocity - - double **omega = atom->omega; - wr1 = (radi*omega[i][0] + radj*omega[j][0]); - wr2 = (radi*omega[i][1] + radj*omega[j][1]); - wr3 = (radi*omega[i][2] + radj*omega[j][2]); - - // meff = effective mass of pair of particles - // if I or J part of rigid body, use body mass - // if I or J is frozen, meff is other particle - - double *rmass = atom->rmass; - int *mask = atom->mask; - - mi = rmass[i]; - mj = rmass[j]; - if (fix_rigid) { - // NOTE: ensure mass_rigid is current for owned+ghost atoms? - if (mass_rigid[i] > 0.0) mi = mass_rigid[i]; - if (mass_rigid[j] > 0.0) mj = mass_rigid[j]; - } - - meff = mi*mj / (mi+mj); - if (mask[i] & freeze_group_bit) meff = mj; - if (mask[j] & freeze_group_bit) meff = mi; - - delta = radsum - r; - dR = delta*Reff; - if (normal_model[itype][jtype] == JKR) { - dR2 = dR*dR; - t0 = coh*coh*R2*R2*E; - t1 = PI27SQ*t0; - t2 = 8*dR*dR2*E*E*E; - t3 = 4*dR2*E; - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0*(t1+2*t2)); - t4 = cbrt(t1+t2+THREEROOT3*MY_PI*sqrt(sqrt1)); - t5 = t3/t4 + t4/E; - sqrt2 = MAX(0, 2*dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4*dR - t5 + SIXROOT6*coh*MY_PI*R2/(E*t6)); - a = INVROOT6*(t6 + sqrt(sqrt3)); - a2 = a*a; - knfac = normal_coeffs[itype][jtype][0]*a; - Fne = knfac*a2/Reff - MY_2PI*a2*sqrt(4*coh*E/(MY_PI*a)); - } else { - knfac = E; - Fne = knfac*delta; - a = sqrt(dR); - if (normal_model[itype][jtype] != HOOKE) { - Fne *= a; - knfac *= a; - } - if (normal_model[itype][jtype] == DMT) - Fne -= 4*MY_PI*normal_coeffs[itype][jtype][3]*Reff; - } - - if (damping_model[itype][jtype] == VELOCITY) { - damp_normal = 1; - } else if (damping_model[itype][jtype] == MASS_VELOCITY) { - damp_normal = meff; - } else if (damping_model[itype][jtype] == VISCOELASTIC) { - damp_normal = a*meff; - } else if (damping_model[itype][jtype] == TSUJI) { - damp_normal = sqrt(meff*knfac); - } else damp_normal = 0.0; - - damp_normal_prefactor = normal_coeffs[itype][jtype][1]*damp_normal; - Fdamp = -damp_normal_prefactor*vnnr; - - Fntot = Fne + Fdamp; - if (limit_damping[itype][jtype] && (Fntot < 0.0)) Fntot = 0.0; - - jnum = list->numneigh[i]; - jlist = list->firstneigh[i]; - - if (use_history) { - if ((fix_history == nullptr) || (fix_history->firstvalue == nullptr)) - error->one(FLERR,"Pair granular single computation needs history"); - allhistory = fix_history->firstvalue[i]; - for (int jj = 0; jj < jnum; jj++) { - neighprev++; - if (neighprev >= jnum) neighprev = 0; - if (jlist[neighprev] == j) break; - } - history = &allhistory[size_history*neighprev]; - } - - //**************************************** - // tangential force, including history effects - //**************************************** - - // For linear, mindlin, mindlin_rescale: - // history = cumulative tangential displacement - // - // For mindlin/force, mindlin_rescale/force: - // history = cumulative tangential elastic force - - // tangential component - vt1 = vr1 - vn1; - vt2 = vr2 - vn2; - vt3 = vr3 - vn3; - - // relative rotational velocity - wr1 = (radi*omega[i][0] + radj*omega[j][0]); - wr2 = (radi*omega[i][1] + radj*omega[j][1]); - wr3 = (radi*omega[i][2] + radj*omega[j][2]); - - // relative tangential velocities - vtr1 = vt1 - (nz*wr2-ny*wr3); - vtr2 = vt2 - (nx*wr3-nz*wr1); - vtr3 = vt3 - (ny*wr1-nx*wr2); - vrel = vtr1*vtr1 + vtr2*vtr2 + vtr3*vtr3; - vrel = sqrt(vrel); - - if (normal_model[itype][jtype] == JKR) { - F_pulloff = 3*MY_PI*coh*Reff; - Fncrit = fabs(Fne + 2*F_pulloff); - } else if (normal_model[itype][jtype] == DMT) { - F_pulloff = 4*MY_PI*coh*Reff; - Fncrit = fabs(Fne + 2*F_pulloff); - } else { - Fncrit = fabs(Fntot); - } - Fscrit = tangential_coeffs[itype][jtype][2] * Fncrit; - - //------------------------------ - // tangential forces - //------------------------------ - k_tangential = tangential_coeffs[itype][jtype][0]; - damp_tangential = tangential_coeffs[itype][jtype][1]*damp_normal_prefactor; - - if (tangential_history) { - if (tangential_model[itype][jtype] != TANGENTIAL_HISTORY) { - k_tangential *= a; - } - - shrmag = sqrt(history[0]*history[0] + history[1]*history[1] + - history[2]*history[2]); - - // tangential forces = history + tangential velocity damping - if (tangential_model[itype][jtype] == TANGENTIAL_HISTORY || - tangential_model[itype][jtype] == TANGENTIAL_MINDLIN || - tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_RESCALE) { - fs1 = -k_tangential*history[0] - damp_tangential*vtr1; - fs2 = -k_tangential*history[1] - damp_tangential*vtr2; - fs3 = -k_tangential*history[2] - damp_tangential*vtr3; - } else { - fs1 = history[0] - damp_tangential*vtr1; - fs2 = history[1] - damp_tangential*vtr2; - fs3 = history[2] - damp_tangential*vtr3; - } - - // rescale frictional forces if needed - fs = sqrt(fs1*fs1 + fs2*fs2 + fs3*fs3); - if (fs > Fscrit) { - if (shrmag != 0.0) { - fs1 *= Fscrit/fs; - fs2 *= Fscrit/fs; - fs3 *= Fscrit/fs; - fs *= Fscrit/fs; - } else fs1 = fs2 = fs3 = fs = 0.0; - } - - // classic pair gran/hooke (no history) - } else { - fs = damp_tangential*vrel; - if (vrel != 0.0) Ft = MIN(Fscrit,fs) / vrel; - else Ft = 0.0; - fs1 = -Ft*vtr1; - fs2 = -Ft*vtr2; - fs3 = -Ft*vtr3; - fs = Ft*vrel; - } - - //**************************************** - // rolling resistance - //**************************************** - - if ((roll_model[itype][jtype] != ROLL_NONE) - || (twist_model[itype][jtype] != TWIST_NONE)) { - relrot1 = omega[i][0] - omega[j][0]; - relrot2 = omega[i][1] - omega[j][1]; - relrot3 = omega[i][2] - omega[j][2]; - - // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) - // this is different from the Marshall papers, - // which use the Bagi/Kuhn formulation - // for rolling velocity (see Wang et al for why the latter is wrong) - - vrl1 = Reff*(relrot2*nz - relrot3*ny); //- 0.5*((radj-radi)/radsum)*vtr1; - vrl2 = Reff*(relrot3*nx - relrot1*nz); //- 0.5*((radj-radi)/radsum)*vtr2; - vrl3 = Reff*(relrot1*ny - relrot2*nx); //- 0.5*((radj-radi)/radsum)*vtr3; - - int rhist0 = roll_history_index; - int rhist1 = rhist0 + 1; - int rhist2 = rhist1 + 1; - - // rolling displacement - rollmag = sqrt(history[rhist0]*history[rhist0] + - history[rhist1]*history[rhist1] + - history[rhist2]*history[rhist2]); - - k_roll = roll_coeffs[itype][jtype][0]; - damp_roll = roll_coeffs[itype][jtype][1]; - fr1 = -k_roll*history[rhist0] - damp_roll*vrl1; - fr2 = -k_roll*history[rhist1] - damp_roll*vrl2; - fr3 = -k_roll*history[rhist2] - damp_roll*vrl3; - - // rescale frictional displacements and forces if needed - Frcrit = roll_coeffs[itype][jtype][2] * Fncrit; - - fr = sqrt(fr1*fr1 + fr2*fr2 + fr3*fr3); - if (fr > Frcrit) { - if (rollmag != 0.0) { - fr1 *= Frcrit/fr; - fr2 *= Frcrit/fr; - fr3 *= Frcrit/fr; - fr *= Frcrit/fr; - } else fr1 = fr2 = fr3 = fr = 0.0; - } - } else fr1 = fr2 = fr3 = fr = 0.0; - - //**************************************** - // twisting torque, including history effects - //**************************************** - - if (twist_model[itype][jtype] != TWIST_NONE) { - // omega_T (eq 29 of Marshall) - magtwist = relrot1*nx + relrot2*ny + relrot3*nz; - if (twist_model[itype][jtype] == TWIST_MARSHALL) { - k_twist = 0.5*k_tangential*a*a;; //eq 32 - damp_twist = 0.5*damp_tangential*a*a; - mu_twist = TWOTHIRDS*a*tangential_coeffs[itype][jtype][2];; - } else { - k_twist = twist_coeffs[itype][jtype][0]; - damp_twist = twist_coeffs[itype][jtype][1]; - mu_twist = twist_coeffs[itype][jtype][2]; - } - // M_t torque (eq 30) - magtortwist = -k_twist*history[twist_history_index] - damp_twist*magtwist; - signtwist = (magtwist > 0) - (magtwist < 0); - Mtcrit = mu_twist*Fncrit; // critical torque (eq 44) - if (fabs(magtortwist) > Mtcrit) { - magtortwist = -Mtcrit * signtwist; // eq 34 - } else magtortwist = 0.0; - } else magtortwist = 0.0; - - // set force and return no energy fforce = Fntot*rinv; @@ -1889,3 +1440,99 @@ double PairGranular::radii2cut(double r1, double r2) return cut; } + +double PairGranular::touch_JKR(int touch, ContactGeom geom, ContactModel model) +{ + double E, R2, a, delta_pulloff, dist_pulloff; + bool touchflag; + E = model.E; + E *= THREEQUARTERS; + if (touch) { + R2 = geom.Reff * geom.Reff; + a = cbrt(9.0 * MY_PI * model.coh * R2 / (4 * E)); + delta_pulloff = a * a / Reff - 2 * sqrt(MY_PI * coh * a / E); + dist_pulloff = geom.radsum - delta_pulloff; + touchflag = (geom.rsq < dist_pulloff * dist_pulloff); + } else { + touchflag = (geom.rsq < geom.radsum * geom.radsum); + } + return touchflag; +} + +void PairGranular::normal_JKR(double &Fne, ContactGeom geom, ContactModel model) +{ + double R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a, a2, F_pulloff; + + R2 = geom.Reff * geom.Reff; + dR2 = geom.dR * geom.dR; + t0 = model.coh * model.coh * R2 * R2 * model.E; + t1 = PI27SQ*t0; + t2 = 8 * geom.dR * dR2 * model.E * model.E * model.E; + t3 = 4 * dR2 * E; + + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / E; + sqrt2 = MAX(0, 2 * dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * model.coh * MY_PI * R2 / (model.E * t6)); + a = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = a * a; + + Fne = model.E * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * model.coh * model.E / (MY_PI * a)); + model.a = a; + model.knfac = model.E*a; +} + +void PairGraunular::normal_DMT(double &Fne, ContactGeom geom, ContactModel model) +{ + double a = sqrt(geom.dR); + Fne = a * model.E * geom.delta; + Fne -= 4 * MY_PI * model.coh * geom.Reff; + F_pulloff = 4 * MY_PI * model.coh * geom.Reff; + model.a = a; + model.knfact = model.E * a; +} + +void PairGraunular::normal_Hooke(double &Fne, ContactGeom geom, ContactModel model) +{ + double a = sqrt(geom.dR); + Fne = model.E * geom.delta; + if (model.normal != HOOKE) Fne *= a; + model.a = a; + model.knfac = model.E; + if (model.normal != HOOKE) model.knfac *= a; +} + +double PairGranular::normal_damping(double vnnr, double meff, ContactGeom geom, ContactModel model) +{ + double damp_normal, a; + if (model.damping == VELOCITY) { + damp_normal = 1; + } else if (model.damping == MASS_VELOCITY) { + damp_normal = meff; + } else if (model.damping == VISCOELASTIC) { + damp_normal = model.a * meff; + } else if (model.damping == TSUJI) { + damp_normal = sqrt(meff * model.knfac); + } else damp_normal = 0.0; + + damp_normal_prefactor = model.damp * damp_normal; + return -damp_normal_prefactor * vnnr; +} + +double PairGranular::critical_normal(double Fne, double Fntot, ContactGeom geom, Contactmodel model) +{ + if (model.normal == JKR) { + F_pulloff = 3*MY_PI*model.coh*geom.Reff; + Fncrit = fabs(Fne + 2*F_pulloff); + } else if (model.normal == DMT) { + F_pulloff = 4*MY_PI*model.coh*geom.Reff; + Fncrit = fabs(Fne + 2*F_pulloff); + } else { + Fncrit = fabs(Fntot); + } + return Fncrit; +} \ No newline at end of file diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index 5c3edf30a2..896db15231 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -100,6 +100,18 @@ class PairGranular : public Pair { double mix_stiffnessG(double, double, double, double); double mix_geom(double, double); double pulloff_distance(double, double, int, int); + + // Structure to store details of model + struct ContactModel { + int normal, damping, tangential, roll, twist; + double E, damp, poisson, coh; + double a, knfac; + }; + + struct ContactGeom { + double r, rinv, rsq, Reff, radsum; + double delta, dR; + } }; } // namespace LAMMPS_NS From 68e00a60bd8be2c55cb97a3e95156313ff766705 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 15 Jun 2022 12:37:02 -0600 Subject: [PATCH 005/445] Fixing rare bug in writing restart files with history --- src/fix_neigh_history.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fix_neigh_history.cpp b/src/fix_neigh_history.cpp index 7413b590a7..613716c9a4 100644 --- a/src/fix_neigh_history.cpp +++ b/src/fix_neigh_history.cpp @@ -351,7 +351,9 @@ void FixNeighHistory::pre_exchange_newton() // 1st loop over neighbor list // calculate npartner for owned+ghost atoms - for (i = 0; i < nall_neigh; i++) npartner[i] = 0; + // Ensure npartner is zeroed across all atoms, nall_neigh can be less than nall + // when writing restarts when comm calls are made but modify->post_neighbor() isn't + for (i = 0; i < MAX(nall_neigh, atom->nall); i++) npartner[i] = 0; tagint *tag = atom->tag; NeighList *list = pair->list; @@ -406,7 +408,7 @@ void FixNeighHistory::pre_exchange_newton() // store partner IDs and values for owned+ghost atoms // re-zero npartner to use as counter - for (i = 0; i < nall_neigh; i++) npartner[i] = 0; + for (i = 0; i < MAX(nall_neigh, atom->nall); i++) npartner[i] = 0; for (ii = 0; ii < inum; ii++) { i = ilist[ii]; From 468a6d9f29d46c6a149777fe2cafed9d0f9d276b Mon Sep 17 00:00:00 2001 From: jtclemm Date: Thu, 16 Jun 2022 14:27:57 -0600 Subject: [PATCH 006/445] creating ContactModel class --- src/GRANULAR/contact.cpp | 624 +++++++++++++++++++++++++ src/GRANULAR/contact.h | 73 +++ src/GRANULAR/pair_granular.cpp | 810 ++++++++------------------------- src/GRANULAR/pair_granular.h | 28 +- src/contact.cpp | 58 +++ src/contact.h | 50 ++ src/contact_model.cpp | 58 +++ src/contact_model.h | 35 ++ 8 files changed, 1101 insertions(+), 635 deletions(-) create mode 100644 src/GRANULAR/contact.cpp create mode 100644 src/GRANULAR/contact.h create mode 100644 src/contact.cpp create mode 100644 src/contact.h create mode 100644 src/contact_model.cpp create mode 100644 src/contact_model.h diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp new file mode 100644 index 0000000000..3cea933370 --- /dev/null +++ b/src/GRANULAR/contact.cpp @@ -0,0 +1,624 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- + + This class contains a series of tools for DEM contacts + Multiple models can be defined and used to calculate forces + and torques based on contact geometry +*/ + +#include +#include "contact.h" + +namespace LAMMPS_NS { + namespace Contact{ + +enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; +enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; +enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, + TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, + TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; +enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; +enum {ROLL_NONE, ROLL_SDS}; + +#define PI27SQ 266.47931882941264802866 // 27*PI**2 +#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) +#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) +#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) +#define FOURTHIRDS (4.0/3.0) // 4/3 +#define THREEQUARTERS 0.75 // 3/4 + +#define EPSILON 1e-10 + +ContactModel::ContactModel() +{ + k_norm = cohesion = gamma_norm = 0.0; + k_tang = gamma_tang = mu_tang = 0.0; + k_roll = gamma_roll = mu_roll = 0.0; + k_twist = gamma_twist = mu_twist = 0.0; + + limit_damping = 0; + cutoff_type = 0.0; + reset_contact(); +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::reset_contact() +{ + radi = radj = 0.0; + xi = xj = vi = vj = omegai = omegaj = nullptr; + + prep_flag = check_flag = 0; + touch = false; +} + +/* ---------------------------------------------------------------------- */ + +bool ContactModel::check_contact() +{ + check_flag = 1; + + MathExtra::sub3(xi, xj, dx); + rsq = MathExtra::lensq3(dx); + radsum = radi + radj; + Reff = radi*radj/radsum; + + touch = false; + if (normal_model == JKR) touch = touch_JKR(touch); + else touch = (rsq < radsum*radsum); + + return touch +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::prep_contact() +{ + prep_flag = 1; + + // If it hasn't already been done, test if the contact exists + if (check_flag != 1) touch = check_contact(); + if (!touch) return; + + // Set flags + mindlin_rescale = mindlin_force = 0; + if (tangential_model == TANGENTIAL_MINDLIN_RESCALE || + tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) + mindlin_rescale = 1 + if (tangential_model == TANGENTIAL_MINDLIN_FORCE || + tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) + mindlin_force = 1 + + double temp[3]; + + // Standard geometric quantities + r = sqrt(rsq); + rinv = 1.0/r; + delta = radsum - r; + dR = delta*Reff + MathExtra::scale3(rinv, dx, nx); + + // relative translational velocity + MathExtra::sub3(v[i], v[j], vr); + + // normal component + vnnr = MathExtra::dot3(vr, nx); //v_R . n + MathExtra::scale3(vnnr, nx, vn); + + // tangential component + MathExtra::sub3(vr, vn, vt); + + // relative rotational velocity + MathExtra::scaleadd3(radi, omegai, radj, omegaj, wr); + + // relative tangential velocities + MathExtra::cross3(wr, nx, temp); + MathExtra::sub3(vt, temp, vtr); + vrel = MathExtra::len(vtr); + + if (roll_model != NONE || twist_model != NONE) + MathExtra::sub3(omega[i], omega[j], relrot); + + if (roll_model != NONE) { + // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) + // this is different from the Marshall papers, which use the Bagi/Kuhn formulation + // for rolling velocity (see Wang et al for why the latter is wrong) + vrl[0] = Reff * (relrot[1] * n[2] - relrot[2] * nx[1]); + vrl[1] = Reff * (relrot[2] * n[0] - relrot[0] * nx[2]); + vrl[2] = Reff * (relrot[0] * n[1] - relrot[1] * nx[0]); + } + + if (twist_model != NONE) { + // omega_T (eq 29 of Marshall) + magtwist = MathExtra::dot3(relrot, nx); + } +} + + +/* ---------------------------------------------------------------------- */ + +void ContactModel::calculate_forces(double *forces, double *torquesi, double *torquesj, double *history) +{ + // If it hasn't already been done, run prep calculations + if (prep_flag != 1) prep_contact(); + if (!touch) { + forces[0] = forces[1] = forces[2] = 0.0; + return + } + + //********************************************** + // normal forces + //********************************************** + + // Also calculates: a, knfac, Fncrit + double Fne; + if (normal_model == JKR) { + Fne = normal_JKR(); + } else if (normal_model == DMT) { + Fne = normal_DMT(); + } else if (normal_model == HERTZ || normal_model == HERTZ_MATERIAL) { + Fne = normal_hertz(); + } else { + Fne = normal_hooke(); + } + + // NOTE: consider restricting Hooke to only have + // 'velocity' as an option for damping? + // Also calculates: damp_normal_prefactor + double Fdamp = normal_damping(); + + double Fntot = Fne + Fdamp; + if (limit_damping && (Fntot < 0.0)) Fntot = 0.0; + + //********************************************** + // tangential force, including history effects + //********************************************** + // For linear, mindlin, mindlin_rescale: + // history = cumulative tangential displacement + // + // For mindlin/force, mindlin_rescale/force: + // history = cumulative tangential elastic force + + Fncrit = critical_normal(Fne, Fntot, geom, model); + Fscrit = mu_tang * Fncrit; + + if (tangential_model == TANGENTIAL_NOHISTORY) { + tangential_no_history(); + } else if (tangential_model == TANGENTIAL_HISTORY) { + tangential_history(history); + } + tangential_forces(history); + + //********************************************** + // rolling force + //********************************************** + + if (roll_model != ROLL_NONE) + rolling(history); + + //**************************************** + // twisting torque, including history effects + //**************************************** + + if (twist_model == TWIST_MARSHALL) { + twist_marshall(history); + } else if (twist_model == TWIST_SDS) { + twist_SDS(history); + } + + //********************************************** + // sum contributions + //********************************************** + + MathExtra::scale3(Fntot, nx, forces); + MathExtra::add3(forces, fs, forces); + + MathExtra::cross3(nx, fs, torquesi); + MathExtra::copy3(torquesi, torquesj); + + double dist_to_contact = radi-0.5*delta; + MathExtra::scale3(dist_to_contact, torquesi); + dist_to_contact = radj-0.5*delta; + MathExtra::scale3(dist_to_contact, torquesj); + + double torroll[3]; + if (roll_model != ROLL_NONE) { + MathExtra::cross3(nx, fr, torroll); + MathExtra::scale3(Reff, torroll); + MathExtra::add3(torquesi, torroll, torquesi); + MathExtra::sub3(torquesj, torroll, torquesj); + } + + double tortwist[3]; + if (twist_model != NONE_TWIST) { + MathExtra::scale3(magtortwist, nx, tortwist); + MathExtra::add3(torquesi, tortwist, torquesi) + MathExtra::sub3(torquesj, tortwist, torquesj) + } +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::touch_JKR(int touch) +{ + double Escaled, R2, delta_pulloff, dist_pulloff; + bool touchflag; + + Escaled = E*THREEQUARTERS; + if (touch) { + R2 = Reff * Reff; + a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); + delta_pulloff = a * a / Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); + dist_pulloff = radsum - delta_pulloff; + touchflag = (rsq < dist_pulloff * dist_pulloff); + } else { + touchflag = (rsq < radsum * radsum); + } + return touchflag; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::normal_JKR() +{ + double R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a, a2, F_pulloff; + + R2 = Reff * Reff; + dR2 = dR * dR; + t0 = cohesion * cohesion * R2 * R2 * E; + t1 = PI27SQ*t0; + t2 = 8 * dR * dR2 * E * E * E; + t3 = 4 * dR2 * E; + + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / E; + sqrt2 = MAX(0, 2 * dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (E * t6)); + a = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = a * a; + double Fne = E * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * E / (MY_PI * a)); + double F_pulloff = 3 * MY_PI * cohesion * Reff; + + knfac = E * a; + Fncrit = fabs(Fne + 2*F_pulloff); + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::normal_DMT(double &Fne) +{ + a = sqrt(dR); + double Fne = a * E * delta; + Fne -= 4 * MY_PI * cohesion * Reff; + F_pulloff = 4 * MY_PI * cohesion * Reff; + + knfac = E * a; + Fncrit = fabs(Fne + 2*F_pulloff); + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::normal_Hertz(double &Fne) +{ + a = sqrt(dR); + double Fne = E * delta * a; + + knfac = E * a; + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::normal_Hooke(double &Fne) +{ + a = sqrt(dR); + double Fne = E * delta; + + knfac = E; + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::normal_damping() +{ + double damp_normal; + if (damping_model == VELOCITY) { + damp_normal = 1; + } else if (damping_model == MASS_VELOCITY) { + damp_normal = meff; + } else if (damping_model == VISCOELASTIC) { + damp_normal = a * meff; + } else if (damping_model == TSUJI) { + damp_normal = sqrt(meff * knfac); + } else damp_normal = 0.0; + + damp_normal_prefactor = gamma_norm * damp_normal; + return -damp_normal_prefactor * vnnr; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::tangential_no_history() +{ + double gamma_scaled = gamma_tang * damp_normal_prefactor; + double fsmag, Ft; + + // classic pair gran/hooke (no history) + fsmag = gamma_scaled * vrel; + if (vrel != 0.0) Ft = MIN(Fscrit,fsmag) / vrel; + else Ft = 0.0; + + Ft = -Ft; + MathExtra::scale3(Ft, vtr, fs); +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::tangential_forces(double *history) +{ + double gamma_scaled = gamma_tang * damp_normal_prefactor; + double k = k_tang; + int frame_update = 0; + double fsmag, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; + + // rotate and update displacements / force. + // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 + if (history_update) { + rsht = MathExtra::dot(history, nx); + frameupdate = fabs(rsht) * k > EPSILON * Fscrit; + + if (frameupdate) { + shrmag = MathExtra::len3(history); + // projection + MathExtra::scale3(rsht, nx, history); + // also rescale to preserve magnitude + prjmag = MathExtra::len3(history); + if (prjmag > 0) temp_double = shrmag / prjmag; + else temp_double = 0; + MathExtra::scale3(temp_double, history); + } + + // update history + // tangential force + // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 + temp_dbl = k * dt; + MathExtra::scale3(temp_dbl, vtr, temp_array); + MathExtra::sub3(history, temp_array, history); + } + + // tangential forces = history + tangential velocity damping + temp_double = -gamma; + MathExtra::scale3(temp_double, vtr, fs); + + // rescale frictional displacements and forces if needed + fsmag = MathExtra::len3(fs); + if (fsmag > Fscrit) { + shrmag = MathExtra::len3(history); + if (shrmag != 0.0) { + temp_double = Fscrit / magfs; + MathExtra::scale3(temp_double, fs, history); + MathExtra::scale3(gamma, vtr, temp_array); + MathExtra::add3(history, temp_array, history); + temp_double = Fscrit / magfs; + MathExtra::scale3(temp_double, fs); + } else { + MathExtra::zero3(fs); + } + } +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::tangential_mindlin(double *history) +{ + double k_scaled, gamma_scaled, fsmag, rsht, shrmag, prjmag, temp_dbl; + double temp_array[3]; + int frame_update = 0; + + gamma_scaled = gamma_tang * damp_normal_prefactor; + k_scaled = k_tange * a; + if (mindlin_rescale) { + // on unloading, rescale the shear displacements/force + if (a < history[3]) { + temp_double = a / history[3]; + MathExtra::scale3(temp_double, history); + } + } + + // rotate and update displacements / force. + // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 + if (history_update) { + rsht = MathExtra::dot(history, nx); + if (mindlin_force) + frameupdate = fabs(rsht) > EPSILON * Fscrit; + else + frameupdate = fabs(rsht) * k_scaled > EPSILON * Fscrit; + + if (frameupdate) { + shrmag = MathExtra::len3(history); + // projection + MathExtra::scale3(rsht, nx, history); + // also rescale to preserve magnitude + prjmag = MathExtra::len3(history); + if (prjmag > 0) temp_double = shrmag / prjmag; + else temp_double = 0; + MathExtra::scale3(temp_double, history); + } + + // update history + if (mindlin_force) { + // tangential force + // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 + temp_dbl = -k_scaled * dt; + MathExtra::scale3(temp_dbl, vtr, temp_array); + } else { + MathExtra::scale3(dt, vtr, temp_array); + } + MathExtra::add3(history, temp_array, history); + + if (mindlin_rescale) history[3] = a; + } + + // tangential forces = history + tangential velocity damping + temp_double = -gamma_scaled; + MathExtra::scale3(temp_double, vtr, fs); + + if (! mindlin_force) { + MathExtra::scale3(k_scaled, history, temp_array); + MathExtra::add3(fs, temp_array, fs); + } + + // rescale frictional displacements and forces if needed + fsmag = MathExtra::len3(fs); + if (fsmag > Fscrit) { + shrmag = MathExtra::len3(history); + if (shrmag != 0.0) { + temp_double = Fscrit / magfs; + MathExtra::scale3(temp_double, fs, history); + MathExtra::scale3(gamma, vtr, temp_array); + MathExtra::add3(history, temp_array, history); + if (! mindlin_force) { + temp_double = -1.0 / k; + MathExtra::scale3(temp_double, history); + } + temp_double = Fscrit / magfs; + MathExtra::scale3(temp_double, fs); + } else { + MathExtra::zero3(fs); + } + } +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::rolling(double *history) +{ + int rhist0, rhist1, rhist2, frameupdate; + double rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_array[3]; + + rhist0 = roll_history_index; + rhist1 = rhist0 + 1; + rhist2 = rhist1 + 1; + + Frcrit = mu_roll * Fncrit; + + if (history_update) { + hist_temp[0] = history[rhist0]; + hist_temp[1] = history[rhist1]; + hist_temp[2] = history[rhist2]; + rolldotn = MathExtra::dot3(hist_temp, nx); + + frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit; + if (frameupdate) { // rotate into tangential plane + rollmag = MathExtra::len3(temp); + // projection + temp_double = -rolldotn; + MathExtra::scale3(temp_double, nx, temp); + + // also rescale to preserve magnitude + prjmag = MathExtra::len3(hist_temp); + if (prjmag > 0) temp_double = rollmag / prjmag; + else temp_double = 0; + MathExtra::scale3(temp_double, hist_temp); + } + MathExtra::scale3(dt, vrl, temp_array); + MathExtra::add3(hist_temp, temp_array, hist_temp) + } + + MathExtra::scaleadd3(k_roll, hist_tepm, gamma_roll, vrl, fr); + MathExtra::negate3(fr); + + // rescale frictional displacements and forces if needed + + magfr = MathExtra::len3(fr); + if (magfr > Frcrit) { + rollmag = MathExtra::len3(temp); + if (rollmag != 0.0) { + temp_double = -Frcrit / (magfr * k_roll); + MathExtra::scale3(temp_double, fr, temp_array); + MathExtra::add3(hist_temp, temp_array, hist_temp); + + temp_double = -gamma_roll/k_roll; + MathExtra::scale3(temp_double, vrl, temp_array); + MathExtra::add3(hist_temp, temp_array, hist_temp) + + temp_double = Frcrit / magfr; + MathExtra::scale3(temp_double, fr); + } else { + MathExtra::zero3(fr); + } + } + + history[rhist0] = hist_temp[0]; + history[rhist1] = hist_temp[1]; + history[rhist2] = hist_temp[2]; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::twisting_marshall(double *history) +{ + // Overwrite twist coefficients with derived values + k_twist = 0.5 * k_tangential * a * a; // eq 32 of Marshall paper + gamma_twist = 0.5 * gamma_tangential * a * a; + mu_twist = TWOTHIRDS * a * mu_tangential; + + twisting_SDS(history); +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::twisting_SDS(double *history) +{ + double signtwist, Mtcrit; + + if (historyupdate) { + history[twist_history_index] += magtwist * dt; + } + + magtortwist = -k_twist * history[twist_history_index] - damp_twist*magtwist; // M_t torque (eq 30) + signtwist = (magtwist > 0) - (magtwist < 0); + Mtcrit = mu_twist * Fncrit; // critical torque (eq 44) + if (fabs(magtortwist) > Mtcrit) { + history[twist_history_index] = (Mtcrit * signtwist - gamma_twist * magtwist) / k_twist; + magtortwist = -Mtcrit * signtwist; // eq 34 + } +} + +/* ---------------------------------------------------------------------- + compute pull-off distance (beyond contact) for a given radius and atom type + use temporary variables since this does not use a specific contact geometry +------------------------------------------------------------------------- */ + +double ContactModel::pulloff_distance(double radi, double radj) +{ + double Ecaled, a_tmp, Reff_tmp; + + if (normal_model != JKR) return radi+radj; + + Reff_tmp = radi * radj / (radi + radj); + if (Reff_tmp <= 0) return 0; + Ecaled = E * THREEQUARTERS; + a_tmp = cbrt(9 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4 * Ecaled)); + return a_tmp * a_tmp / Reff_tmp - 2 * sqrt(MY_PI * cohesion * a_tmp / Ecaled); +} + +}} diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h new file mode 100644 index 0000000000..a5b5d23463 --- /dev/null +++ b/src/GRANULAR/contact.h @@ -0,0 +1,73 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef LMP_CONTACT +_H +#define LMP_CONTACT +_H + +namespace LAMMPS_NS { +namespace Contact { + + class ContactModel { + public: + ContactModel(); + void reset_contact(); + bool check_contact(); + void prep_contact(); + void calculate_forces(double *, double *, double *, double *); + double pulloff_distance(double, double); + + int normal_model, damping_model, tangential_model; + int roll_model, twist_model; + int limit_damping; + double cutoff_type; + double Emod, poisson; // variables used in defining mixed interactions + double k_norm, gamma_norm, cohesion; // normal_coeffs + double k_tang, gamma_tang, mu_tang; // tangential_coeffs - wutang? + double k_roll, gamma_roll, mu_roll; // roll_coeffs + double k_twist, gamma_twist, mu_twist; // twist_coeffs + + double radi, radj, meff, dt; + double xi[3], xj[3], vi[3], vj[3], omegai[3], omegaj[3]; + int history_update, roll_history_index, twist_history_index; + + private: + double a, knfac, Fncrit, Fscrit, Frcrit, damp_normal_prefactor; + double fs[3], fr[3], ft[3]; + double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta; + double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrel; + double magtwist, magtortwist; + bool touch; + + int prep_flag, check_flag; + int mindlin_rescale, mindlin_force; + + void touch_JKR(int); + double normal_JKR(); + double normal_DMT(); + double normal_Hertz(); + double normal_Hooke(); + double normal_damping(); + void tangential_no_history(); + void tangential_history(double *); + void tangential_mindlin(double *); + void rolling(double *); + void twisting_marshall(double *); + void twisting_SDS(double *); + + }; + +} // namespace Contact +} // namespace LAMMPS_NS +#endif diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 34edbc0ae3..61644df9c2 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -22,6 +22,7 @@ #include "atom.h" #include "comm.h" +#include "contact.h" #include "error.h" #include "fix.h" #include "fix_dummy.h" @@ -43,23 +44,9 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; +using namespace Contact; -#define PI27SQ 266.47931882941264802866 // 27*PI**2 -#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) -#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) -#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) -#define FOURTHIRDS (4.0/3.0) // 4/3 -#define THREEQUARTERS 0.75 // 3/4 -#define EPSILON 1e-10 - -enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; -enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; -enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, - TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, - TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; -enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; -enum {ROLL_NONE, ROLL_SDS}; /* ---------------------------------------------------------------------- */ @@ -83,6 +70,8 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) maxrad_dynamic = nullptr; maxrad_frozen = nullptr; + models = nullptr; + limit_damping = nullptr; history_transfer_factors = nullptr; @@ -121,6 +110,8 @@ PairGranular::~PairGranular() memory->destroy(cutsq); memory->destroy(cutoff_type); + memory->destroy(models); + memory->destroy(normal_coeffs); memory->destroy(tangential_coeffs); memory->destroy(roll_coeffs); @@ -150,38 +141,9 @@ PairGranular::~PairGranular() void PairGranular::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum,itype,jtype; - double dx[3],fx[3],nx[3]; - double radi,radj,radsum,rsq,r,rinv,factor_lj; - double Reff, delta, dR, dR2, dist_to_contact; + double factor_lj,mi,mj,meff; + double forces[3], torquesi[3], torquesj[3]; - double vr[3],vnnr,vn[3],vt[3],wr[3],vtr[3],vrel[3]; - double temp[3], temp_dbl; - - double damp_normal=0.0, damp_normal_prefactor; - double k_tangential, damp_tangential; - double Fne, Ft, Fdamp, Fntot, Fncrit, Fscrit, Frcrit; - double magfs, fs[3], tor[3]; - - double mi,mj,meff; - double relrot[3],vrl[3]; - - ContactModel model; - ContactGeom geom; - - // rolling - double k_roll, damp_roll; - int rhist0, rhist1, rhist2; - double torroll[3]; - double rollmag, rolldotn, scalefac; - double magfr, fr[3]; - - // twisting - double k_twist, damp_twist, mu_twist; - double signtwist, magtwist, magtortwist, Mtcrit; - double tortwist[3]; - - double shrmag,rsht,prjmag; - bool frameupdate; int *ilist,*jlist,*numneigh,**firstneigh; int *touch,**firsttouch; double *history,*allhistory,**firsthistory; @@ -235,8 +197,6 @@ void PairGranular::compute(int eflag, int vflag) for (ii = 0; ii < inum; ii++) { i = ilist[ii]; itype = type[i]; - itype = type[i]; - radi = radius[i]; if (use_history) { touch = firsttouch[i]; allhistory = firsthistory[i]; @@ -251,24 +211,17 @@ void PairGranular::compute(int eflag, int vflag) if (factor_lj == 0) continue; - MathExtra::sub3(x[i], x[j], dx); jtype = type[j]; - rsq = MathExtra::lensq3(dx); - radj = radius[j]; - radsum = radi + radj; - Reff = radi*radj/radsum; - // Copy data into structures to easily pass to functions - geom.rsq = rsq; - geom.Reff = Reff; - geom.radsum = radsum; + // Reset model and copy initial geometric data + models[itype][jtype]->reset_contact(); + models[itype][jtype].xi = x[i]; + models[itype][jtype].xj = x[j]; + models[itype][jtype].radi = radius[i]; + models[itype][jtype].radj = radius[j]; - touchflag = false; - if (normal_model[itype][jtype] == JKR) { - touchflag = touch_JKR(touch[jj], geom, model) - } else { - touchflag = (rsq < radsum*radsum); - } + + touchflag = models[itype][jtype]->check_contact(); if (!touchflag) { // unset non-touching neighbors @@ -278,336 +231,57 @@ void PairGranular::compute(int eflag, int vflag) for (int k = 0; k < size_history; k++) history[k] = 0.0; } } else { - r = sqrt(rsq); - rinv = 1.0/r; - - // Copy data into structures to easily pass to functions - geom.r = r; - geom.rinv = rinv - geom.delta = radsum - r; - geom.dR = geom.delta*Reff; - - model.normal = normal_model[itype][jtype]; - model.damping = damping_model[itype][jtype]; - model.tangential = tangential_model[itype][jtype]; - model.roll = roll_model[itype][jtype]; - model.twist = twist_model[itype][jtype]; - model.E = normal_coeffs[itype][jtype][0]; - model.damp = normal_coeffs[itype][jtype][1]; - model.poisson = normal_coeffs[itype][jtype][2]; - model.coh = normal_coeffs[itype][jtype][3]; - - MathExtra::scale3(rinv, dx, nx); - - // relative translational velocity - MathExtra::sub3(v[i], v[j], vr); - - // normal component - vnnr = MathExtra::dot3(vr, nx); //v_R . n - MathExtra::scale3(vnnr, nx, vn); // meff = effective mass of pair of particles // if I or J part of rigid body, use body mass // if I or J is frozen, meff is other particle - mi = rmass[i]; mj = rmass[j]; if (fix_rigid) { if (mass_rigid[i] > 0.0) mi = mass_rigid[i]; if (mass_rigid[j] > 0.0) mj = mass_rigid[j]; } - meff = mi * mj / (mi + mj); if (mask[i] & freeze_group_bit) meff = mj; if (mask[j] & freeze_group_bit) meff = mi; - if (model.normal == JKR) { - touch[jj] = 1; - normal_JKR(Fne, Fncrit, geom, model); - } else if (model.normal == DMT) { - normal_DMT(Fne, Fncrit, geom, model); - } else { - normal_hooke(Fne, Fncrit, geom, model); - } + // Copy additional information and prepare force calculations + models[itype][jtype].meff = meff; + models[itype][jtype].dt = dt; + models[itype][jtype].history_update = historyupdate; + models[itype][jtype].roll_history_index = roll_history_index; + models[itype][jtype].twist_history_index = twist_history_index; + models[itype][jtype].vi = v[i]; + models[itype][jtype].vj = v[j]; + models[itype][jtype].omegai = omega[i]; + models[itype][jtype].omegaj = omega[j]; + models[itype][jtype] -> prep_contact(); - // NOTE: consider restricting Hooke to only have - // 'velocity' as an option for damping? - Fdamp = normal_damping(vnnr, meff, geom, model); - - Fntot = Fne + Fdamp; - if (limit_damping[itype][jtype] && (Fntot < 0.0)) Fntot = 0.0; - - //**************************************** - // tangential force, including history effects - //**************************************** - - // For linear, mindlin, mindlin_rescale: - // history = cumulative tangential displacement - // - // For mindlin/force, mindlin_rescale/force: - // history = cumulative tangential elastic force - - // tangential component - MathExtra::sub3(vr, vn, vt); - - // relative rotational velocity - MathExtra::scaleadd3(radi, omega[i], radj, omega[j], wr); - - // relative tangential velocities - MathExtra::cross3(wr, nx, temp); - MathExtra::sub3(vt, temp, vtr); - vrel = MathExtra::len(vtr); + if (models[itype][jtype].normal_model == JKR) touch[jj] = 1; // if any history is needed if (use_history) { touch[jj] = 1; history = &allhistory[size_history*jj]; } - Fncrit = critical_normal(Fne, Fntot, geom, model); - Fscrit = model.poisson * Fncrit; - - //------------------------------ - // tangential forces - //------------------------------ - - k_tangential = tangential_coeffs[itype][jtype][0]; - damp_tangential = tangential_coeffs[itype][jtype][1] * - damp_normal_prefactor; - - if (tangential_history) { - if (tangential_model[itype][jtype] == TANGENTIAL_MINDLIN || - tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_FORCE) { - k_tangential *= a; - } else if (tangential_model[itype][jtype] == - TANGENTIAL_MINDLIN_RESCALE || - tangential_model[itype][jtype] == - TANGENTIAL_MINDLIN_RESCALE_FORCE) { - k_tangential *= a; - // on unloading, rescale the shear displacements/force - if (a < history[3]) { - double factor = a/history[3]; - MathExtra::scale3(history, factor); - } - } - // rotate and update displacements / force. - // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (historyupdate) { - rsht = history[0]*nx + history[1]*ny + history[2]*nz; - if (tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_FORCE || - tangential_model[itype][jtype] == - TANGENTIAL_MINDLIN_RESCALE_FORCE) - frameupdate = fabs(rsht) > EPSILON * Fscrit; - else - frameupdate = fabs(rsht) * k_tangential > EPSILON * Fscrit; - if (frameupdate) { - shrmag = sqrt(history[0]*history[0] + history[1]*history[1] + - history[2]*history[2]); - // projection - MathExtra::scale3(rsht, nx, history); - - // also rescale to preserve magnitude - prjmag = MathExtra::len3(history); - if (prjmag > 0) scalefac = shrmag/prjmag; - else scalefac = 0; - MathExtra::scale3(scalefac, history); - } - // update history - if (tangential_model[itype][jtype] == TANGENTIAL_HISTORY || - tangential_model[itype][jtype] == TANGENTIAL_MINDLIN || - tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_RESCALE) { - // tangential displacement - MathExtra::scale3(dt, vtr, temp); - MathExtra::add3(temp, history, history); - } else { - // tangential force - // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - MathExtra::scale3(k_tangential*dt, vtr, temp); - MathExtra::sub3(history, temp, history); - } - if (tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_RESCALE || - tangential_model[itype][jtype] == - TANGENTIAL_MINDLIN_RESCALE_FORCE) - history[3] = a; - } - - // tangential forces = history + tangential velocity damping - MathExtra::scale3(-damp_tangential, vtr, fs); - if (tangential_model[itype][jtype] == TANGENTIAL_HISTORY || - tangential_model[itype][jtype] == TANGENTIAL_MINDLIN || - tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_RESCALE) { - MathExtra::scale3(-k_tangential, history, temp); - MathExtra::add3(fs, temp, fs); - } - - // rescale frictional displacements and forces if needed - magfs = MathExtra::len3(fs); - if (fs > Fscrit) { - shrmag = MathExtra::len3(history); - if (shrmag != 0.0) { - history[0] = Fscrit*fs[0]/magfs + damp_tangential*vtr[0]; - history[1] = Fscrit*fs[1]/magfs + damp_tangential*vtr[1]; - history[2] = Fscrit*fs[2]/magfs + damp_tangential*vtr[2]; - if (tangential_model[itype][jtype] == TANGENTIAL_HISTORY || - tangential_model[itype][jtype] == TANGENTIAL_MINDLIN || - tangential_model[itype][jtype] == - TANGENTIAL_MINDLIN_RESCALE) { - MathExtra::scale3(-1.0/k_tangential, history); - } - MathExtra::scale3(Fscrit/magfs, fs); - } else MathExtra::zero3(fs); - } - } else { // classic pair gran/hooke (no history) - fs = damp_tangential*vrel; - if (vrel != 0.0) Ft = MIN(Fscrit,fs) / vrel; - else Ft = 0.0; - MathExtra::scale3(-Ft, vtr, fs); - } - - if (roll_model[itype][jtype] != ROLL_NONE || - twist_model[itype][jtype] != TWIST_NONE) { - MathExtra::sub3(omega[i], omega[j], relrot); - } - //**************************************** - // rolling resistance - //**************************************** - - if (roll_model[itype][jtype] != ROLL_NONE) { - // rolling velocity, - // see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) - // this is different from the Marshall papers, - // which use the Bagi/Kuhn formulation - // for rolling velocity (see Wang et al for why the latter is wrong) - vrl[0] = Reff * (relrot[1] * n[2] - relrot[2] * nx[1]); - vrl[1] = Reff * (relrot[2] * n[0] - relrot[0] * nx[2]); - vrl[2] = Reff * (relrot[0] * n[1] - relrot[1] * nx[0]); - - rhist0 = roll_history_index; - rhist1 = rhist0 + 1; - rhist2 = rhist1 + 1; - - k_roll = roll_coeffs[itype][jtype][0]; - damp_roll = roll_coeffs[itype][jtype][1]; - Frcrit = roll_coeffs[itype][jtype][2] * Fncrit; - - if (historyupdate) { - temp[0] = history[rhist0]; - temp[1] = history[rhist1]; - temp[2] = history[rhist2]; - rolldotn = MathExtra::dot3(temp, nx); - frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit; - if (frameupdate) { // rotate into tangential plane - rollmag = MathExtra::len3(temp); - // projection - temp[0] -= rolldotn*nx[0]; - temp[1] -= rolldotn*nx[1]; - temp[2] -= rolldotn*nx[2]; - // also rescale to preserve magnitude - prjmag = MathExtra::len3(temp); - if (prjmag > 0) scalefac = rollmag/prjmag; - else scalefac = 0; - MathExtra::scale3(scalefac, temp); - } - temp[0] += vrl[0]*dt; - temp[1] += vrl[1]*dt; - temp[2] += vrl[2]*dt; - } - - fr[0] = -k_roll*temp[0] - damp_roll*vrl[0]; - fr[1] = -k_roll*temp[1] - damp_roll*vrl[1]; - fr[2] = -k_roll*temp[2] - damp_roll*vrl[2]; - - // rescale frictional displacements and forces if needed - - magfr = MathExtra::len3(fr); - if (magfr > Frcrit) { - rollmag = MathExtra::len3(temp); - if (rollmag != 0.0) { - temp[0] = -1.0/k_roll*(Frcrit*fr[0]/magfr + damp_roll*vrl[0]); - temp[1] = -1.0/k_roll*(Frcrit*fr[1]/magfr + damp_roll*vrl[1]); - temp[2] = -1.0/k_roll*(Frcrit*fr[2]/magfr + damp_roll*vrl[2]); - fr[0] *= Frcrit/magfr; - fr[1] *= Frcrit/magfr; - fr[2] *= Frcrit/magfr; - } else MathExtra::zero3(fr); - } - - history[rhist0] = temp[0]; - history[rhist1] = temp[1]; - history[rhist2] = temp[2]; - } - - //**************************************** - // twisting torque, including history effects - //**************************************** - - if (twist_model[itype][jtype] != TWIST_NONE) { - // omega_T (eq 29 of Marshall) - magtwist = MathExtra::dot3(relrot, nx); - if (twist_model[itype][jtype] == TWIST_MARSHALL) { - k_twist = 0.5*k_tangential*a*a;; // eq 32 of Marshall paper - damp_twist = 0.5*damp_tangential*a*a; - mu_twist = TWOTHIRDS*a*tangential_coeffs[itype][jtype][2]; - } else { - k_twist = twist_coeffs[itype][jtype][0]; - damp_twist = twist_coeffs[itype][jtype][1]; - mu_twist = twist_coeffs[itype][jtype][2]; - } - if (historyupdate) { - history[twist_history_index] += magtwist*dt; - } - magtortwist = -k_twist*history[twist_history_index] - - damp_twist*magtwist; // M_t torque (eq 30) - signtwist = (magtwist > 0) - (magtwist < 0); - Mtcrit = mu_twist*Fncrit; // critical torque (eq 44) - if (fabs(magtortwist) > Mtcrit) { - history[twist_history_index] = 1.0/k_twist*(Mtcrit*signtwist - - damp_twist*magtwist); - magtortwist = -Mtcrit * signtwist; // eq 34 - } - } + models[itype][jtype].calculate_forces(forces, torquesi, torquesj, history); // apply forces & torques + MathExtra::scale3(factor_lj, forces); + MathExtra::add3(f[i], forces, f[i]); - MathExtra::scale3(Fntot, nx, fx); - MathExtra::add3(fx, fs, fx); - MathExtra::scale3(factor_lj, fx); - MathExtra::add3(f[i], fx, f[i]); - - MathExtra::cross3(nx, fs, tor); - MathExtra::scale3(factor_lj, tor); - - dist_to_contact = radi-0.5*delta; - MathExtra::scale3(dist_to_contact, tor, temp); - MathExtra::sub3(torque[i], temp, torque[i]); - - if (twist_model[itype][jtype] != TWIST_NONE) { - MathExtra::scale3(magtortwist, nx, tortwist); - MathExtra::scale3(factor_lj, tortwist); - MathExtra::add3(torque[i], tortwist, torque[i]); - } - - if (roll_model[itype][jtype] != ROLL_NONE) { - MathExtra::cross3(nx, fr, torroll); - MathExtra::scale3(Reff, torroll); - MathExtra::scale3(factor_lj, torroll); - MathExtra::add3(torque[i], torroll, torque[i]); - } + MathExtra::scale3(factor_lj, torquesi); + MathExtra::add3(torques[i], torquesi, torques[i]); if (force->newton_pair || j < nlocal) { - MathExtra::sub3(f[j], fx, f[j]); - - dist_to_contact = radj-0.5*delta; - MathExtra::scale3(dist_to_contact, tor, temp); - MathExtra::sub3(torque[j], tor, torque[j]); - - if (twist_model[itype][jtype] != TWIST_NONE) - MathExtra::sub3(torque[j], tortwist, torque[j]); - if (roll_model[itype][jtype] != ROLL_NONE) - MathExtra::sub3(torque[j], torroll, torque[j]); + MathExtra::sub3(f[j], forces, f[j]); + MathExtra::scale3(factor_lj, torquesj); + MathExtra::add3(torques[j], torquesj, torques[j]); } + if (evflag) ev_tally_xyz(i,j,nlocal,force->newton_pair, - 0.0,0.0,fx[0],fx[1],fx[2],dx[0],dy[1],dx[2]); + 0.0,0.0,forces[0],forces[1],forces[2],dx[0],dy[1],dx[2]); } } } @@ -629,20 +303,7 @@ void PairGranular::allocate() memory->create(cutsq,n+1,n+1,"pair:cutsq"); memory->create(cutoff_type,n+1,n+1,"pair:cutoff_type"); - memory->create(normal_coeffs,n+1,n+1,4,"pair:normal_coeffs"); - memory->create(tangential_coeffs,n+1,n+1,3,"pair:tangential_coeffs"); - memory->create(roll_coeffs,n+1,n+1,3,"pair:roll_coeffs"); - memory->create(twist_coeffs,n+1,n+1,3,"pair:twist_coeffs"); - - memory->create(Emod,n+1,n+1,"pair:Emod"); - memory->create(poiss,n+1,n+1,"pair:poiss"); - - memory->create(normal_model,n+1,n+1,"pair:normal_model"); - memory->create(damping_model,n+1,n+1,"pair:damping_model"); - memory->create(tangential_model,n+1,n+1,"pair:tangential_model"); - memory->create(roll_model,n+1,n+1,"pair:roll_model"); - memory->create(twist_model,n+1,n+1,"pair:twist_model"); - memory->create(limit_damping,n+1,n+1,"pair:limit_damping"); + memory->create(models,n+1,n+1,"pair:models"); onerad_dynamic = new double[n+1]; onerad_frozen = new double[n+1]; @@ -899,56 +560,64 @@ void PairGranular::coeff(int narg, char **arg) error->all(FLERR,"Illegal pair_coeff command, " "Cannot limit damping with DMT model"); + double Emod, poisson; for (int i = ilo; i <= ihi; i++) { for (int j = MAX(jlo,i); j <= jhi; j++) { - normal_model[i][j] = normal_model[j][i] = normal_model_one; - normal_coeffs[i][j][1] = normal_coeffs[j][i][1] = damp; + + // Define normal model + models[i][j].normal_model = models[j][i].normal_model = normal_model_one; + models[i][j].damping_model = models[j][i].damping_model = damping_model_one; + models[i][j].gamma_norm = models[j][i].gamma_norm = damp; + Emod = normal_coeffs_one[0]; + poisson = normal_coeffs_one[2]; + models[i][j].Emod = models[j][i].Emod = Emod; + models[i][j].poisson = models[j][i].poisson = poisson; + if (normal_model_one != HERTZ && normal_model_one != HOOKE) { - Emod[i][j] = Emod[j][i] = normal_coeffs_one[0]; - poiss[i][j] = poiss[j][i] = normal_coeffs_one[2]; - normal_coeffs[i][j][0] = normal_coeffs[j][i][0] = - FOURTHIRDS*mix_stiffnessE(Emod[i][j],Emod[i][j], - poiss[i][j],poiss[i][j]); + models[i][j].k_norm = models[j][i].k_norm = + FOURTHIRDS*mix_stiffnessE(Emod,Emod,poisson,poisson); } else { - normal_coeffs[i][j][0] = normal_coeffs[j][i][0] = normal_coeffs_one[0]; + models[i][j].k_norm = models[j][i].k_norm = normal_coeffs_one[0]; } if ((normal_model_one == JKR) || (normal_model_one == DMT)) - normal_coeffs[i][j][3] = normal_coeffs[j][i][3] = normal_coeffs_one[3]; + models[i][j].cohesion = models[j][i].cohesion = normal_coeffs_one[3]; - damping_model[i][j] = damping_model[j][i] = damping_model_one; - - tangential_model[i][j] = tangential_model[j][i] = tangential_model_one; + // Define tangential model + models[i][j].tangential_model = models[j][i].tangential_model = tangential_model_one; if (tangential_coeffs_one[0] == -1) { - tangential_coeffs[i][j][0] = tangential_coeffs[j][i][0] = - 8*mix_stiffnessG(Emod[i][j],Emod[i][j],poiss[i][j],poiss[i][j]); + models[i][j].k_tang = models[j][i].k_tang = + 8*mix_stiffnessG(Emod, Emod, poisson, poisson); } else { - tangential_coeffs[i][j][0] = tangential_coeffs[j][i][0] = - tangential_coeffs_one[0]; + models[i][j].k_tang = models[j][i].k_tang = tangential_coeffs_one[0]; } - for (int k = 1; k < 3; k++) - tangential_coeffs[i][j][k] = tangential_coeffs[j][i][k] = - tangential_coeffs_one[k]; + models[i][j].gamma_tang = models[j][i]].gamma_tang = tangential_coeffs_one[1]; + models[i][j].mu_tang = models[j][i]].mu_tang = tangential_coeffs_one[2]; - roll_model[i][j] = roll_model[j][i] = roll_model_one; - if (roll_model_one != ROLL_NONE) - for (int k = 0; k < 3; k++) - roll_coeffs[i][j][k] = roll_coeffs[j][i][k] = roll_coeffs_one[k]; + // Define rolling model + model[i][j].roll_model = model[j][i].roll_model = roll_model_one; + if (roll_model_one != ROLL_NONE) { + model[i][j].k_roll = model[j][i].k_roll = roll_coeffs_one[0]; + model[i][j].gamma_roll = model[j][i].gamma_roll = roll_coeffs_one[1]; + model[i][j].mu_roll = model[j][i].mu_roll = roll_coeffs_one[2]; + } - twist_model[i][j] = twist_model[j][i] = twist_model_one; - if (twist_model_one != TWIST_NONE && twist_model_one != TWIST_MARSHALL) - for (int k = 0; k < 3; k++) - twist_coeffs[i][j][k] = twist_coeffs[j][i][k] = twist_coeffs_one[k]; + // Define twisting model + models[i][j].twist_model = models[j][i].twist_model = twist_model_one; + if (twist_model_one != TWIST_NONE && twist_model_one != TWIST_MARSHALL) { + model[i][j].k_twist = model[j][i].k_twist = twist_coeffs_one[0]; + model[i][j].gamma_twist = model[j][i].gamma_twist = twist_coeffs_one[1]; + model[i][j].mu_twist = model[j][i].mu_twist = twist_coeffs_one[2]; + } - cutoff_type[i][j] = cutoff_type[j][i] = cutoff_one; - - limit_damping[i][j] = limit_damping[j][i] = ld_flag; + // Define extra options + model[i][j].cutoff_type = model[j][i].cutoff_type = cutoff_one; + model[i][j].limit_damping = model[j][i].limit_damping = ld_flag; setflag[i][j] = 1; count++; } } - if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); } @@ -976,7 +645,7 @@ void PairGranular::init_style() for (int i = 1; i <= atom->ntypes; i++) for (int j = i; j <= atom->ntypes; j++) - if (normal_model[i][j] == JKR) use_history = 1; + if (models[i][j].normal_model == JKR) use_history = 1; size_history = 3*tangential_history + 3*roll_history + twist_history; @@ -997,8 +666,8 @@ void PairGranular::init_style() } for (int i = 1; i <= atom->ntypes; i++) for (int j = i; j <= atom->ntypes; j++) - if (tangential_model[i][j] == TANGENTIAL_MINDLIN_RESCALE || - tangential_model[i][j] == TANGENTIAL_MINDLIN_RESCALE_FORCE) { + if (model[i][j].tangential_model == TANGENTIAL_MINDLIN_RESCALE || + model[i][j].tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) { size_history += 1; roll_history_index += 1; twist_history_index += 1; @@ -1100,47 +769,61 @@ void PairGranular::init_style() double PairGranular::init_one(int i, int j) { - double cutoff=0.0; + double cutoff = 0.0; if (setflag[i][j] == 0) { - if ((normal_model[i][i] != normal_model[j][j]) || - (damping_model[i][i] != damping_model[j][j]) || - (tangential_model[i][i] != tangential_model[j][j]) || - (roll_model[i][i] != roll_model[j][j]) || - (twist_model[i][i] != twist_model[j][j])) { + if ((models[i][i].normal_model != models[j][j].normal_model) || + (models[i][i].damping_model != models[j][j].damping_model) || + (models[i][i].tangential_model != models[j][j].tangential_model) || + (models[i][i].roll_model != models[j][j].roll_model) || + (models[i][i].twist_model != models[j][j].twist_model)) { error->all(FLERR,"Granular pair style functional forms are different, " "cannot mix coefficients for types {} and {}. \n" "This combination must be set explicitly via a " "pair_coeff command",i,j); } - if (normal_model[i][j] == HERTZ || normal_model[i][j] == HOOKE) - normal_coeffs[i][j][0] = normal_coeffs[j][i][0] = - mix_geom(normal_coeffs[i][i][0], normal_coeffs[j][j][0]); + // Mix normal coefficients + if (models[i][j].normal_model == HERTZ || models[i][j].normal_model == HOOKE) + models[i][j].k_norm = models[j][i][0].k_norm = + mix_geom(models[i][i].k_norm, models[j][j].k_norm); else - normal_coeffs[i][j][0] = normal_coeffs[j][i][0] = - mix_stiffnessE(Emod[i][i], Emod[j][j], poiss[i][i], poiss[j][j]); + models[i][j].k_norm = models[j][i].k_norm = + mix_stiffnessE(models[i][i].Emod, models[j][j].Emod, + models[i][i].poisson, models[j][j].poisson); - normal_coeffs[i][j][1] = normal_coeffs[j][i][1] = - mix_geom(normal_coeffs[i][i][1], normal_coeffs[j][j][1]); + models[i][j].gamma_norm = models[j][i].gamma_norm = + mix_geom(models[i][i].gamma_norm, models[j][j].gamma_norm); if ((normal_model[i][j] == JKR) || (normal_model[i][j] == DMT)) - normal_coeffs[i][j][3] = normal_coeffs[j][i][3] = - mix_geom(normal_coeffs[i][i][3], normal_coeffs[j][j][3]); + models[i][j].cohesion = models[j][i].cohesion = + mix_geom(models[i][i].cohesion, models[j][j].cohesion); - for (int k = 0; k < 3; k++) - tangential_coeffs[i][j][k] = tangential_coeffs[j][i][k] = - mix_geom(tangential_coeffs[i][i][k], tangential_coeffs[j][j][k]); + // Mix tangential coefficients + models[i][j].k_tang = models[j][i].k_tang = + mix_geom(models[i][i].k_tang, models[j][j].k_tang); + models[i][j].gamma_tang = models[j][i].gamma_tang = + mix_geom(models[i][i].gamma_tang, models[j][j].gamma_tang); + models[i][j].mu_tang = models[j][i].mu_tang = + mix_geom(models[i][i].mu_tang, models[j][j].mu_tang); - if (roll_model[i][j] != ROLL_NONE) { - for (int k = 0; k < 3; k++) - roll_coeffs[i][j][k] = roll_coeffs[j][i][k] = - mix_geom(roll_coeffs[i][i][k], roll_coeffs[j][j][k]); + // Mix rolling coefficients + if (models.roll_model[i][j] != ROLL_NONE) { + models[i][j].k_roll = models[j][i].k_roll = + mix_geom(models[i][i].k_roll, models[j][j].k_roll); + models[i][j].gamma_roll = models[j][i].gamma_roll = + mix_geom(models[i][i].gamma_roll, models[j][j].gamma_roll); + models[i][j].mu_roll = models[j][i].mu_roll = + mix_geom(models[i][i].mu_roll, models[j][j].mu_roll); } - if (twist_model[i][j] != TWIST_NONE && twist_model[i][j] != TWIST_MARSHALL) { - for (int k = 0; k < 3; k++) - twist_coeffs[i][j][k] = twist_coeffs[j][i][k] = - mix_geom(twist_coeffs[i][i][k], twist_coeffs[j][j][k]); + // Mix twisting coefficients + if (models[i][j].twist_model != TWIST_NONE && models[i][j].twist_model != TWIST_MARSHALL) { + models[i][j].k_twist = models[j][i].k_twist = + mix_geom(models[i][i].k_twist, models[j][j].k_twist); + models[i][j].gamma_twist = models[j][i].gamma_twist = + mix_geom(models[i][i].gamma_twist, models[j][j].gamma_twist); + models[i][j].mu_twist = models[j][i].mu_twist = + mix_geom(models[i][i].mu_twist, models[j][j].mu_twist); } } @@ -1153,27 +836,23 @@ double PairGranular::init_one(int i, int j) // we assign cutoff = max(cut[i][j]) for i,j such that cut[i][j] > 0.0. double pulloff; - - if (cutoff_type[i][j] < 0 && cutoff_global < 0) { + if (models[i][j].cutoff_type < 0 && cutoff_global < 0) { if (((maxrad_dynamic[i] > 0.0) && (maxrad_dynamic[j] > 0.0)) || ((maxrad_dynamic[i] > 0.0) && (maxrad_frozen[j] > 0.0)) || // radius info about both i and j exist ((maxrad_frozen[i] > 0.0) && (maxrad_dynamic[j] > 0.0))) { - cutoff = maxrad_dynamic[i]+maxrad_dynamic[j]; + cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; pulloff = 0.0; if (normal_model[i][j] == JKR) { - pulloff = pulloff_distance(maxrad_dynamic[i], maxrad_dynamic[j], i, j); + pulloff = models[i][j]->pulloff_distance(maxrad_dynamic[i], maxrad_dynamic[j]); cutoff += pulloff; + + pulloff = models[i][j]->pulloff_distance(maxrad_frozen[i], maxrad_dynamic[j]); + cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j] + pulloff); + + pulloff = models[i][j]->pulloff_distance(maxrad_dynamic[i], maxrad_frozen[j]); + cutoff = MAX(cutoff,maxrad_dynamic[i] + maxrad_frozen[j] + pulloff); } - - if (normal_model[i][j] == JKR) - pulloff = pulloff_distance(maxrad_frozen[i], maxrad_dynamic[j], i, j); - cutoff = MAX(cutoff, maxrad_frozen[i]+maxrad_dynamic[j]+pulloff); - - if (normal_model[i][j] == JKR) - pulloff = pulloff_distance(maxrad_dynamic[i], maxrad_frozen[j], i, j); - cutoff = MAX(cutoff,maxrad_dynamic[i]+maxrad_frozen[j]+pulloff); - } else { // radius info about either i or j does not exist @@ -1187,8 +866,8 @@ double PairGranular::init_one(int i, int j) } cutoff = cutmax; } - } else if (cutoff_type[i][j] > 0) { - cutoff = cutoff_type[i][j]; + } else if (models[i][j].cutoff_type > 0) { + cutoff = models[i][j].cutoff_type; } else if (cutoff_global > 0) { cutoff = cutoff_global; } @@ -1207,17 +886,27 @@ void PairGranular::write_restart(FILE *fp) for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { - fwrite(&normal_model[i][j],sizeof(int),1,fp); - fwrite(&damping_model[i][j],sizeof(int),1,fp); - fwrite(&tangential_model[i][j],sizeof(int),1,fp); - fwrite(&roll_model[i][j],sizeof(int),1,fp); - fwrite(&twist_model[i][j],sizeof(int),1,fp); - fwrite(&limit_damping[i][j],sizeof(int),1,fp); - fwrite(normal_coeffs[i][j],sizeof(double),4,fp); - fwrite(tangential_coeffs[i][j],sizeof(double),3,fp); - fwrite(roll_coeffs[i][j],sizeof(double),3,fp); - fwrite(twist_coeffs[i][j],sizeof(double),3,fp); - fwrite(&cutoff_type[i][j],sizeof(double),1,fp); + fwrite(&models[i][j].normal_model,sizeof(int),1,fp); + fwrite(&models[i][j].damping_model,sizeof(int),1,fp); + fwrite(&models[i][j].tangential_model,sizeof(int),1,fp); + fwrite(&models[i][j].roll_model,sizeof(int),1,fp); + fwrite(&models[i][j].twist_model,sizeof(int),1,fp); + fwrite(&models[i][j].limit_damping,sizeof(int),1,fp); + fwrite(&models[i][j].Emod,sizeof(double),1,fp); + fwrite(&models[i][j].poisson,sizeof(double),1,fp); + fwrite(&models[i][j].k_norm,sizeof(double),1,fp); + fwrite(&models[i][j].gamma_norm,sizeof(double),1,fp); + fwrite(&models[i][j].cohesion,sizeof(double),1,fp); + fwrite(&models[i][j].k_tang,sizeof(double),1,fp); + fwrite(&models[i][j].gamma_tang,sizeof(double),1,fp); + fwrite(&models[i][j].mu_tang,sizeof(double),1,fp); + fwrite(&models[i][j].k_roll,sizeof(double),1,fp); + fwrite(&models[i][j].gamma_roll,sizeof(double),1,fp); + fwrite(&models[i][j].mu_roll,sizeof(double),1,fp); + fwrite(&models[i][j].k_twist,sizeof(double),1,fp); + fwrite(&models[i][j].gamma_twist,sizeof(double),1,fp); + fwrite(&models[i][j].mu_twist,sizeof(double),1,fp); + fwrite(&models[i][j].cutoff_type,sizeof(double),1,fp); } } } @@ -1238,29 +927,45 @@ void PairGranular::read_restart(FILE *fp) MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { if (me == 0) { - utils::sfread(FLERR,&normal_model[i][j],sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&damping_model[i][j],sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&tangential_model[i][j],sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&roll_model[i][j],sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&twist_model[i][j],sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&limit_damping[i][j],sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,normal_coeffs[i][j],sizeof(double),4,fp,nullptr,error); - utils::sfread(FLERR,tangential_coeffs[i][j],sizeof(double),3,fp,nullptr,error); - utils::sfread(FLERR,roll_coeffs[i][j],sizeof(double),3,fp,nullptr,error); - utils::sfread(FLERR,twist_coeffs[i][j],sizeof(double),3,fp,nullptr,error); - utils::sfread(FLERR,&cutoff_type[i][j],sizeof(double),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].normal_model,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].damping_model,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].tangential_model,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].roll_model,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].twist_model,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].limit_damping,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].k_norm,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].gamma_norm,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].cohesion,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].k_tang,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].gamma_tang,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].mu_tang,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].k_roll,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].gamma_roll,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].mu_roll,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].k_twist,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].gamma_twist,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].mu_twist,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].cutoff_type,sizeof(double),1,fp,nullptr,error); } - MPI_Bcast(&normal_model[i][j],1,MPI_INT,0,world); - MPI_Bcast(&damping_model[i][j],1,MPI_INT,0,world); - MPI_Bcast(&tangential_model[i][j],1,MPI_INT,0,world); - MPI_Bcast(&roll_model[i][j],1,MPI_INT,0,world); - MPI_Bcast(&twist_model[i][j],1,MPI_INT,0,world); - MPI_Bcast(&limit_damping[i][j],1,MPI_INT,0,world); - MPI_Bcast(normal_coeffs[i][j],4,MPI_DOUBLE,0,world); - MPI_Bcast(tangential_coeffs[i][j],3,MPI_DOUBLE,0,world); - MPI_Bcast(roll_coeffs[i][j],3,MPI_DOUBLE,0,world); - MPI_Bcast(twist_coeffs[i][j],3,MPI_DOUBLE,0,world); - MPI_Bcast(&cutoff_type[i][j],1,MPI_DOUBLE,0,world); + MPI_Bcast(&models[i][j].normal_model,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].damping_model,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].tangential_model,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].roll_model,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].twist_model,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].limit_damping,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].k_norm,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].gamma_norm,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].cohesion,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].k_tang,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].gamma_tang,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].mu_tang,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].k_roll,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].gamma_roll,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].mu_roll,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].k_twist,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].gamma_twist,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].mu_twist,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].cutoff_type,1,MPI_DOUBLE,0,world); } } } @@ -1366,23 +1071,6 @@ double PairGranular::mix_geom(double valii, double valjj) return sqrt(valii*valjj); } - -/* ---------------------------------------------------------------------- - compute pull-off distance (beyond contact) for a given radius and atom type -------------------------------------------------------------------------- */ - -double PairGranular::pulloff_distance(double radi, double radj, - int itype, int jtype) -{ - double E, coh, a, Reff; - Reff = radi*radj/(radi+radj); - if (Reff <= 0) return 0; - coh = normal_coeffs[itype][jtype][3]; - E = normal_coeffs[itype][jtype][0]*THREEQUARTERS; - a = cbrt(9*MY_PI*coh*Reff*Reff/(4*E)); - return a*a/Reff - 2*sqrt(MY_PI*coh*a/E); -} - /* ---------------------------------------------------------------------- transfer history during fix/neigh/history exchange only needed if any history entries i-j are not just negative of j-i entries @@ -1402,11 +1090,11 @@ double PairGranular::atom2cut(int i) { double cut; - cut = atom->radius[i]*2; - if(beyond_contact) { + cut = atom->radius[i] * 2; + if (beyond_contact) { int itype = atom->type[i]; - if(normal_model[itype][itype] == JKR) { - cut += pulloff_distance(cut, cut, itype, itype); + if (models[itype][itype].normal_model == JKR) { + cut += models[itype][itype].pulloff_distance(cut, cut); } } @@ -1421,16 +1109,16 @@ double PairGranular::radii2cut(double r1, double r2) { double cut = 0.0; - if(beyond_contact) { + if (beyond_contact) { int n = atom->ntypes; double temp; // Check all combinations of i and j to find theoretical maximum pull off distance - for(int i = 0; i < n; i++){ - for(int j = 0; j < n; j++){ - if(normal_model[i][j] == JKR) { - temp = pulloff_distance(r1, r2, i, j); - if(temp > cut) cut = temp; + for (int i = 0; i < n; i++){ + for (int j = 0; j < n; j++){ + if (models[i][j].normal_model == JKR) { + temp = pulloff_distance(r1, r2); + if (temp > cut) cut = temp; } } } @@ -1440,99 +1128,3 @@ double PairGranular::radii2cut(double r1, double r2) return cut; } - -double PairGranular::touch_JKR(int touch, ContactGeom geom, ContactModel model) -{ - double E, R2, a, delta_pulloff, dist_pulloff; - bool touchflag; - E = model.E; - E *= THREEQUARTERS; - if (touch) { - R2 = geom.Reff * geom.Reff; - a = cbrt(9.0 * MY_PI * model.coh * R2 / (4 * E)); - delta_pulloff = a * a / Reff - 2 * sqrt(MY_PI * coh * a / E); - dist_pulloff = geom.radsum - delta_pulloff; - touchflag = (geom.rsq < dist_pulloff * dist_pulloff); - } else { - touchflag = (geom.rsq < geom.radsum * geom.radsum); - } - return touchflag; -} - -void PairGranular::normal_JKR(double &Fne, ContactGeom geom, ContactModel model) -{ - double R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a, a2, F_pulloff; - - R2 = geom.Reff * geom.Reff; - dR2 = geom.dR * geom.dR; - t0 = model.coh * model.coh * R2 * R2 * model.E; - t1 = PI27SQ*t0; - t2 = 8 * geom.dR * dR2 * model.E * model.E * model.E; - t3 = 4 * dR2 * E; - - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); - t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / E; - sqrt2 = MAX(0, 2 * dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * model.coh * MY_PI * R2 / (model.E * t6)); - a = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = a * a; - - Fne = model.E * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * model.coh * model.E / (MY_PI * a)); - model.a = a; - model.knfac = model.E*a; -} - -void PairGraunular::normal_DMT(double &Fne, ContactGeom geom, ContactModel model) -{ - double a = sqrt(geom.dR); - Fne = a * model.E * geom.delta; - Fne -= 4 * MY_PI * model.coh * geom.Reff; - F_pulloff = 4 * MY_PI * model.coh * geom.Reff; - model.a = a; - model.knfact = model.E * a; -} - -void PairGraunular::normal_Hooke(double &Fne, ContactGeom geom, ContactModel model) -{ - double a = sqrt(geom.dR); - Fne = model.E * geom.delta; - if (model.normal != HOOKE) Fne *= a; - model.a = a; - model.knfac = model.E; - if (model.normal != HOOKE) model.knfac *= a; -} - -double PairGranular::normal_damping(double vnnr, double meff, ContactGeom geom, ContactModel model) -{ - double damp_normal, a; - if (model.damping == VELOCITY) { - damp_normal = 1; - } else if (model.damping == MASS_VELOCITY) { - damp_normal = meff; - } else if (model.damping == VISCOELASTIC) { - damp_normal = model.a * meff; - } else if (model.damping == TSUJI) { - damp_normal = sqrt(meff * model.knfac); - } else damp_normal = 0.0; - - damp_normal_prefactor = model.damp * damp_normal; - return -damp_normal_prefactor * vnnr; -} - -double PairGranular::critical_normal(double Fne, double Fntot, ContactGeom geom, Contactmodel model) -{ - if (model.normal == JKR) { - F_pulloff = 3*MY_PI*model.coh*geom.Reff; - Fncrit = fabs(Fne + 2*F_pulloff); - } else if (model.normal == DMT) { - F_pulloff = 4*MY_PI*model.coh*geom.Reff; - Fncrit = fabs(Fne + 2*F_pulloff); - } else { - Fncrit = fabs(Fntot); - } - return Fncrit; -} \ No newline at end of file diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index 896db15231..509981d5f9 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -69,10 +69,8 @@ class PairGranular : public Pair { int size_history; int *history_transfer_factors; - // model choices - int **normal_model, **damping_model; - int **tangential_model, **roll_model, **twist_model; - int **limit_damping; + // contact models + ContactModel **models; // history flags int normal_history, tangential_history, roll_history, twist_history; @@ -83,15 +81,6 @@ class PairGranular : public Pair { int roll_history_index; int twist_history_index; - // per-type material coefficients - double **Emod, **poiss, **Gmod; - - // per-type coefficients, set in pair coeff command - double ***normal_coeffs; - double ***tangential_coeffs; - double ***roll_coeffs; - double ***twist_coeffs; - // optional user-specified global cutoff, per-type user-specified cutoffs double **cutoff_type; double cutoff_global; @@ -99,19 +88,6 @@ class PairGranular : public Pair { double mix_stiffnessE(double, double, double, double); double mix_stiffnessG(double, double, double, double); double mix_geom(double, double); - double pulloff_distance(double, double, int, int); - - // Structure to store details of model - struct ContactModel { - int normal, damping, tangential, roll, twist; - double E, damp, poisson, coh; - double a, knfac; - }; - - struct ContactGeom { - double r, rinv, rsq, Reff, radsum; - double delta, dR; - } }; } // namespace LAMMPS_NS diff --git a/src/contact.cpp b/src/contact.cpp new file mode 100644 index 0000000000..b7d5d4d85d --- /dev/null +++ b/src/contact.cpp @@ -0,0 +1,58 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- + + This class contains a series of DEM contact models + that can be defined and used to calculate forces + and torques based on contact geometry +*/ + +#include +#include "contact.h" + +namespace LAMMPS_NS { + namespace Contact{ + +enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; +enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; +enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, + TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, + TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; +enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; +enum {ROLL_NONE, ROLL_SDS}; + +#define PI27SQ 266.47931882941264802866 // 27*PI**2 +#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) +#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) +#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) +#define FOURTHIRDS (4.0/3.0) // 4/3 +#define THREEQUARTERS 0.75 // 3/4 + +#define EPSILON 1e-10 + +ContactModel::ContactModel() +{ + +} + +/* ---------------------------------------------------------------------- + get volume-correct r basis in: basis*cbrt(vol) = q*r +------------------------------------------------------------------------- */ + +void ContactModel::() +{ + +} + + +}} diff --git a/src/contact.h b/src/contact.h new file mode 100644 index 0000000000..38cb6f0be6 --- /dev/null +++ b/src/contact.h @@ -0,0 +1,50 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef LMP_CONTACT +_H +#define LMP_CONTACT +_H + +namespace LAMMPS_NS { +namespace Contact { + + class ContactModel { + public: + ContactModel(); + void touch_JKR(int); + void normal_JKR(double&); + void normal_DMT(double&); + void normal_Hooke(double&); + double normal_damping(double, double); + double critical_normal(double, double); + + int normal_model, damping_model, tangential_model; + int roll_model, twist_model; + double E, G, poisson, damp, coh; + + private: + double a, knfac; + ContactGeometry geom; + }; + + + class ContactGeometry { + public: + ContactGeometry(); + void add_data(); + double r, rinv, rsq, Reff, radsum, delta, dR; + }; +} // namespace Contact +} // namespace LAMMPS_NS +#endif diff --git a/src/contact_model.cpp b/src/contact_model.cpp new file mode 100644 index 0000000000..779631836b --- /dev/null +++ b/src/contact_model.cpp @@ -0,0 +1,58 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- + + This class contains a series of DEM contact models + that can be defined and used to calculate forces + and torques based on contact geometry +*/ + +#include +#include "contact_model.h" + +namespace LAMMPS_NS { + namespace Contact_Model{ + +enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; +enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; +enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, + TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, + TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; +enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; +enum {ROLL_NONE, ROLL_SDS}; + +#define PI27SQ 266.47931882941264802866 // 27*PI**2 +#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) +#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) +#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) +#define FOURTHIRDS (4.0/3.0) // 4/3 +#define THREEQUARTERS 0.75 // 3/4 + +#define EPSILON 1e-10 + +ContactModel::ContactModel() +{ + +} + +/* ---------------------------------------------------------------------- + get volume-correct r basis in: basis*cbrt(vol) = q*r +------------------------------------------------------------------------- */ + +void ContactModel::() +{ + +} + + +}} diff --git a/src/contact_model.h b/src/contact_model.h new file mode 100644 index 0000000000..678a7111a8 --- /dev/null +++ b/src/contact_model.h @@ -0,0 +1,35 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef LMP_CONTACT_MODEL_H +#define LMP_CONTACT_MODEL_H + +namespace LAMMPS_NS { +namespace Contact_Model { + + class ContactModel { + public: + ContactModel(); + void set_strain(const double, const double); + void step_deform(const double, const double); + bool reduce(); + void get_box(double[3][3], double); + void get_rot(double[3][3]); + void get_inverse_cob(int[3][3]); + + private: + double a, knfac; + }; +} // namespace Contact_Model +} // namespace LAMMPS_NS +#endif From 1faa7397d3f6effe234c07d04e150a54757ca07a Mon Sep 17 00:00:00 2001 From: jtclemm Date: Sat, 18 Jun 2022 10:11:57 -0600 Subject: [PATCH 007/445] Fixing complier issues, adding dump options, initail conduction --- doc/src/dump.rst | 5 +- doc/src/pair_granular.rst | 10 + src/GRANULAR/atom_vec_sphere_temp.cpp | 11 + src/GRANULAR/atom_vec_sphere_temp.h | 1 + src/GRANULAR/contact.cpp | 385 ++++++++-------- src/GRANULAR/contact.h | 46 +- src/GRANULAR/fix_temp_integrate.cpp | 34 +- src/GRANULAR/pair_granular.cpp | 249 +++++++--- src/GRANULAR/pair_granular.h | 5 +- src/contact.cpp | 625 +++++++++++++++++++++++++- src/contact.h | 85 +++- src/contact_model.cpp | 58 --- src/contact_model.h | 35 -- src/dump_custom.cpp | 50 ++- src/dump_custom.h | 2 + src/fix_neigh_history.cpp | 5 +- 16 files changed, 1171 insertions(+), 435 deletions(-) delete mode 100644 src/contact_model.cpp delete mode 100644 src/contact_model.h diff --git a/doc/src/dump.rst b/doc/src/dump.rst index 4d272c940b..4406c827bf 100644 --- a/doc/src/dump.rst +++ b/doc/src/dump.rst @@ -81,6 +81,7 @@ Syntax q, mux, muy, muz, mu, radius, diameter, omegax, omegay, omegaz, angmomx, angmomy, angmomz, tqx, tqy, tqz, + heatflux, temperature, c_ID, c_ID[I], f_ID, f_ID[I], v_name, i_name, d_name, i2_name[I], d2_name[I] @@ -103,10 +104,12 @@ Syntax q = atom charge mux,muy,muz = orientation of dipole moment of atom mu = magnitude of dipole moment of atom - radius,diameter = radius,diameter of spherical particle + radius,diameter = radius, diameter of spherical particle omegax,omegay,omegaz = angular velocity of spherical particle angmomx,angmomy,angmomz = angular momentum of aspherical particle tqx,tqy,tqz = torque on finite-size particles + heatflux = flux of heat into particle + temperature = temperature of particle c_ID = per-atom vector calculated by a compute with ID c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below) f_ID = per-atom vector calculated by a fix with ID diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index 6f84b0d9c7..9a99558653 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -37,6 +37,9 @@ Examples pair_coeff 1 1 dmt 1000.0 50.0 0.3 0.0 tangential mindlin NULL 0.5 0.5 rolling sds 500.0 200.0 0.5 twisting marshall pair_coeff 2 2 dmt 1000.0 50.0 0.3 10.0 tangential mindlin NULL 0.5 0.1 rolling sds 500.0 200.0 0.1 twisting marshall + pair_style granular + pair_coeff * * hertz 1000.0 50.0 tangential mindlin 1000.0 1.0 0.4 heat 0.1 + Description """"""""""" @@ -631,6 +634,13 @@ attractive force. This keyword cannot be used with the JKR or DMT models. ---------- +The optional *heat* keyword enables heat conduction and it must be followed by +a non-negative numeric value for the conductivity. Note that the *heat* keyword +must be included in either all or none of of the *pair_coeff* calls. See +:doc:`fix temp/integrate ` for more information on this option. + +---------- + The *granular* pair style can reproduce the behavior of the *pair gran/\** styles with the appropriate settings (some very minor differences can be expected due to corrections in diff --git a/src/GRANULAR/atom_vec_sphere_temp.cpp b/src/GRANULAR/atom_vec_sphere_temp.cpp index d4e30e3154..a455a9ddc8 100644 --- a/src/GRANULAR/atom_vec_sphere_temp.cpp +++ b/src/GRANULAR/atom_vec_sphere_temp.cpp @@ -28,6 +28,7 @@ using namespace MathConst; AtomVecSphereTemp::AtomVecSphereTemp(LAMMPS *lmp) : AtomVec(lmp) { mass_type = PER_ATOM; + forceclearflag = 1; molecular = Atom::ATOMIC; atom->sphere_flag = 1; @@ -107,6 +108,16 @@ void AtomVecSphereTemp::grow_pointers() omega = atom->omega; } +/* ---------------------------------------------------------------------- + clear extra forces starting at atom N + nbytes = # of bytes to clear for a per-atom vector +------------------------------------------------------------------------- */ + +void AtomVecSphereTemp::force_clear(int n, size_t nbytes) +{ + memset(&heatflux[n], 0, nbytes); +} + /* ---------------------------------------------------------------------- initialize non-zero atom quantities ------------------------------------------------------------------------- */ diff --git a/src/GRANULAR/atom_vec_sphere_temp.h b/src/GRANULAR/atom_vec_sphere_temp.h index f42b844886..70e047a8cc 100644 --- a/src/GRANULAR/atom_vec_sphere_temp.h +++ b/src/GRANULAR/atom_vec_sphere_temp.h @@ -31,6 +31,7 @@ class AtomVecSphereTemp : public AtomVec { void init() override; void grow_pointers() override; + void force_clear(int, size_t) override; void create_atom_post(int) override; void data_atom_post(int) override; void pack_data_pre(int) override; diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index 3cea933370..b4b335a1aa 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -17,28 +17,18 @@ and torques based on contact geometry */ -#include #include "contact.h" +#include "math_const.h" +#include "math_extra.h" +#include "pointers.h" -namespace LAMMPS_NS { - namespace Contact{ +#include -enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; -enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; -enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, - TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, - TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; -enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; -enum {ROLL_NONE, ROLL_SDS}; +using namespace LAMMPS_NS; +using namespace MathExtra; +using namespace MathConst; -#define PI27SQ 266.47931882941264802866 // 27*PI**2 -#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) -#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) -#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) -#define FOURTHIRDS (4.0/3.0) // 4/3 -#define THREEQUARTERS 0.75 // 3/4 - -#define EPSILON 1e-10 +namespace Contact { ContactModel::ContactModel() { @@ -69,8 +59,8 @@ bool ContactModel::check_contact() { check_flag = 1; - MathExtra::sub3(xi, xj, dx); - rsq = MathExtra::lensq3(dx); + sub3(xi, xj, dx); + rsq = lensq3(dx); radsum = radi + radj; Reff = radi*radj/radsum; @@ -78,7 +68,7 @@ bool ContactModel::check_contact() if (normal_model == JKR) touch = touch_JKR(touch); else touch = (rsq < radsum*radsum); - return touch + return touch; } /* ---------------------------------------------------------------------- */ @@ -91,57 +81,57 @@ void ContactModel::prep_contact() if (check_flag != 1) touch = check_contact(); if (!touch) return; + double temp[3]; + // Set flags mindlin_rescale = mindlin_force = 0; if (tangential_model == TANGENTIAL_MINDLIN_RESCALE || tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) - mindlin_rescale = 1 + mindlin_rescale = 1; if (tangential_model == TANGENTIAL_MINDLIN_FORCE || tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) - mindlin_force = 1 - - double temp[3]; + mindlin_force = 1; // Standard geometric quantities r = sqrt(rsq); rinv = 1.0/r; delta = radsum - r; - dR = delta*Reff - MathExtra::scale3(rinv, dx, nx); + dR = delta*Reff; + scale3(rinv, dx, nx); // relative translational velocity - MathExtra::sub3(v[i], v[j], vr); + sub3(vi, vj, vr); // normal component - vnnr = MathExtra::dot3(vr, nx); //v_R . n - MathExtra::scale3(vnnr, nx, vn); + vnnr = dot3(vr, nx); //v_R . n + scale3(vnnr, nx, vn); // tangential component - MathExtra::sub3(vr, vn, vt); + sub3(vr, vn, vt); // relative rotational velocity - MathExtra::scaleadd3(radi, omegai, radj, omegaj, wr); + scaleadd3(radi, omegai, radj, omegaj, wr); // relative tangential velocities - MathExtra::cross3(wr, nx, temp); - MathExtra::sub3(vt, temp, vtr); - vrel = MathExtra::len(vtr); + cross3(wr, nx, temp); + sub3(vt, temp, vtr); + vrel = len3(vtr); - if (roll_model != NONE || twist_model != NONE) - MathExtra::sub3(omega[i], omega[j], relrot); + if (roll_model != ROLL_NONE || twist_model != TWIST_NONE) + sub3(omegai, omegaj, relrot); - if (roll_model != NONE) { + if (roll_model != ROLL_NONE) { // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) // this is different from the Marshall papers, which use the Bagi/Kuhn formulation // for rolling velocity (see Wang et al for why the latter is wrong) - vrl[0] = Reff * (relrot[1] * n[2] - relrot[2] * nx[1]); - vrl[1] = Reff * (relrot[2] * n[0] - relrot[0] * nx[2]); - vrl[2] = Reff * (relrot[0] * n[1] - relrot[1] * nx[0]); + vrl[0] = Reff * (relrot[1] * nx[2] - relrot[2] * nx[1]); + vrl[1] = Reff * (relrot[2] * nx[0] - relrot[0] * nx[2]); + vrl[2] = Reff * (relrot[0] * nx[1] - relrot[1] * nx[0]); } - if (twist_model != NONE) { + if (twist_model != TWIST_NONE) { // omega_T (eq 29 of Marshall) - magtwist = MathExtra::dot3(relrot, nx); + magtwist = dot3(relrot, nx); } } @@ -154,23 +144,23 @@ void ContactModel::calculate_forces(double *forces, double *torquesi, double *to if (prep_flag != 1) prep_contact(); if (!touch) { forces[0] = forces[1] = forces[2] = 0.0; - return + return; } //********************************************** // normal forces //********************************************** - // Also calculates: a, knfac, Fncrit + // Also calculates: a, knfac, Fncrit (for JKR or DMT) double Fne; if (normal_model == JKR) { Fne = normal_JKR(); } else if (normal_model == DMT) { Fne = normal_DMT(); } else if (normal_model == HERTZ || normal_model == HERTZ_MATERIAL) { - Fne = normal_hertz(); + Fne = normal_Hertz(); } else { - Fne = normal_hooke(); + Fne = normal_Hooke(); } // NOTE: consider restricting Hooke to only have @@ -178,9 +168,11 @@ void ContactModel::calculate_forces(double *forces, double *torquesi, double *to // Also calculates: damp_normal_prefactor double Fdamp = normal_damping(); - double Fntot = Fne + Fdamp; + Fntot = Fne + Fdamp; if (limit_damping && (Fntot < 0.0)) Fntot = 0.0; + if (normal_model != JKR && normal_model != DMT) Fncrit = fabs(Fntot); + //********************************************** // tangential force, including history effects //********************************************** @@ -190,15 +182,18 @@ void ContactModel::calculate_forces(double *forces, double *torquesi, double *to // For mindlin/force, mindlin_rescale/force: // history = cumulative tangential elastic force - Fncrit = critical_normal(Fne, Fntot, geom, model); Fscrit = mu_tang * Fncrit; - if (tangential_model == TANGENTIAL_NOHISTORY) { - tangential_no_history(); + if (tangential_model == TANGENTIAL_MINDLIN || + tangential_model == TANGENTIAL_MINDLIN_FORCE || + tangential_model == TANGENTIAL_MINDLIN_RESCALE || + tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) { + tangential_mindlin(history); } else if (tangential_model == TANGENTIAL_HISTORY) { tangential_history(history); + } else { + tangential_no_history(); } - tangential_forces(history); //********************************************** // rolling force @@ -212,50 +207,63 @@ void ContactModel::calculate_forces(double *forces, double *torquesi, double *to //**************************************** if (twist_model == TWIST_MARSHALL) { - twist_marshall(history); + twisting_marshall(history); } else if (twist_model == TWIST_SDS) { - twist_SDS(history); + twisting_SDS(history); } //********************************************** // sum contributions //********************************************** - MathExtra::scale3(Fntot, nx, forces); - MathExtra::add3(forces, fs, forces); + scale3(Fntot, nx, forces); + add3(forces, fs, forces); - MathExtra::cross3(nx, fs, torquesi); - MathExtra::copy3(torquesi, torquesj); + cross3(nx, fs, torquesi); + copy3(torquesi, torquesj); double dist_to_contact = radi-0.5*delta; - MathExtra::scale3(dist_to_contact, torquesi); + scale3(dist_to_contact, torquesi); dist_to_contact = radj-0.5*delta; - MathExtra::scale3(dist_to_contact, torquesj); + scale3(dist_to_contact, torquesj); double torroll[3]; if (roll_model != ROLL_NONE) { - MathExtra::cross3(nx, fr, torroll); - MathExtra::scale3(Reff, torroll); - MathExtra::add3(torquesi, torroll, torquesi); - MathExtra::sub3(torquesj, torroll, torquesj); + cross3(nx, fr, torroll); + scale3(Reff, torroll); + add3(torquesi, torroll, torquesi); + sub3(torquesj, torroll, torquesj); } double tortwist[3]; - if (twist_model != NONE_TWIST) { - MathExtra::scale3(magtortwist, nx, tortwist); - MathExtra::add3(torquesi, tortwist, torquesi) - MathExtra::sub3(torquesj, tortwist, torquesj) + if (twist_model != TWIST_NONE) { + scale3(magtortwist, nx, tortwist); + add3(torquesi, tortwist, torquesi); + sub3(torquesj, tortwist, torquesj); } } /* ---------------------------------------------------------------------- */ -double ContactModel::touch_JKR(int touch) +double ContactModel::calculate_heat() +{ + double dT = Ti - Tj; + double Hc; + + //Dan is Emod the youngs modulus for all models? or do I need to scale? + Hc = 2 * conductivity * pow(FOURTHIRDS * Fntot * Reff / Emod, ONETHIRD); + + return Hc * dT; +} + +/* ---------------------------------------------------------------------- */ + +bool ContactModel::touch_JKR(int touch) { double Escaled, R2, delta_pulloff, dist_pulloff; bool touchflag; - Escaled = E*THREEQUARTERS; + Escaled = k_norm * THREEQUARTERS; if (touch) { R2 = Reff * Reff; a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); @@ -272,66 +280,68 @@ double ContactModel::touch_JKR(int touch) double ContactModel::normal_JKR() { - double R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a, a2, F_pulloff; + double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a, a2, F_pulloff, Fne; + + Escaled = k_norm * THREEQUARTERS; R2 = Reff * Reff; dR2 = dR * dR; - t0 = cohesion * cohesion * R2 * R2 * E; + t0 = cohesion * cohesion * R2 * R2 * Escaled; t1 = PI27SQ*t0; - t2 = 8 * dR * dR2 * E * E * E; - t3 = 4 * dR2 * E; + t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; + t3 = 4 * dR2 * Escaled; // in case sqrt(0) < 0 due to precision issues sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / E; + t5 = t3 / t4 + t4 / Escaled; sqrt2 = MAX(0, 2 * dR + t5); t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (E * t6)); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); a = INVROOT6 * (t6 + sqrt(sqrt3)); a2 = a * a; - double Fne = E * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * E / (MY_PI * a)); - double F_pulloff = 3 * MY_PI * cohesion * Reff; + Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); + F_pulloff = 3 * MY_PI * cohesion * Reff; - knfac = E * a; - Fncrit = fabs(Fne + 2*F_pulloff); + knfac = Escaled * a; + Fncrit = fabs(Fne + 2 * F_pulloff); return Fne; } /* ---------------------------------------------------------------------- */ -double ContactModel::normal_DMT(double &Fne) +double ContactModel::normal_DMT() { a = sqrt(dR); - double Fne = a * E * delta; + double Fne = a * k_norm * delta; Fne -= 4 * MY_PI * cohesion * Reff; - F_pulloff = 4 * MY_PI * cohesion * Reff; + double F_pulloff = 4 * MY_PI * cohesion * Reff; - knfac = E * a; - Fncrit = fabs(Fne + 2*F_pulloff); + knfac = k_norm * a; + Fncrit = fabs(Fne + 2 * F_pulloff); return Fne; } /* ---------------------------------------------------------------------- */ -double ContactModel::normal_Hertz(double &Fne) +double ContactModel::normal_Hertz() { a = sqrt(dR); - double Fne = E * delta * a; + double Fne = k_norm * delta * a; - knfac = E * a; + knfac = k_norm * a; return Fne; } /* ---------------------------------------------------------------------- */ -double ContactModel::normal_Hooke(double &Fne) +double ContactModel::normal_Hooke() { a = sqrt(dR); - double Fne = E * delta; + double Fne = k_norm * delta; - knfac = E; + knfac = k_norm; return Fne; } @@ -356,7 +366,7 @@ double ContactModel::normal_damping() /* ---------------------------------------------------------------------- */ -double ContactModel::tangential_no_history() +void ContactModel::tangential_no_history() { double gamma_scaled = gamma_tang * damp_normal_prefactor; double fsmag, Ft; @@ -367,100 +377,100 @@ double ContactModel::tangential_no_history() else Ft = 0.0; Ft = -Ft; - MathExtra::scale3(Ft, vtr, fs); + scale3(Ft, vtr, fs); } /* ---------------------------------------------------------------------- */ -double ContactModel::tangential_forces(double *history) +void ContactModel::tangential_history(double *history) { double gamma_scaled = gamma_tang * damp_normal_prefactor; double k = k_tang; int frame_update = 0; - double fsmag, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; + double magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; // rotate and update displacements / force. // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 if (history_update) { - rsht = MathExtra::dot(history, nx); - frameupdate = fabs(rsht) * k > EPSILON * Fscrit; + rsht = dot3(history, nx); + frame_update = fabs(rsht) * k > EPSILON * Fscrit; - if (frameupdate) { - shrmag = MathExtra::len3(history); + if (frame_update) { + shrmag = len3(history); // projection - MathExtra::scale3(rsht, nx, history); + scale3(rsht, nx, history); // also rescale to preserve magnitude - prjmag = MathExtra::len3(history); - if (prjmag > 0) temp_double = shrmag / prjmag; - else temp_double = 0; - MathExtra::scale3(temp_double, history); + prjmag = len3(history); + if (prjmag > 0) temp_dbl = shrmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, history); } // update history // tangential force // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 temp_dbl = k * dt; - MathExtra::scale3(temp_dbl, vtr, temp_array); - MathExtra::sub3(history, temp_array, history); + scale3(temp_dbl, vtr, temp_array); + sub3(history, temp_array, history); } // tangential forces = history + tangential velocity damping - temp_double = -gamma; - MathExtra::scale3(temp_double, vtr, fs); + temp_dbl = -gamma_norm; + scale3(temp_dbl, vtr, fs); // rescale frictional displacements and forces if needed - fsmag = MathExtra::len3(fs); - if (fsmag > Fscrit) { - shrmag = MathExtra::len3(history); + magfs = len3(fs); + if (magfs > Fscrit) { + shrmag = len3(history); if (shrmag != 0.0) { - temp_double = Fscrit / magfs; - MathExtra::scale3(temp_double, fs, history); - MathExtra::scale3(gamma, vtr, temp_array); - MathExtra::add3(history, temp_array, history); - temp_double = Fscrit / magfs; - MathExtra::scale3(temp_double, fs); + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs, history); + scale3(gamma_norm, vtr, temp_array); + add3(history, temp_array, history); + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs); } else { - MathExtra::zero3(fs); + zero3(fs); } } } /* ---------------------------------------------------------------------- */ -double ContactModel::tangential_mindlin(double *history) +void ContactModel::tangential_mindlin(double *history) { - double k_scaled, gamma_scaled, fsmag, rsht, shrmag, prjmag, temp_dbl; + double k_scaled, gamma_scaled, magfs, rsht, shrmag, prjmag, temp_dbl; double temp_array[3]; int frame_update = 0; gamma_scaled = gamma_tang * damp_normal_prefactor; - k_scaled = k_tange * a; + k_scaled = k_tang * a; if (mindlin_rescale) { // on unloading, rescale the shear displacements/force if (a < history[3]) { - temp_double = a / history[3]; - MathExtra::scale3(temp_double, history); + temp_dbl = a / history[3]; + scale3(temp_dbl, history); } } // rotate and update displacements / force. // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 if (history_update) { - rsht = MathExtra::dot(history, nx); + rsht = dot3(history, nx); if (mindlin_force) - frameupdate = fabs(rsht) > EPSILON * Fscrit; + frame_update = fabs(rsht) > EPSILON * Fscrit; else - frameupdate = fabs(rsht) * k_scaled > EPSILON * Fscrit; + frame_update = fabs(rsht) * k_scaled > EPSILON * Fscrit; - if (frameupdate) { - shrmag = MathExtra::len3(history); + if (frame_update) { + shrmag = len3(history); // projection - MathExtra::scale3(rsht, nx, history); + scale3(rsht, nx, history); // also rescale to preserve magnitude - prjmag = MathExtra::len3(history); - if (prjmag > 0) temp_double = shrmag / prjmag; - else temp_double = 0; - MathExtra::scale3(temp_double, history); + prjmag = len3(history); + if (prjmag > 0) temp_dbl = shrmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, history); } // update history @@ -468,51 +478,51 @@ double ContactModel::tangential_mindlin(double *history) // tangential force // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 temp_dbl = -k_scaled * dt; - MathExtra::scale3(temp_dbl, vtr, temp_array); + scale3(temp_dbl, vtr, temp_array); } else { - MathExtra::scale3(dt, vtr, temp_array); + scale3(dt, vtr, temp_array); } - MathExtra::add3(history, temp_array, history); + add3(history, temp_array, history); if (mindlin_rescale) history[3] = a; } // tangential forces = history + tangential velocity damping - temp_double = -gamma_scaled; - MathExtra::scale3(temp_double, vtr, fs); + temp_dbl = -gamma_scaled; + scale3(temp_dbl, vtr, fs); if (! mindlin_force) { - MathExtra::scale3(k_scaled, history, temp_array); - MathExtra::add3(fs, temp_array, fs); + scale3(k_scaled, history, temp_array); + add3(fs, temp_array, fs); } // rescale frictional displacements and forces if needed - fsmag = MathExtra::len3(fs); - if (fsmag > Fscrit) { - shrmag = MathExtra::len3(history); + magfs = len3(fs); + if (magfs > Fscrit) { + shrmag = len3(history); if (shrmag != 0.0) { - temp_double = Fscrit / magfs; - MathExtra::scale3(temp_double, fs, history); - MathExtra::scale3(gamma, vtr, temp_array); - MathExtra::add3(history, temp_array, history); + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs, history); + scale3(gamma_tang, vtr, temp_array); + add3(history, temp_array, history); if (! mindlin_force) { - temp_double = -1.0 / k; - MathExtra::scale3(temp_double, history); + temp_dbl = -1.0 / k_tang; + scale3(temp_dbl, history); } - temp_double = Fscrit / magfs; - MathExtra::scale3(temp_double, fs); + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs); } else { - MathExtra::zero3(fs); + zero3(fs); } } } /* ---------------------------------------------------------------------- */ -double ContactModel::rolling(double *history) +void ContactModel::rolling(double *history) { int rhist0, rhist1, rhist2, frameupdate; - double rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_array[3]; + double rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_dbl, temp_array[3]; rhist0 = roll_history_index; rhist1 = rhist0 + 1; @@ -524,46 +534,47 @@ double ContactModel::rolling(double *history) hist_temp[0] = history[rhist0]; hist_temp[1] = history[rhist1]; hist_temp[2] = history[rhist2]; - rolldotn = MathExtra::dot3(hist_temp, nx); + rolldotn = dot3(hist_temp, nx); frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit; if (frameupdate) { // rotate into tangential plane - rollmag = MathExtra::len3(temp); + rollmag = len3(hist_temp); // projection - temp_double = -rolldotn; - MathExtra::scale3(temp_double, nx, temp); + temp_dbl = -rolldotn; + scale3(temp_dbl, nx, temp_array); + sub3(hist_temp, temp_array, hist_temp); // also rescale to preserve magnitude - prjmag = MathExtra::len3(hist_temp); - if (prjmag > 0) temp_double = rollmag / prjmag; - else temp_double = 0; - MathExtra::scale3(temp_double, hist_temp); + prjmag = len3(hist_temp); + if (prjmag > 0) temp_dbl = rollmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, hist_temp); } - MathExtra::scale3(dt, vrl, temp_array); - MathExtra::add3(hist_temp, temp_array, hist_temp) + scale3(dt, vrl, temp_array); + add3(hist_temp, temp_array, hist_temp); } - MathExtra::scaleadd3(k_roll, hist_tepm, gamma_roll, vrl, fr); - MathExtra::negate3(fr); + scaleadd3(k_roll, hist_temp, gamma_roll, vrl, fr); + negate3(fr); // rescale frictional displacements and forces if needed - magfr = MathExtra::len3(fr); + magfr = len3(fr); if (magfr > Frcrit) { - rollmag = MathExtra::len3(temp); + rollmag = len3(hist_temp); if (rollmag != 0.0) { - temp_double = -Frcrit / (magfr * k_roll); - MathExtra::scale3(temp_double, fr, temp_array); - MathExtra::add3(hist_temp, temp_array, hist_temp); + temp_dbl = -Frcrit / (magfr * k_roll); + scale3(temp_dbl, fr, temp_array); + add3(hist_temp, temp_array, hist_temp); - temp_double = -gamma_roll/k_roll; - MathExtra::scale3(temp_double, vrl, temp_array); - MathExtra::add3(hist_temp, temp_array, hist_temp) + temp_dbl = -gamma_roll/k_roll; + scale3(temp_dbl, vrl, temp_array); + add3(hist_temp, temp_array, hist_temp); - temp_double = Frcrit / magfr; - MathExtra::scale3(temp_double, fr); + temp_dbl = Frcrit / magfr; + scale3(temp_dbl, fr); } else { - MathExtra::zero3(fr); + zero3(fr); } } @@ -574,27 +585,27 @@ double ContactModel::rolling(double *history) /* ---------------------------------------------------------------------- */ -double ContactModel::twisting_marshall(double *history) +void ContactModel::twisting_marshall(double *history) { // Overwrite twist coefficients with derived values - k_twist = 0.5 * k_tangential * a * a; // eq 32 of Marshall paper - gamma_twist = 0.5 * gamma_tangential * a * a; - mu_twist = TWOTHIRDS * a * mu_tangential; + k_twist = 0.5 * k_tang * a * a; // eq 32 of Marshall paper + gamma_twist = 0.5 * gamma_tang * a * a; + mu_twist = TWOTHIRDS * a * mu_tang; twisting_SDS(history); } /* ---------------------------------------------------------------------- */ -double ContactModel::twisting_SDS(double *history) +void ContactModel::twisting_SDS(double *history) { double signtwist, Mtcrit; - if (historyupdate) { + if (history_update) { history[twist_history_index] += magtwist * dt; } - magtortwist = -k_twist * history[twist_history_index] - damp_twist*magtwist; // M_t torque (eq 30) + magtortwist = -k_twist * history[twist_history_index] - gamma_twist*magtwist; // M_t torque (eq 30) signtwist = (magtwist > 0) - (magtwist < 0); Mtcrit = mu_twist * Fncrit; // critical torque (eq 44) if (fabs(magtortwist) > Mtcrit) { @@ -616,9 +627,9 @@ double ContactModel::pulloff_distance(double radi, double radj) Reff_tmp = radi * radj / (radi + radj); if (Reff_tmp <= 0) return 0; - Ecaled = E * THREEQUARTERS; + Ecaled = k_norm * THREEQUARTERS; a_tmp = cbrt(9 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4 * Ecaled)); return a_tmp * a_tmp / Reff_tmp - 2 * sqrt(MY_PI * cohesion * a_tmp / Ecaled); } -}} +} diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index a5b5d23463..167f88e9de 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -11,14 +11,29 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef LMP_CONTACT -_H -#define LMP_CONTACT -_H +#ifndef LMP_CONTACT_H +#define LMP_CONTACT_H -namespace LAMMPS_NS { namespace Contact { + enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; + enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; + enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, + TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, + TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; + enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; + enum {ROLL_NONE, ROLL_SDS}; + + #define PI27SQ 266.47931882941264802866 // 27*PI**2 + #define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) + #define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) + #define INVROOT6 0.40824829046386307274 // 1/sqrt(6) + #define FOURTHIRDS (4.0/3.0) // 4/3 + #define ONETHIRD (1.0/3.0) // 1/3 + #define THREEQUARTERS 0.75 // 3/4 + + #define EPSILON 1e-10 + class ContactModel { public: ContactModel(); @@ -26,6 +41,7 @@ namespace Contact { bool check_contact(); void prep_contact(); void calculate_forces(double *, double *, double *, double *); + double calculate_heat(); double pulloff_distance(double, double); int normal_model, damping_model, tangential_model; @@ -37,23 +53,25 @@ namespace Contact { double k_tang, gamma_tang, mu_tang; // tangential_coeffs - wutang? double k_roll, gamma_roll, mu_roll; // roll_coeffs double k_twist, gamma_twist, mu_twist; // twist_coeffs + double conductivity; - double radi, radj, meff, dt; - double xi[3], xj[3], vi[3], vj[3], omegai[3], omegaj[3]; + double radi, radj, meff, dt, Ti, Tj; + double *xi, *xj, *vi, *vj, *omegai, *omegaj; int history_update, roll_history_index, twist_history_index; + double fs[3], fr[3], ft[3], magtortwist; + private: - double a, knfac, Fncrit, Fscrit, Frcrit, damp_normal_prefactor; - double fs[3], fr[3], ft[3]; - double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta; - double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrel; - double magtwist, magtortwist; + double a, knfac, Fntot, Fncrit, Fscrit, Frcrit, damp_normal_prefactor; + double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; + double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; + double magtwist; bool touch; int prep_flag, check_flag; int mindlin_rescale, mindlin_force; - void touch_JKR(int); + bool touch_JKR(int); double normal_JKR(); double normal_DMT(); double normal_Hertz(); @@ -69,5 +87,5 @@ namespace Contact { }; } // namespace Contact -} // namespace LAMMPS_NS + #endif diff --git a/src/GRANULAR/fix_temp_integrate.cpp b/src/GRANULAR/fix_temp_integrate.cpp index bb351d7db4..f81442766b 100644 --- a/src/GRANULAR/fix_temp_integrate.cpp +++ b/src/GRANULAR/fix_temp_integrate.cpp @@ -36,27 +36,21 @@ FixTempIntegrate::FixTempIntegrate(LAMMPS *lmp, int narg, char **arg) : cp_style = NONE; int ntypes = atom->ntypes; - int iarg = 3; - while (iarg < narg) { - if (strcmp(arg[iarg+1],"constant") == 0) { - if (iarg+2 >= narg) error->all(FLERR,"Illegal fix command"); - cp_style = CONSTANT; - cp = utils::numeric(FLERR,arg[iarg+2],false,lmp); - if (cp < 0.0) error->all(FLERR,"Illegal fix command"); - iarg += 2; - } else if (strcmp(arg[iarg+1],"type") == 0) { - if (iarg+1+ntypes >= narg) error->all(FLERR,"Illegal fix command"); - cp_style = TYPE; - memory->create(cp_type,ntypes+1,"fix/temp/integrate:cp_type"); - for (int i = 1; i <= ntypes; i++) { - cp_type[i] = utils::numeric(FLERR,arg[iarg+1+i],false,lmp); - if (cp_type[i] < 0.0) error->all(FLERR,"Illegal fix command"); - } - iarg += 1+ntypes; - } else { - error->all(FLERR,"Illegal fix command"); + if (strcmp(arg[3],"constant") == 0) { + if (narg != 5) error->all(FLERR,"Illegal fix command"); + cp_style = CONSTANT; + cp = utils::numeric(FLERR,arg[4],false,lmp); + if (cp < 0.0) error->all(FLERR,"Illegal fix command"); + } else if (strcmp(arg[3],"type") == 0) { + if (narg != 4 + ntypes) error->all(FLERR,"Illegal fix command"); + cp_style = TYPE; + memory->create(cp_type,ntypes+1,"fix/temp/integrate:cp_type"); + for (int i = 1; i <= ntypes; i++) { + cp_type[i] = utils::numeric(FLERR,arg[3+i],false,lmp); + if (cp_type[i] < 0.0) error->all(FLERR,"Illegal fix command"); } - iarg += 1; + } else { + error->all(FLERR,"Illegal fix command"); } if (cp_style == NONE) diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 61644df9c2..0047e24359 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -40,14 +40,13 @@ #include #include +#include using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; using namespace Contact; - - /* ---------------------------------------------------------------------- */ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) @@ -70,10 +69,6 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) maxrad_dynamic = nullptr; maxrad_frozen = nullptr; - models = nullptr; - - limit_damping = nullptr; - history_transfer_factors = nullptr; dt = update->dt; @@ -87,6 +82,7 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) nondefault_history_transfer = 0; tangential_history_index = 0; roll_history_index = twist_history_index = 0; + heat_flag = 0; // create dummy fix as placeholder for FixNeighHistory // this is so final order of Modify:fix will conform to input script @@ -108,24 +104,6 @@ PairGranular::~PairGranular() if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); - memory->destroy(cutoff_type); - - memory->destroy(models); - - memory->destroy(normal_coeffs); - memory->destroy(tangential_coeffs); - memory->destroy(roll_coeffs); - memory->destroy(twist_coeffs); - - memory->destroy(Emod); - memory->destroy(poiss); - - memory->destroy(normal_model); - memory->destroy(damping_model); - memory->destroy(tangential_model); - memory->destroy(roll_model); - memory->destroy(twist_model); - memory->destroy(limit_damping); delete [] onerad_dynamic; delete [] onerad_frozen; @@ -141,7 +119,7 @@ PairGranular::~PairGranular() void PairGranular::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum,itype,jtype; - double factor_lj,mi,mj,meff; + double factor_lj,mi,mj,meff,delx,dely,delz; double forces[3], torquesi[3], torquesj[3]; int *ilist,*jlist,*numneigh,**firstneigh; @@ -184,6 +162,11 @@ void PairGranular::compute(int eflag, int vflag) int *mask = atom->mask; int nlocal = atom->nlocal; double *special_lj = force->special_lj; + double *heatflux, *temperature, dq; + if (heat_flag) { + heatflux = atom->heatflux; + temperature = atom->temperature; + } inum = list->inum; ilist = list->ilist; @@ -214,14 +197,13 @@ void PairGranular::compute(int eflag, int vflag) jtype = type[j]; // Reset model and copy initial geometric data - models[itype][jtype]->reset_contact(); + models[itype][jtype].reset_contact(); models[itype][jtype].xi = x[i]; models[itype][jtype].xj = x[j]; models[itype][jtype].radi = radius[i]; models[itype][jtype].radj = radius[j]; - - touchflag = models[itype][jtype]->check_contact(); + touchflag = models[itype][jtype].check_contact(); if (!touchflag) { // unset non-touching neighbors @@ -247,18 +229,21 @@ void PairGranular::compute(int eflag, int vflag) // Copy additional information and prepare force calculations models[itype][jtype].meff = meff; - models[itype][jtype].dt = dt; - models[itype][jtype].history_update = historyupdate; - models[itype][jtype].roll_history_index = roll_history_index; - models[itype][jtype].twist_history_index = twist_history_index; models[itype][jtype].vi = v[i]; models[itype][jtype].vj = v[j]; models[itype][jtype].omegai = omega[i]; models[itype][jtype].omegaj = omega[j]; - models[itype][jtype] -> prep_contact(); + models[itype][jtype].history_update = historyupdate; + models[itype][jtype].prep_contact(); + + if (heat_flag) { + models[itype][jtype].Ti = temperature[i]; + models[itype][jtype].Tj = temperature[j]; + } if (models[itype][jtype].normal_model == JKR) touch[jj] = 1; + // if any history is needed if (use_history) { touch[jj] = 1; @@ -266,22 +251,30 @@ void PairGranular::compute(int eflag, int vflag) } models[itype][jtype].calculate_forces(forces, torquesi, torquesj, history); + if (heat_flag) dq = models[itype][jtype].calculate_heat(); // apply forces & torques MathExtra::scale3(factor_lj, forces); MathExtra::add3(f[i], forces, f[i]); MathExtra::scale3(factor_lj, torquesi); - MathExtra::add3(torques[i], torquesi, torques[i]); + MathExtra::add3(torque[i], torquesi, torque[i]); + if (heat_flag) heatflux[i] += dq; if (force->newton_pair || j < nlocal) { MathExtra::sub3(f[j], forces, f[j]); MathExtra::scale3(factor_lj, torquesj); - MathExtra::add3(torques[j], torquesj, torques[j]); + MathExtra::add3(torque[j], torquesj, torque[j]); + if (heat_flag) heatflux[j] -= dq; } - if (evflag) ev_tally_xyz(i,j,nlocal,force->newton_pair, - 0.0,0.0,forces[0],forces[1],forces[2],dx[0],dy[1],dx[2]); + if (evflag) { + delx = x[i][0] - x[j][0]; + dely = x[i][1] - x[j][1]; + delz = x[i][2] - x[j][2]; + ev_tally_xyz(i,j,nlocal,force->newton_pair, + 0.0,0.0,forces[0],forces[1],forces[2],delx,dely,delz); + } } } } @@ -303,7 +296,9 @@ void PairGranular::allocate() memory->create(cutsq,n+1,n+1,"pair:cutsq"); memory->create(cutoff_type,n+1,n+1,"pair:cutoff_type"); - memory->create(models,n+1,n+1,"pair:models"); + for (int i = 0; i < n+1; i++) { + models.push_back(std::vector (n+1)); + } onerad_dynamic = new double[n+1]; onerad_frozen = new double[n+1]; @@ -341,6 +336,7 @@ void PairGranular::coeff(int narg, char **arg) double roll_coeffs_one[4]; double twist_coeffs_one[4]; + double conductivity_one; double cutoff_one = -1; if (narg < 2) @@ -535,6 +531,14 @@ void PairGranular::coeff(int narg, char **arg) } else if (strcmp(arg[iarg], "limit_damping") == 0) { ld_flag = 1; iarg += 1; + } else if (strcmp(arg[iarg], "heat") == 0) { + if (iarg + 1 >= narg) + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + conductivity_one = utils::numeric(FLERR,arg[iarg+1],false,lmp); + if (conductivity_one < 0.0) + error->all(FLERR, "Illegal pair_coeff command, conductivity must be positive"); + heat_flag = 1; + iarg += 2; } else error->all(FLERR, "Illegal pair_coeff command"); } @@ -590,28 +594,29 @@ void PairGranular::coeff(int narg, char **arg) } else { models[i][j].k_tang = models[j][i].k_tang = tangential_coeffs_one[0]; } - models[i][j].gamma_tang = models[j][i]].gamma_tang = tangential_coeffs_one[1]; - models[i][j].mu_tang = models[j][i]].mu_tang = tangential_coeffs_one[2]; + models[i][j].gamma_tang = models[j][i].gamma_tang = tangential_coeffs_one[1]; + models[i][j].mu_tang = models[j][i].mu_tang = tangential_coeffs_one[2]; // Define rolling model - model[i][j].roll_model = model[j][i].roll_model = roll_model_one; + models[i][j].roll_model = models[j][i].roll_model = roll_model_one; if (roll_model_one != ROLL_NONE) { - model[i][j].k_roll = model[j][i].k_roll = roll_coeffs_one[0]; - model[i][j].gamma_roll = model[j][i].gamma_roll = roll_coeffs_one[1]; - model[i][j].mu_roll = model[j][i].mu_roll = roll_coeffs_one[2]; + models[i][j].k_roll = models[j][i].k_roll = roll_coeffs_one[0]; + models[i][j].gamma_roll = models[j][i].gamma_roll = roll_coeffs_one[1]; + models[i][j].mu_roll = models[j][i].mu_roll = roll_coeffs_one[2]; } // Define twisting model models[i][j].twist_model = models[j][i].twist_model = twist_model_one; if (twist_model_one != TWIST_NONE && twist_model_one != TWIST_MARSHALL) { - model[i][j].k_twist = model[j][i].k_twist = twist_coeffs_one[0]; - model[i][j].gamma_twist = model[j][i].gamma_twist = twist_coeffs_one[1]; - model[i][j].mu_twist = model[j][i].mu_twist = twist_coeffs_one[2]; + models[i][j].k_twist = models[j][i].k_twist = twist_coeffs_one[0]; + models[i][j].gamma_twist = models[j][i].gamma_twist = twist_coeffs_one[1]; + models[i][j].mu_twist = models[j][i].mu_twist = twist_coeffs_one[2]; } // Define extra options - model[i][j].cutoff_type = model[j][i].cutoff_type = cutoff_one; - model[i][j].limit_damping = model[j][i].limit_damping = ld_flag; + models[i][j].cutoff_type = models[j][i].cutoff_type = cutoff_one; + models[i][j].limit_damping = models[j][i].limit_damping = ld_flag; + models[i][j].conductivity = models[j][i].conductivity = conductivity_one; setflag[i][j] = 1; count++; @@ -666,8 +671,8 @@ void PairGranular::init_style() } for (int i = 1; i <= atom->ntypes; i++) for (int j = i; j <= atom->ntypes; j++) - if (model[i][j].tangential_model == TANGENTIAL_MINDLIN_RESCALE || - model[i][j].tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) { + if (models[i][j].tangential_model == TANGENTIAL_MINDLIN_RESCALE || + models[i][j].tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) { size_history += 1; roll_history_index += 1; twist_history_index += 1; @@ -785,7 +790,7 @@ double PairGranular::init_one(int i, int j) // Mix normal coefficients if (models[i][j].normal_model == HERTZ || models[i][j].normal_model == HOOKE) - models[i][j].k_norm = models[j][i][0].k_norm = + models[i][j].k_norm = models[j][i].k_norm = mix_geom(models[i][i].k_norm, models[j][j].k_norm); else models[i][j].k_norm = models[j][i].k_norm = @@ -794,7 +799,7 @@ double PairGranular::init_one(int i, int j) models[i][j].gamma_norm = models[j][i].gamma_norm = mix_geom(models[i][i].gamma_norm, models[j][j].gamma_norm); - if ((normal_model[i][j] == JKR) || (normal_model[i][j] == DMT)) + if ((models[i][j].normal_model == JKR) || (models[i][j].normal_model == DMT)) models[i][j].cohesion = models[j][i].cohesion = mix_geom(models[i][i].cohesion, models[j][j].cohesion); @@ -807,7 +812,7 @@ double PairGranular::init_one(int i, int j) mix_geom(models[i][i].mu_tang, models[j][j].mu_tang); // Mix rolling coefficients - if (models.roll_model[i][j] != ROLL_NONE) { + if (models[i][j].roll_model != ROLL_NONE) { models[i][j].k_roll = models[j][i].k_roll = mix_geom(models[i][i].k_roll, models[j][j].k_roll); models[i][j].gamma_roll = models[j][i].gamma_roll = @@ -825,8 +830,19 @@ double PairGranular::init_one(int i, int j) models[i][j].mu_twist = models[j][i].mu_twist = mix_geom(models[i][i].mu_twist, models[j][j].mu_twist); } + + models[i][j].limit_damping = models[j][i].limit_damping = + MAX(models[i][i].limit_damping, models[j][j].limit_damping); + if (heat_flag) { + models[i][j].conductivity = models[j][i].conductivity = + mix_geom(models[i][i].conductivity, models[j][j].conductivity); + } } + // Check if conductivity is undefined (negative) for any type combination + if (heat_flag && models[i][j].conductivity < 0.0) + error->all(FLERR, "To calculate heat, conductivity must be defined for all pair coeff"); + // It is possible that cut[i][j] at this point is still 0.0. // This can happen when // there is a future fix_pour after the current run. A cut[i][j] = 0.0 creates @@ -843,14 +859,14 @@ double PairGranular::init_one(int i, int j) ((maxrad_frozen[i] > 0.0) && (maxrad_dynamic[j] > 0.0))) { cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; pulloff = 0.0; - if (normal_model[i][j] == JKR) { - pulloff = models[i][j]->pulloff_distance(maxrad_dynamic[i], maxrad_dynamic[j]); + if (models[i][j].normal_model == JKR) { + pulloff = models[i][j].pulloff_distance(maxrad_dynamic[i], maxrad_dynamic[j]); cutoff += pulloff; - pulloff = models[i][j]->pulloff_distance(maxrad_frozen[i], maxrad_dynamic[j]); + pulloff = models[i][j].pulloff_distance(maxrad_frozen[i], maxrad_dynamic[j]); cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j] + pulloff); - pulloff = models[i][j]->pulloff_distance(maxrad_dynamic[i], maxrad_frozen[j]); + pulloff = models[i][j].pulloff_distance(maxrad_dynamic[i], maxrad_frozen[j]); cutoff = MAX(cutoff,maxrad_dynamic[i] + maxrad_frozen[j] + pulloff); } } else { @@ -872,6 +888,11 @@ double PairGranular::init_one(int i, int j) cutoff = cutoff_global; } + // Copy global options + models[i][j].dt = dt; + models[i][j].roll_history_index = roll_history_index; + models[i][j].twist_history_index = twist_history_index; + return cutoff; } @@ -982,26 +1003,114 @@ void PairGranular::reset_dt() double PairGranular::single(int i, int j, int itype, int jtype, double rsq, double /* factor_coul */, - double /* factor_lj */, double &fforce) + double factor_lj, double &fforce) { + if (factor_lj == 0) { + fforce = 0.0; + for (int m = 0; m < single_extra; m++) svector[m] = 0.0; + return 0.0; + } - fforce = Fntot*rinv; + int jnum; + int *jlist; + double *history,*allhistory; + + int nall = atom->nlocal + atom->nghost; + if ((i >= nall) || (j >= nall)) + error->all(FLERR,"Not enough atoms for pair granular single function"); + + + int touchflag; + double **x = atom->x; + double *radius = atom->radius; + + // Reset model and copy initial geometric data + models[itype][jtype].reset_contact(); + models[itype][jtype].xi = x[i]; + models[itype][jtype].xj = x[j]; + models[itype][jtype].radi = radius[i]; + models[itype][jtype].radj = radius[j]; + models[i][j].history_update = 0; // Don't update history + + touchflag = models[itype][jtype].check_contact(); + + if (!touchflag) { + fforce = 0.0; + for (int m = 0; m < single_extra; m++) svector[m] = 0.0; + return 0.0; + } + + // meff = effective mass of pair of particles + // if I or J part of rigid body, use body mass + // if I or J is frozen, meff is other particle + double mi, mj, meff; + double *rmass = atom->rmass; + int *mask = atom->mask; + + mi = rmass[i]; + mj = rmass[j]; + if (fix_rigid) { + if (mass_rigid[i] > 0.0) mi = mass_rigid[i]; + if (mass_rigid[j] > 0.0) mj = mass_rigid[j]; + } + meff = mi * mj / (mi + mj); + if (mask[i] & freeze_group_bit) meff = mj; + if (mask[j] & freeze_group_bit) meff = mi; + + // Copy additional information and prepare force calculations + double **v = atom->v; + double **omega = atom->omega; + + models[itype][jtype].meff = meff; + models[itype][jtype].vi = v[i]; + models[itype][jtype].vj = v[j]; + models[itype][jtype].omegai = omega[i]; + models[itype][jtype].omegaj = omega[j]; + models[itype][jtype].prep_contact(); + + // if any history is needed + + jnum = list->numneigh[i]; + jlist = list->firstneigh[i]; + + if (use_history) { + if ((fix_history == nullptr) || (fix_history->firstvalue == nullptr)) + error->one(FLERR,"Pair granular single computation needs history"); + allhistory = fix_history->firstvalue[i]; + for (int jj = 0; jj < jnum; jj++) { + neighprev++; + if (neighprev >= jnum) neighprev = 0; + if (jlist[neighprev] == j) break; + } + history = &allhistory[size_history*neighprev]; + } + + double forces[3], torquesi[3], torquesj[3]; + models[itype][jtype].calculate_forces(forces, torquesi, torquesj, history); + + // apply forces & torques + fforce = MathExtra::len3(forces); // set single_extra quantities - svector[0] = fs1; - svector[1] = fs2; - svector[2] = fs3; - svector[3] = fs; - svector[4] = fr1; - svector[5] = fr2; - svector[6] = fr3; - svector[7] = fr; - svector[8] = magtortwist; + double delx = x[i][0] - x[j][0]; + double dely = x[i][1] - x[j][1]; + double delz = x[i][2] - x[j][2]; + + svector[0] = models[itype][jtype].fs[0]; + svector[1] = models[itype][jtype].fs[1]; + svector[2] = models[itype][jtype].fs[2]; + svector[3] = MathExtra::len3(models[itype][jtype].fs); + svector[4] = models[itype][jtype].fr[0]; + svector[5] = models[itype][jtype].fr[1]; + svector[6] = models[itype][jtype].fr[2]; + svector[7] = MathExtra::len3(models[itype][jtype].fr); + svector[8] = models[itype][jtype].magtortwist; svector[9] = delx; svector[10] = dely; svector[11] = delz; + return 0.0; } @@ -1117,7 +1226,7 @@ double PairGranular::radii2cut(double r1, double r2) for (int i = 0; i < n; i++){ for (int j = 0; j < n; j++){ if (models[i][j].normal_model == JKR) { - temp = pulloff_distance(r1, r2); + temp = models[i][j].pulloff_distance(r1, r2); if (temp > cut) cut = temp; } } diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index 509981d5f9..3440d60e29 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -20,7 +20,9 @@ PairStyle(granular,PairGranular); #ifndef LMP_PAIR_GRANULAR_H #define LMP_PAIR_GRANULAR_H +#include "contact.h" #include "pair.h" +#include namespace LAMMPS_NS { @@ -68,9 +70,10 @@ class PairGranular : public Pair { private: int size_history; int *history_transfer_factors; + int heat_flag; // contact models - ContactModel **models; + std::vector > models; // history flags int normal_history, tangential_history, roll_history, twist_history; diff --git a/src/contact.cpp b/src/contact.cpp index b7d5d4d85d..b4b335a1aa 100644 --- a/src/contact.cpp +++ b/src/contact.cpp @@ -12,47 +12,624 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- - This class contains a series of DEM contact models - that can be defined and used to calculate forces + This class contains a series of tools for DEM contacts + Multiple models can be defined and used to calculate forces and torques based on contact geometry */ -#include #include "contact.h" +#include "math_const.h" +#include "math_extra.h" +#include "pointers.h" -namespace LAMMPS_NS { - namespace Contact{ +#include -enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; -enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; -enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, - TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, - TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; -enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; -enum {ROLL_NONE, ROLL_SDS}; +using namespace LAMMPS_NS; +using namespace MathExtra; +using namespace MathConst; -#define PI27SQ 266.47931882941264802866 // 27*PI**2 -#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) -#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) -#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) -#define FOURTHIRDS (4.0/3.0) // 4/3 -#define THREEQUARTERS 0.75 // 3/4 - -#define EPSILON 1e-10 +namespace Contact { ContactModel::ContactModel() { + k_norm = cohesion = gamma_norm = 0.0; + k_tang = gamma_tang = mu_tang = 0.0; + k_roll = gamma_roll = mu_roll = 0.0; + k_twist = gamma_twist = mu_twist = 0.0; + limit_damping = 0; + cutoff_type = 0.0; + reset_contact(); +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::reset_contact() +{ + radi = radj = 0.0; + xi = xj = vi = vj = omegai = omegaj = nullptr; + + prep_flag = check_flag = 0; + touch = false; +} + +/* ---------------------------------------------------------------------- */ + +bool ContactModel::check_contact() +{ + check_flag = 1; + + sub3(xi, xj, dx); + rsq = lensq3(dx); + radsum = radi + radj; + Reff = radi*radj/radsum; + + touch = false; + if (normal_model == JKR) touch = touch_JKR(touch); + else touch = (rsq < radsum*radsum); + + return touch; +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::prep_contact() +{ + prep_flag = 1; + + // If it hasn't already been done, test if the contact exists + if (check_flag != 1) touch = check_contact(); + if (!touch) return; + + double temp[3]; + + // Set flags + mindlin_rescale = mindlin_force = 0; + if (tangential_model == TANGENTIAL_MINDLIN_RESCALE || + tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) + mindlin_rescale = 1; + if (tangential_model == TANGENTIAL_MINDLIN_FORCE || + tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) + mindlin_force = 1; + + // Standard geometric quantities + r = sqrt(rsq); + rinv = 1.0/r; + delta = radsum - r; + dR = delta*Reff; + scale3(rinv, dx, nx); + + // relative translational velocity + sub3(vi, vj, vr); + + // normal component + vnnr = dot3(vr, nx); //v_R . n + scale3(vnnr, nx, vn); + + // tangential component + sub3(vr, vn, vt); + + // relative rotational velocity + scaleadd3(radi, omegai, radj, omegaj, wr); + + // relative tangential velocities + cross3(wr, nx, temp); + sub3(vt, temp, vtr); + vrel = len3(vtr); + + if (roll_model != ROLL_NONE || twist_model != TWIST_NONE) + sub3(omegai, omegaj, relrot); + + if (roll_model != ROLL_NONE) { + // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) + // this is different from the Marshall papers, which use the Bagi/Kuhn formulation + // for rolling velocity (see Wang et al for why the latter is wrong) + vrl[0] = Reff * (relrot[1] * nx[2] - relrot[2] * nx[1]); + vrl[1] = Reff * (relrot[2] * nx[0] - relrot[0] * nx[2]); + vrl[2] = Reff * (relrot[0] * nx[1] - relrot[1] * nx[0]); + } + + if (twist_model != TWIST_NONE) { + // omega_T (eq 29 of Marshall) + magtwist = dot3(relrot, nx); + } +} + + +/* ---------------------------------------------------------------------- */ + +void ContactModel::calculate_forces(double *forces, double *torquesi, double *torquesj, double *history) +{ + // If it hasn't already been done, run prep calculations + if (prep_flag != 1) prep_contact(); + if (!touch) { + forces[0] = forces[1] = forces[2] = 0.0; + return; + } + + //********************************************** + // normal forces + //********************************************** + + // Also calculates: a, knfac, Fncrit (for JKR or DMT) + double Fne; + if (normal_model == JKR) { + Fne = normal_JKR(); + } else if (normal_model == DMT) { + Fne = normal_DMT(); + } else if (normal_model == HERTZ || normal_model == HERTZ_MATERIAL) { + Fne = normal_Hertz(); + } else { + Fne = normal_Hooke(); + } + + // NOTE: consider restricting Hooke to only have + // 'velocity' as an option for damping? + // Also calculates: damp_normal_prefactor + double Fdamp = normal_damping(); + + Fntot = Fne + Fdamp; + if (limit_damping && (Fntot < 0.0)) Fntot = 0.0; + + if (normal_model != JKR && normal_model != DMT) Fncrit = fabs(Fntot); + + //********************************************** + // tangential force, including history effects + //********************************************** + // For linear, mindlin, mindlin_rescale: + // history = cumulative tangential displacement + // + // For mindlin/force, mindlin_rescale/force: + // history = cumulative tangential elastic force + + Fscrit = mu_tang * Fncrit; + + if (tangential_model == TANGENTIAL_MINDLIN || + tangential_model == TANGENTIAL_MINDLIN_FORCE || + tangential_model == TANGENTIAL_MINDLIN_RESCALE || + tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) { + tangential_mindlin(history); + } else if (tangential_model == TANGENTIAL_HISTORY) { + tangential_history(history); + } else { + tangential_no_history(); + } + + //********************************************** + // rolling force + //********************************************** + + if (roll_model != ROLL_NONE) + rolling(history); + + //**************************************** + // twisting torque, including history effects + //**************************************** + + if (twist_model == TWIST_MARSHALL) { + twisting_marshall(history); + } else if (twist_model == TWIST_SDS) { + twisting_SDS(history); + } + + //********************************************** + // sum contributions + //********************************************** + + scale3(Fntot, nx, forces); + add3(forces, fs, forces); + + cross3(nx, fs, torquesi); + copy3(torquesi, torquesj); + + double dist_to_contact = radi-0.5*delta; + scale3(dist_to_contact, torquesi); + dist_to_contact = radj-0.5*delta; + scale3(dist_to_contact, torquesj); + + double torroll[3]; + if (roll_model != ROLL_NONE) { + cross3(nx, fr, torroll); + scale3(Reff, torroll); + add3(torquesi, torroll, torquesi); + sub3(torquesj, torroll, torquesj); + } + + double tortwist[3]; + if (twist_model != TWIST_NONE) { + scale3(magtortwist, nx, tortwist); + add3(torquesi, tortwist, torquesi); + sub3(torquesj, tortwist, torquesj); + } +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::calculate_heat() +{ + double dT = Ti - Tj; + double Hc; + + //Dan is Emod the youngs modulus for all models? or do I need to scale? + Hc = 2 * conductivity * pow(FOURTHIRDS * Fntot * Reff / Emod, ONETHIRD); + + return Hc * dT; +} + +/* ---------------------------------------------------------------------- */ + +bool ContactModel::touch_JKR(int touch) +{ + double Escaled, R2, delta_pulloff, dist_pulloff; + bool touchflag; + + Escaled = k_norm * THREEQUARTERS; + if (touch) { + R2 = Reff * Reff; + a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); + delta_pulloff = a * a / Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); + dist_pulloff = radsum - delta_pulloff; + touchflag = (rsq < dist_pulloff * dist_pulloff); + } else { + touchflag = (rsq < radsum * radsum); + } + return touchflag; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::normal_JKR() +{ + double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a, a2, F_pulloff, Fne; + + Escaled = k_norm * THREEQUARTERS; + + R2 = Reff * Reff; + dR2 = dR * dR; + t0 = cohesion * cohesion * R2 * R2 * Escaled; + t1 = PI27SQ*t0; + t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; + t3 = 4 * dR2 * Escaled; + + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / Escaled; + sqrt2 = MAX(0, 2 * dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + a = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = a * a; + Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); + F_pulloff = 3 * MY_PI * cohesion * Reff; + + knfac = Escaled * a; + Fncrit = fabs(Fne + 2 * F_pulloff); + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::normal_DMT() +{ + a = sqrt(dR); + double Fne = a * k_norm * delta; + Fne -= 4 * MY_PI * cohesion * Reff; + double F_pulloff = 4 * MY_PI * cohesion * Reff; + + knfac = k_norm * a; + Fncrit = fabs(Fne + 2 * F_pulloff); + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::normal_Hertz() +{ + a = sqrt(dR); + double Fne = k_norm * delta * a; + + knfac = k_norm * a; + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::normal_Hooke() +{ + a = sqrt(dR); + double Fne = k_norm * delta; + + knfac = k_norm; + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +double ContactModel::normal_damping() +{ + double damp_normal; + if (damping_model == VELOCITY) { + damp_normal = 1; + } else if (damping_model == MASS_VELOCITY) { + damp_normal = meff; + } else if (damping_model == VISCOELASTIC) { + damp_normal = a * meff; + } else if (damping_model == TSUJI) { + damp_normal = sqrt(meff * knfac); + } else damp_normal = 0.0; + + damp_normal_prefactor = gamma_norm * damp_normal; + return -damp_normal_prefactor * vnnr; +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::tangential_no_history() +{ + double gamma_scaled = gamma_tang * damp_normal_prefactor; + double fsmag, Ft; + + // classic pair gran/hooke (no history) + fsmag = gamma_scaled * vrel; + if (vrel != 0.0) Ft = MIN(Fscrit,fsmag) / vrel; + else Ft = 0.0; + + Ft = -Ft; + scale3(Ft, vtr, fs); +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::tangential_history(double *history) +{ + double gamma_scaled = gamma_tang * damp_normal_prefactor; + double k = k_tang; + int frame_update = 0; + double magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; + + // rotate and update displacements / force. + // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 + if (history_update) { + rsht = dot3(history, nx); + frame_update = fabs(rsht) * k > EPSILON * Fscrit; + + if (frame_update) { + shrmag = len3(history); + // projection + scale3(rsht, nx, history); + // also rescale to preserve magnitude + prjmag = len3(history); + if (prjmag > 0) temp_dbl = shrmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, history); + } + + // update history + // tangential force + // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 + temp_dbl = k * dt; + scale3(temp_dbl, vtr, temp_array); + sub3(history, temp_array, history); + } + + // tangential forces = history + tangential velocity damping + temp_dbl = -gamma_norm; + scale3(temp_dbl, vtr, fs); + + // rescale frictional displacements and forces if needed + magfs = len3(fs); + if (magfs > Fscrit) { + shrmag = len3(history); + if (shrmag != 0.0) { + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs, history); + scale3(gamma_norm, vtr, temp_array); + add3(history, temp_array, history); + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs); + } else { + zero3(fs); + } + } +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::tangential_mindlin(double *history) +{ + double k_scaled, gamma_scaled, magfs, rsht, shrmag, prjmag, temp_dbl; + double temp_array[3]; + int frame_update = 0; + + gamma_scaled = gamma_tang * damp_normal_prefactor; + k_scaled = k_tang * a; + if (mindlin_rescale) { + // on unloading, rescale the shear displacements/force + if (a < history[3]) { + temp_dbl = a / history[3]; + scale3(temp_dbl, history); + } + } + + // rotate and update displacements / force. + // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 + if (history_update) { + rsht = dot3(history, nx); + if (mindlin_force) + frame_update = fabs(rsht) > EPSILON * Fscrit; + else + frame_update = fabs(rsht) * k_scaled > EPSILON * Fscrit; + + if (frame_update) { + shrmag = len3(history); + // projection + scale3(rsht, nx, history); + // also rescale to preserve magnitude + prjmag = len3(history); + if (prjmag > 0) temp_dbl = shrmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, history); + } + + // update history + if (mindlin_force) { + // tangential force + // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 + temp_dbl = -k_scaled * dt; + scale3(temp_dbl, vtr, temp_array); + } else { + scale3(dt, vtr, temp_array); + } + add3(history, temp_array, history); + + if (mindlin_rescale) history[3] = a; + } + + // tangential forces = history + tangential velocity damping + temp_dbl = -gamma_scaled; + scale3(temp_dbl, vtr, fs); + + if (! mindlin_force) { + scale3(k_scaled, history, temp_array); + add3(fs, temp_array, fs); + } + + // rescale frictional displacements and forces if needed + magfs = len3(fs); + if (magfs > Fscrit) { + shrmag = len3(history); + if (shrmag != 0.0) { + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs, history); + scale3(gamma_tang, vtr, temp_array); + add3(history, temp_array, history); + if (! mindlin_force) { + temp_dbl = -1.0 / k_tang; + scale3(temp_dbl, history); + } + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs); + } else { + zero3(fs); + } + } +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::rolling(double *history) +{ + int rhist0, rhist1, rhist2, frameupdate; + double rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_dbl, temp_array[3]; + + rhist0 = roll_history_index; + rhist1 = rhist0 + 1; + rhist2 = rhist1 + 1; + + Frcrit = mu_roll * Fncrit; + + if (history_update) { + hist_temp[0] = history[rhist0]; + hist_temp[1] = history[rhist1]; + hist_temp[2] = history[rhist2]; + rolldotn = dot3(hist_temp, nx); + + frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit; + if (frameupdate) { // rotate into tangential plane + rollmag = len3(hist_temp); + // projection + temp_dbl = -rolldotn; + scale3(temp_dbl, nx, temp_array); + sub3(hist_temp, temp_array, hist_temp); + + // also rescale to preserve magnitude + prjmag = len3(hist_temp); + if (prjmag > 0) temp_dbl = rollmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, hist_temp); + } + scale3(dt, vrl, temp_array); + add3(hist_temp, temp_array, hist_temp); + } + + scaleadd3(k_roll, hist_temp, gamma_roll, vrl, fr); + negate3(fr); + + // rescale frictional displacements and forces if needed + + magfr = len3(fr); + if (magfr > Frcrit) { + rollmag = len3(hist_temp); + if (rollmag != 0.0) { + temp_dbl = -Frcrit / (magfr * k_roll); + scale3(temp_dbl, fr, temp_array); + add3(hist_temp, temp_array, hist_temp); + + temp_dbl = -gamma_roll/k_roll; + scale3(temp_dbl, vrl, temp_array); + add3(hist_temp, temp_array, hist_temp); + + temp_dbl = Frcrit / magfr; + scale3(temp_dbl, fr); + } else { + zero3(fr); + } + } + + history[rhist0] = hist_temp[0]; + history[rhist1] = hist_temp[1]; + history[rhist2] = hist_temp[2]; +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::twisting_marshall(double *history) +{ + // Overwrite twist coefficients with derived values + k_twist = 0.5 * k_tang * a * a; // eq 32 of Marshall paper + gamma_twist = 0.5 * gamma_tang * a * a; + mu_twist = TWOTHIRDS * a * mu_tang; + + twisting_SDS(history); +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::twisting_SDS(double *history) +{ + double signtwist, Mtcrit; + + if (history_update) { + history[twist_history_index] += magtwist * dt; + } + + magtortwist = -k_twist * history[twist_history_index] - gamma_twist*magtwist; // M_t torque (eq 30) + signtwist = (magtwist > 0) - (magtwist < 0); + Mtcrit = mu_twist * Fncrit; // critical torque (eq 44) + if (fabs(magtortwist) > Mtcrit) { + history[twist_history_index] = (Mtcrit * signtwist - gamma_twist * magtwist) / k_twist; + magtortwist = -Mtcrit * signtwist; // eq 34 + } } /* ---------------------------------------------------------------------- - get volume-correct r basis in: basis*cbrt(vol) = q*r + compute pull-off distance (beyond contact) for a given radius and atom type + use temporary variables since this does not use a specific contact geometry ------------------------------------------------------------------------- */ -void ContactModel::() +double ContactModel::pulloff_distance(double radi, double radj) { + double Ecaled, a_tmp, Reff_tmp; + if (normal_model != JKR) return radi+radj; + + Reff_tmp = radi * radj / (radi + radj); + if (Reff_tmp <= 0) return 0; + Ecaled = k_norm * THREEQUARTERS; + a_tmp = cbrt(9 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4 * Ecaled)); + return a_tmp * a_tmp / Reff_tmp - 2 * sqrt(MY_PI * cohesion * a_tmp / Ecaled); } - -}} +} diff --git a/src/contact.h b/src/contact.h index 38cb6f0be6..167f88e9de 100644 --- a/src/contact.h +++ b/src/contact.h @@ -11,40 +11,81 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef LMP_CONTACT -_H -#define LMP_CONTACT -_H +#ifndef LMP_CONTACT_H +#define LMP_CONTACT_H -namespace LAMMPS_NS { namespace Contact { + enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; + enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; + enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, + TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, + TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; + enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; + enum {ROLL_NONE, ROLL_SDS}; + + #define PI27SQ 266.47931882941264802866 // 27*PI**2 + #define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) + #define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) + #define INVROOT6 0.40824829046386307274 // 1/sqrt(6) + #define FOURTHIRDS (4.0/3.0) // 4/3 + #define ONETHIRD (1.0/3.0) // 1/3 + #define THREEQUARTERS 0.75 // 3/4 + + #define EPSILON 1e-10 + class ContactModel { public: ContactModel(); - void touch_JKR(int); - void normal_JKR(double&); - void normal_DMT(double&); - void normal_Hooke(double&); - double normal_damping(double, double); - double critical_normal(double, double); + void reset_contact(); + bool check_contact(); + void prep_contact(); + void calculate_forces(double *, double *, double *, double *); + double calculate_heat(); + double pulloff_distance(double, double); int normal_model, damping_model, tangential_model; int roll_model, twist_model; - double E, G, poisson, damp, coh; + int limit_damping; + double cutoff_type; + double Emod, poisson; // variables used in defining mixed interactions + double k_norm, gamma_norm, cohesion; // normal_coeffs + double k_tang, gamma_tang, mu_tang; // tangential_coeffs - wutang? + double k_roll, gamma_roll, mu_roll; // roll_coeffs + double k_twist, gamma_twist, mu_twist; // twist_coeffs + double conductivity; + + double radi, radj, meff, dt, Ti, Tj; + double *xi, *xj, *vi, *vj, *omegai, *omegaj; + int history_update, roll_history_index, twist_history_index; + + double fs[3], fr[3], ft[3], magtortwist; private: - double a, knfac; - ContactGeometry geom; + double a, knfac, Fntot, Fncrit, Fscrit, Frcrit, damp_normal_prefactor; + double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; + double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; + double magtwist; + bool touch; + + int prep_flag, check_flag; + int mindlin_rescale, mindlin_force; + + bool touch_JKR(int); + double normal_JKR(); + double normal_DMT(); + double normal_Hertz(); + double normal_Hooke(); + double normal_damping(); + void tangential_no_history(); + void tangential_history(double *); + void tangential_mindlin(double *); + void rolling(double *); + void twisting_marshall(double *); + void twisting_SDS(double *); + }; - - class ContactGeometry { - public: - ContactGeometry(); - void add_data(); - double r, rinv, rsq, Reff, radsum, delta, dR; - }; } // namespace Contact -} // namespace LAMMPS_NS + #endif diff --git a/src/contact_model.cpp b/src/contact_model.cpp deleted file mode 100644 index 779631836b..0000000000 --- a/src/contact_model.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// clang-format off -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- - - This class contains a series of DEM contact models - that can be defined and used to calculate forces - and torques based on contact geometry -*/ - -#include -#include "contact_model.h" - -namespace LAMMPS_NS { - namespace Contact_Model{ - -enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; -enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; -enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, - TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, - TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; -enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; -enum {ROLL_NONE, ROLL_SDS}; - -#define PI27SQ 266.47931882941264802866 // 27*PI**2 -#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) -#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) -#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) -#define FOURTHIRDS (4.0/3.0) // 4/3 -#define THREEQUARTERS 0.75 // 3/4 - -#define EPSILON 1e-10 - -ContactModel::ContactModel() -{ - -} - -/* ---------------------------------------------------------------------- - get volume-correct r basis in: basis*cbrt(vol) = q*r -------------------------------------------------------------------------- */ - -void ContactModel::() -{ - -} - - -}} diff --git a/src/contact_model.h b/src/contact_model.h deleted file mode 100644 index 678a7111a8..0000000000 --- a/src/contact_model.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef LMP_CONTACT_MODEL_H -#define LMP_CONTACT_MODEL_H - -namespace LAMMPS_NS { -namespace Contact_Model { - - class ContactModel { - public: - ContactModel(); - void set_strain(const double, const double); - void step_deform(const double, const double); - bool reduce(); - void get_box(double[3][3], double); - void get_rot(double[3][3]); - void get_inverse_cob(int[3][3]); - - private: - double a, knfac; - }; -} // namespace Contact_Model -} // namespace LAMMPS_NS -#endif diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 87bd04b2a9..a74e91c889 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -41,7 +41,7 @@ enum{ID,MOL,PROC,PROCP1,TYPE,ELEMENT,MASS, XSU,YSU,ZSU,XSUTRI,YSUTRI,ZSUTRI, IX,IY,IZ, VX,VY,VZ,FX,FY,FZ, - Q,MUX,MUY,MUZ,MU,RADIUS,DIAMETER, + Q,MUX,MUY,MUZ,MU,RADIUS,DIAMETER,HEATFLUX,TEMPERATURE, OMEGAX,OMEGAY,OMEGAZ,ANGMOMX,ANGMOMY,ANGMOMZ, TQX,TQY,TQZ, COMPUTE,FIX,VARIABLE,IVEC,DVEC,IARRAY,DARRAY}; @@ -930,6 +930,18 @@ int DumpCustom::count() for (i = 0; i < nlocal; i++) dchoose[i] = 2.0*radius[i]; ptr = dchoose; nstride = 1; + } else if (thresh_array[ithresh] == HEATFLUX) { + if (!atom->heatflux_flag) + error->all(FLERR, + "Threshold for an atom property that isn't allocated"); + ptr = atom->heatflux; + nstride = 1; + } else if (thresh_array[ithresh] == TEMPERATURE) { + if (!atom->temperature_flag) + error->all(FLERR, + "Threshold for an atom property that isn't allocated"); + ptr = atom->temperature; + nstride = 1; } else if (thresh_array[ithresh] == OMEGAX) { if (!atom->omega_flag) error->all(FLERR, @@ -1380,6 +1392,16 @@ int DumpCustom::parse_fields(int narg, char **arg) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[iarg] = &DumpCustom::pack_diameter; vtype[iarg] = Dump::DOUBLE; + } else if (strcmp(arg[iarg],"heatflux") == 0) { + if (!atom->heatflux_flag) + error->all(FLERR,"Dumping an atom property that isn't allocated"); + pack_choice[iarg] = &DumpCustom::pack_heatflux; + vtype[iarg] = Dump::DOUBLE; + } else if (strcmp(arg[iarg],"temperature") == 0) { + if (!atom->temperature_flag) + error->all(FLERR,"Dumping an atom property that isn't allocated"); + pack_choice[iarg] = &DumpCustom::pack_temperature; + vtype[iarg] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"omegax") == 0) { if (!atom->omega_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); @@ -1845,6 +1867,8 @@ int DumpCustom::modify_param(int narg, char **arg) else if (strcmp(arg[1],"radius") == 0) thresh_array[nthresh] = RADIUS; else if (strcmp(arg[1],"diameter") == 0) thresh_array[nthresh] = DIAMETER; + else if (strcmp(arg[1],"heatflux") == 0) thresh_array[nthresh] = HEATFLUX; + else if (strcmp(arg[1],"temperature") == 0) thresh_array[nthresh] = TEMPERATURE; else if (strcmp(arg[1],"omegax") == 0) thresh_array[nthresh] = OMEGAX; else if (strcmp(arg[1],"omegay") == 0) thresh_array[nthresh] = OMEGAY; else if (strcmp(arg[1],"omegaz") == 0) thresh_array[nthresh] = OMEGAZ; @@ -2759,6 +2783,30 @@ void DumpCustom::pack_diameter(int n) /* ---------------------------------------------------------------------- */ +void DumpCustom::pack_heatflux(int n) +{ + double *heatflux = atom->heatflux; + + for (int i = 0; i < nchoose; i++) { + buf[n] = heatflux[clist[i]]; + n += size_one; + } +} + +/* ---------------------------------------------------------------------- */ + +void DumpCustom::pack_temperature(int n) +{ + double *temperature = atom->temperature; + + for (int i = 0; i < nchoose; i++) { + buf[n] = temperature[clist[i]]; + n += size_one; + } +} + +/* ---------------------------------------------------------------------- */ + void DumpCustom::pack_omegax(int n) { double **omega = atom->omega; diff --git a/src/dump_custom.h b/src/dump_custom.h index b27a9950cd..fd4fd413c3 100644 --- a/src/dump_custom.h +++ b/src/dump_custom.h @@ -193,6 +193,8 @@ class DumpCustom : public Dump { void pack_mu(int); void pack_radius(int); void pack_diameter(int); + void pack_heatflux(int); + void pack_temperature(int); void pack_omegax(int); void pack_omegay(int); diff --git a/src/fix_neigh_history.cpp b/src/fix_neigh_history.cpp index 613716c9a4..37d1b37946 100644 --- a/src/fix_neigh_history.cpp +++ b/src/fix_neigh_history.cpp @@ -353,7 +353,8 @@ void FixNeighHistory::pre_exchange_newton() // Ensure npartner is zeroed across all atoms, nall_neigh can be less than nall // when writing restarts when comm calls are made but modify->post_neighbor() isn't - for (i = 0; i < MAX(nall_neigh, atom->nall); i++) npartner[i] = 0; + int nall = atom->nlocal + atom->nghost; + for (i = 0; i < MAX(nall_neigh, nall); i++) npartner[i] = 0; tagint *tag = atom->tag; NeighList *list = pair->list; @@ -408,7 +409,7 @@ void FixNeighHistory::pre_exchange_newton() // store partner IDs and values for owned+ghost atoms // re-zero npartner to use as counter - for (i = 0; i < MAX(nall_neigh, atom->nall); i++) npartner[i] = 0; + for (i = 0; i < MAX(nall_neigh, nall); i++) npartner[i] = 0; for (ii = 0; ii < inum; ii++) { i = ilist[ii]; From 222c40ebcf29bae96e76bf8f078beb6e375fadab Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 29 Jun 2022 15:02:05 -0600 Subject: [PATCH 008/445] Fixing memory errors --- src/.gitignore | 2 ++ src/GRANULAR/atom_vec_sphere_temp.cpp | 2 ++ src/GRANULAR/contact.cpp | 6 +++--- src/GRANULAR/pair_granular.cpp | 6 +++--- src/contact.cpp | 6 +++--- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index acb509551c..a1aee630b5 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1472,6 +1472,8 @@ /compute_xrd.cpp /compute_xrd.h /compute_xrd_consts.h +/contact.cpp +/contact.h /fix_atom_swap.cpp /fix_atom_swap.h /fix_ave_spatial_sphere.cpp diff --git a/src/GRANULAR/atom_vec_sphere_temp.cpp b/src/GRANULAR/atom_vec_sphere_temp.cpp index a455a9ddc8..a92486a1b5 100644 --- a/src/GRANULAR/atom_vec_sphere_temp.cpp +++ b/src/GRANULAR/atom_vec_sphere_temp.cpp @@ -106,6 +106,8 @@ void AtomVecSphereTemp::grow_pointers() radius = atom->radius; rmass = atom->rmass; omega = atom->omega; + temperature = atom->temperature; + heatflux = atom->heatflux; } /* ---------------------------------------------------------------------- diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index b4b335a1aa..a8405d095b 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -94,9 +94,9 @@ void ContactModel::prep_contact() // Standard geometric quantities r = sqrt(rsq); - rinv = 1.0/r; + rinv = 1.0 / r; delta = radsum - r; - dR = delta*Reff; + dR = delta * Reff; scale3(rinv, dx, nx); // relative translational velocity @@ -281,7 +281,7 @@ bool ContactModel::touch_JKR(int touch) double ContactModel::normal_JKR() { double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a, a2, F_pulloff, Fne; + double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; Escaled = k_norm * THREEQUARTERS; diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 0047e24359..506cc2e175 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -889,9 +889,9 @@ double PairGranular::init_one(int i, int j) } // Copy global options - models[i][j].dt = dt; - models[i][j].roll_history_index = roll_history_index; - models[i][j].twist_history_index = twist_history_index; + models[i][j].dt = models[j][i].dt = dt; + models[i][j].roll_history_index = models[j][i].roll_history_index = roll_history_index; + models[i][j].twist_history_index = models[j][i].twist_history_index = twist_history_index; return cutoff; } diff --git a/src/contact.cpp b/src/contact.cpp index b4b335a1aa..a8405d095b 100644 --- a/src/contact.cpp +++ b/src/contact.cpp @@ -94,9 +94,9 @@ void ContactModel::prep_contact() // Standard geometric quantities r = sqrt(rsq); - rinv = 1.0/r; + rinv = 1.0 / r; delta = radsum - r; - dR = delta*Reff; + dR = delta * Reff; scale3(rinv, dx, nx); // relative translational velocity @@ -281,7 +281,7 @@ bool ContactModel::touch_JKR(int touch) double ContactModel::normal_JKR() { double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a, a2, F_pulloff, Fne; + double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; Escaled = k_norm * THREEQUARTERS; From ba1c4e8e814575c1ef3797982eb2655c41d2c4f2 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 29 Jun 2022 15:34:39 -0600 Subject: [PATCH 009/445] Defining conduction from area, a --- doc/src/pair_granular.rst | 10 +++++++++- src/GRANULAR/contact.cpp | 6 +----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index 9a99558653..c14d94a77a 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -635,7 +635,15 @@ attractive force. This keyword cannot be used with the JKR or DMT models. ---------- The optional *heat* keyword enables heat conduction and it must be followed by -a non-negative numeric value for the conductivity. Note that the *heat* keyword +a non-negative numeric value for the conductivity :math:`k_{s}.`` The heat :math:`Q` +conducted across an interface is given by + +.. math:: + + Q = k_{s} a \Delta T + +where :math:`\Delta T` is the difference in the two particles' temperature and :math:`a` +is the area of the contact and depends on the normal force model. Note that the *heat* keyword must be included in either all or none of of the *pair_coeff* calls. See :doc:`fix temp/integrate ` for more information on this option. diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index a8405d095b..a7b59f7172 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -249,11 +249,7 @@ double ContactModel::calculate_heat() { double dT = Ti - Tj; double Hc; - - //Dan is Emod the youngs modulus for all models? or do I need to scale? - Hc = 2 * conductivity * pow(FOURTHIRDS * Fntot * Reff / Emod, ONETHIRD); - - return Hc * dT; + return conductivity * a * dT; } /* ---------------------------------------------------------------------- */ From bb92dae6d355187628bcd17041d375f070d95854 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Tue, 5 Jul 2022 10:12:12 -0600 Subject: [PATCH 010/445] Simplying conduction --- src/GRANULAR/contact.cpp | 1 - src/contact.cpp | 635 --------------------------------------- 2 files changed, 636 deletions(-) delete mode 100644 src/contact.cpp diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index a7b59f7172..40105be815 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -248,7 +248,6 @@ void ContactModel::calculate_forces(double *forces, double *torquesi, double *to double ContactModel::calculate_heat() { double dT = Ti - Tj; - double Hc; return conductivity * a * dT; } diff --git a/src/contact.cpp b/src/contact.cpp deleted file mode 100644 index a8405d095b..0000000000 --- a/src/contact.cpp +++ /dev/null @@ -1,635 +0,0 @@ -// clang-format off -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- - - This class contains a series of tools for DEM contacts - Multiple models can be defined and used to calculate forces - and torques based on contact geometry -*/ - -#include "contact.h" -#include "math_const.h" -#include "math_extra.h" -#include "pointers.h" - -#include - -using namespace LAMMPS_NS; -using namespace MathExtra; -using namespace MathConst; - -namespace Contact { - -ContactModel::ContactModel() -{ - k_norm = cohesion = gamma_norm = 0.0; - k_tang = gamma_tang = mu_tang = 0.0; - k_roll = gamma_roll = mu_roll = 0.0; - k_twist = gamma_twist = mu_twist = 0.0; - - limit_damping = 0; - cutoff_type = 0.0; - reset_contact(); -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::reset_contact() -{ - radi = radj = 0.0; - xi = xj = vi = vj = omegai = omegaj = nullptr; - - prep_flag = check_flag = 0; - touch = false; -} - -/* ---------------------------------------------------------------------- */ - -bool ContactModel::check_contact() -{ - check_flag = 1; - - sub3(xi, xj, dx); - rsq = lensq3(dx); - radsum = radi + radj; - Reff = radi*radj/radsum; - - touch = false; - if (normal_model == JKR) touch = touch_JKR(touch); - else touch = (rsq < radsum*radsum); - - return touch; -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::prep_contact() -{ - prep_flag = 1; - - // If it hasn't already been done, test if the contact exists - if (check_flag != 1) touch = check_contact(); - if (!touch) return; - - double temp[3]; - - // Set flags - mindlin_rescale = mindlin_force = 0; - if (tangential_model == TANGENTIAL_MINDLIN_RESCALE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) - mindlin_rescale = 1; - if (tangential_model == TANGENTIAL_MINDLIN_FORCE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) - mindlin_force = 1; - - // Standard geometric quantities - r = sqrt(rsq); - rinv = 1.0 / r; - delta = radsum - r; - dR = delta * Reff; - scale3(rinv, dx, nx); - - // relative translational velocity - sub3(vi, vj, vr); - - // normal component - vnnr = dot3(vr, nx); //v_R . n - scale3(vnnr, nx, vn); - - // tangential component - sub3(vr, vn, vt); - - // relative rotational velocity - scaleadd3(radi, omegai, radj, omegaj, wr); - - // relative tangential velocities - cross3(wr, nx, temp); - sub3(vt, temp, vtr); - vrel = len3(vtr); - - if (roll_model != ROLL_NONE || twist_model != TWIST_NONE) - sub3(omegai, omegaj, relrot); - - if (roll_model != ROLL_NONE) { - // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) - // this is different from the Marshall papers, which use the Bagi/Kuhn formulation - // for rolling velocity (see Wang et al for why the latter is wrong) - vrl[0] = Reff * (relrot[1] * nx[2] - relrot[2] * nx[1]); - vrl[1] = Reff * (relrot[2] * nx[0] - relrot[0] * nx[2]); - vrl[2] = Reff * (relrot[0] * nx[1] - relrot[1] * nx[0]); - } - - if (twist_model != TWIST_NONE) { - // omega_T (eq 29 of Marshall) - magtwist = dot3(relrot, nx); - } -} - - -/* ---------------------------------------------------------------------- */ - -void ContactModel::calculate_forces(double *forces, double *torquesi, double *torquesj, double *history) -{ - // If it hasn't already been done, run prep calculations - if (prep_flag != 1) prep_contact(); - if (!touch) { - forces[0] = forces[1] = forces[2] = 0.0; - return; - } - - //********************************************** - // normal forces - //********************************************** - - // Also calculates: a, knfac, Fncrit (for JKR or DMT) - double Fne; - if (normal_model == JKR) { - Fne = normal_JKR(); - } else if (normal_model == DMT) { - Fne = normal_DMT(); - } else if (normal_model == HERTZ || normal_model == HERTZ_MATERIAL) { - Fne = normal_Hertz(); - } else { - Fne = normal_Hooke(); - } - - // NOTE: consider restricting Hooke to only have - // 'velocity' as an option for damping? - // Also calculates: damp_normal_prefactor - double Fdamp = normal_damping(); - - Fntot = Fne + Fdamp; - if (limit_damping && (Fntot < 0.0)) Fntot = 0.0; - - if (normal_model != JKR && normal_model != DMT) Fncrit = fabs(Fntot); - - //********************************************** - // tangential force, including history effects - //********************************************** - // For linear, mindlin, mindlin_rescale: - // history = cumulative tangential displacement - // - // For mindlin/force, mindlin_rescale/force: - // history = cumulative tangential elastic force - - Fscrit = mu_tang * Fncrit; - - if (tangential_model == TANGENTIAL_MINDLIN || - tangential_model == TANGENTIAL_MINDLIN_FORCE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) { - tangential_mindlin(history); - } else if (tangential_model == TANGENTIAL_HISTORY) { - tangential_history(history); - } else { - tangential_no_history(); - } - - //********************************************** - // rolling force - //********************************************** - - if (roll_model != ROLL_NONE) - rolling(history); - - //**************************************** - // twisting torque, including history effects - //**************************************** - - if (twist_model == TWIST_MARSHALL) { - twisting_marshall(history); - } else if (twist_model == TWIST_SDS) { - twisting_SDS(history); - } - - //********************************************** - // sum contributions - //********************************************** - - scale3(Fntot, nx, forces); - add3(forces, fs, forces); - - cross3(nx, fs, torquesi); - copy3(torquesi, torquesj); - - double dist_to_contact = radi-0.5*delta; - scale3(dist_to_contact, torquesi); - dist_to_contact = radj-0.5*delta; - scale3(dist_to_contact, torquesj); - - double torroll[3]; - if (roll_model != ROLL_NONE) { - cross3(nx, fr, torroll); - scale3(Reff, torroll); - add3(torquesi, torroll, torquesi); - sub3(torquesj, torroll, torquesj); - } - - double tortwist[3]; - if (twist_model != TWIST_NONE) { - scale3(magtortwist, nx, tortwist); - add3(torquesi, tortwist, torquesi); - sub3(torquesj, tortwist, torquesj); - } -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::calculate_heat() -{ - double dT = Ti - Tj; - double Hc; - - //Dan is Emod the youngs modulus for all models? or do I need to scale? - Hc = 2 * conductivity * pow(FOURTHIRDS * Fntot * Reff / Emod, ONETHIRD); - - return Hc * dT; -} - -/* ---------------------------------------------------------------------- */ - -bool ContactModel::touch_JKR(int touch) -{ - double Escaled, R2, delta_pulloff, dist_pulloff; - bool touchflag; - - Escaled = k_norm * THREEQUARTERS; - if (touch) { - R2 = Reff * Reff; - a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); - delta_pulloff = a * a / Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); - dist_pulloff = radsum - delta_pulloff; - touchflag = (rsq < dist_pulloff * dist_pulloff); - } else { - touchflag = (rsq < radsum * radsum); - } - return touchflag; -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::normal_JKR() -{ - double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; - - Escaled = k_norm * THREEQUARTERS; - - R2 = Reff * Reff; - dR2 = dR * dR; - t0 = cohesion * cohesion * R2 * R2 * Escaled; - t1 = PI27SQ*t0; - t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; - t3 = 4 * dR2 * Escaled; - - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); - t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / Escaled; - sqrt2 = MAX(0, 2 * dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); - a = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = a * a; - Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); - F_pulloff = 3 * MY_PI * cohesion * Reff; - - knfac = Escaled * a; - Fncrit = fabs(Fne + 2 * F_pulloff); - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::normal_DMT() -{ - a = sqrt(dR); - double Fne = a * k_norm * delta; - Fne -= 4 * MY_PI * cohesion * Reff; - double F_pulloff = 4 * MY_PI * cohesion * Reff; - - knfac = k_norm * a; - Fncrit = fabs(Fne + 2 * F_pulloff); - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::normal_Hertz() -{ - a = sqrt(dR); - double Fne = k_norm * delta * a; - - knfac = k_norm * a; - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::normal_Hooke() -{ - a = sqrt(dR); - double Fne = k_norm * delta; - - knfac = k_norm; - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::normal_damping() -{ - double damp_normal; - if (damping_model == VELOCITY) { - damp_normal = 1; - } else if (damping_model == MASS_VELOCITY) { - damp_normal = meff; - } else if (damping_model == VISCOELASTIC) { - damp_normal = a * meff; - } else if (damping_model == TSUJI) { - damp_normal = sqrt(meff * knfac); - } else damp_normal = 0.0; - - damp_normal_prefactor = gamma_norm * damp_normal; - return -damp_normal_prefactor * vnnr; -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::tangential_no_history() -{ - double gamma_scaled = gamma_tang * damp_normal_prefactor; - double fsmag, Ft; - - // classic pair gran/hooke (no history) - fsmag = gamma_scaled * vrel; - if (vrel != 0.0) Ft = MIN(Fscrit,fsmag) / vrel; - else Ft = 0.0; - - Ft = -Ft; - scale3(Ft, vtr, fs); -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::tangential_history(double *history) -{ - double gamma_scaled = gamma_tang * damp_normal_prefactor; - double k = k_tang; - int frame_update = 0; - double magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; - - // rotate and update displacements / force. - // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (history_update) { - rsht = dot3(history, nx); - frame_update = fabs(rsht) * k > EPSILON * Fscrit; - - if (frame_update) { - shrmag = len3(history); - // projection - scale3(rsht, nx, history); - // also rescale to preserve magnitude - prjmag = len3(history); - if (prjmag > 0) temp_dbl = shrmag / prjmag; - else temp_dbl = 0; - scale3(temp_dbl, history); - } - - // update history - // tangential force - // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - temp_dbl = k * dt; - scale3(temp_dbl, vtr, temp_array); - sub3(history, temp_array, history); - } - - // tangential forces = history + tangential velocity damping - temp_dbl = -gamma_norm; - scale3(temp_dbl, vtr, fs); - - // rescale frictional displacements and forces if needed - magfs = len3(fs); - if (magfs > Fscrit) { - shrmag = len3(history); - if (shrmag != 0.0) { - temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs, history); - scale3(gamma_norm, vtr, temp_array); - add3(history, temp_array, history); - temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs); - } else { - zero3(fs); - } - } -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::tangential_mindlin(double *history) -{ - double k_scaled, gamma_scaled, magfs, rsht, shrmag, prjmag, temp_dbl; - double temp_array[3]; - int frame_update = 0; - - gamma_scaled = gamma_tang * damp_normal_prefactor; - k_scaled = k_tang * a; - if (mindlin_rescale) { - // on unloading, rescale the shear displacements/force - if (a < history[3]) { - temp_dbl = a / history[3]; - scale3(temp_dbl, history); - } - } - - // rotate and update displacements / force. - // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (history_update) { - rsht = dot3(history, nx); - if (mindlin_force) - frame_update = fabs(rsht) > EPSILON * Fscrit; - else - frame_update = fabs(rsht) * k_scaled > EPSILON * Fscrit; - - if (frame_update) { - shrmag = len3(history); - // projection - scale3(rsht, nx, history); - // also rescale to preserve magnitude - prjmag = len3(history); - if (prjmag > 0) temp_dbl = shrmag / prjmag; - else temp_dbl = 0; - scale3(temp_dbl, history); - } - - // update history - if (mindlin_force) { - // tangential force - // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - temp_dbl = -k_scaled * dt; - scale3(temp_dbl, vtr, temp_array); - } else { - scale3(dt, vtr, temp_array); - } - add3(history, temp_array, history); - - if (mindlin_rescale) history[3] = a; - } - - // tangential forces = history + tangential velocity damping - temp_dbl = -gamma_scaled; - scale3(temp_dbl, vtr, fs); - - if (! mindlin_force) { - scale3(k_scaled, history, temp_array); - add3(fs, temp_array, fs); - } - - // rescale frictional displacements and forces if needed - magfs = len3(fs); - if (magfs > Fscrit) { - shrmag = len3(history); - if (shrmag != 0.0) { - temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs, history); - scale3(gamma_tang, vtr, temp_array); - add3(history, temp_array, history); - if (! mindlin_force) { - temp_dbl = -1.0 / k_tang; - scale3(temp_dbl, history); - } - temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs); - } else { - zero3(fs); - } - } -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::rolling(double *history) -{ - int rhist0, rhist1, rhist2, frameupdate; - double rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_dbl, temp_array[3]; - - rhist0 = roll_history_index; - rhist1 = rhist0 + 1; - rhist2 = rhist1 + 1; - - Frcrit = mu_roll * Fncrit; - - if (history_update) { - hist_temp[0] = history[rhist0]; - hist_temp[1] = history[rhist1]; - hist_temp[2] = history[rhist2]; - rolldotn = dot3(hist_temp, nx); - - frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit; - if (frameupdate) { // rotate into tangential plane - rollmag = len3(hist_temp); - // projection - temp_dbl = -rolldotn; - scale3(temp_dbl, nx, temp_array); - sub3(hist_temp, temp_array, hist_temp); - - // also rescale to preserve magnitude - prjmag = len3(hist_temp); - if (prjmag > 0) temp_dbl = rollmag / prjmag; - else temp_dbl = 0; - scale3(temp_dbl, hist_temp); - } - scale3(dt, vrl, temp_array); - add3(hist_temp, temp_array, hist_temp); - } - - scaleadd3(k_roll, hist_temp, gamma_roll, vrl, fr); - negate3(fr); - - // rescale frictional displacements and forces if needed - - magfr = len3(fr); - if (magfr > Frcrit) { - rollmag = len3(hist_temp); - if (rollmag != 0.0) { - temp_dbl = -Frcrit / (magfr * k_roll); - scale3(temp_dbl, fr, temp_array); - add3(hist_temp, temp_array, hist_temp); - - temp_dbl = -gamma_roll/k_roll; - scale3(temp_dbl, vrl, temp_array); - add3(hist_temp, temp_array, hist_temp); - - temp_dbl = Frcrit / magfr; - scale3(temp_dbl, fr); - } else { - zero3(fr); - } - } - - history[rhist0] = hist_temp[0]; - history[rhist1] = hist_temp[1]; - history[rhist2] = hist_temp[2]; -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::twisting_marshall(double *history) -{ - // Overwrite twist coefficients with derived values - k_twist = 0.5 * k_tang * a * a; // eq 32 of Marshall paper - gamma_twist = 0.5 * gamma_tang * a * a; - mu_twist = TWOTHIRDS * a * mu_tang; - - twisting_SDS(history); -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::twisting_SDS(double *history) -{ - double signtwist, Mtcrit; - - if (history_update) { - history[twist_history_index] += magtwist * dt; - } - - magtortwist = -k_twist * history[twist_history_index] - gamma_twist*magtwist; // M_t torque (eq 30) - signtwist = (magtwist > 0) - (magtwist < 0); - Mtcrit = mu_twist * Fncrit; // critical torque (eq 44) - if (fabs(magtortwist) > Mtcrit) { - history[twist_history_index] = (Mtcrit * signtwist - gamma_twist * magtwist) / k_twist; - magtortwist = -Mtcrit * signtwist; // eq 34 - } -} - -/* ---------------------------------------------------------------------- - compute pull-off distance (beyond contact) for a given radius and atom type - use temporary variables since this does not use a specific contact geometry -------------------------------------------------------------------------- */ - -double ContactModel::pulloff_distance(double radi, double radj) -{ - double Ecaled, a_tmp, Reff_tmp; - - if (normal_model != JKR) return radi+radj; - - Reff_tmp = radi * radj / (radi + radj); - if (Reff_tmp <= 0) return 0; - Ecaled = k_norm * THREEQUARTERS; - a_tmp = cbrt(9 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4 * Ecaled)); - return a_tmp * a_tmp / Reff_tmp - 2 * sqrt(MY_PI * cohesion * a_tmp / Ecaled); -} - -} From 6b40ae29e45138afc67a9a85c64feb3ca541c2e3 Mon Sep 17 00:00:00 2001 From: "Dan S. Bolintineanu" Date: Thu, 14 Jul 2022 11:29:13 -0600 Subject: [PATCH 011/445] First stab --- src/GRANULAR/contact.cpp | 308 ++++++--------- src/GRANULAR/contact.h | 112 +++--- src/GRANULAR/damping_contact_models.cpp | 54 +++ src/GRANULAR/damping_contact_models.h | 56 +++ src/GRANULAR/heat_models.cpp | 185 +++++++++ src/GRANULAR/heat_models.h | 83 ++++ src/GRANULAR/normal_contact_models.cpp | 178 +++++++++ src/GRANULAR/normal_contact_models.h | 85 +++++ src/GRANULAR/pair_granular.cpp | 425 +++++---------------- src/GRANULAR/rolling_contact_models.cpp | 185 +++++++++ src/GRANULAR/rolling_contact_models.h | 83 ++++ src/GRANULAR/sub_model.cpp | 76 ++++ src/GRANULAR/sub_model.h | 48 +++ src/GRANULAR/tangential_contact_models.cpp | 168 ++++++++ src/GRANULAR/tangential_contact_models.h | 79 ++++ src/GRANULAR/twisting_contact_models.cpp | 185 +++++++++ src/GRANULAR/twisting_contact_models.h | 83 ++++ 17 files changed, 1825 insertions(+), 568 deletions(-) create mode 100644 src/GRANULAR/damping_contact_models.cpp create mode 100644 src/GRANULAR/damping_contact_models.h create mode 100644 src/GRANULAR/heat_models.cpp create mode 100644 src/GRANULAR/heat_models.h create mode 100644 src/GRANULAR/normal_contact_models.cpp create mode 100644 src/GRANULAR/normal_contact_models.h create mode 100644 src/GRANULAR/rolling_contact_models.cpp create mode 100644 src/GRANULAR/rolling_contact_models.h create mode 100644 src/GRANULAR/sub_model.cpp create mode 100644 src/GRANULAR/sub_model.h create mode 100644 src/GRANULAR/tangential_contact_models.cpp create mode 100644 src/GRANULAR/tangential_contact_models.h create mode 100644 src/GRANULAR/twisting_contact_models.cpp create mode 100644 src/GRANULAR/twisting_contact_models.h diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index 40105be815..554a54eec9 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -21,6 +21,8 @@ #include "math_const.h" #include "math_extra.h" #include "pointers.h" +#include "comm.h" +#include "error.h" #include @@ -32,16 +34,117 @@ namespace Contact { ContactModel::ContactModel() { - k_norm = cohesion = gamma_norm = 0.0; - k_tang = gamma_tang = mu_tang = 0.0; - k_roll = gamma_roll = mu_roll = 0.0; - k_twist = gamma_twist = mu_twist = 0.0; - limit_damping = 0; cutoff_type = 0.0; + normal_model = nullptr; + tangential_model = nullptr; + damping_model = nullptr; + rolling_model = nullptr; + twisting_model = nullptr; reset_contact(); } +/* ---------------------------------------------------------------------- */ +void ContactModel::init_normal(char *model_name){ + if (strcmp(model_name, "hooke") == 0) normal_model = new Hooke(); + else if (strcmp(model_name, "hertz") == 0) normal_model = new Hertz(0); + else if (strcmp(model_name, "hertz/material") == 0) normal_model = new Hertz(1); + //... + else error->all(FLERR, "Normal model name not recognized"); + + normal_model->model_name.assign(model_name); + normal_model->contact = *this; + normal_model->allocate_coeffs(); +} + +/* ---------------------------------------------------------------------- */ +void ContactModel::init_damping(char *model_name){ + if (strcmp(model_name, "velocity") == 0) tangential_model = new Velocity(*this); + //... + else error->all(FLERR, "Damping model name not recognized"); + tangential_model->model_name.assign(model_name); + tangential_model->contact = *this; + tangential_model->allocate_coeffs(); +} + +/* ---------------------------------------------------------------------- */ +void ContactModel::init_tangential(char *model_name){ + if (strcmp(model_name, "linear") == 0) tangential_model = new LinearNohistory(*this); + //... + else error->all(FLERR, "Tangential model name not recognized"); + damping_model->model_name.assign(model_name); + damping_model->contact = *this; + damping_model->allocate_coeffs(); +} + + +/* ---------------------------------------------------------------------- */ +// .... same for rolling, twisting + + +void ContactModel::write_restart(FILE *fp){ + normal_model->write_restart(fp); + tangential_model->write_restart(fp); + damping_model->write_restart(fp); + if (rolling_model){ + rolling_model->write_restart(fp); + } + else{ + int num_char = -1; + fwrite(&num_char, sizeof(int), 1, fp); + } + if (twisting_model){ + twisting_model->write_restart(fp); + } + else{ + int num_char = -1; + fwrite(&num_char, sizeof(int), 1, fp); + } +} + +void ContactModel::read_restart(FILE *fp){ + int num_char; + //Normal model + if (comm->me == 0){ + utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); + } + MPI_BCast(&num_char, 1, MPI_INT, 0, world); + std::string model_name(num_char); + if (comm->me == 0){ + utils::sfread(FLERR,const_cast(model_name.data()),sizeof(char),num_char,fp,nullptr,error); + } + MPI_BCast(const_cast(model_name.data()), num_char, MPI_CHAR, world); + init_normal(const_cast(model_name.data())); + normal_model->read_restart(); + + //Tangential model + if (comm->me == 0){ + utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); + } + MPI_BCast(&num_char, 1, MPI_INT, 0, world); + std::string model_name(num_char); + if (comm->me == 0){ + utils::sfread(FLERR,const_cast(model_name.data()),sizeof(char),num_char,fp,nullptr,error); + } + init_tangential(const_cast(model_name.data())); + tangential_model->read_restart(); + + //Damping + if (comm->me == 0){ + utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); + } + MPI_BCast(&num_char, 1, MPI_INT, 0, world); + std::string model_name(num_char); + if (comm->me == 0){ + utils::sfread(FLERR,const_cast(model_name.data()),sizeof(char),num_char,fp,nullptr,error); + } + init_tangential(const_cast(model_name.data())); + damping_model->read_restart(); + + //Optional (rolling, twisting) - only if num_char is > 0. + +} + /* ---------------------------------------------------------------------- */ void ContactModel::reset_contact() @@ -65,7 +168,7 @@ bool ContactModel::check_contact() Reff = radi*radj/radsum; touch = false; - if (normal_model == JKR) touch = touch_JKR(touch); + if (normal_model->beyond_contact) normal_model->touch(touch); else touch = (rsq < radsum*radsum); return touch; @@ -76,22 +179,12 @@ bool ContactModel::check_contact() void ContactModel::prep_contact() { prep_flag = 1; - // If it hasn't already been done, test if the contact exists if (check_flag != 1) touch = check_contact(); if (!touch) return; double temp[3]; - // Set flags - mindlin_rescale = mindlin_force = 0; - if (tangential_model == TANGENTIAL_MINDLIN_RESCALE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) - mindlin_rescale = 1; - if (tangential_model == TANGENTIAL_MINDLIN_FORCE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) - mindlin_force = 1; - // Standard geometric quantities r = sqrt(rsq); rinv = 1.0 / r; @@ -117,10 +210,10 @@ void ContactModel::prep_contact() sub3(vt, temp, vtr); vrel = len3(vtr); - if (roll_model != ROLL_NONE || twist_model != TWIST_NONE) + if (roll_model || twist_model) sub3(omegai, omegaj, relrot); - if (roll_model != ROLL_NONE) { + if (roll_model) { // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) // this is different from the Marshall papers, which use the Bagi/Kuhn formulation // for rolling velocity (see Wang et al for why the latter is wrong) @@ -129,16 +222,15 @@ void ContactModel::prep_contact() vrl[2] = Reff * (relrot[0] * nx[1] - relrot[1] * nx[0]); } - if (twist_model != TWIST_NONE) { + if (twist_model) { // omega_T (eq 29 of Marshall) magtwist = dot3(relrot, nx); } } - /* ---------------------------------------------------------------------- */ -void ContactModel::calculate_forces(double *forces, double *torquesi, double *torquesj, double *history) +void ContactModel::calculate_forces() { // If it hasn't already been done, run prep calculations if (prep_flag != 1) prep_contact(); @@ -151,66 +243,17 @@ void ContactModel::calculate_forces(double *forces, double *torquesi, double *to // normal forces //********************************************** - // Also calculates: a, knfac, Fncrit (for JKR or DMT) - double Fne; - if (normal_model == JKR) { - Fne = normal_JKR(); - } else if (normal_model == DMT) { - Fne = normal_DMT(); - } else if (normal_model == HERTZ || normal_model == HERTZ_MATERIAL) { - Fne = normal_Hertz(); - } else { - Fne = normal_Hooke(); - } - - // NOTE: consider restricting Hooke to only have - // 'velocity' as an option for damping? - // Also calculates: damp_normal_prefactor - double Fdamp = normal_damping(); + double Fne, Fdamp; + Fne = normal_model->calculate_forces(); + Fdamp = damping_model->calculate_forces(); Fntot = Fne + Fdamp; - if (limit_damping && (Fntot < 0.0)) Fntot = 0.0; + if (limit_damping && Fntot < 0.0) Fntot = 0.0; + normal_model->set_fncrit(); - if (normal_model != JKR && normal_model != DMT) Fncrit = fabs(Fntot); - - //********************************************** - // tangential force, including history effects - //********************************************** - // For linear, mindlin, mindlin_rescale: - // history = cumulative tangential displacement - // - // For mindlin/force, mindlin_rescale/force: - // history = cumulative tangential elastic force - - Fscrit = mu_tang * Fncrit; - - if (tangential_model == TANGENTIAL_MINDLIN || - tangential_model == TANGENTIAL_MINDLIN_FORCE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) { - tangential_mindlin(history); - } else if (tangential_model == TANGENTIAL_HISTORY) { - tangential_history(history); - } else { - tangential_no_history(); - } - - //********************************************** - // rolling force - //********************************************** - - if (roll_model != ROLL_NONE) - rolling(history); - - //**************************************** - // twisting torque, including history effects - //**************************************** - - if (twist_model == TWIST_MARSHALL) { - twisting_marshall(history); - } else if (twist_model == TWIST_SDS) { - twisting_SDS(history); - } + tangential_model->calculate_forces(); + if (roll_model) roll_model->calculate_forces(); + if (twist_model) twist_model->calculate_forces(); //********************************************** // sum contributions @@ -219,6 +262,7 @@ void ContactModel::calculate_forces(double *forces, double *torquesi, double *to scale3(Fntot, nx, forces); add3(forces, fs, forces); + //May need to rethink this for use with walls (and eventually tris).. cross3(nx, fs, torquesi); copy3(torquesi, torquesj); @@ -228,7 +272,7 @@ void ContactModel::calculate_forces(double *forces, double *torquesi, double *to scale3(dist_to_contact, torquesj); double torroll[3]; - if (roll_model != ROLL_NONE) { + if (roll_model) { cross3(nx, fr, torroll); scale3(Reff, torroll); add3(torquesi, torroll, torquesi); @@ -236,7 +280,7 @@ void ContactModel::calculate_forces(double *forces, double *torquesi, double *to } double tortwist[3]; - if (twist_model != TWIST_NONE) { + if (twist_model) { scale3(magtortwist, nx, tortwist); add3(torquesi, tortwist, torquesi); sub3(torquesj, tortwist, torquesj); @@ -253,111 +297,7 @@ double ContactModel::calculate_heat() /* ---------------------------------------------------------------------- */ -bool ContactModel::touch_JKR(int touch) -{ - double Escaled, R2, delta_pulloff, dist_pulloff; - bool touchflag; - Escaled = k_norm * THREEQUARTERS; - if (touch) { - R2 = Reff * Reff; - a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); - delta_pulloff = a * a / Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); - dist_pulloff = radsum - delta_pulloff; - touchflag = (rsq < dist_pulloff * dist_pulloff); - } else { - touchflag = (rsq < radsum * radsum); - } - return touchflag; -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::normal_JKR() -{ - double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; - - Escaled = k_norm * THREEQUARTERS; - - R2 = Reff * Reff; - dR2 = dR * dR; - t0 = cohesion * cohesion * R2 * R2 * Escaled; - t1 = PI27SQ*t0; - t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; - t3 = 4 * dR2 * Escaled; - - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); - t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / Escaled; - sqrt2 = MAX(0, 2 * dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); - a = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = a * a; - Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); - F_pulloff = 3 * MY_PI * cohesion * Reff; - - knfac = Escaled * a; - Fncrit = fabs(Fne + 2 * F_pulloff); - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::normal_DMT() -{ - a = sqrt(dR); - double Fne = a * k_norm * delta; - Fne -= 4 * MY_PI * cohesion * Reff; - double F_pulloff = 4 * MY_PI * cohesion * Reff; - - knfac = k_norm * a; - Fncrit = fabs(Fne + 2 * F_pulloff); - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::normal_Hertz() -{ - a = sqrt(dR); - double Fne = k_norm * delta * a; - - knfac = k_norm * a; - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::normal_Hooke() -{ - a = sqrt(dR); - double Fne = k_norm * delta; - - knfac = k_norm; - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -double ContactModel::normal_damping() -{ - double damp_normal; - if (damping_model == VELOCITY) { - damp_normal = 1; - } else if (damping_model == MASS_VELOCITY) { - damp_normal = meff; - } else if (damping_model == VISCOELASTIC) { - damp_normal = a * meff; - } else if (damping_model == TSUJI) { - damp_normal = sqrt(meff * knfac); - } else damp_normal = 0.0; - - damp_normal_prefactor = gamma_norm * damp_normal; - return -damp_normal_prefactor * vnnr; -} /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index 167f88e9de..cb6d1865af 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -14,77 +14,71 @@ #ifndef LMP_CONTACT_H #define LMP_CONTACT_H +#include "pointers.h" +#include "normal_contact_models.h" +#include "tangential_contact_models.h" +#include "damping_contact_models.h" +#include "rolling_contact_models.h" +#include "twisting_contact_models.h" +#include "heat_models.h" + +using namespace LAMMPS_NS; + namespace Contact { - enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; - enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; - enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, - TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, - TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; - enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; - enum {ROLL_NONE, ROLL_SDS}; +#define EPSILON 1e-10 - #define PI27SQ 266.47931882941264802866 // 27*PI**2 - #define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) - #define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) - #define INVROOT6 0.40824829046386307274 // 1/sqrt(6) - #define FOURTHIRDS (4.0/3.0) // 4/3 - #define ONETHIRD (1.0/3.0) // 1/3 - #define THREEQUARTERS 0.75 // 3/4 +class ContactModel : protected Pointers { +public: + ContactModel(); + ~ContactModel(); + int init(); + bool check_contact(); + void reset_contact(); + void calculate_forces(); + double calculate_heat(); + double pulloff_distance(double, double); - #define EPSILON 1e-10 + void init_normal(char*); + void init_tangential(char*); + void init_damping(char*); + void init_rolling(char*); + void init_twisting(char*); + void init_heat(char*); - class ContactModel { - public: - ContactModel(); - void reset_contact(); - bool check_contact(); - void prep_contact(); - void calculate_forces(double *, double *, double *, double *); - double calculate_heat(); - double pulloff_distance(double, double); + void write_restart(FILE *); + void read_restart(FILE *); - int normal_model, damping_model, tangential_model; - int roll_model, twist_model; - int limit_damping; - double cutoff_type; - double Emod, poisson; // variables used in defining mixed interactions - double k_norm, gamma_norm, cohesion; // normal_coeffs - double k_tang, gamma_tang, mu_tang; // tangential_coeffs - wutang? - double k_roll, gamma_roll, mu_roll; // roll_coeffs - double k_twist, gamma_twist, mu_twist; // twist_coeffs - double conductivity; + NormalModel *normal_model; + DampingModel *damping_model; //Classes below need .h and .cpp files analogous to normal_contact_models.h/.cpp + TangentialModel *tangential_model; + RollingModel *rolling_model; + TwistingModel *twisting_model; + HeatModel *heat_model; - double radi, radj, meff, dt, Ti, Tj; - double *xi, *xj, *vi, *vj, *omegai, *omegaj; - int history_update, roll_history_index, twist_history_index; + double *forces; + double *torquesi; + double *torquesj; + double *history; - double fs[3], fr[3], ft[3], magtortwist; + int limit_damping; - private: - double a, knfac, Fntot, Fncrit, Fscrit, Frcrit, damp_normal_prefactor; - double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; - double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; - double magtwist; - bool touch; + double radi, radj, meff, dt, Ti, Tj; + double area; - int prep_flag, check_flag; - int mindlin_rescale, mindlin_force; + double *xi, *xj, *vi, *vj, *omegai, *omegaj; + double Fntot, Fncrit; + double fs[3], fr[3], ft[3], magtortwist; - bool touch_JKR(int); - double normal_JKR(); - double normal_DMT(); - double normal_Hertz(); - double normal_Hooke(); - double normal_damping(); - void tangential_no_history(); - void tangential_history(double *); - void tangential_mindlin(double *); - void rolling(double *); - void twisting_marshall(double *); - void twisting_SDS(double *); +private: + double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; + double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; + double magtwist; + bool touch; - }; + int prep_flag, check_flag; + int mindlin_rescale, mindlin_force; +}; } // namespace Contact diff --git a/src/GRANULAR/damping_contact_models.cpp b/src/GRANULAR/damping_contact_models.cpp new file mode 100644 index 0000000000..11d2c19b57 --- /dev/null +++ b/src/GRANULAR/damping_contact_models.cpp @@ -0,0 +1,54 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "damping_contact_models.h" +#include "math_const.h" +#include "contact.h" + +#include +#include "math_special.h" + +using namespace MathConst; +using namespace MathSpecial; + +namespace Contact{ + +void DampingModel::allocate_coeffs(){ + damp = contact.normal_model->coeffs[1]; +} + +//----------------------------------------- +double Velocity::calculate_forces(){ + return -damp*contact.vnnr; +} + +double MassVelocity::calculate_forces(){ + return -damp*contact.meff*contact.vnnr; +} + + +double ViscoElastic::calculate_forces(){ + return -damp*contact.meff*contact.area*contact.vnnr; +} + + +void Tsuji::allocate_coeffs(){ + double cor = contact.normal_model->coeffs[1]; + damp = 1.2728-4.2783*cor+11.087*square(cor)-22.348*cube(cor)+ + 27.467*powint(cor,4)-18.022*powint(cor,5)+4.8218*powint(cor,6); +} + +double Tsuji::calculate_forces(){ + return -damp*sqrt(contact.meff*contact.knfac)*contact.vnnr; +} + diff --git a/src/GRANULAR/damping_contact_models.h b/src/GRANULAR/damping_contact_models.h new file mode 100644 index 0000000000..036f6e3452 --- /dev/null +++ b/src/GRANULAR/damping_contact_models.h @@ -0,0 +1,56 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef DAMPING_CONTACT_MODELS_H_ +#define DAMPING_CONTACT_MODELS_H_ + +#include "contact.h"; +#include "sub_model.h" + +namespace Contact { + +class DampingModel:SubModel{ +public: + DampingModel(){}; + virtual ~DampingModel(){}; + virtual double calculate_forces() = 0; + virtual void allocate_coeffs(); + double damp; +}; + +class Velocity:DampingModel{ +public: + double calculate_forces(); +}; + +class MassVelocity:DampingModel{ +public: + double calculate_forces(); +}; + +class ViscoElastic:DampingModel{ +public: + double calculate_forces(); +}; + +class Tsuji:DampingModel{ +public: + double calculate_forces(); + void allocate_coeffs(); +}; + + +} + +#endif /*DAMPING_CONTACT_MODELS_H_ */ + diff --git a/src/GRANULAR/heat_models.cpp b/src/GRANULAR/heat_models.cpp new file mode 100644 index 0000000000..e6bafe4b3c --- /dev/null +++ b/src/GRANULAR/heat_models.cpp @@ -0,0 +1,185 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "normal_contact_models.h" +#include "math_const.h" +#include "contact.h" + +#include + +using namespace MathConst; + +namespace Contact{ + +#define PI27SQ 266.47931882941264802866 // 27*PI**2 +#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) +#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) +#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) +#define FOURTHIRDS (4.0/3.0) // 4/3 +#define ONETHIRD (1.0/3.0) // 1/3 +#define THREEQUARTERS 0.75 // 3/4 + +// ************************ +// Default behaviors where needed +// ************************ +void NormalModel::set_fncrit(){ + contact->Fncrit = fabs(contact->Fntot); +} + +void NormalModel::mix_coeffs(NormalModel* imodel, NormalModel* jmodel){ + for (int i = 0; i < num_coeffs; i++){ + coeffs[i] = sqrt(imodel->coeffs[i]*jmodel->coeffs[i]); + } +} + +//----------------------------------------- + +//****************** +// Hooke +//****************** +void Hooke::Hooke(ContactModel &c){ + contact = c; + num_coeffs = 2; + allocate_coeffs(); +} + +void Hooke::coeffs_to_local(){ + k_norm = coeffs[0]; + damp = coeffs[1]; +} + +double Hooke::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = k_norm * contact.area; + return contact.knfac * contact.delta; +} + + +//****************** +// Hertz +//****************** +void Hertz::Hertz(ContactModel &c, int mat_flag){ + contact = c; + material_prop_flag = mat_flag; + if (material_prop_flag){ + num_coeffs = 3; + } + else{ + num_coeffs = 2; + } + allocate_coeffs(); +} + +void Hertz::coeffs_to_local(){ + if (material_prop_flag){ + Emod = coeffs[0]; + poiss = coeffs[1]; + k_norm = 4/3*Emod; + } + else{ + k_norm = coeffs[0]; + } +} + +double Hertz::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + return contact.knfac * contact.delta; +} + +//****************** +// DMT +//****************** +void DMT::DMT(ContactModel &c){ + contact = c; + material_prop_flag = 1; + num_coeffs = 4; + allocate_coeffs(); +} + +double DMT::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + double Fne = contact.knfac * contact.delta; + F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; + Fne -= F_pulloff; + return Fne; +} + +void DMT::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); +} + +//****************** +// JKR +//****************** +void JKR::JKR(ContactModel &c){ + contact = c; + material_prop_flag = 1; + beyond_contact = 1; + num_coeffs = 4; + allocate_coeffs(); +} + +bool JKR::touch(int touch){ + double Escaled, R2, delta_pulloff, dist_pulloff; + bool touchflag; + + Escaled = k_norm * THREEQUARTERS; + if (touch) { + R2 = contact.Reff * contact.Reff; + a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); + delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); + dist_pulloff = contact.radsum - delta_pulloff; + touchflag = (contact.rsq < dist_pulloff * dist_pulloff); + } else { + touchflag = (rcontact.sq < contact.radsum * contact.radsum); + } + return touchflag; +} + +double JKR::calculate_forces(){ + double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; + + Escaled = k_norm * THREEQUARTERS; + + R2 = Reff * Reff; + dR2 = dR * dR; + t0 = cohesion * cohesion * R2 * R2 * Escaled; + t1 = PI27SQ*t0; + t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; + t3 = 4 * dR2 * Escaled; + + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / Escaled; + sqrt2 = MAX(0, 2 * dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + a = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = a * a; + Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); + F_pulloff = 3 * MY_PI * cohesion * Reff; + + knfac = Escaled * a; + return Fne; +} + +void JKR::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); +} + + + diff --git a/src/GRANULAR/heat_models.h b/src/GRANULAR/heat_models.h new file mode 100644 index 0000000000..1a2f1ddb7d --- /dev/null +++ b/src/GRANULAR/heat_models.h @@ -0,0 +1,83 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef NORMAL_CONTACT_MODELS_H_ +#define NORMAL_CONTACT_MODELS_H_ + +#include "contact.h"; +#include "sub_model.h" + +namespace Contact { + +class NormalModel:SubModel{ +public: + NormalModel(){}; + virtual ~NormalModel(){}; + virtual bool check_contact(); + virtual void prep_contact(); + virtual void set_fncrit(); + virtual double calculate_forces() = 0; + virtual void coeffs_to_local(); + virtual void mix_coeffs(NormalModel*, NormalModel*); //When mixing is needed + +private: + int beyond_contact = 0; + int allow_limit_damping = 1; + +}; + +class Hooke:NormalModel{ +public: + Hooke(ContactModel &c); + ~Hooke(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp; +}; + +class Hertz:NormalModel{ +public: + Hertz(ContactModel&, int); + ~Hertz(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss; +}; + +class DMT:NormalModel{ +public: + DMT(ContactModel &c); + ~DMT(){}; + void coeffs_to_local(); + void coeffs_to_local(NormalModel*, NormalModel*); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss, coh; +}; + +class JKR:NormalModel{ +public: + JKR(ContactModel &c); + ~JKR(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss, coh; + +}; +} + +#endif /*NORMAL_CONTACT_MODELS_H_ */ + diff --git a/src/GRANULAR/normal_contact_models.cpp b/src/GRANULAR/normal_contact_models.cpp new file mode 100644 index 0000000000..cc01a3ddb2 --- /dev/null +++ b/src/GRANULAR/normal_contact_models.cpp @@ -0,0 +1,178 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "normal_contact_models.h" +#include "math_const.h" +#include "contact.h" + +#include + +using namespace MathConst; + +namespace Contact{ + +#define PI27SQ 266.47931882941264802866 // 27*PI**2 +#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) +#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) +#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) +#define FOURTHIRDS (4.0/3.0) // 4/3 +#define ONETHIRD (1.0/3.0) // 1/3 +#define THREEQUARTERS 0.75 // 3/4 + +// ************************ +// Default behaviors where needed +// ************************ +void NormalModel::set_fncrit(){ + contact->Fncrit = fabs(contact->Fntot); +} + +void NormalModel::mix_coeffs(NormalModel* imodel, NormalModel* jmodel){ + for (int i = 0; i < num_coeffs; i++){ + coeffs[i] = sqrt(imodel->coeffs[i]*jmodel->coeffs[i]); + } +} + +//----------------------------------------- + +//****************** +// Hooke +//****************** +void Hooke::Hooke(ContactModel &c){ + num_coeffs = 2; + allocate_coeffs(); +} + +void Hooke::coeffs_to_local(){ + k_norm = coeffs[0]; + damp = coeffs[1]; +} + +double Hooke::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = k_norm * contact.area; + return contact.knfac * contact.delta; +} + + +//****************** +// Hertz +//****************** +void Hertz::Hertz(ContactModel &c, int mat_flag){ + material_prop_flag = mat_flag; + if (material_prop_flag){ + num_coeffs = 3; + } + else{ + num_coeffs = 2; + } +} + +void Hertz::coeffs_to_local(){ + if (material_prop_flag){ + Emod = coeffs[0]; + poiss = coeffs[1]; + k_norm = 4/3*Emod; + } + else{ + k_norm = coeffs[0]; + } +} + +double Hertz::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + return contact.knfac * contact.delta; +} + +//****************** +// DMT +//****************** +void DMT::DMT(ContactModel &c){ + material_prop_flag = 1; + num_coeffs = 4; +} + +double DMT::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + double Fne = contact.knfac * contact.delta; + F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; + Fne -= F_pulloff; + return Fne; +} + +void DMT::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); +} + +//****************** +// JKR +//****************** +void JKR::JKR(ContactModel &c){ + material_prop_flag = 1; + beyond_contact = 1; + num_coeffs = 4; +} + +bool JKR::touch(int touch){ + double Escaled, R2, delta_pulloff, dist_pulloff; + bool touchflag; + + Escaled = k_norm * THREEQUARTERS; + if (touch) { + R2 = contact.Reff * contact.Reff; + a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); + delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); + dist_pulloff = contact.radsum - delta_pulloff; + touchflag = (contact.rsq < dist_pulloff * dist_pulloff); + } else { + touchflag = (rcontact.sq < contact.radsum * contact.radsum); + } + return touchflag; +} + +double JKR::calculate_forces(){ + double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; + + Escaled = k_norm * THREEQUARTERS; + + R2 = Reff * Reff; + dR2 = dR * dR; + t0 = cohesion * cohesion * R2 * R2 * Escaled; + t1 = PI27SQ*t0; + t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; + t3 = 4 * dR2 * Escaled; + + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / Escaled; + sqrt2 = MAX(0, 2 * dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + a = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = a * a; + Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); + F_pulloff = 3 * MY_PI * cohesion * Reff; + + knfac = Escaled * a; + return Fne; +} + +void JKR::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); +} + + + diff --git a/src/GRANULAR/normal_contact_models.h b/src/GRANULAR/normal_contact_models.h new file mode 100644 index 0000000000..198e4bcb59 --- /dev/null +++ b/src/GRANULAR/normal_contact_models.h @@ -0,0 +1,85 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef NORMAL_CONTACT_MODELS_H_ +#define NORMAL_CONTACT_MODELS_H_ + +#include "contact.h"; +#include "sub_model.h" + +namespace Contact { + +class NormalModel:SubModel{ +public: + NormalModel(){}; + virtual ~NormalModel(){}; + virtual bool check_contact(); + virtual void prep_contact(); + virtual void set_fncrit(); + virtual double calculate_forces() = 0; + virtual void coeffs_to_local(); + virtual void mix_coeffs(NormalModel*, NormalModel*); //When mixing is needed + +private: + int size_history = 0; + int beyond_contact = 0; + int allow_limit_damping = 1; + +}; + +class Hooke:NormalModel{ +public: + Hooke(); + ~Hooke(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp; +}; + +class Hertz:NormalModel{ +public: + Hertz(int); + ~Hertz(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss; +}; + +class DMT:NormalModel{ +public: + DMT(); + ~DMT(){}; + void coeffs_to_local(); + void coeffs_to_local(NormalModel*, NormalModel*); + double calculate_forces(); +private: + double k_norm, damp, Emod, cohesion, poiss; + double F_pulloff; +}; + +class JKR:NormalModel{ +public: + JKR(); + ~JKR(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp, Emod, cohesion, poiss; + double F_pulloff; +}; +} + +#endif /*NORMAL_CONTACT_MODELS_H_ */ + diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 506cc2e175..855ed36cf0 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -81,7 +81,8 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) beyond_contact = 0; nondefault_history_transfer = 0; tangential_history_index = 0; - roll_history_index = twist_history_index = 0; + roll_history_index = 0; + twist_history_index = 0; heat_flag = 0; // create dummy fix as placeholder for FixNeighHistory @@ -234,6 +235,7 @@ void PairGranular::compute(int eflag, int vflag) models[itype][jtype].omegai = omega[i]; models[itype][jtype].omegaj = omega[j]; models[itype][jtype].history_update = historyupdate; + models[itype][jtype].history = history; models[itype][jtype].prep_contact(); if (heat_flag) { @@ -250,7 +252,11 @@ void PairGranular::compute(int eflag, int vflag) history = &allhistory[size_history*jj]; } - models[itype][jtype].calculate_forces(forces, torquesi, torquesj, history); + double *forces = models[itype][jtype].forces; + double *torquesi = models[itype][jtype].torquesi; + double *torquesj = models[itype][jtype].torquesj; + + models[itype][jtype].calculate_forces(); if (heat_flag) dq = models[itype][jtype].calculate_heat(); // apply forces & torques @@ -339,7 +345,7 @@ void PairGranular::coeff(int narg, char **arg) double conductivity_one; double cutoff_one = -1; - if (narg < 2) + if (narg < 3) error->all(FLERR,"Incorrect args for pair coefficients"); if (!allocated) allocate(); @@ -348,276 +354,66 @@ void PairGranular::coeff(int narg, char **arg) utils::bounds(FLERR,arg[0],1,atom->ntypes,ilo,ihi,error); utils::bounds(FLERR,arg[1],1,atom->ntypes,jlo,jhi,error); - //Defaults - normal_model_one = tangential_model_one = -1; - roll_model_one = ROLL_NONE; - twist_model_one = TWIST_NONE; - damping_model_one = VISCOELASTIC; - int ld_flag = 0; + //Here's one option for handing off parsing to the SubModel objects: + ContactModel model_one; + //Parse mandatory normal and tangential specifications int iarg = 2; + model_one.init_normal(arg[iarg]); + iarg += 1; + if (iarg + model_one.normal_model->num_coeffs >= narg) + error->all(FLERR,"Illegal pair_coeff command" + "Insufficient arguments provided."); + model_one.normal_model->parse_coeffs(arg, iarg); + iarg += model_one.normal_model->num_coeffs; + + if (strcmp(arg[iarg], "tangential") == 0) { + if (iarg + 1 >= narg) + error->all(FLERR,"Illegal pair_coeff command, must specify " + "tangential model after tangential keyword"); + model_one.init_tangential(arg[iarg]); + iarg += 1; + if (iarg + model_one.tangential_model->num_coeffs >= narg) + error->all(FLERR, "Illegal pair_coeff command" + "Insufficient arguments provided."); + model_one.tangential_model->parse_coeffs(arg, iarg); + iarg += model_one.tangential_model->num_coeffs; + } + else{ + error->all(FLERR, "Illegal pair_coeff command, 'tangential' keyword expected"); + } + //Parse optional arguments while (iarg < narg) { - if (strcmp(arg[iarg], "hooke") == 0) { - if (iarg + 2 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for Hooke option"); - normal_model_one = HOOKE; - normal_coeffs_one[0] = utils::numeric(FLERR,arg[iarg+1],false,lmp); // kn - normal_coeffs_one[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); // damping - iarg += 3; - } else if (strcmp(arg[iarg], "hertz") == 0) { - if (iarg + 2 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for Hertz option"); - normal_model_one = HERTZ; - normal_coeffs_one[0] = utils::numeric(FLERR,arg[iarg+1],false,lmp); // kn - normal_coeffs_one[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); // damping - iarg += 3; - } else if (strcmp(arg[iarg], "hertz/material") == 0) { - if (iarg + 3 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for Hertz/material option"); - normal_model_one = HERTZ_MATERIAL; - normal_coeffs_one[0] = utils::numeric(FLERR,arg[iarg+1],false,lmp); // E - normal_coeffs_one[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); // damping - normal_coeffs_one[2] = utils::numeric(FLERR,arg[iarg+3],false,lmp); // Poisson's ratio - iarg += 4; - } else if (strcmp(arg[iarg], "dmt") == 0) { - if (iarg + 4 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for Hertz option"); - normal_model_one = DMT; - normal_coeffs_one[0] = utils::numeric(FLERR,arg[iarg+1],false,lmp); // E - normal_coeffs_one[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); // damping - normal_coeffs_one[2] = utils::numeric(FLERR,arg[iarg+3],false,lmp); // Poisson's ratio - normal_coeffs_one[3] = utils::numeric(FLERR,arg[iarg+4],false,lmp); // cohesion - iarg += 5; - } else if (strcmp(arg[iarg], "jkr") == 0) { - if (iarg + 4 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for JKR option"); - beyond_contact = 1; - normal_model_one = JKR; - normal_coeffs_one[0] = utils::numeric(FLERR,arg[iarg+1],false,lmp); // E - normal_coeffs_one[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); // damping - normal_coeffs_one[2] = utils::numeric(FLERR,arg[iarg+3],false,lmp); // Poisson's ratio - normal_coeffs_one[3] = utils::numeric(FLERR,arg[iarg+4],false,lmp); // cohesion - iarg += 5; - } else if (strcmp(arg[iarg], "damping") == 0) { - if (iarg+1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, " - "not enough parameters provided for damping model"); - if (strcmp(arg[iarg+1], "velocity") == 0) { - damping_model_one = VELOCITY; - iarg += 1; - } else if (strcmp(arg[iarg+1], "mass_velocity") == 0) { - damping_model_one = MASS_VELOCITY; - iarg += 1; - } else if (strcmp(arg[iarg+1], "viscoelastic") == 0) { - damping_model_one = VISCOELASTIC; - iarg += 1; - } else if (strcmp(arg[iarg+1], "tsuji") == 0) { - damping_model_one = TSUJI; - iarg += 1; - } else error->all(FLERR, "Illegal pair_coeff command, " - "unrecognized damping model"); + if (strcmp(arg[iarg], "rolling") == 0) { + if (iarg + 1 >= narg) + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + model_one.init_rolling(arg[iarg+1]); iarg += 1; - } else if (strcmp(arg[iarg], "tangential") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR,"Illegal pair_coeff command, must specify " - "tangential model after tangential keyword"); - if (strcmp(arg[iarg+1], "linear_nohistory") == 0) { - if (iarg + 3 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for tangential model"); - tangential_model_one = TANGENTIAL_NOHISTORY; - tangential_coeffs_one[0] = 0; - // gammat and friction coeff - tangential_coeffs_one[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); - tangential_coeffs_one[2] = utils::numeric(FLERR,arg[iarg+3],false,lmp); - iarg += 4; - } else if ((strcmp(arg[iarg+1], "linear_history") == 0) || - (strcmp(arg[iarg+1], "mindlin") == 0) || - (strcmp(arg[iarg+1], "mindlin_rescale") == 0) || - (strcmp(arg[iarg+1], "mindlin/force") == 0) || - (strcmp(arg[iarg+1], "mindlin_rescale/force") == 0)) { - if (iarg + 4 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for tangential model"); - if (strcmp(arg[iarg+1], "linear_history") == 0) - tangential_model_one = TANGENTIAL_HISTORY; - else if (strcmp(arg[iarg+1], "mindlin") == 0) - tangential_model_one = TANGENTIAL_MINDLIN; - else if (strcmp(arg[iarg+1], "mindlin_rescale") == 0) - tangential_model_one = TANGENTIAL_MINDLIN_RESCALE; - else if (strcmp(arg[iarg+1], "mindlin/force") == 0) - tangential_model_one = TANGENTIAL_MINDLIN_FORCE; - else if (strcmp(arg[iarg+1], "mindlin_rescale/force") == 0) - tangential_model_one = TANGENTIAL_MINDLIN_RESCALE_FORCE; - tangential_history = 1; - if ((tangential_model_one == TANGENTIAL_MINDLIN || - tangential_model_one == TANGENTIAL_MINDLIN_RESCALE || - tangential_model_one == TANGENTIAL_MINDLIN_FORCE || - tangential_model_one == TANGENTIAL_MINDLIN_RESCALE_FORCE) && - (strcmp(arg[iarg+2], "NULL") == 0)) { - if (normal_model_one == HERTZ || normal_model_one == HOOKE) { - error->all(FLERR, "NULL setting for Mindlin tangential " - "stiffness requires a normal contact model that " - "specifies material properties"); - } - tangential_coeffs_one[0] = -1; - } else { - tangential_coeffs_one[0] = utils::numeric(FLERR,arg[iarg+2],false,lmp); // kt - } - // gammat and friction coeff - tangential_coeffs_one[1] = utils::numeric(FLERR,arg[iarg+3],false,lmp); - tangential_coeffs_one[2] = utils::numeric(FLERR,arg[iarg+4],false,lmp); - iarg += 5; - } else { - error->all(FLERR, "Illegal pair_coeff command, " - "tangential model not recognized"); - } - } else if (strcmp(arg[iarg], "rolling") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - if (strcmp(arg[iarg+1], "none") == 0) { - roll_model_one = ROLL_NONE; - iarg += 2; - } else if (strcmp(arg[iarg+1], "sds") == 0) { - if (iarg + 4 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for rolling model"); - roll_model_one = ROLL_SDS; - roll_history = 1; - // kR and gammaR and rolling friction coeff - roll_coeffs_one[0] = utils::numeric(FLERR,arg[iarg+2],false,lmp); - roll_coeffs_one[1] = utils::numeric(FLERR,arg[iarg+3],false,lmp); - roll_coeffs_one[2] = utils::numeric(FLERR,arg[iarg+4],false,lmp); - iarg += 5; - } else { - error->all(FLERR, "Illegal pair_coeff command, " - "rolling friction model not recognized"); - } - } else if (strcmp(arg[iarg], "twisting") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - if (strcmp(arg[iarg+1], "none") == 0) { - twist_model_one = TWIST_NONE; - iarg += 2; - } else if (strcmp(arg[iarg+1], "marshall") == 0) { - twist_model_one = TWIST_MARSHALL; - twist_history = 1; - iarg += 2; - } else if (strcmp(arg[iarg+1], "sds") == 0) { - if (iarg + 4 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for twist model"); - twist_model_one = TWIST_SDS; - twist_history = 1; - // kt and gammat and friction coeff - twist_coeffs_one[0] = utils::numeric(FLERR,arg[iarg+2],false,lmp); - twist_coeffs_one[1] = utils::numeric(FLERR,arg[iarg+3],false,lmp); - twist_coeffs_one[2] = utils::numeric(FLERR,arg[iarg+4],false,lmp); - iarg += 5; - } else { - error->all(FLERR, "Illegal pair_coeff command, " - "twisting friction model not recognized"); - } - } else if (strcmp(arg[iarg], "cutoff") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - cutoff_one = utils::numeric(FLERR,arg[iarg+1],false,lmp); - iarg += 2; + if (iarg + model_one.rolling_model->num_coeffs >= narg) + error->all(FLERR, "Illegal pair_coeff command" + "Insufficient arguments provided for rolling model."); + iarg += model_one.rolling_model->num_coeffs; + } + else if (strcmp(arg[iarg], "twisting") == 0) { + //... + } + else if (strcmp(arg[iarg], "cutoff") == 0) { + //.. } else if (strcmp(arg[iarg], "limit_damping") == 0) { - ld_flag = 1; - iarg += 1; + //.. } else if (strcmp(arg[iarg], "heat") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - conductivity_one = utils::numeric(FLERR,arg[iarg+1],false,lmp); - if (conductivity_one < 0.0) - error->all(FLERR, "Illegal pair_coeff command, conductivity must be positive"); - heat_flag = 1; - iarg += 2; + //.. } else error->all(FLERR, "Illegal pair_coeff command"); } - // error not to specify normal or tangential model - if ((normal_model_one < 0) || (tangential_model_one < 0)) - error->all(FLERR, "Illegal pair_coeff command, " - "must specify normal or tangential contact model"); + if (model_one.limit_damping && !model_one.normal_model->allow_limit_damping) + error->all(FLERR,"Illegal pair_coeff command, " + "Cannot limit damping with specified normal contact model"); int count = 0; - double damp; - if (damping_model_one == TSUJI) { - double cor; - cor = normal_coeffs_one[1]; - damp = 1.2728-4.2783*cor+11.087*square(cor)-22.348*cube(cor)+ - 27.467*powint(cor,4)-18.022*powint(cor,5)+4.8218*powint(cor,6); - } else damp = normal_coeffs_one[1]; - - if (ld_flag && normal_model_one == JKR) - error->all(FLERR,"Illegal pair_coeff command, " - "Cannot limit damping with JKR model"); - - if (ld_flag && normal_model_one == DMT) - error->all(FLERR,"Illegal pair_coeff command, " - "Cannot limit damping with DMT model"); - - double Emod, poisson; for (int i = ilo; i <= ihi; i++) { for (int j = MAX(jlo,i); j <= jhi; j++) { - - // Define normal model - models[i][j].normal_model = models[j][i].normal_model = normal_model_one; - models[i][j].damping_model = models[j][i].damping_model = damping_model_one; - models[i][j].gamma_norm = models[j][i].gamma_norm = damp; - Emod = normal_coeffs_one[0]; - poisson = normal_coeffs_one[2]; - models[i][j].Emod = models[j][i].Emod = Emod; - models[i][j].poisson = models[j][i].poisson = poisson; - - if (normal_model_one != HERTZ && normal_model_one != HOOKE) { - models[i][j].k_norm = models[j][i].k_norm = - FOURTHIRDS*mix_stiffnessE(Emod,Emod,poisson,poisson); - } else { - models[i][j].k_norm = models[j][i].k_norm = normal_coeffs_one[0]; - } - if ((normal_model_one == JKR) || (normal_model_one == DMT)) - models[i][j].cohesion = models[j][i].cohesion = normal_coeffs_one[3]; - - // Define tangential model - models[i][j].tangential_model = models[j][i].tangential_model = tangential_model_one; - if (tangential_coeffs_one[0] == -1) { - models[i][j].k_tang = models[j][i].k_tang = - 8*mix_stiffnessG(Emod, Emod, poisson, poisson); - } else { - models[i][j].k_tang = models[j][i].k_tang = tangential_coeffs_one[0]; - } - models[i][j].gamma_tang = models[j][i].gamma_tang = tangential_coeffs_one[1]; - models[i][j].mu_tang = models[j][i].mu_tang = tangential_coeffs_one[2]; - - // Define rolling model - models[i][j].roll_model = models[j][i].roll_model = roll_model_one; - if (roll_model_one != ROLL_NONE) { - models[i][j].k_roll = models[j][i].k_roll = roll_coeffs_one[0]; - models[i][j].gamma_roll = models[j][i].gamma_roll = roll_coeffs_one[1]; - models[i][j].mu_roll = models[j][i].mu_roll = roll_coeffs_one[2]; - } - - // Define twisting model - models[i][j].twist_model = models[j][i].twist_model = twist_model_one; - if (twist_model_one != TWIST_NONE && twist_model_one != TWIST_MARSHALL) { - models[i][j].k_twist = models[j][i].k_twist = twist_coeffs_one[0]; - models[i][j].gamma_twist = models[j][i].gamma_twist = twist_coeffs_one[1]; - models[i][j].mu_twist = models[j][i].mu_twist = twist_coeffs_one[2]; - } - - // Define extra options - models[i][j].cutoff_type = models[j][i].cutoff_type = cutoff_one; - models[i][j].limit_damping = models[j][i].limit_damping = ld_flag; - models[i][j].conductivity = models[j][i].conductivity = conductivity_one; - + models[i][j] = model_one; //Not sure if this works to copy? May need to specify a copy operator for ContactModel.. setflag[i][j] = 1; count++; } @@ -641,48 +437,31 @@ void PairGranular::init_style() if (comm->ghost_velocity == 0) error->all(FLERR,"Pair granular requires ghost atoms store velocity"); - // determine whether we need a granular neigh list, how large it needs to be - - use_history = normal_history || tangential_history || - roll_history || twist_history; - - // for JKR, will need fix/neigh/history to keep track of touch arrays - + size_normal_history = 0; + size_tangential_history = 0; + size_rolling_history = 0; + size_twisting_history = 0; for (int i = 1; i <= atom->ntypes; i++) - for (int j = i; j <= atom->ntypes; j++) - if (models[i][j].normal_model == JKR) use_history = 1; + for (int j = i; j <= atom->ntypes; j++){ + if (models[i][j].normal_model->history_flag || + models[i][j].tangential_model->history_flag || + models[i][j].rolling_model->history_flag || + models[i][j].twisting_model->history_flag) use_history = 1; - size_history = 3*tangential_history + 3*roll_history + twist_history; + if (models[i][j].nondefault_history_transfer) + if (models[i][j].normal_model->size_history > size_normal_history) + size_normal_history = models[i][j].normal_model->size_history; + //... + } + + size_history = size_normal_history + size_tangential_history + + size_roll_history + size_twist_history; // determine location of tangential/roll/twist histories in array - if (roll_history) { - if (tangential_history) roll_history_index = 3; - else roll_history_index = 0; - } - if (twist_history) { - if (tangential_history) { - if (roll_history) twist_history_index = 6; - else twist_history_index = 3; - } else { - if (roll_history) twist_history_index = 3; - else twist_history_index = 0; - } - } - for (int i = 1; i <= atom->ntypes; i++) - for (int j = i; j <= atom->ntypes; j++) - if (models[i][j].tangential_model == TANGENTIAL_MINDLIN_RESCALE || - models[i][j].tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) { - size_history += 1; - roll_history_index += 1; - twist_history_index += 1; - nondefault_history_transfer = 1; - history_transfer_factors = new int[size_history]; - for (int ii = 0; ii < size_history; ++ii) - history_transfer_factors[ii] = -1; - history_transfer_factors[3] = 1; - break; - } + tangential_history_index = size_normal_history; + roll_history_index = size_normal_history + size_tangential_history; + twist_history_index = size_normal_history + size_tangential_history + size_roll_history; if (use_history) neighbor->add_request(this, NeighConst::REQ_SIZE|NeighConst::REQ_HISTORY); else neighbor->add_request(this, NeighConst::REQ_SIZE); @@ -907,27 +686,9 @@ void PairGranular::write_restart(FILE *fp) for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { - fwrite(&models[i][j].normal_model,sizeof(int),1,fp); - fwrite(&models[i][j].damping_model,sizeof(int),1,fp); - fwrite(&models[i][j].tangential_model,sizeof(int),1,fp); - fwrite(&models[i][j].roll_model,sizeof(int),1,fp); - fwrite(&models[i][j].twist_model,sizeof(int),1,fp); - fwrite(&models[i][j].limit_damping,sizeof(int),1,fp); - fwrite(&models[i][j].Emod,sizeof(double),1,fp); - fwrite(&models[i][j].poisson,sizeof(double),1,fp); - fwrite(&models[i][j].k_norm,sizeof(double),1,fp); - fwrite(&models[i][j].gamma_norm,sizeof(double),1,fp); - fwrite(&models[i][j].cohesion,sizeof(double),1,fp); - fwrite(&models[i][j].k_tang,sizeof(double),1,fp); - fwrite(&models[i][j].gamma_tang,sizeof(double),1,fp); - fwrite(&models[i][j].mu_tang,sizeof(double),1,fp); - fwrite(&models[i][j].k_roll,sizeof(double),1,fp); - fwrite(&models[i][j].gamma_roll,sizeof(double),1,fp); - fwrite(&models[i][j].mu_roll,sizeof(double),1,fp); - fwrite(&models[i][j].k_twist,sizeof(double),1,fp); - fwrite(&models[i][j].gamma_twist,sizeof(double),1,fp); - fwrite(&models[i][j].mu_twist,sizeof(double),1,fp); - fwrite(&models[i][j].cutoff_type,sizeof(double),1,fp); + if (comm->me == 0){ + models[i][j].write_restart(fp); + } } } } @@ -948,12 +709,23 @@ void PairGranular::read_restart(FILE *fp) MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { if (me == 0) { - utils::sfread(FLERR,&models[i][j].normal_model,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].damping_model,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].tangential_model,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].roll_model,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].twist_model,sizeof(int),1,fp,nullptr,error); + std::string name; + utils::sfread(FLERR,&name.data(),sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].damping_model_type,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].tangential_model_type,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].roll_model_type,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&models[i][j].twist_model_type,sizeof(int),1,fp,nullptr,error); utils::sfread(FLERR,&models[i][j].limit_damping,sizeof(int),1,fp,nullptr,error); + } + MPI_Bcast(&models[i][j].normal_model_type,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].damping_model_type,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].tangential_model_type,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].roll_model_type,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].twist_model_type,1,MPI_INT,0,world); + MPI_Bcast(&models[i][j].limit_damping,1,MPI_INT,0,world); + models[i][j].init(); + models[i][j].read_restart(); + utils::sfread(FLERR,&models[i][j].k_norm,sizeof(int),1,fp,nullptr,error); utils::sfread(FLERR,&models[i][j].gamma_norm,sizeof(int),1,fp,nullptr,error); utils::sfread(FLERR,&models[i][j].cohesion,sizeof(int),1,fp,nullptr,error); @@ -1087,6 +859,7 @@ double PairGranular::single(int i, int j, int itype, int jtype, } double forces[3], torquesi[3], torquesj[3]; + models[itype][jtype].calculate_forces(forces, torquesi, torquesj, history); // apply forces & torques @@ -1185,10 +958,12 @@ double PairGranular::mix_geom(double valii, double valjj) only needed if any history entries i-j are not just negative of j-i entries ------------------------------------------------------------------------- */ -void PairGranular::transfer_history(double* source, double* target) +void PairGranular::transfer_history(double* source, double* target, int source_type, int target_type) { - for (int i = 0; i < size_history; i++) + models[itype][jtype].transfer_history(); + for (int i = 0; i < size_history; i++){ target[i] = history_transfer_factors[i]*source[i]; + } } /* ---------------------------------------------------------------------- diff --git a/src/GRANULAR/rolling_contact_models.cpp b/src/GRANULAR/rolling_contact_models.cpp new file mode 100644 index 0000000000..e6bafe4b3c --- /dev/null +++ b/src/GRANULAR/rolling_contact_models.cpp @@ -0,0 +1,185 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "normal_contact_models.h" +#include "math_const.h" +#include "contact.h" + +#include + +using namespace MathConst; + +namespace Contact{ + +#define PI27SQ 266.47931882941264802866 // 27*PI**2 +#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) +#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) +#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) +#define FOURTHIRDS (4.0/3.0) // 4/3 +#define ONETHIRD (1.0/3.0) // 1/3 +#define THREEQUARTERS 0.75 // 3/4 + +// ************************ +// Default behaviors where needed +// ************************ +void NormalModel::set_fncrit(){ + contact->Fncrit = fabs(contact->Fntot); +} + +void NormalModel::mix_coeffs(NormalModel* imodel, NormalModel* jmodel){ + for (int i = 0; i < num_coeffs; i++){ + coeffs[i] = sqrt(imodel->coeffs[i]*jmodel->coeffs[i]); + } +} + +//----------------------------------------- + +//****************** +// Hooke +//****************** +void Hooke::Hooke(ContactModel &c){ + contact = c; + num_coeffs = 2; + allocate_coeffs(); +} + +void Hooke::coeffs_to_local(){ + k_norm = coeffs[0]; + damp = coeffs[1]; +} + +double Hooke::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = k_norm * contact.area; + return contact.knfac * contact.delta; +} + + +//****************** +// Hertz +//****************** +void Hertz::Hertz(ContactModel &c, int mat_flag){ + contact = c; + material_prop_flag = mat_flag; + if (material_prop_flag){ + num_coeffs = 3; + } + else{ + num_coeffs = 2; + } + allocate_coeffs(); +} + +void Hertz::coeffs_to_local(){ + if (material_prop_flag){ + Emod = coeffs[0]; + poiss = coeffs[1]; + k_norm = 4/3*Emod; + } + else{ + k_norm = coeffs[0]; + } +} + +double Hertz::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + return contact.knfac * contact.delta; +} + +//****************** +// DMT +//****************** +void DMT::DMT(ContactModel &c){ + contact = c; + material_prop_flag = 1; + num_coeffs = 4; + allocate_coeffs(); +} + +double DMT::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + double Fne = contact.knfac * contact.delta; + F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; + Fne -= F_pulloff; + return Fne; +} + +void DMT::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); +} + +//****************** +// JKR +//****************** +void JKR::JKR(ContactModel &c){ + contact = c; + material_prop_flag = 1; + beyond_contact = 1; + num_coeffs = 4; + allocate_coeffs(); +} + +bool JKR::touch(int touch){ + double Escaled, R2, delta_pulloff, dist_pulloff; + bool touchflag; + + Escaled = k_norm * THREEQUARTERS; + if (touch) { + R2 = contact.Reff * contact.Reff; + a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); + delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); + dist_pulloff = contact.radsum - delta_pulloff; + touchflag = (contact.rsq < dist_pulloff * dist_pulloff); + } else { + touchflag = (rcontact.sq < contact.radsum * contact.radsum); + } + return touchflag; +} + +double JKR::calculate_forces(){ + double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; + + Escaled = k_norm * THREEQUARTERS; + + R2 = Reff * Reff; + dR2 = dR * dR; + t0 = cohesion * cohesion * R2 * R2 * Escaled; + t1 = PI27SQ*t0; + t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; + t3 = 4 * dR2 * Escaled; + + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / Escaled; + sqrt2 = MAX(0, 2 * dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + a = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = a * a; + Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); + F_pulloff = 3 * MY_PI * cohesion * Reff; + + knfac = Escaled * a; + return Fne; +} + +void JKR::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); +} + + + diff --git a/src/GRANULAR/rolling_contact_models.h b/src/GRANULAR/rolling_contact_models.h new file mode 100644 index 0000000000..1a2f1ddb7d --- /dev/null +++ b/src/GRANULAR/rolling_contact_models.h @@ -0,0 +1,83 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef NORMAL_CONTACT_MODELS_H_ +#define NORMAL_CONTACT_MODELS_H_ + +#include "contact.h"; +#include "sub_model.h" + +namespace Contact { + +class NormalModel:SubModel{ +public: + NormalModel(){}; + virtual ~NormalModel(){}; + virtual bool check_contact(); + virtual void prep_contact(); + virtual void set_fncrit(); + virtual double calculate_forces() = 0; + virtual void coeffs_to_local(); + virtual void mix_coeffs(NormalModel*, NormalModel*); //When mixing is needed + +private: + int beyond_contact = 0; + int allow_limit_damping = 1; + +}; + +class Hooke:NormalModel{ +public: + Hooke(ContactModel &c); + ~Hooke(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp; +}; + +class Hertz:NormalModel{ +public: + Hertz(ContactModel&, int); + ~Hertz(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss; +}; + +class DMT:NormalModel{ +public: + DMT(ContactModel &c); + ~DMT(){}; + void coeffs_to_local(); + void coeffs_to_local(NormalModel*, NormalModel*); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss, coh; +}; + +class JKR:NormalModel{ +public: + JKR(ContactModel &c); + ~JKR(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss, coh; + +}; +} + +#endif /*NORMAL_CONTACT_MODELS_H_ */ + diff --git a/src/GRANULAR/sub_model.cpp b/src/GRANULAR/sub_model.cpp new file mode 100644 index 0000000000..e5ace9885e --- /dev/null +++ b/src/GRANULAR/sub_model.cpp @@ -0,0 +1,76 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- + + This class contains a series of tools for DEM contacts + Multiple models can be defined and used to calculate forces + and torques based on contact geometry +*/ +#include "sub_model.h" +#include "pointers.h" +#include "utils.h" +#include "error.h" +#include "comm.h" + +using namespace LAMMPS_NS; + +namespace Contact{ + +SubModel::SubModel(){ + allocated = 0; +} +SubModel::~SubModel(){ + if (allocated) delete [] coeffs; +} + +void SubModel::allocate_coeffs(){ + allocated = 1; + coeffs = new double[num_coeffs]; +} + +void SubModel::parse_coeffs(char **arg, int iarg){ + for (int i = 0; i < num_coeffs; i++){ + coeffs[i] = utils::numeric(FLERR,arg[iarg+i+1],false,lmp); + } + coeffs_to_local(); +} + +void SubModel::write_restart(FILE *fp){ + fwrite(&model_name.length(),sizeof(int),1,fp); + fwrite(model_name.data(),sizeof(char),model_name.length(),fp); + fwrite(&num_coeffs,sizeof(int),1,fp); + fwrite(coeffs,sizeof(int),num_coeffs,fp); +} + +void SubModel::read_restart(FILE *fp, int num_char){ + if (comm->me == 0){ + utils::sfread(FLERR,&num_coeffs,sizeof(int),1,fp,nullptr,error); + } + MPI_BCast(const_cast(model_name.data()), num_char, MPI_CHAR, world); + allocate_coeffs(); +} + +void SubModel::read_restart(FILE *fp){ + int num_char; + if (me == 0){ + utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); + } + MPI_BCast(&num_char, 1, MPI_INT, 0, world); + read_restart(fp, num_char); +} + + + + +} + diff --git a/src/GRANULAR/sub_model.h b/src/GRANULAR/sub_model.h new file mode 100644 index 0000000000..2d3261238b --- /dev/null +++ b/src/GRANULAR/sub_model.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef GRANULAR_SUB_MODEL_H_ +#define GRANULAR_SUB_MODEL_H_ + +#include "contact.h" + +using namespace LAMMPS_NS; + +namespace Contact{ + +class SubModel : Pointers{ + SubModel(){}; + virtual ~SubModel(); +public: + int num_coeffs; + double *coeffs; + virtual double calculate_forces() = 0; + void read_restart(); + virtual void parse_coeffs(char **, int); + void write_restart(FILE*); + void read_restart(FILE*); + void read_restart(FILE*, int); + virtual void coeffs_to_local(); + void allocate_coeffs(); + std::string model_name; +private: + ContactModel &contact; + int allocated; + int material_prop_flag = 0; + int size_history; + +}; + +} + +#endif /* GRANULAR_SUB_MODEL_H_ */ diff --git a/src/GRANULAR/tangential_contact_models.cpp b/src/GRANULAR/tangential_contact_models.cpp new file mode 100644 index 0000000000..ff59ceabb7 --- /dev/null +++ b/src/GRANULAR/tangential_contact_models.cpp @@ -0,0 +1,168 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "tangential_contact_models.h" +#include "math_const.h" +#include "contact.h" + +#include + +using namespace MathConst; + +namespace Contact{ + +// ************************ +// Default behaviors where needed +// ************************ + +//----------------------------------------- + +//****************** +// Hooke +//****************** +void LinearNohistory::calculate_forces(){ + contact = c; + num_coeffs = 2; + allocate_coeffs(); +} + +void Hooke::coeffs_to_local(){ + k_norm = coeffs[0]; + damp = coeffs[1]; +} + +double Hooke::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = k_norm * contact.area; + return contact.knfac * contact.delta; +} + + +//****************** +// Hertz +//****************** +void Hertz::Hertz(ContactModel &c, int mat_flag){ + contact = c; + material_prop_flag = mat_flag; + if (material_prop_flag){ + num_coeffs = 3; + } + else{ + num_coeffs = 2; + } + allocate_coeffs(); +} + +void Hertz::coeffs_to_local(){ + if (material_prop_flag){ + Emod = coeffs[0]; + poiss = coeffs[1]; + k_norm = 4/3*Emod; + } + else{ + k_norm = coeffs[0]; + } +} + +double Hertz::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + return contact.knfac * contact.delta; +} + +//****************** +// DMT +//****************** +void DMT::DMT(ContactModel &c){ + contact = c; + material_prop_flag = 1; + num_coeffs = 4; + allocate_coeffs(); +} + +double DMT::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + double Fne = contact.knfac * contact.delta; + F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; + Fne -= F_pulloff; + return Fne; +} + +void DMT::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); +} + +//****************** +// JKR +//****************** +void JKR::JKR(ContactModel &c){ + contact = c; + material_prop_flag = 1; + beyond_contact = 1; + num_coeffs = 4; + allocate_coeffs(); +} + +bool JKR::touch(int touch){ + double Escaled, R2, delta_pulloff, dist_pulloff; + bool touchflag; + + Escaled = k_norm * THREEQUARTERS; + if (touch) { + R2 = contact.Reff * contact.Reff; + a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); + delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); + dist_pulloff = contact.radsum - delta_pulloff; + touchflag = (contact.rsq < dist_pulloff * dist_pulloff); + } else { + touchflag = (rcontact.sq < contact.radsum * contact.radsum); + } + return touchflag; +} + +double JKR::calculate_forces(){ + double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; + + Escaled = k_norm * THREEQUARTERS; + + R2 = Reff * Reff; + dR2 = dR * dR; + t0 = cohesion * cohesion * R2 * R2 * Escaled; + t1 = PI27SQ*t0; + t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; + t3 = 4 * dR2 * Escaled; + + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / Escaled; + sqrt2 = MAX(0, 2 * dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + a = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = a * a; + Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); + F_pulloff = 3 * MY_PI * cohesion * Reff; + + knfac = Escaled * a; + return Fne; +} + +void JKR::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); +} + + + diff --git a/src/GRANULAR/tangential_contact_models.h b/src/GRANULAR/tangential_contact_models.h new file mode 100644 index 0000000000..207d129e7c --- /dev/null +++ b/src/GRANULAR/tangential_contact_models.h @@ -0,0 +1,79 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef TANGENTIAL_CONTACT_MODELS_H_ +#define TANGENTIAL_CONTACT_MODELS_H_ + +#include "contact.h"; +#include "sub_model.h" + +namespace Contact { + +class TangentialModel:SubModel{ +public: + TangentialModel(){}; + virtual ~TangentialModel(){}; + virtual double calculate_forces() = 0; + virtual void coeffs_to_local(); + virtual void mix_coeffs(TangentialModel*, TangentialModel*); //When mixing is needed + int rescale_flag = 0; +private: + int beyond_contact = 0; + int allow_limit_damping = 1; + +}; + +class LinearNohistory:TangentialModel{ +public: + double calculate_forces(); +private: + void allocate_coeffs(); + double k_t, damp; +}; + +class LinearHistory:TangentialModel{ +public: + LinearHistory(){} + ~LinearHistory(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss; +}; + +class Mindlin:TangentialModel{ +public: + Mindlin(int); + ~Mindlin(){}; + void coeffs_to_local(); + void coeffs_to_local(TangentialModel*, TangentialModel*); + double calculate_forces(); +private: + + double k_norm, damp, Emod, poiss, coh; +}; + +class MindlinForce:TangentialModel{ +public: + JKR(ContactModel &c); + ~JKR(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss, coh; + +}; +} + +#endif /*TANGENTIAL_CONTACT_MODELS_H_ */ + diff --git a/src/GRANULAR/twisting_contact_models.cpp b/src/GRANULAR/twisting_contact_models.cpp new file mode 100644 index 0000000000..e6bafe4b3c --- /dev/null +++ b/src/GRANULAR/twisting_contact_models.cpp @@ -0,0 +1,185 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "normal_contact_models.h" +#include "math_const.h" +#include "contact.h" + +#include + +using namespace MathConst; + +namespace Contact{ + +#define PI27SQ 266.47931882941264802866 // 27*PI**2 +#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) +#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) +#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) +#define FOURTHIRDS (4.0/3.0) // 4/3 +#define ONETHIRD (1.0/3.0) // 1/3 +#define THREEQUARTERS 0.75 // 3/4 + +// ************************ +// Default behaviors where needed +// ************************ +void NormalModel::set_fncrit(){ + contact->Fncrit = fabs(contact->Fntot); +} + +void NormalModel::mix_coeffs(NormalModel* imodel, NormalModel* jmodel){ + for (int i = 0; i < num_coeffs; i++){ + coeffs[i] = sqrt(imodel->coeffs[i]*jmodel->coeffs[i]); + } +} + +//----------------------------------------- + +//****************** +// Hooke +//****************** +void Hooke::Hooke(ContactModel &c){ + contact = c; + num_coeffs = 2; + allocate_coeffs(); +} + +void Hooke::coeffs_to_local(){ + k_norm = coeffs[0]; + damp = coeffs[1]; +} + +double Hooke::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = k_norm * contact.area; + return contact.knfac * contact.delta; +} + + +//****************** +// Hertz +//****************** +void Hertz::Hertz(ContactModel &c, int mat_flag){ + contact = c; + material_prop_flag = mat_flag; + if (material_prop_flag){ + num_coeffs = 3; + } + else{ + num_coeffs = 2; + } + allocate_coeffs(); +} + +void Hertz::coeffs_to_local(){ + if (material_prop_flag){ + Emod = coeffs[0]; + poiss = coeffs[1]; + k_norm = 4/3*Emod; + } + else{ + k_norm = coeffs[0]; + } +} + +double Hertz::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + return contact.knfac * contact.delta; +} + +//****************** +// DMT +//****************** +void DMT::DMT(ContactModel &c){ + contact = c; + material_prop_flag = 1; + num_coeffs = 4; + allocate_coeffs(); +} + +double DMT::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + double Fne = contact.knfac * contact.delta; + F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; + Fne -= F_pulloff; + return Fne; +} + +void DMT::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); +} + +//****************** +// JKR +//****************** +void JKR::JKR(ContactModel &c){ + contact = c; + material_prop_flag = 1; + beyond_contact = 1; + num_coeffs = 4; + allocate_coeffs(); +} + +bool JKR::touch(int touch){ + double Escaled, R2, delta_pulloff, dist_pulloff; + bool touchflag; + + Escaled = k_norm * THREEQUARTERS; + if (touch) { + R2 = contact.Reff * contact.Reff; + a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); + delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); + dist_pulloff = contact.radsum - delta_pulloff; + touchflag = (contact.rsq < dist_pulloff * dist_pulloff); + } else { + touchflag = (rcontact.sq < contact.radsum * contact.radsum); + } + return touchflag; +} + +double JKR::calculate_forces(){ + double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; + + Escaled = k_norm * THREEQUARTERS; + + R2 = Reff * Reff; + dR2 = dR * dR; + t0 = cohesion * cohesion * R2 * R2 * Escaled; + t1 = PI27SQ*t0; + t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; + t3 = 4 * dR2 * Escaled; + + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / Escaled; + sqrt2 = MAX(0, 2 * dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + a = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = a * a; + Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); + F_pulloff = 3 * MY_PI * cohesion * Reff; + + knfac = Escaled * a; + return Fne; +} + +void JKR::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); +} + + + diff --git a/src/GRANULAR/twisting_contact_models.h b/src/GRANULAR/twisting_contact_models.h new file mode 100644 index 0000000000..1a2f1ddb7d --- /dev/null +++ b/src/GRANULAR/twisting_contact_models.h @@ -0,0 +1,83 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef NORMAL_CONTACT_MODELS_H_ +#define NORMAL_CONTACT_MODELS_H_ + +#include "contact.h"; +#include "sub_model.h" + +namespace Contact { + +class NormalModel:SubModel{ +public: + NormalModel(){}; + virtual ~NormalModel(){}; + virtual bool check_contact(); + virtual void prep_contact(); + virtual void set_fncrit(); + virtual double calculate_forces() = 0; + virtual void coeffs_to_local(); + virtual void mix_coeffs(NormalModel*, NormalModel*); //When mixing is needed + +private: + int beyond_contact = 0; + int allow_limit_damping = 1; + +}; + +class Hooke:NormalModel{ +public: + Hooke(ContactModel &c); + ~Hooke(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp; +}; + +class Hertz:NormalModel{ +public: + Hertz(ContactModel&, int); + ~Hertz(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss; +}; + +class DMT:NormalModel{ +public: + DMT(ContactModel &c); + ~DMT(){}; + void coeffs_to_local(); + void coeffs_to_local(NormalModel*, NormalModel*); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss, coh; +}; + +class JKR:NormalModel{ +public: + JKR(ContactModel &c); + ~JKR(){}; + void coeffs_to_local(); + double calculate_forces(); +private: + double k_norm, damp, Emod, poiss, coh; + +}; +} + +#endif /*NORMAL_CONTACT_MODELS_H_ */ + From 6a1a06d76cd93dfe49caca16f708a3ddc0d620ed Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 15 Jul 2022 12:30:30 -0600 Subject: [PATCH 012/445] Take 2 --- src/.gitignore | 14 + src/GRANULAR/contact.cpp | 461 ++++-------------- src/GRANULAR/contact.h | 42 +- ..._models.cpp => contact_damping_models.cpp} | 0 ...tact_models.h => contact_damping_models.h} | 0 ...eat_models.cpp => contact_heat_models.cpp} | 0 .../{heat_models.h => contact_heat_models.h} | 0 ...t_models.cpp => contact_normal_models.cpp} | 108 ++-- ...ntact_models.h => contact_normal_models.h} | 1 + ..._models.cpp => contact_rolling_models.cpp} | 64 +++ ...tact_models.h => contact_rolling_models.h} | 0 .../{sub_model.cpp => contact_sub_models.cpp} | 29 +- .../{sub_model.h => contact_sub_models.h} | 5 +- src/GRANULAR/contact_tangential_models.cpp | 324 ++++++++++++ ...t_models.h => contact_tangential_models.h} | 0 ...models.cpp => contact_twisting_models.cpp} | 31 ++ ...act_models.h => contact_twisting_models.h} | 0 src/GRANULAR/pair_granular.cpp | 397 +++++++-------- src/GRANULAR/pair_granular.h | 5 +- src/GRANULAR/tangential_contact_models.cpp | 168 ------- 20 files changed, 817 insertions(+), 832 deletions(-) rename src/GRANULAR/{damping_contact_models.cpp => contact_damping_models.cpp} (100%) rename src/GRANULAR/{damping_contact_models.h => contact_damping_models.h} (100%) rename src/GRANULAR/{heat_models.cpp => contact_heat_models.cpp} (100%) rename src/GRANULAR/{heat_models.h => contact_heat_models.h} (100%) rename src/GRANULAR/{normal_contact_models.cpp => contact_normal_models.cpp} (63%) rename src/GRANULAR/{normal_contact_models.h => contact_normal_models.h} (97%) rename src/GRANULAR/{twisting_contact_models.cpp => contact_rolling_models.cpp} (73%) rename src/GRANULAR/{rolling_contact_models.h => contact_rolling_models.h} (100%) rename src/GRANULAR/{sub_model.cpp => contact_sub_models.cpp} (80%) rename src/GRANULAR/{sub_model.h => contact_sub_models.h} (93%) create mode 100644 src/GRANULAR/contact_tangential_models.cpp rename src/GRANULAR/{tangential_contact_models.h => contact_tangential_models.h} (100%) rename src/GRANULAR/{rolling_contact_models.cpp => contact_twisting_models.cpp} (82%) rename src/GRANULAR/{twisting_contact_models.h => contact_twisting_models.h} (100%) delete mode 100644 src/GRANULAR/tangential_contact_models.cpp diff --git a/src/.gitignore b/src/.gitignore index a1aee630b5..07230a10b4 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1474,6 +1474,20 @@ /compute_xrd_consts.h /contact.cpp /contact.h +/contact_normal_models.cpp +/contact_normal_models.h +/contact_damping_models.cpp +/contact_damping_models.h +/contact_tangential_models.cpp +/contact_tangential_models.h +/contact_twisting_models.cpp +/contact_twisting_models.h +/contact_rolling_models.cpp +/contact_rolling_models.h +/contact_heat_models.cpp +/contact_heat_models.h +/contact_sub_models.cpp +/contact_sub_models.h /fix_atom_swap.cpp /fix_atom_swap.h /fix_ave_spatial_sphere.cpp diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index 554a54eec9..693721fe22 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -32,9 +32,12 @@ using namespace MathConst; namespace Contact { +enum {NORMAL, TANGENTIAL, DAMPING, ROLLING, TWISTING, HEAT} + ContactModel::ContactModel() { limit_damping = 0; + beyond_contact = 0; cutoff_type = 0.0; normal_model = nullptr; tangential_model = nullptr; @@ -42,115 +45,114 @@ ContactModel::ContactModel() rolling_model = nullptr; twisting_model = nullptr; reset_contact(); + + sub_models = {nullptr}; } /* ---------------------------------------------------------------------- */ -void ContactModel::init_normal(char *model_name){ - if (strcmp(model_name, "hooke") == 0) normal_model = new Hooke(); - else if (strcmp(model_name, "hertz") == 0) normal_model = new Hertz(0); - else if (strcmp(model_name, "hertz/material") == 0) normal_model = new Hertz(1); - //... - else error->all(FLERR, "Normal model name not recognized"); - normal_model->model_name.assign(model_name); - normal_model->contact = *this; - normal_model->allocate_coeffs(); +void ContactModel::init_model(char *model_name, int model_type) +{ + if (model_type == NORMAL) { + if (strcmp(model_name, "hooke") == 0) normal_model = new Hooke(); + else if (strcmp(model_name, "hertz") == 0) normal_model = new Hertz(0); + else if (strcmp(model_name, "hertz/material") == 0) normal_model = new Hertz(1); + //... + else error->all(FLERR, "Normal model name not recognized"); + sub_models[model_type] = &normal_model; + + } else if (model_type == TANGENTIAL) { + if (strcmp(model_name, "linear") == 0) tangential_model = new LinearNoHistory(); + //... + else error->all(FLERR, "Tangential model name not recognized"); + sub_models[model_type] = &tangential_model; + + } else if (model_type == DAMPING) { + if (strcmp(model_name, "linear") == 0) damping_model = new LinearNoHistory(); + //... + else error->all(FLERR, "Damping model name not recognized"); + sub_models[model_type] = &damping_model; + + } else if (model_type == ROLLING) { + if (strcmp(model_name, "linear") == 0) rolling_model = new LinearNoHistory(); + //... + else error->all(FLERR, "Rolling model name not recognized"); + sub_models[model_type] = &rolling_model; + + } else if (model_type == TWISTING) { + if (strcmp(model_name, "linear") == 0) twisting_model = new LinearNoHistory(); + //... + else error->all(FLERR, "Twisting model name not recognized"); + sub_models[model_type] = &twisting_model; + + } else if (model_type == HEAT) { + if (strcmp(model_name, "linear") == 0) heat_model = new LinearNoHistory(); + //... + else error->all(FLERR, "Heat model name not recognized"); + sub_models[model_type] = &heat_model; + } + + sub_models[model_type]->model_name.assign(model_name); + sub_models[model_type]->contact = *this; + sub_models[model_type]->allocate_coeffs(); } /* ---------------------------------------------------------------------- */ -void ContactModel::init_damping(char *model_name){ - if (strcmp(model_name, "velocity") == 0) tangential_model = new Velocity(*this); - //... - else error->all(FLERR, "Damping model name not recognized"); - tangential_model->model_name.assign(model_name); - tangential_model->contact = *this; - tangential_model->allocate_coeffs(); + +void ContactModel::mix_coeffs(ContactModel *c1, ContactModel *c2) +{ + for (int i = 0; i < 5; i++) + sum_model[i]->mix_coeffs(c1->submodel[i], c2->submodel[i]); + + limit_damping = MAX(c1->limit_damping, c2->limit_damping); + cutoff_type = MAX(c1->cutoff_type, c2->cutoff_type); } /* ---------------------------------------------------------------------- */ -void ContactModel::init_tangential(char *model_name){ - if (strcmp(model_name, "linear") == 0) tangential_model = new LinearNohistory(*this); - //... - else error->all(FLERR, "Tangential model name not recognized"); - damping_model->model_name.assign(model_name); - damping_model->contact = *this; - damping_model->allocate_coeffs(); -} +void ContactModel::write_restart(FILE *fp) +{ + int num_char = -1; + + for (int i = 0; i < 5; i++) { + if (sub_models[i]) { + sub_models[i]->write_restart(fp); + } else { + fwrite(&num_char, sizeof(int), 1, fp); + } + } +} /* ---------------------------------------------------------------------- */ -// .... same for rolling, twisting - -void ContactModel::write_restart(FILE *fp){ - normal_model->write_restart(fp); - tangential_model->write_restart(fp); - damping_model->write_restart(fp); - if (rolling_model){ - rolling_model->write_restart(fp); - } - else{ - int num_char = -1; - fwrite(&num_char, sizeof(int), 1, fp); - } - if (twisting_model){ - twisting_model->write_restart(fp); - } - else{ - int num_char = -1; - fwrite(&num_char, sizeof(int), 1, fp); - } -} - -void ContactModel::read_restart(FILE *fp){ +void ContactModel::read_restart(FILE *fp) +{ int num_char; - //Normal model - if (comm->me == 0){ - utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); - } - MPI_BCast(&num_char, 1, MPI_INT, 0, world); - std::string model_name(num_char); - if (comm->me == 0){ - utils::sfread(FLERR,const_cast(model_name.data()),sizeof(char),num_char,fp,nullptr,error); - } - MPI_BCast(const_cast(model_name.data()), num_char, MPI_CHAR, world); - init_normal(const_cast(model_name.data())); - normal_model->read_restart(); - //Tangential model - if (comm->me == 0){ - utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); - } - MPI_BCast(&num_char, 1, MPI_INT, 0, world); - std::string model_name(num_char); - if (comm->me == 0){ - utils::sfread(FLERR,const_cast(model_name.data()),sizeof(char),num_char,fp,nullptr,error); - } - init_tangential(const_cast(model_name.data())); - tangential_model->read_restart(); + for (int i = 0; i < 5; i++) { + if (comm->me == 0) + utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); + MPI_BCast(&num_char, 1, MPI_INT, 0, world); - //Damping - if (comm->me == 0){ - utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); - } - MPI_BCast(&num_char, 1, MPI_INT, 0, world); - std::string model_name(num_char); - if (comm->me == 0){ - utils::sfread(FLERR,const_cast(model_name.data()),sizeof(char),num_char,fp,nullptr,error); - } - init_tangential(const_cast(model_name.data())); - damping_model->read_restart(); - - //Optional (rolling, twisting) - only if num_char is > 0. + if (num_char != -1) { + std::string model_name(num_char); + if (comm->me == 0) + utils::sfread(FLERR,const_cast(model_name.data()),sizeof(char),num_char,fp,nullptr, error); + MPI_BCast(const_cast(model_name.data()), num_char, MPI_CHAR, world); + init_model(const_cast(model_name.data(), i)); + sub_models[i]->read_restart(); + } + } } /* ---------------------------------------------------------------------- */ void ContactModel::reset_contact() { - radi = radj = 0.0; + radi = radj = Fntot = Fncrit = magtortwist = 0.0; xi = xj = vi = vj = omegai = omegaj = nullptr; + forces = torquesi = torquesj = history = nullptr; prep_flag = check_flag = 0; touch = false; @@ -165,10 +167,10 @@ bool ContactModel::check_contact() sub3(xi, xj, dx); rsq = lensq3(dx); radsum = radi + radj; - Reff = radi*radj/radsum; + Reff = radi * radj / radsum; touch = false; - if (normal_model->beyond_contact) normal_model->touch(touch); + if (normal_model.beyond_contact) normal_model.touch(touch); else touch = (rsq < radsum*radsum); return touch; @@ -213,7 +215,7 @@ void ContactModel::prep_contact() if (roll_model || twist_model) sub3(omegai, omegaj, relrot); - if (roll_model) { + if (rolling_model) { // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) // this is different from the Marshall papers, which use the Bagi/Kuhn formulation // for rolling velocity (see Wang et al for why the latter is wrong) @@ -222,7 +224,7 @@ void ContactModel::prep_contact() vrl[2] = Reff * (relrot[0] * nx[1] - relrot[1] * nx[0]); } - if (twist_model) { + if (twisting_model) { // omega_T (eq 29 of Marshall) magtwist = dot3(relrot, nx); } @@ -244,16 +246,16 @@ void ContactModel::calculate_forces() //********************************************** double Fne, Fdamp; - Fne = normal_model->calculate_forces(); - Fdamp = damping_model->calculate_forces(); + Fne = normal_model.calculate_forces(); + Fdamp = damping_model.calculate_forces(); Fntot = Fne + Fdamp; if (limit_damping && Fntot < 0.0) Fntot = 0.0; - normal_model->set_fncrit(); + normal_model.set_fncrit(); - tangential_model->calculate_forces(); - if (roll_model) roll_model->calculate_forces(); - if (twist_model) twist_model->calculate_forces(); + tangential_model.calculate_forces(); + if (rolling_model) rolling_model.calculate_forces(); + if (twisting_model) twisting_model.calculate_forces(); //********************************************** // sum contributions @@ -272,7 +274,7 @@ void ContactModel::calculate_forces() scale3(dist_to_contact, torquesj); double torroll[3]; - if (roll_model) { + if (rolling_model) { cross3(nx, fr, torroll); scale3(Reff, torroll); add3(torquesi, torroll, torquesi); @@ -280,7 +282,7 @@ void ContactModel::calculate_forces() } double tortwist[3]; - if (twist_model) { + if (twisting_model) { scale3(magtortwist, nx, tortwist); add3(torquesi, tortwist, torquesi); sub3(torquesj, tortwist, torquesj); @@ -291,262 +293,7 @@ void ContactModel::calculate_forces() double ContactModel::calculate_heat() { - double dT = Ti - Tj; - return conductivity * a * dT; -} - -/* ---------------------------------------------------------------------- */ - - - -/* ---------------------------------------------------------------------- */ - -void ContactModel::tangential_no_history() -{ - double gamma_scaled = gamma_tang * damp_normal_prefactor; - double fsmag, Ft; - - // classic pair gran/hooke (no history) - fsmag = gamma_scaled * vrel; - if (vrel != 0.0) Ft = MIN(Fscrit,fsmag) / vrel; - else Ft = 0.0; - - Ft = -Ft; - scale3(Ft, vtr, fs); -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::tangential_history(double *history) -{ - double gamma_scaled = gamma_tang * damp_normal_prefactor; - double k = k_tang; - int frame_update = 0; - double magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; - - // rotate and update displacements / force. - // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (history_update) { - rsht = dot3(history, nx); - frame_update = fabs(rsht) * k > EPSILON * Fscrit; - - if (frame_update) { - shrmag = len3(history); - // projection - scale3(rsht, nx, history); - // also rescale to preserve magnitude - prjmag = len3(history); - if (prjmag > 0) temp_dbl = shrmag / prjmag; - else temp_dbl = 0; - scale3(temp_dbl, history); - } - - // update history - // tangential force - // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - temp_dbl = k * dt; - scale3(temp_dbl, vtr, temp_array); - sub3(history, temp_array, history); - } - - // tangential forces = history + tangential velocity damping - temp_dbl = -gamma_norm; - scale3(temp_dbl, vtr, fs); - - // rescale frictional displacements and forces if needed - magfs = len3(fs); - if (magfs > Fscrit) { - shrmag = len3(history); - if (shrmag != 0.0) { - temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs, history); - scale3(gamma_norm, vtr, temp_array); - add3(history, temp_array, history); - temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs); - } else { - zero3(fs); - } - } -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::tangential_mindlin(double *history) -{ - double k_scaled, gamma_scaled, magfs, rsht, shrmag, prjmag, temp_dbl; - double temp_array[3]; - int frame_update = 0; - - gamma_scaled = gamma_tang * damp_normal_prefactor; - k_scaled = k_tang * a; - if (mindlin_rescale) { - // on unloading, rescale the shear displacements/force - if (a < history[3]) { - temp_dbl = a / history[3]; - scale3(temp_dbl, history); - } - } - - // rotate and update displacements / force. - // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (history_update) { - rsht = dot3(history, nx); - if (mindlin_force) - frame_update = fabs(rsht) > EPSILON * Fscrit; - else - frame_update = fabs(rsht) * k_scaled > EPSILON * Fscrit; - - if (frame_update) { - shrmag = len3(history); - // projection - scale3(rsht, nx, history); - // also rescale to preserve magnitude - prjmag = len3(history); - if (prjmag > 0) temp_dbl = shrmag / prjmag; - else temp_dbl = 0; - scale3(temp_dbl, history); - } - - // update history - if (mindlin_force) { - // tangential force - // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - temp_dbl = -k_scaled * dt; - scale3(temp_dbl, vtr, temp_array); - } else { - scale3(dt, vtr, temp_array); - } - add3(history, temp_array, history); - - if (mindlin_rescale) history[3] = a; - } - - // tangential forces = history + tangential velocity damping - temp_dbl = -gamma_scaled; - scale3(temp_dbl, vtr, fs); - - if (! mindlin_force) { - scale3(k_scaled, history, temp_array); - add3(fs, temp_array, fs); - } - - // rescale frictional displacements and forces if needed - magfs = len3(fs); - if (magfs > Fscrit) { - shrmag = len3(history); - if (shrmag != 0.0) { - temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs, history); - scale3(gamma_tang, vtr, temp_array); - add3(history, temp_array, history); - if (! mindlin_force) { - temp_dbl = -1.0 / k_tang; - scale3(temp_dbl, history); - } - temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs); - } else { - zero3(fs); - } - } -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::rolling(double *history) -{ - int rhist0, rhist1, rhist2, frameupdate; - double rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_dbl, temp_array[3]; - - rhist0 = roll_history_index; - rhist1 = rhist0 + 1; - rhist2 = rhist1 + 1; - - Frcrit = mu_roll * Fncrit; - - if (history_update) { - hist_temp[0] = history[rhist0]; - hist_temp[1] = history[rhist1]; - hist_temp[2] = history[rhist2]; - rolldotn = dot3(hist_temp, nx); - - frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit; - if (frameupdate) { // rotate into tangential plane - rollmag = len3(hist_temp); - // projection - temp_dbl = -rolldotn; - scale3(temp_dbl, nx, temp_array); - sub3(hist_temp, temp_array, hist_temp); - - // also rescale to preserve magnitude - prjmag = len3(hist_temp); - if (prjmag > 0) temp_dbl = rollmag / prjmag; - else temp_dbl = 0; - scale3(temp_dbl, hist_temp); - } - scale3(dt, vrl, temp_array); - add3(hist_temp, temp_array, hist_temp); - } - - scaleadd3(k_roll, hist_temp, gamma_roll, vrl, fr); - negate3(fr); - - // rescale frictional displacements and forces if needed - - magfr = len3(fr); - if (magfr > Frcrit) { - rollmag = len3(hist_temp); - if (rollmag != 0.0) { - temp_dbl = -Frcrit / (magfr * k_roll); - scale3(temp_dbl, fr, temp_array); - add3(hist_temp, temp_array, hist_temp); - - temp_dbl = -gamma_roll/k_roll; - scale3(temp_dbl, vrl, temp_array); - add3(hist_temp, temp_array, hist_temp); - - temp_dbl = Frcrit / magfr; - scale3(temp_dbl, fr); - } else { - zero3(fr); - } - } - - history[rhist0] = hist_temp[0]; - history[rhist1] = hist_temp[1]; - history[rhist2] = hist_temp[2]; -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::twisting_marshall(double *history) -{ - // Overwrite twist coefficients with derived values - k_twist = 0.5 * k_tang * a * a; // eq 32 of Marshall paper - gamma_twist = 0.5 * gamma_tang * a * a; - mu_twist = TWOTHIRDS * a * mu_tang; - - twisting_SDS(history); -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::twisting_SDS(double *history) -{ - double signtwist, Mtcrit; - - if (history_update) { - history[twist_history_index] += magtwist * dt; - } - - magtortwist = -k_twist * history[twist_history_index] - gamma_twist*magtwist; // M_t torque (eq 30) - signtwist = (magtwist > 0) - (magtwist < 0); - Mtcrit = mu_twist * Fncrit; // critical torque (eq 44) - if (fabs(magtortwist) > Mtcrit) { - history[twist_history_index] = (Mtcrit * signtwist - gamma_twist * magtwist) / k_twist; - magtortwist = -Mtcrit * signtwist; // eq 34 - } + return heat_model.calculate_heat(); } /* ---------------------------------------------------------------------- @@ -556,15 +303,7 @@ void ContactModel::twisting_SDS(double *history) double ContactModel::pulloff_distance(double radi, double radj) { - double Ecaled, a_tmp, Reff_tmp; - - if (normal_model != JKR) return radi+radj; - - Reff_tmp = radi * radj / (radi + radj); - if (Reff_tmp <= 0) return 0; - Ecaled = k_norm * THREEQUARTERS; - a_tmp = cbrt(9 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4 * Ecaled)); - return a_tmp * a_tmp / Reff_tmp - 2 * sqrt(MY_PI * cohesion * a_tmp / Ecaled); + return normal_model.pulloff_distance(radi, radj); } } diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index cb6d1865af..8883ecb08e 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -39,36 +39,35 @@ public: double calculate_heat(); double pulloff_distance(double, double); - void init_normal(char*); - void init_tangential(char*); - void init_damping(char*); - void init_rolling(char*); - void init_twisting(char*); - void init_heat(char*); + void init_model(char*, int); + + void mix_coeffs(ContactModel*, ContactModel*); void write_restart(FILE *); void read_restart(FILE *); - NormalModel *normal_model; - DampingModel *damping_model; //Classes below need .h and .cpp files analogous to normal_contact_models.h/.cpp - TangentialModel *tangential_model; - RollingModel *rolling_model; - TwistingModel *twisting_model; - HeatModel *heat_model; + // Sub models + NormalModel normal_model; + DampingModel damping_model; + TangentialModel tangential_model; + RollingModel rolling_model; + TwistingModel twisting_model; + HeatModel heat_model; + SubModel *sub_models[6]; // Need to resize if we add more model flavors - double *forces; - double *torquesi; - double *torquesj; + // Extra options + int beyond_contact, limit_damping; + double cutoff_type; + + // Contact properties/output + double *forces, *torquesi, *torquesj; double *history; - int limit_damping; - - double radi, radj, meff, dt, Ti, Tj; - double area; + double radi, radj, meff, dt, Ti, Tj, area; + double Fntot, Fncrit, magtortwist; double *xi, *xj, *vi, *vj, *omegai, *omegaj; - double Fntot, Fncrit; - double fs[3], fr[3], ft[3], magtortwist; + double fs[3], fr[3], ft[3]; private: double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; @@ -77,7 +76,6 @@ private: bool touch; int prep_flag, check_flag; - int mindlin_rescale, mindlin_force; }; } // namespace Contact diff --git a/src/GRANULAR/damping_contact_models.cpp b/src/GRANULAR/contact_damping_models.cpp similarity index 100% rename from src/GRANULAR/damping_contact_models.cpp rename to src/GRANULAR/contact_damping_models.cpp diff --git a/src/GRANULAR/damping_contact_models.h b/src/GRANULAR/contact_damping_models.h similarity index 100% rename from src/GRANULAR/damping_contact_models.h rename to src/GRANULAR/contact_damping_models.h diff --git a/src/GRANULAR/heat_models.cpp b/src/GRANULAR/contact_heat_models.cpp similarity index 100% rename from src/GRANULAR/heat_models.cpp rename to src/GRANULAR/contact_heat_models.cpp diff --git a/src/GRANULAR/heat_models.h b/src/GRANULAR/contact_heat_models.h similarity index 100% rename from src/GRANULAR/heat_models.h rename to src/GRANULAR/contact_heat_models.h diff --git a/src/GRANULAR/normal_contact_models.cpp b/src/GRANULAR/contact_normal_models.cpp similarity index 63% rename from src/GRANULAR/normal_contact_models.cpp rename to src/GRANULAR/contact_normal_models.cpp index cc01a3ddb2..e17798ca25 100644 --- a/src/GRANULAR/normal_contact_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "normal_contact_models.h" +#include "contact_normal_models.h" #include "math_const.h" #include "contact.h" @@ -32,32 +32,42 @@ namespace Contact{ // ************************ // Default behaviors where needed // ************************ -void NormalModel::set_fncrit(){ +void NormalModel::set_fncrit() +{ contact->Fncrit = fabs(contact->Fntot); } -void NormalModel::mix_coeffs(NormalModel* imodel, NormalModel* jmodel){ - for (int i = 0; i < num_coeffs; i++){ +void NormalModel::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +{ + for (int i = 0; i < num_coeffs; i++) { coeffs[i] = sqrt(imodel->coeffs[i]*jmodel->coeffs[i]); } } +void NormalModel::pulloff_distance(double radi, double radj) +{ + return radi + radj; +} + //----------------------------------------- //****************** // Hooke //****************** -void Hooke::Hooke(ContactModel &c){ +void Hooke::Hooke(ContactModel &c) +{ num_coeffs = 2; allocate_coeffs(); } -void Hooke::coeffs_to_local(){ +void Hooke::coeffs_to_local() +{ k_norm = coeffs[0]; damp = coeffs[1]; } -double Hooke::calculate_forces(){ +double Hooke::calculate_forces() +{ contact.area = sqrt(contact.dR); contact.knfac = k_norm * contact.area; return contact.knfac * contact.delta; @@ -67,7 +77,8 @@ double Hooke::calculate_forces(){ //****************** // Hertz //****************** -void Hertz::Hertz(ContactModel &c, int mat_flag){ +void Hertz::Hertz(ContactModel &c, int mat_flag) +{ material_prop_flag = mat_flag; if (material_prop_flag){ num_coeffs = 3; @@ -77,7 +88,8 @@ void Hertz::Hertz(ContactModel &c, int mat_flag){ } } -void Hertz::coeffs_to_local(){ +void Hertz::coeffs_to_local() +{ if (material_prop_flag){ Emod = coeffs[0]; poiss = coeffs[1]; @@ -88,7 +100,8 @@ void Hertz::coeffs_to_local(){ } } -double Hertz::calculate_forces(){ +double Hertz::calculate_forces() +{ contact.area = sqrt(contact.dR); contact.knfac = contact.k_norm * contact.area; return contact.knfac * contact.delta; @@ -97,12 +110,14 @@ double Hertz::calculate_forces(){ //****************** // DMT //****************** -void DMT::DMT(ContactModel &c){ +void DMT::DMT(ContactModel &c) +{ material_prop_flag = 1; num_coeffs = 4; } -double DMT::calculate_forces(){ +double DMT::calculate_forces() +{ contact.area = sqrt(contact.dR); contact.knfac = contact.k_norm * contact.area; double Fne = contact.knfac * contact.delta; @@ -111,20 +126,23 @@ double DMT::calculate_forces(){ return Fne; } -void DMT::set_fncrit(){ +void DMT::set_fncrit() +{ contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); } //****************** // JKR //****************** -void JKR::JKR(ContactModel &c){ +void JKR::JKR(ContactModel &c) +{ material_prop_flag = 1; - beyond_contact = 1; + contact.beyond_contact = beyond_contact = 1; num_coeffs = 4; } -bool JKR::touch(int touch){ +bool JKR::touch(int touch) +{ double Escaled, R2, delta_pulloff, dist_pulloff; bool touchflag; @@ -141,38 +159,50 @@ bool JKR::touch(int touch){ return touchflag; } -double JKR::calculate_forces(){ +double JKR::calculate_forces() +{ double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; + double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; - Escaled = k_norm * THREEQUARTERS; + Escaled = k_norm * THREEQUARTERS; - R2 = Reff * Reff; - dR2 = dR * dR; - t0 = cohesion * cohesion * R2 * R2 * Escaled; - t1 = PI27SQ*t0; - t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; - t3 = 4 * dR2 * Escaled; + R2 = Reff * Reff; + dR2 = dR * dR; + t0 = cohesion * cohesion * R2 * R2 * Escaled; + t1 = PI27SQ*t0; + t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; + t3 = 4 * dR2 * Escaled; - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); - t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / Escaled; - sqrt2 = MAX(0, 2 * dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); - a = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = a * a; - Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); - F_pulloff = 3 * MY_PI * cohesion * Reff; + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / Escaled; + sqrt2 = MAX(0, 2 * dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + a = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = a * a; + Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); + F_pulloff = 3 * MY_PI * cohesion * Reff; - knfac = Escaled * a; - return Fne; + knfac = Escaled * a; + return Fne; } -void JKR::set_fncrit(){ +void JKR::set_fncrit() +{ contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); } +void JKR::pulloff_distance(double radi, double radj) +{ + double Ecaled, a_tmp, Reff_tmp; + Reff_tmp = radi * radj / (radi + radj); + if (Reff_tmp <= 0) return 0; + + Ecaled = k_norm * THREEQUARTERS; + a_tmp = cbrt(9 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4 * Ecaled)); + return a_tmp * a_tmp / Reff_tmp - 2 * sqrt(MY_PI * cohesion * a_tmp / Ecaled); +} diff --git a/src/GRANULAR/normal_contact_models.h b/src/GRANULAR/contact_normal_models.h similarity index 97% rename from src/GRANULAR/normal_contact_models.h rename to src/GRANULAR/contact_normal_models.h index 198e4bcb59..7d54fc942b 100644 --- a/src/GRANULAR/normal_contact_models.h +++ b/src/GRANULAR/contact_normal_models.h @@ -29,6 +29,7 @@ public: virtual double calculate_forces() = 0; virtual void coeffs_to_local(); virtual void mix_coeffs(NormalModel*, NormalModel*); //When mixing is needed + void pulloff_distance(double, double); private: int size_history = 0; diff --git a/src/GRANULAR/twisting_contact_models.cpp b/src/GRANULAR/contact_rolling_models.cpp similarity index 73% rename from src/GRANULAR/twisting_contact_models.cpp rename to src/GRANULAR/contact_rolling_models.cpp index e6bafe4b3c..5521e10aee 100644 --- a/src/GRANULAR/twisting_contact_models.cpp +++ b/src/GRANULAR/contact_rolling_models.cpp @@ -183,3 +183,67 @@ void JKR::set_fncrit(){ + +void ContactModel::rolling(double *history) +{ + int rhist0, rhist1, rhist2, frameupdate; + double rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_dbl, temp_array[3]; + + rhist0 = roll_history_index; + rhist1 = rhist0 + 1; + rhist2 = rhist1 + 1; + + Frcrit = mu_roll * Fncrit; + + if (history_update) { + hist_temp[0] = history[rhist0]; + hist_temp[1] = history[rhist1]; + hist_temp[2] = history[rhist2]; + rolldotn = dot3(hist_temp, nx); + + frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit; + if (frameupdate) { // rotate into tangential plane + rollmag = len3(hist_temp); + // projection + temp_dbl = -rolldotn; + scale3(temp_dbl, nx, temp_array); + sub3(hist_temp, temp_array, hist_temp); + + // also rescale to preserve magnitude + prjmag = len3(hist_temp); + if (prjmag > 0) temp_dbl = rollmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, hist_temp); + } + scale3(dt, vrl, temp_array); + add3(hist_temp, temp_array, hist_temp); + } + + scaleadd3(k_roll, hist_temp, gamma_roll, vrl, fr); + negate3(fr); + + // rescale frictional displacements and forces if needed + + magfr = len3(fr); + if (magfr > Frcrit) { + rollmag = len3(hist_temp); + if (rollmag != 0.0) { + temp_dbl = -Frcrit / (magfr * k_roll); + scale3(temp_dbl, fr, temp_array); + add3(hist_temp, temp_array, hist_temp); + + temp_dbl = -gamma_roll/k_roll; + scale3(temp_dbl, vrl, temp_array); + add3(hist_temp, temp_array, hist_temp); + + temp_dbl = Frcrit / magfr; + scale3(temp_dbl, fr); + } else { + zero3(fr); + } + } + + history[rhist0] = hist_temp[0]; + history[rhist1] = hist_temp[1]; + history[rhist2] = hist_temp[2]; +} diff --git a/src/GRANULAR/rolling_contact_models.h b/src/GRANULAR/contact_rolling_models.h similarity index 100% rename from src/GRANULAR/rolling_contact_models.h rename to src/GRANULAR/contact_rolling_models.h diff --git a/src/GRANULAR/sub_model.cpp b/src/GRANULAR/contact_sub_models.cpp similarity index 80% rename from src/GRANULAR/sub_model.cpp rename to src/GRANULAR/contact_sub_models.cpp index e5ace9885e..8802622c78 100644 --- a/src/GRANULAR/sub_model.cpp +++ b/src/GRANULAR/contact_sub_models.cpp @@ -16,7 +16,7 @@ Multiple models can be defined and used to calculate forces and torques based on contact geometry */ -#include "sub_model.h" +#include "contact_sub_model.h" #include "pointers.h" #include "utils.h" #include "error.h" @@ -26,33 +26,43 @@ using namespace LAMMPS_NS; namespace Contact{ -SubModel::SubModel(){ +SubModel::SubModel() +{ allocated = 0; + material_prop_flag = 0; + size_history = 0; + history_index = 0; } -SubModel::~SubModel(){ + +SubModel::~SubModel() +{ if (allocated) delete [] coeffs; } -void SubModel::allocate_coeffs(){ +void SubModel::allocate_coeffs() +{ allocated = 1; coeffs = new double[num_coeffs]; } -void SubModel::parse_coeffs(char **arg, int iarg){ - for (int i = 0; i < num_coeffs; i++){ +void SubModel::parse_coeffs(char **arg, int iarg) +{ + for (int i = 0; i < num_coeffs; i++) { coeffs[i] = utils::numeric(FLERR,arg[iarg+i+1],false,lmp); } coeffs_to_local(); } -void SubModel::write_restart(FILE *fp){ +void SubModel::write_restart(FILE *fp) +{ fwrite(&model_name.length(),sizeof(int),1,fp); fwrite(model_name.data(),sizeof(char),model_name.length(),fp); fwrite(&num_coeffs,sizeof(int),1,fp); fwrite(coeffs,sizeof(int),num_coeffs,fp); } -void SubModel::read_restart(FILE *fp, int num_char){ +void SubModel::read_restart(FILE *fp, int num_char) +{ if (comm->me == 0){ utils::sfread(FLERR,&num_coeffs,sizeof(int),1,fp,nullptr,error); } @@ -60,7 +70,8 @@ void SubModel::read_restart(FILE *fp, int num_char){ allocate_coeffs(); } -void SubModel::read_restart(FILE *fp){ +void SubModel::read_restart(FILE *fp) +{ int num_char; if (me == 0){ utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); diff --git a/src/GRANULAR/sub_model.h b/src/GRANULAR/contact_sub_models.h similarity index 93% rename from src/GRANULAR/sub_model.h rename to src/GRANULAR/contact_sub_models.h index 2d3261238b..771f0f0890 100644 --- a/src/GRANULAR/sub_model.h +++ b/src/GRANULAR/contact_sub_models.h @@ -29,6 +29,7 @@ public: virtual double calculate_forces() = 0; void read_restart(); virtual void parse_coeffs(char **, int); + void mix_coeff(SubModel*, SubModel*); void write_restart(FILE*); void read_restart(FILE*); void read_restart(FILE*, int); @@ -38,9 +39,9 @@ public: private: ContactModel &contact; int allocated; - int material_prop_flag = 0; + int material_prop_flag; int size_history; - + int history_index; }; } diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp new file mode 100644 index 0000000000..1ceb940111 --- /dev/null +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -0,0 +1,324 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "tangential_contact_models.h" +#include "math_const.h" +#include "contact.h" + +#include + +using namespace MathConst; + +namespace Contact{ + +// ************************ +// Default behaviors where needed +// ************************ + +//----------------------------------------- + +//****************** +// Hooke +//****************** +void LinearNohistory::calculate_forces(){ + contact = c; + num_coeffs = 2; + allocate_coeffs(); +} + +void Hooke::coeffs_to_local(){ + k_norm = coeffs[0]; + damp = coeffs[1]; +} + +double Hooke::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = k_norm * contact.area; + return contact.knfac * contact.delta; +} + + +//****************** +// Hertz +//****************** +void Hertz::Hertz(ContactModel &c, int mat_flag){ + contact = c; + material_prop_flag = mat_flag; + if (material_prop_flag){ + num_coeffs = 3; + } + else{ + num_coeffs = 2; + } + allocate_coeffs(); +} + +void Hertz::coeffs_to_local(){ + if (material_prop_flag){ + Emod = coeffs[0]; + poiss = coeffs[1]; + k_norm = 4/3*Emod; + } + else{ + k_norm = coeffs[0]; + } +} + +double Hertz::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + return contact.knfac * contact.delta; +} + +//****************** +// DMT +//****************** +void DMT::DMT(ContactModel &c){ + contact = c; + material_prop_flag = 1; + num_coeffs = 4; + allocate_coeffs(); +} + +double DMT::calculate_forces(){ + contact.area = sqrt(contact.dR); + contact.knfac = contact.k_norm * contact.area; + double Fne = contact.knfac * contact.delta; + F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; + Fne -= F_pulloff; + return Fne; +} + +void DMT::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); +} + +//****************** +// JKR +//****************** +void JKR::JKR(ContactModel &c){ + contact = c; + material_prop_flag = 1; + beyond_contact = 1; + num_coeffs = 4; + allocate_coeffs(); +} + +bool JKR::touch(int touch){ + double Escaled, R2, delta_pulloff, dist_pulloff; + bool touchflag; + + Escaled = k_norm * THREEQUARTERS; + if (touch) { + R2 = contact.Reff * contact.Reff; + a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); + delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); + dist_pulloff = contact.radsum - delta_pulloff; + touchflag = (contact.rsq < dist_pulloff * dist_pulloff); + } else { + touchflag = (rcontact.sq < contact.radsum * contact.radsum); + } + return touchflag; +} + +double JKR::calculate_forces(){ + double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; + + Escaled = k_norm * THREEQUARTERS; + + R2 = Reff * Reff; + dR2 = dR * dR; + t0 = cohesion * cohesion * R2 * R2 * Escaled; + t1 = PI27SQ*t0; + t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; + t3 = 4 * dR2 * Escaled; + + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / Escaled; + sqrt2 = MAX(0, 2 * dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + a = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = a * a; + Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); + F_pulloff = 3 * MY_PI * cohesion * Reff; + + knfac = Escaled * a; + return Fne; +} + +void JKR::set_fncrit(){ + contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); +} + + + + + +/* ---------------------------------------------------------------------- */ + +void ContactModel::tangential_no_history() +{ + double gamma_scaled = gamma_tang * damp_normal_prefactor; + double fsmag, Ft; + + // classic pair gran/hooke (no history) + fsmag = gamma_scaled * vrel; + if (vrel != 0.0) Ft = MIN(Fscrit,fsmag) / vrel; + else Ft = 0.0; + + Ft = -Ft; + scale3(Ft, vtr, fs); +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::tangential_history(double *history) +{ + double gamma_scaled = gamma_tang * damp_normal_prefactor; + double k = k_tang; + int frame_update = 0; + double magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; + + // rotate and update displacements / force. + // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 + if (history_update) { + rsht = dot3(history, nx); + frame_update = fabs(rsht) * k > EPSILON * Fscrit; + + if (frame_update) { + shrmag = len3(history); + // projection + scale3(rsht, nx, history); + // also rescale to preserve magnitude + prjmag = len3(history); + if (prjmag > 0) temp_dbl = shrmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, history); + } + + // update history + // tangential force + // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 + temp_dbl = k * dt; + scale3(temp_dbl, vtr, temp_array); + sub3(history, temp_array, history); + } + + // tangential forces = history + tangential velocity damping + temp_dbl = -gamma_norm; + scale3(temp_dbl, vtr, fs); + + // rescale frictional displacements and forces if needed + magfs = len3(fs); + if (magfs > Fscrit) { + shrmag = len3(history); + if (shrmag != 0.0) { + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs, history); + scale3(gamma_norm, vtr, temp_array); + add3(history, temp_array, history); + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs); + } else { + zero3(fs); + } + } +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::tangential_mindlin(double *history) +{ + double k_scaled, gamma_scaled, magfs, rsht, shrmag, prjmag, temp_dbl; + double temp_array[3]; + int frame_update = 0; + + gamma_scaled = gamma_tang * damp_normal_prefactor; + k_scaled = k_tang * a; + if (mindlin_rescale) { + // on unloading, rescale the shear displacements/force + if (a < history[3]) { + temp_dbl = a / history[3]; + scale3(temp_dbl, history); + } + } + + // rotate and update displacements / force. + // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 + if (history_update) { + rsht = dot3(history, nx); + if (mindlin_force) + frame_update = fabs(rsht) > EPSILON * Fscrit; + else + frame_update = fabs(rsht) * k_scaled > EPSILON * Fscrit; + + if (frame_update) { + shrmag = len3(history); + // projection + scale3(rsht, nx, history); + // also rescale to preserve magnitude + prjmag = len3(history); + if (prjmag > 0) temp_dbl = shrmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, history); + } + + // update history + if (mindlin_force) { + // tangential force + // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 + temp_dbl = -k_scaled * dt; + scale3(temp_dbl, vtr, temp_array); + } else { + scale3(dt, vtr, temp_array); + } + add3(history, temp_array, history); + + if (mindlin_rescale) history[3] = a; + } + + // tangential forces = history + tangential velocity damping + temp_dbl = -gamma_scaled; + scale3(temp_dbl, vtr, fs); + + if (! mindlin_force) { + scale3(k_scaled, history, temp_array); + add3(fs, temp_array, fs); + } + + // rescale frictional displacements and forces if needed + magfs = len3(fs); + if (magfs > Fscrit) { + shrmag = len3(history); + if (shrmag != 0.0) { + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs, history); + scale3(gamma_tang, vtr, temp_array); + add3(history, temp_array, history); + if (! mindlin_force) { + temp_dbl = -1.0 / k_tang; + scale3(temp_dbl, history); + } + temp_dbl = Fscrit / magfs; + scale3(temp_dbl, fs); + } else { + zero3(fs); + } + } +} + +/* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/tangential_contact_models.h b/src/GRANULAR/contact_tangential_models.h similarity index 100% rename from src/GRANULAR/tangential_contact_models.h rename to src/GRANULAR/contact_tangential_models.h diff --git a/src/GRANULAR/rolling_contact_models.cpp b/src/GRANULAR/contact_twisting_models.cpp similarity index 82% rename from src/GRANULAR/rolling_contact_models.cpp rename to src/GRANULAR/contact_twisting_models.cpp index e6bafe4b3c..0e9e9115ac 100644 --- a/src/GRANULAR/rolling_contact_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -183,3 +183,34 @@ void JKR::set_fncrit(){ + +/* ---------------------------------------------------------------------- */ + +void ContactModel::twisting_marshall(double *history) +{ + // Overwrite twist coefficients with derived values + k_twist = 0.5 * k_tang * a * a; // eq 32 of Marshall paper + gamma_twist = 0.5 * gamma_tang * a * a; + mu_twist = TWOTHIRDS * a * mu_tang; + + twisting_SDS(history); +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::twisting_SDS(double *history) +{ + double signtwist, Mtcrit; + + if (history_update) { + history[twist_history_index] += magtwist * dt; + } + + magtortwist = -k_twist * history[twist_history_index] - gamma_twist*magtwist; // M_t torque (eq 30) + signtwist = (magtwist > 0) - (magtwist < 0); + Mtcrit = mu_twist * Fncrit; // critical torque (eq 44) + if (fabs(magtortwist) > Mtcrit) { + history[twist_history_index] = (Mtcrit * signtwist - gamma_twist * magtwist) / k_twist; + magtortwist = -Mtcrit * signtwist; // eq 34 + } +} diff --git a/src/GRANULAR/twisting_contact_models.h b/src/GRANULAR/contact_twisting_models.h similarity index 100% rename from src/GRANULAR/twisting_contact_models.h rename to src/GRANULAR/contact_twisting_models.h diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 855ed36cf0..7378df2f77 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -198,13 +198,13 @@ void PairGranular::compute(int eflag, int vflag) jtype = type[j]; // Reset model and copy initial geometric data - models[itype][jtype].reset_contact(); - models[itype][jtype].xi = x[i]; - models[itype][jtype].xj = x[j]; - models[itype][jtype].radi = radius[i]; - models[itype][jtype].radj = radius[j]; + models[itype][jtype]->reset_contact(); + models[itype][jtype]->xi = x[i]; + models[itype][jtype]->xj = x[j]; + models[itype][jtype]->radi = radius[i]; + models[itype][jtype]->radj = radius[j]; - touchflag = models[itype][jtype].check_contact(); + touchflag = models[itype][jtype]->check_contact(); if (!touchflag) { // unset non-touching neighbors @@ -229,22 +229,21 @@ void PairGranular::compute(int eflag, int vflag) if (mask[j] & freeze_group_bit) meff = mi; // Copy additional information and prepare force calculations - models[itype][jtype].meff = meff; - models[itype][jtype].vi = v[i]; - models[itype][jtype].vj = v[j]; - models[itype][jtype].omegai = omega[i]; - models[itype][jtype].omegaj = omega[j]; - models[itype][jtype].history_update = historyupdate; - models[itype][jtype].history = history; - models[itype][jtype].prep_contact(); + models[itype][jtype]->meff = meff; + models[itype][jtype]->vi = v[i]; + models[itype][jtype]->vj = v[j]; + models[itype][jtype]->omegai = omega[i]; + models[itype][jtype]->omegaj = omega[j]; + models[itype][jtype]->history_update = historyupdate; + models[itype][jtype]->history = history; + models[itype][jtype]->prep_contact(); if (heat_flag) { - models[itype][jtype].Ti = temperature[i]; - models[itype][jtype].Tj = temperature[j]; + models[itype][jtype]->Ti = temperature[i]; + models[itype][jtype]->Tj = temperature[j]; } - - if (models[itype][jtype].normal_model == JKR) touch[jj] = 1; + if (models[itype][jtype]->beyond_contact) touch[jj] = 1; // if any history is needed if (use_history) { @@ -252,12 +251,12 @@ void PairGranular::compute(int eflag, int vflag) history = &allhistory[size_history*jj]; } - double *forces = models[itype][jtype].forces; - double *torquesi = models[itype][jtype].torquesi; - double *torquesj = models[itype][jtype].torquesj; + models[itype][jtype]->calculate_forces(); + if (heat_flag) dq = models[itype][jtype]->calculate_heat(); - models[itype][jtype].calculate_forces(); - if (heat_flag) dq = models[itype][jtype].calculate_heat(); + forces = models[itype][jtype]->forces; + torquesi = models[itype][jtype]->torquesi; + torquesj = models[itype][jtype]->torquesj; // apply forces & torques MathExtra::scale3(factor_lj, forces); @@ -302,9 +301,8 @@ void PairGranular::allocate() memory->create(cutsq,n+1,n+1,"pair:cutsq"); memory->create(cutoff_type,n+1,n+1,"pair:cutoff_type"); - for (int i = 0; i < n+1; i++) { - models.push_back(std::vector (n+1)); - } + + models = (ContactModel **) memory->srealloc(fix, n+1,n+1, "pair:contact_models"); onerad_dynamic = new double[n+1]; onerad_frozen = new double[n+1]; @@ -334,16 +332,8 @@ void PairGranular::settings(int narg, char **arg) void PairGranular::coeff(int narg, char **arg) { - int normal_model_one, damping_model_one; - int tangential_model_one, roll_model_one, twist_model_one; - - double normal_coeffs_one[4]; - double tangential_coeffs_one[4]; - double roll_coeffs_one[4]; - double twist_coeffs_one[4]; - - double conductivity_one; double cutoff_one = -1; + int ncoeff; if (narg < 3) error->all(FLERR,"Incorrect args for pair coefficients"); @@ -354,66 +344,97 @@ void PairGranular::coeff(int narg, char **arg) utils::bounds(FLERR,arg[0],1,atom->ntypes,ilo,ihi,error); utils::bounds(FLERR,arg[1],1,atom->ntypes,jlo,jhi,error); - //Here's one option for handing off parsing to the SubModel objects: - ContactModel model_one; + // Create new model stored in vector + vec_models.push_back(ContactModel()); //Parse mandatory normal and tangential specifications int iarg = 2; - model_one.init_normal(arg[iarg]); + vec_models.back().init(arg[iarg], Contact::NORMAL); + ncoeff = vec_models.back().normal_model.num_coeffs iarg += 1; - if (iarg + model_one.normal_model->num_coeffs >= narg) + if (iarg + ncoeff >= narg) error->all(FLERR,"Illegal pair_coeff command" - "Insufficient arguments provided."); - model_one.normal_model->parse_coeffs(arg, iarg); - iarg += model_one.normal_model->num_coeffs; + "Insufficient arguments provided for normal model."); + vec_models.back().normal_model.parse_coeffs(arg, iarg); + iarg += ncoeff; if (strcmp(arg[iarg], "tangential") == 0) { if (iarg + 1 >= narg) error->all(FLERR,"Illegal pair_coeff command, must specify " "tangential model after tangential keyword"); - model_one.init_tangential(arg[iarg]); + vec_models.back().init(arg[iarg], Contact::TANGENTIAL); + ncoeff = vec_models.back().tangential_model.num_coeffs; iarg += 1; - if (iarg + model_one.tangential_model->num_coeffs >= narg) + if (iarg + ncoeff >= narg) error->all(FLERR, "Illegal pair_coeff command" - "Insufficient arguments provided."); - model_one.tangential_model->parse_coeffs(arg, iarg); - iarg += model_one.tangential_model->num_coeffs; - } - else{ + "Insufficient arguments provided for tangential model."); + vec_models.back().tangential_model.parse_coeffs(arg, iarg); + iarg += ncoeff; + } else{ error->all(FLERR, "Illegal pair_coeff command, 'tangential' keyword expected"); } + //Parse optional arguments while (iarg < narg) { if (strcmp(arg[iarg], "rolling") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - model_one.init_rolling(arg[iarg+1]); + vec_models.back().init(arg[iarg], Contact::ROLLING); + ncoeff = vec_models.back().rolling_model.num_coeffs; iarg += 1; - if (iarg + model_one.rolling_model->num_coeffs >= narg) + if (iarg + ncoeff >= narg) error->all(FLERR, "Illegal pair_coeff command" "Insufficient arguments provided for rolling model."); - iarg += model_one.rolling_model->num_coeffs; - } - else if (strcmp(arg[iarg], "twisting") == 0) { - //... - } - else if (strcmp(arg[iarg], "cutoff") == 0) { - //.. - } else if (strcmp(arg[iarg], "limit_damping") == 0) { - //.. + vec_models.back().rolling_model.parse_coeffs(arg, iarg); + iarg += ncoeff; + + } else if (strcmp(arg[iarg], "twisting") == 0) { + if (iarg + 1 >= narg) + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + vec_models.back().init(arg[iarg], Contact::TWISTING); + ncoeff = vec_models.back().twisting_model.num_coeffs; + iarg += 1; + if (iarg + ncoeff >= narg) + error->all(FLERR, "Illegal pair_coeff command" + "Insufficient arguments provided for twisting model."); + vec_models.back().twisting_model.parse_coeffs(arg, iarg); + iarg += ncoeff; + } else if (strcmp(arg[iarg], "heat") == 0) { - //.. + if (iarg + 1 >= narg) + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + vec_models.back().init(arg[iarg], Contact::HEAT); + ncoeff = vec_models.back().heat_model.num_coeffs; + iarg += 1; + if (iarg + ncoeff >= narg) + error->all(FLERR, "Illegal pair_coeff command" + "Insufficient arguments provided for heat model."); + ncoeff = vec_models.back().heat_model.num_coeffs; + vec_models.back().heat_model.parse_coeffs(arg, iarg); + iarg += ncoeff; + heat_flag = 1; + + } else if (strcmp(arg[iarg], "cutoff") == 0) { + if (iarg + 1 >= narg) + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + vec_models.back().cutoff_type = utils::numeric(FLERR,arg[iarg+1],false,lmp); + iarg += 2; + + } else if (strcmp(arg[iarg], "limit_damping") == 0) { + vec_models.back().limit_damping = 1; + iarg += 1; + } else error->all(FLERR, "Illegal pair_coeff command"); } - if (model_one.limit_damping && !model_one.normal_model->allow_limit_damping) + if (vec_models.back().limit_damping && !vec_models.back().normal_model->allow_limit_damping) error->all(FLERR,"Illegal pair_coeff command, " "Cannot limit damping with specified normal contact model"); int count = 0; for (int i = ilo; i <= ihi; i++) { for (int j = MAX(jlo,i); j <= jhi; j++) { - models[i][j] = model_one; //Not sure if this works to copy? May need to specify a copy operator for ContactModel.. + models[i][j] = & vec_models.back(); setflag[i][j] = 1; count++; } @@ -437,31 +458,38 @@ void PairGranular::init_style() if (comm->ghost_velocity == 0) error->all(FLERR,"Pair granular requires ghost atoms store velocity"); - size_normal_history = 0; - size_tangential_history = 0; - size_rolling_history = 0; - size_twisting_history = 0; - for (int i = 1; i <= atom->ntypes; i++) - for (int j = i; j <= atom->ntypes; j++){ - if (models[i][j].normal_model->history_flag || - models[i][j].tangential_model->history_flag || - models[i][j].rolling_model->history_flag || - models[i][j].twisting_model->history_flag) use_history = 1; + // allocate history - if (models[i][j].nondefault_history_transfer) - if (models[i][j].normal_model->size_history > size_normal_history) - size_normal_history = models[i][j].normal_model->size_history; - //... + int size_normal_history = 0; + int size_tangential_history = 0; + int size_rolling_history = 0; + int size_twisting_history = 0; + for (int i = 1; i <= atom->ntypes; i++) { + for (int j = i; j <= atom->ntypes; j++) { + if (models[i][j]->normal_model.history_flag || + models[i][j]->tangential_model.history_flag || + models[i][j]->rolling_model.history_flag || + models[i][j]->twisting_model.history_flag) use_history = 1; + + if (models[i][j]->nondefault_history_transfer) // ??? + + if (models[i][j]->normal_model->size_history > size_normal_history) + size_normal_history = models[i][j]->normal_model.size_history; + if (models[i][j]->tangential_model->size_history > size_tangential_history) + size_tangential_history = models[i][j]->tangential_model.size_history; + if (models[i][j]->rolling_model->size_history > size_rolling_history) + size_rolling_history = models[i][j]->rolling_model.size_history; + if (models[i][j]->twisting_model->size_history > size_twisting_history) + size_twisting_history = models[i][j]->twisting_model.size_history; } + } size_history = size_normal_history + size_tangential_history + - size_roll_history + size_twist_history; - - // determine location of tangential/roll/twist histories in array + size_rolling_history + size_twisting_history; tangential_history_index = size_normal_history; roll_history_index = size_normal_history + size_tangential_history; - twist_history_index = size_normal_history + size_tangential_history + size_roll_history; + twist_history_index = size_normal_history + size_tangential_history + size_rolling_history; if (use_history) neighbor->add_request(this, NeighConst::REQ_SIZE|NeighConst::REQ_HISTORY); else neighbor->add_request(this, NeighConst::REQ_SIZE); @@ -556,71 +584,25 @@ double PairGranular::init_one(int i, int j) double cutoff = 0.0; if (setflag[i][j] == 0) { - if ((models[i][i].normal_model != models[j][j].normal_model) || - (models[i][i].damping_model != models[j][j].damping_model) || - (models[i][i].tangential_model != models[j][j].tangential_model) || - (models[i][i].roll_model != models[j][j].roll_model) || - (models[i][i].twist_model != models[j][j].twist_model)) { + if ((models[i][i]->normal_model != models[j][j]->normal_model) || + (models[i][i]->damping_model != models[j][j]->damping_model) || + (models[i][i]->tangential_model != models[j][j]->tangential_model) || + (models[i][i]->roll_model != models[j][j]->roll_model) || + (models[i][i]->twist_model != models[j][j]->twist_model)) { error->all(FLERR,"Granular pair style functional forms are different, " "cannot mix coefficients for types {} and {}. \n" "This combination must be set explicitly via a " "pair_coeff command",i,j); } - // Mix normal coefficients - if (models[i][j].normal_model == HERTZ || models[i][j].normal_model == HOOKE) - models[i][j].k_norm = models[j][i].k_norm = - mix_geom(models[i][i].k_norm, models[j][j].k_norm); - else - models[i][j].k_norm = models[j][i].k_norm = - mix_stiffnessE(models[i][i].Emod, models[j][j].Emod, - models[i][i].poisson, models[j][j].poisson); - - models[i][j].gamma_norm = models[j][i].gamma_norm = - mix_geom(models[i][i].gamma_norm, models[j][j].gamma_norm); - if ((models[i][j].normal_model == JKR) || (models[i][j].normal_model == DMT)) - models[i][j].cohesion = models[j][i].cohesion = - mix_geom(models[i][i].cohesion, models[j][j].cohesion); - - // Mix tangential coefficients - models[i][j].k_tang = models[j][i].k_tang = - mix_geom(models[i][i].k_tang, models[j][j].k_tang); - models[i][j].gamma_tang = models[j][i].gamma_tang = - mix_geom(models[i][i].gamma_tang, models[j][j].gamma_tang); - models[i][j].mu_tang = models[j][i].mu_tang = - mix_geom(models[i][i].mu_tang, models[j][j].mu_tang); - - // Mix rolling coefficients - if (models[i][j].roll_model != ROLL_NONE) { - models[i][j].k_roll = models[j][i].k_roll = - mix_geom(models[i][i].k_roll, models[j][j].k_roll); - models[i][j].gamma_roll = models[j][i].gamma_roll = - mix_geom(models[i][i].gamma_roll, models[j][j].gamma_roll); - models[i][j].mu_roll = models[j][i].mu_roll = - mix_geom(models[i][i].mu_roll, models[j][j].mu_roll); - } - - // Mix twisting coefficients - if (models[i][j].twist_model != TWIST_NONE && models[i][j].twist_model != TWIST_MARSHALL) { - models[i][j].k_twist = models[j][i].k_twist = - mix_geom(models[i][i].k_twist, models[j][j].k_twist); - models[i][j].gamma_twist = models[j][i].gamma_twist = - mix_geom(models[i][i].gamma_twist, models[j][j].gamma_twist); - models[i][j].mu_twist = models[j][i].mu_twist = - mix_geom(models[i][i].mu_twist, models[j][j].mu_twist); - } - - models[i][j].limit_damping = models[j][i].limit_damping = - MAX(models[i][i].limit_damping, models[j][j].limit_damping); - if (heat_flag) { - models[i][j].conductivity = models[j][i].conductivity = - mix_geom(models[i][i].conductivity, models[j][j].conductivity); - } + vec_models.push_back(ContactModel()); + models[i][j] = models[j][i] = & vec_models.back(); + vec_models.back().mix_coeffs(models[i][i], models[j][j]); } - // Check if conductivity is undefined (negative) for any type combination - if (heat_flag && models[i][j].conductivity < 0.0) - error->all(FLERR, "To calculate heat, conductivity must be defined for all pair coeff"); + // Check if heat model is defined for all type combinations + if (heat_flag && !models[i][j]->heat_model) + error->all(FLERR, "Must specify a heat model for all pair types"); // It is possible that cut[i][j] at this point is still 0.0. // This can happen when @@ -631,21 +613,21 @@ double PairGranular::init_one(int i, int j) // we assign cutoff = max(cut[i][j]) for i,j such that cut[i][j] > 0.0. double pulloff; - if (models[i][j].cutoff_type < 0 && cutoff_global < 0) { + if (models[i][j]->cutoff_type < 0 && cutoff_global < 0) { if (((maxrad_dynamic[i] > 0.0) && (maxrad_dynamic[j] > 0.0)) || ((maxrad_dynamic[i] > 0.0) && (maxrad_frozen[j] > 0.0)) || // radius info about both i and j exist ((maxrad_frozen[i] > 0.0) && (maxrad_dynamic[j] > 0.0))) { cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; pulloff = 0.0; - if (models[i][j].normal_model == JKR) { - pulloff = models[i][j].pulloff_distance(maxrad_dynamic[i], maxrad_dynamic[j]); + if (models[i][j]->beyond_contact) { + pulloff = models[i][j]->pulloff_distance(maxrad_dynamic[i], maxrad_dynamic[j]); cutoff += pulloff; - pulloff = models[i][j].pulloff_distance(maxrad_frozen[i], maxrad_dynamic[j]); + pulloff = models[i][j]->pulloff_distance(maxrad_frozen[i], maxrad_dynamic[j]); cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j] + pulloff); - pulloff = models[i][j].pulloff_distance(maxrad_dynamic[i], maxrad_frozen[j]); + pulloff = models[i][j]->pulloff_distance(maxrad_dynamic[i], maxrad_frozen[j]); cutoff = MAX(cutoff,maxrad_dynamic[i] + maxrad_frozen[j] + pulloff); } } else { @@ -661,16 +643,18 @@ double PairGranular::init_one(int i, int j) } cutoff = cutmax; } - } else if (models[i][j].cutoff_type > 0) { - cutoff = models[i][j].cutoff_type; + } else if (models[i][j]->cutoff_type > 0) { + cutoff = models[i][j]->cutoff_type; } else if (cutoff_global > 0) { cutoff = cutoff_global; } // Copy global options - models[i][j].dt = models[j][i].dt = dt; - models[i][j].roll_history_index = models[j][i].roll_history_index = roll_history_index; - models[i][j].twist_history_index = models[j][i].twist_history_index = twist_history_index; + models[i][j]->dt = models[j][i]->dt = dt; + models[i][j]->normal_model.history_index = models[j][i]->normal_model.history_index = normal_history_index; + models[i][j]->tangential_model.history_index = models[j][i]->tangential_model.history_index = tangential_history_index; + models[i][j]->rolling_model.history_index = models[j][i]->rolling_model.history_index = rolling_history_index; + models[i][j]->twisting_model.history_index = models[j][i]->twisting_model.history_index = twisting_history_index; return cutoff; } @@ -687,7 +671,7 @@ void PairGranular::write_restart(FILE *fp) fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { if (comm->me == 0){ - models[i][j].write_restart(fp); + models[i][j]->write_restart(fp); } } } @@ -708,57 +692,9 @@ void PairGranular::read_restart(FILE *fp) if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,nullptr,error); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { - if (me == 0) { - std::string name; - utils::sfread(FLERR,&name.data(),sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].damping_model_type,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].tangential_model_type,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].roll_model_type,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].twist_model_type,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].limit_damping,sizeof(int),1,fp,nullptr,error); - } - MPI_Bcast(&models[i][j].normal_model_type,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].damping_model_type,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].tangential_model_type,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].roll_model_type,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].twist_model_type,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].limit_damping,1,MPI_INT,0,world); - models[i][j].init(); - models[i][j].read_restart(); - - utils::sfread(FLERR,&models[i][j].k_norm,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].gamma_norm,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].cohesion,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].k_tang,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].gamma_tang,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].mu_tang,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].k_roll,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].gamma_roll,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].mu_roll,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].k_twist,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].gamma_twist,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].mu_twist,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&models[i][j].cutoff_type,sizeof(double),1,fp,nullptr,error); - } - MPI_Bcast(&models[i][j].normal_model,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].damping_model,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].tangential_model,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].roll_model,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].twist_model,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].limit_damping,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].k_norm,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].gamma_norm,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].cohesion,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].k_tang,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].gamma_tang,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].mu_tang,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].k_roll,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].gamma_roll,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].mu_roll,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].k_twist,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].gamma_twist,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].mu_twist,1,MPI_INT,0,world); - MPI_Bcast(&models[i][j].cutoff_type,1,MPI_DOUBLE,0,world); + vec_models.push_back(ContactModel()); + models[i][j] = & vec_models.back(); + models[i][j]->read_restart(); } } } @@ -798,14 +734,14 @@ double PairGranular::single(int i, int j, int itype, int jtype, double *radius = atom->radius; // Reset model and copy initial geometric data - models[itype][jtype].reset_contact(); - models[itype][jtype].xi = x[i]; - models[itype][jtype].xj = x[j]; - models[itype][jtype].radi = radius[i]; - models[itype][jtype].radj = radius[j]; - models[i][j].history_update = 0; // Don't update history + models[itype][jtype]->reset_contact(); + models[itype][jtype]->xi = x[i]; + models[itype][jtype]->xj = x[j]; + models[itype][jtype]->radi = radius[i]; + models[itype][jtype]->radj = radius[j]; + models[i][j]->history_update = 0; // Don't update history - touchflag = models[itype][jtype].check_contact(); + touchflag = models[itype][jtype]->check_contact(); if (!touchflag) { fforce = 0.0; @@ -834,12 +770,13 @@ double PairGranular::single(int i, int j, int itype, int jtype, double **v = atom->v; double **omega = atom->omega; - models[itype][jtype].meff = meff; - models[itype][jtype].vi = v[i]; - models[itype][jtype].vj = v[j]; - models[itype][jtype].omegai = omega[i]; - models[itype][jtype].omegaj = omega[j]; - models[itype][jtype].prep_contact(); + models[itype][jtype]->meff = meff; + models[itype][jtype]->vi = v[i]; + models[itype][jtype]->vj = v[j]; + models[itype][jtype]->omegai = omega[i]; + models[itype][jtype]->omegaj = omega[j]; + models[itype][jtype]->history = history; + models[itype][jtype]->prep_contact(); // if any history is needed @@ -859,8 +796,10 @@ double PairGranular::single(int i, int j, int itype, int jtype, } double forces[3], torquesi[3], torquesj[3]; - - models[itype][jtype].calculate_forces(forces, torquesi, torquesj, history); + models[itype][jtype]->calculate_forces(); + forces = models[itype][jtype]->forces; + torquesi = models[itype][jtype]->torquesi; + torquesj = models[itype][jtype]->torquesj; // apply forces & torques fforce = MathExtra::len3(forces); @@ -871,15 +810,15 @@ double PairGranular::single(int i, int j, int itype, int jtype, double dely = x[i][1] - x[j][1]; double delz = x[i][2] - x[j][2]; - svector[0] = models[itype][jtype].fs[0]; - svector[1] = models[itype][jtype].fs[1]; - svector[2] = models[itype][jtype].fs[2]; - svector[3] = MathExtra::len3(models[itype][jtype].fs); - svector[4] = models[itype][jtype].fr[0]; - svector[5] = models[itype][jtype].fr[1]; - svector[6] = models[itype][jtype].fr[2]; - svector[7] = MathExtra::len3(models[itype][jtype].fr); - svector[8] = models[itype][jtype].magtortwist; + svector[0] = models[itype][jtype]->fs[0]; + svector[1] = models[itype][jtype]->fs[1]; + svector[2] = models[itype][jtype]->fs[2]; + svector[3] = MathExtra::len3(models[itype][jtype]->fs); + svector[4] = models[itype][jtype]->fr[0]; + svector[5] = models[itype][jtype]->fr[1]; + svector[6] = models[itype][jtype]->fr[2]; + svector[7] = MathExtra::len3(models[itype][jtype]->fr); + svector[8] = models[itype][jtype]->magtortwist; svector[9] = delx; svector[10] = dely; svector[11] = delz; @@ -960,7 +899,7 @@ double PairGranular::mix_geom(double valii, double valjj) void PairGranular::transfer_history(double* source, double* target, int source_type, int target_type) { - models[itype][jtype].transfer_history(); + models[itype][jtype]->transfer_history(); for (int i = 0; i < size_history; i++){ target[i] = history_transfer_factors[i]*source[i]; } @@ -977,8 +916,8 @@ double PairGranular::atom2cut(int i) cut = atom->radius[i] * 2; if (beyond_contact) { int itype = atom->type[i]; - if (models[itype][itype].normal_model == JKR) { - cut += models[itype][itype].pulloff_distance(cut, cut); + if (models[itype][itype]->beyond_contact) { + cut += models[itype][itype]->pulloff_distance(cut, cut); } } @@ -1000,8 +939,8 @@ double PairGranular::radii2cut(double r1, double r2) // Check all combinations of i and j to find theoretical maximum pull off distance for (int i = 0; i < n; i++){ for (int j = 0; j < n; j++){ - if (models[i][j].normal_model == JKR) { - temp = models[i][j].pulloff_distance(r1, r2); + if (models[i][j]->beyond_contact) { + temp = models[i][j]->pulloff_distance(r1, r2); if (temp > cut) cut = temp; } } diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index 3440d60e29..503e3ed938 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -22,7 +22,7 @@ PairStyle(granular,PairGranular); #include "contact.h" #include "pair.h" -#include +#include "vector.h" namespace LAMMPS_NS { @@ -73,7 +73,8 @@ class PairGranular : public Pair { int heat_flag; // contact models - std::vector > models; + std::vector vec_models; + Contact::ContactModel ***models; // history flags int normal_history, tangential_history, roll_history, twist_history; diff --git a/src/GRANULAR/tangential_contact_models.cpp b/src/GRANULAR/tangential_contact_models.cpp deleted file mode 100644 index ff59ceabb7..0000000000 --- a/src/GRANULAR/tangential_contact_models.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#include "tangential_contact_models.h" -#include "math_const.h" -#include "contact.h" - -#include - -using namespace MathConst; - -namespace Contact{ - -// ************************ -// Default behaviors where needed -// ************************ - -//----------------------------------------- - -//****************** -// Hooke -//****************** -void LinearNohistory::calculate_forces(){ - contact = c; - num_coeffs = 2; - allocate_coeffs(); -} - -void Hooke::coeffs_to_local(){ - k_norm = coeffs[0]; - damp = coeffs[1]; -} - -double Hooke::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = k_norm * contact.area; - return contact.knfac * contact.delta; -} - - -//****************** -// Hertz -//****************** -void Hertz::Hertz(ContactModel &c, int mat_flag){ - contact = c; - material_prop_flag = mat_flag; - if (material_prop_flag){ - num_coeffs = 3; - } - else{ - num_coeffs = 2; - } - allocate_coeffs(); -} - -void Hertz::coeffs_to_local(){ - if (material_prop_flag){ - Emod = coeffs[0]; - poiss = coeffs[1]; - k_norm = 4/3*Emod; - } - else{ - k_norm = coeffs[0]; - } -} - -double Hertz::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - return contact.knfac * contact.delta; -} - -//****************** -// DMT -//****************** -void DMT::DMT(ContactModel &c){ - contact = c; - material_prop_flag = 1; - num_coeffs = 4; - allocate_coeffs(); -} - -double DMT::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - double Fne = contact.knfac * contact.delta; - F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; - Fne -= F_pulloff; - return Fne; -} - -void DMT::set_fncrit(){ - contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); -} - -//****************** -// JKR -//****************** -void JKR::JKR(ContactModel &c){ - contact = c; - material_prop_flag = 1; - beyond_contact = 1; - num_coeffs = 4; - allocate_coeffs(); -} - -bool JKR::touch(int touch){ - double Escaled, R2, delta_pulloff, dist_pulloff; - bool touchflag; - - Escaled = k_norm * THREEQUARTERS; - if (touch) { - R2 = contact.Reff * contact.Reff; - a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); - delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); - dist_pulloff = contact.radsum - delta_pulloff; - touchflag = (contact.rsq < dist_pulloff * dist_pulloff); - } else { - touchflag = (rcontact.sq < contact.radsum * contact.radsum); - } - return touchflag; -} - -double JKR::calculate_forces(){ - double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; - - Escaled = k_norm * THREEQUARTERS; - - R2 = Reff * Reff; - dR2 = dR * dR; - t0 = cohesion * cohesion * R2 * R2 * Escaled; - t1 = PI27SQ*t0; - t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; - t3 = 4 * dR2 * Escaled; - - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); - t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / Escaled; - sqrt2 = MAX(0, 2 * dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); - a = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = a * a; - Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); - F_pulloff = 3 * MY_PI * cohesion * Reff; - - knfac = Escaled * a; - return Fne; -} - -void JKR::set_fncrit(){ - contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); -} - - - From 8557ce7c97634b855c896374a69b1e90041f2424 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 15 Jul 2022 17:57:38 -0600 Subject: [PATCH 013/445] Adding normal, damping, and tangential sub models --- src/GRANULAR/contact.cpp | 38 ++- src/GRANULAR/contact.h | 2 +- src/GRANULAR/contact_damping_models.cpp | 64 +++- src/GRANULAR/contact_damping_models.h | 42 ++- src/GRANULAR/contact_normal_models.cpp | 251 +++++++++----- src/GRANULAR/contact_normal_models.h | 100 +++--- src/GRANULAR/contact_sub_models.cpp | 57 +++- src/GRANULAR/contact_sub_models.h | 11 +- src/GRANULAR/contact_tangential_models.cpp | 365 ++++++++++----------- src/GRANULAR/contact_tangential_models.h | 79 +++-- src/GRANULAR/pair_granular.cpp | 68 ++-- src/GRANULAR/pair_granular.h | 4 - 12 files changed, 660 insertions(+), 421 deletions(-) diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index 693721fe22..12a9476585 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -54,45 +54,53 @@ ContactModel::ContactModel() void ContactModel::init_model(char *model_name, int model_type) { if (model_type == NORMAL) { - if (strcmp(model_name, "hooke") == 0) normal_model = new Hooke(); - else if (strcmp(model_name, "hertz") == 0) normal_model = new Hertz(0); - else if (strcmp(model_name, "hertz/material") == 0) normal_model = new Hertz(1); - //... + if (strcmp(model_name, "hooke") == 0) normal_model = new NormalHooke(); + else if (strcmp(model_name, "hertz") == 0) normal_model = new NormalHertz(); + else if (strcmp(model_name, "hertz/material") == 0) normal_model = new NormalHertzMaterial(); + else if (strcmp(model_name, "dmt") == 0) normal_model = new NormalDMT(); + else if (strcmp(model_name, "jkr") == 0) normal_model = new NormalJKR(); else error->all(FLERR, "Normal model name not recognized"); sub_models[model_type] = &normal_model; } else if (model_type == TANGENTIAL) { - if (strcmp(model_name, "linear") == 0) tangential_model = new LinearNoHistory(); - //... + if (strcmp(model_name, "linear_nohistory") == 0) tangential_model = new TangentialLinearNoHistory(); + else if (strcmp(model_name, "linear_history") == 0) tangential_model = new TangentialLinearHistory(); + else if (strcmp(model_name, "mindlin") == 0) tangential_model = new TangentialMindlin(); + else if (strcmp(model_name, "mindlin/force") == 0) tangential_model = new TangentialMindlinForce(); + else if (strcmp(model_name, "mindlin_rescale") == 0) tangential_model = new TangentialMindlinRescale(); + else if (strcmp(model_name, "mindlin_rescale/force") == 0) tangential_model = new TangentialMindlinRescaleForce(); else error->all(FLERR, "Tangential model name not recognized"); sub_models[model_type] = &tangential_model; } else if (model_type == DAMPING) { - if (strcmp(model_name, "linear") == 0) damping_model = new LinearNoHistory(); - //... + if (strcmp(model_name, "velocity") == 0) damping_model = new DampingVelocity(); + else if (strcmp(model_name, "mass_velocity") == 0) damping_model = new DampingMassVelocity(); + else if (strcmp(model_name, "viscoelastic") == 0) damping_model = new DampingViscoelastic(); + else if (strcmp(model_name, "tsuji") == 0) damping_model = new DampingTsuji(); else error->all(FLERR, "Damping model name not recognized"); sub_models[model_type] = &damping_model; } else if (model_type == ROLLING) { - if (strcmp(model_name, "linear") == 0) rolling_model = new LinearNoHistory(); - //... + if (strcmp(model_name, "none") == 0) delete rolling_model; + else if (strcmp(model_name, "sds") == 0) rolling_model = new RollingSDS(); else error->all(FLERR, "Rolling model name not recognized"); sub_models[model_type] = &rolling_model; } else if (model_type == TWISTING) { - if (strcmp(model_name, "linear") == 0) twisting_model = new LinearNoHistory(); - //... + if (strcmp(model_name, "none") == 0) delete twisting_model; + else if (strcmp(model_name, "sds") == 0) twisting_model = new TwistingSDS(); + else if (strcmp(model_name, "marshall") == 0) twisting_model = new TwistingMarshall(); else error->all(FLERR, "Twisting model name not recognized"); sub_models[model_type] = &twisting_model; } else if (model_type == HEAT) { - if (strcmp(model_name, "linear") == 0) heat_model = new LinearNoHistory(); - //... + if (strcmp(model_name, "none") == 0) delete heat_model; + else if (strcmp(model_name, "area") == 0) heat_model = new HeatArea(); else error->all(FLERR, "Heat model name not recognized"); sub_models[model_type] = &heat_model; } - sub_models[model_type]->model_name.assign(model_name); + sub_models[model_type]->name.assign(model_name); sub_models[model_type]->contact = *this; sub_models[model_type]->allocate_coeffs(); } diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index 8883ecb08e..f9f18a1eb4 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -64,7 +64,7 @@ public: double *history; double radi, radj, meff, dt, Ti, Tj, area; - double Fntot, Fncrit, magtortwist; + double Fntot, magtortwist; double *xi, *xj, *vi, *vj, *omegai, *omegaj; double fs[3], fr[3], ft[3]; diff --git a/src/GRANULAR/contact_damping_models.cpp b/src/GRANULAR/contact_damping_models.cpp index 11d2c19b57..1e233234b2 100644 --- a/src/GRANULAR/contact_damping_models.cpp +++ b/src/GRANULAR/contact_damping_models.cpp @@ -23,32 +23,66 @@ using namespace MathSpecial; namespace Contact{ -void DampingModel::allocate_coeffs(){ - damp = contact.normal_model->coeffs[1]; + +/* ---------------------------------------------------------------------- + Default damping model +------------------------------------------------------------------------- */ + +void DampingModel::DampingModel() +{ + num_coeffs = 0; } -//----------------------------------------- -double Velocity::calculate_forces(){ - return -damp*contact.vnnr; +/* ---------------------------------------------------------------------- */ + +void DampingModel::coeffs_to_local() +{ + damp = contact.normal_model.damp; } -double MassVelocity::calculate_forces(){ - return -damp*contact.meff*contact.vnnr; +/* ---------------------------------------------------------------------- + Velocity damping +------------------------------------------------------------------------- */ + +double DampingVelocity::calculate_forces() +{ + return -damp * contact.vnnr; } +/* ---------------------------------------------------------------------- + Mass velocity damping +------------------------------------------------------------------------- */ -double ViscoElastic::calculate_forces(){ - return -damp*contact.meff*contact.area*contact.vnnr; +double MassVelocity::calculate_forces() +{ + return -damp * contact.meff * contact.vnnr; } +/* ---------------------------------------------------------------------- + Default, viscoelastic damping +------------------------------------------------------------------------- */ -void Tsuji::allocate_coeffs(){ - double cor = contact.normal_model->coeffs[1]; - damp = 1.2728-4.2783*cor+11.087*square(cor)-22.348*cube(cor)+ - 27.467*powint(cor,4)-18.022*powint(cor,5)+4.8218*powint(cor,6); +double ViscoElastic::calculate_forces() +{ + return -damp * contact.meff * contact.area * contact.vnnr; } -double Tsuji::calculate_forces(){ - return -damp*sqrt(contact.meff*contact.knfac)*contact.vnnr; +/* ---------------------------------------------------------------------- + Tsuji damping +------------------------------------------------------------------------- */ + +void Tsuji::coeffs_to_local() +{ + double tmp = contact.normal_model.damp; + damp = 1.2728 - 4.2783 * tmp + 11.087 * square(tmp); + damp += -22.348 * cube(tmp)+ 27.467 * powint(tmp, 4); + damp += -18.022 * powint(tmp, 5) + 4.8218 * powint(tmp,6); +} + +/* ---------------------------------------------------------------------- */ + +double Tsuji::calculate_forces() +{ + return -damp_scaled * sqrt(contact.meff * contact.normal_model.knfac) * contact.vnnr; } diff --git a/src/GRANULAR/contact_damping_models.h b/src/GRANULAR/contact_damping_models.h index 036f6e3452..0fc4fd2c17 100644 --- a/src/GRANULAR/contact_damping_models.h +++ b/src/GRANULAR/contact_damping_models.h @@ -19,34 +19,48 @@ namespace Contact { -class DampingModel:SubModel{ -public: - DampingModel(){}; - virtual ~DampingModel(){}; +class DampingModel:SubModel +{ + public: + DampingModel(); + virtual ~DampingModel() {}; virtual double calculate_forces() = 0; - virtual void allocate_coeffs(); + virtual void coeffs_to_local(); + virtual void mix_coeffs(NormalModel*, NormalModel*); double damp; }; -class Velocity:DampingModel{ -public: +/* ---------------------------------------------------------------------- */ + +class DampingVelocity:DampingModel +{ + public: double calculate_forces(); }; -class MassVelocity:DampingModel{ -public: +/* ---------------------------------------------------------------------- */ + +class DampingMassVelocity:DampingModel +{ + public: double calculate_forces(); }; -class ViscoElastic:DampingModel{ -public: +/* ---------------------------------------------------------------------- */ + +class DampingViscoElastic:DampingModel +{ + public: double calculate_forces(); }; -class Tsuji:DampingModel{ -public: +/* ---------------------------------------------------------------------- */ + +class DampingTsuji:DampingModel +{ + public: double calculate_forces(); - void allocate_coeffs(); + void coeffs_to_local(); }; diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index e17798ca25..9b1d85d123 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -29,124 +29,226 @@ namespace Contact{ #define ONETHIRD (1.0/3.0) // 1/3 #define THREEQUARTERS 0.75 // 3/4 -// ************************ -// Default behaviors where needed -// ************************ -void NormalModel::set_fncrit() +/* ---------------------------------------------------------------------- + Default normal model +------------------------------------------------------------------------- */ + +NormalModel::NormalModel() { - contact->Fncrit = fabs(contact->Fntot); + material_properties = 0; } -void NormalModel::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +/* ---------------------------------------------------------------------- */ + +void NormalModel::set_fncrit() { - for (int i = 0; i < num_coeffs; i++) { - coeffs[i] = sqrt(imodel->coeffs[i]*jmodel->coeffs[i]); - } + Fncrit = fabs(contact.Fntot); } +/* ---------------------------------------------------------------------- */ + void NormalModel::pulloff_distance(double radi, double radj) { return radi + radj; } -//----------------------------------------- +/* ---------------------------------------------------------------------- + Hookean normal force +------------------------------------------------------------------------- */ -//****************** -// Hooke -//****************** -void Hooke::Hooke(ContactModel &c) +void NormalHooke::NormalHooke() { num_coeffs = 2; allocate_coeffs(); } -void Hooke::coeffs_to_local() +/* ---------------------------------------------------------------------- */ + +void NormalHooke::coeffs_to_local() { k_norm = coeffs[0]; damp = coeffs[1]; } -double Hooke::calculate_forces() +/* ---------------------------------------------------------------------- */ + +void NormalHooke::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +{ + coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +double NormalHooke::calculate_forces() { contact.area = sqrt(contact.dR); - contact.knfac = k_norm * contact.area; - return contact.knfac * contact.delta; + knfac = k_norm * contact.area; + Fne = knfac * contact.delta; + return Fne; } +/* ---------------------------------------------------------------------- + Hertzian normal force +------------------------------------------------------------------------- */ -//****************** -// Hertz -//****************** -void Hertz::Hertz(ContactModel &c, int mat_flag) +void NormalHertz::NormalHertz() { - material_prop_flag = mat_flag; - if (material_prop_flag){ - num_coeffs = 3; - } - else{ - num_coeffs = 2; - } + num_coeffs = 2; } -void Hertz::coeffs_to_local() +/* ---------------------------------------------------------------------- */ + +void NormalHertz::coeffs_to_local() { - if (material_prop_flag){ - Emod = coeffs[0]; - poiss = coeffs[1]; - k_norm = 4/3*Emod; - } - else{ - k_norm = coeffs[0]; - } + k_norm = coeffs[0]; + damp = coeffs[1]; } -double Hertz::calculate_forces() +/* ---------------------------------------------------------------------- */ + +void NormalHertz::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +{ + coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +double NormalHertz::calculate_forces() { contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - return contact.knfac * contact.delta; + knfac = contact.k_norm * contact.area; + Fne = knfac * contact.delta; + return Fne; } -//****************** -// DMT -//****************** -void DMT::DMT(ContactModel &c) +/* ---------------------------------------------------------------------- + Hertzian normal force with material properties +------------------------------------------------------------------------- */ + +void NormalHertzMaterial::NormalHertzMaterial() { - material_prop_flag = 1; + material_properties = 1; + num_coeffs = 3; +} + +/* ---------------------------------------------------------------------- */ + +void NormalHertzMaterial::coeffs_to_local() +{ + Emod = coeffs[0]; + damp = coeffs[1]; + poiss = coeffs[2]; + k_norm = 4 / 3 * Emod; +} + +/* ---------------------------------------------------------------------- */ + +void NormalHertzMaterial::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +{ + coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- + DMT normal force +------------------------------------------------------------------------- */ + +void NormalDMT::NormalDMT(ContactModel &c) +{ + allow_limit_damping = 0; + material_properties = 1; num_coeffs = 4; } -double DMT::calculate_forces() +/* ---------------------------------------------------------------------- */ + +void NormalDMT::coeffs_to_local() +{ + Emod = coeffs[0]; + damp = coeffs[1]; + poiss = coeffs[2]; + cohesion = coeffs[3]; + k_norm = 4 / 3 * Emod; +} + +/* ---------------------------------------------------------------------- */ + +void NormalDMT::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +{ + coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs[3] = mix_geom(imodel->coeffs[3], jmodel->coeffs[3]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +double NormalDMT::calculate_forces() { contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - double Fne = contact.knfac * contact.delta; + knfac = k_norm * contact.area; + Fne = knfac * contact.delta; F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; Fne -= F_pulloff; return Fne; } -void DMT::set_fncrit() +/* ---------------------------------------------------------------------- */ + +void NormalDMT::set_fncrit() { - contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); + Fncrit = fabs(Fne + 2* F_pulloff); } -//****************** -// JKR -//****************** -void JKR::JKR(ContactModel &c) +/* ---------------------------------------------------------------------- + JKR normal force +------------------------------------------------------------------------- */ + +void NormalJKR::NormalJKR(ContactModel &c) { - material_prop_flag = 1; + allow_limit_damping = 0; + material_properties = 1; contact.beyond_contact = beyond_contact = 1; num_coeffs = 4; } -bool JKR::touch(int touch) +/* ---------------------------------------------------------------------- */ + +void NormalJKR::coeffs_to_local() { - double Escaled, R2, delta_pulloff, dist_pulloff; + Emod = coeffs[0]; + damp = coeffs[1]; + poiss = coeffs[2]; + cohesion = coeffs[3]; + k_norm = 4/3*Emod; + Escaled = k_norm * THREEQUARTERS; +} + +/* ---------------------------------------------------------------------- */ + +void NormalJKR::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +{ + coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs[3] = mix_geom(imodel->coeffs[3], jmodel->coeffs[3]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +bool NormalJKR::touch(int touch) +{ + double R2, delta_pulloff, dist_pulloff; bool touchflag; - Escaled = k_norm * THREEQUARTERS; if (touch) { R2 = contact.Reff * contact.Reff; a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); @@ -159,12 +261,12 @@ bool JKR::touch(int touch) return touchflag; } -double JKR::calculate_forces() -{ - double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; +/* ---------------------------------------------------------------------- */ - Escaled = k_norm * THREEQUARTERS; +double NormalJKR::calculate_forces() +{ + double R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3, a2; R2 = Reff * Reff; dR2 = dR * dR; @@ -180,28 +282,31 @@ double JKR::calculate_forces() sqrt2 = MAX(0, 2 * dR + t5); t6 = sqrt(sqrt2); sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); - a = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = a * a; - Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); + contact.area = INVROOT6 * (t6 + sqrt(sqrt3)); + a2 = contact.area * contact.area; + Fne = Escaled * contact.area * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * contact.area)); F_pulloff = 3 * MY_PI * cohesion * Reff; - knfac = Escaled * a; + knfac = Escaled * contact.area; return Fne; } -void JKR::set_fncrit() +/* ---------------------------------------------------------------------- */ + +void NormalJKR::set_fncrit() { - contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); + Fncrit = fabs(Fne + 2 * F_pulloff); } -void JKR::pulloff_distance(double radi, double radj) +/* ---------------------------------------------------------------------- */ + +void NormalJKR::pulloff_distance(double radi, double radj) { - double Ecaled, a_tmp, Reff_tmp; + double a_tmp, Reff_tmp; Reff_tmp = radi * radj / (radi + radj); if (Reff_tmp <= 0) return 0; - Ecaled = k_norm * THREEQUARTERS; a_tmp = cbrt(9 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4 * Ecaled)); return a_tmp * a_tmp / Reff_tmp - 2 * sqrt(MY_PI * cohesion * a_tmp / Ecaled); } diff --git a/src/GRANULAR/contact_normal_models.h b/src/GRANULAR/contact_normal_models.h index 7d54fc942b..e91d5af1c9 100644 --- a/src/GRANULAR/contact_normal_models.h +++ b/src/GRANULAR/contact_normal_models.h @@ -20,65 +20,91 @@ namespace Contact { class NormalModel:SubModel{ -public: - NormalModel(){}; - virtual ~NormalModel(){}; + public: + NormalModel(); + virtual ~NormalModel() {}; virtual bool check_contact(); - virtual void prep_contact(); virtual void set_fncrit(); virtual double calculate_forces() = 0; virtual void coeffs_to_local(); - virtual void mix_coeffs(NormalModel*, NormalModel*); //When mixing is needed + virtual void mix_coeffs(NormalModel*, NormalModel*); void pulloff_distance(double, double); - -private: - int size_history = 0; - int beyond_contact = 0; - int allow_limit_damping = 1; - + double damp; // Vestigial argument needed by damping + double Fncrit, Fne, knfac; + int material_properties; }; -class Hooke:NormalModel{ -public: - Hooke(); - ~Hooke(){}; +/* ---------------------------------------------------------------------- */ + +class NormalHooke:NormalModel +{ + public: + NormalHooke(); + ~NormalHooke() {}; void coeffs_to_local(); + void mix_coeffs(NormalModel*, NormalModel*); double calculate_forces(); -private: - double k_norm, damp; + double Emod, poiss; }; -class Hertz:NormalModel{ -public: - Hertz(int); - ~Hertz(){}; +/* ---------------------------------------------------------------------- */ + +class NormalHertz:NormalModel +{ + public: + NormalHertz(); + ~NormalHertz() {}; void coeffs_to_local(); + void mix_coeffs(NormalModel*, NormalModel*); double calculate_forces(); -private: - double k_norm, damp, Emod, poiss; + private: + double k_norm; }; -class DMT:NormalModel{ -public: - DMT(); - ~DMT(){}; +/* ---------------------------------------------------------------------- */ + +class NormalHertzMaterial:NormalHertz +{ + public: + NormalHertzMaterial(); + ~NormalHertzMaterial() {}; void coeffs_to_local(); - void coeffs_to_local(NormalModel*, NormalModel*); + void mix_coeffs(NormalModel*, NormalModel*); + private: + double k_norm; +}; + +/* ---------------------------------------------------------------------- */ + +class NormalDMT:NormalModel +{ + public: + NormalDMT(); + ~NormalDMT() {}; + void coeffs_to_local(); + void mix_coeffs(NormalModel*, NormalModel*); + void set_fncrit(); double calculate_forces(); -private: - double k_norm, damp, Emod, cohesion, poiss; + private: + double k_norm, cohesion; double F_pulloff; }; -class JKR:NormalModel{ -public: - JKR(); - ~JKR(){}; +/* ---------------------------------------------------------------------- */ + +class NormalJKR:NormalModel +{ + public: + NormalJKR(); + ~NormalJKR() {}; void coeffs_to_local(); + void mix_coeffs(NormalModel*, NormalModel*); + void set_fncrit(); double calculate_forces(); -private: - double k_norm, damp, Emod, cohesion, poiss; - double F_pulloff; + void pulloff_distance(double, double); + private: + double k_norm, cohesion; + double Escaled, F_pulloff; }; } diff --git a/src/GRANULAR/contact_sub_models.cpp b/src/GRANULAR/contact_sub_models.cpp index 8802622c78..99fcd638b4 100644 --- a/src/GRANULAR/contact_sub_models.cpp +++ b/src/GRANULAR/contact_sub_models.cpp @@ -29,30 +29,41 @@ namespace Contact{ SubModel::SubModel() { allocated = 0; - material_prop_flag = 0; size_history = 0; history_index = 0; + allow_limit_damping = 1; + beyond_contact = 0; } +/* ---------------------------------------------------------------------- */ + SubModel::~SubModel() { if (allocated) delete [] coeffs; } +/* ---------------------------------------------------------------------- */ + void SubModel::allocate_coeffs() { allocated = 1; coeffs = new double[num_coeffs]; } +/* ---------------------------------------------------------------------- */ + void SubModel::parse_coeffs(char **arg, int iarg) { for (int i = 0; i < num_coeffs; i++) { - coeffs[i] = utils::numeric(FLERR,arg[iarg+i+1],false,lmp); + // A few parameters (eg.g kt for tangential mindlin) allow null + if (strcmp(arg[iarg+i+1], "NULL") == 0) coeffs[i] = -1; + else coeffs[i] = utils::numeric(FLERR,arg[iarg+i+1],false,lmp); } coeffs_to_local(); } +/* ---------------------------------------------------------------------- */ + void SubModel::write_restart(FILE *fp) { fwrite(&model_name.length(),sizeof(int),1,fp); @@ -61,27 +72,61 @@ void SubModel::write_restart(FILE *fp) fwrite(coeffs,sizeof(int),num_coeffs,fp); } +/* ---------------------------------------------------------------------- */ + void SubModel::read_restart(FILE *fp, int num_char) { - if (comm->me == 0){ + if (comm->me == 0) { utils::sfread(FLERR,&num_coeffs,sizeof(int),1,fp,nullptr,error); } MPI_BCast(const_cast(model_name.data()), num_char, MPI_CHAR, world); allocate_coeffs(); } +/* ---------------------------------------------------------------------- */ + void SubModel::read_restart(FILE *fp) { int num_char; - if (me == 0){ + if (me == 0) { utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); } MPI_BCast(&num_char, 1, MPI_INT, 0, world); read_restart(fp, num_char); } +/* ---------------------------------------------------------------------- + mixing of Young's modulus (E) +------------------------------------------------------------------------- */ - - +double SubModel::mix_stiffnessE(double E1, double E2, + double pois1, double pois2) +{ + double factor1 = (1 - pois1 * pois1) / E1; + double factor2 = (1 - pois2 * pois2) / E2; + return 1 / (factor1 + factor2); } +/* ---------------------------------------------------------------------- + mixing of shear modulus (G) +------------------------------------------------------------------------ */ + +double SubModel::mix_stiffnessG(double E1, double E2, + double pois1, double pois2) +{ + double factor1 = 2 * (2 - pois1) * (1 + pois1) / E1; + double factor2 = 2 * (2 - pois2) * (1 + pois2) / E2) + return 1 / (factor1 + factor2); +} + +/* ---------------------------------------------------------------------- + mixing of everything else +------------------------------------------------------------------------- */ + +double SubModel::mix_geom(double val1, double val2) +{ + return sqrt(val1 * val2); +} + + +} \ No newline at end of file diff --git a/src/GRANULAR/contact_sub_models.h b/src/GRANULAR/contact_sub_models.h index 771f0f0890..f659ef1504 100644 --- a/src/GRANULAR/contact_sub_models.h +++ b/src/GRANULAR/contact_sub_models.h @@ -21,7 +21,7 @@ using namespace LAMMPS_NS; namespace Contact{ class SubModel : Pointers{ - SubModel(){}; + SubModel(); virtual ~SubModel(); public: int num_coeffs; @@ -35,13 +35,18 @@ public: void read_restart(FILE*, int); virtual void coeffs_to_local(); void allocate_coeffs(); - std::string model_name; + std::string name; private: ContactModel &contact; int allocated; - int material_prop_flag; int size_history; int history_index; + int beyond_contact; + int allow_limit_damping; + + double mix_stiffnessE(double, double, double, double); + double mix_stiffnessG(double, double, double, double); + double mix_geom(double, double); }; } diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index 1ceb940111..9f092aaf29 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -21,188 +21,101 @@ using namespace MathConst; namespace Contact{ -// ************************ -// Default behaviors where needed -// ************************ +/* ---------------------------------------------------------------------- + Linear model with no history +------------------------------------------------------------------------- */ -//----------------------------------------- - -//****************** -// Hooke -//****************** -void LinearNohistory::calculate_forces(){ - contact = c; +TangentialLinearNoHistory::TangentialLinearNoHistory() +{ num_coeffs = 2; - allocate_coeffs(); + size_history = 3; } -void Hooke::coeffs_to_local(){ - k_norm = coeffs[0]; - damp = coeffs[1]; -} - -double Hooke::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = k_norm * contact.area; - return contact.knfac * contact.delta; -} - - -//****************** -// Hertz -//****************** -void Hertz::Hertz(ContactModel &c, int mat_flag){ - contact = c; - material_prop_flag = mat_flag; - if (material_prop_flag){ - num_coeffs = 3; - } - else{ - num_coeffs = 2; - } - allocate_coeffs(); -} - -void Hertz::coeffs_to_local(){ - if (material_prop_flag){ - Emod = coeffs[0]; - poiss = coeffs[1]; - k_norm = 4/3*Emod; - } - else{ - k_norm = coeffs[0]; - } -} - -double Hertz::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - return contact.knfac * contact.delta; -} - -//****************** -// DMT -//****************** -void DMT::DMT(ContactModel &c){ - contact = c; - material_prop_flag = 1; - num_coeffs = 4; - allocate_coeffs(); -} - -double DMT::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - double Fne = contact.knfac * contact.delta; - F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; - Fne -= F_pulloff; - return Fne; -} - -void DMT::set_fncrit(){ - contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); -} - -//****************** -// JKR -//****************** -void JKR::JKR(ContactModel &c){ - contact = c; - material_prop_flag = 1; - beyond_contact = 1; - num_coeffs = 4; - allocate_coeffs(); -} - -bool JKR::touch(int touch){ - double Escaled, R2, delta_pulloff, dist_pulloff; - bool touchflag; - - Escaled = k_norm * THREEQUARTERS; - if (touch) { - R2 = contact.Reff * contact.Reff; - a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); - delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); - dist_pulloff = contact.radsum - delta_pulloff; - touchflag = (contact.rsq < dist_pulloff * dist_pulloff); - } else { - touchflag = (rcontact.sq < contact.radsum * contact.radsum); - } - return touchflag; -} - -double JKR::calculate_forces(){ - double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; - - Escaled = k_norm * THREEQUARTERS; - - R2 = Reff * Reff; - dR2 = dR * dR; - t0 = cohesion * cohesion * R2 * R2 * Escaled; - t1 = PI27SQ*t0; - t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; - t3 = 4 * dR2 * Escaled; - - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); - t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / Escaled; - sqrt2 = MAX(0, 2 * dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); - a = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = a * a; - Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); - F_pulloff = 3 * MY_PI * cohesion * Reff; - - knfac = Escaled * a; - return Fne; -} - -void JKR::set_fncrit(){ - contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); -} - - - - - /* ---------------------------------------------------------------------- */ -void ContactModel::tangential_no_history() +void TangentialLinearNoHistory::coeffs_to_local() { - double gamma_scaled = gamma_tang * damp_normal_prefactor; - double fsmag, Ft; + xt = coeffs[0]; + mu = coeffs[1]; + damp = xt * contact.damping_model.damp; +} + +/* ---------------------------------------------------------------------- */ + +void TangentialLinearNoHistory::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +{ + coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +void TangentialLinearNoHistory::calculate_forces() +{ + double Fscrit, fsmag, Ft; // classic pair gran/hooke (no history) - fsmag = gamma_scaled * vrel; - if (vrel != 0.0) Ft = MIN(Fscrit,fsmag) / vrel; + Fscrit = mu * contact.normal_model.Fncrit + fsmag = damp * contact.vrel; + if (contact.vrel != 0.0) Ft = MIN(Fscrit, fsmag) / contact.vrel; else Ft = 0.0; Ft = -Ft; - scale3(Ft, vtr, fs); + scale3(Ft, contact.vtr, contact.fs); +} + +/* ---------------------------------------------------------------------- + Linear model with history +------------------------------------------------------------------------- */ + +TangentialLinearHistory::TangentialLinearHistory() +{ + num_coeffs = 3; + size_history = 3; } /* ---------------------------------------------------------------------- */ -void ContactModel::tangential_history(double *history) +void TangentialLinearHistory::coeffs_to_local() { - double gamma_scaled = gamma_tang * damp_normal_prefactor; - double k = k_tang; + kt = coeffs[0]; + xt = coeffs[1]; + mu = coeffs[2]; + damp = xt * contact.damping_model.damp; +} + +/* ---------------------------------------------------------------------- */ + +void TangentialLinearHistory::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +{ + coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +void TangentialLinearHistory::calculate_forces() +{ + double Fscrit, magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; int frame_update = 0; - double magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; + + Fscrit = contact.normal_model.Fncrit * mu; + + double *history = & contact.history[history_index]; // rotate and update displacements / force. // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (history_update) { - rsht = dot3(history, nx); - frame_update = fabs(rsht) * k > EPSILON * Fscrit; + if (contact.history_update) { + rsht = dot3(history, contact.nx); + frame_update = fabs(rsht) * kt > EPSILON * Fscrit; if (frame_update) { shrmag = len3(history); // projection - scale3(rsht, nx, history); + scale3(rsht, contact.nx, history); // also rescale to preserve magnitude prjmag = len3(history); if (prjmag > 0) temp_dbl = shrmag / prjmag; @@ -213,54 +126,94 @@ void ContactModel::tangential_history(double *history) // update history // tangential force // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - temp_dbl = k * dt; - scale3(temp_dbl, vtr, temp_array); + temp_dbl = kt * contact.dt; + scale3(temp_dbl, contact.vtr, temp_array); sub3(history, temp_array, history); } // tangential forces = history + tangential velocity damping - temp_dbl = -gamma_norm; - scale3(temp_dbl, vtr, fs); + temp_dbl = -damp; + scale3(temp_dbl, contact.vtr, contact.fs); // rescale frictional displacements and forces if needed - magfs = len3(fs); + magfs = len3(contact.fs); if (magfs > Fscrit) { shrmag = len3(history); if (shrmag != 0.0) { temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs, history); - scale3(gamma_norm, vtr, temp_array); + scale3(temp_dbl, contact.fs, history); + scale3(damp, contact.vtr, temp_array); add3(history, temp_array, history); temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs); + scale3(temp_dbl, contact.fs); } else { - zero3(fs); + zero3(contact.fs); } } } +/* ---------------------------------------------------------------------- + Mindlin model +------------------------------------------------------------------------- */ + +TangentialMindlin::TangentialMindlin() +{ + num_coeffs = 3; + size_history = 3; + mindlin_force = 0; + mindlin_rescale = 0; +} + /* ---------------------------------------------------------------------- */ -void ContactModel::tangential_mindlin(double *history) +void TangentialMindlin::coeffs_to_local() { - double k_scaled, gamma_scaled, magfs, rsht, shrmag, prjmag, temp_dbl; + kt = coeffs[0]; + xt = coeffs[1]; + mu = coeffs[2]; + + if (ke == -1) + kt = 8.0 * mix_stiffness(contact.normal_model.Emod, contact.normal_model.Emod, + contact.normal_model.poiss, contact.normal_model.poiss); + + damp = xt * contact.damping_model.damp; +} + +/* ---------------------------------------------------------------------- */ + +void TangentialMindlin::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +{ + if (imodel->coeffs[0] == -1 || imodel->coeffs[0] == -1) coeffs[0] = -1; + else coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +void TangentialMindlin::calculate_forces() +{ + double Fscrit, k_scaled, magfs, rsht, shrmag, prjmag, temp_dbl; double temp_array[3]; int frame_update = 0; - gamma_scaled = gamma_tang * damp_normal_prefactor; - k_scaled = k_tang * a; + double *history = & contact.history[history_index]; + Fscrit = contact.normal_model.Fncrit * mu; + + k_scaled = k_tang * contact.area; if (mindlin_rescale) { // on unloading, rescale the shear displacements/force - if (a < history[3]) { - temp_dbl = a / history[3]; + if (contact.area < history[3]) { + temp_dbl = contact.area / history[3]; scale3(temp_dbl, history); } } // rotate and update displacements / force. // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (history_update) { - rsht = dot3(history, nx); + if (contact.history_update) { + rsht = dot3(history, contact.nx); if (mindlin_force) frame_update = fabs(rsht) > EPSILON * Fscrit; else @@ -269,7 +222,7 @@ void ContactModel::tangential_mindlin(double *history) if (frame_update) { shrmag = len3(history); // projection - scale3(rsht, nx, history); + scale3(rsht, contact.nx, history); // also rescale to preserve magnitude prjmag = len3(history); if (prjmag > 0) temp_dbl = shrmag / prjmag; @@ -281,44 +234,78 @@ void ContactModel::tangential_mindlin(double *history) if (mindlin_force) { // tangential force // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - temp_dbl = -k_scaled * dt; - scale3(temp_dbl, vtr, temp_array); + temp_dbl = -k_scaled * contact.dt; + scale3(temp_dbl, contact.vtr, temp_array); } else { - scale3(dt, vtr, temp_array); + scale3(contact.dt, contact.vtr, temp_array); } add3(history, temp_array, history); - if (mindlin_rescale) history[3] = a; + if (mindlin_rescale) history[3] = contact.area; } // tangential forces = history + tangential velocity damping - temp_dbl = -gamma_scaled; - scale3(temp_dbl, vtr, fs); + temp_dbl = -damp; + scale3(temp_dbl, contact.vtr, contact.fs); if (! mindlin_force) { scale3(k_scaled, history, temp_array); - add3(fs, temp_array, fs); + add3(contact.fs, temp_array, contact.fs); } // rescale frictional displacements and forces if needed - magfs = len3(fs); + magfs = len3(contact.fs); if (magfs > Fscrit) { shrmag = len3(history); if (shrmag != 0.0) { temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs, history); - scale3(gamma_tang, vtr, temp_array); + scale3(temp_dbl, contact.fs, history); + scale3(damp, contact.vtr, temp_array); add3(history, temp_array, history); if (! mindlin_force) { - temp_dbl = -1.0 / k_tang; + temp_dbl = -1.0 / k_scaled; scale3(temp_dbl, history); } temp_dbl = Fscrit / magfs; - scale3(temp_dbl, fs); + scale3(temp_dbl, contact.fs); } else { - zero3(fs); + zero3(contact.fs); } } } -/* ---------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- + Mindlin force model +------------------------------------------------------------------------- */ + +void TangentialMindlinForce::TangentialMindlinForce() +{ + num_coeffs = 3; + size_history = 3; + mindlin_force = 1; + mindlin_rescale = 0; +} + +/* ---------------------------------------------------------------------- + Mindlin rescale model +------------------------------------------------------------------------- */ + +void TangentialMindlinRescale::TangentialMindlinForce() +{ + num_coeffs = 3; + size_history = 4; + mindlin_force = 0; + mindlin_rescale = 1; +} + +/* ---------------------------------------------------------------------- + Mindlin rescale force model +------------------------------------------------------------------------- */ + +void TangentialMindlinRescaleForce::TangentialMindlinForce() +{ + num_coeffs = 3; + size_history = 4; + mindlin_force = 1; + mindlin_rescale = 1; +} diff --git a/src/GRANULAR/contact_tangential_models.h b/src/GRANULAR/contact_tangential_models.h index 207d129e7c..c0a5a727f0 100644 --- a/src/GRANULAR/contact_tangential_models.h +++ b/src/GRANULAR/contact_tangential_models.h @@ -19,59 +19,82 @@ namespace Contact { -class TangentialModel:SubModel{ +class TangentialModel:SubModel +{ public: - TangentialModel(){}; - virtual ~TangentialModel(){}; + TangentialModel() {}; + virtual ~TangentialModel() {}; virtual double calculate_forces() = 0; virtual void coeffs_to_local(); - virtual void mix_coeffs(TangentialModel*, TangentialModel*); //When mixing is needed - int rescale_flag = 0; + virtual void mix_coeffs(TangentialModel*, TangentialModel*); + int rescale_flag; private: - int beyond_contact = 0; - int allow_limit_damping = 1; - + int beyond_contact; + int allow_limit_damping; }; -class LinearNohistory:TangentialModel{ +/* ---------------------------------------------------------------------- */ + +class TangentialLinearNoHistory:TangentialModel +{ public: + TangentialLinearNoHistory() + virtual void coeffs_to_local(); + virtual void mix_coeffs(TangentialModel*, TangentialModel*); double calculate_forces(); private: - void allocate_coeffs(); - double k_t, damp; + double xt, damp, mu; }; -class LinearHistory:TangentialModel{ +/* ---------------------------------------------------------------------- */ + +class TangentialLinearHistory:TangentialModel +{ public: - LinearHistory(){} - ~LinearHistory(){}; - void coeffs_to_local(); + TangentialLinearHistory() + virtual void coeffs_to_local(); + virtual void mix_coeffs(TangentialModel*, TangentialModel*); double calculate_forces(); private: - double k_norm, damp, Emod, poiss; + double kt, xt, damp, mu; }; -class Mindlin:TangentialModel{ +/* ---------------------------------------------------------------------- */ + +class TangentialMindlin:TangentialModel +{ public: - Mindlin(int); - ~Mindlin(){}; + TangentialMindlin(); void coeffs_to_local(); void coeffs_to_local(TangentialModel*, TangentialModel*); double calculate_forces(); private: - double k_norm, damp, Emod, poiss, coh; + int mindlin_rescale, mindlin_force; }; -class MindlinForce:TangentialModel{ -public: - JKR(ContactModel &c); - ~JKR(){}; - void coeffs_to_local(); - double calculate_forces(); -private: - double k_norm, damp, Emod, poiss, coh; +/* ---------------------------------------------------------------------- */ +class TangentialMindlinForce:TangentialMindlin +{ +public: + TangentialMindlinForce(); +}; + +/* ---------------------------------------------------------------------- */ + +class TangentialMindlinRescale:TangentialMindlin +{ +public: + TangentialMindlinRescale(); +}; + +/* ---------------------------------------------------------------------- */ + +class TangentialMindlinRescaleForce:TangentialMindlinRescale +{ +public: + TangentialMindlinForceRescale(); }; } diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 7378df2f77..5816850ef2 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -376,7 +376,19 @@ void PairGranular::coeff(int narg, char **arg) //Parse optional arguments while (iarg < narg) { - if (strcmp(arg[iarg], "rolling") == 0) { + if (strcmp(arg[iarg], "damping") == 0) { + if (iarg + 1 >= narg) + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + vec_models.back().init(arg[iarg], Contact::DAMPING); + ncoeff = vec_models.back().damping_model.num_coeffs; + iarg += 1; + if (iarg + ncoeff >= narg) + error->all(FLERR, "Illegal pair_coeff command" + "Insufficient arguments provided for damping model."); + vec_models.back().damping_model.parse_coeffs(arg, iarg); + iarg += ncoeff; + + } else if (strcmp(arg[iarg], "rolling") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); vec_models.back().init(arg[iarg], Contact::ROLLING); @@ -409,7 +421,6 @@ void PairGranular::coeff(int narg, char **arg) if (iarg + ncoeff >= narg) error->all(FLERR, "Illegal pair_coeff command" "Insufficient arguments provided for heat model."); - ncoeff = vec_models.back().heat_model.num_coeffs; vec_models.back().heat_model.parse_coeffs(arg, iarg); iarg += ncoeff; heat_flag = 1; @@ -427,6 +438,12 @@ void PairGranular::coeff(int narg, char **arg) } else error->all(FLERR, "Illegal pair_coeff command"); } + // Define default damping model if unspecified, takes no args + if (!vec_models.back().damping_model) { + vec_models.back().init("viscoelastic", Contact::DAMPING); + vec_models.back().damping_model.parse_coeffs(arg, 0); + } + if (vec_models.back().limit_damping && !vec_models.back().normal_model->allow_limit_damping) error->all(FLERR,"Illegal pair_coeff command, " "Cannot limit damping with specified normal contact model"); @@ -584,11 +601,11 @@ double PairGranular::init_one(int i, int j) double cutoff = 0.0; if (setflag[i][j] == 0) { - if ((models[i][i]->normal_model != models[j][j]->normal_model) || - (models[i][i]->damping_model != models[j][j]->damping_model) || - (models[i][i]->tangential_model != models[j][j]->tangential_model) || - (models[i][i]->roll_model != models[j][j]->roll_model) || - (models[i][i]->twist_model != models[j][j]->twist_model)) { + if ((models[i][i]->normal_model.name != models[j][j]->normal_model.name) || + (models[i][i]->damping_model.name != models[j][j]->damping_model.name) || + (models[i][i]->tangential_model.name != models[j][j]->tangential_model.name) || + (models[i][i]->rolling_model.name != models[j][j]->rolling_model.name) || + (models[i][i]->twisting_model.name != models[j][j]->twisting_model.name)) { error->all(FLERR,"Granular pair style functional forms are different, " "cannot mix coefficients for types {} and {}. \n" "This combination must be set explicitly via a " @@ -597,6 +614,13 @@ double PairGranular::init_one(int i, int j) vec_models.push_back(ContactModel()); models[i][j] = models[j][i] = & vec_models.back(); + vec_models.back().init(models[i][i]->normal_model.name, Contact::NORMAL); + vec_models.back().init(models[i][i]->tangential_model.name, Contact::TANGENTIAL); + vec_models.back().init(models[i][i]->damping_model.name, Contact::DAMPING); + vec_models.back().init(models[i][i]->rolling_model.name, Contact::ROLLING); + vec_models.back().init(models[i][i]->twisting_model.name, Contact::TWISTING); + vec_models.back().init(models[i][i]->heat_model.name, Contact::HEAT); + vec_models.back().mix_coeffs(models[i][i], models[j][j]); } @@ -802,6 +826,7 @@ double PairGranular::single(int i, int j, int itype, int jtype, torquesj = models[itype][jtype]->torquesj; // apply forces & torques + fforce = MathExtra::len3(forces); // set single_extra quantities @@ -863,35 +888,6 @@ double PairGranular::memory_usage() return bytes; } -/* ---------------------------------------------------------------------- - mixing of Young's modulus (E) -------------------------------------------------------------------------- */ - -double PairGranular::mix_stiffnessE(double Eii, double Ejj, - double poisii, double poisjj) -{ - return 1/((1-poisii*poisii)/Eii+(1-poisjj*poisjj)/Ejj); -} - -/* ---------------------------------------------------------------------- - mixing of shear modulus (G) ------------------------------------------------------------------------- */ - -double PairGranular::mix_stiffnessG(double Eii, double Ejj, - double poisii, double poisjj) -{ - return 1/((2*(2-poisii)*(1+poisii)/Eii) + (2*(2-poisjj)*(1+poisjj)/Ejj)); -} - -/* ---------------------------------------------------------------------- - mixing of everything else -------------------------------------------------------------------------- */ - -double PairGranular::mix_geom(double valii, double valjj) -{ - return sqrt(valii*valjj); -} - /* ---------------------------------------------------------------------- transfer history during fix/neigh/history exchange only needed if any history entries i-j are not just negative of j-i entries diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index 503e3ed938..e018f9fe7c 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -88,10 +88,6 @@ class PairGranular : public Pair { // optional user-specified global cutoff, per-type user-specified cutoffs double **cutoff_type; double cutoff_global; - - double mix_stiffnessE(double, double, double, double); - double mix_stiffnessG(double, double, double, double); - double mix_geom(double, double); }; } // namespace LAMMPS_NS From 22de863da999a45f7fd3d16c270dedf5337a2665 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Mon, 1 Aug 2022 13:12:44 -0600 Subject: [PATCH 014/445] Fixing compilation errors and finishing model classes --- src/GRANULAR/contact.cpp | 209 ++++++++++------ src/GRANULAR/contact.h | 61 +++-- src/GRANULAR/contact_damping_models.cpp | 40 ++-- src/GRANULAR/contact_damping_models.h | 40 ++-- src/GRANULAR/contact_heat_models.cpp | 184 ++------------ src/GRANULAR/contact_heat_models.h | 83 ++----- src/GRANULAR/contact_normal_models.cpp | 184 ++++++++------ src/GRANULAR/contact_normal_models.h | 68 +++--- src/GRANULAR/contact_rolling_models.cpp | 236 +++++------------- src/GRANULAR/contact_rolling_models.h | 79 ++---- src/GRANULAR/contact_sub_models.cpp | 55 +---- src/GRANULAR/contact_sub_models.h | 42 ++-- src/GRANULAR/contact_tangential_models.cpp | 130 +++++----- src/GRANULAR/contact_tangential_models.h | 92 ++++--- src/GRANULAR/contact_twisting_models.cpp | 265 ++++++--------------- src/GRANULAR/contact_twisting_models.h | 81 ++----- src/GRANULAR/pair_granular.cpp | 169 +++++++------ src/GRANULAR/pair_granular.h | 6 +- src/contact.h | 129 +++++----- src/fix_neigh_history.cpp | 6 +- src/pair.h | 2 +- 21 files changed, 903 insertions(+), 1258 deletions(-) diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index 12a9476585..4358f6df1c 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -18,99 +18,140 @@ */ #include "contact.h" +#include "pointers.h" #include "math_const.h" #include "math_extra.h" -#include "pointers.h" +#include "contact_sub_models.h" +#include "contact_normal_models.h" +#include "contact_tangential_models.h" +#include "contact_damping_models.h" +#include "contact_rolling_models.h" +#include "contact_twisting_models.h" +#include "contact_heat_models.h" #include "comm.h" #include "error.h" #include -using namespace LAMMPS_NS; using namespace MathExtra; -using namespace MathConst; +using namespace LAMMPS_NS::MathConst; +using namespace LAMMPS_NS::Contact; -namespace Contact { - -enum {NORMAL, TANGENTIAL, DAMPING, ROLLING, TWISTING, HEAT} - -ContactModel::ContactModel() +ContactModel::ContactModel() : + Pointers(lmp) { limit_damping = 0; beyond_contact = 0; + nondefault_history_transfer = 0; cutoff_type = 0.0; - normal_model = nullptr; - tangential_model = nullptr; - damping_model = nullptr; - rolling_model = nullptr; - twisting_model = nullptr; + nmodels = 5; + reset_contact(); - sub_models = {nullptr}; + for (int i = 0; i < nmodels; i++) sub_models[i] = nullptr; } /* ---------------------------------------------------------------------- */ -void ContactModel::init_model(char *model_name, int model_type) +ContactModel::~ContactModel() +{ + delete[] transfer_history_factor; +} + +/* ---------------------------------------------------------------------- */ + +void ContactModel::init_model(std::string model_name, ModelType model_type) { if (model_type == NORMAL) { - if (strcmp(model_name, "hooke") == 0) normal_model = new NormalHooke(); - else if (strcmp(model_name, "hertz") == 0) normal_model = new NormalHertz(); - else if (strcmp(model_name, "hertz/material") == 0) normal_model = new NormalHertzMaterial(); - else if (strcmp(model_name, "dmt") == 0) normal_model = new NormalDMT(); - else if (strcmp(model_name, "jkr") == 0) normal_model = new NormalJKR(); + if (model_name == "hooke") normal_model = new NormalHooke(); + else if (model_name == "hertz") normal_model = new NormalHertz(); + else if (model_name == "hertz/material") normal_model = new NormalHertzMaterial(); + else if (model_name == "dmt") normal_model = new NormalDMT(); + else if (model_name == "jkr") normal_model = new NormalJKR(); else error->all(FLERR, "Normal model name not recognized"); - sub_models[model_type] = &normal_model; + sub_models[model_type] = normal_model; } else if (model_type == TANGENTIAL) { - if (strcmp(model_name, "linear_nohistory") == 0) tangential_model = new TangentialLinearNoHistory(); - else if (strcmp(model_name, "linear_history") == 0) tangential_model = new TangentialLinearHistory(); - else if (strcmp(model_name, "mindlin") == 0) tangential_model = new TangentialMindlin(); - else if (strcmp(model_name, "mindlin/force") == 0) tangential_model = new TangentialMindlinForce(); - else if (strcmp(model_name, "mindlin_rescale") == 0) tangential_model = new TangentialMindlinRescale(); - else if (strcmp(model_name, "mindlin_rescale/force") == 0) tangential_model = new TangentialMindlinRescaleForce(); + if (model_name =="linear_nohistory") tangential_model = new TangentialLinearNoHistory(); + else if (model_name =="linear_history") tangential_model = new TangentialLinearHistory(); + else if (model_name =="mindlin") tangential_model = new TangentialMindlin(); + else if (model_name =="mindlin/force") tangential_model = new TangentialMindlinForce(); + else if (model_name =="mindlin_rescale") tangential_model = new TangentialMindlinRescale(); + else if (model_name =="mindlin_rescale/force") tangential_model = new TangentialMindlinRescaleForce(); else error->all(FLERR, "Tangential model name not recognized"); - sub_models[model_type] = &tangential_model; + sub_models[model_type] = tangential_model; } else if (model_type == DAMPING) { - if (strcmp(model_name, "velocity") == 0) damping_model = new DampingVelocity(); - else if (strcmp(model_name, "mass_velocity") == 0) damping_model = new DampingMassVelocity(); - else if (strcmp(model_name, "viscoelastic") == 0) damping_model = new DampingViscoelastic(); - else if (strcmp(model_name, "tsuji") == 0) damping_model = new DampingTsuji(); + if (model_name =="velocity") damping_model = new DampingVelocity(); + else if (model_name =="mass_velocity") damping_model = new DampingMassVelocity(); + else if (model_name =="viscoelastic") damping_model = new DampingViscoelastic(); + else if (model_name =="tsuji") damping_model = new DampingTsuji(); else error->all(FLERR, "Damping model name not recognized"); - sub_models[model_type] = &damping_model; + sub_models[model_type] = damping_model; } else if (model_type == ROLLING) { - if (strcmp(model_name, "none") == 0) delete rolling_model; - else if (strcmp(model_name, "sds") == 0) rolling_model = new RollingSDS(); + if (model_name =="none") delete rolling_model; + else if (model_name =="sds") rolling_model = new RollingSDS(); else error->all(FLERR, "Rolling model name not recognized"); - sub_models[model_type] = &rolling_model; + sub_models[model_type] = rolling_model; } else if (model_type == TWISTING) { - if (strcmp(model_name, "none") == 0) delete twisting_model; - else if (strcmp(model_name, "sds") == 0) twisting_model = new TwistingSDS(); - else if (strcmp(model_name, "marshall") == 0) twisting_model = new TwistingMarshall(); + if (model_name =="none") delete twisting_model; + else if (model_name =="sds") twisting_model = new TwistingSDS(); + else if (model_name =="marshall") twisting_model = new TwistingMarshall(); else error->all(FLERR, "Twisting model name not recognized"); - sub_models[model_type] = &twisting_model; + sub_models[model_type] = twisting_model; } else if (model_type == HEAT) { - if (strcmp(model_name, "none") == 0) delete heat_model; - else if (strcmp(model_name, "area") == 0) heat_model = new HeatArea(); + if (model_name =="none") delete heat_model; + else if (model_name =="area") heat_model = new HeatArea(); else error->all(FLERR, "Heat model name not recognized"); - sub_models[model_type] = &heat_model; + sub_models[model_type] = heat_model; } sub_models[model_type]->name.assign(model_name); - sub_models[model_type]->contact = *this; + sub_models[model_type]->contact = this; sub_models[model_type]->allocate_coeffs(); } /* ---------------------------------------------------------------------- */ +void ContactModel::init() +{ + int i, j, size_cumulative; + for (i = 0; i < nmodels; i++) { + if (sub_models[i]->nondefault_history_transfer) + nondefault_history_transfer = 1; + if (sub_models[i]->beyond_contact) + beyond_contact = 1; + } + + transfer_history_factor = new double(size_history); + for (i = 0; i < size_history; i++) transfer_history_factor[i] = -1.0; + + if (nondefault_history_transfer) { + for (i = 0; i < size_history; i++) { + // Find which model controls this history value + size_cumulative = 0; + for (j = 0; j < nmodels; j++) { + if (size_cumulative + sub_models[j]->size_history > i) break; + size_cumulative += sub_models[j]->size_history; + } + + // Check if model has nondefault transfers, if so copy its array + if (sub_models[j]->nondefault_history_transfer) { + transfer_history_factor[i] = sub_models[j]->transfer_history_factor[i - size_cumulative]; + } + } + } +} + +/* ---------------------------------------------------------------------- */ + void ContactModel::mix_coeffs(ContactModel *c1, ContactModel *c2) { - for (int i = 0; i < 5; i++) - sum_model[i]->mix_coeffs(c1->submodel[i], c2->submodel[i]); + for (int i = 0; i < nmodels; i++) + sub_models[i]->mix_coeffs(c1->sub_models[i], c2->sub_models[i]); limit_damping = MAX(c1->limit_damping, c2->limit_damping); cutoff_type = MAX(c1->cutoff_type, c2->cutoff_type); @@ -120,11 +161,17 @@ void ContactModel::mix_coeffs(ContactModel *c1, ContactModel *c2) void ContactModel::write_restart(FILE *fp) { - int num_char = -1; + int num_char, num_coeffs; - for (int i = 0; i < 5; i++) { + for (int i = 0; i < nmodels; i++) { + num_char = -1; if (sub_models[i]) { - sub_models[i]->write_restart(fp); + num_char = sub_models[i]->name.length(); + num_coeffs = sub_models[i]->num_coeffs; + fwrite(&num_char, sizeof(int), 1, fp); + fwrite(sub_models[i]->name.data(), sizeof(char), num_char, fp); + fwrite(&num_coeffs, sizeof(int), 1, fp); + fwrite(sub_models[i]->coeffs, sizeof(int), num_coeffs, fp); } else { fwrite(&num_char, sizeof(int), 1, fp); } @@ -135,21 +182,34 @@ void ContactModel::write_restart(FILE *fp) void ContactModel::read_restart(FILE *fp) { - int num_char; + int num_char, num_coeff; - for (int i = 0; i < 5; i++) { + for (int i = 0; i < nmodels; i++) { if (comm->me == 0) - utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); - MPI_BCast(&num_char, 1, MPI_INT, 0, world); + utils::sfread(FLERR, &num_char, sizeof(int), 1, fp, nullptr, error); + MPI_Bcast(&num_char, 1, MPI_INT, 0, world); if (num_char != -1) { - std::string model_name(num_char); + std::string model_name (num_char, ' '); if (comm->me == 0) - utils::sfread(FLERR,const_cast(model_name.data()),sizeof(char),num_char,fp,nullptr, error); - MPI_BCast(const_cast(model_name.data()), num_char, MPI_CHAR, world); + utils::sfread(FLERR, const_cast(model_name.data()), sizeof(char),num_char, fp, nullptr, error); + MPI_Bcast(const_cast(model_name.data()), num_char, MPI_CHAR, 0, world); - init_model(const_cast(model_name.data(), i)); - sub_models[i]->read_restart(); + init_model(model_name, (ModelType) i); + + if (comm->me == 0) { + utils::sfread(FLERR, &num_coeff, sizeof(int), 1, fp, nullptr, error); + if (num_coeff != sub_models[i]->num_coeffs) + error->one(FLERR, "Invalid contact model written to restart file"); + } + MPI_Bcast(&num_coeff, 1, MPI_INT, 0, world); + + if (comm->me == 0) { + utils::sfread(FLERR, sub_models[i]->coeffs, sizeof(int), num_coeff, fp, nullptr, error); + } + MPI_Bcast(sub_models[i]->coeffs, num_coeff, MPI_DOUBLE, 0, world); + + sub_models[i]->coeffs_to_local(); } } } @@ -158,7 +218,7 @@ void ContactModel::read_restart(FILE *fp) void ContactModel::reset_contact() { - radi = radj = Fntot = Fncrit = magtortwist = 0.0; + radi = radj = Fntot = magtortwist = 0.0; xi = xj = vi = vj = omegai = omegaj = nullptr; forces = torquesi = torquesj = history = nullptr; @@ -177,10 +237,7 @@ bool ContactModel::check_contact() radsum = radi + radj; Reff = radi * radj / radsum; - touch = false; - if (normal_model.beyond_contact) normal_model.touch(touch); - else touch = (rsq < radsum*radsum); - + touch = normal_model->touch(); return touch; } @@ -220,7 +277,7 @@ void ContactModel::prep_contact() sub3(vt, temp, vtr); vrel = len3(vtr); - if (roll_model || twist_model) + if (rolling_model || twisting_model) sub3(omegai, omegaj, relrot); if (rolling_model) { @@ -250,20 +307,24 @@ void ContactModel::calculate_forces() } //********************************************** - // normal forces + // calculate forces //********************************************** double Fne, Fdamp; - Fne = normal_model.calculate_forces(); - Fdamp = damping_model.calculate_forces(); + area = normal_model->calculate_area(); + Fne = normal_model->calculate_forces(); + normal_model->set_knfac(); // Needed for damping + + Fdamp = damping_model->calculate_forces(); + + normal_model->set_fncrit(); // Needed for tangential, rolling, twisting Fntot = Fne + Fdamp; if (limit_damping && Fntot < 0.0) Fntot = 0.0; - normal_model.set_fncrit(); - tangential_model.calculate_forces(); - if (rolling_model) rolling_model.calculate_forces(); - if (twisting_model) twisting_model.calculate_forces(); + tangential_model->calculate_forces(); + if (rolling_model) rolling_model->calculate_forces(); + if (twisting_model) twisting_model->calculate_forces(); //********************************************** // sum contributions @@ -301,7 +362,7 @@ void ContactModel::calculate_forces() double ContactModel::calculate_heat() { - return heat_model.calculate_heat(); + return heat_model->calculate_heat(); } /* ---------------------------------------------------------------------- @@ -311,7 +372,5 @@ double ContactModel::calculate_heat() double ContactModel::pulloff_distance(double radi, double radj) { - return normal_model.pulloff_distance(radi, radj); -} - + return normal_model->pulloff_distance(radi, radj); } diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index f9f18a1eb4..96758771b4 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -14,32 +14,44 @@ #ifndef LMP_CONTACT_H #define LMP_CONTACT_H -#include "pointers.h" -#include "normal_contact_models.h" -#include "tangential_contact_models.h" -#include "damping_contact_models.h" -#include "rolling_contact_models.h" -#include "twisting_contact_models.h" -#include "heat_models.h" - -using namespace LAMMPS_NS; +#include "pointers.h" // IWYU pragma: export +namespace LAMMPS_NS { namespace Contact { +enum ModelType { + NORMAL = 0, + DAMPING = 1, + TANGENTIAL = 2, + ROLLING = 3, + TWISTING = 4, + HEAT = 5 +}; + #define EPSILON 1e-10 +// forward declaration +class NormalModel; +class DampingModel; +class TangentialModel; +class RollingModel; +class TwistingModel; +class HeatModel; +class SubModel; + class ContactModel : protected Pointers { -public: + public: ContactModel(); ~ContactModel(); - int init(); + void init(); bool check_contact(); void reset_contact(); + void prep_contact(); void calculate_forces(); double calculate_heat(); double pulloff_distance(double, double); - void init_model(char*, int); + void init_model(std::string, ModelType); void mix_coeffs(ContactModel*, ContactModel*); @@ -47,21 +59,25 @@ public: void read_restart(FILE *); // Sub models - NormalModel normal_model; - DampingModel damping_model; - TangentialModel tangential_model; - RollingModel rolling_model; - TwistingModel twisting_model; - HeatModel heat_model; + NormalModel *normal_model; + DampingModel *damping_model; + TangentialModel *tangential_model; + RollingModel *rolling_model; + TwistingModel *twisting_model; + HeatModel *heat_model; SubModel *sub_models[6]; // Need to resize if we add more model flavors // Extra options - int beyond_contact, limit_damping; + int beyond_contact, limit_damping, history_update; double cutoff_type; + // History variables + int size_history, nondefault_history_transfer; + double *transfer_history_factor; + double *history; + // Contact properties/output double *forces, *torquesi, *torquesj; - double *history; double radi, radj, meff, dt, Ti, Tj, area; double Fntot, magtortwist; @@ -69,15 +85,18 @@ public: double *xi, *xj, *vi, *vj, *omegai, *omegaj; double fs[3], fr[3], ft[3]; -private: double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; double magtwist; bool touch; + protected: + int prep_flag, check_flag; + int nmodels; }; } // namespace Contact +} // namespace LAMMPS_NS #endif diff --git a/src/GRANULAR/contact_damping_models.cpp b/src/GRANULAR/contact_damping_models.cpp index 1e233234b2..7a79c6946c 100644 --- a/src/GRANULAR/contact_damping_models.cpp +++ b/src/GRANULAR/contact_damping_models.cpp @@ -11,33 +11,22 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "damping_contact_models.h" -#include "math_const.h" +#include "contact_damping_models.h" +#include "contact_normal_models.h" #include "contact.h" - -#include #include "math_special.h" -using namespace MathConst; +using namespace LAMMPS_NS; +using namespace Contact; using namespace MathSpecial; -namespace Contact{ - - /* ---------------------------------------------------------------------- Default damping model ------------------------------------------------------------------------- */ -void DampingModel::DampingModel() -{ - num_coeffs = 0; -} - -/* ---------------------------------------------------------------------- */ - void DampingModel::coeffs_to_local() { - damp = contact.normal_model.damp; + damp = contact->normal_model->damp; } /* ---------------------------------------------------------------------- @@ -46,34 +35,34 @@ void DampingModel::coeffs_to_local() double DampingVelocity::calculate_forces() { - return -damp * contact.vnnr; + return -damp * contact->vnnr; } /* ---------------------------------------------------------------------- Mass velocity damping ------------------------------------------------------------------------- */ -double MassVelocity::calculate_forces() +double DampingMassVelocity::calculate_forces() { - return -damp * contact.meff * contact.vnnr; + return -damp * contact->meff * contact->vnnr; } /* ---------------------------------------------------------------------- Default, viscoelastic damping ------------------------------------------------------------------------- */ -double ViscoElastic::calculate_forces() +double DampingViscoelastic::calculate_forces() { - return -damp * contact.meff * contact.area * contact.vnnr; + return -damp * contact->meff * contact->area * contact->vnnr; } /* ---------------------------------------------------------------------- Tsuji damping ------------------------------------------------------------------------- */ -void Tsuji::coeffs_to_local() +void DampingTsuji::coeffs_to_local() { - double tmp = contact.normal_model.damp; + double tmp = contact->normal_model->damp; damp = 1.2728 - 4.2783 * tmp + 11.087 * square(tmp); damp += -22.348 * cube(tmp)+ 27.467 * powint(tmp, 4); damp += -18.022 * powint(tmp, 5) + 4.8218 * powint(tmp,6); @@ -81,8 +70,7 @@ void Tsuji::coeffs_to_local() /* ---------------------------------------------------------------------- */ -double Tsuji::calculate_forces() +double DampingTsuji::calculate_forces() { - return -damp_scaled * sqrt(contact.meff * contact.normal_model.knfac) * contact.vnnr; + return -damp * sqrt(contact->meff * contact->normal_model->knfac) * contact->vnnr; } - diff --git a/src/GRANULAR/contact_damping_models.h b/src/GRANULAR/contact_damping_models.h index 0fc4fd2c17..440ab36369 100644 --- a/src/GRANULAR/contact_damping_models.h +++ b/src/GRANULAR/contact_damping_models.h @@ -11,60 +11,54 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef DAMPING_CONTACT_MODELS_H_ -#define DAMPING_CONTACT_MODELS_H_ +#ifndef CONTACT_DAMPING_MODELS_H_ +#define CONTACT_DAMPING_MODELS_H_ -#include "contact.h"; -#include "sub_model.h" +#include "contact_sub_models.h" +namespace LAMMPS_NS { namespace Contact { -class DampingModel:SubModel -{ +class DampingModel : public SubModel { public: - DampingModel(); - virtual ~DampingModel() {}; - virtual double calculate_forces() = 0; + DampingModel() {}; + ~DampingModel() {}; virtual void coeffs_to_local(); - virtual void mix_coeffs(NormalModel*, NormalModel*); + virtual void mix_coeffs(DampingModel*, DampingModel*) {}; + virtual double calculate_forces() = 0; double damp; }; /* ---------------------------------------------------------------------- */ -class DampingVelocity:DampingModel -{ +class DampingVelocity: public DampingModel { public: double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class DampingMassVelocity:DampingModel -{ +class DampingMassVelocity: public DampingModel { public: double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class DampingViscoElastic:DampingModel -{ +class DampingViscoelastic: public DampingModel { public: double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class DampingTsuji:DampingModel -{ +class DampingTsuji: public DampingModel { public: - double calculate_forces(); void coeffs_to_local(); + double calculate_forces(); }; +} // namespace Contact +} // namespace LAMMPS_NS -} - -#endif /*DAMPING_CONTACT_MODELS_H_ */ - +#endif /*CONTACT_DAMPING_MODELS_H_ */ diff --git a/src/GRANULAR/contact_heat_models.cpp b/src/GRANULAR/contact_heat_models.cpp index e6bafe4b3c..29134b3e73 100644 --- a/src/GRANULAR/contact_heat_models.cpp +++ b/src/GRANULAR/contact_heat_models.cpp @@ -11,175 +11,39 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "normal_contact_models.h" -#include "math_const.h" +#include "contact_heat_models.h" #include "contact.h" -#include +using namespace LAMMPS_NS; +using namespace Contact; -using namespace MathConst; +/* ---------------------------------------------------------------------- + Area-based heat conduction +------------------------------------------------------------------------- */ -namespace Contact{ - -#define PI27SQ 266.47931882941264802866 // 27*PI**2 -#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) -#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) -#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) -#define FOURTHIRDS (4.0/3.0) // 4/3 -#define ONETHIRD (1.0/3.0) // 1/3 -#define THREEQUARTERS 0.75 // 3/4 - -// ************************ -// Default behaviors where needed -// ************************ -void NormalModel::set_fncrit(){ - contact->Fncrit = fabs(contact->Fntot); +HeatArea::HeatArea() +{ + num_coeffs = 1; } -void NormalModel::mix_coeffs(NormalModel* imodel, NormalModel* jmodel){ - for (int i = 0; i < num_coeffs; i++){ - coeffs[i] = sqrt(imodel->coeffs[i]*jmodel->coeffs[i]); - } +/* ---------------------------------------------------------------------- */ + +void HeatArea::coeffs_to_local() +{ + conductivity = coeffs[0]; } -//----------------------------------------- +/* ---------------------------------------------------------------------- */ -//****************** -// Hooke -//****************** -void Hooke::Hooke(ContactModel &c){ - contact = c; - num_coeffs = 2; - allocate_coeffs(); +void HeatArea::mix_coeffs(HeatModel* imodel, HeatModel* jmodel) +{ + coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs_to_local(); } -void Hooke::coeffs_to_local(){ - k_norm = coeffs[0]; - damp = coeffs[1]; +/* ---------------------------------------------------------------------- */ + +double HeatArea::calculate_heat() +{ + return conductivity * contact->area * (contact->Ti - contact->Tj); } - -double Hooke::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = k_norm * contact.area; - return contact.knfac * contact.delta; -} - - -//****************** -// Hertz -//****************** -void Hertz::Hertz(ContactModel &c, int mat_flag){ - contact = c; - material_prop_flag = mat_flag; - if (material_prop_flag){ - num_coeffs = 3; - } - else{ - num_coeffs = 2; - } - allocate_coeffs(); -} - -void Hertz::coeffs_to_local(){ - if (material_prop_flag){ - Emod = coeffs[0]; - poiss = coeffs[1]; - k_norm = 4/3*Emod; - } - else{ - k_norm = coeffs[0]; - } -} - -double Hertz::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - return contact.knfac * contact.delta; -} - -//****************** -// DMT -//****************** -void DMT::DMT(ContactModel &c){ - contact = c; - material_prop_flag = 1; - num_coeffs = 4; - allocate_coeffs(); -} - -double DMT::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - double Fne = contact.knfac * contact.delta; - F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; - Fne -= F_pulloff; - return Fne; -} - -void DMT::set_fncrit(){ - contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); -} - -//****************** -// JKR -//****************** -void JKR::JKR(ContactModel &c){ - contact = c; - material_prop_flag = 1; - beyond_contact = 1; - num_coeffs = 4; - allocate_coeffs(); -} - -bool JKR::touch(int touch){ - double Escaled, R2, delta_pulloff, dist_pulloff; - bool touchflag; - - Escaled = k_norm * THREEQUARTERS; - if (touch) { - R2 = contact.Reff * contact.Reff; - a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); - delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); - dist_pulloff = contact.radsum - delta_pulloff; - touchflag = (contact.rsq < dist_pulloff * dist_pulloff); - } else { - touchflag = (rcontact.sq < contact.radsum * contact.radsum); - } - return touchflag; -} - -double JKR::calculate_forces(){ - double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; - - Escaled = k_norm * THREEQUARTERS; - - R2 = Reff * Reff; - dR2 = dR * dR; - t0 = cohesion * cohesion * R2 * R2 * Escaled; - t1 = PI27SQ*t0; - t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; - t3 = 4 * dR2 * Escaled; - - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); - t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / Escaled; - sqrt2 = MAX(0, 2 * dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); - a = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = a * a; - Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); - F_pulloff = 3 * MY_PI * cohesion * Reff; - - knfac = Escaled * a; - return Fne; -} - -void JKR::set_fncrit(){ - contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); -} - - - diff --git a/src/GRANULAR/contact_heat_models.h b/src/GRANULAR/contact_heat_models.h index 1a2f1ddb7d..469a53cb13 100644 --- a/src/GRANULAR/contact_heat_models.h +++ b/src/GRANULAR/contact_heat_models.h @@ -11,73 +11,36 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef NORMAL_CONTACT_MODELS_H_ -#define NORMAL_CONTACT_MODELS_H_ +#ifndef CONTACT_HEAT_MODELS_H_ +#define CONTACT_HEAT_MODELS_H_ -#include "contact.h"; -#include "sub_model.h" +#include "contact_sub_models.h" +namespace LAMMPS_NS { namespace Contact { -class NormalModel:SubModel{ -public: - NormalModel(){}; - virtual ~NormalModel(){}; - virtual bool check_contact(); - virtual void prep_contact(); - virtual void set_fncrit(); - virtual double calculate_forces() = 0; - virtual void coeffs_to_local(); - virtual void mix_coeffs(NormalModel*, NormalModel*); //When mixing is needed - -private: - int beyond_contact = 0; - int allow_limit_damping = 1; - +class HeatModel : public SubModel { + public: + HeatModel() {}; + ~HeatModel() {}; + virtual void coeffs_to_local() {}; + virtual void mix_coeffs(HeatModel*, HeatModel*) {}; + virtual double calculate_heat() = 0; }; -class Hooke:NormalModel{ -public: - Hooke(ContactModel &c); - ~Hooke(){}; +/* ---------------------------------------------------------------------- */ + +class HeatArea: public HeatModel { + public: + HeatArea(); void coeffs_to_local(); - double calculate_forces(); -private: - double k_norm, damp; + void mix_coeffs(HeatModel*, HeatModel*); + double calculate_heat(); + private: + double conductivity; }; -class Hertz:NormalModel{ -public: - Hertz(ContactModel&, int); - ~Hertz(){}; - void coeffs_to_local(); - double calculate_forces(); -private: - double k_norm, damp, Emod, poiss; -}; - -class DMT:NormalModel{ -public: - DMT(ContactModel &c); - ~DMT(){}; - void coeffs_to_local(); - void coeffs_to_local(NormalModel*, NormalModel*); - double calculate_forces(); -private: - double k_norm, damp, Emod, poiss, coh; -}; - -class JKR:NormalModel{ -public: - JKR(ContactModel &c); - ~JKR(){}; - void coeffs_to_local(); - double calculate_forces(); -private: - double k_norm, damp, Emod, poiss, coh; - -}; -} - -#endif /*NORMAL_CONTACT_MODELS_H_ */ +} // namespace Contact +} // namespace LAMMPS_NS +#endif /*CONTACT_HEAT_MODELS_H_ */ diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index 9b1d85d123..c11fddb1d7 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -12,15 +12,13 @@ ------------------------------------------------------------------------- */ #include "contact_normal_models.h" -#include "math_const.h" #include "contact.h" +#include "math_const.h" -#include - +using namespace LAMMPS_NS; +using namespace Contact; using namespace MathConst; -namespace Contact{ - #define PI27SQ 266.47931882941264802866 // 27*PI**2 #define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) #define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) @@ -40,23 +38,40 @@ NormalModel::NormalModel() /* ---------------------------------------------------------------------- */ -void NormalModel::set_fncrit() +bool NormalModel::touch() { - Fncrit = fabs(contact.Fntot); + bool touchflag = (contact->rsq < contact->radsum * contact->radsum); + return touchflag; +} + +/* ---------------------------------------------------------------------- + called outside of compute(), do not assume geometry defined in contact +------------------------------------------------------------------------- */ + +double NormalModel::pulloff_distance(double radi, double radj) +{ + return radi + radj; } /* ---------------------------------------------------------------------- */ -void NormalModel::pulloff_distance(double radi, double radj) +double NormalModel::calculate_area() { - return radi + radj; + return sqrt(contact->dR); +} + +/* ---------------------------------------------------------------------- */ + +void NormalModel::set_fncrit() +{ + Fncrit = fabs(contact->Fntot); } /* ---------------------------------------------------------------------- Hookean normal force ------------------------------------------------------------------------- */ -void NormalHooke::NormalHooke() +NormalHooke::NormalHooke() { num_coeffs = 2; allocate_coeffs(); @@ -66,7 +81,7 @@ void NormalHooke::NormalHooke() void NormalHooke::coeffs_to_local() { - k_norm = coeffs[0]; + k = coeffs[0]; damp = coeffs[1]; } @@ -83,17 +98,22 @@ void NormalHooke::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) double NormalHooke::calculate_forces() { - contact.area = sqrt(contact.dR); - knfac = k_norm * contact.area; - Fne = knfac * contact.delta; + Fne = knfac * contact->delta; return Fne; } +/* ---------------------------------------------------------------------- */ + +void NormalHooke::set_knfac() +{ + knfac = k * contact->area; +} + /* ---------------------------------------------------------------------- Hertzian normal force ------------------------------------------------------------------------- */ -void NormalHertz::NormalHertz() +NormalHertz::NormalHertz() { num_coeffs = 2; } @@ -102,7 +122,7 @@ void NormalHertz::NormalHertz() void NormalHertz::coeffs_to_local() { - k_norm = coeffs[0]; + k = coeffs[0]; damp = coeffs[1]; } @@ -119,17 +139,23 @@ void NormalHertz::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) double NormalHertz::calculate_forces() { - contact.area = sqrt(contact.dR); - knfac = contact.k_norm * contact.area; - Fne = knfac * contact.delta; + contact->area = sqrt(contact->dR); + Fne = knfac * contact->delta; return Fne; } +/* ---------------------------------------------------------------------- */ + +void NormalHertz::set_knfac() +{ + knfac = k * contact->area; +} + /* ---------------------------------------------------------------------- Hertzian normal force with material properties ------------------------------------------------------------------------- */ -void NormalHertzMaterial::NormalHertzMaterial() +NormalHertzMaterial::NormalHertzMaterial() { material_properties = 1; num_coeffs = 3; @@ -142,7 +168,7 @@ void NormalHertzMaterial::coeffs_to_local() Emod = coeffs[0]; damp = coeffs[1]; poiss = coeffs[2]; - k_norm = 4 / 3 * Emod; + k = 4 / 3 * Emod; } /* ---------------------------------------------------------------------- */ @@ -159,7 +185,7 @@ void NormalHertzMaterial::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) DMT normal force ------------------------------------------------------------------------- */ -void NormalDMT::NormalDMT(ContactModel &c) +NormalDMT::NormalDMT() { allow_limit_damping = 0; material_properties = 1; @@ -174,7 +200,7 @@ void NormalDMT::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; cohesion = coeffs[3]; - k_norm = 4 / 3 * Emod; + k = 4 / 3 * Emod; } /* ---------------------------------------------------------------------- */ @@ -192,30 +218,35 @@ void NormalDMT::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) double NormalDMT::calculate_forces() { - contact.area = sqrt(contact.dR); - knfac = k_norm * contact.area; - Fne = knfac * contact.delta; - F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; + Fne = knfac * contact->delta; + F_pulloff = 4 * MathConst::MY_PI * cohesion * contact->Reff; Fne -= F_pulloff; return Fne; } /* ---------------------------------------------------------------------- */ +void NormalDMT::set_knfac() +{ + knfac = k * contact->area; +} + +/* ---------------------------------------------------------------------- */ + void NormalDMT::set_fncrit() { - Fncrit = fabs(Fne + 2* F_pulloff); + Fncrit = fabs(Fne + 2 * F_pulloff); } /* ---------------------------------------------------------------------- JKR normal force ------------------------------------------------------------------------- */ -void NormalJKR::NormalJKR(ContactModel &c) +NormalJKR::NormalJKR() { allow_limit_damping = 0; material_properties = 1; - contact.beyond_contact = beyond_contact = 1; + beyond_contact = 1; num_coeffs = 4; } @@ -227,8 +258,8 @@ void NormalJKR::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; cohesion = coeffs[3]; - k_norm = 4/3*Emod; - Escaled = k_norm * THREEQUARTERS; + k = 4/3*Emod; + Escaled = k * THREEQUARTERS; } /* ---------------------------------------------------------------------- */ @@ -244,70 +275,83 @@ void NormalJKR::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) /* ---------------------------------------------------------------------- */ -bool NormalJKR::touch(int touch) +bool NormalJKR::touch() { - double R2, delta_pulloff, dist_pulloff; + double area_at_pulloff, R2, delta_pulloff, dist_pulloff; bool touchflag; - if (touch) { - R2 = contact.Reff * contact.Reff; - a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); - delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); - dist_pulloff = contact.radsum - delta_pulloff; - touchflag = (contact.rsq < dist_pulloff * dist_pulloff); - } else { - touchflag = (rcontact.sq < contact.radsum * contact.radsum); - } + R2 = contact->Reff * contact->Reff; + area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); + delta_pulloff = area_at_pulloff * area_at_pulloff / contact->Reff - 2 * sqrt(MY_PI * cohesion * area_at_pulloff /Escaled); + dist_pulloff = contact->radsum - delta_pulloff; + touchflag = (contact->rsq < dist_pulloff * dist_pulloff); + return touchflag; } +/* ---------------------------------------------------------------------- + called outside of compute(), do not assume geometry defined in contact +------------------------------------------------------------------------- */ + +double NormalJKR::pulloff_distance(double radi, double radj) +{ + double area_at_pulloff, Reff_tmp; + + Reff_tmp = radi * radj / (radi + radj); // May not be defined + if (Reff_tmp <= 0) return 0; + + area_at_pulloff = cbrt(9 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4 * Escaled)); + return area_at_pulloff * area_at_pulloff / Reff_tmp - 2 * sqrt(MY_PI * cohesion * area_at_pulloff / Escaled); +} + /* ---------------------------------------------------------------------- */ -double NormalJKR::calculate_forces() +double NormalJKR::calculate_area() { double R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a2; + double sqrt1, sqrt2, sqrt3; - R2 = Reff * Reff; - dR2 = dR * dR; + R2 = contact->Reff * contact->Reff; + dR2 = contact->dR * contact->dR; t0 = cohesion * cohesion * R2 * R2 * Escaled; - t1 = PI27SQ*t0; - t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; + t1 = PI27SQ * t0; + t2 = 8 * contact->dR * dR2 * Escaled * Escaled * Escaled; t3 = 4 * dR2 * Escaled; // in case sqrt(0) < 0 due to precision issues sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); t5 = t3 / t4 + t4 / Escaled; - sqrt2 = MAX(0, 2 * dR + t5); + sqrt2 = MAX(0, 2 * contact->dR + t5); t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); - contact.area = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = contact.area * contact.area; - Fne = Escaled * contact.area * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * contact.area)); - F_pulloff = 3 * MY_PI * cohesion * Reff; + sqrt3 = MAX(0, 4 * contact->dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + + return INVROOT6 * (t6 + sqrt(sqrt3)); +} + +/* ---------------------------------------------------------------------- */ + +double NormalJKR::calculate_forces() +{ + double a2; + + a2 = contact->area * contact->area; + Fne = Escaled * contact->area * a2 / contact->Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * contact->area)); + F_pulloff = 3 * MY_PI * cohesion * contact->Reff; - knfac = Escaled * contact.area; return Fne; } /* ---------------------------------------------------------------------- */ +void NormalJKR::set_knfac() +{ + knfac = Escaled * contact->area; +} + +/* ---------------------------------------------------------------------- */ + void NormalJKR::set_fncrit() { Fncrit = fabs(Fne + 2 * F_pulloff); } - -/* ---------------------------------------------------------------------- */ - -void NormalJKR::pulloff_distance(double radi, double radj) -{ - double a_tmp, Reff_tmp; - - Reff_tmp = radi * radj / (radi + radj); - if (Reff_tmp <= 0) return 0; - - a_tmp = cbrt(9 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4 * Ecaled)); - return a_tmp * a_tmp / Reff_tmp - 2 * sqrt(MY_PI * cohesion * a_tmp / Ecaled); -} - diff --git a/src/GRANULAR/contact_normal_models.h b/src/GRANULAR/contact_normal_models.h index e91d5af1c9..74e2800eaa 100644 --- a/src/GRANULAR/contact_normal_models.h +++ b/src/GRANULAR/contact_normal_models.h @@ -11,102 +11,108 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef NORMAL_CONTACT_MODELS_H_ -#define NORMAL_CONTACT_MODELS_H_ +#ifndef CONTACT_NORMAL_MODELS_H_ +#define CONTACT_NORMAL_MODELS_H_ -#include "contact.h"; -#include "sub_model.h" +#include "contact_sub_models.h" +namespace LAMMPS_NS { namespace Contact { -class NormalModel:SubModel{ +class NormalModel : public SubModel { public: NormalModel(); - virtual ~NormalModel() {}; - virtual bool check_contact(); - virtual void set_fncrit(); + ~NormalModel() {}; + virtual void coeffs_to_local() {}; + virtual void mix_coeffs(NormalModel*, NormalModel*) {}; + virtual bool touch(); + virtual double pulloff_distance(double, double); + virtual double calculate_area(); virtual double calculate_forces() = 0; - virtual void coeffs_to_local(); - virtual void mix_coeffs(NormalModel*, NormalModel*); - void pulloff_distance(double, double); + virtual void set_knfac() = 0; + virtual void set_fncrit(); double damp; // Vestigial argument needed by damping + double Emod, poiss; double Fncrit, Fne, knfac; int material_properties; }; /* ---------------------------------------------------------------------- */ -class NormalHooke:NormalModel -{ +class NormalHooke: public NormalModel { public: NormalHooke(); ~NormalHooke() {}; void coeffs_to_local(); void mix_coeffs(NormalModel*, NormalModel*); double calculate_forces(); - double Emod, poiss; + void set_knfac(); + private: + double k; }; /* ---------------------------------------------------------------------- */ -class NormalHertz:NormalModel -{ +class NormalHertz: public NormalModel { public: NormalHertz(); ~NormalHertz() {}; void coeffs_to_local(); void mix_coeffs(NormalModel*, NormalModel*); double calculate_forces(); + void set_knfac(); private: - double k_norm; + double k; }; /* ---------------------------------------------------------------------- */ -class NormalHertzMaterial:NormalHertz -{ +class NormalHertzMaterial: public NormalHertz { public: NormalHertzMaterial(); ~NormalHertzMaterial() {}; void coeffs_to_local(); void mix_coeffs(NormalModel*, NormalModel*); private: - double k_norm; + double k; }; /* ---------------------------------------------------------------------- */ -class NormalDMT:NormalModel -{ +class NormalDMT: public NormalModel { public: NormalDMT(); ~NormalDMT() {}; void coeffs_to_local(); void mix_coeffs(NormalModel*, NormalModel*); - void set_fncrit(); double calculate_forces(); + void set_knfac(); + void set_fncrit(); private: - double k_norm, cohesion; + double k, cohesion; double F_pulloff; }; /* ---------------------------------------------------------------------- */ -class NormalJKR:NormalModel -{ +class NormalJKR: public NormalModel { public: NormalJKR(); ~NormalJKR() {}; void coeffs_to_local(); void mix_coeffs(NormalModel*, NormalModel*); - void set_fncrit(); + bool touch(); + double pulloff_distance(double, double); + double calculate_area(); double calculate_forces(); - void pulloff_distance(double, double); + void set_knfac(); + void set_fncrit(); private: - double k_norm, cohesion; + double k, cohesion; double Escaled, F_pulloff; }; -} -#endif /*NORMAL_CONTACT_MODELS_H_ */ +} // namespace Contact +} // namespace LAMMPS_NS +#endif /*CONTACT_NORMAL_MODELS_H_ */ diff --git a/src/GRANULAR/contact_rolling_models.cpp b/src/GRANULAR/contact_rolling_models.cpp index 5521e10aee..0c256b0fbf 100644 --- a/src/GRANULAR/contact_rolling_models.cpp +++ b/src/GRANULAR/contact_rolling_models.cpp @@ -11,202 +11,71 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "normal_contact_models.h" +#include "contact_normal_models.h" +#include "contact_rolling_models.h" #include "math_const.h" +#include "math_extra.h" #include "contact.h" -#include - +using namespace LAMMPS_NS; +using namespace Contact; using namespace MathConst; +using namespace MathExtra; -namespace Contact{ +/* ---------------------------------------------------------------------- + SDS rolling friction model +------------------------------------------------------------------------- */ -#define PI27SQ 266.47931882941264802866 // 27*PI**2 -#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) -#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) -#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) -#define FOURTHIRDS (4.0/3.0) // 4/3 -#define ONETHIRD (1.0/3.0) // 1/3 -#define THREEQUARTERS 0.75 // 3/4 - -// ************************ -// Default behaviors where needed -// ************************ -void NormalModel::set_fncrit(){ - contact->Fncrit = fabs(contact->Fntot); +RollingSDS::RollingSDS() +{ + num_coeffs = 3; + size_history = 3; } -void NormalModel::mix_coeffs(NormalModel* imodel, NormalModel* jmodel){ - for (int i = 0; i < num_coeffs; i++){ - coeffs[i] = sqrt(imodel->coeffs[i]*jmodel->coeffs[i]); - } +/* ---------------------------------------------------------------------- */ + +void RollingSDS::coeffs_to_local() +{ + k = coeffs[0]; + mu = coeffs[1]; + gamma = coeffs[2]; } -//----------------------------------------- +/* ---------------------------------------------------------------------- */ -//****************** -// Hooke -//****************** -void Hooke::Hooke(ContactModel &c){ - contact = c; - num_coeffs = 2; - allocate_coeffs(); +void RollingSDS::mix_coeffs(RollingModel* imodel, RollingModel* jmodel) +{ + coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs_to_local(); } -void Hooke::coeffs_to_local(){ - k_norm = coeffs[0]; - damp = coeffs[1]; -} +/* ---------------------------------------------------------------------- */ -double Hooke::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = k_norm * contact.area; - return contact.knfac * contact.delta; -} - - -//****************** -// Hertz -//****************** -void Hertz::Hertz(ContactModel &c, int mat_flag){ - contact = c; - material_prop_flag = mat_flag; - if (material_prop_flag){ - num_coeffs = 3; - } - else{ - num_coeffs = 2; - } - allocate_coeffs(); -} - -void Hertz::coeffs_to_local(){ - if (material_prop_flag){ - Emod = coeffs[0]; - poiss = coeffs[1]; - k_norm = 4/3*Emod; - } - else{ - k_norm = coeffs[0]; - } -} - -double Hertz::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - return contact.knfac * contact.delta; -} - -//****************** -// DMT -//****************** -void DMT::DMT(ContactModel &c){ - contact = c; - material_prop_flag = 1; - num_coeffs = 4; - allocate_coeffs(); -} - -double DMT::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - double Fne = contact.knfac * contact.delta; - F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; - Fne -= F_pulloff; - return Fne; -} - -void DMT::set_fncrit(){ - contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); -} - -//****************** -// JKR -//****************** -void JKR::JKR(ContactModel &c){ - contact = c; - material_prop_flag = 1; - beyond_contact = 1; - num_coeffs = 4; - allocate_coeffs(); -} - -bool JKR::touch(int touch){ - double Escaled, R2, delta_pulloff, dist_pulloff; - bool touchflag; - - Escaled = k_norm * THREEQUARTERS; - if (touch) { - R2 = contact.Reff * contact.Reff; - a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); - delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); - dist_pulloff = contact.radsum - delta_pulloff; - touchflag = (contact.rsq < dist_pulloff * dist_pulloff); - } else { - touchflag = (rcontact.sq < contact.radsum * contact.radsum); - } - return touchflag; -} - -double JKR::calculate_forces(){ - double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; - - Escaled = k_norm * THREEQUARTERS; - - R2 = Reff * Reff; - dR2 = dR * dR; - t0 = cohesion * cohesion * R2 * R2 * Escaled; - t1 = PI27SQ*t0; - t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; - t3 = 4 * dR2 * Escaled; - - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); - t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / Escaled; - sqrt2 = MAX(0, 2 * dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); - a = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = a * a; - Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); - F_pulloff = 3 * MY_PI * cohesion * Reff; - - knfac = Escaled * a; - return Fne; -} - -void JKR::set_fncrit(){ - contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); -} - - - - -void ContactModel::rolling(double *history) +double RollingSDS::calculate_forces() { int rhist0, rhist1, rhist2, frameupdate; - double rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_dbl, temp_array[3]; + double Frcrit, rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_dbl, temp_array[3]; - rhist0 = roll_history_index; + rhist0 = history_index; rhist1 = rhist0 + 1; rhist2 = rhist1 + 1; - Frcrit = mu_roll * Fncrit; + Frcrit = mu * contact->normal_model->Fncrit; - if (history_update) { - hist_temp[0] = history[rhist0]; - hist_temp[1] = history[rhist1]; - hist_temp[2] = history[rhist2]; - rolldotn = dot3(hist_temp, nx); + if (contact->history_update) { + hist_temp[0] = contact->history[rhist0]; + hist_temp[1] = contact->history[rhist1]; + hist_temp[2] = contact->history[rhist2]; + rolldotn = dot3(hist_temp, contact->nx); - frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit; + frameupdate = fabs(rolldotn) * k > EPSILON * Frcrit; if (frameupdate) { // rotate into tangential plane rollmag = len3(hist_temp); // projection temp_dbl = -rolldotn; - scale3(temp_dbl, nx, temp_array); + scale3(temp_dbl, contact->nx, temp_array); sub3(hist_temp, temp_array, hist_temp); // also rescale to preserve magnitude @@ -215,35 +84,36 @@ void ContactModel::rolling(double *history) else temp_dbl = 0; scale3(temp_dbl, hist_temp); } - scale3(dt, vrl, temp_array); + scale3(contact->dt, contact->vrl, temp_array); add3(hist_temp, temp_array, hist_temp); } - scaleadd3(k_roll, hist_temp, gamma_roll, vrl, fr); - negate3(fr); + scaleadd3(k, hist_temp, gamma, contact->vrl, contact->fr); + negate3(contact->fr); // rescale frictional displacements and forces if needed - magfr = len3(fr); + magfr = len3(contact->fr); if (magfr > Frcrit) { rollmag = len3(hist_temp); if (rollmag != 0.0) { - temp_dbl = -Frcrit / (magfr * k_roll); - scale3(temp_dbl, fr, temp_array); + temp_dbl = -Frcrit / (magfr * k); + scale3(temp_dbl, contact->fr, temp_array); add3(hist_temp, temp_array, hist_temp); - temp_dbl = -gamma_roll/k_roll; - scale3(temp_dbl, vrl, temp_array); + temp_dbl = -gamma/k; + scale3(temp_dbl, contact->vrl, temp_array); add3(hist_temp, temp_array, hist_temp); temp_dbl = Frcrit / magfr; - scale3(temp_dbl, fr); + scale3(temp_dbl, contact->fr); } else { - zero3(fr); + zero3(contact->fr); } } - history[rhist0] = hist_temp[0]; - history[rhist1] = hist_temp[1]; - history[rhist2] = hist_temp[2]; + contact->history[rhist0] = hist_temp[0]; + contact->history[rhist1] = hist_temp[1]; + contact->history[rhist2] = hist_temp[2]; + return 0; } diff --git a/src/GRANULAR/contact_rolling_models.h b/src/GRANULAR/contact_rolling_models.h index 1a2f1ddb7d..1cd23e1d5d 100644 --- a/src/GRANULAR/contact_rolling_models.h +++ b/src/GRANULAR/contact_rolling_models.h @@ -11,73 +11,36 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef NORMAL_CONTACT_MODELS_H_ -#define NORMAL_CONTACT_MODELS_H_ +#ifndef CONTACT_ROLLING_MODELS_H_ +#define CONTACT_ROLLING_MODELS_H_ -#include "contact.h"; -#include "sub_model.h" +#include "contact_sub_models.h" +namespace LAMMPS_NS { namespace Contact { -class NormalModel:SubModel{ -public: - NormalModel(){}; - virtual ~NormalModel(){}; - virtual bool check_contact(); - virtual void prep_contact(); - virtual void set_fncrit(); +class RollingModel : public SubModel { + public: + RollingModel() {}; + ~RollingModel() {}; + virtual void coeffs_to_local() {}; + virtual void mix_coeffs(RollingModel*, RollingModel*) {}; virtual double calculate_forces() = 0; - virtual void coeffs_to_local(); - virtual void mix_coeffs(NormalModel*, NormalModel*); //When mixing is needed - -private: - int beyond_contact = 0; - int allow_limit_damping = 1; - }; -class Hooke:NormalModel{ -public: - Hooke(ContactModel &c); - ~Hooke(){}; +/* ---------------------------------------------------------------------- */ + +class RollingSDS: public RollingModel { + public: + RollingSDS(); void coeffs_to_local(); + void mix_coeffs(RollingModel*, RollingModel*); double calculate_forces(); -private: - double k_norm, damp; + private: + double k, mu, gamma; }; -class Hertz:NormalModel{ -public: - Hertz(ContactModel&, int); - ~Hertz(){}; - void coeffs_to_local(); - double calculate_forces(); -private: - double k_norm, damp, Emod, poiss; -}; - -class DMT:NormalModel{ -public: - DMT(ContactModel &c); - ~DMT(){}; - void coeffs_to_local(); - void coeffs_to_local(NormalModel*, NormalModel*); - double calculate_forces(); -private: - double k_norm, damp, Emod, poiss, coh; -}; - -class JKR:NormalModel{ -public: - JKR(ContactModel &c); - ~JKR(){}; - void coeffs_to_local(); - double calculate_forces(); -private: - double k_norm, damp, Emod, poiss, coh; - -}; -} - -#endif /*NORMAL_CONTACT_MODELS_H_ */ +} // namespace Contact +} // namespace LAMMPS_NS +#endif /*CONTACT_ROLLING_MODELS_H_ */ diff --git a/src/GRANULAR/contact_sub_models.cpp b/src/GRANULAR/contact_sub_models.cpp index 99fcd638b4..2809204de7 100644 --- a/src/GRANULAR/contact_sub_models.cpp +++ b/src/GRANULAR/contact_sub_models.cpp @@ -16,23 +16,25 @@ Multiple models can be defined and used to calculate forces and torques based on contact geometry */ -#include "contact_sub_model.h" -#include "pointers.h" + +#include "contact_sub_models.h" #include "utils.h" -#include "error.h" -#include "comm.h" using namespace LAMMPS_NS; +using namespace Contact; -namespace Contact{ - -SubModel::SubModel() +SubModel::SubModel() : + Pointers(lmp) { allocated = 0; size_history = 0; history_index = 0; allow_limit_damping = 1; beyond_contact = 0; + num_coeffs = 0; + + nondefault_history_transfer = 0; + transfer_history_factor = nullptr; } /* ---------------------------------------------------------------------- */ @@ -40,6 +42,7 @@ SubModel::SubModel() SubModel::~SubModel() { if (allocated) delete [] coeffs; + delete [] transfer_history_factor; } /* ---------------------------------------------------------------------- */ @@ -62,39 +65,6 @@ void SubModel::parse_coeffs(char **arg, int iarg) coeffs_to_local(); } -/* ---------------------------------------------------------------------- */ - -void SubModel::write_restart(FILE *fp) -{ - fwrite(&model_name.length(),sizeof(int),1,fp); - fwrite(model_name.data(),sizeof(char),model_name.length(),fp); - fwrite(&num_coeffs,sizeof(int),1,fp); - fwrite(coeffs,sizeof(int),num_coeffs,fp); -} - -/* ---------------------------------------------------------------------- */ - -void SubModel::read_restart(FILE *fp, int num_char) -{ - if (comm->me == 0) { - utils::sfread(FLERR,&num_coeffs,sizeof(int),1,fp,nullptr,error); - } - MPI_BCast(const_cast(model_name.data()), num_char, MPI_CHAR, world); - allocate_coeffs(); -} - -/* ---------------------------------------------------------------------- */ - -void SubModel::read_restart(FILE *fp) -{ - int num_char; - if (me == 0) { - utils::sfread(FLERR,&num_char,sizeof(int),1,fp,nullptr,error); - } - MPI_BCast(&num_char, 1, MPI_INT, 0, world); - read_restart(fp, num_char); -} - /* ---------------------------------------------------------------------- mixing of Young's modulus (E) ------------------------------------------------------------------------- */ @@ -115,7 +85,7 @@ double SubModel::mix_stiffnessG(double E1, double E2, double pois1, double pois2) { double factor1 = 2 * (2 - pois1) * (1 + pois1) / E1; - double factor2 = 2 * (2 - pois2) * (1 + pois2) / E2) + double factor2 = 2 * (2 - pois2) * (1 + pois2) / E2; return 1 / (factor1 + factor2); } @@ -127,6 +97,3 @@ double SubModel::mix_geom(double val1, double val2) { return sqrt(val1 * val2); } - - -} \ No newline at end of file diff --git a/src/GRANULAR/contact_sub_models.h b/src/GRANULAR/contact_sub_models.h index f659ef1504..7eca7f4152 100644 --- a/src/GRANULAR/contact_sub_models.h +++ b/src/GRANULAR/contact_sub_models.h @@ -11,44 +11,48 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef GRANULAR_SUB_MODEL_H_ -#define GRANULAR_SUB_MODEL_H_ +#ifndef CONTACT_SUB_MODEL_H_ +#define CONTACT_SUB_MODEL_H_ #include "contact.h" +#include "pointers.h" -using namespace LAMMPS_NS; +namespace LAMMPS_NS { +namespace Contact { -namespace Contact{ - -class SubModel : Pointers{ +class SubModel : protected Pointers { + public: SubModel(); virtual ~SubModel(); -public: + int num_coeffs; double *coeffs; - virtual double calculate_forces() = 0; void read_restart(); - virtual void parse_coeffs(char **, int); - void mix_coeff(SubModel*, SubModel*); - void write_restart(FILE*); - void read_restart(FILE*); - void read_restart(FILE*, int); - virtual void coeffs_to_local(); + void parse_coeffs(char **, int); + virtual void mix_coeffs(SubModel*, SubModel*) {}; + virtual void coeffs_to_local() {}; void allocate_coeffs(); std::string name; -private: - ContactModel &contact; - int allocated; + int size_history; + int nondefault_history_transfer; + double *transfer_history_factor; + int history_index; int beyond_contact; int allow_limit_damping; + ContactModel *contact; + + protected: + int allocated; + double mix_stiffnessE(double, double, double, double); double mix_stiffnessG(double, double, double, double); double mix_geom(double, double); }; -} +} // namespace Contact +} // namespace LAMMPS_NS -#endif /* GRANULAR_SUB_MODEL_H_ */ +#endif /* CONTACT_SUB_MODEL_H_ */ diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index 9f092aaf29..45ed993eeb 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -11,15 +11,18 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "tangential_contact_models.h" -#include "math_const.h" +#include "contact_damping_models.h" +#include "contact_normal_models.h" +#include "contact_tangential_models.h" #include "contact.h" +#include "error.h" +#include "math_const.h" +#include "math_extra.h" -#include - +using namespace LAMMPS_NS; +using namespace Contact; using namespace MathConst; - -namespace Contact{ +using namespace MathExtra; /* ---------------------------------------------------------------------- Linear model with no history @@ -35,14 +38,15 @@ TangentialLinearNoHistory::TangentialLinearNoHistory() void TangentialLinearNoHistory::coeffs_to_local() { + k = 0.0; // No tangential stiffness with no history xt = coeffs[0]; mu = coeffs[1]; - damp = xt * contact.damping_model.damp; + damp = xt * contact->damping_model->damp; } /* ---------------------------------------------------------------------- */ -void TangentialLinearNoHistory::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +void TangentialLinearNoHistory::mix_coeffs(TangentialModel* imodel, TangentialModel* jmodel) { coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); @@ -56,13 +60,13 @@ void TangentialLinearNoHistory::calculate_forces() double Fscrit, fsmag, Ft; // classic pair gran/hooke (no history) - Fscrit = mu * contact.normal_model.Fncrit - fsmag = damp * contact.vrel; - if (contact.vrel != 0.0) Ft = MIN(Fscrit, fsmag) / contact.vrel; + Fscrit = mu * contact->normal_model->Fncrit; + fsmag = damp * contact->vrel; + if (contact->vrel != 0.0) Ft = MIN(Fscrit, fsmag) / contact->vrel; else Ft = 0.0; Ft = -Ft; - scale3(Ft, contact.vtr, contact.fs); + scale3(Ft, contact->vtr, contact->fs); } /* ---------------------------------------------------------------------- @@ -79,15 +83,15 @@ TangentialLinearHistory::TangentialLinearHistory() void TangentialLinearHistory::coeffs_to_local() { - kt = coeffs[0]; + k = coeffs[0]; xt = coeffs[1]; mu = coeffs[2]; - damp = xt * contact.damping_model.damp; + damp = xt * contact->damping_model->damp; } /* ---------------------------------------------------------------------- */ -void TangentialLinearHistory::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +void TangentialLinearHistory::mix_coeffs(TangentialModel* imodel, TangentialModel* jmodel) { coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); @@ -102,20 +106,20 @@ void TangentialLinearHistory::calculate_forces() double Fscrit, magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; int frame_update = 0; - Fscrit = contact.normal_model.Fncrit * mu; + Fscrit = contact->normal_model->Fncrit * mu; - double *history = & contact.history[history_index]; + double *history = & contact->history[history_index]; // rotate and update displacements / force. // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (contact.history_update) { - rsht = dot3(history, contact.nx); - frame_update = fabs(rsht) * kt > EPSILON * Fscrit; + if (contact->history_update) { + rsht = dot3(history, contact->nx); + frame_update = fabs(rsht) * k > EPSILON * Fscrit; if (frame_update) { shrmag = len3(history); // projection - scale3(rsht, contact.nx, history); + scale3(rsht, contact->nx, history); // also rescale to preserve magnitude prjmag = len3(history); if (prjmag > 0) temp_dbl = shrmag / prjmag; @@ -126,28 +130,28 @@ void TangentialLinearHistory::calculate_forces() // update history // tangential force // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - temp_dbl = kt * contact.dt; - scale3(temp_dbl, contact.vtr, temp_array); + temp_dbl = k * contact->dt; + scale3(temp_dbl, contact->vtr, temp_array); sub3(history, temp_array, history); } // tangential forces = history + tangential velocity damping temp_dbl = -damp; - scale3(temp_dbl, contact.vtr, contact.fs); + scale3(temp_dbl, contact->vtr, contact->fs); // rescale frictional displacements and forces if needed - magfs = len3(contact.fs); + magfs = len3(contact->fs); if (magfs > Fscrit) { shrmag = len3(history); if (shrmag != 0.0) { temp_dbl = Fscrit / magfs; - scale3(temp_dbl, contact.fs, history); - scale3(damp, contact.vtr, temp_array); + scale3(temp_dbl, contact->fs, history); + scale3(damp, contact->vtr, temp_array); add3(history, temp_array, history); temp_dbl = Fscrit / magfs; - scale3(temp_dbl, contact.fs); + scale3(temp_dbl, contact->fs); } else { - zero3(contact.fs); + zero3(contact->fs); } } } @@ -168,20 +172,22 @@ TangentialMindlin::TangentialMindlin() void TangentialMindlin::coeffs_to_local() { - kt = coeffs[0]; + k = coeffs[0]; xt = coeffs[1]; mu = coeffs[2]; - if (ke == -1) - kt = 8.0 * mix_stiffness(contact.normal_model.Emod, contact.normal_model.Emod, - contact.normal_model.poiss, contact.normal_model.poiss); + if (k == -1) { + if (!contact->normal_model->material_properties) + error->all(FLERR, "Must either specify tangential stiffness or material properties for normal model for the Mindlin tangential style"); + k = 8.0 * mix_stiffnessE(contact->normal_model->Emod, contact->normal_model->Emod, contact->normal_model->poiss, contact->normal_model->poiss); + } - damp = xt * contact.damping_model.damp; + damp = xt * contact->damping_model->damp; } /* ---------------------------------------------------------------------- */ -void TangentialMindlin::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +void TangentialMindlin::mix_coeffs(TangentialModel* imodel, TangentialModel* jmodel) { if (imodel->coeffs[0] == -1 || imodel->coeffs[0] == -1) coeffs[0] = -1; else coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); @@ -198,22 +204,22 @@ void TangentialMindlin::calculate_forces() double temp_array[3]; int frame_update = 0; - double *history = & contact.history[history_index]; - Fscrit = contact.normal_model.Fncrit * mu; + double *history = & contact->history[history_index]; + Fscrit = contact->normal_model->Fncrit * mu; - k_scaled = k_tang * contact.area; + k_scaled = k * contact->area; if (mindlin_rescale) { // on unloading, rescale the shear displacements/force - if (contact.area < history[3]) { - temp_dbl = contact.area / history[3]; + if (contact->area < history[3]) { + temp_dbl = contact->area / history[3]; scale3(temp_dbl, history); } } // rotate and update displacements / force. // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (contact.history_update) { - rsht = dot3(history, contact.nx); + if (contact->history_update) { + rsht = dot3(history, contact->nx); if (mindlin_force) frame_update = fabs(rsht) > EPSILON * Fscrit; else @@ -222,7 +228,7 @@ void TangentialMindlin::calculate_forces() if (frame_update) { shrmag = len3(history); // projection - scale3(rsht, contact.nx, history); + scale3(rsht, contact->nx, history); // also rescale to preserve magnitude prjmag = len3(history); if (prjmag > 0) temp_dbl = shrmag / prjmag; @@ -234,42 +240,42 @@ void TangentialMindlin::calculate_forces() if (mindlin_force) { // tangential force // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - temp_dbl = -k_scaled * contact.dt; - scale3(temp_dbl, contact.vtr, temp_array); + temp_dbl = -k_scaled * contact->dt; + scale3(temp_dbl, contact->vtr, temp_array); } else { - scale3(contact.dt, contact.vtr, temp_array); + scale3(contact->dt, contact->vtr, temp_array); } add3(history, temp_array, history); - if (mindlin_rescale) history[3] = contact.area; + if (mindlin_rescale) history[3] = contact->area; } // tangential forces = history + tangential velocity damping temp_dbl = -damp; - scale3(temp_dbl, contact.vtr, contact.fs); + scale3(temp_dbl, contact->vtr, contact->fs); if (! mindlin_force) { scale3(k_scaled, history, temp_array); - add3(contact.fs, temp_array, contact.fs); + add3(contact->fs, temp_array, contact->fs); } // rescale frictional displacements and forces if needed - magfs = len3(contact.fs); + magfs = len3(contact->fs); if (magfs > Fscrit) { shrmag = len3(history); if (shrmag != 0.0) { temp_dbl = Fscrit / magfs; - scale3(temp_dbl, contact.fs, history); - scale3(damp, contact.vtr, temp_array); + scale3(temp_dbl, contact->fs, history); + scale3(damp, contact->vtr, temp_array); add3(history, temp_array, history); if (! mindlin_force) { temp_dbl = -1.0 / k_scaled; scale3(temp_dbl, history); } temp_dbl = Fscrit / magfs; - scale3(temp_dbl, contact.fs); + scale3(temp_dbl, contact->fs); } else { - zero3(contact.fs); + zero3(contact->fs); } } } @@ -278,7 +284,7 @@ void TangentialMindlin::calculate_forces() Mindlin force model ------------------------------------------------------------------------- */ -void TangentialMindlinForce::TangentialMindlinForce() +TangentialMindlinForce::TangentialMindlinForce() { num_coeffs = 3; size_history = 3; @@ -290,22 +296,32 @@ void TangentialMindlinForce::TangentialMindlinForce() Mindlin rescale model ------------------------------------------------------------------------- */ -void TangentialMindlinRescale::TangentialMindlinForce() +TangentialMindlinRescale::TangentialMindlinRescale() { num_coeffs = 3; size_history = 4; mindlin_force = 0; mindlin_rescale = 1; + + nondefault_history_transfer = 1; + transfer_history_factor = new double(size_history); + for (int i = 0; i < size_history; i++) transfer_history_factor[i] = -1.0; + transfer_history_factor[3] = +1; } /* ---------------------------------------------------------------------- Mindlin rescale force model ------------------------------------------------------------------------- */ -void TangentialMindlinRescaleForce::TangentialMindlinForce() +TangentialMindlinRescaleForce::TangentialMindlinRescaleForce() { num_coeffs = 3; size_history = 4; mindlin_force = 1; mindlin_rescale = 1; + + nondefault_history_transfer = 1; + transfer_history_factor = new double(size_history); + for (int i = 0; i < size_history; i++) transfer_history_factor[i] = -1.0; + transfer_history_factor[3] = +1; } diff --git a/src/GRANULAR/contact_tangential_models.h b/src/GRANULAR/contact_tangential_models.h index c0a5a727f0..f5d83a57f7 100644 --- a/src/GRANULAR/contact_tangential_models.h +++ b/src/GRANULAR/contact_tangential_models.h @@ -11,92 +11,84 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef TANGENTIAL_CONTACT_MODELS_H_ -#define TANGENTIAL_CONTACT_MODELS_H_ +#ifndef CONTACT_TANGENTIAL_MODELS_H_ +#define CONTACT_TANGENTIAL_MODELS_H_ -#include "contact.h"; -#include "sub_model.h" +#include "contact_sub_models.h" +namespace LAMMPS_NS { namespace Contact { -class TangentialModel:SubModel -{ -public: +class TangentialModel : public SubModel { + public: TangentialModel() {}; virtual ~TangentialModel() {}; - virtual double calculate_forces() = 0; - virtual void coeffs_to_local(); - virtual void mix_coeffs(TangentialModel*, TangentialModel*); + virtual void coeffs_to_local() {}; + virtual void mix_coeffs(TangentialModel*, TangentialModel*) {}; + virtual void calculate_forces() = 0; int rescale_flag; -private: - int beyond_contact; - int allow_limit_damping; + double k, damp, mu; // Used by Marshall twisting model }; /* ---------------------------------------------------------------------- */ -class TangentialLinearNoHistory:TangentialModel -{ -public: - TangentialLinearNoHistory() - virtual void coeffs_to_local(); - virtual void mix_coeffs(TangentialModel*, TangentialModel*); - double calculate_forces(); -private: - double xt, damp, mu; +class TangentialLinearNoHistory: public TangentialModel { + public: + TangentialLinearNoHistory(); + void coeffs_to_local(); + void mix_coeffs(TangentialModel*, TangentialModel*); + void calculate_forces(); + private: + double xt; }; /* ---------------------------------------------------------------------- */ -class TangentialLinearHistory:TangentialModel -{ -public: - TangentialLinearHistory() - virtual void coeffs_to_local(); - virtual void mix_coeffs(TangentialModel*, TangentialModel*); - double calculate_forces(); -private: - double kt, xt, damp, mu; +class TangentialLinearHistory: public TangentialModel { + public: + TangentialLinearHistory(); + void coeffs_to_local(); + void mix_coeffs(TangentialModel*, TangentialModel*); + void calculate_forces(); + private: + double xt; }; /* ---------------------------------------------------------------------- */ -class TangentialMindlin:TangentialModel -{ -public: +class TangentialMindlin: public TangentialModel { + public: TangentialMindlin(); void coeffs_to_local(); - void coeffs_to_local(TangentialModel*, TangentialModel*); - double calculate_forces(); -private: - double k_norm, damp, Emod, poiss, coh; + void mix_coeffs(TangentialModel*, TangentialModel*); + void calculate_forces(); + protected: int mindlin_rescale, mindlin_force; + double xt; }; /* ---------------------------------------------------------------------- */ -class TangentialMindlinForce:TangentialMindlin -{ -public: +class TangentialMindlinForce: public TangentialMindlin { + public: TangentialMindlinForce(); }; /* ---------------------------------------------------------------------- */ -class TangentialMindlinRescale:TangentialMindlin -{ -public: +class TangentialMindlinRescale: public TangentialMindlin { + public: TangentialMindlinRescale(); }; /* ---------------------------------------------------------------------- */ -class TangentialMindlinRescaleForce:TangentialMindlinRescale -{ -public: - TangentialMindlinForceRescale(); +class TangentialMindlinRescaleForce: public TangentialMindlin { + public: + TangentialMindlinRescaleForce(); }; -} -#endif /*TANGENTIAL_CONTACT_MODELS_H_ */ +} // namespace Contact +} // namespace LAMMPS_NS +#endif /*CONTACT_TANGENTIAL_MODELS_H_ */ diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/GRANULAR/contact_twisting_models.cpp index 0e9e9115ac..04d89a5b88 100644 --- a/src/GRANULAR/contact_twisting_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -11,206 +11,99 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "normal_contact_models.h" -#include "math_const.h" +#include "contact_normal_models.h" +#include "contact_tangential_models.h" +#include "contact_twisting_models.h" #include "contact.h" +#include "math_const.h" -#include - +using namespace LAMMPS_NS; +using namespace Contact; using namespace MathConst; -namespace Contact{ +/* ---------------------------------------------------------------------- + Marshall twisting model +------------------------------------------------------------------------- */ -#define PI27SQ 266.47931882941264802866 // 27*PI**2 -#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) -#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) -#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) -#define FOURTHIRDS (4.0/3.0) // 4/3 -#define ONETHIRD (1.0/3.0) // 1/3 -#define THREEQUARTERS 0.75 // 3/4 - -// ************************ -// Default behaviors where needed -// ************************ -void NormalModel::set_fncrit(){ - contact->Fncrit = fabs(contact->Fntot); -} - -void NormalModel::mix_coeffs(NormalModel* imodel, NormalModel* jmodel){ - for (int i = 0; i < num_coeffs; i++){ - coeffs[i] = sqrt(imodel->coeffs[i]*jmodel->coeffs[i]); - } -} - -//----------------------------------------- - -//****************** -// Hooke -//****************** -void Hooke::Hooke(ContactModel &c){ - contact = c; - num_coeffs = 2; - allocate_coeffs(); -} - -void Hooke::coeffs_to_local(){ - k_norm = coeffs[0]; - damp = coeffs[1]; -} - -double Hooke::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = k_norm * contact.area; - return contact.knfac * contact.delta; -} - - -//****************** -// Hertz -//****************** -void Hertz::Hertz(ContactModel &c, int mat_flag){ - contact = c; - material_prop_flag = mat_flag; - if (material_prop_flag){ - num_coeffs = 3; - } - else{ - num_coeffs = 2; - } - allocate_coeffs(); -} - -void Hertz::coeffs_to_local(){ - if (material_prop_flag){ - Emod = coeffs[0]; - poiss = coeffs[1]; - k_norm = 4/3*Emod; - } - else{ - k_norm = coeffs[0]; - } -} - -double Hertz::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - return contact.knfac * contact.delta; -} - -//****************** -// DMT -//****************** -void DMT::DMT(ContactModel &c){ - contact = c; - material_prop_flag = 1; - num_coeffs = 4; - allocate_coeffs(); -} - -double DMT::calculate_forces(){ - contact.area = sqrt(contact.dR); - contact.knfac = contact.k_norm * contact.area; - double Fne = contact.knfac * contact.delta; - F_pulloff = 4 * MathConst::MY_PI * cohesion * contact.Reff; - Fne -= F_pulloff; - return Fne; -} - -void DMT::set_fncrit(){ - contact.Fncrit = fabs(contact.Fne + 2* F_pulloff); -} - -//****************** -// JKR -//****************** -void JKR::JKR(ContactModel &c){ - contact = c; - material_prop_flag = 1; - beyond_contact = 1; - num_coeffs = 4; - allocate_coeffs(); -} - -bool JKR::touch(int touch){ - double Escaled, R2, delta_pulloff, dist_pulloff; - bool touchflag; - - Escaled = k_norm * THREEQUARTERS; - if (touch) { - R2 = contact.Reff * contact.Reff; - a = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); - delta_pulloff = a * a / contact.Reff - 2 * sqrt(MY_PI * cohesion * a / Escaled); - dist_pulloff = contact.radsum - delta_pulloff; - touchflag = (contact.rsq < dist_pulloff * dist_pulloff); - } else { - touchflag = (rcontact.sq < contact.radsum * contact.radsum); - } - return touchflag; -} - -double JKR::calculate_forces(){ - double Escaled, R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3, a2, F_pulloff, Fne; - - Escaled = k_norm * THREEQUARTERS; - - R2 = Reff * Reff; - dR2 = dR * dR; - t0 = cohesion * cohesion * R2 * R2 * Escaled; - t1 = PI27SQ*t0; - t2 = 8 * dR * dR2 * Escaled * Escaled * Escaled; - t3 = 4 * dR2 * Escaled; - - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); - t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / Escaled; - sqrt2 = MAX(0, 2 * dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); - a = INVROOT6 * (t6 + sqrt(sqrt3)); - a2 = a * a; - Fne = Escaled * a * a2 / Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * a)); - F_pulloff = 3 * MY_PI * cohesion * Reff; - - knfac = Escaled * a; - return Fne; -} - -void JKR::set_fncrit(){ - contact.Fncrit = fabs(contact.Fne + 2 * F_pulloff); -} - - - - -/* ---------------------------------------------------------------------- */ - -void ContactModel::twisting_marshall(double *history) +TwistingMarshall::TwistingMarshall() { - // Overwrite twist coefficients with derived values - k_twist = 0.5 * k_tang * a * a; // eq 32 of Marshall paper - gamma_twist = 0.5 * gamma_tang * a * a; - mu_twist = TWOTHIRDS * a * mu_tang; - - twisting_SDS(history); + num_coeffs = 0; + size_history = 3; } /* ---------------------------------------------------------------------- */ -void ContactModel::twisting_SDS(double *history) +double TwistingMarshall::calculate_forces() { double signtwist, Mtcrit; - if (history_update) { - history[twist_history_index] += magtwist * dt; + // Calculate twist coefficients from tangential model & contact geometry + // eq 32 of Marshall paper + double k = 0.5 * contact->tangential_model->k * contact->area * contact->area; + double damp = 0.5 * contact->tangential_model->damp * contact->area * contact->area; + double mu = TWOTHIRDS * contact->area * contact->tangential_model->mu; + + if (contact->history_update) { + contact->history[history_index] += contact->magtwist * contact->dt; } - magtortwist = -k_twist * history[twist_history_index] - gamma_twist*magtwist; // M_t torque (eq 30) - signtwist = (magtwist > 0) - (magtwist < 0); - Mtcrit = mu_twist * Fncrit; // critical torque (eq 44) - if (fabs(magtortwist) > Mtcrit) { - history[twist_history_index] = (Mtcrit * signtwist - gamma_twist * magtwist) / k_twist; - magtortwist = -Mtcrit * signtwist; // eq 34 + // M_t torque (eq 30) + contact->magtortwist = -k * contact->history[history_index] - damp * contact->magtwist; + signtwist = (contact->magtwist > 0) - (contact->magtwist < 0); + Mtcrit = mu * contact->normal_model->Fncrit; // critical torque (eq 44) + + if (fabs(contact->magtortwist) > Mtcrit) { + contact->history[history_index] = (Mtcrit * signtwist - damp * contact->magtwist) / k; + contact->magtortwist = -Mtcrit * signtwist; // eq 34 + } +} + +/* ---------------------------------------------------------------------- + SDS twisting model +------------------------------------------------------------------------- */ + +TwistingSDS::TwistingSDS() +{ + num_coeffs = 3; + size_history = 3; +} + +/* ---------------------------------------------------------------------- */ + +void TwistingSDS::coeffs_to_local() +{ + k = coeffs[0]; + mu = coeffs[1]; + damp = coeffs[2]; +} + +/* ---------------------------------------------------------------------- */ + +void TwistingSDS::mix_coeffs(TwistingModel* imodel, TwistingModel* jmodel) +{ + coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +double TwistingSDS::calculate_forces() +{ + double signtwist, Mtcrit; + + if (contact->history_update) { + contact->history[history_index] += contact->magtwist * contact->dt; + } + + // M_t torque (eq 30) + contact->magtortwist = -k * contact->history[history_index] - damp * contact->magtwist; + signtwist = (contact->magtwist > 0) - (contact->magtwist < 0); + Mtcrit = mu * contact->normal_model->Fncrit; // critical torque (eq 44) + + if (fabs(contact->magtortwist) > Mtcrit) { + contact->history[history_index] = (Mtcrit * signtwist - damp * contact->magtwist) / k; + contact->magtortwist = -Mtcrit * signtwist; // eq 34 } } diff --git a/src/GRANULAR/contact_twisting_models.h b/src/GRANULAR/contact_twisting_models.h index 1a2f1ddb7d..e689c8ed35 100644 --- a/src/GRANULAR/contact_twisting_models.h +++ b/src/GRANULAR/contact_twisting_models.h @@ -11,73 +11,44 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef NORMAL_CONTACT_MODELS_H_ -#define NORMAL_CONTACT_MODELS_H_ +#ifndef CONTACT_TWISTING_MODELS_H_ +#define CONTACT_TWISTING_MODELS_H_ -#include "contact.h"; -#include "sub_model.h" +#include "contact_sub_models.h" +namespace LAMMPS_NS { namespace Contact { -class NormalModel:SubModel{ -public: - NormalModel(){}; - virtual ~NormalModel(){}; - virtual bool check_contact(); - virtual void prep_contact(); - virtual void set_fncrit(); +class TwistingModel : public SubModel { + public: + TwistingModel() {}; + virtual ~TwistingModel() {}; + virtual void coeffs_to_local() {}; + virtual void mix_coeffs(TwistingModel*, TwistingModel*) {}; virtual double calculate_forces() = 0; - virtual void coeffs_to_local(); - virtual void mix_coeffs(NormalModel*, NormalModel*); //When mixing is needed - -private: - int beyond_contact = 0; - int allow_limit_damping = 1; - }; -class Hooke:NormalModel{ -public: - Hooke(ContactModel &c); - ~Hooke(){}; - void coeffs_to_local(); +/* ---------------------------------------------------------------------- */ + +class TwistingMarshall: public TwistingModel { + public: + TwistingMarshall(); double calculate_forces(); -private: - double k_norm, damp; }; -class Hertz:NormalModel{ -public: - Hertz(ContactModel&, int); - ~Hertz(){}; +/* ---------------------------------------------------------------------- */ + +class TwistingSDS: public TwistingModel { + public: + TwistingSDS(); void coeffs_to_local(); + void mix_coeffs(TwistingModel*, TwistingModel*); double calculate_forces(); -private: - double k_norm, damp, Emod, poiss; + private: + double k, mu, damp; }; -class DMT:NormalModel{ -public: - DMT(ContactModel &c); - ~DMT(){}; - void coeffs_to_local(); - void coeffs_to_local(NormalModel*, NormalModel*); - double calculate_forces(); -private: - double k_norm, damp, Emod, poiss, coh; -}; - -class JKR:NormalModel{ -public: - JKR(ContactModel &c); - ~JKR(){}; - void coeffs_to_local(); - double calculate_forces(); -private: - double k_norm, damp, Emod, poiss, coh; - -}; -} - -#endif /*NORMAL_CONTACT_MODELS_H_ */ +} // namespace Contact +} // namespace LAMMPS_NS +#endif /*CONTACT_TWISTING_MODELS_H_ */ diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 5816850ef2..e401f8cb84 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -23,14 +23,19 @@ #include "atom.h" #include "comm.h" #include "contact.h" +#include "contact_sub_models.h" +#include "contact_normal_models.h" +#include "contact_tangential_models.h" +#include "contact_damping_models.h" +#include "contact_rolling_models.h" +#include "contact_twisting_models.h" +#include "contact_heat_models.h" #include "error.h" #include "fix.h" #include "fix_dummy.h" #include "fix_neigh_history.h" #include "force.h" -#include "math_const.h" #include "math_extra.h" -#include "math_special.h" #include "memory.h" #include "modify.h" #include "neigh_list.h" @@ -38,14 +43,12 @@ #include "neighbor.h" #include "update.h" -#include #include #include using namespace LAMMPS_NS; -using namespace MathConst; -using namespace MathSpecial; using namespace Contact; +using namespace MathExtra; /* ---------------------------------------------------------------------- */ @@ -69,8 +72,6 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) maxrad_dynamic = nullptr; maxrad_frozen = nullptr; - history_transfer_factors = nullptr; - dt = update->dt; // set comm size needed by this Pair if used with fix rigid @@ -97,7 +98,6 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) PairGranular::~PairGranular() { delete[] svector; - delete[] history_transfer_factors; if (!fix_history) modify->delete_fix("NEIGH_HISTORY_GRANULAR_DUMMY"); else modify->delete_fix("NEIGH_HISTORY_GRANULAR"); @@ -121,7 +121,7 @@ void PairGranular::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum,itype,jtype; double factor_lj,mi,mj,meff,delx,dely,delz; - double forces[3], torquesi[3], torquesj[3]; + double *forces, *torquesi, *torquesj; int *ilist,*jlist,*numneigh,**firstneigh; int *touch,**firsttouch; @@ -259,17 +259,17 @@ void PairGranular::compute(int eflag, int vflag) torquesj = models[itype][jtype]->torquesj; // apply forces & torques - MathExtra::scale3(factor_lj, forces); - MathExtra::add3(f[i], forces, f[i]); + scale3(factor_lj, forces); + add3(f[i], forces, f[i]); - MathExtra::scale3(factor_lj, torquesi); - MathExtra::add3(torque[i], torquesi, torque[i]); + scale3(factor_lj, torquesi); + add3(torque[i], torquesi, torque[i]); if (heat_flag) heatflux[i] += dq; if (force->newton_pair || j < nlocal) { - MathExtra::sub3(f[j], forces, f[j]); - MathExtra::scale3(factor_lj, torquesj); - MathExtra::add3(torque[j], torquesj, torque[j]); + sub3(f[j], forces, f[j]); + scale3(factor_lj, torquesj); + add3(torque[j], torquesj, torque[j]); if (heat_flag) heatflux[j] -= dq; } @@ -301,8 +301,7 @@ void PairGranular::allocate() memory->create(cutsq,n+1,n+1,"pair:cutsq"); memory->create(cutoff_type,n+1,n+1,"pair:cutoff_type"); - - models = (ContactModel **) memory->srealloc(fix, n+1,n+1, "pair:contact_models"); + memory->create(models,n+1,n+1,"pair:contact_models"); onerad_dynamic = new double[n+1]; onerad_frozen = new double[n+1]; @@ -349,26 +348,26 @@ void PairGranular::coeff(int narg, char **arg) //Parse mandatory normal and tangential specifications int iarg = 2; - vec_models.back().init(arg[iarg], Contact::NORMAL); - ncoeff = vec_models.back().normal_model.num_coeffs + vec_models.back().init_model(std::string(arg[iarg]), NORMAL); + ncoeff = vec_models.back().normal_model->num_coeffs; iarg += 1; if (iarg + ncoeff >= narg) error->all(FLERR,"Illegal pair_coeff command" "Insufficient arguments provided for normal model."); - vec_models.back().normal_model.parse_coeffs(arg, iarg); + vec_models.back().normal_model->parse_coeffs(arg, iarg); iarg += ncoeff; if (strcmp(arg[iarg], "tangential") == 0) { if (iarg + 1 >= narg) error->all(FLERR,"Illegal pair_coeff command, must specify " "tangential model after tangential keyword"); - vec_models.back().init(arg[iarg], Contact::TANGENTIAL); - ncoeff = vec_models.back().tangential_model.num_coeffs; + vec_models.back().init_model(std::string(arg[iarg]), TANGENTIAL); + ncoeff = vec_models.back().tangential_model->num_coeffs; iarg += 1; if (iarg + ncoeff >= narg) error->all(FLERR, "Illegal pair_coeff command" "Insufficient arguments provided for tangential model."); - vec_models.back().tangential_model.parse_coeffs(arg, iarg); + vec_models.back().tangential_model->parse_coeffs(arg, iarg); iarg += ncoeff; } else{ error->all(FLERR, "Illegal pair_coeff command, 'tangential' keyword expected"); @@ -379,49 +378,49 @@ void PairGranular::coeff(int narg, char **arg) if (strcmp(arg[iarg], "damping") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - vec_models.back().init(arg[iarg], Contact::DAMPING); - ncoeff = vec_models.back().damping_model.num_coeffs; + vec_models.back().init_model(std::string(arg[iarg]), DAMPING); + ncoeff = vec_models.back().damping_model->num_coeffs; iarg += 1; if (iarg + ncoeff >= narg) error->all(FLERR, "Illegal pair_coeff command" "Insufficient arguments provided for damping model."); - vec_models.back().damping_model.parse_coeffs(arg, iarg); + vec_models.back().damping_model->parse_coeffs(arg, iarg); iarg += ncoeff; } else if (strcmp(arg[iarg], "rolling") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - vec_models.back().init(arg[iarg], Contact::ROLLING); - ncoeff = vec_models.back().rolling_model.num_coeffs; + vec_models.back().init_model(std::string(arg[iarg]), ROLLING); + ncoeff = vec_models.back().rolling_model->num_coeffs; iarg += 1; if (iarg + ncoeff >= narg) error->all(FLERR, "Illegal pair_coeff command" "Insufficient arguments provided for rolling model."); - vec_models.back().rolling_model.parse_coeffs(arg, iarg); + vec_models.back().rolling_model->parse_coeffs(arg, iarg); iarg += ncoeff; } else if (strcmp(arg[iarg], "twisting") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - vec_models.back().init(arg[iarg], Contact::TWISTING); - ncoeff = vec_models.back().twisting_model.num_coeffs; + vec_models.back().init_model(std::string(arg[iarg]), TWISTING); + ncoeff = vec_models.back().twisting_model->num_coeffs; iarg += 1; if (iarg + ncoeff >= narg) error->all(FLERR, "Illegal pair_coeff command" "Insufficient arguments provided for twisting model."); - vec_models.back().twisting_model.parse_coeffs(arg, iarg); + vec_models.back().twisting_model->parse_coeffs(arg, iarg); iarg += ncoeff; } else if (strcmp(arg[iarg], "heat") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - vec_models.back().init(arg[iarg], Contact::HEAT); - ncoeff = vec_models.back().heat_model.num_coeffs; + vec_models.back().init_model(std::string(arg[iarg]), HEAT); + ncoeff = vec_models.back().heat_model->num_coeffs; iarg += 1; if (iarg + ncoeff >= narg) error->all(FLERR, "Illegal pair_coeff command" "Insufficient arguments provided for heat model."); - vec_models.back().heat_model.parse_coeffs(arg, iarg); + vec_models.back().heat_model->parse_coeffs(arg, iarg); iarg += ncoeff; heat_flag = 1; @@ -440,8 +439,8 @@ void PairGranular::coeff(int narg, char **arg) // Define default damping model if unspecified, takes no args if (!vec_models.back().damping_model) { - vec_models.back().init("viscoelastic", Contact::DAMPING); - vec_models.back().damping_model.parse_coeffs(arg, 0); + vec_models.back().init_model("viscoelastic", DAMPING); + vec_models.back().damping_model->parse_coeffs(arg, 0); } if (vec_models.back().limit_damping && !vec_models.back().normal_model->allow_limit_damping) @@ -475,38 +474,41 @@ void PairGranular::init_style() if (comm->ghost_velocity == 0) error->all(FLERR,"Pair granular requires ghost atoms store velocity"); - // allocate history + // allocate history and initialize models int size_normal_history = 0; + int size_damping_history = 0; int size_tangential_history = 0; int size_rolling_history = 0; int size_twisting_history = 0; for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { - if (models[i][j]->normal_model.history_flag || - models[i][j]->tangential_model.history_flag || - models[i][j]->rolling_model.history_flag || - models[i][j]->twisting_model.history_flag) use_history = 1; - - if (models[i][j]->nondefault_history_transfer) // ??? + if (models[i][j]->normal_model->size_history != 0 || + models[i][j]->damping_model->size_history != 0 || + models[i][j]->tangential_model->size_history != 0 || + models[i][j]->rolling_model->size_history != 0 || + models[i][j]->twisting_model->size_history != 0) use_history = 1; if (models[i][j]->normal_model->size_history > size_normal_history) - size_normal_history = models[i][j]->normal_model.size_history; + size_normal_history = models[i][j]->damping_model->size_history; + if (models[i][j]->damping_model->size_history > size_damping_history) + size_damping_history = models[i][j]->normal_model->size_history; if (models[i][j]->tangential_model->size_history > size_tangential_history) - size_tangential_history = models[i][j]->tangential_model.size_history; + size_tangential_history = models[i][j]->tangential_model->size_history; if (models[i][j]->rolling_model->size_history > size_rolling_history) - size_rolling_history = models[i][j]->rolling_model.size_history; + size_rolling_history = models[i][j]->rolling_model->size_history; if (models[i][j]->twisting_model->size_history > size_twisting_history) - size_twisting_history = models[i][j]->twisting_model.size_history; + size_twisting_history = models[i][j]->twisting_model->size_history; } } - size_history = size_normal_history + size_tangential_history + - size_rolling_history + size_twisting_history; + size_history = size_normal_history + size_damping_history + + size_tangential_history + size_rolling_history + size_twisting_history; - tangential_history_index = size_normal_history; - roll_history_index = size_normal_history + size_tangential_history; - twist_history_index = size_normal_history + size_tangential_history + size_rolling_history; + damping_history_index = size_normal_history; + tangential_history_index = size_normal_history + damping_history_index; + roll_history_index = size_normal_history + damping_history_index + size_tangential_history; + twist_history_index = size_normal_history + damping_history_index + size_tangential_history + size_rolling_history; if (use_history) neighbor->add_request(this, NeighConst::REQ_SIZE|NeighConst::REQ_HISTORY); else neighbor->add_request(this, NeighConst::REQ_SIZE); @@ -601,11 +603,11 @@ double PairGranular::init_one(int i, int j) double cutoff = 0.0; if (setflag[i][j] == 0) { - if ((models[i][i]->normal_model.name != models[j][j]->normal_model.name) || - (models[i][i]->damping_model.name != models[j][j]->damping_model.name) || - (models[i][i]->tangential_model.name != models[j][j]->tangential_model.name) || - (models[i][i]->rolling_model.name != models[j][j]->rolling_model.name) || - (models[i][i]->twisting_model.name != models[j][j]->twisting_model.name)) { + if ((models[i][i]->normal_model->name != models[j][j]->normal_model->name) || + (models[i][i]->damping_model->name != models[j][j]->damping_model->name) || + (models[i][i]->tangential_model->name != models[j][j]->tangential_model->name) || + (models[i][i]->rolling_model->name != models[j][j]->rolling_model->name) || + (models[i][i]->twisting_model->name != models[j][j]->twisting_model->name)) { error->all(FLERR,"Granular pair style functional forms are different, " "cannot mix coefficients for types {} and {}. \n" "This combination must be set explicitly via a " @@ -614,12 +616,12 @@ double PairGranular::init_one(int i, int j) vec_models.push_back(ContactModel()); models[i][j] = models[j][i] = & vec_models.back(); - vec_models.back().init(models[i][i]->normal_model.name, Contact::NORMAL); - vec_models.back().init(models[i][i]->tangential_model.name, Contact::TANGENTIAL); - vec_models.back().init(models[i][i]->damping_model.name, Contact::DAMPING); - vec_models.back().init(models[i][i]->rolling_model.name, Contact::ROLLING); - vec_models.back().init(models[i][i]->twisting_model.name, Contact::TWISTING); - vec_models.back().init(models[i][i]->heat_model.name, Contact::HEAT); + vec_models.back().init_model(models[i][i]->normal_model->name, NORMAL); + vec_models.back().init_model(models[i][i]->tangential_model->name, TANGENTIAL); + vec_models.back().init_model(models[i][i]->damping_model->name, DAMPING); + vec_models.back().init_model(models[i][i]->rolling_model->name, ROLLING); + vec_models.back().init_model(models[i][i]->twisting_model->name, TWISTING); + vec_models.back().init_model(models[i][i]->heat_model->name, HEAT); vec_models.back().mix_coeffs(models[i][i], models[j][j]); } @@ -675,10 +677,16 @@ double PairGranular::init_one(int i, int j) // Copy global options models[i][j]->dt = models[j][i]->dt = dt; - models[i][j]->normal_model.history_index = models[j][i]->normal_model.history_index = normal_history_index; - models[i][j]->tangential_model.history_index = models[j][i]->tangential_model.history_index = tangential_history_index; - models[i][j]->rolling_model.history_index = models[j][i]->rolling_model.history_index = rolling_history_index; - models[i][j]->twisting_model.history_index = models[j][i]->twisting_model.history_index = twisting_history_index; + models[i][j]->normal_model->history_index = models[j][i]->normal_model->history_index = normal_history_index; + models[i][j]->tangential_model->history_index = models[j][i]->tangential_model->history_index = tangential_history_index; + models[i][j]->rolling_model->history_index = models[j][i]->rolling_model->history_index = roll_history_index; + models[i][j]->twisting_model->history_index = models[j][i]->twisting_model->history_index = twist_history_index; + + models[i][j]->size_history = models[j][i]->size_history = size_history; + models[i][j]->init(); // Calculates cumulative properties of sub models + models[j][i]->init(); + + if (models[i][j]->nondefault_history_transfer) nondefault_history_transfer = 1; return cutoff; } @@ -718,7 +726,7 @@ void PairGranular::read_restart(FILE *fp) if (setflag[i][j]) { vec_models.push_back(ContactModel()); models[i][j] = & vec_models.back(); - models[i][j]->read_restart(); + models[i][j]->read_restart(fp); } } } @@ -729,6 +737,12 @@ void PairGranular::read_restart(FILE *fp) void PairGranular::reset_dt() { dt = update->dt; + + for (int i = 1; i <= atom->ntypes; i++) { + for (int j = i; j <= atom->ntypes; j++) { + models[i][j]->dt = dt; + } + } } /* ---------------------------------------------------------------------- */ @@ -819,7 +833,7 @@ double PairGranular::single(int i, int j, int itype, int jtype, history = &allhistory[size_history*neighprev]; } - double forces[3], torquesi[3], torquesj[3]; + double *forces, *torquesi, *torquesj; models[itype][jtype]->calculate_forces(); forces = models[itype][jtype]->forces; torquesi = models[itype][jtype]->torquesi; @@ -893,11 +907,16 @@ double PairGranular::memory_usage() only needed if any history entries i-j are not just negative of j-i entries ------------------------------------------------------------------------- */ -void PairGranular::transfer_history(double* source, double* target, int source_type, int target_type) +void PairGranular::transfer_history(double* source, double* target, int itype, int jtype) { - models[itype][jtype]->transfer_history(); - for (int i = 0; i < size_history; i++){ - target[i] = history_transfer_factors[i]*source[i]; + if (models[itype][jtype]->nondefault_history_transfer) { + for (int i = 0; i < size_history; i++) { + target[i] = models[itype][jtype]->transfer_history_factor[i] * source [i]; + } + } else { + for (int i = 0; i < size_history; i++) { + target[i] = -source[i]; + } } } diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index e018f9fe7c..1032cf6b7c 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -22,7 +22,7 @@ PairStyle(granular,PairGranular); #include "contact.h" #include "pair.h" -#include "vector.h" +#include namespace LAMMPS_NS { @@ -65,11 +65,10 @@ class PairGranular : public Pair { int nmax; // allocated size of mass_rigid void allocate(); - void transfer_history(double *, double *) override; + void transfer_history(double *, double *, int, int) override; private: int size_history; - int *history_transfer_factors; int heat_flag; // contact models @@ -81,6 +80,7 @@ class PairGranular : public Pair { // indices of history entries int normal_history_index; + int damping_history_index; int tangential_history_index; int roll_history_index; int twist_history_index; diff --git a/src/contact.h b/src/contact.h index 167f88e9de..96758771b4 100644 --- a/src/contact.h +++ b/src/contact.h @@ -14,78 +14,89 @@ #ifndef LMP_CONTACT_H #define LMP_CONTACT_H +#include "pointers.h" // IWYU pragma: export + +namespace LAMMPS_NS { namespace Contact { - enum {HOOKE, HERTZ, HERTZ_MATERIAL, DMT, JKR}; - enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; - enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, - TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, - TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; - enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; - enum {ROLL_NONE, ROLL_SDS}; +enum ModelType { + NORMAL = 0, + DAMPING = 1, + TANGENTIAL = 2, + ROLLING = 3, + TWISTING = 4, + HEAT = 5 +}; - #define PI27SQ 266.47931882941264802866 // 27*PI**2 - #define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) - #define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) - #define INVROOT6 0.40824829046386307274 // 1/sqrt(6) - #define FOURTHIRDS (4.0/3.0) // 4/3 - #define ONETHIRD (1.0/3.0) // 1/3 - #define THREEQUARTERS 0.75 // 3/4 +#define EPSILON 1e-10 - #define EPSILON 1e-10 +// forward declaration +class NormalModel; +class DampingModel; +class TangentialModel; +class RollingModel; +class TwistingModel; +class HeatModel; +class SubModel; - class ContactModel { - public: - ContactModel(); - void reset_contact(); - bool check_contact(); - void prep_contact(); - void calculate_forces(double *, double *, double *, double *); - double calculate_heat(); - double pulloff_distance(double, double); +class ContactModel : protected Pointers { + public: + ContactModel(); + ~ContactModel(); + void init(); + bool check_contact(); + void reset_contact(); + void prep_contact(); + void calculate_forces(); + double calculate_heat(); + double pulloff_distance(double, double); - int normal_model, damping_model, tangential_model; - int roll_model, twist_model; - int limit_damping; - double cutoff_type; - double Emod, poisson; // variables used in defining mixed interactions - double k_norm, gamma_norm, cohesion; // normal_coeffs - double k_tang, gamma_tang, mu_tang; // tangential_coeffs - wutang? - double k_roll, gamma_roll, mu_roll; // roll_coeffs - double k_twist, gamma_twist, mu_twist; // twist_coeffs - double conductivity; + void init_model(std::string, ModelType); - double radi, radj, meff, dt, Ti, Tj; - double *xi, *xj, *vi, *vj, *omegai, *omegaj; - int history_update, roll_history_index, twist_history_index; + void mix_coeffs(ContactModel*, ContactModel*); - double fs[3], fr[3], ft[3], magtortwist; + void write_restart(FILE *); + void read_restart(FILE *); - private: - double a, knfac, Fntot, Fncrit, Fscrit, Frcrit, damp_normal_prefactor; - double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; - double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; - double magtwist; - bool touch; + // Sub models + NormalModel *normal_model; + DampingModel *damping_model; + TangentialModel *tangential_model; + RollingModel *rolling_model; + TwistingModel *twisting_model; + HeatModel *heat_model; + SubModel *sub_models[6]; // Need to resize if we add more model flavors - int prep_flag, check_flag; - int mindlin_rescale, mindlin_force; + // Extra options + int beyond_contact, limit_damping, history_update; + double cutoff_type; - bool touch_JKR(int); - double normal_JKR(); - double normal_DMT(); - double normal_Hertz(); - double normal_Hooke(); - double normal_damping(); - void tangential_no_history(); - void tangential_history(double *); - void tangential_mindlin(double *); - void rolling(double *); - void twisting_marshall(double *); - void twisting_SDS(double *); + // History variables + int size_history, nondefault_history_transfer; + double *transfer_history_factor; + double *history; - }; + // Contact properties/output + double *forces, *torquesi, *torquesj; + + double radi, radj, meff, dt, Ti, Tj, area; + double Fntot, magtortwist; + + double *xi, *xj, *vi, *vj, *omegai, *omegaj; + double fs[3], fr[3], ft[3]; + + double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; + double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; + double magtwist; + bool touch; + + protected: + + int prep_flag, check_flag; + int nmodels; +}; } // namespace Contact +} // namespace LAMMPS_NS #endif diff --git a/src/fix_neigh_history.cpp b/src/fix_neigh_history.cpp index 37d1b37946..975d93ff83 100644 --- a/src/fix_neigh_history.cpp +++ b/src/fix_neigh_history.cpp @@ -337,6 +337,7 @@ void FixNeighHistory::pre_exchange_newton() int *ilist,*jlist,*numneigh,**firstneigh; int *allflags; double *allvalues,*onevalues,*jvalues; + int *type = atom->type; // NOTE: all operations until very end are with // nlocal_neigh <= current nlocal and nall_neigh @@ -430,7 +431,7 @@ void FixNeighHistory::pre_exchange_newton() partner[j][m] = tag[i]; jvalues = &valuepartner[j][dnum*m]; if (pair->nondefault_history_transfer) - pair->transfer_history(onevalues,jvalues); + pair->transfer_history(onevalues,jvalues,type[i],type[j]); else for (n = 0; n < dnum; n++) jvalues[n] = -onevalues[n]; } } @@ -469,6 +470,7 @@ void FixNeighHistory::pre_exchange_no_newton() int *ilist,*jlist,*numneigh,**firstneigh; int *allflags; double *allvalues,*onevalues,*jvalues; + int *type = atom->type; // NOTE: all operations until very end are with nlocal_neigh <= current nlocal // because previous neigh list was built with nlocal_neigh @@ -544,7 +546,7 @@ void FixNeighHistory::pre_exchange_no_newton() partner[j][m] = tag[i]; jvalues = &valuepartner[j][dnum*m]; if (pair->nondefault_history_transfer) - pair->transfer_history(onevalues, jvalues); + pair->transfer_history(onevalues, jvalues,type[i],type[j]); else for (n = 0; n < dnum; n++) jvalues[n] = -onevalues[n]; } } diff --git a/src/pair.h b/src/pair.h index 4763a225d2..9e72f03d23 100644 --- a/src/pair.h +++ b/src/pair.h @@ -211,7 +211,7 @@ class Pair : protected Pointers { virtual void min_xf_pointers(int, double **, double **) {} virtual void min_xf_get(int) {} virtual void min_x_set(int) {} - virtual void transfer_history(double *, double *) {} + virtual void transfer_history(double *, double *, int, int) {} virtual double atom2cut(int) { return 0.0; } virtual double radii2cut(double, double) { return 0.0; } From df22b91ac35ebe4d7faf0cacb6009fc1b47583cd Mon Sep 17 00:00:00 2001 From: jtclemm Date: Mon, 8 Aug 2022 08:01:48 -0600 Subject: [PATCH 015/445] Updating coeff parsing, first pass on fix wall/gran, misc fixes --- src/GRANULAR/contact.cpp | 114 +- src/GRANULAR/contact.h | 6 +- src/GRANULAR/contact_heat_models.cpp | 3 + src/GRANULAR/contact_normal_models.cpp | 11 + src/GRANULAR/contact_rolling_models.cpp | 6 +- src/GRANULAR/contact_sub_models.cpp | 8 +- src/GRANULAR/contact_sub_models.h | 2 +- src/GRANULAR/contact_tangential_models.cpp | 9 + src/GRANULAR/contact_twisting_models.cpp | 4 + src/GRANULAR/fix_wall_gran.cpp | 1357 +++----------------- src/GRANULAR/fix_wall_gran.h | 38 +- src/GRANULAR/fix_wall_gran_region.cpp | 167 +-- src/GRANULAR/pair_granular.cpp | 103 +- src/GRANULAR/pair_granular.h | 3 - src/contact.h | 6 +- 15 files changed, 477 insertions(+), 1360 deletions(-) diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index 4358f6df1c..7ce3d8c739 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -30,6 +30,7 @@ #include "contact_heat_models.h" #include "comm.h" #include "error.h" +#include "force.h" #include @@ -44,6 +45,7 @@ ContactModel::ContactModel() : beyond_contact = 0; nondefault_history_transfer = 0; cutoff_type = 0.0; + wall_flag = 0; nmodels = 5; reset_contact(); @@ -107,6 +109,8 @@ void ContactModel::init_model(std::string model_name, ModelType model_type) else if (model_name =="area") heat_model = new HeatArea(); else error->all(FLERR, "Heat model name not recognized"); sub_models[model_type] = heat_model; + } else { + error->all(FLERR, "Illegal model type"); } sub_models[model_type]->name.assign(model_name); @@ -116,14 +120,82 @@ void ContactModel::init_model(std::string model_name, ModelType model_type) /* ---------------------------------------------------------------------- */ +int ContactModel::init_classic_model(char **arg, int iarg, int narg) +{ + double kn, kt, gamman, gammat, xmu; + + if (iarg + 6 >= narg) + error->all(FLERR,"Insufficient arguments provided for classic gran model command"); + + kn = utils::numeric(FLERR,arg[iarg + 1],false,lmp); + if (strcmp(arg[iarg + 2],"NULL") == 0) kt = kn * 2.0 / 7.0; + else kt = utils::numeric(FLERR,arg[iarg + 2],false,lmp); + + gamman = utils::numeric(FLERR,arg[iarg + 3],false,lmp); + if (strcmp(arg[iarg + 4],"NULL") == 0) gammat = 0.5 * gamman; + else gammat = utils::numeric(FLERR,arg[iarg + 4],false,lmp); + + xmu = utils::numeric(FLERR,arg[iarg + 5],false,lmp); + int dampflag = utils::inumeric(FLERR,arg[iarg + 6],false,lmp); + if (dampflag == 0) gammat = 0.0; + + if (kn < 0.0 || kt < 0.0 || gamman < 0.0 || gammat < 0.0 || + xmu < 0.0 || xmu > 10000.0 || dampflag < 0 || dampflag > 1) + error->all(FLERR,"Illegal classic gran model command"); + + if (strcmp(arg[iarg],"hooke") == 0) { + init_model("hooke", NORMAL); + init_model("linear_nohistory", TANGENTIAL); + } else if (strcmp(arg[iarg],"hooke/history") == 0) { + init_model("hooke", NORMAL); + init_model("linear_history", TANGENTIAL); + } else if (strcmp(arg[iarg],"hertz/history") == 0) { + // convert Kn and Kt from pressure units to force/distance^2 if Hertzian + kn /= force->nktv2p; + kt /= force->nktv2p; + init_model("hertz", NORMAL); + init_model("mindlin", TANGENTIAL); // Dan is this right? + } else error->all(FLERR,"Invalid classic gran model"); + init_model("mass_velocity", DAMPING); + + // ensure additional models are undefined + rolling_model = nullptr; + twisting_model = nullptr; + heat_model = nullptr; + + // manually parse coeffs + normal_model->coeffs[0] = kn; + normal_model->coeffs[1] = gamman; + tangential_model->coeffs[0] = kt; + tangential_model->coeffs[1] = gammat; + tangential_model->coeffs[2] = xmu; + + normal_model->coeffs_to_local(); + tangential_model->coeffs_to_local(); + damping_model->coeffs_to_local(); + + iarg += 7; + return iarg ; +} + +/* ---------------------------------------------------------------------- */ + void ContactModel::init() { + if (!normal_model) error->all(FLERR, "Must specify normal contact model"); + if (!damping_model) error->all(FLERR, "Must specify damping contact model"); + if (!tangential_model) error->all(FLERR, "Must specify tangential contact model"); + int i, j, size_cumulative; + size_history = 0; for (i = 0; i < nmodels; i++) { - if (sub_models[i]->nondefault_history_transfer) - nondefault_history_transfer = 1; - if (sub_models[i]->beyond_contact) - beyond_contact = 1; + if (sub_models[i]) { + if (sub_models[i]->nondefault_history_transfer) + nondefault_history_transfer = 1; + if (sub_models[i]->beyond_contact) + beyond_contact = 1; + size_history += sub_models[i]->size_history; + } } transfer_history_factor = new double(size_history); @@ -134,13 +206,17 @@ void ContactModel::init() // Find which model controls this history value size_cumulative = 0; for (j = 0; j < nmodels; j++) { - if (size_cumulative + sub_models[j]->size_history > i) break; - size_cumulative += sub_models[j]->size_history; + if (sub_models[j]) { + if (size_cumulative + sub_models[j]->size_history > i) break; + size_cumulative += sub_models[j]->size_history; + } } // Check if model has nondefault transfers, if so copy its array - if (sub_models[j]->nondefault_history_transfer) { - transfer_history_factor[i] = sub_models[j]->transfer_history_factor[i - size_cumulative]; + if (j != nmodels) { + if (sub_models[j]->nondefault_history_transfer) { + transfer_history_factor[i] = sub_models[j]->transfer_history_factor[i - size_cumulative]; + } } } } @@ -151,7 +227,8 @@ void ContactModel::init() void ContactModel::mix_coeffs(ContactModel *c1, ContactModel *c2) { for (int i = 0; i < nmodels; i++) - sub_models[i]->mix_coeffs(c1->sub_models[i], c2->sub_models[i]); + if (sub_models[i]) + sub_models[i]->mix_coeffs(c1->sub_models[i], c2->sub_models[i]); limit_damping = MAX(c1->limit_damping, c2->limit_damping); cutoff_type = MAX(c1->cutoff_type, c2->cutoff_type); @@ -218,10 +295,6 @@ void ContactModel::read_restart(FILE *fp) void ContactModel::reset_contact() { - radi = radj = Fntot = magtortwist = 0.0; - xi = xj = vi = vj = omegai = omegaj = nullptr; - forces = torquesi = torquesj = history = nullptr; - prep_flag = check_flag = 0; touch = false; } @@ -232,10 +305,17 @@ bool ContactModel::check_contact() { check_flag = 1; - sub3(xi, xj, dx); - rsq = lensq3(dx); - radsum = radi + radj; - Reff = radi * radj / radsum; + if (wall_flag) { + rsq = lensq3(dx); + radsum = radi; + if (rwall == 0) Reff = radi; + else Reff = radi * rwall/(radi + rwall); + } else { + sub3(xi, xj, dx); + rsq = lensq3(dx); + radsum = radi + radj; + Reff = radi * radj / radsum; + } touch = normal_model->touch(); return touch; diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index 96758771b4..bd04fe9ce1 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -52,7 +52,7 @@ class ContactModel : protected Pointers { double pulloff_distance(double, double); void init_model(std::string, ModelType); - + int init_classic_model(char **, int, int); void mix_coeffs(ContactModel*, ContactModel*); void write_restart(FILE *); @@ -68,7 +68,7 @@ class ContactModel : protected Pointers { SubModel *sub_models[6]; // Need to resize if we add more model flavors // Extra options - int beyond_contact, limit_damping, history_update; + int beyond_contact, limit_damping, history_update, wall_flag; double cutoff_type; // History variables @@ -79,7 +79,7 @@ class ContactModel : protected Pointers { // Contact properties/output double *forces, *torquesi, *torquesj; - double radi, radj, meff, dt, Ti, Tj, area; + double radi, radj, rwall, meff, dt, Ti, Tj, area; double Fntot, magtortwist; double *xi, *xj, *vi, *vj, *omegai, *omegaj; diff --git a/src/GRANULAR/contact_heat_models.cpp b/src/GRANULAR/contact_heat_models.cpp index 29134b3e73..3793f774c2 100644 --- a/src/GRANULAR/contact_heat_models.cpp +++ b/src/GRANULAR/contact_heat_models.cpp @@ -13,6 +13,7 @@ #include "contact_heat_models.h" #include "contact.h" +#include "error.h" using namespace LAMMPS_NS; using namespace Contact; @@ -31,6 +32,8 @@ HeatArea::HeatArea() void HeatArea::coeffs_to_local() { conductivity = coeffs[0]; + + if (conductivity < 0.0) error->all(FLERR, "Illegal area heat model"); } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index c11fddb1d7..6a6db39189 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -13,6 +13,7 @@ #include "contact_normal_models.h" #include "contact.h" +#include "error.h" #include "math_const.h" using namespace LAMMPS_NS; @@ -83,6 +84,8 @@ void NormalHooke::coeffs_to_local() { k = coeffs[0]; damp = coeffs[1]; + + if (k < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hooke normal model"); } /* ---------------------------------------------------------------------- */ @@ -124,6 +127,8 @@ void NormalHertz::coeffs_to_local() { k = coeffs[0]; damp = coeffs[1]; + + if (k < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hertz normal model"); } /* ---------------------------------------------------------------------- */ @@ -169,6 +174,8 @@ void NormalHertzMaterial::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; k = 4 / 3 * Emod; + + if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hertz material normal model"); } /* ---------------------------------------------------------------------- */ @@ -201,6 +208,8 @@ void NormalDMT::coeffs_to_local() poiss = coeffs[2]; cohesion = coeffs[3]; k = 4 / 3 * Emod; + + if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal DMT normal model"); } /* ---------------------------------------------------------------------- */ @@ -260,6 +269,8 @@ void NormalJKR::coeffs_to_local() cohesion = coeffs[3]; k = 4/3*Emod; Escaled = k * THREEQUARTERS; + + if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal JKR normal model"); } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/contact_rolling_models.cpp b/src/GRANULAR/contact_rolling_models.cpp index 0c256b0fbf..8074b14141 100644 --- a/src/GRANULAR/contact_rolling_models.cpp +++ b/src/GRANULAR/contact_rolling_models.cpp @@ -13,9 +13,10 @@ #include "contact_normal_models.h" #include "contact_rolling_models.h" +#include "contact.h" +#include "error.h" #include "math_const.h" #include "math_extra.h" -#include "contact.h" using namespace LAMMPS_NS; using namespace Contact; @@ -39,6 +40,9 @@ void RollingSDS::coeffs_to_local() k = coeffs[0]; mu = coeffs[1]; gamma = coeffs[2]; + + if (k < 0.0 || mu < 0.0 || gamma < 0.0) + error->all(FLERR, "Illegal SDS rolling model"); } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/contact_sub_models.cpp b/src/GRANULAR/contact_sub_models.cpp index 2809204de7..a0bf99301d 100644 --- a/src/GRANULAR/contact_sub_models.cpp +++ b/src/GRANULAR/contact_sub_models.cpp @@ -18,6 +18,7 @@ */ #include "contact_sub_models.h" +#include "error.h" #include "utils.h" using namespace LAMMPS_NS; @@ -55,14 +56,19 @@ void SubModel::allocate_coeffs() /* ---------------------------------------------------------------------- */ -void SubModel::parse_coeffs(char **arg, int iarg) +int SubModel::parse_coeffs(char **arg, int iarg, int narg) { + if (iarg + num_coeffs >= narg) + error->all(FLERR, "Insufficient arguments provided for {} model", name); + for (int i = 0; i < num_coeffs; i++) { // A few parameters (eg.g kt for tangential mindlin) allow null if (strcmp(arg[iarg+i+1], "NULL") == 0) coeffs[i] = -1; else coeffs[i] = utils::numeric(FLERR,arg[iarg+i+1],false,lmp); } coeffs_to_local(); + + return iarg + num_coeffs; } /* ---------------------------------------------------------------------- diff --git a/src/GRANULAR/contact_sub_models.h b/src/GRANULAR/contact_sub_models.h index 7eca7f4152..95da8d5cbf 100644 --- a/src/GRANULAR/contact_sub_models.h +++ b/src/GRANULAR/contact_sub_models.h @@ -28,7 +28,7 @@ class SubModel : protected Pointers { int num_coeffs; double *coeffs; void read_restart(); - void parse_coeffs(char **, int); + int parse_coeffs(char **, int, int); virtual void mix_coeffs(SubModel*, SubModel*) {}; virtual void coeffs_to_local() {}; void allocate_coeffs(); diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index 45ed993eeb..4f25e96071 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -42,6 +42,9 @@ void TangentialLinearNoHistory::coeffs_to_local() xt = coeffs[0]; mu = coeffs[1]; damp = xt * contact->damping_model->damp; + + if (k < 0.0 || xt < 0.0 || mu < 0.0) + error->all(FLERR, "Illegal linear no history tangential model"); } /* ---------------------------------------------------------------------- */ @@ -87,6 +90,9 @@ void TangentialLinearHistory::coeffs_to_local() xt = coeffs[1]; mu = coeffs[2]; damp = xt * contact->damping_model->damp; + + if (k < 0.0 || xt < 0.0 || mu < 0.0) + error->all(FLERR, "Illegal linear tangential model"); } /* ---------------------------------------------------------------------- */ @@ -182,6 +188,9 @@ void TangentialMindlin::coeffs_to_local() k = 8.0 * mix_stiffnessE(contact->normal_model->Emod, contact->normal_model->Emod, contact->normal_model->poiss, contact->normal_model->poiss); } + if (k < 0.0 || xt < 0.0 || mu < 0.0) + error->all(FLERR, "Illegal Mindlin tangential model"); + damp = xt * contact->damping_model->damp; } diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/GRANULAR/contact_twisting_models.cpp index 04d89a5b88..75a2414c21 100644 --- a/src/GRANULAR/contact_twisting_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -15,6 +15,7 @@ #include "contact_tangential_models.h" #include "contact_twisting_models.h" #include "contact.h" +#include "error.h" #include "math_const.h" using namespace LAMMPS_NS; @@ -75,6 +76,9 @@ void TwistingSDS::coeffs_to_local() k = coeffs[0]; mu = coeffs[1]; damp = coeffs[2]; + + if (k < 0.0 || mu < 0.0 || damp < 0.0) + error->all(FLERR, "Illegal SDS twisting model"); } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index da7af48e82..b4d94d62fe 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -20,10 +20,18 @@ #include "fix_wall_gran.h" #include "atom.h" +#include "contact.h" +#include "contact_sub_models.h" +#include "contact_normal_models.h" +#include "contact_tangential_models.h" +#include "contact_damping_models.h" +#include "contact_rolling_models.h" +#include "contact_twisting_models.h" +#include "contact_heat_models.h" #include "domain.h" #include "error.h" -#include "force.h" #include "math_const.h" +#include "math_extra.h" #include "memory.h" #include "modify.h" #include "neighbor.h" @@ -34,31 +42,17 @@ #include using namespace LAMMPS_NS; +using namespace Contact; using namespace FixConst; using namespace MathConst; - -#define PI27SQ 266.47931882941264802866 // 27*PI**2 -#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) -#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) -#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) -#define FOURTHIRDS 1.333333333333333 // 4/3 -#define THREEQUARTERS 0.75 // 3/4 -#define TWOPI 6.28318530717959 // 2*PI +using namespace MathExtra; #define BIG 1.0e20 -#define EPSILON 1e-10 // XYZ PLANE need to be 0,1,2 enum {NOSTYLE=-1,XPLANE=0,YPLANE=1,ZPLANE=2,ZCYLINDER,REGION}; - enum {NONE,CONSTANT,EQUAL}; -enum {DAMPING_NONE, VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI}; -enum {TANGENTIAL_NONE, TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY, - TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE, - TANGENTIAL_MINDLIN_FORCE, TANGENTIAL_MINDLIN_RESCALE_FORCE}; -enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL}; -enum {ROLL_NONE, ROLL_SDS}; /* ---------------------------------------------------------------------- */ @@ -72,237 +66,70 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Fix wall/gran requires atom style sphere"); create_attribute = 1; - limit_damping = 0; // set interaction style // disable bonded/history option for now + model = new ContactModel(); + model->wall_flag = 1; - if (strcmp(arg[3],"hooke") == 0) pairstyle = HOOKE; - else if (strcmp(arg[3],"hooke/history") == 0) pairstyle = HOOKE_HISTORY; - else if (strcmp(arg[3],"hertz/history") == 0) pairstyle = HERTZ_HISTORY; - else if (strcmp(arg[3],"granular") == 0) pairstyle = GRANULAR; - else error->all(FLERR,"Invalid fix wall/gran interaction style"); - - use_history = restart_peratom = 1; - if (pairstyle == HOOKE) use_history = restart_peratom = 0; - tangential_history = roll_history = twist_history = 0; - normal_model = NORMAL_NONE; - tangential_model = TANGENTIAL_NONE; - damping_model = DAMPING_NONE; + if (strcmp(arg[3],"granular") == 0) classic_flag = 0; + else classic_flag = 1; + limit_damping = 0; + heat_flag = 0; + int Twall_defined = 0; // wall/particle coefficients int iarg; - if (pairstyle != GRANULAR) { - size_history = 3; - if (narg < 11) error->all(FLERR,"Illegal fix wall/gran command"); + if (classic_flag) { + iarg = 3; + iarg = model->init_classic_model(arg, iarg, narg); - kn = utils::numeric(FLERR,arg[4],false,lmp); - if (strcmp(arg[5],"NULL") == 0) kt = kn * 2.0/7.0; - else kt = utils::numeric(FLERR,arg[5],false,lmp); - - gamman = utils::numeric(FLERR,arg[6],false,lmp); - if (strcmp(arg[7],"NULL") == 0) gammat = 0.5 * gamman; - else gammat = utils::numeric(FLERR,arg[7],false,lmp); - - xmu = utils::numeric(FLERR,arg[8],false,lmp); - int dampflag = utils::inumeric(FLERR,arg[9],false,lmp); - if (dampflag == 0) gammat = 0.0; - - if (kn < 0.0 || kt < 0.0 || gamman < 0.0 || gammat < 0.0 || - xmu < 0.0 || xmu > 10000.0 || dampflag < 0 || dampflag > 1) - error->all(FLERR,"Illegal fix wall/gran command"); - - // convert Kn and Kt from pressure units to force/distance^2 if Hertzian - - if (pairstyle == HERTZ_HISTORY) { - kn /= force->nktv2p; - kt /= force->nktv2p; - } - iarg = 10; - - if (strcmp(arg[iarg],"limit_damping") == 0) { - limit_damping = 1; - iarg += 1; + if (iarg < narg) { + if (strcmp(arg[iarg],"limit_damping") == 0) { + model->limit_damping = 1; + iarg += 1; + } } } else { - iarg = 4; - damping_model = VISCOELASTIC; - roll_model = twist_model = NONE; + iarg = 3; + model->init_model(std::string(arg[iarg]), NORMAL); + iarg += 1; + iarg = model->normal_model->parse_coeffs(arg, iarg, narg); + while (iarg < narg) { - if (strcmp(arg[iarg], "hooke") == 0) { - if (iarg + 2 >= narg) - error->all(FLERR,"Illegal fix wall/gran command, " - "not enough parameters provided for Hooke option"); - normal_model = NORMAL_HOOKE; - normal_coeffs[0] = utils::numeric(FLERR,arg[iarg+1],false,lmp); //kn - normal_coeffs[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); //damping - iarg += 3; - } else if (strcmp(arg[iarg], "hertz") == 0) { - int num_coeffs = 2; - if (iarg + num_coeffs >= narg) - error->all(FLERR,"Illegal fix wall/gran command, " - "not enough parameters provided for Hertz option"); - normal_model = NORMAL_HERTZ; - normal_coeffs[0] = utils::numeric(FLERR,arg[iarg+1],false,lmp); //kn - normal_coeffs[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); //damping - iarg += num_coeffs+1; - } else if (strcmp(arg[iarg], "hertz/material") == 0) { - int num_coeffs = 3; - if (iarg + num_coeffs >= narg) - error->all(FLERR,"Illegal fix wall/gran command, " - "not enough parameters provided for Hertz option"); - normal_model = HERTZ_MATERIAL; - Emod = utils::numeric(FLERR,arg[iarg+1],false,lmp); //E - normal_coeffs[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); //damping - poiss = utils::numeric(FLERR,arg[iarg+3],false,lmp); //Poisson's ratio - normal_coeffs[0] = Emod/(2*(1-poiss))*FOURTHIRDS; - normal_coeffs[2] = poiss; - iarg += num_coeffs+1; - } else if (strcmp(arg[iarg], "dmt") == 0) { - if (iarg + 4 >= narg) - error->all(FLERR,"Illegal fix wall/gran command, " - "not enough parameters provided for Hertz option"); - normal_model = DMT; - Emod = utils::numeric(FLERR,arg[iarg+1],false,lmp); //E - normal_coeffs[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); //damping - poiss = utils::numeric(FLERR,arg[iarg+3],false,lmp); //Poisson's ratio - normal_coeffs[0] = Emod/(2*(1-poiss))*FOURTHIRDS; - normal_coeffs[2] = poiss; - normal_coeffs[3] = utils::numeric(FLERR,arg[iarg+4],false,lmp); //cohesion - iarg += 5; - } else if (strcmp(arg[iarg], "jkr") == 0) { - if (iarg + 4 >= narg) - error->all(FLERR,"Illegal wall/gran command, " - "not enough parameters provided for JKR option"); - normal_model = JKR; - Emod = utils::numeric(FLERR,arg[iarg+1],false,lmp); //E - normal_coeffs[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); //damping - poiss = utils::numeric(FLERR,arg[iarg+3],false,lmp); //Poisson's ratio - normal_coeffs[0] = Emod/(2*(1-poiss))*FOURTHIRDS; - normal_coeffs[2] = poiss; - normal_coeffs[3] = utils::numeric(FLERR,arg[iarg+4],false,lmp); //cohesion - iarg += 5; - } else if (strcmp(arg[iarg], "damping") == 0) { - if (iarg+1 >= narg) - error->all(FLERR, "Illegal wall/gran command, " - "not enough parameters provided for damping model"); - if (strcmp(arg[iarg+1], "velocity") == 0) { - damping_model = VELOCITY; - iarg += 1; - } else if (strcmp(arg[iarg+1], "mass_velocity") == 0) { - damping_model = MASS_VELOCITY; - iarg += 1; - } else if (strcmp(arg[iarg+1], "viscoelastic") == 0) { - damping_model = VISCOELASTIC; - iarg += 1; - } else if (strcmp(arg[iarg+1], "tsuji") == 0) { - damping_model = TSUJI; - iarg += 1; - } else error->all(FLERR, "Illegal wall/gran command, " - "unrecognized damping model"); + if (strcmp(arg[iarg], "damping") == 0) { + if (iarg + 1 >= narg) + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + model->init_model(std::string(arg[iarg]), DAMPING); iarg += 1; + iarg = model->damping_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "tangential") == 0) { if (iarg + 1 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "must specify tangential model after tangential keyword"); - if (strcmp(arg[iarg+1], "linear_nohistory") == 0) { - if (iarg + 3 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for tangential model"); - tangential_model = TANGENTIAL_NOHISTORY; - tangential_coeffs[0] = 0; - // gammat and friction coeff - tangential_coeffs[1] = utils::numeric(FLERR,arg[iarg+2],false,lmp); - tangential_coeffs[2] = utils::numeric(FLERR,arg[iarg+3],false,lmp); - iarg += 4; - } else if ((strcmp(arg[iarg+1], "linear_history") == 0) || - (strcmp(arg[iarg+1], "mindlin") == 0) || - (strcmp(arg[iarg+1], "mindlin_rescale") == 0) || - (strcmp(arg[iarg+1], "mindlin/force") == 0) || - (strcmp(arg[iarg+1], "mindlin_rescale/force") == 0)) { - if (iarg + 4 >= narg) - error->all(FLERR,"Illegal pair_coeff command, " - "not enough parameters provided for tangential model"); - if (strcmp(arg[iarg+1], "linear_history") == 0) - tangential_model = TANGENTIAL_HISTORY; - else if (strcmp(arg[iarg+1], "mindlin") == 0) - tangential_model = TANGENTIAL_MINDLIN; - else if (strcmp(arg[iarg+1], "mindlin_rescale") == 0) - tangential_model = TANGENTIAL_MINDLIN_RESCALE; - else if (strcmp(arg[iarg+1], "mindlin/force") == 0) - tangential_model = TANGENTIAL_MINDLIN_FORCE; - else if (strcmp(arg[iarg+1], "mindlin_rescale/force") == 0) - tangential_model = TANGENTIAL_MINDLIN_RESCALE_FORCE; - if ((tangential_model == TANGENTIAL_MINDLIN || - tangential_model == TANGENTIAL_MINDLIN_RESCALE || - tangential_model == TANGENTIAL_MINDLIN_FORCE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) && - (strcmp(arg[iarg+2], "NULL") == 0)) { - if (normal_model == NORMAL_HERTZ || normal_model == NORMAL_HOOKE) { - error->all(FLERR, "NULL setting for Mindlin tangential " - "stiffness requires a normal contact model " - "that specifies material properties"); - } - tangential_coeffs[0] = Emod/4*(2-poiss)*(1+poiss); - } else { - tangential_coeffs[0] = utils::numeric(FLERR,arg[iarg+2],false,lmp); //kt - } - tangential_history = 1; - // gammat and friction coeff - tangential_coeffs[1] = utils::numeric(FLERR,arg[iarg+3],false,lmp); - tangential_coeffs[2] = utils::numeric(FLERR,arg[iarg+4],false,lmp); - iarg += 5; - } else { - error->all(FLERR, "Illegal pair_coeff command, " - "tangential model not recognized"); - } + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + model->init_model(std::string(arg[iarg]), TANGENTIAL); + iarg += 1; + iarg = model->tangential_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "rolling") == 0) { if (iarg + 1 >= narg) - error->all(FLERR, "Illegal wall/gran command, not enough parameters"); - if (strcmp(arg[iarg+1], "none") == 0) { - roll_model = ROLL_NONE; - iarg += 2; - } else if (strcmp(arg[iarg+1], "sds") == 0) { - if (iarg + 4 >= narg) - error->all(FLERR,"Illegal wall/gran command, " - "not enough parameters provided for rolling model"); - roll_model = ROLL_SDS; - roll_history = 1; - // kR, gammaR, rolling friction coeff - roll_coeffs[0] = utils::numeric(FLERR,arg[iarg+2],false,lmp); - roll_coeffs[1] = utils::numeric(FLERR,arg[iarg+3],false,lmp); - roll_coeffs[2] = utils::numeric(FLERR,arg[iarg+4],false,lmp); - iarg += 5; - } else { - error->all(FLERR, "Illegal wall/gran command, " - "rolling friction model not recognized"); - } + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + model->init_model(std::string(arg[iarg]), ROLLING); + iarg += 1; + iarg = model->rolling_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "twisting") == 0) { if (iarg + 1 >= narg) - error->all(FLERR, "Illegal wall/gran command, not enough parameters"); - if (strcmp(arg[iarg+1], "none") == 0) { - twist_model = TWIST_NONE; - iarg += 2; - } else if (strcmp(arg[iarg+1], "marshall") == 0) { - twist_model = TWIST_MARSHALL; - twist_history = 1; - iarg += 2; - } else if (strcmp(arg[iarg+1], "sds") == 0) { - if (iarg + 4 >= narg) - error->all(FLERR,"Illegal wall/gran command, " - "not enough parameters provided for twist model"); - twist_model = TWIST_SDS; - twist_history = 1; - twist_coeffs[0] = utils::numeric(FLERR,arg[iarg+2],false,lmp); //kt - twist_coeffs[1] = utils::numeric(FLERR,arg[iarg+3],false,lmp); //gammat - twist_coeffs[2] = utils::numeric(FLERR,arg[iarg+4],false,lmp); //friction coeff. - iarg += 5; - } else { - error->all(FLERR, "Illegal wall/gran command, " - "twisting friction model not recognized"); - } + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + model->init_model(std::string(arg[iarg]), TWISTING); + iarg += 1; + iarg = model->twisting_model->parse_coeffs(arg, iarg, narg); + } else if (strcmp(arg[iarg], "heat") == 0) { + if (iarg + 1 >= narg) + error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); + model->init_model(std::string(arg[iarg]), HEAT); + iarg += 1; + iarg = model->heat_model->parse_coeffs(arg, iarg, narg); + heat_flag = 1; } else if (strcmp(arg[iarg], "xplane") == 0 || strcmp(arg[iarg], "yplane") == 0 || strcmp(arg[iarg], "zplane") == 0 || @@ -310,32 +137,35 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : strcmp(arg[iarg], "region") == 0) { break; } else if (strcmp(arg[iarg],"limit_damping") == 0) { - limit_damping = 1; + model->limit_damping = 1; iarg += 1; } else { error->all(FLERR, "Illegal fix wall/gran command"); } } - size_history = 3*tangential_history + 3*roll_history + twist_history; - //Unlike the pair style, the wall style does not have a 'touch' - //array. Hence, an additional entry in the history is used to - //determine if particles previously contacted for JKR cohesion purposes. - if (normal_model == JKR) size_history += 1; - if (tangential_model == TANGENTIAL_MINDLIN_RESCALE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) size_history += 1; - - if (limit_damping && normal_model == JKR) - error->all(FLERR,"Illegal pair_coeff command, " - "cannot limit damping with JRK model"); - if (limit_damping && normal_model == DMT) - error->all(FLERR,"Illegal pair_coeff command, " - "Cannot limit damping with DMT model"); } + // Define default damping model if unspecified, takes no args + if (!model->damping_model) + model->init_model("viscoelastic", DAMPING); + + //Dan original code didn't require tangential? + if (!model->tangential_model) error->all(FLERR, "No tangential?"); + + if (model->limit_damping && !model->normal_model->allow_limit_damping) + error->all(FLERR,"Illegal pair_coeff command, " + "Cannot limit damping with specified normal contact model"); + + size_history = model->size_history; + if (size_history == 0) use_history = restart_peratom = 0; + else use_history = restart_peratom = 1; + // wallstyle args idregion = nullptr; + if (iarg >= narg) error->all(FLERR, "Illegal fix wall/gran command"); + if (strcmp(arg[iarg],"xplane") == 0) { if (narg < iarg+3) error->all(FLERR,"Illegal fix wall/gran command"); wallstyle = XPLANE; @@ -371,8 +201,16 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : wallstyle = REGION; idregion = utils::strdup(arg[iarg+1]); iarg += 2; + } else if (strcmp(arg[iarg],"temperature") == 0) { + if (narg < iarg+2) error->all(FLERR,"Illegal fix wall/gran command"); + Twall = utils::numeric(FLERR,arg[iarg+1],false,lmp); + Twall_defined = 1; + iarg += 2; } else wallstyle = NOSTYLE; + if (heat_flag != Twall_defined) + error->all(FLERR, "To model conduction, must define both heat model and wall temperature"); + // optional args wiggle = 0; @@ -472,6 +310,8 @@ FixWallGran::~FixWallGran() atom->delete_callback(id,Atom::GROW); atom->delete_callback(id,Atom::RESTART); + delete model; + // delete local storage delete [] idregion; @@ -496,6 +336,7 @@ void FixWallGran::init() int i; dt = update->dt; + model->dt = dt; if (utils::strmatch(update->integrate_style,"^respa")) nlevels_respa = (dynamic_cast( update->integrate))->nlevels; @@ -507,40 +348,26 @@ void FixWallGran::init() if (modify->fix[i]->rigid_flag) break; if (i < modify->nfix) fix_rigid = modify->fix[i]; - if(pairstyle == GRANULAR) { - tangential_history_index = 0; - if (roll_history) { - if (tangential_history) roll_history_index = 3; - else roll_history_index = 0; - } - if (twist_history) { - if (tangential_history) { - if (roll_history) twist_history_index = 6; - else twist_history_index = 3; - } - else{ - if (roll_history) twist_history_index = 3; - else twist_history_index = 0; - } - } - if (normal_model == JKR) { - tangential_history_index += 1; - roll_history_index += 1; - twist_history_index += 1; - } - if (tangential_model == TANGENTIAL_MINDLIN_RESCALE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) { - roll_history_index += 1; - twist_history_index += 1; - } + // Define history indices + int size_normal_history = model->normal_model->size_history; + int size_tangential_history = model->tangential_model->size_history; + int size_damping_history = model->damping_model->size_history; - if (damping_model == TSUJI) { - double cor = normal_coeffs[1]; - normal_coeffs[1] = 1.2728-4.2783*cor+11.087*pow(cor,2)-22.348*pow(cor,3)+ - 27.467*pow(cor,4)-18.022*pow(cor,5)+ - 4.8218*pow(cor,6); - } - } + int size_rolling_history = 0; + int size_twisting_history = 0; + if (model->rolling_model) size_rolling_history = model->rolling_model->size_history; + if (model->twisting_model) size_twisting_history = model->twisting_model->size_history; + + damping_history_index = size_normal_history; + tangential_history_index = damping_history_index + size_damping_history; + roll_history_index = tangential_history_index + size_tangential_history; + twist_history_index = roll_history_index + size_rolling_history; + + model->normal_model->history_index = 0; + model->damping_model->history_index = damping_history_index; + model->tangential_model->history_index = tangential_history_index; + if (model->rolling_model) model->rolling_model->history_index = roll_history_index; + if (model->twisting_model) model->twisting_model->history_index = twist_history_index; } /* ---------------------------------------------------------------------- */ @@ -561,8 +388,11 @@ void FixWallGran::setup(int vflag) void FixWallGran::post_force(int /*vflag*/) { int i,j; - double dx,dy,dz,del1,del2,delxy,delr,rsq,rwall,meff; + double dx,dy,dz,del1,del2,delxy,delr,rwall,meff; + double *forces, *torquesi, dq; double vwall[3]; + double w0[3] = {0.0}; + bool touchflag = false; // do not update history during setup @@ -622,6 +452,11 @@ void FixWallGran::post_force(int /*vflag*/) double **torque = atom->torque; double *radius = atom->radius; double *rmass = atom->rmass; + double *temperature, *heatflux; + if (heat_flag) { + temperature = atom->temperature; + heatflux = atom->heatflux; + } int *mask = atom->mask; int nlocal = atom->nlocal; @@ -631,107 +466,105 @@ void FixWallGran::post_force(int /*vflag*/) clear_stored_contacts(); } + // Define constant wall properties (atom j) + model->radj = 0.0; + model->vj = vwall; + model->omegaj = w0; + if (heat_flag) model->Tj = Twall; + for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) { + if (! mask[i] & groupbit) continue; - dx = dy = dz = 0.0; + dx = dy = dz = 0.0; - if (wallstyle == XPLANE) { - del1 = x[i][0] - wlo; - del2 = whi - x[i][0]; - if (del1 < del2) dx = del1; - else dx = -del2; - } else if (wallstyle == YPLANE) { - del1 = x[i][1] - wlo; - del2 = whi - x[i][1]; - if (del1 < del2) dy = del1; - else dy = -del2; - } else if (wallstyle == ZPLANE) { - del1 = x[i][2] - wlo; - del2 = whi - x[i][2]; - if (del1 < del2) dz = del1; - else dz = -del2; - } else if (wallstyle == ZCYLINDER) { - delxy = sqrt(x[i][0]*x[i][0] + x[i][1]*x[i][1]); - delr = cylradius - delxy; - if (delr > radius[i]) { - dz = cylradius; - rwall = 0.0; - } else { - dx = -delr/delxy * x[i][0]; - dy = -delr/delxy * x[i][1]; - // rwall = -2r_c if inside cylinder, 2r_c outside - rwall = (delxy < cylradius) ? -2*cylradius : 2*cylradius; - if (wshear && axis != 2) { - vwall[0] += vshear * x[i][1]/delxy; - vwall[1] += -vshear * x[i][0]/delxy; - vwall[2] = 0.0; - } + if (wallstyle == XPLANE) { + del1 = x[i][0] - wlo; + del2 = whi - x[i][0]; + if (del1 < del2) dx = del1; + else dx = -del2; + } else if (wallstyle == YPLANE) { + del1 = x[i][1] - wlo; + del2 = whi - x[i][1]; + if (del1 < del2) dy = del1; + else dy = -del2; + } else if (wallstyle == ZPLANE) { + del1 = x[i][2] - wlo; + del2 = whi - x[i][2]; + if (del1 < del2) dz = del1; + else dz = -del2; + } else if (wallstyle == ZCYLINDER) { + delxy = sqrt(x[i][0]*x[i][0] + x[i][1]*x[i][1]); + delr = cylradius - delxy; + if (delr > radius[i]) { + dz = cylradius; + rwall = 0.0; + } else { + dx = -delr/delxy * x[i][0]; + dy = -delr/delxy * x[i][1]; + // rwall = -2r_c if inside cylinder, 2r_c outside + rwall = (delxy < cylradius) ? -2*cylradius : 2*cylradius; + if (wshear && axis != 2) { + vwall[0] += vshear * x[i][1]/delxy; + vwall[1] += -vshear * x[i][0]/delxy; + vwall[2] = 0.0; } } + } - rsq = dx*dx + dy*dy + dz*dz; + // Reset model and copy initial geometric data + model->reset_contact(); + model->xi = x[i]; + model->dx[0] = dx; + model->dx[1] = dy; + model->dx[2] = dz; + model->radi = radius[i]; + model->rwall = rwall; - double rad; - if (pairstyle == GRANULAR && normal_model == JKR) { - rad = radius[i] + pulloff_distance(radius[i]); - } - else - rad = radius[i]; + touchflag = model->check_contact(); - if (rsq > rad*rad) { - if (use_history) - for (j = 0; j < size_history; j++) - history_one[i][j] = 0.0; - } - else { - if (pairstyle == GRANULAR && normal_model == JKR && use_history) { - if ((history_one[i][0] == 0) && (rsq > radius[i]*radius[i])) { - // Particles have not contacted yet, - // and are outside of contact distance - for (j = 0; j < size_history; j++) - history_one[i][j] = 0.0; - continue; - } - } + if (!touchflag) { + if (use_history) + for (j = 0; j < size_history; j++) + history_one[i][j] = 0.0; + } else { - // meff = effective mass of sphere - // if I is part of rigid body, use body mass + // meff = effective mass of sphere + // if I is part of rigid body, use body mass - meff = rmass[i]; - if (fix_rigid && mass_rigid[i] > 0.0) meff = mass_rigid[i]; + meff = rmass[i]; + if (fix_rigid && mass_rigid[i] > 0.0) meff = mass_rigid[i]; - // store contact info - if (peratom_flag) { - array_atom[i][0] = 1.0; - array_atom[i][4] = x[i][0] - dx; - array_atom[i][5] = x[i][1] - dy; - array_atom[i][6] = x[i][2] - dz; - array_atom[i][7] = radius[i]; - } + // Copy additional information and prepare force calculations + model->meff = meff; + model->vi = v[i]; + model->omegai = omega[i]; + model->history_update = history_update; + if (use_history) model->history = history_one[i]; + if (heat_flag) model->Ti = temperature[i]; + model->prep_contact(); - // invoke sphere/wall interaction - double *contact; - if (peratom_flag) - contact = array_atom[i]; - else - contact = nullptr; + model->calculate_forces(); + if (heat_flag) dq = model->calculate_heat(); - if (pairstyle == HOOKE) - hooke(rsq,dx,dy,dz,vwall,v[i],f[i], - omega[i],torque[i],radius[i],meff, contact); - else if (pairstyle == HOOKE_HISTORY) - hooke_history(rsq,dx,dy,dz,vwall,v[i],f[i], - omega[i],torque[i],radius[i],meff,history_one[i], - contact); - else if (pairstyle == HERTZ_HISTORY) - hertz_history(rsq,dx,dy,dz,vwall,rwall,v[i],f[i], - omega[i],torque[i],radius[i],meff,history_one[i], - contact); - else if (pairstyle == GRANULAR) - granular(rsq,dx,dy,dz,vwall,rwall,v[i],f[i], - omega[i],torque[i],radius[i],meff,history_one[i], - contact); + forces = model->forces; + torquesi = model->torquesi; + + // apply forces & torques + add3(f[i], forces, f[i]); + + add3(torque[i], torquesi, torque[i]); + if (heat_flag) heatflux[i] += dq; + + // store contact info + if (peratom_flag) { + array_atom[i][0] = 1.0; + array_atom[i][1] = forces[0]; + array_atom[i][2] = forces[1]; + array_atom[i][3] = forces[2]; + array_atom[i][4] = x[i][0] - dx; + array_atom[i][5] = x[i][1] - dy; + array_atom[i][6] = x[i][2] - dz; + array_atom[i][7] = radius[i]; } } } @@ -753,789 +586,6 @@ void FixWallGran::post_force_respa(int vflag, int ilevel, int /*iloop*/) if (ilevel == nlevels_respa-1) post_force(vflag); } -/* ---------------------------------------------------------------------- */ - -void FixWallGran::hooke(double rsq, double dx, double dy, double dz, - double *vwall, double *v, - double *f, double *omega, double *torque, - double radius, double meff, double* contact) -{ - double r,vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3; - double wr1,wr2,wr3,damp,ccel,vtr1,vtr2,vtr3,vrel; - double fn,fs,ft,fs1,fs2,fs3,fx,fy,fz,tor1,tor2,tor3,rinv,rsqinv; - - r = sqrt(rsq); - rinv = 1.0/r; - rsqinv = 1.0/rsq; - - // relative translational velocity - - vr1 = v[0] - vwall[0]; - vr2 = v[1] - vwall[1]; - vr3 = v[2] - vwall[2]; - - // normal component - - vnnr = vr1*dx + vr2*dy + vr3*dz; - vn1 = dx*vnnr * rsqinv; - vn2 = dy*vnnr * rsqinv; - vn3 = dz*vnnr * rsqinv; - - // tangential component - - vt1 = vr1 - vn1; - vt2 = vr2 - vn2; - vt3 = vr3 - vn3; - - // relative rotational velocity - - wr1 = radius*omega[0] * rinv; - wr2 = radius*omega[1] * rinv; - wr3 = radius*omega[2] * rinv; - - // normal forces = Hookian contact + normal velocity damping - - damp = meff*gamman*vnnr*rsqinv; - ccel = kn*(radius-r)*rinv - damp; - if (limit_damping && (ccel < 0.0)) ccel = 0.0; - - // relative velocities - - vtr1 = vt1 - (dz*wr2-dy*wr3); - vtr2 = vt2 - (dx*wr3-dz*wr1); - vtr3 = vt3 - (dy*wr1-dx*wr2); - vrel = vtr1*vtr1 + vtr2*vtr2 + vtr3*vtr3; - vrel = sqrt(vrel); - - // force normalization - - fn = xmu * fabs(ccel*r); - fs = meff*gammat*vrel; - if (vrel != 0.0) ft = MIN(fn,fs) / vrel; - else ft = 0.0; - - // tangential force due to tangential velocity damping - - fs1 = -ft*vtr1; - fs2 = -ft*vtr2; - fs3 = -ft*vtr3; - - // forces & torques - - fx = dx*ccel + fs1; - fy = dy*ccel + fs2; - fz = dz*ccel + fs3; - - if (peratom_flag) { - contact[1] = fx; - contact[2] = fy; - contact[3] = fz; - } - - f[0] += fx; - f[1] += fy; - f[2] += fz; - - tor1 = rinv * (dy*fs3 - dz*fs2); - tor2 = rinv * (dz*fs1 - dx*fs3); - tor3 = rinv * (dx*fs2 - dy*fs1); - torque[0] -= radius*tor1; - torque[1] -= radius*tor2; - torque[2] -= radius*tor3; -} - -/* ---------------------------------------------------------------------- */ - -void FixWallGran::hooke_history(double rsq, double dx, double dy, double dz, - double *vwall, double *v, - double *f, double *omega, double *torque, - double radius, double meff, double *history, - double *contact) -{ - double r,vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3; - double wr1,wr2,wr3,damp,ccel,vtr1,vtr2,vtr3,vrel; - double fn,fs,fs1,fs2,fs3,fx,fy,fz,tor1,tor2,tor3; - double shrmag,rsht,rinv,rsqinv; - - r = sqrt(rsq); - rinv = 1.0/r; - rsqinv = 1.0/rsq; - - // relative translational velocity - - vr1 = v[0] - vwall[0]; - vr2 = v[1] - vwall[1]; - vr3 = v[2] - vwall[2]; - - // normal component - - vnnr = vr1*dx + vr2*dy + vr3*dz; - vn1 = dx*vnnr * rsqinv; - vn2 = dy*vnnr * rsqinv; - vn3 = dz*vnnr * rsqinv; - - // tangential component - - vt1 = vr1 - vn1; - vt2 = vr2 - vn2; - vt3 = vr3 - vn3; - - // relative rotational velocity - - wr1 = radius*omega[0] * rinv; - wr2 = radius*omega[1] * rinv; - wr3 = radius*omega[2] * rinv; - - // normal forces = Hookian contact + normal velocity damping - - damp = meff*gamman*vnnr*rsqinv; - ccel = kn*(radius-r)*rinv - damp; - if (limit_damping && (ccel < 0.0)) ccel = 0.0; - - // relative velocities - - vtr1 = vt1 - (dz*wr2-dy*wr3); - vtr2 = vt2 - (dx*wr3-dz*wr1); - vtr3 = vt3 - (dy*wr1-dx*wr2); - vrel = vtr1*vtr1 + vtr2*vtr2 + vtr3*vtr3; - vrel = sqrt(vrel); - - // shear history effects - - if (history_update) { - history[0] += vtr1*dt; - history[1] += vtr2*dt; - history[2] += vtr3*dt; - } - shrmag = sqrt(history[0]*history[0] + history[1]*history[1] + - history[2]*history[2]); - - // rotate shear displacements - - rsht = history[0]*dx + history[1]*dy + history[2]*dz; - rsht = rsht*rsqinv; - if (history_update) { - history[0] -= rsht*dx; - history[1] -= rsht*dy; - history[2] -= rsht*dz; - } - - // tangential forces = shear + tangential velocity damping - - fs1 = - (kt*history[0] + meff*gammat*vtr1); - fs2 = - (kt*history[1] + meff*gammat*vtr2); - fs3 = - (kt*history[2] + meff*gammat*vtr3); - - // rescale frictional displacements and forces if needed - - fs = sqrt(fs1*fs1 + fs2*fs2 + fs3*fs3); - fn = xmu * fabs(ccel*r); - - if (fs > fn) { - if (shrmag != 0.0) { - history[0] = (fn/fs) * (history[0] + meff*gammat*vtr1/kt) - - meff*gammat*vtr1/kt; - history[1] = (fn/fs) * (history[1] + meff*gammat*vtr2/kt) - - meff*gammat*vtr2/kt; - history[2] = (fn/fs) * (history[2] + meff*gammat*vtr3/kt) - - meff*gammat*vtr3/kt; - fs1 *= fn/fs ; - fs2 *= fn/fs; - fs3 *= fn/fs; - } else fs1 = fs2 = fs3 = 0.0; - } - - // forces & torques - - fx = dx*ccel + fs1; - fy = dy*ccel + fs2; - fz = dz*ccel + fs3; - - f[0] += fx; - f[1] += fy; - f[2] += fz; - - if (peratom_flag) { - contact[1] = fx; - contact[2] = fy; - contact[3] = fz; - } - - tor1 = rinv * (dy*fs3 - dz*fs2); - tor2 = rinv * (dz*fs1 - dx*fs3); - tor3 = rinv * (dx*fs2 - dy*fs1); - torque[0] -= radius*tor1; - torque[1] -= radius*tor2; - torque[2] -= radius*tor3; -} - -/* ---------------------------------------------------------------------- */ - -void FixWallGran::hertz_history(double rsq, double dx, double dy, double dz, - double *vwall, double rwall, double *v, - double *f, double *omega, double *torque, - double radius, double meff, double *history, - double *contact) -{ - double r,vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3; - double wr1,wr2,wr3,damp,ccel,vtr1,vtr2,vtr3,vrel; - double fn,fs,fs1,fs2,fs3,fx,fy,fz,tor1,tor2,tor3; - double shrmag,rsht,polyhertz,rinv,rsqinv; - - r = sqrt(rsq); - rinv = 1.0/r; - rsqinv = 1.0/rsq; - - // relative translational velocity - - vr1 = v[0] - vwall[0]; - vr2 = v[1] - vwall[1]; - vr3 = v[2] - vwall[2]; - - // normal component - - vnnr = vr1*dx + vr2*dy + vr3*dz; - vn1 = dx*vnnr / rsq; - vn2 = dy*vnnr / rsq; - vn3 = dz*vnnr / rsq; - - // tangential component - - vt1 = vr1 - vn1; - vt2 = vr2 - vn2; - vt3 = vr3 - vn3; - - // relative rotational velocity - - wr1 = radius*omega[0] * rinv; - wr2 = radius*omega[1] * rinv; - wr3 = radius*omega[2] * rinv; - - // normal forces = Hertzian contact + normal velocity damping - // rwall = 0 is flat wall case - // rwall positive or negative is curved wall - // will break (as it should) if rwall is negative and - // its absolute value < radius of particle - - damp = meff*gamman*vnnr*rsqinv; - ccel = kn*(radius-r)*rinv - damp; - if (rwall == 0.0) polyhertz = sqrt((radius-r)*radius); - else polyhertz = sqrt((radius-r)*radius*rwall/(rwall+radius)); - ccel *= polyhertz; - if (limit_damping && (ccel < 0.0)) ccel = 0.0; - - // relative velocities - - vtr1 = vt1 - (dz*wr2-dy*wr3); - vtr2 = vt2 - (dx*wr3-dz*wr1); - vtr3 = vt3 - (dy*wr1-dx*wr2); - vrel = vtr1*vtr1 + vtr2*vtr2 + vtr3*vtr3; - vrel = sqrt(vrel); - - // shear history effects - - if (history_update) { - history[0] += vtr1*dt; - history[1] += vtr2*dt; - history[2] += vtr3*dt; - } - shrmag = sqrt(history[0]*history[0] + history[1]*history[1] + - history[2]*history[2]); - - // rotate history displacements - - rsht = history[0]*dx + history[1]*dy + history[2]*dz; - rsht = rsht*rsqinv; - if (history_update) { - history[0] -= rsht*dx; - history[1] -= rsht*dy; - history[2] -= rsht*dz; - } - - // tangential forces = shear + tangential velocity damping - - fs1 = -polyhertz * (kt*history[0] + meff*gammat*vtr1); - fs2 = -polyhertz * (kt*history[1] + meff*gammat*vtr2); - fs3 = -polyhertz * (kt*history[2] + meff*gammat*vtr3); - - // rescale frictional displacements and forces if needed - - fs = sqrt(fs1*fs1 + fs2*fs2 + fs3*fs3); - fn = xmu * fabs(ccel*r); - - if (fs > fn) { - if (shrmag != 0.0) { - history[0] = (fn/fs) * (history[0] + meff*gammat*vtr1/kt) - - meff*gammat*vtr1/kt; - history[1] = (fn/fs) * (history[1] + meff*gammat*vtr2/kt) - - meff*gammat*vtr2/kt; - history[2] = (fn/fs) * (history[2] + meff*gammat*vtr3/kt) - - meff*gammat*vtr3/kt; - fs1 *= fn/fs ; - fs2 *= fn/fs; - fs3 *= fn/fs; - } else fs1 = fs2 = fs3 = 0.0; - } - - // forces & torques - - fx = dx*ccel + fs1; - fy = dy*ccel + fs2; - fz = dz*ccel + fs3; - - if (peratom_flag) { - contact[1] = fx; - contact[2] = fy; - contact[3] = fz; - } - - f[0] += fx; - f[1] += fy; - f[2] += fz; - - tor1 = rinv * (dy*fs3 - dz*fs2); - tor2 = rinv * (dz*fs1 - dx*fs3); - tor3 = rinv * (dx*fs2 - dy*fs1); - torque[0] -= radius*tor1; - torque[1] -= radius*tor2; - torque[2] -= radius*tor3; -} - -/* ---------------------------------------------------------------------- */ - -void FixWallGran::granular(double rsq, double dx, double dy, double dz, - double *vwall, double rwall, double *v, - double *f, double *omega, double *torque, - double radius, double meff, double *history, - double *contact) -{ - double fx,fy,fz,nx,ny,nz; - double r,rinv; - double Reff, delta, dR, dR2; - - double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3; - double wr1,wr2,wr3; - double vtr1,vtr2,vtr3,vrel; - - double knfac, damp_normal, damp_normal_prefactor; - double k_tangential, damp_tangential; - double Fne, Ft, Fdamp, Fntot, Fncrit, Fscrit, Frcrit; - double fs, fs1, fs2, fs3; - - double tor1,tor2,tor3; - double relrot1,relrot2,relrot3,vrl1,vrl2,vrl3; - - // for JKR - double R2, coh, F_pulloff, a, a2, E; - double t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3; - - // rolling - double k_roll, damp_roll; - double torroll1, torroll2, torroll3; - double rollmag, rolldotn, scalefac; - double fr, fr1, fr2, fr3; - - // twisting - double k_twist, damp_twist, mu_twist; - double signtwist, magtwist, magtortwist, Mtcrit; - double tortwist1, tortwist2, tortwist3; - - double shrmag,rsht,prjmag; - bool frameupdate; - - r = sqrt(rsq); - E = normal_coeffs[0]; - - if (rwall == 0) Reff = radius; - else Reff = radius*rwall/(radius+rwall); - - rinv = 1.0/r; - - nx = dx*rinv; - ny = dy*rinv; - nz = dz*rinv; - - // relative translational velocity - - vr1 = v[0] - vwall[0]; - vr2 = v[1] - vwall[1]; - vr3 = v[2] - vwall[2]; - - // normal component - - vnnr = vr1*nx + vr2*ny + vr3*nz; //v_R . n - vn1 = nx*vnnr; - vn2 = ny*vnnr; - vn3 = nz*vnnr; - - delta = radius - r; - dR = delta*Reff; - if (normal_model == JKR) { - history[0] = 1.0; - E *= THREEQUARTERS; - R2=Reff*Reff; - coh = normal_coeffs[3]; - dR2 = dR*dR; - t0 = coh*coh*R2*R2*E; - t1 = PI27SQ*t0; - t2 = 8*dR*dR2*E*E*E; - t3 = 4*dR2*E; - sqrt1 = MAX(0, t0*(t1+2*t2)); // in case sqrt(0) < 0 due to precision issues - t4 = cbrt(t1+t2+THREEROOT3*MY_PI*sqrt(sqrt1)); - t5 = t3/t4 + t4/E; - sqrt2 = MAX(0, 2*dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4*dR - t5 + SIXROOT6*coh*MY_PI*R2/(E*t6)); - a = INVROOT6*(t6 + sqrt(sqrt3)); - a2 = a*a; - knfac = normal_coeffs[0]*a; - Fne = knfac*a2/Reff - TWOPI*a2*sqrt(4*coh*E/(MY_PI*a)); - } else { - knfac = E; //Hooke - a = sqrt(dR); - Fne = knfac*delta; - if (normal_model != NORMAL_HOOKE) { - Fne *= a; - knfac *= a; - } - if (normal_model == DMT) - Fne -= 4*MY_PI*normal_coeffs[3]*Reff; - } - - if (damping_model == VELOCITY) { - damp_normal = 1; - } else if (damping_model == MASS_VELOCITY) { - damp_normal = meff; - } else if (damping_model == VISCOELASTIC) { - damp_normal = a*meff; - } else if (damping_model == TSUJI) { - damp_normal = sqrt(meff*knfac); - } else damp_normal = 0.0; - - damp_normal_prefactor = normal_coeffs[1]*damp_normal; - Fdamp = -damp_normal_prefactor*vnnr; - - Fntot = Fne + Fdamp; - if (limit_damping && (Fntot < 0.0)) Fntot = 0.0; - - //**************************************** - // tangential force, including history effects - //**************************************** - - // For linear, mindlin, mindlin_rescale: - // history = cumulative tangential displacement - // - // For mindlin/force, mindlin_rescale/force: - // history = cumulative tangential elastic force - - // tangential component - vt1 = vr1 - vn1; - vt2 = vr2 - vn2; - vt3 = vr3 - vn3; - - // relative rotational velocity - wr1 = radius*omega[0]; - wr2 = radius*omega[1]; - wr3 = radius*omega[2]; - - // relative tangential velocities - vtr1 = vt1 - (nz*wr2-ny*wr3); - vtr2 = vt2 - (nx*wr3-nz*wr1); - vtr3 = vt3 - (ny*wr1-nx*wr2); - vrel = vtr1*vtr1 + vtr2*vtr2 + vtr3*vtr3; - vrel = sqrt(vrel); - - if (normal_model == JKR) { - F_pulloff = 3*MY_PI*coh*Reff; - Fncrit = fabs(Fne + 2*F_pulloff); - } - else if (normal_model == DMT) { - F_pulloff = 4*MY_PI*coh*Reff; - Fncrit = fabs(Fne + 2*F_pulloff); - } - else{ - Fncrit = fabs(Fntot); - } - - //------------------------------ - // tangential forces - //------------------------------ - - k_tangential = tangential_coeffs[0]; - damp_tangential = tangential_coeffs[1]*damp_normal_prefactor; - Fscrit = tangential_coeffs[2] * Fncrit; - - int thist0 = tangential_history_index; - int thist1 = thist0 + 1; - int thist2 = thist1 + 1; - - if (tangential_history) { - if (tangential_model == TANGENTIAL_MINDLIN || - tangential_model == TANGENTIAL_MINDLIN_FORCE) { - k_tangential *= a; - } - else if (tangential_model == - TANGENTIAL_MINDLIN_RESCALE || - tangential_model == - TANGENTIAL_MINDLIN_RESCALE_FORCE){ - k_tangential *= a; - // on unloading, rescale the shear displacements/force - if (a < history[thist2+1]) { - double factor = a/history[thist2+1]; - history[thist0] *= factor; - history[thist1] *= factor; - history[thist2] *= factor; - } - } - - - // rotate and update displacements. - // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (history_update) { - rsht = history[thist0]*nx + history[thist1]*ny + history[thist2]*nz; - if (tangential_model == TANGENTIAL_MINDLIN_FORCE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) - frameupdate = fabs(rsht) > EPSILON*Fscrit; - else - frameupdate = fabs(rsht)*k_tangential > EPSILON*Fscrit; - if (frameupdate) { - shrmag = sqrt(history[thist0]*history[thist0] + - history[thist1]*history[thist1] + - history[thist2]*history[thist2]); - // projection - history[thist0] -= rsht*nx; - history[thist1] -= rsht*ny; - history[thist2] -= rsht*nz; - - // also rescale to preserve magnitude - prjmag = sqrt(history[thist0]*history[thist0] + - history[thist1]*history[thist1] + history[thist2]*history[thist2]); - if (prjmag > 0) scalefac = shrmag/prjmag; - else scalefac = 0; - history[thist0] *= scalefac; - history[thist1] *= scalefac; - history[thist2] *= scalefac; - } - // update history - if (tangential_model == TANGENTIAL_HISTORY || - tangential_model == TANGENTIAL_MINDLIN || - tangential_model == TANGENTIAL_MINDLIN_RESCALE) { - history[thist0] += vtr1*dt; - history[thist1] += vtr2*dt; - history[thist2] += vtr3*dt; - } else{ - // tangential force - // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - history[thist0] -= k_tangential*vtr1*dt; - history[thist1] -= k_tangential*vtr2*dt; - history[thist2] -= k_tangential*vtr3*dt; - } - if (tangential_model == TANGENTIAL_MINDLIN_RESCALE || - tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) - history[thist2+1] = a; - } - - // tangential forces = history + tangential velocity damping - if (tangential_model == TANGENTIAL_HISTORY || - tangential_model == TANGENTIAL_MINDLIN || - tangential_model == TANGENTIAL_MINDLIN_RESCALE) { - fs1 = -k_tangential*history[thist0] - damp_tangential*vtr1; - fs2 = -k_tangential*history[thist1] - damp_tangential*vtr2; - fs3 = -k_tangential*history[thist2] - damp_tangential*vtr3; - } else { - fs1 = history[thist0] - damp_tangential*vtr1; - fs2 = history[thist1] - damp_tangential*vtr2; - fs3 = history[thist2] - damp_tangential*vtr3; - } - - // rescale frictional displacements and forces if needed - fs = sqrt(fs1*fs1 + fs2*fs2 + fs3*fs3); - if (fs > Fscrit) { - shrmag = sqrt(history[thist0]*history[thist0] + - history[thist1]*history[thist1] + - history[thist2]*history[thist2]); - if (shrmag != 0.0) { - if (tangential_model == TANGENTIAL_HISTORY || - tangential_model == TANGENTIAL_MINDLIN || - tangential_model == - TANGENTIAL_MINDLIN_RESCALE) { - history[thist0] = -1.0/k_tangential*(Fscrit*fs1/fs + - damp_tangential*vtr1); - history[thist1] = -1.0/k_tangential*(Fscrit*fs2/fs + - damp_tangential*vtr2); - history[thist2] = -1.0/k_tangential*(Fscrit*fs3/fs + - damp_tangential*vtr3); - } else { - history[thist0] = Fscrit*fs1/fs + damp_tangential*vtr1; - history[thist1] = Fscrit*fs2/fs + damp_tangential*vtr2; - history[thist2] = Fscrit*fs3/fs + damp_tangential*vtr3; - } - fs1 *= Fscrit/fs; - fs2 *= Fscrit/fs; - fs3 *= Fscrit/fs; - } else fs1 = fs2 = fs3 = 0.0; - } - } else { // classic pair gran/hooke (no history) - fs = damp_tangential*vrel; - if (vrel != 0.0) Ft = MIN(Fscrit,fs) / vrel; - else Ft = 0.0; - fs1 = -Ft*vtr1; - fs2 = -Ft*vtr2; - fs3 = -Ft*vtr3; - } - - //**************************************** - // rolling resistance - //**************************************** - - if (roll_model != ROLL_NONE || twist_model != TWIST_NONE) { - relrot1 = omega[0]; - relrot2 = omega[1]; - relrot3 = omega[2]; - } - if (roll_model != ROLL_NONE) { - // rolling velocity, - // see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) - // This is different from the Marshall papers, - // which use the Bagi/Kuhn formulation - // for rolling velocity (see Wang et al for why the latter is wrong) - vrl1 = Reff*(relrot2*nz - relrot3*ny); //- 0.5*((radj-radi)/radsum)*vtr1; - vrl2 = Reff*(relrot3*nx - relrot1*nz); //- 0.5*((radj-radi)/radsum)*vtr2; - vrl3 = Reff*(relrot1*ny - relrot2*nx); //- 0.5*((radj-radi)/radsum)*vtr3; - - int rhist0 = roll_history_index; - int rhist1 = rhist0 + 1; - int rhist2 = rhist1 + 1; - - k_roll = roll_coeffs[0]; - damp_roll = roll_coeffs[1]; - Frcrit = roll_coeffs[2] * Fncrit; - - if (history_update) { - rolldotn = history[rhist0]*nx + history[rhist1]*ny + history[rhist2]*nz; - frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit; - if (frameupdate) { // rotate into tangential plane - rollmag = sqrt(history[rhist0]*history[rhist0] + - history[rhist1]*history[rhist1] + - history[rhist2]*history[rhist2]); - // projection - history[rhist0] -= rolldotn*nx; - history[rhist1] -= rolldotn*ny; - history[rhist2] -= rolldotn*nz; - - // also rescale to preserve magnitude - prjmag = sqrt(history[rhist0]*history[rhist0] + - history[rhist1]*history[rhist1] + - history[rhist2]*history[rhist2]); - - if (prjmag > 0) scalefac = rollmag/prjmag; - else scalefac = 0; - history[rhist0] *= scalefac; - history[rhist1] *= scalefac; - history[rhist2] *= scalefac; - } - history[rhist0] += vrl1*dt; - history[rhist1] += vrl2*dt; - history[rhist2] += vrl3*dt; - } - - fr1 = -k_roll*history[rhist0] - damp_roll*vrl1; - fr2 = -k_roll*history[rhist1] - damp_roll*vrl2; - fr3 = -k_roll*history[rhist2] - damp_roll*vrl3; - - // rescale frictional displacements and forces if needed - fr = sqrt(fr1*fr1 + fr2*fr2 + fr3*fr3); - if (fr > Frcrit) { - rollmag = sqrt(history[rhist0]*history[rhist0] + - history[rhist1]*history[rhist1] + - history[rhist2]*history[rhist2]); - if (rollmag != 0.0) { - history[rhist0] = -1.0/k_roll*(Frcrit*fr1/fr + damp_roll*vrl1); - history[rhist1] = -1.0/k_roll*(Frcrit*fr2/fr + damp_roll*vrl2); - history[rhist2] = -1.0/k_roll*(Frcrit*fr3/fr + damp_roll*vrl3); - fr1 *= Frcrit/fr; - fr2 *= Frcrit/fr; - fr3 *= Frcrit/fr; - } else fr1 = fr2 = fr3 = 0.0; - } - } - - //**************************************** - // twisting torque, including history effects - //**************************************** - - if (twist_model != TWIST_NONE) { - magtwist = relrot1*nx + relrot2*ny + relrot3*nz; //Omega_T (eq 29 of Marshall) - if (twist_model == TWIST_MARSHALL) { - k_twist = 0.5*k_tangential*a*a;; // eq 32 of Marshall paper - damp_twist = 0.5*damp_tangential*a*a; - mu_twist = TWOTHIRDS*a*tangential_coeffs[2]; - } - else{ - k_twist = twist_coeffs[0]; - damp_twist = twist_coeffs[1]; - mu_twist = twist_coeffs[2]; - } - if (history_update) { - history[twist_history_index] += magtwist*dt; - } - // M_t torque (eq 30) - magtortwist = -k_twist*history[twist_history_index] - damp_twist*magtwist; - signtwist = (magtwist > 0) - (magtwist < 0); - Mtcrit = mu_twist*Fncrit; // critical torque (eq 44) - if (fabs(magtortwist) > Mtcrit) { - history[twist_history_index] = 1.0/k_twist*(Mtcrit*signtwist - - damp_twist*magtwist); - magtortwist = -Mtcrit * signtwist; // eq 34 - } - } - - // apply forces & torques - - fx = nx*Fntot + fs1; - fy = ny*Fntot + fs2; - fz = nz*Fntot + fs3; - - if (peratom_flag) { - contact[1] = fx; - contact[2] = fy; - contact[3] = fz; - } - - f[0] += fx; - f[1] += fy; - f[2] += fz; - - tor1 = ny*fs3 - nz*fs2; - tor2 = nz*fs1 - nx*fs3; - tor3 = nx*fs2 - ny*fs1; - - torque[0] -= radius*tor1; - torque[1] -= radius*tor2; - torque[2] -= radius*tor3; - - if (twist_model != TWIST_NONE) { - tortwist1 = magtortwist * nx; - tortwist2 = magtortwist * ny; - tortwist3 = magtortwist * nz; - - torque[0] += tortwist1; - torque[1] += tortwist2; - torque[2] += tortwist3; - } - - if (roll_model != ROLL_NONE) { - torroll1 = Reff*(ny*fr3 - nz*fr2); //n cross fr - torroll2 = Reff*(nz*fr1 - nx*fr3); - torroll3 = Reff*(nx*fr2 - ny*fr1); - - torque[0] += torroll1; - torque[1] += torroll2; - torque[2] += torroll3; - } -} - /* ---------------------------------------------------------------------- memory usage of local atom-based arrays ------------------------------------------------------------------------- */ @@ -1692,14 +742,3 @@ void FixWallGran::reset_dt() { dt = update->dt; } - -double FixWallGran::pulloff_distance(double radius) -{ - double coh, E, a, dist; - coh = normal_coeffs[3]; - E = normal_coeffs[0]*THREEQUARTERS; - a = cbrt(9*MY_PI*coh*radius/(4*E)); - dist = a*a/radius - 2*sqrt(MY_PI*coh*a/E); - return dist; -} - diff --git a/src/GRANULAR/fix_wall_gran.h b/src/GRANULAR/fix_wall_gran.h index 8c69be6e16..d0202d65e8 100644 --- a/src/GRANULAR/fix_wall_gran.h +++ b/src/GRANULAR/fix_wall_gran.h @@ -20,15 +20,13 @@ FixStyle(wall/gran,FixWallGran); #ifndef LMP_FIX_WALL_GRAN_H #define LMP_FIX_WALL_GRAN_H +#include "contact.h" #include "fix.h" namespace LAMMPS_NS { class FixWallGran : public Fix { public: - enum { HOOKE, HOOKE_HISTORY, HERTZ_HISTORY, GRANULAR }; - enum { NORMAL_NONE, NORMAL_HOOKE, NORMAL_HERTZ, HERTZ_MATERIAL, DMT, JKR }; - FixWallGran(class LAMMPS *, int, char **); ~FixWallGran() override; int setmask() override; @@ -49,54 +47,32 @@ class FixWallGran : public Fix { int maxsize_restart() override; void reset_dt() override; - void hooke(double, double, double, double, double *, double *, double *, double *, double *, - double, double, double *); - void hooke_history(double, double, double, double, double *, double *, double *, double *, - double *, double, double, double *, double *); - void hertz_history(double, double, double, double, double *, double, double *, double *, double *, - double *, double, double, double *, double *); - void granular(double, double, double, double, double *, double, double *, double *, double *, - double *, double, double, double *, double *); - - double pulloff_distance(double); - protected: int wallstyle, wiggle, wshear, axis; - int pairstyle, nlevels_respa; + int classic_flag, nlevels_respa; bigint time_origin; - double kn, kt, gamman, gammat, xmu; // for granular model choices - int normal_model, damping_model; - int tangential_model, roll_model, twist_model; - int limit_damping; - - // history flags - int normal_history, tangential_history, roll_history, twist_history; + Contact::ContactModel *model; // indices of history entries int normal_history_index; + int damping_history_index; int tangential_history_index; int roll_history_index; int twist_history_index; - // material coefficients - double Emod, poiss, Gmod; - - // contact model coefficients - double normal_coeffs[4]; - double tangential_coeffs[3]; - double roll_coeffs[3]; - double twist_coeffs[3]; - double lo, hi, cylradius; double amplitude, period, omega, vshear; double dt; + double Twall; char *idregion; int use_history; // if particle/wall interaction stores history int history_update; // flag for whether shear history is updated int size_history; // # of shear history values per contact + int heat_flag; + int limit_damping; // shear history for single contact per particle diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 6509c88a0b..c288abf92e 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -23,6 +23,7 @@ #include "error.h" #include "memory.h" #include "neighbor.h" +#include "math_extra.h" #include "region.h" #include "update.h" @@ -30,6 +31,7 @@ using namespace LAMMPS_NS; using namespace FixConst; +using namespace MathExtra; /* ---------------------------------------------------------------------- */ @@ -117,8 +119,11 @@ void FixWallGranRegion::init() void FixWallGranRegion::post_force(int /*vflag*/) { int i, m, nc, iwall; - double dx, dy, dz, rsq, meff; + double dx, dy, dz, meff; + double *forces, *torquesi, dq, rwall; double vwall[3]; + double w0[3] = {0.0}; + bool touchflag = false; // do not update shear history during setup @@ -158,7 +163,11 @@ void FixWallGranRegion::post_force(int /*vflag*/) double **torque = atom->torque; double *radius = atom->radius; double *rmass = atom->rmass; - + double *temperature, *heatflux; + if (heat_flag) { + temperature = atom->temperature; + heatflux = atom->heatflux; + } int *mask = atom->mask; int nlocal = atom->nlocal; @@ -172,95 +181,105 @@ void FixWallGranRegion::post_force(int /*vflag*/) if (peratom_flag) { clear_stored_contacts(); } + // Define constant wall properties (atom j) + model->radj = 0.0; + model->omegaj = w0; + if (heat_flag) model->Tj = Twall; + for (i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) { - if (!region->match(x[i][0], x[i][1], x[i][2])) continue; + if (! mask[i] & groupbit) continue; + if (!region->match(x[i][0], x[i][1], x[i][2]))continue; - if (pairstyle == FixWallGran::GRANULAR && normal_model == FixWallGran::JKR) { - nc = region->surface(x[i][0], x[i][1], x[i][2], radius[i] + pulloff_distance(radius[i])); - } else { - nc = region->surface(x[i][0], x[i][1], x[i][2], radius[i]); + nc = region->surface(x[i][0], x[i][1], x[i][2], model->pulloff_distance(radius[i], 0.0)); + if (nc > tmax) error->one(FLERR, "Too many wallgran/region contacts for one particle"); + + // shear history maintenance + // update ncontact,walls,shear2many for particle I + // to reflect new and persistent shear historyvalues + // also set c2r[] = indices into region->contact[]for each of N contacts + // process zero or one contact here, otherwiseinvoke update_contacts() + + if (use_history) { + if (nc == 0) { + ncontact[i] = 0; + continue; } - if (nc > tmax) error->one(FLERR, "Too many wall/gran/region contacts for one particle"); + if (nc == 1) { + c2r[0] = 0; + iwall = region->contact[0].iwall; + if (ncontact[i] == 0) { + ncontact[i] = 1; + walls[i][0] = iwall; + for (m = 0; m < size_history; m++) history_many[i][0][m] = 0.0; + } else if (ncontact[i] > 1 || iwall != walls[i][0]) + update_contacts(i, nc); + } else + update_contacts(i, nc); + } - // shear history maintenance - // update ncontact,walls,shear2many for particle I - // to reflect new and persistent shear history values - // also set c2r[] = indices into region->contact[] for each of N contacts - // process zero or one contact here, otherwise invoke update_contacts() + // process current contacts + for (int ic = 0; ic < nc; ic++) { - if (use_history) { - if (nc == 0) { - ncontact[i] = 0; + // Reset model and copy initial geometric data + model->reset_contact(); + model->xi = x[i]; + model->dx[0] = region->contact[ic].delx; + model->dx[1] = region->contact[ic].dely; + model->dx[2] = region->contact[ic].delz; + model->radi = radius[i]; + model->rwall = rwall; + + touchflag = model->check_contact(); + + + if (model->beyond_contact) { + if (history_many[i][c2r[ic]][0] == 0.0 && model->rsq > model->radsum * model->radsum) { + for (m = 0; m < size_history; m++) history_many[i][0][m] = 0.0; continue; } - if (nc == 1) { - c2r[0] = 0; - iwall = region->contact[0].iwall; - if (ncontact[i] == 0) { - ncontact[i] = 1; - walls[i][0] = iwall; - for (m = 0; m < size_history; m++) history_many[i][0][m] = 0.0; - } else if (ncontact[i] > 1 || iwall != walls[i][0]) - update_contacts(i, nc); - } else - update_contacts(i, nc); - } + } // Dan: not quite sure about this - // process current contacts - for (int ic = 0; ic < nc; ic++) { - // rsq = squared contact distance - // xc = contact point + if (regiondynamic) region->velocity_contact(vwall, x[i], ic); + model->vj = vwall; - rsq = region->contact[ic].r * region->contact[ic].r; + // meff = effective mass of sphere + // if I is part of rigid body, use body mass - if (pairstyle == FixWallGran::GRANULAR && normal_model == FixWallGran::JKR) { - if (history_many[i][c2r[ic]][0] == 0.0 && rsq > radius[i] * radius[i]) { - for (m = 0; m < size_history; m++) history_many[i][0][m] = 0.0; - continue; - } - } + meff = rmass[i]; + if (fix_rigid && mass_rigid[i] > 0.0) meff = mass_rigid[i]; - dx = region->contact[ic].delx; - dy = region->contact[ic].dely; - dz = region->contact[ic].delz; + // Copy additional information and prepare force calculations + model->meff = meff; + model->vi = v[i]; + model->omegai = omega[i]; + model->history_update = history_update; + if (use_history) model->history = history_one[i]; + if (heat_flag) model->Ti = temperature[i]; + model->prep_contact(); - if (regiondynamic) region->velocity_contact(vwall, x[i], ic); + model->calculate_forces(); + if (heat_flag) dq = model->calculate_heat(); - // meff = effective mass of sphere - // if I is part of rigid body, use body mass + forces = model->forces; + torquesi = model->torquesi; - meff = rmass[i]; - if (fix_rigid && mass_rigid[i] > 0.0) meff = mass_rigid[i]; + // apply forces & torques + add3(f[i], forces, f[i]); - // store contact info - if (peratom_flag) { - array_atom[i][0] = 1.0; - array_atom[i][4] = x[i][0] - dx; - array_atom[i][5] = x[i][1] - dy; - array_atom[i][6] = x[i][2] - dz; - array_atom[i][7] = radius[i]; - } + add3(torque[i], torquesi, torque[i]); + if (heat_flag) heatflux[i] += dq; - // invoke sphere/wall interaction - double *contact; - if (peratom_flag) - contact = array_atom[i]; - else - contact = nullptr; - - if (pairstyle == FixWallGran::HOOKE) - hooke(rsq, dx, dy, dz, vwall, v[i], f[i], omega[i], torque[i], radius[i], meff, contact); - else if (pairstyle == FixWallGran::HOOKE_HISTORY) - hooke_history(rsq, dx, dy, dz, vwall, v[i], f[i], omega[i], torque[i], radius[i], meff, - history_many[i][c2r[ic]], contact); - else if (pairstyle == FixWallGran::HERTZ_HISTORY) - hertz_history(rsq, dx, dy, dz, vwall, region->contact[ic].radius, v[i], f[i], omega[i], - torque[i], radius[i], meff, history_many[i][c2r[ic]], contact); - else if (pairstyle == FixWallGran::GRANULAR) - granular(rsq, dx, dy, dz, vwall, region->contact[ic].radius, v[i], f[i], omega[i], - torque[i], radius[i], meff, history_many[i][c2r[ic]], contact); + // store contact info + if (peratom_flag) { + array_atom[i][0] = 1.0; + array_atom[i][1] = forces[0]; + array_atom[i][2] = forces[1]; + array_atom[i][3] = forces[2]; + array_atom[i][4] = x[i][0] - dx; + array_atom[i][5] = x[i][1] - dy; + array_atom[i][6] = x[i][2] - dz; + array_atom[i][7] = radius[i]; } } } diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index e401f8cb84..9b1a036928 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -121,14 +121,14 @@ void PairGranular::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum,itype,jtype; double factor_lj,mi,mj,meff,delx,dely,delz; - double *forces, *torquesi, *torquesj; + double *forces, *torquesi, *torquesj, dq; int *ilist,*jlist,*numneigh,**firstneigh; int *touch,**firsttouch; double *history,*allhistory,**firsthistory; bool touchflag = false; - const bool historyupdate = update->setupflag == 0; + const bool history_update = update->setupflag == 0; ev_init(eflag,vflag); @@ -163,7 +163,7 @@ void PairGranular::compute(int eflag, int vflag) int *mask = atom->mask; int nlocal = atom->nlocal; double *special_lj = force->special_lj; - double *heatflux, *temperature, dq; + double *heatflux, *temperature; if (heat_flag) { heatflux = atom->heatflux; temperature = atom->temperature; @@ -234,14 +234,13 @@ void PairGranular::compute(int eflag, int vflag) models[itype][jtype]->vj = v[j]; models[itype][jtype]->omegai = omega[i]; models[itype][jtype]->omegaj = omega[j]; - models[itype][jtype]->history_update = historyupdate; - models[itype][jtype]->history = history; - models[itype][jtype]->prep_contact(); - + models[itype][jtype]->history_update = history_update; + if (use_history) models[itype][jtype]->history = history; if (heat_flag) { models[itype][jtype]->Ti = temperature[i]; models[itype][jtype]->Tj = temperature[j]; } + models[itype][jtype]->prep_contact(); if (models[itype][jtype]->beyond_contact) touch[jj] = 1; @@ -320,9 +319,6 @@ void PairGranular::settings(int narg, char **arg) } else { cutoff_global = -1; // will be set based on particle sizes, model choice } - - normal_history = tangential_history = 0; - roll_history = twist_history = 0; } /* ---------------------------------------------------------------------- @@ -332,7 +328,6 @@ void PairGranular::settings(int narg, char **arg) void PairGranular::coeff(int narg, char **arg) { double cutoff_one = -1; - int ncoeff; if (narg < 3) error->all(FLERR,"Incorrect args for pair coefficients"); @@ -349,26 +344,16 @@ void PairGranular::coeff(int narg, char **arg) //Parse mandatory normal and tangential specifications int iarg = 2; vec_models.back().init_model(std::string(arg[iarg]), NORMAL); - ncoeff = vec_models.back().normal_model->num_coeffs; iarg += 1; - if (iarg + ncoeff >= narg) - error->all(FLERR,"Illegal pair_coeff command" - "Insufficient arguments provided for normal model."); - vec_models.back().normal_model->parse_coeffs(arg, iarg); - iarg += ncoeff; + iarg = vec_models.back().normal_model->parse_coeffs(arg, iarg, narg); if (strcmp(arg[iarg], "tangential") == 0) { if (iarg + 1 >= narg) error->all(FLERR,"Illegal pair_coeff command, must specify " "tangential model after tangential keyword"); vec_models.back().init_model(std::string(arg[iarg]), TANGENTIAL); - ncoeff = vec_models.back().tangential_model->num_coeffs; iarg += 1; - if (iarg + ncoeff >= narg) - error->all(FLERR, "Illegal pair_coeff command" - "Insufficient arguments provided for tangential model."); - vec_models.back().tangential_model->parse_coeffs(arg, iarg); - iarg += ncoeff; + iarg = vec_models.back().tangential_model->parse_coeffs(arg, iarg, narg); } else{ error->all(FLERR, "Illegal pair_coeff command, 'tangential' keyword expected"); } @@ -379,51 +364,27 @@ void PairGranular::coeff(int narg, char **arg) if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); vec_models.back().init_model(std::string(arg[iarg]), DAMPING); - ncoeff = vec_models.back().damping_model->num_coeffs; iarg += 1; - if (iarg + ncoeff >= narg) - error->all(FLERR, "Illegal pair_coeff command" - "Insufficient arguments provided for damping model."); - vec_models.back().damping_model->parse_coeffs(arg, iarg); - iarg += ncoeff; - + iarg = vec_models.back().damping_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "rolling") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); vec_models.back().init_model(std::string(arg[iarg]), ROLLING); - ncoeff = vec_models.back().rolling_model->num_coeffs; iarg += 1; - if (iarg + ncoeff >= narg) - error->all(FLERR, "Illegal pair_coeff command" - "Insufficient arguments provided for rolling model."); - vec_models.back().rolling_model->parse_coeffs(arg, iarg); - iarg += ncoeff; - + iarg = vec_models.back().rolling_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "twisting") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); vec_models.back().init_model(std::string(arg[iarg]), TWISTING); - ncoeff = vec_models.back().twisting_model->num_coeffs; iarg += 1; - if (iarg + ncoeff >= narg) - error->all(FLERR, "Illegal pair_coeff command" - "Insufficient arguments provided for twisting model."); - vec_models.back().twisting_model->parse_coeffs(arg, iarg); - iarg += ncoeff; - + iarg = vec_models.back().twisting_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "heat") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); vec_models.back().init_model(std::string(arg[iarg]), HEAT); - ncoeff = vec_models.back().heat_model->num_coeffs; iarg += 1; - if (iarg + ncoeff >= narg) - error->all(FLERR, "Illegal pair_coeff command" - "Insufficient arguments provided for heat model."); - vec_models.back().heat_model->parse_coeffs(arg, iarg); - iarg += ncoeff; + iarg = vec_models.back().heat_model->parse_coeffs(arg, iarg, narg); heat_flag = 1; - } else if (strcmp(arg[iarg], "cutoff") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); @@ -437,11 +398,9 @@ void PairGranular::coeff(int narg, char **arg) } else error->all(FLERR, "Illegal pair_coeff command"); } - // Define default damping model if unspecified, takes no args - if (!vec_models.back().damping_model) { + // Define default damping model if unspecified, has no coeffs + if (!vec_models.back().damping_model) vec_models.back().init_model("viscoelastic", DAMPING); - vec_models.back().damping_model->parse_coeffs(arg, 0); - } if (vec_models.back().limit_damping && !vec_models.back().normal_model->allow_limit_damping) error->all(FLERR,"Illegal pair_coeff command, " @@ -483,11 +442,7 @@ void PairGranular::init_style() int size_twisting_history = 0; for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { - if (models[i][j]->normal_model->size_history != 0 || - models[i][j]->damping_model->size_history != 0 || - models[i][j]->tangential_model->size_history != 0 || - models[i][j]->rolling_model->size_history != 0 || - models[i][j]->twisting_model->size_history != 0) use_history = 1; + if (models[i][j]->size_history != 0) use_history = 1; if (models[i][j]->normal_model->size_history > size_normal_history) size_normal_history = models[i][j]->damping_model->size_history; @@ -495,10 +450,12 @@ void PairGranular::init_style() size_damping_history = models[i][j]->normal_model->size_history; if (models[i][j]->tangential_model->size_history > size_tangential_history) size_tangential_history = models[i][j]->tangential_model->size_history; - if (models[i][j]->rolling_model->size_history > size_rolling_history) - size_rolling_history = models[i][j]->rolling_model->size_history; - if (models[i][j]->twisting_model->size_history > size_twisting_history) - size_twisting_history = models[i][j]->twisting_model->size_history; + if (models[i][j]->rolling_model) + if (models[i][j]->rolling_model->size_history > size_rolling_history) + size_rolling_history = models[i][j]->rolling_model->size_history; + if (models[i][j]->twisting_model) + if (models[i][j]->twisting_model->size_history > size_twisting_history) + size_twisting_history = models[i][j]->twisting_model->size_history; } } @@ -506,9 +463,21 @@ void PairGranular::init_style() size_tangential_history + size_rolling_history + size_twisting_history; damping_history_index = size_normal_history; - tangential_history_index = size_normal_history + damping_history_index; - roll_history_index = size_normal_history + damping_history_index + size_tangential_history; - twist_history_index = size_normal_history + damping_history_index + size_tangential_history + size_rolling_history; + tangential_history_index = damping_history_index + size_damping_history; + roll_history_index = tangential_history_index + size_tangential_history; + twist_history_index = roll_history_index + size_rolling_history; + + for (int i = 1; i <= atom->ntypes; i++) { + for (int j = i; j <= atom->ntypes; j++) { + models[i][j]->normal_model->history_index = 0; + models[i][j]->damping_model->history_index = damping_history_index; + models[i][j]->tangential_model->history_index = tangential_history_index; + if (models[i][j]->rolling_model) + models[i][j]->rolling_model->history_index = roll_history_index; + if (models[i][j]->twisting_model) + models[i][j]->twisting_model->history_index = twist_history_index; + } + } if (use_history) neighbor->add_request(this, NeighConst::REQ_SIZE|NeighConst::REQ_HISTORY); else neighbor->add_request(this, NeighConst::REQ_SIZE); diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index 1032cf6b7c..68b83d3686 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -75,9 +75,6 @@ class PairGranular : public Pair { std::vector vec_models; Contact::ContactModel ***models; - // history flags - int normal_history, tangential_history, roll_history, twist_history; - // indices of history entries int normal_history_index; int damping_history_index; diff --git a/src/contact.h b/src/contact.h index 96758771b4..bd04fe9ce1 100644 --- a/src/contact.h +++ b/src/contact.h @@ -52,7 +52,7 @@ class ContactModel : protected Pointers { double pulloff_distance(double, double); void init_model(std::string, ModelType); - + int init_classic_model(char **, int, int); void mix_coeffs(ContactModel*, ContactModel*); void write_restart(FILE *); @@ -68,7 +68,7 @@ class ContactModel : protected Pointers { SubModel *sub_models[6]; // Need to resize if we add more model flavors // Extra options - int beyond_contact, limit_damping, history_update; + int beyond_contact, limit_damping, history_update, wall_flag; double cutoff_type; // History variables @@ -79,7 +79,7 @@ class ContactModel : protected Pointers { // Contact properties/output double *forces, *torquesi, *torquesj; - double radi, radj, meff, dt, Ti, Tj, area; + double radi, radj, rwall, meff, dt, Ti, Tj, area; double Fntot, magtortwist; double *xi, *xj, *vi, *vj, *omegai, *omegaj; From 12c1923511e802b3b531e34b24fcf386f187dab5 Mon Sep 17 00:00:00 2001 From: Joel Thomas Clemmer Date: Fri, 12 Aug 2022 17:36:53 -0600 Subject: [PATCH 016/445] Updating mixing --- src/GRANULAR/contact_normal_models.cpp | 14 ++++++-------- src/GRANULAR/contact_normal_models.h | 2 +- src/GRANULAR/contact_tangential_models.cpp | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index 6a6db39189..514ed1338a 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -144,7 +144,6 @@ void NormalHertz::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) double NormalHertz::calculate_forces() { - contact->area = sqrt(contact->dR); Fne = knfac * contact->delta; return Fne; } @@ -173,7 +172,7 @@ void NormalHertzMaterial::coeffs_to_local() Emod = coeffs[0]; damp = coeffs[1]; poiss = coeffs[2]; - k = 4 / 3 * Emod; + k = 4 / 3 * mix_stiffnessE(Emod, Emod, poiss, poiss); if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hertz material normal model"); } @@ -182,7 +181,7 @@ void NormalHertzMaterial::coeffs_to_local() void NormalHertzMaterial::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) { - coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0]); coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); coeffs_to_local(); @@ -207,7 +206,7 @@ void NormalDMT::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; cohesion = coeffs[3]; - k = 4 / 3 * Emod; + k = 4 / 3 * mix_stiffnessE(Emod, Emod, poiss, poiss); if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal DMT normal model"); } @@ -216,7 +215,7 @@ void NormalDMT::coeffs_to_local() void NormalDMT::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) { - coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0]); coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); coeffs[3] = mix_geom(imodel->coeffs[3], jmodel->coeffs[3]); @@ -267,8 +266,7 @@ void NormalJKR::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; cohesion = coeffs[3]; - k = 4/3*Emod; - Escaled = k * THREEQUARTERS; + Escaled = mix_stiffnessE(Emod, Emod, poiss, poiss); //Dan, not sure why these coefficients are mixed in the regular pair style if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal JKR normal model"); } @@ -277,7 +275,7 @@ void NormalJKR::coeffs_to_local() void NormalJKR::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) { - coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0]); coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); coeffs[3] = mix_geom(imodel->coeffs[3], jmodel->coeffs[3]); diff --git a/src/GRANULAR/contact_normal_models.h b/src/GRANULAR/contact_normal_models.h index 74e2800eaa..080e019d4d 100644 --- a/src/GRANULAR/contact_normal_models.h +++ b/src/GRANULAR/contact_normal_models.h @@ -108,7 +108,7 @@ class NormalJKR: public NormalModel { void set_knfac(); void set_fncrit(); private: - double k, cohesion; + double cohesion; double Escaled, F_pulloff; }; diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index 4f25e96071..89817ba00c 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -185,7 +185,7 @@ void TangentialMindlin::coeffs_to_local() if (k == -1) { if (!contact->normal_model->material_properties) error->all(FLERR, "Must either specify tangential stiffness or material properties for normal model for the Mindlin tangential style"); - k = 8.0 * mix_stiffnessE(contact->normal_model->Emod, contact->normal_model->Emod, contact->normal_model->poiss, contact->normal_model->poiss); + k = 8.0 * mix_stiffnessG(contact->normal_model->Emod, contact->normal_model->Emod, contact->normal_model->poiss, contact->normal_model->poiss); } if (k < 0.0 || xt < 0.0 || mu < 0.0) From 92c10cc2103d1a80ab03b8cfc4de154b84077d87 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 24 Aug 2022 12:19:27 -0600 Subject: [PATCH 017/445] Fixing memory issues, passing lmp ptr to submodels, and other misc fixes/changes --- doc/src/pair_granular.rst | 2 +- src/GRANULAR/contact.cpp | 124 +++++---- src/GRANULAR/contact.h | 16 +- src/GRANULAR/contact_damping_models.cpp | 24 +- src/GRANULAR/contact_damping_models.h | 20 +- src/GRANULAR/contact_heat_models.cpp | 8 +- src/GRANULAR/contact_heat_models.h | 8 +- src/GRANULAR/contact_normal_models.cpp | 57 ++-- src/GRANULAR/contact_normal_models.h | 32 ++- src/GRANULAR/contact_rolling_models.cpp | 8 +- src/GRANULAR/contact_rolling_models.h | 8 +- src/GRANULAR/contact_sub_models.cpp | 14 +- src/GRANULAR/contact_sub_models.h | 5 +- src/GRANULAR/contact_tangential_models.cpp | 33 ++- src/GRANULAR/contact_tangential_models.h | 48 ++-- src/GRANULAR/contact_twisting_models.cpp | 14 +- src/GRANULAR/contact_twisting_models.h | 12 +- src/GRANULAR/fix_pour.cpp | 1 + src/GRANULAR/fix_wall_gran.cpp | 161 ++++++------ src/GRANULAR/fix_wall_gran.h | 7 - src/GRANULAR/fix_wall_gran_region.cpp | 34 ++- src/GRANULAR/pair_granular.cpp | 287 ++++++++++----------- src/GRANULAR/pair_granular.h | 9 +- src/contact.h | 16 +- 24 files changed, 511 insertions(+), 437 deletions(-) diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index c14d94a77a..d630b18a3a 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -659,7 +659,7 @@ is equivalent to *pair gran/hooke 1000.0 NULL 50.0 50.0 0.4 1*\ . The second example is equivalent to *pair gran/hooke/history 1000.0 500.0 50.0 50.0 0.4 1*\ . The third example is equivalent to -*pair gran/hertz/history 1000.0 500.0 50.0 50.0 0.4 1*\ . +*pair gran/hertz/history 1000.0 500.0 50.0 50.0 0.4 1 limit_damping*\ . ---------- diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index 7ce3d8c739..a59eca9374 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -18,9 +18,6 @@ */ #include "contact.h" -#include "pointers.h" -#include "math_const.h" -#include "math_extra.h" #include "contact_sub_models.h" #include "contact_normal_models.h" #include "contact_tangential_models.h" @@ -31,33 +28,48 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "math_extra.h" #include +using namespace LAMMPS_NS; +using namespace Contact; using namespace MathExtra; -using namespace LAMMPS_NS::MathConst; -using namespace LAMMPS_NS::Contact; -ContactModel::ContactModel() : - Pointers(lmp) +ContactModel::ContactModel(LAMMPS *lmp) : Pointers(lmp) { limit_damping = 0; beyond_contact = 0; nondefault_history_transfer = 0; - cutoff_type = 0.0; - wall_flag = 0; - nmodels = 5; + nmodels = 6; + + wall_type = NONE; reset_contact(); + normal_model = nullptr; + damping_model = nullptr; + tangential_model = nullptr; + rolling_model = nullptr; + twisting_model = nullptr; + heat_model = nullptr; + for (int i = 0; i < nmodels; i++) sub_models[i] = nullptr; + transfer_history_factor = nullptr; } /* ---------------------------------------------------------------------- */ ContactModel::~ContactModel() { - delete[] transfer_history_factor; + delete [] transfer_history_factor; + + delete normal_model; + delete damping_model; + delete tangential_model; + delete rolling_model; + delete twisting_model; + delete heat_model; } /* ---------------------------------------------------------------------- */ @@ -65,52 +77,52 @@ ContactModel::~ContactModel() void ContactModel::init_model(std::string model_name, ModelType model_type) { if (model_type == NORMAL) { - if (model_name == "hooke") normal_model = new NormalHooke(); - else if (model_name == "hertz") normal_model = new NormalHertz(); - else if (model_name == "hertz/material") normal_model = new NormalHertzMaterial(); - else if (model_name == "dmt") normal_model = new NormalDMT(); - else if (model_name == "jkr") normal_model = new NormalJKR(); - else error->all(FLERR, "Normal model name not recognized"); + if (model_name == "hooke") normal_model = new NormalHooke(lmp); + else if (model_name == "hertz") normal_model = new NormalHertz(lmp); + else if (model_name == "hertz/material") normal_model = new NormalHertzMaterial(lmp); + else if (model_name == "dmt") normal_model = new NormalDMT(lmp); + else if (model_name == "jkr") normal_model = new NormalJKR(lmp); + else error->all(FLERR, "Normal model name {} not recognized", model_name); sub_models[model_type] = normal_model; } else if (model_type == TANGENTIAL) { - if (model_name =="linear_nohistory") tangential_model = new TangentialLinearNoHistory(); - else if (model_name =="linear_history") tangential_model = new TangentialLinearHistory(); - else if (model_name =="mindlin") tangential_model = new TangentialMindlin(); - else if (model_name =="mindlin/force") tangential_model = new TangentialMindlinForce(); - else if (model_name =="mindlin_rescale") tangential_model = new TangentialMindlinRescale(); - else if (model_name =="mindlin_rescale/force") tangential_model = new TangentialMindlinRescaleForce(); - else error->all(FLERR, "Tangential model name not recognized"); + if (model_name == "linear_nohistory") tangential_model = new TangentialLinearNoHistory(lmp); + else if (model_name == "linear_history") tangential_model = new TangentialLinearHistory(lmp); + else if (model_name == "mindlin") tangential_model = new TangentialMindlin(lmp); + else if (model_name == "mindlin/force") tangential_model = new TangentialMindlinForce(lmp); + else if (model_name == "mindlin_rescale") tangential_model = new TangentialMindlinRescale(lmp); + else if (model_name == "mindlin_rescale/force") tangential_model = new TangentialMindlinRescaleForce(lmp); + else error->all(FLERR, "Tangential model name {} not recognized", model_name); sub_models[model_type] = tangential_model; } else if (model_type == DAMPING) { - if (model_name =="velocity") damping_model = new DampingVelocity(); - else if (model_name =="mass_velocity") damping_model = new DampingMassVelocity(); - else if (model_name =="viscoelastic") damping_model = new DampingViscoelastic(); - else if (model_name =="tsuji") damping_model = new DampingTsuji(); - else error->all(FLERR, "Damping model name not recognized"); + if (model_name == "velocity") damping_model = new DampingVelocity(lmp); + else if (model_name == "mass_velocity") damping_model = new DampingMassVelocity(lmp); + else if (model_name == "viscoelastic") damping_model = new DampingViscoelastic(lmp); + else if (model_name == "tsuji") damping_model = new DampingTsuji(lmp); + else error->all(FLERR, "Damping model name {} not recognized", model_name); sub_models[model_type] = damping_model; } else if (model_type == ROLLING) { - if (model_name =="none") delete rolling_model; - else if (model_name =="sds") rolling_model = new RollingSDS(); - else error->all(FLERR, "Rolling model name not recognized"); + if (model_name == "none") delete rolling_model; + else if (model_name == "sds") rolling_model = new RollingSDS(lmp); + else error->all(FLERR, "Rolling model name {} not recognized", model_name); sub_models[model_type] = rolling_model; } else if (model_type == TWISTING) { - if (model_name =="none") delete twisting_model; - else if (model_name =="sds") twisting_model = new TwistingSDS(); - else if (model_name =="marshall") twisting_model = new TwistingMarshall(); - else error->all(FLERR, "Twisting model name not recognized"); + if (model_name == "none") delete twisting_model; + else if (model_name == "sds") twisting_model = new TwistingSDS(lmp); + else if (model_name == "marshall") twisting_model = new TwistingMarshall(lmp); + else error->all(FLERR, "Twisting model name {} not recognized", model_name); sub_models[model_type] = twisting_model; } else if (model_type == HEAT) { - if (model_name =="none") delete heat_model; - else if (model_name =="area") heat_model = new HeatArea(); - else error->all(FLERR, "Heat model name not recognized"); + if (model_name == "none") delete heat_model; + else if (model_name == "area") heat_model = new HeatArea(lmp); + else error->all(FLERR, "Heat model name not {} recognized", model_name); sub_models[model_type] = heat_model; } else { - error->all(FLERR, "Illegal model type"); + error->all(FLERR, "Illegal model type {}", model_type); } sub_models[model_type]->name.assign(model_name); @@ -198,10 +210,9 @@ void ContactModel::init() } } - transfer_history_factor = new double(size_history); - for (i = 0; i < size_history; i++) transfer_history_factor[i] = -1.0; - if (nondefault_history_transfer) { + transfer_history_factor = new double[size_history]; + for (i = 0; i < size_history; i++) { // Find which model controls this history value size_cumulative = 0; @@ -216,10 +227,15 @@ void ContactModel::init() if (j != nmodels) { if (sub_models[j]->nondefault_history_transfer) { transfer_history_factor[i] = sub_models[j]->transfer_history_factor[i - size_cumulative]; + } else { + transfer_history_factor[i] = -1; } } } } + + for (i = 0; i < nmodels; i++) + if (sub_models[i]) sub_models[i]->init(); } /* ---------------------------------------------------------------------- */ @@ -231,7 +247,6 @@ void ContactModel::mix_coeffs(ContactModel *c1, ContactModel *c2) sub_models[i]->mix_coeffs(c1->sub_models[i], c2->sub_models[i]); limit_damping = MAX(c1->limit_damping, c2->limit_damping); - cutoff_type = MAX(c1->cutoff_type, c2->cutoff_type); } /* ---------------------------------------------------------------------- */ @@ -301,15 +316,22 @@ void ContactModel::reset_contact() /* ---------------------------------------------------------------------- */ -bool ContactModel::check_contact() +bool ContactModel::check_contact(double rtemp) { check_flag = 1; - if (wall_flag) { + if (wall_type == RWALL) { + // Used by fix_wall_gran.cpp rsq = lensq3(dx); radsum = radi; - if (rwall == 0) Reff = radi; - else Reff = radi * rwall/(radi + rwall); + if (rtemp == 0) Reff = radi; + else Reff = radi * rtemp/(radi + rtemp); + } else if (wall_type == RDUPLICATE) { + // Used by fix_wall_gran_region.cpp + rsq = rtemp * rtemp; + radsum = radi + radi; + if (rtemp == 0) Reff = radi; + else Reff = radi * rtemp/(radi + rtemp); } else { sub3(xi, xj, dx); rsq = lensq3(dx); @@ -389,17 +411,17 @@ void ContactModel::calculate_forces() //********************************************** // calculate forces //********************************************** - + forces[0] = 0.0; double Fne, Fdamp; area = normal_model->calculate_area(); + normal_model->set_knfac(); Fne = normal_model->calculate_forces(); - normal_model->set_knfac(); // Needed for damping Fdamp = damping_model->calculate_forces(); + Fntot = Fne + Fdamp; normal_model->set_fncrit(); // Needed for tangential, rolling, twisting - Fntot = Fne + Fdamp; if (limit_damping && Fntot < 0.0) Fntot = 0.0; tangential_model->calculate_forces(); diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index bd04fe9ce1..4c38657ed7 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -26,6 +26,12 @@ enum ModelType { ROLLING = 3, TWISTING = 4, HEAT = 5 +}; // Relative order matters since some derive coeffs from others + +enum WallType { + NONE = 0, + RWALL = 1, + RDUPLICATE = 2 }; #define EPSILON 1e-10 @@ -41,10 +47,10 @@ class SubModel; class ContactModel : protected Pointers { public: - ContactModel(); + ContactModel(class LAMMPS *); ~ContactModel(); void init(); - bool check_contact(); + bool check_contact(double = 0); void reset_contact(); void prep_contact(); void calculate_forces(); @@ -68,8 +74,8 @@ class ContactModel : protected Pointers { SubModel *sub_models[6]; // Need to resize if we add more model flavors // Extra options - int beyond_contact, limit_damping, history_update, wall_flag; - double cutoff_type; + int beyond_contact, limit_damping, history_update; + WallType wall_type; // History variables int size_history, nondefault_history_transfer; @@ -77,7 +83,7 @@ class ContactModel : protected Pointers { double *history; // Contact properties/output - double *forces, *torquesi, *torquesj; + double forces[3], torquesi[3], torquesj[3]; double radi, radj, rwall, meff, dt, Ti, Tj, area; double Fntot, magtortwist; diff --git a/src/GRANULAR/contact_damping_models.cpp b/src/GRANULAR/contact_damping_models.cpp index 7a79c6946c..8d44746683 100644 --- a/src/GRANULAR/contact_damping_models.cpp +++ b/src/GRANULAR/contact_damping_models.cpp @@ -24,7 +24,11 @@ using namespace MathSpecial; Default damping model ------------------------------------------------------------------------- */ -void DampingModel::coeffs_to_local() +DampingModel::DampingModel(LAMMPS *lmp) : SubModel(lmp) {} + +/* ---------------------------------------------------------------------- */ + +void DampingModel::init() { damp = contact->normal_model->damp; } @@ -33,6 +37,10 @@ void DampingModel::coeffs_to_local() Velocity damping ------------------------------------------------------------------------- */ +DampingVelocity::DampingVelocity(LAMMPS *lmp) : DampingModel(lmp) {} + +/* ---------------------------------------------------------------------- */ + double DampingVelocity::calculate_forces() { return -damp * contact->vnnr; @@ -42,6 +50,10 @@ double DampingVelocity::calculate_forces() Mass velocity damping ------------------------------------------------------------------------- */ +DampingMassVelocity::DampingMassVelocity(LAMMPS *lmp) : DampingModel(lmp) {} + +/* ---------------------------------------------------------------------- */ + double DampingMassVelocity::calculate_forces() { return -damp * contact->meff * contact->vnnr; @@ -51,6 +63,10 @@ double DampingMassVelocity::calculate_forces() Default, viscoelastic damping ------------------------------------------------------------------------- */ +DampingViscoelastic::DampingViscoelastic(LAMMPS *lmp) : DampingModel(lmp) {} + +/* ---------------------------------------------------------------------- */ + double DampingViscoelastic::calculate_forces() { return -damp * contact->meff * contact->area * contact->vnnr; @@ -60,7 +76,11 @@ double DampingViscoelastic::calculate_forces() Tsuji damping ------------------------------------------------------------------------- */ -void DampingTsuji::coeffs_to_local() +DampingTsuji::DampingTsuji(LAMMPS *lmp) : DampingModel(lmp) {} + +/* ---------------------------------------------------------------------- */ + +void DampingTsuji::init() { double tmp = contact->normal_model->damp; damp = 1.2728 - 4.2783 * tmp + 11.087 * square(tmp); diff --git a/src/GRANULAR/contact_damping_models.h b/src/GRANULAR/contact_damping_models.h index 440ab36369..70294edc6a 100644 --- a/src/GRANULAR/contact_damping_models.h +++ b/src/GRANULAR/contact_damping_models.h @@ -15,46 +15,52 @@ #define CONTACT_DAMPING_MODELS_H_ #include "contact_sub_models.h" +#include "pointers.h" namespace LAMMPS_NS { namespace Contact { class DampingModel : public SubModel { public: - DampingModel() {}; + DampingModel(class LAMMPS *); ~DampingModel() {}; - virtual void coeffs_to_local(); + virtual void coeffs_to_local() {}; virtual void mix_coeffs(DampingModel*, DampingModel*) {}; + virtual void init(); virtual double calculate_forces() = 0; double damp; }; /* ---------------------------------------------------------------------- */ -class DampingVelocity: public DampingModel { +class DampingVelocity : public DampingModel { public: + DampingVelocity(class LAMMPS *); double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class DampingMassVelocity: public DampingModel { +class DampingMassVelocity : public DampingModel { public: + DampingMassVelocity(class LAMMPS *); double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class DampingViscoelastic: public DampingModel { +class DampingViscoelastic : public DampingModel { public: + DampingViscoelastic(class LAMMPS *); double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class DampingTsuji: public DampingModel { +class DampingTsuji : public DampingModel { public: - void coeffs_to_local(); + DampingTsuji(class LAMMPS *); + void init(); double calculate_forces(); }; diff --git a/src/GRANULAR/contact_heat_models.cpp b/src/GRANULAR/contact_heat_models.cpp index 3793f774c2..d25955b1c2 100644 --- a/src/GRANULAR/contact_heat_models.cpp +++ b/src/GRANULAR/contact_heat_models.cpp @@ -18,11 +18,17 @@ using namespace LAMMPS_NS; using namespace Contact; +/* ---------------------------------------------------------------------- + Default heat conduction +------------------------------------------------------------------------- */ + +HeatModel::HeatModel(LAMMPS *lmp) : SubModel(lmp) {} + /* ---------------------------------------------------------------------- Area-based heat conduction ------------------------------------------------------------------------- */ -HeatArea::HeatArea() +HeatArea::HeatArea(LAMMPS *lmp) : HeatModel(lmp) { num_coeffs = 1; } diff --git a/src/GRANULAR/contact_heat_models.h b/src/GRANULAR/contact_heat_models.h index 469a53cb13..b3104e9f3a 100644 --- a/src/GRANULAR/contact_heat_models.h +++ b/src/GRANULAR/contact_heat_models.h @@ -21,7 +21,7 @@ namespace Contact { class HeatModel : public SubModel { public: - HeatModel() {}; + HeatModel(class LAMMPS *); ~HeatModel() {}; virtual void coeffs_to_local() {}; virtual void mix_coeffs(HeatModel*, HeatModel*) {}; @@ -30,13 +30,13 @@ class HeatModel : public SubModel { /* ---------------------------------------------------------------------- */ -class HeatArea: public HeatModel { +class HeatArea : public HeatModel { public: - HeatArea(); + HeatArea(class LAMMPS *); void coeffs_to_local(); void mix_coeffs(HeatModel*, HeatModel*); double calculate_heat(); - private: + protected: double conductivity; }; diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index 6a6db39189..f4d4848833 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -32,7 +32,7 @@ using namespace MathConst; Default normal model ------------------------------------------------------------------------- */ -NormalModel::NormalModel() +NormalModel::NormalModel(LAMMPS *lmp) : SubModel(lmp) { material_properties = 0; } @@ -72,10 +72,9 @@ void NormalModel::set_fncrit() Hookean normal force ------------------------------------------------------------------------- */ -NormalHooke::NormalHooke() +NormalHooke::NormalHooke(LAMMPS *lmp) : NormalModel(lmp) { num_coeffs = 2; - allocate_coeffs(); } /* ---------------------------------------------------------------------- */ @@ -116,7 +115,7 @@ void NormalHooke::set_knfac() Hertzian normal force ------------------------------------------------------------------------- */ -NormalHertz::NormalHertz() +NormalHertz::NormalHertz(LAMMPS *lmp) : NormalModel(lmp) { num_coeffs = 2; } @@ -160,7 +159,7 @@ void NormalHertz::set_knfac() Hertzian normal force with material properties ------------------------------------------------------------------------- */ -NormalHertzMaterial::NormalHertzMaterial() +NormalHertzMaterial::NormalHertzMaterial(LAMMPS *lmp) : NormalHertz(lmp) { material_properties = 1; num_coeffs = 3; @@ -173,7 +172,7 @@ void NormalHertzMaterial::coeffs_to_local() Emod = coeffs[0]; damp = coeffs[1]; poiss = coeffs[2]; - k = 4 / 3 * Emod; + k = FOURTHIRDS * Emod; if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hertz material normal model"); } @@ -192,7 +191,7 @@ void NormalHertzMaterial::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) DMT normal force ------------------------------------------------------------------------- */ -NormalDMT::NormalDMT() +NormalDMT::NormalDMT(LAMMPS *lmp) : NormalModel(lmp) { allow_limit_damping = 0; material_properties = 1; @@ -207,7 +206,7 @@ void NormalDMT::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; cohesion = coeffs[3]; - k = 4 / 3 * Emod; + k = FOURTHIRDS * Emod; if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal DMT normal model"); } @@ -228,7 +227,7 @@ void NormalDMT::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) double NormalDMT::calculate_forces() { Fne = knfac * contact->delta; - F_pulloff = 4 * MathConst::MY_PI * cohesion * contact->Reff; + F_pulloff = 4.0 * MathConst::MY_PI * cohesion * contact->Reff; Fne -= F_pulloff; return Fne; } @@ -244,14 +243,14 @@ void NormalDMT::set_knfac() void NormalDMT::set_fncrit() { - Fncrit = fabs(Fne + 2 * F_pulloff); + Fncrit = fabs(Fne + 2.0 * F_pulloff); } /* ---------------------------------------------------------------------- JKR normal force ------------------------------------------------------------------------- */ -NormalJKR::NormalJKR() +NormalJKR::NormalJKR(LAMMPS *lmp) : NormalModel(lmp) { allow_limit_damping = 0; material_properties = 1; @@ -267,7 +266,7 @@ void NormalJKR::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; cohesion = coeffs[3]; - k = 4/3*Emod; + k = FOURTHIRDS * Emod; Escaled = k * THREEQUARTERS; if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal JKR normal model"); @@ -291,11 +290,15 @@ bool NormalJKR::touch() double area_at_pulloff, R2, delta_pulloff, dist_pulloff; bool touchflag; - R2 = contact->Reff * contact->Reff; - area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * R2 / (4 * Escaled)); - delta_pulloff = area_at_pulloff * area_at_pulloff / contact->Reff - 2 * sqrt(MY_PI * cohesion * area_at_pulloff /Escaled); - dist_pulloff = contact->radsum - delta_pulloff; - touchflag = (contact->rsq < dist_pulloff * dist_pulloff); + if (contact->touch) { + R2 = contact->Reff * contact->Reff; + area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * R2 / (4.0 * Escaled)); + delta_pulloff = area_at_pulloff * area_at_pulloff / contact->Reff - 2.0 * sqrt(MY_PI * cohesion * area_at_pulloff /Escaled); + dist_pulloff = contact->radsum - delta_pulloff; + touchflag = contact->rsq < (dist_pulloff * dist_pulloff); + } else { + touchflag = contact->rsq < (contact->radsum * contact->radsum); + } return touchflag; } @@ -311,8 +314,8 @@ double NormalJKR::pulloff_distance(double radi, double radj) Reff_tmp = radi * radj / (radi + radj); // May not be defined if (Reff_tmp <= 0) return 0; - area_at_pulloff = cbrt(9 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4 * Escaled)); - return area_at_pulloff * area_at_pulloff / Reff_tmp - 2 * sqrt(MY_PI * cohesion * area_at_pulloff / Escaled); + area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4.0 * Escaled)); + return area_at_pulloff * area_at_pulloff / Reff_tmp - 2.0 * sqrt(MY_PI * cohesion * area_at_pulloff / Escaled); } /* ---------------------------------------------------------------------- */ @@ -326,16 +329,16 @@ double NormalJKR::calculate_area() dR2 = contact->dR * contact->dR; t0 = cohesion * cohesion * R2 * R2 * Escaled; t1 = PI27SQ * t0; - t2 = 8 * contact->dR * dR2 * Escaled * Escaled * Escaled; - t3 = 4 * dR2 * Escaled; + t2 = 8.0 * contact->dR * dR2 * Escaled * Escaled * Escaled; + t3 = 4.0 * dR2 * Escaled; // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2 * t2)); + sqrt1 = MAX(0, t0 * (t1 + 2.0 * t2)); t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); t5 = t3 / t4 + t4 / Escaled; - sqrt2 = MAX(0, 2 * contact->dR + t5); + sqrt2 = MAX(0, 2.0 * contact->dR + t5); t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4 * contact->dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + sqrt3 = MAX(0, 4.0 * contact->dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); return INVROOT6 * (t6 + sqrt(sqrt3)); } @@ -347,8 +350,8 @@ double NormalJKR::calculate_forces() double a2; a2 = contact->area * contact->area; - Fne = Escaled * contact->area * a2 / contact->Reff - MY_2PI * a2 * sqrt(4 * cohesion * Escaled / (MY_PI * contact->area)); - F_pulloff = 3 * MY_PI * cohesion * contact->Reff; + Fne = Escaled * contact->area * a2 / contact->Reff - MY_2PI * a2 * sqrt(4.0 * cohesion * Escaled / (MY_PI * contact->area)); + F_pulloff = 3.0 * MY_PI * cohesion * contact->Reff; return Fne; } @@ -364,5 +367,5 @@ void NormalJKR::set_knfac() void NormalJKR::set_fncrit() { - Fncrit = fabs(Fne + 2 * F_pulloff); + Fncrit = fabs(Fne + 2.0 * F_pulloff); } diff --git a/src/GRANULAR/contact_normal_models.h b/src/GRANULAR/contact_normal_models.h index 74e2800eaa..ec604d04ba 100644 --- a/src/GRANULAR/contact_normal_models.h +++ b/src/GRANULAR/contact_normal_models.h @@ -21,7 +21,7 @@ namespace Contact { class NormalModel : public SubModel { public: - NormalModel(); + NormalModel(class LAMMPS *); ~NormalModel() {}; virtual void coeffs_to_local() {}; virtual void mix_coeffs(NormalModel*, NormalModel*) {}; @@ -39,65 +39,63 @@ class NormalModel : public SubModel { /* ---------------------------------------------------------------------- */ -class NormalHooke: public NormalModel { +class NormalHooke : public NormalModel { public: - NormalHooke(); + NormalHooke(class LAMMPS *); ~NormalHooke() {}; void coeffs_to_local(); void mix_coeffs(NormalModel*, NormalModel*); double calculate_forces(); void set_knfac(); - private: + protected: double k; }; /* ---------------------------------------------------------------------- */ -class NormalHertz: public NormalModel { +class NormalHertz : public NormalModel { public: - NormalHertz(); + NormalHertz(class LAMMPS *); ~NormalHertz() {}; void coeffs_to_local(); void mix_coeffs(NormalModel*, NormalModel*); double calculate_forces(); void set_knfac(); - private: + protected: double k; }; /* ---------------------------------------------------------------------- */ -class NormalHertzMaterial: public NormalHertz { +class NormalHertzMaterial : public NormalHertz { public: - NormalHertzMaterial(); + NormalHertzMaterial(class LAMMPS *); ~NormalHertzMaterial() {}; void coeffs_to_local(); void mix_coeffs(NormalModel*, NormalModel*); - private: - double k; }; /* ---------------------------------------------------------------------- */ -class NormalDMT: public NormalModel { +class NormalDMT : public NormalModel { public: - NormalDMT(); + NormalDMT(class LAMMPS *); ~NormalDMT() {}; void coeffs_to_local(); void mix_coeffs(NormalModel*, NormalModel*); double calculate_forces(); void set_knfac(); void set_fncrit(); - private: + protected: double k, cohesion; double F_pulloff; }; /* ---------------------------------------------------------------------- */ -class NormalJKR: public NormalModel { +class NormalJKR : public NormalModel { public: - NormalJKR(); + NormalJKR(class LAMMPS *); ~NormalJKR() {}; void coeffs_to_local(); void mix_coeffs(NormalModel*, NormalModel*); @@ -107,7 +105,7 @@ class NormalJKR: public NormalModel { double calculate_forces(); void set_knfac(); void set_fncrit(); - private: + protected: double k, cohesion; double Escaled, F_pulloff; }; diff --git a/src/GRANULAR/contact_rolling_models.cpp b/src/GRANULAR/contact_rolling_models.cpp index 8074b14141..cc8e3e471e 100644 --- a/src/GRANULAR/contact_rolling_models.cpp +++ b/src/GRANULAR/contact_rolling_models.cpp @@ -23,11 +23,17 @@ using namespace Contact; using namespace MathConst; using namespace MathExtra; +/* ---------------------------------------------------------------------- + Default rolling friction model +------------------------------------------------------------------------- */ + +RollingModel::RollingModel(LAMMPS *lmp) : SubModel(lmp) {} + /* ---------------------------------------------------------------------- SDS rolling friction model ------------------------------------------------------------------------- */ -RollingSDS::RollingSDS() +RollingSDS::RollingSDS(LAMMPS *lmp) : RollingModel(lmp) { num_coeffs = 3; size_history = 3; diff --git a/src/GRANULAR/contact_rolling_models.h b/src/GRANULAR/contact_rolling_models.h index 1cd23e1d5d..e81d22301c 100644 --- a/src/GRANULAR/contact_rolling_models.h +++ b/src/GRANULAR/contact_rolling_models.h @@ -21,7 +21,7 @@ namespace Contact { class RollingModel : public SubModel { public: - RollingModel() {}; + RollingModel(class LAMMPS *); ~RollingModel() {}; virtual void coeffs_to_local() {}; virtual void mix_coeffs(RollingModel*, RollingModel*) {}; @@ -30,13 +30,13 @@ class RollingModel : public SubModel { /* ---------------------------------------------------------------------- */ -class RollingSDS: public RollingModel { +class RollingSDS : public RollingModel { public: - RollingSDS(); + RollingSDS(class LAMMPS *); void coeffs_to_local(); void mix_coeffs(RollingModel*, RollingModel*); double calculate_forces(); - private: + protected: double k, mu, gamma; }; diff --git a/src/GRANULAR/contact_sub_models.cpp b/src/GRANULAR/contact_sub_models.cpp index a0bf99301d..8aafc0f2b5 100644 --- a/src/GRANULAR/contact_sub_models.cpp +++ b/src/GRANULAR/contact_sub_models.cpp @@ -24,8 +24,11 @@ using namespace LAMMPS_NS; using namespace Contact; -SubModel::SubModel() : - Pointers(lmp) +/* ---------------------------------------------------------------------- + Parent class for all types of contact forces +------------------------------------------------------------------------- */ + +SubModel::SubModel(LAMMPS *lmp) : Pointers(lmp) { allocated = 0; size_history = 0; @@ -58,13 +61,12 @@ void SubModel::allocate_coeffs() int SubModel::parse_coeffs(char **arg, int iarg, int narg) { - if (iarg + num_coeffs >= narg) + if (iarg + num_coeffs > narg) error->all(FLERR, "Insufficient arguments provided for {} model", name); - for (int i = 0; i < num_coeffs; i++) { // A few parameters (eg.g kt for tangential mindlin) allow null - if (strcmp(arg[iarg+i+1], "NULL") == 0) coeffs[i] = -1; - else coeffs[i] = utils::numeric(FLERR,arg[iarg+i+1],false,lmp); + if (strcmp(arg[iarg+i], "NULL") == 0) coeffs[i] = -1; + else coeffs[i] = utils::numeric(FLERR,arg[iarg+i],false,lmp); } coeffs_to_local(); diff --git a/src/GRANULAR/contact_sub_models.h b/src/GRANULAR/contact_sub_models.h index 95da8d5cbf..67e9c79e35 100644 --- a/src/GRANULAR/contact_sub_models.h +++ b/src/GRANULAR/contact_sub_models.h @@ -15,14 +15,14 @@ #define CONTACT_SUB_MODEL_H_ #include "contact.h" -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { namespace Contact { class SubModel : protected Pointers { public: - SubModel(); + SubModel(class LAMMPS *); virtual ~SubModel(); int num_coeffs; @@ -31,6 +31,7 @@ class SubModel : protected Pointers { int parse_coeffs(char **, int, int); virtual void mix_coeffs(SubModel*, SubModel*) {}; virtual void coeffs_to_local() {}; + virtual void init() {}; // called after all other submodel coeffs defined void allocate_coeffs(); std::string name; diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index 4f25e96071..c73328ff10 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -24,11 +24,24 @@ using namespace Contact; using namespace MathConst; using namespace MathExtra; +/* ---------------------------------------------------------------------- + Default model +------------------------------------------------------------------------- */ + +TangentialModel::TangentialModel(LAMMPS *lmp) : SubModel(lmp) {} + +/* ---------------------------------------------------------------------- */ + +void TangentialModel::init() +{ + damp = xt * contact->damping_model->damp; +} + /* ---------------------------------------------------------------------- Linear model with no history ------------------------------------------------------------------------- */ -TangentialLinearNoHistory::TangentialLinearNoHistory() +TangentialLinearNoHistory::TangentialLinearNoHistory(LAMMPS *lmp) : TangentialModel(lmp) { num_coeffs = 2; size_history = 3; @@ -41,7 +54,6 @@ void TangentialLinearNoHistory::coeffs_to_local() k = 0.0; // No tangential stiffness with no history xt = coeffs[0]; mu = coeffs[1]; - damp = xt * contact->damping_model->damp; if (k < 0.0 || xt < 0.0 || mu < 0.0) error->all(FLERR, "Illegal linear no history tangential model"); @@ -76,7 +88,7 @@ void TangentialLinearNoHistory::calculate_forces() Linear model with history ------------------------------------------------------------------------- */ -TangentialLinearHistory::TangentialLinearHistory() +TangentialLinearHistory::TangentialLinearHistory(LAMMPS *lmp) : TangentialModel(lmp) { num_coeffs = 3; size_history = 3; @@ -89,7 +101,6 @@ void TangentialLinearHistory::coeffs_to_local() k = coeffs[0]; xt = coeffs[1]; mu = coeffs[2]; - damp = xt * contact->damping_model->damp; if (k < 0.0 || xt < 0.0 || mu < 0.0) error->all(FLERR, "Illegal linear tangential model"); @@ -166,7 +177,7 @@ void TangentialLinearHistory::calculate_forces() Mindlin model ------------------------------------------------------------------------- */ -TangentialMindlin::TangentialMindlin() +TangentialMindlin::TangentialMindlin(LAMMPS *lmp) : TangentialModel(lmp) { num_coeffs = 3; size_history = 3; @@ -190,8 +201,6 @@ void TangentialMindlin::coeffs_to_local() if (k < 0.0 || xt < 0.0 || mu < 0.0) error->all(FLERR, "Illegal Mindlin tangential model"); - - damp = xt * contact->damping_model->damp; } /* ---------------------------------------------------------------------- */ @@ -293,7 +302,7 @@ void TangentialMindlin::calculate_forces() Mindlin force model ------------------------------------------------------------------------- */ -TangentialMindlinForce::TangentialMindlinForce() +TangentialMindlinForce::TangentialMindlinForce(LAMMPS *lmp) : TangentialMindlin(lmp) { num_coeffs = 3; size_history = 3; @@ -305,7 +314,7 @@ TangentialMindlinForce::TangentialMindlinForce() Mindlin rescale model ------------------------------------------------------------------------- */ -TangentialMindlinRescale::TangentialMindlinRescale() +TangentialMindlinRescale::TangentialMindlinRescale(LAMMPS *lmp) : TangentialMindlin(lmp) { num_coeffs = 3; size_history = 4; @@ -313,7 +322,7 @@ TangentialMindlinRescale::TangentialMindlinRescale() mindlin_rescale = 1; nondefault_history_transfer = 1; - transfer_history_factor = new double(size_history); + transfer_history_factor = new double[size_history]; for (int i = 0; i < size_history; i++) transfer_history_factor[i] = -1.0; transfer_history_factor[3] = +1; } @@ -322,7 +331,7 @@ TangentialMindlinRescale::TangentialMindlinRescale() Mindlin rescale force model ------------------------------------------------------------------------- */ -TangentialMindlinRescaleForce::TangentialMindlinRescaleForce() +TangentialMindlinRescaleForce::TangentialMindlinRescaleForce(LAMMPS *lmp) : TangentialMindlin(lmp) { num_coeffs = 3; size_history = 4; @@ -330,7 +339,7 @@ TangentialMindlinRescaleForce::TangentialMindlinRescaleForce() mindlin_rescale = 1; nondefault_history_transfer = 1; - transfer_history_factor = new double(size_history); + transfer_history_factor = new double[size_history]; for (int i = 0; i < size_history; i++) transfer_history_factor[i] = -1.0; transfer_history_factor[3] = +1; } diff --git a/src/GRANULAR/contact_tangential_models.h b/src/GRANULAR/contact_tangential_models.h index f5d83a57f7..4e2c85f678 100644 --- a/src/GRANULAR/contact_tangential_models.h +++ b/src/GRANULAR/contact_tangential_models.h @@ -21,71 +21,69 @@ namespace Contact { class TangentialModel : public SubModel { public: - TangentialModel() {}; + TangentialModel(class LAMMPS *); virtual ~TangentialModel() {}; virtual void coeffs_to_local() {}; virtual void mix_coeffs(TangentialModel*, TangentialModel*) {}; virtual void calculate_forces() = 0; + void init(); int rescale_flag; double k, damp, mu; // Used by Marshall twisting model -}; - -/* ---------------------------------------------------------------------- */ - -class TangentialLinearNoHistory: public TangentialModel { - public: - TangentialLinearNoHistory(); - void coeffs_to_local(); - void mix_coeffs(TangentialModel*, TangentialModel*); - void calculate_forces(); - private: + protected: double xt; }; /* ---------------------------------------------------------------------- */ -class TangentialLinearHistory: public TangentialModel { +class TangentialLinearNoHistory : public TangentialModel { public: - TangentialLinearHistory(); + TangentialLinearNoHistory(class LAMMPS *); void coeffs_to_local(); void mix_coeffs(TangentialModel*, TangentialModel*); void calculate_forces(); - private: - double xt; }; /* ---------------------------------------------------------------------- */ -class TangentialMindlin: public TangentialModel { +class TangentialLinearHistory : public TangentialModel { public: - TangentialMindlin(); + TangentialLinearHistory(class LAMMPS *); + void coeffs_to_local(); + void mix_coeffs(TangentialModel*, TangentialModel*); + void calculate_forces(); +}; + +/* ---------------------------------------------------------------------- */ + +class TangentialMindlin : public TangentialModel { + public: + TangentialMindlin(class LAMMPS *); void coeffs_to_local(); void mix_coeffs(TangentialModel*, TangentialModel*); void calculate_forces(); protected: int mindlin_rescale, mindlin_force; - double xt; }; /* ---------------------------------------------------------------------- */ -class TangentialMindlinForce: public TangentialMindlin { +class TangentialMindlinForce : public TangentialMindlin { public: - TangentialMindlinForce(); + TangentialMindlinForce(class LAMMPS *); }; /* ---------------------------------------------------------------------- */ -class TangentialMindlinRescale: public TangentialMindlin { +class TangentialMindlinRescale : public TangentialMindlin { public: - TangentialMindlinRescale(); + TangentialMindlinRescale(class LAMMPS *); }; /* ---------------------------------------------------------------------- */ -class TangentialMindlinRescaleForce: public TangentialMindlin { +class TangentialMindlinRescaleForce : public TangentialMindlin { public: - TangentialMindlinRescaleForce(); + TangentialMindlinRescaleForce(class LAMMPS *); }; } // namespace Contact diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/GRANULAR/contact_twisting_models.cpp index 75a2414c21..089b4c686e 100644 --- a/src/GRANULAR/contact_twisting_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -22,11 +22,21 @@ using namespace LAMMPS_NS; using namespace Contact; using namespace MathConst; +/* ---------------------------------------------------------------------- + Default twisting model +------------------------------------------------------------------------- */ + +TwistingModel::TwistingModel(LAMMPS *lmp) : SubModel(lmp) +{ + num_coeffs = 0; + size_history = 3; +} + /* ---------------------------------------------------------------------- Marshall twisting model ------------------------------------------------------------------------- */ -TwistingMarshall::TwistingMarshall() +TwistingMarshall::TwistingMarshall(LAMMPS *lmp) : TwistingModel(lmp) { num_coeffs = 0; size_history = 3; @@ -63,7 +73,7 @@ double TwistingMarshall::calculate_forces() SDS twisting model ------------------------------------------------------------------------- */ -TwistingSDS::TwistingSDS() +TwistingSDS::TwistingSDS(LAMMPS *lmp) : TwistingModel(lmp) { num_coeffs = 3; size_history = 3; diff --git a/src/GRANULAR/contact_twisting_models.h b/src/GRANULAR/contact_twisting_models.h index e689c8ed35..5bcdc6b2a3 100644 --- a/src/GRANULAR/contact_twisting_models.h +++ b/src/GRANULAR/contact_twisting_models.h @@ -21,7 +21,7 @@ namespace Contact { class TwistingModel : public SubModel { public: - TwistingModel() {}; + TwistingModel(class LAMMPS *); virtual ~TwistingModel() {}; virtual void coeffs_to_local() {}; virtual void mix_coeffs(TwistingModel*, TwistingModel*) {}; @@ -30,21 +30,21 @@ class TwistingModel : public SubModel { /* ---------------------------------------------------------------------- */ -class TwistingMarshall: public TwistingModel { +class TwistingMarshall : public TwistingModel { public: - TwistingMarshall(); + TwistingMarshall(class LAMMPS *); double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class TwistingSDS: public TwistingModel { +class TwistingSDS : public TwistingModel { public: - TwistingSDS(); + TwistingSDS(class LAMMPS *); void coeffs_to_local(); void mix_coeffs(TwistingModel*, TwistingModel*); double calculate_forces(); - private: + protected: double k, mu, damp; }; diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 7a8bf630df..9cb71272f0 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -270,6 +270,7 @@ FixPour::~FixPour() delete[] molfrac; delete[] idrigid; delete[] idshake; + delete[] idregion; delete[] radius_poly; delete[] frac_poly; memory->destroy(coords); diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index b4d94d62fe..208ff10bdd 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -38,7 +38,6 @@ #include "respa.h" #include "update.h" -#include #include using namespace LAMMPS_NS; @@ -69,8 +68,8 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : // set interaction style // disable bonded/history option for now - model = new ContactModel(); - model->wall_flag = 1; + model = new ContactModel(lmp); + model->wall_type = RWALL; if (strcmp(arg[3],"granular") == 0) classic_flag = 0; else classic_flag = 1; @@ -82,7 +81,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : int iarg; if (classic_flag) { - iarg = 3; + iarg = 4; iarg = model->init_classic_model(arg, iarg, narg); if (iarg < narg) { @@ -93,40 +92,46 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : } } else { - iarg = 3; - model->init_model(std::string(arg[iarg]), NORMAL); - iarg += 1; + iarg = 4; + model->init_model(std::string(arg[iarg++]), NORMAL); iarg = model->normal_model->parse_coeffs(arg, iarg, narg); while (iarg < narg) { if (strcmp(arg[iarg], "damping") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - model->init_model(std::string(arg[iarg]), DAMPING); - iarg += 1; + iarg++; + if (iarg >= narg) + error->all(FLERR, "Illegal fix wall/gran command, must specify " + "damping model after damping keyword"); + model->init_model(std::string(arg[iarg++]), DAMPING); iarg = model->damping_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "tangential") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - model->init_model(std::string(arg[iarg]), TANGENTIAL); - iarg += 1; + iarg++; + if (iarg >= narg) + error->all(FLERR, "Illegal fix wall/gran command, must specify " + "tangential model after tangential keyword"); + model->init_model(std::string(arg[iarg++]), TANGENTIAL); iarg = model->tangential_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "rolling") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - model->init_model(std::string(arg[iarg]), ROLLING); - iarg += 1; + iarg++; + if (iarg >= narg) + error->all(FLERR, "Illegal fix wall/gran command, must specify " + "rolling model after rolling keyword"); + model->init_model(std::string(arg[iarg++]), ROLLING); iarg = model->rolling_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "twisting") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - model->init_model(std::string(arg[iarg]), TWISTING); + iarg++; + if (iarg >= narg) + error->all(FLERR, "Illegal fix wall/gran command, must specify " + "twisting model after twisting keyword"); + model->init_model(std::string(arg[iarg++]), TWISTING); iarg += 1; iarg = model->twisting_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "heat") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - model->init_model(std::string(arg[iarg]), HEAT); + iarg++; + if (iarg >= narg) + error->all(FLERR, "Illegal fix wall/gran command, must specify " + "heat model after heat keyword"); + model->init_model(std::string(arg[iarg++]), HEAT); iarg += 1; iarg = model->heat_model->parse_coeffs(arg, iarg, narg); heat_flag = 1; @@ -156,7 +161,10 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Illegal pair_coeff command, " "Cannot limit damping with specified normal contact model"); + model->init(); + size_history = model->size_history; + if (model->beyond_contact) size_history += 1; //Need to track if particle is touching if (size_history == 0) use_history = restart_peratom = 0; else use_history = restart_peratom = 1; @@ -349,25 +357,16 @@ void FixWallGran::init() if (i < modify->nfix) fix_rigid = modify->fix[i]; // Define history indices - int size_normal_history = model->normal_model->size_history; - int size_tangential_history = model->tangential_model->size_history; - int size_damping_history = model->damping_model->size_history; - int size_rolling_history = 0; - int size_twisting_history = 0; - if (model->rolling_model) size_rolling_history = model->rolling_model->size_history; - if (model->twisting_model) size_twisting_history = model->twisting_model->size_history; + int next_index = 0; + if (model->beyond_contact) next_index = 1; - damping_history_index = size_normal_history; - tangential_history_index = damping_history_index + size_damping_history; - roll_history_index = tangential_history_index + size_tangential_history; - twist_history_index = roll_history_index + size_rolling_history; - - model->normal_model->history_index = 0; - model->damping_model->history_index = damping_history_index; - model->tangential_model->history_index = tangential_history_index; - if (model->rolling_model) model->rolling_model->history_index = roll_history_index; - if (model->twisting_model) model->twisting_model->history_index = twist_history_index; + for (i = 0; i < 6; i++) { + if (model->sub_models[i]) { + model->sub_models[i]->history_index = next_index; + next_index += model->sub_models[i]->size_history; + } + } } /* ---------------------------------------------------------------------- */ @@ -513,59 +512,61 @@ void FixWallGran::post_force(int /*vflag*/) // Reset model and copy initial geometric data model->reset_contact(); - model->xi = x[i]; model->dx[0] = dx; model->dx[1] = dy; model->dx[2] = dz; model->radi = radius[i]; - model->rwall = rwall; + if (model->beyond_contact) model->touch = history_one[i][0]; - touchflag = model->check_contact(); + touchflag = model->check_contact(rwall); if (!touchflag) { if (use_history) for (j = 0; j < size_history; j++) history_one[i][j] = 0.0; - } else { + continue; + } // Dan: I tried to simplify this logic, not sure it's 100% correct - // meff = effective mass of sphere - // if I is part of rigid body, use body mass + if (model->beyond_contact) + history_one[i][0] = 1; - meff = rmass[i]; - if (fix_rigid && mass_rigid[i] > 0.0) meff = mass_rigid[i]; + // meff = effective mass of sphere + // if I is part of rigid body, use body mass - // Copy additional information and prepare force calculations - model->meff = meff; - model->vi = v[i]; - model->omegai = omega[i]; - model->history_update = history_update; - if (use_history) model->history = history_one[i]; - if (heat_flag) model->Ti = temperature[i]; - model->prep_contact(); + meff = rmass[i]; + if (fix_rigid && mass_rigid[i] > 0.0) meff = mass_rigid[i]; - model->calculate_forces(); - if (heat_flag) dq = model->calculate_heat(); + // Copy additional information and prepare force calculations + model->meff = meff; + model->vi = v[i]; + model->omegai = omega[i]; + model->history_update = history_update; + if (use_history) model->history = history_one[i]; + if (heat_flag) model->Ti = temperature[i]; + model->prep_contact(); - forces = model->forces; - torquesi = model->torquesi; + model->calculate_forces(); + if (heat_flag) dq = model->calculate_heat(); - // apply forces & torques - add3(f[i], forces, f[i]); + forces = model->forces; + torquesi = model->torquesi; - add3(torque[i], torquesi, torque[i]); - if (heat_flag) heatflux[i] += dq; + // apply forces & torques + add3(f[i], forces, f[i]); - // store contact info - if (peratom_flag) { - array_atom[i][0] = 1.0; - array_atom[i][1] = forces[0]; - array_atom[i][2] = forces[1]; - array_atom[i][3] = forces[2]; - array_atom[i][4] = x[i][0] - dx; - array_atom[i][5] = x[i][1] - dy; - array_atom[i][6] = x[i][2] - dz; - array_atom[i][7] = radius[i]; - } + add3(torque[i], torquesi, torque[i]); + if (heat_flag) heatflux[i] += dq; + + // store contact info + if (peratom_flag) { + array_atom[i][0] = 1.0; + array_atom[i][1] = forces[0]; + array_atom[i][2] = forces[1]; + array_atom[i][3] = forces[2]; + array_atom[i][4] = x[i][0] - dx; + array_atom[i][5] = x[i][1] - dy; + array_atom[i][6] = x[i][2] - dz; + array_atom[i][7] = radius[i]; } } } @@ -583,7 +584,7 @@ void FixWallGran::clear_stored_contacts() { void FixWallGran::post_force_respa(int vflag, int ilevel, int /*iloop*/) { - if (ilevel == nlevels_respa-1) post_force(vflag); + if (ilevel == nlevels_respa - 1) post_force(vflag); } /* ---------------------------------------------------------------------- @@ -594,10 +595,10 @@ double FixWallGran::memory_usage() { int nmax = atom->nmax; double bytes = 0.0; - if (use_history) bytes += (double)nmax*size_history * sizeof(double); // shear history + if (use_history) bytes += (double)nmax * size_history * sizeof(double); // shear history if (fix_rigid) bytes += (double)nmax * sizeof(int); // mass_rigid // store contacts - if (peratom_flag) bytes += (double)nmax*size_peratom_cols*sizeof(double); + if (peratom_flag) bytes += (double)nmax * size_peratom_cols * sizeof(double); return bytes; } diff --git a/src/GRANULAR/fix_wall_gran.h b/src/GRANULAR/fix_wall_gran.h index d0202d65e8..b61ac24d54 100644 --- a/src/GRANULAR/fix_wall_gran.h +++ b/src/GRANULAR/fix_wall_gran.h @@ -55,13 +55,6 @@ class FixWallGran : public Fix { // for granular model choices Contact::ContactModel *model; - // indices of history entries - int normal_history_index; - int damping_history_index; - int tangential_history_index; - int roll_history_index; - int twist_history_index; - double lo, hi, cylradius; double amplitude, period, omega, vshear; double dt; diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index c288abf92e..59ad15c02d 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -18,6 +18,7 @@ #include "fix_wall_gran_region.h" #include "atom.h" +#include "contact.h" #include "comm.h" #include "domain.h" #include "error.h" @@ -30,6 +31,7 @@ #include using namespace LAMMPS_NS; +using namespace Contact; using namespace FixConst; using namespace MathExtra; @@ -48,6 +50,8 @@ FixWallGranRegion::FixWallGranRegion(LAMMPS *lmp, int narg, char **arg) : tmax = region->tmax; c2r = new int[tmax]; + model->wall_type = RDUPLICATE; + // re-allocate atom-based arrays with nshear // do not register with Atom class, since parent class did that @@ -120,7 +124,7 @@ void FixWallGranRegion::post_force(int /*vflag*/) { int i, m, nc, iwall; double dx, dy, dz, meff; - double *forces, *torquesi, dq, rwall; + double *forces, *torquesi, dq; double vwall[3]; double w0[3] = {0.0}; bool touchflag = false; @@ -179,7 +183,7 @@ void FixWallGranRegion::post_force(int /*vflag*/) region->set_velocity(); } - if (peratom_flag) { clear_stored_contacts(); } + if (peratom_flag) clear_stored_contacts(); // Define constant wall properties (atom j) model->radj = 0.0; @@ -188,7 +192,7 @@ void FixWallGranRegion::post_force(int /*vflag*/) for (i = 0; i < nlocal; i++) { if (! mask[i] & groupbit) continue; - if (!region->match(x[i][0], x[i][1], x[i][2]))continue; + if (! region->match(x[i][0], x[i][1], x[i][2])) continue; nc = region->surface(x[i][0], x[i][1], x[i][2], model->pulloff_distance(radius[i], 0.0)); if (nc > tmax) error->one(FLERR, "Too many wallgran/region contacts for one particle"); @@ -221,24 +225,25 @@ void FixWallGranRegion::post_force(int /*vflag*/) for (int ic = 0; ic < nc; ic++) { // Reset model and copy initial geometric data + // A bit unncessary since region->contact[ic] stores r model->reset_contact(); - model->xi = x[i]; model->dx[0] = region->contact[ic].delx; model->dx[1] = region->contact[ic].dely; model->dx[2] = region->contact[ic].delz; model->radi = radius[i]; - model->rwall = rwall; + if (model->beyond_contact) model->touch = history_many[i][c2r[ic]][0]; - touchflag = model->check_contact(); + touchflag = model->check_contact(region->contact[ic].r); + if (!touchflag) { + if (use_history) + for (m = 0; m < size_history; m++) + history_many[i][c2r[ic]][m] = 0.0; + continue; + } - if (model->beyond_contact) { - if (history_many[i][c2r[ic]][0] == 0.0 && model->rsq > model->radsum * model->radsum) { - for (m = 0; m < size_history; m++) history_many[i][0][m] = 0.0; - continue; - } - } // Dan: not quite sure about this - + if (model->beyond_contact) + history_many[i][c2r[ic]][0] = 1; if (regiondynamic) region->velocity_contact(vwall, x[i], ic); model->vj = vwall; @@ -254,7 +259,8 @@ void FixWallGranRegion::post_force(int /*vflag*/) model->vi = v[i]; model->omegai = omega[i]; model->history_update = history_update; - if (use_history) model->history = history_one[i]; + + if (use_history) model->history = history_many[i][c2r[ic]]; if (heat_flag) model->Ti = temperature[i]; model->prep_contact(); diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 9b1a036928..0c228a2936 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -81,9 +81,6 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) use_history = 0; beyond_contact = 0; nondefault_history_transfer = 0; - tangential_history_index = 0; - roll_history_index = 0; - twist_history_index = 0; heat_flag = 0; // create dummy fix as placeholder for FixNeighHistory @@ -105,6 +102,7 @@ PairGranular::~PairGranular() if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); + memory->destroy(cutoff_type); delete [] onerad_dynamic; delete [] onerad_frozen; @@ -119,7 +117,7 @@ PairGranular::~PairGranular() void PairGranular::compute(int eflag, int vflag) { - int i,j,ii,jj,inum,jnum,itype,jtype; + int i,j,k,ii,jj,inum,jnum,itype,jtype; double factor_lj,mi,mj,meff,delx,dely,delz; double *forces, *torquesi, *torquesj, dq; @@ -203,6 +201,7 @@ void PairGranular::compute(int eflag, int vflag) models[itype][jtype]->xj = x[j]; models[itype][jtype]->radi = radius[i]; models[itype][jtype]->radj = radius[j]; + models[itype][jtype]->touch = touch[jj]; touchflag = models[itype][jtype]->check_contact(); @@ -211,74 +210,77 @@ void PairGranular::compute(int eflag, int vflag) if (use_history) { touch[jj] = 0; history = &allhistory[size_history*jj]; - for (int k = 0; k < size_history; k++) history[k] = 0.0; + for (k = 0; k < size_history; k++) history[k] = 0.0; } - } else { + continue; + } - // meff = effective mass of pair of particles - // if I or J part of rigid body, use body mass - // if I or J is frozen, meff is other particle - mi = rmass[i]; - mj = rmass[j]; - if (fix_rigid) { - if (mass_rigid[i] > 0.0) mi = mass_rigid[i]; - if (mass_rigid[j] > 0.0) mj = mass_rigid[j]; - } - meff = mi * mj / (mi + mj); - if (mask[i] & freeze_group_bit) meff = mj; - if (mask[j] & freeze_group_bit) meff = mi; + if (use_history) { + touch[jj] = 1; + history = &allhistory[size_history*jj]; + } - // Copy additional information and prepare force calculations - models[itype][jtype]->meff = meff; - models[itype][jtype]->vi = v[i]; - models[itype][jtype]->vj = v[j]; - models[itype][jtype]->omegai = omega[i]; - models[itype][jtype]->omegaj = omega[j]; - models[itype][jtype]->history_update = history_update; - if (use_history) models[itype][jtype]->history = history; - if (heat_flag) { - models[itype][jtype]->Ti = temperature[i]; - models[itype][jtype]->Tj = temperature[j]; - } - models[itype][jtype]->prep_contact(); + // meff = effective mass of pair of particles + // if I or J part of rigid body, use body mass + // if I or J is frozen, meff is other particle + mi = rmass[i]; + mj = rmass[j]; + if (fix_rigid) { + if (mass_rigid[i] > 0.0) mi = mass_rigid[i]; + if (mass_rigid[j] > 0.0) mj = mass_rigid[j]; + } + meff = mi * mj / (mi + mj); + if (mask[i] & freeze_group_bit) meff = mj; + if (mask[j] & freeze_group_bit) meff = mi; - if (models[itype][jtype]->beyond_contact) touch[jj] = 1; + // Copy additional information and prepare force calculations + models[itype][jtype]->meff = meff; + models[itype][jtype]->vi = v[i]; + models[itype][jtype]->vj = v[j]; + models[itype][jtype]->omegai = omega[i]; + models[itype][jtype]->omegaj = omega[j]; + models[itype][jtype]->history_update = history_update; + if (use_history) models[itype][jtype]->history = history; + if (heat_flag) { + models[itype][jtype]->Ti = temperature[i]; + models[itype][jtype]->Tj = temperature[j]; + } + models[itype][jtype]->prep_contact(); - // if any history is needed - if (use_history) { - touch[jj] = 1; - history = &allhistory[size_history*jj]; - } + // if any history is needed + if (use_history) { + touch[jj] = 1; + history = &allhistory[size_history*jj]; + } - models[itype][jtype]->calculate_forces(); - if (heat_flag) dq = models[itype][jtype]->calculate_heat(); + models[itype][jtype]->calculate_forces(); + if (heat_flag) dq = models[itype][jtype]->calculate_heat(); - forces = models[itype][jtype]->forces; - torquesi = models[itype][jtype]->torquesi; - torquesj = models[itype][jtype]->torquesj; + forces = models[itype][jtype]->forces; + torquesi = models[itype][jtype]->torquesi; + torquesj = models[itype][jtype]->torquesj; - // apply forces & torques - scale3(factor_lj, forces); - add3(f[i], forces, f[i]); + // apply forces & torques + scale3(factor_lj, forces); + add3(f[i], forces, f[i]); - scale3(factor_lj, torquesi); - add3(torque[i], torquesi, torque[i]); - if (heat_flag) heatflux[i] += dq; + scale3(factor_lj, torquesi); + add3(torque[i], torquesi, torque[i]); + if (heat_flag) heatflux[i] += dq; - if (force->newton_pair || j < nlocal) { - sub3(f[j], forces, f[j]); - scale3(factor_lj, torquesj); - add3(torque[j], torquesj, torque[j]); - if (heat_flag) heatflux[j] -= dq; - } + if (force->newton_pair || j < nlocal) { + sub3(f[j], forces, f[j]); + scale3(factor_lj, torquesj); + add3(torque[j], torquesj, torque[j]); + if (heat_flag) heatflux[j] -= dq; + } - if (evflag) { - delx = x[i][0] - x[j][0]; - dely = x[i][1] - x[j][1]; - delz = x[i][2] - x[j][2]; - ev_tally_xyz(i,j,nlocal,force->newton_pair, - 0.0,0.0,forces[0],forces[1],forces[2],delx,dely,delz); - } + if (evflag) { + delx = x[i][0] - x[j][0]; + dely = x[i][1] - x[j][1]; + delz = x[i][2] - x[j][2]; + ev_tally_xyz(i,j,nlocal,force->newton_pair, + 0.0,0.0,forces[0],forces[1],forces[2],delx,dely,delz); } } } @@ -293,6 +295,9 @@ void PairGranular::allocate() allocated = 1; int n = atom->ntypes; + // Reserve enough memory for vector to avoid reallocation/changing pointers + vec_models.reserve(atom->ntypes * atom->ntypes); + memory->create(setflag,n+1,n+1,"pair:setflag"); for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) @@ -300,7 +305,7 @@ void PairGranular::allocate() memory->create(cutsq,n+1,n+1,"pair:cutsq"); memory->create(cutoff_type,n+1,n+1,"pair:cutoff_type"); - memory->create(models,n+1,n+1,"pair:contact_models"); + models.resize(n+1, std::vector (n+1, nullptr)); onerad_dynamic = new double[n+1]; onerad_frozen = new double[n+1]; @@ -338,64 +343,68 @@ void PairGranular::coeff(int narg, char **arg) utils::bounds(FLERR,arg[0],1,atom->ntypes,ilo,ihi,error); utils::bounds(FLERR,arg[1],1,atom->ntypes,jlo,jhi,error); - // Create new model stored in vector - vec_models.push_back(ContactModel()); + // Construct new model within vector + vec_models.emplace_back(lmp); //Parse mandatory normal and tangential specifications int iarg = 2; - vec_models.back().init_model(std::string(arg[iarg]), NORMAL); - iarg += 1; + vec_models.back().init_model(std::string(arg[iarg++]), NORMAL); iarg = vec_models.back().normal_model->parse_coeffs(arg, iarg, narg); - if (strcmp(arg[iarg], "tangential") == 0) { - if (iarg + 1 >= narg) + if (strcmp(arg[iarg++], "tangential") == 0) { + if (iarg >= narg) error->all(FLERR,"Illegal pair_coeff command, must specify " "tangential model after tangential keyword"); - vec_models.back().init_model(std::string(arg[iarg]), TANGENTIAL); - iarg += 1; + vec_models.back().init_model(std::string(arg[iarg++]), TANGENTIAL); iarg = vec_models.back().tangential_model->parse_coeffs(arg, iarg, narg); } else{ error->all(FLERR, "Illegal pair_coeff command, 'tangential' keyword expected"); } //Parse optional arguments + while (iarg < narg) { if (strcmp(arg[iarg], "damping") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - vec_models.back().init_model(std::string(arg[iarg]), DAMPING); - iarg += 1; + iarg++; + if (iarg >= narg) + error->all(FLERR, "Illegal pair_coeff command, must specify " + "damping model after damping keyword"); + vec_models.back().init_model(std::string(arg[iarg++]), DAMPING); iarg = vec_models.back().damping_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "rolling") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - vec_models.back().init_model(std::string(arg[iarg]), ROLLING); - iarg += 1; + iarg++; + if (iarg >= narg) + error->all(FLERR, "Illegal pair_coeff command, must specify " + "rolling model after rolling keyword"); + vec_models.back().init_model(std::string(arg[iarg++]), ROLLING); iarg = vec_models.back().rolling_model->parse_coeffs(arg, iarg, narg); + } else if (strcmp(arg[iarg], "twisting") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - vec_models.back().init_model(std::string(arg[iarg]), TWISTING); - iarg += 1; + iarg++; + if (iarg >= narg) + error->all(FLERR, "Illegal pair_coeff command, must specify " + "twisting model after twisting keyword"); + vec_models.back().init_model(std::string(arg[iarg++]), TWISTING); iarg = vec_models.back().twisting_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "heat") == 0) { - if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - vec_models.back().init_model(std::string(arg[iarg]), HEAT); - iarg += 1; + iarg++; + if (iarg >= narg) + error->all(FLERR, "Illegal pair_coeff command, must specify " + "heat model after heat keyword"); + vec_models.back().init_model(std::string(arg[iarg++]), HEAT); iarg = vec_models.back().heat_model->parse_coeffs(arg, iarg, narg); heat_flag = 1; } else if (strcmp(arg[iarg], "cutoff") == 0) { if (iarg + 1 >= narg) - error->all(FLERR, "Illegal pair_coeff command, not enough parameters"); - vec_models.back().cutoff_type = utils::numeric(FLERR,arg[iarg+1],false,lmp); + error->all(FLERR, "Illegal pair_coeff command, not enough parameters for cutoff keyword"); + cutoff_one = utils::numeric(FLERR,arg[iarg+1],false,lmp); iarg += 2; } else if (strcmp(arg[iarg], "limit_damping") == 0) { vec_models.back().limit_damping = 1; iarg += 1; - } else error->all(FLERR, "Illegal pair_coeff command"); + } else error->all(FLERR, "Illegal pair_coeff command {}", arg[iarg]); } // Define default damping model if unspecified, has no coeffs @@ -410,6 +419,7 @@ void PairGranular::coeff(int narg, char **arg) for (int i = ilo; i <= ihi; i++) { for (int j = MAX(jlo,i); j <= jhi; j++) { models[i][j] = & vec_models.back(); + cutoff_type[i][j] = cutoff_type[j][i] = cutoff_one; setflag[i][j] = 1; count++; } @@ -434,48 +444,30 @@ void PairGranular::init_style() error->all(FLERR,"Pair granular requires ghost atoms store velocity"); // allocate history and initialize models + int size_max[6] = {0,0,0,0,0,0}; - int size_normal_history = 0; - int size_damping_history = 0; - int size_tangential_history = 0; - int size_rolling_history = 0; - int size_twisting_history = 0; - for (int i = 1; i <= atom->ntypes; i++) { - for (int j = i; j <= atom->ntypes; j++) { - if (models[i][j]->size_history != 0) use_history = 1; + for (auto &model : vec_models) { + model.init(); + if (model.size_history != 0) use_history = 1; - if (models[i][j]->normal_model->size_history > size_normal_history) - size_normal_history = models[i][j]->damping_model->size_history; - if (models[i][j]->damping_model->size_history > size_damping_history) - size_damping_history = models[i][j]->normal_model->size_history; - if (models[i][j]->tangential_model->size_history > size_tangential_history) - size_tangential_history = models[i][j]->tangential_model->size_history; - if (models[i][j]->rolling_model) - if (models[i][j]->rolling_model->size_history > size_rolling_history) - size_rolling_history = models[i][j]->rolling_model->size_history; - if (models[i][j]->twisting_model) - if (models[i][j]->twisting_model->size_history > size_twisting_history) - size_twisting_history = models[i][j]->twisting_model->size_history; - } + for (i = 0; i < 6; i++) + if (model.sub_models[i]) + if (model.sub_models[i]->size_history > size_max[i]) + size_max[i] = model.sub_models[i]->size_history; + + if (model.nondefault_history_transfer) nondefault_history_transfer = 1; } - size_history = size_normal_history + size_damping_history + - size_tangential_history + size_rolling_history + size_twisting_history; + size_history = 0; + for (i = 0; i < 6; i++) size_history += size_max[i]; - damping_history_index = size_normal_history; - tangential_history_index = damping_history_index + size_damping_history; - roll_history_index = tangential_history_index + size_tangential_history; - twist_history_index = roll_history_index + size_rolling_history; - - for (int i = 1; i <= atom->ntypes; i++) { - for (int j = i; j <= atom->ntypes; j++) { - models[i][j]->normal_model->history_index = 0; - models[i][j]->damping_model->history_index = damping_history_index; - models[i][j]->tangential_model->history_index = tangential_history_index; - if (models[i][j]->rolling_model) - models[i][j]->rolling_model->history_index = roll_history_index; - if (models[i][j]->twisting_model) - models[i][j]->twisting_model->history_index = twist_history_index; + for (auto &model : vec_models) { + int next_index = 0; + for (i = 0; i < 6; i++) { + if (model.sub_models[i]) { + model.sub_models[i]->history_index = next_index; + next_index += size_max[i]; + } } } @@ -490,9 +482,7 @@ void PairGranular::init_style() if (use_history && fix_history == nullptr) { fix_history = dynamic_cast( modify->replace_fix("NEIGH_HISTORY_GRANULAR_DUMMY", - "NEIGH_HISTORY_GRANULAR" - " all NEIGH_HISTORY " - + std::to_string(size_history),1)); + "NEIGH_HISTORY_GRANULAR all NEIGH_HISTORY " + std::to_string(size_history),1)); fix_history->pair = this; } @@ -583,7 +573,7 @@ double PairGranular::init_one(int i, int j) "pair_coeff command",i,j); } - vec_models.push_back(ContactModel()); + vec_models.push_back(ContactModel(lmp)); models[i][j] = models[j][i] = & vec_models.back(); vec_models.back().init_model(models[i][i]->normal_model->name, NORMAL); vec_models.back().init_model(models[i][i]->tangential_model->name, TANGENTIAL); @@ -593,6 +583,10 @@ double PairGranular::init_one(int i, int j) vec_models.back().init_model(models[i][i]->heat_model->name, HEAT); vec_models.back().mix_coeffs(models[i][i], models[j][j]); + vec_models.back().init(); // Calculates cumulative properties of sub models + + for (int k = 0; k < 6; k++) + vec_models.back().sub_models[k]->history_index = models[i][i]->sub_models[k]->history_index; } // Check if heat model is defined for all type combinations @@ -608,7 +602,7 @@ double PairGranular::init_one(int i, int j) // we assign cutoff = max(cut[i][j]) for i,j such that cut[i][j] > 0.0. double pulloff; - if (models[i][j]->cutoff_type < 0 && cutoff_global < 0) { + if (cutoff_type[i][j] < 0 && cutoff_global < 0) { if (((maxrad_dynamic[i] > 0.0) && (maxrad_dynamic[j] > 0.0)) || ((maxrad_dynamic[i] > 0.0) && (maxrad_frozen[j] > 0.0)) || // radius info about both i and j exist @@ -626,7 +620,6 @@ double PairGranular::init_one(int i, int j) cutoff = MAX(cutoff,maxrad_dynamic[i] + maxrad_frozen[j] + pulloff); } } else { - // radius info about either i or j does not exist // (i.e. not present and not about to get poured; // set to largest value to not interfere with neighbor list) @@ -638,25 +631,15 @@ double PairGranular::init_one(int i, int j) } cutoff = cutmax; } - } else if (models[i][j]->cutoff_type > 0) { - cutoff = models[i][j]->cutoff_type; + } else if (cutoff_type[i][j] > 0) { + cutoff = cutoff_type[i][j]; } else if (cutoff_global > 0) { cutoff = cutoff_global; } // Copy global options - models[i][j]->dt = models[j][i]->dt = dt; - models[i][j]->normal_model->history_index = models[j][i]->normal_model->history_index = normal_history_index; - models[i][j]->tangential_model->history_index = models[j][i]->tangential_model->history_index = tangential_history_index; - models[i][j]->rolling_model->history_index = models[j][i]->rolling_model->history_index = roll_history_index; - models[i][j]->twisting_model->history_index = models[j][i]->twisting_model->history_index = twist_history_index; - - models[i][j]->size_history = models[j][i]->size_history = size_history; - models[i][j]->init(); // Calculates cumulative properties of sub models - models[j][i]->init(); - - if (models[i][j]->nondefault_history_transfer) nondefault_history_transfer = 1; - + models[i][j]->dt = dt; + models[j][i] = models[i][j]; return cutoff; } @@ -671,9 +654,8 @@ void PairGranular::write_restart(FILE *fp) for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { - if (comm->me == 0){ - models[i][j]->write_restart(fp); - } + fwrite(&cutoff_type[i][j],sizeof(double),1,fp); + models[i][j]->write_restart(fp); } } } @@ -693,9 +675,14 @@ void PairGranular::read_restart(FILE *fp) if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,nullptr,error); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { - vec_models.push_back(ContactModel()); + if (me == 0) + utils::sfread(FLERR,&cutoff_type[i][j],sizeof(double),1,fp,nullptr,error); + MPI_Bcast(&cutoff_type[i][j],1,MPI_DOUBLE,0,world); + + vec_models.push_back(ContactModel(lmp)); models[i][j] = & vec_models.back(); models[i][j]->read_restart(fp); + models[i][j]->init(); } } } diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index 68b83d3686..ae85748488 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -73,14 +73,7 @@ class PairGranular : public Pair { // contact models std::vector vec_models; - Contact::ContactModel ***models; - - // indices of history entries - int normal_history_index; - int damping_history_index; - int tangential_history_index; - int roll_history_index; - int twist_history_index; + std::vector > models; // optional user-specified global cutoff, per-type user-specified cutoffs double **cutoff_type; diff --git a/src/contact.h b/src/contact.h index bd04fe9ce1..4c38657ed7 100644 --- a/src/contact.h +++ b/src/contact.h @@ -26,6 +26,12 @@ enum ModelType { ROLLING = 3, TWISTING = 4, HEAT = 5 +}; // Relative order matters since some derive coeffs from others + +enum WallType { + NONE = 0, + RWALL = 1, + RDUPLICATE = 2 }; #define EPSILON 1e-10 @@ -41,10 +47,10 @@ class SubModel; class ContactModel : protected Pointers { public: - ContactModel(); + ContactModel(class LAMMPS *); ~ContactModel(); void init(); - bool check_contact(); + bool check_contact(double = 0); void reset_contact(); void prep_contact(); void calculate_forces(); @@ -68,8 +74,8 @@ class ContactModel : protected Pointers { SubModel *sub_models[6]; // Need to resize if we add more model flavors // Extra options - int beyond_contact, limit_damping, history_update, wall_flag; - double cutoff_type; + int beyond_contact, limit_damping, history_update; + WallType wall_type; // History variables int size_history, nondefault_history_transfer; @@ -77,7 +83,7 @@ class ContactModel : protected Pointers { double *history; // Contact properties/output - double *forces, *torquesi, *torquesj; + double forces[3], torquesi[3], torquesj[3]; double radi, radj, rwall, meff, dt, Ti, Tj, area; double Fntot, magtortwist; From 1cd18d2b371b98d814523f1620eeb545235783e8 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 24 Aug 2022 14:47:10 -0600 Subject: [PATCH 018/445] Replacing # of models with macro, may revise... --- src/GRANULAR/contact.cpp | 2 +- src/GRANULAR/contact.h | 9 +++++---- src/GRANULAR/contact_normal_models.cpp | 16 ++++------------ src/GRANULAR/fix_wall_gran.cpp | 2 +- src/GRANULAR/pair_granular.cpp | 10 +++++----- src/contact.h | 9 +++++---- 6 files changed, 21 insertions(+), 27 deletions(-) diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index a59eca9374..c181d64f45 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -41,7 +41,7 @@ ContactModel::ContactModel(LAMMPS *lmp) : Pointers(lmp) limit_damping = 0; beyond_contact = 0; nondefault_history_transfer = 0; - nmodels = 6; + nmodels = NMODELS; wall_type = NONE; diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index 4c38657ed7..5fbb8a8489 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -19,6 +19,9 @@ namespace LAMMPS_NS { namespace Contact { +#define EPSILON 1e-10 +#define NMODELS 6 + enum ModelType { NORMAL = 0, DAMPING = 1, @@ -34,8 +37,6 @@ enum WallType { RDUPLICATE = 2 }; -#define EPSILON 1e-10 - // forward declaration class NormalModel; class DampingModel; @@ -71,7 +72,7 @@ class ContactModel : protected Pointers { RollingModel *rolling_model; TwistingModel *twisting_model; HeatModel *heat_model; - SubModel *sub_models[6]; // Need to resize if we add more model flavors + SubModel *sub_models[NMODELS]; // Need to resize if we add more model flavors // Extra options int beyond_contact, limit_damping, history_update; @@ -95,11 +96,11 @@ class ContactModel : protected Pointers { double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; double magtwist; bool touch; + int nmodels; protected: int prep_flag, check_flag; - int nmodels; }; } // namespace Contact diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index 6c31cf2c70..d0dc19b14f 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -180,7 +180,7 @@ void NormalHertzMaterial::coeffs_to_local() void NormalHertzMaterial::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) { - coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0],imodel->coeffs[2], jmodel->coeffs[2]); coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); coeffs_to_local(); @@ -205,11 +205,7 @@ void NormalDMT::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; cohesion = coeffs[3]; -<<<<<<< HEAD - k = FOURTHIRDS * Emod; -======= - k = 4 / 3 * mix_stiffnessE(Emod, Emod, poiss, poiss); ->>>>>>> 12c1923511e802b3b531e34b24fcf386f187dab5 + k = FOURTHIRDS * mix_stiffnessE(Emod, Emod, poiss, poiss); if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal DMT normal model"); } @@ -218,7 +214,7 @@ void NormalDMT::coeffs_to_local() void NormalDMT::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) { - coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0],imodel->coeffs[2], jmodel->coeffs[2]); coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); coeffs[3] = mix_geom(imodel->coeffs[3], jmodel->coeffs[3]); @@ -269,12 +265,8 @@ void NormalJKR::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; cohesion = coeffs[3]; -<<<<<<< HEAD k = FOURTHIRDS * Emod; - Escaled = k * THREEQUARTERS; -======= Escaled = mix_stiffnessE(Emod, Emod, poiss, poiss); //Dan, not sure why these coefficients are mixed in the regular pair style ->>>>>>> 12c1923511e802b3b531e34b24fcf386f187dab5 if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal JKR normal model"); } @@ -283,7 +275,7 @@ void NormalJKR::coeffs_to_local() void NormalJKR::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) { - coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0],imodel->coeffs[2], jmodel->coeffs[2]); coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); coeffs[3] = mix_geom(imodel->coeffs[3], jmodel->coeffs[3]); diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 208ff10bdd..c1640c6fdf 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -361,7 +361,7 @@ void FixWallGran::init() int next_index = 0; if (model->beyond_contact) next_index = 1; - for (i = 0; i < 6; i++) { + for (i = 0; i < NMODELS; i++) { if (model->sub_models[i]) { model->sub_models[i]->history_index = next_index; next_index += model->sub_models[i]->size_history; diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 0c228a2936..b3c587af8b 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -444,13 +444,13 @@ void PairGranular::init_style() error->all(FLERR,"Pair granular requires ghost atoms store velocity"); // allocate history and initialize models - int size_max[6] = {0,0,0,0,0,0}; + int size_max[NMODELS] = {0}; for (auto &model : vec_models) { model.init(); if (model.size_history != 0) use_history = 1; - for (i = 0; i < 6; i++) + for (i = 0; i < NMODELS; i++) if (model.sub_models[i]) if (model.sub_models[i]->size_history > size_max[i]) size_max[i] = model.sub_models[i]->size_history; @@ -459,11 +459,11 @@ void PairGranular::init_style() } size_history = 0; - for (i = 0; i < 6; i++) size_history += size_max[i]; + for (i = 0; i < NMODELS; i++) size_history += size_max[i]; for (auto &model : vec_models) { int next_index = 0; - for (i = 0; i < 6; i++) { + for (i = 0; i < NMODELS; i++) { if (model.sub_models[i]) { model.sub_models[i]->history_index = next_index; next_index += size_max[i]; @@ -585,7 +585,7 @@ double PairGranular::init_one(int i, int j) vec_models.back().mix_coeffs(models[i][i], models[j][j]); vec_models.back().init(); // Calculates cumulative properties of sub models - for (int k = 0; k < 6; k++) + for (int k = 0; k < NMODELS; k++) vec_models.back().sub_models[k]->history_index = models[i][i]->sub_models[k]->history_index; } diff --git a/src/contact.h b/src/contact.h index 4c38657ed7..5fbb8a8489 100644 --- a/src/contact.h +++ b/src/contact.h @@ -19,6 +19,9 @@ namespace LAMMPS_NS { namespace Contact { +#define EPSILON 1e-10 +#define NMODELS 6 + enum ModelType { NORMAL = 0, DAMPING = 1, @@ -34,8 +37,6 @@ enum WallType { RDUPLICATE = 2 }; -#define EPSILON 1e-10 - // forward declaration class NormalModel; class DampingModel; @@ -71,7 +72,7 @@ class ContactModel : protected Pointers { RollingModel *rolling_model; TwistingModel *twisting_model; HeatModel *heat_model; - SubModel *sub_models[6]; // Need to resize if we add more model flavors + SubModel *sub_models[NMODELS]; // Need to resize if we add more model flavors // Extra options int beyond_contact, limit_damping, history_update; @@ -95,11 +96,11 @@ class ContactModel : protected Pointers { double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; double magtwist; bool touch; + int nmodels; protected: int prep_flag, check_flag; - int nmodels; }; } // namespace Contact From 3df0abd081e61d801eaa1997076d6b253c0a2c20 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 9 Sep 2022 14:13:52 -0600 Subject: [PATCH 019/445] Debugging restarts --- src/GRANULAR/contact.cpp | 16 ++++++++-------- src/GRANULAR/pair_granular.cpp | 32 +++++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index c181d64f45..a5a6042347 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -225,17 +225,18 @@ void ContactModel::init() // Check if model has nondefault transfers, if so copy its array if (j != nmodels) { - if (sub_models[j]->nondefault_history_transfer) { - transfer_history_factor[i] = sub_models[j]->transfer_history_factor[i - size_cumulative]; - } else { - transfer_history_factor[i] = -1; + transfer_history_factor[i] = -1; + if (sub_models[j]) { + if (sub_models[j]->nondefault_history_transfer) { + transfer_history_factor[i] = sub_models[j]->transfer_history_factor[i - size_cumulative]; + } } } } } for (i = 0; i < nmodels; i++) - if (sub_models[i]) sub_models[i]->init(); + if (sub_models[i]) sub_models[i]->init(); } /* ---------------------------------------------------------------------- */ @@ -263,7 +264,7 @@ void ContactModel::write_restart(FILE *fp) fwrite(&num_char, sizeof(int), 1, fp); fwrite(sub_models[i]->name.data(), sizeof(char), num_char, fp); fwrite(&num_coeffs, sizeof(int), 1, fp); - fwrite(sub_models[i]->coeffs, sizeof(int), num_coeffs, fp); + fwrite(sub_models[i]->coeffs, sizeof(double), num_coeffs, fp); } else { fwrite(&num_char, sizeof(int), 1, fp); } @@ -297,10 +298,9 @@ void ContactModel::read_restart(FILE *fp) MPI_Bcast(&num_coeff, 1, MPI_INT, 0, world); if (comm->me == 0) { - utils::sfread(FLERR, sub_models[i]->coeffs, sizeof(int), num_coeff, fp, nullptr, error); + utils::sfread(FLERR, sub_models[i]->coeffs, sizeof(double), num_coeff, fp, nullptr, error); } MPI_Bcast(sub_models[i]->coeffs, num_coeff, MPI_DOUBLE, 0, world); - sub_models[i]->coeffs_to_local(); } } diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index b3c587af8b..44b81bbc87 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -435,7 +435,6 @@ void PairGranular::coeff(int narg, char **arg) void PairGranular::init_style() { int i; - // error and warning checks if (!atom->radius_flag || !atom->rmass_flag) @@ -649,13 +648,18 @@ double PairGranular::init_one(int i, int j) void PairGranular::write_restart(FILE *fp) { - int i,j; + int i,j,index; + int nmodels = vec_models.size(); + fwrite(&nmodels,sizeof(int),1,fp); + for (auto &model : vec_models) model.write_restart(fp); + for (i = 1; i <= atom->ntypes; i++) { for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { fwrite(&cutoff_type[i][j],sizeof(double),1,fp); - models[i][j]->write_restart(fp); + index = models[i][j] - &vec_models[0]; + fwrite(&index,sizeof(int),1,fp); // save index of model } } } @@ -668,21 +672,31 @@ void PairGranular::write_restart(FILE *fp) void PairGranular::read_restart(FILE *fp) { allocate(); - int i,j; + int i,j,index,nmodels; int me = comm->me; + + if (me == 0) utils::sfread(FLERR,&nmodels,sizeof(int),1,fp,nullptr,error); + MPI_Bcast(&nmodels,1,MPI_INT,0,world); + + for (i = 0; i < nmodels; i++) { + vec_models.push_back(ContactModel(lmp)); + vec_models.back().read_restart(fp); + vec_models.back().init(); + } + for (i = 1; i <= atom->ntypes; i++) { for (j = i; j <= atom->ntypes; j++) { if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,nullptr,error); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { - if (me == 0) + if (me == 0) { utils::sfread(FLERR,&cutoff_type[i][j],sizeof(double),1,fp,nullptr,error); + utils::sfread(FLERR,&index,sizeof(int),1,fp,nullptr,error); + } MPI_Bcast(&cutoff_type[i][j],1,MPI_DOUBLE,0,world); + MPI_Bcast(&index,1,MPI_INT,0,world); - vec_models.push_back(ContactModel(lmp)); - models[i][j] = & vec_models.back(); - models[i][j]->read_restart(fp); - models[i][j]->init(); + models[i][j] = & vec_models[index]; } } } From 6a6291827f32dc89f75870f978a661e2843c7b46 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 9 Sep 2022 15:11:24 -0600 Subject: [PATCH 020/445] Simplifying mixing coeffs, other misc clean ups --- src/GRANULAR/contact.cpp | 19 +++++----- src/GRANULAR/contact.h | 5 ++- src/GRANULAR/contact_damping_models.h | 4 +-- src/GRANULAR/contact_heat_models.cpp | 4 +-- src/GRANULAR/contact_heat_models.h | 7 ++-- src/GRANULAR/contact_normal_models.cpp | 40 +++++++++++----------- src/GRANULAR/contact_normal_models.h | 33 +++++++++--------- src/GRANULAR/contact_rolling_models.cpp | 8 ++--- src/GRANULAR/contact_rolling_models.h | 7 ++-- src/GRANULAR/contact_sub_models.h | 7 ++-- src/GRANULAR/contact_tangential_models.cpp | 24 ++++++------- src/GRANULAR/contact_tangential_models.h | 16 ++++----- src/GRANULAR/contact_twisting_models.cpp | 8 ++--- src/GRANULAR/contact_twisting_models.h | 7 ++-- src/GRANULAR/fix_wall_gran.cpp | 2 +- src/GRANULAR/pair_granular.cpp | 10 +++--- src/contact.h | 5 ++- 17 files changed, 104 insertions(+), 102 deletions(-) diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index a5a6042347..488e175227 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -41,7 +41,6 @@ ContactModel::ContactModel(LAMMPS *lmp) : Pointers(lmp) limit_damping = 0; beyond_contact = 0; nondefault_history_transfer = 0; - nmodels = NMODELS; wall_type = NONE; @@ -54,7 +53,7 @@ ContactModel::ContactModel(LAMMPS *lmp) : Pointers(lmp) twisting_model = nullptr; heat_model = nullptr; - for (int i = 0; i < nmodels; i++) sub_models[i] = nullptr; + for (int i = 0; i < NSUBMODELS; i++) sub_models[i] = nullptr; transfer_history_factor = nullptr; } @@ -200,7 +199,7 @@ void ContactModel::init() int i, j, size_cumulative; size_history = 0; - for (i = 0; i < nmodels; i++) { + for (i = 0; i < NSUBMODELS; i++) { if (sub_models[i]) { if (sub_models[i]->nondefault_history_transfer) nondefault_history_transfer = 1; @@ -216,7 +215,7 @@ void ContactModel::init() for (i = 0; i < size_history; i++) { // Find which model controls this history value size_cumulative = 0; - for (j = 0; j < nmodels; j++) { + for (j = 0; j < NSUBMODELS; j++) { if (sub_models[j]) { if (size_cumulative + sub_models[j]->size_history > i) break; size_cumulative += sub_models[j]->size_history; @@ -224,7 +223,7 @@ void ContactModel::init() } // Check if model has nondefault transfers, if so copy its array - if (j != nmodels) { + if (j != NSUBMODELS) { transfer_history_factor[i] = -1; if (sub_models[j]) { if (sub_models[j]->nondefault_history_transfer) { @@ -235,7 +234,7 @@ void ContactModel::init() } } - for (i = 0; i < nmodels; i++) + for (i = 0; i < NSUBMODELS; i++) if (sub_models[i]) sub_models[i]->init(); } @@ -243,9 +242,9 @@ void ContactModel::init() void ContactModel::mix_coeffs(ContactModel *c1, ContactModel *c2) { - for (int i = 0; i < nmodels; i++) + for (int i = 0; i < NSUBMODELS; i++) if (sub_models[i]) - sub_models[i]->mix_coeffs(c1->sub_models[i], c2->sub_models[i]); + sub_models[i]->mix_coeffs(c1->sub_models[i]->coeffs, c2->sub_models[i]->coeffs); limit_damping = MAX(c1->limit_damping, c2->limit_damping); } @@ -256,7 +255,7 @@ void ContactModel::write_restart(FILE *fp) { int num_char, num_coeffs; - for (int i = 0; i < nmodels; i++) { + for (int i = 0; i < NSUBMODELS; i++) { num_char = -1; if (sub_models[i]) { num_char = sub_models[i]->name.length(); @@ -277,7 +276,7 @@ void ContactModel::read_restart(FILE *fp) { int num_char, num_coeff; - for (int i = 0; i < nmodels; i++) { + for (int i = 0; i < NSUBMODELS; i++) { if (comm->me == 0) utils::sfread(FLERR, &num_char, sizeof(int), 1, fp, nullptr, error); MPI_Bcast(&num_char, 1, MPI_INT, 0, world); diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index 5fbb8a8489..535ec4461e 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -20,7 +20,7 @@ namespace LAMMPS_NS { namespace Contact { #define EPSILON 1e-10 -#define NMODELS 6 +#define NSUBMODELS 6 enum ModelType { NORMAL = 0, @@ -72,7 +72,7 @@ class ContactModel : protected Pointers { RollingModel *rolling_model; TwistingModel *twisting_model; HeatModel *heat_model; - SubModel *sub_models[NMODELS]; // Need to resize if we add more model flavors + SubModel *sub_models[NSUBMODELS]; // Need to resize if we add more model flavors // Extra options int beyond_contact, limit_damping, history_update; @@ -96,7 +96,6 @@ class ContactModel : protected Pointers { double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; double magtwist; bool touch; - int nmodels; protected: diff --git a/src/GRANULAR/contact_damping_models.h b/src/GRANULAR/contact_damping_models.h index 70294edc6a..b1e1b795e0 100644 --- a/src/GRANULAR/contact_damping_models.h +++ b/src/GRANULAR/contact_damping_models.h @@ -25,7 +25,7 @@ class DampingModel : public SubModel { DampingModel(class LAMMPS *); ~DampingModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(DampingModel*, DampingModel*) {}; + virtual void mix_coeffs(double*, double*) {}; virtual void init(); virtual double calculate_forces() = 0; double damp; @@ -60,7 +60,7 @@ class DampingViscoelastic : public DampingModel { class DampingTsuji : public DampingModel { public: DampingTsuji(class LAMMPS *); - void init(); + void init() override; double calculate_forces(); }; diff --git a/src/GRANULAR/contact_heat_models.cpp b/src/GRANULAR/contact_heat_models.cpp index d25955b1c2..60f2ef1cbe 100644 --- a/src/GRANULAR/contact_heat_models.cpp +++ b/src/GRANULAR/contact_heat_models.cpp @@ -44,9 +44,9 @@ void HeatArea::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void HeatArea::mix_coeffs(HeatModel* imodel, HeatModel* jmodel) +void HeatArea::mix_coeffs(double* icoeffs, double* jcoeffs) { - coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); + coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); coeffs_to_local(); } diff --git a/src/GRANULAR/contact_heat_models.h b/src/GRANULAR/contact_heat_models.h index b3104e9f3a..33b7eb2e90 100644 --- a/src/GRANULAR/contact_heat_models.h +++ b/src/GRANULAR/contact_heat_models.h @@ -24,7 +24,8 @@ class HeatModel : public SubModel { HeatModel(class LAMMPS *); ~HeatModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(HeatModel*, HeatModel*) {}; + virtual void mix_coeffs(double*, double*) {}; + virtual void init() {}; virtual double calculate_heat() = 0; }; @@ -33,8 +34,8 @@ class HeatModel : public SubModel { class HeatArea : public HeatModel { public: HeatArea(class LAMMPS *); - void coeffs_to_local(); - void mix_coeffs(HeatModel*, HeatModel*); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; double calculate_heat(); protected: double conductivity; diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index d0dc19b14f..fb3523069c 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -89,10 +89,10 @@ void NormalHooke::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void NormalHooke::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +void NormalHooke::mix_coeffs(double* icoeffs, double* jcoeffs) { - coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); - coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); coeffs_to_local(); } @@ -132,10 +132,10 @@ void NormalHertz::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void NormalHertz::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +void NormalHertz::mix_coeffs(double* icoeffs, double* jcoeffs) { - coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); - coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); coeffs_to_local(); } @@ -178,11 +178,11 @@ void NormalHertzMaterial::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void NormalHertzMaterial::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +void NormalHertzMaterial::mix_coeffs(double* icoeffs, double* jcoeffs) { - coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0],imodel->coeffs[2], jmodel->coeffs[2]); - coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); - coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); coeffs_to_local(); } @@ -212,12 +212,12 @@ void NormalDMT::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void NormalDMT::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +void NormalDMT::mix_coeffs(double* icoeffs, double* jcoeffs) { - coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0],imodel->coeffs[2], jmodel->coeffs[2]); - coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); - coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); - coeffs[3] = mix_geom(imodel->coeffs[3], jmodel->coeffs[3]); + coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); + coeffs[3] = mix_geom(icoeffs[3], jcoeffs[3]); coeffs_to_local(); } @@ -273,12 +273,12 @@ void NormalJKR::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void NormalJKR::mix_coeffs(NormalModel* imodel, NormalModel* jmodel) +void NormalJKR::mix_coeffs(double* icoeffs, double* jcoeffs) { - coeffs[0] = mix_stiffnessE(imodel->coeffs[0], jmodel->coeffs[0],imodel->coeffs[2], jmodel->coeffs[2]); - coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); - coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); - coeffs[3] = mix_geom(imodel->coeffs[3], jmodel->coeffs[3]); + coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); + coeffs[3] = mix_geom(icoeffs[3], jcoeffs[3]); coeffs_to_local(); } diff --git a/src/GRANULAR/contact_normal_models.h b/src/GRANULAR/contact_normal_models.h index ec604d04ba..f683e53308 100644 --- a/src/GRANULAR/contact_normal_models.h +++ b/src/GRANULAR/contact_normal_models.h @@ -24,7 +24,8 @@ class NormalModel : public SubModel { NormalModel(class LAMMPS *); ~NormalModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(NormalModel*, NormalModel*) {}; + virtual void mix_coeffs(double*, double*) {}; + virtual void init() {}; virtual bool touch(); virtual double pulloff_distance(double, double); virtual double calculate_area(); @@ -43,8 +44,8 @@ class NormalHooke : public NormalModel { public: NormalHooke(class LAMMPS *); ~NormalHooke() {}; - void coeffs_to_local(); - void mix_coeffs(NormalModel*, NormalModel*); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; double calculate_forces(); void set_knfac(); protected: @@ -57,8 +58,8 @@ class NormalHertz : public NormalModel { public: NormalHertz(class LAMMPS *); ~NormalHertz() {}; - void coeffs_to_local(); - void mix_coeffs(NormalModel*, NormalModel*); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; double calculate_forces(); void set_knfac(); protected: @@ -71,8 +72,8 @@ class NormalHertzMaterial : public NormalHertz { public: NormalHertzMaterial(class LAMMPS *); ~NormalHertzMaterial() {}; - void coeffs_to_local(); - void mix_coeffs(NormalModel*, NormalModel*); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; }; /* ---------------------------------------------------------------------- */ @@ -81,11 +82,11 @@ class NormalDMT : public NormalModel { public: NormalDMT(class LAMMPS *); ~NormalDMT() {}; - void coeffs_to_local(); - void mix_coeffs(NormalModel*, NormalModel*); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; double calculate_forces(); void set_knfac(); - void set_fncrit(); + void set_fncrit() override; protected: double k, cohesion; double F_pulloff; @@ -97,14 +98,14 @@ class NormalJKR : public NormalModel { public: NormalJKR(class LAMMPS *); ~NormalJKR() {}; - void coeffs_to_local(); - void mix_coeffs(NormalModel*, NormalModel*); - bool touch(); - double pulloff_distance(double, double); - double calculate_area(); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; + bool touch() override; + double pulloff_distance(double, double) override; + double calculate_area() override; double calculate_forces(); void set_knfac(); - void set_fncrit(); + void set_fncrit() override; protected: double k, cohesion; double Escaled, F_pulloff; diff --git a/src/GRANULAR/contact_rolling_models.cpp b/src/GRANULAR/contact_rolling_models.cpp index cc8e3e471e..8f90b4bc04 100644 --- a/src/GRANULAR/contact_rolling_models.cpp +++ b/src/GRANULAR/contact_rolling_models.cpp @@ -53,11 +53,11 @@ void RollingSDS::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void RollingSDS::mix_coeffs(RollingModel* imodel, RollingModel* jmodel) +void RollingSDS::mix_coeffs(double* icoeffs, double* jcoeffs) { - coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); - coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); - coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); coeffs_to_local(); } diff --git a/src/GRANULAR/contact_rolling_models.h b/src/GRANULAR/contact_rolling_models.h index e81d22301c..c3ab6810fa 100644 --- a/src/GRANULAR/contact_rolling_models.h +++ b/src/GRANULAR/contact_rolling_models.h @@ -24,7 +24,8 @@ class RollingModel : public SubModel { RollingModel(class LAMMPS *); ~RollingModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(RollingModel*, RollingModel*) {}; + virtual void mix_coeffs(double*, double*) {}; + virtual void init() {}; virtual double calculate_forces() = 0; }; @@ -33,8 +34,8 @@ class RollingModel : public SubModel { class RollingSDS : public RollingModel { public: RollingSDS(class LAMMPS *); - void coeffs_to_local(); - void mix_coeffs(RollingModel*, RollingModel*); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; double calculate_forces(); protected: double k, mu, gamma; diff --git a/src/GRANULAR/contact_sub_models.h b/src/GRANULAR/contact_sub_models.h index 67e9c79e35..7b28bb4c57 100644 --- a/src/GRANULAR/contact_sub_models.h +++ b/src/GRANULAR/contact_sub_models.h @@ -29,9 +29,10 @@ class SubModel : protected Pointers { double *coeffs; void read_restart(); int parse_coeffs(char **, int, int); - virtual void mix_coeffs(SubModel*, SubModel*) {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; // called after all other submodel coeffs defined + virtual void mix_coeffs(double*, double*) = 0; + virtual void coeffs_to_local() = 0; + virtual void init() = 0; // called after all other submodel coeffs defined + void allocate_coeffs(); std::string name; diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index d518926c38..a4911cd5c2 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -61,10 +61,10 @@ void TangentialLinearNoHistory::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void TangentialLinearNoHistory::mix_coeffs(TangentialModel* imodel, TangentialModel* jmodel) +void TangentialLinearNoHistory::mix_coeffs(double* icoeffs, double* jcoeffs) { - coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); - coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); + coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); coeffs_to_local(); } @@ -108,11 +108,11 @@ void TangentialLinearHistory::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void TangentialLinearHistory::mix_coeffs(TangentialModel* imodel, TangentialModel* jmodel) +void TangentialLinearHistory::mix_coeffs(double* icoeffs, double* jcoeffs) { - coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); - coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); - coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); coeffs_to_local(); } @@ -205,12 +205,12 @@ void TangentialMindlin::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void TangentialMindlin::mix_coeffs(TangentialModel* imodel, TangentialModel* jmodel) +void TangentialMindlin::mix_coeffs(double* icoeffs, double* jcoeffs) { - if (imodel->coeffs[0] == -1 || imodel->coeffs[0] == -1) coeffs[0] = -1; - else coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); - coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); - coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + if (icoeffs[0] == -1 || jcoeffs[0] == -1) coeffs[0] = -1; + else coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); coeffs_to_local(); } diff --git a/src/GRANULAR/contact_tangential_models.h b/src/GRANULAR/contact_tangential_models.h index 4e2c85f678..620f3388da 100644 --- a/src/GRANULAR/contact_tangential_models.h +++ b/src/GRANULAR/contact_tangential_models.h @@ -24,9 +24,9 @@ class TangentialModel : public SubModel { TangentialModel(class LAMMPS *); virtual ~TangentialModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(TangentialModel*, TangentialModel*) {}; + virtual void mix_coeffs(double*, double*) {}; + virtual void init(); virtual void calculate_forces() = 0; - void init(); int rescale_flag; double k, damp, mu; // Used by Marshall twisting model protected: @@ -38,8 +38,8 @@ class TangentialModel : public SubModel { class TangentialLinearNoHistory : public TangentialModel { public: TangentialLinearNoHistory(class LAMMPS *); - void coeffs_to_local(); - void mix_coeffs(TangentialModel*, TangentialModel*); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; void calculate_forces(); }; @@ -48,8 +48,8 @@ class TangentialLinearNoHistory : public TangentialModel { class TangentialLinearHistory : public TangentialModel { public: TangentialLinearHistory(class LAMMPS *); - void coeffs_to_local(); - void mix_coeffs(TangentialModel*, TangentialModel*); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; void calculate_forces(); }; @@ -58,8 +58,8 @@ class TangentialLinearHistory : public TangentialModel { class TangentialMindlin : public TangentialModel { public: TangentialMindlin(class LAMMPS *); - void coeffs_to_local(); - void mix_coeffs(TangentialModel*, TangentialModel*); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; void calculate_forces(); protected: int mindlin_rescale, mindlin_force; diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/GRANULAR/contact_twisting_models.cpp index 089b4c686e..1fddda559c 100644 --- a/src/GRANULAR/contact_twisting_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -93,11 +93,11 @@ void TwistingSDS::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void TwistingSDS::mix_coeffs(TwistingModel* imodel, TwistingModel* jmodel) +void TwistingSDS::mix_coeffs(double* icoeffs, double* jcoeffs) { - coeffs[0] = mix_geom(imodel->coeffs[0], jmodel->coeffs[0]); - coeffs[1] = mix_geom(imodel->coeffs[1], jmodel->coeffs[1]); - coeffs[2] = mix_geom(imodel->coeffs[2], jmodel->coeffs[2]); + coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); coeffs_to_local(); } diff --git a/src/GRANULAR/contact_twisting_models.h b/src/GRANULAR/contact_twisting_models.h index 5bcdc6b2a3..726eb163bf 100644 --- a/src/GRANULAR/contact_twisting_models.h +++ b/src/GRANULAR/contact_twisting_models.h @@ -24,7 +24,8 @@ class TwistingModel : public SubModel { TwistingModel(class LAMMPS *); virtual ~TwistingModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(TwistingModel*, TwistingModel*) {}; + virtual void mix_coeffs(double*, double*) {}; + virtual void init() {}; virtual double calculate_forces() = 0; }; @@ -41,8 +42,8 @@ class TwistingMarshall : public TwistingModel { class TwistingSDS : public TwistingModel { public: TwistingSDS(class LAMMPS *); - void coeffs_to_local(); - void mix_coeffs(TwistingModel*, TwistingModel*); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; double calculate_forces(); protected: double k, mu, damp; diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index c1640c6fdf..b0f87890f7 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -361,7 +361,7 @@ void FixWallGran::init() int next_index = 0; if (model->beyond_contact) next_index = 1; - for (i = 0; i < NMODELS; i++) { + for (i = 0; i < NSUBMODELS; i++) { if (model->sub_models[i]) { model->sub_models[i]->history_index = next_index; next_index += model->sub_models[i]->size_history; diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 44b81bbc87..c4d7bc1490 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -443,13 +443,13 @@ void PairGranular::init_style() error->all(FLERR,"Pair granular requires ghost atoms store velocity"); // allocate history and initialize models - int size_max[NMODELS] = {0}; + int size_max[NSUBMODELS] = {0}; for (auto &model : vec_models) { model.init(); if (model.size_history != 0) use_history = 1; - for (i = 0; i < NMODELS; i++) + for (i = 0; i < NSUBMODELS; i++) if (model.sub_models[i]) if (model.sub_models[i]->size_history > size_max[i]) size_max[i] = model.sub_models[i]->size_history; @@ -458,11 +458,11 @@ void PairGranular::init_style() } size_history = 0; - for (i = 0; i < NMODELS; i++) size_history += size_max[i]; + for (i = 0; i < NSUBMODELS; i++) size_history += size_max[i]; for (auto &model : vec_models) { int next_index = 0; - for (i = 0; i < NMODELS; i++) { + for (i = 0; i < NSUBMODELS; i++) { if (model.sub_models[i]) { model.sub_models[i]->history_index = next_index; next_index += size_max[i]; @@ -584,7 +584,7 @@ double PairGranular::init_one(int i, int j) vec_models.back().mix_coeffs(models[i][i], models[j][j]); vec_models.back().init(); // Calculates cumulative properties of sub models - for (int k = 0; k < NMODELS; k++) + for (int k = 0; k < NSUBMODELS; k++) vec_models.back().sub_models[k]->history_index = models[i][i]->sub_models[k]->history_index; } diff --git a/src/contact.h b/src/contact.h index 5fbb8a8489..535ec4461e 100644 --- a/src/contact.h +++ b/src/contact.h @@ -20,7 +20,7 @@ namespace LAMMPS_NS { namespace Contact { #define EPSILON 1e-10 -#define NMODELS 6 +#define NSUBMODELS 6 enum ModelType { NORMAL = 0, @@ -72,7 +72,7 @@ class ContactModel : protected Pointers { RollingModel *rolling_model; TwistingModel *twisting_model; HeatModel *heat_model; - SubModel *sub_models[NMODELS]; // Need to resize if we add more model flavors + SubModel *sub_models[NSUBMODELS]; // Need to resize if we add more model flavors // Extra options int beyond_contact, limit_damping, history_update; @@ -96,7 +96,6 @@ class ContactModel : protected Pointers { double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; double magtwist; bool touch; - int nmodels; protected: From 06953bd67aafed30f097f37aac7c45ad119d88cb Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 9 Sep 2022 17:12:51 -0600 Subject: [PATCH 021/445] Adding none submodels, further cleaning up mixing, misc edits --- doc/src/fix_temp_integrate.rst | 11 +- doc/src/pair_granular.rst | 28 +++- src/GRANULAR/contact.cpp | 180 +++++++++++---------- src/GRANULAR/contact.h | 7 +- src/GRANULAR/contact_damping_models.cpp | 13 ++ src/GRANULAR/contact_damping_models.h | 9 ++ src/GRANULAR/contact_heat_models.cpp | 21 ++- src/GRANULAR/contact_heat_models.h | 10 +- src/GRANULAR/contact_normal_models.cpp | 31 ++-- src/GRANULAR/contact_normal_models.h | 21 +-- src/GRANULAR/contact_rolling_models.cpp | 19 +-- src/GRANULAR/contact_rolling_models.h | 14 +- src/GRANULAR/contact_sub_models.cpp | 9 ++ src/GRANULAR/contact_sub_models.h | 2 +- src/GRANULAR/contact_tangential_models.cpp | 25 +-- src/GRANULAR/contact_tangential_models.h | 11 +- src/GRANULAR/contact_twisting_models.cpp | 26 ++- src/GRANULAR/contact_twisting_models.h | 16 +- src/GRANULAR/fix_wall_gran.cpp | 8 +- src/GRANULAR/fix_wall_gran_region.cpp | 2 +- src/GRANULAR/pair_granular.cpp | 40 ++--- src/contact.h | 7 +- 22 files changed, 275 insertions(+), 235 deletions(-) diff --git a/doc/src/fix_temp_integrate.rst b/doc/src/fix_temp_integrate.rst index c2f1257075..bd06b45c6e 100644 --- a/doc/src/fix_temp_integrate.rst +++ b/doc/src/fix_temp_integrate.rst @@ -52,11 +52,12 @@ of the specific heat are defined, one for each of the *N* types of atoms. Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" -No information about this fix is written to :doc:`binary restart files `. None of the :doc:`fix_modify ` options -are relevant to this fix. No global or per-atom quantities are stored -by this fix for access by various :doc:`output commands `. -No parameter of this fix can be used with the *start/stop* keywords of -the :doc:`run ` command. This fix is not invoked during :doc:`energy minimization `. +No information about this fix is written to :doc:`binary restart files `. +None of the :doc:`fix_modify ` options are relevant to this fix. +No global or per-atom quantities are stored by this fix for access by various +:doc:`output commands `. No parameter of this fix can be used +with the *start/stop* keywords of the :doc:`run ` command. This fix is +not invoked during :doc:`energy minimization `. Restrictions """""""""""" diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index d630b18a3a..675c8fe4ff 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -38,7 +38,7 @@ Examples pair_coeff 2 2 dmt 1000.0 50.0 0.3 10.0 tangential mindlin NULL 0.5 0.1 rolling sds 500.0 200.0 0.1 twisting marshall pair_style granular - pair_coeff * * hertz 1000.0 50.0 tangential mindlin 1000.0 1.0 0.4 heat 0.1 + pair_coeff * * hertz 1000.0 50.0 tangential mindlin 1000.0 1.0 0.4 heat area 0.1 Description """"""""""" @@ -634,18 +634,30 @@ attractive force. This keyword cannot be used with the JKR or DMT models. ---------- -The optional *heat* keyword enables heat conduction and it must be followed by -a non-negative numeric value for the conductivity :math:`k_{s}.`` The heat :math:`Q` -conducted across an interface is given by +The optional *heat* keyword enables heat conduction . The options currently +supported are: + +1. *none* +2. *area* : :math:`k_{s}` + +If the *heat* keyword is not specified, the model defaults to *none*. + +For *heat* *area*, the heat +:math:`Q` conducted across an interface is given by .. math:: Q = k_{s} a \Delta T -where :math:`\Delta T` is the difference in the two particles' temperature and :math:`a` -is the area of the contact and depends on the normal force model. Note that the *heat* keyword -must be included in either all or none of of the *pair_coeff* calls. See -:doc:`fix temp/integrate ` for more information on this option. + + +where :math:`\Delta T` is the difference in the two particles' temperature, +:math:`k_{s}` is a non-negative numeric value for the conductivity, and +:math:`a` is the area of the contact and depends on the normal force model. + +Note that the option *none* must either be used in all or none of of the +*pair_coeff* calls. See :doc:`fix temp/integrate ` for +more information on this option. ---------- diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index 488e175227..a1a35afe47 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -76,7 +76,9 @@ ContactModel::~ContactModel() void ContactModel::init_model(std::string model_name, ModelType model_type) { if (model_type == NORMAL) { - if (model_name == "hooke") normal_model = new NormalHooke(lmp); + delete normal_model; + if (model_name == "none") normal_model = new NormalNone(lmp); + else if (model_name == "hooke") normal_model = new NormalHooke(lmp); else if (model_name == "hertz") normal_model = new NormalHertz(lmp); else if (model_name == "hertz/material") normal_model = new NormalHertzMaterial(lmp); else if (model_name == "dmt") normal_model = new NormalDMT(lmp); @@ -85,7 +87,9 @@ void ContactModel::init_model(std::string model_name, ModelType model_type) sub_models[model_type] = normal_model; } else if (model_type == TANGENTIAL) { - if (model_name == "linear_nohistory") tangential_model = new TangentialLinearNoHistory(lmp); + delete tangential_model; + if (model_name == "none") tangential_model = new TangentialNone(lmp); + else if (model_name == "linear_nohistory") tangential_model = new TangentialLinearNoHistory(lmp); else if (model_name == "linear_history") tangential_model = new TangentialLinearHistory(lmp); else if (model_name == "mindlin") tangential_model = new TangentialMindlin(lmp); else if (model_name == "mindlin/force") tangential_model = new TangentialMindlinForce(lmp); @@ -95,7 +99,9 @@ void ContactModel::init_model(std::string model_name, ModelType model_type) sub_models[model_type] = tangential_model; } else if (model_type == DAMPING) { - if (model_name == "velocity") damping_model = new DampingVelocity(lmp); + delete damping_model; + if (model_name == "none") damping_model = new DampingNone(lmp); + else if (model_name == "velocity") damping_model = new DampingVelocity(lmp); else if (model_name == "mass_velocity") damping_model = new DampingMassVelocity(lmp); else if (model_name == "viscoelastic") damping_model = new DampingViscoelastic(lmp); else if (model_name == "tsuji") damping_model = new DampingTsuji(lmp); @@ -103,21 +109,33 @@ void ContactModel::init_model(std::string model_name, ModelType model_type) sub_models[model_type] = damping_model; } else if (model_type == ROLLING) { - if (model_name == "none") delete rolling_model; - else if (model_name == "sds") rolling_model = new RollingSDS(lmp); + delete rolling_model; + rolling_defined = 1; + if (model_name == "none") { + rolling_model = new RollingNone(lmp); + rolling_defined = 0; + } else if (model_name == "sds") rolling_model = new RollingSDS(lmp); else error->all(FLERR, "Rolling model name {} not recognized", model_name); sub_models[model_type] = rolling_model; } else if (model_type == TWISTING) { - if (model_name == "none") delete twisting_model; - else if (model_name == "sds") twisting_model = new TwistingSDS(lmp); + delete twisting_model; + twisting_defined = 1; + if (model_name == "none") { + twisting_model = new TwistingNone(lmp); + twisting_defined = 0; + } else if (model_name == "sds") twisting_model = new TwistingSDS(lmp); else if (model_name == "marshall") twisting_model = new TwistingMarshall(lmp); else error->all(FLERR, "Twisting model name {} not recognized", model_name); sub_models[model_type] = twisting_model; } else if (model_type == HEAT) { - if (model_name == "none") delete heat_model; - else if (model_name == "area") heat_model = new HeatArea(lmp); + delete heat_model; + heat_defined = 1; + if (model_name == "none") { + heat_model = new HeatNone(lmp); + heat_defined = 0; + } else if (model_name == "area") heat_model = new HeatArea(lmp); else error->all(FLERR, "Heat model name not {} recognized", model_name); sub_models[model_type] = heat_model; } else { @@ -170,9 +188,9 @@ int ContactModel::init_classic_model(char **arg, int iarg, int narg) init_model("mass_velocity", DAMPING); // ensure additional models are undefined - rolling_model = nullptr; - twisting_model = nullptr; - heat_model = nullptr; + init_model("none", ROLLING); + init_model("none", TWISTING); + init_model("none", HEAT); // manually parse coeffs normal_model->coeffs[0] = kn; @@ -186,67 +204,71 @@ int ContactModel::init_classic_model(char **arg, int iarg, int narg) damping_model->coeffs_to_local(); iarg += 7; - return iarg ; + return iarg; } /* ---------------------------------------------------------------------- */ void ContactModel::init() { - if (!normal_model) error->all(FLERR, "Must specify normal contact model"); - if (!damping_model) error->all(FLERR, "Must specify damping contact model"); - if (!tangential_model) error->all(FLERR, "Must specify tangential contact model"); + int i, j; + for (i = 0; i < NSUBMODELS; i++) + if (!sub_models[i]) init_model("none", (ModelType) i); - int i, j, size_cumulative; + // Must have valid normal, damping, and tangential models + if (normal_model->name == "none") error->all(FLERR, "Must specify normal contact model"); + if (damping_model->name == "none") error->all(FLERR, "Must specify damping contact model"); + if (tangential_model->name == "none") error->all(FLERR, "Must specify tangential contact model"); + + int size_cumulative; size_history = 0; for (i = 0; i < NSUBMODELS; i++) { - if (sub_models[i]) { - if (sub_models[i]->nondefault_history_transfer) - nondefault_history_transfer = 1; - if (sub_models[i]->beyond_contact) - beyond_contact = 1; - size_history += sub_models[i]->size_history; - } + if (sub_models[i]->nondefault_history_transfer) + nondefault_history_transfer = 1; + if (sub_models[i]->beyond_contact) + beyond_contact = 1; + size_history += sub_models[i]->size_history; } if (nondefault_history_transfer) { transfer_history_factor = new double[size_history]; for (i = 0; i < size_history; i++) { - // Find which model controls this history value + // Find which model owns this history value size_cumulative = 0; for (j = 0; j < NSUBMODELS; j++) { - if (sub_models[j]) { - if (size_cumulative + sub_models[j]->size_history > i) break; - size_cumulative += sub_models[j]->size_history; - } + if (size_cumulative + sub_models[j]->size_history > i) break; + size_cumulative += sub_models[j]->size_history; } // Check if model has nondefault transfers, if so copy its array + transfer_history_factor[i] = -1; if (j != NSUBMODELS) { - transfer_history_factor[i] = -1; - if (sub_models[j]) { - if (sub_models[j]->nondefault_history_transfer) { - transfer_history_factor[i] = sub_models[j]->transfer_history_factor[i - size_cumulative]; - } + if (sub_models[j]->nondefault_history_transfer) { + transfer_history_factor[i] = sub_models[j]->transfer_history_factor[i - size_cumulative]; } } } } - for (i = 0; i < NSUBMODELS; i++) - if (sub_models[i]) sub_models[i]->init(); + for (i = 0; i < NSUBMODELS; i++) sub_models[i]->init(); } /* ---------------------------------------------------------------------- */ -void ContactModel::mix_coeffs(ContactModel *c1, ContactModel *c2) +int ContactModel::mix_coeffs(ContactModel *c1, ContactModel *c2) { - for (int i = 0; i < NSUBMODELS; i++) - if (sub_models[i]) - sub_models[i]->mix_coeffs(c1->sub_models[i]->coeffs, c2->sub_models[i]->coeffs); + int i; + for (i = 0; i < NSUBMODELS; i++) { + if (c1->sub_models[i]->name != c2->sub_models[i]->name) return i; + + init_model(c1->sub_models[i]->name, (ModelType) i); + sub_models[i]->mix_coeffs(c1->sub_models[i]->coeffs, c2->sub_models[i]->coeffs); + } limit_damping = MAX(c1->limit_damping, c2->limit_damping); + + return -1; } /* ---------------------------------------------------------------------- */ @@ -256,17 +278,12 @@ void ContactModel::write_restart(FILE *fp) int num_char, num_coeffs; for (int i = 0; i < NSUBMODELS; i++) { - num_char = -1; - if (sub_models[i]) { - num_char = sub_models[i]->name.length(); - num_coeffs = sub_models[i]->num_coeffs; - fwrite(&num_char, sizeof(int), 1, fp); - fwrite(sub_models[i]->name.data(), sizeof(char), num_char, fp); - fwrite(&num_coeffs, sizeof(int), 1, fp); - fwrite(sub_models[i]->coeffs, sizeof(double), num_coeffs, fp); - } else { - fwrite(&num_char, sizeof(int), 1, fp); - } + num_char = sub_models[i]->name.length(); + num_coeffs = sub_models[i]->num_coeffs; + fwrite(&num_char, sizeof(int), 1, fp); + fwrite(sub_models[i]->name.data(), sizeof(char), num_char, fp); + fwrite(&num_coeffs, sizeof(int), 1, fp); + fwrite(sub_models[i]->coeffs, sizeof(double), num_coeffs, fp); } } @@ -281,27 +298,25 @@ void ContactModel::read_restart(FILE *fp) utils::sfread(FLERR, &num_char, sizeof(int), 1, fp, nullptr, error); MPI_Bcast(&num_char, 1, MPI_INT, 0, world); - if (num_char != -1) { - std::string model_name (num_char, ' '); - if (comm->me == 0) - utils::sfread(FLERR, const_cast(model_name.data()), sizeof(char),num_char, fp, nullptr, error); - MPI_Bcast(const_cast(model_name.data()), num_char, MPI_CHAR, 0, world); + std::string model_name (num_char, ' '); + if (comm->me == 0) + utils::sfread(FLERR, const_cast(model_name.data()), sizeof(char),num_char, fp, nullptr, error); + MPI_Bcast(const_cast(model_name.data()), num_char, MPI_CHAR, 0, world); - init_model(model_name, (ModelType) i); + init_model(model_name, (ModelType) i); - if (comm->me == 0) { - utils::sfread(FLERR, &num_coeff, sizeof(int), 1, fp, nullptr, error); - if (num_coeff != sub_models[i]->num_coeffs) - error->one(FLERR, "Invalid contact model written to restart file"); - } - MPI_Bcast(&num_coeff, 1, MPI_INT, 0, world); - - if (comm->me == 0) { - utils::sfread(FLERR, sub_models[i]->coeffs, sizeof(double), num_coeff, fp, nullptr, error); - } - MPI_Bcast(sub_models[i]->coeffs, num_coeff, MPI_DOUBLE, 0, world); - sub_models[i]->coeffs_to_local(); + if (comm->me == 0) { + utils::sfread(FLERR, &num_coeff, sizeof(int), 1, fp, nullptr, error); + if (num_coeff != sub_models[i]->num_coeffs) + error->one(FLERR, "Invalid contact model written to restart file"); } + MPI_Bcast(&num_coeff, 1, MPI_INT, 0, world); + + if (comm->me == 0) { + utils::sfread(FLERR, sub_models[i]->coeffs, sizeof(double), num_coeff, fp, nullptr, error); + } + MPI_Bcast(sub_models[i]->coeffs, num_coeff, MPI_DOUBLE, 0, world); + sub_models[i]->coeffs_to_local(); } } @@ -378,10 +393,10 @@ void ContactModel::prep_contact() sub3(vt, temp, vtr); vrel = len3(vtr); - if (rolling_model || twisting_model) + if (rolling_defined || twisting_defined) sub3(omegai, omegaj, relrot); - if (rolling_model) { + if (rolling_defined) { // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) // this is different from the Marshall papers, which use the Bagi/Kuhn formulation // for rolling velocity (see Wang et al for why the latter is wrong) @@ -390,7 +405,7 @@ void ContactModel::prep_contact() vrl[2] = Reff * (relrot[0] * nx[1] - relrot[1] * nx[0]); } - if (twisting_model) { + if (twisting_defined) { // omega_T (eq 29 of Marshall) magtwist = dot3(relrot, nx); } @@ -424,8 +439,8 @@ void ContactModel::calculate_forces() if (limit_damping && Fntot < 0.0) Fntot = 0.0; tangential_model->calculate_forces(); - if (rolling_model) rolling_model->calculate_forces(); - if (twisting_model) twisting_model->calculate_forces(); + if (rolling_defined) rolling_model->calculate_forces(); + if (twisting_defined) twisting_model->calculate_forces(); //********************************************** // sum contributions @@ -438,13 +453,13 @@ void ContactModel::calculate_forces() cross3(nx, fs, torquesi); copy3(torquesi, torquesj); - double dist_to_contact = radi-0.5*delta; + double dist_to_contact = radi - 0.5 * delta; scale3(dist_to_contact, torquesi); - dist_to_contact = radj-0.5*delta; + dist_to_contact = radj - 0.5 * delta; scale3(dist_to_contact, torquesj); double torroll[3]; - if (rolling_model) { + if (rolling_defined) { cross3(nx, fr, torroll); scale3(Reff, torroll); add3(torquesi, torroll, torquesi); @@ -452,18 +467,15 @@ void ContactModel::calculate_forces() } double tortwist[3]; - if (twisting_model) { + if (twisting_defined) { scale3(magtortwist, nx, tortwist); add3(torquesi, tortwist, torquesi); sub3(torquesj, tortwist, torquesj); } -} -/* ---------------------------------------------------------------------- */ - -double ContactModel::calculate_heat() -{ - return heat_model->calculate_heat(); + if (heat_defined) { + dq = heat_model->calculate_heat(); + } } /* ---------------------------------------------------------------------- diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index 535ec4461e..e0600146c3 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -55,12 +55,11 @@ class ContactModel : protected Pointers { void reset_contact(); void prep_contact(); void calculate_forces(); - double calculate_heat(); double pulloff_distance(double, double); void init_model(std::string, ModelType); int init_classic_model(char **, int, int); - void mix_coeffs(ContactModel*, ContactModel*); + int mix_coeffs(ContactModel*, ContactModel*); void write_restart(FILE *); void read_restart(FILE *); @@ -84,7 +83,7 @@ class ContactModel : protected Pointers { double *history; // Contact properties/output - double forces[3], torquesi[3], torquesj[3]; + double forces[3], torquesi[3], torquesj[3], dq; double radi, radj, rwall, meff, dt, Ti, Tj, area; double Fntot, magtortwist; @@ -98,7 +97,7 @@ class ContactModel : protected Pointers { bool touch; protected: - + int rolling_defined, twisting_defined, heat_defined; // Used to quickly skip undefined submodels int prep_flag, check_flag; }; diff --git a/src/GRANULAR/contact_damping_models.cpp b/src/GRANULAR/contact_damping_models.cpp index 8d44746683..a003d181d9 100644 --- a/src/GRANULAR/contact_damping_models.cpp +++ b/src/GRANULAR/contact_damping_models.cpp @@ -33,6 +33,19 @@ void DampingModel::init() damp = contact->normal_model->damp; } +/* ---------------------------------------------------------------------- + No model +------------------------------------------------------------------------- */ + +DampingNone::DampingNone(LAMMPS *lmp) : DampingModel(lmp) {} + +/* ---------------------------------------------------------------------- */ + +double DampingNone::calculate_forces() +{ + return 0.0; +} + /* ---------------------------------------------------------------------- Velocity damping ------------------------------------------------------------------------- */ diff --git a/src/GRANULAR/contact_damping_models.h b/src/GRANULAR/contact_damping_models.h index b1e1b795e0..611393da9f 100644 --- a/src/GRANULAR/contact_damping_models.h +++ b/src/GRANULAR/contact_damping_models.h @@ -33,6 +33,15 @@ class DampingModel : public SubModel { /* ---------------------------------------------------------------------- */ +class DampingNone : public DampingModel { + public: + DampingNone(class LAMMPS *); + void init() override {}; + double calculate_forces(); +}; + +/* ---------------------------------------------------------------------- */ + class DampingVelocity : public DampingModel { public: DampingVelocity(class LAMMPS *); diff --git a/src/GRANULAR/contact_heat_models.cpp b/src/GRANULAR/contact_heat_models.cpp index 60f2ef1cbe..00ac0c0785 100644 --- a/src/GRANULAR/contact_heat_models.cpp +++ b/src/GRANULAR/contact_heat_models.cpp @@ -28,6 +28,19 @@ HeatModel::HeatModel(LAMMPS *lmp) : SubModel(lmp) {} Area-based heat conduction ------------------------------------------------------------------------- */ +HeatNone::HeatNone(LAMMPS *lmp) : HeatModel(lmp) {} + +/* ---------------------------------------------------------------------- */ + +double HeatNone::calculate_heat() +{ + return 0.0; +} + +/* ---------------------------------------------------------------------- + Area-based heat conduction +------------------------------------------------------------------------- */ + HeatArea::HeatArea(LAMMPS *lmp) : HeatModel(lmp) { num_coeffs = 1; @@ -44,14 +57,6 @@ void HeatArea::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void HeatArea::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- */ - double HeatArea::calculate_heat() { return conductivity * contact->area * (contact->Ti - contact->Tj); diff --git a/src/GRANULAR/contact_heat_models.h b/src/GRANULAR/contact_heat_models.h index 33b7eb2e90..5a0d495810 100644 --- a/src/GRANULAR/contact_heat_models.h +++ b/src/GRANULAR/contact_heat_models.h @@ -24,18 +24,24 @@ class HeatModel : public SubModel { HeatModel(class LAMMPS *); ~HeatModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(double*, double*) {}; virtual void init() {}; virtual double calculate_heat() = 0; }; /* ---------------------------------------------------------------------- */ +class HeatNone : public HeatModel { + public: + HeatNone(class LAMMPS *); + double calculate_heat(); +}; + +/* ---------------------------------------------------------------------- */ + class HeatArea : public HeatModel { public: HeatArea(class LAMMPS *); void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; double calculate_heat(); protected: double conductivity; diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index fb3523069c..2f59311edf 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -68,6 +68,19 @@ void NormalModel::set_fncrit() Fncrit = fabs(contact->Fntot); } +/* ---------------------------------------------------------------------- + No model +------------------------------------------------------------------------- */ + +NormalNone::NormalNone(LAMMPS *lmp) : NormalModel(lmp) {} + +/* ---------------------------------------------------------------------- */ + +double NormalNone::calculate_forces() +{ + return 0.0; +} + /* ---------------------------------------------------------------------- Hookean normal force ------------------------------------------------------------------------- */ @@ -89,15 +102,6 @@ void NormalHooke::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void NormalHooke::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); - coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- */ - double NormalHooke::calculate_forces() { Fne = knfac * contact->delta; @@ -132,15 +136,6 @@ void NormalHertz::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void NormalHertz::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); - coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- */ - double NormalHertz::calculate_forces() { Fne = knfac * contact->delta; diff --git a/src/GRANULAR/contact_normal_models.h b/src/GRANULAR/contact_normal_models.h index f683e53308..6d47dd3736 100644 --- a/src/GRANULAR/contact_normal_models.h +++ b/src/GRANULAR/contact_normal_models.h @@ -24,7 +24,6 @@ class NormalModel : public SubModel { NormalModel(class LAMMPS *); ~NormalModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(double*, double*) {}; virtual void init() {}; virtual bool touch(); virtual double pulloff_distance(double, double); @@ -40,12 +39,19 @@ class NormalModel : public SubModel { /* ---------------------------------------------------------------------- */ +class NormalNone : public NormalModel { + public: + NormalNone(class LAMMPS *); + double calculate_forces(); + void set_knfac() {}; +}; + +/* ---------------------------------------------------------------------- */ + class NormalHooke : public NormalModel { public: NormalHooke(class LAMMPS *); - ~NormalHooke() {}; void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; double calculate_forces(); void set_knfac(); protected: @@ -57,9 +63,7 @@ class NormalHooke : public NormalModel { class NormalHertz : public NormalModel { public: NormalHertz(class LAMMPS *); - ~NormalHertz() {}; void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; double calculate_forces(); void set_knfac(); protected: @@ -71,7 +75,6 @@ class NormalHertz : public NormalModel { class NormalHertzMaterial : public NormalHertz { public: NormalHertzMaterial(class LAMMPS *); - ~NormalHertzMaterial() {}; void coeffs_to_local() override; void mix_coeffs(double*, double*) override; }; @@ -81,7 +84,6 @@ class NormalHertzMaterial : public NormalHertz { class NormalDMT : public NormalModel { public: NormalDMT(class LAMMPS *); - ~NormalDMT() {}; void coeffs_to_local() override; void mix_coeffs(double*, double*) override; double calculate_forces(); @@ -97,14 +99,13 @@ class NormalDMT : public NormalModel { class NormalJKR : public NormalModel { public: NormalJKR(class LAMMPS *); - ~NormalJKR() {}; void coeffs_to_local() override; void mix_coeffs(double*, double*) override; bool touch() override; double pulloff_distance(double, double) override; double calculate_area() override; - double calculate_forces(); - void set_knfac(); + double calculate_forces() override; + void set_knfac() override; void set_fncrit() override; protected: double k, cohesion; diff --git a/src/GRANULAR/contact_rolling_models.cpp b/src/GRANULAR/contact_rolling_models.cpp index 8f90b4bc04..956be65353 100644 --- a/src/GRANULAR/contact_rolling_models.cpp +++ b/src/GRANULAR/contact_rolling_models.cpp @@ -29,6 +29,12 @@ using namespace MathExtra; RollingModel::RollingModel(LAMMPS *lmp) : SubModel(lmp) {} +/* ---------------------------------------------------------------------- + No model +------------------------------------------------------------------------- */ + +RollingNone::RollingNone(LAMMPS *lmp) : RollingModel(lmp) {} + /* ---------------------------------------------------------------------- SDS rolling friction model ------------------------------------------------------------------------- */ @@ -53,17 +59,7 @@ void RollingSDS::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void RollingSDS::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); - coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); - coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- */ - -double RollingSDS::calculate_forces() +void RollingSDS::calculate_forces() { int rhist0, rhist1, rhist2, frameupdate; double Frcrit, rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_dbl, temp_array[3]; @@ -125,5 +121,4 @@ double RollingSDS::calculate_forces() contact->history[rhist0] = hist_temp[0]; contact->history[rhist1] = hist_temp[1]; contact->history[rhist2] = hist_temp[2]; - return 0; } diff --git a/src/GRANULAR/contact_rolling_models.h b/src/GRANULAR/contact_rolling_models.h index c3ab6810fa..f5af08c1b0 100644 --- a/src/GRANULAR/contact_rolling_models.h +++ b/src/GRANULAR/contact_rolling_models.h @@ -24,9 +24,16 @@ class RollingModel : public SubModel { RollingModel(class LAMMPS *); ~RollingModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(double*, double*) {}; virtual void init() {}; - virtual double calculate_forces() = 0; + virtual void calculate_forces() = 0; +}; + +/* ---------------------------------------------------------------------- */ + +class RollingNone : public RollingModel { + public: + RollingNone(class LAMMPS *); + void calculate_forces() {}; }; /* ---------------------------------------------------------------------- */ @@ -35,8 +42,7 @@ class RollingSDS : public RollingModel { public: RollingSDS(class LAMMPS *); void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; - double calculate_forces(); + void calculate_forces(); protected: double k, mu, gamma; }; diff --git a/src/GRANULAR/contact_sub_models.cpp b/src/GRANULAR/contact_sub_models.cpp index 8aafc0f2b5..6ec7bbd017 100644 --- a/src/GRANULAR/contact_sub_models.cpp +++ b/src/GRANULAR/contact_sub_models.cpp @@ -73,6 +73,15 @@ int SubModel::parse_coeffs(char **arg, int iarg, int narg) return iarg + num_coeffs; } +/* ---------------------------------------------------------------------- */ + +void SubModel::mix_coeffs(double* icoeffs, double* jcoeffs) +{ + for (int i = 0; i < num_coeffs; i++) + coeffs[i] = mix_geom(icoeffs[i], jcoeffs[i]); + coeffs_to_local(); +} + /* ---------------------------------------------------------------------- mixing of Young's modulus (E) ------------------------------------------------------------------------- */ diff --git a/src/GRANULAR/contact_sub_models.h b/src/GRANULAR/contact_sub_models.h index 7b28bb4c57..730790616d 100644 --- a/src/GRANULAR/contact_sub_models.h +++ b/src/GRANULAR/contact_sub_models.h @@ -29,7 +29,7 @@ class SubModel : protected Pointers { double *coeffs; void read_restart(); int parse_coeffs(char **, int, int); - virtual void mix_coeffs(double*, double*) = 0; + virtual void mix_coeffs(double*, double*); virtual void coeffs_to_local() = 0; virtual void init() = 0; // called after all other submodel coeffs defined diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index a4911cd5c2..437615441c 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -37,6 +37,12 @@ void TangentialModel::init() damp = xt * contact->damping_model->damp; } +/* ---------------------------------------------------------------------- + No model +------------------------------------------------------------------------- */ + +TangentialNone::TangentialNone(LAMMPS *lmp) : TangentialModel(lmp) {} + /* ---------------------------------------------------------------------- Linear model with no history ------------------------------------------------------------------------- */ @@ -61,15 +67,6 @@ void TangentialLinearNoHistory::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void TangentialLinearNoHistory::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); - coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- */ - void TangentialLinearNoHistory::calculate_forces() { double Fscrit, fsmag, Ft; @@ -108,16 +105,6 @@ void TangentialLinearHistory::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void TangentialLinearHistory::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); - coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); - coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- */ - void TangentialLinearHistory::calculate_forces() { double Fscrit, magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; diff --git a/src/GRANULAR/contact_tangential_models.h b/src/GRANULAR/contact_tangential_models.h index 620f3388da..812eb62e55 100644 --- a/src/GRANULAR/contact_tangential_models.h +++ b/src/GRANULAR/contact_tangential_models.h @@ -24,7 +24,6 @@ class TangentialModel : public SubModel { TangentialModel(class LAMMPS *); virtual ~TangentialModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(double*, double*) {}; virtual void init(); virtual void calculate_forces() = 0; int rescale_flag; @@ -35,11 +34,18 @@ class TangentialModel : public SubModel { /* ---------------------------------------------------------------------- */ +class TangentialNone : public TangentialModel { + public: + TangentialNone(class LAMMPS *); + void calculate_forces() {}; +}; + +/* ---------------------------------------------------------------------- */ + class TangentialLinearNoHistory : public TangentialModel { public: TangentialLinearNoHistory(class LAMMPS *); void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; void calculate_forces(); }; @@ -49,7 +55,6 @@ class TangentialLinearHistory : public TangentialModel { public: TangentialLinearHistory(class LAMMPS *); void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; void calculate_forces(); }; diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/GRANULAR/contact_twisting_models.cpp index 1fddda559c..8f3c5e571e 100644 --- a/src/GRANULAR/contact_twisting_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -26,11 +26,13 @@ using namespace MathConst; Default twisting model ------------------------------------------------------------------------- */ -TwistingModel::TwistingModel(LAMMPS *lmp) : SubModel(lmp) -{ - num_coeffs = 0; - size_history = 3; -} +TwistingModel::TwistingModel(LAMMPS *lmp) : SubModel(lmp) {} + +/* ---------------------------------------------------------------------- + No model +------------------------------------------------------------------------- */ + +TwistingNone::TwistingNone(LAMMPS *lmp) : TwistingModel(lmp) {} /* ---------------------------------------------------------------------- Marshall twisting model @@ -44,7 +46,7 @@ TwistingMarshall::TwistingMarshall(LAMMPS *lmp) : TwistingModel(lmp) /* ---------------------------------------------------------------------- */ -double TwistingMarshall::calculate_forces() +void TwistingMarshall::calculate_forces() { double signtwist, Mtcrit; @@ -93,17 +95,7 @@ void TwistingSDS::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void TwistingSDS::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); - coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); - coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- */ - -double TwistingSDS::calculate_forces() +void TwistingSDS::calculate_forces() { double signtwist, Mtcrit; diff --git a/src/GRANULAR/contact_twisting_models.h b/src/GRANULAR/contact_twisting_models.h index 726eb163bf..15124ca378 100644 --- a/src/GRANULAR/contact_twisting_models.h +++ b/src/GRANULAR/contact_twisting_models.h @@ -24,9 +24,16 @@ class TwistingModel : public SubModel { TwistingModel(class LAMMPS *); virtual ~TwistingModel() {}; virtual void coeffs_to_local() {}; - virtual void mix_coeffs(double*, double*) {}; virtual void init() {}; - virtual double calculate_forces() = 0; + virtual void calculate_forces() = 0; +}; + +/* ---------------------------------------------------------------------- */ + +class TwistingNone : public TwistingModel { + public: + TwistingNone(class LAMMPS *); + void calculate_forces() {}; }; /* ---------------------------------------------------------------------- */ @@ -34,7 +41,7 @@ class TwistingModel : public SubModel { class TwistingMarshall : public TwistingModel { public: TwistingMarshall(class LAMMPS *); - double calculate_forces(); + void calculate_forces(); }; /* ---------------------------------------------------------------------- */ @@ -43,8 +50,7 @@ class TwistingSDS : public TwistingModel { public: TwistingSDS(class LAMMPS *); void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; - double calculate_forces(); + void calculate_forces(); protected: double k, mu, damp; }; diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index b0f87890f7..95cd4fc6e0 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -362,10 +362,8 @@ void FixWallGran::init() if (model->beyond_contact) next_index = 1; for (i = 0; i < NSUBMODELS; i++) { - if (model->sub_models[i]) { - model->sub_models[i]->history_index = next_index; - next_index += model->sub_models[i]->size_history; - } + model->sub_models[i]->history_index = next_index; + next_index += model->sub_models[i]->size_history; } } @@ -546,10 +544,10 @@ void FixWallGran::post_force(int /*vflag*/) model->prep_contact(); model->calculate_forces(); - if (heat_flag) dq = model->calculate_heat(); forces = model->forces; torquesi = model->torquesi; + if (heat_flag) dq = model->dq; // apply forces & torques add3(f[i], forces, f[i]); diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 59ad15c02d..7a774132f0 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -265,10 +265,10 @@ void FixWallGranRegion::post_force(int /*vflag*/) model->prep_contact(); model->calculate_forces(); - if (heat_flag) dq = model->calculate_heat(); forces = model->forces; torquesi = model->torquesi; + if (heat_flag) dq = model->dq; // apply forces & torques add3(f[i], forces, f[i]); diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index c4d7bc1490..52e4a84ded 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -254,11 +254,11 @@ void PairGranular::compute(int eflag, int vflag) } models[itype][jtype]->calculate_forces(); - if (heat_flag) dq = models[itype][jtype]->calculate_heat(); forces = models[itype][jtype]->forces; torquesi = models[itype][jtype]->torquesi; torquesj = models[itype][jtype]->torquesj; + if (heat_flag) dq = models[itype][jtype]->dq; // apply forces & torques scale3(factor_lj, forces); @@ -450,9 +450,8 @@ void PairGranular::init_style() if (model.size_history != 0) use_history = 1; for (i = 0; i < NSUBMODELS; i++) - if (model.sub_models[i]) - if (model.sub_models[i]->size_history > size_max[i]) - size_max[i] = model.sub_models[i]->size_history; + if (model.sub_models[i]->size_history > size_max[i]) + size_max[i] = model.sub_models[i]->size_history; if (model.nondefault_history_transfer) nondefault_history_transfer = 1; } @@ -463,10 +462,8 @@ void PairGranular::init_style() for (auto &model : vec_models) { int next_index = 0; for (i = 0; i < NSUBMODELS; i++) { - if (model.sub_models[i]) { - model.sub_models[i]->history_index = next_index; - next_index += size_max[i]; - } + model.sub_models[i]->history_index = next_index; + next_index += size_max[i]; } } @@ -561,27 +558,20 @@ double PairGranular::init_one(int i, int j) double cutoff = 0.0; if (setflag[i][j] == 0) { - if ((models[i][i]->normal_model->name != models[j][j]->normal_model->name) || - (models[i][i]->damping_model->name != models[j][j]->damping_model->name) || - (models[i][i]->tangential_model->name != models[j][j]->tangential_model->name) || - (models[i][i]->rolling_model->name != models[j][j]->rolling_model->name) || - (models[i][i]->twisting_model->name != models[j][j]->twisting_model->name)) { - error->all(FLERR,"Granular pair style functional forms are different, " - "cannot mix coefficients for types {} and {}. \n" - "This combination must be set explicitly via a " - "pair_coeff command",i,j); - } vec_models.push_back(ContactModel(lmp)); models[i][j] = models[j][i] = & vec_models.back(); - vec_models.back().init_model(models[i][i]->normal_model->name, NORMAL); - vec_models.back().init_model(models[i][i]->tangential_model->name, TANGENTIAL); - vec_models.back().init_model(models[i][i]->damping_model->name, DAMPING); - vec_models.back().init_model(models[i][i]->rolling_model->name, ROLLING); - vec_models.back().init_model(models[i][i]->twisting_model->name, TWISTING); - vec_models.back().init_model(models[i][i]->heat_model->name, HEAT); - vec_models.back().mix_coeffs(models[i][i], models[j][j]); + int error_code = vec_models.back().mix_coeffs(models[i][i], models[j][j]); + if (error_code != -1) + error->all(FLERR,"Granular pair style functional forms are different, " + "cannot mix coefficients for types {} and {} \n" + "with submodels {} and {}. \n" + "This combination must be set explicitly via a " + "pair_coeff command",i,j, + models[i][i]->sub_models[error_code]->name, + models[j][j]->sub_models[error_code]->name); + vec_models.back().init(); // Calculates cumulative properties of sub models for (int k = 0; k < NSUBMODELS; k++) diff --git a/src/contact.h b/src/contact.h index 535ec4461e..cd680b220a 100644 --- a/src/contact.h +++ b/src/contact.h @@ -55,12 +55,11 @@ class ContactModel : protected Pointers { void reset_contact(); void prep_contact(); void calculate_forces(); - double calculate_heat(); double pulloff_distance(double, double); void init_model(std::string, ModelType); int init_classic_model(char **, int, int); - void mix_coeffs(ContactModel*, ContactModel*); + int mix_coeffs(ContactModel*, ContactModel*); void write_restart(FILE *); void read_restart(FILE *); @@ -84,7 +83,7 @@ class ContactModel : protected Pointers { double *history; // Contact properties/output - double forces[3], torquesi[3], torquesj[3]; + double forces[3], torquesi[3], torquesj[3], dq; double radi, radj, rwall, meff, dt, Ti, Tj, area; double Fntot, magtortwist; @@ -98,7 +97,7 @@ class ContactModel : protected Pointers { bool touch; protected: - + int rolling_defined, twisting_defined, heat_defined; int prep_flag, check_flag; }; From 038f4a52105aa93bbd835310d65be697812109f8 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 14 Sep 2022 21:40:00 -0600 Subject: [PATCH 022/445] Adding variable temperature to fix gran/wall, misc fixes/updates --- src/GRANULAR/contact.cpp | 62 ++++++++-------------- src/GRANULAR/contact.h | 12 ++--- src/GRANULAR/contact_normal_models.cpp | 2 +- src/GRANULAR/contact_sub_models.cpp | 12 +++-- src/GRANULAR/contact_tangential_models.cpp | 2 +- src/GRANULAR/contact_twisting_models.cpp | 16 ++++-- src/GRANULAR/contact_twisting_models.h | 3 ++ src/GRANULAR/fix_wall_gran.cpp | 29 +++++++--- src/GRANULAR/fix_wall_gran.h | 3 ++ src/GRANULAR/fix_wall_gran_region.cpp | 5 +- src/GRANULAR/pair_granular.cpp | 33 ++++++------ 11 files changed, 98 insertions(+), 81 deletions(-) diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index a1a35afe47..f72245def3 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -10,12 +10,16 @@ the GNU General Public License. See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- +------------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- This class contains a series of tools for DEM contacts Multiple models can be defined and used to calculate forces and torques based on contact geometry -*/ + + Contributing authors: + Dan Bolintineanu (SNL), Joel Clemmer (SNL) +----------------------------------------------------------------------- */ #include "contact.h" #include "contact_sub_models.h" @@ -42,7 +46,7 @@ ContactModel::ContactModel(LAMMPS *lmp) : Pointers(lmp) beyond_contact = 0; nondefault_history_transfer = 0; - wall_type = NONE; + contact_type = PAIR; reset_contact(); @@ -175,17 +179,19 @@ int ContactModel::init_classic_model(char **arg, int iarg, int narg) if (strcmp(arg[iarg],"hooke") == 0) { init_model("hooke", NORMAL); init_model("linear_nohistory", TANGENTIAL); + init_model("mass_velocity", DAMPING); } else if (strcmp(arg[iarg],"hooke/history") == 0) { init_model("hooke", NORMAL); init_model("linear_history", TANGENTIAL); + init_model("mass_velocity", DAMPING); } else if (strcmp(arg[iarg],"hertz/history") == 0) { // convert Kn and Kt from pressure units to force/distance^2 if Hertzian kn /= force->nktv2p; kt /= force->nktv2p; init_model("hertz", NORMAL); - init_model("mindlin", TANGENTIAL); // Dan is this right? + init_model("mindlin", TANGENTIAL); + init_model("viscoelastic", DAMPING); } else error->all(FLERR,"Invalid classic gran model"); - init_model("mass_velocity", DAMPING); // ensure additional models are undefined init_model("none", ROLLING); @@ -322,25 +328,15 @@ void ContactModel::read_restart(FILE *fp) /* ---------------------------------------------------------------------- */ -void ContactModel::reset_contact() -{ - prep_flag = check_flag = 0; - touch = false; -} - -/* ---------------------------------------------------------------------- */ - bool ContactModel::check_contact(double rtemp) { - check_flag = 1; - - if (wall_type == RWALL) { + if (contact_type == WALL) { // Used by fix_wall_gran.cpp rsq = lensq3(dx); radsum = radi; if (rtemp == 0) Reff = radi; else Reff = radi * rtemp/(radi + rtemp); - } else if (wall_type == RDUPLICATE) { + } else if (contact_type == WALLREGION) { // Used by fix_wall_gran_region.cpp rsq = rtemp * rtemp; radsum = radi + radi; @@ -361,11 +357,6 @@ bool ContactModel::check_contact(double rtemp) void ContactModel::prep_contact() { - prep_flag = 1; - // If it hasn't already been done, test if the contact exists - if (check_flag != 1) touch = check_contact(); - if (!touch) return; - double temp[3]; // Standard geometric quantities @@ -415,16 +406,8 @@ void ContactModel::prep_contact() void ContactModel::calculate_forces() { - // If it hasn't already been done, run prep calculations - if (prep_flag != 1) prep_contact(); - if (!touch) { - forces[0] = forces[1] = forces[2] = 0.0; - return; - } + // calculate forces/torques - //********************************************** - // calculate forces - //********************************************** forces[0] = 0.0; double Fne, Fdamp; area = normal_model->calculate_area(); @@ -442,35 +425,36 @@ void ContactModel::calculate_forces() if (rolling_defined) rolling_model->calculate_forces(); if (twisting_defined) twisting_model->calculate_forces(); - //********************************************** // sum contributions - //********************************************** scale3(Fntot, nx, forces); add3(forces, fs, forces); - //May need to rethink this for use with walls (and eventually tris).. + //May need to rethink eventually tris.. cross3(nx, fs, torquesi); - copy3(torquesi, torquesj); double dist_to_contact = radi - 0.5 * delta; scale3(dist_to_contact, torquesi); - dist_to_contact = radj - 0.5 * delta; - scale3(dist_to_contact, torquesj); + + if (contact_type == PAIR) { + copy3(torquesi, torquesj); + dist_to_contact = radj - 0.5 * delta; + scale3(dist_to_contact, torquesj); + } double torroll[3]; if (rolling_defined) { cross3(nx, fr, torroll); scale3(Reff, torroll); add3(torquesi, torroll, torquesi); - sub3(torquesj, torroll, torquesj); + if (contact_type == PAIR) sub3(torquesj, torroll, torquesj); } double tortwist[3]; if (twisting_defined) { scale3(magtortwist, nx, tortwist); add3(torquesi, tortwist, torquesi); - sub3(torquesj, tortwist, torquesj); + if (contact_type == PAIR) sub3(torquesj, tortwist, torquesj); } if (heat_defined) { diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index e0600146c3..4dc88132c0 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -31,10 +31,10 @@ enum ModelType { HEAT = 5 }; // Relative order matters since some derive coeffs from others -enum WallType { - NONE = 0, - RWALL = 1, - RDUPLICATE = 2 +enum ContactType { + PAIR = 0, + WALL = 1, + WALLREGION = 2 }; // forward declaration @@ -52,7 +52,6 @@ class ContactModel : protected Pointers { ~ContactModel(); void init(); bool check_contact(double = 0); - void reset_contact(); void prep_contact(); void calculate_forces(); double pulloff_distance(double, double); @@ -75,7 +74,7 @@ class ContactModel : protected Pointers { // Extra options int beyond_contact, limit_damping, history_update; - WallType wall_type; + ContactType contact_type; // History variables int size_history, nondefault_history_transfer; @@ -98,7 +97,6 @@ class ContactModel : protected Pointers { protected: int rolling_defined, twisting_defined, heat_defined; // Used to quickly skip undefined submodels - int prep_flag, check_flag; }; } // namespace Contact diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index 2f59311edf..9e0a377eb9 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -261,7 +261,7 @@ void NormalJKR::coeffs_to_local() poiss = coeffs[2]; cohesion = coeffs[3]; k = FOURTHIRDS * Emod; - Escaled = mix_stiffnessE(Emod, Emod, poiss, poiss); //Dan, not sure why these coefficients are mixed in the regular pair style + Escaled = mix_stiffnessE(Emod, Emod, poiss, poiss); if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal JKR normal model"); } diff --git a/src/GRANULAR/contact_sub_models.cpp b/src/GRANULAR/contact_sub_models.cpp index 6ec7bbd017..57834fc040 100644 --- a/src/GRANULAR/contact_sub_models.cpp +++ b/src/GRANULAR/contact_sub_models.cpp @@ -10,12 +10,16 @@ the GNU General Public License. See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- +-------------------------------------------------------------------------*/ - This class contains a series of tools for DEM contacts - Multiple models can be defined and used to calculate forces +/* ---------------------------------------------------------------------- + This class contains a framework for normal, damping, tangential, + rolling, twisting, and heat models used to calculate forces and torques based on contact geometry -*/ + + Contributing authors: + Dan Bolintineanu (SNL), Joel Clemmer (SNL) +----------------------------------------------------------------------- */ #include "contact_sub_models.h" #include "error.h" diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index 437615441c..46b370d15f 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -259,7 +259,7 @@ void TangentialMindlin::calculate_forces() temp_dbl = -damp; scale3(temp_dbl, contact->vtr, contact->fs); - if (! mindlin_force) { + if (!mindlin_force) { scale3(k_scaled, history, temp_array); add3(contact->fs, temp_array, contact->fs); } diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/GRANULAR/contact_twisting_models.cpp index 8f3c5e571e..52b37d46e1 100644 --- a/src/GRANULAR/contact_twisting_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -46,15 +46,25 @@ TwistingMarshall::TwistingMarshall(LAMMPS *lmp) : TwistingModel(lmp) /* ---------------------------------------------------------------------- */ + +void TwistingMarshall::init() +{ + k_tang = contact->tangential_model->k; + damp_tang = contact->tangential_model->damp; + mu_tang = contact->tangential_model->mu; +} + +/* ---------------------------------------------------------------------- */ + void TwistingMarshall::calculate_forces() { double signtwist, Mtcrit; // Calculate twist coefficients from tangential model & contact geometry // eq 32 of Marshall paper - double k = 0.5 * contact->tangential_model->k * contact->area * contact->area; - double damp = 0.5 * contact->tangential_model->damp * contact->area * contact->area; - double mu = TWOTHIRDS * contact->area * contact->tangential_model->mu; + double k = 0.5 * k_tang * contact->area * contact->area; + double damp = 0.5 * damp_tang * contact->area * contact->area; + double mu = TWOTHIRDS * mu_tang * contact->area; if (contact->history_update) { contact->history[history_index] += contact->magtwist * contact->dt; diff --git a/src/GRANULAR/contact_twisting_models.h b/src/GRANULAR/contact_twisting_models.h index 15124ca378..724448892a 100644 --- a/src/GRANULAR/contact_twisting_models.h +++ b/src/GRANULAR/contact_twisting_models.h @@ -42,6 +42,9 @@ class TwistingMarshall : public TwistingModel { public: TwistingMarshall(class LAMMPS *); void calculate_forces(); + void init(); + protected: + double k_tang, damp_tang, mu_tang; }; /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 95cd4fc6e0..aca9341a58 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -14,7 +14,7 @@ /* ---------------------------------------------------------------------- Contributing authors: Leo Silbert (SNL), Gary Grest (SNL), - Dan Bolintineanu (SNL) + Dan Bolintineanu (SNL), Joel Clemmer (SNL) ------------------------------------------------------------------------- */ #include "fix_wall_gran.h" @@ -69,7 +69,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : // set interaction style // disable bonded/history option for now model = new ContactModel(lmp); - model->wall_type = RWALL; + model->contact_type = WALL; if (strcmp(arg[3],"granular") == 0) classic_flag = 0; else classic_flag = 1; @@ -171,6 +171,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : // wallstyle args idregion = nullptr; + tstr = nullptr; if (iarg >= narg) error->all(FLERR, "Illegal fix wall/gran command"); @@ -211,7 +212,11 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : iarg += 2; } else if (strcmp(arg[iarg],"temperature") == 0) { if (narg < iarg+2) error->all(FLERR,"Illegal fix wall/gran command"); - Twall = utils::numeric(FLERR,arg[iarg+1],false,lmp); + if (utils::strmatch(arg[iarg+1], "^v_")) { + tstr = utils::strdup(arg[3] + 2); + } else { + Twall = utils::numeric(FLERR,arg[iarg+1],false,lmp); + } Twall_defined = 1; iarg += 2; } else wallstyle = NOSTYLE; @@ -318,10 +323,10 @@ FixWallGran::~FixWallGran() atom->delete_callback(id,Atom::GROW); atom->delete_callback(id,Atom::RESTART); - delete model; - // delete local storage + delete model; + delete [] tstr; delete [] idregion; memory->destroy(history_one); memory->destroy(mass_rigid); @@ -365,6 +370,13 @@ void FixWallGran::init() model->sub_models[i]->history_index = next_index; next_index += model->sub_models[i]->size_history; } + + if (tstr) { + tvar = input->variable->find(tstr); + if (tvar < 0) error->all(FLERR, "Variable {} for fix wall/gran does not exist", tstr); + if (! input->variable->equalstyle(tvar)) + error->all(FLERR, "Variable {} for fix wall/gran must be an equal style variable", tstr); + } } /* ---------------------------------------------------------------------- */ @@ -467,7 +479,11 @@ void FixWallGran::post_force(int /*vflag*/) model->radj = 0.0; model->vj = vwall; model->omegaj = w0; - if (heat_flag) model->Tj = Twall; + if (heat_flag) { + if (tstr) + Twall = input->variable->compute_equal(tvar); + model->Tj = Twall; + } for (int i = 0; i < nlocal; i++) { if (! mask[i] & groupbit) continue; @@ -509,7 +525,6 @@ void FixWallGran::post_force(int /*vflag*/) } // Reset model and copy initial geometric data - model->reset_contact(); model->dx[0] = dx; model->dx[1] = dy; model->dx[2] = dz; diff --git a/src/GRANULAR/fix_wall_gran.h b/src/GRANULAR/fix_wall_gran.h index b61ac24d54..fd4a0a0ec8 100644 --- a/src/GRANULAR/fix_wall_gran.h +++ b/src/GRANULAR/fix_wall_gran.h @@ -67,6 +67,9 @@ class FixWallGran : public Fix { int heat_flag; int limit_damping; + int tvar; + char *tstr; + // shear history for single contact per particle double **history_one; diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 7a774132f0..155b872e10 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing authors: Dan Bolintineanu (SNL) + Contributing authors: Dan Bolintineanu (SNL), Joel Clemmer (SNL) ------------------------------------------------------------------------- */ #include "fix_wall_gran_region.h" @@ -50,7 +50,7 @@ FixWallGranRegion::FixWallGranRegion(LAMMPS *lmp, int narg, char **arg) : tmax = region->tmax; c2r = new int[tmax]; - model->wall_type = RDUPLICATE; + model->contact_type = WALLREGION; // re-allocate atom-based arrays with nshear // do not register with Atom class, since parent class did that @@ -226,7 +226,6 @@ void FixWallGranRegion::post_force(int /*vflag*/) // Reset model and copy initial geometric data // A bit unncessary since region->contact[ic] stores r - model->reset_contact(); model->dx[0] = region->contact[ic].delx; model->dx[1] = region->contact[ic].dely; model->dx[2] = region->contact[ic].delz; diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 52e4a84ded..b376bb64c1 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -14,8 +14,8 @@ /* ---------------------------------------------------------------------- Contributing authors: - Dan Bolintineanu (SNL), Ishan Srivastava (SNL), Jeremy Lechman(SNL) - Leo Silbert (SNL), Gary Grest (SNL) + Dan Bolintineanu (SNL), Joel Clemmer (SNL), Ishan Srivastava (SNL), + Jeremy Lechman(SNL), Leo Silbert (SNL), Gary Grest (SNL) ----------------------------------------------------------------------- */ #include "pair_granular.h" @@ -196,7 +196,6 @@ void PairGranular::compute(int eflag, int vflag) jtype = type[j]; // Reset model and copy initial geometric data - models[itype][jtype]->reset_contact(); models[itype][jtype]->xi = x[i]; models[itype][jtype]->xj = x[j]; models[itype][jtype]->radi = radius[i]; @@ -346,31 +345,30 @@ void PairGranular::coeff(int narg, char **arg) // Construct new model within vector vec_models.emplace_back(lmp); - //Parse mandatory normal and tangential specifications + //Parse mandatory specification int iarg = 2; vec_models.back().init_model(std::string(arg[iarg++]), NORMAL); iarg = vec_models.back().normal_model->parse_coeffs(arg, iarg, narg); - if (strcmp(arg[iarg++], "tangential") == 0) { - if (iarg >= narg) - error->all(FLERR,"Illegal pair_coeff command, must specify " - "tangential model after tangential keyword"); - vec_models.back().init_model(std::string(arg[iarg++]), TANGENTIAL); - iarg = vec_models.back().tangential_model->parse_coeffs(arg, iarg, narg); - } else{ - error->all(FLERR, "Illegal pair_coeff command, 'tangential' keyword expected"); - } - //Parse optional arguments while (iarg < narg) { - if (strcmp(arg[iarg], "damping") == 0) { + + if (strcmp(arg[iarg++], "tangential") == 0) { + if (iarg >= narg) + error->all(FLERR,"Illegal pair_coeff command, must specify " + "tangential model after tangential keyword"); + vec_models.back().init_model(std::string(arg[iarg++]), TANGENTIAL); + iarg = vec_models.back().tangential_model->parse_coeffs(arg, iarg, narg); + + } else if (strcmp(arg[iarg], "damping") == 0) { iarg++; if (iarg >= narg) error->all(FLERR, "Illegal pair_coeff command, must specify " "damping model after damping keyword"); vec_models.back().init_model(std::string(arg[iarg++]), DAMPING); iarg = vec_models.back().damping_model->parse_coeffs(arg, iarg, narg); + } else if (strcmp(arg[iarg], "rolling") == 0) { iarg++; if (iarg >= narg) @@ -386,6 +384,7 @@ void PairGranular::coeff(int narg, char **arg) "twisting model after twisting keyword"); vec_models.back().init_model(std::string(arg[iarg++]), TWISTING); iarg = vec_models.back().twisting_model->parse_coeffs(arg, iarg, narg); + } else if (strcmp(arg[iarg], "heat") == 0) { iarg++; if (iarg >= narg) @@ -394,6 +393,7 @@ void PairGranular::coeff(int narg, char **arg) vec_models.back().init_model(std::string(arg[iarg++]), HEAT); iarg = vec_models.back().heat_model->parse_coeffs(arg, iarg, narg); heat_flag = 1; + } else if (strcmp(arg[iarg], "cutoff") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters for cutoff keyword"); @@ -576,6 +576,8 @@ double PairGranular::init_one(int i, int j) for (int k = 0; k < NSUBMODELS; k++) vec_models.back().sub_models[k]->history_index = models[i][i]->sub_models[k]->history_index; + + cutoff_type[i][j] = cutoff_type[j][i] = MAX(cutoff_type[i][i], cutoff_type[j][j]); } // Check if heat model is defined for all type combinations @@ -732,7 +734,6 @@ double PairGranular::single(int i, int j, int itype, int jtype, double *radius = atom->radius; // Reset model and copy initial geometric data - models[itype][jtype]->reset_contact(); models[itype][jtype]->xi = x[i]; models[itype][jtype]->xj = x[j]; models[itype][jtype]->radi = radius[i]; From b61cfb7480bbc342468e01710ae7884bc9877d1b Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 16 Sep 2022 09:06:52 -0600 Subject: [PATCH 023/445] Fixing errors in gran/wall reff calculation and adding heat capabilities --- doc/src/fix_wall_gran.rst | 15 +++++++++++++-- doc/src/fix_wall_gran_region.rst | 14 +++++++++++++- src/GRANULAR/contact.cpp | 18 +++++++++++------- src/GRANULAR/contact.h | 4 ++-- src/GRANULAR/fix_wall_gran.cpp | 12 +++++++++++- src/GRANULAR/fix_wall_gran_region.cpp | 2 ++ src/GRANULAR/pair_granular.cpp | 7 +++++++ 7 files changed, 59 insertions(+), 13 deletions(-) diff --git a/doc/src/fix_wall_gran.rst b/doc/src/fix_wall_gran.rst index cf8b659df0..7fa047a07f 100644 --- a/doc/src/fix_wall_gran.rst +++ b/doc/src/fix_wall_gran.rst @@ -46,7 +46,7 @@ Syntax radius = cylinder radius (distance units) * zero or more keyword/value pairs may be appended to args -* keyword = *wiggle* or *shear* or *contacts* +* keyword = *wiggle* or *shear* or *contacts* or *temperature* .. parsed-literal:: @@ -59,6 +59,8 @@ Syntax vshear = magnitude of shear velocity (velocity units) *contacts* value = none generate contact information for each particle + *temperature* value = temperature + specify temperature of wall Examples @@ -71,7 +73,7 @@ Examples fix 2 all wall/gran hooke 100000.0 20000.0 50.0 30.0 0.5 1 zcylinder 15.0 wiggle z 3.0 2.0 fix 3 all wall/gran/region granular hooke 1000.0 50.0 tangential linear_nohistory 1.0 0.4 damping velocity region myBox fix 4 all wall/gran/region granular jkr 1e5 1500.0 0.3 10.0 tangential mindlin NULL 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall region myCone - fix 5 all wall/gran/region granular dmt 1e5 0.2 0.3 10.0 tangential mindlin NULL 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall damping tsuji region myCone + fix 5 all wall/gran/region granular dmt 1e5 0.2 0.3 10.0 tangential mindlin NULL 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall damping tsuji heat 10 region myCone temperature 1.0 fix 6 all wall/gran hooke 200000.0 NULL 50.0 NULL 0.5 0 xplane -10.0 10.0 contacts Description @@ -177,6 +179,15 @@ the clockwise direction for *vshear* > 0 or counter-clockwise for *vshear* < 0. In this case, *vshear* is the tangential velocity of the wall at whatever *radius* has been defined. +The *temperature* keyword is used to assign a temperature to the wall. +The following value can either be a numeric value or an equal-style +:doc:`variable `. If the value is a variable, it should be +specified as v_name, where name is the variable name. In this case, the +variable will be evaluated each timestep, and its value used to determine +the temperature. This option must be used in conjunction with a heat +conduction model defined in :doc:`pair_style granular ` +and a compatible atom style which stores temperature and a heat flux +as defined by the :doc:`atom_style sphere/temp ` command. Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/fix_wall_gran_region.rst b/doc/src/fix_wall_gran_region.rst index 5a4c983554..9dbf691ead 100644 --- a/doc/src/fix_wall_gran_region.rst +++ b/doc/src/fix_wall_gran_region.rst @@ -36,12 +36,14 @@ Syntax * wallstyle = region (see :doc:`fix wall/gran ` for options for other kinds of walls) * region-ID = region whose boundary will act as wall -* keyword = *contacts* +* keyword = *contacts* or *temperature* .. parsed-literal:: *contacts* value = none generate contact information for each particle + *temperature* value = temperature + specify temperature of wall Examples """""""" @@ -200,6 +202,16 @@ values for the 6 wall/particle coefficients than for particle/particle interactions. E.g. if you wish to model the wall as a different material. +The *temperature* keyword is used to assign a temperature to the wall. +The following value can either be a numeric value or an equal-style +:doc:`variable `. If the value is a variable, it should be +specified as v_name, where name is the variable name. In this case, the +variable will be evaluated each timestep, and its value used to determine +the temperature. This option must be used in conjunction with a heat +conduction model defined in :doc:`pair_style granular ` +and a compatible atom style which stores temperature and a heat flux +as defined by the :doc:`atom_style sphere/temp ` command. + Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index f72245def3..9e4542da08 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -328,20 +328,24 @@ void ContactModel::read_restart(FILE *fp) /* ---------------------------------------------------------------------- */ -bool ContactModel::check_contact(double rtemp) +bool ContactModel::check_contact() { if (contact_type == WALL) { // Used by fix_wall_gran.cpp + // radj = radius of wall + // dx already provided rsq = lensq3(dx); radsum = radi; - if (rtemp == 0) Reff = radi; - else Reff = radi * rtemp/(radi + rtemp); + if (radj == 0) Reff = radi; + else Reff = radi * radj / (radi + radj); } else if (contact_type == WALLREGION) { // Used by fix_wall_gran_region.cpp - rsq = rtemp * rtemp; - radsum = radi + radi; - if (rtemp == 0) Reff = radi; - else Reff = radi * rtemp/(radi + rtemp); + // radj = radius of wall + // dx and r already provided + rsq = r * r; + radsum = radi; + if (radj == 0) Reff = radi; + else Reff = radi * radj / (radi + radj); } else { sub3(xi, xj, dx); rsq = lensq3(dx); diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index 4dc88132c0..54ecfeb757 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -51,7 +51,7 @@ class ContactModel : protected Pointers { ContactModel(class LAMMPS *); ~ContactModel(); void init(); - bool check_contact(double = 0); + bool check_contact(); void prep_contact(); void calculate_forces(); double pulloff_distance(double, double); @@ -84,7 +84,7 @@ class ContactModel : protected Pointers { // Contact properties/output double forces[3], torquesi[3], torquesj[3], dq; - double radi, radj, rwall, meff, dt, Ti, Tj, area; + double radi, radj, meff, dt, Ti, Tj, area; double Fntot, magtortwist; double *xi, *xj, *vi, *vj, *omegai, *omegaj; diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index aca9341a58..6672a67387 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -354,6 +354,15 @@ void FixWallGran::init() if (utils::strmatch(update->integrate_style,"^respa")) nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + // check for compatible heat conduction atom style + + if (heat_flag) { + if (!atom->temperature_flag) + error->all(FLERR,"Heat conduction in fix wall/gran requires atom style with temperature property"); + if (!atom->heatflux_flag) + error->all(FLERR,"Heat conduction in fix wall/gran requires atom style with heatflux property"); + } + // check for FixRigid so can extract rigid body masses fix_rigid = nullptr; @@ -529,9 +538,10 @@ void FixWallGran::post_force(int /*vflag*/) model->dx[1] = dy; model->dx[2] = dz; model->radi = radius[i]; + model->radj = rwall; if (model->beyond_contact) model->touch = history_one[i][0]; - touchflag = model->check_contact(rwall); + touchflag = model->check_contact(); if (!touchflag) { if (use_history) diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 155b872e10..4058a31614 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -230,6 +230,8 @@ void FixWallGranRegion::post_force(int /*vflag*/) model->dx[1] = region->contact[ic].dely; model->dx[2] = region->contact[ic].delz; model->radi = radius[i]; + model->radj = region->contact[ic].radius; + model->r = region->contact[ic].r; if (model->beyond_contact) model->touch = history_many[i][c2r[ic]][0]; touchflag = model->check_contact(region->contact[ic].r); diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index b376bb64c1..9e512c78c0 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -442,6 +442,13 @@ void PairGranular::init_style() if (comm->ghost_velocity == 0) error->all(FLERR,"Pair granular requires ghost atoms store velocity"); + if (heat_flag) { + if (!atom->temperature_flag) + error->all(FLERR,"Heat conduction in pair granular requires atom style with temperature property"); + if (!atom->heatflux_flag) + error->all(FLERR,"Heat conduction in pair granular requires atom style with heatflux property"); + } + // allocate history and initialize models int size_max[NSUBMODELS] = {0}; From 71db9f5e75d4bd21a195d9e3c006c2277d7c4617 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 16 Sep 2022 14:16:34 -0600 Subject: [PATCH 024/445] Fixing tangential damping coefficient --- src/GRANULAR/contact.cpp | 8 ++--- src/GRANULAR/contact_damping_models.cpp | 12 ++++--- src/GRANULAR/contact_damping_models.h | 2 +- src/GRANULAR/contact_normal_models.cpp | 7 ++-- src/GRANULAR/contact_normal_models.h | 14 ++++---- src/GRANULAR/contact_tangential_models.cpp | 37 ++++++++++------------ src/GRANULAR/contact_tangential_models.h | 1 - src/GRANULAR/contact_twisting_models.cpp | 2 +- 8 files changed, 39 insertions(+), 44 deletions(-) diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index 9e4542da08..cd2c323a59 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -202,7 +202,7 @@ int ContactModel::init_classic_model(char **arg, int iarg, int narg) normal_model->coeffs[0] = kn; normal_model->coeffs[1] = gamman; tangential_model->coeffs[0] = kt; - tangential_model->coeffs[1] = gammat; + tangential_model->coeffs[1] = gammat / gamman; tangential_model->coeffs[2] = xmu; normal_model->coeffs_to_local(); @@ -364,7 +364,7 @@ void ContactModel::prep_contact() double temp[3]; // Standard geometric quantities - r = sqrt(rsq); + if (contact_type != WALLREGION) r = sqrt(rsq); rinv = 1.0 / r; delta = radsum - r; dR = delta * Reff; @@ -420,11 +420,9 @@ void ContactModel::calculate_forces() Fdamp = damping_model->calculate_forces(); Fntot = Fne + Fdamp; - - normal_model->set_fncrit(); // Needed for tangential, rolling, twisting - if (limit_damping && Fntot < 0.0) Fntot = 0.0; + normal_model->set_fncrit(); // Needed for tangential, rolling, twisting tangential_model->calculate_forces(); if (rolling_defined) rolling_model->calculate_forces(); if (twisting_defined) twisting_model->calculate_forces(); diff --git a/src/GRANULAR/contact_damping_models.cpp b/src/GRANULAR/contact_damping_models.cpp index a003d181d9..07b6b88649 100644 --- a/src/GRANULAR/contact_damping_models.cpp +++ b/src/GRANULAR/contact_damping_models.cpp @@ -56,7 +56,8 @@ DampingVelocity::DampingVelocity(LAMMPS *lmp) : DampingModel(lmp) {} double DampingVelocity::calculate_forces() { - return -damp * contact->vnnr; + damp_prefactor = damp; + return -damp_prefactor * contact->vnnr; } /* ---------------------------------------------------------------------- @@ -69,7 +70,8 @@ DampingMassVelocity::DampingMassVelocity(LAMMPS *lmp) : DampingModel(lmp) {} double DampingMassVelocity::calculate_forces() { - return -damp * contact->meff * contact->vnnr; + damp_prefactor = damp * contact->meff; + return -damp_prefactor * contact->vnnr; } /* ---------------------------------------------------------------------- @@ -82,7 +84,8 @@ DampingViscoelastic::DampingViscoelastic(LAMMPS *lmp) : DampingModel(lmp) {} double DampingViscoelastic::calculate_forces() { - return -damp * contact->meff * contact->area * contact->vnnr; + damp_prefactor = damp * contact->meff * contact->area; + return -damp_prefactor * contact->vnnr; } /* ---------------------------------------------------------------------- @@ -105,5 +108,6 @@ void DampingTsuji::init() double DampingTsuji::calculate_forces() { - return -damp * sqrt(contact->meff * contact->normal_model->knfac) * contact->vnnr; + damp_prefactor = damp * sqrt(contact->meff * contact->normal_model->knfac); + return -damp_prefactor * contact->vnnr; } diff --git a/src/GRANULAR/contact_damping_models.h b/src/GRANULAR/contact_damping_models.h index 611393da9f..222e901160 100644 --- a/src/GRANULAR/contact_damping_models.h +++ b/src/GRANULAR/contact_damping_models.h @@ -28,7 +28,7 @@ class DampingModel : public SubModel { virtual void mix_coeffs(double*, double*) {}; virtual void init(); virtual double calculate_forces() = 0; - double damp; + double damp, damp_prefactor; }; /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index 9e0a377eb9..ed14eb93b4 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -45,12 +45,11 @@ bool NormalModel::touch() return touchflag; } -/* ---------------------------------------------------------------------- - called outside of compute(), do not assume geometry defined in contact -------------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- */ double NormalModel::pulloff_distance(double radi, double radj) { + //called outside of compute(), do not assume correct geometry defined in contact return radi + radj; } @@ -112,7 +111,7 @@ double NormalHooke::calculate_forces() void NormalHooke::set_knfac() { - knfac = k * contact->area; + knfac = k; } /* ---------------------------------------------------------------------- diff --git a/src/GRANULAR/contact_normal_models.h b/src/GRANULAR/contact_normal_models.h index 6d47dd3736..66217e32a2 100644 --- a/src/GRANULAR/contact_normal_models.h +++ b/src/GRANULAR/contact_normal_models.h @@ -28,8 +28,8 @@ class NormalModel : public SubModel { virtual bool touch(); virtual double pulloff_distance(double, double); virtual double calculate_area(); - virtual double calculate_forces() = 0; virtual void set_knfac() = 0; + virtual double calculate_forces() = 0; virtual void set_fncrit(); double damp; // Vestigial argument needed by damping double Emod, poiss; @@ -42,8 +42,8 @@ class NormalModel : public SubModel { class NormalNone : public NormalModel { public: NormalNone(class LAMMPS *); - double calculate_forces(); void set_knfac() {}; + double calculate_forces(); }; /* ---------------------------------------------------------------------- */ @@ -52,8 +52,8 @@ class NormalHooke : public NormalModel { public: NormalHooke(class LAMMPS *); void coeffs_to_local() override; - double calculate_forces(); void set_knfac(); + double calculate_forces(); protected: double k; }; @@ -64,8 +64,8 @@ class NormalHertz : public NormalModel { public: NormalHertz(class LAMMPS *); void coeffs_to_local() override; - double calculate_forces(); void set_knfac(); + double calculate_forces(); protected: double k; }; @@ -86,8 +86,8 @@ class NormalDMT : public NormalModel { NormalDMT(class LAMMPS *); void coeffs_to_local() override; void mix_coeffs(double*, double*) override; - double calculate_forces(); void set_knfac(); + double calculate_forces(); void set_fncrit() override; protected: double k, cohesion; @@ -104,8 +104,8 @@ class NormalJKR : public NormalModel { bool touch() override; double pulloff_distance(double, double) override; double calculate_area() override; - double calculate_forces() override; - void set_knfac() override; + void set_knfac(); + double calculate_forces(); void set_fncrit() override; protected: double k, cohesion; diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index 46b370d15f..0349927731 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -30,13 +30,6 @@ using namespace MathExtra; TangentialModel::TangentialModel(LAMMPS *lmp) : SubModel(lmp) {} -/* ---------------------------------------------------------------------- */ - -void TangentialModel::init() -{ - damp = xt * contact->damping_model->damp; -} - /* ---------------------------------------------------------------------- No model ------------------------------------------------------------------------- */ @@ -69,16 +62,17 @@ void TangentialLinearNoHistory::coeffs_to_local() void TangentialLinearNoHistory::calculate_forces() { - double Fscrit, fsmag, Ft; - // classic pair gran/hooke (no history) - Fscrit = mu * contact->normal_model->Fncrit; - fsmag = damp * contact->vrel; + damp = xt * contact->damping_model->damp_prefactor; + + double Fscrit = mu * contact->normal_model->Fncrit; + double fsmag = damp * contact->vrel; + + double Ft; if (contact->vrel != 0.0) Ft = MIN(Fscrit, fsmag) / contact->vrel; else Ft = 0.0; - Ft = -Ft; - scale3(Ft, contact->vtr, contact->fs); + scale3(-Ft, contact->vtr, contact->fs); } /* ---------------------------------------------------------------------- @@ -107,11 +101,12 @@ void TangentialLinearHistory::coeffs_to_local() void TangentialLinearHistory::calculate_forces() { - double Fscrit, magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; + double magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; int frame_update = 0; - Fscrit = contact->normal_model->Fncrit * mu; + damp = xt * contact->damping_model->damp_prefactor; + double Fscrit = contact->normal_model->Fncrit * mu; double *history = & contact->history[history_index]; // rotate and update displacements / force. @@ -140,8 +135,7 @@ void TangentialLinearHistory::calculate_forces() } // tangential forces = history + tangential velocity damping - temp_dbl = -damp; - scale3(temp_dbl, contact->vtr, contact->fs); + scale3(-damp, contact->vtr, contact->fs); // rescale frictional displacements and forces if needed magfs = len3(contact->fs); @@ -205,12 +199,14 @@ void TangentialMindlin::mix_coeffs(double* icoeffs, double* jcoeffs) void TangentialMindlin::calculate_forces() { - double Fscrit, k_scaled, magfs, rsht, shrmag, prjmag, temp_dbl; + double k_scaled, magfs, rsht, shrmag, prjmag, temp_dbl; double temp_array[3]; int frame_update = 0; + damp = xt * contact->damping_model->damp_prefactor; + double *history = & contact->history[history_index]; - Fscrit = contact->normal_model->Fncrit * mu; + double Fscrit = contact->normal_model->Fncrit * mu; k_scaled = k * contact->area; if (mindlin_rescale) { @@ -256,8 +252,7 @@ void TangentialMindlin::calculate_forces() } // tangential forces = history + tangential velocity damping - temp_dbl = -damp; - scale3(temp_dbl, contact->vtr, contact->fs); + scale3(-damp, contact->vtr, contact->fs); if (!mindlin_force) { scale3(k_scaled, history, temp_array); diff --git a/src/GRANULAR/contact_tangential_models.h b/src/GRANULAR/contact_tangential_models.h index 812eb62e55..9c0092dabc 100644 --- a/src/GRANULAR/contact_tangential_models.h +++ b/src/GRANULAR/contact_tangential_models.h @@ -24,7 +24,6 @@ class TangentialModel : public SubModel { TangentialModel(class LAMMPS *); virtual ~TangentialModel() {}; virtual void coeffs_to_local() {}; - virtual void init(); virtual void calculate_forces() = 0; int rescale_flag; double k, damp, mu; // Used by Marshall twisting model diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/GRANULAR/contact_twisting_models.cpp index 52b37d46e1..14b998d32f 100644 --- a/src/GRANULAR/contact_twisting_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -50,7 +50,7 @@ TwistingMarshall::TwistingMarshall(LAMMPS *lmp) : TwistingModel(lmp) void TwistingMarshall::init() { k_tang = contact->tangential_model->k; - damp_tang = contact->tangential_model->damp; + damp_tang = contact->tangential_model->damp_tangential; mu_tang = contact->tangential_model->mu; } From c9ba3f415715e6a6cfa3dca780c24737d77b6f87 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 16 Sep 2022 16:56:20 -0600 Subject: [PATCH 025/445] Adding classic tangential models --- src/GRANULAR/contact.cpp | 22 ++-- src/GRANULAR/contact.h | 1 + src/GRANULAR/contact_tangential_models.cpp | 116 ++++++++++++++++++--- src/GRANULAR/contact_tangential_models.h | 17 +++ src/GRANULAR/contact_twisting_models.cpp | 2 +- src/GRANULAR/fix_wall_gran.cpp | 2 + src/GRANULAR/fix_wall_gran_region.cpp | 2 +- src/contact.h | 19 ++-- 8 files changed, 145 insertions(+), 36 deletions(-) diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index cd2c323a59..b7c4e7c0e4 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -45,11 +45,9 @@ ContactModel::ContactModel(LAMMPS *lmp) : Pointers(lmp) limit_damping = 0; beyond_contact = 0; nondefault_history_transfer = 0; - + classic_model = 0; contact_type = PAIR; - reset_contact(); - normal_model = nullptr; damping_model = nullptr; tangential_model = nullptr; @@ -95,6 +93,7 @@ void ContactModel::init_model(std::string model_name, ModelType model_type) if (model_name == "none") tangential_model = new TangentialNone(lmp); else if (model_name == "linear_nohistory") tangential_model = new TangentialLinearNoHistory(lmp); else if (model_name == "linear_history") tangential_model = new TangentialLinearHistory(lmp); + else if (model_name == "linear_history_classic") tangential_model = new TangentialLinearHistoryClassic(lmp); else if (model_name == "mindlin") tangential_model = new TangentialMindlin(lmp); else if (model_name == "mindlin/force") tangential_model = new TangentialMindlinForce(lmp); else if (model_name == "mindlin_rescale") tangential_model = new TangentialMindlinRescale(lmp); @@ -157,6 +156,8 @@ int ContactModel::init_classic_model(char **arg, int iarg, int narg) { double kn, kt, gamman, gammat, xmu; + classic_model = 1; + if (iarg + 6 >= narg) error->all(FLERR,"Insufficient arguments provided for classic gran model command"); @@ -182,7 +183,7 @@ int ContactModel::init_classic_model(char **arg, int iarg, int narg) init_model("mass_velocity", DAMPING); } else if (strcmp(arg[iarg],"hooke/history") == 0) { init_model("hooke", NORMAL); - init_model("linear_history", TANGENTIAL); + init_model("linear_history_classic", TANGENTIAL); init_model("mass_velocity", DAMPING); } else if (strcmp(arg[iarg],"hertz/history") == 0) { // convert Kn and Kt from pressure units to force/distance^2 if Hertzian @@ -435,13 +436,18 @@ void ContactModel::calculate_forces() //May need to rethink eventually tris.. cross3(nx, fs, torquesi); - double dist_to_contact = radi - 0.5 * delta; - scale3(dist_to_contact, torquesi); + double dist_to_contact; + if (!classic_model) { + dist_to_contact = radi - 0.5 * delta; + scale3(dist_to_contact, torquesi); + } if (contact_type == PAIR) { copy3(torquesi, torquesj); - dist_to_contact = radj - 0.5 * delta; - scale3(dist_to_contact, torquesj); + if (!classic_model) { + dist_to_contact = radj - 0.5 * delta; + scale3(dist_to_contact, torquesj); + } } double torroll[3]; diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index 54ecfeb757..632555a21f 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -97,6 +97,7 @@ class ContactModel : protected Pointers { protected: int rolling_defined, twisting_defined, heat_defined; // Used to quickly skip undefined submodels + int classic_model; }; } // namespace Contact diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index 0349927731..1ac8c1c44c 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -73,6 +73,7 @@ void TangentialLinearNoHistory::calculate_forces() else Ft = 0.0; scale3(-Ft, contact->vtr, contact->fs); + } /* ---------------------------------------------------------------------- @@ -101,7 +102,8 @@ void TangentialLinearHistory::coeffs_to_local() void TangentialLinearHistory::calculate_forces() { - double magfs, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; + // Note: this is the same as the base Mindlin calculation except k isn't scaled by area + double magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; int frame_update = 0; damp = xt * contact->damping_model->damp_prefactor; @@ -117,8 +119,11 @@ void TangentialLinearHistory::calculate_forces() if (frame_update) { shrmag = len3(history); + // projection - scale3(rsht, contact->nx, history); + scale3(rsht, contact->nx, temp_array); + sub3(history, temp_array, history); + // also rescale to preserve magnitude prjmag = len3(history); if (prjmag > 0) temp_dbl = shrmag / prjmag; @@ -126,27 +131,30 @@ void TangentialLinearHistory::calculate_forces() scale3(temp_dbl, history); } - // update history - // tangential force + // update history, tangential force // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - temp_dbl = k * contact->dt; - scale3(temp_dbl, contact->vtr, temp_array); - sub3(history, temp_array, history); + scale3(contact->dt, contact->vtr, temp_array); + add3(history, temp_array, history); } // tangential forces = history + tangential velocity damping - scale3(-damp, contact->vtr, contact->fs); + scale3(-k, history, contact->fs); + scale3(damp, contact->vtr, temp_array); + sub3(contact->fs, temp_array, contact->fs); // rescale frictional displacements and forces if needed magfs = len3(contact->fs); if (magfs > Fscrit) { shrmag = len3(history); if (shrmag != 0.0) { - temp_dbl = Fscrit / magfs; + magfs_inv = 1.0 / magfs; + temp_dbl = Fscrit * magfs_inv; scale3(temp_dbl, contact->fs, history); scale3(damp, contact->vtr, temp_array); add3(history, temp_array, history); - temp_dbl = Fscrit / magfs; + temp_dbl = -1.0 / k; + scale3(temp_dbl, history); + temp_dbl = Fscrit * magfs_inv; scale3(temp_dbl, contact->fs); } else { zero3(contact->fs); @@ -154,6 +162,80 @@ void TangentialLinearHistory::calculate_forces() } } +/* ---------------------------------------------------------------------- + Linear model with history from pair gran/hooke/history +------------------------------------------------------------------------- */ + +TangentialLinearHistoryClassic::TangentialLinearHistoryClassic(LAMMPS *lmp) : TangentialLinearHistory(lmp) +{ + scale_area = 0; +} + +/* ---------------------------------------------------------------------- */ + +void TangentialLinearHistoryClassic::calculate_forces() +{ + double k_scaled, magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; + double temp_array[3]; + int frame_update = 0; + + k_scaled = k; + if (scale_area) k_scaled *= contact->area; + + damp = xt * contact->damping_model->damp_prefactor; + + double Fscrit = contact->normal_model->Fncrit * mu; + double *history = & contact->history[history_index]; + + // update history + if (contact->history_update) { + scale3(contact->dt, contact->vtr, temp_array); + add3(history, temp_array, history); + } + + shrmag = len3(history); + + // rotate shear displacements + if (contact->history_update) { + rsht = dot3(history, contact->nx); + scale3(rsht, contact->nx, temp_array); + sub3(history, temp_array, history); + } + + // tangential forces = history + tangential velocity damping + scale3(-k_scaled, history, contact->fs); + scale3(damp, contact->vtr, temp_array); + sub3(contact->fs, temp_array, contact->fs); + + // rescale frictional displacements and forces if needed + magfs = len3(contact->fs); + if (magfs > Fscrit) { + if (shrmag != 0.0) { + magfs_inv = 1.0 / magfs; + temp_dbl = Fscrit * magfs_inv; + scale3(temp_dbl, contact->fs, history); + scale3(damp, contact->vtr, temp_array); + add3(history, temp_array, history); + temp_dbl = -1.0 / k_scaled; + if (scale_area) temp_dbl /= contact->area; + scale3(temp_dbl, history); + temp_dbl = Fscrit * magfs_inv; + scale3(temp_dbl, contact->fs); + } else { + zero3(contact->fs); + } + } +} + +/* ---------------------------------------------------------------------- + Mindlin from pair gran/hertz/history +------------------------------------------------------------------------- */ + +TangentialMindlinClassic::TangentialMindlinClassic(LAMMPS *lmp) : TangentialLinearHistoryClassic(lmp) +{ + scale_area = 1; +} + /* ---------------------------------------------------------------------- Mindlin model ------------------------------------------------------------------------- */ @@ -199,7 +281,7 @@ void TangentialMindlin::mix_coeffs(double* icoeffs, double* jcoeffs) void TangentialMindlin::calculate_forces() { - double k_scaled, magfs, rsht, shrmag, prjmag, temp_dbl; + double k_scaled, magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; double temp_array[3]; int frame_update = 0; @@ -229,7 +311,8 @@ void TangentialMindlin::calculate_forces() if (frame_update) { shrmag = len3(history); // projection - scale3(rsht, contact->nx, history); + scale3(rsht, contact->nx, temp_array); + sub3(history, temp_array, history); // also rescale to preserve magnitude prjmag = len3(history); if (prjmag > 0) temp_dbl = shrmag / prjmag; @@ -256,7 +339,7 @@ void TangentialMindlin::calculate_forces() if (!mindlin_force) { scale3(k_scaled, history, temp_array); - add3(contact->fs, temp_array, contact->fs); + sub3(contact->fs, temp_array, contact->fs); } // rescale frictional displacements and forces if needed @@ -264,15 +347,16 @@ void TangentialMindlin::calculate_forces() if (magfs > Fscrit) { shrmag = len3(history); if (shrmag != 0.0) { - temp_dbl = Fscrit / magfs; + magfs_inv = 1.0 / magfs; + temp_dbl = Fscrit * magfs_inv; scale3(temp_dbl, contact->fs, history); scale3(damp, contact->vtr, temp_array); add3(history, temp_array, history); - if (! mindlin_force) { + if (!mindlin_force) { temp_dbl = -1.0 / k_scaled; scale3(temp_dbl, history); } - temp_dbl = Fscrit / magfs; + temp_dbl = Fscrit * magfs_inv; scale3(temp_dbl, contact->fs); } else { zero3(contact->fs); diff --git a/src/GRANULAR/contact_tangential_models.h b/src/GRANULAR/contact_tangential_models.h index 9c0092dabc..a54d03c495 100644 --- a/src/GRANULAR/contact_tangential_models.h +++ b/src/GRANULAR/contact_tangential_models.h @@ -24,6 +24,7 @@ class TangentialModel : public SubModel { TangentialModel(class LAMMPS *); virtual ~TangentialModel() {}; virtual void coeffs_to_local() {}; + virtual void init() {}; virtual void calculate_forces() = 0; int rescale_flag; double k, damp, mu; // Used by Marshall twisting model @@ -59,6 +60,22 @@ class TangentialLinearHistory : public TangentialModel { /* ---------------------------------------------------------------------- */ +class TangentialLinearHistoryClassic : public TangentialLinearHistory { + public: + TangentialLinearHistoryClassic(class LAMMPS *); + void calculate_forces(); + int scale_area; +}; + +/* ---------------------------------------------------------------------- */ + +class TangentialMindlinClassic : public TangentialLinearHistoryClassic { + public: + TangentialMindlinClassic(class LAMMPS *); +}; + +/* ---------------------------------------------------------------------- */ + class TangentialMindlin : public TangentialModel { public: TangentialMindlin(class LAMMPS *); diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/GRANULAR/contact_twisting_models.cpp index 14b998d32f..52b37d46e1 100644 --- a/src/GRANULAR/contact_twisting_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -50,7 +50,7 @@ TwistingMarshall::TwistingMarshall(LAMMPS *lmp) : TwistingModel(lmp) void TwistingMarshall::init() { k_tang = contact->tangential_model->k; - damp_tang = contact->tangential_model->damp_tangential; + damp_tang = contact->tangential_model->damp; mu_tang = contact->tangential_model->mu; } diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 6672a67387..05e060e61c 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -30,6 +30,7 @@ #include "contact_heat_models.h" #include "domain.h" #include "error.h" +#include "input.h" #include "math_const.h" #include "math_extra.h" #include "memory.h" @@ -37,6 +38,7 @@ #include "neighbor.h" #include "respa.h" #include "update.h" +#include "variable.h" #include diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 4058a31614..2e57e335f7 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -234,7 +234,7 @@ void FixWallGranRegion::post_force(int /*vflag*/) model->r = region->contact[ic].r; if (model->beyond_contact) model->touch = history_many[i][c2r[ic]][0]; - touchflag = model->check_contact(region->contact[ic].r); + touchflag = model->check_contact(); if (!touchflag) { if (use_history) diff --git a/src/contact.h b/src/contact.h index cd680b220a..632555a21f 100644 --- a/src/contact.h +++ b/src/contact.h @@ -31,10 +31,10 @@ enum ModelType { HEAT = 5 }; // Relative order matters since some derive coeffs from others -enum WallType { - NONE = 0, - RWALL = 1, - RDUPLICATE = 2 +enum ContactType { + PAIR = 0, + WALL = 1, + WALLREGION = 2 }; // forward declaration @@ -51,8 +51,7 @@ class ContactModel : protected Pointers { ContactModel(class LAMMPS *); ~ContactModel(); void init(); - bool check_contact(double = 0); - void reset_contact(); + bool check_contact(); void prep_contact(); void calculate_forces(); double pulloff_distance(double, double); @@ -75,7 +74,7 @@ class ContactModel : protected Pointers { // Extra options int beyond_contact, limit_damping, history_update; - WallType wall_type; + ContactType contact_type; // History variables int size_history, nondefault_history_transfer; @@ -85,7 +84,7 @@ class ContactModel : protected Pointers { // Contact properties/output double forces[3], torquesi[3], torquesj[3], dq; - double radi, radj, rwall, meff, dt, Ti, Tj, area; + double radi, radj, meff, dt, Ti, Tj, area; double Fntot, magtortwist; double *xi, *xj, *vi, *vj, *omegai, *omegaj; @@ -97,8 +96,8 @@ class ContactModel : protected Pointers { bool touch; protected: - int rolling_defined, twisting_defined, heat_defined; - int prep_flag, check_flag; + int rolling_defined, twisting_defined, heat_defined; // Used to quickly skip undefined submodels + int classic_model; }; } // namespace Contact From 7f16225ffbc8842239f34da434d75c9902602dbe Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 16 Sep 2022 16:57:32 -0600 Subject: [PATCH 026/445] Removing leftover file --- src/contact.h | 106 -------------------------------------------------- 1 file changed, 106 deletions(-) delete mode 100644 src/contact.h diff --git a/src/contact.h b/src/contact.h deleted file mode 100644 index 632555a21f..0000000000 --- a/src/contact.h +++ /dev/null @@ -1,106 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef LMP_CONTACT_H -#define LMP_CONTACT_H - -#include "pointers.h" // IWYU pragma: export - -namespace LAMMPS_NS { -namespace Contact { - -#define EPSILON 1e-10 -#define NSUBMODELS 6 - -enum ModelType { - NORMAL = 0, - DAMPING = 1, - TANGENTIAL = 2, - ROLLING = 3, - TWISTING = 4, - HEAT = 5 -}; // Relative order matters since some derive coeffs from others - -enum ContactType { - PAIR = 0, - WALL = 1, - WALLREGION = 2 -}; - -// forward declaration -class NormalModel; -class DampingModel; -class TangentialModel; -class RollingModel; -class TwistingModel; -class HeatModel; -class SubModel; - -class ContactModel : protected Pointers { - public: - ContactModel(class LAMMPS *); - ~ContactModel(); - void init(); - bool check_contact(); - void prep_contact(); - void calculate_forces(); - double pulloff_distance(double, double); - - void init_model(std::string, ModelType); - int init_classic_model(char **, int, int); - int mix_coeffs(ContactModel*, ContactModel*); - - void write_restart(FILE *); - void read_restart(FILE *); - - // Sub models - NormalModel *normal_model; - DampingModel *damping_model; - TangentialModel *tangential_model; - RollingModel *rolling_model; - TwistingModel *twisting_model; - HeatModel *heat_model; - SubModel *sub_models[NSUBMODELS]; // Need to resize if we add more model flavors - - // Extra options - int beyond_contact, limit_damping, history_update; - ContactType contact_type; - - // History variables - int size_history, nondefault_history_transfer; - double *transfer_history_factor; - double *history; - - // Contact properties/output - double forces[3], torquesi[3], torquesj[3], dq; - - double radi, radj, meff, dt, Ti, Tj, area; - double Fntot, magtortwist; - - double *xi, *xj, *vi, *vj, *omegai, *omegaj; - double fs[3], fr[3], ft[3]; - - double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; - double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; - double magtwist; - bool touch; - - protected: - int rolling_defined, twisting_defined, heat_defined; // Used to quickly skip undefined submodels - int classic_model; -}; - -} // namespace Contact -} // namespace LAMMPS_NS - -#endif From 13be68aecef770daf4559a6a69b62696bda7fd8a Mon Sep 17 00:00:00 2001 From: jtclemm Date: Mon, 19 Sep 2022 22:14:59 -0600 Subject: [PATCH 027/445] Fixing argument errors and adding note on datafiles to doc --- doc/src/pair_gran.rst | 5 +++++ doc/src/pair_granular.rst | 5 +++++ src/GRANULAR/contact_tangential_models.cpp | 4 ++-- src/GRANULAR/contact_twisting_models.cpp | 3 +-- src/GRANULAR/contact_twisting_models.h | 2 +- src/GRANULAR/fix_wall_gran.cpp | 3 +-- src/GRANULAR/pair_granular.cpp | 3 ++- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/doc/src/pair_gran.rst b/doc/src/pair_gran.rst index f83fd6d6ab..3249bae866 100644 --- a/doc/src/pair_gran.rst +++ b/doc/src/pair_gran.rst @@ -279,6 +279,11 @@ statistically similar results. This is because the forces they compute depend on atom velocities. See the :doc:`read_restart ` command for more details. +Accumulated values for individual contacts are saved to to restart +files but are not saved to data files. Therefore, forces may +differ significantly when a system is reloaded using A +:doc:`read_data ` command. + Related commands """""""""""""""" diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index 675c8fe4ff..5856db307b 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -780,6 +780,11 @@ statistically similar results. This is because the forces they compute depend on atom velocities. See the :doc:`read_restart ` command for more details. +Accumulated values for individual contacts are saved to to restart +files but are not saved to data files. Therefore, forces may +differ significantly when a system is reloaded using A +:doc:`read_data ` command. + Related commands """""""""""""""" diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index 1ac8c1c44c..d9bb3320b8 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -168,7 +168,7 @@ void TangentialLinearHistory::calculate_forces() TangentialLinearHistoryClassic::TangentialLinearHistoryClassic(LAMMPS *lmp) : TangentialLinearHistory(lmp) { - scale_area = 0; + scale_area = 0; // Sets gran/hooke/history behavior } /* ---------------------------------------------------------------------- */ @@ -233,7 +233,7 @@ void TangentialLinearHistoryClassic::calculate_forces() TangentialMindlinClassic::TangentialMindlinClassic(LAMMPS *lmp) : TangentialLinearHistoryClassic(lmp) { - scale_area = 1; + scale_area = 1; // Sets gran/hertz/history behavior } /* ---------------------------------------------------------------------- diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/GRANULAR/contact_twisting_models.cpp index 52b37d46e1..aca4f958e7 100644 --- a/src/GRANULAR/contact_twisting_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -50,7 +50,6 @@ TwistingMarshall::TwistingMarshall(LAMMPS *lmp) : TwistingModel(lmp) void TwistingMarshall::init() { k_tang = contact->tangential_model->k; - damp_tang = contact->tangential_model->damp; mu_tang = contact->tangential_model->mu; } @@ -63,7 +62,7 @@ void TwistingMarshall::calculate_forces() // Calculate twist coefficients from tangential model & contact geometry // eq 32 of Marshall paper double k = 0.5 * k_tang * contact->area * contact->area; - double damp = 0.5 * damp_tang * contact->area * contact->area; + double damp = 0.5 * contact->tangential_model->damp * contact->area * contact->area; double mu = TWOTHIRDS * mu_tang * contact->area; if (contact->history_update) { diff --git a/src/GRANULAR/contact_twisting_models.h b/src/GRANULAR/contact_twisting_models.h index 724448892a..1fa5aa2c6a 100644 --- a/src/GRANULAR/contact_twisting_models.h +++ b/src/GRANULAR/contact_twisting_models.h @@ -44,7 +44,7 @@ class TwistingMarshall : public TwistingModel { void calculate_forces(); void init(); protected: - double k_tang, damp_tang, mu_tang; + double k_tang, mu_tang; }; /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 05e060e61c..0d6fc587fb 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -83,8 +83,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : int iarg; if (classic_flag) { - iarg = 4; - iarg = model->init_classic_model(arg, iarg, narg); + iarg = model->init_classic_model(arg, 3, narg); if (iarg < narg) { if (strcmp(arg[iarg],"limit_damping") == 0) { diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 9e512c78c0..1e423b92b3 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -354,7 +354,8 @@ void PairGranular::coeff(int narg, char **arg) while (iarg < narg) { - if (strcmp(arg[iarg++], "tangential") == 0) { + if (strcmp(arg[iarg], "tangential") == 0) { + iarg++; if (iarg >= narg) error->all(FLERR,"Illegal pair_coeff command, must specify " "tangential model after tangential keyword"); From dc1b7d4cfece31fd2379737b32a4bbe2db234624 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 21 Sep 2022 16:31:18 -0600 Subject: [PATCH 028/445] Fixing mathematical errors in force/torque calculations --- src/GRANULAR/contact.cpp | 18 +++--- src/GRANULAR/contact.h | 1 + src/GRANULAR/contact_normal_models.cpp | 45 +++++++++----- src/GRANULAR/contact_normal_models.h | 2 +- src/GRANULAR/contact_rolling_models.cpp | 43 +++++++------- src/GRANULAR/contact_sub_models.cpp | 20 +++++++ src/GRANULAR/contact_sub_models.h | 2 + src/GRANULAR/contact_tangential_models.cpp | 69 +++++++++++----------- src/GRANULAR/contact_twisting_models.cpp | 4 +- src/GRANULAR/fix_wall_gran.cpp | 1 + src/GRANULAR/fix_wall_gran_region.cpp | 2 +- src/GRANULAR/pair_granular.cpp | 21 ++++--- 12 files changed, 133 insertions(+), 95 deletions(-) diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index b7c4e7c0e4..5290f13629 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -414,7 +414,7 @@ void ContactModel::calculate_forces() // calculate forces/torques forces[0] = 0.0; - double Fne, Fdamp; + double Fne, Fdamp, dist_to_contact; area = normal_model->calculate_area(); normal_model->set_knfac(); Fne = normal_model->calculate_forces(); @@ -435,18 +435,18 @@ void ContactModel::calculate_forces() //May need to rethink eventually tris.. cross3(nx, fs, torquesi); + scale3(-1, torquesi); + if (contact_type == PAIR) copy3(torquesi, torquesj); - double dist_to_contact; if (!classic_model) { - dist_to_contact = radi - 0.5 * delta; - scale3(dist_to_contact, torquesi); - } - - if (contact_type == PAIR) { - copy3(torquesi, torquesj); - if (!classic_model) { + if (contact_type == PAIR) { + dist_to_contact = radi - 0.5 * delta; + scale3(dist_to_contact, torquesi); dist_to_contact = radj - 0.5 * delta; scale3(dist_to_contact, torquesj); + } else { + dist_to_contact = radi; + scale3(dist_to_contact, torquesi); } } diff --git a/src/GRANULAR/contact.h b/src/GRANULAR/contact.h index 632555a21f..d1a13c5eb1 100644 --- a/src/GRANULAR/contact.h +++ b/src/GRANULAR/contact.h @@ -87,6 +87,7 @@ class ContactModel : protected Pointers { double radi, radj, meff, dt, Ti, Tj, area; double Fntot, magtortwist; + int i, j; double *xi, *xj, *vi, *vj, *omegai, *omegaj; double fs[3], fr[3], ft[3]; diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/GRANULAR/contact_normal_models.cpp index ed14eb93b4..b377d5d027 100644 --- a/src/GRANULAR/contact_normal_models.cpp +++ b/src/GRANULAR/contact_normal_models.cpp @@ -165,7 +165,11 @@ void NormalHertzMaterial::coeffs_to_local() Emod = coeffs[0]; damp = coeffs[1]; poiss = coeffs[2]; - k = FOURTHIRDS * mix_stiffnessE(Emod, Emod, poiss, poiss); + if (contact->contact_type == PAIR) { + k = FOURTHIRDS * mix_stiffnessE(Emod, Emod, poiss, poiss); + } else { + k = FOURTHIRDS * mix_stiffnessE_wall(Emod, poiss); + } if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hertz material normal model"); } @@ -199,7 +203,11 @@ void NormalDMT::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; cohesion = coeffs[3]; - k = FOURTHIRDS * mix_stiffnessE(Emod, Emod, poiss, poiss); + if (contact->contact_type == PAIR) { + k = FOURTHIRDS * mix_stiffnessE(Emod, Emod, poiss, poiss); + } else { + k = FOURTHIRDS * mix_stiffnessE_wall(Emod, poiss); + } if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal DMT normal model"); } @@ -259,8 +267,14 @@ void NormalJKR::coeffs_to_local() damp = coeffs[1]; poiss = coeffs[2]; cohesion = coeffs[3]; - k = FOURTHIRDS * Emod; - Escaled = mix_stiffnessE(Emod, Emod, poiss, poiss); + + if (contact->contact_type == PAIR) { + Emix = mix_stiffnessE(Emod, Emod, poiss, poiss); + } else { + Emix = mix_stiffnessE_wall(Emod, poiss); + } + + k = FOURTHIRDS * Emix; if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal JKR normal model"); } @@ -285,8 +299,8 @@ bool NormalJKR::touch() if (contact->touch) { R2 = contact->Reff * contact->Reff; - area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * R2 / (4.0 * Escaled)); - delta_pulloff = area_at_pulloff * area_at_pulloff / contact->Reff - 2.0 * sqrt(MY_PI * cohesion * area_at_pulloff /Escaled); + area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * R2 / (4.0 * Emix)); + delta_pulloff = area_at_pulloff * area_at_pulloff / contact->Reff - 2.0 * sqrt(MY_PI * cohesion * area_at_pulloff / Emix); dist_pulloff = contact->radsum - delta_pulloff; touchflag = contact->rsq < (dist_pulloff * dist_pulloff); } else { @@ -307,8 +321,8 @@ double NormalJKR::pulloff_distance(double radi, double radj) Reff_tmp = radi * radj / (radi + radj); // May not be defined if (Reff_tmp <= 0) return 0; - area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4.0 * Escaled)); - return area_at_pulloff * area_at_pulloff / Reff_tmp - 2.0 * sqrt(MY_PI * cohesion * area_at_pulloff / Escaled); + area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4.0 * Emix)); + return area_at_pulloff * area_at_pulloff / Reff_tmp - 2.0 * sqrt(MY_PI * cohesion * area_at_pulloff / Emix); } /* ---------------------------------------------------------------------- */ @@ -320,18 +334,18 @@ double NormalJKR::calculate_area() R2 = contact->Reff * contact->Reff; dR2 = contact->dR * contact->dR; - t0 = cohesion * cohesion * R2 * R2 * Escaled; + t0 = cohesion * cohesion * R2 * R2 * Emix; t1 = PI27SQ * t0; - t2 = 8.0 * contact->dR * dR2 * Escaled * Escaled * Escaled; - t3 = 4.0 * dR2 * Escaled; + t2 = 8.0 * contact->dR * dR2 * Emix * Emix * Emix; + t3 = 4.0 * dR2 * Emix; // in case sqrt(0) < 0 due to precision issues sqrt1 = MAX(0, t0 * (t1 + 2.0 * t2)); t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / Escaled; + t5 = t3 / t4 + t4 / Emix; sqrt2 = MAX(0, 2.0 * contact->dR + t5); t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4.0 * contact->dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Escaled * t6)); + sqrt3 = MAX(0, 4.0 * contact->dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Emix * t6)); return INVROOT6 * (t6 + sqrt(sqrt3)); } @@ -341,9 +355,8 @@ double NormalJKR::calculate_area() double NormalJKR::calculate_forces() { double a2; - a2 = contact->area * contact->area; - Fne = Escaled * contact->area * a2 / contact->Reff - MY_2PI * a2 * sqrt(4.0 * cohesion * Escaled / (MY_PI * contact->area)); + Fne = knfac * a2 / contact->Reff - MY_2PI * a2 * sqrt(4.0 * cohesion * Emix / (MY_PI * contact->area)); F_pulloff = 3.0 * MY_PI * cohesion * contact->Reff; return Fne; @@ -353,7 +366,7 @@ double NormalJKR::calculate_forces() void NormalJKR::set_knfac() { - knfac = Escaled * contact->area; + knfac = k * contact->area; } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/contact_normal_models.h b/src/GRANULAR/contact_normal_models.h index 66217e32a2..8159a4c620 100644 --- a/src/GRANULAR/contact_normal_models.h +++ b/src/GRANULAR/contact_normal_models.h @@ -109,7 +109,7 @@ class NormalJKR : public NormalModel { void set_fncrit() override; protected: double k, cohesion; - double Escaled, F_pulloff; + double Emix, F_pulloff; }; } // namespace Contact diff --git a/src/GRANULAR/contact_rolling_models.cpp b/src/GRANULAR/contact_rolling_models.cpp index 956be65353..3ee80c0e48 100644 --- a/src/GRANULAR/contact_rolling_models.cpp +++ b/src/GRANULAR/contact_rolling_models.cpp @@ -50,8 +50,8 @@ RollingSDS::RollingSDS(LAMMPS *lmp) : RollingModel(lmp) void RollingSDS::coeffs_to_local() { k = coeffs[0]; - mu = coeffs[1]; - gamma = coeffs[2]; + gamma = coeffs[1]; + mu = coeffs[2]; if (k < 0.0 || mu < 0.0 || gamma < 0.0) error->all(FLERR, "Illegal SDS rolling model"); @@ -62,7 +62,8 @@ void RollingSDS::coeffs_to_local() void RollingSDS::calculate_forces() { int rhist0, rhist1, rhist2, frameupdate; - double Frcrit, rolldotn, rollmag, prjmag, magfr, hist_temp[3], temp_dbl, temp_array[3]; + double Frcrit, rolldotn, rollmag, prjmag, magfr, hist_temp[3], scalefac, temp_array[3]; + double k_inv, magfr_inv; rhist0 = history_index; rhist1 = rhist0 + 1; @@ -76,49 +77,45 @@ void RollingSDS::calculate_forces() hist_temp[2] = contact->history[rhist2]; rolldotn = dot3(hist_temp, contact->nx); - frameupdate = fabs(rolldotn) * k > EPSILON * Frcrit; + frameupdate = (fabs(rolldotn) * k) > (EPSILON * Frcrit); if (frameupdate) { // rotate into tangential plane rollmag = len3(hist_temp); // projection - temp_dbl = -rolldotn; - scale3(temp_dbl, contact->nx, temp_array); + scale3(rolldotn, contact->nx, temp_array); sub3(hist_temp, temp_array, hist_temp); // also rescale to preserve magnitude prjmag = len3(hist_temp); - if (prjmag > 0) temp_dbl = rollmag / prjmag; - else temp_dbl = 0; - scale3(temp_dbl, hist_temp); + if (prjmag > 0) scalefac = rollmag / prjmag; + else scalefac = 0; + scale3(scalefac, hist_temp); } scale3(contact->dt, contact->vrl, temp_array); add3(hist_temp, temp_array, hist_temp); } - scaleadd3(k, hist_temp, gamma, contact->vrl, contact->fr); - negate3(contact->fr); + scaleadd3(-k, hist_temp, -gamma, contact->vrl, contact->fr); // rescale frictional displacements and forces if needed - magfr = len3(contact->fr); if (magfr > Frcrit) { rollmag = len3(hist_temp); if (rollmag != 0.0) { - temp_dbl = -Frcrit / (magfr * k); - scale3(temp_dbl, contact->fr, temp_array); + k_inv = 1.0 / k; + magfr_inv = 1.0 / magfr; + scale3(-Frcrit * k_inv * magfr_inv, contact->fr, hist_temp); + scale3(-gamma * k_inv, contact->vrl, temp_array); add3(hist_temp, temp_array, hist_temp); - temp_dbl = -gamma/k; - scale3(temp_dbl, contact->vrl, temp_array); - add3(hist_temp, temp_array, hist_temp); - - temp_dbl = Frcrit / magfr; - scale3(temp_dbl, contact->fr); + scale3(Frcrit * magfr_inv, contact->fr); } else { zero3(contact->fr); } } - contact->history[rhist0] = hist_temp[0]; - contact->history[rhist1] = hist_temp[1]; - contact->history[rhist2] = hist_temp[2]; + if (contact->history_update) { + contact->history[rhist0] = hist_temp[0]; + contact->history[rhist1] = hist_temp[1]; + contact->history[rhist2] = hist_temp[2]; + } } diff --git a/src/GRANULAR/contact_sub_models.cpp b/src/GRANULAR/contact_sub_models.cpp index 57834fc040..1c9fe6b4f5 100644 --- a/src/GRANULAR/contact_sub_models.cpp +++ b/src/GRANULAR/contact_sub_models.cpp @@ -110,6 +110,26 @@ double SubModel::mix_stiffnessG(double E1, double E2, return 1 / (factor1 + factor2); } +/* ---------------------------------------------------------------------- + mixing of Young's modulus (E) for walls +------------------------------------------------------------------------- */ + +double SubModel::mix_stiffnessE_wall(double E, double pois) +{ + double factor = 2 * (1 - pois); + return E / factor; +} + +/* ---------------------------------------------------------------------- + mixing of shear modulus (G) for walls +------------------------------------------------------------------------ */ + +double SubModel::mix_stiffnessG_wall(double E, double pois) +{ + double factor = 32.0 * (2 - pois) * (1 + pois); + return E / factor; +} + /* ---------------------------------------------------------------------- mixing of everything else ------------------------------------------------------------------------- */ diff --git a/src/GRANULAR/contact_sub_models.h b/src/GRANULAR/contact_sub_models.h index 730790616d..0f577bf08e 100644 --- a/src/GRANULAR/contact_sub_models.h +++ b/src/GRANULAR/contact_sub_models.h @@ -51,6 +51,8 @@ class SubModel : protected Pointers { double mix_stiffnessE(double, double, double, double); double mix_stiffnessG(double, double, double, double); + double mix_stiffnessE_wall(double, double); + double mix_stiffnessG_wall(double, double); double mix_geom(double, double); }; diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/GRANULAR/contact_tangential_models.cpp index d9bb3320b8..ca95d1d00b 100644 --- a/src/GRANULAR/contact_tangential_models.cpp +++ b/src/GRANULAR/contact_tangential_models.cpp @@ -73,7 +73,6 @@ void TangentialLinearNoHistory::calculate_forces() else Ft = 0.0; scale3(-Ft, contact->vtr, contact->fs); - } /* ---------------------------------------------------------------------- @@ -115,7 +114,7 @@ void TangentialLinearHistory::calculate_forces() // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 if (contact->history_update) { rsht = dot3(history, contact->nx); - frame_update = fabs(rsht) * k > EPSILON * Fscrit; + frame_update = (fabs(rsht) * k) > (EPSILON * Fscrit); if (frame_update) { shrmag = len3(history); @@ -137,6 +136,7 @@ void TangentialLinearHistory::calculate_forces() add3(history, temp_array, history); } + // tangential forces = history + tangential velocity damping scale3(-k, history, contact->fs); scale3(damp, contact->vtr, temp_array); @@ -148,14 +148,11 @@ void TangentialLinearHistory::calculate_forces() shrmag = len3(history); if (shrmag != 0.0) { magfs_inv = 1.0 / magfs; - temp_dbl = Fscrit * magfs_inv; - scale3(temp_dbl, contact->fs, history); + scale3(Fscrit * magfs_inv, contact->fs, history); scale3(damp, contact->vtr, temp_array); add3(history, temp_array, history); - temp_dbl = -1.0 / k; - scale3(temp_dbl, history); - temp_dbl = Fscrit * magfs_inv; - scale3(temp_dbl, contact->fs); + scale3(-1.0 / k, history); + scale3(Fscrit * magfs_inv, contact->fs); } else { zero3(contact->fs); } @@ -212,15 +209,13 @@ void TangentialLinearHistoryClassic::calculate_forces() if (magfs > Fscrit) { if (shrmag != 0.0) { magfs_inv = 1.0 / magfs; - temp_dbl = Fscrit * magfs_inv; - scale3(temp_dbl, contact->fs, history); + scale3(Fscrit * magfs_inv, contact->fs, history); scale3(damp, contact->vtr, temp_array); add3(history, temp_array, history); temp_dbl = -1.0 / k_scaled; if (scale_area) temp_dbl /= contact->area; scale3(temp_dbl, history); - temp_dbl = Fscrit * magfs_inv; - scale3(temp_dbl, contact->fs); + scale3(Fscrit * magfs_inv, contact->fs); } else { zero3(contact->fs); } @@ -259,7 +254,15 @@ void TangentialMindlin::coeffs_to_local() if (k == -1) { if (!contact->normal_model->material_properties) error->all(FLERR, "Must either specify tangential stiffness or material properties for normal model for the Mindlin tangential style"); - k = 8.0 * mix_stiffnessG(contact->normal_model->Emod, contact->normal_model->Emod, contact->normal_model->poiss, contact->normal_model->poiss); + + double Emod = contact->normal_model->Emod; + double poiss = contact->normal_model->poiss; + + if (contact->contact_type == PAIR) { + k = 8.0 * mix_stiffnessG(Emod, Emod, poiss, poiss); + } else { + k = 8.0 * mix_stiffnessG_wall(Emod, poiss); + } } if (k < 0.0 || xt < 0.0 || mu < 0.0) @@ -291,22 +294,21 @@ void TangentialMindlin::calculate_forces() double Fscrit = contact->normal_model->Fncrit * mu; k_scaled = k * contact->area; - if (mindlin_rescale) { - // on unloading, rescale the shear displacements/force - if (contact->area < history[3]) { - temp_dbl = contact->area / history[3]; - scale3(temp_dbl, history); - } - } + + // on unloading, rescale the shear displacements/force + if (mindlin_rescale) + if (contact->area < history[3]) + scale3(contact->area / history[3], history); // rotate and update displacements / force. // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 if (contact->history_update) { rsht = dot3(history, contact->nx); - if (mindlin_force) - frame_update = fabs(rsht) > EPSILON * Fscrit; - else - frame_update = fabs(rsht) * k_scaled > EPSILON * Fscrit; + if (mindlin_force) { + frame_update = fabs(rsht) > (EPSILON * Fscrit); + } else { + frame_update = (fabs(rsht) * k_scaled) > (EPSILON * Fscrit); + } if (frame_update) { shrmag = len3(history); @@ -324,8 +326,7 @@ void TangentialMindlin::calculate_forces() if (mindlin_force) { // tangential force // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - temp_dbl = -k_scaled * contact->dt; - scale3(temp_dbl, contact->vtr, temp_array); + scale3(-k_scaled * contact->dt, contact->vtr, temp_array); } else { scale3(contact->dt, contact->vtr, temp_array); } @@ -340,6 +341,8 @@ void TangentialMindlin::calculate_forces() if (!mindlin_force) { scale3(k_scaled, history, temp_array); sub3(contact->fs, temp_array, contact->fs); + } else { + add3(contact->fs, history, contact->fs); } // rescale frictional displacements and forces if needed @@ -348,16 +351,14 @@ void TangentialMindlin::calculate_forces() shrmag = len3(history); if (shrmag != 0.0) { magfs_inv = 1.0 / magfs; - temp_dbl = Fscrit * magfs_inv; - scale3(temp_dbl, contact->fs, history); + scale3(Fscrit * magfs_inv, contact->fs, history); scale3(damp, contact->vtr, temp_array); add3(history, temp_array, history); - if (!mindlin_force) { - temp_dbl = -1.0 / k_scaled; - scale3(temp_dbl, history); - } - temp_dbl = Fscrit * magfs_inv; - scale3(temp_dbl, contact->fs); + + if (!mindlin_force) + scale3(-1.0 / k_scaled, history); + + scale3(Fscrit * magfs_inv, contact->fs); } else { zero3(contact->fs); } diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/GRANULAR/contact_twisting_models.cpp index aca4f958e7..94a88161f3 100644 --- a/src/GRANULAR/contact_twisting_models.cpp +++ b/src/GRANULAR/contact_twisting_models.cpp @@ -95,8 +95,8 @@ TwistingSDS::TwistingSDS(LAMMPS *lmp) : TwistingModel(lmp) void TwistingSDS::coeffs_to_local() { k = coeffs[0]; - mu = coeffs[1]; - damp = coeffs[2]; + damp = coeffs[1]; + mu = coeffs[2]; if (k < 0.0 || mu < 0.0 || damp < 0.0) error->all(FLERR, "Illegal SDS twisting model"); diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 0d6fc587fb..c0221b0d34 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -535,6 +535,7 @@ void FixWallGran::post_force(int /*vflag*/) } // Reset model and copy initial geometric data + model->i = i; model->dx[0] = dx; model->dx[1] = dy; model->dx[2] = dz; diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 2e57e335f7..93bca1485b 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -225,7 +225,7 @@ void FixWallGranRegion::post_force(int /*vflag*/) for (int ic = 0; ic < nc; ic++) { // Reset model and copy initial geometric data - // A bit unncessary since region->contact[ic] stores r + model->i = i; model->dx[0] = region->contact[ic].delx; model->dx[1] = region->contact[ic].dely; model->dx[2] = region->contact[ic].delz; diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 1e423b92b3..dddd1acdcb 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -196,6 +196,8 @@ void PairGranular::compute(int eflag, int vflag) jtype = type[j]; // Reset model and copy initial geometric data + models[itype][jtype]->i = i; + models[itype][jtype]->j = j; models[itype][jtype]->xi = x[i]; models[itype][jtype]->xj = x[j]; models[itype][jtype]->radi = radius[i]; @@ -214,9 +216,9 @@ void PairGranular::compute(int eflag, int vflag) continue; } - if (use_history) { + // if any history is needed + if (use_history || models[itype][jtype]->beyond_contact) { touch[jj] = 1; - history = &allhistory[size_history*jj]; } // meff = effective mass of pair of particles @@ -239,19 +241,17 @@ void PairGranular::compute(int eflag, int vflag) models[itype][jtype]->omegai = omega[i]; models[itype][jtype]->omegaj = omega[j]; models[itype][jtype]->history_update = history_update; - if (use_history) models[itype][jtype]->history = history; + if (use_history) { + history = &allhistory[size_history*jj]; + models[itype][jtype]->history = history; + } +; if (heat_flag) { models[itype][jtype]->Ti = temperature[i]; models[itype][jtype]->Tj = temperature[j]; } models[itype][jtype]->prep_contact(); - // if any history is needed - if (use_history) { - touch[jj] = 1; - history = &allhistory[size_history*jj]; - } - models[itype][jtype]->calculate_forces(); forces = models[itype][jtype]->forces; @@ -455,6 +455,7 @@ void PairGranular::init_style() for (auto &model : vec_models) { model.init(); + if (model.beyond_contact) beyond_contact = 1; if (model.size_history != 0) use_history = 1; for (i = 0; i < NSUBMODELS; i++) @@ -742,6 +743,8 @@ double PairGranular::single(int i, int j, int itype, int jtype, double *radius = atom->radius; // Reset model and copy initial geometric data + models[itype][jtype]->i = i; + models[itype][jtype]->j = j; models[itype][jtype]->xi = x[i]; models[itype][jtype]->xj = x[j]; models[itype][jtype]->radi = radius[i]; From cca7a5313267304a07ff8eef1bfc8793c0ebb784 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Sun, 25 Sep 2022 14:53:53 -0600 Subject: [PATCH 029/445] Patching heat implementation and adding example --- doc/src/dump.rst | 4 +- doc/src/fix_temp_integrate.rst | 2 +- doc/src/fix_wall_gran.rst | 2 +- doc/src/fix_wall_gran_region.rst | 2 +- doc/src/pair_granular.rst | 4 +- doc/src/set.rst | 2 +- examples/granular/in.pour.heat | 83 +++++++++++++++++++++++++++ src/GRANULAR/atom_vec_sphere_temp.cpp | 10 ++-- src/GRANULAR/atom_vec_sphere_temp.h | 2 +- src/GRANULAR/contact.cpp | 18 +++--- src/GRANULAR/contact_heat_models.cpp | 2 +- src/GRANULAR/fix_temp_integrate.cpp | 10 ++-- src/GRANULAR/fix_wall_gran.cpp | 43 ++++++-------- src/GRANULAR/fix_wall_gran_region.cpp | 21 ++++--- src/GRANULAR/pair_granular.cpp | 12 ++-- src/atom.cpp | 14 ++--- src/atom.h | 4 +- src/dump_custom.cpp | 22 +++---- src/dump_custom.h | 2 +- 19 files changed, 169 insertions(+), 90 deletions(-) create mode 100644 examples/granular/in.pour.heat diff --git a/doc/src/dump.rst b/doc/src/dump.rst index 4406c827bf..c324c945ee 100644 --- a/doc/src/dump.rst +++ b/doc/src/dump.rst @@ -81,7 +81,7 @@ Syntax q, mux, muy, muz, mu, radius, diameter, omegax, omegay, omegaz, angmomx, angmomy, angmomz, tqx, tqy, tqz, - heatflux, temperature, + heatflow, temperature, c_ID, c_ID[I], f_ID, f_ID[I], v_name, i_name, d_name, i2_name[I], d2_name[I] @@ -108,7 +108,7 @@ Syntax omegax,omegay,omegaz = angular velocity of spherical particle angmomx,angmomy,angmomz = angular momentum of aspherical particle tqx,tqy,tqz = torque on finite-size particles - heatflux = flux of heat into particle + heatflow = flow of heat into particle temperature = temperature of particle c_ID = per-atom vector calculated by a compute with ID c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below) diff --git a/doc/src/fix_temp_integrate.rst b/doc/src/fix_temp_integrate.rst index bd06b45c6e..03fae7a872 100644 --- a/doc/src/fix_temp_integrate.rst +++ b/doc/src/fix_temp_integrate.rst @@ -62,7 +62,7 @@ not invoked during :doc:`energy minimization `. Restrictions """""""""""" -This fix requires that atoms store temperature and a heat flux +This fix requires that atoms store temperature and heat flow as defined by the :doc:`atom_style sphere/temp ` command. Related commands diff --git a/doc/src/fix_wall_gran.rst b/doc/src/fix_wall_gran.rst index 7fa047a07f..0cc4798dd2 100644 --- a/doc/src/fix_wall_gran.rst +++ b/doc/src/fix_wall_gran.rst @@ -186,7 +186,7 @@ specified as v_name, where name is the variable name. In this case, the variable will be evaluated each timestep, and its value used to determine the temperature. This option must be used in conjunction with a heat conduction model defined in :doc:`pair_style granular ` -and a compatible atom style which stores temperature and a heat flux +and a compatible atom style which stores temperature and a heat flow as defined by the :doc:`atom_style sphere/temp ` command. Restart, fix_modify, output, run start/stop, minimize info diff --git a/doc/src/fix_wall_gran_region.rst b/doc/src/fix_wall_gran_region.rst index 9dbf691ead..73a2e9c973 100644 --- a/doc/src/fix_wall_gran_region.rst +++ b/doc/src/fix_wall_gran_region.rst @@ -209,7 +209,7 @@ specified as v_name, where name is the variable name. In this case, the variable will be evaluated each timestep, and its value used to determine the temperature. This option must be used in conjunction with a heat conduction model defined in :doc:`pair_style granular ` -and a compatible atom style which stores temperature and a heat flux +and a compatible atom style which stores temperature and a heat flow as defined by the :doc:`atom_style sphere/temp ` command. Restart, fix_modify, output, run start/stop, minimize info diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index 5856db307b..bc365814cd 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -634,7 +634,7 @@ attractive force. This keyword cannot be used with the JKR or DMT models. ---------- -The optional *heat* keyword enables heat conduction . The options currently +The optional *heat* keyword enables heat conduction. The options currently supported are: 1. *none* @@ -643,7 +643,7 @@ supported are: If the *heat* keyword is not specified, the model defaults to *none*. For *heat* *area*, the heat -:math:`Q` conducted across an interface is given by +:math:`Q` conducted between two particles is given by .. math:: diff --git a/doc/src/set.rst b/doc/src/set.rst index d11d3fc229..fdce40b72d 100644 --- a/doc/src/set.rst +++ b/doc/src/set.rst @@ -95,7 +95,7 @@ Syntax value can be an atom-style variable (see below) *density/disc* value = particle density for a 2d disc or ellipse (mass/distance\^2 units) value can be an atom-style variable (see below) - *temperature* value = particle temperature for a finite-size particle particle (temperature units)s + *temperature* value = temperature for finite-size particles (temperature units) value can be an atom-style variable (see below) *volume* value = particle volume for Peridynamic particle (distance\^3 units) value can be an atom-style variable (see below) diff --git a/examples/granular/in.pour.heat b/examples/granular/in.pour.heat new file mode 100644 index 0000000000..495a80454a --- /dev/null +++ b/examples/granular/in.pour.heat @@ -0,0 +1,83 @@ +# pour one types of particles into cylinder and oscillate +# temperature of the bottom plate + +variable name string heat_plate + +atom_style sphere/temp +units lj + +############################################### +# Geometry-related parameters +############################################### + +variable boxx equal 10 +variable boxy equal 10 +variable boxz equal 50 + +variable drum_rad equal ${boxx}*0.5 +variable drum_height equal 30 + +variable xc equal 0.5*${boxx} +variable yc equal 0.5*${boxx} +variable zc equal 0.5*${boxz} + +############################################### +# Particle-related parameters +############################################### +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dhi equal 2.0*${rhi} + +variable cyl_rad_inner equal ${drum_rad}-1.1*${rhi} + +variable dens equal 1.0 + +variable skin equal 0.4*${rhi} + +############# +processors * * 1 +region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} +create_box 2 boxreg +change_box all boundary p p f + +pair_style granular +pair_coeff * * hertz/material 1e5 0.2 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 + +region curved_wall cylinder z ${xc} ${yc} ${drum_rad} 0 ${drum_height} side in +region bottom_wall plane ${xc} ${yc} 0 0 0 1 side in + +region insreg cylinder z ${xc} ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} + +fix 0 all balance 100 1.0 shift xy 5 1.1 +fix 1 all nve/sphere +fix 2 all temp/integrate constant 1.0 +fix grav all gravity 10 vector 0 0 -1 +fix ins1 all pour 1000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins2 all pour 1000 2 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} + +comm_modify vel yes + +neighbor ${skin} bin +neigh_modify delay 0 every 1 check yes + +variable oscillate equal 1.0*sin(step*0.0001) + +fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall +fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 region bottom_wall temperature v_oscillate + +thermo_style custom step atoms ke pxx pyy pzz +thermo_modify lost warn +thermo 100 + +timestep 0.001 + +#dump 1 all custom 1000 ${name}.dump id type radius mass x y z temperature heatflow + +#For removal later +compute 1 all property/atom radius +variable zmax atom z+c_1>0.5*${drum_height} +group delgroup dynamic all var zmax every 10000 + +run 100000 + diff --git a/src/GRANULAR/atom_vec_sphere_temp.cpp b/src/GRANULAR/atom_vec_sphere_temp.cpp index a92486a1b5..bc3dcb7a2d 100644 --- a/src/GRANULAR/atom_vec_sphere_temp.cpp +++ b/src/GRANULAR/atom_vec_sphere_temp.cpp @@ -33,17 +33,17 @@ AtomVecSphereTemp::AtomVecSphereTemp(LAMMPS *lmp) : AtomVec(lmp) atom->sphere_flag = 1; atom->radius_flag = atom->rmass_flag = atom->omega_flag = atom->torque_flag = 1; - atom->temperature_flag = atom->heatflux_flag = 1; + atom->temperature_flag = atom->heatflow_flag = 1; // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings // order of fields in a string does not matter // except: fields_data_atom & fields_data_vel must match data file - fields_grow = {"radius", "rmass", "omega", "torque", "temperature", "heatflux"}; + fields_grow = {"radius", "rmass", "omega", "torque", "temperature", "heatflow"}; fields_copy = {"radius", "rmass", "omega", "temperature"}; fields_comm_vel = {"omega", "temperature"}; - fields_reverse = {"torque", "heatflux"}; + fields_reverse = {"torque", "heatflow"}; fields_border = {"radius", "rmass", "temperature"}; fields_border_vel = {"radius", "rmass", "omega", "temperature"}; fields_exchange = {"radius", "rmass", "omega", "temperature"}; @@ -107,7 +107,7 @@ void AtomVecSphereTemp::grow_pointers() rmass = atom->rmass; omega = atom->omega; temperature = atom->temperature; - heatflux = atom->heatflux; + heatflow = atom->heatflow; } /* ---------------------------------------------------------------------- @@ -117,7 +117,7 @@ void AtomVecSphereTemp::grow_pointers() void AtomVecSphereTemp::force_clear(int n, size_t nbytes) { - memset(&heatflux[n], 0, nbytes); + memset(&heatflow[n], 0, nbytes); } /* ---------------------------------------------------------------------- diff --git a/src/GRANULAR/atom_vec_sphere_temp.h b/src/GRANULAR/atom_vec_sphere_temp.h index 70e047a8cc..c93b0ee4dd 100644 --- a/src/GRANULAR/atom_vec_sphere_temp.h +++ b/src/GRANULAR/atom_vec_sphere_temp.h @@ -40,7 +40,7 @@ class AtomVecSphereTemp : public AtomVec { private: double *radius, *rmass; double **omega; - double *temperature, *heatflux; + double *temperature, *heatflow; int radvary; double radius_one, rmass_one; diff --git a/src/GRANULAR/contact.cpp b/src/GRANULAR/contact.cpp index 5290f13629..ae294d7db9 100644 --- a/src/GRANULAR/contact.cpp +++ b/src/GRANULAR/contact.cpp @@ -438,16 +438,14 @@ void ContactModel::calculate_forces() scale3(-1, torquesi); if (contact_type == PAIR) copy3(torquesi, torquesj); - if (!classic_model) { - if (contact_type == PAIR) { - dist_to_contact = radi - 0.5 * delta; - scale3(dist_to_contact, torquesi); - dist_to_contact = radj - 0.5 * delta; - scale3(dist_to_contact, torquesj); - } else { - dist_to_contact = radi; - scale3(dist_to_contact, torquesi); - } + if (!classic_model && contact_type == PAIR) { + dist_to_contact = radi - 0.5 * delta; + scale3(dist_to_contact, torquesi); + dist_to_contact = radj - 0.5 * delta; + scale3(dist_to_contact, torquesj); + } else { + dist_to_contact = radi; + scale3(dist_to_contact, torquesi); } double torroll[3]; diff --git a/src/GRANULAR/contact_heat_models.cpp b/src/GRANULAR/contact_heat_models.cpp index 00ac0c0785..1804ece9df 100644 --- a/src/GRANULAR/contact_heat_models.cpp +++ b/src/GRANULAR/contact_heat_models.cpp @@ -59,5 +59,5 @@ void HeatArea::coeffs_to_local() double HeatArea::calculate_heat() { - return conductivity * contact->area * (contact->Ti - contact->Tj); + return conductivity * contact->area * (contact->Tj - contact->Ti); } diff --git a/src/GRANULAR/fix_temp_integrate.cpp b/src/GRANULAR/fix_temp_integrate.cpp index f81442766b..e5fbae63dc 100644 --- a/src/GRANULAR/fix_temp_integrate.cpp +++ b/src/GRANULAR/fix_temp_integrate.cpp @@ -77,8 +77,8 @@ void FixTempIntegrate::init() if (!atom->temperature_flag) error->all(FLERR,"Fix temp/integrate requires atom style with temperature property"); - if (!atom->heatflux_flag) - error->all(FLERR,"Fix temp/integrate requires atom style with heatflux property"); + if (!atom->heatflow_flag) + error->all(FLERR,"Fix temp/integrate requires atom style with heatflow property"); } /* ---------------------------------------------------------------------- */ @@ -88,7 +88,7 @@ void FixTempIntegrate::final_integrate() // update temperature of atoms in group double *temperature = atom->temperature; - double *heatflux = atom->heatflux; + double *heatflow = atom->heatflow; double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; @@ -99,12 +99,12 @@ void FixTempIntegrate::final_integrate() if (rmass) { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - temperature[i] += dt * heatflux[i] / (calc_cp(i) * rmass[i]); + temperature[i] += dt * heatflow[i] / (calc_cp(i) * rmass[i]); } } else { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - temperature[i] += dt * heatflux[i] / (calc_cp(i) * mass[type[i]]); + temperature[i] += dt * heatflow[i] / (calc_cp(i) * mass[type[i]]); } } } diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index c0221b0d34..96fbaeefb5 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -125,7 +125,6 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR, "Illegal fix wall/gran command, must specify " "twisting model after twisting keyword"); model->init_model(std::string(arg[iarg++]), TWISTING); - iarg += 1; iarg = model->twisting_model->parse_coeffs(arg, iarg, narg); } else if (strcmp(arg[iarg], "heat") == 0) { iarg++; @@ -133,7 +132,6 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR, "Illegal fix wall/gran command, must specify " "heat model after heat keyword"); model->init_model(std::string(arg[iarg++]), HEAT); - iarg += 1; iarg = model->heat_model->parse_coeffs(arg, iarg, narg); heat_flag = 1; } else if (strcmp(arg[iarg], "xplane") == 0 || @@ -211,20 +209,8 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : wallstyle = REGION; idregion = utils::strdup(arg[iarg+1]); iarg += 2; - } else if (strcmp(arg[iarg],"temperature") == 0) { - if (narg < iarg+2) error->all(FLERR,"Illegal fix wall/gran command"); - if (utils::strmatch(arg[iarg+1], "^v_")) { - tstr = utils::strdup(arg[3] + 2); - } else { - Twall = utils::numeric(FLERR,arg[iarg+1],false,lmp); - } - Twall_defined = 1; - iarg += 2; } else wallstyle = NOSTYLE; - if (heat_flag != Twall_defined) - error->all(FLERR, "To model conduction, must define both heat model and wall temperature"); - // optional args wiggle = 0; @@ -256,9 +242,21 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : size_peratom_cols = 8; peratom_freq = 1; iarg += 1; + } else if (strcmp(arg[iarg],"temperature") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix wall/gran command"); + if (utils::strmatch(arg[iarg+1], "^v_")) { + tstr = utils::strdup(arg[iarg+1] + 2); + } else { + Twall = utils::numeric(FLERR,arg[iarg+1],false,lmp); + } + Twall_defined = 1; + iarg += 2; } else error->all(FLERR,"Illegal fix wall/gran command"); } + if (heat_flag != Twall_defined) + error->all(FLERR, "To model conduction, must define both heat model and wall temperature"); + if (wallstyle == NOSTYLE) error->all(FLERR,"No wall style defined"); if (wallstyle == XPLANE && domain->xperiodic) @@ -360,8 +358,8 @@ void FixWallGran::init() if (heat_flag) { if (!atom->temperature_flag) error->all(FLERR,"Heat conduction in fix wall/gran requires atom style with temperature property"); - if (!atom->heatflux_flag) - error->all(FLERR,"Heat conduction in fix wall/gran requires atom style with heatflux property"); + if (!atom->heatflow_flag) + error->all(FLERR,"Heat conduction in fix wall/gran requires atom style with heatflow property"); } // check for FixRigid so can extract rigid body masses @@ -408,7 +406,7 @@ void FixWallGran::post_force(int /*vflag*/) { int i,j; double dx,dy,dz,del1,del2,delxy,delr,rwall,meff; - double *forces, *torquesi, dq; + double *forces, *torquesi; double vwall[3]; double w0[3] = {0.0}; bool touchflag = false; @@ -471,11 +469,7 @@ void FixWallGran::post_force(int /*vflag*/) double **torque = atom->torque; double *radius = atom->radius; double *rmass = atom->rmass; - double *temperature, *heatflux; - if (heat_flag) { - temperature = atom->temperature; - heatflux = atom->heatflux; - } + double *temperature, *heatflow; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -490,6 +484,8 @@ void FixWallGran::post_force(int /*vflag*/) model->vj = vwall; model->omegaj = w0; if (heat_flag) { + temperature = atom->temperature; + heatflow = atom->heatflow; if (tstr) Twall = input->variable->compute_equal(tvar); model->Tj = Twall; @@ -574,13 +570,12 @@ void FixWallGran::post_force(int /*vflag*/) forces = model->forces; torquesi = model->torquesi; - if (heat_flag) dq = model->dq; // apply forces & torques add3(f[i], forces, f[i]); add3(torque[i], torquesi, torque[i]); - if (heat_flag) heatflux[i] += dq; + if (heat_flag) heatflow[i] += model->dq; // store contact info if (peratom_flag) { diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 93bca1485b..2f57d90ad6 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -22,11 +22,13 @@ #include "comm.h" #include "domain.h" #include "error.h" +#include "input.h" #include "memory.h" #include "neighbor.h" #include "math_extra.h" #include "region.h" #include "update.h" +#include "variable.h" #include @@ -124,7 +126,7 @@ void FixWallGranRegion::post_force(int /*vflag*/) { int i, m, nc, iwall; double dx, dy, dz, meff; - double *forces, *torquesi, dq; + double *forces, *torquesi; double vwall[3]; double w0[3] = {0.0}; bool touchflag = false; @@ -167,11 +169,7 @@ void FixWallGranRegion::post_force(int /*vflag*/) double **torque = atom->torque; double *radius = atom->radius; double *rmass = atom->rmass; - double *temperature, *heatflux; - if (heat_flag) { - temperature = atom->temperature; - heatflux = atom->heatflux; - } + double *temperature, *heatflow; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -188,7 +186,13 @@ void FixWallGranRegion::post_force(int /*vflag*/) // Define constant wall properties (atom j) model->radj = 0.0; model->omegaj = w0; - if (heat_flag) model->Tj = Twall; + if (heat_flag) { + temperature = atom->temperature; + heatflow = atom->heatflow; + if (tstr) + Twall = input->variable->compute_equal(tvar); + model->Tj = Twall; + } for (i = 0; i < nlocal; i++) { if (! mask[i] & groupbit) continue; @@ -269,13 +273,12 @@ void FixWallGranRegion::post_force(int /*vflag*/) forces = model->forces; torquesi = model->torquesi; - if (heat_flag) dq = model->dq; // apply forces & torques add3(f[i], forces, f[i]); add3(torque[i], torquesi, torque[i]); - if (heat_flag) heatflux[i] += dq; + if (heat_flag) heatflow[i] += model->dq; // store contact info if (peratom_flag) { diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index dddd1acdcb..63354a4eda 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -161,9 +161,9 @@ void PairGranular::compute(int eflag, int vflag) int *mask = atom->mask; int nlocal = atom->nlocal; double *special_lj = force->special_lj; - double *heatflux, *temperature; + double *heatflow, *temperature; if (heat_flag) { - heatflux = atom->heatflux; + heatflow = atom->heatflow; temperature = atom->temperature; } @@ -265,13 +265,13 @@ void PairGranular::compute(int eflag, int vflag) scale3(factor_lj, torquesi); add3(torque[i], torquesi, torque[i]); - if (heat_flag) heatflux[i] += dq; + if (heat_flag) heatflow[i] += dq; if (force->newton_pair || j < nlocal) { sub3(f[j], forces, f[j]); scale3(factor_lj, torquesj); add3(torque[j], torquesj, torque[j]); - if (heat_flag) heatflux[j] -= dq; + if (heat_flag) heatflow[j] -= dq; } if (evflag) { @@ -446,8 +446,8 @@ void PairGranular::init_style() if (heat_flag) { if (!atom->temperature_flag) error->all(FLERR,"Heat conduction in pair granular requires atom style with temperature property"); - if (!atom->heatflux_flag) - error->all(FLERR,"Heat conduction in pair granular requires atom style with heatflux property"); + if (!atom->heatflow_flag) + error->all(FLERR,"Heat conduction in pair granular requires atom style with heatflow property"); } // allocate history and initialize models diff --git a/src/atom.cpp b/src/atom.cpp index ce66742779..5e462dd8bd 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -124,7 +124,7 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) ellipsoid = line = tri = body = nullptr; quat = nullptr; temperature = nullptr; - heatflux = nullptr; + heatflow = nullptr; // molecular systems @@ -413,7 +413,7 @@ void Atom::peratom_create() add_peratom("body",&body,INT,0); add_peratom("temperature",&temperature,DOUBLE,0); - add_peratom("heatflux",&heatflux,DOUBLE,0); + add_peratom("heatflow",&heatflow,DOUBLE,0); // BPM package @@ -617,7 +617,7 @@ void Atom::set_atomflag_defaults() molecule_flag = molindex_flag = molatom_flag = 0; q_flag = mu_flag = 0; rmass_flag = radius_flag = omega_flag = torque_flag = angmom_flag = 0; - temperature_flag = heatflux_flag = 0; + temperature_flag = heatflow_flag = 0; vfrac_flag = spin_flag = eradius_flag = ervel_flag = erforce_flag = 0; cs_flag = csforce_flag = vforce_flag = ervelforce_flag = etag_flag = 0; rho_flag = esph_flag = cv_flag = vest_flag = 0; @@ -2612,10 +2612,10 @@ length of the data area, and a short description. - double - 1 - temperature of the particles - * - heatflux + * - heatflow - double - 1 - - heatflux of the particles + - heatflow of the particles * - i_name - int - 1 @@ -2673,7 +2673,7 @@ void *Atom::extract(const char *name) if (strcmp(name,"body") == 0) return (void *) body; if (strcmp(name,"quat") == 0) return (void *) quat; if (strcmp(name,"temperature") == 0) return (void *) temperature; - if (strcmp(name,"heatflux") == 0) return (void *) heatflux; + if (strcmp(name,"heatflow") == 0) return (void *) heatflow; if (strcmp(name,"vfrac") == 0) return (void *) vfrac; if (strcmp(name,"s0") == 0) return (void *) s0; @@ -2798,7 +2798,7 @@ int Atom::extract_datatype(const char *name) if (strcmp(name,"body") == 0) return LAMMPS_INT; if (strcmp(name,"quat") == 0) return LAMMPS_DOUBLE_2D; if (strcmp(name,"temperature") == 0) return LAMMPS_DOUBLE; - if (strcmp(name,"heatflux") == 0) return LAMMPS_DOUBLE; + if (strcmp(name,"heatflow") == 0) return LAMMPS_DOUBLE; if (strcmp(name,"vfrac") == 0) return LAMMPS_DOUBLE; if (strcmp(name,"s0") == 0) return LAMMPS_DOUBLE; diff --git a/src/atom.h b/src/atom.h index 7ac459317c..bfb79d4366 100644 --- a/src/atom.h +++ b/src/atom.h @@ -80,7 +80,7 @@ class Atom : protected Pointers { double **omega, **angmom, **torque; int *ellipsoid, *line, *tri, *body; double **quat; - double *temperature, *heatflux; + double *temperature, *heatflow; // molecular systems @@ -183,7 +183,7 @@ class Atom : protected Pointers { int molecule_flag, molindex_flag, molatom_flag; int q_flag, mu_flag; int rmass_flag, radius_flag, omega_flag, torque_flag, angmom_flag, quat_flag; - int temperature_flag, heatflux_flag; + int temperature_flag, heatflow_flag; int vfrac_flag, spin_flag, eradius_flag, ervel_flag, erforce_flag; int cs_flag, csforce_flag, vforce_flag, ervelforce_flag, etag_flag; int rho_flag, esph_flag, cv_flag, vest_flag; diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index a74e91c889..cc4fdbe20b 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -41,7 +41,7 @@ enum{ID,MOL,PROC,PROCP1,TYPE,ELEMENT,MASS, XSU,YSU,ZSU,XSUTRI,YSUTRI,ZSUTRI, IX,IY,IZ, VX,VY,VZ,FX,FY,FZ, - Q,MUX,MUY,MUZ,MU,RADIUS,DIAMETER,HEATFLUX,TEMPERATURE, + Q,MUX,MUY,MUZ,MU,RADIUS,DIAMETER,heatflow,TEMPERATURE, OMEGAX,OMEGAY,OMEGAZ,ANGMOMX,ANGMOMY,ANGMOMZ, TQX,TQY,TQZ, COMPUTE,FIX,VARIABLE,IVEC,DVEC,IARRAY,DARRAY}; @@ -930,11 +930,11 @@ int DumpCustom::count() for (i = 0; i < nlocal; i++) dchoose[i] = 2.0*radius[i]; ptr = dchoose; nstride = 1; - } else if (thresh_array[ithresh] == HEATFLUX) { - if (!atom->heatflux_flag) + } else if (thresh_array[ithresh] == heatflow) { + if (!atom->heatflow_flag) error->all(FLERR, "Threshold for an atom property that isn't allocated"); - ptr = atom->heatflux; + ptr = atom->heatflow; nstride = 1; } else if (thresh_array[ithresh] == TEMPERATURE) { if (!atom->temperature_flag) @@ -1392,10 +1392,10 @@ int DumpCustom::parse_fields(int narg, char **arg) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[iarg] = &DumpCustom::pack_diameter; vtype[iarg] = Dump::DOUBLE; - } else if (strcmp(arg[iarg],"heatflux") == 0) { - if (!atom->heatflux_flag) + } else if (strcmp(arg[iarg],"heatflow") == 0) { + if (!atom->heatflow_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); - pack_choice[iarg] = &DumpCustom::pack_heatflux; + pack_choice[iarg] = &DumpCustom::pack_heatflow; vtype[iarg] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"temperature") == 0) { if (!atom->temperature_flag) @@ -1867,7 +1867,7 @@ int DumpCustom::modify_param(int narg, char **arg) else if (strcmp(arg[1],"radius") == 0) thresh_array[nthresh] = RADIUS; else if (strcmp(arg[1],"diameter") == 0) thresh_array[nthresh] = DIAMETER; - else if (strcmp(arg[1],"heatflux") == 0) thresh_array[nthresh] = HEATFLUX; + else if (strcmp(arg[1],"heatflow") == 0) thresh_array[nthresh] = heatflow; else if (strcmp(arg[1],"temperature") == 0) thresh_array[nthresh] = TEMPERATURE; else if (strcmp(arg[1],"omegax") == 0) thresh_array[nthresh] = OMEGAX; else if (strcmp(arg[1],"omegay") == 0) thresh_array[nthresh] = OMEGAY; @@ -2783,12 +2783,12 @@ void DumpCustom::pack_diameter(int n) /* ---------------------------------------------------------------------- */ -void DumpCustom::pack_heatflux(int n) +void DumpCustom::pack_heatflow(int n) { - double *heatflux = atom->heatflux; + double *heatflow = atom->heatflow; for (int i = 0; i < nchoose; i++) { - buf[n] = heatflux[clist[i]]; + buf[n] = heatflow[clist[i]]; n += size_one; } } diff --git a/src/dump_custom.h b/src/dump_custom.h index fd4fd413c3..eeae415dd2 100644 --- a/src/dump_custom.h +++ b/src/dump_custom.h @@ -193,7 +193,7 @@ class DumpCustom : public Dump { void pack_mu(int); void pack_radius(int); void pack_diameter(int); - void pack_heatflux(int); + void pack_heatflow(int); void pack_temperature(int); void pack_omegax(int); From 955fbe46d12c12070a4068728cf310f9990608e9 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 26 Oct 2022 22:25:58 -0600 Subject: [PATCH 030/445] Renaming classes, adjusting initialization --- src/.gitignore | 32 +- src/GRANULAR/fix_wall_gran.cpp | 65 +-- src/GRANULAR/fix_wall_gran.h | 4 +- src/GRANULAR/fix_wall_gran_region.cpp | 5 +- src/GRANULAR/granular_model.cpp | 498 ++++++++++++++++++ src/GRANULAR/granular_model.h | 107 ++++ src/GRANULAR/gsm.cpp | 127 +++++ src/GRANULAR/gsm.h | 61 +++ src/GRANULAR/gsm_damping.cpp | 113 ++++ src/GRANULAR/gsm_damping.h | 79 +++ src/GRANULAR/gsm_heat.cpp | 63 +++ src/GRANULAR/gsm_heat.h | 53 ++ src/GRANULAR/gsm_normal.cpp | 377 +++++++++++++ src/GRANULAR/gsm_normal.h | 118 +++++ src/GRANULAR/gsm_rolling.cpp | 121 +++++ src/GRANULAR/gsm_rolling.h | 53 ++ src/GRANULAR/gsm_tangential.cpp | 412 +++++++++++++++ src/GRANULAR/gsm_tangential.h | 113 ++++ src/GRANULAR/gsm_twisting.cpp | 124 +++++ src/GRANULAR/gsm_twisting.h | 64 +++ src/GRANULAR/pair_granular.cpp | 97 +--- src/GRANULAR/pair_granular.h | 8 +- src/{GRANULAR => }/contact.cpp | 0 src/{GRANULAR => }/contact.h | 0 src/{GRANULAR => }/contact_damping_models.cpp | 0 src/{GRANULAR => }/contact_damping_models.h | 0 src/{GRANULAR => }/contact_heat_models.cpp | 0 src/{GRANULAR => }/contact_heat_models.h | 0 src/{GRANULAR => }/contact_normal_models.cpp | 0 src/{GRANULAR => }/contact_normal_models.h | 0 src/{GRANULAR => }/contact_rolling_models.cpp | 0 src/{GRANULAR => }/contact_rolling_models.h | 0 src/{GRANULAR => }/contact_sub_models.cpp | 0 src/{GRANULAR => }/contact_sub_models.h | 0 .../contact_tangential_models.cpp | 0 .../contact_tangential_models.h | 0 .../contact_twisting_models.cpp | 0 src/{GRANULAR => }/contact_twisting_models.h | 0 38 files changed, 2545 insertions(+), 149 deletions(-) create mode 100644 src/GRANULAR/granular_model.cpp create mode 100644 src/GRANULAR/granular_model.h create mode 100644 src/GRANULAR/gsm.cpp create mode 100644 src/GRANULAR/gsm.h create mode 100644 src/GRANULAR/gsm_damping.cpp create mode 100644 src/GRANULAR/gsm_damping.h create mode 100644 src/GRANULAR/gsm_heat.cpp create mode 100644 src/GRANULAR/gsm_heat.h create mode 100644 src/GRANULAR/gsm_normal.cpp create mode 100644 src/GRANULAR/gsm_normal.h create mode 100644 src/GRANULAR/gsm_rolling.cpp create mode 100644 src/GRANULAR/gsm_rolling.h create mode 100644 src/GRANULAR/gsm_tangential.cpp create mode 100644 src/GRANULAR/gsm_tangential.h create mode 100644 src/GRANULAR/gsm_twisting.cpp create mode 100644 src/GRANULAR/gsm_twisting.h rename src/{GRANULAR => }/contact.cpp (100%) rename src/{GRANULAR => }/contact.h (100%) rename src/{GRANULAR => }/contact_damping_models.cpp (100%) rename src/{GRANULAR => }/contact_damping_models.h (100%) rename src/{GRANULAR => }/contact_heat_models.cpp (100%) rename src/{GRANULAR => }/contact_heat_models.h (100%) rename src/{GRANULAR => }/contact_normal_models.cpp (100%) rename src/{GRANULAR => }/contact_normal_models.h (100%) rename src/{GRANULAR => }/contact_rolling_models.cpp (100%) rename src/{GRANULAR => }/contact_rolling_models.h (100%) rename src/{GRANULAR => }/contact_sub_models.cpp (100%) rename src/{GRANULAR => }/contact_sub_models.h (100%) rename src/{GRANULAR => }/contact_tangential_models.cpp (100%) rename src/{GRANULAR => }/contact_tangential_models.h (100%) rename src/{GRANULAR => }/contact_twisting_models.cpp (100%) rename src/{GRANULAR => }/contact_twisting_models.h (100%) diff --git a/src/.gitignore b/src/.gitignore index 07230a10b4..7c2b502f67 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1472,22 +1472,6 @@ /compute_xrd.cpp /compute_xrd.h /compute_xrd_consts.h -/contact.cpp -/contact.h -/contact_normal_models.cpp -/contact_normal_models.h -/contact_damping_models.cpp -/contact_damping_models.h -/contact_tangential_models.cpp -/contact_tangential_models.h -/contact_twisting_models.cpp -/contact_twisting_models.h -/contact_rolling_models.cpp -/contact_rolling_models.h -/contact_heat_models.cpp -/contact_heat_models.h -/contact_sub_models.cpp -/contact_sub_models.h /fix_atom_swap.cpp /fix_atom_swap.h /fix_ave_spatial_sphere.cpp @@ -1536,6 +1520,22 @@ /fix_ttm_grid.h /fix_ttm_mod.cpp /fix_ttm_mod.h +/granular_model.cpp +/granular_model.h +/gsm_normal.cpp +/gsm_normal.h +/gsm_damping.cpp +/gsm_damping.h +/gsm_tangential.cpp +/gsm_tangential.h +/gsm_twisting.cpp +/gsm_twisting.h +/gsm_rolling.cpp +/gsm_rolling.h +/gsm_heat.cpp +/gsm_heat.h +/gsm.cpp +/gsm.h /pair_born_coul_long_cs.cpp /pair_born_coul_long_cs.h /pair_born_coul_dsf_cs.cpp diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 96fbaeefb5..31913c6061 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -20,14 +20,8 @@ #include "fix_wall_gran.h" #include "atom.h" -#include "contact.h" -#include "contact_sub_models.h" -#include "contact_normal_models.h" -#include "contact_tangential_models.h" -#include "contact_damping_models.h" -#include "contact_rolling_models.h" -#include "contact_twisting_models.h" -#include "contact_heat_models.h" +#include "granular_model.h" +#include "gsm.h" #include "domain.h" #include "error.h" #include "input.h" @@ -43,7 +37,7 @@ #include using namespace LAMMPS_NS; -using namespace Contact; +using namespace Granular_NS; using namespace FixConst; using namespace MathConst; using namespace MathExtra; @@ -70,7 +64,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : // set interaction style // disable bonded/history option for now - model = new ContactModel(lmp); + model = new GranularModel(lmp); model->contact_type = WALL; if (strcmp(arg[3],"granular") == 0) classic_flag = 0; @@ -94,45 +88,19 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : } else { iarg = 4; - model->init_model(std::string(arg[iarg++]), NORMAL); - iarg = model->normal_model->parse_coeffs(arg, iarg, narg); + iarg = model->init_submodel(arg, iarg, narg, NORMAL); while (iarg < narg) { if (strcmp(arg[iarg], "damping") == 0) { - iarg++; - if (iarg >= narg) - error->all(FLERR, "Illegal fix wall/gran command, must specify " - "damping model after damping keyword"); - model->init_model(std::string(arg[iarg++]), DAMPING); - iarg = model->damping_model->parse_coeffs(arg, iarg, narg); + iarg = model->init_submodel(arg, iarg + 1, narg, DAMPING); } else if (strcmp(arg[iarg], "tangential") == 0) { - iarg++; - if (iarg >= narg) - error->all(FLERR, "Illegal fix wall/gran command, must specify " - "tangential model after tangential keyword"); - model->init_model(std::string(arg[iarg++]), TANGENTIAL); - iarg = model->tangential_model->parse_coeffs(arg, iarg, narg); + iarg = model->init_submodel(arg, iarg + 1, narg, TANGENTIAL); } else if (strcmp(arg[iarg], "rolling") == 0) { - iarg++; - if (iarg >= narg) - error->all(FLERR, "Illegal fix wall/gran command, must specify " - "rolling model after rolling keyword"); - model->init_model(std::string(arg[iarg++]), ROLLING); - iarg = model->rolling_model->parse_coeffs(arg, iarg, narg); + iarg = model->init_submodel(arg, iarg + 1, narg, ROLLING); } else if (strcmp(arg[iarg], "twisting") == 0) { - iarg++; - if (iarg >= narg) - error->all(FLERR, "Illegal fix wall/gran command, must specify " - "twisting model after twisting keyword"); - model->init_model(std::string(arg[iarg++]), TWISTING); - iarg = model->twisting_model->parse_coeffs(arg, iarg, narg); + iarg = model->init_submodel(arg, iarg + 1, narg, TWISTING); } else if (strcmp(arg[iarg], "heat") == 0) { - iarg++; - if (iarg >= narg) - error->all(FLERR, "Illegal fix wall/gran command, must specify " - "heat model after heat keyword"); - model->init_model(std::string(arg[iarg++]), HEAT); - iarg = model->heat_model->parse_coeffs(arg, iarg, narg); + iarg = model->init_submodel(arg, iarg + 1, narg, HEAT); heat_flag = 1; } else if (strcmp(arg[iarg], "xplane") == 0 || strcmp(arg[iarg], "yplane") == 0 || @@ -151,14 +119,8 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : // Define default damping model if unspecified, takes no args if (!model->damping_model) - model->init_model("viscoelastic", DAMPING); - - //Dan original code didn't require tangential? - if (!model->tangential_model) error->all(FLERR, "No tangential?"); - - if (model->limit_damping && !model->normal_model->allow_limit_damping) - error->all(FLERR,"Illegal pair_coeff command, " - "Cannot limit damping with specified normal contact model"); + model->construct_submodel("viscoelastic", DAMPING); + if (!model->tangential_model) error->all(FLERR, "No tangential model specified"); model->init(); @@ -546,7 +508,7 @@ void FixWallGran::post_force(int /*vflag*/) for (j = 0; j < size_history; j++) history_one[i][j] = 0.0; continue; - } // Dan: I tried to simplify this logic, not sure it's 100% correct + } if (model->beyond_contact) history_one[i][0] = 1; @@ -564,7 +526,6 @@ void FixWallGran::post_force(int /*vflag*/) model->history_update = history_update; if (use_history) model->history = history_one[i]; if (heat_flag) model->Ti = temperature[i]; - model->prep_contact(); model->calculate_forces(); diff --git a/src/GRANULAR/fix_wall_gran.h b/src/GRANULAR/fix_wall_gran.h index fd4a0a0ec8..73c95becc4 100644 --- a/src/GRANULAR/fix_wall_gran.h +++ b/src/GRANULAR/fix_wall_gran.h @@ -20,7 +20,7 @@ FixStyle(wall/gran,FixWallGran); #ifndef LMP_FIX_WALL_GRAN_H #define LMP_FIX_WALL_GRAN_H -#include "contact.h" +#include "granular_model.h" #include "fix.h" namespace LAMMPS_NS { @@ -53,7 +53,7 @@ class FixWallGran : public Fix { bigint time_origin; // for granular model choices - Contact::ContactModel *model; + Granular_NS::GranularModel *model; double lo, hi, cylradius; double amplitude, period, omega, vshear; diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 2f57d90ad6..ddafb316c0 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -18,7 +18,7 @@ #include "fix_wall_gran_region.h" #include "atom.h" -#include "contact.h" +#include "granular_model.h" #include "comm.h" #include "domain.h" #include "error.h" @@ -33,7 +33,7 @@ #include using namespace LAMMPS_NS; -using namespace Contact; +using namespace Granular_NS; using namespace FixConst; using namespace MathExtra; @@ -267,7 +267,6 @@ void FixWallGranRegion::post_force(int /*vflag*/) if (use_history) model->history = history_many[i][c2r[ic]]; if (heat_flag) model->Ti = temperature[i]; - model->prep_contact(); model->calculate_forces(); diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp new file mode 100644 index 0000000000..b5987d222b --- /dev/null +++ b/src/GRANULAR/granular_model.cpp @@ -0,0 +1,498 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This class contains a series of tools for DEM contacts + Multiple models can be defined and used to calculate forces + and torques based on contact geometry + + Contributing authors: + Dan Bolintineanu (SNL), Joel Clemmer (SNL) +----------------------------------------------------------------------- */ + +#include "granular_model.h" +#include "gsm.h" +#include "gsm_normal.h" +#include "gsm_tangential.h" +#include "gsm_damping.h" +#include "gsm_rolling.h" +#include "gsm_twisting.h" +#include "gsm_heat.h" +#include "comm.h" +#include "error.h" +#include "force.h" +#include "math_extra.h" + +#include + +using namespace LAMMPS_NS; +using namespace Granular_NS; +using namespace MathExtra; + +GranularModel::GranularModel(LAMMPS *lmp) : Pointers(lmp) +{ + limit_damping = 0; + beyond_contact = 0; + nondefault_history_transfer = 0; + classic_model = 0; + contact_type = PAIR; + + normal_model = nullptr; + damping_model = nullptr; + tangential_model = nullptr; + rolling_model = nullptr; + twisting_model = nullptr; + heat_model = nullptr; + + for (int i = 0; i < NSUBMODELS; i++) sub_models[i] = nullptr; + transfer_history_factor = nullptr; +} + +/* ---------------------------------------------------------------------- */ + +GranularModel::~GranularModel() +{ + delete [] transfer_history_factor; + + delete normal_model; + delete damping_model; + delete tangential_model; + delete rolling_model; + delete twisting_model; + delete heat_model; +} + +/* ---------------------------------------------------------------------- */ + +int GranularModel::init_submodel(char **arg, int iarg, int narg, SubmodelType model_type) +{ + if (iarg >= narg) + error->all(FLERR, "Must specify granular submodel name"); + + std::string model_name = std::string(arg[iarg++]); + construct_submodel(model_name, model_type); + + int num_coeffs = sub_models[model_type]->num_coeffs; + if (iarg + num_coeffs > narg) + error->all(FLERR, "Insufficient arguments provided for {} model", model_name); + + for (int i = 0; i < num_coeffs; i++) { + // A few parameters (eg.g kt for tangential mindlin) allow null + if (strcmp(arg[iarg + i], "NULL") == 0) sub_models[model_type]->coeffs[i] = -1; + else sub_models[model_type]->coeffs[i] = utils::numeric(FLERR,arg[iarg + i],false,lmp); + } + sub_models[model_type]->coeffs_to_local(); + + return iarg + num_coeffs; +} + +/* ---------------------------------------------------------------------- */ + +void GranularModel::construct_submodel(std::string model_name, SubmodelType model_type) +{ +if (model_type == NORMAL) { + delete normal_model; + if (model_name == "none") normal_model = new GSMNormalNone(this, lmp); + else if (model_name == "hooke") normal_model = new GSMNormalHooke(this, lmp); + else if (model_name == "hertz") normal_model = new GSMNormalHertz(this, lmp); + else if (model_name == "hertz/material") normal_model = new GSMNormalHertzMaterial(this, lmp); + else if (model_name == "dmt") normal_model = new GSMNormalDMT(this, lmp); + else if (model_name == "jkr") normal_model = new GSMNormalJKR(this, lmp); + else error->all(FLERR, "Normal model name {} not recognized", model_name); + sub_models[model_type] = normal_model; + + } else if (model_type == TANGENTIAL) { + delete tangential_model; + if (model_name == "none") tangential_model = new GSMTangentialNone(this, lmp); + else if (model_name == "linear_nohistory") tangential_model = new GSMTangentialLinearNoHistory(this, lmp); + else if (model_name == "linear_history") tangential_model = new GSMTangentialLinearHistory(this, lmp); + else if (model_name == "linear_history_classic") tangential_model = new GSMTangentialLinearHistoryClassic(this, lmp); + else if (model_name == "mindlin") tangential_model = new GSMTangentialMindlin(this, lmp); + else if (model_name == "mindlin/force") tangential_model = new GSMTangentialMindlinForce(this, lmp); + else if (model_name == "mindlin_rescale") tangential_model = new GSMTangentialMindlinRescale(this, lmp); + else if (model_name == "mindlin_rescale/force") tangential_model = new GSMTangentialMindlinRescaleForce(this, lmp); + else error->all(FLERR, "Tangential model name {} not recognized", model_name); + sub_models[model_type] = tangential_model; + + } else if (model_type == DAMPING) { + delete damping_model; + if (model_name == "none") damping_model = new GSMDampingNone(this, lmp); + else if (model_name == "velocity") damping_model = new GSMDampingVelocity(this, lmp); + else if (model_name == "mass_velocity") damping_model = new GSMDampingMassVelocity(this, lmp); + else if (model_name == "viscoelastic") damping_model = new GSMDampingViscoelastic(this, lmp); + else if (model_name == "tsuji") damping_model = new GSMDampingTsuji(this, lmp); + else error->all(FLERR, "Damping model name {} not recognized", model_name); + sub_models[model_type] = damping_model; + + } else if (model_type == ROLLING) { + delete rolling_model; + rolling_defined = 1; + if (model_name == "none") { + rolling_model = new GSMRollingNone(this, lmp); + rolling_defined = 0; + } else if (model_name == "sds") rolling_model = new GSMRollingSDS(this, lmp); + else error->all(FLERR, "Rolling model name {} not recognized", model_name); + sub_models[model_type] = rolling_model; + + } else if (model_type == TWISTING) { + delete twisting_model; + twisting_defined = 1; + if (model_name == "none") { + twisting_model = new GSMTwistingNone(this, lmp); + twisting_defined = 0; + } else if (model_name == "sds") twisting_model = new GSMTwistingSDS(this, lmp); + else if (model_name == "marshall") twisting_model = new GSMTwistingMarshall(this, lmp); + else error->all(FLERR, "Twisting model name {} not recognized", model_name); + sub_models[model_type] = twisting_model; + + } else if (model_type == HEAT) { + delete heat_model; + heat_defined = 1; + if (model_name == "none") { + heat_model = new GSMHeatNone(this, lmp); + heat_defined = 0; + } else if (model_name == "area") heat_model = new GSMHeatArea(this, lmp); + else error->all(FLERR, "Heat model name not {} recognized", model_name); + sub_models[model_type] = heat_model; + } else { + error->all(FLERR, "Illegal model type {}", model_type); + } + + sub_models[model_type]->name.assign(model_name); +} + +/* ---------------------------------------------------------------------- */ + +int GranularModel::init_classic_model(char **arg, int iarg, int narg) +{ + double kn, kt, gamman, gammat, xmu; + + classic_model = 1; + + if (iarg + 6 >= narg) + error->all(FLERR,"Insufficient arguments provided for classic gran model command"); + + kn = utils::numeric(FLERR,arg[iarg + 1],false,lmp); + if (strcmp(arg[iarg + 2],"NULL") == 0) kt = kn * 2.0 / 7.0; + else kt = utils::numeric(FLERR,arg[iarg + 2],false,lmp); + + gamman = utils::numeric(FLERR,arg[iarg + 3],false,lmp); + if (strcmp(arg[iarg + 4],"NULL") == 0) gammat = 0.5 * gamman; + else gammat = utils::numeric(FLERR,arg[iarg + 4],false,lmp); + + xmu = utils::numeric(FLERR,arg[iarg + 5],false,lmp); + int dampflag = utils::inumeric(FLERR,arg[iarg + 6],false,lmp); + if (dampflag == 0) gammat = 0.0; + + if (kn < 0.0 || kt < 0.0 || gamman < 0.0 || gammat < 0.0 || + xmu < 0.0 || xmu > 10000.0 || dampflag < 0 || dampflag > 1) + error->all(FLERR,"Illegal classic gran model command"); + + if (strcmp(arg[iarg],"hooke") == 0) { + construct_submodel("hooke", NORMAL); + construct_submodel("linear_nohistory", TANGENTIAL); + construct_submodel("mass_velocity", DAMPING); + } else if (strcmp(arg[iarg],"hooke/history") == 0) { + construct_submodel("hooke", NORMAL); + construct_submodel("linear_history_classic", TANGENTIAL); + construct_submodel("mass_velocity", DAMPING); + } else if (strcmp(arg[iarg],"hertz/history") == 0) { + // convert Kn and Kt from pressure units to force/distance^2 if Hertzian + kn /= force->nktv2p; + kt /= force->nktv2p; + construct_submodel("hertz", NORMAL); + construct_submodel("mindlin", TANGENTIAL); + construct_submodel("viscoelastic", DAMPING); + } else error->all(FLERR,"Invalid classic gran model"); + + // ensure additional models are undefined + construct_submodel("none", ROLLING); + construct_submodel("none", TWISTING); + construct_submodel("none", HEAT); + + // manually parse coeffs + normal_model->coeffs[0] = kn; + normal_model->coeffs[1] = gamman; + tangential_model->coeffs[0] = kt; + tangential_model->coeffs[1] = gammat / gamman; + tangential_model->coeffs[2] = xmu; + + normal_model->coeffs_to_local(); + tangential_model->coeffs_to_local(); + damping_model->coeffs_to_local(); + + iarg += 7; + return iarg; +} + +/* ---------------------------------------------------------------------- */ + +void GranularModel::init() +{ + int i, j; + for (i = 0; i < NSUBMODELS; i++) + if (!sub_models[i]) construct_submodel("none", (SubmodelType) i); + + // Must have valid normal, damping, and tangential models + if (normal_model->name == "none") error->all(FLERR, "Must specify normal granular model"); + if (damping_model->name == "none") error->all(FLERR, "Must specify damping granular model"); + if (tangential_model->name == "none") error->all(FLERR, "Must specify tangential granular model"); + + int size_cumulative; + size_history = 0; + for (i = 0; i < NSUBMODELS; i++) { + if (sub_models[i]->nondefault_history_transfer) + nondefault_history_transfer = 1; + if (sub_models[i]->beyond_contact) + beyond_contact = 1; + size_history += sub_models[i]->size_history; + if (limit_damping && (!sub_models[i]->allow_limit_damping)) + error->all(FLERR,"Cannot limit damping with {} model", sub_models[i]->name); + } + + if (nondefault_history_transfer) { + transfer_history_factor = new double[size_history]; + + for (i = 0; i < size_history; i++) { + // Find which model owns this history value + size_cumulative = 0; + for (j = 0; j < NSUBMODELS; j++) { + if (size_cumulative + sub_models[j]->size_history > i) break; + size_cumulative += sub_models[j]->size_history; + } + + // Check if model has nondefault transfers, if so copy its array + transfer_history_factor[i] = -1; + if (j != NSUBMODELS) { + if (sub_models[j]->nondefault_history_transfer) { + transfer_history_factor[i] = sub_models[j]->transfer_history_factor[i - size_cumulative]; + } + } + } + } + + for (i = 0; i < NSUBMODELS; i++) sub_models[i]->init(); +} + +/* ---------------------------------------------------------------------- */ + +int GranularModel::mix_coeffs(GranularModel *g1, GranularModel *g2) +{ + int i; + for (i = 0; i < NSUBMODELS; i++) { + if (g1->sub_models[i]->name != g2->sub_models[i]->name) return i; + + construct_submodel(g1->sub_models[i]->name, (SubmodelType) i); + sub_models[i]->mix_coeffs(g1->sub_models[i]->coeffs, g2->sub_models[i]->coeffs); + } + + limit_damping = MAX(g1->limit_damping, g2->limit_damping); + + return -1; +} + +/* ---------------------------------------------------------------------- */ + +void GranularModel::write_restart(FILE *fp) +{ + int num_char, num_coeffs; + + for (int i = 0; i < NSUBMODELS; i++) { + num_char = sub_models[i]->name.length(); + num_coeffs = sub_models[i]->num_coeffs; + fwrite(&num_char, sizeof(int), 1, fp); + fwrite(sub_models[i]->name.data(), sizeof(char), num_char, fp); + fwrite(&num_coeffs, sizeof(int), 1, fp); + fwrite(sub_models[i]->coeffs, sizeof(double), num_coeffs, fp); + } +} + +/* ---------------------------------------------------------------------- */ + +void GranularModel::read_restart(FILE *fp) +{ + int num_char, num_coeff; + + for (int i = 0; i < NSUBMODELS; i++) { + if (comm->me == 0) + utils::sfread(FLERR, &num_char, sizeof(int), 1, fp, nullptr, error); + MPI_Bcast(&num_char, 1, MPI_INT, 0, world); + + std::string model_name (num_char, ' '); + if (comm->me == 0) + utils::sfread(FLERR, const_cast(model_name.data()), sizeof(char),num_char, fp, nullptr, error); + MPI_Bcast(const_cast(model_name.data()), num_char, MPI_CHAR, 0, world); + + construct_submodel(model_name, (SubmodelType) i); + + if (comm->me == 0) { + utils::sfread(FLERR, &num_coeff, sizeof(int), 1, fp, nullptr, error); + if (num_coeff != sub_models[i]->num_coeffs) + error->one(FLERR, "Invalid granular model written to restart file"); + } + MPI_Bcast(&num_coeff, 1, MPI_INT, 0, world); + + if (comm->me == 0) { + utils::sfread(FLERR, sub_models[i]->coeffs, sizeof(double), num_coeff, fp, nullptr, error); + } + MPI_Bcast(sub_models[i]->coeffs, num_coeff, MPI_DOUBLE, 0, world); + sub_models[i]->coeffs_to_local(); + } +} + +/* ---------------------------------------------------------------------- */ + +bool GranularModel::check_contact() +{ + if (contact_type == WALL) { + // Used by fix_wall_gran.cpp + // radj = radius of wall + // dx already provided + rsq = lensq3(dx); + radsum = radi; + if (radj == 0) Reff = radi; + else Reff = radi * radj / (radi + radj); + } else if (contact_type == WALLREGION) { + // Used by fix_wall_gran_region.cpp + // radj = radius of wall + // dx and r already provided + rsq = r * r; + radsum = radi; + if (radj == 0) Reff = radi; + else Reff = radi * radj / (radi + radj); + } else { + sub3(xi, xj, dx); + rsq = lensq3(dx); + radsum = radi + radj; + Reff = radi * radj / radsum; + } + + touch = normal_model->touch(); + return touch; +} + +/* ---------------------------------------------------------------------- */ + +void GranularModel::calculate_forces() +{ + double temp[3]; + + // Standard geometric quantities + if (contact_type != WALLREGION) r = sqrt(rsq); + rinv = 1.0 / r; + delta = radsum - r; + dR = delta * Reff; + scale3(rinv, dx, nx); + + // relative translational velocity + sub3(vi, vj, vr); + + // normal component + vnnr = dot3(vr, nx); //v_R . n + scale3(vnnr, nx, vn); + + // tangential component + sub3(vr, vn, vt); + + // relative rotational velocity + scaleadd3(radi, omegai, radj, omegaj, wr); + + // relative tangential velocities + cross3(wr, nx, temp); + sub3(vt, temp, vtr); + vrel = len3(vtr); + + if (rolling_defined || twisting_defined) + sub3(omegai, omegaj, relrot); + + if (rolling_defined) { + // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) + // this is different from the Marshall papers, which use the Bagi/Kuhn formulation + // for rolling velocity (see Wang et al for why the latter is wrong) + vrl[0] = Reff * (relrot[1] * nx[2] - relrot[2] * nx[1]); + vrl[1] = Reff * (relrot[2] * nx[0] - relrot[0] * nx[2]); + vrl[2] = Reff * (relrot[0] * nx[1] - relrot[1] * nx[0]); + } + + if (twisting_defined) { + // omega_T (eq 29 of Marshall) + magtwist = dot3(relrot, nx); + } + + // calculate forces/torques + + forces[0] = 0.0; + double Fne, Fdamp, dist_to_contact; + area = normal_model->calculate_area(); + normal_model->set_knfac(); + Fne = normal_model->calculate_forces(); + + Fdamp = damping_model->calculate_forces(); + Fntot = Fne + Fdamp; + if (limit_damping && Fntot < 0.0) Fntot = 0.0; + + normal_model->set_fncrit(); // Needed for tangential, rolling, twisting + tangential_model->calculate_forces(); + if (rolling_defined) rolling_model->calculate_forces(); + if (twisting_defined) twisting_model->calculate_forces(); + + // sum contributions + + scale3(Fntot, nx, forces); + add3(forces, fs, forces); + + //May need to rethink eventually tris.. + cross3(nx, fs, torquesi); + scale3(-1, torquesi); + if (contact_type == PAIR) copy3(torquesi, torquesj); + + if (!classic_model && contact_type == PAIR) { + dist_to_contact = radi - 0.5 * delta; + scale3(dist_to_contact, torquesi); + dist_to_contact = radj - 0.5 * delta; + scale3(dist_to_contact, torquesj); + } else { + dist_to_contact = radi; + scale3(dist_to_contact, torquesi); + } + + double torroll[3]; + if (rolling_defined) { + cross3(nx, fr, torroll); + scale3(Reff, torroll); + add3(torquesi, torroll, torquesi); + if (contact_type == PAIR) sub3(torquesj, torroll, torquesj); + } + + double tortwist[3]; + if (twisting_defined) { + scale3(magtortwist, nx, tortwist); + add3(torquesi, tortwist, torquesi); + if (contact_type == PAIR) sub3(torquesj, tortwist, torquesj); + } + + if (heat_defined) { + dq = heat_model->calculate_heat(); + } +} + +/* ---------------------------------------------------------------------- + compute pull-off distance (beyond contact) for a given radius and atom type + use temporary variables since this does not use a specific contact geometry +------------------------------------------------------------------------- */ + +double GranularModel::pulloff_distance(double radi, double radj) +{ + return normal_model->pulloff_distance(radi, radj); +} diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h new file mode 100644 index 0000000000..cc94f49a1e --- /dev/null +++ b/src/GRANULAR/granular_model.h @@ -0,0 +1,107 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef LMP_GRANULAR_MODEL_H +#define LMP_GRANULAR_MODEL_H + +#include "pointers.h" // IWYU pragma: export + +namespace LAMMPS_NS { +namespace Granular_NS { + +#define EPSILON 1e-10 +#define NSUBMODELS 6 + +enum SubmodelType { + NORMAL = 0, + DAMPING = 1, + TANGENTIAL = 2, + ROLLING = 3, + TWISTING = 4, + HEAT = 5 +}; // Relative order matters since some derive coeffs from others + +enum ContactType { + PAIR = 0, + WALL = 1, + WALLREGION = 2 +}; + +// forward declaration +class GSM; +class GSMNormal; +class GSMDamping; +class GSMTangential; +class GSMRolling; +class GSMTwisting; +class GSMHeat; + +class GranularModel : protected Pointers { + public: + GranularModel(class LAMMPS *); + ~GranularModel(); + void init(); + bool check_contact(); + void calculate_forces(); + double pulloff_distance(double, double); + + int init_submodel(char **, int, int, SubmodelType); + int init_classic_model(char **, int, int); + void construct_submodel(std::string, SubmodelType); + int mix_coeffs(GranularModel*, GranularModel*); + + void write_restart(FILE *); + void read_restart(FILE *); + + // Sub models + GSMNormal *normal_model; + GSMDamping *damping_model; + GSMTangential *tangential_model; + GSMRolling *rolling_model; + GSMTwisting *twisting_model; + GSMHeat *heat_model; + GSM *sub_models[NSUBMODELS]; // Need to resize if we add more model flavors + + // Extra options + int beyond_contact, limit_damping, history_update; + ContactType contact_type; + + // History variables + int size_history, nondefault_history_transfer; + double *transfer_history_factor; + double *history; + + // Contact properties/output + double forces[3], torquesi[3], torquesj[3], dq; + + double radi, radj, meff, dt, Ti, Tj, area; + double Fntot, magtortwist; + + int i, j; + double *xi, *xj, *vi, *vj, *omegai, *omegaj; + double fs[3], fr[3], ft[3]; + + double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; + double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; + double magtwist; + bool touch; + + protected: + int rolling_defined, twisting_defined, heat_defined; // Used to quickly skip undefined submodels + int classic_model; +}; + +} // namespace Granular_NS +} // namespace LAMMPS_NS + +#endif diff --git a/src/GRANULAR/gsm.cpp b/src/GRANULAR/gsm.cpp new file mode 100644 index 0000000000..17b816ad21 --- /dev/null +++ b/src/GRANULAR/gsm.cpp @@ -0,0 +1,127 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +-------------------------------------------------------------------------*/ + +/* ---------------------------------------------------------------------- + This class contains a framework for granular submodels (GSM) including: + normal, damping, tangential, rolling, twisting, and heat + These are used to calculate forces/torques/etc based on contact geometry + + Contributing authors: + Dan Bolintineanu (SNL), Joel Clemmer (SNL) +----------------------------------------------------------------------- */ + +#include "gsm.h" +#include "error.h" +#include "utils.h" + +using namespace LAMMPS_NS; +using namespace Granular_NS; + +/* ---------------------------------------------------------------------- + Parent class for all types of granular submodels +------------------------------------------------------------------------- */ + +GSM::GSM(class GranularModel *gm, LAMMPS *lmp) : Pointers(lmp) +{ + this->gm = gm; + + allocated = 0; + size_history = 0; + history_index = 0; + allow_limit_damping = 1; + beyond_contact = 0; + num_coeffs = 0; + + nondefault_history_transfer = 0; + transfer_history_factor = nullptr; + allocate_coeffs(); +} + +/* ---------------------------------------------------------------------- */ + +GSM::~GSM() +{ + if (allocated) delete [] coeffs; + delete [] transfer_history_factor; +} + +/* ---------------------------------------------------------------------- */ + +void GSM::allocate_coeffs() +{ + allocated = 1; + coeffs = new double[num_coeffs]; +} + +/* ---------------------------------------------------------------------- */ + +void GSM::mix_coeffs(double* icoeffs, double* jcoeffs) +{ + for (int i = 0; i < num_coeffs; i++) + coeffs[i] = mix_geom(icoeffs[i], jcoeffs[i]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- + mixing of Young's modulus (E) +------------------------------------------------------------------------- */ + +double GSM::mix_stiffnessE(double E1, double E2, + double pois1, double pois2) +{ + double factor1 = (1 - pois1 * pois1) / E1; + double factor2 = (1 - pois2 * pois2) / E2; + return 1 / (factor1 + factor2); +} + +/* ---------------------------------------------------------------------- + mixing of shear modulus (G) +------------------------------------------------------------------------ */ + +double GSM::mix_stiffnessG(double E1, double E2, + double pois1, double pois2) +{ + double factor1 = 2 * (2 - pois1) * (1 + pois1) / E1; + double factor2 = 2 * (2 - pois2) * (1 + pois2) / E2; + return 1 / (factor1 + factor2); +} + +/* ---------------------------------------------------------------------- + mixing of Young's modulus (E) for walls +------------------------------------------------------------------------- */ + +double GSM::mix_stiffnessE_wall(double E, double pois) +{ + double factor = 2 * (1 - pois); + return E / factor; +} + +/* ---------------------------------------------------------------------- + mixing of shear modulus (G) for walls +------------------------------------------------------------------------ */ + +double GSM::mix_stiffnessG_wall(double E, double pois) +{ + double factor = 32.0 * (2 - pois) * (1 + pois); + return E / factor; +} + +/* ---------------------------------------------------------------------- + mixing of everything else +------------------------------------------------------------------------- */ + +double GSM::mix_geom(double val1, double val2) +{ + return sqrt(val1 * val2); +} diff --git a/src/GRANULAR/gsm.h b/src/GRANULAR/gsm.h new file mode 100644 index 0000000000..b2df6bef2b --- /dev/null +++ b/src/GRANULAR/gsm.h @@ -0,0 +1,61 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef LMP_GSM_H_ +#define LMP_GSM_H_ + +#include "granular_model.h" +#include "pointers.h" // IWYU pragma: export + +namespace LAMMPS_NS { +namespace Granular_NS { + +class GSM : protected Pointers { + public: + GSM(class GranularModel *, class LAMMPS *); + virtual ~GSM(); + + int num_coeffs; + double *coeffs; + void read_restart(); + virtual void mix_coeffs(double*, double*); + virtual void coeffs_to_local() = 0; + virtual void init() = 0; // called after all submodel coeffs defined + + void allocate_coeffs(); + std::string name; + + int size_history; + int nondefault_history_transfer; + double *transfer_history_factor; + + int history_index; + int beyond_contact; + int allow_limit_damping; + + GranularModel *gm; + + protected: + int allocated; + + double mix_stiffnessE(double, double, double, double); + double mix_stiffnessG(double, double, double, double); + double mix_stiffnessE_wall(double, double); + double mix_stiffnessG_wall(double, double); + double mix_geom(double, double); +}; + +} // namespace GranularModel +} // namespace LAMMPS_NS + +#endif /* GSM_H_ */ diff --git a/src/GRANULAR/gsm_damping.cpp b/src/GRANULAR/gsm_damping.cpp new file mode 100644 index 0000000000..9b51651f30 --- /dev/null +++ b/src/GRANULAR/gsm_damping.cpp @@ -0,0 +1,113 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "gsm_damping.h" +#include "gsm_normal.h" +#include "granular_model.h" +#include "math_special.h" + +using namespace LAMMPS_NS; +using namespace Granular_NS; +using namespace MathSpecial; + +/* ---------------------------------------------------------------------- + Default damping model +------------------------------------------------------------------------- */ + +GSMDamping::GSMDamping(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) {} + +/* ---------------------------------------------------------------------- */ + +void GSMDamping::init() +{ + damp = gm->normal_model->damp; +} + +/* ---------------------------------------------------------------------- + No model +------------------------------------------------------------------------- */ + +GSMDampingNone::GSMDampingNone(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) {} + +/* ---------------------------------------------------------------------- */ + +double GSMDampingNone::calculate_forces() +{ + return 0.0; +} + +/* ---------------------------------------------------------------------- + Velocity damping +------------------------------------------------------------------------- */ + +GSMDampingVelocity::GSMDampingVelocity(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) {} + +/* ---------------------------------------------------------------------- */ + +double GSMDampingVelocity::calculate_forces() +{ + damp_prefactor = damp; + return -damp_prefactor * gm->vnnr; +} + +/* ---------------------------------------------------------------------- + Mass velocity damping +------------------------------------------------------------------------- */ + +GSMDampingMassVelocity::GSMDampingMassVelocity(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) {} + +/* ---------------------------------------------------------------------- */ + +double GSMDampingMassVelocity::calculate_forces() +{ + damp_prefactor = damp * gm->meff; + return -damp_prefactor * gm->vnnr; +} + +/* ---------------------------------------------------------------------- + Default, viscoelastic damping +------------------------------------------------------------------------- */ + +GSMDampingViscoelastic::GSMDampingViscoelastic(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) {} + +/* ---------------------------------------------------------------------- */ + +double GSMDampingViscoelastic::calculate_forces() +{ + damp_prefactor = damp * gm->meff * gm->area; + return -damp_prefactor * gm->vnnr; +} + +/* ---------------------------------------------------------------------- + Tsuji damping +------------------------------------------------------------------------- */ + +GSMDampingTsuji::GSMDampingTsuji(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) {} + +/* ---------------------------------------------------------------------- */ + +void GSMDampingTsuji::init() +{ + double tmp = gm->normal_model->damp; + damp = 1.2728 - 4.2783 * tmp + 11.087 * square(tmp); + damp += -22.348 * cube(tmp)+ 27.467 * powint(tmp, 4); + damp += -18.022 * powint(tmp, 5) + 4.8218 * powint(tmp,6); +} + +/* ---------------------------------------------------------------------- */ + +double GSMDampingTsuji::calculate_forces() +{ + damp_prefactor = damp * sqrt(gm->meff * gm->normal_model->knfac); + return -damp_prefactor * gm->vnnr; +} diff --git a/src/GRANULAR/gsm_damping.h b/src/GRANULAR/gsm_damping.h new file mode 100644 index 0000000000..ab12cbc2d3 --- /dev/null +++ b/src/GRANULAR/gsm_damping.h @@ -0,0 +1,79 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef GSM_DAMPING_H_ +#define GSM_DAMPING_H_ + +#include "gsm.h" +#include "pointers.h" + +namespace LAMMPS_NS { +namespace Granular_NS { + +class GSMDamping : public GSM { + public: + GSMDamping(class GranularModel *, class LAMMPS *); + ~GSMDamping() {}; + virtual void coeffs_to_local() {}; + virtual void mix_coeffs(double*, double*) {}; + virtual void init(); + virtual double calculate_forces() = 0; + double damp, damp_prefactor; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMDampingNone : public GSMDamping { + public: + GSMDampingNone(class GranularModel *, class LAMMPS *); + void init() override {}; + double calculate_forces(); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMDampingVelocity : public GSMDamping { + public: + GSMDampingVelocity(class GranularModel *, class LAMMPS *); + double calculate_forces(); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMDampingMassVelocity : public GSMDamping { + public: + GSMDampingMassVelocity(class GranularModel *, class LAMMPS *); + double calculate_forces(); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMDampingViscoelastic : public GSMDamping { + public: + GSMDampingViscoelastic(class GranularModel *, class LAMMPS *); + double calculate_forces(); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMDampingTsuji : public GSMDamping { + public: + GSMDampingTsuji(class GranularModel *, class LAMMPS *); + void init() override; + double calculate_forces(); +}; + +} // namespace Granular_NS +} // namespace LAMMPS_NS + +#endif /*GSM_DAMPING_H_ */ diff --git a/src/GRANULAR/gsm_heat.cpp b/src/GRANULAR/gsm_heat.cpp new file mode 100644 index 0000000000..449df5520b --- /dev/null +++ b/src/GRANULAR/gsm_heat.cpp @@ -0,0 +1,63 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "gsm_heat.h" +#include "granular_model.h" +#include "error.h" + +using namespace LAMMPS_NS; +using namespace Granular_NS; + +/* ---------------------------------------------------------------------- + Default heat conduction +------------------------------------------------------------------------- */ + +GSMHeat::GSMHeat(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) {} + +/* ---------------------------------------------------------------------- + Area-based heat conduction +------------------------------------------------------------------------- */ + +GSMHeatNone::GSMHeatNone(GranularModel *gm, LAMMPS *lmp) : GSMHeat(gm, lmp) {} + +/* ---------------------------------------------------------------------- */ + +double GSMHeatNone::calculate_heat() +{ + return 0.0; +} + +/* ---------------------------------------------------------------------- + Area-based heat conduction +------------------------------------------------------------------------- */ + +GSMHeatArea::GSMHeatArea(GranularModel *gm, LAMMPS *lmp) : GSMHeat(gm, lmp) +{ + num_coeffs = 1; +} + +/* ---------------------------------------------------------------------- */ + +void GSMHeatArea::coeffs_to_local() +{ + conductivity = coeffs[0]; + + if (conductivity < 0.0) error->all(FLERR, "Illegal area heat model"); +} + +/* ---------------------------------------------------------------------- */ + +double GSMHeatArea::calculate_heat() +{ + return conductivity * gm->area * (gm->Tj - gm->Ti); +} diff --git a/src/GRANULAR/gsm_heat.h b/src/GRANULAR/gsm_heat.h new file mode 100644 index 0000000000..f397d555b6 --- /dev/null +++ b/src/GRANULAR/gsm_heat.h @@ -0,0 +1,53 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef GSM_HEAT_H_ +#define GSM_HEAT_H_ + +#include "gsm.h" + +namespace LAMMPS_NS { +namespace Granular_NS { + +class GSMHeat : public GSM { + public: + GSMHeat(class GranularModel *, class LAMMPS *); + ~GSMHeat() {}; + virtual void coeffs_to_local() {}; + virtual void init() {}; + virtual double calculate_heat() = 0; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMHeatNone : public GSMHeat { + public: + GSMHeatNone(class GranularModel *, class LAMMPS *); + double calculate_heat(); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMHeatArea : public GSMHeat { + public: + GSMHeatArea(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + double calculate_heat(); + protected: + double conductivity; +}; + +} // namespace Granular_NS +} // namespace LAMMPS_NS + +#endif /*GSM_HEAT_H_ */ diff --git a/src/GRANULAR/gsm_normal.cpp b/src/GRANULAR/gsm_normal.cpp new file mode 100644 index 0000000000..2b029ece6a --- /dev/null +++ b/src/GRANULAR/gsm_normal.cpp @@ -0,0 +1,377 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "gsm_normal.h" +#include "granular_model.h" +#include "error.h" +#include "math_const.h" + +using namespace LAMMPS_NS; +using namespace Granular_NS; +using namespace MathConst; + +#define PI27SQ 266.47931882941264802866 // 27*PI**2 +#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) +#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) +#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) +#define FOURTHIRDS (4.0/3.0) // 4/3 +#define ONETHIRD (1.0/3.0) // 1/3 +#define THREEQUARTERS 0.75 // 3/4 + +/* ---------------------------------------------------------------------- + Default normal model +------------------------------------------------------------------------- */ + +GSMNormal::GSMNormal(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) +{ + material_properties = 0; +} + +/* ---------------------------------------------------------------------- */ + +bool GSMNormal::touch() +{ + bool touchflag = (gm->rsq < gm->radsum * gm->radsum); + return touchflag; +} + +/* ---------------------------------------------------------------------- */ + +double GSMNormal::pulloff_distance(double radi, double radj) +{ + //called outside of compute(), do not assume correct geometry defined in contact + return radi + radj; +} + +/* ---------------------------------------------------------------------- */ + +double GSMNormal::calculate_area() +{ + return sqrt(gm->dR); +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormal::set_fncrit() +{ + Fncrit = fabs(gm->Fntot); +} + +/* ---------------------------------------------------------------------- + No model +------------------------------------------------------------------------- */ + +GSMNormalNone::GSMNormalNone(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) {} + +/* ---------------------------------------------------------------------- */ + +double GSMNormalNone::calculate_forces() +{ + return 0.0; +} + +/* ---------------------------------------------------------------------- + Hookean normal force +------------------------------------------------------------------------- */ + +GSMNormalHooke::GSMNormalHooke(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) +{ + num_coeffs = 2; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalHooke::coeffs_to_local() +{ + k = coeffs[0]; + damp = coeffs[1]; + + if (k < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hooke normal model"); +} + +/* ---------------------------------------------------------------------- */ + +double GSMNormalHooke::calculate_forces() +{ + Fne = knfac * gm->delta; + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalHooke::set_knfac() +{ + knfac = k; +} + +/* ---------------------------------------------------------------------- + Hertzian normal force +------------------------------------------------------------------------- */ + +GSMNormalHertz::GSMNormalHertz(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) +{ + num_coeffs = 2; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalHertz::coeffs_to_local() +{ + k = coeffs[0]; + damp = coeffs[1]; + + if (k < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hertz normal model"); +} + +/* ---------------------------------------------------------------------- */ + +double GSMNormalHertz::calculate_forces() +{ + Fne = knfac * gm->delta; + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalHertz::set_knfac() +{ + knfac = k * gm->area; +} + +/* ---------------------------------------------------------------------- + Hertzian normal force with material properties +------------------------------------------------------------------------- */ + +GSMNormalHertzMaterial::GSMNormalHertzMaterial(GranularModel *gm, LAMMPS *lmp) : GSMNormalHertz(gm, lmp) +{ + material_properties = 1; + num_coeffs = 3; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalHertzMaterial::coeffs_to_local() +{ + Emod = coeffs[0]; + damp = coeffs[1]; + poiss = coeffs[2]; + if (gm->contact_type == PAIR) { + k = FOURTHIRDS * mix_stiffnessE(Emod, Emod, poiss, poiss); + } else { + k = FOURTHIRDS * mix_stiffnessE_wall(Emod, poiss); + } + + if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hertz material normal model"); +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalHertzMaterial::mix_coeffs(double* icoeffs, double* jcoeffs) +{ + coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- + DMT normal force +------------------------------------------------------------------------- */ + +GSMNormalDMT::GSMNormalDMT(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) +{ + allow_limit_damping = 0; + material_properties = 1; + num_coeffs = 4; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalDMT::coeffs_to_local() +{ + Emod = coeffs[0]; + damp = coeffs[1]; + poiss = coeffs[2]; + cohesion = coeffs[3]; + if (gm->contact_type == PAIR) { + k = FOURTHIRDS * mix_stiffnessE(Emod, Emod, poiss, poiss); + } else { + k = FOURTHIRDS * mix_stiffnessE_wall(Emod, poiss); + } + + if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal DMT normal model"); +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalDMT::mix_coeffs(double* icoeffs, double* jcoeffs) +{ + coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); + coeffs[3] = mix_geom(icoeffs[3], jcoeffs[3]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +double GSMNormalDMT::calculate_forces() +{ + Fne = knfac * gm->delta; + F_pulloff = 4.0 * MathConst::MY_PI * cohesion * gm->Reff; + Fne -= F_pulloff; + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalDMT::set_knfac() +{ + knfac = k * gm->area; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalDMT::set_fncrit() +{ + Fncrit = fabs(Fne + 2.0 * F_pulloff); +} + +/* ---------------------------------------------------------------------- + JKR normal force +------------------------------------------------------------------------- */ + +GSMNormalJKR::GSMNormalJKR(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) +{ + allow_limit_damping = 0; + material_properties = 1; + beyond_contact = 1; + num_coeffs = 4; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalJKR::coeffs_to_local() +{ + Emod = coeffs[0]; + damp = coeffs[1]; + poiss = coeffs[2]; + cohesion = coeffs[3]; + + if (gm->contact_type == PAIR) { + Emix = mix_stiffnessE(Emod, Emod, poiss, poiss); + } else { + Emix = mix_stiffnessE_wall(Emod, poiss); + } + + k = FOURTHIRDS * Emix; + + if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal JKR normal model"); +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalJKR::mix_coeffs(double* icoeffs, double* jcoeffs) +{ + coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); + coeffs[3] = mix_geom(icoeffs[3], jcoeffs[3]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +bool GSMNormalJKR::touch() +{ + double area_at_pulloff, R2, delta_pulloff, dist_pulloff; + bool touchflag; + + if (gm->touch) { + R2 = gm->Reff * gm->Reff; + area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * R2 / (4.0 * Emix)); + delta_pulloff = area_at_pulloff * area_at_pulloff / gm->Reff - 2.0 * sqrt(MY_PI * cohesion * area_at_pulloff / Emix); + dist_pulloff = gm->radsum - delta_pulloff; + touchflag = gm->rsq < (dist_pulloff * dist_pulloff); + } else { + touchflag = gm->rsq < (gm->radsum * gm->radsum); + } + + return touchflag; +} + +/* ---------------------------------------------------------------------- + called outside of compute(), do not assume geometry defined in contact +------------------------------------------------------------------------- */ + +double GSMNormalJKR::pulloff_distance(double radi, double radj) +{ + double area_at_pulloff, Reff_tmp; + + Reff_tmp = radi * radj / (radi + radj); // May not be defined + if (Reff_tmp <= 0) return 0; + + area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4.0 * Emix)); + return area_at_pulloff * area_at_pulloff / Reff_tmp - 2.0 * sqrt(MY_PI * cohesion * area_at_pulloff / Emix); +} + +/* ---------------------------------------------------------------------- */ + +double GSMNormalJKR::calculate_area() +{ + double R2, dR2, t0, t1, t2, t3, t4, t5, t6; + double sqrt1, sqrt2, sqrt3; + + R2 = gm->Reff * gm->Reff; + dR2 = gm->dR * gm->dR; + t0 = cohesion * cohesion * R2 * R2 * Emix; + t1 = PI27SQ * t0; + t2 = 8.0 * gm->dR * dR2 * Emix * Emix * Emix; + t3 = 4.0 * dR2 * Emix; + + // in case sqrt(0) < 0 due to precision issues + sqrt1 = MAX(0, t0 * (t1 + 2.0 * t2)); + t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); + t5 = t3 / t4 + t4 / Emix; + sqrt2 = MAX(0, 2.0 * gm->dR + t5); + t6 = sqrt(sqrt2); + sqrt3 = MAX(0, 4.0 * gm->dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Emix * t6)); + + return INVROOT6 * (t6 + sqrt(sqrt3)); +} + +/* ---------------------------------------------------------------------- */ + +double GSMNormalJKR::calculate_forces() +{ + double a2; + a2 = gm->area * gm->area; + Fne = knfac * a2 / gm->Reff - MY_2PI * a2 * sqrt(4.0 * cohesion * Emix / (MY_PI * gm->area)); + F_pulloff = 3.0 * MY_PI * cohesion * gm->Reff; + + return Fne; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalJKR::set_knfac() +{ + knfac = k * gm->area; +} + +/* ---------------------------------------------------------------------- */ + +void GSMNormalJKR::set_fncrit() +{ + Fncrit = fabs(Fne + 2.0 * F_pulloff); +} diff --git a/src/GRANULAR/gsm_normal.h b/src/GRANULAR/gsm_normal.h new file mode 100644 index 0000000000..31587dfd03 --- /dev/null +++ b/src/GRANULAR/gsm_normal.h @@ -0,0 +1,118 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef GSM_NORMAL_H_ +#define GSM_NORMAL_H_ + +#include "gsm.h" + +namespace LAMMPS_NS { +namespace Granular_NS { + +class GSMNormal : public GSM { + public: + GSMNormal(class GranularModel *, class LAMMPS *); + ~GSMNormal() {}; + virtual void coeffs_to_local() {}; + virtual void init() {}; + virtual bool touch(); + virtual double pulloff_distance(double, double); + virtual double calculate_area(); + virtual void set_knfac() = 0; + virtual double calculate_forces() = 0; + virtual void set_fncrit(); + double damp; // Vestigial argument needed by damping + double Emod, poiss; + double Fncrit, Fne, knfac; + int material_properties; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMNormalNone : public GSMNormal { + public: + GSMNormalNone(class GranularModel *, class LAMMPS *); + void set_knfac() {}; + double calculate_forces(); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMNormalHooke : public GSMNormal { + public: + GSMNormalHooke(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void set_knfac(); + double calculate_forces(); + protected: + double k; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMNormalHertz : public GSMNormal { + public: + GSMNormalHertz(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void set_knfac(); + double calculate_forces(); + protected: + double k; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMNormalHertzMaterial : public GSMNormalHertz { + public: + GSMNormalHertzMaterial(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMNormalDMT : public GSMNormal { + public: + GSMNormalDMT(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; + void set_knfac(); + double calculate_forces(); + void set_fncrit() override; + protected: + double k, cohesion; + double F_pulloff; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMNormalJKR : public GSMNormal { + public: + GSMNormalJKR(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; + bool touch() override; + double pulloff_distance(double, double) override; + double calculate_area() override; + void set_knfac(); + double calculate_forces(); + void set_fncrit() override; + protected: + double k, cohesion; + double Emix, F_pulloff; +}; + +} // namespace Granular_NS +} // namespace LAMMPS_NS + +#endif /*GSM_NORMAL_H_ */ diff --git a/src/GRANULAR/gsm_rolling.cpp b/src/GRANULAR/gsm_rolling.cpp new file mode 100644 index 0000000000..efb0ea423b --- /dev/null +++ b/src/GRANULAR/gsm_rolling.cpp @@ -0,0 +1,121 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "gsm_normal.h" +#include "gsm_rolling.h" +#include "granular_model.h" +#include "error.h" +#include "math_const.h" +#include "math_extra.h" + +using namespace LAMMPS_NS; +using namespace Granular_NS; +using namespace MathConst; +using namespace MathExtra; + +/* ---------------------------------------------------------------------- + Default rolling friction model +------------------------------------------------------------------------- */ + +GSMRolling::GSMRolling(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) {} + +/* ---------------------------------------------------------------------- + No model +------------------------------------------------------------------------- */ + +GSMRollingNone::GSMRollingNone(GranularModel *gm, LAMMPS *lmp) : GSMRolling(gm, lmp) {} + +/* ---------------------------------------------------------------------- + SDS rolling friction model +------------------------------------------------------------------------- */ + +GSMRollingSDS::GSMRollingSDS(GranularModel *gm, LAMMPS *lmp) : GSMRolling(gm, lmp) +{ + num_coeffs = 3; + size_history = 3; +} + +/* ---------------------------------------------------------------------- */ + +void GSMRollingSDS::coeffs_to_local() +{ + k = coeffs[0]; + gamma = coeffs[1]; + mu = coeffs[2]; + + if (k < 0.0 || mu < 0.0 || gamma < 0.0) + error->all(FLERR, "Illegal SDS rolling model"); +} + +/* ---------------------------------------------------------------------- */ + +void GSMRollingSDS::calculate_forces() +{ + int rhist0, rhist1, rhist2, frameupdate; + double Frcrit, rolldotn, rollmag, prjmag, magfr, hist_temp[3], scalefac, temp_array[3]; + double k_inv, magfr_inv; + + rhist0 = history_index; + rhist1 = rhist0 + 1; + rhist2 = rhist1 + 1; + + Frcrit = mu * gm->normal_model->Fncrit; + + if (gm->history_update) { + hist_temp[0] = gm->history[rhist0]; + hist_temp[1] = gm->history[rhist1]; + hist_temp[2] = gm->history[rhist2]; + rolldotn = dot3(hist_temp, gm->nx); + + frameupdate = (fabs(rolldotn) * k) > (EPSILON * Frcrit); + if (frameupdate) { // rotate into tangential plane + rollmag = len3(hist_temp); + // projection + scale3(rolldotn, gm->nx, temp_array); + sub3(hist_temp, temp_array, hist_temp); + + // also rescale to preserve magnitude + prjmag = len3(hist_temp); + if (prjmag > 0) scalefac = rollmag / prjmag; + else scalefac = 0; + scale3(scalefac, hist_temp); + } + scale3(gm->dt, gm->vrl, temp_array); + add3(hist_temp, temp_array, hist_temp); + } + + scaleadd3(-k, hist_temp, -gamma, gm->vrl, gm->fr); + + // rescale frictional displacements and forces if needed + magfr = len3(gm->fr); + if (magfr > Frcrit) { + rollmag = len3(hist_temp); + if (rollmag != 0.0) { + k_inv = 1.0 / k; + magfr_inv = 1.0 / magfr; + scale3(-Frcrit * k_inv * magfr_inv, gm->fr, hist_temp); + scale3(-gamma * k_inv, gm->vrl, temp_array); + add3(hist_temp, temp_array, hist_temp); + + scale3(Frcrit * magfr_inv, gm->fr); + } else { + zero3(gm->fr); + } + } + + if (gm->history_update) { + gm->history[rhist0] = hist_temp[0]; + gm->history[rhist1] = hist_temp[1]; + gm->history[rhist2] = hist_temp[2]; + } +} diff --git a/src/GRANULAR/gsm_rolling.h b/src/GRANULAR/gsm_rolling.h new file mode 100644 index 0000000000..44f45b583d --- /dev/null +++ b/src/GRANULAR/gsm_rolling.h @@ -0,0 +1,53 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef GSM_ROLLING_H_ +#define GSM_ROLLING_H_ + +#include "gsm.h" + +namespace LAMMPS_NS { +namespace Granular_NS { + +class GSMRolling : public GSM { + public: + GSMRolling(class GranularModel *, class LAMMPS *); + ~GSMRolling() {}; + virtual void coeffs_to_local() {}; + virtual void init() {}; + virtual void calculate_forces() = 0; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMRollingNone : public GSMRolling { + public: + GSMRollingNone(class GranularModel *, class LAMMPS *); + void calculate_forces() {}; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMRollingSDS : public GSMRolling { + public: + GSMRollingSDS(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void calculate_forces(); + protected: + double k, mu, gamma; +}; + +} // namespace Granular_NS +} // namespace LAMMPS_NS + +#endif /*GSM_ROLLING_H_ */ diff --git a/src/GRANULAR/gsm_tangential.cpp b/src/GRANULAR/gsm_tangential.cpp new file mode 100644 index 0000000000..1f6213d708 --- /dev/null +++ b/src/GRANULAR/gsm_tangential.cpp @@ -0,0 +1,412 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "gsm_damping.h" +#include "gsm_normal.h" +#include "gsm_tangential.h" +#include "granular_model.h" +#include "error.h" +#include "math_const.h" +#include "math_extra.h" + +using namespace LAMMPS_NS; +using namespace Granular_NS; +using namespace MathConst; +using namespace MathExtra; + +/* ---------------------------------------------------------------------- + Default model +------------------------------------------------------------------------- */ + +GSMTangential::GSMTangential(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) {} + +/* ---------------------------------------------------------------------- + No model +------------------------------------------------------------------------- */ + +GSMTangentialNone::GSMTangentialNone(GranularModel *gm, LAMMPS *lmp) : GSMTangential(gm, lmp) {} + +/* ---------------------------------------------------------------------- + Linear model with no history +------------------------------------------------------------------------- */ + +GSMTangentialLinearNoHistory::GSMTangentialLinearNoHistory(GranularModel *gm, LAMMPS *lmp) : GSMTangential(gm, lmp) +{ + num_coeffs = 2; + size_history = 3; +} + +/* ---------------------------------------------------------------------- */ + +void GSMTangentialLinearNoHistory::coeffs_to_local() +{ + k = 0.0; // No tangential stiffness with no history + xt = coeffs[0]; + mu = coeffs[1]; + + if (k < 0.0 || xt < 0.0 || mu < 0.0) + error->all(FLERR, "Illegal linear no history tangential model"); +} + +/* ---------------------------------------------------------------------- */ + +void GSMTangentialLinearNoHistory::calculate_forces() +{ + // classic pair gran/hooke (no history) + damp = xt * gm->damping_model->damp_prefactor; + + double Fscrit = mu * gm->normal_model->Fncrit; + double fsmag = damp * gm->vrel; + + double Ft; + if (gm->vrel != 0.0) Ft = MIN(Fscrit, fsmag) / gm->vrel; + else Ft = 0.0; + + scale3(-Ft, gm->vtr, gm->fs); +} + +/* ---------------------------------------------------------------------- + Linear model with history +------------------------------------------------------------------------- */ + +GSMTangentialLinearHistory::GSMTangentialLinearHistory(GranularModel *gm, LAMMPS *lmp) : GSMTangential(gm, lmp) +{ + num_coeffs = 3; + size_history = 3; +} + +/* ---------------------------------------------------------------------- */ + +void GSMTangentialLinearHistory::coeffs_to_local() +{ + k = coeffs[0]; + xt = coeffs[1]; + mu = coeffs[2]; + + if (k < 0.0 || xt < 0.0 || mu < 0.0) + error->all(FLERR, "Illegal linear tangential model"); +} + +/* ---------------------------------------------------------------------- */ + +void GSMTangentialLinearHistory::calculate_forces() +{ + // Note: this is the same as the base Mindlin calculation except k isn't scaled by area + double magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; + int frame_update = 0; + + damp = xt * gm->damping_model->damp_prefactor; + + double Fscrit = gm->normal_model->Fncrit * mu; + double *history = & gm->history[history_index]; + + // rotate and update displacements / force. + // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 + if (gm->history_update) { + rsht = dot3(history, gm->nx); + frame_update = (fabs(rsht) * k) > (EPSILON * Fscrit); + + if (frame_update) { + shrmag = len3(history); + + // projection + scale3(rsht, gm->nx, temp_array); + sub3(history, temp_array, history); + + // also rescale to preserve magnitude + prjmag = len3(history); + if (prjmag > 0) temp_dbl = shrmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, history); + } + + // update history, tangential force + // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 + scale3(gm->dt, gm->vtr, temp_array); + add3(history, temp_array, history); + } + + + // tangential forces = history + tangential velocity damping + scale3(-k, history, gm->fs); + scale3(damp, gm->vtr, temp_array); + sub3(gm->fs, temp_array, gm->fs); + + // rescale frictional displacements and forces if needed + magfs = len3(gm->fs); + if (magfs > Fscrit) { + shrmag = len3(history); + if (shrmag != 0.0) { + magfs_inv = 1.0 / magfs; + scale3(Fscrit * magfs_inv, gm->fs, history); + scale3(damp, gm->vtr, temp_array); + add3(history, temp_array, history); + scale3(-1.0 / k, history); + scale3(Fscrit * magfs_inv, gm->fs); + } else { + zero3(gm->fs); + } + } +} + +/* ---------------------------------------------------------------------- + Linear model with history from pair gran/hooke/history +------------------------------------------------------------------------- */ + +GSMTangentialLinearHistoryClassic::GSMTangentialLinearHistoryClassic(GranularModel *gm, LAMMPS *lmp) : GSMTangentialLinearHistory(gm, lmp) +{ + scale_area = 0; // Sets gran/hooke/history behavior +} + +/* ---------------------------------------------------------------------- */ + +void GSMTangentialLinearHistoryClassic::calculate_forces() +{ + double k_scaled, magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; + double temp_array[3]; + int frame_update = 0; + + k_scaled = k; + if (scale_area) k_scaled *= gm->area; + + damp = xt * gm->damping_model->damp_prefactor; + + double Fscrit = gm->normal_model->Fncrit * mu; + double *history = & gm->history[history_index]; + + // update history + if (gm->history_update) { + scale3(gm->dt, gm->vtr, temp_array); + add3(history, temp_array, history); + } + + shrmag = len3(history); + + // rotate shear displacements + if (gm->history_update) { + rsht = dot3(history, gm->nx); + scale3(rsht, gm->nx, temp_array); + sub3(history, temp_array, history); + } + + // tangential forces = history + tangential velocity damping + scale3(-k_scaled, history, gm->fs); + scale3(damp, gm->vtr, temp_array); + sub3(gm->fs, temp_array, gm->fs); + + // rescale frictional displacements and forces if needed + magfs = len3(gm->fs); + if (magfs > Fscrit) { + if (shrmag != 0.0) { + magfs_inv = 1.0 / magfs; + scale3(Fscrit * magfs_inv, gm->fs, history); + scale3(damp, gm->vtr, temp_array); + add3(history, temp_array, history); + temp_dbl = -1.0 / k_scaled; + if (scale_area) temp_dbl /= gm->area; + scale3(temp_dbl, history); + scale3(Fscrit * magfs_inv, gm->fs); + } else { + zero3(gm->fs); + } + } +} + +/* ---------------------------------------------------------------------- + Mindlin from pair gran/hertz/history +------------------------------------------------------------------------- */ + +GSMTangentialMindlinClassic::GSMTangentialMindlinClassic(GranularModel *gm, LAMMPS *lmp) : GSMTangentialLinearHistoryClassic(gm, lmp) +{ + scale_area = 1; // Sets gran/hertz/history behavior +} + +/* ---------------------------------------------------------------------- + Mindlin model +------------------------------------------------------------------------- */ + +GSMTangentialMindlin::GSMTangentialMindlin(GranularModel *gm, LAMMPS *lmp) : GSMTangential(gm, lmp) +{ + num_coeffs = 3; + size_history = 3; + mindlin_force = 0; + mindlin_rescale = 0; +} + +/* ---------------------------------------------------------------------- */ + +void GSMTangentialMindlin::coeffs_to_local() +{ + k = coeffs[0]; + xt = coeffs[1]; + mu = coeffs[2]; + + if (k == -1) { + if (!gm->normal_model->material_properties) + error->all(FLERR, "Must either specify tangential stiffness or material properties for normal model for the Mindlin tangential style"); + + double Emod = gm->normal_model->Emod; + double poiss = gm->normal_model->poiss; + + if (gm->contact_type == PAIR) { + k = 8.0 * mix_stiffnessG(Emod, Emod, poiss, poiss); + } else { + k = 8.0 * mix_stiffnessG_wall(Emod, poiss); + } + } + + if (k < 0.0 || xt < 0.0 || mu < 0.0) + error->all(FLERR, "Illegal Mindlin tangential model"); +} + +/* ---------------------------------------------------------------------- */ + +void GSMTangentialMindlin::mix_coeffs(double* icoeffs, double* jcoeffs) +{ + if (icoeffs[0] == -1 || jcoeffs[0] == -1) coeffs[0] = -1; + else coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); + coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); + coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); + coeffs_to_local(); +} + +/* ---------------------------------------------------------------------- */ + +void GSMTangentialMindlin::calculate_forces() +{ + double k_scaled, magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; + double temp_array[3]; + int frame_update = 0; + + damp = xt * gm->damping_model->damp_prefactor; + + double *history = & gm->history[history_index]; + double Fscrit = gm->normal_model->Fncrit * mu; + + k_scaled = k * gm->area; + + // on unloading, rescale the shear displacements/force + if (mindlin_rescale) + if (gm->area < history[3]) + scale3(gm->area / history[3], history); + + // rotate and update displacements / force. + // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 + if (gm->history_update) { + rsht = dot3(history, gm->nx); + if (mindlin_force) { + frame_update = fabs(rsht) > (EPSILON * Fscrit); + } else { + frame_update = (fabs(rsht) * k_scaled) > (EPSILON * Fscrit); + } + + if (frame_update) { + shrmag = len3(history); + // projection + scale3(rsht, gm->nx, temp_array); + sub3(history, temp_array, history); + // also rescale to preserve magnitude + prjmag = len3(history); + if (prjmag > 0) temp_dbl = shrmag / prjmag; + else temp_dbl = 0; + scale3(temp_dbl, history); + } + + // update history + if (mindlin_force) { + // tangential force + // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 + scale3(-k_scaled * gm->dt, gm->vtr, temp_array); + } else { + scale3(gm->dt, gm->vtr, temp_array); + } + add3(history, temp_array, history); + + if (mindlin_rescale) history[3] = gm->area; + } + + // tangential forces = history + tangential velocity damping + scale3(-damp, gm->vtr, gm->fs); + + if (!mindlin_force) { + scale3(k_scaled, history, temp_array); + sub3(gm->fs, temp_array, gm->fs); + } else { + add3(gm->fs, history, gm->fs); + } + + // rescale frictional displacements and forces if needed + magfs = len3(gm->fs); + if (magfs > Fscrit) { + shrmag = len3(history); + if (shrmag != 0.0) { + magfs_inv = 1.0 / magfs; + scale3(Fscrit * magfs_inv, gm->fs, history); + scale3(damp, gm->vtr, temp_array); + add3(history, temp_array, history); + + if (!mindlin_force) + scale3(-1.0 / k_scaled, history); + + scale3(Fscrit * magfs_inv, gm->fs); + } else { + zero3(gm->fs); + } + } +} + +/* ---------------------------------------------------------------------- + Mindlin force model +------------------------------------------------------------------------- */ + +GSMTangentialMindlinForce::GSMTangentialMindlinForce(GranularModel *gm, LAMMPS *lmp) : GSMTangentialMindlin(gm, lmp) +{ + num_coeffs = 3; + size_history = 3; + mindlin_force = 1; + mindlin_rescale = 0; +} + +/* ---------------------------------------------------------------------- + Mindlin rescale model +------------------------------------------------------------------------- */ + +GSMTangentialMindlinRescale::GSMTangentialMindlinRescale(GranularModel *gm, LAMMPS *lmp) : GSMTangentialMindlin(gm, lmp) +{ + num_coeffs = 3; + size_history = 4; + mindlin_force = 0; + mindlin_rescale = 1; + + nondefault_history_transfer = 1; + transfer_history_factor = new double[size_history]; + for (int i = 0; i < size_history; i++) transfer_history_factor[i] = -1.0; + transfer_history_factor[3] = +1; +} + +/* ---------------------------------------------------------------------- + Mindlin rescale force model +------------------------------------------------------------------------- */ + +GSMTangentialMindlinRescaleForce::GSMTangentialMindlinRescaleForce(GranularModel *gm, LAMMPS *lmp) : GSMTangentialMindlin(gm, lmp) +{ + num_coeffs = 3; + size_history = 4; + mindlin_force = 1; + mindlin_rescale = 1; + + nondefault_history_transfer = 1; + transfer_history_factor = new double[size_history]; + for (int i = 0; i < size_history; i++) transfer_history_factor[i] = -1.0; + transfer_history_factor[3] = +1; +} diff --git a/src/GRANULAR/gsm_tangential.h b/src/GRANULAR/gsm_tangential.h new file mode 100644 index 0000000000..8e1d644fea --- /dev/null +++ b/src/GRANULAR/gsm_tangential.h @@ -0,0 +1,113 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef GSM_TANGENTIAL_H_ +#define GSM_TANGENTIAL_H_ + +#include "gsm.h" + +namespace LAMMPS_NS { +namespace Granular_NS { + +class GSMTangential : public GSM { + public: + GSMTangential(class GranularModel *, class LAMMPS *); + virtual ~GSMTangential() {}; + virtual void coeffs_to_local() {}; + virtual void init() {}; + virtual void calculate_forces() = 0; + int rescale_flag; + double k, damp, mu; // Used by Marshall twisting model + protected: + double xt; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTangentialNone : public GSMTangential { + public: + GSMTangentialNone(class GranularModel *, class LAMMPS *); + void calculate_forces() {}; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTangentialLinearNoHistory : public GSMTangential { + public: + GSMTangentialLinearNoHistory(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void calculate_forces(); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTangentialLinearHistory : public GSMTangential { + public: + GSMTangentialLinearHistory(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void calculate_forces(); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTangentialLinearHistoryClassic : public GSMTangentialLinearHistory { + public: + GSMTangentialLinearHistoryClassic(class GranularModel *, class LAMMPS *); + void calculate_forces(); + int scale_area; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTangentialMindlinClassic : public GSMTangentialLinearHistoryClassic { + public: + GSMTangentialMindlinClassic(class GranularModel *, class LAMMPS *); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTangentialMindlin : public GSMTangential { + public: + GSMTangentialMindlin(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void mix_coeffs(double*, double*) override; + void calculate_forces(); + protected: + int mindlin_rescale, mindlin_force; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTangentialMindlinForce : public GSMTangentialMindlin { + public: + GSMTangentialMindlinForce(class GranularModel *, class LAMMPS *); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTangentialMindlinRescale : public GSMTangentialMindlin { + public: + GSMTangentialMindlinRescale(class GranularModel *, class LAMMPS *); +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTangentialMindlinRescaleForce : public GSMTangentialMindlin { + public: + GSMTangentialMindlinRescaleForce(class GranularModel *, class LAMMPS *); +}; + +} // namespace Granular_NS +} // namespace LAMMPS_NS + +#endif /*GSM_TANGENTIAL_H_ */ diff --git a/src/GRANULAR/gsm_twisting.cpp b/src/GRANULAR/gsm_twisting.cpp new file mode 100644 index 0000000000..3704ac4ec8 --- /dev/null +++ b/src/GRANULAR/gsm_twisting.cpp @@ -0,0 +1,124 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "gsm_normal.h" +#include "gsm_tangential.h" +#include "gsm_twisting.h" +#include "granular_model.h" +#include "error.h" +#include "math_const.h" + +using namespace LAMMPS_NS; +using namespace Granular_NS; +using namespace MathConst; + +/* ---------------------------------------------------------------------- + Default twisting model +------------------------------------------------------------------------- */ + +GSMTwisting::GSMTwisting(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) {} + +/* ---------------------------------------------------------------------- + No model +------------------------------------------------------------------------- */ + +GSMTwistingNone::GSMTwistingNone(GranularModel *gm, LAMMPS *lmp) : GSMTwisting(gm, lmp) {} + +/* ---------------------------------------------------------------------- + Marshall twisting model +------------------------------------------------------------------------- */ + +GSMTwistingMarshall::GSMTwistingMarshall(GranularModel *gm, LAMMPS *lmp) : GSMTwisting(gm, lmp) +{ + num_coeffs = 0; + size_history = 3; +} + +/* ---------------------------------------------------------------------- */ + + +void GSMTwistingMarshall::init() +{ + k_tang = gm->tangential_model->k; + mu_tang = gm->tangential_model->mu; +} + +/* ---------------------------------------------------------------------- */ + +void GSMTwistingMarshall::calculate_forces() +{ + double signtwist, Mtcrit; + + // Calculate twist coefficients from tangential model & contact geometry + // eq 32 of Marshall paper + double k = 0.5 * k_tang * gm->area * gm->area; + double damp = 0.5 * gm->tangential_model->damp * gm->area * gm->area; + double mu = TWOTHIRDS * mu_tang * gm->area; + + if (gm->history_update) { + gm->history[history_index] += gm->magtwist * gm->dt; + } + + // M_t torque (eq 30) + gm->magtortwist = -k * gm->history[history_index] - damp * gm->magtwist; + signtwist = (gm->magtwist > 0) - (gm->magtwist < 0); + Mtcrit = mu * gm->normal_model->Fncrit; // critical torque (eq 44) + + if (fabs(gm->magtortwist) > Mtcrit) { + gm->history[history_index] = (Mtcrit * signtwist - damp * gm->magtwist) / k; + gm->magtortwist = -Mtcrit * signtwist; // eq 34 + } +} + +/* ---------------------------------------------------------------------- + SDS twisting model +------------------------------------------------------------------------- */ + +GSMTwistingSDS::GSMTwistingSDS(GranularModel *gm, LAMMPS *lmp) : GSMTwisting(gm, lmp) +{ + num_coeffs = 3; + size_history = 3; +} + +/* ---------------------------------------------------------------------- */ + +void GSMTwistingSDS::coeffs_to_local() +{ + k = coeffs[0]; + damp = coeffs[1]; + mu = coeffs[2]; + + if (k < 0.0 || mu < 0.0 || damp < 0.0) + error->all(FLERR, "Illegal SDS twisting model"); +} + +/* ---------------------------------------------------------------------- */ + +void GSMTwistingSDS::calculate_forces() +{ + double signtwist, Mtcrit; + + if (gm->history_update) { + gm->history[history_index] += gm->magtwist * gm->dt; + } + + // M_t torque (eq 30) + gm->magtortwist = -k * gm->history[history_index] - damp * gm->magtwist; + signtwist = (gm->magtwist > 0) - (gm->magtwist < 0); + Mtcrit = mu * gm->normal_model->Fncrit; // critical torque (eq 44) + + if (fabs(gm->magtortwist) > Mtcrit) { + gm->history[history_index] = (Mtcrit * signtwist - damp * gm->magtwist) / k; + gm->magtortwist = -Mtcrit * signtwist; // eq 34 + } +} diff --git a/src/GRANULAR/gsm_twisting.h b/src/GRANULAR/gsm_twisting.h new file mode 100644 index 0000000000..9fb859df08 --- /dev/null +++ b/src/GRANULAR/gsm_twisting.h @@ -0,0 +1,64 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef GSM_TWISTING_H_ +#define GSM_TWISTING_H_ + +#include "gsm.h" + +namespace LAMMPS_NS { +namespace Granular_NS { + +class GSMTwisting : public GSM { + public: + GSMTwisting(class GranularModel *, class LAMMPS *); + virtual ~GSMTwisting() {}; + virtual void coeffs_to_local() {}; + virtual void init() {}; + virtual void calculate_forces() = 0; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTwistingNone : public GSMTwisting { + public: + GSMTwistingNone(class GranularModel *, class LAMMPS *); + void calculate_forces() {}; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTwistingMarshall : public GSMTwisting { + public: + GSMTwistingMarshall(class GranularModel *, class LAMMPS *); + void calculate_forces(); + void init(); + protected: + double k_tang, mu_tang; +}; + +/* ---------------------------------------------------------------------- */ + +class GSMTwistingSDS : public GSMTwisting { + public: + GSMTwistingSDS(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void calculate_forces(); + protected: + double k, mu, damp; +}; + +} // namespace Granular_NS +} // namespace LAMMPS_NS + +#endif /*GSM_TWISTING_H_ */ diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 63354a4eda..6264d8baeb 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -22,14 +22,8 @@ #include "atom.h" #include "comm.h" -#include "contact.h" -#include "contact_sub_models.h" -#include "contact_normal_models.h" -#include "contact_tangential_models.h" -#include "contact_damping_models.h" -#include "contact_rolling_models.h" -#include "contact_twisting_models.h" -#include "contact_heat_models.h" +#include "granular_model.h" +#include "gsm.h" #include "error.h" #include "fix.h" #include "fix_dummy.h" @@ -47,7 +41,7 @@ #include using namespace LAMMPS_NS; -using namespace Contact; +using namespace Granular_NS; using namespace MathExtra; /* ---------------------------------------------------------------------- */ @@ -250,7 +244,6 @@ void PairGranular::compute(int eflag, int vflag) models[itype][jtype]->Ti = temperature[i]; models[itype][jtype]->Tj = temperature[j]; } - models[itype][jtype]->prep_contact(); models[itype][jtype]->calculate_forces(); @@ -304,7 +297,7 @@ void PairGranular::allocate() memory->create(cutsq,n+1,n+1,"pair:cutsq"); memory->create(cutoff_type,n+1,n+1,"pair:cutoff_type"); - models.resize(n+1, std::vector (n+1, nullptr)); + models.resize(n+1, std::vector (n+1, nullptr)); onerad_dynamic = new double[n+1]; onerad_frozen = new double[n+1]; @@ -347,74 +340,37 @@ void PairGranular::coeff(int narg, char **arg) //Parse mandatory specification int iarg = 2; - vec_models.back().init_model(std::string(arg[iarg++]), NORMAL); - iarg = vec_models.back().normal_model->parse_coeffs(arg, iarg, narg); + iarg = vec_models.back().init_submodel(arg, iarg, narg, NORMAL); //Parse optional arguments while (iarg < narg) { if (strcmp(arg[iarg], "tangential") == 0) { - iarg++; - if (iarg >= narg) - error->all(FLERR,"Illegal pair_coeff command, must specify " - "tangential model after tangential keyword"); - vec_models.back().init_model(std::string(arg[iarg++]), TANGENTIAL); - iarg = vec_models.back().tangential_model->parse_coeffs(arg, iarg, narg); - + iarg = vec_models.back().init_submodel(arg, iarg + 1, narg, TANGENTIAL); } else if (strcmp(arg[iarg], "damping") == 0) { - iarg++; - if (iarg >= narg) - error->all(FLERR, "Illegal pair_coeff command, must specify " - "damping model after damping keyword"); - vec_models.back().init_model(std::string(arg[iarg++]), DAMPING); - iarg = vec_models.back().damping_model->parse_coeffs(arg, iarg, narg); - + iarg = vec_models.back().init_submodel(arg, iarg + 1, narg, DAMPING); } else if (strcmp(arg[iarg], "rolling") == 0) { - iarg++; - if (iarg >= narg) - error->all(FLERR, "Illegal pair_coeff command, must specify " - "rolling model after rolling keyword"); - vec_models.back().init_model(std::string(arg[iarg++]), ROLLING); - iarg = vec_models.back().rolling_model->parse_coeffs(arg, iarg, narg); - + iarg = vec_models.back().init_submodel(arg, iarg + 1, narg, ROLLING); } else if (strcmp(arg[iarg], "twisting") == 0) { - iarg++; - if (iarg >= narg) - error->all(FLERR, "Illegal pair_coeff command, must specify " - "twisting model after twisting keyword"); - vec_models.back().init_model(std::string(arg[iarg++]), TWISTING); - iarg = vec_models.back().twisting_model->parse_coeffs(arg, iarg, narg); - + iarg = vec_models.back().init_submodel(arg, iarg + 1, narg, TWISTING); } else if (strcmp(arg[iarg], "heat") == 0) { - iarg++; - if (iarg >= narg) - error->all(FLERR, "Illegal pair_coeff command, must specify " - "heat model after heat keyword"); - vec_models.back().init_model(std::string(arg[iarg++]), HEAT); - iarg = vec_models.back().heat_model->parse_coeffs(arg, iarg, narg); + iarg = vec_models.back().init_submodel(arg, iarg + 1, narg, HEAT); heat_flag = 1; - } else if (strcmp(arg[iarg], "cutoff") == 0) { if (iarg + 1 >= narg) error->all(FLERR, "Illegal pair_coeff command, not enough parameters for cutoff keyword"); - cutoff_one = utils::numeric(FLERR,arg[iarg+1],false,lmp); + cutoff_one = utils::numeric(FLERR,arg[iarg + 1],false,lmp); iarg += 2; - } else if (strcmp(arg[iarg], "limit_damping") == 0) { vec_models.back().limit_damping = 1; iarg += 1; - } else error->all(FLERR, "Illegal pair_coeff command {}", arg[iarg]); } // Define default damping model if unspecified, has no coeffs if (!vec_models.back().damping_model) - vec_models.back().init_model("viscoelastic", DAMPING); - - if (vec_models.back().limit_damping && !vec_models.back().normal_model->allow_limit_damping) - error->all(FLERR,"Illegal pair_coeff command, " - "Cannot limit damping with specified normal contact model"); + vec_models.back().construct_submodel("viscoelastic", DAMPING); int count = 0; for (int i = ilo; i <= ihi; i++) { @@ -568,7 +524,7 @@ double PairGranular::init_one(int i, int j) if (setflag[i][j] == 0) { - vec_models.push_back(ContactModel(lmp)); + vec_models.push_back(GranularModel(lmp)); models[i][j] = models[j][i] = & vec_models.back(); int error_code = vec_models.back().mix_coeffs(models[i][i], models[j][j]); @@ -680,7 +636,7 @@ void PairGranular::read_restart(FILE *fp) MPI_Bcast(&nmodels,1,MPI_INT,0,world); for (i = 0; i < nmodels; i++) { - vec_models.push_back(ContactModel(lmp)); + vec_models.push_back(GranularModel(lmp)); vec_models.back().read_restart(fp); vec_models.back().init(); } @@ -737,7 +693,6 @@ double PairGranular::single(int i, int j, int itype, int jtype, if ((i >= nall) || (j >= nall)) error->all(FLERR,"Not enough atoms for pair granular single function"); - int touchflag; double **x = atom->x; double *radius = atom->radius; @@ -776,20 +731,7 @@ double PairGranular::single(int i, int j, int itype, int jtype, if (mask[i] & freeze_group_bit) meff = mj; if (mask[j] & freeze_group_bit) meff = mi; - // Copy additional information and prepare force calculations - double **v = atom->v; - double **omega = atom->omega; - - models[itype][jtype]->meff = meff; - models[itype][jtype]->vi = v[i]; - models[itype][jtype]->vj = v[j]; - models[itype][jtype]->omegai = omega[i]; - models[itype][jtype]->omegaj = omega[j]; - models[itype][jtype]->history = history; - models[itype][jtype]->prep_contact(); - // if any history is needed - jnum = list->numneigh[i]; jlist = list->firstneigh[i]; @@ -805,6 +747,17 @@ double PairGranular::single(int i, int j, int itype, int jtype, history = &allhistory[size_history*neighprev]; } + // Copy additional information and calculate forces + double **v = atom->v; + double **omega = atom->omega; + + models[itype][jtype]->meff = meff; + models[itype][jtype]->vi = v[i]; + models[itype][jtype]->vj = v[j]; + models[itype][jtype]->omegai = omega[i]; + models[itype][jtype]->omegaj = omega[j]; + models[itype][jtype]->history = history; + double *forces, *torquesi, *torquesj; models[itype][jtype]->calculate_forces(); forces = models[itype][jtype]->forces; diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index ae85748488..be8b6402a5 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -20,7 +20,7 @@ PairStyle(granular,PairGranular); #ifndef LMP_PAIR_GRANULAR_H #define LMP_PAIR_GRANULAR_H -#include "contact.h" +#include "granular_model.h" #include "pair.h" #include @@ -71,9 +71,9 @@ class PairGranular : public Pair { int size_history; int heat_flag; - // contact models - std::vector vec_models; - std::vector > models; + // granular models + std::vector vec_models; + std::vector > models; // optional user-specified global cutoff, per-type user-specified cutoffs double **cutoff_type; diff --git a/src/GRANULAR/contact.cpp b/src/contact.cpp similarity index 100% rename from src/GRANULAR/contact.cpp rename to src/contact.cpp diff --git a/src/GRANULAR/contact.h b/src/contact.h similarity index 100% rename from src/GRANULAR/contact.h rename to src/contact.h diff --git a/src/GRANULAR/contact_damping_models.cpp b/src/contact_damping_models.cpp similarity index 100% rename from src/GRANULAR/contact_damping_models.cpp rename to src/contact_damping_models.cpp diff --git a/src/GRANULAR/contact_damping_models.h b/src/contact_damping_models.h similarity index 100% rename from src/GRANULAR/contact_damping_models.h rename to src/contact_damping_models.h diff --git a/src/GRANULAR/contact_heat_models.cpp b/src/contact_heat_models.cpp similarity index 100% rename from src/GRANULAR/contact_heat_models.cpp rename to src/contact_heat_models.cpp diff --git a/src/GRANULAR/contact_heat_models.h b/src/contact_heat_models.h similarity index 100% rename from src/GRANULAR/contact_heat_models.h rename to src/contact_heat_models.h diff --git a/src/GRANULAR/contact_normal_models.cpp b/src/contact_normal_models.cpp similarity index 100% rename from src/GRANULAR/contact_normal_models.cpp rename to src/contact_normal_models.cpp diff --git a/src/GRANULAR/contact_normal_models.h b/src/contact_normal_models.h similarity index 100% rename from src/GRANULAR/contact_normal_models.h rename to src/contact_normal_models.h diff --git a/src/GRANULAR/contact_rolling_models.cpp b/src/contact_rolling_models.cpp similarity index 100% rename from src/GRANULAR/contact_rolling_models.cpp rename to src/contact_rolling_models.cpp diff --git a/src/GRANULAR/contact_rolling_models.h b/src/contact_rolling_models.h similarity index 100% rename from src/GRANULAR/contact_rolling_models.h rename to src/contact_rolling_models.h diff --git a/src/GRANULAR/contact_sub_models.cpp b/src/contact_sub_models.cpp similarity index 100% rename from src/GRANULAR/contact_sub_models.cpp rename to src/contact_sub_models.cpp diff --git a/src/GRANULAR/contact_sub_models.h b/src/contact_sub_models.h similarity index 100% rename from src/GRANULAR/contact_sub_models.h rename to src/contact_sub_models.h diff --git a/src/GRANULAR/contact_tangential_models.cpp b/src/contact_tangential_models.cpp similarity index 100% rename from src/GRANULAR/contact_tangential_models.cpp rename to src/contact_tangential_models.cpp diff --git a/src/GRANULAR/contact_tangential_models.h b/src/contact_tangential_models.h similarity index 100% rename from src/GRANULAR/contact_tangential_models.h rename to src/contact_tangential_models.h diff --git a/src/GRANULAR/contact_twisting_models.cpp b/src/contact_twisting_models.cpp similarity index 100% rename from src/GRANULAR/contact_twisting_models.cpp rename to src/contact_twisting_models.cpp diff --git a/src/GRANULAR/contact_twisting_models.h b/src/contact_twisting_models.h similarity index 100% rename from src/GRANULAR/contact_twisting_models.h rename to src/contact_twisting_models.h From 1eb048ef935d9c784f0435168e3c9aa24056d8eb Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 28 Oct 2022 16:00:04 -0600 Subject: [PATCH 031/445] Adding granular sub model style creator --- src/GRANULAR/fix_wall_gran.cpp | 15 ++-- src/GRANULAR/granular_model.cpp | 145 ++++++++++++++++---------------- src/GRANULAR/granular_model.h | 11 ++- src/GRANULAR/gsm.cpp | 1 - src/GRANULAR/gsm_damping.h | 25 ++++++ src/GRANULAR/gsm_heat.h | 13 +++ src/GRANULAR/gsm_normal.h | 29 +++++++ src/GRANULAR/gsm_rolling.h | 13 +++ src/GRANULAR/gsm_tangential.cpp | 12 +-- src/GRANULAR/gsm_tangential.h | 41 +++++++++ src/GRANULAR/gsm_twisting.h | 17 ++++ src/GRANULAR/pair_granular.cpp | 12 +-- src/Make.sh | 1 + 13 files changed, 236 insertions(+), 99 deletions(-) diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 31913c6061..e6bd894f1e 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -77,7 +77,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : int iarg; if (classic_flag) { - iarg = model->init_classic_model(arg, 3, narg); + iarg = model->define_classic_model(arg, 3, narg); if (iarg < narg) { if (strcmp(arg[iarg],"limit_damping") == 0) { @@ -88,19 +88,19 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : } else { iarg = 4; - iarg = model->init_submodel(arg, iarg, narg, NORMAL); + iarg = model->add_submodel(arg, iarg, narg, NORMAL); while (iarg < narg) { if (strcmp(arg[iarg], "damping") == 0) { - iarg = model->init_submodel(arg, iarg + 1, narg, DAMPING); + iarg = model->add_submodel(arg, iarg + 1, narg, DAMPING); } else if (strcmp(arg[iarg], "tangential") == 0) { - iarg = model->init_submodel(arg, iarg + 1, narg, TANGENTIAL); + iarg = model->add_submodel(arg, iarg + 1, narg, TANGENTIAL); } else if (strcmp(arg[iarg], "rolling") == 0) { - iarg = model->init_submodel(arg, iarg + 1, narg, ROLLING); + iarg = model->add_submodel(arg, iarg + 1, narg, ROLLING); } else if (strcmp(arg[iarg], "twisting") == 0) { - iarg = model->init_submodel(arg, iarg + 1, narg, TWISTING); + iarg = model->add_submodel(arg, iarg + 1, narg, TWISTING); } else if (strcmp(arg[iarg], "heat") == 0) { - iarg = model->init_submodel(arg, iarg + 1, narg, HEAT); + iarg = model->add_submodel(arg, iarg + 1, narg, HEAT); heat_flag = 1; } else if (strcmp(arg[iarg], "xplane") == 0 || strcmp(arg[iarg], "yplane") == 0 || @@ -120,7 +120,6 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : // Define default damping model if unspecified, takes no args if (!model->damping_model) model->construct_submodel("viscoelastic", DAMPING); - if (!model->tangential_model) error->all(FLERR, "No tangential model specified"); model->init(); diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp index b5987d222b..a7aaa1ed83 100644 --- a/src/GRANULAR/granular_model.cpp +++ b/src/GRANULAR/granular_model.cpp @@ -40,6 +40,17 @@ using namespace LAMMPS_NS; using namespace Granular_NS; using namespace MathExtra; +/* ---------------------------------------------------------------------- + one instance per GSM style in style_gsm.h +------------------------------------------------------------------------- */ + +template static GSM *gsm_creator(GranularModel *gm, LAMMPS *lmp) +{ + return new T(gm, lmp); +} + +/* ---------------------------------------------------------------------- */ + GranularModel::GranularModel(LAMMPS *lmp) : Pointers(lmp) { limit_damping = 0; @@ -57,6 +68,31 @@ GranularModel::GranularModel(LAMMPS *lmp) : Pointers(lmp) for (int i = 0; i < NSUBMODELS; i++) sub_models[i] = nullptr; transfer_history_factor = nullptr; + + // extract info from GSM classes listed in style_gsm.h + + nclass = 0; + +#define GSM_CLASS +#define GSMStyle(key,Class,type) nclass++; +#include "style_gsm.h" // IWYU pragma: keep +#undef GSMStyle +#undef GSM_CLASS + + gsmclass = new GSMCreator[nclass]; + gsmnames = new char*[nclass]; + gsmtypes = new int[nclass]; + nclass = 0; + +#define GSM_CLASS +#define GSMStyle(key,Class,type) \ + gsmclass[nclass] = &gsm_creator; \ + gsmnames[nclass] = (char *) #key; \ + gsmtypes[nclass++] = type; +#include "style_gsm.h" // IWYU pragma: keep +#undef GSMStyle +#undef GSM_CLASS + } /* ---------------------------------------------------------------------- */ @@ -75,7 +111,7 @@ GranularModel::~GranularModel() /* ---------------------------------------------------------------------- */ -int GranularModel::init_submodel(char **arg, int iarg, int narg, SubmodelType model_type) +int GranularModel::add_submodel(char **arg, int iarg, int narg, SubmodelType model_type) { if (iarg >= narg) error->all(FLERR, "Must specify granular submodel name"); @@ -92,6 +128,7 @@ int GranularModel::init_submodel(char **arg, int iarg, int narg, SubmodelType mo if (strcmp(arg[iarg + i], "NULL") == 0) sub_models[model_type]->coeffs[i] = -1; else sub_models[model_type]->coeffs[i] = utils::numeric(FLERR,arg[iarg + i],false,lmp); } + sub_models[model_type]->coeffs_to_local(); return iarg + num_coeffs; @@ -101,80 +138,34 @@ int GranularModel::init_submodel(char **arg, int iarg, int narg, SubmodelType mo void GranularModel::construct_submodel(std::string model_name, SubmodelType model_type) { -if (model_type == NORMAL) { - delete normal_model; - if (model_name == "none") normal_model = new GSMNormalNone(this, lmp); - else if (model_name == "hooke") normal_model = new GSMNormalHooke(this, lmp); - else if (model_name == "hertz") normal_model = new GSMNormalHertz(this, lmp); - else if (model_name == "hertz/material") normal_model = new GSMNormalHertzMaterial(this, lmp); - else if (model_name == "dmt") normal_model = new GSMNormalDMT(this, lmp); - else if (model_name == "jkr") normal_model = new GSMNormalJKR(this, lmp); - else error->all(FLERR, "Normal model name {} not recognized", model_name); - sub_models[model_type] = normal_model; - - } else if (model_type == TANGENTIAL) { - delete tangential_model; - if (model_name == "none") tangential_model = new GSMTangentialNone(this, lmp); - else if (model_name == "linear_nohistory") tangential_model = new GSMTangentialLinearNoHistory(this, lmp); - else if (model_name == "linear_history") tangential_model = new GSMTangentialLinearHistory(this, lmp); - else if (model_name == "linear_history_classic") tangential_model = new GSMTangentialLinearHistoryClassic(this, lmp); - else if (model_name == "mindlin") tangential_model = new GSMTangentialMindlin(this, lmp); - else if (model_name == "mindlin/force") tangential_model = new GSMTangentialMindlinForce(this, lmp); - else if (model_name == "mindlin_rescale") tangential_model = new GSMTangentialMindlinRescale(this, lmp); - else if (model_name == "mindlin_rescale/force") tangential_model = new GSMTangentialMindlinRescaleForce(this, lmp); - else error->all(FLERR, "Tangential model name {} not recognized", model_name); - sub_models[model_type] = tangential_model; - - } else if (model_type == DAMPING) { - delete damping_model; - if (model_name == "none") damping_model = new GSMDampingNone(this, lmp); - else if (model_name == "velocity") damping_model = new GSMDampingVelocity(this, lmp); - else if (model_name == "mass_velocity") damping_model = new GSMDampingMassVelocity(this, lmp); - else if (model_name == "viscoelastic") damping_model = new GSMDampingViscoelastic(this, lmp); - else if (model_name == "tsuji") damping_model = new GSMDampingTsuji(this, lmp); - else error->all(FLERR, "Damping model name {} not recognized", model_name); - sub_models[model_type] = damping_model; - - } else if (model_type == ROLLING) { - delete rolling_model; - rolling_defined = 1; - if (model_name == "none") { - rolling_model = new GSMRollingNone(this, lmp); - rolling_defined = 0; - } else if (model_name == "sds") rolling_model = new GSMRollingSDS(this, lmp); - else error->all(FLERR, "Rolling model name {} not recognized", model_name); - sub_models[model_type] = rolling_model; - - } else if (model_type == TWISTING) { - delete twisting_model; - twisting_defined = 1; - if (model_name == "none") { - twisting_model = new GSMTwistingNone(this, lmp); - twisting_defined = 0; - } else if (model_name == "sds") twisting_model = new GSMTwistingSDS(this, lmp); - else if (model_name == "marshall") twisting_model = new GSMTwistingMarshall(this, lmp); - else error->all(FLERR, "Twisting model name {} not recognized", model_name); - sub_models[model_type] = twisting_model; - - } else if (model_type == HEAT) { - delete heat_model; - heat_defined = 1; - if (model_name == "none") { - heat_model = new GSMHeatNone(this, lmp); - heat_defined = 0; - } else if (model_name == "area") heat_model = new GSMHeatArea(this, lmp); - else error->all(FLERR, "Heat model name not {} recognized", model_name); - sub_models[model_type] = heat_model; - } else { - error->all(FLERR, "Illegal model type {}", model_type); + int i; + for (i = 0; i < nclass; i++) { + if (gsmtypes[i] == model_type) { + if (strcmp(gsmnames[i], model_name.c_str()) == 0) { + GSMCreator &gsm_creator = gsmclass[i]; + sub_models[model_type] = gsm_creator(this, lmp); + break; + } + } } + if (i == nclass) + error->all(FLERR, "Illegal model type {}", model_type); + sub_models[model_type]->name.assign(model_name); + sub_models[model_type]->allocate_coeffs(); + + if (model_type == NORMAL) normal_model = dynamic_cast (sub_models[NORMAL]); + if (model_type == DAMPING) damping_model = dynamic_cast (sub_models[DAMPING]); + if (model_type == TANGENTIAL) tangential_model = dynamic_cast (sub_models[TANGENTIAL]); + if (model_type == ROLLING) rolling_model = dynamic_cast (sub_models[ROLLING]); + if (model_type == TWISTING) twisting_model = dynamic_cast (sub_models[TWISTING]); + if (model_type == HEAT) heat_model = dynamic_cast (sub_models[HEAT]); } /* ---------------------------------------------------------------------- */ -int GranularModel::init_classic_model(char **arg, int iarg, int narg) +int GranularModel::define_classic_model(char **arg, int iarg, int narg) { double kn, kt, gamman, gammat, xmu; @@ -212,7 +203,7 @@ int GranularModel::init_classic_model(char **arg, int iarg, int narg) kn /= force->nktv2p; kt /= force->nktv2p; construct_submodel("hertz", NORMAL); - construct_submodel("mindlin", TANGENTIAL); + construct_submodel("mindlin_classic", TANGENTIAL); construct_submodel("viscoelastic", DAMPING); } else error->all(FLERR,"Invalid classic gran model"); @@ -240,8 +231,7 @@ int GranularModel::init_classic_model(char **arg, int iarg, int narg) void GranularModel::init() { - int i, j; - for (i = 0; i < NSUBMODELS; i++) + for (int i = 0; i < NSUBMODELS; i++) if (!sub_models[i]) construct_submodel("none", (SubmodelType) i); // Must have valid normal, damping, and tangential models @@ -249,9 +239,15 @@ void GranularModel::init() if (damping_model->name == "none") error->all(FLERR, "Must specify damping granular model"); if (tangential_model->name == "none") error->all(FLERR, "Must specify tangential granular model"); + // Twisting, rolling, and heat are optional + twisting_defined = rolling_defined = heat_defined = 1; + if (twisting_model->name == "none") twisting_defined = 0; + if (rolling_model->name == "none") rolling_defined = 0; + if (heat_model->name == "none") heat_defined = 0; + int size_cumulative; size_history = 0; - for (i = 0; i < NSUBMODELS; i++) { + for (int i = 0; i < NSUBMODELS; i++) { if (sub_models[i]->nondefault_history_transfer) nondefault_history_transfer = 1; if (sub_models[i]->beyond_contact) @@ -264,7 +260,8 @@ void GranularModel::init() if (nondefault_history_transfer) { transfer_history_factor = new double[size_history]; - for (i = 0; i < size_history; i++) { + int j; + for (int i = 0; i < size_history; i++) { // Find which model owns this history value size_cumulative = 0; for (j = 0; j < NSUBMODELS; j++) { @@ -282,7 +279,7 @@ void GranularModel::init() } } - for (i = 0; i < NSUBMODELS; i++) sub_models[i]->init(); + for (int i = 0; i < NSUBMODELS; i++) sub_models[i]->init(); } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h index cc94f49a1e..afc8f61ddc 100644 --- a/src/GRANULAR/granular_model.h +++ b/src/GRANULAR/granular_model.h @@ -55,8 +55,8 @@ class GranularModel : protected Pointers { void calculate_forces(); double pulloff_distance(double, double); - int init_submodel(char **, int, int, SubmodelType); - int init_classic_model(char **, int, int); + int add_submodel(char **, int, int, SubmodelType); + int define_classic_model(char **, int, int); void construct_submodel(std::string, SubmodelType); int mix_coeffs(GranularModel*, GranularModel*); @@ -99,6 +99,13 @@ class GranularModel : protected Pointers { protected: int rolling_defined, twisting_defined, heat_defined; // Used to quickly skip undefined submodels int classic_model; + + int nclass; + + typedef class GSM *(*GSMCreator)(class GranularModel *, class LAMMPS *); + GSMCreator *gsmclass; + char **gsmnames; + int *gsmtypes; }; } // namespace Granular_NS diff --git a/src/GRANULAR/gsm.cpp b/src/GRANULAR/gsm.cpp index 17b816ad21..6430fb7403 100644 --- a/src/GRANULAR/gsm.cpp +++ b/src/GRANULAR/gsm.cpp @@ -45,7 +45,6 @@ GSM::GSM(class GranularModel *gm, LAMMPS *lmp) : Pointers(lmp) nondefault_history_transfer = 0; transfer_history_factor = nullptr; - allocate_coeffs(); } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/gsm_damping.h b/src/GRANULAR/gsm_damping.h index ab12cbc2d3..1904314cdc 100644 --- a/src/GRANULAR/gsm_damping.h +++ b/src/GRANULAR/gsm_damping.h @@ -11,6 +11,30 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#ifdef GSM_CLASS +// clang-format off +GSMStyle(none, + GSMDampingNone, + DAMPING); + +GSMStyle(velocity, + GSMDampingVelocity, + DAMPING); + +GSMStyle(mass_velocity, + GSMDampingMassVelocity, + DAMPING); + +GSMStyle(viscoelastic, + GSMDampingViscoelastic, + DAMPING); + +GSMStyle(tsuji, + GSMDampingTsuji, + DAMPING); +// clang-format on +#else + #ifndef GSM_DAMPING_H_ #define GSM_DAMPING_H_ @@ -77,3 +101,4 @@ class GSMDampingTsuji : public GSMDamping { } // namespace LAMMPS_NS #endif /*GSM_DAMPING_H_ */ +#endif /*GSM_CLASS_H_ */ diff --git a/src/GRANULAR/gsm_heat.h b/src/GRANULAR/gsm_heat.h index f397d555b6..4b27979273 100644 --- a/src/GRANULAR/gsm_heat.h +++ b/src/GRANULAR/gsm_heat.h @@ -11,6 +11,18 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#ifdef GSM_CLASS +// clang-format off +GSMStyle(none, + GSMHeatNone, + HEAT); + +GSMStyle(area, + GSMHeatArea, + HEAT); +// clang-format on +#else + #ifndef GSM_HEAT_H_ #define GSM_HEAT_H_ @@ -51,3 +63,4 @@ class GSMHeatArea : public GSMHeat { } // namespace LAMMPS_NS #endif /*GSM_HEAT_H_ */ +#endif /*GSM_CLASS_H_ */ diff --git a/src/GRANULAR/gsm_normal.h b/src/GRANULAR/gsm_normal.h index 31587dfd03..0c7ba30e41 100644 --- a/src/GRANULAR/gsm_normal.h +++ b/src/GRANULAR/gsm_normal.h @@ -11,6 +11,34 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#ifdef GSM_CLASS +// clang-format off +GSMStyle(none, + GSMNormalNone, + NORMAL); + +GSMStyle(hooke, + GSMNormalHooke, + NORMAL); + +GSMStyle(hertz, + GSMNormalHertz, + NORMAL); + +GSMStyle(hertz/material, + GSMNormalHertzMaterial, + NORMAL); + +GSMStyle(dmt, + GSMNormalDMT, + NORMAL); + +GSMStyle(jkr, + GSMNormalJKR, + NORMAL); +// clang-format on +#else + #ifndef GSM_NORMAL_H_ #define GSM_NORMAL_H_ @@ -116,3 +144,4 @@ class GSMNormalJKR : public GSMNormal { } // namespace LAMMPS_NS #endif /*GSM_NORMAL_H_ */ +#endif /*GSM_CLASS_H_ */ diff --git a/src/GRANULAR/gsm_rolling.h b/src/GRANULAR/gsm_rolling.h index 44f45b583d..21e61ac4bc 100644 --- a/src/GRANULAR/gsm_rolling.h +++ b/src/GRANULAR/gsm_rolling.h @@ -11,6 +11,18 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#ifdef GSM_CLASS +// clang-format off +GSMStyle(none, + GSMRollingNone, + ROLLING); + +GSMStyle(sds, + GSMRollingSDS, + ROLLING); +// clang-format on +#else + #ifndef GSM_ROLLING_H_ #define GSM_ROLLING_H_ @@ -51,3 +63,4 @@ class GSMRollingSDS : public GSMRolling { } // namespace LAMMPS_NS #endif /*GSM_ROLLING_H_ */ +#endif /*GSM_CLASS_H_ */ diff --git a/src/GRANULAR/gsm_tangential.cpp b/src/GRANULAR/gsm_tangential.cpp index 1f6213d708..b3e6266049 100644 --- a/src/GRANULAR/gsm_tangential.cpp +++ b/src/GRANULAR/gsm_tangential.cpp @@ -172,13 +172,10 @@ GSMTangentialLinearHistoryClassic::GSMTangentialLinearHistoryClassic(GranularMod void GSMTangentialLinearHistoryClassic::calculate_forces() { - double k_scaled, magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; + double magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; double temp_array[3]; int frame_update = 0; - k_scaled = k; - if (scale_area) k_scaled *= gm->area; - damp = xt * gm->damping_model->damp_prefactor; double Fscrit = gm->normal_model->Fncrit * mu; @@ -200,7 +197,8 @@ void GSMTangentialLinearHistoryClassic::calculate_forces() } // tangential forces = history + tangential velocity damping - scale3(-k_scaled, history, gm->fs); + if (scale_area) scale3(-k * gm->area, history, gm->fs); + else scale3(-k, history, gm->fs); scale3(damp, gm->vtr, temp_array); sub3(gm->fs, temp_array, gm->fs); @@ -212,9 +210,7 @@ void GSMTangentialLinearHistoryClassic::calculate_forces() scale3(Fscrit * magfs_inv, gm->fs, history); scale3(damp, gm->vtr, temp_array); add3(history, temp_array, history); - temp_dbl = -1.0 / k_scaled; - if (scale_area) temp_dbl /= gm->area; - scale3(temp_dbl, history); + scale3(-1.0 / k, history); scale3(Fscrit * magfs_inv, gm->fs); } else { zero3(gm->fs); diff --git a/src/GRANULAR/gsm_tangential.h b/src/GRANULAR/gsm_tangential.h index 8e1d644fea..a420c7d314 100644 --- a/src/GRANULAR/gsm_tangential.h +++ b/src/GRANULAR/gsm_tangential.h @@ -11,6 +11,46 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#ifdef GSM_CLASS +// clang-format off +GSMStyle(none, + GSMTangentialNone, + TANGENTIAL); + +GSMStyle(linear_nohistory, + GSMTangentialLinearNoHistory, + TANGENTIAL); + +GSMStyle(linear_history, + GSMTangentialLinearHistory, + TANGENTIAL); + +GSMStyle(linear_history_classic, + GSMTangentialLinearHistoryClassic, + TANGENTIAL); + +GSMStyle(mindlin_classic, + GSMTangentialMindlinClassic, + TANGENTIAL); + +GSMStyle(mindlin, + GSMTangentialMindlin, + TANGENTIAL); + +GSMStyle(mindlin/force, + GSMTangentialMindlinForce, + TANGENTIAL); + +GSMStyle(mindlin_rescale, + GSMTangentialMindlinRescale, + TANGENTIAL); + +GSMStyle(mindlin_rescale/force, + GSMTangentialMindlinRescaleForce, + TANGENTIAL); +// clang-format on +#else + #ifndef GSM_TANGENTIAL_H_ #define GSM_TANGENTIAL_H_ @@ -111,3 +151,4 @@ class GSMTangentialMindlinRescaleForce : public GSMTangentialMindlin { } // namespace LAMMPS_NS #endif /*GSM_TANGENTIAL_H_ */ +#endif /*GSM_CLASS_H_ */ diff --git a/src/GRANULAR/gsm_twisting.h b/src/GRANULAR/gsm_twisting.h index 9fb859df08..84759acce7 100644 --- a/src/GRANULAR/gsm_twisting.h +++ b/src/GRANULAR/gsm_twisting.h @@ -11,6 +11,22 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#ifdef GSM_CLASS +// clang-format off +GSMStyle(none, + GSMTwistingNone, + TWISTING); + +GSMStyle(marshall, + GSMTwistingMarshall, + TWISTING); + +GSMStyle(sds, + GSMTwistingSDS, + TWISTING); +// clang-format on +#else + #ifndef GSM_TWISTING_H_ #define GSM_TWISTING_H_ @@ -62,3 +78,4 @@ class GSMTwistingSDS : public GSMTwisting { } // namespace LAMMPS_NS #endif /*GSM_TWISTING_H_ */ +#endif /*GSM_CLASS_H_ */ diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 6264d8baeb..a6fcde4589 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -340,22 +340,22 @@ void PairGranular::coeff(int narg, char **arg) //Parse mandatory specification int iarg = 2; - iarg = vec_models.back().init_submodel(arg, iarg, narg, NORMAL); + iarg = vec_models.back().add_submodel(arg, iarg, narg, NORMAL); //Parse optional arguments while (iarg < narg) { if (strcmp(arg[iarg], "tangential") == 0) { - iarg = vec_models.back().init_submodel(arg, iarg + 1, narg, TANGENTIAL); + iarg = vec_models.back().add_submodel(arg, iarg + 1, narg, TANGENTIAL); } else if (strcmp(arg[iarg], "damping") == 0) { - iarg = vec_models.back().init_submodel(arg, iarg + 1, narg, DAMPING); + iarg = vec_models.back().add_submodel(arg, iarg + 1, narg, DAMPING); } else if (strcmp(arg[iarg], "rolling") == 0) { - iarg = vec_models.back().init_submodel(arg, iarg + 1, narg, ROLLING); + iarg = vec_models.back().add_submodel(arg, iarg + 1, narg, ROLLING); } else if (strcmp(arg[iarg], "twisting") == 0) { - iarg = vec_models.back().init_submodel(arg, iarg + 1, narg, TWISTING); + iarg = vec_models.back().add_submodel(arg, iarg + 1, narg, TWISTING); } else if (strcmp(arg[iarg], "heat") == 0) { - iarg = vec_models.back().init_submodel(arg, iarg + 1, narg, HEAT); + iarg = vec_models.back().add_submodel(arg, iarg + 1, narg, HEAT); heat_flag = 1; } else if (strcmp(arg[iarg], "cutoff") == 0) { if (iarg + 1 >= narg) diff --git a/src/Make.sh b/src/Make.sh index 0fe39f0224..da034f8226 100755 --- a/src/Make.sh +++ b/src/Make.sh @@ -104,6 +104,7 @@ if (test $cmd = "style") || (test $cmd = "packages") then $cmd DIHEDRAL_CLASS dihedral_ dihedral force $cmd DUMP_CLASS dump_ dump output write_dump $cmd FIX_CLASS fix_ fix modify + $cmd GSM_CLASS gsm_ gsm granular_model $cmd IMPROPER_CLASS improper_ improper force $cmd INTEGRATE_CLASS "" integrate update $cmd KSPACE_CLASS "" kspace force From f66179f3364d2df1fc034aaf37f84e95d7b31712 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Fri, 28 Oct 2022 16:38:32 -0600 Subject: [PATCH 032/445] Removing old contact files, fixing capitalization in dump_custom.cpp --- src/contact.cpp | 479 ------------------------------ src/contact.h | 107 ------- src/contact_damping_models.cpp | 113 ------- src/contact_damping_models.h | 79 ----- src/contact_heat_models.cpp | 63 ---- src/contact_heat_models.h | 53 ---- src/contact_normal_models.cpp | 377 ----------------------- src/contact_normal_models.h | 118 -------- src/contact_rolling_models.cpp | 121 -------- src/contact_rolling_models.h | 53 ---- src/contact_sub_models.cpp | 140 --------- src/contact_sub_models.h | 62 ---- src/contact_tangential_models.cpp | 412 ------------------------- src/contact_tangential_models.h | 113 ------- src/contact_twisting_models.cpp | 124 -------- src/contact_twisting_models.h | 64 ---- src/dump_custom.cpp | 6 +- 17 files changed, 3 insertions(+), 2481 deletions(-) delete mode 100644 src/contact.cpp delete mode 100644 src/contact.h delete mode 100644 src/contact_damping_models.cpp delete mode 100644 src/contact_damping_models.h delete mode 100644 src/contact_heat_models.cpp delete mode 100644 src/contact_heat_models.h delete mode 100644 src/contact_normal_models.cpp delete mode 100644 src/contact_normal_models.h delete mode 100644 src/contact_rolling_models.cpp delete mode 100644 src/contact_rolling_models.h delete mode 100644 src/contact_sub_models.cpp delete mode 100644 src/contact_sub_models.h delete mode 100644 src/contact_tangential_models.cpp delete mode 100644 src/contact_tangential_models.h delete mode 100644 src/contact_twisting_models.cpp delete mode 100644 src/contact_twisting_models.h diff --git a/src/contact.cpp b/src/contact.cpp deleted file mode 100644 index ae294d7db9..0000000000 --- a/src/contact.cpp +++ /dev/null @@ -1,479 +0,0 @@ -// clang-format off -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -/* ---------------------------------------------------------------------- - This class contains a series of tools for DEM contacts - Multiple models can be defined and used to calculate forces - and torques based on contact geometry - - Contributing authors: - Dan Bolintineanu (SNL), Joel Clemmer (SNL) ------------------------------------------------------------------------ */ - -#include "contact.h" -#include "contact_sub_models.h" -#include "contact_normal_models.h" -#include "contact_tangential_models.h" -#include "contact_damping_models.h" -#include "contact_rolling_models.h" -#include "contact_twisting_models.h" -#include "contact_heat_models.h" -#include "comm.h" -#include "error.h" -#include "force.h" -#include "math_extra.h" - -#include - -using namespace LAMMPS_NS; -using namespace Contact; -using namespace MathExtra; - -ContactModel::ContactModel(LAMMPS *lmp) : Pointers(lmp) -{ - limit_damping = 0; - beyond_contact = 0; - nondefault_history_transfer = 0; - classic_model = 0; - contact_type = PAIR; - - normal_model = nullptr; - damping_model = nullptr; - tangential_model = nullptr; - rolling_model = nullptr; - twisting_model = nullptr; - heat_model = nullptr; - - for (int i = 0; i < NSUBMODELS; i++) sub_models[i] = nullptr; - transfer_history_factor = nullptr; -} - -/* ---------------------------------------------------------------------- */ - -ContactModel::~ContactModel() -{ - delete [] transfer_history_factor; - - delete normal_model; - delete damping_model; - delete tangential_model; - delete rolling_model; - delete twisting_model; - delete heat_model; -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::init_model(std::string model_name, ModelType model_type) -{ - if (model_type == NORMAL) { - delete normal_model; - if (model_name == "none") normal_model = new NormalNone(lmp); - else if (model_name == "hooke") normal_model = new NormalHooke(lmp); - else if (model_name == "hertz") normal_model = new NormalHertz(lmp); - else if (model_name == "hertz/material") normal_model = new NormalHertzMaterial(lmp); - else if (model_name == "dmt") normal_model = new NormalDMT(lmp); - else if (model_name == "jkr") normal_model = new NormalJKR(lmp); - else error->all(FLERR, "Normal model name {} not recognized", model_name); - sub_models[model_type] = normal_model; - - } else if (model_type == TANGENTIAL) { - delete tangential_model; - if (model_name == "none") tangential_model = new TangentialNone(lmp); - else if (model_name == "linear_nohistory") tangential_model = new TangentialLinearNoHistory(lmp); - else if (model_name == "linear_history") tangential_model = new TangentialLinearHistory(lmp); - else if (model_name == "linear_history_classic") tangential_model = new TangentialLinearHistoryClassic(lmp); - else if (model_name == "mindlin") tangential_model = new TangentialMindlin(lmp); - else if (model_name == "mindlin/force") tangential_model = new TangentialMindlinForce(lmp); - else if (model_name == "mindlin_rescale") tangential_model = new TangentialMindlinRescale(lmp); - else if (model_name == "mindlin_rescale/force") tangential_model = new TangentialMindlinRescaleForce(lmp); - else error->all(FLERR, "Tangential model name {} not recognized", model_name); - sub_models[model_type] = tangential_model; - - } else if (model_type == DAMPING) { - delete damping_model; - if (model_name == "none") damping_model = new DampingNone(lmp); - else if (model_name == "velocity") damping_model = new DampingVelocity(lmp); - else if (model_name == "mass_velocity") damping_model = new DampingMassVelocity(lmp); - else if (model_name == "viscoelastic") damping_model = new DampingViscoelastic(lmp); - else if (model_name == "tsuji") damping_model = new DampingTsuji(lmp); - else error->all(FLERR, "Damping model name {} not recognized", model_name); - sub_models[model_type] = damping_model; - - } else if (model_type == ROLLING) { - delete rolling_model; - rolling_defined = 1; - if (model_name == "none") { - rolling_model = new RollingNone(lmp); - rolling_defined = 0; - } else if (model_name == "sds") rolling_model = new RollingSDS(lmp); - else error->all(FLERR, "Rolling model name {} not recognized", model_name); - sub_models[model_type] = rolling_model; - - } else if (model_type == TWISTING) { - delete twisting_model; - twisting_defined = 1; - if (model_name == "none") { - twisting_model = new TwistingNone(lmp); - twisting_defined = 0; - } else if (model_name == "sds") twisting_model = new TwistingSDS(lmp); - else if (model_name == "marshall") twisting_model = new TwistingMarshall(lmp); - else error->all(FLERR, "Twisting model name {} not recognized", model_name); - sub_models[model_type] = twisting_model; - - } else if (model_type == HEAT) { - delete heat_model; - heat_defined = 1; - if (model_name == "none") { - heat_model = new HeatNone(lmp); - heat_defined = 0; - } else if (model_name == "area") heat_model = new HeatArea(lmp); - else error->all(FLERR, "Heat model name not {} recognized", model_name); - sub_models[model_type] = heat_model; - } else { - error->all(FLERR, "Illegal model type {}", model_type); - } - - sub_models[model_type]->name.assign(model_name); - sub_models[model_type]->contact = this; - sub_models[model_type]->allocate_coeffs(); -} - -/* ---------------------------------------------------------------------- */ - -int ContactModel::init_classic_model(char **arg, int iarg, int narg) -{ - double kn, kt, gamman, gammat, xmu; - - classic_model = 1; - - if (iarg + 6 >= narg) - error->all(FLERR,"Insufficient arguments provided for classic gran model command"); - - kn = utils::numeric(FLERR,arg[iarg + 1],false,lmp); - if (strcmp(arg[iarg + 2],"NULL") == 0) kt = kn * 2.0 / 7.0; - else kt = utils::numeric(FLERR,arg[iarg + 2],false,lmp); - - gamman = utils::numeric(FLERR,arg[iarg + 3],false,lmp); - if (strcmp(arg[iarg + 4],"NULL") == 0) gammat = 0.5 * gamman; - else gammat = utils::numeric(FLERR,arg[iarg + 4],false,lmp); - - xmu = utils::numeric(FLERR,arg[iarg + 5],false,lmp); - int dampflag = utils::inumeric(FLERR,arg[iarg + 6],false,lmp); - if (dampflag == 0) gammat = 0.0; - - if (kn < 0.0 || kt < 0.0 || gamman < 0.0 || gammat < 0.0 || - xmu < 0.0 || xmu > 10000.0 || dampflag < 0 || dampflag > 1) - error->all(FLERR,"Illegal classic gran model command"); - - if (strcmp(arg[iarg],"hooke") == 0) { - init_model("hooke", NORMAL); - init_model("linear_nohistory", TANGENTIAL); - init_model("mass_velocity", DAMPING); - } else if (strcmp(arg[iarg],"hooke/history") == 0) { - init_model("hooke", NORMAL); - init_model("linear_history_classic", TANGENTIAL); - init_model("mass_velocity", DAMPING); - } else if (strcmp(arg[iarg],"hertz/history") == 0) { - // convert Kn and Kt from pressure units to force/distance^2 if Hertzian - kn /= force->nktv2p; - kt /= force->nktv2p; - init_model("hertz", NORMAL); - init_model("mindlin", TANGENTIAL); - init_model("viscoelastic", DAMPING); - } else error->all(FLERR,"Invalid classic gran model"); - - // ensure additional models are undefined - init_model("none", ROLLING); - init_model("none", TWISTING); - init_model("none", HEAT); - - // manually parse coeffs - normal_model->coeffs[0] = kn; - normal_model->coeffs[1] = gamman; - tangential_model->coeffs[0] = kt; - tangential_model->coeffs[1] = gammat / gamman; - tangential_model->coeffs[2] = xmu; - - normal_model->coeffs_to_local(); - tangential_model->coeffs_to_local(); - damping_model->coeffs_to_local(); - - iarg += 7; - return iarg; -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::init() -{ - int i, j; - for (i = 0; i < NSUBMODELS; i++) - if (!sub_models[i]) init_model("none", (ModelType) i); - - // Must have valid normal, damping, and tangential models - if (normal_model->name == "none") error->all(FLERR, "Must specify normal contact model"); - if (damping_model->name == "none") error->all(FLERR, "Must specify damping contact model"); - if (tangential_model->name == "none") error->all(FLERR, "Must specify tangential contact model"); - - int size_cumulative; - size_history = 0; - for (i = 0; i < NSUBMODELS; i++) { - if (sub_models[i]->nondefault_history_transfer) - nondefault_history_transfer = 1; - if (sub_models[i]->beyond_contact) - beyond_contact = 1; - size_history += sub_models[i]->size_history; - } - - if (nondefault_history_transfer) { - transfer_history_factor = new double[size_history]; - - for (i = 0; i < size_history; i++) { - // Find which model owns this history value - size_cumulative = 0; - for (j = 0; j < NSUBMODELS; j++) { - if (size_cumulative + sub_models[j]->size_history > i) break; - size_cumulative += sub_models[j]->size_history; - } - - // Check if model has nondefault transfers, if so copy its array - transfer_history_factor[i] = -1; - if (j != NSUBMODELS) { - if (sub_models[j]->nondefault_history_transfer) { - transfer_history_factor[i] = sub_models[j]->transfer_history_factor[i - size_cumulative]; - } - } - } - } - - for (i = 0; i < NSUBMODELS; i++) sub_models[i]->init(); -} - -/* ---------------------------------------------------------------------- */ - -int ContactModel::mix_coeffs(ContactModel *c1, ContactModel *c2) -{ - int i; - for (i = 0; i < NSUBMODELS; i++) { - if (c1->sub_models[i]->name != c2->sub_models[i]->name) return i; - - init_model(c1->sub_models[i]->name, (ModelType) i); - sub_models[i]->mix_coeffs(c1->sub_models[i]->coeffs, c2->sub_models[i]->coeffs); - } - - limit_damping = MAX(c1->limit_damping, c2->limit_damping); - - return -1; -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::write_restart(FILE *fp) -{ - int num_char, num_coeffs; - - for (int i = 0; i < NSUBMODELS; i++) { - num_char = sub_models[i]->name.length(); - num_coeffs = sub_models[i]->num_coeffs; - fwrite(&num_char, sizeof(int), 1, fp); - fwrite(sub_models[i]->name.data(), sizeof(char), num_char, fp); - fwrite(&num_coeffs, sizeof(int), 1, fp); - fwrite(sub_models[i]->coeffs, sizeof(double), num_coeffs, fp); - } -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::read_restart(FILE *fp) -{ - int num_char, num_coeff; - - for (int i = 0; i < NSUBMODELS; i++) { - if (comm->me == 0) - utils::sfread(FLERR, &num_char, sizeof(int), 1, fp, nullptr, error); - MPI_Bcast(&num_char, 1, MPI_INT, 0, world); - - std::string model_name (num_char, ' '); - if (comm->me == 0) - utils::sfread(FLERR, const_cast(model_name.data()), sizeof(char),num_char, fp, nullptr, error); - MPI_Bcast(const_cast(model_name.data()), num_char, MPI_CHAR, 0, world); - - init_model(model_name, (ModelType) i); - - if (comm->me == 0) { - utils::sfread(FLERR, &num_coeff, sizeof(int), 1, fp, nullptr, error); - if (num_coeff != sub_models[i]->num_coeffs) - error->one(FLERR, "Invalid contact model written to restart file"); - } - MPI_Bcast(&num_coeff, 1, MPI_INT, 0, world); - - if (comm->me == 0) { - utils::sfread(FLERR, sub_models[i]->coeffs, sizeof(double), num_coeff, fp, nullptr, error); - } - MPI_Bcast(sub_models[i]->coeffs, num_coeff, MPI_DOUBLE, 0, world); - sub_models[i]->coeffs_to_local(); - } -} - -/* ---------------------------------------------------------------------- */ - -bool ContactModel::check_contact() -{ - if (contact_type == WALL) { - // Used by fix_wall_gran.cpp - // radj = radius of wall - // dx already provided - rsq = lensq3(dx); - radsum = radi; - if (radj == 0) Reff = radi; - else Reff = radi * radj / (radi + radj); - } else if (contact_type == WALLREGION) { - // Used by fix_wall_gran_region.cpp - // radj = radius of wall - // dx and r already provided - rsq = r * r; - radsum = radi; - if (radj == 0) Reff = radi; - else Reff = radi * radj / (radi + radj); - } else { - sub3(xi, xj, dx); - rsq = lensq3(dx); - radsum = radi + radj; - Reff = radi * radj / radsum; - } - - touch = normal_model->touch(); - return touch; -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::prep_contact() -{ - double temp[3]; - - // Standard geometric quantities - if (contact_type != WALLREGION) r = sqrt(rsq); - rinv = 1.0 / r; - delta = radsum - r; - dR = delta * Reff; - scale3(rinv, dx, nx); - - // relative translational velocity - sub3(vi, vj, vr); - - // normal component - vnnr = dot3(vr, nx); //v_R . n - scale3(vnnr, nx, vn); - - // tangential component - sub3(vr, vn, vt); - - // relative rotational velocity - scaleadd3(radi, omegai, radj, omegaj, wr); - - // relative tangential velocities - cross3(wr, nx, temp); - sub3(vt, temp, vtr); - vrel = len3(vtr); - - if (rolling_defined || twisting_defined) - sub3(omegai, omegaj, relrot); - - if (rolling_defined) { - // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) - // this is different from the Marshall papers, which use the Bagi/Kuhn formulation - // for rolling velocity (see Wang et al for why the latter is wrong) - vrl[0] = Reff * (relrot[1] * nx[2] - relrot[2] * nx[1]); - vrl[1] = Reff * (relrot[2] * nx[0] - relrot[0] * nx[2]); - vrl[2] = Reff * (relrot[0] * nx[1] - relrot[1] * nx[0]); - } - - if (twisting_defined) { - // omega_T (eq 29 of Marshall) - magtwist = dot3(relrot, nx); - } -} - -/* ---------------------------------------------------------------------- */ - -void ContactModel::calculate_forces() -{ - // calculate forces/torques - - forces[0] = 0.0; - double Fne, Fdamp, dist_to_contact; - area = normal_model->calculate_area(); - normal_model->set_knfac(); - Fne = normal_model->calculate_forces(); - - Fdamp = damping_model->calculate_forces(); - Fntot = Fne + Fdamp; - if (limit_damping && Fntot < 0.0) Fntot = 0.0; - - normal_model->set_fncrit(); // Needed for tangential, rolling, twisting - tangential_model->calculate_forces(); - if (rolling_defined) rolling_model->calculate_forces(); - if (twisting_defined) twisting_model->calculate_forces(); - - // sum contributions - - scale3(Fntot, nx, forces); - add3(forces, fs, forces); - - //May need to rethink eventually tris.. - cross3(nx, fs, torquesi); - scale3(-1, torquesi); - if (contact_type == PAIR) copy3(torquesi, torquesj); - - if (!classic_model && contact_type == PAIR) { - dist_to_contact = radi - 0.5 * delta; - scale3(dist_to_contact, torquesi); - dist_to_contact = radj - 0.5 * delta; - scale3(dist_to_contact, torquesj); - } else { - dist_to_contact = radi; - scale3(dist_to_contact, torquesi); - } - - double torroll[3]; - if (rolling_defined) { - cross3(nx, fr, torroll); - scale3(Reff, torroll); - add3(torquesi, torroll, torquesi); - if (contact_type == PAIR) sub3(torquesj, torroll, torquesj); - } - - double tortwist[3]; - if (twisting_defined) { - scale3(magtortwist, nx, tortwist); - add3(torquesi, tortwist, torquesi); - if (contact_type == PAIR) sub3(torquesj, tortwist, torquesj); - } - - if (heat_defined) { - dq = heat_model->calculate_heat(); - } -} - -/* ---------------------------------------------------------------------- - compute pull-off distance (beyond contact) for a given radius and atom type - use temporary variables since this does not use a specific contact geometry -------------------------------------------------------------------------- */ - -double ContactModel::pulloff_distance(double radi, double radj) -{ - return normal_model->pulloff_distance(radi, radj); -} diff --git a/src/contact.h b/src/contact.h deleted file mode 100644 index d1a13c5eb1..0000000000 --- a/src/contact.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef LMP_CONTACT_H -#define LMP_CONTACT_H - -#include "pointers.h" // IWYU pragma: export - -namespace LAMMPS_NS { -namespace Contact { - -#define EPSILON 1e-10 -#define NSUBMODELS 6 - -enum ModelType { - NORMAL = 0, - DAMPING = 1, - TANGENTIAL = 2, - ROLLING = 3, - TWISTING = 4, - HEAT = 5 -}; // Relative order matters since some derive coeffs from others - -enum ContactType { - PAIR = 0, - WALL = 1, - WALLREGION = 2 -}; - -// forward declaration -class NormalModel; -class DampingModel; -class TangentialModel; -class RollingModel; -class TwistingModel; -class HeatModel; -class SubModel; - -class ContactModel : protected Pointers { - public: - ContactModel(class LAMMPS *); - ~ContactModel(); - void init(); - bool check_contact(); - void prep_contact(); - void calculate_forces(); - double pulloff_distance(double, double); - - void init_model(std::string, ModelType); - int init_classic_model(char **, int, int); - int mix_coeffs(ContactModel*, ContactModel*); - - void write_restart(FILE *); - void read_restart(FILE *); - - // Sub models - NormalModel *normal_model; - DampingModel *damping_model; - TangentialModel *tangential_model; - RollingModel *rolling_model; - TwistingModel *twisting_model; - HeatModel *heat_model; - SubModel *sub_models[NSUBMODELS]; // Need to resize if we add more model flavors - - // Extra options - int beyond_contact, limit_damping, history_update; - ContactType contact_type; - - // History variables - int size_history, nondefault_history_transfer; - double *transfer_history_factor; - double *history; - - // Contact properties/output - double forces[3], torquesi[3], torquesj[3], dq; - - double radi, radj, meff, dt, Ti, Tj, area; - double Fntot, magtortwist; - - int i, j; - double *xi, *xj, *vi, *vj, *omegai, *omegaj; - double fs[3], fr[3], ft[3]; - - double dx[3], nx[3], r, rsq, rinv, Reff, radsum, delta, dR; - double vr[3], vn[3], vnnr, vt[3], wr[3], vtr[3], vrl[3], relrot[3], vrel; - double magtwist; - bool touch; - - protected: - int rolling_defined, twisting_defined, heat_defined; // Used to quickly skip undefined submodels - int classic_model; -}; - -} // namespace Contact -} // namespace LAMMPS_NS - -#endif diff --git a/src/contact_damping_models.cpp b/src/contact_damping_models.cpp deleted file mode 100644 index 07b6b88649..0000000000 --- a/src/contact_damping_models.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#include "contact_damping_models.h" -#include "contact_normal_models.h" -#include "contact.h" -#include "math_special.h" - -using namespace LAMMPS_NS; -using namespace Contact; -using namespace MathSpecial; - -/* ---------------------------------------------------------------------- - Default damping model -------------------------------------------------------------------------- */ - -DampingModel::DampingModel(LAMMPS *lmp) : SubModel(lmp) {} - -/* ---------------------------------------------------------------------- */ - -void DampingModel::init() -{ - damp = contact->normal_model->damp; -} - -/* ---------------------------------------------------------------------- - No model -------------------------------------------------------------------------- */ - -DampingNone::DampingNone(LAMMPS *lmp) : DampingModel(lmp) {} - -/* ---------------------------------------------------------------------- */ - -double DampingNone::calculate_forces() -{ - return 0.0; -} - -/* ---------------------------------------------------------------------- - Velocity damping -------------------------------------------------------------------------- */ - -DampingVelocity::DampingVelocity(LAMMPS *lmp) : DampingModel(lmp) {} - -/* ---------------------------------------------------------------------- */ - -double DampingVelocity::calculate_forces() -{ - damp_prefactor = damp; - return -damp_prefactor * contact->vnnr; -} - -/* ---------------------------------------------------------------------- - Mass velocity damping -------------------------------------------------------------------------- */ - -DampingMassVelocity::DampingMassVelocity(LAMMPS *lmp) : DampingModel(lmp) {} - -/* ---------------------------------------------------------------------- */ - -double DampingMassVelocity::calculate_forces() -{ - damp_prefactor = damp * contact->meff; - return -damp_prefactor * contact->vnnr; -} - -/* ---------------------------------------------------------------------- - Default, viscoelastic damping -------------------------------------------------------------------------- */ - -DampingViscoelastic::DampingViscoelastic(LAMMPS *lmp) : DampingModel(lmp) {} - -/* ---------------------------------------------------------------------- */ - -double DampingViscoelastic::calculate_forces() -{ - damp_prefactor = damp * contact->meff * contact->area; - return -damp_prefactor * contact->vnnr; -} - -/* ---------------------------------------------------------------------- - Tsuji damping -------------------------------------------------------------------------- */ - -DampingTsuji::DampingTsuji(LAMMPS *lmp) : DampingModel(lmp) {} - -/* ---------------------------------------------------------------------- */ - -void DampingTsuji::init() -{ - double tmp = contact->normal_model->damp; - damp = 1.2728 - 4.2783 * tmp + 11.087 * square(tmp); - damp += -22.348 * cube(tmp)+ 27.467 * powint(tmp, 4); - damp += -18.022 * powint(tmp, 5) + 4.8218 * powint(tmp,6); -} - -/* ---------------------------------------------------------------------- */ - -double DampingTsuji::calculate_forces() -{ - damp_prefactor = damp * sqrt(contact->meff * contact->normal_model->knfac); - return -damp_prefactor * contact->vnnr; -} diff --git a/src/contact_damping_models.h b/src/contact_damping_models.h deleted file mode 100644 index 222e901160..0000000000 --- a/src/contact_damping_models.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef CONTACT_DAMPING_MODELS_H_ -#define CONTACT_DAMPING_MODELS_H_ - -#include "contact_sub_models.h" -#include "pointers.h" - -namespace LAMMPS_NS { -namespace Contact { - -class DampingModel : public SubModel { - public: - DampingModel(class LAMMPS *); - ~DampingModel() {}; - virtual void coeffs_to_local() {}; - virtual void mix_coeffs(double*, double*) {}; - virtual void init(); - virtual double calculate_forces() = 0; - double damp, damp_prefactor; -}; - -/* ---------------------------------------------------------------------- */ - -class DampingNone : public DampingModel { - public: - DampingNone(class LAMMPS *); - void init() override {}; - double calculate_forces(); -}; - -/* ---------------------------------------------------------------------- */ - -class DampingVelocity : public DampingModel { - public: - DampingVelocity(class LAMMPS *); - double calculate_forces(); -}; - -/* ---------------------------------------------------------------------- */ - -class DampingMassVelocity : public DampingModel { - public: - DampingMassVelocity(class LAMMPS *); - double calculate_forces(); -}; - -/* ---------------------------------------------------------------------- */ - -class DampingViscoelastic : public DampingModel { - public: - DampingViscoelastic(class LAMMPS *); - double calculate_forces(); -}; - -/* ---------------------------------------------------------------------- */ - -class DampingTsuji : public DampingModel { - public: - DampingTsuji(class LAMMPS *); - void init() override; - double calculate_forces(); -}; - -} // namespace Contact -} // namespace LAMMPS_NS - -#endif /*CONTACT_DAMPING_MODELS_H_ */ diff --git a/src/contact_heat_models.cpp b/src/contact_heat_models.cpp deleted file mode 100644 index 1804ece9df..0000000000 --- a/src/contact_heat_models.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#include "contact_heat_models.h" -#include "contact.h" -#include "error.h" - -using namespace LAMMPS_NS; -using namespace Contact; - -/* ---------------------------------------------------------------------- - Default heat conduction -------------------------------------------------------------------------- */ - -HeatModel::HeatModel(LAMMPS *lmp) : SubModel(lmp) {} - -/* ---------------------------------------------------------------------- - Area-based heat conduction -------------------------------------------------------------------------- */ - -HeatNone::HeatNone(LAMMPS *lmp) : HeatModel(lmp) {} - -/* ---------------------------------------------------------------------- */ - -double HeatNone::calculate_heat() -{ - return 0.0; -} - -/* ---------------------------------------------------------------------- - Area-based heat conduction -------------------------------------------------------------------------- */ - -HeatArea::HeatArea(LAMMPS *lmp) : HeatModel(lmp) -{ - num_coeffs = 1; -} - -/* ---------------------------------------------------------------------- */ - -void HeatArea::coeffs_to_local() -{ - conductivity = coeffs[0]; - - if (conductivity < 0.0) error->all(FLERR, "Illegal area heat model"); -} - -/* ---------------------------------------------------------------------- */ - -double HeatArea::calculate_heat() -{ - return conductivity * contact->area * (contact->Tj - contact->Ti); -} diff --git a/src/contact_heat_models.h b/src/contact_heat_models.h deleted file mode 100644 index 5a0d495810..0000000000 --- a/src/contact_heat_models.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef CONTACT_HEAT_MODELS_H_ -#define CONTACT_HEAT_MODELS_H_ - -#include "contact_sub_models.h" - -namespace LAMMPS_NS { -namespace Contact { - -class HeatModel : public SubModel { - public: - HeatModel(class LAMMPS *); - ~HeatModel() {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; - virtual double calculate_heat() = 0; -}; - -/* ---------------------------------------------------------------------- */ - -class HeatNone : public HeatModel { - public: - HeatNone(class LAMMPS *); - double calculate_heat(); -}; - -/* ---------------------------------------------------------------------- */ - -class HeatArea : public HeatModel { - public: - HeatArea(class LAMMPS *); - void coeffs_to_local() override; - double calculate_heat(); - protected: - double conductivity; -}; - -} // namespace Contact -} // namespace LAMMPS_NS - -#endif /*CONTACT_HEAT_MODELS_H_ */ diff --git a/src/contact_normal_models.cpp b/src/contact_normal_models.cpp deleted file mode 100644 index b377d5d027..0000000000 --- a/src/contact_normal_models.cpp +++ /dev/null @@ -1,377 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#include "contact_normal_models.h" -#include "contact.h" -#include "error.h" -#include "math_const.h" - -using namespace LAMMPS_NS; -using namespace Contact; -using namespace MathConst; - -#define PI27SQ 266.47931882941264802866 // 27*PI**2 -#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3) -#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6) -#define INVROOT6 0.40824829046386307274 // 1/sqrt(6) -#define FOURTHIRDS (4.0/3.0) // 4/3 -#define ONETHIRD (1.0/3.0) // 1/3 -#define THREEQUARTERS 0.75 // 3/4 - -/* ---------------------------------------------------------------------- - Default normal model -------------------------------------------------------------------------- */ - -NormalModel::NormalModel(LAMMPS *lmp) : SubModel(lmp) -{ - material_properties = 0; -} - -/* ---------------------------------------------------------------------- */ - -bool NormalModel::touch() -{ - bool touchflag = (contact->rsq < contact->radsum * contact->radsum); - return touchflag; -} - -/* ---------------------------------------------------------------------- */ - -double NormalModel::pulloff_distance(double radi, double radj) -{ - //called outside of compute(), do not assume correct geometry defined in contact - return radi + radj; -} - -/* ---------------------------------------------------------------------- */ - -double NormalModel::calculate_area() -{ - return sqrt(contact->dR); -} - -/* ---------------------------------------------------------------------- */ - -void NormalModel::set_fncrit() -{ - Fncrit = fabs(contact->Fntot); -} - -/* ---------------------------------------------------------------------- - No model -------------------------------------------------------------------------- */ - -NormalNone::NormalNone(LAMMPS *lmp) : NormalModel(lmp) {} - -/* ---------------------------------------------------------------------- */ - -double NormalNone::calculate_forces() -{ - return 0.0; -} - -/* ---------------------------------------------------------------------- - Hookean normal force -------------------------------------------------------------------------- */ - -NormalHooke::NormalHooke(LAMMPS *lmp) : NormalModel(lmp) -{ - num_coeffs = 2; -} - -/* ---------------------------------------------------------------------- */ - -void NormalHooke::coeffs_to_local() -{ - k = coeffs[0]; - damp = coeffs[1]; - - if (k < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hooke normal model"); -} - -/* ---------------------------------------------------------------------- */ - -double NormalHooke::calculate_forces() -{ - Fne = knfac * contact->delta; - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -void NormalHooke::set_knfac() -{ - knfac = k; -} - -/* ---------------------------------------------------------------------- - Hertzian normal force -------------------------------------------------------------------------- */ - -NormalHertz::NormalHertz(LAMMPS *lmp) : NormalModel(lmp) -{ - num_coeffs = 2; -} - -/* ---------------------------------------------------------------------- */ - -void NormalHertz::coeffs_to_local() -{ - k = coeffs[0]; - damp = coeffs[1]; - - if (k < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hertz normal model"); -} - -/* ---------------------------------------------------------------------- */ - -double NormalHertz::calculate_forces() -{ - Fne = knfac * contact->delta; - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -void NormalHertz::set_knfac() -{ - knfac = k * contact->area; -} - -/* ---------------------------------------------------------------------- - Hertzian normal force with material properties -------------------------------------------------------------------------- */ - -NormalHertzMaterial::NormalHertzMaterial(LAMMPS *lmp) : NormalHertz(lmp) -{ - material_properties = 1; - num_coeffs = 3; -} - -/* ---------------------------------------------------------------------- */ - -void NormalHertzMaterial::coeffs_to_local() -{ - Emod = coeffs[0]; - damp = coeffs[1]; - poiss = coeffs[2]; - if (contact->contact_type == PAIR) { - k = FOURTHIRDS * mix_stiffnessE(Emod, Emod, poiss, poiss); - } else { - k = FOURTHIRDS * mix_stiffnessE_wall(Emod, poiss); - } - - if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal Hertz material normal model"); -} - -/* ---------------------------------------------------------------------- */ - -void NormalHertzMaterial::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); - coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); - coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- - DMT normal force -------------------------------------------------------------------------- */ - -NormalDMT::NormalDMT(LAMMPS *lmp) : NormalModel(lmp) -{ - allow_limit_damping = 0; - material_properties = 1; - num_coeffs = 4; -} - -/* ---------------------------------------------------------------------- */ - -void NormalDMT::coeffs_to_local() -{ - Emod = coeffs[0]; - damp = coeffs[1]; - poiss = coeffs[2]; - cohesion = coeffs[3]; - if (contact->contact_type == PAIR) { - k = FOURTHIRDS * mix_stiffnessE(Emod, Emod, poiss, poiss); - } else { - k = FOURTHIRDS * mix_stiffnessE_wall(Emod, poiss); - } - - if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal DMT normal model"); -} - -/* ---------------------------------------------------------------------- */ - -void NormalDMT::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); - coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); - coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); - coeffs[3] = mix_geom(icoeffs[3], jcoeffs[3]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- */ - -double NormalDMT::calculate_forces() -{ - Fne = knfac * contact->delta; - F_pulloff = 4.0 * MathConst::MY_PI * cohesion * contact->Reff; - Fne -= F_pulloff; - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -void NormalDMT::set_knfac() -{ - knfac = k * contact->area; -} - -/* ---------------------------------------------------------------------- */ - -void NormalDMT::set_fncrit() -{ - Fncrit = fabs(Fne + 2.0 * F_pulloff); -} - -/* ---------------------------------------------------------------------- - JKR normal force -------------------------------------------------------------------------- */ - -NormalJKR::NormalJKR(LAMMPS *lmp) : NormalModel(lmp) -{ - allow_limit_damping = 0; - material_properties = 1; - beyond_contact = 1; - num_coeffs = 4; -} - -/* ---------------------------------------------------------------------- */ - -void NormalJKR::coeffs_to_local() -{ - Emod = coeffs[0]; - damp = coeffs[1]; - poiss = coeffs[2]; - cohesion = coeffs[3]; - - if (contact->contact_type == PAIR) { - Emix = mix_stiffnessE(Emod, Emod, poiss, poiss); - } else { - Emix = mix_stiffnessE_wall(Emod, poiss); - } - - k = FOURTHIRDS * Emix; - - if (Emod < 0.0 || damp < 0.0) error->all(FLERR, "Illegal JKR normal model"); -} - -/* ---------------------------------------------------------------------- */ - -void NormalJKR::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); - coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); - coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); - coeffs[3] = mix_geom(icoeffs[3], jcoeffs[3]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- */ - -bool NormalJKR::touch() -{ - double area_at_pulloff, R2, delta_pulloff, dist_pulloff; - bool touchflag; - - if (contact->touch) { - R2 = contact->Reff * contact->Reff; - area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * R2 / (4.0 * Emix)); - delta_pulloff = area_at_pulloff * area_at_pulloff / contact->Reff - 2.0 * sqrt(MY_PI * cohesion * area_at_pulloff / Emix); - dist_pulloff = contact->radsum - delta_pulloff; - touchflag = contact->rsq < (dist_pulloff * dist_pulloff); - } else { - touchflag = contact->rsq < (contact->radsum * contact->radsum); - } - - return touchflag; -} - -/* ---------------------------------------------------------------------- - called outside of compute(), do not assume geometry defined in contact -------------------------------------------------------------------------- */ - -double NormalJKR::pulloff_distance(double radi, double radj) -{ - double area_at_pulloff, Reff_tmp; - - Reff_tmp = radi * radj / (radi + radj); // May not be defined - if (Reff_tmp <= 0) return 0; - - area_at_pulloff = cbrt(9.0 * MY_PI * cohesion * Reff_tmp * Reff_tmp / (4.0 * Emix)); - return area_at_pulloff * area_at_pulloff / Reff_tmp - 2.0 * sqrt(MY_PI * cohesion * area_at_pulloff / Emix); -} - -/* ---------------------------------------------------------------------- */ - -double NormalJKR::calculate_area() -{ - double R2, dR2, t0, t1, t2, t3, t4, t5, t6; - double sqrt1, sqrt2, sqrt3; - - R2 = contact->Reff * contact->Reff; - dR2 = contact->dR * contact->dR; - t0 = cohesion * cohesion * R2 * R2 * Emix; - t1 = PI27SQ * t0; - t2 = 8.0 * contact->dR * dR2 * Emix * Emix * Emix; - t3 = 4.0 * dR2 * Emix; - - // in case sqrt(0) < 0 due to precision issues - sqrt1 = MAX(0, t0 * (t1 + 2.0 * t2)); - t4 = cbrt(t1 + t2 + THREEROOT3 * MY_PI * sqrt(sqrt1)); - t5 = t3 / t4 + t4 / Emix; - sqrt2 = MAX(0, 2.0 * contact->dR + t5); - t6 = sqrt(sqrt2); - sqrt3 = MAX(0, 4.0 * contact->dR - t5 + SIXROOT6 * cohesion * MY_PI * R2 / (Emix * t6)); - - return INVROOT6 * (t6 + sqrt(sqrt3)); -} - -/* ---------------------------------------------------------------------- */ - -double NormalJKR::calculate_forces() -{ - double a2; - a2 = contact->area * contact->area; - Fne = knfac * a2 / contact->Reff - MY_2PI * a2 * sqrt(4.0 * cohesion * Emix / (MY_PI * contact->area)); - F_pulloff = 3.0 * MY_PI * cohesion * contact->Reff; - - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -void NormalJKR::set_knfac() -{ - knfac = k * contact->area; -} - -/* ---------------------------------------------------------------------- */ - -void NormalJKR::set_fncrit() -{ - Fncrit = fabs(Fne + 2.0 * F_pulloff); -} diff --git a/src/contact_normal_models.h b/src/contact_normal_models.h deleted file mode 100644 index 8159a4c620..0000000000 --- a/src/contact_normal_models.h +++ /dev/null @@ -1,118 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef CONTACT_NORMAL_MODELS_H_ -#define CONTACT_NORMAL_MODELS_H_ - -#include "contact_sub_models.h" - -namespace LAMMPS_NS { -namespace Contact { - -class NormalModel : public SubModel { - public: - NormalModel(class LAMMPS *); - ~NormalModel() {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; - virtual bool touch(); - virtual double pulloff_distance(double, double); - virtual double calculate_area(); - virtual void set_knfac() = 0; - virtual double calculate_forces() = 0; - virtual void set_fncrit(); - double damp; // Vestigial argument needed by damping - double Emod, poiss; - double Fncrit, Fne, knfac; - int material_properties; -}; - -/* ---------------------------------------------------------------------- */ - -class NormalNone : public NormalModel { - public: - NormalNone(class LAMMPS *); - void set_knfac() {}; - double calculate_forces(); -}; - -/* ---------------------------------------------------------------------- */ - -class NormalHooke : public NormalModel { - public: - NormalHooke(class LAMMPS *); - void coeffs_to_local() override; - void set_knfac(); - double calculate_forces(); - protected: - double k; -}; - -/* ---------------------------------------------------------------------- */ - -class NormalHertz : public NormalModel { - public: - NormalHertz(class LAMMPS *); - void coeffs_to_local() override; - void set_knfac(); - double calculate_forces(); - protected: - double k; -}; - -/* ---------------------------------------------------------------------- */ - -class NormalHertzMaterial : public NormalHertz { - public: - NormalHertzMaterial(class LAMMPS *); - void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; -}; - -/* ---------------------------------------------------------------------- */ - -class NormalDMT : public NormalModel { - public: - NormalDMT(class LAMMPS *); - void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; - void set_knfac(); - double calculate_forces(); - void set_fncrit() override; - protected: - double k, cohesion; - double F_pulloff; -}; - -/* ---------------------------------------------------------------------- */ - -class NormalJKR : public NormalModel { - public: - NormalJKR(class LAMMPS *); - void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; - bool touch() override; - double pulloff_distance(double, double) override; - double calculate_area() override; - void set_knfac(); - double calculate_forces(); - void set_fncrit() override; - protected: - double k, cohesion; - double Emix, F_pulloff; -}; - -} // namespace Contact -} // namespace LAMMPS_NS - -#endif /*CONTACT_NORMAL_MODELS_H_ */ diff --git a/src/contact_rolling_models.cpp b/src/contact_rolling_models.cpp deleted file mode 100644 index 3ee80c0e48..0000000000 --- a/src/contact_rolling_models.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#include "contact_normal_models.h" -#include "contact_rolling_models.h" -#include "contact.h" -#include "error.h" -#include "math_const.h" -#include "math_extra.h" - -using namespace LAMMPS_NS; -using namespace Contact; -using namespace MathConst; -using namespace MathExtra; - -/* ---------------------------------------------------------------------- - Default rolling friction model -------------------------------------------------------------------------- */ - -RollingModel::RollingModel(LAMMPS *lmp) : SubModel(lmp) {} - -/* ---------------------------------------------------------------------- - No model -------------------------------------------------------------------------- */ - -RollingNone::RollingNone(LAMMPS *lmp) : RollingModel(lmp) {} - -/* ---------------------------------------------------------------------- - SDS rolling friction model -------------------------------------------------------------------------- */ - -RollingSDS::RollingSDS(LAMMPS *lmp) : RollingModel(lmp) -{ - num_coeffs = 3; - size_history = 3; -} - -/* ---------------------------------------------------------------------- */ - -void RollingSDS::coeffs_to_local() -{ - k = coeffs[0]; - gamma = coeffs[1]; - mu = coeffs[2]; - - if (k < 0.0 || mu < 0.0 || gamma < 0.0) - error->all(FLERR, "Illegal SDS rolling model"); -} - -/* ---------------------------------------------------------------------- */ - -void RollingSDS::calculate_forces() -{ - int rhist0, rhist1, rhist2, frameupdate; - double Frcrit, rolldotn, rollmag, prjmag, magfr, hist_temp[3], scalefac, temp_array[3]; - double k_inv, magfr_inv; - - rhist0 = history_index; - rhist1 = rhist0 + 1; - rhist2 = rhist1 + 1; - - Frcrit = mu * contact->normal_model->Fncrit; - - if (contact->history_update) { - hist_temp[0] = contact->history[rhist0]; - hist_temp[1] = contact->history[rhist1]; - hist_temp[2] = contact->history[rhist2]; - rolldotn = dot3(hist_temp, contact->nx); - - frameupdate = (fabs(rolldotn) * k) > (EPSILON * Frcrit); - if (frameupdate) { // rotate into tangential plane - rollmag = len3(hist_temp); - // projection - scale3(rolldotn, contact->nx, temp_array); - sub3(hist_temp, temp_array, hist_temp); - - // also rescale to preserve magnitude - prjmag = len3(hist_temp); - if (prjmag > 0) scalefac = rollmag / prjmag; - else scalefac = 0; - scale3(scalefac, hist_temp); - } - scale3(contact->dt, contact->vrl, temp_array); - add3(hist_temp, temp_array, hist_temp); - } - - scaleadd3(-k, hist_temp, -gamma, contact->vrl, contact->fr); - - // rescale frictional displacements and forces if needed - magfr = len3(contact->fr); - if (magfr > Frcrit) { - rollmag = len3(hist_temp); - if (rollmag != 0.0) { - k_inv = 1.0 / k; - magfr_inv = 1.0 / magfr; - scale3(-Frcrit * k_inv * magfr_inv, contact->fr, hist_temp); - scale3(-gamma * k_inv, contact->vrl, temp_array); - add3(hist_temp, temp_array, hist_temp); - - scale3(Frcrit * magfr_inv, contact->fr); - } else { - zero3(contact->fr); - } - } - - if (contact->history_update) { - contact->history[rhist0] = hist_temp[0]; - contact->history[rhist1] = hist_temp[1]; - contact->history[rhist2] = hist_temp[2]; - } -} diff --git a/src/contact_rolling_models.h b/src/contact_rolling_models.h deleted file mode 100644 index f5af08c1b0..0000000000 --- a/src/contact_rolling_models.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef CONTACT_ROLLING_MODELS_H_ -#define CONTACT_ROLLING_MODELS_H_ - -#include "contact_sub_models.h" - -namespace LAMMPS_NS { -namespace Contact { - -class RollingModel : public SubModel { - public: - RollingModel(class LAMMPS *); - ~RollingModel() {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; - virtual void calculate_forces() = 0; -}; - -/* ---------------------------------------------------------------------- */ - -class RollingNone : public RollingModel { - public: - RollingNone(class LAMMPS *); - void calculate_forces() {}; -}; - -/* ---------------------------------------------------------------------- */ - -class RollingSDS : public RollingModel { - public: - RollingSDS(class LAMMPS *); - void coeffs_to_local() override; - void calculate_forces(); - protected: - double k, mu, gamma; -}; - -} // namespace Contact -} // namespace LAMMPS_NS - -#endif /*CONTACT_ROLLING_MODELS_H_ */ diff --git a/src/contact_sub_models.cpp b/src/contact_sub_models.cpp deleted file mode 100644 index 1c9fe6b4f5..0000000000 --- a/src/contact_sub_models.cpp +++ /dev/null @@ -1,140 +0,0 @@ -// clang-format off -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. --------------------------------------------------------------------------*/ - -/* ---------------------------------------------------------------------- - This class contains a framework for normal, damping, tangential, - rolling, twisting, and heat models used to calculate forces - and torques based on contact geometry - - Contributing authors: - Dan Bolintineanu (SNL), Joel Clemmer (SNL) ------------------------------------------------------------------------ */ - -#include "contact_sub_models.h" -#include "error.h" -#include "utils.h" - -using namespace LAMMPS_NS; -using namespace Contact; - -/* ---------------------------------------------------------------------- - Parent class for all types of contact forces -------------------------------------------------------------------------- */ - -SubModel::SubModel(LAMMPS *lmp) : Pointers(lmp) -{ - allocated = 0; - size_history = 0; - history_index = 0; - allow_limit_damping = 1; - beyond_contact = 0; - num_coeffs = 0; - - nondefault_history_transfer = 0; - transfer_history_factor = nullptr; -} - -/* ---------------------------------------------------------------------- */ - -SubModel::~SubModel() -{ - if (allocated) delete [] coeffs; - delete [] transfer_history_factor; -} - -/* ---------------------------------------------------------------------- */ - -void SubModel::allocate_coeffs() -{ - allocated = 1; - coeffs = new double[num_coeffs]; -} - -/* ---------------------------------------------------------------------- */ - -int SubModel::parse_coeffs(char **arg, int iarg, int narg) -{ - if (iarg + num_coeffs > narg) - error->all(FLERR, "Insufficient arguments provided for {} model", name); - for (int i = 0; i < num_coeffs; i++) { - // A few parameters (eg.g kt for tangential mindlin) allow null - if (strcmp(arg[iarg+i], "NULL") == 0) coeffs[i] = -1; - else coeffs[i] = utils::numeric(FLERR,arg[iarg+i],false,lmp); - } - coeffs_to_local(); - - return iarg + num_coeffs; -} - -/* ---------------------------------------------------------------------- */ - -void SubModel::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - for (int i = 0; i < num_coeffs; i++) - coeffs[i] = mix_geom(icoeffs[i], jcoeffs[i]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- - mixing of Young's modulus (E) -------------------------------------------------------------------------- */ - -double SubModel::mix_stiffnessE(double E1, double E2, - double pois1, double pois2) -{ - double factor1 = (1 - pois1 * pois1) / E1; - double factor2 = (1 - pois2 * pois2) / E2; - return 1 / (factor1 + factor2); -} - -/* ---------------------------------------------------------------------- - mixing of shear modulus (G) ------------------------------------------------------------------------- */ - -double SubModel::mix_stiffnessG(double E1, double E2, - double pois1, double pois2) -{ - double factor1 = 2 * (2 - pois1) * (1 + pois1) / E1; - double factor2 = 2 * (2 - pois2) * (1 + pois2) / E2; - return 1 / (factor1 + factor2); -} - -/* ---------------------------------------------------------------------- - mixing of Young's modulus (E) for walls -------------------------------------------------------------------------- */ - -double SubModel::mix_stiffnessE_wall(double E, double pois) -{ - double factor = 2 * (1 - pois); - return E / factor; -} - -/* ---------------------------------------------------------------------- - mixing of shear modulus (G) for walls ------------------------------------------------------------------------- */ - -double SubModel::mix_stiffnessG_wall(double E, double pois) -{ - double factor = 32.0 * (2 - pois) * (1 + pois); - return E / factor; -} - -/* ---------------------------------------------------------------------- - mixing of everything else -------------------------------------------------------------------------- */ - -double SubModel::mix_geom(double val1, double val2) -{ - return sqrt(val1 * val2); -} diff --git a/src/contact_sub_models.h b/src/contact_sub_models.h deleted file mode 100644 index 0f577bf08e..0000000000 --- a/src/contact_sub_models.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef CONTACT_SUB_MODEL_H_ -#define CONTACT_SUB_MODEL_H_ - -#include "contact.h" -#include "pointers.h" // IWYU pragma: export - -namespace LAMMPS_NS { -namespace Contact { - -class SubModel : protected Pointers { - public: - SubModel(class LAMMPS *); - virtual ~SubModel(); - - int num_coeffs; - double *coeffs; - void read_restart(); - int parse_coeffs(char **, int, int); - virtual void mix_coeffs(double*, double*); - virtual void coeffs_to_local() = 0; - virtual void init() = 0; // called after all other submodel coeffs defined - - void allocate_coeffs(); - std::string name; - - int size_history; - int nondefault_history_transfer; - double *transfer_history_factor; - - int history_index; - int beyond_contact; - int allow_limit_damping; - - ContactModel *contact; - - protected: - int allocated; - - double mix_stiffnessE(double, double, double, double); - double mix_stiffnessG(double, double, double, double); - double mix_stiffnessE_wall(double, double); - double mix_stiffnessG_wall(double, double); - double mix_geom(double, double); -}; - -} // namespace Contact -} // namespace LAMMPS_NS - -#endif /* CONTACT_SUB_MODEL_H_ */ diff --git a/src/contact_tangential_models.cpp b/src/contact_tangential_models.cpp deleted file mode 100644 index ca95d1d00b..0000000000 --- a/src/contact_tangential_models.cpp +++ /dev/null @@ -1,412 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#include "contact_damping_models.h" -#include "contact_normal_models.h" -#include "contact_tangential_models.h" -#include "contact.h" -#include "error.h" -#include "math_const.h" -#include "math_extra.h" - -using namespace LAMMPS_NS; -using namespace Contact; -using namespace MathConst; -using namespace MathExtra; - -/* ---------------------------------------------------------------------- - Default model -------------------------------------------------------------------------- */ - -TangentialModel::TangentialModel(LAMMPS *lmp) : SubModel(lmp) {} - -/* ---------------------------------------------------------------------- - No model -------------------------------------------------------------------------- */ - -TangentialNone::TangentialNone(LAMMPS *lmp) : TangentialModel(lmp) {} - -/* ---------------------------------------------------------------------- - Linear model with no history -------------------------------------------------------------------------- */ - -TangentialLinearNoHistory::TangentialLinearNoHistory(LAMMPS *lmp) : TangentialModel(lmp) -{ - num_coeffs = 2; - size_history = 3; -} - -/* ---------------------------------------------------------------------- */ - -void TangentialLinearNoHistory::coeffs_to_local() -{ - k = 0.0; // No tangential stiffness with no history - xt = coeffs[0]; - mu = coeffs[1]; - - if (k < 0.0 || xt < 0.0 || mu < 0.0) - error->all(FLERR, "Illegal linear no history tangential model"); -} - -/* ---------------------------------------------------------------------- */ - -void TangentialLinearNoHistory::calculate_forces() -{ - // classic pair gran/hooke (no history) - damp = xt * contact->damping_model->damp_prefactor; - - double Fscrit = mu * contact->normal_model->Fncrit; - double fsmag = damp * contact->vrel; - - double Ft; - if (contact->vrel != 0.0) Ft = MIN(Fscrit, fsmag) / contact->vrel; - else Ft = 0.0; - - scale3(-Ft, contact->vtr, contact->fs); -} - -/* ---------------------------------------------------------------------- - Linear model with history -------------------------------------------------------------------------- */ - -TangentialLinearHistory::TangentialLinearHistory(LAMMPS *lmp) : TangentialModel(lmp) -{ - num_coeffs = 3; - size_history = 3; -} - -/* ---------------------------------------------------------------------- */ - -void TangentialLinearHistory::coeffs_to_local() -{ - k = coeffs[0]; - xt = coeffs[1]; - mu = coeffs[2]; - - if (k < 0.0 || xt < 0.0 || mu < 0.0) - error->all(FLERR, "Illegal linear tangential model"); -} - -/* ---------------------------------------------------------------------- */ - -void TangentialLinearHistory::calculate_forces() -{ - // Note: this is the same as the base Mindlin calculation except k isn't scaled by area - double magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; - int frame_update = 0; - - damp = xt * contact->damping_model->damp_prefactor; - - double Fscrit = contact->normal_model->Fncrit * mu; - double *history = & contact->history[history_index]; - - // rotate and update displacements / force. - // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (contact->history_update) { - rsht = dot3(history, contact->nx); - frame_update = (fabs(rsht) * k) > (EPSILON * Fscrit); - - if (frame_update) { - shrmag = len3(history); - - // projection - scale3(rsht, contact->nx, temp_array); - sub3(history, temp_array, history); - - // also rescale to preserve magnitude - prjmag = len3(history); - if (prjmag > 0) temp_dbl = shrmag / prjmag; - else temp_dbl = 0; - scale3(temp_dbl, history); - } - - // update history, tangential force - // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - scale3(contact->dt, contact->vtr, temp_array); - add3(history, temp_array, history); - } - - - // tangential forces = history + tangential velocity damping - scale3(-k, history, contact->fs); - scale3(damp, contact->vtr, temp_array); - sub3(contact->fs, temp_array, contact->fs); - - // rescale frictional displacements and forces if needed - magfs = len3(contact->fs); - if (magfs > Fscrit) { - shrmag = len3(history); - if (shrmag != 0.0) { - magfs_inv = 1.0 / magfs; - scale3(Fscrit * magfs_inv, contact->fs, history); - scale3(damp, contact->vtr, temp_array); - add3(history, temp_array, history); - scale3(-1.0 / k, history); - scale3(Fscrit * magfs_inv, contact->fs); - } else { - zero3(contact->fs); - } - } -} - -/* ---------------------------------------------------------------------- - Linear model with history from pair gran/hooke/history -------------------------------------------------------------------------- */ - -TangentialLinearHistoryClassic::TangentialLinearHistoryClassic(LAMMPS *lmp) : TangentialLinearHistory(lmp) -{ - scale_area = 0; // Sets gran/hooke/history behavior -} - -/* ---------------------------------------------------------------------- */ - -void TangentialLinearHistoryClassic::calculate_forces() -{ - double k_scaled, magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; - double temp_array[3]; - int frame_update = 0; - - k_scaled = k; - if (scale_area) k_scaled *= contact->area; - - damp = xt * contact->damping_model->damp_prefactor; - - double Fscrit = contact->normal_model->Fncrit * mu; - double *history = & contact->history[history_index]; - - // update history - if (contact->history_update) { - scale3(contact->dt, contact->vtr, temp_array); - add3(history, temp_array, history); - } - - shrmag = len3(history); - - // rotate shear displacements - if (contact->history_update) { - rsht = dot3(history, contact->nx); - scale3(rsht, contact->nx, temp_array); - sub3(history, temp_array, history); - } - - // tangential forces = history + tangential velocity damping - scale3(-k_scaled, history, contact->fs); - scale3(damp, contact->vtr, temp_array); - sub3(contact->fs, temp_array, contact->fs); - - // rescale frictional displacements and forces if needed - magfs = len3(contact->fs); - if (magfs > Fscrit) { - if (shrmag != 0.0) { - magfs_inv = 1.0 / magfs; - scale3(Fscrit * magfs_inv, contact->fs, history); - scale3(damp, contact->vtr, temp_array); - add3(history, temp_array, history); - temp_dbl = -1.0 / k_scaled; - if (scale_area) temp_dbl /= contact->area; - scale3(temp_dbl, history); - scale3(Fscrit * magfs_inv, contact->fs); - } else { - zero3(contact->fs); - } - } -} - -/* ---------------------------------------------------------------------- - Mindlin from pair gran/hertz/history -------------------------------------------------------------------------- */ - -TangentialMindlinClassic::TangentialMindlinClassic(LAMMPS *lmp) : TangentialLinearHistoryClassic(lmp) -{ - scale_area = 1; // Sets gran/hertz/history behavior -} - -/* ---------------------------------------------------------------------- - Mindlin model -------------------------------------------------------------------------- */ - -TangentialMindlin::TangentialMindlin(LAMMPS *lmp) : TangentialModel(lmp) -{ - num_coeffs = 3; - size_history = 3; - mindlin_force = 0; - mindlin_rescale = 0; -} - -/* ---------------------------------------------------------------------- */ - -void TangentialMindlin::coeffs_to_local() -{ - k = coeffs[0]; - xt = coeffs[1]; - mu = coeffs[2]; - - if (k == -1) { - if (!contact->normal_model->material_properties) - error->all(FLERR, "Must either specify tangential stiffness or material properties for normal model for the Mindlin tangential style"); - - double Emod = contact->normal_model->Emod; - double poiss = contact->normal_model->poiss; - - if (contact->contact_type == PAIR) { - k = 8.0 * mix_stiffnessG(Emod, Emod, poiss, poiss); - } else { - k = 8.0 * mix_stiffnessG_wall(Emod, poiss); - } - } - - if (k < 0.0 || xt < 0.0 || mu < 0.0) - error->all(FLERR, "Illegal Mindlin tangential model"); -} - -/* ---------------------------------------------------------------------- */ - -void TangentialMindlin::mix_coeffs(double* icoeffs, double* jcoeffs) -{ - if (icoeffs[0] == -1 || jcoeffs[0] == -1) coeffs[0] = -1; - else coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); - coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); - coeffs[2] = mix_geom(icoeffs[2], jcoeffs[2]); - coeffs_to_local(); -} - -/* ---------------------------------------------------------------------- */ - -void TangentialMindlin::calculate_forces() -{ - double k_scaled, magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; - double temp_array[3]; - int frame_update = 0; - - damp = xt * contact->damping_model->damp_prefactor; - - double *history = & contact->history[history_index]; - double Fscrit = contact->normal_model->Fncrit * mu; - - k_scaled = k * contact->area; - - // on unloading, rescale the shear displacements/force - if (mindlin_rescale) - if (contact->area < history[3]) - scale3(contact->area / history[3], history); - - // rotate and update displacements / force. - // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 - if (contact->history_update) { - rsht = dot3(history, contact->nx); - if (mindlin_force) { - frame_update = fabs(rsht) > (EPSILON * Fscrit); - } else { - frame_update = (fabs(rsht) * k_scaled) > (EPSILON * Fscrit); - } - - if (frame_update) { - shrmag = len3(history); - // projection - scale3(rsht, contact->nx, temp_array); - sub3(history, temp_array, history); - // also rescale to preserve magnitude - prjmag = len3(history); - if (prjmag > 0) temp_dbl = shrmag / prjmag; - else temp_dbl = 0; - scale3(temp_dbl, history); - } - - // update history - if (mindlin_force) { - // tangential force - // see e.g. eq. 18 of Thornton et al, Pow. Tech. 2013, v223,p30-46 - scale3(-k_scaled * contact->dt, contact->vtr, temp_array); - } else { - scale3(contact->dt, contact->vtr, temp_array); - } - add3(history, temp_array, history); - - if (mindlin_rescale) history[3] = contact->area; - } - - // tangential forces = history + tangential velocity damping - scale3(-damp, contact->vtr, contact->fs); - - if (!mindlin_force) { - scale3(k_scaled, history, temp_array); - sub3(contact->fs, temp_array, contact->fs); - } else { - add3(contact->fs, history, contact->fs); - } - - // rescale frictional displacements and forces if needed - magfs = len3(contact->fs); - if (magfs > Fscrit) { - shrmag = len3(history); - if (shrmag != 0.0) { - magfs_inv = 1.0 / magfs; - scale3(Fscrit * magfs_inv, contact->fs, history); - scale3(damp, contact->vtr, temp_array); - add3(history, temp_array, history); - - if (!mindlin_force) - scale3(-1.0 / k_scaled, history); - - scale3(Fscrit * magfs_inv, contact->fs); - } else { - zero3(contact->fs); - } - } -} - -/* ---------------------------------------------------------------------- - Mindlin force model -------------------------------------------------------------------------- */ - -TangentialMindlinForce::TangentialMindlinForce(LAMMPS *lmp) : TangentialMindlin(lmp) -{ - num_coeffs = 3; - size_history = 3; - mindlin_force = 1; - mindlin_rescale = 0; -} - -/* ---------------------------------------------------------------------- - Mindlin rescale model -------------------------------------------------------------------------- */ - -TangentialMindlinRescale::TangentialMindlinRescale(LAMMPS *lmp) : TangentialMindlin(lmp) -{ - num_coeffs = 3; - size_history = 4; - mindlin_force = 0; - mindlin_rescale = 1; - - nondefault_history_transfer = 1; - transfer_history_factor = new double[size_history]; - for (int i = 0; i < size_history; i++) transfer_history_factor[i] = -1.0; - transfer_history_factor[3] = +1; -} - -/* ---------------------------------------------------------------------- - Mindlin rescale force model -------------------------------------------------------------------------- */ - -TangentialMindlinRescaleForce::TangentialMindlinRescaleForce(LAMMPS *lmp) : TangentialMindlin(lmp) -{ - num_coeffs = 3; - size_history = 4; - mindlin_force = 1; - mindlin_rescale = 1; - - nondefault_history_transfer = 1; - transfer_history_factor = new double[size_history]; - for (int i = 0; i < size_history; i++) transfer_history_factor[i] = -1.0; - transfer_history_factor[3] = +1; -} diff --git a/src/contact_tangential_models.h b/src/contact_tangential_models.h deleted file mode 100644 index a54d03c495..0000000000 --- a/src/contact_tangential_models.h +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef CONTACT_TANGENTIAL_MODELS_H_ -#define CONTACT_TANGENTIAL_MODELS_H_ - -#include "contact_sub_models.h" - -namespace LAMMPS_NS { -namespace Contact { - -class TangentialModel : public SubModel { - public: - TangentialModel(class LAMMPS *); - virtual ~TangentialModel() {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; - virtual void calculate_forces() = 0; - int rescale_flag; - double k, damp, mu; // Used by Marshall twisting model - protected: - double xt; -}; - -/* ---------------------------------------------------------------------- */ - -class TangentialNone : public TangentialModel { - public: - TangentialNone(class LAMMPS *); - void calculate_forces() {}; -}; - -/* ---------------------------------------------------------------------- */ - -class TangentialLinearNoHistory : public TangentialModel { - public: - TangentialLinearNoHistory(class LAMMPS *); - void coeffs_to_local() override; - void calculate_forces(); -}; - -/* ---------------------------------------------------------------------- */ - -class TangentialLinearHistory : public TangentialModel { - public: - TangentialLinearHistory(class LAMMPS *); - void coeffs_to_local() override; - void calculate_forces(); -}; - -/* ---------------------------------------------------------------------- */ - -class TangentialLinearHistoryClassic : public TangentialLinearHistory { - public: - TangentialLinearHistoryClassic(class LAMMPS *); - void calculate_forces(); - int scale_area; -}; - -/* ---------------------------------------------------------------------- */ - -class TangentialMindlinClassic : public TangentialLinearHistoryClassic { - public: - TangentialMindlinClassic(class LAMMPS *); -}; - -/* ---------------------------------------------------------------------- */ - -class TangentialMindlin : public TangentialModel { - public: - TangentialMindlin(class LAMMPS *); - void coeffs_to_local() override; - void mix_coeffs(double*, double*) override; - void calculate_forces(); - protected: - int mindlin_rescale, mindlin_force; -}; - -/* ---------------------------------------------------------------------- */ - -class TangentialMindlinForce : public TangentialMindlin { - public: - TangentialMindlinForce(class LAMMPS *); -}; - -/* ---------------------------------------------------------------------- */ - -class TangentialMindlinRescale : public TangentialMindlin { - public: - TangentialMindlinRescale(class LAMMPS *); -}; - -/* ---------------------------------------------------------------------- */ - -class TangentialMindlinRescaleForce : public TangentialMindlin { - public: - TangentialMindlinRescaleForce(class LAMMPS *); -}; - -} // namespace Contact -} // namespace LAMMPS_NS - -#endif /*CONTACT_TANGENTIAL_MODELS_H_ */ diff --git a/src/contact_twisting_models.cpp b/src/contact_twisting_models.cpp deleted file mode 100644 index 94a88161f3..0000000000 --- a/src/contact_twisting_models.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#include "contact_normal_models.h" -#include "contact_tangential_models.h" -#include "contact_twisting_models.h" -#include "contact.h" -#include "error.h" -#include "math_const.h" - -using namespace LAMMPS_NS; -using namespace Contact; -using namespace MathConst; - -/* ---------------------------------------------------------------------- - Default twisting model -------------------------------------------------------------------------- */ - -TwistingModel::TwistingModel(LAMMPS *lmp) : SubModel(lmp) {} - -/* ---------------------------------------------------------------------- - No model -------------------------------------------------------------------------- */ - -TwistingNone::TwistingNone(LAMMPS *lmp) : TwistingModel(lmp) {} - -/* ---------------------------------------------------------------------- - Marshall twisting model -------------------------------------------------------------------------- */ - -TwistingMarshall::TwistingMarshall(LAMMPS *lmp) : TwistingModel(lmp) -{ - num_coeffs = 0; - size_history = 3; -} - -/* ---------------------------------------------------------------------- */ - - -void TwistingMarshall::init() -{ - k_tang = contact->tangential_model->k; - mu_tang = contact->tangential_model->mu; -} - -/* ---------------------------------------------------------------------- */ - -void TwistingMarshall::calculate_forces() -{ - double signtwist, Mtcrit; - - // Calculate twist coefficients from tangential model & contact geometry - // eq 32 of Marshall paper - double k = 0.5 * k_tang * contact->area * contact->area; - double damp = 0.5 * contact->tangential_model->damp * contact->area * contact->area; - double mu = TWOTHIRDS * mu_tang * contact->area; - - if (contact->history_update) { - contact->history[history_index] += contact->magtwist * contact->dt; - } - - // M_t torque (eq 30) - contact->magtortwist = -k * contact->history[history_index] - damp * contact->magtwist; - signtwist = (contact->magtwist > 0) - (contact->magtwist < 0); - Mtcrit = mu * contact->normal_model->Fncrit; // critical torque (eq 44) - - if (fabs(contact->magtortwist) > Mtcrit) { - contact->history[history_index] = (Mtcrit * signtwist - damp * contact->magtwist) / k; - contact->magtortwist = -Mtcrit * signtwist; // eq 34 - } -} - -/* ---------------------------------------------------------------------- - SDS twisting model -------------------------------------------------------------------------- */ - -TwistingSDS::TwistingSDS(LAMMPS *lmp) : TwistingModel(lmp) -{ - num_coeffs = 3; - size_history = 3; -} - -/* ---------------------------------------------------------------------- */ - -void TwistingSDS::coeffs_to_local() -{ - k = coeffs[0]; - damp = coeffs[1]; - mu = coeffs[2]; - - if (k < 0.0 || mu < 0.0 || damp < 0.0) - error->all(FLERR, "Illegal SDS twisting model"); -} - -/* ---------------------------------------------------------------------- */ - -void TwistingSDS::calculate_forces() -{ - double signtwist, Mtcrit; - - if (contact->history_update) { - contact->history[history_index] += contact->magtwist * contact->dt; - } - - // M_t torque (eq 30) - contact->magtortwist = -k * contact->history[history_index] - damp * contact->magtwist; - signtwist = (contact->magtwist > 0) - (contact->magtwist < 0); - Mtcrit = mu * contact->normal_model->Fncrit; // critical torque (eq 44) - - if (fabs(contact->magtortwist) > Mtcrit) { - contact->history[history_index] = (Mtcrit * signtwist - damp * contact->magtwist) / k; - contact->magtortwist = -Mtcrit * signtwist; // eq 34 - } -} diff --git a/src/contact_twisting_models.h b/src/contact_twisting_models.h deleted file mode 100644 index 1fa5aa2c6a..0000000000 --- a/src/contact_twisting_models.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifndef CONTACT_TWISTING_MODELS_H_ -#define CONTACT_TWISTING_MODELS_H_ - -#include "contact_sub_models.h" - -namespace LAMMPS_NS { -namespace Contact { - -class TwistingModel : public SubModel { - public: - TwistingModel(class LAMMPS *); - virtual ~TwistingModel() {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; - virtual void calculate_forces() = 0; -}; - -/* ---------------------------------------------------------------------- */ - -class TwistingNone : public TwistingModel { - public: - TwistingNone(class LAMMPS *); - void calculate_forces() {}; -}; - -/* ---------------------------------------------------------------------- */ - -class TwistingMarshall : public TwistingModel { - public: - TwistingMarshall(class LAMMPS *); - void calculate_forces(); - void init(); - protected: - double k_tang, mu_tang; -}; - -/* ---------------------------------------------------------------------- */ - -class TwistingSDS : public TwistingModel { - public: - TwistingSDS(class LAMMPS *); - void coeffs_to_local() override; - void calculate_forces(); - protected: - double k, mu, damp; -}; - -} // namespace Contact -} // namespace LAMMPS_NS - -#endif /*CONTACT_TWISTING_MODELS_H_ */ diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index cc4fdbe20b..f5b86b6069 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -41,7 +41,7 @@ enum{ID,MOL,PROC,PROCP1,TYPE,ELEMENT,MASS, XSU,YSU,ZSU,XSUTRI,YSUTRI,ZSUTRI, IX,IY,IZ, VX,VY,VZ,FX,FY,FZ, - Q,MUX,MUY,MUZ,MU,RADIUS,DIAMETER,heatflow,TEMPERATURE, + Q,MUX,MUY,MUZ,MU,RADIUS,DIAMETER,HEATFLOW,TEMPERATURE, OMEGAX,OMEGAY,OMEGAZ,ANGMOMX,ANGMOMY,ANGMOMZ, TQX,TQY,TQZ, COMPUTE,FIX,VARIABLE,IVEC,DVEC,IARRAY,DARRAY}; @@ -930,7 +930,7 @@ int DumpCustom::count() for (i = 0; i < nlocal; i++) dchoose[i] = 2.0*radius[i]; ptr = dchoose; nstride = 1; - } else if (thresh_array[ithresh] == heatflow) { + } else if (thresh_array[ithresh] == HEATFLOW) { if (!atom->heatflow_flag) error->all(FLERR, "Threshold for an atom property that isn't allocated"); @@ -1867,7 +1867,7 @@ int DumpCustom::modify_param(int narg, char **arg) else if (strcmp(arg[1],"radius") == 0) thresh_array[nthresh] = RADIUS; else if (strcmp(arg[1],"diameter") == 0) thresh_array[nthresh] = DIAMETER; - else if (strcmp(arg[1],"heatflow") == 0) thresh_array[nthresh] = heatflow; + else if (strcmp(arg[1],"heatflow") == 0) thresh_array[nthresh] = HEATFLOW; else if (strcmp(arg[1],"temperature") == 0) thresh_array[nthresh] = TEMPERATURE; else if (strcmp(arg[1],"omegax") == 0) thresh_array[nthresh] = OMEGAX; else if (strcmp(arg[1],"omegay") == 0) thresh_array[nthresh] = OMEGAY; From 5dcbbc084ba0c42f8ed2be3f0f07ac6b9f575cb6 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Tue, 1 Nov 2022 13:30:24 -0600 Subject: [PATCH 033/445] Adding developers documentation page --- doc/src/Howto_granular.rst | 11 +++ doc/src/Modify_gsm.rst | 183 +++++++++++++++++++++++++++++++++++++ 2 files changed, 194 insertions(+) create mode 100644 doc/src/Modify_gsm.rst diff --git a/doc/src/Howto_granular.rst b/doc/src/Howto_granular.rst index 9492e5755e..af52904204 100644 --- a/doc/src/Howto_granular.rst +++ b/doc/src/Howto_granular.rst @@ -43,6 +43,14 @@ The fix style *freeze* zeroes both the force and torque of frozen atoms, and should be used for granular system instead of the fix style *setforce*\ . +To model heat conduction, one must use the atom style: +* :doc:`atom_style sphere/temp ` +a temperature integration fix +* :doc:`fix temp/integrate ` +and a heat conduction option defined in both +* :doc:`pair_style granular ` +* :doc:`fix wall/gran ` + For computational efficiency, you can eliminate needless pairwise computations between frozen atoms by using this command: @@ -55,3 +63,6 @@ computations between frozen atoms by using this command: will be the same as in 3d. If you wish to model granular particles in 2d as 2d discs, see the note on this topic on the :doc:`Howto 2d ` doc page, where 2d simulations are discussed. + +To add custom granular contact models, see the +:doc:`modifying granular submodels page `. diff --git a/doc/src/Modify_gsm.rst b/doc/src/Modify_gsm.rst new file mode 100644 index 0000000000..06172b4dec --- /dev/null +++ b/doc/src/Modify_gsm.rst @@ -0,0 +1,183 @@ +Granular Submodel (GSM) styles +=========== + +In granular models, particles are spheres with a finite radius and rotational +degrees of freedom as further described in the +:doc:`Howto granular page `. Interactions between pair of +particles or particles and walls may therefore depend on many different modes +of motion as described in :doc:`pair granular ` and +:doc:`fix wall/gran `. In both cases, the exchange of forces, +torques, and heat flow between two types of bodies is defined using a +GranularModel class. The GranularModel class organizes the details of an +interaction using a series of granular submodels each of which describe a +particular interaction mode (e.g. normal forces or rolling friction). From a +parent GSM class, several types of submodel classes are derived: + +* GSMNormal: normal force submodel +* GSMDamping: normal damping submodel +* GSMTangential: tangential forces and sliding friction submodel +* GSMRolling: rolling friction submodel +* GSMTwisting: twisting friction submodel +* GSMHeat: heat conduction submodel + +For each type of submodel, more classes are further derived, each describing +a specific implementation. For instance, from the GSMNormal class the +GSMNormalHooke, GSMNormalHertz, and GSMNormalJKR classes are derived which +calculate Hookean, Hertzian, or JKR normal forces, respectively. This modular +structure simplifies the addition of new granualar contact models as as one only +needs to create a new GSM class without having to modify the more complex +PairGranular, FixGranWall, and GranularModel classes. Most GSM methods are also +already defined by the parent classes so new contact models typically only require +edits to a few relevant methods (e.g. methods that define coefficients and +calculate forces). + +Each GSM class has a pointer to both the LAMMPS class and the GranularModel +class which owns it, ``lmp`` and ``gm``, respectively. The GranularModel class +includes several public variables that describe the geometry/dynamics of the +contact such as + +.. list-table:: + + * - ``xi`` and ``xj`` + - Positions of the two contacting bodies + * - ``vi`` and ``vj`` + - Velocities of the two contacting bodies + * - ``omegai`` and ``omegaj`` + - Angular velocities of the two contacting bodies + * - ``dx`` and ``nx`` + - The displacement and normalized displacement vectors + * - ``r``, ``rsq``, and ``rinv`` + - The distance, distance squared, and inverse distance + * - ``radsum`` + - The sum of particle radii + * - ``vr``, ``vn``, and ``vt`` + - The relative velocity vector and its normal and tangential components + * - ``wr`` + - The relative rotational velocity + +These quantities, among others, are calculated in the ``GranularModel->check_contact()`` +and ``GranularModel->calculate_forces()`` methods which can be referred to for more +details. + +To create a new GSM class, it is recommended that one first looks at similar GSM +classes. All GSM classes share several general methods which may need to be defined + +.. list-table:: + + * - ``GSM->mix_coeff()`` + - Optional method to define how coefficients are mixed for different atom types. By default, coefficients are mixed using a geometric mean. + * - ``GSM->coeffs_to_local()`` + - Parses coefficients to define local variables, run once at model construction. + * - ``GSM->init()`` + - Optional method to define local variables after other GSM types were created. For instance, this method may be used by a tangential model that derives parameters from the normal stiffness. + +There are also several type-specific methods + +.. list-table:: + + * - ``GSMNormal->touch()`` + - Optional method to test when particles are in contact. By default, this is when particles overlap. + * - ``GSMNormal->pulloff_distance()`` + - Optional method to return the distance at which particles stop interacting. By default, this is when particles no longer overlap. + * - ``GSMNormal->calculate_area()`` + - Optional method to return the surface area of the contact. By default, this returns the geometric cross section. + * - ``GSMNormal->set_fncrit()`` + - Optional method that defines the critical force to break the contact used by some tangential, rolling, and twisting submodels. By default, this is the current total normal force, including damping. + * - ``GSMNormal->calculate_forces()`` + - Required method that returns the normal contact force + * - ``GSMDamping->calculate_forces()`` + - Required method that returns the normal damping force + * - ``GSMTangential->calculate_forces()`` + - Required method that calculates tangential forces/torques + * - ``GSMTwisting->calculate_forces()`` + - Required method that calculates twisting friction forces/torques + * - ``GSMRolling->calculate_forces()`` + - Required method that calculates rolling friction forces/torques + * - ``GSMHeat->calculate_heat()`` + - Required method that returns the rate of heat flow + +As an example, say one wanted to create a new normal force option that consisted +of a Hookean force with a piecewise stiffness. This could be done by adding a new +set of files ``gsm_custom.h``: + +.. code-block:: c++ + + #ifdef GSM_CLASS + // clang-format off + GSMStyle(hooke/piecewise, + GSMNormalHookePiecewise, + NORMAL); + // clang-format on + #else + + #ifndef GSM_CUSTOM_H_ + #define GSM_CUSTOM_H_ + + #include "gsm.h" + #include "gsm_normal.h" + + namespace LAMMPS_NS { + namespace Granular_NS { + + class GSMNormalHookePiecewise : public GSMNormal { + public: + GSMNormalHookePiecewise(class GranularModel *, class LAMMPS *); + void coeffs_to_local() override; + void set_knfac(); + double calculate_forces(); + protected: + double k1, k2, delta_switch; + }; + + } // namespace Granular_NS + } // namespace LAMMPS_NS + + #endif /*GSM_CUSTOM_H_ */ + #endif /*GSM_CLASS_H_ */ + + +and ``gsm_custom.cpp`` + +.. code-block:: c++ + + #include "gsm_custom.h" + #include "gsm_normal.h" + #include "granular_model.h" + + using namespace LAMMPS_NS; + using namespace Granular_NS; + + GSMNormalHookePiecewise::GSMNormalHookePiecewise(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) + { + num_coeffs = 4; + } + + /* ---------------------------------------------------------------------- */ + + void GSMNormalHookePiecewise::coeffs_to_local() + { + k1 = coeffs[0]; + k2 = coeffs[1]; + damp = coeffs[2]; + delta_switch = coeffs[3]; + } + + /* ---------------------------------------------------------------------- */ + + double GSMNormalHookePiecewise::calculate_forces() + { + if (gm->delta >= delta_switch { + Fne = k1 * delta_switch + k2 * (gm->delta - delta_switch); + } else { + Fne = k1 * gm->delta; + } + return Fne; + } + + /* ---------------------------------------------------------------------- */ + + void GSMNormalHookePiecewise::set_knfac() + { + if (gm->delta < delta_switch) knfac = k1; + else knfac = k2; + } From dca901617eb6c177ed3ec362e4d9ac9ba7d0c72a Mon Sep 17 00:00:00 2001 From: jtclemm Date: Tue, 1 Nov 2022 13:30:57 -0600 Subject: [PATCH 034/445] Removing knfac, removing unnecessary global variables, updating dev ref text --- src/GRANULAR/atom_vec_sphere_temp.cpp | 4 +-- src/GRANULAR/atom_vec_sphere_temp.h | 2 +- src/GRANULAR/fix_temp_integrate.cpp | 4 +-- src/GRANULAR/fix_temp_integrate.h | 2 +- src/GRANULAR/granular_model.cpp | 25 +++++++-------- src/GRANULAR/granular_model.h | 4 +-- src/GRANULAR/gsm.cpp | 8 ++--- src/GRANULAR/gsm.h | 4 +-- src/GRANULAR/gsm_damping.cpp | 5 +-- src/GRANULAR/gsm_damping.h | 6 ++-- src/GRANULAR/gsm_heat.cpp | 3 +- src/GRANULAR/gsm_heat.h | 2 +- src/GRANULAR/gsm_normal.cpp | 46 ++++++--------------------- src/GRANULAR/gsm_normal.h | 18 ++++------- src/GRANULAR/gsm_rolling.cpp | 3 +- src/GRANULAR/gsm_rolling.h | 2 +- src/GRANULAR/gsm_tangential.cpp | 4 +-- src/GRANULAR/gsm_tangential.h | 12 ++++--- src/GRANULAR/gsm_twisting.cpp | 3 +- src/GRANULAR/gsm_twisting.h | 2 +- 20 files changed, 66 insertions(+), 93 deletions(-) diff --git a/src/GRANULAR/atom_vec_sphere_temp.cpp b/src/GRANULAR/atom_vec_sphere_temp.cpp index bc3dcb7a2d..283a55e2da 100644 --- a/src/GRANULAR/atom_vec_sphere_temp.cpp +++ b/src/GRANULAR/atom_vec_sphere_temp.cpp @@ -1,7 +1,7 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains diff --git a/src/GRANULAR/atom_vec_sphere_temp.h b/src/GRANULAR/atom_vec_sphere_temp.h index c93b0ee4dd..de6d5266a5 100644 --- a/src/GRANULAR/atom_vec_sphere_temp.h +++ b/src/GRANULAR/atom_vec_sphere_temp.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains diff --git a/src/GRANULAR/fix_temp_integrate.cpp b/src/GRANULAR/fix_temp_integrate.cpp index e5fbae63dc..ab9739e874 100644 --- a/src/GRANULAR/fix_temp_integrate.cpp +++ b/src/GRANULAR/fix_temp_integrate.cpp @@ -1,8 +1,8 @@ // clang-format off -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains diff --git a/src/GRANULAR/fix_temp_integrate.h b/src/GRANULAR/fix_temp_integrate.h index 738cb28a6f..8356d00433 100644 --- a/src/GRANULAR/fix_temp_integrate.h +++ b/src/GRANULAR/fix_temp_integrate.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp index a7aaa1ed83..3f500d0431 100644 --- a/src/GRANULAR/granular_model.cpp +++ b/src/GRANULAR/granular_model.cpp @@ -1,8 +1,8 @@ // clang-format off -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -23,16 +23,11 @@ #include "granular_model.h" #include "gsm.h" -#include "gsm_normal.h" -#include "gsm_tangential.h" -#include "gsm_damping.h" -#include "gsm_rolling.h" -#include "gsm_twisting.h" -#include "gsm_heat.h" #include "comm.h" #include "error.h" #include "force.h" #include "math_extra.h" +#include "style_gsm.h" // IWYU pragma: keep #include @@ -253,10 +248,13 @@ void GranularModel::init() if (sub_models[i]->beyond_contact) beyond_contact = 1; size_history += sub_models[i]->size_history; - if (limit_damping && (!sub_models[i]->allow_limit_damping)) - error->all(FLERR,"Cannot limit damping with {} model", sub_models[i]->name); + if (!sub_models[i]->allow_cohesion && normal_model->cohesive_flag) + error->all(FLERR,"Cannot use {} model with a cohesive normal model, {}", sub_models[i]->name, normal_model->name); } + if (limit_damping && (normal_model->cohesive_flag)) + error->all(FLERR,"Cannot limit damping with a cohesive normal model, {}", normal_model->name); + if (nondefault_history_transfer) { transfer_history_factor = new double[size_history]; @@ -430,13 +428,12 @@ void GranularModel::calculate_forces() // calculate forces/torques forces[0] = 0.0; - double Fne, Fdamp, dist_to_contact; + double Fdamp, dist_to_contact; area = normal_model->calculate_area(); - normal_model->set_knfac(); - Fne = normal_model->calculate_forces(); + Fnormal = normal_model->calculate_forces(); Fdamp = damping_model->calculate_forces(); - Fntot = Fne + Fdamp; + Fntot = Fnormal + Fdamp; if (limit_damping && Fntot < 0.0) Fntot = 0.0; normal_model->set_fncrit(); // Needed for tangential, rolling, twisting diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h index afc8f61ddc..b45c916580 100644 --- a/src/GRANULAR/granular_model.h +++ b/src/GRANULAR/granular_model.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -82,7 +82,7 @@ class GranularModel : protected Pointers { double *history; // Contact properties/output - double forces[3], torquesi[3], torquesj[3], dq; + double Fnormal, forces[3], torquesi[3], torquesj[3], dq; double radi, radj, meff, dt, Ti, Tj, area; double Fntot, magtortwist; diff --git a/src/GRANULAR/gsm.cpp b/src/GRANULAR/gsm.cpp index 6430fb7403..fb0ae48615 100644 --- a/src/GRANULAR/gsm.cpp +++ b/src/GRANULAR/gsm.cpp @@ -1,8 +1,8 @@ // clang-format off -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -10,7 +10,7 @@ the GNU General Public License. See the README file in the top-level LAMMPS directory. --------------------------------------------------------------------------*/ +------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- This class contains a framework for granular submodels (GSM) including: @@ -39,7 +39,7 @@ GSM::GSM(class GranularModel *gm, LAMMPS *lmp) : Pointers(lmp) allocated = 0; size_history = 0; history_index = 0; - allow_limit_damping = 1; + allow_cohesion = 1; beyond_contact = 0; num_coeffs = 0; diff --git a/src/GRANULAR/gsm.h b/src/GRANULAR/gsm.h index b2df6bef2b..4695749d64 100644 --- a/src/GRANULAR/gsm.h +++ b/src/GRANULAR/gsm.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -41,7 +41,7 @@ class GSM : protected Pointers { int history_index; int beyond_contact; - int allow_limit_damping; + int allow_cohesion; GranularModel *gm; diff --git a/src/GRANULAR/gsm_damping.cpp b/src/GRANULAR/gsm_damping.cpp index 9b51651f30..0280f61771 100644 --- a/src/GRANULAR/gsm_damping.cpp +++ b/src/GRANULAR/gsm_damping.cpp @@ -1,7 +1,8 @@ +// clang-format off /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -108,6 +109,6 @@ void GSMDampingTsuji::init() double GSMDampingTsuji::calculate_forces() { - damp_prefactor = damp * sqrt(gm->meff * gm->normal_model->knfac); + damp_prefactor = damp * sqrt(gm->meff * gm->Fnormal / gm->delta); return -damp_prefactor * gm->vnnr; } diff --git a/src/GRANULAR/gsm_damping.h b/src/GRANULAR/gsm_damping.h index 1904314cdc..75c0f96356 100644 --- a/src/GRANULAR/gsm_damping.h +++ b/src/GRANULAR/gsm_damping.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -52,7 +52,9 @@ class GSMDamping : public GSM { virtual void mix_coeffs(double*, double*) {}; virtual void init(); virtual double calculate_forces() = 0; - double damp, damp_prefactor; + double damp_prefactor; // Used by tangential models + protected: + double damp; }; /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/gsm_heat.cpp b/src/GRANULAR/gsm_heat.cpp index 449df5520b..7512e372a0 100644 --- a/src/GRANULAR/gsm_heat.cpp +++ b/src/GRANULAR/gsm_heat.cpp @@ -1,7 +1,8 @@ +// clang-format off /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains diff --git a/src/GRANULAR/gsm_heat.h b/src/GRANULAR/gsm_heat.h index 4b27979273..c913593f19 100644 --- a/src/GRANULAR/gsm_heat.h +++ b/src/GRANULAR/gsm_heat.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains diff --git a/src/GRANULAR/gsm_normal.cpp b/src/GRANULAR/gsm_normal.cpp index 2b029ece6a..0ae288f6fd 100644 --- a/src/GRANULAR/gsm_normal.cpp +++ b/src/GRANULAR/gsm_normal.cpp @@ -1,7 +1,8 @@ +// clang-format off /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -35,6 +36,7 @@ using namespace MathConst; GSMNormal::GSMNormal(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) { material_properties = 0; + cohesive_flag = 0; } /* ---------------------------------------------------------------------- */ @@ -103,15 +105,7 @@ void GSMNormalHooke::coeffs_to_local() double GSMNormalHooke::calculate_forces() { - Fne = knfac * gm->delta; - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -void GSMNormalHooke::set_knfac() -{ - knfac = k; + return k * gm->delta; } /* ---------------------------------------------------------------------- @@ -137,15 +131,7 @@ void GSMNormalHertz::coeffs_to_local() double GSMNormalHertz::calculate_forces() { - Fne = knfac * gm->delta; - return Fne; -} - -/* ---------------------------------------------------------------------- */ - -void GSMNormalHertz::set_knfac() -{ - knfac = k * gm->area; + return k * gm->area * gm->delta; } /* ---------------------------------------------------------------------- @@ -190,8 +176,8 @@ void GSMNormalHertzMaterial::mix_coeffs(double* icoeffs, double* jcoeffs) GSMNormalDMT::GSMNormalDMT(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) { - allow_limit_damping = 0; material_properties = 1; + cohesive_flag = 1; num_coeffs = 4; } @@ -227,7 +213,7 @@ void GSMNormalDMT::mix_coeffs(double* icoeffs, double* jcoeffs) double GSMNormalDMT::calculate_forces() { - Fne = knfac * gm->delta; + Fne = k * gm->area * gm->delta; F_pulloff = 4.0 * MathConst::MY_PI * cohesion * gm->Reff; Fne -= F_pulloff; return Fne; @@ -235,13 +221,6 @@ double GSMNormalDMT::calculate_forces() /* ---------------------------------------------------------------------- */ -void GSMNormalDMT::set_knfac() -{ - knfac = k * gm->area; -} - -/* ---------------------------------------------------------------------- */ - void GSMNormalDMT::set_fncrit() { Fncrit = fabs(Fne + 2.0 * F_pulloff); @@ -253,8 +232,8 @@ void GSMNormalDMT::set_fncrit() GSMNormalJKR::GSMNormalJKR(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) { - allow_limit_damping = 0; material_properties = 1; + cohesive_flag = 1; beyond_contact = 1; num_coeffs = 4; } @@ -356,7 +335,7 @@ double GSMNormalJKR::calculate_forces() { double a2; a2 = gm->area * gm->area; - Fne = knfac * a2 / gm->Reff - MY_2PI * a2 * sqrt(4.0 * cohesion * Emix / (MY_PI * gm->area)); + Fne = k * gm->area * a2 / gm->Reff - MY_2PI * a2 * sqrt(4.0 * cohesion * Emix / (MY_PI * gm->area)); F_pulloff = 3.0 * MY_PI * cohesion * gm->Reff; return Fne; @@ -364,13 +343,6 @@ double GSMNormalJKR::calculate_forces() /* ---------------------------------------------------------------------- */ -void GSMNormalJKR::set_knfac() -{ - knfac = k * gm->area; -} - -/* ---------------------------------------------------------------------- */ - void GSMNormalJKR::set_fncrit() { Fncrit = fabs(Fne + 2.0 * F_pulloff); diff --git a/src/GRANULAR/gsm_normal.h b/src/GRANULAR/gsm_normal.h index 0c7ba30e41..2d7391f3c8 100644 --- a/src/GRANULAR/gsm_normal.h +++ b/src/GRANULAR/gsm_normal.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -56,13 +56,12 @@ class GSMNormal : public GSM { virtual bool touch(); virtual double pulloff_distance(double, double); virtual double calculate_area(); - virtual void set_knfac() = 0; virtual double calculate_forces() = 0; virtual void set_fncrit(); - double damp; // Vestigial argument needed by damping + double damp; // argument historically needed by damping double Emod, poiss; - double Fncrit, Fne, knfac; - int material_properties; + double Fncrit, knfac; + int material_properties, cohesive_flag; }; /* ---------------------------------------------------------------------- */ @@ -70,7 +69,6 @@ class GSMNormal : public GSM { class GSMNormalNone : public GSMNormal { public: GSMNormalNone(class GranularModel *, class LAMMPS *); - void set_knfac() {}; double calculate_forces(); }; @@ -80,7 +78,6 @@ class GSMNormalHooke : public GSMNormal { public: GSMNormalHooke(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; - void set_knfac(); double calculate_forces(); protected: double k; @@ -92,7 +89,6 @@ class GSMNormalHertz : public GSMNormal { public: GSMNormalHertz(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; - void set_knfac(); double calculate_forces(); protected: double k; @@ -114,12 +110,11 @@ class GSMNormalDMT : public GSMNormal { GSMNormalDMT(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void mix_coeffs(double*, double*) override; - void set_knfac(); double calculate_forces(); void set_fncrit() override; protected: double k, cohesion; - double F_pulloff; + double F_pulloff, Fne; }; /* ---------------------------------------------------------------------- */ @@ -132,12 +127,11 @@ class GSMNormalJKR : public GSMNormal { bool touch() override; double pulloff_distance(double, double) override; double calculate_area() override; - void set_knfac(); double calculate_forces(); void set_fncrit() override; protected: double k, cohesion; - double Emix, F_pulloff; + double Emix, F_pulloff, Fne; }; } // namespace Granular_NS diff --git a/src/GRANULAR/gsm_rolling.cpp b/src/GRANULAR/gsm_rolling.cpp index efb0ea423b..ceda262853 100644 --- a/src/GRANULAR/gsm_rolling.cpp +++ b/src/GRANULAR/gsm_rolling.cpp @@ -1,7 +1,8 @@ +// clang-format off /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains diff --git a/src/GRANULAR/gsm_rolling.h b/src/GRANULAR/gsm_rolling.h index 21e61ac4bc..054b22954f 100644 --- a/src/GRANULAR/gsm_rolling.h +++ b/src/GRANULAR/gsm_rolling.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains diff --git a/src/GRANULAR/gsm_tangential.cpp b/src/GRANULAR/gsm_tangential.cpp index b3e6266049..b2e7ca8762 100644 --- a/src/GRANULAR/gsm_tangential.cpp +++ b/src/GRANULAR/gsm_tangential.cpp @@ -1,7 +1,8 @@ +// clang-format off /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -136,7 +137,6 @@ void GSMTangentialLinearHistory::calculate_forces() add3(history, temp_array, history); } - // tangential forces = history + tangential velocity damping scale3(-k, history, gm->fs); scale3(damp, gm->vtr, temp_array); diff --git a/src/GRANULAR/gsm_tangential.h b/src/GRANULAR/gsm_tangential.h index a420c7d314..1d6dfa3d04 100644 --- a/src/GRANULAR/gsm_tangential.h +++ b/src/GRANULAR/gsm_tangential.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -66,10 +66,7 @@ class GSMTangential : public GSM { virtual void coeffs_to_local() {}; virtual void init() {}; virtual void calculate_forces() = 0; - int rescale_flag; double k, damp, mu; // Used by Marshall twisting model - protected: - double xt; }; /* ---------------------------------------------------------------------- */ @@ -87,6 +84,8 @@ class GSMTangentialLinearNoHistory : public GSMTangential { GSMTangentialLinearNoHistory(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void calculate_forces(); + protected: + double xt; }; /* ---------------------------------------------------------------------- */ @@ -96,6 +95,8 @@ class GSMTangentialLinearHistory : public GSMTangential { GSMTangentialLinearHistory(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void calculate_forces(); + protected: + double xt; }; /* ---------------------------------------------------------------------- */ @@ -104,7 +105,9 @@ class GSMTangentialLinearHistoryClassic : public GSMTangentialLinearHistory { public: GSMTangentialLinearHistoryClassic(class GranularModel *, class LAMMPS *); void calculate_forces(); + protected: int scale_area; + double xt; }; /* ---------------------------------------------------------------------- */ @@ -124,6 +127,7 @@ class GSMTangentialMindlin : public GSMTangential { void calculate_forces(); protected: int mindlin_rescale, mindlin_force; + double xt; }; /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/gsm_twisting.cpp b/src/GRANULAR/gsm_twisting.cpp index 3704ac4ec8..73149b099b 100644 --- a/src/GRANULAR/gsm_twisting.cpp +++ b/src/GRANULAR/gsm_twisting.cpp @@ -1,7 +1,8 @@ +// clang-format off /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains diff --git a/src/GRANULAR/gsm_twisting.h b/src/GRANULAR/gsm_twisting.h index 84759acce7..b9ab7826a6 100644 --- a/src/GRANULAR/gsm_twisting.h +++ b/src/GRANULAR/gsm_twisting.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains From c8347df494efde32a2556d8b671eabfb568092ae Mon Sep 17 00:00:00 2001 From: jtclemm Date: Tue, 1 Nov 2022 13:34:07 -0600 Subject: [PATCH 035/445] Removing knfac from documentation --- doc/src/Modify_gsm.rst | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/doc/src/Modify_gsm.rst b/doc/src/Modify_gsm.rst index 06172b4dec..56b38fd573 100644 --- a/doc/src/Modify_gsm.rst +++ b/doc/src/Modify_gsm.rst @@ -82,7 +82,7 @@ There are also several type-specific methods * - ``GSMNormal->calculate_area()`` - Optional method to return the surface area of the contact. By default, this returns the geometric cross section. * - ``GSMNormal->set_fncrit()`` - - Optional method that defines the critical force to break the contact used by some tangential, rolling, and twisting submodels. By default, this is the current total normal force, including damping. + - Optional method that defines the critical force to break the contact used by some tangential, rolling, and twisting submodels. By default, this is the current total normal force including damping. * - ``GSMNormal->calculate_forces()`` - Required method that returns the normal contact force * - ``GSMDamping->calculate_forces()`` @@ -123,7 +123,6 @@ set of files ``gsm_custom.h``: public: GSMNormalHookePiecewise(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; - void set_knfac(); double calculate_forces(); protected: double k1, k2, delta_switch; @@ -166,6 +165,7 @@ and ``gsm_custom.cpp`` double GSMNormalHookePiecewise::calculate_forces() { + double Fne; if (gm->delta >= delta_switch { Fne = k1 * delta_switch + k2 * (gm->delta - delta_switch); } else { @@ -174,10 +174,3 @@ and ``gsm_custom.cpp`` return Fne; } - /* ---------------------------------------------------------------------- */ - - void GSMNormalHookePiecewise::set_knfac() - { - if (gm->delta < delta_switch) knfac = k1; - else knfac = k2; - } From 88be5a37812186ce989f2ca55cc5ad2cceeed3bd Mon Sep 17 00:00:00 2001 From: jtclemm Date: Tue, 1 Nov 2022 14:01:07 -0600 Subject: [PATCH 036/445] Minor fixes to doc pages --- doc/src/Modify_gsm.rst | 6 +++--- doc/src/dump.rst | 2 +- doc/src/pair_granular.rst | 13 ++++++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/doc/src/Modify_gsm.rst b/doc/src/Modify_gsm.rst index 56b38fd573..f549a9bb45 100644 --- a/doc/src/Modify_gsm.rst +++ b/doc/src/Modify_gsm.rst @@ -67,9 +67,9 @@ classes. All GSM classes share several general methods which may need to be defi * - ``GSM->mix_coeff()`` - Optional method to define how coefficients are mixed for different atom types. By default, coefficients are mixed using a geometric mean. * - ``GSM->coeffs_to_local()`` - - Parses coefficients to define local variables, run once at model construction. + - Parses coefficients to define local variables. Run once at model construction. * - ``GSM->init()`` - - Optional method to define local variables after other GSM types were created. For instance, this method may be used by a tangential model that derives parameters from the normal stiffness. + - Optional method to define local variables after other GSM types were created. For instance, this method may be used by a tangential model that derives parameters from the normal model. There are also several type-specific methods @@ -166,7 +166,7 @@ and ``gsm_custom.cpp`` double GSMNormalHookePiecewise::calculate_forces() { double Fne; - if (gm->delta >= delta_switch { + if (gm->delta >= delta_switch) { Fne = k1 * delta_switch + k2 * (gm->delta - delta_switch); } else { Fne = k1 * gm->delta; diff --git a/doc/src/dump.rst b/doc/src/dump.rst index c324c945ee..f5a121517a 100644 --- a/doc/src/dump.rst +++ b/doc/src/dump.rst @@ -108,7 +108,7 @@ Syntax omegax,omegay,omegaz = angular velocity of spherical particle angmomx,angmomy,angmomz = angular momentum of aspherical particle tqx,tqy,tqz = torque on finite-size particles - heatflow = flow of heat into particle + heatflow = rate of heat flow into particle temperature = temperature of particle c_ID = per-atom vector calculated by a compute with ID c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below) diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index bc365814cd..8109e6709a 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -226,16 +226,19 @@ for all models except *jkr*, for which it is given implicitly according to :math:`\delta = a^2/R - 2\sqrt{\pi \gamma a/E}`. For *damping viscoelastic*, :math:`\eta_{n0}` is in units of 1/(\ *time*\ \*\ *distance*\ ). -The *tsuji* model is based on the work of :ref:`(Tsuji et al) `. Here, the damping coefficient specified as part of -the normal model is interpreted as a restitution coefficient -:math:`e`. The damping constant :math:`\eta_n` is given by: +The *tsuji* model is based on the work of :ref:`(Tsuji et al) `. +Here, the damping coefficient specified as part of the normal model is interpreted +as a restitution coefficient :math:`e`. The damping constant :math:`\eta_n` is +given by: .. math:: \eta_n = \alpha (m_{eff}k_n)^{1/2} -For normal contact models based on material parameters, :math:`k_n = 4/3Ea`. The parameter :math:`\alpha` is related to the restitution -coefficient *e* according to: +For normal contact models based on material parameters, :math:`k_n = 4/3Ea`. This +damping model is not compatible with cohesive normal models such as *JKR* or *DMT*. +The parameter :math:`\alpha` is related to the restitution coefficient *e* +according to: .. math:: From 95a8d2cc25d7686e8d5f0319523ca0fba1fa743f Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 2 Nov 2022 15:38:12 -0600 Subject: [PATCH 037/445] Patching pair tracker --- src/MISC/pair_tracker.cpp | 2 +- src/MISC/pair_tracker.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MISC/pair_tracker.cpp b/src/MISC/pair_tracker.cpp index c994b02df5..adbd832eae 100644 --- a/src/MISC/pair_tracker.cpp +++ b/src/MISC/pair_tracker.cpp @@ -514,7 +514,7 @@ double PairTracker::single(int /*i*/, int /*j*/, int /*itype*/, int /*jtype*/, d only needed if any history entries i-j are not just negative of j-i entries ------------------------------------------------------------------------- */ -void PairTracker::transfer_history(double *source, double *target) +void PairTracker::transfer_history(double *source, double *target, int itype, int jtype) { for (int i = 0; i < size_history; i++) target[i] = source[i]; } diff --git a/src/MISC/pair_tracker.h b/src/MISC/pair_tracker.h index 47128b8073..e072f51f21 100644 --- a/src/MISC/pair_tracker.h +++ b/src/MISC/pair_tracker.h @@ -40,7 +40,7 @@ class PairTracker : public Pair { double single(int, int, int, int, double, double, double, double &) override; double atom2cut(int) override; double radii2cut(double, double) override; - void transfer_history(double *, double *) override; + void transfer_history(double *, double *, int, int) override; protected: int sizeflag; From 74122040a392de78a4b04ca2cf2142c79fe32892 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 2 Nov 2022 20:20:06 -0400 Subject: [PATCH 038/445] add cmake support for generating gsm style header file --- cmake/Modules/StyleHeaderUtils.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/Modules/StyleHeaderUtils.cmake b/cmake/Modules/StyleHeaderUtils.cmake index 7590d822eb..2bc84252d3 100644 --- a/cmake/Modules/StyleHeaderUtils.cmake +++ b/cmake/Modules/StyleHeaderUtils.cmake @@ -104,6 +104,7 @@ function(RegisterStyles search_path) FindStyleHeaders(${search_path} DIHEDRAL_CLASS dihedral_ DIHEDRAL ) # dihedral ) # force FindStyleHeaders(${search_path} DUMP_CLASS dump_ DUMP ) # dump ) # output write_dump FindStyleHeaders(${search_path} FIX_CLASS fix_ FIX ) # fix ) # modify + FindStyleHeaders(${search_path} GSM_CLASS gsm_ GSM ) # gsm ) # granular_model FindStyleHeaders(${search_path} IMPROPER_CLASS improper_ IMPROPER ) # improper ) # force FindStyleHeaders(${search_path} INTEGRATE_CLASS "[^.]" INTEGRATE ) # integrate ) # update FindStyleHeaders(${search_path} KSPACE_CLASS "[^.]" KSPACE ) # kspace ) # force @@ -127,6 +128,7 @@ function(RegisterStylesExt search_path extension sources) FindStyleHeadersExt(${search_path} DIHEDRAL_CLASS ${extension} DIHEDRAL ${sources}) FindStyleHeadersExt(${search_path} DUMP_CLASS ${extension} DUMP ${sources}) FindStyleHeadersExt(${search_path} FIX_CLASS ${extension} FIX ${sources}) + FindStyleHeadersExt(${search_path} GSM_CLASS ${extension} GSM ${sources}) FindStyleHeadersExt(${search_path} IMPROPER_CLASS ${extension} IMPROPER ${sources}) FindStyleHeadersExt(${search_path} INTEGRATE_CLASS ${extension} INTEGRATE ${sources}) FindStyleHeadersExt(${search_path} KSPACE_CLASS ${extension} KSPACE ${sources}) @@ -151,6 +153,7 @@ function(GenerateStyleHeaders output_path) GenerateStyleHeader(${output_path} DIHEDRAL dihedral ) # force GenerateStyleHeader(${output_path} DUMP dump ) # output write_dump GenerateStyleHeader(${output_path} FIX fix ) # modify + GenerateStyleHeader(${output_path} GSM gsm ) # granular_model GenerateStyleHeader(${output_path} IMPROPER improper ) # force GenerateStyleHeader(${output_path} INTEGRATE integrate ) # update GenerateStyleHeader(${output_path} KSPACE kspace ) # force From 3561bbe88724834718be98b11eef2dfc6f07fb03 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 2 Nov 2022 20:20:56 -0400 Subject: [PATCH 039/445] simplify --- src/GRANULAR/granular_model.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h index b45c916580..d3ce11b799 100644 --- a/src/GRANULAR/granular_model.h +++ b/src/GRANULAR/granular_model.h @@ -20,15 +20,15 @@ namespace LAMMPS_NS { namespace Granular_NS { #define EPSILON 1e-10 -#define NSUBMODELS 6 enum SubmodelType { NORMAL = 0, - DAMPING = 1, - TANGENTIAL = 2, - ROLLING = 3, - TWISTING = 4, - HEAT = 5 + DAMPING, + TANGENTIAL, + ROLLING, + TWISTING, + HEAT, + NSUBMODELS }; // Relative order matters since some derive coeffs from others enum ContactType { @@ -37,7 +37,7 @@ enum ContactType { WALLREGION = 2 }; -// forward declaration +// forward declarations class GSM; class GSMNormal; class GSMDamping; From b5d57531d930b328cca9e0a94b5bdae513c37fbd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 2 Nov 2022 20:38:43 -0400 Subject: [PATCH 040/445] complete integration into the manual build process --- doc/src/Commands_fix.rst | 1 + doc/src/Modify.rst | 1 + doc/src/fix.rst | 1 + 3 files changed, 3 insertions(+) diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index c5c2fb7cba..ec8174a370 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -235,6 +235,7 @@ OPT. * :doc:`temp/berendsen ` * :doc:`temp/csld ` * :doc:`temp/csvr ` + * :doc:`temp/integrate ` * :doc:`temp/rescale ` * :doc:`temp/rescale/eff ` * :doc:`tfmc ` diff --git a/doc/src/Modify.rst b/doc/src/Modify.rst index e42da61387..39a1faeb87 100644 --- a/doc/src/Modify.rst +++ b/doc/src/Modify.rst @@ -34,5 +34,6 @@ style requirements and recommendations `. Modify_min Modify_region Modify_body + Modify_gsm Modify_thermo Modify_variable diff --git a/doc/src/fix.rst b/doc/src/fix.rst index 333e920bd9..461cfc1465 100644 --- a/doc/src/fix.rst +++ b/doc/src/fix.rst @@ -382,6 +382,7 @@ accelerated styles exist. * :doc:`temp/berendsen ` - temperature control by Berendsen thermostat * :doc:`temp/csld ` - canonical sampling thermostat with Langevin dynamics * :doc:`temp/csvr ` - canonical sampling thermostat with Hamiltonian dynamics +* :doc:`temp/integrate ` - plain time integration with per-atom temperature updates * :doc:`temp/rescale ` - temperature control by velocity rescaling * :doc:`temp/rescale/eff ` - temperature control by velocity rescaling in the electron force field model * :doc:`tfmc ` - perform force-bias Monte Carlo with time-stamped method From 871efda589c4c7119a1f1738e53a02e217439ffa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 2 Nov 2022 20:39:10 -0400 Subject: [PATCH 041/445] a few formal changes and spelling updates --- doc/src/Modify_gsm.rst | 26 ++++++++-------- doc/src/fix_temp_integrate.rst | 6 ---- doc/src/pair_granular.rst | 33 +++++++++++---------- doc/utils/sphinx-config/false_positives.txt | 1 + 4 files changed, 32 insertions(+), 34 deletions(-) diff --git a/doc/src/Modify_gsm.rst b/doc/src/Modify_gsm.rst index f549a9bb45..515c776c6c 100644 --- a/doc/src/Modify_gsm.rst +++ b/doc/src/Modify_gsm.rst @@ -1,5 +1,5 @@ -Granular Submodel (GSM) styles -=========== +Granular Sub-model (GSM) styles +=============================== In granular models, particles are spheres with a finite radius and rotational degrees of freedom as further described in the @@ -9,22 +9,22 @@ of motion as described in :doc:`pair granular ` and :doc:`fix wall/gran `. In both cases, the exchange of forces, torques, and heat flow between two types of bodies is defined using a GranularModel class. The GranularModel class organizes the details of an -interaction using a series of granular submodels each of which describe a +interaction using a series of granular sub-models each of which describe a particular interaction mode (e.g. normal forces or rolling friction). From a -parent GSM class, several types of submodel classes are derived: +parent GSM class, several types of sub-model classes are derived: -* GSMNormal: normal force submodel -* GSMDamping: normal damping submodel -* GSMTangential: tangential forces and sliding friction submodel -* GSMRolling: rolling friction submodel -* GSMTwisting: twisting friction submodel -* GSMHeat: heat conduction submodel +* GSMNormal: normal force sub-model +* GSMDamping: normal damping sub-model +* GSMTangential: tangential forces and sliding friction sub-model +* GSMRolling: rolling friction sub-model +* GSMTwisting: twisting friction sub-model +* GSMHeat: heat conduction sub-model -For each type of submodel, more classes are further derived, each describing +For each type of sub-model, more classes are further derived, each describing a specific implementation. For instance, from the GSMNormal class the GSMNormalHooke, GSMNormalHertz, and GSMNormalJKR classes are derived which calculate Hookean, Hertzian, or JKR normal forces, respectively. This modular -structure simplifies the addition of new granualar contact models as as one only +structure simplifies the addition of new granular contact models as as one only needs to create a new GSM class without having to modify the more complex PairGranular, FixGranWall, and GranularModel classes. Most GSM methods are also already defined by the parent classes so new contact models typically only require @@ -82,7 +82,7 @@ There are also several type-specific methods * - ``GSMNormal->calculate_area()`` - Optional method to return the surface area of the contact. By default, this returns the geometric cross section. * - ``GSMNormal->set_fncrit()`` - - Optional method that defines the critical force to break the contact used by some tangential, rolling, and twisting submodels. By default, this is the current total normal force including damping. + - Optional method that defines the critical force to break the contact used by some tangential, rolling, and twisting sub-models. By default, this is the current total normal force including damping. * - ``GSMNormal->calculate_forces()`` - Required method that returns the normal contact force * - ``GSMDamping->calculate_forces()`` diff --git a/doc/src/fix_temp_integrate.rst b/doc/src/fix_temp_integrate.rst index 03fae7a872..efcf450d8f 100644 --- a/doc/src/fix_temp_integrate.rst +++ b/doc/src/fix_temp_integrate.rst @@ -41,12 +41,6 @@ the *constant* or *type* keywords. For style *constant*, the specific heat is a constant value *cp* for all atoms. For style *type*, *N* different values of the specific heat are defined, one for each of the *N* types of atoms. - - ----------- - -.. include:: accel_styles.rst - ---------- Restart, fix_modify, output, run start/stop, minimize info diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index a6533957df..cb044252da 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -766,26 +766,29 @@ These extra quantities can be accessed by the :doc:`compute pair/local ` page for more info. +This pair style is part of the GRANULAR package. It is +only enabled if LAMMPS was built with that package. +See the :doc:`Build package ` page for more info. -These pair styles require that atoms store torque and angular velocity -(omega) as defined by the :doc:`atom_style `. They also -require a per-particle radius is stored. The *sphere* atom style does -all of this. +This pair style requires that atoms store per-particle radius, +torque, and angular velocity (omega) as defined by the +:doc:`atom_style sphere `. -This pair style requires you to use the :doc:`comm_modify vel yes ` command so that velocities are stored by ghost -atoms. +This pair style requires you to use the :doc:`comm_modify vel yes ` +command so that velocities are stored by ghost atoms. -These pair styles will not restart exactly when using the -:doc:`read_restart ` command, though they should provide -statistically similar results. This is because the forces they -compute depend on atom velocities. See the -:doc:`read_restart ` command for more details. +This pair style will not restart exactly when using the +:doc:`read_restart ` command, though it should provide +statistically similar results. This is because the forces it +computes depend on atom velocities and the atom velocities have +been propagated half a timestep between the force computation and +when the restart is written, due to using Velocity Verlet time +integration. See the :doc:`read_restart ` command +for more details. -Accumulated values for individual contacts are saved to to restart +Accumulated values for individual contacts are saved to restart files but are not saved to data files. Therefore, forces may -differ significantly when a system is reloaded using A +differ significantly when a system is reloaded using the :doc:`read_data ` command. Related commands diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 61c1d45ba7..5aeb259ee6 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -1336,6 +1336,7 @@ hdnnp HDNNP Hearn heatconduction +heatflow Hebbeker Hebenstreit Hecht From bc74fef3f4f51f9691b1135e9420d638c1363cd2 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 2 Nov 2022 21:11:30 -0600 Subject: [PATCH 042/445] Fixing memory leaks, misc clean ups, adding cohesive flag to Tsuji --- src/GRANULAR/granular_model.cpp | 25 ++++++++++++------------- src/GRANULAR/granular_model.h | 2 +- src/GRANULAR/gsm.cpp | 1 + src/GRANULAR/gsm_damping.cpp | 5 ++++- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp index 3f500d0431..10113cdf78 100644 --- a/src/GRANULAR/granular_model.cpp +++ b/src/GRANULAR/granular_model.cpp @@ -95,13 +95,11 @@ GranularModel::GranularModel(LAMMPS *lmp) : Pointers(lmp) GranularModel::~GranularModel() { delete [] transfer_history_factor; + delete [] gsmclass; + delete [] gsmnames; + delete [] gsmtypes; - delete normal_model; - delete damping_model; - delete tangential_model; - delete rolling_model; - delete twisting_model; - delete heat_model; + for (int i = 0; i < NSUBMODELS; i ++) delete sub_models[i]; } /* ---------------------------------------------------------------------- */ @@ -119,7 +117,7 @@ int GranularModel::add_submodel(char **arg, int iarg, int narg, SubmodelType mod error->all(FLERR, "Insufficient arguments provided for {} model", model_name); for (int i = 0; i < num_coeffs; i++) { - // A few parameters (eg.g kt for tangential mindlin) allow null + // A few parameters (e.g. kt for tangential mindlin) allow null if (strcmp(arg[iarg + i], "NULL") == 0) sub_models[model_type]->coeffs[i] = -1; else sub_models[model_type]->coeffs[i] = utils::numeric(FLERR,arg[iarg + i],false,lmp); } @@ -138,6 +136,7 @@ void GranularModel::construct_submodel(std::string model_name, SubmodelType mode if (gsmtypes[i] == model_type) { if (strcmp(gsmnames[i], model_name.c_str()) == 0) { GSMCreator &gsm_creator = gsmclass[i]; + delete sub_models[model_type]; sub_models[model_type] = gsm_creator(this, lmp); break; } @@ -145,7 +144,7 @@ void GranularModel::construct_submodel(std::string model_name, SubmodelType mode } if (i == nclass) - error->all(FLERR, "Illegal model type {}", model_type); + error->all(FLERR, "Illegal model type {}", model_name); sub_models[model_type]->name.assign(model_name); sub_models[model_type]->allocate_coeffs(); @@ -252,7 +251,7 @@ void GranularModel::init() error->all(FLERR,"Cannot use {} model with a cohesive normal model, {}", sub_models[i]->name, normal_model->name); } - if (limit_damping && (normal_model->cohesive_flag)) + if (limit_damping && normal_model->cohesive_flag) error->all(FLERR,"Cannot limit damping with a cohesive normal model, {}", normal_model->name); if (nondefault_history_transfer) { @@ -263,7 +262,7 @@ void GranularModel::init() // Find which model owns this history value size_cumulative = 0; for (j = 0; j < NSUBMODELS; j++) { - if (size_cumulative + sub_models[j]->size_history > i) break; + if ((size_cumulative + sub_models[j]->size_history) > i) break; size_cumulative += sub_models[j]->size_history; } @@ -451,7 +450,7 @@ void GranularModel::calculate_forces() scale3(-1, torquesi); if (contact_type == PAIR) copy3(torquesi, torquesj); - if (!classic_model && contact_type == PAIR) { + if (!classic_model && (contact_type == PAIR)) { dist_to_contact = radi - 0.5 * delta; scale3(dist_to_contact, torquesi); dist_to_contact = radj - 0.5 * delta; @@ -461,16 +460,16 @@ void GranularModel::calculate_forces() scale3(dist_to_contact, torquesi); } - double torroll[3]; if (rolling_defined) { + double torroll[3]; cross3(nx, fr, torroll); scale3(Reff, torroll); add3(torquesi, torroll, torquesi); if (contact_type == PAIR) sub3(torquesj, torroll, torquesj); } - double tortwist[3]; if (twisting_defined) { + double tortwist[3]; scale3(magtortwist, nx, tortwist); add3(torquesi, tortwist, torquesi); if (contact_type == PAIR) sub3(torquesj, tortwist, torquesj); diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h index d3ce11b799..b5a4d9ef4b 100644 --- a/src/GRANULAR/granular_model.h +++ b/src/GRANULAR/granular_model.h @@ -29,7 +29,7 @@ enum SubmodelType { TWISTING, HEAT, NSUBMODELS -}; // Relative order matters since some derive coeffs from others +}; enum ContactType { PAIR = 0, diff --git a/src/GRANULAR/gsm.cpp b/src/GRANULAR/gsm.cpp index fb0ae48615..1848a1743a 100644 --- a/src/GRANULAR/gsm.cpp +++ b/src/GRANULAR/gsm.cpp @@ -45,6 +45,7 @@ GSM::GSM(class GranularModel *gm, LAMMPS *lmp) : Pointers(lmp) nondefault_history_transfer = 0; transfer_history_factor = nullptr; + coeffs = nullptr; } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/gsm_damping.cpp b/src/GRANULAR/gsm_damping.cpp index 0280f61771..ed4bfd8ae1 100644 --- a/src/GRANULAR/gsm_damping.cpp +++ b/src/GRANULAR/gsm_damping.cpp @@ -93,7 +93,10 @@ double GSMDampingViscoelastic::calculate_forces() Tsuji damping ------------------------------------------------------------------------- */ -GSMDampingTsuji::GSMDampingTsuji(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) {} +GSMDampingTsuji::GSMDampingTsuji(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) +{ + allow_cohesion = 0; +} /* ---------------------------------------------------------------------- */ From cd658e67794ba9b102f3d690220f255f984d6f6f Mon Sep 17 00:00:00 2001 From: jtclemm Date: Mon, 7 Nov 2022 10:41:09 -0700 Subject: [PATCH 043/445] Fixing few bugs with histories, removing indices from granular model --- src/GRANULAR/fix_wall_gran.cpp | 1 - src/GRANULAR/fix_wall_gran_region.cpp | 1 - src/GRANULAR/granular_model.h | 1 - src/GRANULAR/gsm_tangential.cpp | 2 +- src/GRANULAR/pair_granular.cpp | 50 ++++++++++++++------------- 5 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index e0bb941525..4956e9d900 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -492,7 +492,6 @@ void FixWallGran::post_force(int /*vflag*/) } // Reset model and copy initial geometric data - model->i = i; model->dx[0] = dx; model->dx[1] = dy; model->dx[2] = dz; diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index ad58d3e624..7ee794133c 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -229,7 +229,6 @@ void FixWallGranRegion::post_force(int /*vflag*/) for (int ic = 0; ic < nc; ic++) { // Reset model and copy initial geometric data - model->i = i; model->dx[0] = region->contact[ic].delx; model->dx[1] = region->contact[ic].dely; model->dx[2] = region->contact[ic].delz; diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h index b5a4d9ef4b..dc404b332c 100644 --- a/src/GRANULAR/granular_model.h +++ b/src/GRANULAR/granular_model.h @@ -87,7 +87,6 @@ class GranularModel : protected Pointers { double radi, radj, meff, dt, Ti, Tj, area; double Fntot, magtortwist; - int i, j; double *xi, *xj, *vi, *vj, *omegai, *omegaj; double fs[3], fr[3], ft[3]; diff --git a/src/GRANULAR/gsm_tangential.cpp b/src/GRANULAR/gsm_tangential.cpp index b2e7ca8762..862159c386 100644 --- a/src/GRANULAR/gsm_tangential.cpp +++ b/src/GRANULAR/gsm_tangential.cpp @@ -44,7 +44,7 @@ GSMTangentialNone::GSMTangentialNone(GranularModel *gm, LAMMPS *lmp) : GSMTangen GSMTangentialLinearNoHistory::GSMTangentialLinearNoHistory(GranularModel *gm, LAMMPS *lmp) : GSMTangential(gm, lmp) { num_coeffs = 2; - size_history = 3; + size_history = 0; } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index aa93dd7a0b..973daff5c9 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -122,6 +122,9 @@ void PairGranular::compute(int eflag, int vflag) bool touchflag = false; const bool history_update = update->setupflag == 0; + for (int i = 0; i < vec_models.size(); i++) + vec_models[i].history_update = history_update; + ev_init(eflag,vflag); // update rigid body info for owned & ghost atoms if using FixRigid masses @@ -190,13 +193,12 @@ void PairGranular::compute(int eflag, int vflag) jtype = type[j]; // Reset model and copy initial geometric data - models[itype][jtype]->i = i; - models[itype][jtype]->j = j; models[itype][jtype]->xi = x[i]; models[itype][jtype]->xj = x[j]; models[itype][jtype]->radi = radius[i]; models[itype][jtype]->radj = radius[j]; - models[itype][jtype]->touch = touch[jj]; + if (use_history || models[itype][jtype]->beyond_contact) + models[itype][jtype]->touch = touch[jj]; touchflag = models[itype][jtype]->check_contact(); @@ -234,12 +236,11 @@ void PairGranular::compute(int eflag, int vflag) models[itype][jtype]->vj = v[j]; models[itype][jtype]->omegai = omega[i]; models[itype][jtype]->omegaj = omega[j]; - models[itype][jtype]->history_update = history_update; if (use_history) { history = &allhistory[size_history*jj]; models[itype][jtype]->history = history; } -; + if (heat_flag) { models[itype][jtype]->Ti = temperature[i]; models[itype][jtype]->Tj = temperature[j]; @@ -411,7 +412,10 @@ void PairGranular::init_style() for (auto &model : vec_models) { model.init(); - if (model.beyond_contact) beyond_contact = 1; + if (model.beyond_contact) { + beyond_contact = 1; + use_history = 1; // Need to track if in contact + } if (model.size_history != 0) use_history = 1; for (i = 0; i < NSUBMODELS; i++) @@ -700,14 +704,28 @@ double PairGranular::single(int i, int j, int itype, int jtype, double *radius = atom->radius; // Reset model and copy initial geometric data - models[itype][jtype]->i = i; - models[itype][jtype]->j = j; models[itype][jtype]->xi = x[i]; models[itype][jtype]->xj = x[j]; models[itype][jtype]->radi = radius[i]; models[itype][jtype]->radj = radius[j]; models[i][j]->history_update = 0; // Don't update history + // If history is needed + jnum = list->numneigh[i]; + jlist = list->firstneigh[i]; + if (use_history) { + if ((fix_history == nullptr) || (fix_history->firstvalue == nullptr)) + error->one(FLERR,"Pair granular single computation needs history"); + allhistory = fix_history->firstvalue[i]; + for (int jj = 0; jj < jnum; jj++) { + neighprev++; + if (neighprev >= jnum) neighprev = 0; + if (jlist[neighprev] == j) break; + } + history = &allhistory[size_history*neighprev]; + models[itype][jtype]->touch = fix_history->firstflag[i][neighprev]; + } + touchflag = models[itype][jtype]->check_contact(); if (!touchflag) { @@ -733,22 +751,6 @@ double PairGranular::single(int i, int j, int itype, int jtype, if (mask[i] & freeze_group_bit) meff = mj; if (mask[j] & freeze_group_bit) meff = mi; - // if any history is needed - jnum = list->numneigh[i]; - jlist = list->firstneigh[i]; - - if (use_history) { - if ((fix_history == nullptr) || (fix_history->firstvalue == nullptr)) - error->one(FLERR,"Pair granular single computation needs history"); - allhistory = fix_history->firstvalue[i]; - for (int jj = 0; jj < jnum; jj++) { - neighprev++; - if (neighprev >= jnum) neighprev = 0; - if (jlist[neighprev] == j) break; - } - history = &allhistory[size_history*neighprev]; - } - // Copy additional information and calculate forces double **v = atom->v; double **omega = atom->omega; From a1db5fda70e04c8a1c925a677f7dc354ab9e62ec Mon Sep 17 00:00:00 2001 From: jtclemm Date: Mon, 7 Nov 2022 11:30:12 -0700 Subject: [PATCH 044/445] Simplifying variables and logic --- src/GRANULAR/granular_model.cpp | 56 +++++++------- src/GRANULAR/pair_granular.cpp | 128 ++++++++++++++++---------------- 2 files changed, 91 insertions(+), 93 deletions(-) diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp index 10113cdf78..f8a53c5cf2 100644 --- a/src/GRANULAR/granular_model.cpp +++ b/src/GRANULAR/granular_model.cpp @@ -380,9 +380,8 @@ bool GranularModel::check_contact() void GranularModel::calculate_forces() { - double temp[3]; - // Standard geometric quantities + if (contact_type != WALLREGION) r = sqrt(rsq); rinv = 1.0 / r; delta = radsum - r; @@ -403,29 +402,12 @@ void GranularModel::calculate_forces() scaleadd3(radi, omegai, radj, omegaj, wr); // relative tangential velocities + double temp[3]; cross3(wr, nx, temp); sub3(vt, temp, vtr); vrel = len3(vtr); - if (rolling_defined || twisting_defined) - sub3(omegai, omegaj, relrot); - - if (rolling_defined) { - // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) - // this is different from the Marshall papers, which use the Bagi/Kuhn formulation - // for rolling velocity (see Wang et al for why the latter is wrong) - vrl[0] = Reff * (relrot[1] * nx[2] - relrot[2] * nx[1]); - vrl[1] = Reff * (relrot[2] * nx[0] - relrot[0] * nx[2]); - vrl[2] = Reff * (relrot[0] * nx[1] - relrot[1] * nx[0]); - } - - if (twisting_defined) { - // omega_T (eq 29 of Marshall) - magtwist = dot3(relrot, nx); - } - // calculate forces/torques - forces[0] = 0.0; double Fdamp, dist_to_contact; area = normal_model->calculate_area(); @@ -437,30 +419,43 @@ void GranularModel::calculate_forces() normal_model->set_fncrit(); // Needed for tangential, rolling, twisting tangential_model->calculate_forces(); - if (rolling_defined) rolling_model->calculate_forces(); - if (twisting_defined) twisting_model->calculate_forces(); - // sum contributions + // sum normal + tangential contributions scale3(Fntot, nx, forces); add3(forces, fs, forces); - //May need to rethink eventually tris.. + // May need to eventually rethink tris.. cross3(nx, fs, torquesi); scale3(-1, torquesi); - if (contact_type == PAIR) copy3(torquesi, torquesj); - if (!classic_model && (contact_type == PAIR)) { + if (contact_type == PAIR) { + copy3(torquesi, torquesj); + + // Classic pair styles wouldn't scale, but classic option is only used by walls dist_to_contact = radi - 0.5 * delta; scale3(dist_to_contact, torquesi); dist_to_contact = radj - 0.5 * delta; scale3(dist_to_contact, torquesj); } else { - dist_to_contact = radi; - scale3(dist_to_contact, torquesi); + scale3(radi, torquesi); } + // Extra modes + + if (rolling_defined || twisting_defined) + sub3(omegai, omegaj, relrot); + if (rolling_defined) { + // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) + // this is different from the Marshall papers, which use the Bagi/Kuhn formulation + // for rolling velocity (see Wang et al for why the latter is wrong) + vrl[0] = Reff * (relrot[1] * nx[2] - relrot[2] * nx[1]); + vrl[1] = Reff * (relrot[2] * nx[0] - relrot[0] * nx[2]); + vrl[2] = Reff * (relrot[0] * nx[1] - relrot[1] * nx[0]); + + rolling_model->calculate_forces(); + double torroll[3]; cross3(nx, fr, torroll); scale3(Reff, torroll); @@ -469,6 +464,11 @@ void GranularModel::calculate_forces() } if (twisting_defined) { + // omega_T (eq 29 of Marshall) + magtwist = dot3(relrot, nx); + + twisting_model->calculate_forces(); + double tortwist[3]; scale3(magtortwist, nx, tortwist); add3(torquesi, tortwist, torquesi); diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 973daff5c9..9601b87382 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -112,7 +112,7 @@ PairGranular::~PairGranular() void PairGranular::compute(int eflag, int vflag) { int i,j,k,ii,jj,inum,jnum,itype,jtype; - double factor_lj,mi,mj,meff,delx,dely,delz; + double factor_lj,mi,mj,meff; double *forces, *torquesi, *torquesj, dq; int *ilist,*jlist,*numneigh,**firstneigh; @@ -122,6 +122,8 @@ void PairGranular::compute(int eflag, int vflag) bool touchflag = false; const bool history_update = update->setupflag == 0; + class GranularModel* model; + for (int i = 0; i < vec_models.size(); i++) vec_models[i].history_update = history_update; @@ -191,31 +193,29 @@ void PairGranular::compute(int eflag, int vflag) if (factor_lj == 0) continue; jtype = type[j]; + model = models[itype][jtype]; // Reset model and copy initial geometric data - models[itype][jtype]->xi = x[i]; - models[itype][jtype]->xj = x[j]; - models[itype][jtype]->radi = radius[i]; - models[itype][jtype]->radj = radius[j]; - if (use_history || models[itype][jtype]->beyond_contact) - models[itype][jtype]->touch = touch[jj]; + model->xi = x[i]; + model->xj = x[j]; + model->radi = radius[i]; + model->radj = radius[j]; + if (use_history) model->touch = touch[jj]; - touchflag = models[itype][jtype]->check_contact(); + touchflag = model->check_contact(); if (!touchflag) { // unset non-touching neighbors if (use_history) { touch[jj] = 0; - history = &allhistory[size_history*jj]; + history = &allhistory[size_history * jj]; for (k = 0; k < size_history; k++) history[k] = 0.0; } continue; } // if any history is needed - if (use_history || models[itype][jtype]->beyond_contact) { - touch[jj] = 1; - } + if (use_history) touch[jj] = 1; // meff = effective mass of pair of particles // if I or J part of rigid body, use body mass @@ -231,27 +231,26 @@ void PairGranular::compute(int eflag, int vflag) if (mask[j] & freeze_group_bit) meff = mi; // Copy additional information and prepare force calculations - models[itype][jtype]->meff = meff; - models[itype][jtype]->vi = v[i]; - models[itype][jtype]->vj = v[j]; - models[itype][jtype]->omegai = omega[i]; - models[itype][jtype]->omegaj = omega[j]; + model->meff = meff; + model->vi = v[i]; + model->vj = v[j]; + model->omegai = omega[i]; + model->omegaj = omega[j]; if (use_history) { - history = &allhistory[size_history*jj]; - models[itype][jtype]->history = history; + history = &allhistory[size_history * jj]; + model->history = history; } if (heat_flag) { - models[itype][jtype]->Ti = temperature[i]; - models[itype][jtype]->Tj = temperature[j]; + model->Ti = temperature[i]; + model->Tj = temperature[j]; } - models[itype][jtype]->calculate_forces(); + model->calculate_forces(); - forces = models[itype][jtype]->forces; - torquesi = models[itype][jtype]->torquesi; - torquesj = models[itype][jtype]->torquesj; - if (heat_flag) dq = models[itype][jtype]->dq; + forces = model->forces; + torquesi = model->torquesi; + torquesj = model->torquesj; // apply forces & torques scale3(factor_lj, forces); @@ -259,21 +258,22 @@ void PairGranular::compute(int eflag, int vflag) scale3(factor_lj, torquesi); add3(torque[i], torquesi, torque[i]); - if (heat_flag) heatflow[i] += dq; if (force->newton_pair || j < nlocal) { sub3(f[j], forces, f[j]); scale3(factor_lj, torquesj); add3(torque[j], torquesj, torque[j]); - if (heat_flag) heatflow[j] -= dq; + } + + if (heat_flag) { + dq = model->dq; + heatflow[i] += dq; + if (force->newton_pair || j < nlocal) heatflow[j] -= dq; } if (evflag) { - delx = x[i][0] - x[j][0]; - dely = x[i][1] - x[j][1]; - delz = x[i][2] - x[j][2]; ev_tally_xyz(i,j,nlocal,force->newton_pair, - 0.0,0.0,forces[0],forces[1],forces[2],delx,dely,delz); + 0.0,0.0,forces[0],forces[1],forces[2],model->dx[0],model->dx[1],model->dx[2]); } } } @@ -703,12 +703,14 @@ double PairGranular::single(int i, int j, int itype, int jtype, double **x = atom->x; double *radius = atom->radius; + class GranularModel* model = models[itype][jtype]; + // Reset model and copy initial geometric data - models[itype][jtype]->xi = x[i]; - models[itype][jtype]->xj = x[j]; - models[itype][jtype]->radi = radius[i]; - models[itype][jtype]->radj = radius[j]; - models[i][j]->history_update = 0; // Don't update history + model->xi = x[i]; + model->xj = x[j]; + model->radi = radius[i]; + model->radj = radius[j]; + model->history_update = 0; // Don't update history // If history is needed jnum = list->numneigh[i]; @@ -723,10 +725,10 @@ double PairGranular::single(int i, int j, int itype, int jtype, if (jlist[neighprev] == j) break; } history = &allhistory[size_history*neighprev]; - models[itype][jtype]->touch = fix_history->firstflag[i][neighprev]; + model->touch = fix_history->firstflag[i][neighprev]; } - touchflag = models[itype][jtype]->check_contact(); + touchflag = model->check_contact(); if (!touchflag) { fforce = 0.0; @@ -755,18 +757,18 @@ double PairGranular::single(int i, int j, int itype, int jtype, double **v = atom->v; double **omega = atom->omega; - models[itype][jtype]->meff = meff; - models[itype][jtype]->vi = v[i]; - models[itype][jtype]->vj = v[j]; - models[itype][jtype]->omegai = omega[i]; - models[itype][jtype]->omegaj = omega[j]; - models[itype][jtype]->history = history; + model->meff = meff; + model->vi = v[i]; + model->vj = v[j]; + model->omegai = omega[i]; + model->omegaj = omega[j]; + model->history = history; double *forces, *torquesi, *torquesj; - models[itype][jtype]->calculate_forces(); - forces = models[itype][jtype]->forces; - torquesi = models[itype][jtype]->torquesi; - torquesj = models[itype][jtype]->torquesj; + model->calculate_forces(); + forces = model->forces; + torquesi = model->torquesi; + torquesj = model->torquesj; // apply forces & torques @@ -774,22 +776,18 @@ double PairGranular::single(int i, int j, int itype, int jtype, // set single_extra quantities - double delx = x[i][0] - x[j][0]; - double dely = x[i][1] - x[j][1]; - double delz = x[i][2] - x[j][2]; - - svector[0] = models[itype][jtype]->fs[0]; - svector[1] = models[itype][jtype]->fs[1]; - svector[2] = models[itype][jtype]->fs[2]; - svector[3] = MathExtra::len3(models[itype][jtype]->fs); - svector[4] = models[itype][jtype]->fr[0]; - svector[5] = models[itype][jtype]->fr[1]; - svector[6] = models[itype][jtype]->fr[2]; - svector[7] = MathExtra::len3(models[itype][jtype]->fr); - svector[8] = models[itype][jtype]->magtortwist; - svector[9] = delx; - svector[10] = dely; - svector[11] = delz; + svector[0] = model->fs[0]; + svector[1] = model->fs[1]; + svector[2] = model->fs[2]; + svector[3] = MathExtra::len3(model->fs); + svector[4] = model->fr[0]; + svector[5] = model->fr[1]; + svector[6] = model->fr[2]; + svector[7] = MathExtra::len3(model->fr); + svector[8] = model->magtortwist; + svector[9] = model->dx[0]; + svector[10] = model->dx[1]; + svector[11] = model->dx[2]; return 0.0; } From 971b932387a841c3b4e283ebb1b6b79b24049fd1 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Mon, 7 Nov 2022 17:39:40 -0700 Subject: [PATCH 045/445] Adding area flag for submodels --- src/GRANULAR/granular_model.cpp | 6 ++++-- src/GRANULAR/granular_model.h | 1 + src/GRANULAR/gsm.cpp | 1 + src/GRANULAR/gsm.h | 5 +++-- src/GRANULAR/gsm_damping.cpp | 6 +++++- src/GRANULAR/gsm_heat.cpp | 1 + src/GRANULAR/gsm_normal.cpp | 4 ++++ src/GRANULAR/gsm_tangential.cpp | 13 ++++--------- src/GRANULAR/gsm_tangential.h | 1 - src/GRANULAR/gsm_twisting.cpp | 1 + 10 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp index f8a53c5cf2..66e34386ed 100644 --- a/src/GRANULAR/granular_model.cpp +++ b/src/GRANULAR/granular_model.cpp @@ -87,7 +87,6 @@ GranularModel::GranularModel(LAMMPS *lmp) : Pointers(lmp) #include "style_gsm.h" // IWYU pragma: keep #undef GSMStyle #undef GSM_CLASS - } /* ---------------------------------------------------------------------- */ @@ -241,6 +240,7 @@ void GranularModel::init() int size_cumulative; size_history = 0; + area_flag = 0; for (int i = 0; i < NSUBMODELS; i++) { if (sub_models[i]->nondefault_history_transfer) nondefault_history_transfer = 1; @@ -249,6 +249,7 @@ void GranularModel::init() size_history += sub_models[i]->size_history; if (!sub_models[i]->allow_cohesion && normal_model->cohesive_flag) error->all(FLERR,"Cannot use {} model with a cohesive normal model, {}", sub_models[i]->name, normal_model->name); + if (sub_models[i]->area_flag) area_flag = 1; } if (limit_damping && normal_model->cohesive_flag) @@ -410,7 +411,8 @@ void GranularModel::calculate_forces() // calculate forces/torques forces[0] = 0.0; double Fdamp, dist_to_contact; - area = normal_model->calculate_area(); + if (area_flag) + area = normal_model->calculate_area(); Fnormal = normal_model->calculate_forces(); Fdamp = damping_model->calculate_forces(); diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h index dc404b332c..3ea3d9e4b3 100644 --- a/src/GRANULAR/granular_model.h +++ b/src/GRANULAR/granular_model.h @@ -98,6 +98,7 @@ class GranularModel : protected Pointers { protected: int rolling_defined, twisting_defined, heat_defined; // Used to quickly skip undefined submodels int classic_model; + int area_flag; int nclass; diff --git a/src/GRANULAR/gsm.cpp b/src/GRANULAR/gsm.cpp index 1848a1743a..4ac7473504 100644 --- a/src/GRANULAR/gsm.cpp +++ b/src/GRANULAR/gsm.cpp @@ -42,6 +42,7 @@ GSM::GSM(class GranularModel *gm, LAMMPS *lmp) : Pointers(lmp) allow_cohesion = 1; beyond_contact = 0; num_coeffs = 0; + area_flag = 0; nondefault_history_transfer = 0; transfer_history_factor = nullptr; diff --git a/src/GRANULAR/gsm.h b/src/GRANULAR/gsm.h index 4695749d64..3c19179d52 100644 --- a/src/GRANULAR/gsm.h +++ b/src/GRANULAR/gsm.h @@ -40,8 +40,9 @@ class GSM : protected Pointers { double *transfer_history_factor; int history_index; - int beyond_contact; - int allow_cohesion; + int beyond_contact; // If the submodel contact extends beyond overlap + int allow_cohesion; // If the submodel works with a cohesive normal force + int area_flag; // If the submodel requires area GranularModel *gm; diff --git a/src/GRANULAR/gsm_damping.cpp b/src/GRANULAR/gsm_damping.cpp index ed4bfd8ae1..db7f0f3371 100644 --- a/src/GRANULAR/gsm_damping.cpp +++ b/src/GRANULAR/gsm_damping.cpp @@ -44,6 +44,7 @@ GSMDampingNone::GSMDampingNone(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, double GSMDampingNone::calculate_forces() { + damp_prefactor = 0.0; return 0.0; } @@ -79,7 +80,10 @@ double GSMDampingMassVelocity::calculate_forces() Default, viscoelastic damping ------------------------------------------------------------------------- */ -GSMDampingViscoelastic::GSMDampingViscoelastic(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) {} +GSMDampingViscoelastic::GSMDampingViscoelastic(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) +{ + area_flag = 1; +} /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/gsm_heat.cpp b/src/GRANULAR/gsm_heat.cpp index 7512e372a0..1a0cff5301 100644 --- a/src/GRANULAR/gsm_heat.cpp +++ b/src/GRANULAR/gsm_heat.cpp @@ -45,6 +45,7 @@ double GSMHeatNone::calculate_heat() GSMHeatArea::GSMHeatArea(GranularModel *gm, LAMMPS *lmp) : GSMHeat(gm, lmp) { num_coeffs = 1; + area_flag = 1; } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/gsm_normal.cpp b/src/GRANULAR/gsm_normal.cpp index 0ae288f6fd..28e4d7af79 100644 --- a/src/GRANULAR/gsm_normal.cpp +++ b/src/GRANULAR/gsm_normal.cpp @@ -115,6 +115,7 @@ double GSMNormalHooke::calculate_forces() GSMNormalHertz::GSMNormalHertz(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) { num_coeffs = 2; + area_flag = 1; } /* ---------------------------------------------------------------------- */ @@ -142,6 +143,7 @@ GSMNormalHertzMaterial::GSMNormalHertzMaterial(GranularModel *gm, LAMMPS *lmp) : { material_properties = 1; num_coeffs = 3; + area_flag = 1; } /* ---------------------------------------------------------------------- */ @@ -179,6 +181,7 @@ GSMNormalDMT::GSMNormalDMT(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) material_properties = 1; cohesive_flag = 1; num_coeffs = 4; + area_flag = 1; } /* ---------------------------------------------------------------------- */ @@ -236,6 +239,7 @@ GSMNormalJKR::GSMNormalJKR(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) cohesive_flag = 1; beyond_contact = 1; num_coeffs = 4; + area_flag = 1; } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/gsm_tangential.cpp b/src/GRANULAR/gsm_tangential.cpp index 862159c386..a5dabde8fd 100644 --- a/src/GRANULAR/gsm_tangential.cpp +++ b/src/GRANULAR/gsm_tangential.cpp @@ -165,7 +165,7 @@ void GSMTangentialLinearHistory::calculate_forces() GSMTangentialLinearHistoryClassic::GSMTangentialLinearHistoryClassic(GranularModel *gm, LAMMPS *lmp) : GSMTangentialLinearHistory(gm, lmp) { - scale_area = 0; // Sets gran/hooke/history behavior + area_flag = 1; // Sets gran/hooke/history behavior } /* ---------------------------------------------------------------------- */ @@ -197,7 +197,7 @@ void GSMTangentialLinearHistoryClassic::calculate_forces() } // tangential forces = history + tangential velocity damping - if (scale_area) scale3(-k * gm->area, history, gm->fs); + if (area_flag) scale3(-k * gm->area, history, gm->fs); else scale3(-k, history, gm->fs); scale3(damp, gm->vtr, temp_array); sub3(gm->fs, temp_array, gm->fs); @@ -224,7 +224,7 @@ void GSMTangentialLinearHistoryClassic::calculate_forces() GSMTangentialMindlinClassic::GSMTangentialMindlinClassic(GranularModel *gm, LAMMPS *lmp) : GSMTangentialLinearHistoryClassic(gm, lmp) { - scale_area = 1; // Sets gran/hertz/history behavior + area_flag = 1; // Sets gran/hertz/history behavior } /* ---------------------------------------------------------------------- @@ -237,6 +237,7 @@ GSMTangentialMindlin::GSMTangentialMindlin(GranularModel *gm, LAMMPS *lmp) : GSM size_history = 3; mindlin_force = 0; mindlin_rescale = 0; + area_flag = 1; } /* ---------------------------------------------------------------------- */ @@ -367,10 +368,7 @@ void GSMTangentialMindlin::calculate_forces() GSMTangentialMindlinForce::GSMTangentialMindlinForce(GranularModel *gm, LAMMPS *lmp) : GSMTangentialMindlin(gm, lmp) { - num_coeffs = 3; - size_history = 3; mindlin_force = 1; - mindlin_rescale = 0; } /* ---------------------------------------------------------------------- @@ -379,9 +377,7 @@ GSMTangentialMindlinForce::GSMTangentialMindlinForce(GranularModel *gm, LAMMPS * GSMTangentialMindlinRescale::GSMTangentialMindlinRescale(GranularModel *gm, LAMMPS *lmp) : GSMTangentialMindlin(gm, lmp) { - num_coeffs = 3; size_history = 4; - mindlin_force = 0; mindlin_rescale = 1; nondefault_history_transfer = 1; @@ -396,7 +392,6 @@ GSMTangentialMindlinRescale::GSMTangentialMindlinRescale(GranularModel *gm, LAMM GSMTangentialMindlinRescaleForce::GSMTangentialMindlinRescaleForce(GranularModel *gm, LAMMPS *lmp) : GSMTangentialMindlin(gm, lmp) { - num_coeffs = 3; size_history = 4; mindlin_force = 1; mindlin_rescale = 1; diff --git a/src/GRANULAR/gsm_tangential.h b/src/GRANULAR/gsm_tangential.h index 1d6dfa3d04..e755f63304 100644 --- a/src/GRANULAR/gsm_tangential.h +++ b/src/GRANULAR/gsm_tangential.h @@ -106,7 +106,6 @@ class GSMTangentialLinearHistoryClassic : public GSMTangentialLinearHistory { GSMTangentialLinearHistoryClassic(class GranularModel *, class LAMMPS *); void calculate_forces(); protected: - int scale_area; double xt; }; diff --git a/src/GRANULAR/gsm_twisting.cpp b/src/GRANULAR/gsm_twisting.cpp index 73149b099b..42609bf632 100644 --- a/src/GRANULAR/gsm_twisting.cpp +++ b/src/GRANULAR/gsm_twisting.cpp @@ -43,6 +43,7 @@ GSMTwistingMarshall::GSMTwistingMarshall(GranularModel *gm, LAMMPS *lmp) : GSMTw { num_coeffs = 0; size_history = 3; + area_flag = 1; } /* ---------------------------------------------------------------------- */ From ea8ded470bf0b62a886c7b3a8d15b3e14a53b556 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 9 Nov 2022 10:17:07 -0700 Subject: [PATCH 046/445] Removing vectors to avoid resizing issues with coeff redefinitions --- src/GRANULAR/fix_wall_gran.cpp | 1 + src/GRANULAR/pair_granular.cpp | 212 ++++++++++++++++++++------------- src/GRANULAR/pair_granular.h | 7 +- 3 files changed, 131 insertions(+), 89 deletions(-) diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 4956e9d900..583cbba62e 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -721,4 +721,5 @@ int FixWallGran::size_restart(int /*nlocal*/) void FixWallGran::reset_dt() { dt = update->dt; + model->dt = dt; } diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 9601b87382..dcac8e32c3 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -57,7 +57,8 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) svector = new double[single_extra]; neighprev = 0; - + nmodels = 0; + maxmodels = 0; nmax = 0; mass_rigid = nullptr; @@ -66,8 +67,6 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) maxrad_dynamic = nullptr; maxrad_frozen = nullptr; - dt = update->dt; - // set comm size needed by this Pair if used with fix rigid comm_forward = 1; @@ -97,6 +96,9 @@ PairGranular::~PairGranular() memory->destroy(setflag); memory->destroy(cutsq); memory->destroy(cutoff_type); + memory->destroy(types_indices); + for (int i = 0; i < nmodels; i++) delete models_list[i]; + memory->sfree(models_list); delete [] onerad_dynamic; delete [] onerad_frozen; @@ -124,8 +126,8 @@ void PairGranular::compute(int eflag, int vflag) class GranularModel* model; - for (int i = 0; i < vec_models.size(); i++) - vec_models[i].history_update = history_update; + for (int i = 0; i < nmodels; i++) + models_list[i]->history_update = history_update; ev_init(eflag,vflag); @@ -193,7 +195,7 @@ void PairGranular::compute(int eflag, int vflag) if (factor_lj == 0) continue; jtype = type[j]; - model = models[itype][jtype]; + model = models_list[types_indices[itype][jtype]]; // Reset model and copy initial geometric data model->xi = x[i]; @@ -288,9 +290,6 @@ void PairGranular::allocate() allocated = 1; int n = atom->ntypes; - // Reserve enough memory for vector to avoid reallocation/changing pointers - vec_models.reserve(atom->ntypes * atom->ntypes); - memory->create(setflag,n+1,n+1,"pair:setflag"); for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) @@ -298,7 +297,11 @@ void PairGranular::allocate() memory->create(cutsq,n+1,n+1,"pair:cutsq"); memory->create(cutoff_type,n+1,n+1,"pair:cutoff_type"); - models.resize(n+1, std::vector (n+1, nullptr)); + memory->create(types_indices,n+1,n+1,"pair:types_indices"); + + maxmodels = n * n + 1; // should never need any more space + models_list = (GranularModel **) memory->smalloc(maxmodels * sizeof(GranularModel *), "pair:models_list"); + for (int i = 0; i < maxmodels; i++) models_list[i] = nullptr; onerad_dynamic = new double[n+1]; onerad_frozen = new double[n+1]; @@ -336,27 +339,29 @@ void PairGranular::coeff(int narg, char **arg) utils::bounds(FLERR,arg[0],1,atom->ntypes,ilo,ihi,error); utils::bounds(FLERR,arg[1],1,atom->ntypes,jlo,jhi,error); - // Construct new model within vector - vec_models.emplace_back(lmp); + + // Construct new model + models_list[nmodels] = new GranularModel(lmp); + class GranularModel* model = models_list[nmodels]; + nmodels += 1; //Parse mandatory specification int iarg = 2; - iarg = vec_models.back().add_submodel(arg, iarg, narg, NORMAL); + iarg = model->add_submodel(arg, iarg, narg, NORMAL); //Parse optional arguments - while (iarg < narg) { if (strcmp(arg[iarg], "tangential") == 0) { - iarg = vec_models.back().add_submodel(arg, iarg + 1, narg, TANGENTIAL); + iarg = model->add_submodel(arg, iarg + 1, narg, TANGENTIAL); } else if (strcmp(arg[iarg], "damping") == 0) { - iarg = vec_models.back().add_submodel(arg, iarg + 1, narg, DAMPING); + iarg = model->add_submodel(arg, iarg + 1, narg, DAMPING); } else if (strcmp(arg[iarg], "rolling") == 0) { - iarg = vec_models.back().add_submodel(arg, iarg + 1, narg, ROLLING); + iarg = model->add_submodel(arg, iarg + 1, narg, ROLLING); } else if (strcmp(arg[iarg], "twisting") == 0) { - iarg = vec_models.back().add_submodel(arg, iarg + 1, narg, TWISTING); + iarg = model->add_submodel(arg, iarg + 1, narg, TWISTING); } else if (strcmp(arg[iarg], "heat") == 0) { - iarg = vec_models.back().add_submodel(arg, iarg + 1, narg, HEAT); + iarg = model->add_submodel(arg, iarg + 1, narg, HEAT); heat_flag = 1; } else if (strcmp(arg[iarg], "cutoff") == 0) { if (iarg + 1 >= narg) @@ -364,25 +369,28 @@ void PairGranular::coeff(int narg, char **arg) cutoff_one = utils::numeric(FLERR,arg[iarg + 1],false,lmp); iarg += 2; } else if (strcmp(arg[iarg], "limit_damping") == 0) { - vec_models.back().limit_damping = 1; + model->limit_damping = 1; iarg += 1; } else error->all(FLERR, "Illegal pair_coeff command {}", arg[iarg]); } // Define default damping model if unspecified, has no coeffs - if (!vec_models.back().damping_model) - vec_models.back().construct_submodel("viscoelastic", DAMPING); + if (!model->damping_model) + model->construct_submodel("viscoelastic", DAMPING); int count = 0; for (int i = ilo; i <= ihi; i++) { for (int j = MAX(jlo,i); j <= jhi; j++) { - models[i][j] = & vec_models.back(); + types_indices[i][j] = nmodels - 1; cutoff_type[i][j] = cutoff_type[j][i] = cutoff_one; setflag[i][j] = 1; count++; } } + // If there are > ntype^2 models, delete unused ones + if (nmodels == maxmodels) prune_models(); + if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); } @@ -392,7 +400,6 @@ void PairGranular::coeff(int narg, char **arg) void PairGranular::init_style() { - int i; // error and warning checks if (!atom->radius_flag || !atom->rmass_flag) @@ -408,30 +415,33 @@ void PairGranular::init_style() } // allocate history and initialize models + class GranularModel* model; int size_max[NSUBMODELS] = {0}; + for (int n = 0; n < nmodels; n++) { + model = models_list[n]; + model->init(); - for (auto &model : vec_models) { - model.init(); - if (model.beyond_contact) { + if (model->beyond_contact) { beyond_contact = 1; use_history = 1; // Need to track if in contact } - if (model.size_history != 0) use_history = 1; + if (model->size_history != 0) use_history = 1; - for (i = 0; i < NSUBMODELS; i++) - if (model.sub_models[i]->size_history > size_max[i]) - size_max[i] = model.sub_models[i]->size_history; + for (int i = 0; i < NSUBMODELS; i++) + if (model->sub_models[i]->size_history > size_max[i]) + size_max[i] = model->sub_models[i]->size_history; - if (model.nondefault_history_transfer) nondefault_history_transfer = 1; + if (model->nondefault_history_transfer) nondefault_history_transfer = 1; } size_history = 0; - for (i = 0; i < NSUBMODELS; i++) size_history += size_max[i]; + for (int i = 0; i < NSUBMODELS; i++) size_history += size_max[i]; - for (auto &model : vec_models) { + for (int n = 0; n < nmodels; n++) { + model = models_list[n]; int next_index = 0; - for (i = 0; i < NSUBMODELS; i++) { - model.sub_models[i]->history_index = next_index; + for (int i = 0; i < NSUBMODELS; i++) { + model->sub_models[i]->history_index = next_index; next_index += size_max[i]; } } @@ -439,8 +449,6 @@ void PairGranular::init_style() if (use_history) neighbor->add_request(this, NeighConst::REQ_SIZE|NeighConst::REQ_HISTORY); else neighbor->add_request(this, NeighConst::REQ_SIZE); - dt = update->dt; - // if history is stored and first init, create Fix to store history // it replaces FixDummy, created in the constructor // this is so its order in the fix list is preserved @@ -483,7 +491,7 @@ void PairGranular::init_style() // include future FixPour and FixDeposit particles as dynamic int itype; - for (i = 1; i <= atom->ntypes; i++) { + for (int i = 1; i <= atom->ntypes; i++) { onerad_dynamic[i] = onerad_frozen[i] = 0.0; for (auto &ipour : pours) { itype = i; @@ -502,7 +510,7 @@ void PairGranular::init_style() int *type = atom->type; int nlocal = atom->nlocal; - for (i = 0; i < nlocal; i++) { + for (int i = 0; i < nlocal; i++) { if (mask[i] & freeze_group_bit) onerad_frozen[type[i]] = MAX(onerad_frozen[type[i]], radius[i]); else @@ -527,32 +535,42 @@ void PairGranular::init_style() double PairGranular::init_one(int i, int j) { double cutoff = 0.0; + class GranularModel* model; if (setflag[i][j] == 0) { - vec_models.push_back(GranularModel(lmp)); - models[i][j] = models[j][i] = & vec_models.back(); + models_list[nmodels] = new GranularModel(lmp); + types_indices[i][j] = nmodels; + model = models_list[nmodels]; - int error_code = vec_models.back().mix_coeffs(models[i][i], models[j][j]); + nmodels += 1; + if (nmodels == maxmodels) prune_models(); + + class GranularModel* model1 = models_list[types_indices[i][i]]; + class GranularModel* model2 = models_list[types_indices[j][j]]; + + int error_code = model->mix_coeffs(model1, model2); if (error_code != -1) error->all(FLERR,"Granular pair style functional forms are different, " "cannot mix coefficients for types {} and {} \n" "with submodels {} and {}. \n" "This combination must be set explicitly via a " "pair_coeff command",i,j, - models[i][i]->sub_models[error_code]->name, - models[j][j]->sub_models[error_code]->name); + model1->sub_models[error_code]->name, + model2->sub_models[error_code]->name); - vec_models.back().init(); // Calculates cumulative properties of sub models + // Initialize new model, init_one() occurs after init_style + model->init(); for (int k = 0; k < NSUBMODELS; k++) - vec_models.back().sub_models[k]->history_index = models[i][i]->sub_models[k]->history_index; + model->sub_models[k]->history_index = model1->sub_models[k]->history_index; cutoff_type[i][j] = cutoff_type[j][i] = MAX(cutoff_type[i][i], cutoff_type[j][j]); } + model = models_list[types_indices[i][j]]; // Check if heat model is defined for all type combinations - if (heat_flag && !models[i][j]->heat_model) + if (heat_flag && !model->heat_model) error->all(FLERR, "Must specify a heat model for all pair types"); // It is possible that cut[i][j] at this point is still 0.0. @@ -571,14 +589,14 @@ double PairGranular::init_one(int i, int j) ((maxrad_frozen[i] > 0.0) && (maxrad_dynamic[j] > 0.0))) { cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; pulloff = 0.0; - if (models[i][j]->beyond_contact) { - pulloff = models[i][j]->pulloff_distance(maxrad_dynamic[i], maxrad_dynamic[j]); + if (model->beyond_contact) { + pulloff = model->pulloff_distance(maxrad_dynamic[i], maxrad_dynamic[j]); cutoff += pulloff; - pulloff = models[i][j]->pulloff_distance(maxrad_frozen[i], maxrad_dynamic[j]); + pulloff = model->pulloff_distance(maxrad_frozen[i], maxrad_dynamic[j]); cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j] + pulloff); - pulloff = models[i][j]->pulloff_distance(maxrad_dynamic[i], maxrad_frozen[j]); + pulloff = model->pulloff_distance(maxrad_dynamic[i], maxrad_frozen[j]); cutoff = MAX(cutoff,maxrad_dynamic[i] + maxrad_frozen[j] + pulloff); } } else { @@ -599,9 +617,8 @@ double PairGranular::init_one(int i, int j) cutoff = cutoff_global; } - // Copy global options - models[i][j]->dt = dt; - models[j][i] = models[i][j]; + model->dt = update->dt; + types_indices[j][i] = types_indices[i][j]; return cutoff; } @@ -611,18 +628,16 @@ double PairGranular::init_one(int i, int j) void PairGranular::write_restart(FILE *fp) { - int i,j,index; - int nmodels = vec_models.size(); + int i,j; fwrite(&nmodels,sizeof(int),1,fp); - for (auto &model : vec_models) model.write_restart(fp); + for (i = 0; i < nmodels; i++) models_list[i]->write_restart(fp); for (i = 1; i <= atom->ntypes; i++) { for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { fwrite(&cutoff_type[i][j],sizeof(double),1,fp); - index = models[i][j] - &vec_models[0]; - fwrite(&index,sizeof(int),1,fp); // save index of model + fwrite(&types_indices[i][j],sizeof(int),1,fp); } } } @@ -635,16 +650,15 @@ void PairGranular::write_restart(FILE *fp) void PairGranular::read_restart(FILE *fp) { allocate(); - int i,j,index,nmodels; + int i,j; int me = comm->me; if (me == 0) utils::sfread(FLERR,&nmodels,sizeof(int),1,fp,nullptr,error); MPI_Bcast(&nmodels,1,MPI_INT,0,world); for (i = 0; i < nmodels; i++) { - vec_models.push_back(GranularModel(lmp)); - vec_models.back().read_restart(fp); - vec_models.back().init(); + models_list[i] = new GranularModel(lmp); + models_list[i]->read_restart(fp); } for (i = 1; i <= atom->ntypes; i++) { @@ -654,12 +668,10 @@ void PairGranular::read_restart(FILE *fp) if (setflag[i][j]) { if (me == 0) { utils::sfread(FLERR,&cutoff_type[i][j],sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR,&index,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&types_indices[i][j],sizeof(int),1,fp,nullptr,error); } MPI_Bcast(&cutoff_type[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&index,1,MPI_INT,0,world); - - models[i][j] = & vec_models[index]; + MPI_Bcast(&types_indices[i][j],1,MPI_INT,0,world); } } } @@ -669,13 +681,7 @@ void PairGranular::read_restart(FILE *fp) void PairGranular::reset_dt() { - dt = update->dt; - - for (int i = 1; i <= atom->ntypes; i++) { - for (int j = i; j <= atom->ntypes; j++) { - models[i][j]->dt = dt; - } - } + for (int i = 0; i < nmodels; i++) models_list[i]->dt = update->dt; } /* ---------------------------------------------------------------------- */ @@ -703,7 +709,7 @@ double PairGranular::single(int i, int j, int itype, int jtype, double **x = atom->x; double *radius = atom->radius; - class GranularModel* model = models[itype][jtype]; + class GranularModel* model = models_list[types_indices[itype][jtype]]; // Reset model and copy initial geometric data model->xi = x[i]; @@ -771,11 +777,9 @@ double PairGranular::single(int i, int j, int itype, int jtype, torquesj = model->torquesj; // apply forces & torques - fforce = MathExtra::len3(forces); // set single_extra quantities - svector[0] = model->fs[0]; svector[1] = model->fs[1]; svector[2] = model->fs[2]; @@ -836,9 +840,10 @@ double PairGranular::memory_usage() void PairGranular::transfer_history(double* source, double* target, int itype, int jtype) { - if (models[itype][jtype]->nondefault_history_transfer) { + class GranularModel* model = models_list[types_indices[itype][jtype]]; + if (model->nondefault_history_transfer) { for (int i = 0; i < size_history; i++) { - target[i] = models[itype][jtype]->transfer_history_factor[i] * source [i]; + target[i] = model->transfer_history_factor[i] * source [i]; } } else { for (int i = 0; i < size_history; i++) { @@ -858,8 +863,9 @@ double PairGranular::atom2cut(int i) cut = atom->radius[i] * 2; if (beyond_contact) { int itype = atom->type[i]; - if (models[itype][itype]->beyond_contact) { - cut += models[itype][itype]->pulloff_distance(cut, cut); + class GranularModel* model = models_list[types_indices[itype][itype]]; + if (model->beyond_contact) { + cut += model->pulloff_distance(cut, cut); } } @@ -879,10 +885,12 @@ double PairGranular::radii2cut(double r1, double r2) double temp; // Check all combinations of i and j to find theoretical maximum pull off distance - for (int i = 0; i < n; i++){ - for (int j = 0; j < n; j++){ - if (models[i][j]->beyond_contact) { - temp = models[i][j]->pulloff_distance(r1, r2); + class GranularModel* model; + for (int i = 1; i <= n; i++) { + for (int j = 1; j <= n; j++) { + model = models_list[types_indices[i][j]]; + if (model->beyond_contact) { + temp = model->pulloff_distance(r1, r2); if (temp > cut) cut = temp; } } @@ -893,3 +901,35 @@ double PairGranular::radii2cut(double r1, double r2) return cut; } + +/* ---------------------------------------------------------------------- + remove unused models +------------------------------------------------------------------------- */ + +void PairGranular::prune_models() +{ + int ntypes = atom->ntypes; + for (int n = nmodels-1; n >= 0; n--) { + + // Find and delete unused models + int in_use = 0; + for (int i = 1; i <= ntypes; i++) + for (int j = 1; j <= ntypes; j++) + if (types_indices[i][j] == n) in_use = 1; + + if (in_use) continue; + delete models_list[n]; + + // Shift models if needed + if (n != nmodels - 1) { + models_list[n] = models_list[nmodels-1]; + for (int i = 1; i <= ntypes; i++) + for (int j = 1; j <= ntypes; j++) + if (types_indices[i][j] == nmodels-1) + types_indices[i][j] = n; + } + + models_list[nmodels-1] = nullptr; + nmodels -= 1; + } +} diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index ae09e37f5e..9ae02a200a 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -46,7 +46,6 @@ class PairGranular : public Pair { double radii2cut(double, double) override; protected: - double dt; int freeze_group_bit; int use_history; @@ -66,14 +65,16 @@ class PairGranular : public Pair { void allocate(); void transfer_history(double *, double *, int, int) override; + void prune_models(); private: int size_history; int heat_flag; // granular models - std::vector vec_models; - std::vector > models; + int nmodels, maxmodels; + Granular_NS::GranularModel** models_list; + int **types_indices; // optional user-specified global cutoff, per-type user-specified cutoffs double **cutoff_type; From d1dd8d3c110c117ce49e8144df7a68deae789156 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Thu, 10 Nov 2022 16:06:36 -0700 Subject: [PATCH 047/445] Renaming files/classes, other small, misc updates --- cmake/Modules/StyleHeaderUtils.cmake | 42 +++---- doc/src/Modify.rst | 2 +- ...Modify_gsm.rst => Modify_gran_sub_mod.rst} | 103 +++++++++--------- ...rate.rst => fix_heat_flow_sphere_temp.rst} | 12 +- src/.gitignore | 32 +++--- ...rate.cpp => fix_heat_flow_sphere_temp.cpp} | 17 ++- ...ntegrate.h => fix_heat_flow_sphere_temp.h} | 10 +- src/GRANULAR/fix_wall_gran.cpp | 2 +- src/GRANULAR/fix_wall_gran.h | 6 +- src/GRANULAR/{gsm.cpp => gran_sub_mod.cpp} | 22 ++-- src/GRANULAR/{gsm.h => gran_sub_mod.h} | 12 +- ...m_damping.cpp => gran_sub_mod_damping.cpp} | 30 ++--- .../{gsm_damping.h => gran_sub_mod_damping.h} | 58 +++++----- .../{gsm_heat.cpp => gran_sub_mod_heat.cpp} | 14 +-- .../{gsm_heat.h => gran_sub_mod_heat.h} | 34 +++--- ...gsm_normal.cpp => gran_sub_mod_normal.cpp} | 60 +++++----- .../{gsm_normal.h => gran_sub_mod_normal.h} | 66 +++++------ ...m_rolling.cpp => gran_sub_mod_rolling.cpp} | 16 +-- .../{gsm_rolling.h => gran_sub_mod_rolling.h} | 34 +++--- ...ential.cpp => gran_sub_mod_tangential.cpp} | 44 ++++---- ...tangential.h => gran_sub_mod_tangential.h} | 90 +++++++-------- ...twisting.cpp => gran_sub_mod_twisting.cpp} | 22 ++-- ...gsm_twisting.h => gran_sub_mod_twisting.h} | 42 +++---- src/GRANULAR/granular_model.cpp | 68 ++++++------ src/GRANULAR/granular_model.h | 38 +++---- src/GRANULAR/pair_granular.cpp | 2 +- src/GRANULAR/pair_granular.h | 7 +- src/Make.sh | 42 +++---- 28 files changed, 468 insertions(+), 459 deletions(-) rename doc/src/{Modify_gsm.rst => Modify_gran_sub_mod.rst} (59%) rename doc/src/{fix_temp_integrate.rst => fix_heat_flow_sphere_temp.rst} (85%) rename src/GRANULAR/{fix_temp_integrate.cpp => fix_heat_flow_sphere_temp.cpp} (89%) rename src/GRANULAR/{fix_temp_integrate.h => fix_heat_flow_sphere_temp.h} (82%) rename src/GRANULAR/{gsm.cpp => gran_sub_mod.cpp} (85%) rename src/GRANULAR/{gsm.h => gran_sub_mod.h} (89%) rename src/GRANULAR/{gsm_damping.cpp => gran_sub_mod_damping.cpp} (74%) rename src/GRANULAR/{gsm_damping.h => gran_sub_mod_damping.h} (58%) rename src/GRANULAR/{gsm_heat.cpp => gran_sub_mod_heat.cpp} (79%) rename src/GRANULAR/{gsm_heat.h => gran_sub_mod_heat.h} (66%) rename src/GRANULAR/{gsm_normal.cpp => gran_sub_mod_normal.cpp} (82%) rename src/GRANULAR/{gsm_normal.h => gran_sub_mod_normal.h} (65%) rename src/GRANULAR/{gsm_rolling.cpp => gran_sub_mod_rolling.cpp} (87%) rename src/GRANULAR/{gsm_rolling.h => gran_sub_mod_rolling.h} (65%) rename src/GRANULAR/{gsm_tangential.cpp => gran_sub_mod_tangential.cpp} (84%) rename src/GRANULAR/{gsm_tangential.h => gran_sub_mod_tangential.h} (50%) rename src/GRANULAR/{gsm_twisting.cpp => gran_sub_mod_twisting.cpp} (82%) rename src/GRANULAR/{gsm_twisting.h => gran_sub_mod_twisting.h} (62%) diff --git a/cmake/Modules/StyleHeaderUtils.cmake b/cmake/Modules/StyleHeaderUtils.cmake index 2bc84252d3..d95e265c4a 100644 --- a/cmake/Modules/StyleHeaderUtils.cmake +++ b/cmake/Modules/StyleHeaderUtils.cmake @@ -95,27 +95,27 @@ function(RegisterIntegrateStyle path) endfunction(RegisterIntegrateStyle) function(RegisterStyles search_path) - FindStyleHeaders(${search_path} ANGLE_CLASS angle_ ANGLE ) # angle ) # force - FindStyleHeaders(${search_path} ATOM_CLASS atom_vec_ ATOM_VEC ) # atom ) # atom atom_vec_hybrid - FindStyleHeaders(${search_path} BODY_CLASS body_ BODY ) # body ) # atom_vec_body - FindStyleHeaders(${search_path} BOND_CLASS bond_ BOND ) # bond ) # force - FindStyleHeaders(${search_path} COMMAND_CLASS "[^.]" COMMAND ) # command ) # input - FindStyleHeaders(${search_path} COMPUTE_CLASS compute_ COMPUTE ) # compute ) # modify - FindStyleHeaders(${search_path} DIHEDRAL_CLASS dihedral_ DIHEDRAL ) # dihedral ) # force - FindStyleHeaders(${search_path} DUMP_CLASS dump_ DUMP ) # dump ) # output write_dump - FindStyleHeaders(${search_path} FIX_CLASS fix_ FIX ) # fix ) # modify - FindStyleHeaders(${search_path} GSM_CLASS gsm_ GSM ) # gsm ) # granular_model - FindStyleHeaders(${search_path} IMPROPER_CLASS improper_ IMPROPER ) # improper ) # force - FindStyleHeaders(${search_path} INTEGRATE_CLASS "[^.]" INTEGRATE ) # integrate ) # update - FindStyleHeaders(${search_path} KSPACE_CLASS "[^.]" KSPACE ) # kspace ) # force - FindStyleHeaders(${search_path} MINIMIZE_CLASS min_ MINIMIZE ) # minimize ) # update - FindStyleHeaders(${search_path} NBIN_CLASS nbin_ NBIN ) # nbin ) # neighbor - FindStyleHeaders(${search_path} NPAIR_CLASS npair_ NPAIR ) # npair ) # neighbor - FindStyleHeaders(${search_path} NSTENCIL_CLASS nstencil_ NSTENCIL ) # nstencil ) # neighbor - FindStyleHeaders(${search_path} NTOPO_CLASS ntopo_ NTOPO ) # ntopo ) # neighbor - FindStyleHeaders(${search_path} PAIR_CLASS pair_ PAIR ) # pair ) # force - FindStyleHeaders(${search_path} READER_CLASS reader_ READER ) # reader ) # read_dump - FindStyleHeaders(${search_path} REGION_CLASS region_ REGION ) # region ) # domain + FindStyleHeaders(${search_path} ANGLE_CLASS angle_ ANGLE ) # angle ) # force + FindStyleHeaders(${search_path} ATOM_CLASS atom_vec_ ATOM_VEC ) # atom ) # atom atom_vec_hybrid + FindStyleHeaders(${search_path} BODY_CLASS body_ BODY ) # body ) # atom_vec_body + FindStyleHeaders(${search_path} BOND_CLASS bond_ BOND ) # bond ) # force + FindStyleHeaders(${search_path} COMMAND_CLASS "[^.]" COMMAND ) # command ) # input + FindStyleHeaders(${search_path} COMPUTE_CLASS compute_ COMPUTE ) # compute ) # modify + FindStyleHeaders(${search_path} DIHEDRAL_CLASS dihedral_ DIHEDRAL ) # dihedral ) # force + FindStyleHeaders(${search_path} DUMP_CLASS dump_ DUMP ) # dump ) # output write_dump + FindStyleHeaders(${search_path} FIX_CLASS fix_ FIX ) # fix ) # modify + FindStyleHeaders(${search_path} GRAN_SUB_MOD_CLASS gran_sub_mod_ GRAN_SUB_MOD ) # gran_sub_mod ) # granular_model + FindStyleHeaders(${search_path} IMPROPER_CLASS improper_ IMPROPER ) # improper ) # force + FindStyleHeaders(${search_path} INTEGRATE_CLASS "[^.]" INTEGRATE ) # integrate ) # update + FindStyleHeaders(${search_path} KSPACE_CLASS "[^.]" KSPACE ) # kspace ) # force + FindStyleHeaders(${search_path} MINIMIZE_CLASS min_ MINIMIZE ) # minimize ) # update + FindStyleHeaders(${search_path} NBIN_CLASS nbin_ NBIN ) # nbin ) # neighbor + FindStyleHeaders(${search_path} NPAIR_CLASS npair_ NPAIR ) # npair ) # neighbor + FindStyleHeaders(${search_path} NSTENCIL_CLASS nstencil_ NSTENCIL ) # nstencil ) # neighbor + FindStyleHeaders(${search_path} NTOPO_CLASS ntopo_ NTOPO ) # ntopo ) # neighbor + FindStyleHeaders(${search_path} PAIR_CLASS pair_ PAIR ) # pair ) # force + FindStyleHeaders(${search_path} READER_CLASS reader_ READER ) # reader ) # read_dump + FindStyleHeaders(${search_path} REGION_CLASS region_ REGION ) # region ) # domain endfunction(RegisterStyles) function(RegisterStylesExt search_path extension sources) diff --git a/doc/src/Modify.rst b/doc/src/Modify.rst index 39a1faeb87..8ea7850fc5 100644 --- a/doc/src/Modify.rst +++ b/doc/src/Modify.rst @@ -34,6 +34,6 @@ style requirements and recommendations `. Modify_min Modify_region Modify_body - Modify_gsm + Modify_gran_sub_mod Modify_thermo Modify_variable diff --git a/doc/src/Modify_gsm.rst b/doc/src/Modify_gran_sub_mod.rst similarity index 59% rename from doc/src/Modify_gsm.rst rename to doc/src/Modify_gran_sub_mod.rst index 515c776c6c..fe8b0da275 100644 --- a/doc/src/Modify_gsm.rst +++ b/doc/src/Modify_gran_sub_mod.rst @@ -1,4 +1,4 @@ -Granular Sub-model (GSM) styles +Granular Sub-Model styles =============================== In granular models, particles are spheres with a finite radius and rotational @@ -11,27 +11,27 @@ torques, and heat flow between two types of bodies is defined using a GranularModel class. The GranularModel class organizes the details of an interaction using a series of granular sub-models each of which describe a particular interaction mode (e.g. normal forces or rolling friction). From a -parent GSM class, several types of sub-model classes are derived: +parent GranSubMod class, several types of sub-model classes are derived: -* GSMNormal: normal force sub-model -* GSMDamping: normal damping sub-model -* GSMTangential: tangential forces and sliding friction sub-model -* GSMRolling: rolling friction sub-model -* GSMTwisting: twisting friction sub-model -* GSMHeat: heat conduction sub-model +* GranSubModNormal: normal force sub-model +* GranSubModDamping: normal damping sub-model +* GranSubModTangential: tangential forces and sliding friction sub-model +* GranSubModRolling: rolling friction sub-model +* GranSubModTwisting: twisting friction sub-model +* GranSubModHeat: heat conduction sub-model For each type of sub-model, more classes are further derived, each describing -a specific implementation. For instance, from the GSMNormal class the -GSMNormalHooke, GSMNormalHertz, and GSMNormalJKR classes are derived which -calculate Hookean, Hertzian, or JKR normal forces, respectively. This modular -structure simplifies the addition of new granular contact models as as one only -needs to create a new GSM class without having to modify the more complex -PairGranular, FixGranWall, and GranularModel classes. Most GSM methods are also -already defined by the parent classes so new contact models typically only require -edits to a few relevant methods (e.g. methods that define coefficients and +a specific implementation. For instance, from the GranSubModNormal class the +GranSubModNormalHooke, GranSubModNormalHertz, and GranSubModNormalJKR classes +are derived which calculate Hookean, Hertzian, or JKR normal forces, respectively. +This modular structure simplifies the addition of new granular contact models as +as one onlyneeds to create a new GranSubMod class without having to modify the more +complex PairGranular, FixGranWall, and GranularModel classes. Most GranSubMod methods +are also already defined by the parent classes so new contact models typically only +require edits to a few relevant methods (e.g. methods that define coefficients and calculate forces). -Each GSM class has a pointer to both the LAMMPS class and the GranularModel +Each GranSubMod class has a pointer to both the LAMMPS class and the GranularModel class which owns it, ``lmp`` and ``gm``, respectively. The GranularModel class includes several public variables that describe the geometry/dynamics of the contact such as @@ -59,69 +59,70 @@ These quantities, among others, are calculated in the ``GranularModel->check_con and ``GranularModel->calculate_forces()`` methods which can be referred to for more details. -To create a new GSM class, it is recommended that one first looks at similar GSM -classes. All GSM classes share several general methods which may need to be defined +To create a new GranSubMod class, it is recommended that one first looks at similar +GranSubMod classes. All GranSubMod classes share several general methods which may +need to be defined .. list-table:: - * - ``GSM->mix_coeff()`` + * - ``GranSubMod->mix_coeff()`` - Optional method to define how coefficients are mixed for different atom types. By default, coefficients are mixed using a geometric mean. - * - ``GSM->coeffs_to_local()`` + * - ``GranSubMod->coeffs_to_local()`` - Parses coefficients to define local variables. Run once at model construction. - * - ``GSM->init()`` - - Optional method to define local variables after other GSM types were created. For instance, this method may be used by a tangential model that derives parameters from the normal model. + * - ``GranSubMod->init()`` + - Optional method to define local variables after other GranSubMod types were created. For instance, this method may be used by a tangential model that derives parameters from the normal model. There are also several type-specific methods .. list-table:: - * - ``GSMNormal->touch()`` + * - ``GranSubModNormal->touch()`` - Optional method to test when particles are in contact. By default, this is when particles overlap. - * - ``GSMNormal->pulloff_distance()`` + * - ``GranSubModNormal->pulloff_distance()`` - Optional method to return the distance at which particles stop interacting. By default, this is when particles no longer overlap. - * - ``GSMNormal->calculate_area()`` + * - ``GranSubModNormal->calculate_area()`` - Optional method to return the surface area of the contact. By default, this returns the geometric cross section. - * - ``GSMNormal->set_fncrit()`` + * - ``GranSubModNormal->set_fncrit()`` - Optional method that defines the critical force to break the contact used by some tangential, rolling, and twisting sub-models. By default, this is the current total normal force including damping. - * - ``GSMNormal->calculate_forces()`` + * - ``GranSubModNormal->calculate_forces()`` - Required method that returns the normal contact force - * - ``GSMDamping->calculate_forces()`` + * - ``GranSubModDamping->calculate_forces()`` - Required method that returns the normal damping force - * - ``GSMTangential->calculate_forces()`` + * - ``GranSubModTangential->calculate_forces()`` - Required method that calculates tangential forces/torques - * - ``GSMTwisting->calculate_forces()`` + * - ``GranSubModTwisting->calculate_forces()`` - Required method that calculates twisting friction forces/torques - * - ``GSMRolling->calculate_forces()`` + * - ``GranSubModRolling->calculate_forces()`` - Required method that calculates rolling friction forces/torques - * - ``GSMHeat->calculate_heat()`` + * - ``GranSubModHeat->calculate_heat()`` - Required method that returns the rate of heat flow As an example, say one wanted to create a new normal force option that consisted of a Hookean force with a piecewise stiffness. This could be done by adding a new -set of files ``gsm_custom.h``: +set of files ``gran_sub_mod_custom.h``: .. code-block:: c++ - #ifdef GSM_CLASS + #ifdef GranSubMod_CLASS // clang-format off - GSMStyle(hooke/piecewise, - GSMNormalHookePiecewise, + GranSubModStyle(hooke/piecewise, + GranSubModNormalHookePiecewise, NORMAL); // clang-format on #else - #ifndef GSM_CUSTOM_H_ - #define GSM_CUSTOM_H_ + #ifndef GRAN_SUB_MOD_CUSTOM_H_ + #define GRAN_SUB_MOD_CUSTOM_H_ - #include "gsm.h" - #include "gsm_normal.h" + #include "gran_sub_mod.h" + #include "gran_sub_mod_normal.h" namespace LAMMPS_NS { namespace Granular_NS { - class GSMNormalHookePiecewise : public GSMNormal { + class GranSubModNormalHookePiecewise : public GranSubModNormal { public: - GSMNormalHookePiecewise(class GranularModel *, class LAMMPS *); + GranSubModNormalHookePiecewise(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; double calculate_forces(); protected: @@ -131,29 +132,29 @@ set of files ``gsm_custom.h``: } // namespace Granular_NS } // namespace LAMMPS_NS - #endif /*GSM_CUSTOM_H_ */ - #endif /*GSM_CLASS_H_ */ + #endif /*GRAN_SUB_MOD_CUSTOM_H_ */ + #endif /*GRAN_SUB_MOD_CLASS_H_ */ -and ``gsm_custom.cpp`` +and ``gran_sub_mod_custom.cpp`` .. code-block:: c++ - #include "gsm_custom.h" - #include "gsm_normal.h" + #include "gran_sub_mod_custom.h" + #include "gran_sub_mod_normal.h" #include "granular_model.h" using namespace LAMMPS_NS; using namespace Granular_NS; - GSMNormalHookePiecewise::GSMNormalHookePiecewise(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) + GranSubModNormalHookePiecewise::GranSubModNormalHookePiecewise(GranularModel *gm, LAMMPS *lmp) : GranSubModNormal(gm, lmp) { num_coeffs = 4; } /* ---------------------------------------------------------------------- */ - void GSMNormalHookePiecewise::coeffs_to_local() + void GranSubModNormalHookePiecewise::coeffs_to_local() { k1 = coeffs[0]; k2 = coeffs[1]; @@ -163,7 +164,7 @@ and ``gsm_custom.cpp`` /* ---------------------------------------------------------------------- */ - double GSMNormalHookePiecewise::calculate_forces() + double GranSubModNormalHookePiecewise::calculate_forces() { double Fne; if (gm->delta >= delta_switch) { diff --git a/doc/src/fix_temp_integrate.rst b/doc/src/fix_heat_flow_sphere_temp.rst similarity index 85% rename from doc/src/fix_temp_integrate.rst rename to doc/src/fix_heat_flow_sphere_temp.rst index efcf450d8f..c604b041ad 100644 --- a/doc/src/fix_temp_integrate.rst +++ b/doc/src/fix_heat_flow_sphere_temp.rst @@ -1,6 +1,6 @@ -.. index:: fix temp/integrate +.. index:: fix heat/flow/sphere/temp -fix temp/integrate command +fix heat/flow/sphere/temp command ========================== Syntax @@ -8,10 +8,10 @@ Syntax .. parsed-literal:: - fix ID group-ID temp/integrate style values ... + fix ID group-ID heat/flow/sphere/temp style values ... * ID, group-ID are documented in :doc:`fix ` command -* temp/integrate = style name of this fix command +* heat/flow/sphere/temp = style name of this fix command * one style with corresponding value(s) needs to be listed .. parsed-literal:: @@ -29,8 +29,8 @@ Examples .. code-block:: LAMMPS - fix 1 all temp/integrate constant 1.0 - fix 1 all temp/integrate type 1.0 0.5 + fix 1 all heat/flow/sphere/temp constant 1.0 + fix 1 all heat/flow/sphere/temp type 1.0 0.5 Description """"""""""" diff --git a/src/.gitignore b/src/.gitignore index c03af484ee..f2f2d3c110 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1533,8 +1533,8 @@ /fix_srp.h /fix_srp_react.cpp /fix_srp_react.h -/fix_temp_integrate.cpp -/fix_temp_integrate.h +/fix_heat_flow_sphere_temp.cpp +/fix_heat_flow_sphere_temp.h /fix_tfmc.cpp /fix_tfmc.h /fix_ttm.cpp @@ -1545,20 +1545,20 @@ /fix_ttm_mod.h /granular_model.cpp /granular_model.h -/gsm_normal.cpp -/gsm_normal.h -/gsm_damping.cpp -/gsm_damping.h -/gsm_tangential.cpp -/gsm_tangential.h -/gsm_twisting.cpp -/gsm_twisting.h -/gsm_rolling.cpp -/gsm_rolling.h -/gsm_heat.cpp -/gsm_heat.h -/gsm.cpp -/gsm.h +/gran_sub_mod_normal.cpp +/gran_sub_mod_normal.h +/gran_sub_mod_damping.cpp +/gran_sub_mod_damping.h +/gran_sub_mod_tangential.cpp +/gran_sub_mod_tangential.h +/gran_sub_mod_twisting.cpp +/gran_sub_mod_twisting.h +/gran_sub_mod_rolling.cpp +/gran_sub_mod_rolling.h +/gran_sub_mod_heat.cpp +/gran_sub_mod_heat.h +/gran_sub_mod.cpp +/gran_sub_mod.h /pair_born_coul_long_cs.cpp /pair_born_coul_long_cs.h /pair_born_coul_dsf_cs.cpp diff --git a/src/GRANULAR/fix_temp_integrate.cpp b/src/GRANULAR/fix_heat_flow_sphere_temp.cpp similarity index 89% rename from src/GRANULAR/fix_temp_integrate.cpp rename to src/GRANULAR/fix_heat_flow_sphere_temp.cpp index ab9739e874..fe7fc49324 100644 --- a/src/GRANULAR/fix_temp_integrate.cpp +++ b/src/GRANULAR/fix_heat_flow_sphere_temp.cpp @@ -12,7 +12,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "fix_temp_integrate.h" +#include "fix_heat_flow_sphere_temp.h" #include "atom.h" #include "error.h" @@ -28,7 +28,7 @@ enum {NONE, CONSTANT, TYPE}; /* ---------------------------------------------------------------------- */ -FixTempIntegrate::FixTempIntegrate(LAMMPS *lmp, int narg, char **arg) : +FixHeatFlowSphereTemp::FixHeatFlowSphereTemp(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { if (narg < 4) error->all(FLERR,"Illegal fix command"); @@ -56,12 +56,11 @@ FixTempIntegrate::FixTempIntegrate(LAMMPS *lmp, int narg, char **arg) : if (cp_style == NONE) error->all(FLERR, "Must specify specific heat in fix temp/integrate"); dynamic_group_allow = 1; - time_integrate = 1; } /* ---------------------------------------------------------------------- */ -int FixTempIntegrate::setmask() +int FixHeatFlowSphereTemp::setmask() { int mask = 0; mask |= FINAL_INTEGRATE; @@ -71,7 +70,7 @@ int FixTempIntegrate::setmask() /* ---------------------------------------------------------------------- */ -void FixTempIntegrate::init() +void FixHeatFlowSphereTemp::init() { dt = update->dt; @@ -83,7 +82,7 @@ void FixTempIntegrate::init() /* ---------------------------------------------------------------------- */ -void FixTempIntegrate::final_integrate() +void FixHeatFlowSphereTemp::final_integrate() { // update temperature of atoms in group @@ -111,7 +110,7 @@ void FixTempIntegrate::final_integrate() /* ---------------------------------------------------------------------- */ -void FixTempIntegrate::final_integrate_respa(int ilevel, int /*iloop*/) +void FixHeatFlowSphereTemp::final_integrate_respa(int ilevel, int /*iloop*/) { dt = update->dt; final_integrate(); @@ -119,14 +118,14 @@ void FixTempIntegrate::final_integrate_respa(int ilevel, int /*iloop*/) /* ---------------------------------------------------------------------- */ -void FixTempIntegrate::reset_dt() +void FixHeatFlowSphereTemp::reset_dt() { dt = update->dt; } /* ---------------------------------------------------------------------- */ -double FixTempIntegrate::calc_cp(int i) +double FixHeatFlowSphereTemp::calc_cp(int i) { if (cp_style == TYPE) { return cp_type[atom->type[i]]; diff --git a/src/GRANULAR/fix_temp_integrate.h b/src/GRANULAR/fix_heat_flow_sphere_temp.h similarity index 82% rename from src/GRANULAR/fix_temp_integrate.h rename to src/GRANULAR/fix_heat_flow_sphere_temp.h index 8356d00433..6bc2d50373 100644 --- a/src/GRANULAR/fix_temp_integrate.h +++ b/src/GRANULAR/fix_heat_flow_sphere_temp.h @@ -13,20 +13,20 @@ #ifdef FIX_CLASS // clang-format off -FixStyle(temp/integrate,FixTempIntegrate); +FixStyle(heat/flow/sphere/temp,FixHeatFlowSphereTemp); // clang-format on #else -#ifndef LMP_FIX_TEMP_INTEGRATE_H -#define LMP_FIX_TEMP_INTEGRATE_H +#ifndef LMP_FIX_HEAT_FLOW_SPHERE_TEMP_H +#define LMP_FIX_HEAT_FLOW_SPHERE_TEMP_H #include "fix.h" namespace LAMMPS_NS { -class FixTempIntegrate : public Fix { +class FixHeatFlowSphereTemp : public Fix { public: - FixTempIntegrate(class LAMMPS *, int, char **); + FixHeatFlowSphereTemp(class LAMMPS *, int, char **); int setmask() override; void init() override; diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 583cbba62e..fe2286a0fa 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -21,7 +21,7 @@ #include "atom.h" #include "granular_model.h" -#include "gsm.h" +#include "gran_sub_mod.h" #include "domain.h" #include "error.h" #include "input.h" diff --git a/src/GRANULAR/fix_wall_gran.h b/src/GRANULAR/fix_wall_gran.h index a621a973e2..16a2fe5dc0 100644 --- a/src/GRANULAR/fix_wall_gran.h +++ b/src/GRANULAR/fix_wall_gran.h @@ -25,6 +25,10 @@ FixStyle(wall/gran,FixWallGran); namespace LAMMPS_NS { +namespace Granular_NS { + class GranularModel; +} + class FixWallGran : public Fix { public: FixWallGran(class LAMMPS *, int, char **); @@ -53,7 +57,7 @@ class FixWallGran : public Fix { bigint time_origin; // for granular model choices - Granular_NS::GranularModel *model; + class Granular_NS::GranularModel *model; double lo, hi, cylradius; double amplitude, period, omega, vshear; diff --git a/src/GRANULAR/gsm.cpp b/src/GRANULAR/gran_sub_mod.cpp similarity index 85% rename from src/GRANULAR/gsm.cpp rename to src/GRANULAR/gran_sub_mod.cpp index 4ac7473504..2d836151f8 100644 --- a/src/GRANULAR/gsm.cpp +++ b/src/GRANULAR/gran_sub_mod.cpp @@ -13,7 +13,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - This class contains a framework for granular submodels (GSM) including: + This class contains a framework for granular submodels (GranSubMod): normal, damping, tangential, rolling, twisting, and heat These are used to calculate forces/torques/etc based on contact geometry @@ -21,7 +21,7 @@ Dan Bolintineanu (SNL), Joel Clemmer (SNL) ----------------------------------------------------------------------- */ -#include "gsm.h" +#include "gran_sub_mod.h" #include "error.h" #include "utils.h" @@ -32,7 +32,7 @@ using namespace Granular_NS; Parent class for all types of granular submodels ------------------------------------------------------------------------- */ -GSM::GSM(class GranularModel *gm, LAMMPS *lmp) : Pointers(lmp) +GranSubMod::GranSubMod(class GranularModel *gm, LAMMPS *lmp) : Pointers(lmp) { this->gm = gm; @@ -51,7 +51,7 @@ GSM::GSM(class GranularModel *gm, LAMMPS *lmp) : Pointers(lmp) /* ---------------------------------------------------------------------- */ -GSM::~GSM() +GranSubMod::~GranSubMod() { if (allocated) delete [] coeffs; delete [] transfer_history_factor; @@ -59,7 +59,7 @@ GSM::~GSM() /* ---------------------------------------------------------------------- */ -void GSM::allocate_coeffs() +void GranSubMod::allocate_coeffs() { allocated = 1; coeffs = new double[num_coeffs]; @@ -67,7 +67,7 @@ void GSM::allocate_coeffs() /* ---------------------------------------------------------------------- */ -void GSM::mix_coeffs(double* icoeffs, double* jcoeffs) +void GranSubMod::mix_coeffs(double* icoeffs, double* jcoeffs) { for (int i = 0; i < num_coeffs; i++) coeffs[i] = mix_geom(icoeffs[i], jcoeffs[i]); @@ -78,7 +78,7 @@ void GSM::mix_coeffs(double* icoeffs, double* jcoeffs) mixing of Young's modulus (E) ------------------------------------------------------------------------- */ -double GSM::mix_stiffnessE(double E1, double E2, +double GranSubMod::mix_stiffnessE(double E1, double E2, double pois1, double pois2) { double factor1 = (1 - pois1 * pois1) / E1; @@ -90,7 +90,7 @@ double GSM::mix_stiffnessE(double E1, double E2, mixing of shear modulus (G) ------------------------------------------------------------------------ */ -double GSM::mix_stiffnessG(double E1, double E2, +double GranSubMod::mix_stiffnessG(double E1, double E2, double pois1, double pois2) { double factor1 = 2 * (2 - pois1) * (1 + pois1) / E1; @@ -102,7 +102,7 @@ double GSM::mix_stiffnessG(double E1, double E2, mixing of Young's modulus (E) for walls ------------------------------------------------------------------------- */ -double GSM::mix_stiffnessE_wall(double E, double pois) +double GranSubMod::mix_stiffnessE_wall(double E, double pois) { double factor = 2 * (1 - pois); return E / factor; @@ -112,7 +112,7 @@ double GSM::mix_stiffnessE_wall(double E, double pois) mixing of shear modulus (G) for walls ------------------------------------------------------------------------ */ -double GSM::mix_stiffnessG_wall(double E, double pois) +double GranSubMod::mix_stiffnessG_wall(double E, double pois) { double factor = 32.0 * (2 - pois) * (1 + pois); return E / factor; @@ -122,7 +122,7 @@ double GSM::mix_stiffnessG_wall(double E, double pois) mixing of everything else ------------------------------------------------------------------------- */ -double GSM::mix_geom(double val1, double val2) +double GranSubMod::mix_geom(double val1, double val2) { return sqrt(val1 * val2); } diff --git a/src/GRANULAR/gsm.h b/src/GRANULAR/gran_sub_mod.h similarity index 89% rename from src/GRANULAR/gsm.h rename to src/GRANULAR/gran_sub_mod.h index 3c19179d52..78f4229b29 100644 --- a/src/GRANULAR/gsm.h +++ b/src/GRANULAR/gran_sub_mod.h @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef LMP_GSM_H_ -#define LMP_GSM_H_ +#ifndef LMP_GRAN_SUB_MOD_H_ +#define LMP_GRAN_SUB_MOD_H_ #include "granular_model.h" #include "pointers.h" // IWYU pragma: export @@ -20,10 +20,10 @@ namespace LAMMPS_NS { namespace Granular_NS { -class GSM : protected Pointers { +class GranSubMod : protected Pointers { public: - GSM(class GranularModel *, class LAMMPS *); - virtual ~GSM(); + GranSubMod(class GranularModel *, class LAMMPS *); + virtual ~GranSubMod(); int num_coeffs; double *coeffs; @@ -59,4 +59,4 @@ class GSM : protected Pointers { } // namespace GranularModel } // namespace LAMMPS_NS -#endif /* GSM_H_ */ +#endif /* GRAN_SUB_MOD_H_ */ diff --git a/src/GRANULAR/gsm_damping.cpp b/src/GRANULAR/gran_sub_mod_damping.cpp similarity index 74% rename from src/GRANULAR/gsm_damping.cpp rename to src/GRANULAR/gran_sub_mod_damping.cpp index db7f0f3371..e78233735a 100644 --- a/src/GRANULAR/gsm_damping.cpp +++ b/src/GRANULAR/gran_sub_mod_damping.cpp @@ -12,8 +12,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "gsm_damping.h" -#include "gsm_normal.h" +#include "gran_sub_mod_damping.h" +#include "gran_sub_mod_normal.h" #include "granular_model.h" #include "math_special.h" @@ -25,11 +25,11 @@ using namespace MathSpecial; Default damping model ------------------------------------------------------------------------- */ -GSMDamping::GSMDamping(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) {} +GranSubModDamping::GranSubModDamping(GranularModel *gm, LAMMPS *lmp) : GranSubMod(gm, lmp) {} /* ---------------------------------------------------------------------- */ -void GSMDamping::init() +void GranSubModDamping::init() { damp = gm->normal_model->damp; } @@ -38,11 +38,11 @@ void GSMDamping::init() No model ------------------------------------------------------------------------- */ -GSMDampingNone::GSMDampingNone(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) {} +GranSubModDampingNone::GranSubModDampingNone(GranularModel *gm, LAMMPS *lmp) : GranSubModDamping(gm, lmp) {} /* ---------------------------------------------------------------------- */ -double GSMDampingNone::calculate_forces() +double GranSubModDampingNone::calculate_forces() { damp_prefactor = 0.0; return 0.0; @@ -52,11 +52,11 @@ double GSMDampingNone::calculate_forces() Velocity damping ------------------------------------------------------------------------- */ -GSMDampingVelocity::GSMDampingVelocity(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) {} +GranSubModDampingVelocity::GranSubModDampingVelocity(GranularModel *gm, LAMMPS *lmp) : GranSubModDamping(gm, lmp) {} /* ---------------------------------------------------------------------- */ -double GSMDampingVelocity::calculate_forces() +double GranSubModDampingVelocity::calculate_forces() { damp_prefactor = damp; return -damp_prefactor * gm->vnnr; @@ -66,11 +66,11 @@ double GSMDampingVelocity::calculate_forces() Mass velocity damping ------------------------------------------------------------------------- */ -GSMDampingMassVelocity::GSMDampingMassVelocity(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) {} +GranSubModDampingMassVelocity::GranSubModDampingMassVelocity(GranularModel *gm, LAMMPS *lmp) : GranSubModDamping(gm, lmp) {} /* ---------------------------------------------------------------------- */ -double GSMDampingMassVelocity::calculate_forces() +double GranSubModDampingMassVelocity::calculate_forces() { damp_prefactor = damp * gm->meff; return -damp_prefactor * gm->vnnr; @@ -80,14 +80,14 @@ double GSMDampingMassVelocity::calculate_forces() Default, viscoelastic damping ------------------------------------------------------------------------- */ -GSMDampingViscoelastic::GSMDampingViscoelastic(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) +GranSubModDampingViscoelastic::GranSubModDampingViscoelastic(GranularModel *gm, LAMMPS *lmp) : GranSubModDamping(gm, lmp) { area_flag = 1; } /* ---------------------------------------------------------------------- */ -double GSMDampingViscoelastic::calculate_forces() +double GranSubModDampingViscoelastic::calculate_forces() { damp_prefactor = damp * gm->meff * gm->area; return -damp_prefactor * gm->vnnr; @@ -97,14 +97,14 @@ double GSMDampingViscoelastic::calculate_forces() Tsuji damping ------------------------------------------------------------------------- */ -GSMDampingTsuji::GSMDampingTsuji(GranularModel *gm, LAMMPS *lmp) : GSMDamping(gm, lmp) +GranSubModDampingTsuji::GranSubModDampingTsuji(GranularModel *gm, LAMMPS *lmp) : GranSubModDamping(gm, lmp) { allow_cohesion = 0; } /* ---------------------------------------------------------------------- */ -void GSMDampingTsuji::init() +void GranSubModDampingTsuji::init() { double tmp = gm->normal_model->damp; damp = 1.2728 - 4.2783 * tmp + 11.087 * square(tmp); @@ -114,7 +114,7 @@ void GSMDampingTsuji::init() /* ---------------------------------------------------------------------- */ -double GSMDampingTsuji::calculate_forces() +double GranSubModDampingTsuji::calculate_forces() { damp_prefactor = damp * sqrt(gm->meff * gm->Fnormal / gm->delta); return -damp_prefactor * gm->vnnr; diff --git a/src/GRANULAR/gsm_damping.h b/src/GRANULAR/gran_sub_mod_damping.h similarity index 58% rename from src/GRANULAR/gsm_damping.h rename to src/GRANULAR/gran_sub_mod_damping.h index 75c0f96356..04316a950d 100644 --- a/src/GRANULAR/gsm_damping.h +++ b/src/GRANULAR/gran_sub_mod_damping.h @@ -11,43 +11,43 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifdef GSM_CLASS +#ifdef GRAN_SUB_MOD_CLASS // clang-format off -GSMStyle(none, - GSMDampingNone, +GranSubModStyle(none, + GranSubModDampingNone, DAMPING); -GSMStyle(velocity, - GSMDampingVelocity, +GranSubModStyle(velocity, + GranSubModDampingVelocity, DAMPING); -GSMStyle(mass_velocity, - GSMDampingMassVelocity, +GranSubModStyle(mass_velocity, + GranSubModDampingMassVelocity, DAMPING); -GSMStyle(viscoelastic, - GSMDampingViscoelastic, +GranSubModStyle(viscoelastic, + GranSubModDampingViscoelastic, DAMPING); -GSMStyle(tsuji, - GSMDampingTsuji, +GranSubModStyle(tsuji, + GranSubModDampingTsuji, DAMPING); // clang-format on #else -#ifndef GSM_DAMPING_H_ -#define GSM_DAMPING_H_ +#ifndef GRAN_SUB_MOD_DAMPING_H_ +#define GRAN_SUB_MOD_DAMPING_H_ -#include "gsm.h" +#include "gran_sub_mod.h" #include "pointers.h" namespace LAMMPS_NS { namespace Granular_NS { -class GSMDamping : public GSM { +class GranSubModDamping : public GranSubMod { public: - GSMDamping(class GranularModel *, class LAMMPS *); - ~GSMDamping() {}; + GranSubModDamping(class GranularModel *, class LAMMPS *); + ~GranSubModDamping() {}; virtual void coeffs_to_local() {}; virtual void mix_coeffs(double*, double*) {}; virtual void init(); @@ -59,42 +59,42 @@ class GSMDamping : public GSM { /* ---------------------------------------------------------------------- */ -class GSMDampingNone : public GSMDamping { +class GranSubModDampingNone : public GranSubModDamping { public: - GSMDampingNone(class GranularModel *, class LAMMPS *); + GranSubModDampingNone(class GranularModel *, class LAMMPS *); void init() override {}; double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class GSMDampingVelocity : public GSMDamping { +class GranSubModDampingVelocity : public GranSubModDamping { public: - GSMDampingVelocity(class GranularModel *, class LAMMPS *); + GranSubModDampingVelocity(class GranularModel *, class LAMMPS *); double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class GSMDampingMassVelocity : public GSMDamping { +class GranSubModDampingMassVelocity : public GranSubModDamping { public: - GSMDampingMassVelocity(class GranularModel *, class LAMMPS *); + GranSubModDampingMassVelocity(class GranularModel *, class LAMMPS *); double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class GSMDampingViscoelastic : public GSMDamping { +class GranSubModDampingViscoelastic : public GranSubModDamping { public: - GSMDampingViscoelastic(class GranularModel *, class LAMMPS *); + GranSubModDampingViscoelastic(class GranularModel *, class LAMMPS *); double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class GSMDampingTsuji : public GSMDamping { +class GranSubModDampingTsuji : public GranSubModDamping { public: - GSMDampingTsuji(class GranularModel *, class LAMMPS *); + GranSubModDampingTsuji(class GranularModel *, class LAMMPS *); void init() override; double calculate_forces(); }; @@ -102,5 +102,5 @@ class GSMDampingTsuji : public GSMDamping { } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GSM_DAMPING_H_ */ -#endif /*GSM_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_DAMPING_H_ */ +#endif /*GRAN_SUB_MOD_CLASS_H_ */ diff --git a/src/GRANULAR/gsm_heat.cpp b/src/GRANULAR/gran_sub_mod_heat.cpp similarity index 79% rename from src/GRANULAR/gsm_heat.cpp rename to src/GRANULAR/gran_sub_mod_heat.cpp index 1a0cff5301..02a18117ff 100644 --- a/src/GRANULAR/gsm_heat.cpp +++ b/src/GRANULAR/gran_sub_mod_heat.cpp @@ -12,7 +12,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "gsm_heat.h" +#include "gran_sub_mod_heat.h" #include "granular_model.h" #include "error.h" @@ -23,17 +23,17 @@ using namespace Granular_NS; Default heat conduction ------------------------------------------------------------------------- */ -GSMHeat::GSMHeat(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) {} +GranSubModHeat::GranSubModHeat(GranularModel *gm, LAMMPS *lmp) : GranSubMod(gm, lmp) {} /* ---------------------------------------------------------------------- Area-based heat conduction ------------------------------------------------------------------------- */ -GSMHeatNone::GSMHeatNone(GranularModel *gm, LAMMPS *lmp) : GSMHeat(gm, lmp) {} +GranSubModHeatNone::GranSubModHeatNone(GranularModel *gm, LAMMPS *lmp) : GranSubModHeat(gm, lmp) {} /* ---------------------------------------------------------------------- */ -double GSMHeatNone::calculate_heat() +double GranSubModHeatNone::calculate_heat() { return 0.0; } @@ -42,7 +42,7 @@ double GSMHeatNone::calculate_heat() Area-based heat conduction ------------------------------------------------------------------------- */ -GSMHeatArea::GSMHeatArea(GranularModel *gm, LAMMPS *lmp) : GSMHeat(gm, lmp) +GranSubModHeatArea::GranSubModHeatArea(GranularModel *gm, LAMMPS *lmp) : GranSubModHeat(gm, lmp) { num_coeffs = 1; area_flag = 1; @@ -50,7 +50,7 @@ GSMHeatArea::GSMHeatArea(GranularModel *gm, LAMMPS *lmp) : GSMHeat(gm, lmp) /* ---------------------------------------------------------------------- */ -void GSMHeatArea::coeffs_to_local() +void GranSubModHeatArea::coeffs_to_local() { conductivity = coeffs[0]; @@ -59,7 +59,7 @@ void GSMHeatArea::coeffs_to_local() /* ---------------------------------------------------------------------- */ -double GSMHeatArea::calculate_heat() +double GranSubModHeatArea::calculate_heat() { return conductivity * gm->area * (gm->Tj - gm->Ti); } diff --git a/src/GRANULAR/gsm_heat.h b/src/GRANULAR/gran_sub_mod_heat.h similarity index 66% rename from src/GRANULAR/gsm_heat.h rename to src/GRANULAR/gran_sub_mod_heat.h index c913593f19..3520a41a06 100644 --- a/src/GRANULAR/gsm_heat.h +++ b/src/GRANULAR/gran_sub_mod_heat.h @@ -11,30 +11,30 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifdef GSM_CLASS +#ifdef GRAN_SUB_MOD_CLASS // clang-format off -GSMStyle(none, - GSMHeatNone, +GranSubModStyle(none, + GranSubModHeatNone, HEAT); -GSMStyle(area, - GSMHeatArea, +GranSubModStyle(area, + GranSubModHeatArea, HEAT); // clang-format on #else -#ifndef GSM_HEAT_H_ -#define GSM_HEAT_H_ +#ifndef GRAN_SUB_MOD_HEAT_H_ +#define GRAN_SUB_MOD_HEAT_H_ -#include "gsm.h" +#include "gran_sub_mod.h" namespace LAMMPS_NS { namespace Granular_NS { -class GSMHeat : public GSM { +class GranSubModHeat : public GranSubMod { public: - GSMHeat(class GranularModel *, class LAMMPS *); - ~GSMHeat() {}; + GranSubModHeat(class GranularModel *, class LAMMPS *); + ~GranSubModHeat() {}; virtual void coeffs_to_local() {}; virtual void init() {}; virtual double calculate_heat() = 0; @@ -42,17 +42,17 @@ class GSMHeat : public GSM { /* ---------------------------------------------------------------------- */ -class GSMHeatNone : public GSMHeat { +class GranSubModHeatNone : public GranSubModHeat { public: - GSMHeatNone(class GranularModel *, class LAMMPS *); + GranSubModHeatNone(class GranularModel *, class LAMMPS *); double calculate_heat(); }; /* ---------------------------------------------------------------------- */ -class GSMHeatArea : public GSMHeat { +class GranSubModHeatArea : public GranSubModHeat { public: - GSMHeatArea(class GranularModel *, class LAMMPS *); + GranSubModHeatArea(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; double calculate_heat(); protected: @@ -62,5 +62,5 @@ class GSMHeatArea : public GSMHeat { } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GSM_HEAT_H_ */ -#endif /*GSM_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_HEAT_H_ */ +#endif /*GRAN_SUB_MOD_CLASS_H_ */ diff --git a/src/GRANULAR/gsm_normal.cpp b/src/GRANULAR/gran_sub_mod_normal.cpp similarity index 82% rename from src/GRANULAR/gsm_normal.cpp rename to src/GRANULAR/gran_sub_mod_normal.cpp index 28e4d7af79..d10c984a51 100644 --- a/src/GRANULAR/gsm_normal.cpp +++ b/src/GRANULAR/gran_sub_mod_normal.cpp @@ -12,7 +12,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "gsm_normal.h" +#include "gran_sub_mod_normal.h" #include "granular_model.h" #include "error.h" #include "math_const.h" @@ -33,7 +33,7 @@ using namespace MathConst; Default normal model ------------------------------------------------------------------------- */ -GSMNormal::GSMNormal(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) +GranSubModNormal::GranSubModNormal(GranularModel *gm, LAMMPS *lmp) : GranSubMod(gm, lmp) { material_properties = 0; cohesive_flag = 0; @@ -41,7 +41,7 @@ GSMNormal::GSMNormal(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) /* ---------------------------------------------------------------------- */ -bool GSMNormal::touch() +bool GranSubModNormal::touch() { bool touchflag = (gm->rsq < gm->radsum * gm->radsum); return touchflag; @@ -49,7 +49,7 @@ bool GSMNormal::touch() /* ---------------------------------------------------------------------- */ -double GSMNormal::pulloff_distance(double radi, double radj) +double GranSubModNormal::pulloff_distance(double radi, double radj) { //called outside of compute(), do not assume correct geometry defined in contact return radi + radj; @@ -57,14 +57,14 @@ double GSMNormal::pulloff_distance(double radi, double radj) /* ---------------------------------------------------------------------- */ -double GSMNormal::calculate_area() +double GranSubModNormal::calculate_area() { return sqrt(gm->dR); } /* ---------------------------------------------------------------------- */ -void GSMNormal::set_fncrit() +void GranSubModNormal::set_fncrit() { Fncrit = fabs(gm->Fntot); } @@ -73,11 +73,11 @@ void GSMNormal::set_fncrit() No model ------------------------------------------------------------------------- */ -GSMNormalNone::GSMNormalNone(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) {} +GranSubModNormalNone::GranSubModNormalNone(GranularModel *gm, LAMMPS *lmp) : GranSubModNormal(gm, lmp) {} /* ---------------------------------------------------------------------- */ -double GSMNormalNone::calculate_forces() +double GranSubModNormalNone::calculate_forces() { return 0.0; } @@ -86,14 +86,14 @@ double GSMNormalNone::calculate_forces() Hookean normal force ------------------------------------------------------------------------- */ -GSMNormalHooke::GSMNormalHooke(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) +GranSubModNormalHooke::GranSubModNormalHooke(GranularModel *gm, LAMMPS *lmp) : GranSubModNormal(gm, lmp) { num_coeffs = 2; } /* ---------------------------------------------------------------------- */ -void GSMNormalHooke::coeffs_to_local() +void GranSubModNormalHooke::coeffs_to_local() { k = coeffs[0]; damp = coeffs[1]; @@ -103,7 +103,7 @@ void GSMNormalHooke::coeffs_to_local() /* ---------------------------------------------------------------------- */ -double GSMNormalHooke::calculate_forces() +double GranSubModNormalHooke::calculate_forces() { return k * gm->delta; } @@ -112,7 +112,7 @@ double GSMNormalHooke::calculate_forces() Hertzian normal force ------------------------------------------------------------------------- */ -GSMNormalHertz::GSMNormalHertz(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) +GranSubModNormalHertz::GranSubModNormalHertz(GranularModel *gm, LAMMPS *lmp) : GranSubModNormal(gm, lmp) { num_coeffs = 2; area_flag = 1; @@ -120,7 +120,7 @@ GSMNormalHertz::GSMNormalHertz(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, l /* ---------------------------------------------------------------------- */ -void GSMNormalHertz::coeffs_to_local() +void GranSubModNormalHertz::coeffs_to_local() { k = coeffs[0]; damp = coeffs[1]; @@ -130,7 +130,7 @@ void GSMNormalHertz::coeffs_to_local() /* ---------------------------------------------------------------------- */ -double GSMNormalHertz::calculate_forces() +double GranSubModNormalHertz::calculate_forces() { return k * gm->area * gm->delta; } @@ -139,7 +139,7 @@ double GSMNormalHertz::calculate_forces() Hertzian normal force with material properties ------------------------------------------------------------------------- */ -GSMNormalHertzMaterial::GSMNormalHertzMaterial(GranularModel *gm, LAMMPS *lmp) : GSMNormalHertz(gm, lmp) +GranSubModNormalHertzMaterial::GranSubModNormalHertzMaterial(GranularModel *gm, LAMMPS *lmp) : GranSubModNormalHertz(gm, lmp) { material_properties = 1; num_coeffs = 3; @@ -148,7 +148,7 @@ GSMNormalHertzMaterial::GSMNormalHertzMaterial(GranularModel *gm, LAMMPS *lmp) : /* ---------------------------------------------------------------------- */ -void GSMNormalHertzMaterial::coeffs_to_local() +void GranSubModNormalHertzMaterial::coeffs_to_local() { Emod = coeffs[0]; damp = coeffs[1]; @@ -164,7 +164,7 @@ void GSMNormalHertzMaterial::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void GSMNormalHertzMaterial::mix_coeffs(double* icoeffs, double* jcoeffs) +void GranSubModNormalHertzMaterial::mix_coeffs(double* icoeffs, double* jcoeffs) { coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); @@ -176,7 +176,7 @@ void GSMNormalHertzMaterial::mix_coeffs(double* icoeffs, double* jcoeffs) DMT normal force ------------------------------------------------------------------------- */ -GSMNormalDMT::GSMNormalDMT(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) +GranSubModNormalDMT::GranSubModNormalDMT(GranularModel *gm, LAMMPS *lmp) : GranSubModNormal(gm, lmp) { material_properties = 1; cohesive_flag = 1; @@ -186,7 +186,7 @@ GSMNormalDMT::GSMNormalDMT(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) /* ---------------------------------------------------------------------- */ -void GSMNormalDMT::coeffs_to_local() +void GranSubModNormalDMT::coeffs_to_local() { Emod = coeffs[0]; damp = coeffs[1]; @@ -203,7 +203,7 @@ void GSMNormalDMT::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void GSMNormalDMT::mix_coeffs(double* icoeffs, double* jcoeffs) +void GranSubModNormalDMT::mix_coeffs(double* icoeffs, double* jcoeffs) { coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); @@ -214,7 +214,7 @@ void GSMNormalDMT::mix_coeffs(double* icoeffs, double* jcoeffs) /* ---------------------------------------------------------------------- */ -double GSMNormalDMT::calculate_forces() +double GranSubModNormalDMT::calculate_forces() { Fne = k * gm->area * gm->delta; F_pulloff = 4.0 * MathConst::MY_PI * cohesion * gm->Reff; @@ -224,7 +224,7 @@ double GSMNormalDMT::calculate_forces() /* ---------------------------------------------------------------------- */ -void GSMNormalDMT::set_fncrit() +void GranSubModNormalDMT::set_fncrit() { Fncrit = fabs(Fne + 2.0 * F_pulloff); } @@ -233,7 +233,7 @@ void GSMNormalDMT::set_fncrit() JKR normal force ------------------------------------------------------------------------- */ -GSMNormalJKR::GSMNormalJKR(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) +GranSubModNormalJKR::GranSubModNormalJKR(GranularModel *gm, LAMMPS *lmp) : GranSubModNormal(gm, lmp) { material_properties = 1; cohesive_flag = 1; @@ -244,7 +244,7 @@ GSMNormalJKR::GSMNormalJKR(GranularModel *gm, LAMMPS *lmp) : GSMNormal(gm, lmp) /* ---------------------------------------------------------------------- */ -void GSMNormalJKR::coeffs_to_local() +void GranSubModNormalJKR::coeffs_to_local() { Emod = coeffs[0]; damp = coeffs[1]; @@ -264,7 +264,7 @@ void GSMNormalJKR::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void GSMNormalJKR::mix_coeffs(double* icoeffs, double* jcoeffs) +void GranSubModNormalJKR::mix_coeffs(double* icoeffs, double* jcoeffs) { coeffs[0] = mix_stiffnessE(icoeffs[0], jcoeffs[0],icoeffs[2], jcoeffs[2]); coeffs[1] = mix_geom(icoeffs[1], jcoeffs[1]); @@ -275,7 +275,7 @@ void GSMNormalJKR::mix_coeffs(double* icoeffs, double* jcoeffs) /* ---------------------------------------------------------------------- */ -bool GSMNormalJKR::touch() +bool GranSubModNormalJKR::touch() { double area_at_pulloff, R2, delta_pulloff, dist_pulloff; bool touchflag; @@ -297,7 +297,7 @@ bool GSMNormalJKR::touch() called outside of compute(), do not assume geometry defined in contact ------------------------------------------------------------------------- */ -double GSMNormalJKR::pulloff_distance(double radi, double radj) +double GranSubModNormalJKR::pulloff_distance(double radi, double radj) { double area_at_pulloff, Reff_tmp; @@ -310,7 +310,7 @@ double GSMNormalJKR::pulloff_distance(double radi, double radj) /* ---------------------------------------------------------------------- */ -double GSMNormalJKR::calculate_area() +double GranSubModNormalJKR::calculate_area() { double R2, dR2, t0, t1, t2, t3, t4, t5, t6; double sqrt1, sqrt2, sqrt3; @@ -335,7 +335,7 @@ double GSMNormalJKR::calculate_area() /* ---------------------------------------------------------------------- */ -double GSMNormalJKR::calculate_forces() +double GranSubModNormalJKR::calculate_forces() { double a2; a2 = gm->area * gm->area; @@ -347,7 +347,7 @@ double GSMNormalJKR::calculate_forces() /* ---------------------------------------------------------------------- */ -void GSMNormalJKR::set_fncrit() +void GranSubModNormalJKR::set_fncrit() { Fncrit = fabs(Fne + 2.0 * F_pulloff); } diff --git a/src/GRANULAR/gsm_normal.h b/src/GRANULAR/gran_sub_mod_normal.h similarity index 65% rename from src/GRANULAR/gsm_normal.h rename to src/GRANULAR/gran_sub_mod_normal.h index 2d7391f3c8..8fb0c01d4b 100644 --- a/src/GRANULAR/gsm_normal.h +++ b/src/GRANULAR/gran_sub_mod_normal.h @@ -11,46 +11,46 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifdef GSM_CLASS +#ifdef GRAN_SUB_MOD_CLASS // clang-format off -GSMStyle(none, - GSMNormalNone, +GranSubModStyle(none, + GranSubModNormalNone, NORMAL); -GSMStyle(hooke, - GSMNormalHooke, +GranSubModStyle(hooke, + GranSubModNormalHooke, NORMAL); -GSMStyle(hertz, - GSMNormalHertz, +GranSubModStyle(hertz, + GranSubModNormalHertz, NORMAL); -GSMStyle(hertz/material, - GSMNormalHertzMaterial, +GranSubModStyle(hertz/material, + GranSubModNormalHertzMaterial, NORMAL); -GSMStyle(dmt, - GSMNormalDMT, +GranSubModStyle(dmt, + GranSubModNormalDMT, NORMAL); -GSMStyle(jkr, - GSMNormalJKR, +GranSubModStyle(jkr, + GranSubModNormalJKR, NORMAL); // clang-format on #else -#ifndef GSM_NORMAL_H_ -#define GSM_NORMAL_H_ +#ifndef GRAN_SUB_MOD_NORMAL_H_ +#define GRAN_SUB_MOD_NORMAL_H_ -#include "gsm.h" +#include "gran_sub_mod.h" namespace LAMMPS_NS { namespace Granular_NS { -class GSMNormal : public GSM { +class GranSubModNormal : public GranSubMod { public: - GSMNormal(class GranularModel *, class LAMMPS *); - ~GSMNormal() {}; + GranSubModNormal(class GranularModel *, class LAMMPS *); + ~GranSubModNormal() {}; virtual void coeffs_to_local() {}; virtual void init() {}; virtual bool touch(); @@ -66,17 +66,17 @@ class GSMNormal : public GSM { /* ---------------------------------------------------------------------- */ -class GSMNormalNone : public GSMNormal { +class GranSubModNormalNone : public GranSubModNormal { public: - GSMNormalNone(class GranularModel *, class LAMMPS *); + GranSubModNormalNone(class GranularModel *, class LAMMPS *); double calculate_forces(); }; /* ---------------------------------------------------------------------- */ -class GSMNormalHooke : public GSMNormal { +class GranSubModNormalHooke : public GranSubModNormal { public: - GSMNormalHooke(class GranularModel *, class LAMMPS *); + GranSubModNormalHooke(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; double calculate_forces(); protected: @@ -85,9 +85,9 @@ class GSMNormalHooke : public GSMNormal { /* ---------------------------------------------------------------------- */ -class GSMNormalHertz : public GSMNormal { +class GranSubModNormalHertz : public GranSubModNormal { public: - GSMNormalHertz(class GranularModel *, class LAMMPS *); + GranSubModNormalHertz(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; double calculate_forces(); protected: @@ -96,18 +96,18 @@ class GSMNormalHertz : public GSMNormal { /* ---------------------------------------------------------------------- */ -class GSMNormalHertzMaterial : public GSMNormalHertz { +class GranSubModNormalHertzMaterial : public GranSubModNormalHertz { public: - GSMNormalHertzMaterial(class GranularModel *, class LAMMPS *); + GranSubModNormalHertzMaterial(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void mix_coeffs(double*, double*) override; }; /* ---------------------------------------------------------------------- */ -class GSMNormalDMT : public GSMNormal { +class GranSubModNormalDMT : public GranSubModNormal { public: - GSMNormalDMT(class GranularModel *, class LAMMPS *); + GranSubModNormalDMT(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void mix_coeffs(double*, double*) override; double calculate_forces(); @@ -119,9 +119,9 @@ class GSMNormalDMT : public GSMNormal { /* ---------------------------------------------------------------------- */ -class GSMNormalJKR : public GSMNormal { +class GranSubModNormalJKR : public GranSubModNormal { public: - GSMNormalJKR(class GranularModel *, class LAMMPS *); + GranSubModNormalJKR(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void mix_coeffs(double*, double*) override; bool touch() override; @@ -137,5 +137,5 @@ class GSMNormalJKR : public GSMNormal { } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GSM_NORMAL_H_ */ -#endif /*GSM_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_NORMAL_H_ */ +#endif /*GRAN_SUB_MOD_CLASS_H_ */ diff --git a/src/GRANULAR/gsm_rolling.cpp b/src/GRANULAR/gran_sub_mod_rolling.cpp similarity index 87% rename from src/GRANULAR/gsm_rolling.cpp rename to src/GRANULAR/gran_sub_mod_rolling.cpp index ceda262853..c1dc53fcc8 100644 --- a/src/GRANULAR/gsm_rolling.cpp +++ b/src/GRANULAR/gran_sub_mod_rolling.cpp @@ -12,8 +12,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "gsm_normal.h" -#include "gsm_rolling.h" +#include "gran_sub_mod_normal.h" +#include "gran_sub_mod_rolling.h" #include "granular_model.h" #include "error.h" #include "math_const.h" @@ -24,23 +24,25 @@ using namespace Granular_NS; using namespace MathConst; using namespace MathExtra; +#define EPSILON 1e-10 + /* ---------------------------------------------------------------------- Default rolling friction model ------------------------------------------------------------------------- */ -GSMRolling::GSMRolling(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) {} +GranSubModRolling::GranSubModRolling(GranularModel *gm, LAMMPS *lmp) : GranSubMod(gm, lmp) {} /* ---------------------------------------------------------------------- No model ------------------------------------------------------------------------- */ -GSMRollingNone::GSMRollingNone(GranularModel *gm, LAMMPS *lmp) : GSMRolling(gm, lmp) {} +GranSubModRollingNone::GranSubModRollingNone(GranularModel *gm, LAMMPS *lmp) : GranSubModRolling(gm, lmp) {} /* ---------------------------------------------------------------------- SDS rolling friction model ------------------------------------------------------------------------- */ -GSMRollingSDS::GSMRollingSDS(GranularModel *gm, LAMMPS *lmp) : GSMRolling(gm, lmp) +GranSubModRollingSDS::GranSubModRollingSDS(GranularModel *gm, LAMMPS *lmp) : GranSubModRolling(gm, lmp) { num_coeffs = 3; size_history = 3; @@ -48,7 +50,7 @@ GSMRollingSDS::GSMRollingSDS(GranularModel *gm, LAMMPS *lmp) : GSMRolling(gm, lm /* ---------------------------------------------------------------------- */ -void GSMRollingSDS::coeffs_to_local() +void GranSubModRollingSDS::coeffs_to_local() { k = coeffs[0]; gamma = coeffs[1]; @@ -60,7 +62,7 @@ void GSMRollingSDS::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void GSMRollingSDS::calculate_forces() +void GranSubModRollingSDS::calculate_forces() { int rhist0, rhist1, rhist2, frameupdate; double Frcrit, rolldotn, rollmag, prjmag, magfr, hist_temp[3], scalefac, temp_array[3]; diff --git a/src/GRANULAR/gsm_rolling.h b/src/GRANULAR/gran_sub_mod_rolling.h similarity index 65% rename from src/GRANULAR/gsm_rolling.h rename to src/GRANULAR/gran_sub_mod_rolling.h index 054b22954f..cb64c94219 100644 --- a/src/GRANULAR/gsm_rolling.h +++ b/src/GRANULAR/gran_sub_mod_rolling.h @@ -11,30 +11,30 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifdef GSM_CLASS +#ifdef GRAN_SUB_MOD_CLASS // clang-format off -GSMStyle(none, - GSMRollingNone, +GranSubModStyle(none, + GranSubModRollingNone, ROLLING); -GSMStyle(sds, - GSMRollingSDS, +GranSubModStyle(sds, + GranSubModRollingSDS, ROLLING); // clang-format on #else -#ifndef GSM_ROLLING_H_ -#define GSM_ROLLING_H_ +#ifndef GRAN_SUB_MOD_ROLLING_H_ +#define GRAN_SUB_MOD_ROLLING_H_ -#include "gsm.h" +#include "gran_sub_mod.h" namespace LAMMPS_NS { namespace Granular_NS { -class GSMRolling : public GSM { +class GranSubModRolling : public GranSubMod { public: - GSMRolling(class GranularModel *, class LAMMPS *); - ~GSMRolling() {}; + GranSubModRolling(class GranularModel *, class LAMMPS *); + ~GranSubModRolling() {}; virtual void coeffs_to_local() {}; virtual void init() {}; virtual void calculate_forces() = 0; @@ -42,17 +42,17 @@ class GSMRolling : public GSM { /* ---------------------------------------------------------------------- */ -class GSMRollingNone : public GSMRolling { +class GranSubModRollingNone : public GranSubModRolling { public: - GSMRollingNone(class GranularModel *, class LAMMPS *); + GranSubModRollingNone(class GranularModel *, class LAMMPS *); void calculate_forces() {}; }; /* ---------------------------------------------------------------------- */ -class GSMRollingSDS : public GSMRolling { +class GranSubModRollingSDS : public GranSubModRolling { public: - GSMRollingSDS(class GranularModel *, class LAMMPS *); + GranSubModRollingSDS(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void calculate_forces(); protected: @@ -62,5 +62,5 @@ class GSMRollingSDS : public GSMRolling { } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GSM_ROLLING_H_ */ -#endif /*GSM_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_ROLLING_H_ */ +#endif /*GRAN_SUB_MOD_CLASS_H_ */ diff --git a/src/GRANULAR/gsm_tangential.cpp b/src/GRANULAR/gran_sub_mod_tangential.cpp similarity index 84% rename from src/GRANULAR/gsm_tangential.cpp rename to src/GRANULAR/gran_sub_mod_tangential.cpp index a5dabde8fd..677ba4d363 100644 --- a/src/GRANULAR/gsm_tangential.cpp +++ b/src/GRANULAR/gran_sub_mod_tangential.cpp @@ -12,9 +12,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "gsm_damping.h" -#include "gsm_normal.h" -#include "gsm_tangential.h" +#include "gran_sub_mod_damping.h" +#include "gran_sub_mod_normal.h" +#include "gran_sub_mod_tangential.h" #include "granular_model.h" #include "error.h" #include "math_const.h" @@ -25,23 +25,25 @@ using namespace Granular_NS; using namespace MathConst; using namespace MathExtra; +#define EPSILON 1e-10 + /* ---------------------------------------------------------------------- Default model ------------------------------------------------------------------------- */ -GSMTangential::GSMTangential(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) {} +GranSubModTangential::GranSubModTangential(GranularModel *gm, LAMMPS *lmp) : GranSubMod(gm, lmp) {} /* ---------------------------------------------------------------------- No model ------------------------------------------------------------------------- */ -GSMTangentialNone::GSMTangentialNone(GranularModel *gm, LAMMPS *lmp) : GSMTangential(gm, lmp) {} +GranSubModTangentialNone::GranSubModTangentialNone(GranularModel *gm, LAMMPS *lmp) : GranSubModTangential(gm, lmp) {} /* ---------------------------------------------------------------------- Linear model with no history ------------------------------------------------------------------------- */ -GSMTangentialLinearNoHistory::GSMTangentialLinearNoHistory(GranularModel *gm, LAMMPS *lmp) : GSMTangential(gm, lmp) +GranSubModTangentialLinearNoHistory::GranSubModTangentialLinearNoHistory(GranularModel *gm, LAMMPS *lmp) : GranSubModTangential(gm, lmp) { num_coeffs = 2; size_history = 0; @@ -49,7 +51,7 @@ GSMTangentialLinearNoHistory::GSMTangentialLinearNoHistory(GranularModel *gm, LA /* ---------------------------------------------------------------------- */ -void GSMTangentialLinearNoHistory::coeffs_to_local() +void GranSubModTangentialLinearNoHistory::coeffs_to_local() { k = 0.0; // No tangential stiffness with no history xt = coeffs[0]; @@ -61,7 +63,7 @@ void GSMTangentialLinearNoHistory::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void GSMTangentialLinearNoHistory::calculate_forces() +void GranSubModTangentialLinearNoHistory::calculate_forces() { // classic pair gran/hooke (no history) damp = xt * gm->damping_model->damp_prefactor; @@ -80,7 +82,7 @@ void GSMTangentialLinearNoHistory::calculate_forces() Linear model with history ------------------------------------------------------------------------- */ -GSMTangentialLinearHistory::GSMTangentialLinearHistory(GranularModel *gm, LAMMPS *lmp) : GSMTangential(gm, lmp) +GranSubModTangentialLinearHistory::GranSubModTangentialLinearHistory(GranularModel *gm, LAMMPS *lmp) : GranSubModTangential(gm, lmp) { num_coeffs = 3; size_history = 3; @@ -88,7 +90,7 @@ GSMTangentialLinearHistory::GSMTangentialLinearHistory(GranularModel *gm, LAMMPS /* ---------------------------------------------------------------------- */ -void GSMTangentialLinearHistory::coeffs_to_local() +void GranSubModTangentialLinearHistory::coeffs_to_local() { k = coeffs[0]; xt = coeffs[1]; @@ -100,7 +102,7 @@ void GSMTangentialLinearHistory::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void GSMTangentialLinearHistory::calculate_forces() +void GranSubModTangentialLinearHistory::calculate_forces() { // Note: this is the same as the base Mindlin calculation except k isn't scaled by area double magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl, temp_array[3]; @@ -163,14 +165,14 @@ void GSMTangentialLinearHistory::calculate_forces() Linear model with history from pair gran/hooke/history ------------------------------------------------------------------------- */ -GSMTangentialLinearHistoryClassic::GSMTangentialLinearHistoryClassic(GranularModel *gm, LAMMPS *lmp) : GSMTangentialLinearHistory(gm, lmp) +GranSubModTangentialLinearHistoryClassic::GranSubModTangentialLinearHistoryClassic(GranularModel *gm, LAMMPS *lmp) : GranSubModTangentialLinearHistory(gm, lmp) { area_flag = 1; // Sets gran/hooke/history behavior } /* ---------------------------------------------------------------------- */ -void GSMTangentialLinearHistoryClassic::calculate_forces() +void GranSubModTangentialLinearHistoryClassic::calculate_forces() { double magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; double temp_array[3]; @@ -222,7 +224,7 @@ void GSMTangentialLinearHistoryClassic::calculate_forces() Mindlin from pair gran/hertz/history ------------------------------------------------------------------------- */ -GSMTangentialMindlinClassic::GSMTangentialMindlinClassic(GranularModel *gm, LAMMPS *lmp) : GSMTangentialLinearHistoryClassic(gm, lmp) +GranSubModTangentialMindlinClassic::GranSubModTangentialMindlinClassic(GranularModel *gm, LAMMPS *lmp) : GranSubModTangentialLinearHistoryClassic(gm, lmp) { area_flag = 1; // Sets gran/hertz/history behavior } @@ -231,7 +233,7 @@ GSMTangentialMindlinClassic::GSMTangentialMindlinClassic(GranularModel *gm, LAMM Mindlin model ------------------------------------------------------------------------- */ -GSMTangentialMindlin::GSMTangentialMindlin(GranularModel *gm, LAMMPS *lmp) : GSMTangential(gm, lmp) +GranSubModTangentialMindlin::GranSubModTangentialMindlin(GranularModel *gm, LAMMPS *lmp) : GranSubModTangential(gm, lmp) { num_coeffs = 3; size_history = 3; @@ -242,7 +244,7 @@ GSMTangentialMindlin::GSMTangentialMindlin(GranularModel *gm, LAMMPS *lmp) : GSM /* ---------------------------------------------------------------------- */ -void GSMTangentialMindlin::coeffs_to_local() +void GranSubModTangentialMindlin::coeffs_to_local() { k = coeffs[0]; xt = coeffs[1]; @@ -268,7 +270,7 @@ void GSMTangentialMindlin::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void GSMTangentialMindlin::mix_coeffs(double* icoeffs, double* jcoeffs) +void GranSubModTangentialMindlin::mix_coeffs(double* icoeffs, double* jcoeffs) { if (icoeffs[0] == -1 || jcoeffs[0] == -1) coeffs[0] = -1; else coeffs[0] = mix_geom(icoeffs[0], jcoeffs[0]); @@ -279,7 +281,7 @@ void GSMTangentialMindlin::mix_coeffs(double* icoeffs, double* jcoeffs) /* ---------------------------------------------------------------------- */ -void GSMTangentialMindlin::calculate_forces() +void GranSubModTangentialMindlin::calculate_forces() { double k_scaled, magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; double temp_array[3]; @@ -366,7 +368,7 @@ void GSMTangentialMindlin::calculate_forces() Mindlin force model ------------------------------------------------------------------------- */ -GSMTangentialMindlinForce::GSMTangentialMindlinForce(GranularModel *gm, LAMMPS *lmp) : GSMTangentialMindlin(gm, lmp) +GranSubModTangentialMindlinForce::GranSubModTangentialMindlinForce(GranularModel *gm, LAMMPS *lmp) : GranSubModTangentialMindlin(gm, lmp) { mindlin_force = 1; } @@ -375,7 +377,7 @@ GSMTangentialMindlinForce::GSMTangentialMindlinForce(GranularModel *gm, LAMMPS * Mindlin rescale model ------------------------------------------------------------------------- */ -GSMTangentialMindlinRescale::GSMTangentialMindlinRescale(GranularModel *gm, LAMMPS *lmp) : GSMTangentialMindlin(gm, lmp) +GranSubModTangentialMindlinRescale::GranSubModTangentialMindlinRescale(GranularModel *gm, LAMMPS *lmp) : GranSubModTangentialMindlin(gm, lmp) { size_history = 4; mindlin_rescale = 1; @@ -390,7 +392,7 @@ GSMTangentialMindlinRescale::GSMTangentialMindlinRescale(GranularModel *gm, LAMM Mindlin rescale force model ------------------------------------------------------------------------- */ -GSMTangentialMindlinRescaleForce::GSMTangentialMindlinRescaleForce(GranularModel *gm, LAMMPS *lmp) : GSMTangentialMindlin(gm, lmp) +GranSubModTangentialMindlinRescaleForce::GranSubModTangentialMindlinRescaleForce(GranularModel *gm, LAMMPS *lmp) : GranSubModTangentialMindlin(gm, lmp) { size_history = 4; mindlin_force = 1; diff --git a/src/GRANULAR/gsm_tangential.h b/src/GRANULAR/gran_sub_mod_tangential.h similarity index 50% rename from src/GRANULAR/gsm_tangential.h rename to src/GRANULAR/gran_sub_mod_tangential.h index e755f63304..56d72f80d3 100644 --- a/src/GRANULAR/gsm_tangential.h +++ b/src/GRANULAR/gran_sub_mod_tangential.h @@ -11,58 +11,58 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifdef GSM_CLASS +#ifdef GRAN_SUB_MOD_CLASS // clang-format off -GSMStyle(none, - GSMTangentialNone, +GranSubModStyle(none, + GranSubModTangentialNone, TANGENTIAL); -GSMStyle(linear_nohistory, - GSMTangentialLinearNoHistory, +GranSubModStyle(linear_nohistory, + GranSubModTangentialLinearNoHistory, TANGENTIAL); -GSMStyle(linear_history, - GSMTangentialLinearHistory, +GranSubModStyle(linear_history, + GranSubModTangentialLinearHistory, TANGENTIAL); -GSMStyle(linear_history_classic, - GSMTangentialLinearHistoryClassic, +GranSubModStyle(linear_history_classic, + GranSubModTangentialLinearHistoryClassic, TANGENTIAL); -GSMStyle(mindlin_classic, - GSMTangentialMindlinClassic, +GranSubModStyle(mindlin_classic, + GranSubModTangentialMindlinClassic, TANGENTIAL); -GSMStyle(mindlin, - GSMTangentialMindlin, +GranSubModStyle(mindlin, + GranSubModTangentialMindlin, TANGENTIAL); -GSMStyle(mindlin/force, - GSMTangentialMindlinForce, +GranSubModStyle(mindlin/force, + GranSubModTangentialMindlinForce, TANGENTIAL); -GSMStyle(mindlin_rescale, - GSMTangentialMindlinRescale, +GranSubModStyle(mindlin_rescale, + GranSubModTangentialMindlinRescale, TANGENTIAL); -GSMStyle(mindlin_rescale/force, - GSMTangentialMindlinRescaleForce, +GranSubModStyle(mindlin_rescale/force, + GranSubModTangentialMindlinRescaleForce, TANGENTIAL); // clang-format on #else -#ifndef GSM_TANGENTIAL_H_ -#define GSM_TANGENTIAL_H_ +#ifndef GRAN_SUB_MOD_TANGENTIAL_H_ +#define GRAN_SUB_MOD_TANGENTIAL_H_ -#include "gsm.h" +#include "gran_sub_mod.h" namespace LAMMPS_NS { namespace Granular_NS { -class GSMTangential : public GSM { +class GranSubModTangential : public GranSubMod { public: - GSMTangential(class GranularModel *, class LAMMPS *); - virtual ~GSMTangential() {}; + GranSubModTangential(class GranularModel *, class LAMMPS *); + virtual ~GranSubModTangential() {}; virtual void coeffs_to_local() {}; virtual void init() {}; virtual void calculate_forces() = 0; @@ -71,17 +71,17 @@ class GSMTangential : public GSM { /* ---------------------------------------------------------------------- */ -class GSMTangentialNone : public GSMTangential { +class GranSubModTangentialNone : public GranSubModTangential { public: - GSMTangentialNone(class GranularModel *, class LAMMPS *); + GranSubModTangentialNone(class GranularModel *, class LAMMPS *); void calculate_forces() {}; }; /* ---------------------------------------------------------------------- */ -class GSMTangentialLinearNoHistory : public GSMTangential { +class GranSubModTangentialLinearNoHistory : public GranSubModTangential { public: - GSMTangentialLinearNoHistory(class GranularModel *, class LAMMPS *); + GranSubModTangentialLinearNoHistory(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void calculate_forces(); protected: @@ -90,9 +90,9 @@ class GSMTangentialLinearNoHistory : public GSMTangential { /* ---------------------------------------------------------------------- */ -class GSMTangentialLinearHistory : public GSMTangential { +class GranSubModTangentialLinearHistory : public GranSubModTangential { public: - GSMTangentialLinearHistory(class GranularModel *, class LAMMPS *); + GranSubModTangentialLinearHistory(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void calculate_forces(); protected: @@ -101,9 +101,9 @@ class GSMTangentialLinearHistory : public GSMTangential { /* ---------------------------------------------------------------------- */ -class GSMTangentialLinearHistoryClassic : public GSMTangentialLinearHistory { +class GranSubModTangentialLinearHistoryClassic : public GranSubModTangentialLinearHistory { public: - GSMTangentialLinearHistoryClassic(class GranularModel *, class LAMMPS *); + GranSubModTangentialLinearHistoryClassic(class GranularModel *, class LAMMPS *); void calculate_forces(); protected: double xt; @@ -111,16 +111,16 @@ class GSMTangentialLinearHistoryClassic : public GSMTangentialLinearHistory { /* ---------------------------------------------------------------------- */ -class GSMTangentialMindlinClassic : public GSMTangentialLinearHistoryClassic { +class GranSubModTangentialMindlinClassic : public GranSubModTangentialLinearHistoryClassic { public: - GSMTangentialMindlinClassic(class GranularModel *, class LAMMPS *); + GranSubModTangentialMindlinClassic(class GranularModel *, class LAMMPS *); }; /* ---------------------------------------------------------------------- */ -class GSMTangentialMindlin : public GSMTangential { +class GranSubModTangentialMindlin : public GranSubModTangential { public: - GSMTangentialMindlin(class GranularModel *, class LAMMPS *); + GranSubModTangentialMindlin(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void mix_coeffs(double*, double*) override; void calculate_forces(); @@ -131,27 +131,27 @@ class GSMTangentialMindlin : public GSMTangential { /* ---------------------------------------------------------------------- */ -class GSMTangentialMindlinForce : public GSMTangentialMindlin { +class GranSubModTangentialMindlinForce : public GranSubModTangentialMindlin { public: - GSMTangentialMindlinForce(class GranularModel *, class LAMMPS *); + GranSubModTangentialMindlinForce(class GranularModel *, class LAMMPS *); }; /* ---------------------------------------------------------------------- */ -class GSMTangentialMindlinRescale : public GSMTangentialMindlin { +class GranSubModTangentialMindlinRescale : public GranSubModTangentialMindlin { public: - GSMTangentialMindlinRescale(class GranularModel *, class LAMMPS *); + GranSubModTangentialMindlinRescale(class GranularModel *, class LAMMPS *); }; /* ---------------------------------------------------------------------- */ -class GSMTangentialMindlinRescaleForce : public GSMTangentialMindlin { +class GranSubModTangentialMindlinRescaleForce : public GranSubModTangentialMindlin { public: - GSMTangentialMindlinRescaleForce(class GranularModel *, class LAMMPS *); + GranSubModTangentialMindlinRescaleForce(class GranularModel *, class LAMMPS *); }; } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GSM_TANGENTIAL_H_ */ -#endif /*GSM_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_TANGENTIAL_H_ */ +#endif /*GRAN_SUB_MOD_CLASS_H_ */ diff --git a/src/GRANULAR/gsm_twisting.cpp b/src/GRANULAR/gran_sub_mod_twisting.cpp similarity index 82% rename from src/GRANULAR/gsm_twisting.cpp rename to src/GRANULAR/gran_sub_mod_twisting.cpp index 42609bf632..9cb6d69dc8 100644 --- a/src/GRANULAR/gsm_twisting.cpp +++ b/src/GRANULAR/gran_sub_mod_twisting.cpp @@ -12,9 +12,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "gsm_normal.h" -#include "gsm_tangential.h" -#include "gsm_twisting.h" +#include "gran_sub_mod_normal.h" +#include "gran_sub_mod_tangential.h" +#include "gran_sub_mod_twisting.h" #include "granular_model.h" #include "error.h" #include "math_const.h" @@ -27,19 +27,19 @@ using namespace MathConst; Default twisting model ------------------------------------------------------------------------- */ -GSMTwisting::GSMTwisting(GranularModel *gm, LAMMPS *lmp) : GSM(gm, lmp) {} +GranSubModTwisting::GranSubModTwisting(GranularModel *gm, LAMMPS *lmp) : GranSubMod(gm, lmp) {} /* ---------------------------------------------------------------------- No model ------------------------------------------------------------------------- */ -GSMTwistingNone::GSMTwistingNone(GranularModel *gm, LAMMPS *lmp) : GSMTwisting(gm, lmp) {} +GranSubModTwistingNone::GranSubModTwistingNone(GranularModel *gm, LAMMPS *lmp) : GranSubModTwisting(gm, lmp) {} /* ---------------------------------------------------------------------- Marshall twisting model ------------------------------------------------------------------------- */ -GSMTwistingMarshall::GSMTwistingMarshall(GranularModel *gm, LAMMPS *lmp) : GSMTwisting(gm, lmp) +GranSubModTwistingMarshall::GranSubModTwistingMarshall(GranularModel *gm, LAMMPS *lmp) : GranSubModTwisting(gm, lmp) { num_coeffs = 0; size_history = 3; @@ -49,7 +49,7 @@ GSMTwistingMarshall::GSMTwistingMarshall(GranularModel *gm, LAMMPS *lmp) : GSMTw /* ---------------------------------------------------------------------- */ -void GSMTwistingMarshall::init() +void GranSubModTwistingMarshall::init() { k_tang = gm->tangential_model->k; mu_tang = gm->tangential_model->mu; @@ -57,7 +57,7 @@ void GSMTwistingMarshall::init() /* ---------------------------------------------------------------------- */ -void GSMTwistingMarshall::calculate_forces() +void GranSubModTwistingMarshall::calculate_forces() { double signtwist, Mtcrit; @@ -86,7 +86,7 @@ void GSMTwistingMarshall::calculate_forces() SDS twisting model ------------------------------------------------------------------------- */ -GSMTwistingSDS::GSMTwistingSDS(GranularModel *gm, LAMMPS *lmp) : GSMTwisting(gm, lmp) +GranSubModTwistingSDS::GranSubModTwistingSDS(GranularModel *gm, LAMMPS *lmp) : GranSubModTwisting(gm, lmp) { num_coeffs = 3; size_history = 3; @@ -94,7 +94,7 @@ GSMTwistingSDS::GSMTwistingSDS(GranularModel *gm, LAMMPS *lmp) : GSMTwisting(gm, /* ---------------------------------------------------------------------- */ -void GSMTwistingSDS::coeffs_to_local() +void GranSubModTwistingSDS::coeffs_to_local() { k = coeffs[0]; damp = coeffs[1]; @@ -106,7 +106,7 @@ void GSMTwistingSDS::coeffs_to_local() /* ---------------------------------------------------------------------- */ -void GSMTwistingSDS::calculate_forces() +void GranSubModTwistingSDS::calculate_forces() { double signtwist, Mtcrit; diff --git a/src/GRANULAR/gsm_twisting.h b/src/GRANULAR/gran_sub_mod_twisting.h similarity index 62% rename from src/GRANULAR/gsm_twisting.h rename to src/GRANULAR/gran_sub_mod_twisting.h index b9ab7826a6..7f8addec97 100644 --- a/src/GRANULAR/gsm_twisting.h +++ b/src/GRANULAR/gran_sub_mod_twisting.h @@ -11,34 +11,34 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifdef GSM_CLASS +#ifdef GRAN_SUB_MOD_CLASS // clang-format off -GSMStyle(none, - GSMTwistingNone, +GranSubModStyle(none, + GranSubModTwistingNone, TWISTING); -GSMStyle(marshall, - GSMTwistingMarshall, +GranSubModStyle(marshall, + GranSubModTwistingMarshall, TWISTING); -GSMStyle(sds, - GSMTwistingSDS, +GranSubModStyle(sds, + GranSubModTwistingSDS, TWISTING); // clang-format on #else -#ifndef GSM_TWISTING_H_ -#define GSM_TWISTING_H_ +#ifndef GRAN_SUB_MOD_TWISTING_H_ +#define GRAN_SUB_MOD_TWISTING_H_ -#include "gsm.h" +#include "gran_sub_mod.h" namespace LAMMPS_NS { namespace Granular_NS { -class GSMTwisting : public GSM { +class GranSubModTwisting : public GranSubMod { public: - GSMTwisting(class GranularModel *, class LAMMPS *); - virtual ~GSMTwisting() {}; + GranSubModTwisting(class GranularModel *, class LAMMPS *); + virtual ~GranSubModTwisting() {}; virtual void coeffs_to_local() {}; virtual void init() {}; virtual void calculate_forces() = 0; @@ -46,17 +46,17 @@ class GSMTwisting : public GSM { /* ---------------------------------------------------------------------- */ -class GSMTwistingNone : public GSMTwisting { +class GranSubModTwistingNone : public GranSubModTwisting { public: - GSMTwistingNone(class GranularModel *, class LAMMPS *); + GranSubModTwistingNone(class GranularModel *, class LAMMPS *); void calculate_forces() {}; }; /* ---------------------------------------------------------------------- */ -class GSMTwistingMarshall : public GSMTwisting { +class GranSubModTwistingMarshall : public GranSubModTwisting { public: - GSMTwistingMarshall(class GranularModel *, class LAMMPS *); + GranSubModTwistingMarshall(class GranularModel *, class LAMMPS *); void calculate_forces(); void init(); protected: @@ -65,9 +65,9 @@ class GSMTwistingMarshall : public GSMTwisting { /* ---------------------------------------------------------------------- */ -class GSMTwistingSDS : public GSMTwisting { +class GranSubModTwistingSDS : public GranSubModTwisting { public: - GSMTwistingSDS(class GranularModel *, class LAMMPS *); + GranSubModTwistingSDS(class GranularModel *, class LAMMPS *); void coeffs_to_local() override; void calculate_forces(); protected: @@ -77,5 +77,5 @@ class GSMTwistingSDS : public GSMTwisting { } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GSM_TWISTING_H_ */ -#endif /*GSM_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_TWISTING_H_ */ +#endif /*GRAN_SUB_MOD_CLASS_H_ */ diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp index 66e34386ed..872bfa6c8d 100644 --- a/src/GRANULAR/granular_model.cpp +++ b/src/GRANULAR/granular_model.cpp @@ -22,12 +22,12 @@ ----------------------------------------------------------------------- */ #include "granular_model.h" -#include "gsm.h" +#include "gran_sub_mod.h" #include "comm.h" #include "error.h" #include "force.h" #include "math_extra.h" -#include "style_gsm.h" // IWYU pragma: keep +#include "style_gran_sub_mod.h" // IWYU pragma: keep #include @@ -36,10 +36,10 @@ using namespace Granular_NS; using namespace MathExtra; /* ---------------------------------------------------------------------- - one instance per GSM style in style_gsm.h + one instance per GranSubMod style in style_gran_sub_mod.h ------------------------------------------------------------------------- */ -template static GSM *gsm_creator(GranularModel *gm, LAMMPS *lmp) +template static GranSubMod *gran_sub_mod_creator(GranularModel *gm, LAMMPS *lmp) { return new T(gm, lmp); } @@ -64,29 +64,29 @@ GranularModel::GranularModel(LAMMPS *lmp) : Pointers(lmp) for (int i = 0; i < NSUBMODELS; i++) sub_models[i] = nullptr; transfer_history_factor = nullptr; - // extract info from GSM classes listed in style_gsm.h + // extract info from GranSubMod classes listed in style_gran_sub_mod.h nclass = 0; -#define GSM_CLASS -#define GSMStyle(key,Class,type) nclass++; -#include "style_gsm.h" // IWYU pragma: keep -#undef GSMStyle -#undef GSM_CLASS +#define GRANSUBMOD_CLASS +#define GranSubModStyle(key,Class,type) nclass++; +#include "style_gran_sub_mod.h" // IWYU pragma: keep +#undef GranSubModStyle +#undef GRANSUBMOD_CLASS - gsmclass = new GSMCreator[nclass]; - gsmnames = new char*[nclass]; - gsmtypes = new int[nclass]; + gran_sub_mod_class = new GranSubModCreator[nclass]; + gran_sub_mod_names = new char*[nclass]; + gran_sub_mod_types = new int[nclass]; nclass = 0; -#define GSM_CLASS -#define GSMStyle(key,Class,type) \ - gsmclass[nclass] = &gsm_creator; \ - gsmnames[nclass] = (char *) #key; \ - gsmtypes[nclass++] = type; -#include "style_gsm.h" // IWYU pragma: keep -#undef GSMStyle -#undef GSM_CLASS +#define GRANSUBMOD_CLASS +#define GranSubModStyle(key,Class,type) \ + gran_sub_mod_class[nclass] = &gran_sub_mod_creator; \ + gran_sub_mod_names[nclass] = (char *) #key; \ + gran_sub_mod_types[nclass++] = type; +#include "style_gran_sub_mod.h" // IWYU pragma: keep +#undef GranSubModStyle +#undef GRANSUBMOD_CLASS } /* ---------------------------------------------------------------------- */ @@ -94,9 +94,9 @@ GranularModel::GranularModel(LAMMPS *lmp) : Pointers(lmp) GranularModel::~GranularModel() { delete [] transfer_history_factor; - delete [] gsmclass; - delete [] gsmnames; - delete [] gsmtypes; + delete [] gran_sub_mod_class; + delete [] gran_sub_mod_names; + delete [] gran_sub_mod_types; for (int i = 0; i < NSUBMODELS; i ++) delete sub_models[i]; } @@ -132,11 +132,11 @@ void GranularModel::construct_submodel(std::string model_name, SubmodelType mode { int i; for (i = 0; i < nclass; i++) { - if (gsmtypes[i] == model_type) { - if (strcmp(gsmnames[i], model_name.c_str()) == 0) { - GSMCreator &gsm_creator = gsmclass[i]; + if (gran_sub_mod_types[i] == model_type) { + if (strcmp(gran_sub_mod_names[i], model_name.c_str()) == 0) { + GranSubModCreator &gran_sub_mod_creator = gran_sub_mod_class[i]; delete sub_models[model_type]; - sub_models[model_type] = gsm_creator(this, lmp); + sub_models[model_type] = gran_sub_mod_creator(this, lmp); break; } } @@ -148,12 +148,12 @@ void GranularModel::construct_submodel(std::string model_name, SubmodelType mode sub_models[model_type]->name.assign(model_name); sub_models[model_type]->allocate_coeffs(); - if (model_type == NORMAL) normal_model = dynamic_cast (sub_models[NORMAL]); - if (model_type == DAMPING) damping_model = dynamic_cast (sub_models[DAMPING]); - if (model_type == TANGENTIAL) tangential_model = dynamic_cast (sub_models[TANGENTIAL]); - if (model_type == ROLLING) rolling_model = dynamic_cast (sub_models[ROLLING]); - if (model_type == TWISTING) twisting_model = dynamic_cast (sub_models[TWISTING]); - if (model_type == HEAT) heat_model = dynamic_cast (sub_models[HEAT]); + if (model_type == NORMAL) normal_model = dynamic_cast (sub_models[NORMAL]); + if (model_type == DAMPING) damping_model = dynamic_cast (sub_models[DAMPING]); + if (model_type == TANGENTIAL) tangential_model = dynamic_cast (sub_models[TANGENTIAL]); + if (model_type == ROLLING) rolling_model = dynamic_cast (sub_models[ROLLING]); + if (model_type == TWISTING) twisting_model = dynamic_cast (sub_models[TWISTING]); + if (model_type == HEAT) heat_model = dynamic_cast (sub_models[HEAT]); } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h index 3ea3d9e4b3..de4f82c01e 100644 --- a/src/GRANULAR/granular_model.h +++ b/src/GRANULAR/granular_model.h @@ -19,8 +19,6 @@ namespace LAMMPS_NS { namespace Granular_NS { -#define EPSILON 1e-10 - enum SubmodelType { NORMAL = 0, DAMPING, @@ -38,13 +36,13 @@ enum ContactType { }; // forward declarations -class GSM; -class GSMNormal; -class GSMDamping; -class GSMTangential; -class GSMRolling; -class GSMTwisting; -class GSMHeat; +class GranSubMod; +class GranSubModNormal; +class GranSubModDamping; +class GranSubModTangential; +class GranSubModRolling; +class GranSubModTwisting; +class GranSubModHeat; class GranularModel : protected Pointers { public: @@ -64,13 +62,13 @@ class GranularModel : protected Pointers { void read_restart(FILE *); // Sub models - GSMNormal *normal_model; - GSMDamping *damping_model; - GSMTangential *tangential_model; - GSMRolling *rolling_model; - GSMTwisting *twisting_model; - GSMHeat *heat_model; - GSM *sub_models[NSUBMODELS]; // Need to resize if we add more model flavors + GranSubModNormal *normal_model; + GranSubModDamping *damping_model; + GranSubModTangential *tangential_model; + GranSubModRolling *rolling_model; + GranSubModTwisting *twisting_model; + GranSubModHeat *heat_model; + GranSubMod *sub_models[NSUBMODELS]; // Need to resize if we add more model flavors // Extra options int beyond_contact, limit_damping, history_update; @@ -102,10 +100,10 @@ class GranularModel : protected Pointers { int nclass; - typedef class GSM *(*GSMCreator)(class GranularModel *, class LAMMPS *); - GSMCreator *gsmclass; - char **gsmnames; - int *gsmtypes; + typedef class GranSubMod *(*GranSubModCreator)(class GranularModel *, class LAMMPS *); + GranSubModCreator *gran_sub_mod_class; + char **gran_sub_mod_names; + int *gran_sub_mod_types; }; } // namespace Granular_NS diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index dcac8e32c3..b6c9bba705 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -23,7 +23,7 @@ #include "atom.h" #include "comm.h" #include "granular_model.h" -#include "gsm.h" +#include "gran_sub_mod.h" #include "error.h" #include "fix.h" #include "fix_dummy.h" diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index 9ae02a200a..956717d598 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -20,12 +20,15 @@ PairStyle(granular,PairGranular); #ifndef LMP_PAIR_GRANULAR_H #define LMP_PAIR_GRANULAR_H -#include "granular_model.h" #include "pair.h" #include namespace LAMMPS_NS { +namespace Granular_NS { + class GranularModel; +} + class PairGranular : public Pair { public: PairGranular(class LAMMPS *); @@ -73,7 +76,7 @@ class PairGranular : public Pair { // granular models int nmodels, maxmodels; - Granular_NS::GranularModel** models_list; + class Granular_NS::GranularModel** models_list; int **types_indices; // optional user-specified global cutoff, per-type user-specified cutoffs diff --git a/src/Make.sh b/src/Make.sh index da034f8226..8f63adea4a 100755 --- a/src/Make.sh +++ b/src/Make.sh @@ -95,27 +95,27 @@ cmd=$1 if (test $cmd = "style") || (test $cmd = "packages") then - $cmd ANGLE_CLASS angle_ angle force - $cmd ATOM_CLASS atom_vec_ atom atom atom_vec_hybrid - $cmd BODY_CLASS body_ body atom_vec_body - $cmd BOND_CLASS bond_ bond force - $cmd COMMAND_CLASS "" command input - $cmd COMPUTE_CLASS compute_ compute modify - $cmd DIHEDRAL_CLASS dihedral_ dihedral force - $cmd DUMP_CLASS dump_ dump output write_dump - $cmd FIX_CLASS fix_ fix modify - $cmd GSM_CLASS gsm_ gsm granular_model - $cmd IMPROPER_CLASS improper_ improper force - $cmd INTEGRATE_CLASS "" integrate update - $cmd KSPACE_CLASS "" kspace force - $cmd MINIMIZE_CLASS min_ minimize update - $cmd NBIN_CLASS nbin_ nbin neighbor - $cmd NPAIR_CLASS npair_ npair neighbor - $cmd NSTENCIL_CLASS nstencil_ nstencil neighbor - $cmd NTOPO_CLASS ntopo_ ntopo neighbor - $cmd PAIR_CLASS pair_ pair force - $cmd READER_CLASS reader_ reader read_dump - $cmd REGION_CLASS region_ region domain + $cmd ANGLE_CLASS angle_ angle force + $cmd ATOM_CLASS atom_vec_ atom atom atom_vec_hybrid + $cmd BODY_CLASS body_ body atom_vec_body + $cmd BOND_CLASS bond_ bond force + $cmd COMMAND_CLASS "" command input + $cmd COMPUTE_CLASS compute_ compute modify + $cmd DIHEDRAL_CLASS dihedral_ dihedral force + $cmd DUMP_CLASS dump_ dump output write_dump + $cmd FIX_CLASS fix_ fix modify + $cmd GRAN_SUB_MOD_CLASS gran_sub_mod_ gran_sub_mod granular_model + $cmd IMPROPER_CLASS improper_ improper force + $cmd INTEGRATE_CLASS "" integrate update + $cmd KSPACE_CLASS "" kspace force + $cmd MINIMIZE_CLASS min_ minimize update + $cmd NBIN_CLASS nbin_ nbin neighbor + $cmd NPAIR_CLASS npair_ npair neighbor + $cmd NSTENCIL_CLASS nstencil_ nstencil neighbor + $cmd NTOPO_CLASS ntopo_ ntopo neighbor + $cmd PAIR_CLASS pair_ pair force + $cmd READER_CLASS reader_ reader read_dump + $cmd REGION_CLASS region_ region domain # edit Makefile.lib, for creating non-shared lib # called by "make makelib" From d6b5878dce42aa9bf1aac6f82daa92ccd6035e2c Mon Sep 17 00:00:00 2001 From: jtclemm Date: Thu, 10 Nov 2022 16:25:34 -0700 Subject: [PATCH 048/445] Adding/removing underscores --- src/GRANULAR/gran_sub_mod.h | 6 +++--- src/GRANULAR/gran_sub_mod_damping.h | 8 ++++---- src/GRANULAR/gran_sub_mod_heat.h | 8 ++++---- src/GRANULAR/gran_sub_mod_normal.h | 8 ++++---- src/GRANULAR/gran_sub_mod_rolling.h | 8 ++++---- src/GRANULAR/gran_sub_mod_tangential.h | 8 ++++---- src/GRANULAR/gran_sub_mod_twisting.h | 8 ++++---- src/GRANULAR/granular_model.cpp | 8 ++++---- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/GRANULAR/gran_sub_mod.h b/src/GRANULAR/gran_sub_mod.h index 78f4229b29..b2335e8cfb 100644 --- a/src/GRANULAR/gran_sub_mod.h +++ b/src/GRANULAR/gran_sub_mod.h @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef LMP_GRAN_SUB_MOD_H_ -#define LMP_GRAN_SUB_MOD_H_ +#ifndef LMP_GRAN_SUB_MOD_H +#define LMP_GRAN_SUB_MOD_H #include "granular_model.h" #include "pointers.h" // IWYU pragma: export @@ -59,4 +59,4 @@ class GranSubMod : protected Pointers { } // namespace GranularModel } // namespace LAMMPS_NS -#endif /* GRAN_SUB_MOD_H_ */ +#endif /* GRAN_SUB_MOD_H */ diff --git a/src/GRANULAR/gran_sub_mod_damping.h b/src/GRANULAR/gran_sub_mod_damping.h index 04316a950d..e5f4227ce8 100644 --- a/src/GRANULAR/gran_sub_mod_damping.h +++ b/src/GRANULAR/gran_sub_mod_damping.h @@ -35,8 +35,8 @@ GranSubModStyle(tsuji, // clang-format on #else -#ifndef GRAN_SUB_MOD_DAMPING_H_ -#define GRAN_SUB_MOD_DAMPING_H_ +#ifndef GRAN_SUB_MOD_DAMPING_H +#define GRAN_SUB_MOD_DAMPING_H #include "gran_sub_mod.h" #include "pointers.h" @@ -102,5 +102,5 @@ class GranSubModDampingTsuji : public GranSubModDamping { } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GRAN_SUB_MOD_DAMPING_H_ */ -#endif /*GRAN_SUB_MOD_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_DAMPING_H */ +#endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/gran_sub_mod_heat.h b/src/GRANULAR/gran_sub_mod_heat.h index 3520a41a06..a5408a0fc2 100644 --- a/src/GRANULAR/gran_sub_mod_heat.h +++ b/src/GRANULAR/gran_sub_mod_heat.h @@ -23,8 +23,8 @@ GranSubModStyle(area, // clang-format on #else -#ifndef GRAN_SUB_MOD_HEAT_H_ -#define GRAN_SUB_MOD_HEAT_H_ +#ifndef GRAN_SUB_MOD_HEAT_H +#define GRAN_SUB_MOD_HEAT_H #include "gran_sub_mod.h" @@ -62,5 +62,5 @@ class GranSubModHeatArea : public GranSubModHeat { } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GRAN_SUB_MOD_HEAT_H_ */ -#endif /*GRAN_SUB_MOD_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_HEAT_H */ +#endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/gran_sub_mod_normal.h b/src/GRANULAR/gran_sub_mod_normal.h index 8fb0c01d4b..49e7d012c4 100644 --- a/src/GRANULAR/gran_sub_mod_normal.h +++ b/src/GRANULAR/gran_sub_mod_normal.h @@ -39,8 +39,8 @@ GranSubModStyle(jkr, // clang-format on #else -#ifndef GRAN_SUB_MOD_NORMAL_H_ -#define GRAN_SUB_MOD_NORMAL_H_ +#ifndef GRAN_SUB_MOD_NORMAL_H +#define GRAN_SUB_MOD_NORMAL_H #include "gran_sub_mod.h" @@ -137,5 +137,5 @@ class GranSubModNormalJKR : public GranSubModNormal { } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GRAN_SUB_MOD_NORMAL_H_ */ -#endif /*GRAN_SUB_MOD_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_NORMAL_H */ +#endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/gran_sub_mod_rolling.h b/src/GRANULAR/gran_sub_mod_rolling.h index cb64c94219..5739067f50 100644 --- a/src/GRANULAR/gran_sub_mod_rolling.h +++ b/src/GRANULAR/gran_sub_mod_rolling.h @@ -23,8 +23,8 @@ GranSubModStyle(sds, // clang-format on #else -#ifndef GRAN_SUB_MOD_ROLLING_H_ -#define GRAN_SUB_MOD_ROLLING_H_ +#ifndef GRAN_SUB_MOD_ROLLING_H +#define GRAN_SUB_MOD_ROLLING_H #include "gran_sub_mod.h" @@ -62,5 +62,5 @@ class GranSubModRollingSDS : public GranSubModRolling { } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GRAN_SUB_MOD_ROLLING_H_ */ -#endif /*GRAN_SUB_MOD_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_ROLLING_H */ +#endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/gran_sub_mod_tangential.h b/src/GRANULAR/gran_sub_mod_tangential.h index 56d72f80d3..b5a195a1d6 100644 --- a/src/GRANULAR/gran_sub_mod_tangential.h +++ b/src/GRANULAR/gran_sub_mod_tangential.h @@ -51,8 +51,8 @@ GranSubModStyle(mindlin_rescale/force, // clang-format on #else -#ifndef GRAN_SUB_MOD_TANGENTIAL_H_ -#define GRAN_SUB_MOD_TANGENTIAL_H_ +#ifndef GRAN_SUB_MOD_TANGENTIAL_H +#define GRAN_SUB_MOD_TANGENTIAL_H #include "gran_sub_mod.h" @@ -153,5 +153,5 @@ class GranSubModTangentialMindlinRescaleForce : public GranSubModTangentialMindl } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GRAN_SUB_MOD_TANGENTIAL_H_ */ -#endif /*GRAN_SUB_MOD_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_TANGENTIAL_H */ +#endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/gran_sub_mod_twisting.h b/src/GRANULAR/gran_sub_mod_twisting.h index 7f8addec97..c365cba331 100644 --- a/src/GRANULAR/gran_sub_mod_twisting.h +++ b/src/GRANULAR/gran_sub_mod_twisting.h @@ -27,8 +27,8 @@ GranSubModStyle(sds, // clang-format on #else -#ifndef GRAN_SUB_MOD_TWISTING_H_ -#define GRAN_SUB_MOD_TWISTING_H_ +#ifndef GRAN_SUB_MOD_TWISTING_H +#define GRAN_SUB_MOD_TWISTING_H #include "gran_sub_mod.h" @@ -77,5 +77,5 @@ class GranSubModTwistingSDS : public GranSubModTwisting { } // namespace Granular_NS } // namespace LAMMPS_NS -#endif /*GRAN_SUB_MOD_TWISTING_H_ */ -#endif /*GRAN_SUB_MOD_CLASS_H_ */ +#endif /*GRAN_SUB_MOD_TWISTING_H */ +#endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp index 872bfa6c8d..47d84b2495 100644 --- a/src/GRANULAR/granular_model.cpp +++ b/src/GRANULAR/granular_model.cpp @@ -68,25 +68,25 @@ GranularModel::GranularModel(LAMMPS *lmp) : Pointers(lmp) nclass = 0; -#define GRANSUBMOD_CLASS +#define GRAN_SUB_MOD_CLASS #define GranSubModStyle(key,Class,type) nclass++; #include "style_gran_sub_mod.h" // IWYU pragma: keep #undef GranSubModStyle -#undef GRANSUBMOD_CLASS +#undef GRAN_SUB_MOD_CLASS gran_sub_mod_class = new GranSubModCreator[nclass]; gran_sub_mod_names = new char*[nclass]; gran_sub_mod_types = new int[nclass]; nclass = 0; -#define GRANSUBMOD_CLASS +#define GRAN_SUB_MOD_CLASS #define GranSubModStyle(key,Class,type) \ gran_sub_mod_class[nclass] = &gran_sub_mod_creator; \ gran_sub_mod_names[nclass] = (char *) #key; \ gran_sub_mod_types[nclass++] = type; #include "style_gran_sub_mod.h" // IWYU pragma: keep #undef GranSubModStyle -#undef GRANSUBMOD_CLASS +#undef GRAN_SUB_MOD_CLASS } /* ---------------------------------------------------------------------- */ From b2c5c1fda41966987064d6f19543ba2c416f7e6a Mon Sep 17 00:00:00 2001 From: jtclemm Date: Thu, 10 Nov 2022 21:06:47 -0700 Subject: [PATCH 049/445] Fixing cmake style header --- cmake/Modules/StyleHeaderUtils.cmake | 84 ++++++++++++++-------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/cmake/Modules/StyleHeaderUtils.cmake b/cmake/Modules/StyleHeaderUtils.cmake index d95e265c4a..2ce7c44d87 100644 --- a/cmake/Modules/StyleHeaderUtils.cmake +++ b/cmake/Modules/StyleHeaderUtils.cmake @@ -119,52 +119,52 @@ function(RegisterStyles search_path) endfunction(RegisterStyles) function(RegisterStylesExt search_path extension sources) - FindStyleHeadersExt(${search_path} ANGLE_CLASS ${extension} ANGLE ${sources}) - FindStyleHeadersExt(${search_path} ATOM_CLASS ${extension} ATOM_VEC ${sources}) - FindStyleHeadersExt(${search_path} BODY_CLASS ${extension} BODY ${sources}) - FindStyleHeadersExt(${search_path} BOND_CLASS ${extension} BOND ${sources}) - FindStyleHeadersExt(${search_path} COMMAND_CLASS ${extension} COMMAND ${sources}) - FindStyleHeadersExt(${search_path} COMPUTE_CLASS ${extension} COMPUTE ${sources}) - FindStyleHeadersExt(${search_path} DIHEDRAL_CLASS ${extension} DIHEDRAL ${sources}) - FindStyleHeadersExt(${search_path} DUMP_CLASS ${extension} DUMP ${sources}) - FindStyleHeadersExt(${search_path} FIX_CLASS ${extension} FIX ${sources}) - FindStyleHeadersExt(${search_path} GSM_CLASS ${extension} GSM ${sources}) - FindStyleHeadersExt(${search_path} IMPROPER_CLASS ${extension} IMPROPER ${sources}) - FindStyleHeadersExt(${search_path} INTEGRATE_CLASS ${extension} INTEGRATE ${sources}) - FindStyleHeadersExt(${search_path} KSPACE_CLASS ${extension} KSPACE ${sources}) - FindStyleHeadersExt(${search_path} MINIMIZE_CLASS ${extension} MINIMIZE ${sources}) - FindStyleHeadersExt(${search_path} NBIN_CLASS ${extension} NBIN ${sources}) - FindStyleHeadersExt(${search_path} NPAIR_CLASS ${extension} NPAIR ${sources}) - FindStyleHeadersExt(${search_path} NSTENCIL_CLASS ${extension} NSTENCIL ${sources}) - FindStyleHeadersExt(${search_path} NTOPO_CLASS ${extension} NTOPO ${sources}) - FindStyleHeadersExt(${search_path} PAIR_CLASS ${extension} PAIR ${sources}) - FindStyleHeadersExt(${search_path} READER_CLASS ${extension} READER ${sources}) - FindStyleHeadersExt(${search_path} REGION_CLASS ${extension} REGION ${sources}) + FindStyleHeadersExt(${search_path} ANGLE_CLASS ${extension} ANGLE ${sources}) + FindStyleHeadersExt(${search_path} ATOM_CLASS ${extension} ATOM_VEC ${sources}) + FindStyleHeadersExt(${search_path} BODY_CLASS ${extension} BODY ${sources}) + FindStyleHeadersExt(${search_path} BOND_CLASS ${extension} BOND ${sources}) + FindStyleHeadersExt(${search_path} COMMAND_CLASS ${extension} COMMAND ${sources}) + FindStyleHeadersExt(${search_path} COMPUTE_CLASS ${extension} COMPUTE ${sources}) + FindStyleHeadersExt(${search_path} DIHEDRAL_CLASS ${extension} DIHEDRAL ${sources}) + FindStyleHeadersExt(${search_path} DUMP_CLASS ${extension} DUMP ${sources}) + FindStyleHeadersExt(${search_path} FIX_CLASS ${extension} FIX ${sources}) + FindStyleHeadersExt(${search_path} GRAN_SUB_MOD_CLASS ${extension} GRAN_SUB_MOD ${sources}) + FindStyleHeadersExt(${search_path} IMPROPER_CLASS ${extension} IMPROPER ${sources}) + FindStyleHeadersExt(${search_path} INTEGRATE_CLASS ${extension} INTEGRATE ${sources}) + FindStyleHeadersExt(${search_path} KSPACE_CLASS ${extension} KSPACE ${sources}) + FindStyleHeadersExt(${search_path} MINIMIZE_CLASS ${extension} MINIMIZE ${sources}) + FindStyleHeadersExt(${search_path} NBIN_CLASS ${extension} NBIN ${sources}) + FindStyleHeadersExt(${search_path} NPAIR_CLASS ${extension} NPAIR ${sources}) + FindStyleHeadersExt(${search_path} NSTENCIL_CLASS ${extension} NSTENCIL ${sources}) + FindStyleHeadersExt(${search_path} NTOPO_CLASS ${extension} NTOPO ${sources}) + FindStyleHeadersExt(${search_path} PAIR_CLASS ${extension} PAIR ${sources}) + FindStyleHeadersExt(${search_path} READER_CLASS ${extension} READER ${sources}) + FindStyleHeadersExt(${search_path} REGION_CLASS ${extension} REGION ${sources}) endfunction(RegisterStylesExt) function(GenerateStyleHeaders output_path) message(STATUS "Generating style headers...") - GenerateStyleHeader(${output_path} ANGLE angle ) # force - GenerateStyleHeader(${output_path} ATOM_VEC atom ) # atom atom_vec_hybrid - GenerateStyleHeader(${output_path} BODY body ) # atom_vec_body - GenerateStyleHeader(${output_path} BOND bond ) # force - GenerateStyleHeader(${output_path} COMMAND command ) # input - GenerateStyleHeader(${output_path} COMPUTE compute ) # modify - GenerateStyleHeader(${output_path} DIHEDRAL dihedral ) # force - GenerateStyleHeader(${output_path} DUMP dump ) # output write_dump - GenerateStyleHeader(${output_path} FIX fix ) # modify - GenerateStyleHeader(${output_path} GSM gsm ) # granular_model - GenerateStyleHeader(${output_path} IMPROPER improper ) # force - GenerateStyleHeader(${output_path} INTEGRATE integrate ) # update - GenerateStyleHeader(${output_path} KSPACE kspace ) # force - GenerateStyleHeader(${output_path} MINIMIZE minimize ) # update - GenerateStyleHeader(${output_path} NBIN nbin ) # neighbor - GenerateStyleHeader(${output_path} NPAIR npair ) # neighbor - GenerateStyleHeader(${output_path} NSTENCIL nstencil ) # neighbor - GenerateStyleHeader(${output_path} NTOPO ntopo ) # neighbor - GenerateStyleHeader(${output_path} PAIR pair ) # force - GenerateStyleHeader(${output_path} READER reader ) # read_dump - GenerateStyleHeader(${output_path} REGION region ) # domain + GenerateStyleHeader(${output_path} ANGLE angle ) # force + GenerateStyleHeader(${output_path} ATOM_VEC atom ) # atom atom_vec_hybrid + GenerateStyleHeader(${output_path} BODY body ) # atom_vec_body + GenerateStyleHeader(${output_path} BOND bond ) # force + GenerateStyleHeader(${output_path} COMMAND command ) # input + GenerateStyleHeader(${output_path} COMPUTE compute ) # modify + GenerateStyleHeader(${output_path} DIHEDRAL dihedral ) # force + GenerateStyleHeader(${output_path} DUMP dump ) # output write_dump + GenerateStyleHeader(${output_path} FIX fix ) # modify + GenerateStyleHeader(${output_path} GRAN_SUB_MOD gran_sub_mod ) # granular_model + GenerateStyleHeader(${output_path} IMPROPER improper ) # force + GenerateStyleHeader(${output_path} INTEGRATE integrate ) # update + GenerateStyleHeader(${output_path} KSPACE kspace ) # force + GenerateStyleHeader(${output_path} MINIMIZE minimize ) # update + GenerateStyleHeader(${output_path} NBIN nbin ) # neighbor + GenerateStyleHeader(${output_path} NPAIR npair ) # neighbor + GenerateStyleHeader(${output_path} NSTENCIL nstencil ) # neighbor + GenerateStyleHeader(${output_path} NTOPO ntopo ) # neighbor + GenerateStyleHeader(${output_path} PAIR pair ) # force + GenerateStyleHeader(${output_path} READER reader ) # read_dump + GenerateStyleHeader(${output_path} REGION region ) # domain endfunction(GenerateStyleHeaders) function(DetectBuildSystemConflict lammps_src_dir) From 5f0fff58ac133135821103a8a6559fd17aac8cf1 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Mon, 14 Nov 2022 21:16:03 -0700 Subject: [PATCH 050/445] fixing broken doc references --- doc/src/Commands_fix.rst | 2 +- doc/src/Howto_granular.rst | 4 ++-- doc/src/fix.rst | 2 +- doc/src/pair_granular.rst | 5 +++-- src/GRANULAR/granular_model.cpp | 1 - 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index ec8174a370..604280c73c 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -91,6 +91,7 @@ OPT. * :doc:`grem ` * :doc:`halt ` * :doc:`heat ` + * :doc:`heat/flow/sphere/temp ` * :doc:`hyper/global ` * :doc:`hyper/local ` * :doc:`imd ` @@ -235,7 +236,6 @@ OPT. * :doc:`temp/berendsen ` * :doc:`temp/csld ` * :doc:`temp/csvr ` - * :doc:`temp/integrate ` * :doc:`temp/rescale ` * :doc:`temp/rescale/eff ` * :doc:`tfmc ` diff --git a/doc/src/Howto_granular.rst b/doc/src/Howto_granular.rst index af52904204..6a2346746b 100644 --- a/doc/src/Howto_granular.rst +++ b/doc/src/Howto_granular.rst @@ -46,7 +46,7 @@ atoms, and should be used for granular system instead of the fix style To model heat conduction, one must use the atom style: * :doc:`atom_style sphere/temp ` a temperature integration fix -* :doc:`fix temp/integrate ` +* :doc:`fix heat/flow/sphere/temp ` and a heat conduction option defined in both * :doc:`pair_style granular ` * :doc:`fix wall/gran ` @@ -65,4 +65,4 @@ computations between frozen atoms by using this command: doc page, where 2d simulations are discussed. To add custom granular contact models, see the -:doc:`modifying granular submodels page `. +:doc:`modifying granular sub-models page `. diff --git a/doc/src/fix.rst b/doc/src/fix.rst index 461cfc1465..b87a151061 100644 --- a/doc/src/fix.rst +++ b/doc/src/fix.rst @@ -238,6 +238,7 @@ accelerated styles exist. * :doc:`grem ` - implements the generalized replica exchange method * :doc:`halt ` - terminate a dynamics run or minimization * :doc:`heat ` - add/subtract momentum-conserving heat +* :doc:`heat/flow/sphere/temp ` - plain time integration of heat flow with per-atom temperature updates * :doc:`hyper/global ` - global hyperdynamics * :doc:`hyper/local ` - local hyperdynamics * :doc:`imd ` - implements the "Interactive MD" (IMD) protocol @@ -382,7 +383,6 @@ accelerated styles exist. * :doc:`temp/berendsen ` - temperature control by Berendsen thermostat * :doc:`temp/csld ` - canonical sampling thermostat with Langevin dynamics * :doc:`temp/csvr ` - canonical sampling thermostat with Hamiltonian dynamics -* :doc:`temp/integrate ` - plain time integration with per-atom temperature updates * :doc:`temp/rescale ` - temperature control by velocity rescaling * :doc:`temp/rescale/eff ` - temperature control by velocity rescaling in the electron force field model * :doc:`tfmc ` - perform force-bias Monte Carlo with time-stamped method diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index cb044252da..491061b5fb 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -659,8 +659,9 @@ where :math:`\Delta T` is the difference in the two particles' temperature, :math:`a` is the area of the contact and depends on the normal force model. Note that the option *none* must either be used in all or none of of the -*pair_coeff* calls. See :doc:`fix temp/integrate ` for -more information on this option. +*pair_coeff* calls. See +:doc:`fix heat/flow/sphere/temp ` for more +information on this option. ---------- diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp index 47d84b2495..5d89e22d03 100644 --- a/src/GRANULAR/granular_model.cpp +++ b/src/GRANULAR/granular_model.cpp @@ -409,7 +409,6 @@ void GranularModel::calculate_forces() vrel = len3(vtr); // calculate forces/torques - forces[0] = 0.0; double Fdamp, dist_to_contact; if (area_flag) area = normal_model->calculate_area(); From f51ab2c4401c9fe6e01e7b3cb72bf97bacb4b200 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 16 Nov 2022 16:36:22 -0700 Subject: [PATCH 051/445] Restarting limit_damping, other minor simplifications/cleanups --- examples/granular/in.pour.drum | 2 +- src/GRANULAR/fix_wall_gran.cpp | 32 ++++++++--------- src/GRANULAR/fix_wall_gran.h | 3 +- src/GRANULAR/fix_wall_gran_region.cpp | 2 +- src/GRANULAR/gran_sub_mod.h | 4 +-- src/GRANULAR/gran_sub_mod_damping.cpp | 2 +- src/GRANULAR/gran_sub_mod_damping.h | 2 -- src/GRANULAR/gran_sub_mod_heat.h | 2 -- src/GRANULAR/gran_sub_mod_normal.h | 4 +-- src/GRANULAR/gran_sub_mod_rolling.h | 2 -- src/GRANULAR/gran_sub_mod_tangential.h | 4 --- src/GRANULAR/gran_sub_mod_twisting.h | 4 +-- src/GRANULAR/granular_model.cpp | 44 ++++++++++++----------- src/GRANULAR/granular_model.h | 8 ++--- src/GRANULAR/pair_granular.cpp | 50 +++++++++++--------------- 15 files changed, 72 insertions(+), 93 deletions(-) diff --git a/examples/granular/in.pour.drum b/examples/granular/in.pour.drum index e0a0455f61..6c93b700d6 100644 --- a/examples/granular/in.pour.drum +++ b/examples/granular/in.pour.drum @@ -44,7 +44,7 @@ change_box all boundary p p f pair_style granular pair_coeff 1 * hertz/material 1e5 0.2 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji -pair_coeff 2 2 jkr 1e5 0.1 0.3 50 tangential mindlin NULL 1.0 0.5 rolling sds 1e3 1e3 0.1 twisting marshall damping tsuji +pair_coeff 2 2 jkr 1e5 0.1 0.3 50 tangential mindlin NULL 1.0 0.5 rolling sds 1e3 1e3 0.1 twisting marshall variable theta equal 0 diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index fe2286a0fa..3afb0dc60e 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -67,11 +67,9 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : model = new GranularModel(lmp); model->contact_type = WALL; - if (strcmp(arg[3],"granular") == 0) classic_flag = 0; - else classic_flag = 1; - limit_damping = 0; heat_flag = 0; - int Twall_defined = 0; + int classic_flag = 1; + if (strcmp(arg[3],"granular") == 0) classic_flag = 0; // wall/particle coefficients @@ -117,10 +115,9 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : } } - // Define default damping model if unspecified, takes no args + // Define default damping submodel if unspecified, takes no args if (!model->damping_model) model->construct_submodel("viscoelastic", DAMPING); - model->init(); size_history = model->size_history; @@ -177,6 +174,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : wiggle = 0; wshear = 0; peratom_flag = 0; + int Twall_defined = 0; while (iarg < narg) { if (strcmp(arg[iarg],"wiggle") == 0) { @@ -216,7 +214,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : } if (heat_flag != Twall_defined) - error->all(FLERR, "To model conduction, must define both heat model and wall temperature"); + error->all(FLERR, "Must define wall temperature with heat model"); if (wallstyle == NOSTYLE) error->all(FLERR,"No wall style defined"); @@ -376,6 +374,7 @@ void FixWallGran::post_force(int /*vflag*/) history_update = 1; if (update->setupflag) history_update = 0; + model->history_update = history_update; // if just reneighbored: // update rigid body masses for owned atoms if using FixRigid @@ -407,10 +406,10 @@ void FixWallGran::post_force(int /*vflag*/) if (wiggle) { double arg = omega * (update->ntimestep - time_origin) * dt; if (wallstyle == axis) { - wlo = lo + amplitude - amplitude*cos(arg); - whi = hi + amplitude - amplitude*cos(arg); + wlo = lo + amplitude - amplitude * cos(arg); + whi = hi + amplitude - amplitude * cos(arg); } - vwall[axis] = amplitude*omega*sin(arg); + vwall[axis] = amplitude * omega * sin(arg); } else if (wshear) vwall[axis] = vshear; // loop over all my atoms @@ -473,19 +472,19 @@ void FixWallGran::post_force(int /*vflag*/) if (del1 < del2) dz = del1; else dz = -del2; } else if (wallstyle == ZCYLINDER) { - delxy = sqrt(x[i][0]*x[i][0] + x[i][1]*x[i][1]); + delxy = sqrt(x[i][0] * x[i][0] + x[i][1] * x[i][1]); delr = cylradius - delxy; if (delr > radius[i]) { dz = cylradius; rwall = 0.0; } else { - dx = -delr/delxy * x[i][0]; - dy = -delr/delxy * x[i][1]; + dx = -delr / delxy * x[i][0]; + dy = -delr / delxy * x[i][1]; // rwall = -2r_c if inside cylinder, 2r_c outside - rwall = (delxy < cylradius) ? -2*cylradius : 2*cylradius; + rwall = (delxy < cylradius) ? -2 * cylradius : 2 * cylradius; if (wshear && axis != 2) { - vwall[0] += vshear * x[i][1]/delxy; - vwall[1] += -vshear * x[i][0]/delxy; + vwall[0] += vshear * x[i][1] / delxy; + vwall[1] += -vshear * x[i][0] / delxy; vwall[2] = 0.0; } } @@ -521,7 +520,6 @@ void FixWallGran::post_force(int /*vflag*/) model->meff = meff; model->vi = v[i]; model->omegai = omega[i]; - model->history_update = history_update; if (use_history) model->history = history_one[i]; if (heat_flag) model->Ti = temperature[i]; diff --git a/src/GRANULAR/fix_wall_gran.h b/src/GRANULAR/fix_wall_gran.h index 16a2fe5dc0..45e4e43844 100644 --- a/src/GRANULAR/fix_wall_gran.h +++ b/src/GRANULAR/fix_wall_gran.h @@ -53,7 +53,7 @@ class FixWallGran : public Fix { protected: int wallstyle, wiggle, wshear, axis; - int classic_flag, nlevels_respa; + int nlevels_respa; bigint time_origin; // for granular model choices @@ -69,7 +69,6 @@ class FixWallGran : public Fix { int history_update; // flag for whether shear history is updated int size_history; // # of shear history values per contact int heat_flag; - int limit_damping; int tvar; char *tstr; diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 7ee794133c..f7b772cb7f 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -135,6 +135,7 @@ void FixWallGranRegion::post_force(int /*vflag*/) history_update = 1; if (update->setupflag) history_update = 0; + model->history_update = history_update; // if just reneighbored: // update rigid body masses for owned atoms if using FixRigid @@ -262,7 +263,6 @@ void FixWallGranRegion::post_force(int /*vflag*/) model->meff = meff; model->vi = v[i]; model->omegai = omega[i]; - model->history_update = history_update; if (use_history) model->history = history_many[i][c2r[ic]]; if (heat_flag) model->Ti = temperature[i]; diff --git a/src/GRANULAR/gran_sub_mod.h b/src/GRANULAR/gran_sub_mod.h index b2335e8cfb..22f1f4e85a 100644 --- a/src/GRANULAR/gran_sub_mod.h +++ b/src/GRANULAR/gran_sub_mod.h @@ -29,8 +29,8 @@ class GranSubMod : protected Pointers { double *coeffs; void read_restart(); virtual void mix_coeffs(double*, double*); - virtual void coeffs_to_local() = 0; - virtual void init() = 0; // called after all submodel coeffs defined + virtual void coeffs_to_local() {}; + virtual void init() {}; // called after all submodels + coeffs defined void allocate_coeffs(); std::string name; diff --git a/src/GRANULAR/gran_sub_mod_damping.cpp b/src/GRANULAR/gran_sub_mod_damping.cpp index e78233735a..820d552679 100644 --- a/src/GRANULAR/gran_sub_mod_damping.cpp +++ b/src/GRANULAR/gran_sub_mod_damping.cpp @@ -108,7 +108,7 @@ void GranSubModDampingTsuji::init() { double tmp = gm->normal_model->damp; damp = 1.2728 - 4.2783 * tmp + 11.087 * square(tmp); - damp += -22.348 * cube(tmp)+ 27.467 * powint(tmp, 4); + damp += -22.348 * cube(tmp) + 27.467 * powint(tmp, 4); damp += -18.022 * powint(tmp, 5) + 4.8218 * powint(tmp,6); } diff --git a/src/GRANULAR/gran_sub_mod_damping.h b/src/GRANULAR/gran_sub_mod_damping.h index e5f4227ce8..5d245c384d 100644 --- a/src/GRANULAR/gran_sub_mod_damping.h +++ b/src/GRANULAR/gran_sub_mod_damping.h @@ -48,8 +48,6 @@ class GranSubModDamping : public GranSubMod { public: GranSubModDamping(class GranularModel *, class LAMMPS *); ~GranSubModDamping() {}; - virtual void coeffs_to_local() {}; - virtual void mix_coeffs(double*, double*) {}; virtual void init(); virtual double calculate_forces() = 0; double damp_prefactor; // Used by tangential models diff --git a/src/GRANULAR/gran_sub_mod_heat.h b/src/GRANULAR/gran_sub_mod_heat.h index a5408a0fc2..ca7e82313a 100644 --- a/src/GRANULAR/gran_sub_mod_heat.h +++ b/src/GRANULAR/gran_sub_mod_heat.h @@ -35,8 +35,6 @@ class GranSubModHeat : public GranSubMod { public: GranSubModHeat(class GranularModel *, class LAMMPS *); ~GranSubModHeat() {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; virtual double calculate_heat() = 0; }; diff --git a/src/GRANULAR/gran_sub_mod_normal.h b/src/GRANULAR/gran_sub_mod_normal.h index 49e7d012c4..7dd9f82349 100644 --- a/src/GRANULAR/gran_sub_mod_normal.h +++ b/src/GRANULAR/gran_sub_mod_normal.h @@ -51,8 +51,6 @@ class GranSubModNormal : public GranSubMod { public: GranSubModNormal(class GranularModel *, class LAMMPS *); ~GranSubModNormal() {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; virtual bool touch(); virtual double pulloff_distance(double, double); virtual double calculate_area(); @@ -60,7 +58,7 @@ class GranSubModNormal : public GranSubMod { virtual void set_fncrit(); double damp; // argument historically needed by damping double Emod, poiss; - double Fncrit, knfac; + double Fncrit; int material_properties, cohesive_flag; }; diff --git a/src/GRANULAR/gran_sub_mod_rolling.h b/src/GRANULAR/gran_sub_mod_rolling.h index 5739067f50..980daeca89 100644 --- a/src/GRANULAR/gran_sub_mod_rolling.h +++ b/src/GRANULAR/gran_sub_mod_rolling.h @@ -35,8 +35,6 @@ class GranSubModRolling : public GranSubMod { public: GranSubModRolling(class GranularModel *, class LAMMPS *); ~GranSubModRolling() {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; virtual void calculate_forces() = 0; }; diff --git a/src/GRANULAR/gran_sub_mod_tangential.h b/src/GRANULAR/gran_sub_mod_tangential.h index b5a195a1d6..27588d49ba 100644 --- a/src/GRANULAR/gran_sub_mod_tangential.h +++ b/src/GRANULAR/gran_sub_mod_tangential.h @@ -63,8 +63,6 @@ class GranSubModTangential : public GranSubMod { public: GranSubModTangential(class GranularModel *, class LAMMPS *); virtual ~GranSubModTangential() {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; virtual void calculate_forces() = 0; double k, damp, mu; // Used by Marshall twisting model }; @@ -105,8 +103,6 @@ class GranSubModTangentialLinearHistoryClassic : public GranSubModTangentialLine public: GranSubModTangentialLinearHistoryClassic(class GranularModel *, class LAMMPS *); void calculate_forces(); - protected: - double xt; }; /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/gran_sub_mod_twisting.h b/src/GRANULAR/gran_sub_mod_twisting.h index c365cba331..46f56d37ce 100644 --- a/src/GRANULAR/gran_sub_mod_twisting.h +++ b/src/GRANULAR/gran_sub_mod_twisting.h @@ -39,8 +39,6 @@ class GranSubModTwisting : public GranSubMod { public: GranSubModTwisting(class GranularModel *, class LAMMPS *); virtual ~GranSubModTwisting() {}; - virtual void coeffs_to_local() {}; - virtual void init() {}; virtual void calculate_forces() = 0; }; @@ -57,8 +55,8 @@ class GranSubModTwistingNone : public GranSubModTwisting { class GranSubModTwistingMarshall : public GranSubModTwisting { public: GranSubModTwistingMarshall(class GranularModel *, class LAMMPS *); + void init() override; void calculate_forces(); - void init(); protected: double k_tang, mu_tang; }; diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp index 5d89e22d03..afb3328d70 100644 --- a/src/GRANULAR/granular_model.cpp +++ b/src/GRANULAR/granular_model.cpp @@ -148,12 +148,13 @@ void GranularModel::construct_submodel(std::string model_name, SubmodelType mode sub_models[model_type]->name.assign(model_name); sub_models[model_type]->allocate_coeffs(); - if (model_type == NORMAL) normal_model = dynamic_cast (sub_models[NORMAL]); - if (model_type == DAMPING) damping_model = dynamic_cast (sub_models[DAMPING]); - if (model_type == TANGENTIAL) tangential_model = dynamic_cast (sub_models[TANGENTIAL]); - if (model_type == ROLLING) rolling_model = dynamic_cast (sub_models[ROLLING]); - if (model_type == TWISTING) twisting_model = dynamic_cast (sub_models[TWISTING]); - if (model_type == HEAT) heat_model = dynamic_cast (sub_models[HEAT]); + // Assign specific submodel pointer + if (model_type == NORMAL) normal_model = dynamic_cast (sub_models[model_type]); + if (model_type == DAMPING) damping_model = dynamic_cast (sub_models[model_type]); + if (model_type == TANGENTIAL) tangential_model = dynamic_cast (sub_models[model_type]); + if (model_type == ROLLING) rolling_model = dynamic_cast (sub_models[model_type]); + if (model_type == TWISTING) twisting_model = dynamic_cast (sub_models[model_type]); + if (model_type == HEAT) heat_model = dynamic_cast (sub_models[model_type]); } /* ---------------------------------------------------------------------- */ @@ -248,7 +249,8 @@ void GranularModel::init() beyond_contact = 1; size_history += sub_models[i]->size_history; if (!sub_models[i]->allow_cohesion && normal_model->cohesive_flag) - error->all(FLERR,"Cannot use {} model with a cohesive normal model, {}", sub_models[i]->name, normal_model->name); + error->all(FLERR,"Cannot use {} model with a cohesive normal model, {}", + sub_models[i]->name, normal_model->name); if (sub_models[i]->area_flag) area_flag = 1; } @@ -260,14 +262,14 @@ void GranularModel::init() int j; for (int i = 0; i < size_history; i++) { - // Find which model owns this history value + // Find which submodel owns this history value size_cumulative = 0; for (j = 0; j < NSUBMODELS; j++) { if ((size_cumulative + sub_models[j]->size_history) > i) break; size_cumulative += sub_models[j]->size_history; } - // Check if model has nondefault transfers, if so copy its array + // Check if submodel has nondefault transfers, if so copy its array transfer_history_factor[i] = -1; if (j != NSUBMODELS) { if (sub_models[j]->nondefault_history_transfer) { @@ -284,8 +286,7 @@ void GranularModel::init() int GranularModel::mix_coeffs(GranularModel *g1, GranularModel *g2) { - int i; - for (i = 0; i < NSUBMODELS; i++) { + for (int i = 0; i < NSUBMODELS; i++) { if (g1->sub_models[i]->name != g2->sub_models[i]->name) return i; construct_submodel(g1->sub_models[i]->name, (SubmodelType) i); @@ -311,6 +312,8 @@ void GranularModel::write_restart(FILE *fp) fwrite(&num_coeffs, sizeof(int), 1, fp); fwrite(sub_models[i]->coeffs, sizeof(double), num_coeffs, fp); } + + fwrite(&limit_damping, sizeof(int), 1, fp); } /* ---------------------------------------------------------------------- */ @@ -328,22 +331,23 @@ void GranularModel::read_restart(FILE *fp) if (comm->me == 0) utils::sfread(FLERR, const_cast(model_name.data()), sizeof(char),num_char, fp, nullptr, error); MPI_Bcast(const_cast(model_name.data()), num_char, MPI_CHAR, 0, world); - construct_submodel(model_name, (SubmodelType) i); - if (comm->me == 0) { + if (comm->me == 0) utils::sfread(FLERR, &num_coeff, sizeof(int), 1, fp, nullptr, error); - if (num_coeff != sub_models[i]->num_coeffs) - error->one(FLERR, "Invalid granular model written to restart file"); - } MPI_Bcast(&num_coeff, 1, MPI_INT, 0, world); + if (num_coeff != sub_models[i]->num_coeffs) + error->all(FLERR, "Invalid granular model written to restart file"); - if (comm->me == 0) { + if (comm->me == 0) utils::sfread(FLERR, sub_models[i]->coeffs, sizeof(double), num_coeff, fp, nullptr, error); - } MPI_Bcast(sub_models[i]->coeffs, num_coeff, MPI_DOUBLE, 0, world); sub_models[i]->coeffs_to_local(); } + + if (comm->me == 0) + utils::sfread(FLERR, &limit_damping, sizeof(int), 1, fp, nullptr, error); + MPI_Bcast(&limit_damping, 1, MPI_INT, 0, world); } /* ---------------------------------------------------------------------- */ @@ -393,7 +397,7 @@ void GranularModel::calculate_forces() sub3(vi, vj, vr); // normal component - vnnr = dot3(vr, nx); //v_R . n + vnnr = dot3(vr, nx); scale3(vnnr, nx, vn); // tangential component @@ -433,7 +437,7 @@ void GranularModel::calculate_forces() if (contact_type == PAIR) { copy3(torquesi, torquesj); - // Classic pair styles wouldn't scale, but classic option is only used by walls + // Classic pair styles don't scale, but classic option is currently only used by walls dist_to_contact = radi - 0.5 * delta; scale3(dist_to_contact, torquesi); dist_to_contact = radj - 0.5 * delta; diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h index de4f82c01e..a047bc27e5 100644 --- a/src/GRANULAR/granular_model.h +++ b/src/GRANULAR/granular_model.h @@ -68,7 +68,7 @@ class GranularModel : protected Pointers { GranSubModRolling *rolling_model; GranSubModTwisting *twisting_model; GranSubModHeat *heat_model; - GranSubMod *sub_models[NSUBMODELS]; // Need to resize if we add more model flavors + GranSubMod *sub_models[NSUBMODELS]; // Extra options int beyond_contact, limit_damping, history_update; @@ -94,9 +94,9 @@ class GranularModel : protected Pointers { bool touch; protected: - int rolling_defined, twisting_defined, heat_defined; // Used to quickly skip undefined submodels - int classic_model; - int area_flag; + int rolling_defined, twisting_defined, heat_defined; // Flag optional submodels + int classic_model; // Flag original pair/gran calculations + int area_flag; // Flag whether area is needed int nclass; diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index b6c9bba705..47bfa89da0 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -57,8 +57,6 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) svector = new double[single_extra]; neighprev = 0; - nmodels = 0; - maxmodels = 0; nmax = 0; mass_rigid = nullptr; @@ -302,6 +300,7 @@ void PairGranular::allocate() maxmodels = n * n + 1; // should never need any more space models_list = (GranularModel **) memory->smalloc(maxmodels * sizeof(GranularModel *), "pair:models_list"); for (int i = 0; i < maxmodels; i++) models_list[i] = nullptr; + nmodels = 0; onerad_dynamic = new double[n+1]; onerad_frozen = new double[n+1]; @@ -339,7 +338,6 @@ void PairGranular::coeff(int narg, char **arg) utils::bounds(FLERR,arg[0],1,atom->ntypes,ilo,ihi,error); utils::bounds(FLERR,arg[1],1,atom->ntypes,jlo,jhi,error); - // Construct new model models_list[nmodels] = new GranularModel(lmp); class GranularModel* model = models_list[nmodels]; @@ -374,9 +372,10 @@ void PairGranular::coeff(int narg, char **arg) } else error->all(FLERR, "Illegal pair_coeff command {}", arg[iarg]); } - // Define default damping model if unspecified, has no coeffs + // Define default damping submodel if unspecified, has no coeffs if (!model->damping_model) model->construct_submodel("viscoelastic", DAMPING); + model->init(); int count = 0; for (int i = ilo; i <= ihi; i++) { @@ -388,7 +387,7 @@ void PairGranular::coeff(int narg, char **arg) } } - // If there are > ntype^2 models, delete unused ones + // If there are > ntype^2 models, delete unused models if (nmodels == maxmodels) prune_models(); if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); @@ -419,7 +418,6 @@ void PairGranular::init_style() int size_max[NSUBMODELS] = {0}; for (int n = 0; n < nmodels; n++) { model = models_list[n]; - model->init(); if (model->beyond_contact) { beyond_contact = 1; @@ -559,7 +557,6 @@ double PairGranular::init_one(int i, int j) model1->sub_models[error_code]->name, model2->sub_models[error_code]->name); - // Initialize new model, init_one() occurs after init_style model->init(); for (int k = 0; k < NSUBMODELS; k++) @@ -657,8 +654,10 @@ void PairGranular::read_restart(FILE *fp) MPI_Bcast(&nmodels,1,MPI_INT,0,world); for (i = 0; i < nmodels; i++) { + delete models_list[i]; models_list[i] = new GranularModel(lmp); models_list[i]->read_restart(fp); + models_list[i]->init(); } for (i = 1; i <= atom->ntypes; i++) { @@ -690,28 +689,22 @@ double PairGranular::single(int i, int j, int itype, int jtype, double rsq, double /* factor_coul */, double factor_lj, double &fforce) { - if (factor_lj == 0) { fforce = 0.0; for (int m = 0; m < single_extra; m++) svector[m] = 0.0; return 0.0; } - int jnum; - int *jlist; - double *history,*allhistory; - int nall = atom->nlocal + atom->nghost; if ((i >= nall) || (j >= nall)) error->all(FLERR,"Not enough atoms for pair granular single function"); - int touchflag; - double **x = atom->x; - double *radius = atom->radius; - class GranularModel* model = models_list[types_indices[itype][jtype]]; // Reset model and copy initial geometric data + double **x = atom->x; + double *radius = atom->radius; + model->xi = x[i]; model->xj = x[j]; model->radi = radius[i]; @@ -719,8 +712,9 @@ double PairGranular::single(int i, int j, int itype, int jtype, model->history_update = 0; // Don't update history // If history is needed - jnum = list->numneigh[i]; - jlist = list->firstneigh[i]; + double *history,*allhistory; + int jnum = list->numneigh[i]; + int *jlist = list->firstneigh[i]; if (use_history) { if ((fix_history == nullptr) || (fix_history->firstvalue == nullptr)) error->one(FLERR,"Pair granular single computation needs history"); @@ -730,11 +724,11 @@ double PairGranular::single(int i, int j, int itype, int jtype, if (neighprev >= jnum) neighprev = 0; if (jlist[neighprev] == j) break; } - history = &allhistory[size_history*neighprev]; + history = &allhistory[size_history * neighprev]; model->touch = fix_history->firstflag[i][neighprev]; } - touchflag = model->check_contact(); + int touchflag = model->check_contact(); if (!touchflag) { fforce = 0.0; @@ -745,17 +739,16 @@ double PairGranular::single(int i, int j, int itype, int jtype, // meff = effective mass of pair of particles // if I or J part of rigid body, use body mass // if I or J is frozen, meff is other particle - double mi, mj, meff; double *rmass = atom->rmass; int *mask = atom->mask; - mi = rmass[i]; - mj = rmass[j]; + double mi = rmass[i]; + double mj = rmass[j]; if (fix_rigid) { if (mass_rigid[i] > 0.0) mi = mass_rigid[i]; if (mass_rigid[j] > 0.0) mj = mass_rigid[j]; } - meff = mi * mj / (mi + mj); + double meff = mi * mj / (mi + mj); if (mask[i] & freeze_group_bit) meff = mj; if (mask[j] & freeze_group_bit) meff = mi; @@ -770,11 +763,10 @@ double PairGranular::single(int i, int j, int itype, int jtype, model->omegaj = omega[j]; model->history = history; - double *forces, *torquesi, *torquesj; model->calculate_forces(); - forces = model->forces; - torquesi = model->torquesi; - torquesj = model->torquesj; + double *forces = model->forces; + double *torquesi = model->torquesi; + double *torquesj = model->torquesj; // apply forces & torques fforce = MathExtra::len3(forces); @@ -843,7 +835,7 @@ void PairGranular::transfer_history(double* source, double* target, int itype, i class GranularModel* model = models_list[types_indices[itype][jtype]]; if (model->nondefault_history_transfer) { for (int i = 0; i < size_history; i++) { - target[i] = model->transfer_history_factor[i] * source [i]; + target[i] = model->transfer_history_factor[i] * source[i]; } } else { for (int i = 0; i < size_history; i++) { From 1a467233fb1920f19d7caffcefa255d2d2e3688a Mon Sep 17 00:00:00 2001 From: jtclemm Date: Tue, 29 Nov 2022 12:24:43 -0700 Subject: [PATCH 052/445] adding examples, fixing wall algebra, updating labels --- src/GRANULAR/fix_wall_gran.cpp | 16 ++++++------ src/GRANULAR/gran_sub_mod.cpp | 24 +++++++++--------- src/GRANULAR/gran_sub_mod.h | 8 +++--- src/GRANULAR/granular_model.cpp | 44 ++++++++++++++++----------------- src/GRANULAR/granular_model.h | 8 +++--- src/GRANULAR/pair_granular.cpp | 22 ++++++++--------- 6 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 3afb0dc60e..7029074fe8 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -86,19 +86,19 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : } else { iarg = 4; - iarg = model->add_submodel(arg, iarg, narg, NORMAL); + iarg = model->add_sub_model(arg, iarg, narg, NORMAL); while (iarg < narg) { if (strcmp(arg[iarg], "damping") == 0) { - iarg = model->add_submodel(arg, iarg + 1, narg, DAMPING); + iarg = model->add_sub_model(arg, iarg + 1, narg, DAMPING); } else if (strcmp(arg[iarg], "tangential") == 0) { - iarg = model->add_submodel(arg, iarg + 1, narg, TANGENTIAL); + iarg = model->add_sub_model(arg, iarg + 1, narg, TANGENTIAL); } else if (strcmp(arg[iarg], "rolling") == 0) { - iarg = model->add_submodel(arg, iarg + 1, narg, ROLLING); + iarg = model->add_sub_model(arg, iarg + 1, narg, ROLLING); } else if (strcmp(arg[iarg], "twisting") == 0) { - iarg = model->add_submodel(arg, iarg + 1, narg, TWISTING); + iarg = model->add_sub_model(arg, iarg + 1, narg, TWISTING); } else if (strcmp(arg[iarg], "heat") == 0) { - iarg = model->add_submodel(arg, iarg + 1, narg, HEAT); + iarg = model->add_sub_model(arg, iarg + 1, narg, HEAT); heat_flag = 1; } else if (strcmp(arg[iarg], "xplane") == 0 || strcmp(arg[iarg], "yplane") == 0 || @@ -115,9 +115,9 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : } } - // Define default damping submodel if unspecified, takes no args + // Define default damping sub model if unspecified, takes no args if (!model->damping_model) - model->construct_submodel("viscoelastic", DAMPING); + model->construct_sub_model("viscoelastic", DAMPING); model->init(); size_history = model->size_history; diff --git a/src/GRANULAR/gran_sub_mod.cpp b/src/GRANULAR/gran_sub_mod.cpp index 2d836151f8..5650f4f45a 100644 --- a/src/GRANULAR/gran_sub_mod.cpp +++ b/src/GRANULAR/gran_sub_mod.cpp @@ -13,7 +13,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - This class contains a framework for granular submodels (GranSubMod): + This class contains a framework for granular sub models (GranSubMod): normal, damping, tangential, rolling, twisting, and heat These are used to calculate forces/torques/etc based on contact geometry @@ -29,7 +29,7 @@ using namespace LAMMPS_NS; using namespace Granular_NS; /* ---------------------------------------------------------------------- - Parent class for all types of granular submodels + Parent class for all types of granular sub models ------------------------------------------------------------------------- */ GranSubMod::GranSubMod(class GranularModel *gm, LAMMPS *lmp) : Pointers(lmp) @@ -79,10 +79,10 @@ void GranSubMod::mix_coeffs(double* icoeffs, double* jcoeffs) ------------------------------------------------------------------------- */ double GranSubMod::mix_stiffnessE(double E1, double E2, - double pois1, double pois2) + double poiss1, double poiss2) { - double factor1 = (1 - pois1 * pois1) / E1; - double factor2 = (1 - pois2 * pois2) / E2; + double factor1 = (1 - poiss1 * poiss1) / E1; + double factor2 = (1 - poiss2 * poiss2) / E2; return 1 / (factor1 + factor2); } @@ -91,10 +91,10 @@ double GranSubMod::mix_stiffnessE(double E1, double E2, ------------------------------------------------------------------------ */ double GranSubMod::mix_stiffnessG(double E1, double E2, - double pois1, double pois2) + double poiss1, double poiss2) { - double factor1 = 2 * (2 - pois1) * (1 + pois1) / E1; - double factor2 = 2 * (2 - pois2) * (1 + pois2) / E2; + double factor1 = 2 * (2 - poiss1) * (1 + poiss1) / E1; + double factor2 = 2 * (2 - poiss2) * (1 + poiss2) / E2; return 1 / (factor1 + factor2); } @@ -102,9 +102,9 @@ double GranSubMod::mix_stiffnessG(double E1, double E2, mixing of Young's modulus (E) for walls ------------------------------------------------------------------------- */ -double GranSubMod::mix_stiffnessE_wall(double E, double pois) +double GranSubMod::mix_stiffnessE_wall(double E, double poiss) { - double factor = 2 * (1 - pois); + double factor = 2 * (1 - poiss * poiss); return E / factor; } @@ -112,9 +112,9 @@ double GranSubMod::mix_stiffnessE_wall(double E, double pois) mixing of shear modulus (G) for walls ------------------------------------------------------------------------ */ -double GranSubMod::mix_stiffnessG_wall(double E, double pois) +double GranSubMod::mix_stiffnessG_wall(double E, double poiss) { - double factor = 32.0 * (2 - pois) * (1 + pois); + double factor = 4.0 * (2 - poiss) * (1 + poiss); return E / factor; } diff --git a/src/GRANULAR/gran_sub_mod.h b/src/GRANULAR/gran_sub_mod.h index 22f1f4e85a..a8bc430857 100644 --- a/src/GRANULAR/gran_sub_mod.h +++ b/src/GRANULAR/gran_sub_mod.h @@ -30,7 +30,7 @@ class GranSubMod : protected Pointers { void read_restart(); virtual void mix_coeffs(double*, double*); virtual void coeffs_to_local() {}; - virtual void init() {}; // called after all submodels + coeffs defined + virtual void init() {}; // called after all sub models + coeffs defined void allocate_coeffs(); std::string name; @@ -40,9 +40,9 @@ class GranSubMod : protected Pointers { double *transfer_history_factor; int history_index; - int beyond_contact; // If the submodel contact extends beyond overlap - int allow_cohesion; // If the submodel works with a cohesive normal force - int area_flag; // If the submodel requires area + int beyond_contact; // If the sub model contact extends beyond overlap + int allow_cohesion; // If the sub model works with a cohesive normal force + int area_flag; // If the sub model requires area GranularModel *gm; diff --git a/src/GRANULAR/granular_model.cpp b/src/GRANULAR/granular_model.cpp index afb3328d70..6b5ba1bedf 100644 --- a/src/GRANULAR/granular_model.cpp +++ b/src/GRANULAR/granular_model.cpp @@ -103,13 +103,13 @@ GranularModel::~GranularModel() /* ---------------------------------------------------------------------- */ -int GranularModel::add_submodel(char **arg, int iarg, int narg, SubmodelType model_type) +int GranularModel::add_sub_model(char **arg, int iarg, int narg, SubModelType model_type) { if (iarg >= narg) - error->all(FLERR, "Must specify granular submodel name"); + error->all(FLERR, "Must specify granular sub model name"); std::string model_name = std::string(arg[iarg++]); - construct_submodel(model_name, model_type); + construct_sub_model(model_name, model_type); int num_coeffs = sub_models[model_type]->num_coeffs; if (iarg + num_coeffs > narg) @@ -128,7 +128,7 @@ int GranularModel::add_submodel(char **arg, int iarg, int narg, SubmodelType mod /* ---------------------------------------------------------------------- */ -void GranularModel::construct_submodel(std::string model_name, SubmodelType model_type) +void GranularModel::construct_sub_model(std::string model_name, SubModelType model_type) { int i; for (i = 0; i < nclass; i++) { @@ -148,7 +148,7 @@ void GranularModel::construct_submodel(std::string model_name, SubmodelType mode sub_models[model_type]->name.assign(model_name); sub_models[model_type]->allocate_coeffs(); - // Assign specific submodel pointer + // Assign specific sub model pointer if (model_type == NORMAL) normal_model = dynamic_cast (sub_models[model_type]); if (model_type == DAMPING) damping_model = dynamic_cast (sub_models[model_type]); if (model_type == TANGENTIAL) tangential_model = dynamic_cast (sub_models[model_type]); @@ -185,26 +185,26 @@ int GranularModel::define_classic_model(char **arg, int iarg, int narg) error->all(FLERR,"Illegal classic gran model command"); if (strcmp(arg[iarg],"hooke") == 0) { - construct_submodel("hooke", NORMAL); - construct_submodel("linear_nohistory", TANGENTIAL); - construct_submodel("mass_velocity", DAMPING); + construct_sub_model("hooke", NORMAL); + construct_sub_model("linear_nohistory", TANGENTIAL); + construct_sub_model("mass_velocity", DAMPING); } else if (strcmp(arg[iarg],"hooke/history") == 0) { - construct_submodel("hooke", NORMAL); - construct_submodel("linear_history_classic", TANGENTIAL); - construct_submodel("mass_velocity", DAMPING); + construct_sub_model("hooke", NORMAL); + construct_sub_model("linear_history_classic", TANGENTIAL); + construct_sub_model("mass_velocity", DAMPING); } else if (strcmp(arg[iarg],"hertz/history") == 0) { // convert Kn and Kt from pressure units to force/distance^2 if Hertzian kn /= force->nktv2p; kt /= force->nktv2p; - construct_submodel("hertz", NORMAL); - construct_submodel("mindlin_classic", TANGENTIAL); - construct_submodel("viscoelastic", DAMPING); + construct_sub_model("hertz", NORMAL); + construct_sub_model("mindlin_classic", TANGENTIAL); + construct_sub_model("viscoelastic", DAMPING); } else error->all(FLERR,"Invalid classic gran model"); // ensure additional models are undefined - construct_submodel("none", ROLLING); - construct_submodel("none", TWISTING); - construct_submodel("none", HEAT); + construct_sub_model("none", ROLLING); + construct_sub_model("none", TWISTING); + construct_sub_model("none", HEAT); // manually parse coeffs normal_model->coeffs[0] = kn; @@ -226,7 +226,7 @@ int GranularModel::define_classic_model(char **arg, int iarg, int narg) void GranularModel::init() { for (int i = 0; i < NSUBMODELS; i++) - if (!sub_models[i]) construct_submodel("none", (SubmodelType) i); + if (!sub_models[i]) construct_sub_model("none", (SubModelType) i); // Must have valid normal, damping, and tangential models if (normal_model->name == "none") error->all(FLERR, "Must specify normal granular model"); @@ -262,14 +262,14 @@ void GranularModel::init() int j; for (int i = 0; i < size_history; i++) { - // Find which submodel owns this history value + // Find which sub model owns this history value size_cumulative = 0; for (j = 0; j < NSUBMODELS; j++) { if ((size_cumulative + sub_models[j]->size_history) > i) break; size_cumulative += sub_models[j]->size_history; } - // Check if submodel has nondefault transfers, if so copy its array + // Check if sub model has nondefault transfers, if so copy its array transfer_history_factor[i] = -1; if (j != NSUBMODELS) { if (sub_models[j]->nondefault_history_transfer) { @@ -289,7 +289,7 @@ int GranularModel::mix_coeffs(GranularModel *g1, GranularModel *g2) for (int i = 0; i < NSUBMODELS; i++) { if (g1->sub_models[i]->name != g2->sub_models[i]->name) return i; - construct_submodel(g1->sub_models[i]->name, (SubmodelType) i); + construct_sub_model(g1->sub_models[i]->name, (SubModelType) i); sub_models[i]->mix_coeffs(g1->sub_models[i]->coeffs, g2->sub_models[i]->coeffs); } @@ -331,7 +331,7 @@ void GranularModel::read_restart(FILE *fp) if (comm->me == 0) utils::sfread(FLERR, const_cast(model_name.data()), sizeof(char),num_char, fp, nullptr, error); MPI_Bcast(const_cast(model_name.data()), num_char, MPI_CHAR, 0, world); - construct_submodel(model_name, (SubmodelType) i); + construct_sub_model(model_name, (SubModelType) i); if (comm->me == 0) utils::sfread(FLERR, &num_coeff, sizeof(int), 1, fp, nullptr, error); diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h index a047bc27e5..62b3007b0e 100644 --- a/src/GRANULAR/granular_model.h +++ b/src/GRANULAR/granular_model.h @@ -19,7 +19,7 @@ namespace LAMMPS_NS { namespace Granular_NS { -enum SubmodelType { +enum SubModelType { NORMAL = 0, DAMPING, TANGENTIAL, @@ -53,9 +53,9 @@ class GranularModel : protected Pointers { void calculate_forces(); double pulloff_distance(double, double); - int add_submodel(char **, int, int, SubmodelType); + int add_sub_model(char **, int, int, SubModelType); int define_classic_model(char **, int, int); - void construct_submodel(std::string, SubmodelType); + void construct_sub_model(std::string, SubModelType); int mix_coeffs(GranularModel*, GranularModel*); void write_restart(FILE *); @@ -94,7 +94,7 @@ class GranularModel : protected Pointers { bool touch; protected: - int rolling_defined, twisting_defined, heat_defined; // Flag optional submodels + int rolling_defined, twisting_defined, heat_defined; // Flag optional sub models int classic_model; // Flag original pair/gran calculations int area_flag; // Flag whether area is needed diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 47bfa89da0..21278d2891 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -345,21 +345,21 @@ void PairGranular::coeff(int narg, char **arg) //Parse mandatory specification int iarg = 2; - iarg = model->add_submodel(arg, iarg, narg, NORMAL); + iarg = model->add_sub_model(arg, iarg, narg, NORMAL); //Parse optional arguments while (iarg < narg) { if (strcmp(arg[iarg], "tangential") == 0) { - iarg = model->add_submodel(arg, iarg + 1, narg, TANGENTIAL); + iarg = model->add_sub_model(arg, iarg + 1, narg, TANGENTIAL); } else if (strcmp(arg[iarg], "damping") == 0) { - iarg = model->add_submodel(arg, iarg + 1, narg, DAMPING); + iarg = model->add_sub_model(arg, iarg + 1, narg, DAMPING); } else if (strcmp(arg[iarg], "rolling") == 0) { - iarg = model->add_submodel(arg, iarg + 1, narg, ROLLING); + iarg = model->add_sub_model(arg, iarg + 1, narg, ROLLING); } else if (strcmp(arg[iarg], "twisting") == 0) { - iarg = model->add_submodel(arg, iarg + 1, narg, TWISTING); + iarg = model->add_sub_model(arg, iarg + 1, narg, TWISTING); } else if (strcmp(arg[iarg], "heat") == 0) { - iarg = model->add_submodel(arg, iarg + 1, narg, HEAT); + iarg = model->add_sub_model(arg, iarg + 1, narg, HEAT); heat_flag = 1; } else if (strcmp(arg[iarg], "cutoff") == 0) { if (iarg + 1 >= narg) @@ -372,9 +372,9 @@ void PairGranular::coeff(int narg, char **arg) } else error->all(FLERR, "Illegal pair_coeff command {}", arg[iarg]); } - // Define default damping submodel if unspecified, has no coeffs + // Define default damping sub model if unspecified, has no coeffs if (!model->damping_model) - model->construct_submodel("viscoelastic", DAMPING); + model->construct_sub_model("viscoelastic", DAMPING); model->init(); int count = 0; @@ -551,7 +551,7 @@ double PairGranular::init_one(int i, int j) if (error_code != -1) error->all(FLERR,"Granular pair style functional forms are different, " "cannot mix coefficients for types {} and {} \n" - "with submodels {} and {}. \n" + "with sub models {} and {}. \n" "This combination must be set explicitly via a " "pair_coeff command",i,j, model1->sub_models[error_code]->name, @@ -834,11 +834,11 @@ void PairGranular::transfer_history(double* source, double* target, int itype, i { class GranularModel* model = models_list[types_indices[itype][jtype]]; if (model->nondefault_history_transfer) { - for (int i = 0; i < size_history; i++) { + for (int i = 0; i < model->size_history; i++) { target[i] = model->transfer_history_factor[i] * source[i]; } } else { - for (int i = 0; i < size_history; i++) { + for (int i = 0; i < model->size_history; i++) { target[i] = -source[i]; } } From e8c271cc1608d050088b01de3ae73df0da67db93 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 26 Nov 2022 15:29:32 -0500 Subject: [PATCH 053/445] update python to version to 3.11 and disable png/jpeg for now --- .github/workflows/compile-msvc.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile-msvc.yml b/.github/workflows/compile-msvc.yml index 3ec5fc4cb0..d756e9fa82 100644 --- a/.github/workflows/compile-msvc.yml +++ b/.github/workflows/compile-msvc.yml @@ -26,7 +26,7 @@ jobs: - name: Select Python version uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Building LAMMPS via CMake shell: bash @@ -35,6 +35,8 @@ jobs: python3 -m pip install pyyaml cmake -C cmake/presets/windows.cmake \ -D PKG_PYTHON=on \ + -D WITH_PNG=off \ + -D WITH_JPEG=off \ -S cmake -B build \ -D BUILD_SHARED_LIBS=on \ -D LAMMPS_EXCEPTIONS=on \ From f2d866420a51e66e88dab9ceac688c22892428f5 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 7 Dec 2022 11:41:53 -0700 Subject: [PATCH 054/445] Updated examples --- .../log.15Sep22.granregion.box.g++.1 | 493 +++++++ .../log.15Sep22.granregion.box.g++.4 | 493 +++++++ .../log.15Sep22.granregion.funnel.g++.1 | 633 +++++++++ .../log.15Sep22.granregion.funnel.g++.4 | 633 +++++++++ .../log.15Sep22.granregion.mixer.g++.1 | 632 +++++++++ .../log.15Sep22.granregion.mixer.g++.4 | 632 +++++++++ .../log.27Nov18.granregion.box.g++.1 | 475 ------- .../log.27Nov18.granregion.box.g++.4 | 475 ------- .../log.27Nov18.granregion.funnel.g++.1 | 601 --------- .../log.27Nov18.granregion.funnel.g++.4 | 601 --------- .../log.27Nov18.granregion.mixer.g++.1 | 602 --------- .../log.27Nov18.granregion.mixer.g++.4 | 602 --------- examples/granular/in.pour.heat | 2 +- examples/granular/log.15Sep22.pour.drum.g++.1 | 272 ++++ examples/granular/log.15Sep22.pour.drum.g++.4 | 272 ++++ .../granular/log.15Sep22.pour.flatwall.g++.1 | 195 +++ .../granular/log.15Sep22.pour.flatwall.g++.4 | 195 +++ examples/granular/log.15Sep22.pour.heat.g++.1 | 1172 +++++++++++++++++ examples/granular/log.15Sep22.pour.heat.g++.4 | 1172 +++++++++++++++++ examples/granular/log.29Oct20.pour.drum.g++.1 | 271 ---- examples/granular/log.29Oct20.pour.drum.g++.4 | 271 ---- .../granular/log.29Oct20.pour.flatwall.g++.1 | 188 --- .../granular/log.29Oct20.pour.flatwall.g++.4 | 188 --- 23 files changed, 6795 insertions(+), 4275 deletions(-) create mode 100644 examples/granregion/log.15Sep22.granregion.box.g++.1 create mode 100644 examples/granregion/log.15Sep22.granregion.box.g++.4 create mode 100644 examples/granregion/log.15Sep22.granregion.funnel.g++.1 create mode 100644 examples/granregion/log.15Sep22.granregion.funnel.g++.4 create mode 100644 examples/granregion/log.15Sep22.granregion.mixer.g++.1 create mode 100644 examples/granregion/log.15Sep22.granregion.mixer.g++.4 delete mode 100644 examples/granregion/log.27Nov18.granregion.box.g++.1 delete mode 100644 examples/granregion/log.27Nov18.granregion.box.g++.4 delete mode 100644 examples/granregion/log.27Nov18.granregion.funnel.g++.1 delete mode 100644 examples/granregion/log.27Nov18.granregion.funnel.g++.4 delete mode 100644 examples/granregion/log.27Nov18.granregion.mixer.g++.1 delete mode 100644 examples/granregion/log.27Nov18.granregion.mixer.g++.4 create mode 100644 examples/granular/log.15Sep22.pour.drum.g++.1 create mode 100644 examples/granular/log.15Sep22.pour.drum.g++.4 create mode 100644 examples/granular/log.15Sep22.pour.flatwall.g++.1 create mode 100644 examples/granular/log.15Sep22.pour.flatwall.g++.4 create mode 100644 examples/granular/log.15Sep22.pour.heat.g++.1 create mode 100644 examples/granular/log.15Sep22.pour.heat.g++.4 delete mode 100644 examples/granular/log.29Oct20.pour.drum.g++.1 delete mode 100644 examples/granular/log.29Oct20.pour.drum.g++.4 delete mode 100644 examples/granular/log.29Oct20.pour.flatwall.g++.1 delete mode 100644 examples/granular/log.29Oct20.pour.flatwall.g++.4 diff --git a/examples/granregion/log.15Sep22.granregion.box.g++.1 b/examples/granregion/log.15Sep22.granregion.box.g++.1 new file mode 100644 index 0000000000..0df89d49ee --- /dev/null +++ b/examples/granregion/log.15Sep22.granregion.box.g++.1 @@ -0,0 +1,493 @@ +LAMMPS (15 Sep 2022) +# pouring spheres into container box + +units lj +atom_style sphere +boundary f f f +dimension 3 +comm_modify vel yes + +region box block -10 10 -10 10 -10 10 units box +create_box 2 box +Created orthogonal box = (-10 -10 -10) to (10 10 10) + 1 by 1 by 1 MPI processor grid + +pair_style hybrid gran/hooke 4000.0 NULL 100.0 NULL 0.5 1 +pair_coeff * * gran/hooke + +region container block -6 6 -6 6 -6 6 units box +fix container all wall/gran/region hooke/history 4000.0 NULL 100.0 NULL 0.5 1 region container + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 2 all nve/sphere +fix 3 all gravity 1.0 vector 0 0 -1 + +region slab block -2 2 -2 2 -2 2 units box +fix ins all pour 100 2 4767548 vol 0.4 10 diam one 1.0 region slab ignore +Particle insertion: 48 every 566 steps, 100 by step 1133 + +timestep 0.005 + +compute 1 all temp +compute_modify 1 dynamic/dof yes + +compute 2 all temp/sphere +compute_modify 2 dynamic/dof yes + +thermo 100 +thermo_style custom step atoms temp c_1 c_2 press +thermo_modify lost ignore +compute_modify thermo_temp dynamic/dof yes + +#dump 2 all image 100 image.*.jpg type type # zoom 1.4 adiam 1.0 box no 0.0 axes yes 0.9 0.03 +#dump_modify 2 pad 5 + +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 1.3 + binsize = 0.65, bins = 31 31 31 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hooke, perpetual + attributes: half, newton on, size + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 0.5861 | 0.5861 | 0.5861 Mbytes + Step Atoms Temp c_1 c_2 Press + 0 0 0 0 0 0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 100 30 0.803783 0.803783 0.39507978 0.0029137134 + 200 30 1.1967995 1.1967995 0.5882574 0.0043383984 + 300 30 1.2814686 1.2814686 0.62987441 0.0046453238 + 400 30 0.82331082 0.82331082 0.41173176 0.0029845017 + 500 30 0.7708462 0.7708462 0.38777784 0.0043831147 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 600 64 0.51564897 0.51564897 0.26631577 0.0040059368 + 700 64 0.57239348 0.57239348 0.29566901 0.0045075987 + 800 64 0.61837087 0.61837087 0.32195387 0.0048123564 + 900 64 0.53061888 0.53061888 0.28564763 0.0055906552 + 1000 64 0.496299 0.496299 0.26801572 0.0061169128 + 1100 64 0.46068308 0.46068308 0.24699057 0.0055717699 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 1200 99 0.39206225 0.39206225 0.21356546 0.0066294211 + 1300 99 0.38624966 0.38624966 0.21345854 0.0049051051 + 1400 99 0.35615284 0.35615284 0.19785725 0.0046170772 + 1500 99 0.31486693 0.31486693 0.17429055 0.0064903432 + 1600 99 0.26369001 0.26369001 0.15095266 0.0045226847 + 1700 100 0.1925923 0.1925923 0.11308104 0.007362313 + 1800 100 0.13724978 0.13724978 0.083276845 0.0058136373 + 1900 100 0.077212636 0.077212636 0.053159386 0.0016509598 + 2000 100 0.065294031 0.065294031 0.04372752 0.0020346467 + 2100 100 0.057431398 0.057431398 0.037977068 0.0012681098 + 2200 100 0.059093045 0.059093045 0.037435193 0.00096610799 + 2300 100 0.03422338 0.03422338 0.025491304 0.00069886052 + 2400 100 0.020558284 0.020558284 0.016163009 0.0017260663 + 2500 100 0.015339709 0.015339709 0.012329236 0.00041308031 + 2600 100 0.012891354 0.012891354 0.009766054 0.00030356722 + 2700 100 0.0092634449 0.0092634449 0.0073580108 0.00077723051 + 2800 100 0.0073925841 0.0073925841 0.0059932218 0.00016466767 + 2900 100 0.0081228267 0.0081228267 0.006281761 0.00013828388 + 3000 100 0.0041833223 0.0041833223 0.0035147096 0.00013160599 + 3100 100 0.0035930775 0.0035930775 0.0030039922 0.00060639771 + 3200 100 0.0030824465 0.0030824465 0.0026541293 0.00047391014 + 3300 100 0.0035087522 0.0035087522 0.0027664508 0.00014080317 + 3400 100 0.0018537868 0.0018537868 0.0017099705 6.3326674e-05 + 3500 100 0.0015371228 0.0015371228 0.0014155433 0.00021612522 + 3600 100 0.001708556 0.001708556 0.0014369892 8.1034202e-05 + 3700 100 0.00095948652 0.00095948652 0.0009788528 3.4694023e-05 + 3800 100 0.00091875668 0.00091875668 0.00086805146 3.9373686e-05 + 3900 100 0.001557068 0.001557068 0.001159526 2.5178607e-05 + 4000 100 0.00062012451 0.00062012451 0.00066806922 5.6680551e-06 + 4100 100 0.00060940771 0.00060940771 0.00065614741 1.0137901e-05 + 4200 100 0.00059538437 0.00059538437 0.00064501521 7.3679744e-06 + 4300 100 0.00052946048 0.00052946048 0.00059353641 5.9225081e-06 + 4400 100 0.00051202281 0.00051202281 0.00057524772 3.6198435e-05 + 4500 100 0.00049986632 0.00049986632 0.00055754521 2.2275519e-05 + 4600 100 0.00048187334 0.00048187334 0.00053988815 2.2015243e-05 + 4700 100 0.00045261491 0.00045261491 0.00050298355 8.9681339e-05 + 4800 100 0.00034965427 0.00034965427 0.0004278781 1.0983535e-05 + 4900 100 0.00033555621 0.00033555621 0.00041435167 2.9266598e-05 + 5000 100 0.00031387148 0.00031387148 0.00039605781 2.5628425e-05 +Loop time of 0.078687 on 1 procs for 5000 steps with 100 atoms + +Performance: 27450544.413 tau/day, 63542.927 timesteps/s, 6.354 Matom-step/s +80.5% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0084151 | 0.0084151 | 0.0084151 | 0.0 | 10.69 +Neigh | 0.012728 | 0.012728 | 0.012728 | 0.0 | 16.18 +Comm | 0.0056143 | 0.0056143 | 0.0056143 | 0.0 | 7.14 +Output | 0.00051411 | 0.00051411 | 0.00051411 | 0.0 | 0.65 +Modify | 0.041412 | 0.041412 | 0.041412 | 0.0 | 52.63 +Other | | 0.01 | | | 12.71 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 164 ave 164 max 164 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 164 +Ave neighs/atom = 1.64 +Neighbor list builds = 281 +Dangerous builds = 0 + +region container delete +variable theta equal (step-5000)*(4.0*PI/5000) +region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 0 0 1 +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 1.3 + binsize = 0.65, bins = 31 31 31 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hooke, perpetual + attributes: half, newton on, size + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes + Step Atoms Temp c_1 c_2 Press + 5000 100 0.00031387148 0.00031387148 0.00039605781 2.6174978e-05 + 5100 100 0.54537023 0.54537023 0.30042175 0.0087427352 + 5200 100 0.57210852 0.57210852 0.3192468 0.0098134067 + 5300 100 0.7168108 0.7168108 0.38577893 0.011004584 + 5400 100 0.78895524 0.78895524 0.41889428 0.013555713 + 5500 100 0.87797874 0.87797874 0.45689223 0.01565356 + 5600 100 0.95424379 0.95424379 0.48830429 0.014707858 + 5700 100 1.0046012 1.0046012 0.51054927 0.01469179 + 5800 100 1.0371453 1.0371453 0.5262568 0.015576788 + 5900 100 1.0545743 1.0545743 0.5361173 0.01589889 + 6000 100 1.0932949 1.0932949 0.55402214 0.017484573 + 6100 100 1.1148364 1.1148364 0.56241126 0.01721788 + 6200 100 1.1315267 1.1315267 0.57050887 0.017961246 + 6300 100 1.1506124 1.1506124 0.58009471 0.017159062 + 6400 100 1.1663328 1.1663328 0.5876586 0.017935311 + 6500 100 1.1821086 1.1821086 0.59595162 0.018005316 + 6600 100 1.2039397 1.2039397 0.60567524 0.021604669 + 6700 100 1.2269911 1.2269911 0.61770224 0.018907995 + 6800 100 1.2447035 1.2447035 0.6257652 0.02053766 + 6900 100 1.2625323 1.2625323 0.63486698 0.020106134 + 7000 100 1.2617127 1.2617127 0.63318163 0.019670429 + 7100 100 1.260715 1.260715 0.63311254 0.019810631 + 7200 100 1.2790404 1.2790404 0.64079001 0.020218903 + 7300 100 1.2760228 1.2760228 0.6395331 0.021749906 + 7400 100 1.2799658 1.2799658 0.64139084 0.020472922 + 7500 100 1.2846473 1.2846473 0.64343085 0.020610025 + 7600 100 1.2883965 1.2883965 0.64491873 0.02074884 + 7700 100 1.2926891 1.2926891 0.64684545 0.020599654 + 7800 100 1.3032201 1.3032201 0.65119455 0.02183405 + 7900 100 1.3025628 1.3025628 0.65068661 0.021248589 + 8000 100 1.3052302 1.3052302 0.65208602 0.021399549 + 8100 100 1.3069867 1.3069867 0.65304849 0.021254794 + 8200 100 1.3092024 1.3092024 0.6543837 0.021220909 + 8300 100 1.3101468 1.3101468 0.65519741 0.021328361 + 8400 100 1.3116005 1.3116005 0.65545253 0.021493555 + 8500 100 1.3153616 1.3153616 0.65731542 0.021433279 + 8600 100 1.3164556 1.3164556 0.65791227 0.021531213 + 8700 100 1.3187245 1.3187245 0.65915974 0.02170181 + 8800 100 1.3215981 1.3215981 0.66036644 0.022358849 + 8900 100 1.3206845 1.3206845 0.65984651 0.021901337 + 9000 100 1.3213046 1.3213046 0.66020378 0.021876353 + 9100 100 1.3225084 1.3225084 0.66088847 0.021811098 + 9200 100 1.3240309 1.3240309 0.66180646 0.021768929 + 9300 100 1.325458 1.325458 0.66280401 0.02165852 + 9400 100 1.3322968 1.3322968 0.66615126 0.022139018 + 9500 100 1.3416035 1.3416035 0.67030794 0.022243129 + 9600 100 1.3353326 1.3353326 0.66692811 0.022622122 + 9700 100 1.336265 1.336265 0.66727395 0.022171165 + 9800 100 1.3344531 1.3344531 0.66634538 0.022025131 + 9900 100 1.3337098 1.3337098 0.66601721 0.022111706 + 10000 100 1.3335539 1.3335539 0.66597627 0.022133817 +Loop time of 0.235008 on 1 procs for 5000 steps with 100 atoms + +Performance: 9191156.994 tau/day, 21275.826 timesteps/s, 2.128 Matom-step/s +94.1% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.029846 | 0.029846 | 0.029846 | 0.0 | 12.70 +Neigh | 0.030211 | 0.030211 | 0.030211 | 0.0 | 12.86 +Comm | 0.005731 | 0.005731 | 0.005731 | 0.0 | 2.44 +Output | 0.00051873 | 0.00051873 | 0.00051873 | 0.0 | 0.22 +Modify | 0.1583 | 0.1583 | 0.1583 | 0.0 | 67.36 +Other | | 0.01041 | | | 4.43 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 186 ave 186 max 186 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 186 +Ave neighs/atom = 1.86 +Neighbor list builds = 626 +Dangerous builds = 0 + +region container delete +region container block -6 6 -6 6 -6 6 units box +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes + Step Atoms Temp c_1 c_2 Press + 10000 100 1.3335539 1.3335539 0.66597627 0.022207076 + 10100 100 0.29976134 0.29976134 0.1752962 0.0091355801 + 10200 100 0.1548002 0.1548002 0.1005356 0.0062509071 + 10300 100 0.082468613 0.082468613 0.066729575 0.0017315098 + 10400 100 0.06731284 0.06731284 0.056685383 0.0011965765 + 10500 100 0.050167538 0.050167538 0.042388389 0.0010830279 + 10600 100 0.041091371 0.041091371 0.034743534 0.00092984522 + 10700 100 0.033199041 0.033199041 0.027954031 0.0018451338 + 10800 100 0.027880411 0.027880411 0.024437224 0.0013039536 + 10900 100 0.024634597 0.024634597 0.021815184 0.00030935286 + 11000 100 0.020741105 0.020741105 0.018754221 0.0006306901 + 11100 100 0.017210914 0.017210914 0.015842306 0.00075930229 + 11200 100 0.01254319 0.01254319 0.012145795 0.00047388541 + 11300 100 0.010032468 0.010032468 0.0095918697 0.0014677116 + 11400 100 0.0081538458 0.0081538458 0.0080985914 0.00032485316 + 11500 100 0.0072918155 0.0072918155 0.0070156789 0.00023642827 + 11600 100 0.0070136586 0.0070136586 0.0067263114 7.8490444e-05 + 11700 100 0.0061722946 0.0061722946 0.0058832419 0.00013450793 + 11800 100 0.0052444487 0.0052444487 0.0049294304 8.6973121e-05 + 11900 100 0.0048212279 0.0048212279 0.0045261412 0.00010458031 + 12000 100 0.0046782797 0.0046782797 0.0044011937 0.00018881094 + 12100 100 0.0042066617 0.0042066617 0.0040330976 0.00015507521 + 12200 100 0.0038529032 0.0038529032 0.003664712 1.1476621e-05 + 12300 100 0.0033203238 0.0033203238 0.0032404054 0.00027622191 + 12400 100 0.003113731 0.003113731 0.0030491123 3.8532421e-05 + 12500 100 0.0029925149 0.0029925149 0.0029415075 4.2673261e-05 + 12600 100 0.0028383323 0.0028383323 0.0027902992 9.328552e-05 + 12700 100 0.0026386104 0.0026386104 0.0026095714 7.7740986e-05 + 12800 100 0.0023509873 0.0023509873 0.0023518594 3.1944764e-05 + 12900 100 0.0022296104 0.0022296104 0.0022030693 4.5393502e-05 + 13000 100 0.0021991358 0.0021991358 0.0021560478 0.0001221212 + 13100 100 0.0021011001 0.0021011001 0.0020752855 2.4605107e-05 + 13200 100 0.002004495 0.002004495 0.0020040212 2.4805625e-05 + 13300 100 0.0018394135 0.0018394135 0.0018288384 6.2227066e-05 + 13400 100 0.0016314086 0.0016314086 0.0016058102 0.00010372886 + 13500 100 0.0015042857 0.0015042857 0.0014660263 0.00020805178 + 13600 100 0.0013584764 0.0013584764 0.0013177418 5.1603333e-05 + 13700 100 0.0012407449 0.0012407449 0.0011902637 8.87401e-05 + 13800 100 0.0011673364 0.0011673364 0.0011324247 2.3668551e-05 + 13900 100 0.0011429204 0.0011429204 0.0011072347 1.414364e-05 + 14000 100 0.001087543 0.001087543 0.0010616439 3.0874865e-05 + 14100 100 0.00098839393 0.00098839393 0.00096445684 6.5331515e-05 + 14200 100 0.00095139076 0.00095139076 0.00093658993 2.5649208e-05 + 14300 100 0.00089532494 0.00089532494 0.00082626435 2.6200482e-05 + 14400 100 0.00077973015 0.00077973015 0.00070733785 2.29298e-05 + 14500 100 0.00068559117 0.00068559117 0.00062297009 8.4841907e-06 + 14600 100 0.00059199698 0.00059199698 0.00052453148 1.2737231e-05 + 14700 100 0.00055052378 0.00055052378 0.00048459372 1.3028328e-05 + 14800 100 0.00049397913 0.00049397913 0.00044094284 6.1129918e-06 + 14900 100 0.00048082746 0.00048082746 0.00043128724 3.7301936e-06 + 15000 100 0.00046847825 0.00046847825 0.00041484245 5.7974184e-06 +Loop time of 0.0802044 on 1 procs for 5000 steps with 100 atoms + +Performance: 26931180.398 tau/day, 62340.695 timesteps/s, 6.234 Matom-step/s +82.1% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0080809 | 0.0080809 | 0.0080809 | 0.0 | 10.08 +Neigh | 0.0048815 | 0.0048815 | 0.0048815 | 0.0 | 6.09 +Comm | 0.0055605 | 0.0055605 | 0.0055605 | 0.0 | 6.93 +Output | 0.00050386 | 0.00050386 | 0.00050386 | 0.0 | 0.63 +Modify | 0.051104 | 0.051104 | 0.051104 | 0.0 | 63.72 +Other | | 0.01007 | | | 12.56 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 157 ave 157 max 157 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 157 +Ave neighs/atom = 1.57 +Neighbor list builds = 100 +Dangerous builds = 0 + +region container delete +variable theta equal (step-15000)*(4.0*PI/5000) +region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 1 1 1 +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes + Step Atoms Temp c_1 c_2 Press + 15000 100 0.00046847825 0.00046847825 0.00041484245 5.7974184e-06 + 15100 100 0.96677694 0.96677694 0.64420785 0.01431184 + 15200 100 1.0659255 1.0659255 0.69293741 0.013240486 + 15300 100 1.1647631 1.1647631 0.75191941 0.014622673 + 15400 100 1.3411593 1.3411593 0.85696383 0.02561549 + 15500 100 1.6033758 1.6033758 0.99094919 0.026221789 + 15600 100 1.7889645 1.7889645 1.075315 0.024116301 + 15700 100 1.8077023 1.8077023 1.0842652 0.031781756 + 15800 100 2.0252655 2.0252655 1.1517407 0.037201818 + 15900 100 2.1479427 2.1479427 1.2061238 0.027668435 + 16000 100 2.1788838 2.1788838 1.2205599 0.029114273 + 16100 100 2.3257431 2.3257431 1.2921157 0.035663063 + 16200 100 2.3885449 2.3885449 1.3282237 0.032255517 + 16300 100 2.3670966 2.3670966 1.3091694 0.029579008 + 16400 100 2.5097781 2.5097781 1.3712036 0.034579196 + 16500 100 2.6440883 2.6440883 1.4440043 0.03347813 + 16600 100 2.7230084 2.7230084 1.481565 0.036660339 + 16700 100 2.8246108 2.8246108 1.5298387 0.035623641 + 16800 100 3.0338694 3.0338694 1.6333504 0.038818594 + 16900 100 3.1219584 3.1219584 1.6790766 0.043444123 + 17000 100 3.4103817 3.4103817 1.8222668 0.044524654 + 17100 100 3.3869069 3.3869069 1.8170743 0.050670801 + 17200 100 3.4220314 3.4220314 1.8312364 0.045956123 + 17300 100 3.396894 3.396894 1.8158291 0.050420297 + 17400 100 3.4508224 3.4508224 1.8429996 0.049923733 + 17500 100 3.5039601 3.5039601 1.8822352 0.051047713 + 17600 100 3.3743905 3.3743905 1.8380347 0.047922214 + 17700 100 3.3729709 3.3729709 1.8224123 0.04758126 + 17800 100 3.3237798 3.3237798 1.7962316 0.045427975 + 17900 100 3.2441052 3.2441052 1.7782748 0.044651231 + 18000 100 3.1169205 3.1169205 1.704639 0.047440495 + 18100 100 3.1704608 3.1704608 1.7326375 0.045656546 + 18200 100 3.1113438 3.1113438 1.7002232 0.041619255 + 18300 100 3.2506111 3.2506111 1.7693075 0.048028527 + 18400 100 3.3840681 3.3840681 1.8370672 0.04443243 + 18500 100 3.4822823 3.4822823 1.9125273 0.043687118 + 18600 100 3.5214372 3.5214372 1.9364829 0.049798605 + 18700 100 3.5439229 3.5439229 1.9441301 0.046240266 + 18800 100 3.6046761 3.6046761 1.9791448 0.054369382 + 18900 100 3.8598403 3.8598403 2.0999449 0.049863074 + 19000 100 3.8606461 3.8606461 2.0885493 0.050269245 + 19100 100 4.076627 4.076627 2.2025766 0.058050893 + 19200 100 3.8280814 3.8280814 2.0749884 0.05730905 + 19300 100 3.8211633 3.8211633 2.0759453 0.05145071 + 19400 100 3.7726284 3.7726284 2.0466555 0.053566404 + 19500 100 3.7468403 3.7468403 2.03218 0.048422025 + 19600 100 3.6408955 3.6408955 1.9873843 0.046565134 + 19700 100 3.6454187 3.6454187 2.0042204 0.049299897 + 19800 100 3.5165071 3.5165071 1.937379 0.046319859 + 19900 100 3.4670702 3.4670702 1.9140316 0.045650114 + 20000 100 3.6114294 3.6114294 1.9798674 0.05431148 +Loop time of 0.203164 on 1 procs for 5000 steps with 100 atoms + +Performance: 10631806.993 tau/day, 24610.664 timesteps/s, 2.461 Matom-step/s +92.3% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.01242 | 0.01242 | 0.01242 | 0.0 | 6.11 +Neigh | 0.044478 | 0.044478 | 0.044478 | 0.0 | 21.89 +Comm | 0.0057766 | 0.0057766 | 0.0057766 | 0.0 | 2.84 +Output | 0.00051702 | 0.00051702 | 0.00051702 | 0.0 | 0.25 +Modify | 0.12923 | 0.12923 | 0.12923 | 0.0 | 63.61 +Other | | 0.01074 | | | 5.29 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 142 ave 142 max 142 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 142 +Ave neighs/atom = 1.42 +Neighbor list builds = 909 +Dangerous builds = 0 + +region container delete +region container block -6 6 -6 6 -6 6 units box +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes + Step Atoms Temp c_1 c_2 Press + 20000 100 3.6114294 3.6114294 1.9798674 0.053887263 + 20100 100 1.0907336 1.0907336 0.69799767 0.013925984 + 20200 100 0.92304387 0.92304387 0.59520318 0.012377709 + 20300 100 0.84004201 0.84004201 0.55081472 0.012108246 + 20400 100 0.89491209 0.89491209 0.56269969 0.01221427 + 20500 100 0.92011482 0.92011482 0.56971815 0.011353588 + 20600 100 0.95722998 0.95722998 0.58038747 0.01185569 + 20700 100 0.92635786 0.92635786 0.55373959 0.011953734 + 20800 100 0.93088162 0.93088162 0.55094813 0.012887472 + 20900 100 0.97288373 0.97288373 0.56309599 0.013731021 + 21000 100 0.63378762 0.63378762 0.3779177 0.010114787 + 21100 100 0.34618473 0.34618473 0.21652381 0.0070717708 + 21200 100 0.18660008 0.18660008 0.1302051 0.006504227 + 21300 100 0.13917709 0.13917709 0.09667499 0.0032593765 + 21400 100 0.11627047 0.11627047 0.080272858 0.0028891045 + 21500 100 0.086269781 0.086269781 0.064184981 0.0019374959 + 21600 100 0.08052393 0.08052393 0.059561101 0.001214522 + 21700 100 0.036026032 0.036026032 0.030243348 0.001199233 + 21800 100 0.02392645 0.02392645 0.022284244 0.00060060634 + 21900 100 0.016991266 0.016991266 0.017366625 0.00065672411 + 22000 100 0.016974877 0.016974877 0.016399245 0.0005903103 + 22100 100 0.015491818 0.015491818 0.014806105 0.00051181051 + 22200 100 0.011908698 0.011908698 0.011206673 0.00099478656 + 22300 100 0.010002714 0.010002714 0.0093749794 0.00028214624 + 22400 100 0.0081652616 0.0081652616 0.0079594664 0.00026841276 + 22500 100 0.0067602843 0.0067602843 0.0067498831 0.00019472612 + 22600 100 0.0061024058 0.0061024058 0.0062958451 0.00016615781 + 22700 100 0.005331422 0.005331422 0.0056152366 0.00021543475 + 22800 100 0.0040796708 0.0040796708 0.004140932 0.00024397062 + 22900 100 0.0042042089 0.0042042089 0.0040406804 0.00015880055 + 23000 100 0.0056083872 0.0056083872 0.0046056699 0.00029203396 + 23100 100 0.0035006398 0.0035006398 0.003343101 0.00010571574 + 23200 100 0.0032402473 0.0032402473 0.003122476 0.00012784403 + 23300 100 0.0030100724 0.0030100724 0.0029649423 8.5613724e-05 + 23400 100 0.002746305 0.002746305 0.0027519317 9.6521844e-05 + 23500 100 0.0028543876 0.0028543876 0.002842845 0.00012566665 + 23600 100 0.0036979234 0.0036979234 0.0032448309 8.6321879e-05 + 23700 100 0.0030503565 0.0030503565 0.0027392305 5.9716835e-05 + 23800 100 0.0021564041 0.0021564041 0.0022097768 0.00028317769 + 23900 100 0.0018905956 0.0018905956 0.0020002233 4.5205733e-05 + 24000 100 0.0015705513 0.0015705513 0.0017262538 0.00026550225 + 24100 100 0.0013341334 0.0013341334 0.0015663921 4.8307183e-05 + 24200 100 0.0012426828 0.0012426828 0.0014960127 5.5195907e-05 + 24300 100 0.0011933799 0.0011933799 0.0014508697 5.2781568e-05 + 24400 100 0.0010126015 0.0010126015 0.0012821281 0.00011096457 + 24500 100 0.00094102576 0.00094102576 0.0012265703 3.3454252e-05 + 24600 100 0.00092243997 0.00092243997 0.0011970533 3.7288789e-05 + 24700 100 0.00080565605 0.00080565605 0.0010864406 0.00015797228 + 24800 100 0.00075303124 0.00075303124 0.0010103671 5.4727635e-05 + 24900 100 0.00074808599 0.00074808599 0.0010053951 8.6607732e-05 + 25000 100 0.00071720457 0.00071720457 0.00096622937 0.00015861964 +Loop time of 0.0845534 on 1 procs for 5000 steps with 100 atoms + +Performance: 25545994.179 tau/day, 59134.246 timesteps/s, 5.913 Matom-step/s +90.2% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0091411 | 0.0091411 | 0.0091411 | 0.0 | 10.81 +Neigh | 0.013557 | 0.013557 | 0.013557 | 0.0 | 16.03 +Comm | 0.0056205 | 0.0056205 | 0.0056205 | 0.0 | 6.65 +Output | 0.0005087 | 0.0005087 | 0.0005087 | 0.0 | 0.60 +Modify | 0.045578 | 0.045578 | 0.045578 | 0.0 | 53.90 +Other | | 0.01015 | | | 12.00 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 151 ave 151 max 151 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 151 +Ave neighs/atom = 1.51 +Neighbor list builds = 286 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/granregion/log.15Sep22.granregion.box.g++.4 b/examples/granregion/log.15Sep22.granregion.box.g++.4 new file mode 100644 index 0000000000..3e83d3bb04 --- /dev/null +++ b/examples/granregion/log.15Sep22.granregion.box.g++.4 @@ -0,0 +1,493 @@ +LAMMPS (15 Sep 2022) +# pouring spheres into container box + +units lj +atom_style sphere +boundary f f f +dimension 3 +comm_modify vel yes + +region box block -10 10 -10 10 -10 10 units box +create_box 2 box +Created orthogonal box = (-10 -10 -10) to (10 10 10) + 1 by 2 by 2 MPI processor grid + +pair_style hybrid gran/hooke 4000.0 NULL 100.0 NULL 0.5 1 +pair_coeff * * gran/hooke + +region container block -6 6 -6 6 -6 6 units box +fix container all wall/gran/region hooke/history 4000.0 NULL 100.0 NULL 0.5 1 region container + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 2 all nve/sphere +fix 3 all gravity 1.0 vector 0 0 -1 + +region slab block -2 2 -2 2 -2 2 units box +fix ins all pour 100 2 4767548 vol 0.4 10 diam one 1.0 region slab ignore +Particle insertion: 48 every 566 steps, 100 by step 1133 + +timestep 0.005 + +compute 1 all temp +compute_modify 1 dynamic/dof yes + +compute 2 all temp/sphere +compute_modify 2 dynamic/dof yes + +thermo 100 +thermo_style custom step atoms temp c_1 c_2 press +thermo_modify lost ignore +compute_modify thermo_temp dynamic/dof yes + +#dump 2 all image 100 image.*.jpg type type # zoom 1.4 adiam 1.0 box no 0.0 axes yes 0.9 0.03 +#dump_modify 2 pad 5 + +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 1.3 + binsize = 0.65, bins = 31 31 31 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hooke, perpetual + attributes: half, newton on, size + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 0.4843 | 0.4843 | 0.4843 Mbytes + Step Atoms Temp c_1 c_2 Press + 0 0 0 0 0 0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 100 30 0.803783 0.803783 0.39507978 0.0029137134 + 200 30 1.1967995 1.1967995 0.5882574 0.0043383984 + 300 30 1.2814686 1.2814686 0.62987441 0.0046453238 + 400 30 0.82331082 0.82331082 0.41173176 0.0029845017 + 500 30 0.7708462 0.7708462 0.38777784 0.0043831147 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 600 64 0.51564897 0.51564897 0.26631577 0.0040059368 + 700 64 0.57239348 0.57239348 0.29566901 0.0045075987 + 800 64 0.61837087 0.61837087 0.32195387 0.0048123564 + 900 64 0.53061888 0.53061888 0.28564763 0.0055906552 + 1000 64 0.496299 0.496299 0.26801572 0.0061169128 + 1100 64 0.46068308 0.46068308 0.24699057 0.0055717699 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 1200 99 0.39206225 0.39206225 0.21356546 0.0066294211 + 1300 99 0.38624966 0.38624966 0.21345854 0.0049051051 + 1400 99 0.35615284 0.35615284 0.19785725 0.0046170774 + 1500 99 0.31486691 0.31486691 0.17429054 0.0064903404 + 1600 99 0.26369 0.26369 0.15095263 0.0045226821 + 1700 100 0.19259352 0.19259352 0.11308184 0.0073603886 + 1800 100 0.1372448 0.1372448 0.083273652 0.0058163062 + 1900 100 0.077253038 0.077253038 0.053166156 0.0017440856 + 2000 100 0.065472093 0.065472093 0.04375349 0.0018416047 + 2100 100 0.057213469 0.057213469 0.037773954 0.001226231 + 2200 100 0.058857437 0.058857437 0.0372655 0.00090812381 + 2300 100 0.035066108 0.035066108 0.025934054 0.00072114554 + 2400 100 0.021272125 0.021272125 0.016635107 0.0018506654 + 2500 100 0.015530432 0.015530432 0.012533546 0.0013883971 + 2600 100 0.012603946 0.012603946 0.0096981459 0.00038648118 + 2700 100 0.0097347475 0.0097347475 0.0076016624 0.00057313888 + 2800 100 0.0067081771 0.0067081771 0.0056944431 0.00085080075 + 2900 100 0.0089177981 0.0089177981 0.0065036822 0.00028986539 + 3000 100 0.0057840287 0.0057840287 0.0044989265 0.00016111737 + 3100 100 0.0038909621 0.0038909621 0.0031511938 0.0001708892 + 3200 100 0.0029043214 0.0029043214 0.0025807767 9.2473673e-05 + 3300 100 0.0022769336 0.0022769336 0.0021487157 0.00022312666 + 3400 100 0.0015571397 0.0015571397 0.0016669068 0.0003381372 + 3500 100 0.0015978184 0.0015978184 0.001707772 4.9930818e-05 + 3600 100 0.0023358916 0.0023358916 0.0020709426 9.7687609e-05 + 3700 100 0.0011186736 0.0011186736 0.0012146914 9.3338234e-05 + 3800 100 0.0011657036 0.0011657036 0.0012313764 3.1931251e-05 + 3900 100 0.0014998387 0.0014998387 0.0014015491 2.4226798e-05 + 4000 100 0.0010858335 0.0010858335 0.0010623286 1.6359241e-05 + 4100 100 0.0010464314 0.0010464314 0.0010123557 1.2949588e-05 + 4200 100 0.0010022428 0.0010022428 0.00097338971 1.2402332e-05 + 4300 100 0.00080622372 0.00080622372 0.00084329652 0.00033857037 + 4400 100 0.00073613921 0.00073613921 0.00078373608 1.0103949e-05 + 4500 100 0.00071402196 0.00071402196 0.00076658004 8.8360218e-06 + 4600 100 0.00064851765 0.00064851765 0.00071533461 1.0736438e-05 + 4700 100 0.00061146699 0.00061146699 0.00068274687 4.1341755e-06 + 4800 100 0.00059511472 0.00059511472 0.0006625527 7.3645447e-06 + 4900 100 0.00057700347 0.00057700347 0.0006468562 1.5411897e-05 + 5000 100 0.00056205001 0.00056205001 0.00063592505 7.8813845e-06 +Loop time of 0.0856033 on 4 procs for 5000 steps with 100 atoms + +Performance: 25232672.400 tau/day, 58408.964 timesteps/s, 5.841 Matom-step/s +88.4% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0034695 | 0.0050634 | 0.0068805 | 2.2 | 5.91 +Neigh | 0.0016916 | 0.0024175 | 0.0032212 | 1.5 | 2.82 +Comm | 0.020003 | 0.026482 | 0.033796 | 3.5 | 30.94 +Output | 0.0010864 | 0.001327 | 0.0014374 | 0.4 | 1.55 +Modify | 0.0067352 | 0.015857 | 0.025751 | 7.2 | 18.52 +Other | | 0.03446 | | | 40.25 + +Nlocal: 25 ave 53 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Nghost: 4 ave 8 max 0 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 40.5 ave 92 max 0 min +Histogram: 2 0 0 0 0 0 0 1 0 1 + +Total # of neighbors = 162 +Ave neighs/atom = 1.62 +Neighbor list builds = 288 +Dangerous builds = 0 + +region container delete +variable theta equal (step-5000)*(4.0*PI/5000) +region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 0 0 1 +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 1.3 + binsize = 0.65, bins = 31 31 31 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hooke, perpetual + attributes: half, newton on, size + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.609 | 5.672 | 5.734 Mbytes + Step Atoms Temp c_1 c_2 Press + 5000 100 0.00056205001 0.00056205001 0.00063592505 7.871665e-06 + 5100 100 0.59585977 0.59585977 0.32464933 0.0141718 + 5200 100 0.67306764 0.67306764 0.35872096 0.013373672 + 5300 100 0.76065187 0.76065187 0.39925025 0.011460301 + 5400 100 0.87984446 0.87984446 0.45261417 0.013937042 + 5500 100 0.95548319 0.95548319 0.48706892 0.013601658 + 5600 100 0.9993278 0.9993278 0.50830306 0.015663766 + 5700 100 1.0449415 1.0449415 0.52967249 0.016797841 + 5800 100 1.0767598 1.0767598 0.54508699 0.016128855 + 5900 100 1.118688 1.118688 0.56530849 0.016830117 + 6000 100 1.1535698 1.1535698 0.58290663 0.01715335 + 6100 100 1.1753828 1.1753828 0.59419088 0.019273207 + 6200 100 1.1994171 1.1994171 0.60433264 0.018391566 + 6300 100 1.2244707 1.2244707 0.61626199 0.018842556 + 6400 100 1.2507994 1.2507994 0.62829386 0.019538413 + 6500 100 1.2684644 1.2684644 0.63747702 0.020794729 + 6600 100 1.2704726 1.2704726 0.63929889 0.020253985 + 6700 100 1.2737302 1.2737302 0.63970688 0.020858602 + 6800 100 1.287922 1.287922 0.64460894 0.021589773 + 6900 100 1.3028782 1.3028782 0.65197802 0.02135295 + 7000 100 1.306633 1.306633 0.65371741 0.021291182 + 7100 100 1.3161393 1.3161393 0.65785404 0.022554896 + 7200 100 1.3228158 1.3228158 0.6609031 0.021811977 + 7300 100 1.3245632 1.3245632 0.66161966 0.02206776 + 7400 100 1.3266822 1.3266822 0.662738 0.022070761 + 7500 100 1.3265138 1.3265138 0.6624472 0.021944768 + 7600 100 1.3286802 1.3286802 0.66338775 0.0219393 + 7700 100 1.332829 1.332829 0.66547051 0.022142398 + 7800 100 1.3323535 1.3323535 0.66534513 0.022787777 + 7900 100 1.3372424 1.3372424 0.66777556 0.02192759 + 8000 100 1.3396201 1.3396201 0.66910123 0.022439596 + 8100 100 1.3422271 1.3422271 0.67060566 0.023784952 + 8200 100 1.3468062 1.3468062 0.6728991 0.02243345 + 8300 100 1.3439408 1.3439408 0.6717529 0.022312339 + 8400 100 1.3484134 1.3484134 0.67346027 0.022770922 + 8500 100 1.3490032 1.3490032 0.67378177 0.022427863 + 8600 100 1.349789 1.349789 0.67398897 0.022494049 + 8700 100 1.3513512 1.3513512 0.67475613 0.022413559 + 8800 100 1.3535168 1.3535168 0.67589784 0.022356566 + 8900 100 1.3505765 1.3505765 0.67442168 0.022240615 + 9000 100 1.3499918 1.3499918 0.67419831 0.02226049 + 9100 100 1.3518103 1.3518103 0.67489482 0.022399038 + 9200 100 1.3526275 1.3526275 0.67529852 0.022395079 + 9300 100 1.353741 1.353741 0.67585205 0.022471008 + 9400 100 1.3538758 1.3538758 0.67589523 0.022461734 + 9500 100 1.3537199 1.3537199 0.67586527 0.022370169 + 9600 100 1.3539788 1.3539788 0.67602899 0.022400771 + 9700 100 1.3544874 1.3544874 0.67619552 0.022648464 + 9800 100 1.3555422 1.3555422 0.67666186 0.022367319 + 9900 100 1.3560106 1.3560106 0.6768751 0.02236585 + 10000 100 1.3563578 1.3563578 0.6770434 0.022359307 +Loop time of 0.139615 on 4 procs for 5000 steps with 100 atoms + +Performance: 15471121.710 tau/day, 35812.782 timesteps/s, 3.581 Matom-step/s +89.9% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0034672 | 0.011349 | 0.019511 | 7.2 | 8.13 +Neigh | 0.0032972 | 0.0053674 | 0.0074946 | 2.8 | 3.84 +Comm | 0.011049 | 0.018572 | 0.027876 | 5.6 | 13.30 +Output | 0.0010807 | 0.0015593 | 0.0018738 | 0.8 | 1.12 +Modify | 0.013556 | 0.040435 | 0.066715 | 13.0 | 28.96 +Other | | 0.06233 | | | 44.65 + +Nlocal: 25 ave 52 max 0 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 3 ave 6 max 0 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 48.25 ave 109 max 0 min +Histogram: 2 0 0 0 0 0 0 1 0 1 + +Total # of neighbors = 193 +Ave neighs/atom = 1.93 +Neighbor list builds = 626 +Dangerous builds = 0 + +region container delete +region container block -6 6 -6 6 -6 6 units box +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.609 | 5.672 | 5.735 Mbytes + Step Atoms Temp c_1 c_2 Press + 10000 100 1.3563578 1.3563578 0.6770434 0.022433108 + 10100 100 0.32881547 0.32881547 0.18968913 0.0063460187 + 10200 100 0.19880113 0.19880113 0.12812646 0.0074601538 + 10300 100 0.12614062 0.12614062 0.090121373 0.0028337336 + 10400 100 0.088358363 0.088358363 0.067236815 0.0020269846 + 10500 100 0.071199344 0.071199344 0.055567135 0.0016191769 + 10600 100 0.053909616 0.053909616 0.042301996 0.00098643468 + 10700 100 0.039560745 0.039560745 0.032482256 0.00089240864 + 10800 100 0.032130432 0.032130432 0.02705329 0.00058669881 + 10900 100 0.02462494 0.02462494 0.021121496 0.0017376127 + 11000 100 0.020941068 0.020941068 0.017866781 0.00031112553 + 11100 100 0.016775675 0.016775675 0.014620214 0.00026856842 + 11200 100 0.015005732 0.015005732 0.012803923 0.00067036626 + 11300 100 0.012099209 0.012099209 0.010308221 0.00032666902 + 11400 100 0.010559421 0.010559421 0.0090243729 0.00013645685 + 11500 100 0.0093738615 0.0093738615 0.0080176514 0.00098541099 + 11600 100 0.0081900702 0.0081900702 0.0070256953 0.00025935992 + 11700 100 0.0068100165 0.0068100165 0.0058703223 0.00014866816 + 11800 100 0.0060475708 0.0060475708 0.0052518105 0.00017895168 + 11900 100 0.0055607485 0.0055607485 0.0047184164 0.00011358846 + 12000 100 0.0053149064 0.0053149064 0.0045168418 0.00015222428 + 12100 100 0.0050909525 0.0050909525 0.0043196952 6.3000537e-05 + 12200 100 0.0041810842 0.0041810842 0.0036835522 4.6423956e-05 + 12300 100 0.0034305227 0.0034305227 0.0031222649 0.00020251115 + 12400 100 0.0031763077 0.0031763077 0.0028956456 0.00030307787 + 12500 100 0.0027440829 0.0027440829 0.0025087304 0.00010418607 + 12600 100 0.0024581964 0.0024581964 0.0022200229 3.042018e-05 + 12700 100 0.002259527 0.002259527 0.0020708869 4.192368e-05 + 12800 100 0.0019143448 0.0019143448 0.0018088032 4.6200439e-05 + 12900 100 0.0017935964 0.0017935964 0.0017028317 2.2195756e-05 + 13000 100 0.0017286429 0.0017286429 0.0016396753 2.3108871e-05 + 13100 100 0.0017055291 0.0017055291 0.0016122058 2.2444611e-05 + 13200 100 0.0016539275 0.0016539275 0.0015570166 2.0467353e-05 + 13300 100 0.0015777788 0.0015777788 0.0014852505 1.9525012e-05 + 13400 100 0.0015372199 0.0015372199 0.0014497102 2.3203566e-05 + 13500 100 0.0015066638 0.0015066638 0.0014097203 1.8644964e-05 + 13600 100 0.0012290618 0.0012290618 0.0012056216 1.3235643e-05 + 13700 100 0.0011781948 0.0011781948 0.0011685226 3.4312262e-05 + 13800 100 0.0011530136 0.0011530136 0.0011433171 2.8832126e-05 + 13900 100 0.0011085224 0.0011085224 0.0011052764 1.444139e-05 + 14000 100 0.0010656788 0.0010656788 0.0010702461 1.3187775e-05 + 14100 100 0.001029277 0.001029277 0.0010469537 1.2837267e-05 + 14200 100 0.0009750904 0.0009750904 0.0009915384 1.209089e-05 + 14300 100 0.00094893337 0.00094893337 0.00096909301 1.1743051e-05 + 14400 100 0.00087708427 0.00087708427 0.00087575318 1.9027338e-05 + 14500 100 0.00086229913 0.00086229913 0.0008643568 1.0670952e-05 + 14600 100 0.00084206808 0.00084206808 0.0008268172 3.2391722e-05 + 14700 100 0.00077682873 0.00077682873 0.00077186085 9.6132555e-06 + 14800 100 0.00074736908 0.00074736908 0.00074958372 9.2486924e-06 + 14900 100 0.00074456847 0.00074456847 0.00074779946 9.2140349e-06 + 15000 100 0.00073830282 0.00073830282 0.0007426924 9.1364974e-06 +Loop time of 0.0808149 on 4 procs for 5000 steps with 100 atoms + +Performance: 26727738.394 tau/day, 61869.765 timesteps/s, 6.187 Matom-step/s +86.6% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0034354 | 0.0050332 | 0.0069329 | 2.2 | 6.23 +Neigh | 0.00051999 | 0.00084906 | 0.0012075 | 0.0 | 1.05 +Comm | 0.0063631 | 0.014527 | 0.023754 | 6.8 | 17.98 +Output | 0.0010373 | 0.001342 | 0.001464 | 0.5 | 1.66 +Modify | 0.0051837 | 0.017338 | 0.031605 | 9.3 | 21.45 +Other | | 0.04173 | | | 51.63 + +Nlocal: 25 ave 53 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Nghost: 3.75 ave 8 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Neighs: 39.25 ave 82 max 0 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 157 +Ave neighs/atom = 1.57 +Neighbor list builds = 100 +Dangerous builds = 0 + +region container delete +variable theta equal (step-15000)*(4.0*PI/5000) +region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 1 1 1 +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.609 | 5.672 | 5.735 Mbytes + Step Atoms Temp c_1 c_2 Press + 15000 100 0.00073830282 0.00073830282 0.0007426924 9.1364974e-06 + 15100 100 1.1048281 1.1048281 0.7023727 0.018379275 + 15200 100 1.2022249 1.2022249 0.77748962 0.015662439 + 15300 100 1.2561351 1.2561351 0.82563065 0.01835048 + 15400 100 1.4372446 1.4372446 0.92907923 0.02087065 + 15500 100 1.6414713 1.6414713 1.0284489 0.025654324 + 15600 100 1.7844655 1.7844655 1.0861866 0.025170346 + 15700 100 2.034248 2.034248 1.2017171 0.040341642 + 15800 100 2.1253699 2.1253699 1.2228657 0.029297194 + 15900 100 2.1940232 2.1940232 1.2470589 0.033866758 + 16000 100 2.2624419 2.2624419 1.2828225 0.030063645 + 16100 100 2.3208536 2.3208536 1.3118956 0.0323489 + 16200 100 2.3564971 2.3564971 1.3261173 0.032882494 + 16300 100 2.3956066 2.3956066 1.3260307 0.03292972 + 16400 100 2.5025831 2.5025831 1.3817693 0.031132988 + 16500 100 2.5947914 2.5947914 1.4152657 0.036126782 + 16600 100 2.7688769 2.7688769 1.4975686 0.037497127 + 16700 100 2.812503 2.812503 1.5216659 0.039316167 + 16800 100 2.8977424 2.8977424 1.5599254 0.039996029 + 16900 100 3.045802 3.045802 1.6332888 0.041406156 + 17000 100 3.2195366 3.2195366 1.7247171 0.040023634 + 17100 100 3.2597294 3.2597294 1.7527958 0.04828292 + 17200 100 3.293587 3.293587 1.7693254 0.044001441 + 17300 100 3.1861836 3.1861836 1.7142076 0.049158822 + 17400 100 3.4593561 3.4593561 1.8426619 0.053469673 + 17500 100 3.3813767 3.3813767 1.8079958 0.058776299 + 17600 100 3.5834203 3.5834203 1.9094759 0.053256842 + 17700 100 3.2243306 3.2243306 1.7425111 0.064354789 + 17800 100 3.358228 3.358228 1.8202932 0.046798524 + 17900 100 3.2257908 3.2257908 1.7678964 0.043655204 + 18000 100 3.237732 3.237732 1.7598181 0.050850672 + 18100 100 3.2042441 3.2042441 1.751979 0.045582006 + 18200 100 3.1562775 3.1562775 1.7336068 0.042210739 + 18300 100 3.2630507 3.2630507 1.7925333 0.046412778 + 18400 100 3.4150588 3.4150588 1.8668408 0.044386435 + 18500 100 3.4913198 3.4913198 1.9125495 0.043329829 + 18600 100 3.5290036 3.5290036 1.9184098 0.048302721 + 18700 100 3.4852698 3.4852698 1.8865833 0.059566124 + 18800 100 3.7157551 3.7157551 2.0082235 0.051356305 + 18900 100 3.9504619 3.9504619 2.1377018 0.051553987 + 19000 100 3.9711274 3.9711274 2.1549121 0.051555312 + 19100 100 3.90954 3.90954 2.1135174 0.0548311 + 19200 100 4.0672819 4.0672819 2.1837089 0.064431553 + 19300 100 3.998355 3.998355 2.1572884 0.056830399 + 19400 100 3.9172127 3.9172127 2.1130164 0.051264041 + 19500 100 3.9120291 3.9120291 2.1088399 0.052545115 + 19600 100 3.8613614 3.8613614 2.0752883 0.055466569 + 19700 100 3.8428824 3.8428824 2.0787804 0.05129261 + 19800 100 3.5686751 3.5686751 1.9356553 0.059177256 + 19900 100 3.5573788 3.5573788 1.9430183 0.054618794 + 20000 100 3.5453022 3.5453022 1.9413343 0.047640543 +Loop time of 0.13841 on 4 procs for 5000 steps with 100 atoms + +Performance: 15605800.739 tau/day, 36124.539 timesteps/s, 3.612 Matom-step/s +89.0% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0047469 | 0.0062771 | 0.0080644 | 1.5 | 4.54 +Neigh | 0.0062517 | 0.0079248 | 0.0094271 | 1.3 | 5.73 +Comm | 0.047109 | 0.048595 | 0.050543 | 0.6 | 35.11 +Output | 0.0011807 | 0.0013428 | 0.0015517 | 0.4 | 0.97 +Modify | 0.022766 | 0.033256 | 0.039993 | 3.5 | 24.03 +Other | | 0.04101 | | | 29.63 + +Nlocal: 25 ave 36 max 13 min +Histogram: 1 0 0 0 1 0 1 0 0 1 +Nghost: 5 ave 9 max 2 min +Histogram: 1 0 1 0 1 0 0 0 0 1 +Neighs: 37.5 ave 53 max 15 min +Histogram: 1 0 0 0 0 1 0 1 0 1 + +Total # of neighbors = 150 +Ave neighs/atom = 1.5 +Neighbor list builds = 913 +Dangerous builds = 0 + +region container delete +region container block -6 6 -6 6 -6 6 units box +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.734 | 5.735 | 5.735 Mbytes + Step Atoms Temp c_1 c_2 Press + 20000 100 3.5453022 3.5453022 1.9413343 0.047178052 + 20100 100 1.0878587 1.0878587 0.68666704 0.016139979 + 20200 100 1.0230655 1.0230655 0.63593494 0.014642345 + 20300 100 0.94958824 0.94958824 0.59306601 0.011745659 + 20400 100 0.93038108 0.93038108 0.57232527 0.01154829 + 20500 100 0.92183816 0.92183816 0.55466942 0.01212559 + 20600 100 1.0175846 1.0175846 0.59940035 0.013815361 + 20700 100 1.0564615 1.0564615 0.60726745 0.013073711 + 20800 100 0.99967869 0.99967869 0.57665019 0.012450813 + 20900 100 0.97051084 0.97051084 0.5574217 0.015686955 + 21000 100 0.639185 0.639185 0.37441942 0.017594616 + 21100 100 0.24979014 0.24979014 0.17121567 0.0084027295 + 21200 100 0.15147941 0.15147941 0.11124349 0.0030435746 + 21300 100 0.13117502 0.13117502 0.091432638 0.0029110318 + 21400 100 0.11158272 0.11158272 0.076264692 0.0021951204 + 21500 100 0.056660993 0.056660993 0.043503807 0.0010993096 + 21600 100 0.028640836 0.028640836 0.026000267 0.0010440792 + 21700 100 0.025816483 0.025816483 0.021922896 0.00081674646 + 21800 100 0.023929555 0.023929555 0.019936972 0.0010383614 + 21900 100 0.022271339 0.022271339 0.017947505 0.0014630387 + 22000 100 0.019277834 0.019277834 0.015483116 0.00058751407 + 22100 100 0.019997809 0.019997809 0.015919504 0.00064176101 + 22200 100 0.015870543 0.015870543 0.01244838 0.0004205505 + 22300 100 0.011797587 0.011797587 0.0096491363 0.00034907063 + 22400 100 0.010745212 0.010745212 0.008874218 0.00035427537 + 22500 100 0.0082372399 0.0082372399 0.0071217811 0.00028179943 + 22600 100 0.007942576 0.007942576 0.0067248822 0.001507115 + 22700 100 0.0061733667 0.0061733667 0.0053092324 0.00056018554 + 22800 100 0.0058287651 0.0058287651 0.004972189 0.00023807695 + 22900 100 0.0051352339 0.0051352339 0.004324157 0.00020849263 + 23000 100 0.0040107769 0.0040107769 0.0035769703 0.00022626101 + 23100 100 0.0040288854 0.0040288854 0.0034355474 0.00019107621 + 23200 100 0.003277858 0.003277858 0.0030013165 0.00016119888 + 23300 100 0.0033633749 0.0033633749 0.0030188927 0.00014459404 + 23400 100 0.003468042 0.003468042 0.0030079205 0.00013778427 + 23500 100 0.0027616702 0.0027616702 0.0024994596 0.00011834915 + 23600 100 0.0022531303 0.0022531303 0.0021182802 0.0002279623 + 23700 100 0.002067768 0.002067768 0.0019631752 0.00014341503 + 23800 100 0.0020069255 0.0020069255 0.0019209587 0.00010673435 + 23900 100 0.0019630617 0.0019630617 0.0018748221 0.00011856923 + 24000 100 0.0018800646 0.0018800646 0.0018190347 0.00010707562 + 24100 100 0.0018028137 0.0018028137 0.0017067233 0.00010884117 + 24200 100 0.0017278932 0.0017278932 0.0016251004 0.00013664683 + 24300 100 0.0016373288 0.0016373288 0.0015529481 0.00010025414 + 24400 100 0.0019876848 0.0019876848 0.0016912033 0.00011235942 + 24500 100 0.0013677345 0.0013677345 0.0012839488 7.8669645e-05 + 24600 100 0.0012852614 0.0012852614 0.0012065052 0.00010172361 + 24700 100 0.0011145002 0.0011145002 0.0010748344 7.5021689e-05 + 24800 100 0.0012860792 0.0012860792 0.0011429675 5.7939624e-05 + 24900 100 0.00097198499 0.00097198499 0.00096175911 5.443837e-05 + 25000 100 0.00096224466 0.00096224466 0.00095159089 5.4245409e-05 +Loop time of 0.0846408 on 4 procs for 5000 steps with 100 atoms + +Performance: 25519602.289 tau/day, 59073.153 timesteps/s, 5.907 Matom-step/s +82.3% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0035473 | 0.0055294 | 0.0082454 | 2.7 | 6.53 +Neigh | 0.0016391 | 0.0022521 | 0.0028115 | 1.1 | 2.66 +Comm | 0.014697 | 0.021565 | 0.029045 | 4.1 | 25.48 +Output | 0.0010785 | 0.00132 | 0.0014171 | 0.4 | 1.56 +Modify | 0.0059648 | 0.01618 | 0.027615 | 7.9 | 19.12 +Other | | 0.03779 | | | 44.65 + +Nlocal: 25 ave 56 max 0 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Nghost: 5.5 ave 12 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Neighs: 40 ave 101 max 0 min +Histogram: 2 0 0 0 0 1 0 0 0 1 + +Total # of neighbors = 160 +Ave neighs/atom = 1.6 +Neighbor list builds = 275 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/granregion/log.15Sep22.granregion.funnel.g++.1 b/examples/granregion/log.15Sep22.granregion.funnel.g++.1 new file mode 100644 index 0000000000..fc60ca4928 --- /dev/null +++ b/examples/granregion/log.15Sep22.granregion.funnel.g++.1 @@ -0,0 +1,633 @@ +LAMMPS (15 Sep 2022) +# pour particles into cone-shaped funnel, settle them, let them run out bottom + +variable name string funnel_pour + +thermo_modify flush yes +units si +variable PI equal 3.141592653589 +variable seed equal 14314 + +############################################### +# Geometry-related parameters +############################################### + +variable xlo equal 10 +variable xhi equal 40 +variable ylo equal 10 +variable yhi equal 40 +variable zlo equal -20 +variable zhi equal 50 + +variable xc equal 25 +variable yc equal 25 + +variable zconehi equal 50 +variable zconelo equal 10 +variable zcyllo equal 0 +variable radconelo equal 2 +variable radconehi equal 20 + +################################################ +# Particle sizes +################################################ + +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.25 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.5 + +variable skin equal ${rhi} +variable skin equal 0.5 + +############################################### +# Granular contact parameters +############################################### + +variable coeffRes equal 0.1 +variable coeffFric equal 0.5 + +variable density equal 1.0 +variable EYoung equal 10^5 +variable Poisson equal 2.0/7.0 +variable GShear equal ${EYoung}/(2*(1+${Poisson})) +variable GShear equal 100000/(2*(1+${Poisson})) +variable GShear equal 100000/(2*(1+0.285714285714286)) + +variable gravity equal 1.0 + +variable reff equal 0.5*(${rhi}+${rlo}) +variable reff equal 0.5*(0.5+${rlo}) +variable reff equal 0.5*(0.5+0.25) +variable meff equal ${density}*4.0/3.0*${PI}*${reff}^3 +variable meff equal 1*4.0/3.0*${PI}*${reff}^3 +variable meff equal 1*4.0/3.0*3.141592653589*${reff}^3 +variable meff equal 1*4.0/3.0*3.141592653589*0.375^3 +variable min_mass equal ${density}*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*0.25 +variable max_mass equal ${density}*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*0.5 + +## Typical way to set kn, kt, etc.: +variable kn equal 4.0*${GShear}/(3*(1-${Poisson})) +variable kn equal 4.0*38888.8888888889/(3*(1-${Poisson})) +variable kn equal 4.0*38888.8888888889/(3*(1-0.285714285714286)) +variable kt equal 4.0*${GShear}/(2-${Poisson}) +variable kt equal 4.0*38888.8888888889/(2-${Poisson}) +variable kt equal 4.0*38888.8888888889/(2-0.285714285714286) + +variable a equal (-2.0*log(${coeffRes})/${PI})^2 +variable a equal (-2.0*log(0.1)/${PI})^2 +variable a equal (-2.0*log(0.1)/3.141592653589)^2 +variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*0.405284734569556)) +variable gamma_t equal ${gamma_n}*0.5 +variable gamma_t equal 903.503751814138*0.5 + +variable tcol equal ${PI}/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-903.503751814138/4.0) + +variable dt equal ${tcol}*0.05 +variable dt equal 0.00210943016014969*0.05 +timestep ${dt} +timestep 0.000105471508007485 + +############################################### +variable dumpfreq equal 1000 +variable logfreq equal 1000 + +newton off +atom_style sphere + +boundary p p f + +region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 10 ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 10 40 ${zlo} ${zhi} +region boxreg block 10 40 10 40 -20 ${zhi} +region boxreg block 10 40 10 40 -20 50 +create_box 1 boxreg +Created orthogonal box = (10 10 -20) to (40 40 50) + 1 by 1 by 1 MPI processor grid + +pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 +pair_coeff * * + +neighbor ${skin} multi +neighbor 0.5 multi +thermo ${logfreq} +thermo 1000 + +comm_style brick +comm_modify mode multi group all vel yes +balance 1.1 shift xyz 20 1.1 +Balancing ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0 + ghost atom cutoff = 0 + binsize = 30, bins = 1 1 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton off, size, history + pair build: half/size/multi/newtoff + stencil: full/multi/3d + bin: multi +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:210) +fix bal all balance 10000 1.1 shift xyz 20 1.01 + +####################### Options specific to pouring ######################### + +# insertion region for fix/pour + +region insreg cylinder z ${xc} ${yc} 10 30 50 side in units box +region insreg cylinder z 25 ${yc} 10 30 50 side in units box +region insreg cylinder z 25 25 10 30 50 side in units box + +# define cone and cylinder regions - see lammps doc on region command +# note new open options + +region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 #Top is open +region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 0 10 side in units box open 2 + +region conereg cone z ${xc} ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 #Bottom and top are open +region conereg cone z 25 ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 10 ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 10 50 side in units box open 1 open 2 + +region hopreg union 2 conereg cylreg + +fix grav all gravity ${gravity} vector 0 0 -1 +fix grav all gravity 1 vector 0 0 -1 +fix 1 all nve/sphere + + +fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg + +fix ins all pour 2000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 ${dhi} dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 3000 every 59965 steps, 2000 by step 1 + +#dump 1 all custom ${dumpfreq} ${name}.dump # id type mass diameter x y z + +#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 3.0 # box no 0.0 axes no 0.0 0.0 +#dump_modify 2 pad 6 + +thermo_style custom step cpu atoms ke +WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:896) +thermo_modify flush yes lost warn + +# Initial run to fill up the cone + +run 20000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 6.648 | 6.648 | 6.648 Mbytes + Step CPU Atoms KinEng + 0 0 0 -0 + 1000 0.39961733 2000 -0 + 2000 0.61811961 2000 -0 + 3000 0.83512725 2000 -0 + 4000 1.0492881 2000 -0 + 5000 1.2650657 2000 -0 + 6000 1.479921 2000 -0 + 7000 1.6970993 2000 -0 + 8000 1.9107924 2000 -0 + 9000 2.1251713 2000 -0 + 10000 2.3403682 2000 -0 + 11000 2.549912 2000 -0 + 12000 2.7584788 2000 -0 + 13000 2.9712482 2000 -0 + 14000 3.1877015 2000 -0 + 15000 3.4017175 2000 -0 + 16000 3.6127477 2000 -0 + 17000 3.8250134 2000 -0 + 18000 4.0320643 2000 -0 + 19000 4.2371057 2000 -0 + 20000 4.4450882 2000 -0 +Loop time of 4.44512 on 1 procs for 20000 steps with 2000 atoms + +98.7% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.40438 | 0.40438 | 0.40438 | 0.0 | 9.10 +Neigh | 0.078634 | 0.078634 | 0.078634 | 0.0 | 1.77 +Comm | 0.01999 | 0.01999 | 0.01999 | 0.0 | 0.45 +Output | 0.00069031 | 0.00069031 | 0.00069031 | 0.0 | 0.02 +Modify | 3.795 | 3.795 | 3.795 | 0.0 | 85.38 +Other | | 0.1464 | | | 3.29 + +Nlocal: 2000 ave 2000 max 2000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1607 ave 1607 max 1607 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1607 +Ave neighs/atom = 0.8035 +Neighbor list builds = 71 +Dangerous builds = 0 +unfix ins +run 150000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 12.69 | 12.69 | 12.69 Mbytes + Step CPU Atoms KinEng + 20000 0 2000 6652.2957 + 21000 0.2135317 2000 6807.2201 + 22000 0.4235523 2000 6973.9359 + 23000 0.63502794 2000 7142.3648 + 24000 0.84593615 2000 7276.9717 + 25000 1.0580291 2000 7369.4191 + 26000 1.2719892 2000 7497.6526 + 27000 1.4843056 2000 7638.946 + 28000 1.9685336 2000 7780.0339 + 29000 2.1850097 2000 7881.8177 + 30000 2.4033006 2000 7967.2641 + 31000 2.6219694 2000 7994.9273 + 32000 2.8455468 2000 7937.0671 + 33000 3.0720066 2000 7774.0508 + 34000 3.3070513 2000 7591.1491 + 35000 3.5468777 2000 7357.5176 + 36000 3.7908265 2000 7147.2024 + 37000 4.0388657 2000 6979.1604 + 38000 4.2873223 2000 6813.2152 + 39000 4.5424244 2000 6660.2701 + 40000 4.8055367 2000 6502.8957 + 41000 5.0754561 2000 6324.3951 + 42000 5.3564118 2000 6132.7516 + 43000 5.6357256 2000 5913.1841 + 44000 5.9130645 2000 5732.2095 + 45000 6.1943539 2000 5508.8322 + 46000 6.4862302 2000 5306.8932 + 47000 6.7796417 2000 5152.0521 + 48000 7.0750069 2000 5028.2274 + 49000 7.3705252 2000 4896.102 + 50000 7.6693894 2000 4723.5189 + 51000 7.9685182 2000 4583.7526 + 52000 8.2774033 2000 4447.0187 + 53000 8.591482 2000 4303.2307 + 54000 8.9156439 2000 4168.5251 + 55000 9.2437364 2000 4036.9704 + 56000 9.5745684 2000 3901.1183 + 57000 9.9173689 2000 3716.7071 + 58000 10.270229 2000 3473.5422 + 59000 10.629101 2000 3245.1223 + 60000 10.989479 2000 3039.7845 + 61000 11.349843 2000 2780.0187 + 62000 11.716916 2000 2577.3345 + 63000 12.093666 2000 2346.2488 + 64000 12.474788 2000 2116.7298 + 65000 12.861438 2000 1903.7828 + 66000 13.25464 2000 1631.1676 + 67000 13.658382 2000 1431.0198 + 68000 14.067584 2000 1212.875 + 69000 14.480877 2000 995.45046 + 70000 14.894765 2000 811.54766 + 71000 15.309158 2000 624.08622 + 72000 15.732937 2000 471.00862 + 73000 16.158388 2000 358.33486 + 74000 16.583847 2000 284.39416 + 75000 17.008335 2000 234.26671 + 76000 17.429582 2000 185.61836 + 77000 17.852799 2000 152.95918 + 78000 18.276783 2000 122.49023 + 79000 18.697016 2000 102.29396 + 80000 19.12318 2000 86.284684 + 81000 19.54992 2000 73.984781 + 82000 19.986149 2000 63.042918 + 83000 20.430305 2000 53.338428 + 84000 20.876061 2000 45.89585 + 85000 21.32714 2000 40.412826 + 86000 21.781352 2000 34.183381 + 87000 22.238656 2000 29.671524 + 88000 22.698093 2000 26.90414 + 89000 23.160614 2000 24.362631 + 90000 23.630639 2000 21.887341 + 91000 24.095463 2000 19.985662 + 92000 24.570659 2000 18.728162 + 93000 25.047431 2000 16.99941 + 94000 25.549041 2000 15.71941 + 95000 26.03281 2000 14.744057 + 96000 26.513659 2000 14.214918 + 97000 26.998918 2000 13.450182 + 98000 27.486584 2000 12.79222 + 99000 27.986785 2000 12.10595 + 100000 28.48799 2000 11.281863 + 101000 28.986622 2000 10.025419 + 102000 29.491312 2000 9.9574468 + 103000 29.999421 2000 9.4078117 + 104000 30.507211 2000 8.9079161 + 105000 31.016484 2000 8.6269302 + 106000 31.527511 2000 8.5512649 + 107000 32.042612 2000 8.4703948 + 108000 32.555041 2000 8.2747542 + 109000 33.07064 2000 8.2895118 + 110000 33.593773 2000 8.1785613 + 111000 34.107129 2000 7.8443234 + 112000 34.619185 2000 7.7436124 + 113000 35.13418 2000 7.8118604 + 114000 35.653352 2000 7.3806177 + 115000 36.179577 2000 7.0857235 + 116000 36.69882 2000 7.1346752 + 117000 37.224612 2000 7.0653751 + 118000 37.756738 2000 6.6314104 + 119000 38.283151 2000 6.2169614 + 120000 38.808288 2000 5.8988829 + 121000 39.334913 2000 5.4197277 + 122000 39.862081 2000 4.6381303 + 123000 40.390252 2000 4.4949206 + 124000 40.920744 2000 4.4261118 + 125000 41.4469 2000 4.4223703 + 126000 41.977937 2000 4.4858898 + 127000 42.51483 2000 4.3312536 + 128000 43.046324 2000 3.7124973 + 129000 43.573687 2000 3.5467396 + 130000 44.103102 2000 3.5104139 + 131000 44.629869 2000 3.5725612 + 132000 45.156621 2000 3.669455 + 133000 45.69364 2000 3.6168912 + 134000 46.23133 2000 3.3598517 + 135000 46.765487 2000 3.3743407 + 136000 47.323693 2000 3.1109764 + 137000 47.881617 2000 3.0720146 + 138000 48.439179 2000 3.1303776 + 139000 49.001417 2000 3.2052806 + 140000 49.558061 2000 2.8958882 + 141000 50.097789 2000 2.9931572 + 142000 50.636089 2000 3.0967832 + 143000 51.175873 2000 3.0576365 + 144000 51.706799 2000 3.2016943 + 145000 52.239356 2000 3.3817709 + 146000 52.769944 2000 3.4527239 + 147000 53.30872 2000 3.5928733 + 148000 53.847762 2000 3.7784682 + 149000 54.387455 2000 3.6587944 + 150000 54.931594 2000 3.7945669 + 151000 55.470076 2000 3.5551557 + 152000 56.01448 2000 3.6248848 + 153000 56.552259 2000 3.7361463 + 154000 57.092655 2000 3.8534319 + 155000 57.635767 2000 4.0101408 + 156000 58.180249 2000 3.7670652 + 157000 58.724032 2000 3.1487676 + 158000 59.262015 2000 2.980076 + 159000 59.794312 2000 3.0350592 + 160000 60.331617 2000 3.125389 + 161000 60.861827 2000 2.7516115 + 162000 61.396691 2000 2.413911 + 163000 61.930145 2000 2.297713 + 164000 62.466983 2000 2.3190806 + 165000 63.00535 2000 2.2868879 + 166000 63.546881 2000 2.1658547 + 167000 64.091461 2000 1.7511071 + 168000 64.63141 2000 1.4112478 + 169000 65.17459 2000 1.3623558 + 170000 65.719571 2000 1.3701579 +Loop time of 65.7196 on 1 procs for 150000 steps with 2000 atoms + +98.9% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 32.424 | 32.424 | 32.424 | 0.0 | 49.34 +Neigh | 0.65326 | 0.65326 | 0.65326 | 0.0 | 0.99 +Comm | 0.14207 | 0.14207 | 0.14207 | 0.0 | 0.22 +Output | 0.26326 | 0.26326 | 0.26326 | 0.0 | 0.40 +Modify | 31.109 | 31.109 | 31.109 | 0.0 | 47.34 +Other | | 1.128 | | | 1.72 + +Nlocal: 2000 ave 2000 max 2000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 15308 ave 15308 max 15308 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 15308 +Ave neighs/atom = 7.654 +Neighbor list builds = 367 +Dangerous builds = 0 + +# remove "plug" - need to redefine cylinder region & union + +region cylreg delete +region hopreg delete +region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 #Bottom & top are open +region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 0 10 side in units box open 1 open 2 + +region hopreg union 2 cylreg conereg + +unfix hopper3 +fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg + +run 100000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 12.69 | 12.69 | 12.69 Mbytes + Step CPU Atoms KinEng + 170000 0 2000 1.3701579 + 171000 0.54961146 2000 2.3724823 + 172000 1.0905775 2000 3.5881441 + 173000 1.6190656 2000 5.3771633 + 174000 2.1428619 2000 7.5896471 + 175000 2.6623327 2000 10.77251 + 176000 3.1738773 2000 14.806868 + 177000 3.6751053 2000 19.607624 + 178000 4.17465 2000 25.426227 + 179000 4.6736143 2000 32.23584 + 180000 5.1769137 2000 39.930468 + 181000 5.6766809 2000 47.686304 + 182000 6.1722504 2000 56.506806 + 183000 6.6603586 2000 66.514326 + 184000 7.1473381 2000 77.554644 + 185000 7.6343824 2000 89.224002 + 186000 8.1170225 2000 102.07846 + 187000 8.598305 2000 116.08141 + 188000 9.0708108 2000 130.97964 + 189000 9.5435695 2000 146.77806 + 190000 10.015069 2000 162.79858 + 191000 10.480992 2000 179.02052 + 192000 10.941896 2000 196.26683 + 193000 11.398748 2000 214.38928 + 194000 11.856098 2000 232.32068 + 195000 12.314324 2000 251.74644 + 196000 12.765746 2000 272.25231 + 197000 13.216453 2000 294.64075 + 198000 13.663698 2000 318.32895 + 199000 14.109901 2000 342.44005 + 200000 14.560399 2000 368.35469 + 201000 15.008158 2000 395.2465 + 202000 15.460487 2000 422.63599 + 203000 15.913115 2000 450.45248 + 204000 16.363656 2000 479.60812 + 205000 16.816929 2000 510.44155 + 206000 17.265488 2000 543.25751 + 207000 17.707782 2000 577.35928 + 208000 18.151051 2000 612.29718 + 209000 18.588363 2000 647.8951 + 210000 19.027167 2000 683.79409 + 211000 19.463213 2000 720.36556 + 212000 19.901783 2000 759.27331 + 213000 20.340436 2000 798.27302 + 214000 20.775782 2000 837.93849 + 215000 21.207465 2000 877.92945 + 216000 21.641572 2000 919.62532 + 217000 22.077351 2000 962.83509 + 218000 22.517089 2000 1008.5243 + 219000 22.948683 2000 1054.5769 + 220000 23.381029 2000 1103.1843 + 221000 23.809214 2000 1153.0349 + 222000 24.246127 2000 1204.5599 + 223000 24.677676 2000 1257.1367 + 224000 25.113989 2000 1308.6735 +WARNING: Lost atoms: original 2000 current 1999 (../thermo.cpp:486) + 225000 25.549621 1999 1360.1205 + 226000 25.977155 1998 1404.8405 + 227000 26.406475 1996 1448.4869 + 228000 26.832152 1992 1491.8112 + 229000 27.25327 1985 1518.7013 + 230000 27.672907 1971 1507.6699 + 231000 28.086761 1965 1533.5096 + 232000 28.500134 1948 1489.4128 + 233000 28.912212 1933 1477.4536 + 234000 29.320197 1915 1425.8398 + 235000 29.723669 1904 1410.1451 + 236000 30.124339 1892 1401.7595 + 237000 30.523539 1880 1368.893 + 238000 30.919483 1868 1341.8885 + 239000 31.313194 1850 1286.7968 + 240000 31.711659 1833 1219.5123 + 241000 32.106468 1820 1173.3608 + 242000 32.505486 1806 1106.0727 + 243000 32.905579 1788 1035.912 + 244000 33.303155 1779 1021.6147 + 245000 33.696614 1767 969.40032 + 246000 34.083545 1757 939.12022 + 247000 34.472486 1739 840.9396 + 248000 34.858907 1730 822.06575 + 249000 35.248061 1719 762.11057 + 250000 35.639608 1707 708.50308 + 251000 36.029812 1700 692.12647 + 252000 36.428881 1697 694.5812 + 253000 36.821304 1686 652.36951 + 254000 37.203008 1682 662.95256 + 255000 37.576678 1677 637.34619 + 256000 37.952398 1672 630.71277 + 257000 38.336834 1669 641.87365 + 258000 38.719421 1665 635.862 + 259000 39.104236 1664 658.5339 + 260000 39.484223 1662 669.95468 + 261000 39.861203 1660 676.93495 + 262000 40.240183 1657 681.72646 + 263000 40.614974 1655 687.4078 + 264000 40.99447 1651 681.61352 + 265000 41.368018 1647 673.20622 + 266000 41.740288 1644 677.30073 + 267000 42.111704 1641 671.05897 + 268000 42.479868 1639 689.55776 + 269000 42.851008 1637 711.98809 + 270000 43.22438 1633 705.29974 +Loop time of 43.2244 on 1 procs for 100000 steps with 1633 atoms + +99.2% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 22.312 | 22.312 | 22.312 | 0.0 | 51.62 +Neigh | 0.47451 | 0.47451 | 0.47451 | 0.0 | 1.10 +Comm | 0.093822 | 0.093822 | 0.093822 | 0.0 | 0.22 +Output | 0.0028326 | 0.0028326 | 0.0028326 | 0.0 | 0.01 +Modify | 19.626 | 19.626 | 19.626 | 0.0 | 45.40 +Other | | 0.7152 | | | 1.65 + +Nlocal: 1633 ave 1633 max 1633 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 11358 ave 11358 max 11358 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 11358 +Ave neighs/atom = 6.955297 +Neighbor list builds = 244 +Dangerous builds = 0 +Total wall time: 0:01:53 diff --git a/examples/granregion/log.15Sep22.granregion.funnel.g++.4 b/examples/granregion/log.15Sep22.granregion.funnel.g++.4 new file mode 100644 index 0000000000..3c18217deb --- /dev/null +++ b/examples/granregion/log.15Sep22.granregion.funnel.g++.4 @@ -0,0 +1,633 @@ +LAMMPS (15 Sep 2022) +# pour particles into cone-shaped funnel, settle them, let them run out bottom + +variable name string funnel_pour + +thermo_modify flush yes +units si +variable PI equal 3.141592653589 +variable seed equal 14314 + +############################################### +# Geometry-related parameters +############################################### + +variable xlo equal 10 +variable xhi equal 40 +variable ylo equal 10 +variable yhi equal 40 +variable zlo equal -20 +variable zhi equal 50 + +variable xc equal 25 +variable yc equal 25 + +variable zconehi equal 50 +variable zconelo equal 10 +variable zcyllo equal 0 +variable radconelo equal 2 +variable radconehi equal 20 + +################################################ +# Particle sizes +################################################ + +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.25 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.5 + +variable skin equal ${rhi} +variable skin equal 0.5 + +############################################### +# Granular contact parameters +############################################### + +variable coeffRes equal 0.1 +variable coeffFric equal 0.5 + +variable density equal 1.0 +variable EYoung equal 10^5 +variable Poisson equal 2.0/7.0 +variable GShear equal ${EYoung}/(2*(1+${Poisson})) +variable GShear equal 100000/(2*(1+${Poisson})) +variable GShear equal 100000/(2*(1+0.285714285714286)) + +variable gravity equal 1.0 + +variable reff equal 0.5*(${rhi}+${rlo}) +variable reff equal 0.5*(0.5+${rlo}) +variable reff equal 0.5*(0.5+0.25) +variable meff equal ${density}*4.0/3.0*${PI}*${reff}^3 +variable meff equal 1*4.0/3.0*${PI}*${reff}^3 +variable meff equal 1*4.0/3.0*3.141592653589*${reff}^3 +variable meff equal 1*4.0/3.0*3.141592653589*0.375^3 +variable min_mass equal ${density}*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*0.25 +variable max_mass equal ${density}*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*0.5 + +## Typical way to set kn, kt, etc.: +variable kn equal 4.0*${GShear}/(3*(1-${Poisson})) +variable kn equal 4.0*38888.8888888889/(3*(1-${Poisson})) +variable kn equal 4.0*38888.8888888889/(3*(1-0.285714285714286)) +variable kt equal 4.0*${GShear}/(2-${Poisson}) +variable kt equal 4.0*38888.8888888889/(2-${Poisson}) +variable kt equal 4.0*38888.8888888889/(2-0.285714285714286) + +variable a equal (-2.0*log(${coeffRes})/${PI})^2 +variable a equal (-2.0*log(0.1)/${PI})^2 +variable a equal (-2.0*log(0.1)/3.141592653589)^2 +variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*0.405284734569556)) +variable gamma_t equal ${gamma_n}*0.5 +variable gamma_t equal 903.503751814138*0.5 + +variable tcol equal ${PI}/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-903.503751814138/4.0) + +variable dt equal ${tcol}*0.05 +variable dt equal 0.00210943016014969*0.05 +timestep ${dt} +timestep 0.000105471508007485 + +############################################### +variable dumpfreq equal 1000 +variable logfreq equal 1000 + +newton off +atom_style sphere + +boundary p p f + +region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 10 ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 10 40 ${zlo} ${zhi} +region boxreg block 10 40 10 40 -20 ${zhi} +region boxreg block 10 40 10 40 -20 50 +create_box 1 boxreg +Created orthogonal box = (10 10 -20) to (40 40 50) + 1 by 1 by 4 MPI processor grid + +pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 +pair_coeff * * + +neighbor ${skin} multi +neighbor 0.5 multi +thermo ${logfreq} +thermo 1000 + +comm_style brick +comm_modify mode multi group all vel yes +balance 1.1 shift xyz 20 1.1 +Balancing ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0 + ghost atom cutoff = 0 + binsize = 30, bins = 1 1 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton off, size, history + pair build: half/size/multi/newtoff + stencil: full/multi/3d + bin: multi +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:210) +fix bal all balance 10000 1.1 shift xyz 20 1.01 + +####################### Options specific to pouring ######################### + +# insertion region for fix/pour + +region insreg cylinder z ${xc} ${yc} 10 30 50 side in units box +region insreg cylinder z 25 ${yc} 10 30 50 side in units box +region insreg cylinder z 25 25 10 30 50 side in units box + +# define cone and cylinder regions - see lammps doc on region command +# note new open options + +region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 #Top is open +region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 0 10 side in units box open 2 + +region conereg cone z ${xc} ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 #Bottom and top are open +region conereg cone z 25 ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 10 ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 10 50 side in units box open 1 open 2 + +region hopreg union 2 conereg cylreg + +fix grav all gravity ${gravity} vector 0 0 -1 +fix grav all gravity 1 vector 0 0 -1 +fix 1 all nve/sphere + + +fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg + +fix ins all pour 2000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 ${dhi} dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 3000 every 59965 steps, 2000 by step 1 + +#dump 1 all custom ${dumpfreq} ${name}.dump # id type mass diameter x y z + +#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 3.0 # box no 0.0 axes no 0.0 0.0 +#dump_modify 2 pad 6 + +thermo_style custom step cpu atoms ke +WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:896) +thermo_modify flush yes lost warn + +# Initial run to fill up the cone + +run 20000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 6.049 | 6.049 | 6.049 Mbytes + Step CPU Atoms KinEng + 0 0 0 -0 + 1000 0.4194951 2000 -0 + 2000 0.61516729 2000 -0 + 3000 0.80702516 2000 -0 + 4000 0.99253349 2000 -0 + 5000 1.172741 2000 -0 + 6000 1.3484682 2000 -0 + 7000 1.5206253 2000 -0 + 8000 1.6875025 2000 -0 + 9000 1.8503087 2000 -0 + 10000 2.0125622 2000 -0 + 11000 2.0890872 2000 -0 + 12000 2.1663582 2000 -0 + 13000 2.2430386 2000 -0 + 14000 2.320045 2000 -0 + 15000 2.3989769 2000 -0 + 16000 2.4824747 2000 -0 + 17000 2.5693391 2000 -0 + 18000 2.6595183 2000 -0 + 19000 2.752627 2000 -0 + 20000 2.8503071 2000 -0 +Loop time of 2.85034 on 4 procs for 20000 steps with 2000 atoms + +98.0% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.04057 | 0.088166 | 0.18377 | 18.9 | 3.09 +Neigh | 0.0072649 | 0.014273 | 0.025073 | 5.5 | 0.50 +Comm | 0.097843 | 0.19506 | 0.29871 | 19.9 | 6.84 +Output | 0.00099986 | 0.0018246 | 0.0023299 | 1.2 | 0.06 +Modify | 0.68567 | 1.1174 | 1.9527 | 46.8 | 39.20 +Other | | 1.434 | | | 50.30 + +Nlocal: 500 ave 510 max 493 min +Histogram: 1 1 0 0 0 1 0 0 0 1 +Nghost: 154 ave 227 max 79 min +Histogram: 1 0 0 0 1 0 1 0 0 1 +Neighs: 415.5 ave 610 max 258 min +Histogram: 1 1 0 0 0 0 1 0 0 1 + +Total # of neighbors = 1662 +Ave neighs/atom = 0.831 +Neighbor list builds = 71 +Dangerous builds = 0 +unfix ins +run 150000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 12.33 | 12.5 | 12.68 Mbytes + Step CPU Atoms KinEng + 20000 0 2000 6652.2957 + 21000 0.069761009 2000 6807.2201 + 22000 0.14277925 2000 6973.9359 + 23000 0.21755553 2000 7142.3648 + 24000 0.29656838 2000 7276.9717 + 25000 0.3791331 2000 7369.4191 + 26000 0.46663378 2000 7497.6526 + 27000 0.55670237 2000 7638.946 + 28000 0.65212555 2000 7780.0339 + 29000 0.75032507 2000 7881.8177 + 30000 0.85580942 2000 7967.2641 + 31000 0.93204785 2000 7994.9273 + 32000 1.0168325 2000 7937.0672 + 33000 1.1081585 2000 7774.0508 + 34000 1.2084122 2000 7591.1511 + 35000 1.3164174 2000 7357.5032 + 36000 1.4326847 2000 7147.3776 + 37000 1.5548919 2000 6980.0719 + 38000 1.6806183 2000 6813.0872 + 39000 1.8171138 2000 6657.0693 + 40000 1.9655069 2000 6505.1155 + 41000 2.0788398 2000 6330.2864 + 42000 2.1972941 2000 6147.8022 + 43000 2.3180177 2000 5932.9244 + 44000 2.4424194 2000 5755.296 + 45000 2.5679759 2000 5511.622 + 46000 2.7042099 2000 5332.3171 + 47000 2.8436403 2000 5162.4926 + 48000 2.983017 2000 5044.5764 + 49000 3.1228322 2000 4901.1141 + 50000 3.2614172 2000 4731.1949 + 51000 3.3835559 2000 4575.418 + 52000 3.5097034 2000 4428.9425 + 53000 3.6438561 2000 4291.7282 + 54000 3.7823058 2000 4154.1885 + 55000 3.9269393 2000 3994.9402 + 56000 4.0761939 2000 3855.5977 + 57000 4.2262191 2000 3672.9504 + 58000 4.3809045 2000 3435.3395 + 59000 4.5439971 2000 3200.7379 + 60000 4.7111867 2000 2986.5411 + 61000 4.8700167 2000 2747.3628 + 62000 5.030656 2000 2542.0805 + 63000 5.1932098 2000 2336.7687 + 64000 5.3585095 2000 2151.6388 + 65000 5.5278279 2000 1933.6773 + 66000 5.7032072 2000 1699.0747 + 67000 5.8804545 2000 1467.7209 + 68000 6.0598984 2000 1227.3577 + 69000 6.2471961 2000 1016.2766 + 70000 6.4413532 2000 812.90843 + 71000 6.615215 2000 632.88108 + 72000 6.7897335 2000 470.67731 + 73000 6.964705 2000 360.47748 + 74000 7.1361808 2000 286.10584 + 75000 7.3068097 2000 229.70386 + 76000 7.4771974 2000 179.62654 + 77000 7.6485358 2000 142.40417 + 78000 7.8200771 2000 113.55745 + 79000 7.9923688 2000 93.787669 + 80000 8.164219 2000 80.646319 + 81000 8.3372059 2000 70.944319 + 82000 8.5130035 2000 59.2275 + 83000 8.6877383 2000 49.633808 + 84000 8.8675712 2000 42.882698 + 85000 9.0509682 2000 36.841824 + 86000 9.2393665 2000 31.776681 + 87000 9.4296116 2000 28.25076 + 88000 9.622196 2000 25.228966 + 89000 9.8176023 2000 22.593627 + 90000 10.01325 2000 21.15796 + 91000 10.204474 2000 19.941629 + 92000 10.399553 2000 18.375654 + 93000 10.596683 2000 17.056701 + 94000 10.796988 2000 16.192511 + 95000 10.998545 2000 15.572922 + 96000 11.200614 2000 14.827788 + 97000 11.402484 2000 13.919613 + 98000 11.606219 2000 13.19525 + 99000 11.81042 2000 11.993376 + 100000 12.018294 2000 11.258787 + 101000 12.223702 2000 10.641688 + 102000 12.432026 2000 10.430435 + 103000 12.640962 2000 9.518069 + 104000 12.849109 2000 9.1332086 + 105000 13.05872 2000 9.2151611 + 106000 13.269956 2000 9.0035132 + 107000 13.481882 2000 8.7835861 + 108000 13.693895 2000 8.5124479 + 109000 13.906381 2000 8.2975453 + 110000 14.120217 2000 8.3483043 + 111000 14.332078 2000 8.4658572 + 112000 14.54349 2000 8.4771784 + 113000 14.755719 2000 7.8937975 + 114000 14.968619 2000 7.2472953 + 115000 15.180485 2000 6.5812074 + 116000 15.394405 2000 5.5651566 + 117000 15.607523 2000 5.3015807 + 118000 15.821873 2000 5.0133941 + 119000 16.035675 2000 4.8746036 + 120000 16.24964 2000 4.9133073 + 121000 16.462102 2000 4.3337392 + 122000 16.676371 2000 4.3374836 + 123000 16.890252 2000 4.3721818 + 124000 17.106594 2000 4.3894508 + 125000 17.321433 2000 4.1811774 + 126000 17.536692 2000 4.3011002 + 127000 17.748238 2000 4.442228 + 128000 17.962609 2000 4.6170394 + 129000 18.175315 2000 4.8184318 + 130000 18.389056 2000 4.8442096 + 131000 18.600872 2000 4.9668117 + 132000 18.81412 2000 4.8364562 + 133000 19.027514 2000 4.6658645 + 134000 19.23975 2000 4.5758487 + 135000 19.451085 2000 4.7251949 + 136000 19.663874 2000 4.5846492 + 137000 19.87624 2000 4.7565986 + 138000 20.088654 2000 4.8186623 + 139000 20.29935 2000 4.6571647 + 140000 20.510911 2000 4.0730143 + 141000 20.722072 2000 4.0605542 + 142000 20.933113 2000 4.1457179 + 143000 21.143916 2000 4.3418042 + 144000 21.353873 2000 4.0323813 + 145000 21.567015 2000 3.8064958 + 146000 21.781334 2000 3.1802044 + 147000 21.996799 2000 2.7947641 + 148000 22.209808 2000 2.7384164 + 149000 22.423177 2000 2.7428829 + 150000 22.638044 2000 2.7802186 + 151000 22.851676 2000 2.6703451 + 152000 23.065354 2000 2.3357647 + 153000 23.278882 2000 1.9855305 + 154000 23.494254 2000 1.9442713 + 155000 23.708192 2000 1.7348027 + 156000 23.923005 2000 1.5699942 + 157000 24.13827 2000 1.5224944 + 158000 24.352068 2000 1.4850914 + 159000 24.565616 2000 1.4461048 + 160000 24.779118 2000 1.3759525 + 161000 24.99111 2000 0.83754463 + 162000 25.205935 2000 0.7952922 + 163000 25.420817 2000 0.69670143 + 164000 25.632672 2000 0.66253723 + 165000 25.846901 2000 0.64602969 + 166000 26.060074 2000 0.60229858 + 167000 26.273714 2000 0.5757589 + 168000 26.484855 2000 0.5996023 + 169000 26.698151 2000 0.62130448 + 170000 26.911208 2000 0.63888277 +Loop time of 26.9112 on 4 procs for 150000 steps with 2000 atoms + +95.1% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 4.5517 | 8.6135 | 10.872 | 82.7 | 32.01 +Neigh | 0.092491 | 0.15402 | 0.19598 | 9.7 | 0.57 +Comm | 2.0054 | 3.8686 | 4.6494 | 55.0 | 14.38 +Output | 0.0047033 | 0.0096766 | 0.016452 | 4.6 | 0.04 +Modify | 5.6498 | 7.9588 | 9.4012 | 49.7 | 29.57 +Other | | 6.307 | | | 23.43 + +Nlocal: 500 ave 538 max 419 min +Histogram: 1 0 0 0 0 0 0 1 0 2 +Nghost: 445.5 ave 688 max 200 min +Histogram: 1 0 0 0 1 0 1 0 0 1 +Neighs: 4500.25 ave 5610 max 3443 min +Histogram: 1 0 1 0 0 0 1 0 0 1 + +Total # of neighbors = 18001 +Ave neighs/atom = 9.0005 +Neighbor list builds = 362 +Dangerous builds = 0 + +# remove "plug" - need to redefine cylinder region & union + +region cylreg delete +region hopreg delete +region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 #Bottom & top are open +region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 0 10 side in units box open 1 open 2 + +region hopreg union 2 cylreg conereg + +unfix hopper3 +fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg + +run 100000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 12.34 | 12.53 | 12.68 Mbytes + Step CPU Atoms KinEng + 170000 0 2000 0.63888277 + 171000 0.21419748 2000 1.4139245 + 172000 0.42844271 2000 2.2400138 + 173000 0.64333145 2000 3.8034979 + 174000 0.85456696 2000 6.116727 + 175000 1.0672981 2000 8.9536458 + 176000 1.2790911 2000 12.74348 + 177000 1.491721 2000 17.410816 + 178000 1.7033452 2000 22.879174 + 179000 1.9168047 2000 28.966022 + 180000 2.1329071 2000 35.449239 + 181000 2.3490841 2000 42.694882 + 182000 2.565508 2000 50.913279 + 183000 2.780369 2000 60.098465 + 184000 2.9967771 2000 70.133474 + 185000 3.2116891 2000 80.950013 + 186000 3.4248923 2000 92.495525 + 187000 3.6394206 2000 104.83034 + 188000 3.8527533 2000 118.04659 + 189000 4.0650838 2000 132.7403 + 190000 4.2781031 2000 148.31955 + 191000 4.476226 2000 164.26321 + 192000 4.6750263 2000 180.6933 + 193000 4.8710737 2000 197.72012 + 194000 5.0677642 2000 215.43637 + 195000 5.2639974 2000 234.29738 + 196000 5.4599746 2000 254.03407 + 197000 5.6534894 2000 274.58626 + 198000 5.8462402 2000 296.88915 + 199000 6.0400194 2000 320.45001 + 200000 6.2329415 2000 344.75891 + 201000 6.4235068 2000 370.14016 + 202000 6.6142055 2000 395.72827 + 203000 6.8048206 2000 420.42026 + 204000 6.9987454 2000 446.08079 + 205000 7.1925778 2000 473.62963 + 206000 7.3846227 2000 501.05693 + 207000 7.5775122 2000 530.40427 + 208000 7.77052 2000 560.62015 + 209000 7.964984 2000 593.00113 + 210000 8.1601405 2000 626.36661 + 211000 8.3504978 2000 661.34861 + 212000 8.5425141 2000 697.41001 + 213000 8.736112 2000 735.12299 + 214000 8.9267615 2000 773.89126 + 215000 9.1154738 2000 813.83268 + 216000 9.3019826 2000 854.63669 + 217000 9.4878433 2000 896.59089 + 218000 9.6739682 2000 938.70251 + 219000 9.8566518 2000 982.10773 + 220000 10.042289 2000 1025.2953 + 221000 10.227275 2000 1069.8382 + 222000 10.412363 2000 1115.4449 + 223000 10.602757 2000 1161.6742 + 224000 10.789101 2000 1211.289 + 225000 10.974854 2000 1262.8074 + 226000 11.157089 2000 1316.6353 + 227000 11.337044 2000 1370.7434 +WARNING: Lost atoms: original 2000 current 1991 (../thermo.cpp:486) + 228000 11.518718 1991 1382.0924 + 229000 11.700488 1986 1407.1543 + 230000 11.883057 1975 1415.708 + 231000 12.063962 1968 1430.6498 + 232000 12.246917 1957 1421.0352 + 233000 12.429345 1939 1376.0322 + 234000 12.6113 1925 1350.1292 + 235000 12.791233 1912 1337.0529 + 236000 12.968444 1893 1273.2219 + 237000 13.146668 1879 1207.0473 + 238000 13.327542 1861 1132.0109 + 239000 13.50936 1846 1083.1042 + 240000 13.693504 1826 1004.3265 + 241000 13.863443 1819 989.36186 + 242000 14.03294 1812 983.26132 + 243000 14.20032 1805 985.79932 + 244000 14.366236 1794 936.34844 + 245000 14.532759 1784 889.17423 + 246000 14.703029 1770 846.65018 + 247000 14.873941 1753 751.16306 + 248000 15.045272 1740 709.23095 + 249000 15.217896 1732 687.61586 + 250000 15.388727 1721 638.82967 + 251000 15.558032 1714 618.71543 + 252000 15.725309 1709 611.25444 + 253000 15.888727 1705 606.6846 + 254000 16.050605 1702 601.7236 + 255000 16.212982 1697 575.97244 + 256000 16.378352 1695 577.1712 + 257000 16.547488 1691 576.93668 + 258000 16.718964 1688 586.63687 + 259000 16.892601 1686 581.52487 + 260000 17.066036 1682 566.49544 + 261000 17.22488 1681 586.18628 + 262000 17.379249 1678 582.11927 + 263000 17.534079 1675 589.96041 + 264000 17.690288 1672 577.55581 + 265000 17.847805 1669 570.45998 + 266000 18.006261 1666 574.0576 + 267000 18.1674 1662 578.07385 + 268000 18.326753 1660 587.65705 + 269000 18.488052 1657 584.43358 + 270000 18.647474 1654 591.22601 +Loop time of 18.6475 on 4 procs for 100000 steps with 1654 atoms + +94.4% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 2.7714 | 6.1879 | 8.8765 | 88.8 | 33.18 +Neigh | 0.094692 | 0.11244 | 0.13298 | 4.6 | 0.60 +Comm | 1.2471 | 2.918 | 3.5873 | 57.0 | 15.65 +Output | 0.0013438 | 0.0067176 | 0.014709 | 6.0 | 0.04 +Modify | 4.4355 | 5.0416 | 5.5692 | 21.9 | 27.04 +Other | | 4.381 | | | 23.49 + +Nlocal: 413.5 ave 429 max 408 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Nghost: 408.25 ave 653 max 182 min +Histogram: 1 0 0 1 0 1 0 0 0 1 +Neighs: 3486.25 ave 4367 max 2213 min +Histogram: 1 0 0 0 0 1 0 0 1 1 + +Total # of neighbors = 13945 +Ave neighs/atom = 8.4310762 +Neighbor list builds = 227 +Dangerous builds = 0 +Total wall time: 0:00:48 diff --git a/examples/granregion/log.15Sep22.granregion.mixer.g++.1 b/examples/granregion/log.15Sep22.granregion.mixer.g++.1 new file mode 100644 index 0000000000..2a3402c642 --- /dev/null +++ b/examples/granregion/log.15Sep22.granregion.mixer.g++.1 @@ -0,0 +1,632 @@ +LAMMPS (15 Sep 2022) +variable name string mixer + +thermo_modify flush yes +variable seed equal 14314 + +############################################### +# Particle parameters +################################################ + +variable rlo equal 0.3 +variable rhi equal 0.6 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.3 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.6 +variable skin equal ${rhi} +variable skin equal 0.6 + +variable coeffRes equal 0.1 +variable coeffFric equal 0.5 + +variable kn equal 10^5 +variable kt equal 0.2*${kn} +variable kt equal 0.2*100000 + +variable gravity equal 1.0 +variable density equal 1.0 + +variable min_mass equal ${density}*4.0/3.0*PI*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*0.3 +variable a equal (-2.0*log(${coeffRes})/PI)^2 +variable a equal (-2.0*log(0.1)/PI)^2 +variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*0.405284734569351)) +variable gamma_t equal ${gamma_n}*0.5 +variable gamma_t equal 806.699778405191*0.5 + +variable tcol equal PI/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/${min_mass}-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/0.113097335529233-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/0.113097335529233-806.699778405191/4.0) + +variable dt equal ${tcol}*0.02 +variable dt equal 0.00236257621510454*0.02 +timestep ${dt} +timestep 4.72515243020908e-05 + +############################################### + +variable dumpfreq equal 1000 +variable logfreq equal 1000 + +newton on +atom_style sphere + +boundary p p f + +region boxreg block 0 20 0 20 0 20 +create_box 1 boxreg +Created orthogonal box = (0 0 0) to (20 20 20) + 1 by 1 by 1 MPI processor grid + +pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 +pair_coeff * * + +neighbor ${skin} multi +neighbor 0.6 multi +thermo ${logfreq} +thermo 1000 + +comm_style brick +comm_modify mode multi group all vel yes +balance 1.1 shift xyz 20 1.1 +Balancing ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0 + ghost atom cutoff = 0 + binsize = 20, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton on, size, history + pair build: half/size/multi/newton + stencil: half/multi/3d + bin: multi +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:210) +fix bal all balance 10000 1.1 shift xyz 20 1.01 + +####################### Options specific to pouring ######################### + +region insreg cylinder z 10 10 8 10 18 side in units box +region cylreg cylinder z 10 10 10 0 20 side in units box + +variable theta equal (step/400000)*2*PI + +region b1 block 2 18 9 11 0 4 side out rotate v_theta 10 10 0 0 0 1 units box +region b2 block 9 11 2 18 0 3.99999 side out rotate v_theta 10 10 0 0 0 1 units box + +region mixer intersect 3 cylreg b1 b2 side in + +fix grav all gravity ${gravity} vector 0 0 -1 +fix grav all gravity 1 vector 0 0 -1 +fix 1 all nve/sphere + +fix mixwall all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 region mixer + +fix ins all pour 1000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 ${dhi} dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 1 +Particle insertion: 444 every 84653 steps, 1000 by step 169307 + +#dump 1 all custom ${dumpfreq} ${name}_pour.dump # id type mass diameter x y z + +#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 1.5 # box no 0.0 axes no 0.0 0.0 +#dump_modify 2 pad 6 + +thermo_style custom step cpu atoms ke v_theta +WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:896) +thermo_modify flush yes lost warn + +run 200000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.861 | 5.861 | 5.861 Mbytes + Step CPU Atoms KinEng v_theta + 0 0 0 -0 0 + 1000 0.10672296 444 -0 0.015707963 + 2000 0.2090638 444 -0 0.031415927 + 3000 0.31029663 444 -0 0.04712389 + 4000 0.41047624 444 -0 0.062831853 + 5000 0.51132361 444 -0 0.078539816 + 6000 0.61279172 444 -0 0.09424778 + 7000 0.71396622 444 -0 0.10995574 + 8000 0.81644319 444 -0 0.12566371 + 9000 0.91730959 444 -0 0.14137167 + 10000 1.0181635 444 -0 0.15707963 + 11000 1.1182214 444 -0 0.1727876 + 12000 1.2190013 444 -0 0.18849556 + 13000 1.3196138 444 -0 0.20420352 + 14000 1.4183593 444 -0 0.21991149 + 15000 1.5178458 444 -0 0.23561945 + 16000 1.6169535 444 -0 0.25132741 + 17000 1.7219188 444 -0 0.26703538 + 18000 1.8266303 444 -0 0.28274334 + 19000 1.9331589 444 -0 0.2984513 + 20000 2.0392693 444 -0 0.31415927 + 21000 2.1457521 444 -0 0.32986723 + 22000 2.2507526 444 -0 0.34557519 + 23000 2.3548243 444 -0 0.36128316 + 24000 2.4606335 444 -0 0.37699112 + 25000 2.5657643 444 -0 0.39269908 + 26000 2.6698254 444 -0 0.40840704 + 27000 2.7732221 444 -0 0.42411501 + 28000 2.8766441 444 -0 0.43982297 + 29000 2.9801547 444 -0 0.45553093 + 30000 3.0839748 444 -0 0.4712389 + 31000 3.1880063 444 -0 0.48694686 + 32000 3.2923439 444 -0 0.50265482 + 33000 3.3969501 444 -0 0.51836279 + 34000 3.5012646 444 -0 0.53407075 + 35000 3.6057831 444 -0 0.54977871 + 36000 3.7098273 444 -0 0.56548668 + 37000 3.8146061 444 -0 0.58119464 + 38000 3.9215588 444 -0 0.5969026 + 39000 4.0474026 444 -0 0.61261057 + 40000 4.1544945 444 -0 0.62831853 + 41000 4.2605761 444 -0 0.64402649 + 42000 4.3665287 444 -0 0.65973446 + 43000 4.4728216 444 -0 0.67544242 + 44000 4.5782483 444 -0 0.69115038 + 45000 4.6833043 444 -0 0.70685835 + 46000 4.7902207 444 -0 0.72256631 + 47000 4.8968527 444 -0 0.73827427 + 48000 5.0035027 444 -0 0.75398224 + 49000 5.1117191 444 -0 0.7696902 + 50000 5.2186233 444 -0 0.78539816 + 51000 5.3244005 444 -0 0.80110613 + 52000 5.4316153 444 -0 0.81681409 + 53000 5.5381785 444 -0 0.83252205 + 54000 5.6458179 444 -0 0.84823002 + 55000 5.759203 444 -0 0.86393798 + 56000 5.8779849 444 -0 0.87964594 + 57000 5.9953108 444 -0 0.89535391 + 58000 6.1115532 444 -0 0.91106187 + 59000 6.2298342 444 -0 0.92676983 + 60000 6.3474382 444 -0 0.9424778 + 61000 6.4642217 444 -0 0.95818576 + 62000 6.5815141 444 -0 0.97389372 + 63000 6.6999766 444 -0 0.98960169 + 64000 6.8181369 444 -0 1.0053096 + 65000 6.9368124 444 -0 1.0210176 + 66000 7.0560733 444 -0 1.0367256 + 67000 7.1761749 444 -0 1.0524335 + 68000 7.2942246 444 -0 1.0681415 + 69000 7.4146786 444 -0 1.0838495 + 70000 7.5364025 444 -0 1.0995574 + 71000 7.6565177 444 -0 1.1152654 + 72000 7.7776652 444 -0 1.1309734 + 73000 7.8972494 444 -0 1.1466813 + 74000 8.0183599 444 -0 1.1623893 + 75000 8.1423045 444 -0 1.1780972 + 76000 8.2667013 444 -0 1.1938052 + 77000 8.3876604 444 -0 1.2095132 + 78000 8.5095993 444 -0 1.2252211 + 79000 8.6317663 444 -0 1.2409291 + 80000 8.7562108 444 -0 1.2566371 + 81000 8.8812625 444 -0 1.272345 + 82000 9.006825 444 -0 1.288053 + 83000 9.1310939 444 -0 1.303761 + 84000 9.2540049 444 -0 1.3194689 + 85000 9.4210019 888 -0 1.3351769 + 86000 9.6509014 888 -0 1.3508848 + 87000 9.8827304 888 -0 1.3665928 + 88000 10.113857 888 -0 1.3823008 + 89000 10.34324 888 -0 1.3980087 + 90000 10.574203 888 -0 1.4137167 + 91000 10.806069 888 -0 1.4294247 + 92000 11.037044 888 -0 1.4451326 + 93000 11.262596 888 -0 1.4608406 + 94000 11.490532 888 -0 1.4765485 + 95000 11.716452 888 -0 1.4922565 + 96000 11.943883 888 -0 1.5079645 + 97000 12.171353 888 -0 1.5236724 + 98000 12.396787 888 -0 1.5393804 + 99000 12.623788 888 -0 1.5550884 + 100000 12.849633 888 -0 1.5707963 + 101000 13.082904 888 -0 1.5865043 + 102000 13.316986 888 -0 1.6022123 + 103000 13.54777 888 -0 1.6179202 + 104000 13.77928 888 -0 1.6336282 + 105000 14.014818 888 -0 1.6493361 + 106000 14.250986 888 -0 1.6650441 + 107000 14.485754 888 -0 1.6807521 + 108000 14.720106 888 -0 1.69646 + 109000 14.970869 888 -0 1.712168 + 110000 15.219203 888 -0 1.727876 + 111000 15.469876 888 -0 1.7435839 + 112000 15.721351 888 -0 1.7592919 + 113000 15.972099 888 -0 1.7749998 + 114000 16.222357 888 -0 1.7907078 + 115000 16.474863 888 -0 1.8064158 + 116000 16.725352 888 -0 1.8221237 + 117000 16.979634 888 -0 1.8378317 + 118000 17.231379 888 -0 1.8535397 + 119000 17.483691 888 -0 1.8692476 + 120000 17.737897 888 -0 1.8849556 + 121000 17.991241 888 -0 1.9006636 + 122000 18.245626 888 -0 1.9163715 + 123000 18.499984 888 -0 1.9320795 + 124000 18.754367 888 -0 1.9477874 + 125000 19.006448 888 -0 1.9634954 + 126000 19.260545 888 -0 1.9792034 + 127000 19.513633 888 -0 1.9949113 + 128000 19.769389 888 -0 2.0106193 + 129000 20.025088 888 -0 2.0263273 + 130000 20.277534 888 -0 2.0420352 + 131000 20.529284 888 -0 2.0577432 + 132000 20.785132 888 -0 2.0734512 + 133000 21.038442 888 -0 2.0891591 + 134000 21.293932 888 -0 2.1048671 + 135000 21.545354 888 -0 2.120575 + 136000 21.799547 888 -0 2.136283 + 137000 22.053639 888 -0 2.151991 + 138000 22.310106 888 -0 2.1676989 + 139000 22.569362 888 -0 2.1834069 + 140000 22.829416 888 -0 2.1991149 + 141000 23.089132 888 -0 2.2148228 + 142000 23.345737 888 -0 2.2305308 + 143000 23.60621 888 -0 2.2462387 + 144000 23.867414 888 -0 2.2619467 + 145000 24.132954 888 -0 2.2776547 + 146000 24.39395 888 -0 2.2933626 + 147000 24.657881 888 -0 2.3090706 + 148000 24.918563 888 -0 2.3247786 + 149000 25.177446 888 -0 2.3404865 + 150000 25.446598 888 -0 2.3561945 + 151000 25.715494 888 -0 2.3719025 + 152000 25.985991 888 -0 2.3876104 + 153000 26.256676 888 -0 2.4033184 + 154000 26.525639 888 -0 2.4190263 + 155000 26.82656 888 -0 2.4347343 + 156000 27.157272 888 -0 2.4504423 + 157000 27.481755 888 -0 2.4661502 + 158000 27.80198 888 -0 2.4818582 + 159000 28.123258 888 -0 2.4975662 + 160000 28.437502 888 -0 2.5132741 + 161000 28.756496 888 -0 2.5289821 + 162000 29.080609 888 -0 2.54469 + 163000 29.399252 888 -0 2.560398 + 164000 29.718986 888 -0 2.576106 + 165000 30.045206 888 -0 2.5918139 + 166000 30.365168 888 -0 2.6075219 + 167000 30.684007 888 -0 2.6232299 + 168000 31.006154 888 -0 2.6389378 + 169000 31.330336 888 -0 2.6546458 + 170000 31.681761 1000 -0 2.6703538 + 171000 32.049778 1000 -0 2.6860617 + 172000 32.421067 1000 -0 2.7017697 + 173000 32.79935 1000 -0 2.7174776 + 174000 33.178002 1000 -0 2.7331856 + 175000 33.54236 1000 -0 2.7488936 + 176000 33.904734 1000 -0 2.7646015 + 177000 34.269671 1000 -0 2.7803095 + 178000 34.633106 1000 -0 2.7960175 + 179000 35.001441 1000 -0 2.8117254 + 180000 35.374769 1000 -0 2.8274334 + 181000 35.742362 1000 -0 2.8431414 + 182000 36.115908 1000 -0 2.8588493 + 183000 36.490149 1000 -0 2.8745573 + 184000 36.866289 1000 -0 2.8902652 + 185000 37.252911 1000 -0 2.9059732 + 186000 37.644586 1000 -0 2.9216812 + 187000 38.028002 1000 -0 2.9373891 + 188000 38.40724 1000 -0 2.9530971 + 189000 38.77431 1000 -0 2.9688051 + 190000 39.14138 1000 -0 2.984513 + 191000 39.519083 1000 -0 3.000221 + 192000 39.895243 1000 -0 3.0159289 + 193000 40.237532 1000 -0 3.0316369 + 194000 40.587663 1000 -0 3.0473449 + 195000 40.939032 1000 -0 3.0630528 + 196000 41.290257 1000 -0 3.0787608 + 197000 41.643778 1000 -0 3.0944688 + 198000 41.992818 1000 -0 3.1101767 + 199000 42.335934 1000 -0 3.1258847 + 200000 42.681071 1000 -0 3.1415927 +Loop time of 42.6811 on 1 procs for 200000 steps with 1000 atoms + +Performance: 19130.397 tau/day, 4685.915 timesteps/s, 4.686 Matom-step/s +98.5% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 2.6365 | 2.6365 | 2.6365 | 0.0 | 6.18 +Neigh | 0.051681 | 0.051681 | 0.051681 | 0.0 | 0.12 +Comm | 0.52007 | 0.52007 | 0.52007 | 0.0 | 1.22 +Output | 0.02209 | 0.02209 | 0.02209 | 0.0 | 0.05 +Modify | 38.71 | 38.71 | 38.71 | 0.0 | 90.70 +Other | | 0.7407 | | | 1.74 + +Nlocal: 1000 ave 1000 max 1000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 183 ave 183 max 183 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 3757 ave 3757 max 3757 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 3757 +Ave neighs/atom = 3.757 +Neighbor list builds = 200 +Dangerous builds = 0 +unfix ins +run 200000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 11.89 | 11.89 | 11.89 Mbytes + Step CPU Atoms KinEng v_theta + 200000 0 1000 1.0515941 3.1415927 + 201000 0.35477257 1000 1.0348185 3.1573006 + 202000 0.71436123 1000 1.0220859 3.1730086 + 203000 1.0642832 1000 1.0225785 3.1887165 + 204000 1.4165213 1000 1.0206121 3.2044245 + 205000 1.7728133 1000 1.009961 3.2201325 + 206000 2.1279101 1000 0.9993323 3.2358404 + 207000 2.480623 1000 0.99602628 3.2515484 + 208000 2.8321106 1000 0.98341818 3.2672564 + 209000 3.2138945 1000 0.96700718 3.2829643 + 210000 3.5921146 1000 0.95226699 3.2986723 + 211000 3.9643569 1000 0.93911691 3.3143802 + 212000 4.3368151 1000 0.92920029 3.3300882 + 213000 4.7130192 1000 0.91893472 3.3457962 + 214000 5.0881313 1000 0.90873324 3.3615041 + 215000 5.4660106 1000 0.88925817 3.3772121 + 216000 5.8455926 1000 0.89108236 3.3929201 + 217000 6.2204827 1000 0.90176711 3.408628 + 218000 6.6046736 1000 0.90149435 3.424336 + 219000 6.9931145 1000 0.89629307 3.440044 + 220000 7.3771565 1000 0.90390589 3.4557519 + 221000 7.7635603 1000 0.87858148 3.4714599 + 222000 8.1502771 1000 0.88862314 3.4871678 + 223000 8.5393557 1000 0.90394098 3.5028758 + 224000 8.9327212 1000 0.91005462 3.5185838 + 225000 9.315331 1000 0.91753865 3.5342917 + 226000 9.6930994 1000 0.91741233 3.5499997 + 227000 10.077148 1000 0.9041879 3.5657077 + 228000 10.463223 1000 0.9085712 3.5814156 + 229000 10.850271 1000 0.8937854 3.5971236 + 230000 11.230235 1000 0.88740571 3.6128316 + 231000 11.61003 1000 0.88350028 3.6285395 + 232000 11.988134 1000 0.88344474 3.6442475 + 233000 12.365856 1000 0.88003311 3.6599554 + 234000 12.745397 1000 0.87416727 3.6756634 + 235000 13.120344 1000 0.86154585 3.6913714 + 236000 13.489521 1000 0.85705071 3.7070793 + 237000 13.858736 1000 0.85297378 3.7227873 + 238000 14.230242 1000 0.84879486 3.7384953 + 239000 14.609692 1000 0.86978407 3.7542032 + 240000 14.998899 1000 0.86758733 3.7699112 + 241000 15.40773 1000 0.86123097 3.7856191 + 242000 15.81537 1000 0.86088136 3.8013271 + 243000 16.221448 1000 0.85270311 3.8170351 + 244000 16.619008 1000 0.8524395 3.832743 + 245000 17.003986 1000 0.84054009 3.848451 + 246000 17.380362 1000 0.82623612 3.864159 + 247000 17.756477 1000 0.82787746 3.8798669 + 248000 18.136456 1000 0.83027177 3.8955749 + 249000 18.521277 1000 0.83307565 3.9112829 + 250000 18.906407 1000 0.82612362 3.9269908 + 251000 19.28348 1000 0.8404639 3.9426988 + 252000 19.66549 1000 0.83550946 3.9584067 + 253000 20.053842 1000 0.81516472 3.9741147 + 254000 20.451357 1000 0.79127421 3.9898227 + 255000 20.844416 1000 0.78373024 4.0055306 + 256000 21.228637 1000 0.79885661 4.0212386 + 257000 21.613641 1000 0.80322118 4.0369466 + 258000 21.99162 1000 0.79861523 4.0526545 + 259000 22.367158 1000 0.79216962 4.0683625 + 260000 22.746158 1000 0.79543097 4.0840704 + 261000 23.125626 1000 0.79394211 4.0997784 + 262000 23.504282 1000 0.79269346 4.1154864 + 263000 23.883609 1000 0.80022854 4.1311943 + 264000 24.261864 1000 0.79885184 4.1469023 + 265000 24.639269 1000 0.79595018 4.1626103 + 266000 25.016335 1000 0.78191184 4.1783182 + 267000 25.389754 1000 0.76329279 4.1940262 + 268000 25.762053 1000 0.7342663 4.2097342 + 269000 26.133966 1000 0.72303366 4.2254421 + 270000 26.511157 1000 0.70016481 4.2411501 + 271000 26.888842 1000 0.68891731 4.256858 + 272000 27.26804 1000 0.68545775 4.272566 + 273000 27.644067 1000 0.68712156 4.288274 + 274000 28.024704 1000 0.69249813 4.3039819 + 275000 28.404842 1000 0.70187847 4.3196899 + 276000 28.785799 1000 0.70679419 4.3353979 + 277000 29.165857 1000 0.70955357 4.3511058 + 278000 29.545291 1000 0.70183408 4.3668138 + 279000 29.926113 1000 0.69979273 4.3825218 + 280000 30.302095 1000 0.70822139 4.3982297 + 281000 30.684406 1000 0.71629209 4.4139377 + 282000 31.065873 1000 0.73094905 4.4296456 + 283000 31.445972 1000 0.74554115 4.4453536 + 284000 31.828184 1000 0.74390104 4.4610616 + 285000 32.207807 1000 0.74675359 4.4767695 + 286000 32.58802 1000 0.75330713 4.4924775 + 287000 32.964457 1000 0.75525926 4.5081855 + 288000 33.343222 1000 0.75174884 4.5238934 + 289000 33.717663 1000 0.74062375 4.5396014 + 290000 34.094722 1000 0.72784613 4.5553093 + 291000 34.46982 1000 0.72151574 4.5710173 + 292000 34.843777 1000 0.71712409 4.5867253 + 293000 35.208307 1000 0.71803758 4.6024332 + 294000 35.576207 1000 0.71002715 4.6181412 + 295000 35.942972 1000 0.7070911 4.6338492 + 296000 36.3107 1000 0.71082175 4.6495571 + 297000 36.682044 1000 0.70438977 4.6652651 + 298000 37.054664 1000 0.70240345 4.6809731 + 299000 37.424717 1000 0.70525357 4.696681 + 300000 37.796148 1000 0.70636846 4.712389 + 301000 38.166828 1000 0.70443346 4.7280969 + 302000 38.538428 1000 0.71187973 4.7438049 + 303000 38.907221 1000 0.71047139 4.7595129 + 304000 39.280263 1000 0.71405925 4.7752208 + 305000 39.652902 1000 0.71277063 4.7909288 + 306000 40.02752 1000 0.72005331 4.8066368 + 307000 40.402955 1000 0.72466112 4.8223447 + 308000 40.784177 1000 0.72001329 4.8380527 + 309000 41.173226 1000 0.70611982 4.8537606 + 310000 41.559195 1000 0.70810918 4.8694686 + 311000 41.946697 1000 0.70377166 4.8851766 + 312000 42.337059 1000 0.70434458 4.9008845 + 313000 42.728304 1000 0.70707385 4.9165925 + 314000 43.120803 1000 0.71412995 4.9323005 + 315000 43.510705 1000 0.72228946 4.9480084 + 316000 43.901867 1000 0.72715835 4.9637164 + 317000 44.295667 1000 0.73833476 4.9794244 + 318000 44.687503 1000 0.75953014 4.9951323 + 319000 45.077121 1000 0.76413836 5.0108403 + 320000 45.465317 1000 0.76745045 5.0265482 + 321000 45.86931 1000 0.75813288 5.0422562 + 322000 46.277029 1000 0.75324661 5.0579642 + 323000 46.680799 1000 0.75004276 5.0736721 + 324000 47.082361 1000 0.74316264 5.0893801 + 325000 47.481252 1000 0.74087383 5.1050881 + 326000 47.87511 1000 0.73244882 5.120796 + 327000 48.274582 1000 0.73096631 5.136504 + 328000 48.671718 1000 0.72955403 5.152212 + 329000 49.066335 1000 0.73464916 5.1679199 + 330000 49.459765 1000 0.73130257 5.1836279 + 331000 49.850698 1000 0.73008711 5.1993358 + 332000 50.241012 1000 0.72561074 5.2150438 + 333000 50.643245 1000 0.7214495 5.2307518 + 334000 51.039153 1000 0.71274232 5.2464597 + 335000 51.430328 1000 0.71335777 5.2621677 + 336000 51.819148 1000 0.71317423 5.2778757 + 337000 52.202763 1000 0.70965743 5.2935836 + 338000 52.585061 1000 0.69648518 5.3092916 + 339000 52.967678 1000 0.68985842 5.3249995 + 340000 53.351472 1000 0.6846783 5.3407075 + 341000 53.737731 1000 0.69031602 5.3564155 + 342000 54.131413 1000 0.69035259 5.3721234 + 343000 54.526384 1000 0.69843983 5.3878314 + 344000 54.921609 1000 0.69566088 5.4035394 + 345000 55.314258 1000 0.68309182 5.4192473 + 346000 55.701119 1000 0.68360919 5.4349553 + 347000 56.088194 1000 0.68034628 5.4506633 + 348000 56.467878 1000 0.67155093 5.4663712 + 349000 56.857709 1000 0.66504603 5.4820792 + 350000 57.250758 1000 0.66533658 5.4977871 + 351000 57.643438 1000 0.67726804 5.5134951 + 352000 58.04256 1000 0.68880987 5.5292031 + 353000 58.437369 1000 0.71377276 5.544911 + 354000 58.832421 1000 0.71715625 5.560619 + 355000 59.222221 1000 0.71729576 5.576327 + 356000 59.621431 1000 0.71088872 5.5920349 + 357000 60.013262 1000 0.70564615 5.6077429 + 358000 60.406494 1000 0.69291739 5.6234508 + 359000 60.800632 1000 0.68237469 5.6391588 + 360000 61.195364 1000 0.69105856 5.6548668 + 361000 61.588291 1000 0.69563351 5.6705747 + 362000 61.984821 1000 0.69762747 5.6862827 + 363000 62.377158 1000 0.69717346 5.7019907 + 364000 62.77604 1000 0.69413964 5.7176986 + 365000 63.165863 1000 0.68584257 5.7334066 + 366000 63.5503 1000 0.67653762 5.7491146 + 367000 63.930717 1000 0.66880284 5.7648225 + 368000 64.313698 1000 0.66024732 5.7805305 + 369000 64.708193 1000 0.65451701 5.7962384 + 370000 65.10142 1000 0.64352268 5.8119464 + 371000 65.49169 1000 0.63715296 5.8276544 + 372000 65.879115 1000 0.63840106 5.8433623 + 373000 66.268258 1000 0.64537192 5.8590703 + 374000 66.661807 1000 0.64498753 5.8747783 + 375000 67.052521 1000 0.64666103 5.8904862 + 376000 67.443168 1000 0.65957055 5.9061942 + 377000 67.835892 1000 0.65964257 5.9219022 + 378000 68.229282 1000 0.65720396 5.9376101 + 379000 68.623557 1000 0.66304265 5.9533181 + 380000 69.015967 1000 0.67465814 5.969026 + 381000 69.408981 1000 0.68582945 5.984734 + 382000 69.796561 1000 0.69516677 6.000442 + 383000 70.186403 1000 0.69835516 6.0161499 + 384000 70.5765 1000 0.70403284 6.0318579 + 385000 70.966205 1000 0.6955862 6.0475659 + 386000 71.360054 1000 0.704932 6.0632738 + 387000 71.757912 1000 0.71954173 6.0789818 + 388000 72.147544 1000 0.72347529 6.0946897 + 389000 72.535029 1000 0.72738907 6.1103977 + 390000 72.925842 1000 0.74783091 6.1261057 + 391000 73.306871 1000 0.76739039 6.1418136 + 392000 73.692746 1000 0.77184224 6.1575216 + 393000 74.053385 1000 0.76813357 6.1732296 + 394000 74.416323 1000 0.75994091 6.1889375 + 395000 74.777021 1000 0.74970188 6.2046455 + 396000 75.139847 1000 0.7523174 6.2203535 + 397000 75.502888 1000 0.74652931 6.2360614 + 398000 75.865442 1000 0.74418096 6.2517694 + 399000 76.225245 1000 0.75110038 6.2674773 + 400000 76.590032 1000 0.7609274 6.2831853 +Loop time of 76.5901 on 1 procs for 200000 steps with 1000 atoms + +Performance: 10660.735 tau/day, 2611.305 timesteps/s, 2.611 Matom-step/s +99.0% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 8.693 | 8.693 | 8.693 | 0.0 | 11.35 +Neigh | 0.082655 | 0.082655 | 0.082655 | 0.0 | 0.11 +Comm | 1.1618 | 1.1618 | 1.1618 | 0.0 | 1.52 +Output | 0.0052644 | 0.0052644 | 0.0052644 | 0.0 | 0.01 +Modify | 65.713 | 65.713 | 65.713 | 0.0 | 85.80 +Other | | 0.934 | | | 1.22 + +Nlocal: 1000 ave 1000 max 1000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 268 ave 268 max 268 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 5015 ave 5015 max 5015 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 5015 +Ave neighs/atom = 5.015 +Neighbor list builds = 163 +Dangerous builds = 0 +Total wall time: 0:01:59 diff --git a/examples/granregion/log.15Sep22.granregion.mixer.g++.4 b/examples/granregion/log.15Sep22.granregion.mixer.g++.4 new file mode 100644 index 0000000000..57c517a063 --- /dev/null +++ b/examples/granregion/log.15Sep22.granregion.mixer.g++.4 @@ -0,0 +1,632 @@ +LAMMPS (15 Sep 2022) +variable name string mixer + +thermo_modify flush yes +variable seed equal 14314 + +############################################### +# Particle parameters +################################################ + +variable rlo equal 0.3 +variable rhi equal 0.6 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.3 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.6 +variable skin equal ${rhi} +variable skin equal 0.6 + +variable coeffRes equal 0.1 +variable coeffFric equal 0.5 + +variable kn equal 10^5 +variable kt equal 0.2*${kn} +variable kt equal 0.2*100000 + +variable gravity equal 1.0 +variable density equal 1.0 + +variable min_mass equal ${density}*4.0/3.0*PI*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*0.3 +variable a equal (-2.0*log(${coeffRes})/PI)^2 +variable a equal (-2.0*log(0.1)/PI)^2 +variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*0.405284734569351)) +variable gamma_t equal ${gamma_n}*0.5 +variable gamma_t equal 806.699778405191*0.5 + +variable tcol equal PI/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/${min_mass}-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/0.113097335529233-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/0.113097335529233-806.699778405191/4.0) + +variable dt equal ${tcol}*0.02 +variable dt equal 0.00236257621510454*0.02 +timestep ${dt} +timestep 4.72515243020908e-05 + +############################################### + +variable dumpfreq equal 1000 +variable logfreq equal 1000 + +newton on +atom_style sphere + +boundary p p f + +region boxreg block 0 20 0 20 0 20 +create_box 1 boxreg +Created orthogonal box = (0 0 0) to (20 20 20) + 1 by 2 by 2 MPI processor grid + +pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 +pair_coeff * * + +neighbor ${skin} multi +neighbor 0.6 multi +thermo ${logfreq} +thermo 1000 + +comm_style brick +comm_modify mode multi group all vel yes +balance 1.1 shift xyz 20 1.1 +Balancing ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0 + ghost atom cutoff = 0 + binsize = 20, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton on, size, history + pair build: half/size/multi/newton + stencil: half/multi/3d + bin: multi +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:210) +fix bal all balance 10000 1.1 shift xyz 20 1.01 + +####################### Options specific to pouring ######################### + +region insreg cylinder z 10 10 8 10 18 side in units box +region cylreg cylinder z 10 10 10 0 20 side in units box + +variable theta equal (step/400000)*2*PI + +region b1 block 2 18 9 11 0 4 side out rotate v_theta 10 10 0 0 0 1 units box +region b2 block 9 11 2 18 0 3.99999 side out rotate v_theta 10 10 0 0 0 1 units box + +region mixer intersect 3 cylreg b1 b2 side in + +fix grav all gravity ${gravity} vector 0 0 -1 +fix grav all gravity 1 vector 0 0 -1 +fix 1 all nve/sphere + +fix mixwall all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 region mixer + +fix ins all pour 1000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 ${dhi} dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 1 +Particle insertion: 444 every 84653 steps, 1000 by step 169307 + +#dump 1 all custom ${dumpfreq} ${name}_pour.dump # id type mass diameter x y z + +#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 1.5 # box no 0.0 axes no 0.0 0.0 +#dump_modify 2 pad 6 + +thermo_style custom step cpu atoms ke v_theta +WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:896) +thermo_modify flush yes lost warn + +run 200000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.816 | 5.816 | 5.816 Mbytes + Step CPU Atoms KinEng v_theta + 0 0 0 -0 0 + 1000 0.089993907 444 -0 0.015707963 + 2000 0.14885989 444 -0 0.031415927 + 3000 0.20954563 444 -0 0.04712389 + 4000 0.27002257 444 -0 0.062831853 + 5000 0.33034347 444 -0 0.078539816 + 6000 0.39049526 444 -0 0.09424778 + 7000 0.45002664 444 -0 0.10995574 + 8000 0.50911338 444 -0 0.12566371 + 9000 0.56771745 444 -0 0.14137167 + 10000 0.62699472 444 -0 0.15707963 + 11000 0.67300351 444 -0 0.1727876 + 12000 0.71981356 444 -0 0.18849556 + 13000 0.76697682 444 -0 0.20420352 + 14000 0.81412229 444 -0 0.21991149 + 15000 0.86284749 444 -0 0.23561945 + 16000 0.91199522 444 -0 0.25132741 + 17000 0.96230663 444 -0 0.26703538 + 18000 1.0118327 444 -0 0.28274334 + 19000 1.0617397 444 -0 0.2984513 + 20000 1.111586 444 -0 0.31415927 + 21000 1.1556637 444 -0 0.32986723 + 22000 1.2005913 444 -0 0.34557519 + 23000 1.2455061 444 -0 0.36128316 + 24000 1.2910181 444 -0 0.37699112 + 25000 1.3370577 444 -0 0.39269908 + 26000 1.383595 444 -0 0.40840704 + 27000 1.430922 444 -0 0.42411501 + 28000 1.478627 444 -0 0.43982297 + 29000 1.5278607 444 -0 0.45553093 + 30000 1.576597 444 -0 0.4712389 + 31000 1.6202694 444 -0 0.48694686 + 32000 1.6646667 444 -0 0.50265482 + 33000 1.7092726 444 -0 0.51836279 + 34000 1.7535573 444 -0 0.53407075 + 35000 1.7985995 444 -0 0.54977871 + 36000 1.8440346 444 -0 0.56548668 + 37000 1.8900841 444 -0 0.58119464 + 38000 1.9368772 444 -0 0.5969026 + 39000 1.9842867 444 -0 0.61261057 + 40000 2.0318482 444 -0 0.62831853 + 41000 2.0753049 444 -0 0.64402649 + 42000 2.1196274 444 -0 0.65973446 + 43000 2.1647071 444 -0 0.67544242 + 44000 2.2101195 444 -0 0.69115038 + 45000 2.2564642 444 -0 0.70685835 + 46000 2.3033573 444 -0 0.72256631 + 47000 2.3500515 444 -0 0.73827427 + 48000 2.3972268 444 -0 0.75398224 + 49000 2.4444727 444 -0 0.7696902 + 50000 2.4921003 444 -0 0.78539816 + 51000 2.535088 444 -0 0.80110613 + 52000 2.5785564 444 -0 0.81681409 + 53000 2.6221392 444 -0 0.83252205 + 54000 2.6664169 444 -0 0.84823002 + 55000 2.7108951 444 -0 0.86393798 + 56000 2.7560522 444 -0 0.87964594 + 57000 2.8010254 444 -0 0.89535391 + 58000 2.8484456 444 -0 0.91106187 + 59000 2.8951674 444 -0 0.92676983 + 60000 2.9424205 444 -0 0.9424778 + 61000 2.9885999 444 -0 0.95818576 + 62000 3.0338676 444 -0 0.97389372 + 63000 3.0793674 444 -0 0.98960169 + 64000 3.1253557 444 -0 1.0053096 + 65000 3.1723823 444 -0 1.0210176 + 66000 3.2203846 444 -0 1.0367256 + 67000 3.2690443 444 -0 1.0524335 + 68000 3.317707 444 -0 1.0681415 + 69000 3.3670196 444 -0 1.0838495 + 70000 3.4160505 444 -0 1.0995574 + 71000 3.4621197 444 -0 1.1152654 + 72000 3.5086434 444 -0 1.1309734 + 73000 3.555691 444 -0 1.1466813 + 74000 3.6032072 444 -0 1.1623893 + 75000 3.6514849 444 -0 1.1780972 + 76000 3.7002713 444 -0 1.1938052 + 77000 3.7497321 444 -0 1.2095132 + 78000 3.7997711 444 -0 1.2252211 + 79000 3.8504338 444 -0 1.2409291 + 80000 3.9020416 444 -0 1.2566371 + 81000 3.9496762 444 -0 1.272345 + 82000 3.9968215 444 -0 1.288053 + 83000 4.04496 444 -0 1.303761 + 84000 4.0936477 444 -0 1.3194689 + 85000 4.1618384 888 -0 1.3351769 + 86000 4.2472086 888 -0 1.3508848 + 87000 4.3322855 888 -0 1.3665928 + 88000 4.4169835 888 -0 1.3823008 + 89000 4.5014588 888 -0 1.3980087 + 90000 4.5861842 888 -0 1.4137167 + 91000 4.653654 888 -0 1.4294247 + 92000 4.7217642 888 -0 1.4451326 + 93000 4.791842 888 -0 1.4608406 + 94000 4.8601789 888 -0 1.4765485 + 95000 4.92849 888 -0 1.4922565 + 96000 4.9976811 888 -0 1.5079645 + 97000 5.0687073 888 -0 1.5236724 + 98000 5.1387234 888 -0 1.5393804 + 99000 5.2086037 888 -0 1.5550884 + 100000 5.2786924 888 -0 1.5707963 + 101000 5.3466895 888 -0 1.5865043 + 102000 5.417132 888 -0 1.6022123 + 103000 5.4865633 888 -0 1.6179202 + 104000 5.5565911 888 -0 1.6336282 + 105000 5.6266394 888 -0 1.6493361 + 106000 5.6975394 888 -0 1.6650441 + 107000 5.7687753 888 -0 1.6807521 + 108000 5.8408498 888 -0 1.69646 + 109000 5.9132618 888 -0 1.712168 + 110000 5.9872629 888 -0 1.727876 + 111000 6.0588115 888 -0 1.7435839 + 112000 6.1308729 888 -0 1.7592919 + 113000 6.2047311 888 -0 1.7749998 + 114000 6.2780757 888 -0 1.7907078 + 115000 6.3528542 888 -0 1.8064158 + 116000 6.4277704 888 -0 1.8221237 + 117000 6.5034683 888 -0 1.8378317 + 118000 6.5795779 888 -0 1.8535397 + 119000 6.655928 888 -0 1.8692476 + 120000 6.7335119 888 -0 1.8849556 + 121000 6.806827 888 -0 1.9006636 + 122000 6.881052 888 -0 1.9163715 + 123000 6.9559647 888 -0 1.9320795 + 124000 7.0300829 888 -0 1.9477874 + 125000 7.1047925 888 -0 1.9634954 + 126000 7.1797025 888 -0 1.9792034 + 127000 7.2556934 888 -0 1.9949113 + 128000 7.3317803 888 -0 2.0106193 + 129000 7.4088096 888 -0 2.0263273 + 130000 7.4862461 888 -0 2.0420352 + 131000 7.5633585 888 -0 2.0577432 + 132000 7.641939 888 -0 2.0734512 + 133000 7.7192741 888 -0 2.0891591 + 134000 7.7970156 888 -0 2.1048671 + 135000 7.8760712 888 -0 2.120575 + 136000 7.9563099 888 -0 2.136283 + 137000 8.0381808 888 -0 2.151991 + 138000 8.1210957 888 -0 2.1676989 + 139000 8.20401 888 -0 2.1834069 + 140000 8.2871705 888 -0 2.1991149 + 141000 8.364321 888 -0 2.2148228 + 142000 8.4426744 888 -0 2.2305308 + 143000 8.5238377 888 -0 2.2462387 + 144000 8.6050517 888 -0 2.2619467 + 145000 8.6865872 888 -0 2.2776547 + 146000 8.767621 888 -0 2.2933626 + 147000 8.8496616 888 -0 2.3090706 + 148000 8.9329599 888 -0 2.3247786 + 149000 9.0165929 888 -0 2.3404865 + 150000 9.1015214 888 -0 2.3561945 + 151000 9.1847289 888 -0 2.3719025 + 152000 9.2689185 888 -0 2.3876104 + 153000 9.3518862 888 -0 2.4033184 + 154000 9.4367057 888 -0 2.4190263 + 155000 9.5227466 888 -0 2.4347343 + 156000 9.6087196 888 -0 2.4504423 + 157000 9.6955661 888 -0 2.4661502 + 158000 9.7838227 888 -0 2.4818582 + 159000 9.8731804 888 -0 2.4975662 + 160000 9.9626648 888 -0 2.5132741 + 161000 10.050473 888 -0 2.5289821 + 162000 10.137725 888 -0 2.54469 + 163000 10.227259 888 -0 2.560398 + 164000 10.318501 888 -0 2.576106 + 165000 10.409218 888 -0 2.5918139 + 166000 10.502055 888 -0 2.6075219 + 167000 10.593786 888 -0 2.6232299 + 168000 10.688536 888 -0 2.6389378 + 169000 10.786033 888 -0 2.6546458 + 170000 10.886377 1000 -0 2.6703538 + 171000 10.987493 1000 -0 2.6860617 + 172000 11.084584 1000 -0 2.7017697 + 173000 11.181502 1000 -0 2.7174776 + 174000 11.28434 1000 -0 2.7331856 + 175000 11.387838 1000 -0 2.7488936 + 176000 11.490915 1000 -0 2.7646015 + 177000 11.595473 1000 -0 2.7803095 + 178000 11.699823 1000 -0 2.7960175 + 179000 11.803927 1000 -0 2.8117254 + 180000 11.90548 1000 -0 2.8274334 + 181000 12.00857 1000 -0 2.8431414 + 182000 12.112787 1000 -0 2.8588493 + 183000 12.217943 1000 -0 2.8745573 + 184000 12.322668 1000 -0 2.8902652 + 185000 12.428332 1000 -0 2.9059732 + 186000 12.535414 1000 -0 2.9216812 + 187000 12.642404 1000 -0 2.9373891 + 188000 12.749332 1000 -0 2.9530971 + 189000 12.856872 1000 -0 2.9688051 + 190000 12.965335 1000 -0 2.984513 + 191000 13.073275 1000 -0 3.000221 + 192000 13.180122 1000 -0 3.0159289 + 193000 13.288112 1000 -0 3.0316369 + 194000 13.394688 1000 -0 3.0473449 + 195000 13.501251 1000 -0 3.0630528 + 196000 13.607472 1000 -0 3.0787608 + 197000 13.71396 1000 -0 3.0944688 + 198000 13.821133 1000 -0 3.1101767 + 199000 13.929192 1000 -0 3.1258847 + 200000 14.036724 1000 -0 3.1415927 +Loop time of 14.0368 on 4 procs for 200000 steps with 1000 atoms + +Performance: 58169.166 tau/day, 14248.307 timesteps/s, 14.248 Matom-step/s +95.5% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.47004 | 0.75698 | 1.1 | 33.1 | 5.39 +Neigh | 0.0078501 | 0.010659 | 0.013902 | 2.7 | 0.08 +Comm | 3.9589 | 4.4102 | 4.9322 | 21.6 | 31.42 +Output | 0.0031054 | 0.0046208 | 0.0069341 | 2.1 | 0.03 +Modify | 6.1829 | 6.8363 | 7.6135 | 24.8 | 48.70 +Other | | 2.018 | | | 14.38 + +Nlocal: 250 ave 260 max 242 min +Histogram: 1 0 1 0 0 1 0 0 0 1 +Nghost: 279.25 ave 325 max 232 min +Histogram: 1 1 0 0 0 0 0 0 1 1 +Neighs: 939.75 ave 1397 max 509 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 3759 +Ave neighs/atom = 3.759 +Neighbor list builds = 201 +Dangerous builds = 0 +unfix ins +run 200000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 11.87 | 11.88 | 11.89 Mbytes + Step CPU Atoms KinEng v_theta + 200000 0 1000 1.0071568 3.1415927 + 201000 0.099357585 1000 1.0036239 3.1573006 + 202000 0.19922889 1000 0.99846844 3.1730086 + 203000 0.29896537 1000 0.98236169 3.1887165 + 204000 0.39875771 1000 0.98625572 3.2044245 + 205000 0.49759454 1000 0.9893407 3.2201325 + 206000 0.59609243 1000 1.0012123 3.2358404 + 207000 0.69408206 1000 1.0231892 3.2515484 + 208000 0.79216806 1000 1.0265912 3.2672564 + 209000 0.8902274 1000 1.0190202 3.2829643 + 210000 0.98909509 1000 1.0267754 3.2986723 + 211000 1.0882901 1000 1.0186847 3.3143802 + 212000 1.1895753 1000 1.0159848 3.3300882 + 213000 1.2891277 1000 0.99326329 3.3457962 + 214000 1.387486 1000 0.97263135 3.3615041 + 215000 1.4850078 1000 0.97246409 3.3772121 + 216000 1.58405 1000 0.96000626 3.3929201 + 217000 1.6853829 1000 0.95730432 3.408628 + 218000 1.7911163 1000 0.95605591 3.424336 + 219000 1.8974141 1000 0.94983 3.440044 + 220000 2.0029829 1000 0.95291888 3.4557519 + 221000 2.108723 1000 0.93612997 3.4714599 + 222000 2.2151561 1000 0.93414081 3.4871678 + 223000 2.3220866 1000 0.93321246 3.5028758 + 224000 2.4285504 1000 0.93026943 3.5185838 + 225000 2.5356173 1000 0.930478 3.5342917 + 226000 2.6415516 1000 0.92909096 3.5499997 + 227000 2.747634 1000 0.92308495 3.5657077 + 228000 2.8524082 1000 0.91075986 3.5814156 + 229000 2.9570172 1000 0.9006662 3.5971236 + 230000 3.0627535 1000 0.88869212 3.6128316 + 231000 3.1683919 1000 0.8877611 3.6285395 + 232000 3.2749534 1000 0.89409636 3.6442475 + 233000 3.3824185 1000 0.90866091 3.6599554 + 234000 3.4917899 1000 0.90454601 3.6756634 + 235000 3.6009156 1000 0.89408327 3.6913714 + 236000 3.7111309 1000 0.8881044 3.7070793 + 237000 3.8197619 1000 0.89322168 3.7227873 + 238000 3.9302291 1000 0.89018045 3.7384953 + 239000 4.0407242 1000 0.88771268 3.7542032 + 240000 4.1521989 1000 0.88957717 3.7699112 + 241000 4.2639861 1000 0.89362036 3.7856191 + 242000 4.3782856 1000 0.90967472 3.8013271 + 243000 4.4925107 1000 0.91366381 3.8170351 + 244000 4.6057342 1000 0.9150959 3.832743 + 245000 4.7199383 1000 0.92725789 3.848451 + 246000 4.8346784 1000 0.93024722 3.864159 + 247000 4.9515438 1000 0.93297974 3.8798669 + 248000 5.0696512 1000 0.94755869 3.8955749 + 249000 5.1838845 1000 0.94761679 3.9112829 + 250000 5.297991 1000 0.92701064 3.9269908 + 251000 5.412562 1000 0.91365252 3.9426988 + 252000 5.5274859 1000 0.90918381 3.9584067 + 253000 5.6418647 1000 0.90612685 3.9741147 + 254000 5.7593721 1000 0.90352142 3.9898227 + 255000 5.8759086 1000 0.90421567 4.0055306 + 256000 5.993588 1000 0.90024688 4.0212386 + 257000 6.1142027 1000 0.88540341 4.0369466 + 258000 6.2318882 1000 0.87890423 4.0526545 + 259000 6.3502765 1000 0.86833748 4.0683625 + 260000 6.4677878 1000 0.85465694 4.0840704 + 261000 6.5875341 1000 0.83941242 4.0997784 + 262000 6.7063481 1000 0.81790404 4.1154864 + 263000 6.8249742 1000 0.82284562 4.1311943 + 264000 6.9421188 1000 0.80961447 4.1469023 + 265000 7.0588866 1000 0.80567073 4.1626103 + 266000 7.1763855 1000 0.79577448 4.1783182 + 267000 7.295632 1000 0.78489106 4.1940262 + 268000 7.4144463 1000 0.77348757 4.2097342 + 269000 7.5333839 1000 0.76606696 4.2254421 + 270000 7.6527119 1000 0.7649744 4.2411501 + 271000 7.7704222 1000 0.76050309 4.256858 + 272000 7.8903012 1000 0.75378759 4.272566 + 273000 8.0106197 1000 0.75633811 4.288274 + 274000 8.1309707 1000 0.75703106 4.3039819 + 275000 8.2522837 1000 0.75227453 4.3196899 + 276000 8.3730898 1000 0.76003902 4.3353979 + 277000 8.4955037 1000 0.76274661 4.3511058 + 278000 8.6153206 1000 0.75888482 4.3668138 + 279000 8.7339569 1000 0.75071875 4.3825218 + 280000 8.8515447 1000 0.75454927 4.3982297 + 281000 8.9685253 1000 0.75617824 4.4139377 + 282000 9.0856168 1000 0.75230835 4.4296456 + 283000 9.2018894 1000 0.75417571 4.4453536 + 284000 9.3179777 1000 0.74559345 4.4610616 + 285000 9.4341721 1000 0.73274661 4.4767695 + 286000 9.5498722 1000 0.72385193 4.4924775 + 287000 9.6651326 1000 0.72398899 4.5081855 + 288000 9.7810274 1000 0.72009027 4.5238934 + 289000 9.8959471 1000 0.72026686 4.5396014 + 290000 10.010007 1000 0.72330145 4.5553093 + 291000 10.123304 1000 0.71630656 4.5710173 + 292000 10.238277 1000 0.71089192 4.5867253 + 293000 10.351465 1000 0.70584923 4.6024332 + 294000 10.464794 1000 0.71350398 4.6181412 + 295000 10.57818 1000 0.72781836 4.6338492 + 296000 10.692249 1000 0.72285512 4.6495571 + 297000 10.80741 1000 0.71649517 4.6652651 + 298000 10.923694 1000 0.71132209 4.6809731 + 299000 11.039173 1000 0.73602072 4.696681 + 300000 11.157002 1000 0.74400837 4.712389 + 301000 11.272462 1000 0.76618562 4.7280969 + 302000 11.386581 1000 0.77476041 4.7438049 + 303000 11.499191 1000 0.77124283 4.7595129 + 304000 11.611585 1000 0.7625748 4.7752208 + 305000 11.725012 1000 0.74979361 4.7909288 + 306000 11.838032 1000 0.74515733 4.8066368 + 307000 11.949194 1000 0.74302741 4.8223447 + 308000 12.060586 1000 0.73732959 4.8380527 + 309000 12.171445 1000 0.73368237 4.8537606 + 310000 12.283518 1000 0.72374292 4.8694686 + 311000 12.393447 1000 0.72107784 4.8851766 + 312000 12.505136 1000 0.72944426 4.9008845 + 313000 12.616959 1000 0.73958637 4.9165925 + 314000 12.730312 1000 0.75160847 4.9323005 + 315000 12.846163 1000 0.74419683 4.9480084 + 316000 12.960328 1000 0.74652593 4.9637164 + 317000 13.073994 1000 0.74933482 4.9794244 + 318000 13.186549 1000 0.74200509 4.9951323 + 319000 13.296925 1000 0.7346024 5.0108403 + 320000 13.406825 1000 0.72806145 5.0265482 + 321000 13.51703 1000 0.72147888 5.0422562 + 322000 13.628261 1000 0.71460041 5.0579642 + 323000 13.74063 1000 0.70255075 5.0736721 + 324000 13.853826 1000 0.70640327 5.0893801 + 325000 13.968533 1000 0.70643428 5.1050881 + 326000 14.081456 1000 0.69751794 5.120796 + 327000 14.195505 1000 0.69035108 5.136504 + 328000 14.310048 1000 0.68068243 5.152212 + 329000 14.426048 1000 0.69123492 5.1679199 + 330000 14.543349 1000 0.70326515 5.1836279 + 331000 14.662021 1000 0.70551726 5.1993358 + 332000 14.782194 1000 0.70514444 5.2150438 + 333000 14.901573 1000 0.71102045 5.2307518 + 334000 15.020642 1000 0.71336747 5.2464597 + 335000 15.136739 1000 0.70816388 5.2621677 + 336000 15.252554 1000 0.69502472 5.2778757 + 337000 15.368496 1000 0.69314289 5.2935836 + 338000 15.483744 1000 0.68565794 5.3092916 + 339000 15.599584 1000 0.67268053 5.3249995 + 340000 15.717342 1000 0.68313196 5.3407075 + 341000 15.835594 1000 0.68782815 5.3564155 + 342000 15.954546 1000 0.6989326 5.3721234 + 343000 16.074184 1000 0.694926 5.3878314 + 344000 16.193902 1000 0.7006474 5.4035394 + 345000 16.314878 1000 0.70783177 5.4192473 + 346000 16.434704 1000 0.71334276 5.4349553 + 347000 16.554708 1000 0.72917419 5.4506633 + 348000 16.673034 1000 0.74315705 5.4663712 + 349000 16.791269 1000 0.76731311 5.4820792 + 350000 16.912554 1000 0.79761434 5.4977871 + 351000 17.03323 1000 0.80447724 5.5134951 + 352000 17.155644 1000 0.80118728 5.5292031 + 353000 17.281134 1000 0.77990459 5.544911 + 354000 17.406672 1000 0.76453299 5.560619 + 355000 17.532346 1000 0.76538392 5.576327 + 356000 17.657256 1000 0.76310698 5.5920349 + 357000 17.782477 1000 0.75897095 5.6077429 + 358000 17.909642 1000 0.75071115 5.6234508 + 359000 18.035032 1000 0.74034801 5.6391588 + 360000 18.160696 1000 0.72671924 5.6548668 + 361000 18.285089 1000 0.72111017 5.6705747 + 362000 18.408849 1000 0.71875181 5.6862827 + 363000 18.533901 1000 0.71469706 5.7019907 + 364000 18.659326 1000 0.70470493 5.7176986 + 365000 18.784109 1000 0.70863047 5.7334066 + 366000 18.911344 1000 0.70850561 5.7491146 + 367000 19.039756 1000 0.71413452 5.7648225 + 368000 19.169907 1000 0.71314184 5.7805305 + 369000 19.299066 1000 0.71309549 5.7962384 + 370000 19.428116 1000 0.71132937 5.8119464 + 371000 19.553027 1000 0.70788039 5.8276544 + 372000 19.678121 1000 0.71780071 5.8433623 + 373000 19.804465 1000 0.72352571 5.8590703 + 374000 19.92949 1000 0.71723739 5.8747783 + 375000 20.053554 1000 0.71556941 5.8904862 + 376000 20.177991 1000 0.70935312 5.9061942 + 377000 20.301972 1000 0.71551157 5.9219022 + 378000 20.427612 1000 0.7235163 5.9376101 + 379000 20.554742 1000 0.73896421 5.9533181 + 380000 20.680899 1000 0.74906169 5.969026 + 381000 20.805515 1000 0.75303336 5.984734 + 382000 20.931483 1000 0.75359492 6.000442 + 383000 21.05731 1000 0.75579354 6.0161499 + 384000 21.184712 1000 0.75178368 6.0318579 + 385000 21.310667 1000 0.74412159 6.0475659 + 386000 21.433509 1000 0.7360955 6.0632738 + 387000 21.554251 1000 0.73461103 6.0789818 + 388000 21.674477 1000 0.72496617 6.0946897 + 389000 21.794698 1000 0.7219047 6.1103977 + 390000 21.914083 1000 0.71837013 6.1261057 + 391000 22.033188 1000 0.71495923 6.1418136 + 392000 22.152689 1000 0.71436707 6.1575216 + 393000 22.271183 1000 0.71447834 6.1732296 + 394000 22.389775 1000 0.71334298 6.1889375 + 395000 22.509106 1000 0.71510229 6.2046455 + 396000 22.628068 1000 0.7121714 6.2203535 + 397000 22.746926 1000 0.70818894 6.2360614 + 398000 22.865086 1000 0.70059455 6.2517694 + 399000 22.982394 1000 0.69960089 6.2674773 + 400000 23.100381 1000 0.70261998 6.2831853 +Loop time of 23.1004 on 4 procs for 200000 steps with 1000 atoms + +Performance: 35345.963 tau/day, 8657.854 timesteps/s, 8.658 Matom-step/s +92.9% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.263 | 2.1388 | 3.0295 | 58.6 | 9.26 +Neigh | 0.012633 | 0.017793 | 0.023147 | 3.7 | 0.08 +Comm | 7.8521 | 9.0474 | 10.284 | 39.6 | 39.17 +Output | 0.0029549 | 0.004916 | 0.0068506 | 2.0 | 0.02 +Modify | 8.3635 | 9.8066 | 11.142 | 41.0 | 42.45 +Other | | 2.085 | | | 9.03 + +Nlocal: 250 ave 258 max 241 min +Histogram: 1 0 0 0 1 0 0 1 0 1 +Nghost: 412 ave 492 max 332 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 1258.5 ave 1588 max 953 min +Histogram: 2 0 0 0 0 0 0 0 1 1 + +Total # of neighbors = 5034 +Ave neighs/atom = 5.034 +Neighbor list builds = 159 +Dangerous builds = 0 +Total wall time: 0:00:37 diff --git a/examples/granregion/log.27Nov18.granregion.box.g++.1 b/examples/granregion/log.27Nov18.granregion.box.g++.1 deleted file mode 100644 index ef004b7398..0000000000 --- a/examples/granregion/log.27Nov18.granregion.box.g++.1 +++ /dev/null @@ -1,475 +0,0 @@ -LAMMPS (27 Nov 2018) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -# pouring spheres into container box - -units lj -atom_style sphere -boundary f f f -dimension 3 -comm_modify vel yes - -region box block -10 10 -10 10 -10 10 units box -create_box 2 box -Created orthogonal box = (-10 -10 -10) to (10 10 10) - 1 by 1 by 1 MPI processor grid - -pair_style hybrid gran/hooke 4000.0 NULL 100.0 NULL 0.5 1 -pair_coeff * * gran/hooke - -region container block -6 6 -6 6 -6 6 units box -fix container all wall/gran/region hooke/history 4000.0 NULL 100.0 NULL 0.5 1 region container - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 2 all nve/sphere -fix 3 all gravity 1.0 vector 0 0 -1 - -region slab block -2 2 -2 2 -2 2 units box -fix ins all pour 100 2 4767548 vol 0.4 10 diam one 1.0 region slab ignore -Particle insertion: 48 every 566 steps, 100 by step 1133 - -timestep 0.005 - -compute 1 all temp -compute_modify 1 dynamic/dof yes - -compute 2 all temp/sphere -compute_modify 2 dynamic/dof yes - -thermo 100 -thermo_style custom step atoms temp c_1 c_2 press -thermo_modify lost ignore -compute_modify thermo_temp dynamic/dof yes - -#dump 2 all image 100 image.*.jpg type type # zoom 1.4 adiam 1.0 box no 0.0 axes yes 0.9 0.03 -#dump_modify 2 pad 5 - -run 5000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 31 31 31 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hooke, perpetual - attributes: half, newton on, size - pair build: half/size/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory allocation (min/avg/max) = 0.5855 | 0.5855 | 0.5855 Mbytes -Step Atoms Temp c_1 c_2 Press - 0 0 0 0 0 0 - 100 21 0.54270729 0.54270729 0.26473526 0.0013567682 - 200 21 0.87606961 0.87606961 0.42735103 0.002190174 - 300 21 1.1428374 1.1428374 0.55748167 0.0028570936 - 400 21 1.3543103 1.3543103 0.66829516 0.0033857758 - 500 21 1.0677786 1.0677786 0.53582407 0.0045048164 - 600 56 0.6744286 0.6744286 0.3502938 0.0047464584 - 700 56 0.75569283 0.75569283 0.39779462 0.0051953882 - 800 56 0.61597505 0.61597505 0.32943642 0.0086022783 - 900 56 0.65260802 0.65260802 0.34474044 0.0059298996 - 1000 56 0.51624952 0.51624952 0.28326898 0.0067827337 - 1100 56 0.46050076 0.46050076 0.25656319 0.0061891094 - 1200 81 0.39112346 0.39112346 0.21690172 0.0086559316 - 1300 81 0.33302617 0.33302617 0.19109398 0.0033381104 - 1400 81 0.3933533 0.3933533 0.21221692 0.004135078 - 1500 81 0.35495297 0.35495297 0.19925984 0.0037374946 - 1600 81 0.34150606 0.34150606 0.19025811 0.0053492835 - 1700 100 0.2561647 0.2561647 0.14186278 0.0090767057 - 1800 100 0.21124278 0.21124278 0.12154878 0.0028545759 - 1900 100 0.21793955 0.21793955 0.12173867 0.0029049155 - 2000 100 0.25530858 0.25530858 0.13892272 0.0035528009 - 2100 100 0.24671808 0.24671808 0.13687783 0.0076812435 - 2200 100 0.22465216 0.22465216 0.12513603 0.0042528715 - 2300 100 0.19362854 0.19362854 0.10914305 0.0061173739 - 2400 100 0.061627608 0.061627608 0.045907717 0.0010422721 - 2500 100 0.052700901 0.052700901 0.038883014 0.0019341647 - 2600 100 0.037332018 0.037332018 0.028357146 0.0028364476 - 2700 100 0.033526602 0.033526602 0.024609055 0.00044524562 - 2800 100 0.0194148 0.0194148 0.014491377 0.00056526591 - 2900 100 0.012346108 0.012346108 0.009857017 0.00081855699 - 3000 100 0.0107344 0.0107344 0.008669364 0.00040371396 - 3100 100 0.0092678291 0.0092678291 0.0073003108 0.00033287397 - 3200 100 0.0085847001 0.0085847001 0.0064045591 0.00023253547 - 3300 100 0.0049475182 0.0049475182 0.0041173627 0.00019876269 - 3400 100 0.0030471097 0.0030471097 0.0026940466 0.00013462604 - 3500 100 0.0031188371 0.0031188371 0.002612223 0.00026148578 - 3600 100 0.0017616584 0.0017616584 0.0017464137 0.00019049724 - 3700 100 0.0015475923 0.0015475923 0.0015560356 0.00025062814 - 3800 100 0.0012547887 0.0012547887 0.0012622678 0.00014132236 - 3900 100 0.0010047282 0.0010047282 0.0010379262 9.7665594e-05 - 4000 100 0.00080895307 0.00080895307 0.00088263027 8.1278842e-05 - 4100 100 0.00079078739 0.00079078739 0.00085810727 8.1271694e-05 - 4200 100 0.00075192318 0.00075192318 0.00083085046 8.9352453e-05 - 4300 100 0.00063546457 0.00063546457 0.00073222177 8.9264255e-05 - 4400 100 0.00062398391 0.00062398391 0.00071312118 8.4200615e-05 - 4500 100 0.00056464934 0.00056464934 0.00066087801 9.2097641e-05 - 4600 100 0.00066951894 0.00066951894 0.00071633313 8.2457941e-05 - 4700 100 0.001128837 0.001128837 0.00095293877 0.00011716361 - 4800 100 0.00049580391 0.00049580391 0.00056710488 0.00010718794 - 4900 100 0.00054374371 0.00054374371 0.00058671699 5.6580257e-05 - 5000 100 0.00043016232 0.00043016232 0.00050264172 2.8640786e-05 -Loop time of 0.0807264 on 1 procs for 5000 steps with 100 atoms - -Performance: 26757050.955 tau/day, 61937.618 timesteps/s -97.4% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0089066 | 0.0089066 | 0.0089066 | 0.0 | 11.03 -Neigh | 0.017107 | 0.017107 | 0.017107 | 0.0 | 21.19 -Comm | 0.00091505 | 0.00091505 | 0.00091505 | 0.0 | 1.13 -Output | 0.00051451 | 0.00051451 | 0.00051451 | 0.0 | 0.64 -Modify | 0.047671 | 0.047671 | 0.047671 | 0.0 | 59.05 -Other | | 0.005612 | | | 6.95 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 158 ave 158 max 158 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 158 -Ave neighs/atom = 1.58 -Neighbor list builds = 310 -Dangerous builds = 0 - -region container delete -variable theta equal (step-5000)*(4.0*PI/5000) -region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 0 0 1 -run 5000 -Per MPI rank memory allocation (min/avg/max) = 5.836 | 5.836 | 5.836 Mbytes -Step Atoms Temp c_1 c_2 Press - 5000 100 0.00043016232 0.00043016232 0.00050264172 2.8677624e-05 - 5100 100 0.56489668 0.56489668 0.31137762 0.011848041 - 5200 100 0.66068288 0.66068288 0.35915482 0.010199755 - 5300 100 0.74068022 0.74068022 0.39643217 0.010806409 - 5400 100 0.80913562 0.80913562 0.42748505 0.01190892 - 5500 100 0.89409135 0.89409135 0.46135116 0.013093474 - 5600 100 0.97585093 0.97585093 0.50021126 0.013588886 - 5700 100 1.0151954 1.0151954 0.5174624 0.01601347 - 5800 100 1.0452728 1.0452728 0.53122496 0.01879329 - 5900 100 1.0881689 1.0881689 0.55152229 0.017120714 - 6000 100 1.1133186 1.1133186 0.5638022 0.017284617 - 6100 100 1.1532099 1.1532099 0.58310076 0.017031384 - 6200 100 1.1798849 1.1798849 0.5959516 0.017971323 - 6300 100 1.19387 1.19387 0.60173877 0.020140984 - 6400 100 1.2126705 1.2126705 0.61086899 0.018426638 - 6500 100 1.2137646 1.2137646 0.61284198 0.019127381 - 6600 100 1.2339012 1.2339012 0.62199324 0.019378799 - 6700 100 1.2439326 1.2439326 0.62488425 0.021049447 - 6800 100 1.2489549 1.2489549 0.6278167 0.019552409 - 6900 100 1.2733303 1.2733303 0.63898149 0.020237284 - 7000 100 1.2835029 1.2835029 0.6440245 0.020798586 - 7100 100 1.2866111 1.2866111 0.64522896 0.020355019 - 7200 100 1.2886381 1.2886381 0.6467497 0.02062322 - 7300 100 1.2885085 1.2885085 0.64617988 0.020350755 - 7400 100 1.2912349 1.2912349 0.64691898 0.020197503 - 7500 100 1.2963062 1.2963062 0.64926335 0.020349791 - 7600 100 1.3016488 1.3016488 0.65150178 0.021001457 - 7700 100 1.3009311 1.3009311 0.65106234 0.021546471 - 7800 100 1.3016987 1.3016987 0.65143099 0.020994967 - 7900 100 1.3028811 1.3028811 0.65164558 0.022200425 - 8000 100 1.3087855 1.3087855 0.65439023 0.021310808 - 8100 100 1.3102001 1.3102001 0.65514941 0.021177764 - 8200 100 1.3133931 1.3133931 0.65681861 0.021591267 - 8300 100 1.3148898 1.3148898 0.65775353 0.021335384 - 8400 100 1.3160355 1.3160355 0.65845913 0.021238095 - 8500 100 1.3171797 1.3171797 0.65934185 0.021172983 - 8600 100 1.3176785 1.3176785 0.65964311 0.020747457 - 8700 100 1.3180425 1.3180425 0.66019624 0.021275913 - 8800 100 1.3287501 1.3287501 0.66444242 0.021832635 - 8900 100 1.3249847 1.3249847 0.6625848 0.021337451 - 9000 100 1.326216 1.326216 0.66297827 0.021470663 - 9100 100 1.3261662 1.3261662 0.66303852 0.021423573 - 9200 100 1.3312132 1.3312132 0.6653609 0.021385943 - 9300 100 1.3300976 1.3300976 0.66504574 0.021489888 - 9400 100 1.3377335 1.3377335 0.66820989 0.021565001 - 9500 100 1.3421956 1.3421956 0.67027168 0.022402346 - 9600 100 1.3464217 1.3464217 0.67228206 0.021991922 - 9700 100 1.3470623 1.3470623 0.67258349 0.022035729 - 9800 100 1.3446725 1.3446725 0.67135725 0.022295251 - 9900 100 1.343146 1.343146 0.67066672 0.022049041 - 10000 100 1.3435397 1.3435397 0.67093067 0.022451365 -Loop time of 0.247549 on 1 procs for 5000 steps with 100 atoms - -Performance: 8725560.044 tau/day, 20198.056 timesteps/s -99.4% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.031783 | 0.031783 | 0.031783 | 0.0 | 12.84 -Neigh | 0.038383 | 0.038383 | 0.038383 | 0.0 | 15.51 -Comm | 0.0012343 | 0.0012343 | 0.0012343 | 0.0 | 0.50 -Output | 0.00056028 | 0.00056028 | 0.00056028 | 0.0 | 0.23 -Modify | 0.1687 | 0.1687 | 0.1687 | 0.0 | 68.15 -Other | | 0.00689 | | | 2.78 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 199 ave 199 max 199 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 199 -Ave neighs/atom = 1.99 -Neighbor list builds = 621 -Dangerous builds = 0 - -region container delete -region container block -6 6 -6 6 -6 6 units box -run 5000 -Per MPI rank memory allocation (min/avg/max) = 5.836 | 5.836 | 5.836 Mbytes -Step Atoms Temp c_1 c_2 Press - 10000 100 1.3435397 1.3435397 0.67093067 0.022411116 - 10100 100 0.31352763 0.31352763 0.18877908 0.01321582 - 10200 100 0.13367611 0.13367611 0.090010637 0.0074171016 - 10300 100 0.068195658 0.068195658 0.052632714 0.0019696287 - 10400 100 0.053814936 0.053814936 0.043037586 0.0017121584 - 10500 100 0.04032072 0.04032072 0.032944572 0.0011809154 - 10600 100 0.029178161 0.029178161 0.023951873 0.0007804529 - 10700 100 0.025978206 0.025978206 0.021045025 0.00099531465 - 10800 100 0.023205036 0.023205036 0.01898502 0.00040036401 - 10900 100 0.019994638 0.019994638 0.016451227 0.00027385559 - 11000 100 0.017838131 0.017838131 0.014730762 0.00040399762 - 11100 100 0.014863196 0.014863196 0.012314308 0.00019097464 - 11200 100 0.012131256 0.012131256 0.010102122 0.00018514926 - 11300 100 0.010881385 0.010881385 0.0090013541 0.00016579157 - 11400 100 0.0076519814 0.0076519814 0.0064604568 0.00035399997 - 11500 100 0.0067507315 0.0067507315 0.0057378868 0.00049116726 - 11600 100 0.0053146649 0.0053146649 0.0047005938 0.00019625233 - 11700 100 0.0044162463 0.0044162463 0.0039534657 0.00012548039 - 11800 100 0.0037025387 0.0037025387 0.0033604103 6.2969827e-05 - 11900 100 0.0032632211 0.0032632211 0.0030406641 8.1600622e-05 - 12000 100 0.0028944057 0.0028944057 0.0026875858 6.6435833e-05 - 12100 100 0.0027644728 0.0027644728 0.0025859762 5.5899271e-05 - 12200 100 0.002480367 0.002480367 0.0023685117 6.0201418e-05 - 12300 100 0.0024136475 0.0024136475 0.0023107986 4.4386874e-05 - 12400 100 0.0021911567 0.0021911567 0.0021413262 5.0213175e-05 - 12500 100 0.0019775905 0.0019775905 0.0019927698 0.00035250097 - 12600 100 0.0017410363 0.0017410363 0.001830428 5.7885177e-05 - 12700 100 0.0015749276 0.0015749276 0.0016816771 4.5530192e-05 - 12800 100 0.0015187705 0.0015187705 0.0016218625 4.0589413e-05 - 12900 100 0.0014778376 0.0014778376 0.001580232 4.0085455e-05 - 13000 100 0.0014693491 0.0014693491 0.0015681809 4.0407656e-05 - 13100 100 0.0014434495 0.0014434495 0.0015356278 5.7849212e-05 - 13200 100 0.0014121959 0.0014121959 0.0015058758 3.2720737e-05 - 13300 100 0.0012876041 0.0012876041 0.0013838998 3.7725702e-05 - 13400 100 0.0012304951 0.0012304951 0.0013373457 3.6784546e-05 - 13500 100 0.0011954303 0.0011954303 0.0012877627 3.6584963e-05 - 13600 100 0.0011028947 0.0011028947 0.0011955404 2.3767582e-05 - 13700 100 0.0010611762 0.0010611762 0.0011504675 3.485879e-05 - 13800 100 0.0010080835 0.0010080835 0.0010997919 3.7905404e-05 - 13900 100 0.00096495712 0.00096495712 0.0010530767 3.5273885e-05 - 14000 100 0.00094945029 0.00094945029 0.0010409175 3.3718395e-05 - 14100 100 0.00092386757 0.00092386757 0.0010217415 3.3313256e-05 - 14200 100 0.00088928389 0.00088928389 0.000983023 3.290941e-05 - 14300 100 0.00082696485 0.00082696485 0.00092690771 3.1651431e-05 - 14400 100 0.00081086188 0.00081086188 0.00091681096 3.1845632e-05 - 14500 100 0.00077732305 0.00077732305 0.00087592983 4.8087361e-05 - 14600 100 0.00073386005 0.00073386005 0.00082546873 3.0892065e-05 - 14700 100 0.00068701098 0.00068701098 0.00075953521 0.00010208859 - 14800 100 0.00065860451 0.00065860451 0.00073738846 2.9272912e-05 - 14900 100 0.00064706564 0.00064706564 0.00072748391 2.9817955e-05 - 15000 100 0.00064227996 0.00064227996 0.00070964586 3.2547768e-05 -Loop time of 0.0840213 on 1 procs for 5000 steps with 100 atoms - -Performance: 25707757.817 tau/day, 59508.699 timesteps/s -98.2% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.01004 | 0.01004 | 0.01004 | 0.0 | 11.95 -Neigh | 0.0057366 | 0.0057366 | 0.0057366 | 0.0 | 6.83 -Comm | 0.00086808 | 0.00086808 | 0.00086808 | 0.0 | 1.03 -Output | 0.00049472 | 0.00049472 | 0.00049472 | 0.0 | 0.59 -Modify | 0.060893 | 0.060893 | 0.060893 | 0.0 | 72.47 -Other | | 0.005989 | | | 7.13 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 151 ave 151 max 151 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 151 -Ave neighs/atom = 1.51 -Neighbor list builds = 92 -Dangerous builds = 0 - -region container delete -variable theta equal (step-15000)*(4.0*PI/5000) -region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 1 1 1 -run 5000 -Per MPI rank memory allocation (min/avg/max) = 5.836 | 5.836 | 5.836 Mbytes -Step Atoms Temp c_1 c_2 Press - 15000 100 0.00064227996 0.00064227996 0.00070964586 3.2291286e-05 - 15100 100 0.81230775 0.81230775 0.53266834 0.010948517 - 15200 100 0.87957637 0.87957637 0.57559572 0.012401402 - 15300 100 1.0262431 1.0262431 0.66535656 0.015239294 - 15400 100 1.2863564 1.2863564 0.82026439 0.020115365 - 15500 100 1.4721549 1.4721549 0.92138954 0.022400442 - 15600 100 1.7140429 1.7140429 1.0103822 0.02558084 - 15700 100 1.8963287 1.8963287 1.0916756 0.032032318 - 15800 100 2.0741177 2.0741177 1.1706233 0.034251942 - 15900 100 2.1434733 2.1434733 1.2054242 0.030132271 - 16000 100 2.1409892 2.1409892 1.2019761 0.030914205 - 16100 100 2.2496058 2.2496058 1.2476438 0.030939743 - 16200 100 2.233356 2.233356 1.2499888 0.030097445 - 16300 100 2.2673491 2.2673491 1.272321 0.030968524 - 16400 100 2.3735648 2.3735648 1.3126117 0.034532377 - 16500 100 2.4510087 2.4510087 1.3588349 0.036685351 - 16600 100 2.497406 2.497406 1.3811443 0.032019982 - 16700 100 2.6800518 2.6800518 1.4661941 0.037455527 - 16800 100 2.8673997 2.8673997 1.5558303 0.03606532 - 16900 100 3.1229488 3.1229488 1.6918439 0.039753213 - 17000 100 3.117815 3.117815 1.6996841 0.046210837 - 17100 100 3.3336225 3.3336225 1.7834517 0.047865361 - 17200 100 3.1773164 3.1773164 1.7113961 0.047778334 - 17300 100 3.4336759 3.4336759 1.8343073 0.049673718 - 17400 100 3.3142326 3.3142326 1.7796613 0.055329946 - 17500 100 3.3205493 3.3205493 1.7853946 0.043558145 - 17600 100 3.2764553 3.2764553 1.7640702 0.051463316 - 17700 100 3.1909643 3.1909643 1.7407995 0.043248948 - 17800 100 3.1958324 3.1958324 1.735056 0.050123145 - 17900 100 3.2431806 3.2431806 1.7380638 0.050838878 - 18000 100 3.2967417 3.2967417 1.7705821 0.042176084 - 18100 100 3.4270672 3.4270672 1.8459819 0.043589925 - 18200 100 3.3638494 3.3638494 1.8159436 0.048949648 - 18300 100 3.3192279 3.3192279 1.8122198 0.043629595 - 18400 100 3.2627211 3.2627211 1.796316 0.045504529 - 18500 100 3.5669172 3.5669172 1.9257062 0.048460393 - 18600 100 3.5546411 3.5546411 1.9154318 0.046890968 - 18700 100 3.7288485 3.7288485 2.011106 0.046906531 - 18800 100 3.6800347 3.6800347 1.9936406 0.049985172 - 18900 100 3.7151898 3.7151898 2.007659 0.050394561 - 19000 100 3.9693368 3.9693368 2.1311549 0.053710204 - 19100 100 3.6907732 3.6907732 1.9939387 0.05480136 - 19200 100 3.8808777 3.8808777 2.0790125 0.055093552 - 19300 100 3.8422142 3.8422142 2.0756951 0.058090774 - 19400 100 3.7836875 3.7836875 2.0399805 0.06965907 - 19500 100 4.0480195 4.0480195 2.169214 0.053420651 - 19600 100 3.965917 3.965917 2.1245227 0.059077084 - 19700 100 3.8980869 3.8980869 2.0956306 0.050857062 - 19800 100 4.008079 4.008079 2.1501421 0.054938689 - 19900 100 3.7244506 3.7244506 2.0080877 0.055481507 - 20000 100 3.8146094 3.8146094 2.0541416 0.053187111 -Loop time of 0.210396 on 1 procs for 5000 steps with 100 atoms - -Performance: 10266363.999 tau/day, 23764.731 timesteps/s -98.3% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.013991 | 0.013991 | 0.013991 | 0.0 | 6.65 -Neigh | 0.056947 | 0.056947 | 0.056947 | 0.0 | 27.07 -Comm | 0.0013928 | 0.0013928 | 0.0013928 | 0.0 | 0.66 -Output | 0.00054646 | 0.00054646 | 0.00054646 | 0.0 | 0.26 -Modify | 0.13027 | 0.13027 | 0.13027 | 0.0 | 61.92 -Other | | 0.007249 | | | 3.45 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 144 ave 144 max 144 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 144 -Ave neighs/atom = 1.44 -Neighbor list builds = 910 -Dangerous builds = 0 - -region container delete -region container block -6 6 -6 6 -6 6 units box -run 5000 -Per MPI rank memory allocation (min/avg/max) = 5.836 | 5.836 | 5.836 Mbytes -Step Atoms Temp c_1 c_2 Press - 20000 100 3.8146094 3.8146094 2.0541416 0.052956687 - 20100 100 1.3848453 1.3848453 0.82244153 0.017544632 - 20200 100 0.89469578 0.89469578 0.55929611 0.0111604 - 20300 100 0.83962013 0.83962013 0.52665461 0.010396174 - 20400 100 0.77264252 0.77264252 0.48961142 0.0095493901 - 20500 100 0.78613208 0.78613208 0.48683715 0.012166835 - 20600 100 0.88411633 0.88411633 0.52854942 0.011725323 - 20700 100 0.89833225 0.89833225 0.52549693 0.012193413 - 20800 100 0.90216089 0.90216089 0.51167019 0.014289685 - 20900 100 0.98665057 0.98665057 0.5468893 0.013794318 - 21000 100 0.7576342 0.7576342 0.42758791 0.011720156 - 21100 100 0.3821563 0.3821563 0.23426423 0.005324458 - 21200 100 0.17486973 0.17486973 0.12876582 0.0029726352 - 21300 100 0.17940562 0.17940562 0.12400155 0.0026179917 - 21400 100 0.15526876 0.15526876 0.10526802 0.002341177 - 21500 100 0.079493361 0.079493361 0.062289324 0.0017379534 - 21600 100 0.057299519 0.057299519 0.047939171 0.0020095941 - 21700 100 0.056900097 0.056900097 0.045799124 0.0017782068 - 21800 100 0.039847861 0.039847861 0.035138066 0.0018265057 - 21900 100 0.03919167 0.03919167 0.031815619 0.0012160098 - 22000 100 0.025499317 0.025499317 0.022126202 0.0010056809 - 22100 100 0.018956113 0.018956113 0.017843095 0.0016109368 - 22200 100 0.017337018 0.017337018 0.016063068 0.00042537508 - 22300 100 0.014785686 0.014785686 0.013007571 0.00049466367 - 22400 100 0.011754087 0.011754087 0.010399793 0.00042349151 - 22500 100 0.010362474 0.010362474 0.009077435 0.00025198478 - 22600 100 0.0089484896 0.0089484896 0.0079474121 0.00035239475 - 22700 100 0.0089936432 0.0089936432 0.0077908763 0.00018548371 - 22800 100 0.0068663718 0.0068663718 0.0064061667 0.00025641972 - 22900 100 0.0050272392 0.0050272392 0.0046676214 0.00040466013 - 23000 100 0.0049250142 0.0049250142 0.0044849467 0.00035704909 - 23100 100 0.0050508148 0.0050508148 0.0043117775 0.00030051828 - 23200 100 0.0037293467 0.0037293467 0.0033592517 0.00038108923 - 23300 100 0.0032823722 0.0032823722 0.0030511575 0.00040421775 - 23400 100 0.0026913866 0.0026913866 0.0025493429 9.2813733e-05 - 23500 100 0.0025590632 0.0025590632 0.0024466447 8.4695125e-05 - 23600 100 0.0025270441 0.0025270441 0.0024236554 8.4237376e-05 - 23700 100 0.0026406527 0.0026406527 0.0024501963 0.00015009901 - 23800 100 0.0024633391 0.0024633391 0.0023470594 3.8990761e-05 - 23900 100 0.0029505606 0.0029505606 0.0025122613 4.9810757e-05 - 24000 100 0.0019535519 0.0019535519 0.0019112421 3.5804751e-05 - 24100 100 0.0017505151 0.0017505151 0.001726233 2.380737e-05 - 24200 100 0.0015864857 0.0015864857 0.0015479949 1.963276e-05 - 24300 100 0.0014535898 0.0014535898 0.0014221262 3.6607862e-05 - 24400 100 0.0013744934 0.0013744934 0.0013523293 1.4522467e-05 - 24500 100 0.0013286378 0.0013286378 0.0013097089 3.2389792e-05 - 24600 100 0.0012093624 0.0012093624 0.0011617482 4.848694e-05 - 24700 100 0.0011817062 0.0011817062 0.0011409092 3.8898899e-05 - 24800 100 0.0011142524 0.0011142524 0.0010877723 1.4560662e-05 - 24900 100 0.0010941199 0.0010941199 0.0010614415 7.0209336e-05 - 25000 100 0.0010773559 0.0010773559 0.0010389783 1.3332279e-05 -Loop time of 0.0912137 on 1 procs for 5000 steps with 100 atoms - -Performance: 23680652.416 tau/day, 54816.325 timesteps/s -99.3% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.010053 | 0.010053 | 0.010053 | 0.0 | 11.02 -Neigh | 0.017597 | 0.017597 | 0.017597 | 0.0 | 19.29 -Comm | 0.00092912 | 0.00092912 | 0.00092912 | 0.0 | 1.02 -Output | 0.00049806 | 0.00049806 | 0.00049806 | 0.0 | 0.55 -Modify | 0.056085 | 0.056085 | 0.056085 | 0.0 | 61.49 -Other | | 0.006052 | | | 6.63 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 143 ave 143 max 143 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 143 -Ave neighs/atom = 1.43 -Neighbor list builds = 289 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/granregion/log.27Nov18.granregion.box.g++.4 b/examples/granregion/log.27Nov18.granregion.box.g++.4 deleted file mode 100644 index 170c8be867..0000000000 --- a/examples/granregion/log.27Nov18.granregion.box.g++.4 +++ /dev/null @@ -1,475 +0,0 @@ -LAMMPS (27 Nov 2018) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -# pouring spheres into container box - -units lj -atom_style sphere -boundary f f f -dimension 3 -comm_modify vel yes - -region box block -10 10 -10 10 -10 10 units box -create_box 2 box -Created orthogonal box = (-10 -10 -10) to (10 10 10) - 1 by 2 by 2 MPI processor grid - -pair_style hybrid gran/hooke 4000.0 NULL 100.0 NULL 0.5 1 -pair_coeff * * gran/hooke - -region container block -6 6 -6 6 -6 6 units box -fix container all wall/gran/region hooke/history 4000.0 NULL 100.0 NULL 0.5 1 region container - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 2 all nve/sphere -fix 3 all gravity 1.0 vector 0 0 -1 - -region slab block -2 2 -2 2 -2 2 units box -fix ins all pour 100 2 4767548 vol 0.4 10 diam one 1.0 region slab ignore -Particle insertion: 48 every 566 steps, 100 by step 1133 - -timestep 0.005 - -compute 1 all temp -compute_modify 1 dynamic/dof yes - -compute 2 all temp/sphere -compute_modify 2 dynamic/dof yes - -thermo 100 -thermo_style custom step atoms temp c_1 c_2 press -thermo_modify lost ignore -compute_modify thermo_temp dynamic/dof yes - -#dump 2 all image 100 image.*.jpg type type # zoom 1.4 adiam 1.0 box no 0.0 axes yes 0.9 0.03 -#dump_modify 2 pad 5 - -run 5000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 31 31 31 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hooke, perpetual - attributes: half, newton on, size - pair build: half/size/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory allocation (min/avg/max) = 0.4834 | 0.4834 | 0.4834 Mbytes -Step Atoms Temp c_1 c_2 Press - 0 0 0 0 0 0 - 100 21 0.54270729 0.54270729 0.26473526 0.0013567682 - 200 21 0.87606961 0.87606961 0.42735103 0.002190174 - 300 21 1.1428374 1.1428374 0.55748167 0.0028570936 - 400 21 1.3543103 1.3543103 0.66829516 0.0033857758 - 500 21 1.0677786 1.0677786 0.53582407 0.0045048164 - 600 56 0.6744286 0.6744286 0.3502938 0.0047464584 - 700 56 0.75569283 0.75569283 0.39779462 0.0051953882 - 800 56 0.61597505 0.61597505 0.32943642 0.0086022783 - 900 56 0.65260802 0.65260802 0.34474044 0.0059298996 - 1000 56 0.51624952 0.51624952 0.28326898 0.0067827337 - 1100 56 0.46050076 0.46050076 0.25656319 0.0061891094 - 1200 81 0.39112346 0.39112346 0.21690172 0.0086559316 - 1300 81 0.33302617 0.33302617 0.19109398 0.0033381104 - 1400 81 0.3933533 0.3933533 0.21221692 0.004135078 - 1500 81 0.35495297 0.35495297 0.19925984 0.0037374946 - 1600 81 0.34150606 0.34150606 0.19025811 0.0053492835 - 1700 100 0.2561647 0.2561647 0.14186278 0.0090767057 - 1800 100 0.21124278 0.21124278 0.12154878 0.002854576 - 1900 100 0.21793955 0.21793955 0.12173867 0.0029049175 - 2000 100 0.25530858 0.25530858 0.13892272 0.0035528022 - 2100 100 0.24671805 0.24671805 0.13687782 0.0076812357 - 2200 100 0.22465212 0.22465212 0.12513612 0.0042526344 - 2300 100 0.19362805 0.19362805 0.10914275 0.0061175383 - 2400 100 0.061626039 0.061626039 0.045905953 0.0010393593 - 2500 100 0.052690575 0.052690575 0.038879745 0.0018543933 - 2600 100 0.037256691 0.037256691 0.02833916 0.0027683815 - 2700 100 0.033416362 0.033416362 0.024551243 0.00046725913 - 2800 100 0.019617758 0.019617758 0.014619416 0.00064550316 - 2900 100 0.012313874 0.012313874 0.0098188153 0.00033470181 - 3000 100 0.010948455 0.010948455 0.0087981878 0.00034401243 - 3100 100 0.009359431 0.009359431 0.0073642412 0.00045497356 - 3200 100 0.008129885 0.008129885 0.0061460516 0.00029944201 - 3300 100 0.0050682533 0.0050682533 0.0042692811 0.00026543293 - 3400 100 0.0031539312 0.0031539312 0.0027256511 0.00012475748 - 3500 100 0.0023621311 0.0023621311 0.0021691817 0.0001186392 - 3600 100 0.0018305354 0.0018305354 0.0018004128 0.00015926282 - 3700 100 0.0016522492 0.0016522492 0.0017231072 0.0002193159 - 3800 100 0.0011715102 0.0011715102 0.0012739973 0.0001747857 - 3900 100 0.0010607606 0.0010607606 0.0010974725 0.00012476088 - 4000 100 0.00087570802 0.00087570802 0.00095828935 6.5544103e-05 - 4100 100 0.00078598203 0.00078598203 0.00088068743 9.4560761e-05 - 4200 100 0.00088317454 0.00088317454 0.00092784605 8.1108122e-05 - 4300 100 0.0015013254 0.0015013254 0.0012069505 8.8289686e-05 - 4400 100 0.00070054041 0.00070054041 0.00079451193 5.195712e-05 - 4500 100 0.00096259073 0.00096259073 0.00091232511 3.4895669e-05 - 4600 100 0.00056641848 0.00056641848 0.00069083146 3.9657253e-05 - 4700 100 0.0005455099 0.0005455099 0.00064816699 2.8131762e-05 - 4800 100 0.00048254366 0.00048254366 0.00057192255 4.7914432e-05 - 4900 100 0.00037108125 0.00037108125 0.00048035333 6.4711817e-05 - 5000 100 0.00031290399 0.00031290399 0.00042398478 4.6025975e-05 -Loop time of 0.075416 on 4 procs for 5000 steps with 100 atoms - -Performance: 28641126.336 tau/day, 66298.904 timesteps/s -93.7% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0022948 | 0.0041364 | 0.0061705 | 2.8 | 5.48 -Neigh | 0.0043123 | 0.0057145 | 0.0070784 | 1.8 | 7.58 -Comm | 0.014259 | 0.018658 | 0.024313 | 3.3 | 24.74 -Output | 0.0011525 | 0.001404 | 0.0015383 | 0.4 | 1.86 -Modify | 0.0030508 | 0.014543 | 0.026602 | 9.5 | 19.28 -Other | | 0.03096 | | | 41.05 - -Nlocal: 25 ave 51 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 5.5 ave 12 max 0 min -Histogram: 2 0 0 0 0 0 0 0 1 1 -Neighs: 39.75 ave 84 max 0 min -Histogram: 2 0 0 0 0 0 0 0 1 1 - -Total # of neighbors = 159 -Ave neighs/atom = 1.59 -Neighbor list builds = 310 -Dangerous builds = 0 - -region container delete -variable theta equal (step-5000)*(4.0*PI/5000) -region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 0 0 1 -run 5000 -Per MPI rank memory allocation (min/avg/max) = 5.733 | 5.733 | 5.734 Mbytes -Step Atoms Temp c_1 c_2 Press - 5000 100 0.00031290399 0.00031290399 0.00042398478 4.4282259e-05 - 5100 100 0.62661084 0.62661084 0.33840611 0.012020153 - 5200 100 0.67371678 0.67371678 0.36218522 0.0093514044 - 5300 100 0.75892331 0.75892331 0.4000747 0.010693252 - 5400 100 0.86207426 0.86207426 0.44630388 0.013540097 - 5500 100 0.96205334 0.96205334 0.49432848 0.017375079 - 5600 100 1.0261194 1.0261194 0.52203912 0.016045333 - 5700 100 1.0584366 1.0584366 0.53794336 0.018621676 - 5800 100 1.0881674 1.0881674 0.55300469 0.01930602 - 5900 100 1.1214233 1.1214233 0.56613492 0.021141141 - 6000 100 1.1666836 1.1666836 0.58759377 0.017655361 - 6100 100 1.1785775 1.1785775 0.59365148 0.01829443 - 6200 100 1.2092305 1.2092305 0.60798809 0.018752443 - 6300 100 1.2331787 1.2331787 0.62003386 0.020291021 - 6400 100 1.2561616 1.2561616 0.63143643 0.019899235 - 6500 100 1.284432 1.284432 0.6460504 0.02083284 - 6600 100 1.2678801 1.2678801 0.63882384 0.019456553 - 6700 100 1.2662641 1.2662641 0.63676836 0.020235578 - 6800 100 1.2785484 1.2785484 0.64129093 0.020335162 - 6900 100 1.2916608 1.2916608 0.64764298 0.020154225 - 7000 100 1.2907774 1.2907774 0.64724849 0.020550885 - 7100 100 1.3074473 1.3074473 0.65460147 0.020847362 - 7200 100 1.3124592 1.3124592 0.65641332 0.020897348 - 7300 100 1.3206191 1.3206191 0.66011491 0.021444077 - 7400 100 1.3273988 1.3273988 0.66350669 0.02129418 - 7500 100 1.3343911 1.3343911 0.66707269 0.021337376 - 7600 100 1.3368998 1.3368998 0.66869327 0.021415901 - 7700 100 1.330658 1.330658 0.66535295 0.021500761 - 7800 100 1.330801 1.330801 0.66555123 0.022806058 - 7900 100 1.3392828 1.3392828 0.66926796 0.02194009 - 8000 100 1.3432728 1.3432728 0.67142337 0.022393719 - 8100 100 1.3411612 1.3411612 0.66989302 0.022366895 - 8200 100 1.3427451 1.3427451 0.67054285 0.021966329 - 8300 100 1.3418147 1.3418147 0.67023132 0.022513459 - 8400 100 1.346493 1.346493 0.67247837 0.022705366 - 8500 100 1.3513958 1.3513958 0.6749092 0.022834077 - 8600 100 1.3520297 1.3520297 0.67506261 0.023227676 - 8700 100 1.3517157 1.3517157 0.67485073 0.023043414 - 8800 100 1.3530071 1.3530071 0.67547212 0.022933766 - 8900 100 1.3550454 1.3550454 0.67657277 0.022744182 - 9000 100 1.3554069 1.3554069 0.67673505 0.022802134 - 9100 100 1.3556675 1.3556675 0.67698335 0.022868449 - 9200 100 1.3534709 1.3534709 0.67600677 0.022537792 - 9300 100 1.3525103 1.3525103 0.67569499 0.022687849 - 9400 100 1.3612673 1.3612673 0.67967213 0.022703588 - 9500 100 1.3649439 1.3649439 0.68147385 0.023498539 - 9600 100 1.3629376 1.3629376 0.68063814 0.023515579 - 9700 100 1.3648924 1.3648924 0.68137104 0.023641856 - 9800 100 1.3662063 1.3662063 0.68196538 0.023576884 - 9900 100 1.3689695 1.3689695 0.68326751 0.023572622 - 10000 100 1.3701139 1.3701139 0.68383343 0.023720885 -Loop time of 0.174251 on 4 procs for 5000 steps with 100 atoms - -Performance: 12395939.906 tau/day, 28694.305 timesteps/s -96.5% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0024631 | 0.010709 | 0.020461 | 8.0 | 6.15 -Neigh | 0.0078361 | 0.012368 | 0.016955 | 4.0 | 7.10 -Comm | 0.0059071 | 0.013641 | 0.023547 | 6.6 | 7.83 -Output | 0.0011749 | 0.0021775 | 0.0030091 | 1.4 | 1.25 -Modify | 0.015055 | 0.055709 | 0.097013 | 17.2 | 31.97 -Other | | 0.07965 | | | 45.71 - -Nlocal: 25 ave 51 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 4.5 ave 10 max 0 min -Histogram: 2 0 0 0 0 0 0 0 1 1 -Neighs: 49.25 ave 101 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 2 - -Total # of neighbors = 197 -Ave neighs/atom = 1.97 -Neighbor list builds = 627 -Dangerous builds = 0 - -region container delete -region container block -6 6 -6 6 -6 6 units box -run 5000 -Per MPI rank memory allocation (min/avg/max) = 5.733 | 5.733 | 5.734 Mbytes -Step Atoms Temp c_1 c_2 Press - 10000 100 1.3701139 1.3701139 0.68383343 0.023895921 - 10100 100 0.25960098 0.25960098 0.15183967 0.0049554084 - 10200 100 0.15017576 0.15017576 0.10081112 0.0045433238 - 10300 100 0.10129671 0.10129671 0.078049099 0.0014012658 - 10400 100 0.06742425 0.06742425 0.055603816 0.0010184792 - 10500 100 0.053446366 0.053446366 0.045338293 0.00089291689 - 10600 100 0.041898231 0.041898231 0.036081995 0.00060703885 - 10700 100 0.03580041 0.03580041 0.031118724 0.00067731964 - 10800 100 0.030933755 0.030933755 0.026372348 0.00039362325 - 10900 100 0.027278004 0.027278004 0.022868898 0.0003680788 - 11000 100 0.021566952 0.021566952 0.017994879 0.0013056062 - 11100 100 0.019143625 0.019143625 0.015833865 0.00050998112 - 11200 100 0.015659868 0.015659868 0.013119379 0.00012755696 - 11300 100 0.013554605 0.013554605 0.01147808 0.00027393437 - 11400 100 0.01204033 0.01204033 0.010273026 0.00033430792 - 11500 100 0.010958991 0.010958991 0.0093924566 0.00049023273 - 11600 100 0.01012553 0.01012553 0.0084556996 0.00021457333 - 11700 100 0.0083584131 0.0083584131 0.0071118766 7.7149089e-05 - 11800 100 0.007044883 0.007044883 0.0058675523 0.00036165381 - 11900 100 0.0059875106 0.0059875106 0.0050610372 7.4095443e-05 - 12000 100 0.0045180275 0.0045180275 0.0039006565 0.00014607704 - 12100 100 0.0036631356 0.0036631356 0.0031154279 7.031064e-05 - 12200 100 0.0034443424 0.0034443424 0.0029190637 0.00020974475 - 12300 100 0.0030853504 0.0030853504 0.0026315266 3.4873541e-05 - 12400 100 0.0025451749 0.0025451749 0.0022290833 0.00041551536 - 12500 100 0.0021624857 0.0021624857 0.0019127734 2.6760761e-05 - 12600 100 0.0020637862 0.0020637862 0.0018186641 4.9446655e-05 - 12700 100 0.0019889538 0.0019889538 0.0017604689 3.326943e-05 - 12800 100 0.0018706349 0.0018706349 0.0016669237 2.3327318e-05 - 12900 100 0.0017472824 0.0017472824 0.001579469 8.816765e-05 - 13000 100 0.0016034824 0.0016034824 0.0014549852 3.5407524e-05 - 13100 100 0.00151798 0.00151798 0.0013826659 1.8754149e-05 - 13200 100 0.0013049781 0.0013049781 0.0012137907 0.00015263775 - 13300 100 0.0012270536 0.0012270536 0.0011590841 4.77636e-06 - 13400 100 0.0011395128 0.0011395128 0.0010860297 2.5606328e-05 - 13500 100 0.0010858414 0.0010858414 0.0010486713 5.8563931e-05 - 13600 100 0.0010474389 0.0010474389 0.001015904 1.4319658e-05 - 13700 100 0.00099241549 0.00099241549 0.00097825038 1.2281142e-05 - 13800 100 0.00084449252 0.00084449252 0.00084141963 1.0451215e-05 - 13900 100 0.00084004792 0.00084004792 0.00083755495 3.7174162e-05 - 14000 100 0.00082183505 0.00082183505 0.00082027058 1.0170209e-05 - 14100 100 0.00082377076 0.00082377076 0.00080489795 1.181976e-05 - 14200 100 0.00076903208 0.00076903208 0.00076216608 4.4590341e-05 - 14300 100 0.00075173269 0.00075173269 0.00074828209 2.2134371e-05 - 14400 100 0.00074379148 0.00074379148 0.00074072001 1.5746014e-05 - 14500 100 0.00072454029 0.00072454029 0.0007174429 8.9830398e-06 - 14600 100 0.00072372648 0.00072372648 0.00071678769 9.1111512e-06 - 14700 100 0.00071541587 0.00071541587 0.00070893868 7.8446375e-05 - 14800 100 0.0006820307 0.0006820307 0.00066675502 8.4401299e-06 - 14900 100 0.00067050627 0.00067050627 0.00065751846 0.0001228548 - 15000 100 0.00064977132 0.00064977132 0.00062305247 7.8887775e-06 -Loop time of 0.0746691 on 4 procs for 5000 steps with 100 atoms - -Performance: 28927619.905 tau/day, 66962.083 timesteps/s -96.6% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0021737 | 0.0042608 | 0.0063519 | 3.2 | 5.71 -Neigh | 0.0012126 | 0.0019009 | 0.0026193 | 1.6 | 2.55 -Comm | 0.0023425 | 0.0092477 | 0.016876 | 7.2 | 12.38 -Output | 0.0010619 | 0.0017995 | 0.0030522 | 1.8 | 2.41 -Modify | 0.00097013 | 0.017151 | 0.03415 | 12.3 | 22.97 -Other | | 0.04031 | | | 53.98 - -Nlocal: 25 ave 55 max 0 min -Histogram: 2 0 0 0 0 0 0 0 1 1 -Nghost: 3.75 ave 9 max 0 min -Histogram: 2 0 0 0 0 0 1 0 0 1 -Neighs: 42.5 ave 88 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 2 - -Total # of neighbors = 170 -Ave neighs/atom = 1.7 -Neighbor list builds = 97 -Dangerous builds = 0 - -region container delete -variable theta equal (step-15000)*(4.0*PI/5000) -region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 1 1 1 -run 5000 -Per MPI rank memory allocation (min/avg/max) = 5.733 | 5.733 | 5.734 Mbytes -Step Atoms Temp c_1 c_2 Press - 15000 100 0.00064977132 0.00064977132 0.00062305247 7.9405607e-06 - 15100 100 1.0123899 1.0123899 0.66185504 0.014587215 - 15200 100 1.0332828 1.0332828 0.67443308 0.014002815 - 15300 100 1.0804076 1.0804076 0.72450056 0.016985272 - 15400 100 1.2868163 1.2868163 0.8708132 0.022190597 - 15500 100 1.5180471 1.5180471 0.99613124 0.026761866 - 15600 100 1.5422016 1.5422016 1.0021746 0.024490139 - 15700 100 1.7142241 1.7142241 1.0611146 0.0301368 - 15800 100 1.8747057 1.8747057 1.1207858 0.027612699 - 15900 100 1.9294819 1.9294819 1.1289025 0.027270228 - 16000 100 1.953275 1.953275 1.1264475 0.031568811 - 16100 100 2.0434228 2.0434228 1.1665365 0.026358952 - 16200 100 2.2129393 2.2129393 1.2448327 0.029613382 - 16300 100 2.2558224 2.2558224 1.2373264 0.028306021 - 16400 100 2.367398 2.367398 1.293448 0.029659303 - 16500 100 2.4221549 2.4221549 1.3198966 0.032541712 - 16600 100 2.510283 2.510283 1.3618001 0.034740544 - 16700 100 2.6776293 2.6776293 1.4508262 0.034556341 - 16800 100 2.8095841 2.8095841 1.5190571 0.035183782 - 16900 100 2.8485646 2.8485646 1.5344387 0.037153336 - 17000 100 3.0298285 3.0298285 1.6321623 0.040745906 - 17100 100 3.0218054 3.0218054 1.6187189 0.042082135 - 17200 100 3.1981705 3.1981705 1.7090597 0.041770208 - 17300 100 3.3178559 3.3178559 1.7723201 0.044604756 - 17400 100 3.3940903 3.3940903 1.8229846 0.049231759 - 17500 100 3.3274817 3.3274817 1.7870996 0.051649102 - 17600 100 3.3204358 3.3204358 1.791527 0.043875639 - 17700 100 3.2185649 3.2185649 1.7480866 0.049941218 - 17800 100 3.2507826 3.2507826 1.7727758 0.048622479 - 17900 100 3.2432767 3.2432767 1.7796296 0.044343902 - 18000 100 3.0841272 3.0841272 1.6978832 0.045344433 - 18100 100 3.0953909 3.0953909 1.699898 0.040070963 - 18200 100 3.1405704 3.1405704 1.7316463 0.042528194 - 18300 100 3.1904871 3.1904871 1.7555188 0.041141165 - 18400 100 3.3256779 3.3256779 1.8243767 0.043908318 - 18500 100 3.5161823 3.5161823 1.9150861 0.045165166 - 18600 100 3.5668273 3.5668273 1.9217975 0.048127705 - 18700 100 3.6648305 3.6648305 1.9685241 0.051205352 - 18800 100 3.9000502 3.9000502 2.0886668 0.05262835 - 18900 100 4.0217758 4.0217758 2.1465498 0.054502839 - 19000 100 3.8431174 3.8431174 2.0581611 0.054852333 - 19100 100 4.1721454 4.1721454 2.2221193 0.053831555 - 19200 100 3.9061181 3.9061181 2.096323 0.058077678 - 19300 100 4.0191085 4.0191085 2.1408069 0.05475437 - 19400 100 3.8840871 3.8840871 2.0887677 0.061905092 - 19500 100 3.8388062 3.8388062 2.0567095 0.051076414 - 19600 100 3.6331742 3.6331742 1.9574769 0.04748008 - 19700 100 3.6996954 3.6996954 1.9887285 0.053305043 - 19800 100 3.8649872 3.8649872 2.0827424 0.060484008 - 19900 100 3.8305733 3.8305733 2.0700281 0.052926584 - 20000 100 3.7948463 3.7948463 2.0657301 0.048516953 -Loop time of 0.156359 on 4 procs for 5000 steps with 100 atoms - -Performance: 13814330.011 tau/day, 31977.616 timesteps/s -94.9% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0040646 | 0.0058124 | 0.0074518 | 1.6 | 3.72 -Neigh | 0.014813 | 0.018389 | 0.020829 | 1.6 | 11.76 -Comm | 0.031892 | 0.034103 | 0.036658 | 1.0 | 21.81 -Output | 0.0013497 | 0.0019822 | 0.003484 | 2.0 | 1.27 -Modify | 0.031006 | 0.046878 | 0.056364 | 4.5 | 29.98 -Other | | 0.0492 | | | 31.46 - -Nlocal: 25 ave 37 max 10 min -Histogram: 1 0 0 0 0 1 0 1 0 1 -Nghost: 3.75 ave 6 max 2 min -Histogram: 1 0 1 0 0 1 0 0 0 1 -Neighs: 36.25 ave 57 max 9 min -Histogram: 1 0 0 0 0 0 2 0 0 1 - -Total # of neighbors = 145 -Ave neighs/atom = 1.45 -Neighbor list builds = 921 -Dangerous builds = 0 - -region container delete -region container block -6 6 -6 6 -6 6 units box -run 5000 -Per MPI rank memory allocation (min/avg/max) = 5.733 | 5.734 | 5.734 Mbytes -Step Atoms Temp c_1 c_2 Press - 20000 100 3.7948463 3.7948463 2.0657301 0.048381317 - 20100 100 1.1359931 1.1359931 0.70170151 0.015300556 - 20200 100 0.87354617 0.87354617 0.55969299 0.012181983 - 20300 100 0.84424484 0.84424484 0.52849351 0.017724782 - 20400 100 0.82422562 0.82422562 0.50175766 0.0098154181 - 20500 100 0.83731289 0.83731289 0.49814627 0.010465327 - 20600 100 0.93125924 0.93125924 0.53803834 0.011624902 - 20700 100 1.0810919 1.0810919 0.60974741 0.01425935 - 20800 100 1.0646343 1.0646343 0.60037545 0.013418132 - 20900 100 1.0608055 1.0608055 0.58353908 0.015119612 - 21000 100 0.68173094 0.68173094 0.3941588 0.0099947535 - 21100 100 0.35407592 0.35407592 0.21306735 0.0043859494 - 21200 100 0.19247432 0.19247432 0.12989264 0.0031808422 - 21300 100 0.13493768 0.13493768 0.093987634 0.0025990872 - 21400 100 0.085735857 0.085735857 0.062091707 0.001434207 - 21500 100 0.074307566 0.074307566 0.05224051 0.0022163094 - 21600 100 0.069932382 0.069932382 0.045388838 0.0020296572 - 21700 100 0.041749712 0.041749712 0.031422931 0.001211155 - 21800 100 0.03378055 0.03378055 0.026248846 0.0020596463 - 21900 100 0.030608528 0.030608528 0.022868294 0.0016282878 - 22000 100 0.025632448 0.025632448 0.019606402 0.0011659657 - 22100 100 0.013785062 0.013785062 0.011561769 0.00069006322 - 22200 100 0.013139066 0.013139066 0.010559726 0.00038424576 - 22300 100 0.01455318 0.01455318 0.011094558 0.00054735929 - 22400 100 0.0096885414 0.0096885414 0.008012617 0.00055875777 - 22500 100 0.0081193116 0.0081193116 0.006802973 0.00052914932 - 22600 100 0.0057159621 0.0057159621 0.0048680253 0.00054864875 - 22700 100 0.0052344376 0.0052344376 0.0045511708 0.00026333033 - 22800 100 0.0054554177 0.0054554177 0.0045005479 0.0002085972 - 22900 100 0.0039455776 0.0039455776 0.0035287888 0.00022514017 - 23000 100 0.0042620461 0.0042620461 0.0035747729 0.00020030999 - 23100 100 0.0035303095 0.0035303095 0.0031995108 0.00016007298 - 23200 100 0.0029747457 0.0029747457 0.0027095904 0.00029775807 - 23300 100 0.0032404433 0.0032404433 0.002769389 0.00019627995 - 23400 100 0.0024965262 0.0024965262 0.0022343473 0.00018870133 - 23500 100 0.00251617 0.00251617 0.0022533604 0.0002661237 - 23600 100 0.0025923653 0.0025923653 0.0022887204 0.00018475201 - 23700 100 0.0023016545 0.0023016545 0.0019829032 0.00014888334 - 23800 100 0.0028358441 0.0028358441 0.0021790504 0.00064613131 - 23900 100 0.0016682403 0.0016682403 0.0014930521 8.8407075e-05 - 24000 100 0.0016341577 0.0016341577 0.0014597606 0.00011262081 - 24100 100 0.0015433636 0.0015433636 0.0013981581 8.364568e-05 - 24200 100 0.0015033978 0.0015033978 0.0013582013 8.4539006e-05 - 24300 100 0.0014513098 0.0014513098 0.0012943981 0.00010546194 - 24400 100 0.0013293352 0.0013293352 0.001206366 8.4967509e-05 - 24500 100 0.0013732518 0.0013732518 0.001202532 0.00014787559 - 24600 100 0.00091890041 0.00091890041 0.00084499923 0.00010080638 - 24700 100 0.00083467915 0.00083467915 0.00077071316 5.3934025e-05 - 24800 100 0.00080701934 0.00080701934 0.0007477161 5.3982095e-05 - 24900 100 0.00080620771 0.00080620771 0.0007471026 5.3581294e-05 - 25000 100 0.00080568604 0.00080568604 0.00074625735 5.3574637e-05 -Loop time of 0.0792506 on 4 procs for 5000 steps with 100 atoms - -Performance: 27255302.560 tau/day, 63090.978 timesteps/s -95.0% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0023611 | 0.0047854 | 0.0077851 | 3.4 | 6.04 -Neigh | 0.0042653 | 0.005571 | 0.0067258 | 1.5 | 7.03 -Comm | 0.0077977 | 0.013373 | 0.019515 | 4.4 | 16.87 -Output | 0.0010924 | 0.0017727 | 0.0030222 | 1.8 | 2.24 -Modify | 0.0023608 | 0.015964 | 0.030545 | 10.5 | 20.14 -Other | | 0.03778 | | | 47.68 - -Nlocal: 25 ave 50 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 5 ave 10 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Neighs: 35.75 ave 78 max 0 min -Histogram: 2 0 0 0 0 0 0 0 1 1 - -Total # of neighbors = 143 -Ave neighs/atom = 1.43 -Neighbor list builds = 287 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/granregion/log.27Nov18.granregion.funnel.g++.1 b/examples/granregion/log.27Nov18.granregion.funnel.g++.1 deleted file mode 100644 index 0268ed000a..0000000000 --- a/examples/granregion/log.27Nov18.granregion.funnel.g++.1 +++ /dev/null @@ -1,601 +0,0 @@ -LAMMPS (27 Nov 2018) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -# pour particles into cone-shaped funnel, settle them, let them run out bottom - -variable name string funnel_pour - -thermo_modify flush yes -units si -variable PI equal 3.141592653589 -variable seed equal 14314 - -############################################### -# Geometry-related parameters -############################################### - -variable xlo equal 10 -variable xhi equal 40 -variable ylo equal 10 -variable yhi equal 40 -variable zlo equal -20 -variable zhi equal 50 - -variable xc equal 25 -variable yc equal 25 - -variable zconehi equal 50 -variable zconelo equal 10 -variable zcyllo equal 0 -variable radconelo equal 2 -variable radconehi equal 20 - -################################################ -# Particle sizes -################################################ - -variable rlo equal 0.25 -variable rhi equal 0.5 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.25 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.5 - -variable skin equal ${rhi} -variable skin equal 0.5 - -############################################### -# Granular contact parameters -############################################### - -variable coeffRes equal 0.1 -variable coeffFric equal 0.5 - -variable density equal 1.0 -variable EYoung equal 10^5 -variable Poisson equal 2.0/7.0 -variable GShear equal ${EYoung}/(2*(1+${Poisson})) -variable GShear equal 100000/(2*(1+${Poisson})) -variable GShear equal 100000/(2*(1+0.285714285714286)) - -variable gravity equal 1.0 - -variable reff equal 0.5*(${rhi}+${rlo}) -variable reff equal 0.5*(0.5+${rlo}) -variable reff equal 0.5*(0.5+0.25) -variable meff equal ${density}*4.0/3.0*${PI}*${reff}^3 -variable meff equal 1*4.0/3.0*${PI}*${reff}^3 -variable meff equal 1*4.0/3.0*3.141592653589*${reff}^3 -variable meff equal 1*4.0/3.0*3.141592653589*0.375^3 -variable min_mass equal ${density}*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*0.25 -variable max_mass equal ${density}*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*0.5 - -## Typical way to set kn, kt, etc.: -variable kn equal 4.0*${GShear}/(3*(1-${Poisson})) -variable kn equal 4.0*38888.8888888889/(3*(1-${Poisson})) -variable kn equal 4.0*38888.8888888889/(3*(1-0.285714285714286)) -variable kt equal 4.0*${GShear}/(2-${Poisson}) -variable kt equal 4.0*38888.8888888889/(2-${Poisson}) -variable kt equal 4.0*38888.8888888889/(2-0.285714285714286) - -variable a equal (-2.0*log(${coeffRes})/${PI})^2 -variable a equal (-2.0*log(0.1)/${PI})^2 -variable a equal (-2.0*log(0.1)/3.141592653589)^2 -variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*0.405284734569556)) -variable gamma_t equal ${gamma_n}*0.5 -variable gamma_t equal 903.503751814138*0.5 - -variable tcol equal ${PI}/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-903.503751814138/4.0) - -variable dt equal ${tcol}*0.05 -variable dt equal 0.00210943016014969*0.05 -timestep ${dt} -timestep 0.000105471508007485 - -############################################### -variable dumpfreq equal 1000 -variable logfreq equal 1000 - -newton off -atom_style sphere - -boundary p p f - -region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 10 ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 10 40 ${zlo} ${zhi} -region boxreg block 10 40 10 40 -20 ${zhi} -region boxreg block 10 40 10 40 -20 50 -create_box 1 boxreg -Created orthogonal box = (10 10 -20) to (40 40 50) - 1 by 1 by 1 MPI processor grid - -pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 -pair_coeff * * - -neighbor ${skin} bin -neighbor 0.5 bin -thermo ${logfreq} -thermo 1000 - -comm_style brick -comm_modify mode multi group all vel yes -balance 1.1 shift xyz 20 1.1 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 30, bins = 1 1 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton off, size, history - pair build: half/size/bin/newtoff - stencil: half/bin/3d/newtoff - bin: standard -fix bal all balance 10000 1.1 shift xyz 20 1.01 - -####################### Options specific to pouring ######################### - -# insertion region for fix/pour - -region insreg cylinder z ${xc} ${yc} 10 30 50 side in units box -region insreg cylinder z 25 ${yc} 10 30 50 side in units box -region insreg cylinder z 25 25 10 30 50 side in units box - -# define cone and cylinder regions - see lammps doc on region command -# note new open options - -region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 #Top is open -region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 0 10 side in units box open 2 - -region conereg cone z ${xc} ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 #Bottom and top are open -region conereg cone z 25 ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 10 ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 10 50 side in units box open 1 open 2 - -region hopreg union 2 conereg cylreg - -fix grav all gravity ${gravity} vector 0 0 -1 -fix grav all gravity 1 vector 0 0 -1 -fix 1 all nve/sphere - - -fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg - -fix ins all pour 2000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 ${dhi} dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 1 -Particle insertion: 3000 every 59965 steps, 2000 by step 1 - -#dump 1 all custom ${dumpfreq} ${name}.dump # id type mass diameter x y z - -#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 3.0 # box no 0.0 axes no 0.0 0.0 -#dump_modify 2 pad 6 - -thermo_style custom step cpu atoms ke -WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:705) -thermo_modify flush yes lost warn - -# Initial run to fill up the cone - -run 20000 -Per MPI rank memory allocation (min/avg/max) = 6.649 | 6.649 | 6.649 Mbytes -Step CPU Atoms KinEng - 0 0 0 -0 - 1000 0.63593698 2000 -0 - 2000 1.0282419 2000 -0 - 3000 1.4184453 2000 -0 - 4000 1.8055785 2000 -0 - 5000 2.1941335 2000 -0 - 6000 2.5804653 2000 -0 - 7000 2.9660621 2000 -0 - 8000 3.3506265 2000 -0 - 9000 3.7344413 2000 -0 - 10000 4.1212304 2000 -0 - 11000 4.5044594 2000 -0 - 12000 4.8875456 2000 -0 - 13000 5.2698007 2000 -0 - 14000 5.6527214 2000 -0 - 15000 6.0349295 2000 -0 - 16000 6.4172938 2000 -0 - 17000 6.8001184 2000 -0 - 18000 7.1826644 2000 -0 - 19000 7.5654378 2000 -0 - 20000 7.9511659 2000 -0 -Loop time of 7.95118 on 1 procs for 20000 steps with 2000 atoms - -99.8% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.6189 | 0.6189 | 0.6189 | 0.0 | 7.78 -Neigh | 0.09361 | 0.09361 | 0.09361 | 0.0 | 1.18 -Comm | 0.016098 | 0.016098 | 0.016098 | 0.0 | 0.20 -Output | 0.00048828 | 0.00048828 | 0.00048828 | 0.0 | 0.01 -Modify | 6.9973 | 6.9973 | 6.9973 | 0.0 | 88.00 -Other | | 0.2248 | | | 2.83 - -Nlocal: 2000 ave 2000 max 2000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 1537 ave 1537 max 1537 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 1537 -Ave neighs/atom = 0.7685 -Neighbor list builds = 69 -Dangerous builds = 0 -unfix ins -run 150000 -Per MPI rank memory allocation (min/avg/max) = 12.77 | 12.77 | 12.77 Mbytes -Step CPU Atoms KinEng - 20000 0 2000 6443.7665 - 21000 0.3826313 2000 6572.3531 - 22000 0.76688981 2000 6723.8376 - 23000 1.1534231 2000 6853.1812 - 24000 1.5391715 2000 6976.0209 - 25000 1.9263508 2000 7096.9955 - 26000 2.3168406 2000 7215.5795 - 27000 2.7065961 2000 7349.2382 - 28000 3.096664 2000 7471.8719 - 29000 3.4905531 2000 7574.8228 - 30000 3.8877606 2000 7659.3836 - 31000 4.2839894 2000 7703.6856 - 32000 4.6859732 2000 7644.279 - 33000 5.0932801 2000 7526.6944 - 34000 5.5045564 2000 7370.0821 - 35000 5.9206297 2000 7193.0457 - 36000 6.343729 2000 6990.9899 - 37000 6.7719142 2000 6849.2841 - 38000 7.2016783 2000 6701.7433 - 39000 7.6354482 2000 6538.9557 - 40000 8.078445 2000 6381.9346 - 41000 8.5191586 2000 6217.5253 - 42000 8.9630713 2000 6093.5344 - 43000 9.4097741 2000 5943.0479 - 44000 9.8652256 2000 5841.0782 - 45000 10.331057 2000 5652.8319 - 46000 10.803253 2000 5476.1466 - 47000 11.278766 2000 5267.7855 - 48000 11.759121 2000 5131.4036 - 49000 12.248896 2000 4972.7696 - 50000 12.747719 2000 4867.0868 - 51000 13.246704 2000 4681.897 - 52000 13.757842 2000 4506.8185 - 53000 14.276078 2000 4346.8045 - 54000 14.795933 2000 4193.8194 - 55000 15.311241 2000 4058.2049 - 56000 15.828737 2000 3879.0325 - 57000 16.359453 2000 3696.3154 - 58000 16.905406 2000 3504.0399 - 59000 17.460454 2000 3284.6522 - 60000 18.027276 2000 3061.0727 - 61000 18.586931 2000 2874.2926 - 62000 19.158563 2000 2653.0722 - 63000 19.738442 2000 2437.4941 - 64000 20.331411 2000 2124.1876 - 65000 20.936204 2000 1864.5661 - 66000 21.547443 2000 1610.2335 - 67000 22.166888 2000 1390.0428 - 68000 22.789106 2000 1163.7679 - 69000 23.416016 2000 933.0928 - 70000 24.038879 2000 745.66667 - 71000 24.663115 2000 605.58458 - 72000 25.294193 2000 444.31183 - 73000 25.932019 2000 357.19162 - 74000 26.568184 2000 291.16762 - 75000 27.203393 2000 230.58362 - 76000 27.836079 2000 197.59502 - 77000 28.467344 2000 166.55702 - 78000 29.099997 2000 139.89052 - 79000 29.741694 2000 117.1145 - 80000 30.388097 2000 100.12353 - 81000 31.036193 2000 85.233155 - 82000 31.688463 2000 71.145302 - 83000 32.343411 2000 61.545348 - 84000 32.999346 2000 54.099358 - 85000 33.652976 2000 46.922028 - 86000 34.306931 2000 41.606645 - 87000 34.967787 2000 37.462793 - 88000 35.633721 2000 33.698298 - 89000 36.310035 2000 29.340455 - 90000 36.995441 2000 26.072122 - 91000 37.67904 2000 23.20848 - 92000 38.367699 2000 21.015862 - 93000 39.058641 2000 20.134175 - 94000 39.749342 2000 19.196075 - 95000 40.442651 2000 18.285127 - 96000 41.140177 2000 17.476411 - 97000 41.840761 2000 16.55882 - 98000 42.543845 2000 15.444541 - 99000 43.256415 2000 14.41642 - 100000 43.97382 2000 13.818738 - 101000 44.684596 2000 12.878373 - 102000 45.401082 2000 12.11804 - 103000 46.120936 2000 11.016885 - 104000 46.83935 2000 10.531044 - 105000 47.559419 2000 10.46735 - 106000 48.286016 2000 10.246007 - 107000 49.012266 2000 9.6423041 - 108000 49.74013 2000 9.3948808 - 109000 50.471961 2000 9.5178141 - 110000 51.206152 2000 9.4143884 - 111000 51.939123 2000 9.5058226 - 112000 52.673443 2000 9.6911516 - 113000 53.410485 2000 9.7756849 - 114000 54.152537 2000 9.3876232 - 115000 54.891784 2000 8.6725333 - 116000 55.631474 2000 8.6691065 - 117000 56.371762 2000 8.0156055 - 118000 57.110131 2000 7.9150786 - 119000 57.8533 2000 7.5310892 - 120000 58.599064 2000 7.2940498 - 121000 59.340753 2000 6.8347898 - 122000 60.084676 2000 6.696484 - 123000 60.826952 2000 6.7799146 - 124000 61.569413 2000 6.7901567 - 125000 62.316334 2000 6.7532108 - 126000 63.061374 2000 6.762162 - 127000 63.806385 2000 6.6317366 - 128000 64.555969 2000 6.8246399 - 129000 65.308131 2000 6.9130358 - 130000 66.060967 2000 7.1750566 - 131000 66.809725 2000 6.9507379 - 132000 67.559796 2000 6.7987445 - 133000 68.314249 2000 6.8535775 - 134000 69.065513 2000 7.0255144 - 135000 69.817604 2000 6.7381064 - 136000 70.572079 2000 6.5567748 - 137000 71.324444 2000 6.2655395 - 138000 72.079147 2000 6.1923013 - 139000 72.831323 2000 6.0958081 - 140000 73.59117 2000 5.9185709 - 141000 74.343753 2000 5.9151241 - 142000 75.096509 2000 5.4743035 - 143000 75.852151 2000 5.438642 - 144000 76.605005 2000 4.6646664 - 145000 77.357571 2000 4.6899837 - 146000 78.113125 2000 4.5357917 - 147000 78.867751 2000 4.5993842 - 148000 79.625344 2000 4.7076884 - 149000 80.37992 2000 4.8306642 - 150000 81.143175 2000 4.8282147 - 151000 81.899326 2000 4.546308 - 152000 82.658645 2000 4.6700755 - 153000 83.41837 2000 4.7557633 - 154000 84.17509 2000 4.9004538 - 155000 84.934161 2000 5.0552949 - 156000 85.695466 2000 4.0672495 - 157000 86.453115 2000 3.5819543 - 158000 87.212663 2000 3.3533477 - 159000 87.967768 2000 3.3281001 - 160000 88.729631 2000 3.0831743 - 161000 89.498983 2000 3.0519269 - 162000 90.259424 2000 3.0951675 - 163000 91.019656 2000 2.9868352 - 164000 91.776359 2000 2.9195788 - 165000 92.536374 2000 2.5637813 - 166000 93.296332 2000 2.5553272 - 167000 94.05653 2000 2.0752912 - 168000 94.814559 2000 1.9689845 - 169000 95.576005 2000 1.9117916 - 170000 96.337863 2000 1.8568914 -Loop time of 96.3379 on 1 procs for 150000 steps with 2000 atoms - -99.8% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 37.121 | 37.121 | 37.121 | 0.0 | 38.53 -Neigh | 0.8454 | 0.8454 | 0.8454 | 0.0 | 0.88 -Comm | 0.11506 | 0.11506 | 0.11506 | 0.0 | 0.12 -Output | 0.004431 | 0.004431 | 0.004431 | 0.0 | 0.00 -Modify | 56.517 | 56.517 | 56.517 | 0.0 | 58.67 -Other | | 1.735 | | | 1.80 - -Nlocal: 2000 ave 2000 max 2000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 15524 ave 15524 max 15524 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 15524 -Ave neighs/atom = 7.762 -Neighbor list builds = 388 -Dangerous builds = 0 - -# remove "plug" - need to redefine cylinder region & union - -region cylreg delete -region hopreg delete -region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 #Bottom & top are open -region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 0 10 side in units box open 1 open 2 - -region hopreg union 2 cylreg conereg - -unfix hopper3 -fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg - -run 100000 -Per MPI rank memory allocation (min/avg/max) = 18.64 | 18.64 | 18.64 Mbytes -Step CPU Atoms KinEng - 170000 0 2000 1.8568914 - 171000 0.75704765 2000 2.4011583 - 172000 1.5101345 2000 3.176628 - 173000 2.2556529 2000 4.5364486 - 174000 2.9946566 2000 6.5494125 - 175000 3.7253478 2000 9.1934319 - 176000 4.4570525 2000 12.25765 - 177000 5.1876664 2000 15.799657 - 178000 5.9178619 2000 19.982558 - 179000 6.6439464 2000 24.927165 - 180000 7.3749168 2000 30.428362 - 181000 8.1011977 2000 36.74232 - 182000 8.8207343 2000 43.820448 - 183000 9.5397925 2000 50.903222 - 184000 10.253098 2000 59.425781 - 185000 10.965505 2000 69.143119 - 186000 11.673319 2000 79.210705 - 187000 12.373966 2000 90.411346 - 188000 13.075475 2000 102.35389 - 189000 13.770632 2000 114.93888 - 190000 14.469445 2000 128.63341 - 191000 15.158381 2000 143.44526 - 192000 15.846267 2000 159.04574 - 193000 16.527754 2000 174.3114 - 194000 17.204808 2000 190.42123 - 195000 17.881059 2000 207.70459 - 196000 18.556555 2000 224.90931 - 197000 19.229818 2000 242.64914 - 198000 19.905086 2000 261.48312 - 199000 20.578518 2000 281.28308 - 200000 21.25632 2000 302.95108 - 201000 21.921347 2000 325.95534 - 202000 22.583873 2000 350.6874 - 203000 23.244724 2000 376.31773 - 204000 23.904842 2000 404.21947 - 205000 24.562788 2000 432.96116 - 206000 25.217762 2000 462.4113 - 207000 25.875814 2000 491.91207 - 208000 26.531285 2000 522.15395 - 209000 27.184766 2000 553.1024 - 210000 27.842961 2000 585.7133 - 211000 28.489339 2000 619.96357 - 212000 29.139612 2000 653.96189 - 213000 29.783866 2000 689.8027 - 214000 30.426881 2000 727.28401 - 215000 31.06706 2000 766.40354 - 216000 31.706399 2000 805.65433 - 217000 32.343033 2000 845.40981 - 218000 32.989384 2000 884.24637 - 219000 33.633664 2000 923.5998 - 220000 34.285172 2000 965.01779 - 221000 34.931959 2000 1009.1763 - 222000 35.571624 2000 1054.7789 - 223000 36.207868 2000 1101.9922 - 224000 36.836062 2000 1151.1205 - 225000 37.464514 2000 1201.3979 - 226000 38.09746 2000 1252.4054 - 227000 38.732507 1999 1296.6784 - 228000 39.371367 1997 1342.3466 - 229000 40.012553 1992 1368.8559 - 230000 40.652111 1977 1360.2259 - 231000 41.275478 1965 1340.3793 - 232000 41.892734 1953 1318.8318 - 233000 42.50588 1938 1295.5667 - 234000 43.121427 1924 1270.0641 - 235000 43.740727 1914 1258.296 - 236000 44.359241 1902 1224.3945 - 237000 44.979463 1899 1248.3905 - 238000 45.597358 1885 1206.9229 - 239000 46.210114 1875 1195.5429 - 240000 46.818148 1861 1142.6591 - 241000 47.411079 1851 1131.5523 - 242000 48.002522 1841 1116.8741 - 243000 48.594254 1830 1099.9978 - 244000 49.191798 1822 1078.6068 - 245000 49.791332 1814 1072.1498 - 246000 50.389728 1803 1020.7842 - 247000 50.984212 1794 1000.1936 - 248000 51.571047 1781 942.02462 - 249000 52.149428 1772 916.83697 - 250000 52.726202 1758 825.10751 - 251000 53.29913 1748 789.06351 - 252000 53.871912 1739 753.92258 - 253000 54.441009 1729 697.83686 - 254000 55.010203 1718 648.98541 - 255000 55.573602 1710 620.38129 - 256000 56.134709 1705 622.43466 - 257000 56.701827 1700 595.79102 - 258000 57.264463 1698 608.49223 - 259000 57.827817 1695 614.0119 - 260000 58.398994 1690 601.50438 - 261000 58.964611 1687 608.5892 - 262000 59.526765 1683 597.07884 - 263000 60.082729 1682 618.65041 - 264000 60.640105 1678 615.47784 - 265000 61.195717 1675 605.27658 - 266000 61.751087 1671 583.69853 - 267000 62.305546 1669 600.11043 - 268000 62.86105 1666 598.79807 - 269000 63.417551 1663 588.40338 - 270000 63.974486 1660 579.59387 -Loop time of 63.9745 on 1 procs for 100000 steps with 1660 atoms - -99.8% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 26.514 | 26.514 | 26.514 | 0.0 | 41.44 -Neigh | 0.60324 | 0.60324 | 0.60324 | 0.0 | 0.94 -Comm | 0.075881 | 0.075881 | 0.075881 | 0.0 | 0.12 -Output | 0.0029137 | 0.0029137 | 0.0029137 | 0.0 | 0.00 -Modify | 35.686 | 35.686 | 35.686 | 0.0 | 55.78 -Other | | 1.092 | | | 1.71 - -Nlocal: 1660 ave 1660 max 1660 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 11681 ave 11681 max 11681 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 11681 -Ave neighs/atom = 7.03675 -Neighbor list builds = 249 -Dangerous builds = 0 -Total wall time: 0:02:48 diff --git a/examples/granregion/log.27Nov18.granregion.funnel.g++.4 b/examples/granregion/log.27Nov18.granregion.funnel.g++.4 deleted file mode 100644 index 67c307d212..0000000000 --- a/examples/granregion/log.27Nov18.granregion.funnel.g++.4 +++ /dev/null @@ -1,601 +0,0 @@ -LAMMPS (27 Nov 2018) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -# pour particles into cone-shaped funnel, settle them, let them run out bottom - -variable name string funnel_pour - -thermo_modify flush yes -units si -variable PI equal 3.141592653589 -variable seed equal 14314 - -############################################### -# Geometry-related parameters -############################################### - -variable xlo equal 10 -variable xhi equal 40 -variable ylo equal 10 -variable yhi equal 40 -variable zlo equal -20 -variable zhi equal 50 - -variable xc equal 25 -variable yc equal 25 - -variable zconehi equal 50 -variable zconelo equal 10 -variable zcyllo equal 0 -variable radconelo equal 2 -variable radconehi equal 20 - -################################################ -# Particle sizes -################################################ - -variable rlo equal 0.25 -variable rhi equal 0.5 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.25 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.5 - -variable skin equal ${rhi} -variable skin equal 0.5 - -############################################### -# Granular contact parameters -############################################### - -variable coeffRes equal 0.1 -variable coeffFric equal 0.5 - -variable density equal 1.0 -variable EYoung equal 10^5 -variable Poisson equal 2.0/7.0 -variable GShear equal ${EYoung}/(2*(1+${Poisson})) -variable GShear equal 100000/(2*(1+${Poisson})) -variable GShear equal 100000/(2*(1+0.285714285714286)) - -variable gravity equal 1.0 - -variable reff equal 0.5*(${rhi}+${rlo}) -variable reff equal 0.5*(0.5+${rlo}) -variable reff equal 0.5*(0.5+0.25) -variable meff equal ${density}*4.0/3.0*${PI}*${reff}^3 -variable meff equal 1*4.0/3.0*${PI}*${reff}^3 -variable meff equal 1*4.0/3.0*3.141592653589*${reff}^3 -variable meff equal 1*4.0/3.0*3.141592653589*0.375^3 -variable min_mass equal ${density}*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*0.25 -variable max_mass equal ${density}*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*0.5 - -## Typical way to set kn, kt, etc.: -variable kn equal 4.0*${GShear}/(3*(1-${Poisson})) -variable kn equal 4.0*38888.8888888889/(3*(1-${Poisson})) -variable kn equal 4.0*38888.8888888889/(3*(1-0.285714285714286)) -variable kt equal 4.0*${GShear}/(2-${Poisson}) -variable kt equal 4.0*38888.8888888889/(2-${Poisson}) -variable kt equal 4.0*38888.8888888889/(2-0.285714285714286) - -variable a equal (-2.0*log(${coeffRes})/${PI})^2 -variable a equal (-2.0*log(0.1)/${PI})^2 -variable a equal (-2.0*log(0.1)/3.141592653589)^2 -variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*0.405284734569556)) -variable gamma_t equal ${gamma_n}*0.5 -variable gamma_t equal 903.503751814138*0.5 - -variable tcol equal ${PI}/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-903.503751814138/4.0) - -variable dt equal ${tcol}*0.05 -variable dt equal 0.00210943016014969*0.05 -timestep ${dt} -timestep 0.000105471508007485 - -############################################### -variable dumpfreq equal 1000 -variable logfreq equal 1000 - -newton off -atom_style sphere - -boundary p p f - -region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 10 ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 10 40 ${zlo} ${zhi} -region boxreg block 10 40 10 40 -20 ${zhi} -region boxreg block 10 40 10 40 -20 50 -create_box 1 boxreg -Created orthogonal box = (10 10 -20) to (40 40 50) - 1 by 1 by 4 MPI processor grid - -pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 -pair_coeff * * - -neighbor ${skin} bin -neighbor 0.5 bin -thermo ${logfreq} -thermo 1000 - -comm_style brick -comm_modify mode multi group all vel yes -balance 1.1 shift xyz 20 1.1 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 30, bins = 1 1 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton off, size, history - pair build: half/size/bin/newtoff - stencil: half/bin/3d/newtoff - bin: standard -fix bal all balance 10000 1.1 shift xyz 20 1.01 - -####################### Options specific to pouring ######################### - -# insertion region for fix/pour - -region insreg cylinder z ${xc} ${yc} 10 30 50 side in units box -region insreg cylinder z 25 ${yc} 10 30 50 side in units box -region insreg cylinder z 25 25 10 30 50 side in units box - -# define cone and cylinder regions - see lammps doc on region command -# note new open options - -region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 #Top is open -region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 0 10 side in units box open 2 - -region conereg cone z ${xc} ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 #Bottom and top are open -region conereg cone z 25 ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 10 ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 10 50 side in units box open 1 open 2 - -region hopreg union 2 conereg cylreg - -fix grav all gravity ${gravity} vector 0 0 -1 -fix grav all gravity 1 vector 0 0 -1 -fix 1 all nve/sphere - - -fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg - -fix ins all pour 2000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 ${dhi} dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 1 -Particle insertion: 3000 every 59965 steps, 2000 by step 1 - -#dump 1 all custom ${dumpfreq} ${name}.dump # id type mass diameter x y z - -#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 3.0 # box no 0.0 axes no 0.0 0.0 -#dump_modify 2 pad 6 - -thermo_style custom step cpu atoms ke -WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:705) -thermo_modify flush yes lost warn - -# Initial run to fill up the cone - -run 20000 -Per MPI rank memory allocation (min/avg/max) = 6.05 | 6.05 | 6.05 Mbytes -Step CPU Atoms KinEng - 0 0 0 -0 - 1000 0.63366675 2000 -0 - 2000 1.0221362 2000 -0 - 3000 1.3905275 2000 -0 - 4000 1.7514329 2000 -0 - 5000 2.1040537 2000 -0 - 6000 2.4468088 2000 -0 - 7000 2.7853072 2000 -0 - 8000 3.1109948 2000 -0 - 9000 3.4281557 2000 -0 - 10000 3.7435207 2000 -0 - 11000 3.8612552 2000 -0 - 12000 3.9786677 2000 -0 - 13000 4.0988154 2000 -0 - 14000 4.2249811 2000 -0 - 15000 4.3562138 2000 -0 - 16000 4.4940333 2000 -0 - 17000 4.6394637 2000 -0 - 18000 4.7909062 2000 -0 - 19000 4.9482198 2000 -0 - 20000 5.1116607 2000 -0 -Loop time of 5.11176 on 4 procs for 20000 steps with 2000 atoms - -97.4% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.050997 | 0.14884 | 0.36048 | 32.0 | 2.91 -Neigh | 0.01374 | 0.025199 | 0.043743 | 7.0 | 0.49 -Comm | 0.063387 | 0.1781 | 0.29748 | 22.6 | 3.48 -Output | 0.0016627 | 0.0060938 | 0.015082 | 6.8 | 0.12 -Modify | 1.1198 | 1.987 | 3.7195 | 72.6 | 38.87 -Other | | 2.767 | | | 54.12 - -Nlocal: 500 ave 505 max 493 min -Histogram: 1 0 0 0 0 1 0 1 0 1 -Nghost: 159.25 ave 254 max 71 min -Histogram: 1 0 0 1 0 1 0 0 0 1 -Neighs: 397.5 ave 616 max 214 min -Histogram: 1 0 1 0 0 0 1 0 0 1 - -Total # of neighbors = 1590 -Ave neighs/atom = 0.795 -Neighbor list builds = 69 -Dangerous builds = 0 -unfix ins -run 150000 -Per MPI rank memory allocation (min/avg/max) = 12.37 | 12.51 | 12.7 Mbytes -Step CPU Atoms KinEng - 20000 0 2000 6443.7665 - 21000 0.11261106 2000 6572.3531 - 22000 0.23091817 2000 6723.8376 - 23000 0.35577631 2000 6853.1812 - 24000 0.48790455 2000 6976.0209 - 25000 0.63509274 2000 7096.9955 - 26000 0.78251743 2000 7215.5795 - 27000 0.93707466 2000 7349.2382 - 28000 1.1032445 2000 7471.8719 - 29000 1.2721858 2000 7574.8228 - 30000 1.449265 2000 7659.3836 - 31000 1.5742557 2000 7703.6856 - 32000 1.7076068 2000 7644.279 - 33000 1.8527873 2000 7526.6944 - 34000 2.009855 2000 7370.0821 - 35000 2.1766446 2000 7193.0459 - 36000 2.3557482 2000 6990.9912 - 37000 2.5468907 2000 6849.286 - 38000 2.7480681 2000 6701.7548 - 39000 2.9574037 2000 6538.6915 - 40000 3.1807711 2000 6382.3209 - 41000 3.3486595 2000 6216.424 - 42000 3.5162592 2000 6091.29 - 43000 3.687057 2000 5945.3256 - 44000 3.8662596 2000 5840.875 - 45000 4.0557241 2000 5649.763 - 46000 4.2541051 2000 5476.2837 - 47000 4.4571214 2000 5277.0701 - 48000 4.6628008 2000 5123.9796 - 49000 4.8686502 2000 4968.3344 - 50000 5.0788848 2000 4869.5754 - 51000 5.2552598 2000 4704.8517 - 52000 5.4428713 2000 4522.8978 - 53000 5.6520596 2000 4393.8047 - 54000 5.8613031 2000 4235.438 - 55000 6.0776098 2000 4082.3073 - 56000 6.2998042 2000 3901.0483 - 57000 6.5321434 2000 3718.0882 - 58000 6.7745438 2000 3504.621 - 59000 7.0237701 2000 3285.7484 - 60000 7.2791855 2000 3047.3386 - 61000 7.489058 2000 2875.4032 - 62000 7.7044094 2000 2647.83 - 63000 7.9194827 2000 2396.5343 - 64000 8.1429474 2000 2107.2113 - 65000 8.3745618 2000 1858.1977 - 66000 8.610673 2000 1615.8096 - 67000 8.8505244 2000 1416.5065 - 68000 9.0955915 2000 1206.8534 - 69000 9.3609676 2000 953.93974 - 70000 9.6382594 2000 766.9148 - 71000 9.8719468 2000 611.45063 - 72000 10.095534 2000 464.94805 - 73000 10.317962 2000 364.31415 - 74000 10.547287 2000 298.77524 - 75000 10.764052 2000 245.73022 - 76000 10.978769 2000 207.8035 - 77000 11.199921 2000 179.1305 - 78000 11.410296 2000 151.21032 - 79000 11.624499 2000 124.49675 - 80000 11.849562 2000 106.71504 - 81000 12.077449 2000 93.299034 - 82000 12.306904 2000 81.220408 - 83000 12.539016 2000 67.383955 - 84000 12.773108 2000 57.287165 - 85000 13.009487 2000 49.255887 - 86000 13.252544 2000 44.082536 - 87000 13.502564 2000 40.193574 - 88000 13.747198 2000 36.903867 - 89000 13.993028 2000 33.55332 - 90000 14.240036 2000 30.730912 - 91000 14.472719 2000 28.650574 - 92000 14.708542 2000 26.377609 - 93000 14.948106 2000 24.433165 - 94000 15.186653 2000 22.933076 - 95000 15.428022 2000 22.31788 - 96000 15.676323 2000 20.829124 - 97000 15.916326 2000 19.401354 - 98000 16.160197 2000 18.943699 - 99000 16.404796 2000 17.690599 - 100000 16.659731 2000 17.215943 - 101000 16.904498 2000 15.948087 - 102000 17.150993 2000 15.140324 - 103000 17.39584 2000 14.885674 - 104000 17.643707 2000 14.414752 - 105000 17.889343 2000 14.270676 - 106000 18.136159 2000 13.943799 - 107000 18.383653 2000 13.840145 - 108000 18.630952 2000 12.826341 - 109000 18.878218 2000 12.209012 - 110000 19.125558 2000 11.916194 - 111000 19.3726 2000 11.970849 - 112000 19.621494 2000 11.56909 - 113000 19.869978 2000 11.390562 - 114000 20.123402 2000 11.276545 - 115000 20.370963 2000 11.171298 - 116000 20.619975 2000 11.686225 - 117000 20.869585 2000 11.379805 - 118000 21.118875 2000 10.539511 - 119000 21.36837 2000 10.064595 - 120000 21.629511 2000 10.003722 - 121000 21.877867 2000 9.6974586 - 122000 22.127922 2000 9.7156209 - 123000 22.378215 2000 9.615256 - 124000 22.630463 2000 8.8979008 - 125000 22.882154 2000 8.2220003 - 126000 23.135763 2000 8.3153866 - 127000 23.392389 2000 8.0945497 - 128000 23.645521 2000 7.8942467 - 129000 23.89965 2000 7.4794776 - 130000 24.153195 2000 7.3635341 - 131000 24.406239 2000 7.5757743 - 132000 24.66016 2000 7.7047492 - 133000 24.914093 2000 8.0142133 - 134000 25.173429 2000 8.1716714 - 135000 25.433318 2000 7.7803343 - 136000 25.692997 2000 6.3545482 - 137000 25.947787 2000 6.313769 - 138000 26.200427 2000 6.4948596 - 139000 26.452514 2000 6.6183259 - 140000 26.714963 2000 6.7922281 - 141000 26.968235 2000 7.0752448 - 142000 27.220962 2000 7.2328717 - 143000 27.474819 2000 7.626453 - 144000 27.728029 2000 7.4576787 - 145000 27.981958 2000 7.124435 - 146000 28.236591 2000 7.2581589 - 147000 28.489842 2000 7.0622049 - 148000 28.744432 2000 7.1672801 - 149000 28.998739 2000 7.3248363 - 150000 29.253511 2000 7.0092266 - 151000 29.50567 2000 6.8124438 - 152000 29.759836 2000 6.9808705 - 153000 30.015359 2000 7.1516731 - 154000 30.275488 2000 6.6245443 - 155000 30.533407 2000 5.5867165 - 156000 30.788683 2000 5.318949 - 157000 31.043126 2000 5.1195805 - 158000 31.297011 2000 5.2045485 - 159000 31.551327 2000 5.24992 - 160000 31.807728 2000 5.3270577 - 161000 32.061371 2000 4.995281 - 162000 32.315467 2000 5.0755874 - 163000 32.57628 2000 5.0788135 - 164000 32.83119 2000 4.5917317 - 165000 33.085634 2000 4.6255452 - 166000 33.344148 2000 4.2563299 - 167000 33.599342 2000 3.3808566 - 168000 33.853488 2000 3.218931 - 169000 34.121464 2000 3.0839289 - 170000 34.378727 2000 3.0358838 -Loop time of 34.3788 on 4 procs for 150000 steps with 2000 atoms - -98.5% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 6.5861 | 10.058 | 12.152 | 68.4 | 29.26 -Neigh | 0.17612 | 0.25274 | 0.30005 | 9.2 | 0.74 -Comm | 1.5024 | 2.6626 | 3.4174 | 44.9 | 7.74 -Output | 0.006542 | 0.019532 | 0.046425 | 11.5 | 0.06 -Modify | 11.945 | 14.674 | 16.29 | 42.7 | 42.68 -Other | | 6.711 | | | 19.52 - -Nlocal: 500 ave 508 max 489 min -Histogram: 1 0 0 1 0 0 0 0 0 2 -Nghost: 446.75 ave 708 max 191 min -Histogram: 1 0 0 1 0 1 0 0 0 1 -Neighs: 4498 ave 5441 max 3786 min -Histogram: 1 1 0 0 0 0 1 0 0 1 - -Total # of neighbors = 17992 -Ave neighs/atom = 8.996 -Neighbor list builds = 403 -Dangerous builds = 0 - -# remove "plug" - need to redefine cylinder region & union - -region cylreg delete -region hopreg delete -region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 #Bottom & top are open -region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 0 10 side in units box open 1 open 2 - -region hopreg union 2 cylreg conereg - -unfix hopper3 -fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg - -run 100000 -Per MPI rank memory allocation (min/avg/max) = 13.68 | 15.35 | 16.59 Mbytes -Step CPU Atoms KinEng - 170000 0 2000 3.0358838 - 171000 0.25455499 2000 3.7725185 - 172000 0.50768304 2000 4.727285 - 173000 0.76122355 2000 5.9840449 - 174000 1.0141416 2000 8.0335022 - 175000 1.2750733 2000 10.177259 - 176000 1.5277736 2000 13.655163 - 177000 1.7810826 2000 17.987975 - 178000 2.0348532 2000 23.266471 - 179000 2.2915859 2000 29.266364 - 180000 2.547174 2000 35.84089 - 181000 2.8009758 2000 43.130989 - 182000 3.0531759 2000 51.177142 - 183000 3.3130636 2000 60.031831 - 184000 3.5651338 2000 69.52374 - 185000 3.8185399 2000 79.941907 - 186000 4.070199 2000 91.195382 - 187000 4.3204038 2000 102.1696 - 188000 4.5699775 2000 112.73657 - 189000 4.8184452 2000 123.57252 - 190000 5.0653601 2000 135.59942 - 191000 5.3119307 2000 147.37757 - 192000 5.5574484 2000 159.12931 - 193000 5.8029084 2000 170.90271 - 194000 6.0463562 2000 185.71189 - 195000 6.2883332 2000 201.83733 - 196000 6.5281694 2000 218.30785 - 197000 6.7682493 2000 236.05694 - 198000 7.0084231 2000 255.23099 - 199000 7.2519951 2000 273.94566 - 200000 7.5010133 2000 293.91107 - 201000 7.7396591 2000 316.52142 - 202000 7.9784184 2000 340.91391 - 203000 8.224021 2000 364.81801 - 204000 8.4597676 2000 390.06478 - 205000 8.6934731 2000 415.90918 - 206000 8.9342225 2000 441.0995 - 207000 9.1714027 2000 467.40314 - 208000 9.4081488 2000 494.93631 - 209000 9.6457636 2000 524.70539 - 210000 9.8831718 2000 556.52058 - 211000 10.118018 2000 589.36821 - 212000 10.3541 2000 622.6887 - 213000 10.587226 2000 657.05888 - 214000 10.820744 2000 691.14292 - 215000 11.055785 2000 726.94959 - 216000 11.298702 2000 762.92802 - 217000 11.534793 2000 801.23648 - 218000 11.769849 2000 841.1559 - 219000 12.000917 2000 882.4342 - 220000 12.232812 2000 924.8466 - 221000 12.461166 2000 968.86229 - 222000 12.698451 2000 1013.1381 - 223000 12.930287 2000 1058.2988 - 224000 13.172862 2000 1105.2911 - 225000 13.405001 2000 1152.8617 - 226000 13.633187 1999 1197.6777 - 227000 13.857126 1998 1243.1211 - 228000 14.079622 1992 1262.1402 - 229000 14.303362 1987 1281.9162 - 230000 14.530392 1973 1264.0674 - 231000 14.756486 1964 1277.8347 - 232000 14.984495 1953 1266.7926 - 233000 15.213102 1940 1244.0038 - 234000 15.441666 1925 1206.4472 - 235000 15.667547 1914 1193.33 - 236000 15.895047 1901 1160.4096 - 237000 16.120833 1890 1141.6816 - 238000 16.346628 1883 1149.1584 - 239000 16.573303 1877 1141.7514 - 240000 16.801035 1871 1146.8662 - 241000 17.024775 1866 1152.561 - 242000 17.248651 1858 1148.2529 - 243000 17.47241 1847 1114.7239 - 244000 17.70222 1832 1070.9996 - 245000 17.926477 1824 1066.7549 - 246000 18.157588 1813 1027.1865 - 247000 18.378868 1804 1011.5024 - 248000 18.599988 1797 993.10451 - 249000 18.819007 1787 951.89778 - 250000 19.044634 1777 926.30475 - 251000 19.254408 1764 875.07091 - 252000 19.465788 1755 824.89358 - 253000 19.676327 1742 742.51957 - 254000 19.887648 1731 708.30958 - 255000 20.094912 1722 690.09761 - 256000 20.299963 1713 638.00218 - 257000 20.506153 1705 596.86839 - 258000 20.713994 1701 583.71937 - 259000 20.919755 1691 549.0049 - 260000 21.123122 1688 549.4278 - 261000 21.332215 1684 535.35719 - 262000 21.533673 1682 546.74031 - 263000 21.737042 1678 532.69324 - 264000 21.941306 1676 537.89254 - 265000 22.15135 1676 559.50898 - 266000 22.358371 1670 540.21452 - 267000 22.563236 1668 557.19857 - 268000 22.764648 1665 569.52869 - 269000 22.96391 1658 543.77057 - 270000 23.172415 1656 550.23716 -Loop time of 23.1725 on 4 procs for 100000 steps with 1656 atoms - -98.5% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 3.3849 | 7.3002 | 10.192 | 91.3 | 31.50 -Neigh | 0.14271 | 0.16781 | 0.19054 | 4.5 | 0.72 -Comm | 1.086 | 1.9721 | 2.6157 | 42.7 | 8.51 -Output | 0.0018437 | 0.013918 | 0.041359 | 13.5 | 0.06 -Modify | 8.6598 | 9.3198 | 9.8874 | 16.6 | 40.22 -Other | | 4.399 | | | 18.98 - -Nlocal: 414 ave 454 max 385 min -Histogram: 2 0 0 0 0 0 1 0 0 1 -Nghost: 395.25 ave 645 max 157 min -Histogram: 1 0 0 1 0 1 0 0 0 1 -Neighs: 3498.5 ave 4524 max 2034 min -Histogram: 1 0 0 0 1 0 0 0 0 2 - -Total # of neighbors = 13994 -Ave neighs/atom = 8.45048 -Neighbor list builds = 240 -Dangerous builds = 0 -Total wall time: 0:01:02 diff --git a/examples/granregion/log.27Nov18.granregion.mixer.g++.1 b/examples/granregion/log.27Nov18.granregion.mixer.g++.1 deleted file mode 100644 index f2ba9d7122..0000000000 --- a/examples/granregion/log.27Nov18.granregion.mixer.g++.1 +++ /dev/null @@ -1,602 +0,0 @@ -LAMMPS (27 Nov 2018) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -variable name string mixer - -thermo_modify flush yes -variable seed equal 14314 - -############################################### -# Particle parameters -################################################ - -variable rlo equal 0.3 -variable rhi equal 0.6 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.3 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.6 -variable skin equal ${rhi} -variable skin equal 0.6 - -variable coeffRes equal 0.1 -variable coeffFric equal 0.5 - -variable kn equal 10^5 -variable kt equal 0.2*${kn} -variable kt equal 0.2*100000 - -variable gravity equal 1.0 -variable density equal 1.0 - -variable min_mass equal ${density}*4.0/3.0*PI*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*0.3 -variable a equal (-2.0*log(${coeffRes})/PI)^2 -variable a equal (-2.0*log(0.1)/PI)^2 -variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*0.405284734569351)) -variable gamma_t equal ${gamma_n}*0.5 -variable gamma_t equal 806.699778405191*0.5 - -variable tcol equal PI/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/${min_mass}-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/0.113097335529233-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/0.113097335529233-806.699778405191/4.0) - -variable dt equal ${tcol}*0.02 -variable dt equal 0.00236257621510454*0.02 -timestep ${dt} -timestep 4.72515243020908e-05 - -############################################### - -variable dumpfreq equal 1000 -variable logfreq equal 1000 - -newton on -atom_style sphere - -boundary p p f - -region boxreg block 0 20 0 20 0 20 -create_box 1 boxreg -Created orthogonal box = (0 0 0) to (20 20 20) - 1 by 1 by 1 MPI processor grid - -pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 -pair_coeff * * - -neighbor ${skin} bin -neighbor 0.6 bin -thermo ${logfreq} -thermo 1000 - -comm_style brick -comm_modify mode multi group all vel yes -balance 1.1 shift xyz 20 1.1 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 20, bins = 1 1 1 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton on, size, history - pair build: half/size/bin/newton - stencil: half/bin/3d/newton - bin: standard -fix bal all balance 10000 1.1 shift xyz 20 1.01 - -####################### Options specific to pouring ######################### - -region insreg cylinder z 10 10 8 10 18 side in units box -region cylreg cylinder z 10 10 10 0 20 side in units box - -variable theta equal (step/400000)*2*PI - -region b1 block 2 18 9 11 0 4 side out rotate v_theta 10 10 0 0 0 1 units box -region b2 block 9 11 2 18 0 3.99999 side out rotate v_theta 10 10 0 0 0 1 units box - -region mixer intersect 3 cylreg b1 b2 side in - -fix grav all gravity ${gravity} vector 0 0 -1 -fix grav all gravity 1 vector 0 0 -1 -fix 1 all nve/sphere - -fix mixwall all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 region mixer - -fix ins all pour 1000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 ${dhi} dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 1 -Particle insertion: 444 every 84653 steps, 1000 by step 169307 - -#dump 1 all custom ${dumpfreq} ${name}_pour.dump # id type mass diameter x y z - -#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 1.5 # box no 0.0 axes no 0.0 0.0 -#dump_modify 2 pad 6 - -thermo_style custom step cpu atoms ke v_theta -WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:705) -thermo_modify flush yes lost warn - -run 200000 -Per MPI rank memory allocation (min/avg/max) = 5.862 | 5.862 | 5.862 Mbytes -Step CPU Atoms KinEng v_theta - 0 0 0 -0 0 - 1000 0.15327144 444 -0 0.015707963 - 2000 0.30070925 444 -0 0.031415927 - 3000 0.44653535 444 -0 0.04712389 - 4000 0.59226131 444 -0 0.062831853 - 5000 0.73794818 444 -0 0.078539816 - 6000 0.88327622 444 -0 0.09424778 - 7000 1.0286083 444 -0 0.10995574 - 8000 1.1740625 444 -0 0.12566371 - 9000 1.3224797 444 -0 0.14137167 - 10000 1.4717772 444 -0 0.15707963 - 11000 1.6204555 444 -0 0.1727876 - 12000 1.7690799 444 -0 0.18849556 - 13000 1.918304 444 -0 0.20420352 - 14000 2.0670426 444 -0 0.21991149 - 15000 2.2157068 444 -0 0.23561945 - 16000 2.3642888 444 -0 0.25132741 - 17000 2.5129776 444 -0 0.26703538 - 18000 2.6614521 444 -0 0.28274334 - 19000 2.8100598 444 -0 0.2984513 - 20000 2.9591351 444 -0 0.31415927 - 21000 3.1073661 444 -0 0.32986723 - 22000 3.2557554 444 -0 0.34557519 - 23000 3.4041324 444 -0 0.36128316 - 24000 3.5526814 444 -0 0.37699112 - 25000 3.700824 444 -0 0.39269908 - 26000 3.8496137 444 -0 0.40840704 - 27000 3.9986103 444 -0 0.42411501 - 28000 4.1475384 444 -0 0.43982297 - 29000 4.2963772 444 -0 0.45553093 - 30000 4.4454341 444 -0 0.4712389 - 31000 4.5942066 444 -0 0.48694686 - 32000 4.7434044 444 -0 0.50265482 - 33000 4.893549 444 -0 0.51836279 - 34000 5.0427935 444 -0 0.53407075 - 35000 5.1920972 444 -0 0.54977871 - 36000 5.3411844 444 -0 0.56548668 - 37000 5.4904606 444 -0 0.58119464 - 38000 5.6397707 444 -0 0.5969026 - 39000 5.7900345 444 -0 0.61261057 - 40000 5.9405882 444 -0 0.62831853 - 41000 6.089345 444 -0 0.64402649 - 42000 6.2388933 444 -0 0.65973446 - 43000 6.3888056 444 -0 0.67544242 - 44000 6.5379841 444 -0 0.69115038 - 45000 6.6875141 444 -0 0.70685835 - 46000 6.8370855 444 -0 0.72256631 - 47000 6.9866009 444 -0 0.73827427 - 48000 7.1364653 444 -0 0.75398224 - 49000 7.2859883 444 -0 0.7696902 - 50000 7.4368248 444 -0 0.78539816 - 51000 7.5870779 444 -0 0.80110613 - 52000 7.7370813 444 -0 0.81681409 - 53000 7.8879561 444 -0 0.83252205 - 54000 8.0383027 444 -0 0.84823002 - 55000 8.1916294 444 -0 0.86393798 - 56000 8.3458471 444 -0 0.87964594 - 57000 8.5010631 444 -0 0.89535391 - 58000 8.6560545 444 -0 0.91106187 - 59000 8.8110209 444 -0 0.92676983 - 60000 8.9674675 444 -0 0.9424778 - 61000 9.1231239 444 -0 0.95818576 - 62000 9.2785382 444 -0 0.97389372 - 63000 9.4343674 444 -0 0.98960169 - 64000 9.5911541 444 -0 1.0053096 - 65000 9.7477772 444 -0 1.0210176 - 66000 9.9050307 444 -0 1.0367256 - 67000 10.063978 444 -0 1.0524335 - 68000 10.221835 444 -0 1.0681415 - 69000 10.37944 444 -0 1.0838495 - 70000 10.537409 444 -0 1.0995574 - 71000 10.695649 444 -0 1.1152654 - 72000 10.85453 444 -0 1.1309734 - 73000 11.013438 444 -0 1.1466813 - 74000 11.172689 444 -0 1.1623893 - 75000 11.332172 444 -0 1.1780972 - 76000 11.492824 444 -0 1.1938052 - 77000 11.653915 444 -0 1.2095132 - 78000 11.815798 444 -0 1.2252211 - 79000 11.97868 444 -0 1.2409291 - 80000 12.141392 444 -0 1.2566371 - 81000 12.30536 444 -0 1.272345 - 82000 12.468797 444 -0 1.288053 - 83000 12.633028 444 -0 1.303761 - 84000 12.797936 444 -0 1.3194689 - 85000 13.019726 888 -0 1.3351769 - 86000 13.333436 888 -0 1.3508848 - 87000 13.648179 888 -0 1.3665928 - 88000 13.962435 888 -0 1.3823008 - 89000 14.276158 888 -0 1.3980087 - 90000 14.590669 888 -0 1.4137167 - 91000 14.904268 888 -0 1.4294247 - 92000 15.216788 888 -0 1.4451326 - 93000 15.529868 888 -0 1.4608406 - 94000 15.843157 888 -0 1.4765485 - 95000 16.156564 888 -0 1.4922565 - 96000 16.469569 888 -0 1.5079645 - 97000 16.784048 888 -0 1.5236724 - 98000 17.100451 888 -0 1.5393804 - 99000 17.416338 888 -0 1.5550884 - 100000 17.733482 888 -0 1.5707963 - 101000 18.052522 888 -0 1.5865043 - 102000 18.371428 888 -0 1.6022123 - 103000 18.690222 888 -0 1.6179202 - 104000 19.009665 888 -0 1.6336282 - 105000 19.328189 888 -0 1.6493361 - 106000 19.647804 888 -0 1.6650441 - 107000 19.96805 888 -0 1.6807521 - 108000 20.286857 888 -0 1.69646 - 109000 20.607965 888 -0 1.712168 - 110000 20.931749 888 -0 1.727876 - 111000 21.251903 888 -0 1.7435839 - 112000 21.572158 888 -0 1.7592919 - 113000 21.892612 888 -0 1.7749998 - 114000 22.214408 888 -0 1.7907078 - 115000 22.535498 888 -0 1.8064158 - 116000 22.856752 888 -0 1.8221237 - 117000 23.178885 888 -0 1.8378317 - 118000 23.501127 888 -0 1.8535397 - 119000 23.8241 888 -0 1.8692476 - 120000 24.147258 888 -0 1.8849556 - 121000 24.472969 888 -0 1.9006636 - 122000 24.799108 888 -0 1.9163715 - 123000 25.125275 888 -0 1.9320795 - 124000 25.453866 888 -0 1.9477874 - 125000 25.784766 888 -0 1.9634954 - 126000 26.117013 888 -0 1.9792034 - 127000 26.448734 888 -0 1.9949113 - 128000 26.780032 888 -0 2.0106193 - 129000 27.113678 888 -0 2.0263273 - 130000 27.450001 888 -0 2.0420352 - 131000 27.782047 888 -0 2.0577432 - 132000 28.114287 888 -0 2.0734512 - 133000 28.446648 888 -0 2.0891591 - 134000 28.780438 888 -0 2.1048671 - 135000 29.116443 888 -0 2.120575 - 136000 29.451848 888 -0 2.136283 - 137000 29.787778 888 -0 2.151991 - 138000 30.12804 888 -0 2.1676989 - 139000 30.46814 888 -0 2.1834069 - 140000 30.808946 888 -0 2.1991149 - 141000 31.147584 888 -0 2.2148228 - 142000 31.486475 888 -0 2.2305308 - 143000 31.826754 888 -0 2.2462387 - 144000 32.165796 888 -0 2.2619467 - 145000 32.506074 888 -0 2.2776547 - 146000 32.847604 888 -0 2.2933626 - 147000 33.188988 888 -0 2.3090706 - 148000 33.532869 888 -0 2.3247786 - 149000 33.876629 888 -0 2.3404865 - 150000 34.221172 888 -0 2.3561945 - 151000 34.562559 888 -0 2.3719025 - 152000 34.904679 888 -0 2.3876104 - 153000 35.247727 888 -0 2.4033184 - 154000 35.591228 888 -0 2.4190263 - 155000 35.949192 888 -0 2.4347343 - 156000 36.320157 888 -0 2.4504423 - 157000 36.693571 888 -0 2.4661502 - 158000 37.069463 888 -0 2.4818582 - 159000 37.44221 888 -0 2.4975662 - 160000 37.81863 888 -0 2.5132741 - 161000 38.195121 888 -0 2.5289821 - 162000 38.573424 888 -0 2.54469 - 163000 38.950044 888 -0 2.560398 - 164000 39.331977 888 -0 2.576106 - 165000 39.714367 888 -0 2.5918139 - 166000 40.097099 888 -0 2.6075219 - 167000 40.477443 888 -0 2.6232299 - 168000 40.860404 888 -0 2.6389378 - 169000 41.244357 888 -0 2.6546458 - 170000 41.658126 1000 -0 2.6703538 - 171000 42.082517 1000 -0 2.6860617 - 172000 42.507502 1000 -0 2.7017697 - 173000 42.93363 1000 -0 2.7174776 - 174000 43.361133 1000 -0 2.7331856 - 175000 43.792381 1000 -0 2.7488936 - 176000 44.223827 1000 -0 2.7646015 - 177000 44.656581 1000 -0 2.7803095 - 178000 45.087615 1000 -0 2.7960175 - 179000 45.521129 1000 -0 2.8117254 - 180000 45.957808 1000 -0 2.8274334 - 181000 46.391451 1000 -0 2.8431414 - 182000 46.825486 1000 -0 2.8588493 - 183000 47.26091 1000 -0 2.8745573 - 184000 47.694263 1000 -0 2.8902652 - 185000 48.123312 1000 -0 2.9059732 - 186000 48.554081 1000 -0 2.9216812 - 187000 48.982617 1000 -0 2.9373891 - 188000 49.414355 1000 -0 2.9530971 - 189000 49.84753 1000 -0 2.9688051 - 190000 50.284462 1000 -0 2.984513 - 191000 50.71899 1000 -0 3.000221 - 192000 51.157278 1000 -0 3.0159289 - 193000 51.586171 1000 -0 3.0316369 - 194000 52.011691 1000 -0 3.0473449 - 195000 52.437732 1000 -0 3.0630528 - 196000 52.863703 1000 -0 3.0787608 - 197000 53.290403 1000 -0 3.0944688 - 198000 53.7191 1000 -0 3.1101767 - 199000 54.147195 1000 -0 3.1258847 - 200000 54.575967 1000 -0 3.1415927 -Loop time of 54.576 on 1 procs for 200000 steps with 1000 atoms - -Performance: 14960.907 tau/day, 3664.615 timesteps/s -98.9% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 3.7989 | 3.7989 | 3.7989 | 0.0 | 6.96 -Neigh | 0.067629 | 0.067629 | 0.067629 | 0.0 | 0.12 -Comm | 0.63734 | 0.63734 | 0.63734 | 0.0 | 1.17 -Output | 0.0049303 | 0.0049303 | 0.0049303 | 0.0 | 0.01 -Modify | 49.1 | 49.1 | 49.1 | 0.0 | 89.97 -Other | | 0.9668 | | | 1.77 - -Nlocal: 1000 ave 1000 max 1000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 196 ave 196 max 196 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 3910 ave 3910 max 3910 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 3910 -Ave neighs/atom = 3.91 -Neighbor list builds = 219 -Dangerous builds = 0 -unfix ins -run 200000 -Per MPI rank memory allocation (min/avg/max) = 12.65 | 12.65 | 12.65 Mbytes -Step CPU Atoms KinEng v_theta - 200000 0 1000 0.93873133 3.1415927 - 201000 0.4261198 1000 0.93239566 3.1573006 - 202000 0.84928846 1000 0.90333835 3.1730086 - 203000 1.2720087 1000 0.89351493 3.1887165 - 204000 1.6929317 1000 0.87648478 3.2044245 - 205000 2.114043 1000 0.86818482 3.2201325 - 206000 2.5357664 1000 0.86033251 3.2358404 - 207000 2.9579847 1000 0.85442625 3.2515484 - 208000 3.3812878 1000 0.8517451 3.2672564 - 209000 3.8124611 1000 0.84406987 3.2829643 - 210000 4.2440236 1000 0.83964642 3.2986723 - 211000 4.6781921 1000 0.82994066 3.3143802 - 212000 5.1116509 1000 0.82908369 3.3300882 - 213000 5.5468135 1000 0.83115482 3.3457962 - 214000 5.9802556 1000 0.82680518 3.3615041 - 215000 6.4107294 1000 0.8223909 3.3772121 - 216000 6.8419023 1000 0.81872537 3.3929201 - 217000 7.2763367 1000 0.82446065 3.408628 - 218000 7.7160695 1000 0.82278874 3.424336 - 219000 8.1540956 1000 0.83017397 3.440044 - 220000 8.5917952 1000 0.82232305 3.4557519 - 221000 9.0296218 1000 0.82584132 3.4714599 - 222000 9.4719794 1000 0.82143909 3.4871678 - 223000 9.9180939 1000 0.82925587 3.5028758 - 224000 10.361852 1000 0.84546265 3.5185838 - 225000 10.803539 1000 0.84436452 3.5342917 - 226000 11.248456 1000 0.84849375 3.5499997 - 227000 11.695092 1000 0.8409057 3.5657077 - 228000 12.136044 1000 0.83139305 3.5814156 - 229000 12.579807 1000 0.83098473 3.5971236 - 230000 13.02219 1000 0.81335147 3.6128316 - 231000 13.463863 1000 0.78946649 3.6285395 - 232000 13.906293 1000 0.78807613 3.6442475 - 233000 14.348807 1000 0.79086655 3.6599554 - 234000 14.793175 1000 0.79358862 3.6756634 - 235000 15.238316 1000 0.79444252 3.6913714 - 236000 15.683342 1000 0.79392156 3.7070793 - 237000 16.12611 1000 0.80416034 3.7227873 - 238000 16.5711 1000 0.80365093 3.7384953 - 239000 17.014355 1000 0.80860323 3.7542032 - 240000 17.454467 1000 0.80245788 3.7699112 - 241000 17.89162 1000 0.79602568 3.7856191 - 242000 18.330859 1000 0.79023692 3.8013271 - 243000 18.769301 1000 0.79066782 3.8170351 - 244000 19.211293 1000 0.77671368 3.832743 - 245000 19.651443 1000 0.77121874 3.848451 - 246000 20.092102 1000 0.74658977 3.864159 - 247000 20.532732 1000 0.73825017 3.8798669 - 248000 20.975646 1000 0.7187986 3.8955749 - 249000 21.418807 1000 0.71707058 3.9112829 - 250000 21.862497 1000 0.72983635 3.9269908 - 251000 22.311832 1000 0.7355358 3.9426988 - 252000 22.75883 1000 0.74427811 3.9584067 - 253000 23.203455 1000 0.74968093 3.9741147 - 254000 23.651472 1000 0.75350303 3.9898227 - 255000 24.102152 1000 0.75617916 4.0055306 - 256000 24.554236 1000 0.74949839 4.0212386 - 257000 25.008718 1000 0.73534118 4.0369466 - 258000 25.461913 1000 0.73761942 4.0526545 - 259000 25.916674 1000 0.75485851 4.0683625 - 260000 26.373941 1000 0.77147511 4.0840704 - 261000 26.832072 1000 0.76658917 4.0997784 - 262000 27.28741 1000 0.76441563 4.1154864 - 263000 27.742157 1000 0.74449444 4.1311943 - 264000 28.192718 1000 0.7403314 4.1469023 - 265000 28.642541 1000 0.74262656 4.1626103 - 266000 29.09406 1000 0.74117022 4.1783182 - 267000 29.547747 1000 0.73877643 4.1940262 - 268000 29.998243 1000 0.75062626 4.2097342 - 269000 30.449751 1000 0.74649396 4.2254421 - 270000 30.901232 1000 0.75371324 4.2411501 - 271000 31.354755 1000 0.75254842 4.256858 - 272000 31.810717 1000 0.74245946 4.272566 - 273000 32.265754 1000 0.73056023 4.288274 - 274000 32.719719 1000 0.72004393 4.3039819 - 275000 33.173929 1000 0.70665742 4.3196899 - 276000 33.628581 1000 0.69417262 4.3353979 - 277000 34.080936 1000 0.67343474 4.3511058 - 278000 34.532053 1000 0.66922758 4.3668138 - 279000 34.985569 1000 0.66239909 4.3825218 - 280000 35.443496 1000 0.66406486 4.3982297 - 281000 35.901536 1000 0.67123654 4.4139377 - 282000 36.357765 1000 0.67660885 4.4296456 - 283000 36.811956 1000 0.6809288 4.4453536 - 284000 37.266937 1000 0.69561154 4.4610616 - 285000 37.720866 1000 0.70874512 4.4767695 - 286000 38.177032 1000 0.72957833 4.4924775 - 287000 38.633109 1000 0.72891066 4.5081855 - 288000 39.086933 1000 0.72673285 4.5238934 - 289000 39.538699 1000 0.72583062 4.5396014 - 290000 39.991294 1000 0.7209406 4.5553093 - 291000 40.437987 1000 0.70642559 4.5710173 - 292000 40.885753 1000 0.69074151 4.5867253 - 293000 41.326601 1000 0.68041469 4.6024332 - 294000 41.763719 1000 0.6712034 4.6181412 - 295000 42.198532 1000 0.66140336 4.6338492 - 296000 42.635139 1000 0.65458145 4.6495571 - 297000 43.071132 1000 0.63884999 4.6652651 - 298000 43.507309 1000 0.63182296 4.6809731 - 299000 43.943936 1000 0.6324286 4.696681 - 300000 44.383148 1000 0.62640427 4.712389 - 301000 44.819379 1000 0.62138494 4.7280969 - 302000 45.260834 1000 0.62902694 4.7438049 - 303000 45.705719 1000 0.63308052 4.7595129 - 304000 46.14622 1000 0.63266845 4.7752208 - 305000 46.586693 1000 0.63464534 4.7909288 - 306000 47.028768 1000 0.62941378 4.8066368 - 307000 47.470183 1000 0.62801025 4.8223447 - 308000 47.914518 1000 0.62291875 4.8380527 - 309000 48.365654 1000 0.62529494 4.8537606 - 310000 48.817185 1000 0.62504442 4.8694686 - 311000 49.269423 1000 0.63074915 4.8851766 - 312000 49.722869 1000 0.64292914 4.9008845 - 313000 50.175859 1000 0.65319818 4.9165925 - 314000 50.630132 1000 0.66755513 4.9323005 - 315000 51.084836 1000 0.67585436 4.9480084 - 316000 51.539391 1000 0.67676226 4.9637164 - 317000 51.995233 1000 0.67394312 4.9794244 - 318000 52.453581 1000 0.67299959 4.9951323 - 319000 52.906322 1000 0.68074615 5.0108403 - 320000 53.362206 1000 0.67696004 5.0265482 - 321000 53.813824 1000 0.67899008 5.0422562 - 322000 54.264433 1000 0.67901671 5.0579642 - 323000 54.715627 1000 0.67620354 5.0736721 - 324000 55.168 1000 0.67165541 5.0893801 - 325000 55.620891 1000 0.67820953 5.1050881 - 326000 56.073685 1000 0.67490808 5.120796 - 327000 56.526012 1000 0.67238149 5.136504 - 328000 56.977525 1000 0.66885914 5.152212 - 329000 57.431088 1000 0.66876389 5.1679199 - 330000 57.886694 1000 0.66879597 5.1836279 - 331000 58.338381 1000 0.66577546 5.1993358 - 332000 58.791084 1000 0.6602875 5.2150438 - 333000 59.242965 1000 0.65879422 5.2307518 - 334000 59.698559 1000 0.6581474 5.2464597 - 335000 60.153261 1000 0.6521249 5.2621677 - 336000 60.605605 1000 0.63371979 5.2778757 - 337000 61.059824 1000 0.62373279 5.2935836 - 338000 61.510606 1000 0.6212013 5.3092916 - 339000 61.962049 1000 0.62303395 5.3249995 - 340000 62.413564 1000 0.63183785 5.3407075 - 341000 62.86366 1000 0.64387158 5.3564155 - 342000 63.317623 1000 0.65045982 5.3721234 - 343000 63.772034 1000 0.65401192 5.3878314 - 344000 64.225206 1000 0.65181077 5.4035394 - 345000 64.681317 1000 0.64098248 5.4192473 - 346000 65.136483 1000 0.63163559 5.4349553 - 347000 65.588996 1000 0.64182161 5.4506633 - 348000 66.042215 1000 0.65528889 5.4663712 - 349000 66.501687 1000 0.66603277 5.4820792 - 350000 66.960896 1000 0.67362185 5.4977871 - 351000 67.417316 1000 0.68867905 5.5134951 - 352000 67.876742 1000 0.6907547 5.5292031 - 353000 68.336836 1000 0.69043981 5.544911 - 354000 68.797396 1000 0.68676964 5.560619 - 355000 69.255062 1000 0.68019369 5.576327 - 356000 69.711663 1000 0.66189875 5.5920349 - 357000 70.172728 1000 0.65275709 5.6077429 - 358000 70.632655 1000 0.64560617 5.6234508 - 359000 71.091165 1000 0.63865266 5.6391588 - 360000 71.548341 1000 0.6366388 5.6548668 - 361000 72.006137 1000 0.63619567 5.6705747 - 362000 72.466621 1000 0.63986167 5.6862827 - 363000 72.928505 1000 0.656198 5.7019907 - 364000 73.391876 1000 0.66522563 5.7176986 - 365000 73.852366 1000 0.67330205 5.7334066 - 366000 74.317924 1000 0.67997811 5.7491146 - 367000 74.781431 1000 0.67734915 5.7648225 - 368000 75.24363 1000 0.66811078 5.7805305 - 369000 75.704319 1000 0.67232161 5.7962384 - 370000 76.165294 1000 0.67262944 5.8119464 - 371000 76.624971 1000 0.68614241 5.8276544 - 372000 77.085918 1000 0.70293842 5.8433623 - 373000 77.544679 1000 0.71889856 5.8590703 - 374000 78.007103 1000 0.7170296 5.8747783 - 375000 78.468913 1000 0.71258031 5.8904862 - 376000 78.93354 1000 0.70758873 5.9061942 - 377000 79.39396 1000 0.69486822 5.9219022 - 378000 79.850685 1000 0.68311194 5.9376101 - 379000 80.307228 1000 0.67317549 5.9533181 - 380000 80.767418 1000 0.67691049 5.969026 - 381000 81.227579 1000 0.69231691 5.984734 - 382000 81.686924 1000 0.69998609 6.000442 - 383000 82.145783 1000 0.69328258 6.0161499 - 384000 82.604827 1000 0.69903908 6.0318579 - 385000 83.056443 1000 0.69455744 6.0475659 - 386000 83.507131 1000 0.68865933 6.0632738 - 387000 83.95695 1000 0.68630439 6.0789818 - 388000 84.404079 1000 0.6800564 6.0946897 - 389000 84.851053 1000 0.66747339 6.1103977 - 390000 85.298614 1000 0.65695883 6.1261057 - 391000 85.744507 1000 0.65659359 6.1418136 - 392000 86.191348 1000 0.65933663 6.1575216 - 393000 86.632782 1000 0.65170236 6.1732296 - 394000 87.074105 1000 0.65631817 6.1889375 - 395000 87.5177 1000 0.66205838 6.2046455 - 396000 87.963111 1000 0.65512694 6.2203535 - 397000 88.408348 1000 0.65266011 6.2360614 - 398000 88.854042 1000 0.64593806 6.2517694 - 399000 89.298754 1000 0.64940473 6.2674773 - 400000 89.745445 1000 0.66033435 6.2831853 -Loop time of 89.7455 on 1 procs for 200000 steps with 1000 atoms - -Performance: 9098.023 tau/day, 2228.525 timesteps/s -98.9% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 10.924 | 10.924 | 10.924 | 0.0 | 12.17 -Neigh | 0.10266 | 0.10266 | 0.10266 | 0.0 | 0.11 -Comm | 1.9424 | 1.9424 | 1.9424 | 0.0 | 2.16 -Output | 0.0056458 | 0.0056458 | 0.0056458 | 0.0 | 0.01 -Modify | 75.442 | 75.442 | 75.442 | 0.0 | 84.06 -Other | | 1.329 | | | 1.48 - -Nlocal: 1000 ave 1000 max 1000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 272 ave 272 max 272 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 4933 ave 4933 max 4933 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 4933 -Ave neighs/atom = 4.933 -Neighbor list builds = 171 -Dangerous builds = 0 -Total wall time: 0:02:24 diff --git a/examples/granregion/log.27Nov18.granregion.mixer.g++.4 b/examples/granregion/log.27Nov18.granregion.mixer.g++.4 deleted file mode 100644 index be690a7df5..0000000000 --- a/examples/granregion/log.27Nov18.granregion.mixer.g++.4 +++ /dev/null @@ -1,602 +0,0 @@ -LAMMPS (27 Nov 2018) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -variable name string mixer - -thermo_modify flush yes -variable seed equal 14314 - -############################################### -# Particle parameters -################################################ - -variable rlo equal 0.3 -variable rhi equal 0.6 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.3 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.6 -variable skin equal ${rhi} -variable skin equal 0.6 - -variable coeffRes equal 0.1 -variable coeffFric equal 0.5 - -variable kn equal 10^5 -variable kt equal 0.2*${kn} -variable kt equal 0.2*100000 - -variable gravity equal 1.0 -variable density equal 1.0 - -variable min_mass equal ${density}*4.0/3.0*PI*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*0.3 -variable a equal (-2.0*log(${coeffRes})/PI)^2 -variable a equal (-2.0*log(0.1)/PI)^2 -variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*0.405284734569351)) -variable gamma_t equal ${gamma_n}*0.5 -variable gamma_t equal 806.699778405191*0.5 - -variable tcol equal PI/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/${min_mass}-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/0.113097335529233-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/0.113097335529233-806.699778405191/4.0) - -variable dt equal ${tcol}*0.02 -variable dt equal 0.00236257621510454*0.02 -timestep ${dt} -timestep 4.72515243020908e-05 - -############################################### - -variable dumpfreq equal 1000 -variable logfreq equal 1000 - -newton on -atom_style sphere - -boundary p p f - -region boxreg block 0 20 0 20 0 20 -create_box 1 boxreg -Created orthogonal box = (0 0 0) to (20 20 20) - 1 by 2 by 2 MPI processor grid - -pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 -pair_coeff * * - -neighbor ${skin} bin -neighbor 0.6 bin -thermo ${logfreq} -thermo 1000 - -comm_style brick -comm_modify mode multi group all vel yes -balance 1.1 shift xyz 20 1.1 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 20, bins = 1 1 1 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton on, size, history - pair build: half/size/bin/newton - stencil: half/bin/3d/newton - bin: standard -fix bal all balance 10000 1.1 shift xyz 20 1.01 - -####################### Options specific to pouring ######################### - -region insreg cylinder z 10 10 8 10 18 side in units box -region cylreg cylinder z 10 10 10 0 20 side in units box - -variable theta equal (step/400000)*2*PI - -region b1 block 2 18 9 11 0 4 side out rotate v_theta 10 10 0 0 0 1 units box -region b2 block 9 11 2 18 0 3.99999 side out rotate v_theta 10 10 0 0 0 1 units box - -region mixer intersect 3 cylreg b1 b2 side in - -fix grav all gravity ${gravity} vector 0 0 -1 -fix grav all gravity 1 vector 0 0 -1 -fix 1 all nve/sphere - -fix mixwall all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 region mixer - -fix ins all pour 1000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 ${dhi} dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 1 -Particle insertion: 444 every 84653 steps, 1000 by step 169307 - -#dump 1 all custom ${dumpfreq} ${name}_pour.dump # id type mass diameter x y z - -#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 1.5 # box no 0.0 axes no 0.0 0.0 -#dump_modify 2 pad 6 - -thermo_style custom step cpu atoms ke v_theta -WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:705) -thermo_modify flush yes lost warn - -run 200000 -Per MPI rank memory allocation (min/avg/max) = 5.817 | 5.817 | 5.817 Mbytes -Step CPU Atoms KinEng v_theta - 0 0 0 -0 0 - 1000 0.096722603 444 -0 0.015707963 - 2000 0.18796778 444 -0 0.031415927 - 3000 0.27916241 444 -0 0.04712389 - 4000 0.37111688 444 -0 0.062831853 - 5000 0.46224833 444 -0 0.078539816 - 6000 0.55190682 444 -0 0.09424778 - 7000 0.64120579 444 -0 0.10995574 - 8000 0.73025131 444 -0 0.12566371 - 9000 0.82121348 444 -0 0.14137167 - 10000 0.91006637 444 -0 0.15707963 - 11000 0.97034311 444 -0 0.1727876 - 12000 1.030247 444 -0 0.18849556 - 13000 1.0894752 444 -0 0.20420352 - 14000 1.1483686 444 -0 0.21991149 - 15000 1.2138393 444 -0 0.23561945 - 16000 1.2744856 444 -0 0.25132741 - 17000 1.3361425 444 -0 0.26703538 - 18000 1.3998857 444 -0 0.28274334 - 19000 1.4625463 444 -0 0.2984513 - 20000 1.5255082 444 -0 0.31415927 - 21000 1.5845048 444 -0 0.32986723 - 22000 1.6437175 444 -0 0.34557519 - 23000 1.7022173 444 -0 0.36128316 - 24000 1.7614172 444 -0 0.37699112 - 25000 1.8209105 444 -0 0.39269908 - 26000 1.8818901 444 -0 0.40840704 - 27000 1.9439991 444 -0 0.42411501 - 28000 2.0067189 444 -0 0.43982297 - 29000 2.0697014 444 -0 0.45553093 - 30000 2.1327429 444 -0 0.4712389 - 31000 2.1904151 444 -0 0.48694686 - 32000 2.2478669 444 -0 0.50265482 - 33000 2.3062997 444 -0 0.51836279 - 34000 2.3723967 444 -0 0.53407075 - 35000 2.4331915 444 -0 0.54977871 - 36000 2.4937904 444 -0 0.56548668 - 37000 2.5550685 444 -0 0.58119464 - 38000 2.6170652 444 -0 0.5969026 - 39000 2.6789875 444 -0 0.61261057 - 40000 2.7414019 444 -0 0.62831853 - 41000 2.799027 444 -0 0.64402649 - 42000 2.8570235 444 -0 0.65973446 - 43000 2.9140713 444 -0 0.67544242 - 44000 2.9702985 444 -0 0.69115038 - 45000 3.0274565 444 -0 0.70685835 - 46000 3.0860338 444 -0 0.72256631 - 47000 3.1450455 444 -0 0.73827427 - 48000 3.2057948 444 -0 0.75398224 - 49000 3.267339 444 -0 0.7696902 - 50000 3.3300545 444 -0 0.78539816 - 51000 3.3942592 444 -0 0.80110613 - 52000 3.4522727 444 -0 0.81681409 - 53000 3.5117693 444 -0 0.83252205 - 54000 3.5717957 444 -0 0.84823002 - 55000 3.6338761 444 -0 0.86393798 - 56000 3.7006576 444 -0 0.87964594 - 57000 3.7648654 444 -0 0.89535391 - 58000 3.829128 444 -0 0.91106187 - 59000 3.8930187 444 -0 0.92676983 - 60000 3.9581499 444 -0 0.9424778 - 61000 4.0213017 444 -0 0.95818576 - 62000 4.0822632 444 -0 0.97389372 - 63000 4.1443422 444 -0 0.98960169 - 64000 4.2072315 444 -0 1.0053096 - 65000 4.2711387 444 -0 1.0210176 - 66000 4.3361402 444 -0 1.0367256 - 67000 4.4031398 444 -0 1.0524335 - 68000 4.4698064 444 -0 1.0681415 - 69000 4.5374978 444 -0 1.0838495 - 70000 4.6051283 444 -0 1.0995574 - 71000 4.6694169 444 -0 1.1152654 - 72000 4.7335079 444 -0 1.1309734 - 73000 4.7967482 444 -0 1.1466813 - 74000 4.8603547 444 -0 1.1623893 - 75000 4.9250085 444 -0 1.1780972 - 76000 4.9909372 444 -0 1.1938052 - 77000 5.0578024 444 -0 1.2095132 - 78000 5.1250138 444 -0 1.2252211 - 79000 5.1929755 444 -0 1.2409291 - 80000 5.2627637 444 -0 1.2566371 - 81000 5.3280981 444 -0 1.272345 - 82000 5.3957336 444 -0 1.288053 - 83000 5.4648135 444 -0 1.303761 - 84000 5.5368683 444 -0 1.3194689 - 85000 5.6352935 888 -0 1.3351769 - 86000 5.7708502 888 -0 1.3508848 - 87000 5.9051492 888 -0 1.3665928 - 88000 6.0384896 888 -0 1.3823008 - 89000 6.1714747 888 -0 1.3980087 - 90000 6.3042989 888 -0 1.4137167 - 91000 6.4114611 888 -0 1.4294247 - 92000 6.5164247 888 -0 1.4451326 - 93000 6.6219602 888 -0 1.4608406 - 94000 6.728405 888 -0 1.4765485 - 95000 6.8411646 888 -0 1.4922565 - 96000 6.9479821 888 -0 1.5079645 - 97000 7.0569239 888 -0 1.5236724 - 98000 7.1673372 888 -0 1.5393804 - 99000 7.2778809 888 -0 1.5550884 - 100000 7.398834 888 -0 1.5707963 - 101000 7.5066864 888 -0 1.5865043 - 102000 7.6158357 888 -0 1.6022123 - 103000 7.725111 888 -0 1.6179202 - 104000 7.8344197 888 -0 1.6336282 - 105000 7.9532022 888 -0 1.6493361 - 106000 8.0643187 888 -0 1.6650441 - 107000 8.1765473 888 -0 1.6807521 - 108000 8.2890661 888 -0 1.69646 - 109000 8.4048562 888 -0 1.712168 - 110000 8.5208168 888 -0 1.727876 - 111000 8.6303153 888 -0 1.7435839 - 112000 8.7401052 888 -0 1.7592919 - 113000 8.8518219 888 -0 1.7749998 - 114000 8.9638157 888 -0 1.7907078 - 115000 9.0766122 888 -0 1.8064158 - 116000 9.1908746 888 -0 1.8221237 - 117000 9.306145 888 -0 1.8378317 - 118000 9.4229569 888 -0 1.8535397 - 119000 9.5407412 888 -0 1.8692476 - 120000 9.6574531 888 -0 1.8849556 - 121000 9.7683234 888 -0 1.9006636 - 122000 9.8812008 888 -0 1.9163715 - 123000 9.9952521 888 -0 1.9320795 - 124000 10.111879 888 -0 1.9477874 - 125000 10.228812 888 -0 1.9634954 - 126000 10.347842 888 -0 1.9792034 - 127000 10.47052 888 -0 1.9949113 - 128000 10.593136 888 -0 2.0106193 - 129000 10.718124 888 -0 2.0263273 - 130000 10.844211 888 -0 2.0420352 - 131000 10.959177 888 -0 2.0577432 - 132000 11.075781 888 -0 2.0734512 - 133000 11.191418 888 -0 2.0891591 - 134000 11.313376 888 -0 2.1048671 - 135000 11.432321 888 -0 2.120575 - 136000 11.551893 888 -0 2.136283 - 137000 11.672695 888 -0 2.151991 - 138000 11.793487 888 -0 2.1676989 - 139000 11.914089 888 -0 2.1834069 - 140000 12.037441 888 -0 2.1991149 - 141000 12.161974 888 -0 2.2148228 - 142000 12.286641 888 -0 2.2305308 - 143000 12.414012 888 -0 2.2462387 - 144000 12.540939 888 -0 2.2619467 - 145000 12.66985 888 -0 2.2776547 - 146000 12.79975 888 -0 2.2933626 - 147000 12.932702 888 -0 2.3090706 - 148000 13.066088 888 -0 2.3247786 - 149000 13.200814 888 -0 2.3404865 - 150000 13.33565 888 -0 2.3561945 - 151000 13.465995 888 -0 2.3719025 - 152000 13.586622 888 -0 2.3876104 - 153000 13.711423 888 -0 2.4033184 - 154000 13.835058 888 -0 2.4190263 - 155000 13.967661 888 -0 2.4347343 - 156000 14.100609 888 -0 2.4504423 - 157000 14.234485 888 -0 2.4661502 - 158000 14.373325 888 -0 2.4818582 - 159000 14.510608 888 -0 2.4975662 - 160000 14.651416 888 -0 2.5132741 - 161000 14.785767 888 -0 2.5289821 - 162000 14.921569 888 -0 2.54469 - 163000 15.058895 888 -0 2.560398 - 164000 15.198786 888 -0 2.576106 - 165000 15.341662 888 -0 2.5918139 - 166000 15.487128 888 -0 2.6075219 - 167000 15.649383 888 -0 2.6232299 - 168000 15.795388 888 -0 2.6389378 - 169000 15.942671 888 -0 2.6546458 - 170000 16.091824 1000 -0 2.6703538 - 171000 16.239863 1000 -0 2.6860617 - 172000 16.391118 1000 -0 2.7017697 - 173000 16.5417 1000 -0 2.7174776 - 174000 16.69479 1000 -0 2.7331856 - 175000 16.847412 1000 -0 2.7488936 - 176000 17.000374 1000 -0 2.7646015 - 177000 17.15471 1000 -0 2.7803095 - 178000 17.31284 1000 -0 2.7960175 - 179000 17.46991 1000 -0 2.8117254 - 180000 17.629018 1000 -0 2.8274334 - 181000 17.787736 1000 -0 2.8431414 - 182000 17.946197 1000 -0 2.8588493 - 183000 18.105271 1000 -0 2.8745573 - 184000 18.263731 1000 -0 2.8902652 - 185000 18.433277 1000 -0 2.9059732 - 186000 18.594456 1000 -0 2.9216812 - 187000 18.755532 1000 -0 2.9373891 - 188000 18.918447 1000 -0 2.9530971 - 189000 19.080359 1000 -0 2.9688051 - 190000 19.243927 1000 -0 2.984513 - 191000 19.395044 1000 -0 3.000221 - 192000 19.546837 1000 -0 3.0159289 - 193000 19.695827 1000 -0 3.0316369 - 194000 19.843856 1000 -0 3.0473449 - 195000 19.993821 1000 -0 3.0630528 - 196000 20.145787 1000 -0 3.0787608 - 197000 20.298114 1000 -0 3.0944688 - 198000 20.45074 1000 -0 3.1101767 - 199000 20.607595 1000 -0 3.1258847 - 200000 20.760979 1000 -0 3.1415927 -Loop time of 20.7611 on 4 procs for 200000 steps with 1000 atoms - -Performance: 39328.699 tau/day, 9633.409 timesteps/s -98.0% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.57172 | 0.93292 | 1.2995 | 37.1 | 4.49 -Neigh | 0.015648 | 0.018747 | 0.02175 | 2.1 | 0.09 -Comm | 3.17 | 3.6151 | 4.0856 | 23.0 | 17.41 -Output | 0.0051017 | 0.012686 | 0.033359 | 10.6 | 0.06 -Modify | 12.36 | 13.269 | 14.095 | 21.8 | 63.91 -Other | | 2.912 | | | 14.03 - -Nlocal: 250 ave 270 max 230 min -Histogram: 1 0 0 0 1 0 1 0 0 1 -Nghost: 297 ave 337 max 234 min -Histogram: 1 0 0 0 0 1 0 0 0 2 -Neighs: 982.5 ave 1580 max 496 min -Histogram: 2 0 0 0 0 0 0 1 0 1 - -Total # of neighbors = 3930 -Ave neighs/atom = 3.93 -Neighbor list builds = 218 -Dangerous builds = 0 -unfix ins -run 200000 -Per MPI rank memory allocation (min/avg/max) = 12 | 12.19 | 12.35 Mbytes -Step CPU Atoms KinEng v_theta - 200000 0 1000 0.89289812 3.1415927 - 201000 0.15554476 1000 0.90162438 3.1573006 - 202000 0.31118774 1000 0.89175077 3.1730086 - 203000 0.47266722 1000 0.88068523 3.1887165 - 204000 0.64758801 1000 0.88775074 3.2044245 - 205000 0.85137105 1000 0.89009449 3.2201325 - 206000 1.0712745 1000 0.89031724 3.2358404 - 207000 1.3620427 1000 0.90901476 3.2515484 - 208000 1.6051998 1000 0.91977358 3.2672564 - 209000 1.7975032 1000 0.92044257 3.2829643 - 210000 1.9654117 1000 0.90550844 3.2986723 - 211000 2.1186137 1000 0.90179135 3.3143802 - 212000 2.2714169 1000 0.90474936 3.3300882 - 213000 2.4236252 1000 0.9011002 3.3457962 - 214000 2.5737655 1000 0.89619815 3.3615041 - 215000 2.7326233 1000 0.89129064 3.3772121 - 216000 2.8794787 1000 0.88785486 3.3929201 - 217000 3.0264313 1000 0.89448821 3.408628 - 218000 3.1743443 1000 0.89323746 3.424336 - 219000 3.3225086 1000 0.88176869 3.440044 - 220000 3.4717121 1000 0.86989815 3.4557519 - 221000 3.6229391 1000 0.85900389 3.4714599 - 222000 3.7768724 1000 0.85440461 3.4871678 - 223000 3.9287963 1000 0.8604449 3.5028758 - 224000 4.082505 1000 0.84537374 3.5185838 - 225000 4.234731 1000 0.84526488 3.5342917 - 226000 4.3872988 1000 0.85877362 3.5499997 - 227000 4.5396216 1000 0.86762074 3.5657077 - 228000 4.7092509 1000 0.86460359 3.5814156 - 229000 4.8631954 1000 0.85409682 3.5971236 - 230000 5.0194352 1000 0.83902718 3.6128316 - 231000 5.1765387 1000 0.83908755 3.6285395 - 232000 5.3335299 1000 0.83178808 3.6442475 - 233000 5.4917257 1000 0.83369584 3.6599554 - 234000 5.654233 1000 0.8530074 3.6756634 - 235000 5.8163757 1000 0.86385009 3.6913714 - 236000 5.9791231 1000 0.86453337 3.7070793 - 237000 6.1401029 1000 0.86137572 3.7227873 - 238000 6.300632 1000 0.8656285 3.7384953 - 239000 6.4597898 1000 0.85993724 3.7542032 - 240000 6.6216707 1000 0.8484153 3.7699112 - 241000 6.7793672 1000 0.84624799 3.7856191 - 242000 6.939244 1000 0.83739227 3.8013271 - 243000 7.1013088 1000 0.83026469 3.8170351 - 244000 7.267416 1000 0.81060567 3.832743 - 245000 7.4318523 1000 0.81081038 3.848451 - 246000 7.6077905 1000 0.80857771 3.864159 - 247000 7.7763391 1000 0.80353315 3.8798669 - 248000 7.9485247 1000 0.80191903 3.8955749 - 249000 8.1208956 1000 0.79865102 3.9112829 - 250000 8.2921841 1000 0.79407385 3.9269908 - 251000 8.4614651 1000 0.7880275 3.9426988 - 252000 8.6266186 1000 0.79212521 3.9584067 - 253000 8.7913449 1000 0.78976714 3.9741147 - 254000 8.9596558 1000 0.79720779 3.9898227 - 255000 9.1278918 1000 0.79329363 4.0055306 - 256000 9.3016815 1000 0.80851295 4.0212386 - 257000 9.4701304 1000 0.82322071 4.0369466 - 258000 9.6399531 1000 0.83042211 4.0526545 - 259000 9.8090186 1000 0.82773068 4.0683625 - 260000 9.9798045 1000 0.8246773 4.0840704 - 261000 10.148952 1000 0.81374287 4.0997784 - 262000 10.318855 1000 0.79936963 4.1154864 - 263000 10.496092 1000 0.78124408 4.1311943 - 264000 10.671031 1000 0.77790646 4.1469023 - 265000 10.843052 1000 0.77212005 4.1626103 - 266000 11.01867 1000 0.77977752 4.1783182 - 267000 11.192151 1000 0.79237542 4.1940262 - 268000 11.362491 1000 0.80631398 4.2097342 - 269000 11.53223 1000 0.82380407 4.2254421 - 270000 11.7123 1000 0.82477127 4.2411501 - 271000 11.883593 1000 0.81655074 4.256858 - 272000 12.052348 1000 0.80678676 4.272566 - 273000 12.220196 1000 0.79162789 4.288274 - 274000 12.395164 1000 0.78896081 4.3039819 - 275000 12.569757 1000 0.77904648 4.3196899 - 276000 12.748754 1000 0.78252999 4.3353979 - 277000 12.91648 1000 0.78293295 4.3511058 - 278000 13.086087 1000 0.78311337 4.3668138 - 279000 13.260159 1000 0.77657634 4.3825218 - 280000 13.428503 1000 0.76835711 4.3982297 - 281000 13.596094 1000 0.75586438 4.4139377 - 282000 13.763325 1000 0.74600306 4.4296456 - 283000 13.932867 1000 0.73228762 4.4453536 - 284000 14.098865 1000 0.72344939 4.4610616 - 285000 14.269317 1000 0.72160289 4.4767695 - 286000 14.441196 1000 0.71321619 4.4924775 - 287000 14.614458 1000 0.72631772 4.5081855 - 288000 14.783358 1000 0.74390396 4.5238934 - 289000 14.953564 1000 0.77320352 4.5396014 - 290000 15.12428 1000 0.77249469 4.5553093 - 291000 15.283974 1000 0.7583723 4.5710173 - 292000 15.449553 1000 0.74568347 4.5867253 - 293000 15.611965 1000 0.74108034 4.6024332 - 294000 15.770807 1000 0.72706174 4.6181412 - 295000 15.927151 1000 0.71122597 4.6338492 - 296000 16.086734 1000 0.70272297 4.6495571 - 297000 16.245418 1000 0.6945394 4.6652651 - 298000 16.406617 1000 0.69541258 4.6809731 - 299000 16.568989 1000 0.71696092 4.696681 - 300000 16.754911 1000 0.72939561 4.712389 - 301000 16.919453 1000 0.73621801 4.7280969 - 302000 17.07794 1000 0.72052605 4.7438049 - 303000 17.234397 1000 0.71057318 4.7595129 - 304000 17.39014 1000 0.70014814 4.7752208 - 305000 17.550789 1000 0.68855925 4.7909288 - 306000 17.718802 1000 0.68665019 4.8066368 - 307000 17.874036 1000 0.6831349 4.8223447 - 308000 18.029367 1000 0.67929468 4.8380527 - 309000 18.188065 1000 0.67833006 4.8537606 - 310000 18.348243 1000 0.67764037 4.8694686 - 311000 18.512475 1000 0.68271978 4.8851766 - 312000 18.676519 1000 0.69021026 4.9008845 - 313000 18.836426 1000 0.68795473 4.9165925 - 314000 18.997681 1000 0.68308892 4.9323005 - 315000 19.158794 1000 0.68086977 4.9480084 - 316000 19.318186 1000 0.67879169 4.9637164 - 317000 19.479364 1000 0.68128526 4.9794244 - 318000 19.645085 1000 0.68718719 4.9951323 - 319000 19.806831 1000 0.68419901 5.0108403 - 320000 19.97005 1000 0.68045269 5.0265482 - 321000 20.130643 1000 0.68430036 5.0422562 - 322000 20.291637 1000 0.68195368 5.0579642 - 323000 20.457605 1000 0.67964011 5.0736721 - 324000 20.621699 1000 0.67681293 5.0893801 - 325000 20.78525 1000 0.67601868 5.1050881 - 326000 20.950321 1000 0.67600265 5.120796 - 327000 21.11346 1000 0.68484094 5.136504 - 328000 21.276964 1000 0.68526189 5.152212 - 329000 21.440971 1000 0.67602072 5.1679199 - 330000 21.609791 1000 0.68222852 5.1836279 - 331000 21.773574 1000 0.68825647 5.1993358 - 332000 21.93854 1000 0.68168415 5.2150438 - 333000 22.102281 1000 0.67460357 5.2307518 - 334000 22.265741 1000 0.67747925 5.2464597 - 335000 22.436954 1000 0.681763 5.2621677 - 336000 22.614367 1000 0.67611867 5.2778757 - 337000 22.779064 1000 0.66903217 5.2935836 - 338000 22.945739 1000 0.6684293 5.3092916 - 339000 23.111375 1000 0.66465194 5.3249995 - 340000 23.278674 1000 0.66226848 5.3407075 - 341000 23.444642 1000 0.66407188 5.3564155 - 342000 23.614615 1000 0.65762812 5.3721234 - 343000 23.785007 1000 0.66936507 5.3878314 - 344000 23.956265 1000 0.67424224 5.4035394 - 345000 24.129057 1000 0.684271 5.4192473 - 346000 24.303073 1000 0.68294352 5.4349553 - 347000 24.475812 1000 0.69795697 5.4506633 - 348000 24.652771 1000 0.69818863 5.4663712 - 349000 24.830973 1000 0.69578798 5.4820792 - 350000 25.00923 1000 0.69377251 5.4977871 - 351000 25.185421 1000 0.69638202 5.5134951 - 352000 25.363647 1000 0.70115823 5.5292031 - 353000 25.540517 1000 0.70891635 5.544911 - 354000 25.718709 1000 0.70876639 5.560619 - 355000 25.893633 1000 0.71130235 5.576327 - 356000 26.068423 1000 0.69380913 5.5920349 - 357000 26.243801 1000 0.67934899 5.6077429 - 358000 26.418883 1000 0.67024516 5.6234508 - 359000 26.594722 1000 0.66145645 5.6391588 - 360000 26.770322 1000 0.65335546 5.6548668 - 361000 26.946396 1000 0.65495192 5.6705747 - 362000 27.12296 1000 0.64973833 5.6862827 - 363000 27.298461 1000 0.64532381 5.7019907 - 364000 27.473586 1000 0.64282855 5.7176986 - 365000 27.653872 1000 0.64451862 5.7334066 - 366000 27.830317 1000 0.64366439 5.7491146 - 367000 28.007037 1000 0.64395479 5.7648225 - 368000 28.184079 1000 0.65827587 5.7805305 - 369000 28.376009 1000 0.66311341 5.7962384 - 370000 28.557287 1000 0.66165026 5.8119464 - 371000 28.736569 1000 0.66878374 5.8276544 - 372000 28.91063 1000 0.66944548 5.8433623 - 373000 29.084648 1000 0.66061945 5.8590703 - 374000 29.258649 1000 0.65320954 5.8747783 - 375000 29.433156 1000 0.64641195 5.8904862 - 376000 29.611781 1000 0.64631388 5.9061942 - 377000 29.78531 1000 0.64232398 5.9219022 - 378000 29.955917 1000 0.63805257 5.9376101 - 379000 30.126378 1000 0.63666047 5.9533181 - 380000 30.297285 1000 0.63651856 5.969026 - 381000 30.471635 1000 0.6377374 5.984734 - 382000 30.644813 1000 0.64750107 6.000442 - 383000 30.816208 1000 0.65655138 6.0161499 - 384000 30.986444 1000 0.65408935 6.0318579 - 385000 31.156501 1000 0.64437236 6.0475659 - 386000 31.327665 1000 0.63862174 6.0632738 - 387000 31.49731 1000 0.64133807 6.0789818 - 388000 31.682031 1000 0.64174374 6.0946897 - 389000 31.85148 1000 0.64480071 6.1103977 - 390000 32.020336 1000 0.64982943 6.1261057 - 391000 32.187634 1000 0.6461109 6.1418136 - 392000 32.357282 1000 0.64044412 6.1575216 - 393000 32.527796 1000 0.64662995 6.1732296 - 394000 32.704323 1000 0.65330527 6.1889375 - 395000 32.880643 1000 0.66026265 6.2046455 - 396000 33.048614 1000 0.6718969 6.2203535 - 397000 33.222059 1000 0.66481385 6.2360614 - 398000 33.391738 1000 0.66685494 6.2517694 - 399000 33.560431 1000 0.6612594 6.2674773 - 400000 33.729715 1000 0.65289572 6.2831853 -Loop time of 33.7298 on 4 procs for 200000 steps with 1000 atoms - -Performance: 24207.249 tau/day, 5929.470 timesteps/s -97.9% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 1.6748 | 2.6848 | 3.6646 | 58.4 | 7.96 -Neigh | 0.021206 | 0.026438 | 0.03191 | 3.1 | 0.08 -Comm | 6.133 | 7.3745 | 8.6652 | 45.0 | 21.86 -Output | 0.0053763 | 0.016101 | 0.044719 | 13.0 | 0.05 -Modify | 18.26 | 20.115 | 22.413 | 39.2 | 59.64 -Other | | 3.513 | | | 10.42 - -Nlocal: 250 ave 266 max 230 min -Histogram: 1 0 0 0 0 1 1 0 0 1 -Nghost: 401.5 ave 476 max 325 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Neighs: 1264 ave 1634 max 895 min -Histogram: 1 0 1 0 0 0 0 1 0 1 - -Total # of neighbors = 5056 -Ave neighs/atom = 5.056 -Neighbor list builds = 160 -Dangerous builds = 0 -Total wall time: 0:00:54 diff --git a/examples/granular/in.pour.heat b/examples/granular/in.pour.heat index 495a80454a..69590389b5 100644 --- a/examples/granular/in.pour.heat +++ b/examples/granular/in.pour.heat @@ -51,7 +51,7 @@ region insreg cylinder z ${xc} ${yc} ${cyl_rad_inner} ${drum_height} ${ fix 0 all balance 100 1.0 shift xy 5 1.1 fix 1 all nve/sphere -fix 2 all temp/integrate constant 1.0 +fix 2 all heat/flow/sphere/temp constant 1.0 fix grav all gravity 10 vector 0 0 -1 fix ins1 all pour 1000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} fix ins2 all pour 1000 2 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} diff --git a/examples/granular/log.15Sep22.pour.drum.g++.1 b/examples/granular/log.15Sep22.pour.drum.g++.1 new file mode 100644 index 0000000000..75cc115dd1 --- /dev/null +++ b/examples/granular/log.15Sep22.pour.drum.g++.1 @@ -0,0 +1,272 @@ +LAMMPS (15 Sep 2022) +# pour two types of particles (cohesive and non-cohesive) into cylinder +# 'turn' cylinder by changing direction of gravity, then rotate it. +# This simulates a rotating drum powder characterization experiment. + +variable name string rotating_drum_two_types + +atom_style sphere +units lj + +############################################### +# Geometry-related parameters +############################################### + +variable boxx equal 30 +variable boxy equal 30 +variable boxz equal 50 + +variable drum_rad equal ${boxx}*0.5 +variable drum_rad equal 30*0.5 +variable drum_height equal 20 + +variable xc equal 0.5*${boxx} +variable xc equal 0.5*30 +variable yc equal 0.5*${boxx} +variable yc equal 0.5*30 +variable zc equal 0.5*${boxz} +variable zc equal 0.5*50 + +############################################### +# Particle-related parameters +############################################### +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.25 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.5 + +variable cyl_rad_inner equal ${drum_rad}-1.1*${rhi} +variable cyl_rad_inner equal 15-1.1*${rhi} +variable cyl_rad_inner equal 15-1.1*0.5 + +variable dens equal 1.0 + +variable skin equal 0.4*${rhi} +variable skin equal 0.4*0.5 + +############# +processors * * 1 +region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} +region boxreg block 0 30 0 ${boxy} 0 ${boxz} +region boxreg block 0 30 0 30 0 ${boxz} +region boxreg block 0 30 0 30 0 50 +create_box 2 boxreg +Created orthogonal box = (0 0 0) to (30 30 50) + 1 by 1 by 1 MPI processor grid +change_box all boundary p p f +Changing box ... + +pair_style granular +pair_coeff 1 * hertz/material 1e5 0.2 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji +pair_coeff 2 2 jkr 1e5 0.1 0.3 50 tangential mindlin NULL 1.0 0.5 rolling sds 1e3 1e3 0.1 twisting marshall + +variable theta equal 0 + +region curved_wall cylinder z ${xc} ${yc} ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region curved_wall cylinder z 15 ${yc} ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region curved_wall cylinder z 15 15 ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region curved_wall cylinder z 15 15 15 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta 15 ${yc} 0 0 0 1 +region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta 15 15 0 0 0 1 +region bottom_wall plane ${xc} ${yc} 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region bottom_wall plane 15 ${yc} 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta 15 ${yc} 0 0 0 1 +region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta 15 15 0 0 0 1 + +region insreg cylinder z ${xc} ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 15 ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 15 15 ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 15 15 14.45 ${drum_height} ${boxz} +region insreg cylinder z 15 15 14.45 20 ${boxz} +region insreg cylinder z 15 15 14.45 20 50 + +fix 0 all balance 100 1.0 shift xy 5 1.1 +fix 1 all nve/sphere +fix grav all gravity 10 vector 0 0 -1 +fix ins1 all pour 2000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} +fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens 1 ${dens} +fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 9396 every 490 steps, 2000 by step 1 +fix ins2 all pour 2000 2 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} +fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens 1 ${dens} +fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 9396 every 490 steps, 2000 by step 1 + +comm_modify vel yes + +neighbor ${skin} bin +neighbor 0.2 bin +neigh_modify delay 0 every 1 check yes + +fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall +fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region bottom_wall + +thermo_style custom step atoms ke v_theta +thermo_modify lost warn +thermo 100 + +timestep 0.001 + +#dump 1 all custom 100 ${name}.dump id type radius mass x y z + +#For removal later +compute 1 all property/atom radius +variable zmax atom z+c_1>0.5*${drum_height} +variable zmax atom z+c_1>0.5*20 +group delgroup dynamic all var zmax every 10000 +dynamic group delgroup defined + +run 2000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.2 + ghost atom cutoff = 1.2 + binsize = 0.6, bins = 50 50 84 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair granular, perpetual + attributes: half, newton on, size, history + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 16.08 | 16.08 | 16.08 Mbytes + Step Atoms KinEng v_theta + 0 0 -0 0 + 100 4000 -0 0 + 200 4000 -0 0 + 300 4000 -0 0 + 400 4000 -0 0 + 500 4000 -0 0 + 600 4000 -0 0 + 700 4000 -0 0 + 800 4000 -0 0 + 900 4000 -0 0 + 1000 4000 -0 0 + 1100 4000 -0 0 + 1200 4000 -0 0 + 1300 4000 -0 0 + 1400 4000 -0 0 + 1500 4000 -0 0 + 1600 4000 -0 0 + 1700 4000 -0 0 + 1800 4000 -0 0 + 1900 4000 -0 0 + 2000 4000 -0 0 +Loop time of 2.81549 on 1 procs for 2000 steps with 4000 atoms + +Performance: 61374.657 tau/day, 710.355 timesteps/s, 2.841 Matom-step/s +98.4% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.35362 | 0.35362 | 0.35362 | 0.0 | 12.56 +Neigh | 1.0852 | 1.0852 | 1.0852 | 0.0 | 38.54 +Comm | 0.041891 | 0.041891 | 0.041891 | 0.0 | 1.49 +Output | 0.00059151 | 0.00059151 | 0.00059151 | 0.0 | 0.02 +Modify | 1.2814 | 1.2814 | 1.2814 | 0.0 | 45.51 +Other | | 0.0528 | | | 1.88 + +Nlocal: 4000 ave 4000 max 4000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 179 ave 179 max 179 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 7019 ave 7019 max 7019 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 7019 +Ave neighs/atom = 1.75475 +Neighbor list builds = 1000 +Dangerous builds = 0 + +#Remove any particles that are above z > 0.5*drum_height +delete_atoms group delgroup +Deleted 0 atoms, new total = 4000 + +#Add top lid +region top_wall plane ${xc} ${yc} ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region top_wall plane 15 ${yc} ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region top_wall plane 15 15 ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta 15 ${yc} 0 0 0 1 +region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta 15 15 0 0 0 1 +fix 5 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region top_wall + +# 'Turn' drum by switching the direction of gravity +unfix grav +unfix ins1 +unfix ins2 +fix grav all gravity 10 vector 0 -1 0 + +variable theta equal 2*PI*elapsed/20000.0 +run 3000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 22.42 | 22.42 | 22.42 Mbytes + Step Atoms KinEng v_theta + 2000 4000 59.969827 0 + 2100 4000 47.251389 0.031415927 + 2200 4000 33.726755 0.062831853 + 2300 4000 24.212479 0.09424778 + 2400 4000 17.366268 0.12566371 + 2500 4000 18.502318 0.15707963 + 2600 4000 17.44981 0.18849556 + 2700 4000 16.068315 0.21991149 + 2800 4000 14.252644 0.25132741 + 2900 4000 11.544019 0.28274334 + 3000 4000 9.0353662 0.31415927 + 3100 4000 6.9955912 0.34557519 + 3200 4000 5.955137 0.37699112 + 3300 4000 5.8947849 0.40840704 + 3400 4000 6.0544729 0.43982297 + 3500 4000 6.5326359 0.4712389 + 3600 4000 6.6047764 0.50265482 + 3700 4000 6.7073614 0.53407075 + 3800 4000 6.7367804 0.56548668 + 3900 4000 6.6178006 0.5969026 + 4000 4000 6.3834858 0.62831853 + 4100 4000 5.8660652 0.65973446 + 4200 4000 5.308513 0.69115038 + 4300 4000 4.7270842 0.72256631 + 4400 4000 4.1920733 0.75398224 + 4500 4000 3.7068814 0.78539816 + 4600 4000 3.3259615 0.81681409 + 4700 4000 2.9339231 0.84823002 + 4800 4000 2.670752 0.87964594 + 4900 4000 2.4509115 0.91106187 + 5000 4000 2.2609335 0.9424778 +Loop time of 9.82178 on 1 procs for 3000 steps with 4000 atoms + +Performance: 26390.330 tau/day, 305.444 timesteps/s, 1.222 Matom-step/s +99.4% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 3.2932 | 3.2932 | 3.2932 | 0.0 | 33.53 +Neigh | 2.2872 | 2.2872 | 2.2872 | 0.0 | 23.29 +Comm | 0.067117 | 0.067117 | 0.067117 | 0.0 | 0.68 +Output | 0.00093425 | 0.00093425 | 0.00093425 | 0.0 | 0.01 +Modify | 4.0986 | 4.0986 | 4.0986 | 0.0 | 41.73 +Other | | 0.07476 | | | 0.76 + +Nlocal: 4000 ave 4000 max 4000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 363 ave 363 max 363 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 13089 ave 13089 max 13089 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 13089 +Ave neighs/atom = 3.27225 +Neighbor list builds = 1247 +Dangerous builds = 130 +Total wall time: 0:00:12 diff --git a/examples/granular/log.15Sep22.pour.drum.g++.4 b/examples/granular/log.15Sep22.pour.drum.g++.4 new file mode 100644 index 0000000000..4ab6f92b8b --- /dev/null +++ b/examples/granular/log.15Sep22.pour.drum.g++.4 @@ -0,0 +1,272 @@ +LAMMPS (15 Sep 2022) +# pour two types of particles (cohesive and non-cohesive) into cylinder +# 'turn' cylinder by changing direction of gravity, then rotate it. +# This simulates a rotating drum powder characterization experiment. + +variable name string rotating_drum_two_types + +atom_style sphere +units lj + +############################################### +# Geometry-related parameters +############################################### + +variable boxx equal 30 +variable boxy equal 30 +variable boxz equal 50 + +variable drum_rad equal ${boxx}*0.5 +variable drum_rad equal 30*0.5 +variable drum_height equal 20 + +variable xc equal 0.5*${boxx} +variable xc equal 0.5*30 +variable yc equal 0.5*${boxx} +variable yc equal 0.5*30 +variable zc equal 0.5*${boxz} +variable zc equal 0.5*50 + +############################################### +# Particle-related parameters +############################################### +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.25 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.5 + +variable cyl_rad_inner equal ${drum_rad}-1.1*${rhi} +variable cyl_rad_inner equal 15-1.1*${rhi} +variable cyl_rad_inner equal 15-1.1*0.5 + +variable dens equal 1.0 + +variable skin equal 0.4*${rhi} +variable skin equal 0.4*0.5 + +############# +processors * * 1 +region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} +region boxreg block 0 30 0 ${boxy} 0 ${boxz} +region boxreg block 0 30 0 30 0 ${boxz} +region boxreg block 0 30 0 30 0 50 +create_box 2 boxreg +Created orthogonal box = (0 0 0) to (30 30 50) + 2 by 2 by 1 MPI processor grid +change_box all boundary p p f +Changing box ... + +pair_style granular +pair_coeff 1 * hertz/material 1e5 0.2 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji +pair_coeff 2 2 jkr 1e5 0.1 0.3 50 tangential mindlin NULL 1.0 0.5 rolling sds 1e3 1e3 0.1 twisting marshall + +variable theta equal 0 + +region curved_wall cylinder z ${xc} ${yc} ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region curved_wall cylinder z 15 ${yc} ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region curved_wall cylinder z 15 15 ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region curved_wall cylinder z 15 15 15 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta 15 ${yc} 0 0 0 1 +region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta 15 15 0 0 0 1 +region bottom_wall plane ${xc} ${yc} 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region bottom_wall plane 15 ${yc} 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta 15 ${yc} 0 0 0 1 +region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta 15 15 0 0 0 1 + +region insreg cylinder z ${xc} ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 15 ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 15 15 ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 15 15 14.45 ${drum_height} ${boxz} +region insreg cylinder z 15 15 14.45 20 ${boxz} +region insreg cylinder z 15 15 14.45 20 50 + +fix 0 all balance 100 1.0 shift xy 5 1.1 +fix 1 all nve/sphere +fix grav all gravity 10 vector 0 0 -1 +fix ins1 all pour 2000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} +fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens 1 ${dens} +fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 9396 every 490 steps, 2000 by step 1 +fix ins2 all pour 2000 2 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} +fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens 1 ${dens} +fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 9396 every 490 steps, 2000 by step 1 + +comm_modify vel yes + +neighbor ${skin} bin +neighbor 0.2 bin +neigh_modify delay 0 every 1 check yes + +fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall +fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region bottom_wall + +thermo_style custom step atoms ke v_theta +thermo_modify lost warn +thermo 100 + +timestep 0.001 + +#dump 1 all custom 100 ${name}.dump id type radius mass x y z + +#For removal later +compute 1 all property/atom radius +variable zmax atom z+c_1>0.5*${drum_height} +variable zmax atom z+c_1>0.5*20 +group delgroup dynamic all var zmax every 10000 +dynamic group delgroup defined + +run 2000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.2 + ghost atom cutoff = 1.2 + binsize = 0.6, bins = 50 50 84 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair granular, perpetual + attributes: half, newton on, size, history + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 15.3 | 15.3 | 15.3 Mbytes + Step Atoms KinEng v_theta + 0 0 -0 0 + 100 4000 -0 0 + 200 4000 -0 0 + 300 4000 -0 0 + 400 4000 -0 0 + 500 4000 -0 0 + 600 4000 -0 0 + 700 4000 -0 0 + 800 4000 -0 0 + 900 4000 -0 0 + 1000 4000 -0 0 + 1100 4000 -0 0 + 1200 4000 -0 0 + 1300 4000 -0 0 + 1400 4000 -0 0 + 1500 4000 -0 0 + 1600 4000 -0 0 + 1700 4000 -0 0 + 1800 4000 -0 0 + 1900 4000 -0 0 + 2000 4000 -0 0 +Loop time of 0.744926 on 4 procs for 2000 steps with 4000 atoms + +Performance: 231969.322 tau/day, 2684.830 timesteps/s, 10.739 Matom-step/s +98.1% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.064917 | 0.069813 | 0.074844 | 1.7 | 9.37 +Neigh | 0.15075 | 0.15915 | 0.1692 | 1.9 | 21.36 +Comm | 0.11223 | 0.11821 | 0.12247 | 1.1 | 15.87 +Output | 0.00030739 | 0.00036898 | 0.00046777 | 0.0 | 0.05 +Modify | 0.36068 | 0.36657 | 0.37031 | 0.7 | 49.21 +Other | | 0.03082 | | | 4.14 + +Nlocal: 1000 ave 1010 max 990 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 285 ave 287 max 283 min +Histogram: 1 0 1 0 0 0 0 1 0 1 +Neighs: 1714.25 ave 1764 max 1651 min +Histogram: 1 0 1 0 0 0 0 0 0 2 + +Total # of neighbors = 6857 +Ave neighs/atom = 1.71425 +Neighbor list builds = 1000 +Dangerous builds = 0 + +#Remove any particles that are above z > 0.5*drum_height +delete_atoms group delgroup +Deleted 0 atoms, new total = 4000 + +#Add top lid +region top_wall plane ${xc} ${yc} ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region top_wall plane 15 ${yc} ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region top_wall plane 15 15 ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 +region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta 15 ${yc} 0 0 0 1 +region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta 15 15 0 0 0 1 +fix 5 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region top_wall + +# 'Turn' drum by switching the direction of gravity +unfix grav +unfix ins1 +unfix ins2 +fix grav all gravity 10 vector 0 -1 0 + +variable theta equal 2*PI*elapsed/20000.0 +run 3000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 21.6 | 21.6 | 21.6 Mbytes + Step Atoms KinEng v_theta + 2000 4000 60.10546 0 + 2100 4000 47.274123 0.031415927 + 2200 4000 33.475582 0.062831853 + 2300 4000 24.083669 0.09424778 + 2400 4000 17.36351 0.12566371 + 2500 4000 18.576501 0.15707963 + 2600 4000 17.39 0.18849556 + 2700 4000 15.789254 0.21991149 + 2800 4000 14.08156 0.25132741 + 2900 4000 11.636681 0.28274334 + 3000 4000 8.9897685 0.31415927 + 3100 4000 7.0703519 0.34557519 + 3200 4000 6.0741809 0.37699112 + 3300 4000 5.8286097 0.40840704 + 3400 4000 6.059001 0.43982297 + 3500 4000 6.4310861 0.4712389 + 3600 4000 6.3957528 0.50265482 + 3700 4000 6.4858292 0.53407075 + 3800 4000 6.4685962 0.56548668 + 3900 4000 6.3469676 0.5969026 + 4000 4000 6.2808022 0.62831853 + 4100 4000 5.957048 0.65973446 + 4200 4000 5.5378951 0.69115038 + 4300 4000 4.8523264 0.72256631 + 4400 4000 4.2485239 0.75398224 + 4500 4000 3.7587486 0.78539816 + 4600 4000 3.327008 0.81681409 + 4700 4000 2.9421013 0.84823002 + 4800 4000 2.75247 0.87964594 + 4900 4000 2.5306332 0.91106187 + 5000 4000 2.352504 0.9424778 +Loop time of 2.48704 on 4 procs for 3000 steps with 4000 atoms + +Performance: 104220.238 tau/day, 1206.253 timesteps/s, 4.825 Matom-step/s +98.6% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.51605 | 0.70407 | 0.86299 | 14.7 | 28.31 +Neigh | 0.3522 | 0.42808 | 0.50041 | 8.0 | 17.21 +Comm | 0.17318 | 0.42324 | 0.7046 | 29.0 | 17.02 +Output | 0.00079725 | 0.0013956 | 0.002092 | 1.3 | 0.06 +Modify | 0.68507 | 0.79676 | 0.90954 | 8.9 | 32.04 +Other | | 0.1335 | | | 5.37 + +Nlocal: 1000 ave 1330 max 670 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 525.5 ave 781 max 417 min +Histogram: 2 1 0 0 0 0 0 0 0 1 +Neighs: 3243.75 ave 4460 max 2012 min +Histogram: 1 1 0 0 0 0 0 0 1 1 + +Total # of neighbors = 12975 +Ave neighs/atom = 3.24375 +Neighbor list builds = 1299 +Dangerous builds = 129 +Total wall time: 0:00:03 diff --git a/examples/granular/log.15Sep22.pour.flatwall.g++.1 b/examples/granular/log.15Sep22.pour.flatwall.g++.1 new file mode 100644 index 0000000000..f863993b46 --- /dev/null +++ b/examples/granular/log.15Sep22.pour.flatwall.g++.1 @@ -0,0 +1,195 @@ +LAMMPS (15 Sep 2022) +# pour two types of particles (cohesive and non-cohesive) on flat wall + +variable name string pour_two_types + +atom_style sphere +units lj + +############################################### +# Geometry-related parameters +############################################### + +variable boxx equal 20 +variable boxy equal 20 +variable boxz equal 30 + +variable xc1 equal 0.3*${boxx} +variable xc1 equal 0.3*20 +variable xc2 equal 0.7*${boxx} +variable xc2 equal 0.7*20 +variable yc equal 0.5*${boxy} +variable yc equal 0.5*20 + +############################################### +# Particle-related parameters +############################################### +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.25 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.5 + +variable dens equal 1.0 + +variable skin equal 0.3*${rhi} +variable skin equal 0.3*0.5 + +############# +processors * * 1 +region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} +region boxreg block 0 20 0 ${boxy} 0 ${boxz} +region boxreg block 0 20 0 20 0 ${boxz} +region boxreg block 0 20 0 20 0 30 +create_box 2 boxreg +Created orthogonal box = (0 0 0) to (20 20 30) + 1 by 1 by 1 MPI processor grid +change_box all boundary p p f +Changing box ... + +pair_style granular +pair_coeff 1 * jkr 1000.0 50.0 0.3 10 tangential mindlin 800.0 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall +pair_coeff 2 2 hertz 200.0 20.0 tangential linear_history 300.0 1.0 0.1 rolling sds 200.0 100.0 0.1 twisting marshall + +comm_modify vel yes + +region insreg1 cylinder z ${xc1} ${yc} 5 15 ${boxz} +region insreg1 cylinder z 6 ${yc} 5 15 ${boxz} +region insreg1 cylinder z 6 10 5 15 ${boxz} +region insreg1 cylinder z 6 10 5 15 30 +region insreg2 cylinder z ${xc2} ${yc} 5 15 ${boxz} +region insreg2 cylinder z 14 ${yc} 5 15 ${boxz} +region insreg2 cylinder z 14 10 5 15 ${boxz} +region insreg2 cylinder z 14 10 5 15 30 + +fix 1 all nve/sphere +fix grav all gravity 10.0 vector 0 0 -1 +fix ins1 all pour 1500 1 3123 region insreg1 diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens ${dens} ${dens} +fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens 1 ${dens} +fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens 1 1 +Particle insertion: 562 every 346 steps, 1500 by step 693 +fix ins2 all pour 1500 2 3123 region insreg2 diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens ${dens} ${dens} +fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens 1 ${dens} +fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens 1 1 +Particle insertion: 562 every 346 steps, 1500 by step 693 + +neighbor ${skin} bin +neighbor 0.15 bin +neigh_modify delay 0 every 1 check yes + +fix 3 all wall/gran granular hertz/material 1e5 1e3 0.3 tangential mindlin NULL 1.0 0.5 zplane 0 NULL + +thermo_style custom step atoms ke +thermo_modify lost warn +thermo 100 + +timestep 0.001 + +#dump 1 all custom 100 ${name}.dump id type radius mass x y z + +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.15 + ghost atom cutoff = 1.15 + binsize = 0.575, bins = 35 35 53 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair granular, perpetual + attributes: half, newton on, size, history + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 15.27 | 15.27 | 15.27 Mbytes + Step Atoms KinEng + 0 0 -0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 100 926 -0 + 200 926 -0 + 300 926 -0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 400 1498 -0 + 500 1498 -0 + 600 1498 -0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 700 2275 -0 + 800 2275 -0 + 900 2275 -0 + 1000 2275 -0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 1100 2954 -0 + 1200 2954 -0 + 1300 2954 -0 + 1400 3000 -0 + 1500 3000 -0 + 1600 3000 -0 + 1700 3000 -0 + 1800 3000 -0 + 1900 3000 -0 + 2000 3000 -0 + 2100 3000 -0 + 2200 3000 -0 + 2300 3000 -0 + 2400 3000 -0 + 2500 3000 -0 + 2600 3000 -0 + 2700 3000 -0 + 2800 3000 -0 + 2900 3000 -0 + 3000 3000 -0 + 3100 3000 -0 + 3200 3000 -0 + 3300 3000 -0 + 3400 3000 -0 + 3500 3000 -0 + 3600 3000 -0 + 3700 3000 -0 + 3800 3000 -0 + 3900 3000 -0 + 4000 3000 -0 + 4100 3000 -0 + 4200 3000 -0 + 4300 3000 -0 + 4400 3000 -0 + 4500 3000 -0 + 4600 3000 -0 + 4700 3000 -0 + 4800 3000 -0 + 4900 3000 -0 + 5000 3000 -0 +Loop time of 10.7721 on 1 procs for 5000 steps with 3000 atoms + +Performance: 40103.467 tau/day, 464.160 timesteps/s, 1.392 Matom-step/s +99.5% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 8.1117 | 8.1117 | 8.1117 | 0.0 | 75.30 +Neigh | 1.2885 | 1.2885 | 1.2885 | 0.0 | 11.96 +Comm | 0.059888 | 0.059888 | 0.059888 | 0.0 | 0.56 +Output | 0.0011158 | 0.0011158 | 0.0011158 | 0.0 | 0.01 +Modify | 1.2436 | 1.2436 | 1.2436 | 0.0 | 11.54 +Other | | 0.06727 | | | 0.62 + +Nlocal: 3000 ave 3000 max 3000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 471 ave 471 max 471 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 16713 ave 16713 max 16713 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 16713 +Ave neighs/atom = 5.571 +Neighbor list builds = 1102 +Dangerous builds = 0 +Total wall time: 0:00:10 diff --git a/examples/granular/log.15Sep22.pour.flatwall.g++.4 b/examples/granular/log.15Sep22.pour.flatwall.g++.4 new file mode 100644 index 0000000000..5fb99ea042 --- /dev/null +++ b/examples/granular/log.15Sep22.pour.flatwall.g++.4 @@ -0,0 +1,195 @@ +LAMMPS (15 Sep 2022) +# pour two types of particles (cohesive and non-cohesive) on flat wall + +variable name string pour_two_types + +atom_style sphere +units lj + +############################################### +# Geometry-related parameters +############################################### + +variable boxx equal 20 +variable boxy equal 20 +variable boxz equal 30 + +variable xc1 equal 0.3*${boxx} +variable xc1 equal 0.3*20 +variable xc2 equal 0.7*${boxx} +variable xc2 equal 0.7*20 +variable yc equal 0.5*${boxy} +variable yc equal 0.5*20 + +############################################### +# Particle-related parameters +############################################### +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.25 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.5 + +variable dens equal 1.0 + +variable skin equal 0.3*${rhi} +variable skin equal 0.3*0.5 + +############# +processors * * 1 +region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} +region boxreg block 0 20 0 ${boxy} 0 ${boxz} +region boxreg block 0 20 0 20 0 ${boxz} +region boxreg block 0 20 0 20 0 30 +create_box 2 boxreg +Created orthogonal box = (0 0 0) to (20 20 30) + 2 by 2 by 1 MPI processor grid +change_box all boundary p p f +Changing box ... + +pair_style granular +pair_coeff 1 * jkr 1000.0 50.0 0.3 10 tangential mindlin 800.0 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall +pair_coeff 2 2 hertz 200.0 20.0 tangential linear_history 300.0 1.0 0.1 rolling sds 200.0 100.0 0.1 twisting marshall + +comm_modify vel yes + +region insreg1 cylinder z ${xc1} ${yc} 5 15 ${boxz} +region insreg1 cylinder z 6 ${yc} 5 15 ${boxz} +region insreg1 cylinder z 6 10 5 15 ${boxz} +region insreg1 cylinder z 6 10 5 15 30 +region insreg2 cylinder z ${xc2} ${yc} 5 15 ${boxz} +region insreg2 cylinder z 14 ${yc} 5 15 ${boxz} +region insreg2 cylinder z 14 10 5 15 ${boxz} +region insreg2 cylinder z 14 10 5 15 30 + +fix 1 all nve/sphere +fix grav all gravity 10.0 vector 0 0 -1 +fix ins1 all pour 1500 1 3123 region insreg1 diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens ${dens} ${dens} +fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens 1 ${dens} +fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens 1 1 +Particle insertion: 562 every 346 steps, 1500 by step 693 +fix ins2 all pour 1500 2 3123 region insreg2 diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens ${dens} ${dens} +fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens 1 ${dens} +fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens 1 1 +Particle insertion: 562 every 346 steps, 1500 by step 693 + +neighbor ${skin} bin +neighbor 0.15 bin +neigh_modify delay 0 every 1 check yes + +fix 3 all wall/gran granular hertz/material 1e5 1e3 0.3 tangential mindlin NULL 1.0 0.5 zplane 0 NULL + +thermo_style custom step atoms ke +thermo_modify lost warn +thermo 100 + +timestep 0.001 + +#dump 1 all custom 100 ${name}.dump id type radius mass x y z + +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.15 + ghost atom cutoff = 1.15 + binsize = 0.575, bins = 35 35 53 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair granular, perpetual + attributes: half, newton on, size, history + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 15.04 | 15.04 | 15.04 Mbytes + Step Atoms KinEng + 0 0 -0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 100 926 -0 + 200 926 -0 + 300 926 -0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 400 1498 -0 + 500 1498 -0 + 600 1498 -0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 700 2275 -0 + 800 2275 -0 + 900 2275 -0 + 1000 2275 -0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 1100 2954 -0 + 1200 2954 -0 + 1300 2954 -0 + 1400 3000 -0 + 1500 3000 -0 + 1600 3000 -0 + 1700 3000 -0 + 1800 3000 -0 + 1900 3000 -0 + 2000 3000 -0 + 2100 3000 -0 + 2200 3000 -0 + 2300 3000 -0 + 2400 3000 -0 + 2500 3000 -0 + 2600 3000 -0 + 2700 3000 -0 + 2800 3000 -0 + 2900 3000 -0 + 3000 3000 -0 + 3100 3000 -0 + 3200 3000 -0 + 3300 3000 -0 + 3400 3000 -0 + 3500 3000 -0 + 3600 3000 -0 + 3700 3000 -0 + 3800 3000 -0 + 3900 3000 -0 + 4000 3000 -0 + 4100 3000 -0 + 4200 3000 -0 + 4300 3000 -0 + 4400 3000 -0 + 4500 3000 -0 + 4600 3000 -0 + 4700 3000 -0 + 4800 3000 -0 + 4900 3000 -0 + 5000 3000 -0 +Loop time of 4.06277 on 4 procs for 5000 steps with 3000 atoms + +Performance: 106331.276 tau/day, 1230.686 timesteps/s, 3.692 Matom-step/s +98.7% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.85426 | 1.7801 | 2.7631 | 64.4 | 43.82 +Neigh | 0.18775 | 0.25657 | 0.3279 | 11.5 | 6.32 +Comm | 0.23605 | 1.3334 | 2.3703 | 81.6 | 32.82 +Output | 0.00059456 | 0.0008165 | 0.0012002 | 0.0 | 0.02 +Modify | 0.59336 | 0.64066 | 0.6864 | 4.3 | 15.77 +Other | | 0.05122 | | | 1.26 + +Nlocal: 750 ave 1032 max 463 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 426.5 ave 482 max 375 min +Histogram: 1 1 0 0 0 0 0 1 0 1 +Neighs: 4164.25 ave 6310 max 1941 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 16657 +Ave neighs/atom = 5.5523333 +Neighbor list builds = 1114 +Dangerous builds = 0 +Total wall time: 0:00:04 diff --git a/examples/granular/log.15Sep22.pour.heat.g++.1 b/examples/granular/log.15Sep22.pour.heat.g++.1 new file mode 100644 index 0000000000..d232752c74 --- /dev/null +++ b/examples/granular/log.15Sep22.pour.heat.g++.1 @@ -0,0 +1,1172 @@ +LAMMPS (15 Sep 2022) +# pour one types of particles into cylinder and oscillate +# temperature of the bottom plate + +variable name string heat_plate + +atom_style sphere/temp +units lj + +############################################### +# Geometry-related parameters +############################################### + +variable boxx equal 10 +variable boxy equal 10 +variable boxz equal 50 + +variable drum_rad equal ${boxx}*0.5 +variable drum_rad equal 10*0.5 +variable drum_height equal 30 + +variable xc equal 0.5*${boxx} +variable xc equal 0.5*10 +variable yc equal 0.5*${boxx} +variable yc equal 0.5*10 +variable zc equal 0.5*${boxz} +variable zc equal 0.5*50 + +############################################### +# Particle-related parameters +############################################### +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.25 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.5 + +variable cyl_rad_inner equal ${drum_rad}-1.1*${rhi} +variable cyl_rad_inner equal 5-1.1*${rhi} +variable cyl_rad_inner equal 5-1.1*0.5 + +variable dens equal 1.0 + +variable skin equal 0.4*${rhi} +variable skin equal 0.4*0.5 + +############# +processors * * 1 +region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} +region boxreg block 0 10 0 ${boxy} 0 ${boxz} +region boxreg block 0 10 0 10 0 ${boxz} +region boxreg block 0 10 0 10 0 50 +create_box 2 boxreg +Created orthogonal box = (0 0 0) to (10 10 50) + 1 by 1 by 1 MPI processor grid +change_box all boundary p p f +Changing box ... + +pair_style granular +pair_coeff * * hertz/material 1e5 0.2 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 + +region curved_wall cylinder z ${xc} ${yc} ${drum_rad} 0 ${drum_height} side in +region curved_wall cylinder z 5 ${yc} ${drum_rad} 0 ${drum_height} side in +region curved_wall cylinder z 5 5 ${drum_rad} 0 ${drum_height} side in +region curved_wall cylinder z 5 5 5 0 ${drum_height} side in +region curved_wall cylinder z 5 5 5 0 30 side in +region bottom_wall plane ${xc} ${yc} 0 0 0 1 side in +region bottom_wall plane 5 ${yc} 0 0 0 1 side in +region bottom_wall plane 5 5 0 0 0 1 side in + +region insreg cylinder z ${xc} ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 5 ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 5 5 ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 5 5 4.45 ${drum_height} ${boxz} +region insreg cylinder z 5 5 4.45 30 ${boxz} +region insreg cylinder z 5 5 4.45 30 50 + +fix 0 all balance 100 1.0 shift xy 5 1.1 +fix 1 all nve/sphere +fix 2 all heat/flow/sphere/temp constant 1.0 +fix grav all gravity 10 vector 0 0 -1 +fix ins1 all pour 1000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins1 all pour 1000 1 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins1 all pour 1000 1 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} +fix ins1 all pour 1000 1 1234 region insreg diam range 0.5 1 dens 1 ${dens} +fix ins1 all pour 1000 1 1234 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 594 every 400 steps, 1000 by step 401 +fix ins2 all pour 1000 2 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins2 all pour 1000 2 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins2 all pour 1000 2 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} +fix ins2 all pour 1000 2 1234 region insreg diam range 0.5 1 dens 1 ${dens} +fix ins2 all pour 1000 2 1234 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 594 every 400 steps, 1000 by step 401 + +comm_modify vel yes + +neighbor ${skin} bin +neighbor 0.2 bin +neigh_modify delay 0 every 1 check yes + +variable oscillate equal 1.0*sin(step*0.0001) + +fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall +fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 region bottom_wall temperature v_oscillate + +thermo_style custom step atoms ke pxx pyy pzz +thermo_modify lost warn +thermo 100 + +timestep 0.001 + +#dump 1 all custom 1000 ${name}.dump id type radius mass x y z temperature heatflow + +#For removal later +compute 1 all property/atom radius +variable zmax atom z+c_1>0.5*${drum_height} +variable zmax atom z+c_1>0.5*30 +group delgroup dynamic all var zmax every 10000 +dynamic group delgroup defined + +run 100000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.2 + ghost atom cutoff = 1.2 + binsize = 0.6, bins = 17 17 84 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair granular, perpetual + attributes: half, newton on, size, history + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.944 | 5.944 | 5.944 Mbytes + Step Atoms KinEng Pxx Pyy Pzz + 0 0 -0 0 0 0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 100 536 -0 0 0 7.4220499 + 200 536 -0 0 0 10.753096 + 300 536 -0 0 0 13.500241 + 400 536 -0 0 0 18.036636 +WARNING: Less insertions than requested (../fix_pour.cpp:681) +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 500 903 -0 0 0 25.955524 + 600 903 -0 0 0 32.116907 + 700 903 -0 0.03620165 0.033499977 32.179357 + 800 903 -0 0.2106713 0.26431108 36.206318 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 900 1265 -0 0.2667335 0.20266671 44.177757 + 1000 1265 -0 0.51829264 0.67739216 49.904079 + 1100 1265 -0 0.87526847 0.66040207 53.13465 + 1200 1265 -0 0.7989492 0.81976513 54.277194 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 1300 1618 -0 1.0736038 1.2317728 60.921948 + 1400 1618 -0 3.6835952 3.1929764 60.725834 + 1500 1618 -0 2.756994 2.611876 61.575807 + 1600 1618 -0 3.3981246 3.253067 61.920098 + 1700 2000 -0 3.8273855 3.6731016 68.643557 + 1800 2000 -0 4.7528855 4.4495018 69.914035 + 1900 2000 -0 5.1197897 5.3612522 76.341875 + 2000 2000 -0 7.4609619 7.3959134 76.619654 + 2100 2000 -0 6.8808532 7.6237902 73.684129 + 2200 2000 -0 10.034925 9.4881564 72.897703 + 2300 2000 -0 10.110575 10.379096 70.330499 + 2400 2000 -0 12.458237 12.285825 68.726515 + 2500 2000 -0 11.081771 11.120864 59.216898 + 2600 2000 -0 11.441977 11.532286 57.698842 + 2700 2000 -0 12.285359 11.905254 56.086117 + 2800 2000 -0 13.392058 13.168532 54.678918 + 2900 2000 -0 12.439277 12.212282 49.214122 + 3000 2000 -0 11.12664 11.09865 43.35763 + 3100 2000 -0 12.899283 12.735645 45.72121 + 3200 2000 -0 13.397802 12.892421 40.82795 + 3300 2000 -0 11.935141 11.858897 33.412627 + 3400 2000 -0 12.005889 11.539848 29.290034 + 3500 2000 -0 13.311405 13.11741 27.54997 + 3600 2000 -0 11.985219 11.954031 21.79518 + 3700 2000 -0 10.728636 9.800667 14.497682 + 3800 2000 -0 10.082744 9.6420894 12.241554 + 3900 2000 -0 9.6227604 9.1331298 10.31104 + 4000 2000 -0 8.9197423 8.5118438 7.6564098 + 4100 2000 -0 8.224539 7.765121 6.4246439 + 4200 2000 -0 7.8352874 7.3855212 5.9657978 + 4300 2000 -0 7.84891 7.3973377 6.2217099 + 4400 2000 -0 7.9743441 7.5242803 6.7082653 + 4500 2000 -0 7.9906412 7.5831386 6.7093176 + 4600 2000 -0 7.9382395 7.4929459 6.4150432 + 4700 2000 -0 7.9318996 7.4971722 6.4746841 + 4800 2000 -0 7.9685751 7.5471868 6.6574514 + 4900 2000 -0 7.9524289 7.516294 6.5660525 + 5000 2000 -0 7.9378811 7.5115542 6.5001617 + 5100 2000 -0 7.9266301 7.5073503 6.5253548 + 5200 2000 -0 7.9434374 7.5177496 6.5845847 + 5300 2000 -0 7.9305032 7.5191693 6.5372085 + 5400 2000 -0 7.9402877 7.5254309 6.5520449 + 5500 2000 -0 7.9427052 7.5280949 6.5557961 + 5600 2000 -0 7.9391493 7.5233972 6.5331874 + 5700 2000 -0 7.9399937 7.5202519 6.543535 + 5800 2000 -0 7.9398529 7.5228566 6.54443 + 5900 2000 -0 7.9410688 7.5260002 6.5435973 + 6000 2000 -0 7.941019 7.5216292 6.5431831 + 6100 2000 -0 7.9390808 7.5219254 6.5415317 + 6200 2000 -0 7.9481596 7.5395611 6.5622388 + 6300 2000 -0 7.9490652 7.5315638 6.5562056 + 6400 2000 -0 7.9427506 7.5243388 6.5431344 + 6500 2000 -0 7.9452629 7.5265503 6.5495796 + 6600 2000 -0 7.9458414 7.5249099 6.5533876 + 6700 2000 -0 7.94418 7.525769 6.5394106 + 6800 2000 -0 7.943729 7.5287032 6.5405826 + 6900 2000 -0 7.947609 7.5300725 6.5559575 + 7000 2000 -0 7.9443102 7.5257838 6.5463817 + 7100 2000 -0 7.9441301 7.5276861 6.5381619 + 7200 2000 -0 7.9454486 7.5282359 6.5456825 + 7300 2000 -0 7.945263 7.5286763 6.5512798 + 7400 2000 -0 7.9420874 7.527752 6.5445142 + 7500 2000 -0 7.9441062 7.5272938 6.5441649 + 7600 2000 -0 7.9457317 7.528108 6.5503985 + 7700 2000 -0 7.9440802 7.5278111 6.5470895 + 7800 2000 -0 7.9431937 7.5265385 6.541355 + 7900 2000 -0 7.9443162 7.5279484 6.5500105 + 8000 2000 -0 7.9494361 7.5285053 6.5534428 + 8100 2000 -0 7.946984 7.5263991 6.5455634 + 8200 2000 -0 7.9484464 7.5274982 6.5494966 + 8300 2000 -0 7.9481535 7.5274655 6.5501241 + 8400 2000 -0 7.9479539 7.5273074 6.5488317 + 8500 2000 -0 7.9485734 7.5277795 6.5512236 + 8600 2000 -0 7.9479221 7.528244 6.5500855 + 8700 2000 -0 7.9478183 7.5276603 6.5489063 + 8800 2000 -0 7.948203 7.5284835 6.5517141 + 8900 2000 -0 7.9485476 7.5282914 6.5523536 + 9000 2000 -0 7.9480852 7.527842 6.5485105 + 9100 2000 -0 7.9503303 7.5292996 6.5521516 + 9200 2000 -0 7.9484069 7.5284723 6.5532887 + 9300 2000 -0 7.9477781 7.5273643 6.5479285 + 9400 2000 -0 7.9480058 7.5281007 6.5494258 + 9500 2000 -0 7.9502363 7.5292831 6.5551525 + 9600 2000 -0 7.9491036 7.5284568 6.5495709 + 9700 2000 -0 7.9486046 7.5277883 6.5479749 + 9800 2000 -0 7.949523 7.5288246 6.5522055 + 9900 2000 -0 7.9494267 7.5284447 6.5514459 + 10000 2000 -0 7.9488016 7.5280346 6.5482727 + 10100 2000 -0 7.9490863 7.5283793 6.5508377 + 10200 2000 -0 7.9494738 7.5286559 6.5521934 + 10300 2000 -0 7.94897 7.5280769 6.5494088 + 10400 2000 -0 7.9491066 7.52825 6.5501939 + 10500 2000 -0 7.9493209 7.5285384 6.5519118 + 10600 2000 -0 7.9491644 7.5282301 6.5502712 + 10700 2000 -0 7.9491801 7.5281441 6.5499963 + 10800 2000 -0 7.9493282 7.5284381 6.5515091 + 10900 2000 -0 7.9492367 7.5283402 6.5507061 + 11000 2000 -0 7.9491668 7.5282029 6.5500415 + 11100 2000 -0 7.9493582 7.5283461 6.5510357 + 11200 2000 -0 7.949305 7.5283898 6.55098 + 11300 2000 -0 7.9491619 7.5282773 6.5501609 + 11400 2000 -0 7.9492854 7.5283288 6.5506804 + 11500 2000 -0 7.9493516 7.5283815 6.5509932 + 11600 2000 -0 7.9492185 7.5283196 6.5504137 + 11700 2000 -0 7.9492341 7.5283288 6.5505111 + 11800 2000 -0 7.9493062 7.5283673 6.5508542 + 11900 2000 -0 7.9492738 7.5283272 6.5506104 + 12000 2000 -0 7.9492546 7.5283062 6.5505492 + 12100 2000 -0 7.9492631 7.5283416 6.5507445 + 12200 2000 -0 7.9492627 7.5283173 6.5506804 + 12300 2000 -0 7.9492692 7.5282802 6.5506371 + 12400 2000 -0 7.9492646 7.5282953 6.550753 + 12500 2000 -0 7.9492316 7.5282905 6.5507057 + 12600 2000 -0 7.9492342 7.5282624 6.5506826 + 12700 2000 -0 7.9492517 7.5282775 6.5507828 + 12800 2000 -0 7.9492092 7.5282666 6.5507381 + 12900 2000 -0 7.9491704 7.528266 6.550672 + 13000 2000 -0 7.9491743 7.5282771 6.550743 + 13100 2000 -0 7.9491605 7.5282824 6.5507079 + 13200 2000 -0 7.9491217 7.5282926 6.5506177 + 13300 2000 -0 7.9491063 7.5283202 6.5506443 + 13400 2000 -0 7.949103 7.5283325 6.5506231 + 13500 2000 -0 7.9490907 7.5283364 6.5505438 + 13600 2000 -0 7.9490835 7.5283584 6.5505599 + 13700 2000 -0 7.9490777 7.5283759 6.5505599 + 13800 2000 -0 7.9490712 7.5283756 6.5504932 + 13900 2000 -0 7.9490785 7.5283817 6.5505065 + 14000 2000 -0 7.9490815 7.5283933 6.5505387 + 14100 2000 -0 7.9490684 7.528393 6.5504862 + 14200 2000 -0 7.9490688 7.5283905 6.5504794 + 14300 2000 -0 7.9490814 7.5283907 6.5505315 + 14400 2000 -0 7.9490755 7.5283879 6.5505125 + 14500 2000 -0 7.949065 7.5283808 6.5504867 + 14600 2000 -0 7.9490721 7.5283768 6.5505326 + 14700 2000 -0 7.9490774 7.5283658 6.5505527 + 14800 2000 -0 7.9490719 7.5283503 6.5505371 + 14900 2000 -0 7.9490734 7.5283397 6.5505695 + 15000 2000 -0 7.9490832 7.5283255 6.5506123 + 15100 2000 -0 7.9490922 7.5283034 6.5506235 + 15200 2000 -0 7.9491032 7.5282854 6.550654 + 15300 2000 -0 7.9491184 7.5282713 6.5507005 + 15400 2000 -0 7.9491364 7.5282536 6.5507233 + 15500 2000 -0 7.9491577 7.5282382 6.5507454 + 15600 2000 -0 7.949183 7.5282317 6.550776 + 15700 2000 -0 7.9491951 7.5282268 6.5507835 + 15800 2000 -0 7.9492105 7.5282249 6.5507815 + 15900 2000 -0 7.9492261 7.5282273 6.5507862 + 16000 2000 -0 7.949236 7.5282329 6.5507802 + 16100 2000 -0 7.9492433 7.5282403 6.5507646 + 16200 2000 -0 7.9492443 7.5282461 6.5507548 + 16300 2000 -0 7.9492487 7.528255 6.5507491 + 16400 2000 -0 7.9492492 7.5282612 6.5507372 + 16500 2000 -0 7.9492486 7.5282664 6.5507287 + 16600 2000 -0 7.9492482 7.5282702 6.5507259 + 16700 2000 -0 7.9492484 7.528271 6.550724 + 16800 2000 -0 7.949248 7.5282702 6.550724 + 16900 2000 -0 7.9492465 7.5282682 6.5507268 + 17000 2000 -0 7.9492458 7.5282638 6.550732 + 17100 2000 -0 7.9492503 7.5282577 6.5507415 + 17200 2000 -0 7.949245 7.528249 6.5507522 + 17300 2000 -0 7.949242 7.5282399 6.5507633 + 17400 2000 -0 7.9492423 7.5282314 6.5507781 + 17500 2000 -0 7.9492337 7.5282196 6.5507929 + 17600 2000 -0 7.9492257 7.5282097 6.5508056 + 17700 2000 -0 7.9492144 7.528202 6.5508153 + 17800 2000 -0 7.9492005 7.5281972 6.5508223 + 17900 2000 -0 7.9491836 7.5281958 6.5508215 + 18000 2000 -0 7.949164 7.5281986 6.550812 + 18100 2000 -0 7.949143 7.5282062 6.5507959 + 18200 2000 -0 7.9491222 7.5282177 6.550773 + 18300 2000 -0 7.9491032 7.5282315 6.5507447 + 18400 2000 -0 7.9490869 7.5282471 6.5507157 + 18500 2000 -0 7.9490738 7.5282631 6.5506876 + 18600 2000 -0 7.9490639 7.5282782 6.5506612 + 18700 2000 -0 7.9490575 7.5282917 6.5506397 + 18800 2000 -0 7.9490536 7.5283031 6.5506231 + 18900 2000 -0 7.9490511 7.5283122 6.5506095 + 19000 2000 -0 7.9490498 7.528319 6.5505999 + 19100 2000 -0 7.9490494 7.5283236 6.5505947 + 19200 2000 -0 7.9490504 7.5283266 6.5505913 + 19300 2000 -0 7.9490487 7.5283271 6.5505908 + 19400 2000 -0 7.9490481 7.5283251 6.5505927 + 19500 2000 -0 7.9490469 7.5283215 6.550597 + 19600 2000 -0 7.949046 7.5283161 6.5506036 + 19700 2000 -0 7.9490455 7.5283086 6.5506131 + 19800 2000 -0 7.9490454 7.5282989 6.5506262 + 19900 2000 -0 7.9490466 7.528287 6.550643 + 20000 2000 -0 7.9490497 7.5282729 6.5506641 + 20100 2000 -0 7.9490553 7.5282568 6.5506893 + 20200 2000 -0 7.949064 7.5282394 6.5507187 + 20300 2000 -0 7.9490762 7.5282213 6.5507507 + 20400 2000 -0 7.949092 7.5282037 6.5507836 + 20500 2000 -0 7.94911 7.5281878 6.5508144 + 20600 2000 -0 7.9491297 7.5281748 6.5508407 + 20700 2000 -0 7.9491494 7.5281658 6.5508604 + 20800 2000 -0 7.9491678 7.528161 6.5508721 + 20900 2000 -0 7.9491837 7.5281604 6.5508761 + 21000 2000 -0 7.9491965 7.5281634 6.5508735 + 21100 2000 -0 7.949206 7.5281691 6.5508664 + 21200 2000 -0 7.9492125 7.5281763 6.5508566 + 21300 2000 -0 7.9492165 7.5281841 6.5508459 + 21400 2000 -0 7.9492186 7.5281916 6.5508355 + 21500 2000 -0 7.9492193 7.5281981 6.5508266 + 21600 2000 -0 7.9492209 7.5282042 6.5508206 + 21700 2000 -0 7.9492183 7.5282068 6.5508151 + 21800 2000 -0 7.9492181 7.5282082 6.550813 + 21900 2000 -0 7.9492172 7.5282078 6.5508133 + 22000 2000 -0 7.9492165 7.5282053 6.5508164 + 22100 2000 -0 7.949216 7.5282009 6.5508221 + 22200 2000 -0 7.9492152 7.5281947 6.5508303 + 22300 2000 -0 7.9492139 7.5281868 6.5508407 + 22400 2000 -0 7.9492119 7.5281776 6.5508533 + 22500 2000 -0 7.9492085 7.5281675 6.5508672 + 22600 2000 -0 7.9492032 7.5281571 6.5508813 + 22700 2000 -0 7.9491954 7.5281475 6.5508947 + 22800 2000 -0 7.9491847 7.5281397 6.5509055 + 22900 2000 -0 7.9491707 7.5281345 6.5509114 + 23000 2000 -0 7.9491537 7.5281331 6.5509109 + 23100 2000 -0 7.9491342 7.528136 6.5509027 + 23200 2000 -0 7.9491134 7.5281433 6.5508866 + 23300 2000 -0 7.9490926 7.5281544 6.5508637 + 23400 2000 -0 7.9490734 7.5281684 6.5508363 + 23500 2000 -0 7.9490569 7.528184 6.550807 + 23600 2000 -0 7.9490436 7.5281999 6.5507785 + 23700 2000 -0 7.9490338 7.5282151 6.5507528 + 23800 2000 -0 7.9490271 7.5282287 6.550731 + 23900 2000 -0 7.9490229 7.5282402 6.5507135 + 24000 2000 -0 7.949022 7.5282475 6.5507052 + 24100 2000 -0 7.9490192 7.5282571 6.5506903 + 24200 2000 -0 7.9490187 7.5282612 6.5506857 + 24300 2000 -0 7.9490182 7.5282637 6.5506814 + 24400 2000 -0 7.9490176 7.5282644 6.5506802 + 24500 2000 -0 7.9490169 7.5282632 6.5506827 + 24600 2000 -0 7.9490162 7.52826 6.5506869 + 24700 2000 -0 7.949015 7.5282547 6.5506925 + 24800 2000 -0 7.9490143 7.5282475 6.5507019 + 24900 2000 -0 7.9490142 7.5282382 6.5507152 + 25000 2000 -0 7.949015 7.5282266 6.5507309 + 25100 2000 -0 7.9490178 7.5282127 6.5507512 + 25200 2000 -0 7.9490231 7.5281971 6.5507767 + 25300 2000 -0 7.9490313 7.5281798 6.5508053 + 25400 2000 -0 7.949043 7.5281617 6.5508367 + 25500 2000 -0 7.9490581 7.5281441 6.5508697 + 25600 2000 -0 7.949076 7.5281281 6.5509009 + 25700 2000 -0 7.9490959 7.528112 6.550928 + 25800 2000 -0 7.9491161 7.5281041 6.5509477 + 25900 2000 -0 7.9491345 7.5280996 6.5509612 + 26000 2000 -0 7.9491506 7.5280986 6.5509657 + 26100 2000 -0 7.9491638 7.5281011 6.5509636 + 26200 2000 -0 7.949174 7.5281064 6.5509573 + 26300 2000 -0 7.949181 7.5281134 6.5509475 + 26400 2000 -0 7.9491854 7.5281211 6.5509367 + 26500 2000 -0 7.9491879 7.5281286 6.5509264 + 26600 2000 -0 7.9491889 7.5281353 6.5509172 + 26700 2000 -0 7.9491886 7.5281409 6.5509104 + 26800 2000 -0 7.9491886 7.5281441 6.5509048 + 26900 2000 -0 7.9491879 7.5281458 6.5509024 + 27000 2000 -0 7.9491875 7.5281457 6.5509025 + 27100 2000 -0 7.949187 7.5281435 6.5509052 + 27200 2000 -0 7.9491866 7.5281393 6.5509102 + 27300 2000 -0 7.9491861 7.5281333 6.5509181 + 27400 2000 -0 7.9491851 7.5281257 6.5509283 + 27500 2000 -0 7.9491834 7.5281166 6.5509402 + 27600 2000 -0 7.9491805 7.5281065 6.550954 + 27700 2000 -0 7.9491758 7.5280961 6.5509683 + 27800 2000 -0 7.9491687 7.5280862 6.5509818 + 27900 2000 -0 7.9491588 7.5280779 6.5509931 + 28000 2000 -0 7.9491457 7.5280721 6.5510002 + 28100 2000 -0 7.9491294 7.5280699 6.551001 + 28200 2000 -0 7.9491105 7.5280718 6.5509942 + 28300 2000 -0 7.9490901 7.5280782 6.5509797 + 28400 2000 -0 7.9490695 7.5280885 6.550958 + 28500 2000 -0 7.9490501 7.5281019 6.5509312 + 28600 2000 -0 7.9490332 7.5281172 6.5509022 + 28700 2000 -0 7.9490195 7.5281331 6.5508735 + 28800 2000 -0 7.9490075 7.528149 6.5508475 + 28900 2000 -0 7.9490015 7.528163 6.5508246 + 29000 2000 -0 7.9489976 7.5281742 6.5508062 + 29100 2000 -0 7.9489952 7.5281837 6.5507921 + 29200 2000 -0 7.948994 7.5281911 6.550782 + 29300 2000 -0 7.9489934 7.5281962 6.5507753 + 29400 2000 -0 7.9489932 7.5281992 6.5507715 + 29500 2000 -0 7.9489929 7.5282002 6.5507702 + 29600 2000 -0 7.9489925 7.5281992 6.5507714 + 29700 2000 -0 7.9489918 7.5281964 6.5507748 + 29800 2000 -0 7.948991 7.5281916 6.5507805 + 29900 2000 -0 7.9489903 7.5281848 6.5507891 + 30000 2000 -0 7.9489901 7.5281759 6.5508007 + 30100 2000 -0 7.9489909 7.5281648 6.5508159 + 30200 2000 -0 7.9489933 7.5281515 6.5508353 + 30300 2000 -0 7.948998 7.5281362 6.550859 + 30400 2000 -0 7.9490056 7.5281192 6.5508868 + 30500 2000 -0 7.9490165 7.5281012 6.5509178 + 30600 2000 -0 7.9490309 7.5280833 6.5509503 + 30700 2000 -0 7.9490483 7.5280667 6.5509821 + 30800 2000 -0 7.9490676 7.5280525 6.5510103 + 30900 2000 -0 7.9490876 7.5280418 6.5510325 + 31000 2000 -0 7.9491067 7.5280353 6.5510472 + 31100 2000 -0 7.9491237 7.5280331 6.551054 + 31200 2000 -0 7.9491378 7.5280348 6.5510539 + 31300 2000 -0 7.9491487 7.5280394 6.5510483 + 31400 2000 -0 7.9491564 7.5280461 6.5510392 + 31500 2000 -0 7.9491615 7.5280537 6.5510287 + 31600 2000 -0 7.9491644 7.5280614 6.551018 + 31700 2000 -0 7.9491657 7.5280683 6.5510084 + 31800 2000 -0 7.949166 7.528074 6.5510005 + 31900 2000 -0 7.9491658 7.5280781 6.5509948 + 32000 2000 -0 7.9491652 7.5280804 6.5509914 + 32100 2000 -0 7.949165 7.5280809 6.5509907 + 32200 2000 -0 7.9491641 7.5280793 6.5509925 + 32300 2000 -0 7.9491637 7.5280757 6.5509969 + 32400 2000 -0 7.9491632 7.5280703 6.5510038 + 32500 2000 -0 7.9491625 7.5280632 6.5510132 + 32600 2000 -0 7.9491611 7.5280545 6.5510247 + 32700 2000 -0 7.9491587 7.5280447 6.5510379 + 32800 2000 -0 7.9491546 7.5280344 6.551052 + 32900 2000 -0 7.9491484 7.5280242 6.5510659 + 33000 2000 -0 7.9491395 7.5280153 6.5510781 + 33100 2000 -0 7.9491275 7.5280085 6.5510867 + 33200 2000 -0 7.9491123 7.528005 6.5510898 + 33300 2000 -0 7.9490942 7.5280055 6.5510857 + 33400 2000 -0 7.9490743 7.5280104 6.5510737 + 33500 2000 -0 7.9490536 7.5280195 6.5510543 + 33600 2000 -0 7.9490337 7.5280319 6.5510291 + 33700 2000 -0 7.9490159 7.5280467 6.5510006 + 33800 2000 -0 7.9490011 7.5280624 6.5509715 + 33900 2000 -0 7.9489897 7.528078 6.5509442 + 34000 2000 -0 7.9489816 7.5280924 6.5509203 + 34100 2000 -0 7.9489763 7.528105 6.5509004 + 34200 2000 -0 7.9489732 7.5281155 6.5508849 + 34300 2000 -0 7.9489717 7.5281236 6.5508735 + 34400 2000 -0 7.948971 7.5281295 6.5508656 + 34500 2000 -0 7.9489707 7.5281332 6.5508608 + 34600 2000 -0 7.9489705 7.5281349 6.5508586 + 34700 2000 -0 7.9489701 7.5281347 6.5508588 + 34800 2000 -0 7.9489695 7.5281326 6.5508613 + 34900 2000 -0 7.9489672 7.5281294 6.5508657 + 35000 2000 -0 7.9489679 7.5281227 6.5508731 + 35100 2000 -0 7.9489674 7.5281145 6.5508833 + 35200 2000 -0 7.9489677 7.5281044 6.5508973 + 35300 2000 -0 7.9489695 7.5280919 6.550915 + 35400 2000 -0 7.948973 7.5280774 6.5509365 + 35500 2000 -0 7.9489794 7.5280611 6.5509628 + 35600 2000 -0 7.9489889 7.5280435 6.5509926 + 35700 2000 -0 7.9490018 7.5280255 6.5510245 + 35800 2000 -0 7.949018 7.5280082 6.5510567 + 35900 2000 -0 7.9490366 7.5279929 6.5510867 + 36000 2000 -0 7.9490564 7.5279807 6.5511115 + 36100 2000 -0 7.949076 7.5279725 6.5511293 + 36200 2000 -0 7.949094 7.5279685 6.5511394 + 36300 2000 -0 7.9491093 7.5279687 6.5511419 + 36400 2000 -0 7.9491215 7.5279722 6.5511382 + 36500 2000 -0 7.9491305 7.5279782 6.5511304 + 36600 2000 -0 7.9491366 7.5279855 6.5511203 + 36700 2000 -0 7.9491403 7.5279933 6.5511095 + 36800 2000 -0 7.9491422 7.5280006 6.5510994 + 36900 2000 -0 7.9491429 7.5280069 6.5510907 + 37000 2000 -0 7.9491428 7.5280118 6.551084 + 37100 2000 -0 7.9491423 7.5280149 6.5510796 + 37200 2000 -0 7.9491417 7.5280162 6.5510777 + 37300 2000 -0 7.9491412 7.5280155 6.5510784 + 37400 2000 -0 7.9491407 7.5280129 6.5510816 + 37500 2000 -0 7.9491403 7.5280083 6.5510874 + 37600 2000 -0 7.9491397 7.528002 6.5510957 + 37700 2000 -0 7.9491387 7.527994 6.5511062 + 37800 2000 -0 7.9491368 7.5279847 6.5511187 + 37900 2000 -0 7.9491337 7.5279745 6.5511324 + 38000 2000 -0 7.9491286 7.5279642 6.5511466 + 38100 2000 -0 7.9491211 7.5279546 6.5511598 + 38200 2000 -0 7.9491106 7.5279467 6.5511704 + 38300 2000 -0 7.9490969 7.5279415 6.5511764 + 38400 2000 -0 7.9490802 7.52794 6.5511759 + 38500 2000 -0 7.9490611 7.5279428 6.5511678 + 38600 2000 -0 7.9490407 7.5279499 6.5511519 + 38700 2000 -0 7.9490203 7.5279608 6.5511293 + 38800 2000 -0 7.9490014 7.5279745 6.5511022 + 38900 2000 -0 7.9489851 7.5279899 6.5510732 + 39000 2000 -0 7.9489721 7.5280057 6.5510448 + 39100 2000 -0 7.9489624 7.5280208 6.5510192 + 39200 2000 -0 7.9489558 7.5280344 6.5509973 + 39300 2000 -0 7.9489516 7.528046 6.5509797 + 39400 2000 -0 7.9489493 7.5280554 6.5509663 + 39500 2000 -0 7.9489481 7.5280625 6.5509567 + 39600 2000 -0 7.9489476 7.5280674 6.5509503 + 39700 2000 -0 7.9489475 7.5280702 6.5509463 + 39800 2000 -0 7.9489472 7.5280711 6.5509448 + 39900 2000 -0 7.9489468 7.5280701 6.5509455 + 40000 2000 -0 7.9489461 7.5280673 6.5509484 + 40100 2000 -0 7.9489453 7.5280625 6.5509538 + 40200 2000 -0 7.9489445 7.5280556 6.5509619 + 40300 2000 -0 7.9489443 7.5280466 6.550973 + 40400 2000 -0 7.948945 7.5280353 6.5509879 + 40500 2000 -0 7.9489474 7.5280219 6.5510068 + 40600 2000 -0 7.9489521 7.5280065 6.5510299 + 40700 2000 -0 7.9489597 7.5279895 6.5510571 + 40800 2000 -0 7.9489706 7.5279716 6.5510876 + 40900 2000 -0 7.9489848 7.5279537 6.5511196 + 41000 2000 -0 7.9490019 7.5279372 6.5511508 + 41100 2000 -0 7.949021 7.5279231 6.5511783 + 41200 2000 -0 7.9490405 7.5279137 6.5512001 + 41300 2000 -0 7.9490593 7.5279062 6.551214 + 41400 2000 -0 7.9490759 7.527904 6.5512202 + 41500 2000 -0 7.9490897 7.5279058 6.5512195 + 41600 2000 -0 7.9491004 7.5279105 6.5512136 + 41700 2000 -0 7.9491078 7.5279171 6.5512042 + 41800 2000 -0 7.9491126 7.5279247 6.5511933 + 41900 2000 -0 7.9491153 7.5279324 6.5511823 + 42000 2000 -0 7.9491164 7.5279393 6.5511724 + 42100 2000 -0 7.9491165 7.527945 6.5511641 + 42200 2000 -0 7.949116 7.5279491 6.5511581 + 42300 2000 -0 7.9491153 7.5279515 6.5511543 + 42400 2000 -0 7.9491145 7.5279519 6.5511532 + 42500 2000 -0 7.9491138 7.5279504 6.5511545 + 42600 2000 -0 7.9491132 7.527947 6.5511584 + 42700 2000 -0 7.9491125 7.5279417 6.5511649 + 42800 2000 -0 7.9491115 7.5279347 6.5511737 + 42900 2000 -0 7.9491099 7.5279262 6.5511847 + 43000 2000 -0 7.9491074 7.5279165 6.5511975 + 43100 2000 -0 7.9491033 7.5279061 6.5512112 + 43200 2000 -0 7.9490971 7.5278959 6.5512249 + 43300 2000 -0 7.9490883 7.5278868 6.5512371 + 43400 2000 -0 7.9490764 7.5278798 6.5512459 + 43500 2000 -0 7.9490614 7.5278759 6.5512494 + 43600 2000 -0 7.9490435 7.5278759 6.5512459 + 43700 2000 -0 7.9490235 7.5278802 6.5512346 + 43800 2000 -0 7.9490027 7.5278887 6.5512158 + 43900 2000 -0 7.9489825 7.5279007 6.551191 + 44000 2000 -0 7.9489642 7.5279152 6.5511627 + 44100 2000 -0 7.9489489 7.5279308 6.5511334 + 44200 2000 -0 7.9489368 7.5279464 6.5511056 + 44300 2000 -0 7.9489281 7.5279609 6.5510809 + 44400 2000 -0 7.9489222 7.5279737 6.5510603 + 44500 2000 -0 7.9489186 7.5279844 6.551044 + 44600 2000 -0 7.9489166 7.5279929 6.5510317 + 44700 2000 -0 7.9489156 7.527999 6.551023 + 44800 2000 -0 7.948915 7.5280031 6.5510175 + 44900 2000 -0 7.9489146 7.5280051 6.5510146 + 45000 2000 -0 7.948914 7.5280052 6.5510141 + 45100 2000 -0 7.9489131 7.5280035 6.5510158 + 45200 2000 -0 7.948912 7.5279999 6.5510197 + 45300 2000 -0 7.9489109 7.5279944 6.5510261 + 45400 2000 -0 7.94891 7.5279869 6.5510353 + 45500 2000 -0 7.9489098 7.5279772 6.5510478 + 45600 2000 -0 7.9489107 7.5279654 6.551064 + 45700 2000 -0 7.9489134 7.5279514 6.5510843 + 45800 2000 -0 7.9489186 7.5279356 6.5511089 + 45900 2000 -0 7.9489269 7.5279183 6.5511373 + 46000 2000 -0 7.9489386 7.5279003 6.5511685 + 46100 2000 -0 7.9489535 7.5278828 6.5512004 + 46200 2000 -0 7.9489712 7.5278669 6.5512307 + 46300 2000 -0 7.9489904 7.5278538 6.5512567 + 46400 2000 -0 7.9490097 7.5278445 6.5512762 + 46500 2000 -0 7.9490278 7.5278394 6.551288 + 46600 2000 -0 7.9490435 7.5278384 6.5512921 + 46700 2000 -0 7.9490563 7.5278411 6.5512897 + 46800 2000 -0 7.9490658 7.5278464 6.5512826 + 46900 2000 -0 7.9490723 7.5278535 6.5512727 + 47000 2000 -0 7.9490763 7.5278612 6.5512617 + 47100 2000 -0 7.9490784 7.5278687 6.5512509 + 47200 2000 -0 7.949079 7.5278753 6.5512414 + 47300 2000 -0 7.9490788 7.5278807 6.5512337 + 47400 2000 -0 7.9490781 7.5278843 6.5512283 + 47500 2000 -0 7.9490772 7.5278862 6.5512252 + 47600 2000 -0 7.9490763 7.5278863 6.5512251 + 47700 2000 -0 7.9490756 7.5278844 6.5512274 + 47800 2000 -0 7.9490749 7.5278805 6.5512317 + 47900 2000 -0 7.9490741 7.5278748 6.5512387 + 48000 2000 -0 7.949073 7.5278674 6.5512483 + 48100 2000 -0 7.9490713 7.5278586 6.5512597 + 48200 2000 -0 7.9490684 7.5278487 6.5512726 + 48300 2000 -0 7.949064 7.5278383 6.5512866 + 48400 2000 -0 7.9490573 7.5278282 6.5513001 + 48500 2000 -0 7.9490478 7.5278194 6.5513115 + 48600 2000 -0 7.9490353 7.5278129 6.5513193 + 48700 2000 -0 7.9490196 7.5278097 6.5513215 + 48800 2000 -0 7.9490012 7.5278105 6.5513163 + 48900 2000 -0 7.948981 7.5278157 6.5513034 + 49000 2000 -0 7.9489603 7.527825 6.5512834 + 49100 2000 -0 7.9489405 7.5278375 6.5512576 + 49200 2000 -0 7.9489228 7.5278522 6.5512289 + 49300 2000 -0 7.9489081 7.5278678 6.5512 + 49400 2000 -0 7.9488969 7.5278831 6.5511728 + 49500 2000 -0 7.9488888 7.5278972 6.551149 + 49600 2000 -0 7.9488835 7.5279095 6.5511293 + 49700 2000 -0 7.9488803 7.5279197 6.5511139 + 49800 2000 -0 7.9488785 7.5279275 6.5511024 + 49900 2000 -0 7.9488776 7.5279332 6.5510945 + 50000 2000 -0 7.9488771 7.5279368 6.5510895 + 50100 2000 -0 7.9488767 7.5279384 6.5510871 + 50200 2000 -0 7.948876 7.5279381 6.551087 + 50300 2000 -0 7.9488752 7.5279359 6.5510891 + 50400 2000 -0 7.9488741 7.527932 6.5510934 + 50500 2000 -0 7.948873 7.5279261 6.5511002 + 50600 2000 -0 7.9488722 7.5279182 6.5511099 + 50700 2000 -0 7.9488721 7.5279081 6.5511229 + 50800 2000 -0 7.9488732 7.5278959 6.5511396 + 50900 2000 -0 7.9488763 7.5278816 6.5511605 + 51000 2000 -0 7.9488819 7.5278655 6.5511857 + 51100 2000 -0 7.9488907 7.527848 6.5512145 + 51200 2000 -0 7.9489028 7.52783 6.5512458 + 51300 2000 -0 7.9489182 7.5278126 6.5512776 + 51400 2000 -0 7.9489361 7.527797 6.5513073 + 51500 2000 -0 7.9489553 7.5277844 6.5513324 + 51600 2000 -0 7.9489746 7.5277755 6.5513508 + 51700 2000 -0 7.9489924 7.527771 6.5513615 + 51800 2000 -0 7.9490076 7.5277705 6.5513647 + 51900 2000 -0 7.9490195 7.5277737 6.5513615 + 52000 2000 -0 7.9490283 7.5277794 6.5513539 + 52100 2000 -0 7.949034 7.5277866 6.5513439 + 52200 2000 -0 7.949037 7.5277943 6.551333 + 52300 2000 -0 7.9490382 7.5278017 6.5513225 + 52400 2000 -0 7.9490381 7.5278081 6.5513134 + 52500 2000 -0 7.9490372 7.5278132 6.5513061 + 52600 2000 -0 7.9490358 7.5278167 6.5513011 + 52700 2000 -0 7.9490343 7.5278183 6.5512985 + 52800 2000 -0 7.9490329 7.5278181 6.5512989 + 52900 2000 -0 7.9490315 7.527816 6.5513015 + 53000 2000 -0 7.9490302 7.5278118 6.5513062 + 53100 2000 -0 7.9490288 7.5278059 6.5513136 + 53200 2000 -0 7.9490279 7.5277975 6.5513237 + 53300 2000 -0 7.9490241 7.5277891 6.5513356 + 53400 2000 -0 7.9490211 7.5277793 6.5513482 + 53500 2000 -0 7.949016 7.527769 6.5513626 + 53600 2000 -0 7.9490084 7.527759 6.5513764 + 53700 2000 -0 7.948998 7.5277502 6.5513874 + 53800 2000 -0 7.9489846 7.5277439 6.5513952 + 53900 2000 -0 7.9489681 7.527741 6.5513973 + 54000 2000 -0 7.9489489 7.5277421 6.5513917 + 54100 2000 -0 7.9489279 7.5277475 6.5513784 + 54200 2000 -0 7.9489066 7.527757 6.5513584 + 54300 2000 -0 7.9488862 7.5277697 6.5513326 + 54400 2000 -0 7.948868 7.5277844 6.5513039 + 54500 2000 -0 7.9488529 7.5278 6.5512754 + 54600 2000 -0 7.9488411 7.5278152 6.5512487 + 54700 2000 -0 7.9488325 7.5278292 6.5512253 + 54800 2000 -0 7.9488266 7.5278414 6.5512062 + 54900 2000 -0 7.9488228 7.5278514 6.5511912 + 55000 2000 -0 7.9488204 7.5278592 6.5511801 + 55100 2000 -0 7.9488188 7.5278647 6.5511725 + 55200 2000 -0 7.9488176 7.5278682 6.5511679 + 55300 2000 -0 7.9488165 7.5278697 6.5511657 + 55400 2000 -0 7.9488151 7.5278693 6.5511659 + 55500 2000 -0 7.9488136 7.5278672 6.5511683 + 55600 2000 -0 7.9488118 7.5278632 6.5511728 + 55700 2000 -0 7.94881 7.5278573 6.5511798 + 55800 2000 -0 7.9488085 7.5278494 6.5511897 + 55900 2000 -0 7.9488076 7.5278393 6.5512028 + 56000 2000 -0 7.9488081 7.5278272 6.5512196 + 56100 2000 -0 7.9488104 7.5278129 6.5512407 + 56200 2000 -0 7.9488153 7.5277968 6.5512659 + 56300 2000 -0 7.9488233 7.5277793 6.5512948 + 56400 2000 -0 7.9488347 7.5277613 6.5513262 + 56500 2000 -0 7.9488493 7.527744 6.5513581 + 56600 2000 -0 7.9488664 7.5277283 6.5513879 + 56700 2000 -0 7.9488849 7.5277157 6.5514132 + 56800 2000 -0 7.9489034 7.5277068 6.5514318 + 56900 2000 -0 7.9489205 7.5277022 6.5514428 + 57000 2000 -0 7.9489351 7.5277016 6.5514462 + 57100 2000 -0 7.9489467 7.5277046 6.5514434 + 57200 2000 -0 7.9489551 7.5277101 6.5514361 + 57300 2000 -0 7.9489606 7.5277172 6.5514261 + 57400 2000 -0 7.9489636 7.5277248 6.5514153 + 57500 2000 -0 7.9489647 7.5277322 6.5514049 + 57600 2000 -0 7.9489645 7.5277387 6.5513957 + 57700 2000 -0 7.9489634 7.5277438 6.5513885 + 57800 2000 -0 7.9489619 7.5277473 6.5513834 + 57900 2000 -0 7.9489603 7.527749 6.5513807 + 58000 2000 -0 7.9489587 7.5277489 6.551381 + 58100 2000 -0 7.9489572 7.5277469 6.5513835 + 58200 2000 -0 7.9489558 7.5277428 6.5513881 + 58300 2000 -0 7.9489543 7.527737 6.5513954 + 58400 2000 -0 7.9489526 7.5277295 6.5514052 + 58500 2000 -0 7.9489538 7.5277215 6.551417 + 58600 2000 -0 7.948947 7.5277103 6.5514298 + 58700 2000 -0 7.9489424 7.5276998 6.551444 + 58800 2000 -0 7.9489357 7.5276895 6.5514576 + 58900 2000 -0 7.9489261 7.5276803 6.5514692 + 59000 2000 -0 7.9489135 7.5276736 6.5514773 + 59100 2000 -0 7.9488978 7.5276701 6.5514798 + 59200 2000 -0 7.9488794 7.5276706 6.551475 + 59300 2000 -0 7.9488592 7.5276754 6.5514625 + 59400 2000 -0 7.9488384 7.5276843 6.5514429 + 59500 2000 -0 7.9488184 7.5276965 6.5514176 + 59600 2000 -0 7.9488006 7.5277108 6.5513894 + 59700 2000 -0 7.9487858 7.5277262 6.5513607 + 59800 2000 -0 7.9487742 7.5277411 6.5513338 + 59900 2000 -0 7.9487658 7.527755 6.5513102 + 60000 2000 -0 7.9487603 7.5277672 6.5512907 + 60100 2000 -0 7.9487569 7.5277771 6.5512753 + 60200 2000 -0 7.9487549 7.5277849 6.5512639 + 60300 2000 -0 7.9487538 7.5277905 6.551256 + 60400 2000 -0 7.9487531 7.5277939 6.551251 + 60500 2000 -0 7.9487525 7.5277954 6.5512486 + 60600 2000 -0 7.9487517 7.5277951 6.5512485 + 60700 2000 -0 7.9487507 7.5277929 6.5512505 + 60800 2000 -0 7.9487495 7.527789 6.5512547 + 60900 2000 -0 7.9487482 7.5277831 6.5512613 + 61000 2000 -0 7.9487471 7.5277753 6.5512707 + 61100 2000 -0 7.9487466 7.5277654 6.5512832 + 61200 2000 -0 7.9487474 7.5277534 6.5512994 + 61300 2000 -0 7.9487499 7.5277392 6.5513196 + 61400 2000 -0 7.9487549 7.5277231 6.551344 + 61500 2000 -0 7.9487629 7.5277057 6.5513722 + 61600 2000 -0 7.9487743 7.5276875 6.5514032 + 61700 2000 -0 7.9487889 7.5276698 6.5514349 + 61800 2000 -0 7.9488062 7.5276536 6.5514651 + 61900 2000 -0 7.9488251 7.5276402 6.5514912 + 62000 2000 -0 7.9488442 7.5276305 6.5515108 + 62100 2000 -0 7.9488621 7.5276249 6.5515229 + 62200 2000 -0 7.9488777 7.5276235 6.5515275 + 62300 2000 -0 7.9488903 7.5276257 6.5515255 + 62400 2000 -0 7.9488998 7.5276306 6.5515188 + 62500 2000 -0 7.9489063 7.5276373 6.5515091 + 62600 2000 -0 7.9489103 7.5276446 6.5514983 + 62700 2000 -0 7.9489123 7.5276519 6.5514876 + 62800 2000 -0 7.9489128 7.5276583 6.5514781 + 62900 2000 -0 7.9489125 7.5276635 6.5514704 + 63000 2000 -0 7.9489117 7.5276671 6.5514648 + 63100 2000 -0 7.9489107 7.5276689 6.5514616 + 63200 2000 -0 7.9489097 7.527669 6.5514611 + 63300 2000 -0 7.9489089 7.5276672 6.5514631 + 63400 2000 -0 7.9489086 7.5276637 6.5514673 + 63500 2000 -0 7.9489073 7.5276575 6.5514739 + 63600 2000 -0 7.9489063 7.5276501 6.551483 + 63700 2000 -0 7.9489046 7.5276413 6.5514942 + 63800 2000 -0 7.948902 7.5276313 6.5515069 + 63900 2000 -0 7.9488979 7.5276207 6.5515208 + 64000 2000 -0 7.9488918 7.5276102 6.5515346 + 64100 2000 -0 7.9488831 7.5276008 6.5515467 + 64200 2000 -0 7.9488713 7.5275934 6.5515557 + 64300 2000 -0 7.9488564 7.5275891 6.5515596 + 64400 2000 -0 7.9488387 7.5275886 6.5515566 + 64500 2000 -0 7.948819 7.5275923 6.551546 + 64600 2000 -0 7.9487983 7.5276002 6.551528 + 64700 2000 -0 7.9487782 7.5276117 6.5515039 + 64800 2000 -0 7.9487598 7.5276255 6.5514762 + 64900 2000 -0 7.9487443 7.5276407 6.5514474 + 65000 2000 -0 7.9487321 7.5276559 6.5514199 + 65100 2000 -0 7.9487231 7.5276701 6.5513954 + 65200 2000 -0 7.948717 7.5276826 6.5513748 + 65300 2000 -0 7.9487132 7.5276931 6.5513585 + 65400 2000 -0 7.948711 7.5277014 6.5513461 + 65500 2000 -0 7.9487098 7.5277075 6.5513372 + 65600 2000 -0 7.9487092 7.5277115 6.5513315 + 65700 2000 -0 7.9487086 7.5277135 6.5513284 + 65800 2000 -0 7.948708 7.5277137 6.5513277 + 65900 2000 -0 7.9487071 7.527712 6.5513291 + 66000 2000 -0 7.948706 7.5277085 6.5513326 + 66100 2000 -0 7.9487047 7.5277032 6.5513384 + 66200 2000 -0 7.9487036 7.527696 6.5513467 + 66300 2000 -0 7.9487029 7.5276867 6.5513582 + 66400 2000 -0 7.9487033 7.5276753 6.5513731 + 66500 2000 -0 7.9487052 7.5276618 6.551392 + 66600 2000 -0 7.9487093 7.5276463 6.5514151 + 66700 2000 -0 7.9487163 7.5276292 6.5514421 + 66800 2000 -0 7.9487266 7.5276112 6.5514722 + 66900 2000 -0 7.9487402 7.5275932 6.5515039 + 67000 2000 -0 7.9487567 7.5275765 6.5515348 + 67100 2000 -0 7.9487752 7.5275621 6.5515623 + 67200 2000 -0 7.9487943 7.5275511 6.5515841 + 67300 2000 -0 7.9488127 7.5275442 6.5515986 + 67400 2000 -0 7.9488291 7.5275415 6.5516055 + 67500 2000 -0 7.9488435 7.5275438 6.5516054 + 67600 2000 -0 7.9488528 7.5275468 6.5515999 + 67700 2000 -0 7.9488606 7.5275528 6.5515912 + 67800 2000 -0 7.9488653 7.52756 6.5515805 + 67900 2000 -0 7.9488678 7.5275674 6.5515696 + 68000 2000 -0 7.9488689 7.5275741 6.5515598 + 68100 2000 -0 7.9488688 7.5275798 6.5515513 + 68200 2000 -0 7.9488681 7.5275839 6.5515449 + 68300 2000 -0 7.9488671 7.5275863 6.5515409 + 68400 2000 -0 7.9488661 7.527587 6.5515394 + 68500 2000 -0 7.9488652 7.5275857 6.5515407 + 68600 2000 -0 7.9488645 7.5275825 6.551544 + 68700 2000 -0 7.9488637 7.5275774 6.5515497 + 68800 2000 -0 7.9488629 7.5275707 6.5515579 + 68900 2000 -0 7.9488616 7.5275623 6.5515684 + 69000 2000 -0 7.9488595 7.5275526 6.5515805 + 69100 2000 -0 7.9488561 7.5275422 6.551594 + 69200 2000 -0 7.9488509 7.5275315 6.5516081 + 69300 2000 -0 7.9488433 7.5275215 6.551621 + 69400 2000 -0 7.9488328 7.5275132 6.5516314 + 69500 2000 -0 7.9488192 7.5275075 6.5516376 + 69600 2000 -0 7.9488027 7.5275054 6.5516375 + 69700 2000 -0 7.9487837 7.5275074 6.5516299 + 69800 2000 -0 7.9487633 7.5275136 6.5516148 + 69900 2000 -0 7.9487429 7.5275237 6.551593 + 70000 2000 -0 7.9487238 7.5275367 6.5515664 + 70100 2000 -0 7.9487071 7.5275514 6.5515379 + 70200 2000 -0 7.9486936 7.5275666 6.5515098 + 70300 2000 -0 7.9486834 7.5275813 6.551484 + 70400 2000 -0 7.9486763 7.5275945 6.5514618 + 70500 2000 -0 7.9486716 7.5276059 6.5514438 + 70600 2000 -0 7.9486689 7.5276151 6.5514298 + 70700 2000 -0 7.9486674 7.527622 6.5514196 + 70800 2000 -0 7.9486667 7.5276269 6.5514127 + 70900 2000 -0 7.9486661 7.5276297 6.5514086 + 71000 2000 -0 7.9486656 7.5276306 6.5514069 + 71100 2000 -0 7.9486648 7.5276297 6.5514073 + 71200 2000 -0 7.9486638 7.527627 6.5514099 + 71300 2000 -0 7.9486626 7.5276226 6.5514146 + 71400 2000 -0 7.9486614 7.5276163 6.5514217 + 71500 2000 -0 7.9486605 7.527608 6.5514317 + 71600 2000 -0 7.9486603 7.5275976 6.5514449 + 71700 2000 -0 7.9486614 7.5275851 6.5514619 + 71800 2000 -0 7.9486644 7.5275705 6.5514829 + 71900 2000 -0 7.94867 7.5275542 6.5515081 + 72000 2000 -0 7.9486787 7.5275366 6.5515368 + 72100 2000 -0 7.9486908 7.5275189 6.551568 + 72200 2000 -0 7.9487059 7.5275011 6.5515994 + 72300 2000 -0 7.9487235 7.5274855 6.5516286 + 72400 2000 -0 7.9487426 7.5274729 6.5516533 + 72500 2000 -0 7.9487614 7.527464 6.5516713 + 72600 2000 -0 7.9487788 7.5274593 6.5516817 + 72700 2000 -0 7.9487938 7.5274587 6.5516848 + 72800 2000 -0 7.9488058 7.5274616 6.5516817 + 72900 2000 -0 7.9488146 7.5274669 6.5516742 + 73000 2000 -0 7.9488205 7.5274738 6.5516642 + 73100 2000 -0 7.9488269 7.5274812 6.5516534 + 73200 2000 -0 7.9488257 7.5274883 6.5516429 + 73300 2000 -0 7.9488261 7.5274945 6.5516336 + 73400 2000 -0 7.9488256 7.5274994 6.5516262 + 73500 2000 -0 7.9488248 7.5275027 6.551621 + 73600 2000 -0 7.9488238 7.5275043 6.5516181 + 73700 2000 -0 7.9488228 7.5275041 6.551618 + 73800 2000 -0 7.948822 7.527502 6.5516204 + 73900 2000 -0 7.9488212 7.5274979 6.5516247 + 74000 2000 -0 7.9488205 7.527492 6.5516315 + 74100 2000 -0 7.9488195 7.5274845 6.551641 + 74200 2000 -0 7.9488179 7.5274755 6.5516522 + 74300 2000 -0 7.9488153 7.5274655 6.551665 + 74400 2000 -0 7.9488112 7.5274549 6.5516789 + 74500 2000 -0 7.9488049 7.5274445 6.5516926 + 74600 2000 -0 7.9487961 7.5274352 6.5517045 + 74700 2000 -0 7.9487842 7.527428 6.5517132 + 74800 2000 -0 7.9487693 7.5274239 6.5517167 + 74900 2000 -0 7.9487516 7.5274236 6.5517132 + 75000 2000 -0 7.9487319 7.5274276 6.5517022 + 75100 2000 -0 7.9487114 7.5274356 6.551684 + 75200 2000 -0 7.9486914 7.5274472 6.5516598 + 75300 2000 -0 7.9486734 7.5274611 6.5516321 + 75400 2000 -0 7.9486581 7.5274761 6.5516036 + 75500 2000 -0 7.9486462 7.5274912 6.5515764 + 75600 2000 -0 7.9486374 7.5275053 6.5515521 + 75700 2000 -0 7.9486315 7.5275177 6.5515319 + 75800 2000 -0 7.9486278 7.5275281 6.5515157 + 75900 2000 -0 7.9486258 7.5275363 6.5515035 + 76000 2000 -0 7.9486247 7.5275423 6.5514948 + 76100 2000 -0 7.9486241 7.5275463 6.5514892 + 76200 2000 -0 7.9486236 7.5275483 6.5514861 + 76300 2000 -0 7.948623 7.5275484 6.5514853 + 76400 2000 -0 7.9486222 7.5275468 6.5514867 + 76500 2000 -0 7.9486211 7.5275435 6.5514901 + 76600 2000 -0 7.9486198 7.5275383 6.5514957 + 76700 2000 -0 7.9486187 7.5275312 6.5515039 + 76800 2000 -0 7.948618 7.5275222 6.551515 + 76900 2000 -0 7.9486182 7.527511 6.5515295 + 77000 2000 -0 7.9486199 7.5274977 6.551548 + 77100 2000 -0 7.9486238 7.5274825 6.5515706 + 77200 2000 -0 7.9486305 7.5274656 6.5515971 + 77300 2000 -0 7.9486405 7.5274478 6.5516268 + 77400 2000 -0 7.9486537 7.5274299 6.5516582 + 77500 2000 -0 7.9486699 7.527413 6.551689 + 77600 2000 -0 7.9486881 7.5273985 6.5517168 + 77700 2000 -0 7.9487072 7.5273872 6.5517391 + 77800 2000 -0 7.9487256 7.5273799 6.5517543 + 77900 2000 -0 7.9487421 7.5273768 6.5517619 + 78000 2000 -0 7.948756 7.5273776 6.5517625 + 78100 2000 -0 7.9487668 7.5273814 6.5517576 + 78200 2000 -0 7.9487745 7.5273874 6.551749 + 78300 2000 -0 7.9487795 7.5273946 6.5517385 + 78400 2000 -0 7.9487822 7.527402 6.5517276 + 78500 2000 -0 7.9487834 7.5274089 6.5517175 + 78600 2000 -0 7.9487834 7.5274147 6.5517089 + 78700 2000 -0 7.9487828 7.5274191 6.5517022 + 78800 2000 -0 7.9487818 7.5274218 6.5516978 + 78900 2000 -0 7.9487808 7.5274228 6.5516958 + 79000 2000 -0 7.9487799 7.5274219 6.5516967 + 79100 2000 -0 7.9487792 7.5274192 6.5516996 + 79200 2000 -0 7.9487784 7.5274145 6.5517047 + 79300 2000 -0 7.9487776 7.5274081 6.5517124 + 79400 2000 -0 7.9487765 7.5274002 6.5517225 + 79500 2000 -0 7.9487747 7.5273908 6.5517341 + 79600 2000 -0 7.9487717 7.5273805 6.5517474 + 79700 2000 -0 7.948767 7.52737 6.5517614 + 79800 2000 -0 7.9487601 7.5273598 6.5517746 + 79900 2000 -0 7.9487504 7.527351 6.5517858 + 80000 2000 -0 7.9487377 7.5273446 6.5517931 + 80100 2000 -0 7.9487219 7.5273416 6.5517947 + 80200 2000 -0 7.9487036 7.5273426 6.551789 + 80300 2000 -0 7.9486836 7.5273478 6.5517759 + 80400 2000 -0 7.9486632 7.5273569 6.5517558 + 80500 2000 -0 7.9486437 7.5273692 6.5517304 + 80600 2000 -0 7.9486265 7.5273836 6.5517023 + 80700 2000 -0 7.9486122 7.5273987 6.5516741 + 80800 2000 -0 7.9486012 7.5274136 6.5516477 + 80900 2000 -0 7.9485934 7.5274272 6.5516246 + 81000 2000 -0 7.9485882 7.5274391 6.5516056 + 81100 2000 -0 7.9485859 7.5274494 6.5515908 + 81200 2000 -0 7.9485834 7.5274563 6.5515794 + 81300 2000 -0 7.9485825 7.5274618 6.5515718 + 81400 2000 -0 7.948582 7.5274652 6.5515669 + 81500 2000 -0 7.9485815 7.5274667 6.5515644 + 81600 2000 -0 7.9485809 7.5274664 6.5515643 + 81700 2000 -0 7.94858 7.5274644 6.5515662 + 81800 2000 -0 7.9485788 7.5274606 6.55157 + 81900 2000 -0 7.9485776 7.527455 6.5515762 + 82000 2000 -0 7.9485765 7.5274475 6.5515851 + 82100 2000 -0 7.9485759 7.527438 6.5515969 + 82200 2000 -0 7.9485764 7.5274264 6.5516123 + 82300 2000 -0 7.9485786 7.5274127 6.5516316 + 82400 2000 -0 7.9485831 7.5273971 6.551655 + 82500 2000 -0 7.9485904 7.52738 6.5516822 + 82600 2000 -0 7.948601 7.5273621 6.5517124 + 82700 2000 -0 7.9486149 7.5273443 6.5517438 + 82800 2000 -0 7.9486316 7.5273279 6.5517741 + 82900 2000 -0 7.9486501 7.527314 6.5518008 + 83000 2000 -0 7.948669 7.5273036 6.5518216 + 83100 2000 -0 7.9486871 7.5272973 6.5518351 + 83200 2000 -0 7.9487031 7.527295 6.5518411 + 83300 2000 -0 7.9487163 7.5272965 6.5518404 + 83400 2000 -0 7.9487263 7.5273009 6.5518346 + 83500 2000 -0 7.9487334 7.5273073 6.5518255 + 83600 2000 -0 7.9487379 7.5273145 6.5518149 + 83700 2000 -0 7.9487402 7.5273219 6.5518041 + 83800 2000 -0 7.9487411 7.5273286 6.5517942 + 83900 2000 -0 7.948741 7.5273342 6.551786 + 84000 2000 -0 7.9487402 7.5273383 6.5517797 + 84100 2000 -0 7.9487392 7.5273407 6.5517757 + 84200 2000 -0 7.9487383 7.5273413 6.5517743 + 84300 2000 -0 7.9487374 7.5273402 6.5517756 + 84400 2000 -0 7.9487366 7.5273371 6.5517789 + 84500 2000 -0 7.9487359 7.5273321 6.5517843 + 84600 2000 -0 7.9487351 7.5273255 6.5517925 + 84700 2000 -0 7.948734 7.5273173 6.5518029 + 84800 2000 -0 7.948732 7.5273078 6.5518148 + 84900 2000 -0 7.9487288 7.5272974 6.5518282 + 85000 2000 -0 7.9487239 7.5272869 6.5518422 + 85100 2000 -0 7.9487166 7.5272769 6.5518552 + 85200 2000 -0 7.9487066 7.5272684 6.5518659 + 85300 2000 -0 7.9486935 7.5272625 6.5518726 + 85400 2000 -0 7.9486774 7.52726 6.5518732 + 85500 2000 -0 7.9486588 7.5272615 6.5518665 + 85600 2000 -0 7.9486387 7.5272673 6.5518525 + 85700 2000 -0 7.9486184 7.5272769 6.5518316 + 85800 2000 -0 7.9485993 7.5272895 6.5518058 + 85900 2000 -0 7.9485825 7.527304 6.5517777 + 86000 2000 -0 7.9485687 7.5273192 6.5517496 + 86100 2000 -0 7.9485582 7.5273338 6.5517237 + 86200 2000 -0 7.9485508 7.5273473 6.5517012 + 86300 2000 -0 7.9485459 7.5273589 6.5516828 + 86400 2000 -0 7.948543 7.5273683 6.5516683 + 86500 2000 -0 7.9485415 7.5273756 6.5516577 + 86600 2000 -0 7.9485407 7.5273808 6.5516504 + 86700 2000 -0 7.9485402 7.527384 6.5516458 + 86800 2000 -0 7.9485398 7.5273853 6.5516437 + 86900 2000 -0 7.9485391 7.5273848 6.5516437 + 87000 2000 -0 7.9485382 7.5273826 6.5516457 + 87100 2000 -0 7.948537 7.5273787 6.5516498 + 87200 2000 -0 7.9485358 7.527373 6.5516562 + 87300 2000 -0 7.9485347 7.5273654 6.5516652 + 87400 2000 -0 7.9485342 7.5273557 6.5516772 + 87500 2000 -0 7.9485348 7.527344 6.5516928 + 87600 2000 -0 7.9485371 7.5273302 6.5517124 + 87700 2000 -0 7.9485417 7.5273145 6.551736 + 87800 2000 -0 7.9485492 7.5272974 6.5517634 + 87900 2000 -0 7.9485605 7.5272797 6.5517928 + 88000 2000 -0 7.9485752 7.5272622 6.5518233 + 88100 2000 -0 7.9485926 7.5272462 6.5518526 + 88200 2000 -0 7.9486117 7.5272327 6.5518779 + 88300 2000 -0 7.9486313 7.5272227 6.5518973 + 88400 2000 -0 7.9486498 7.5272169 6.5519096 + 88500 2000 -0 7.9486663 7.5272151 6.5519142 + 88600 2000 -0 7.9486799 7.5272169 6.5519123 + 88700 2000 -0 7.9486904 7.5272216 6.5519055 + 88800 2000 -0 7.9486979 7.5272282 6.5518954 + 88900 2000 -0 7.9487028 7.5272357 6.5518839 + 89000 2000 -0 7.9487057 7.5272433 6.5518724 + 89100 2000 -0 7.9487072 7.5272501 6.5518617 + 89200 2000 -0 7.9487076 7.5272558 6.5518526 + 89300 2000 -0 7.9487074 7.5272601 6.5518456 + 89400 2000 -0 7.9487071 7.5272626 6.5518409 + 89500 2000 -0 7.9487067 7.5272635 6.5518386 + 89600 2000 -0 7.9487065 7.5272625 6.5518391 + 89700 2000 -0 7.9487063 7.5272596 6.5518416 + 89800 2000 -0 7.9487063 7.5272548 6.5518462 + 89900 2000 -0 7.9487061 7.5272484 6.5518535 + 90000 2000 -0 7.9487056 7.5272404 6.551863 + 90100 2000 -0 7.9487043 7.5272311 6.551874 + 90200 2000 -0 7.9487018 7.527221 6.5518866 + 90300 2000 -0 7.9486975 7.5272106 6.5518997 + 90400 2000 -0 7.948691 7.5272008 6.5519118 + 90500 2000 -0 7.9486816 7.5271925 6.5519217 + 90600 2000 -0 7.9486692 7.5271867 6.5519276 + 90700 2000 -0 7.9486538 7.5271843 6.5519275 + 90800 2000 -0 7.948636 7.527186 6.5519202 + 90900 2000 -0 7.9486166 7.5271918 6.5519055 + 91000 2000 -0 7.948597 7.5272016 6.551884 + 91100 2000 -0 7.9485784 7.5272143 6.5518575 + 91200 2000 -0 7.9485622 7.5272289 6.5518287 + 91300 2000 -0 7.948549 7.5272442 6.5517999 + 91400 2000 -0 7.9485391 7.5272591 6.5517731 + 91500 2000 -0 7.9485322 7.5272727 6.5517498 + 91600 2000 -0 7.9485279 7.5272845 6.5517305 + 91700 2000 -0 7.9485256 7.5272942 6.5517151 + 91800 2000 -0 7.9485247 7.5273018 6.5517036 + 91900 2000 -0 7.9485245 7.5273072 6.5516953 + 92000 2000 -0 7.9485247 7.5273107 6.5516898 + 92100 2000 -0 7.9485248 7.5273122 6.5516867 + 92200 2000 -0 7.9485251 7.5273121 6.5516858 + 92300 2000 -0 7.9485248 7.5273103 6.5516869 + 92400 2000 -0 7.948524 7.5273066 6.5516899 + 92500 2000 -0 7.9485234 7.5273012 6.5516952 + 92600 2000 -0 7.9485229 7.527294 6.5517031 + 92700 2000 -0 7.9485229 7.5272848 6.5517139 + 92800 2000 -0 7.948524 7.5272735 6.5517283 + 92900 2000 -0 7.9485267 7.5272601 6.5517465 + 93000 2000 -0 7.9485317 7.5272448 6.5517688 + 93100 2000 -0 7.9485395 7.527228 6.5517949 + 93200 2000 -0 7.9485506 7.5272104 6.5518239 + 93300 2000 -0 7.9485649 7.527193 6.5518542 + 93400 2000 -0 7.9485821 7.5271768 6.5518835 + 93500 2000 -0 7.948601 7.527163 6.5519093 + 93600 2000 -0 7.9486206 7.5271527 6.5519294 + 93700 2000 -0 7.9486392 7.5271464 6.5519423 + 93800 2000 -0 7.9486559 7.5271442 6.5519477 + 93900 2000 -0 7.9486698 7.5271457 6.5519465 + 94000 2000 -0 7.9486807 7.5271502 6.55194 + 94100 2000 -0 7.9486885 7.5271566 6.5519303 + 94200 2000 -0 7.9486937 7.527164 6.5519188 + 94300 2000 -0 7.9486968 7.5271716 6.5519072 + 94400 2000 -0 7.9486984 7.5271785 6.5518964 + 94500 2000 -0 7.948699 7.5271843 6.5518871 + 94600 2000 -0 7.948699 7.5271887 6.5518798 + 94700 2000 -0 7.9486987 7.5271915 6.5518747 + 94800 2000 -0 7.9486984 7.5271925 6.5518721 + 94900 2000 -0 7.9486982 7.5271918 6.5518722 + 95000 2000 -0 7.9486982 7.5271891 6.5518743 + 95100 2000 -0 7.9486982 7.5271846 6.5518785 + 95200 2000 -0 7.948698 7.5271783 6.5518855 + 95300 2000 -0 7.9486978 7.5271706 6.5518946 + 95400 2000 -0 7.9486968 7.5271614 6.5519053 + 95500 2000 -0 7.9486946 7.5271514 6.5519176 + 95600 2000 -0 7.9486908 7.527141 6.5519306 + 95700 2000 -0 7.9486848 7.527131 6.551943 + 95800 2000 -0 7.948676 7.5271224 6.5519533 + 95900 2000 -0 7.9486643 7.5271161 6.55196 + 96000 2000 -0 7.9486496 7.527113 6.5519611 + 96100 2000 -0 7.9486322 7.5271138 6.5519551 + 96200 2000 -0 7.9486132 7.5271189 6.5519417 + 96300 2000 -0 7.9485937 7.5271279 6.5519214 + 96400 2000 -0 7.948575 7.5271401 6.5518957 + 96500 2000 -0 7.9485584 7.5271543 6.5518672 + 96600 2000 -0 7.9485447 7.5271695 6.5518384 + 96700 2000 -0 7.9485343 7.5271845 6.5518111 + 96800 2000 -0 7.948527 7.5271983 6.5517871 + 96900 2000 -0 7.9485224 7.5272105 6.5517671 + 97000 2000 -0 7.9485199 7.5272206 6.551751 + 97100 2000 -0 7.9485188 7.5272285 6.5517387 + 97200 2000 -0 7.9485186 7.5272343 6.5517298 + 97300 2000 -0 7.9485188 7.5272381 6.5517238 + 97400 2000 -0 7.9485191 7.52724 6.5517202 + 97500 2000 -0 7.9485192 7.5272402 6.5517188 + 97600 2000 -0 7.9485191 7.5272387 6.5517194 + 97700 2000 -0 7.9485187 7.5272354 6.551722 + 97800 2000 -0 7.9485181 7.5272305 6.5517267 + 97900 2000 -0 7.9485176 7.5272237 6.5517339 + 98000 2000 -0 7.9485176 7.5272149 6.5517439 + 98100 2000 -0 7.9485184 7.5272041 6.5517572 + 98200 2000 -0 7.9485207 7.5271913 6.5517744 + 98300 2000 -0 7.9485251 7.5271764 6.5517956 + 98400 2000 -0 7.9485322 7.52716 6.5518207 + 98500 2000 -0 7.9485424 7.5271426 6.5518489 + 98600 2000 -0 7.948556 7.527125 6.5518789 + 98700 2000 -0 7.9485724 7.5271084 6.5519086 + 98800 2000 -0 7.948591 7.5270939 6.5519354 + 98900 2000 -0 7.9486105 7.5270826 6.551957 + 99000 2000 -0 7.9486296 7.5270752 6.5519718 + 99100 2000 -0 7.9486469 7.5270719 6.5519792 + 99200 2000 -0 7.9486615 7.5270725 6.5519795 + 99300 2000 -0 7.9486732 7.5270763 6.5519743 + 99400 2000 -0 7.9486818 7.5270822 6.5519652 + 99500 2000 -0 7.9486877 7.5270895 6.551954 + 99600 2000 -0 7.9486913 7.527097 6.5519424 + 99700 2000 -0 7.9486933 7.5271042 6.5519313 + 99800 2000 -0 7.9486941 7.5271104 6.5519215 + 99900 2000 -0 7.9486942 7.5271152 6.5519136 + 100000 2000 -0 7.9486939 7.5271185 6.5519079 +Loop time of 87.7116 on 1 procs for 100000 steps with 2000 atoms + +Performance: 98504.589 tau/day, 1140.099 timesteps/s, 2.280 Matom-step/s +99.5% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 66.081 | 66.081 | 66.081 | 0.0 | 75.34 +Neigh | 2.7411 | 2.7411 | 2.7411 | 0.0 | 3.13 +Comm | 1.3393 | 1.3393 | 1.3393 | 0.0 | 1.53 +Output | 0.029473 | 0.029473 | 0.029473 | 0.0 | 0.03 +Modify | 16.598 | 16.598 | 16.598 | 0.0 | 18.92 +Other | | 0.9233 | | | 1.05 + +Nlocal: 2000 ave 2000 max 2000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 494 ave 494 max 494 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 9635 ave 9635 max 9635 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 9635 +Ave neighs/atom = 4.8175 +Neighbor list builds = 3285 +Dangerous builds = 0 + +Total wall time: 0:01:27 diff --git a/examples/granular/log.15Sep22.pour.heat.g++.4 b/examples/granular/log.15Sep22.pour.heat.g++.4 new file mode 100644 index 0000000000..f159302d65 --- /dev/null +++ b/examples/granular/log.15Sep22.pour.heat.g++.4 @@ -0,0 +1,1172 @@ +LAMMPS (15 Sep 2022) +# pour one types of particles into cylinder and oscillate +# temperature of the bottom plate + +variable name string heat_plate + +atom_style sphere/temp +units lj + +############################################### +# Geometry-related parameters +############################################### + +variable boxx equal 10 +variable boxy equal 10 +variable boxz equal 50 + +variable drum_rad equal ${boxx}*0.5 +variable drum_rad equal 10*0.5 +variable drum_height equal 30 + +variable xc equal 0.5*${boxx} +variable xc equal 0.5*10 +variable yc equal 0.5*${boxx} +variable yc equal 0.5*10 +variable zc equal 0.5*${boxz} +variable zc equal 0.5*50 + +############################################### +# Particle-related parameters +############################################### +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.25 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.5 + +variable cyl_rad_inner equal ${drum_rad}-1.1*${rhi} +variable cyl_rad_inner equal 5-1.1*${rhi} +variable cyl_rad_inner equal 5-1.1*0.5 + +variable dens equal 1.0 + +variable skin equal 0.4*${rhi} +variable skin equal 0.4*0.5 + +############# +processors * * 1 +region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} +region boxreg block 0 10 0 ${boxy} 0 ${boxz} +region boxreg block 0 10 0 10 0 ${boxz} +region boxreg block 0 10 0 10 0 50 +create_box 2 boxreg +Created orthogonal box = (0 0 0) to (10 10 50) + 2 by 2 by 1 MPI processor grid +change_box all boundary p p f +Changing box ... + +pair_style granular +pair_coeff * * hertz/material 1e5 0.2 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 + +region curved_wall cylinder z ${xc} ${yc} ${drum_rad} 0 ${drum_height} side in +region curved_wall cylinder z 5 ${yc} ${drum_rad} 0 ${drum_height} side in +region curved_wall cylinder z 5 5 ${drum_rad} 0 ${drum_height} side in +region curved_wall cylinder z 5 5 5 0 ${drum_height} side in +region curved_wall cylinder z 5 5 5 0 30 side in +region bottom_wall plane ${xc} ${yc} 0 0 0 1 side in +region bottom_wall plane 5 ${yc} 0 0 0 1 side in +region bottom_wall plane 5 5 0 0 0 1 side in + +region insreg cylinder z ${xc} ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 5 ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 5 5 ${cyl_rad_inner} ${drum_height} ${boxz} +region insreg cylinder z 5 5 4.45 ${drum_height} ${boxz} +region insreg cylinder z 5 5 4.45 30 ${boxz} +region insreg cylinder z 5 5 4.45 30 50 + +fix 0 all balance 100 1.0 shift xy 5 1.1 +fix 1 all nve/sphere +fix 2 all heat/flow/sphere/temp constant 1.0 +fix grav all gravity 10 vector 0 0 -1 +fix ins1 all pour 1000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins1 all pour 1000 1 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins1 all pour 1000 1 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} +fix ins1 all pour 1000 1 1234 region insreg diam range 0.5 1 dens 1 ${dens} +fix ins1 all pour 1000 1 1234 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 594 every 400 steps, 1000 by step 401 +fix ins2 all pour 1000 2 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} +fix ins2 all pour 1000 2 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} +fix ins2 all pour 1000 2 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} +fix ins2 all pour 1000 2 1234 region insreg diam range 0.5 1 dens 1 ${dens} +fix ins2 all pour 1000 2 1234 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 594 every 400 steps, 1000 by step 401 + +comm_modify vel yes + +neighbor ${skin} bin +neighbor 0.2 bin +neigh_modify delay 0 every 1 check yes + +variable oscillate equal 1.0*sin(step*0.0001) + +fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall +fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 region bottom_wall temperature v_oscillate + +thermo_style custom step atoms ke pxx pyy pzz +thermo_modify lost warn +thermo 100 + +timestep 0.001 + +#dump 1 all custom 1000 ${name}.dump id type radius mass x y z temperature heatflow + +#For removal later +compute 1 all property/atom radius +variable zmax atom z+c_1>0.5*${drum_height} +variable zmax atom z+c_1>0.5*30 +group delgroup dynamic all var zmax every 10000 +dynamic group delgroup defined + +run 100000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.2 + ghost atom cutoff = 1.2 + binsize = 0.6, bins = 17 17 84 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair granular, perpetual + attributes: half, newton on, size, history + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.847 | 5.847 | 5.847 Mbytes + Step Atoms KinEng Pxx Pyy Pzz + 0 0 -0 0 0 0 +WARNING: Less insertions than requested (../fix_pour.cpp:681) +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 100 536 -0 0 0 7.4220499 + 200 536 -0 0 0 10.753096 + 300 536 -0 0 0 13.500241 + 400 536 -0 0 0 18.036636 +WARNING: Less insertions than requested (../fix_pour.cpp:681) +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 500 903 -0 0 0 25.955524 + 600 903 -0 0 0 32.116907 + 700 903 -0 0.03620165 0.033499977 32.179357 + 800 903 -0 0.2106713 0.26431108 36.206318 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 900 1265 -0 0.2667335 0.20266671 44.177757 + 1000 1265 -0 0.51829265 0.67739212 49.904079 + 1100 1265 -0 0.87525564 0.6604066 53.13465 + 1200 1265 -0 0.8016023 0.82120199 54.27487 +WARNING: Less insertions than requested (../fix_pour.cpp:681) + 1300 1618 -0 1.0922969 1.2299526 61.033455 + 1400 1618 -0 3.4739827 3.2058732 60.989867 + 1500 1618 -0 2.952107 2.7920855 61.208615 + 1600 1618 -0 3.4540208 3.5863396 62.262722 + 1700 2000 -0 3.8875418 4.0835421 69.087737 + 1800 2000 -0 4.1780246 5.0584026 70.734293 + 1900 2000 -0 4.5873576 4.7767119 76.481264 + 2000 2000 -0 7.1355414 6.9027373 76.136305 + 2100 2000 -0 7.3292721 6.9457021 74.022659 + 2200 2000 -0 9.1771132 9.0399042 72.911506 + 2300 2000 -0 9.5743887 10.359952 70.996904 + 2400 2000 -0 12.1002 12.023765 68.246157 + 2500 2000 -0 10.68678 11.126488 59.337387 + 2600 2000 -0 10.444117 10.845713 57.115639 + 2700 2000 -0 12.012219 11.766618 56.397063 + 2800 2000 -0 12.987283 13.30882 55.411279 + 2900 2000 -0 11.55722 12.213726 48.690822 + 3000 2000 -0 11.124576 11.369397 43.425073 + 3100 2000 -0 12.54896 12.507632 45.15522 + 3200 2000 -0 13.119307 13.345554 41.469993 + 3300 2000 -0 12.07449 11.769699 32.849662 + 3400 2000 -0 11.409224 11.606583 28.228622 + 3500 2000 -0 13.30178 13.057278 28.120788 + 3600 2000 -0 12.362318 12.451842 22.030785 + 3700 2000 -0 10.065639 10.350313 14.404919 + 3800 2000 -0 9.2215449 9.4216178 10.78298 + 3900 2000 -0 9.1484555 9.2548793 9.4609704 + 4000 2000 -0 8.7679202 8.7720055 7.9592505 + 4100 2000 -0 7.9639161 8.0843783 6.2748484 + 4200 2000 -0 7.4475613 7.662972 5.7240274 + 4300 2000 -0 7.3834943 7.5643205 5.8884721 + 4400 2000 -0 7.5767328 7.7567295 6.4335134 + 4500 2000 -0 7.6350768 7.7802709 6.5220595 + 4600 2000 -0 7.5680597 7.7360764 6.2252142 + 4700 2000 -0 7.5455586 7.7200666 6.1870466 + 4800 2000 -0 7.5889323 7.7502568 6.3364001 + 4900 2000 -0 7.5976185 7.7506557 6.3511631 + 5000 2000 -0 7.5729575 7.7396108 6.226979 + 5100 2000 -0 7.5828423 7.7333361 6.2543182 + 5200 2000 -0 7.5997211 7.7682298 6.3300795 + 5300 2000 -0 7.5951405 7.7598744 6.3224087 + 5400 2000 -0 7.5703525 7.7452048 6.2321318 + 5500 2000 -0 7.5893936 7.7516359 6.2777047 + 5600 2000 -0 7.596363 7.7645306 6.3388976 + 5700 2000 -0 7.5889409 7.7570078 6.2848334 + 5800 2000 -0 7.5820271 7.7456337 6.2569579 + 5900 2000 -0 7.5946475 7.7646155 6.3117599 + 6000 2000 -0 7.5979789 7.7656429 6.3160667 + 6100 2000 -0 7.586255 7.7584393 6.2682341 + 6200 2000 -0 7.5860817 7.7574904 6.2792591 + 6300 2000 -0 7.5952765 7.7646058 6.3189922 + 6400 2000 -0 7.5996199 7.7770424 6.2986723 + 6500 2000 -0 7.5902888 7.7688566 6.2761571 + 6600 2000 -0 7.5950388 7.76863 6.2895943 + 6700 2000 -0 7.5966236 7.7691368 6.302048 + 6800 2000 -0 7.5939532 7.7641262 6.2726096 + 6900 2000 -0 7.5951993 7.7682327 6.2895245 + 7000 2000 -0 7.6023185 7.7697092 6.3080702 + 7100 2000 -0 7.5960578 7.7674031 6.2848334 + 7200 2000 -0 7.5982345 7.7654466 6.2788045 + 7300 2000 -0 7.6023187 7.7710769 6.3041624 + 7400 2000 -0 7.5974296 7.7673886 6.283173 + 7500 2000 -0 7.5973168 7.7670675 6.2788593 + 7600 2000 -0 7.5996473 7.7703847 6.2996016 + 7700 2000 -0 7.5973523 7.7680426 6.2917276 + 7800 2000 -0 7.5955633 7.7663282 6.2774422 + 7900 2000 -0 7.596774 7.7680408 6.2913039 + 8000 2000 -0 7.5990211 7.7682504 6.2971218 + 8100 2000 -0 7.5969667 7.7674553 6.2827596 + 8200 2000 -0 7.5968217 7.768405 6.2864438 + 8300 2000 -0 7.6003301 7.7675972 6.2968783 + 8400 2000 -0 7.5968968 7.7675447 6.2851363 + 8500 2000 -0 7.5964945 7.7664669 6.2821348 + 8600 2000 -0 7.59847 7.7686981 6.2935599 + 8700 2000 -0 7.5973531 7.7680237 6.2892401 + 8800 2000 -0 7.5962388 7.7660642 6.2824211 + 8900 2000 -0 7.5974758 7.7679467 6.2894374 + 9000 2000 -0 7.5980837 7.7680794 6.2922818 + 9100 2000 -0 7.5964734 7.766756 6.2837584 + 9200 2000 -0 7.5970307 7.7673294 6.2867417 + 9300 2000 -0 7.5979654 7.7680887 6.2924025 + 9400 2000 -0 7.5968814 7.7671306 6.2861078 + 9500 2000 -0 7.5967607 7.7670542 6.2853516 + 9600 2000 -0 7.5978051 7.7679583 6.2911802 + 9700 2000 -0 7.597238 7.767496 6.2880951 + 9800 2000 -0 7.596697 7.7670074 6.2853135 + 9900 2000 -0 7.5974854 7.7676519 6.2894109 + 10000 2000 -0 7.5974415 7.7676866 6.2894089 + 10100 2000 -0 7.5968332 7.7671611 6.2858705 + 10200 2000 -0 7.5971895 7.7673771 6.2881001 + 10300 2000 -0 7.5974344 7.7675998 6.2897713 + 10400 2000 -0 7.5969756 7.767279 6.2867879 + 10500 2000 -0 7.5970506 7.7672894 6.2872789 + 10600 2000 -0 7.5973817 7.7675529 6.2895398 + 10700 2000 -0 7.597085 7.7673281 6.2876393 + 10800 2000 -0 7.5969757 7.7672429 6.2869852 + 10900 2000 -0 7.5973016 7.7675261 6.2890364 + 11000 2000 -0 7.5971776 7.7674059 6.2882417 + 11100 2000 -0 7.596955 7.7672303 6.2870489 + 11200 2000 -0 7.5971842 7.7674346 6.288507 + 11300 2000 -0 7.5972149 7.7674441 6.2885796 + 11400 2000 -0 7.5969922 7.7672746 6.2872884 + 11500 2000 -0 7.5970948 7.7673717 6.2880589 + 11600 2000 -0 7.5971991 7.7674426 6.2886788 + 11700 2000 -0 7.5970217 7.7673051 6.2876396 + 11800 2000 -0 7.5970385 7.767356 6.2877736 + 11900 2000 -0 7.5971592 7.7674896 6.2885954 + 12000 2000 -0 7.5970437 7.7673831 6.2879896 + 12100 2000 -0 7.5969799 7.7673414 6.2876892 + 12200 2000 -0 7.597104 7.7674691 6.2883867 + 12300 2000 -0 7.5970688 7.7674421 6.2882073 + 12400 2000 -0 7.5969667 7.7673544 6.2877266 + 12500 2000 -0 7.5970342 7.7674299 6.2881961 + 12600 2000 -0 7.5970575 7.7674563 6.2883162 + 12700 2000 -0 7.5969702 7.7673919 6.2878499 + 12800 2000 -0 7.5969875 7.7674105 6.2880279 + 12900 2000 -0 7.5970261 7.7674542 6.2883236 + 13000 2000 -0 7.5969638 7.7674093 6.2880003 + 13100 2000 -0 7.5969523 7.7674055 6.2879583 + 13200 2000 -0 7.5969948 7.7674543 6.2882605 + 13300 2000 -0 7.5969671 7.7674324 6.2881167 + 13400 2000 -0 7.5969481 7.7674096 6.2879707 + 13500 2000 -0 7.5969704 7.7674472 6.2881927 + 13600 2000 -0 7.5969604 7.7674502 6.2881801 + 13700 2000 -0 7.5969111 7.7674226 6.2880031 + 13800 2000 -0 7.5969206 7.7674314 6.288133 + 13900 2000 -0 7.5969259 7.7674429 6.2882037 + 14000 2000 -0 7.5968972 7.7674314 6.2880579 + 14100 2000 -0 7.5968963 7.7674369 6.2880968 + 14200 2000 -0 7.5969042 7.7674469 6.2882024 + 14300 2000 -0 7.5968803 7.7674344 6.2881112 + 14400 2000 -0 7.59687 7.7674353 6.2880896 + 14500 2000 -0 7.5968808 7.7674514 6.2881879 + 14600 2000 -0 7.5968666 7.7674452 6.28815 + 14700 2000 -0 7.5968485 7.7674368 6.2880988 + 14800 2000 -0 7.5968535 7.767448 6.2881738 + 14900 2000 -0 7.5968474 7.7674514 6.2881775 + 15000 2000 -0 7.5968308 7.7674448 6.2881173 + 15100 2000 -0 7.5968288 7.7674504 6.2881599 + 15200 2000 -0 7.5968259 7.7674545 6.2881943 + 15300 2000 -0 7.5968096 7.7674493 6.2881446 + 15400 2000 -0 7.5968036 7.7674548 6.2881534 + 15500 2000 -0 7.5968025 7.7674625 6.2881974 + 15600 2000 -0 7.5967877 7.7674575 6.2881698 + 15700 2000 -0 7.5967763 7.7674574 6.2881574 + 15800 2000 -0 7.5967748 7.7674674 6.2881956 + 15900 2000 -0 7.5967648 7.7674695 6.2881883 + 16000 2000 -0 7.5967506 7.7674666 6.2881665 + 16100 2000 -0 7.5967447 7.7674721 6.2881929 + 16200 2000 -0 7.596737 7.7674775 6.2882018 + 16300 2000 -0 7.596724 7.7674779 6.2881798 + 16400 2000 -0 7.5967156 7.7674817 6.2881911 + 16500 2000 -0 7.5967078 7.7674863 6.2882086 + 16600 2000 -0 7.5966952 7.7674871 6.288195 + 16700 2000 -0 7.5966855 7.7674905 6.288195 + 16800 2000 -0 7.5966849 7.7675018 6.2882111 + 16900 2000 -0 7.5966659 7.767499 6.2882084 + 17000 2000 -0 7.5966553 7.7674989 6.288203 + 17100 2000 -0 7.5966481 7.7675039 6.288216 + 17200 2000 -0 7.5966391 7.7675079 6.2882174 + 17300 2000 -0 7.5966284 7.7675095 6.2882114 + 17400 2000 -0 7.5966197 7.7675124 6.2882207 + 17500 2000 -0 7.5966116 7.7675184 6.2882274 + 17600 2000 -0 7.5966015 7.7675179 6.2882213 + 17700 2000 -0 7.596598 7.7675217 6.2882271 + 17800 2000 -0 7.5965839 7.7675249 6.2882319 + 17900 2000 -0 7.5965764 7.7675277 6.2882321 + 18000 2000 -0 7.5965694 7.7675324 6.2882345 + 18100 2000 -0 7.5965606 7.7675381 6.288242 + 18200 2000 -0 7.5965529 7.7675402 6.2882446 + 18300 2000 -0 7.5965448 7.7675416 6.2882447 + 18400 2000 -0 7.5965376 7.7675437 6.2882479 + 18500 2000 -0 7.5965312 7.7675449 6.2882502 + 18600 2000 -0 7.5965234 7.7675465 6.2882488 + 18700 2000 -0 7.5965164 7.7675489 6.2882532 + 18800 2000 -0 7.5965092 7.7675524 6.2882585 + 18900 2000 -0 7.5965015 7.7675553 6.2882605 + 19000 2000 -0 7.5964943 7.7675579 6.288263 + 19100 2000 -0 7.5964874 7.7675604 6.2882669 + 19200 2000 -0 7.59648 7.7675614 6.2882681 + 19300 2000 -0 7.5964723 7.7675626 6.2882686 + 19400 2000 -0 7.596465 7.7675656 6.2882725 + 19500 2000 -0 7.5964572 7.7675691 6.2882763 + 19600 2000 -0 7.5964488 7.767572 6.2882784 + 19700 2000 -0 7.5964406 7.7675747 6.2882815 + 19800 2000 -0 7.5964328 7.7675771 6.2882844 + 19900 2000 -0 7.5964247 7.7675792 6.288285 + 20000 2000 -0 7.5964164 7.7675815 6.2882866 + 20100 2000 -0 7.5964079 7.7675846 6.28829 + 20200 2000 -0 7.596399 7.7675881 6.2882925 + 20300 2000 -0 7.5963909 7.7675919 6.2882955 + 20400 2000 -0 7.5963809 7.7675953 6.2882972 + 20500 2000 -0 7.5963752 7.7676011 6.2883018 + 20600 2000 -0 7.5963619 7.7676092 6.2883037 + 20700 2000 -0 7.5963522 7.767611 6.2883069 + 20800 2000 -0 7.5963411 7.7676172 6.28831 + 20900 2000 -0 7.5963304 7.7676213 6.2883118 + 21000 2000 -0 7.5963203 7.767625 6.2883148 + 21100 2000 -0 7.5963105 7.7676285 6.2883181 + 21200 2000 -0 7.5963007 7.7676317 6.2883195 + 21300 2000 -0 7.5962911 7.7676349 6.2883215 + 21400 2000 -0 7.5962816 7.7676382 6.2883246 + 21500 2000 -0 7.5962731 7.7676543 6.288331 + 21600 2000 -0 7.5962632 7.7676583 6.2883332 + 21700 2000 -0 7.5962548 7.767661 6.2883366 + 21800 2000 -0 7.5962459 7.7676634 6.2883395 + 21900 2000 -0 7.5962373 7.7676655 6.2883415 + 22000 2000 -0 7.5962319 7.7676679 6.2883449 + 22100 2000 -0 7.5962209 7.7676703 6.2883465 + 22200 2000 -0 7.5962128 7.7676725 6.2883506 + 22300 2000 -0 7.5962054 7.7676747 6.2883528 + 22400 2000 -0 7.5961978 7.7676768 6.2883553 + 22500 2000 -0 7.5961903 7.7676789 6.288359 + 22600 2000 -0 7.596183 7.7676807 6.2883613 + 22700 2000 -0 7.5961756 7.7676824 6.288363 + 22800 2000 -0 7.5961685 7.7676843 6.2883669 + 22900 2000 -0 7.5961616 7.7676859 6.2883701 + 23000 2000 -0 7.5961555 7.7676881 6.2883726 + 23100 2000 -0 7.5961478 7.7676894 6.2883761 + 23200 2000 -0 7.5961408 7.7676905 6.2883794 + 23300 2000 -0 7.5961337 7.7676917 6.2883816 + 23400 2000 -0 7.5961266 7.7676931 6.2883848 + 23500 2000 -0 7.5961196 7.7676947 6.2883884 + 23600 2000 -0 7.5961122 7.7676962 6.2883911 + 23700 2000 -0 7.5961047 7.7676979 6.2883942 + 23800 2000 -0 7.5960972 7.7676997 6.2883977 + 23900 2000 -0 7.5960894 7.7677015 6.2884004 + 24000 2000 -0 7.5960814 7.7677033 6.288403 + 24100 2000 -0 7.5960734 7.7677054 6.2884061 + 24200 2000 -0 7.5960651 7.7677076 6.2884089 + 24300 2000 -0 7.5960576 7.76771 6.2884124 + 24400 2000 -0 7.5960487 7.7677127 6.288415 + 24500 2000 -0 7.596039 7.7677152 6.2884169 + 24600 2000 -0 7.59603 7.7677178 6.2884192 + 24700 2000 -0 7.5960208 7.7677205 6.2884216 + 24800 2000 -0 7.5960115 7.7677234 6.2884242 + 24900 2000 -0 7.5960021 7.7677264 6.2884266 + 25000 2000 -0 7.5959926 7.7677293 6.288429 + 25100 2000 -0 7.595983 7.7677323 6.2884316 + 25200 2000 -0 7.5959735 7.7677352 6.2884341 + 25300 2000 -0 7.5959639 7.7677381 6.2884365 + 25400 2000 -0 7.5959544 7.7677409 6.2884391 + 25500 2000 -0 7.5959449 7.7677437 6.2884418 + 25600 2000 -0 7.5959355 7.7677464 6.2884444 + 25700 2000 -0 7.5959262 7.7677491 6.2884471 + 25800 2000 -0 7.5959171 7.7677518 6.2884498 + 25900 2000 -0 7.5959081 7.7677543 6.2884525 + 26000 2000 -0 7.5958993 7.7677567 6.2884551 + 26100 2000 -0 7.5958907 7.7677591 6.2884578 + 26200 2000 -0 7.595883 7.7677616 6.2884607 + 26300 2000 -0 7.5958752 7.7677633 6.2884628 + 26400 2000 -0 7.5958661 7.7677658 6.288466 + 26500 2000 -0 7.5958577 7.7677683 6.2884697 + 26600 2000 -0 7.5958499 7.7677701 6.2884712 + 26700 2000 -0 7.5958424 7.767772 6.2884735 + 26800 2000 -0 7.5958352 7.7677742 6.2884777 + 26900 2000 -0 7.5958278 7.767776 6.2884798 + 27000 2000 -0 7.5958205 7.7677777 6.2884817 + 27100 2000 -0 7.5958171 7.7677861 6.2884867 + 27200 2000 -0 7.5958058 7.767782 6.2884877 + 27300 2000 -0 7.5957995 7.767783 6.2884897 + 27400 2000 -0 7.5957928 7.7677845 6.2884941 + 27500 2000 -0 7.5957858 7.7677862 6.2884971 + 27600 2000 -0 7.5957786 7.7677876 6.2884991 + 27700 2000 -0 7.5957716 7.7677894 6.2885028 + 27800 2000 -0 7.5957644 7.7677911 6.2885058 + 27900 2000 -0 7.595757 7.7677927 6.2885082 + 28000 2000 -0 7.5957496 7.7677945 6.2885114 + 28100 2000 -0 7.5957421 7.7677965 6.2885146 + 28200 2000 -0 7.5957342 7.7677984 6.288517 + 28300 2000 -0 7.5957263 7.7678006 6.2885197 + 28400 2000 -0 7.5957182 7.7678029 6.2885227 + 28500 2000 -0 7.5957098 7.7678053 6.2885251 + 28600 2000 -0 7.595701 7.7678109 6.2885275 + 28700 2000 -0 7.5956927 7.7678104 6.2885301 + 28800 2000 -0 7.5956839 7.7678133 6.2885325 + 28900 2000 -0 7.5956749 7.7678161 6.2885345 + 29000 2000 -0 7.5956658 7.7678191 6.2885369 + 29100 2000 -0 7.5956566 7.7678222 6.2885392 + 29200 2000 -0 7.5956473 7.7678253 6.2885412 + 29300 2000 -0 7.5956379 7.7678284 6.2885434 + 29400 2000 -0 7.5956285 7.7678315 6.2885458 + 29500 2000 -0 7.595619 7.7678346 6.288548 + 29600 2000 -0 7.5956096 7.7678376 6.2885502 + 29700 2000 -0 7.5956004 7.7678407 6.2885528 + 29800 2000 -0 7.5955908 7.7678436 6.2885551 + 29900 2000 -0 7.5955816 7.7678465 6.2885573 + 30000 2000 -0 7.5955725 7.7678494 6.2885598 + 30100 2000 -0 7.5955635 7.7678522 6.2885623 + 30200 2000 -0 7.5955547 7.7678548 6.2885646 + 30300 2000 -0 7.5955461 7.7678575 6.2885671 + 30400 2000 -0 7.5955377 7.7678601 6.2885696 + 30500 2000 -0 7.5955317 7.7678632 6.288572 + 30600 2000 -0 7.5955209 7.7678646 6.2885732 + 30700 2000 -0 7.5955138 7.7678673 6.2885773 + 30800 2000 -0 7.5955057 7.7678698 6.2885802 + 30900 2000 -0 7.5954978 7.7678719 6.2885813 + 31000 2000 -0 7.5954905 7.7678739 6.2885838 + 31100 2000 -0 7.5954836 7.7678764 6.2885876 + 31200 2000 -0 7.5954763 7.7678782 6.2885891 + 31300 2000 -0 7.5954742 7.7678842 6.2885893 + 31400 2000 -0 7.5954635 7.7678813 6.2885963 + 31500 2000 -0 7.5954662 7.7678813 6.2885978 + 31600 2000 -0 7.5954651 7.767881 6.2885992 + 31700 2000 -0 7.5954652 7.7678813 6.2886059 + 31800 2000 -0 7.5954642 7.7678815 6.2886093 + 31900 2000 -0 7.5954627 7.7678812 6.2886098 + 32000 2000 -0 7.5954619 7.7678816 6.2886155 + 32100 2000 -0 7.5954608 7.767882 6.2886199 + 32200 2000 -0 7.595459 7.7678819 6.2886212 + 32300 2000 -0 7.5954574 7.7678824 6.2886253 + 32400 2000 -0 7.5954559 7.7678831 6.2886303 + 32500 2000 -0 7.5954537 7.7678834 6.2886323 + 32600 2000 -0 7.5954513 7.7678841 6.2886353 + 32700 2000 -0 7.5954491 7.767885 6.2886401 + 32800 2000 -0 7.5954463 7.7678859 6.2886428 + 32900 2000 -0 7.5954433 7.7678868 6.2886452 + 33000 2000 -0 7.5954404 7.7678881 6.2886494 + 33100 2000 -0 7.5954372 7.7678894 6.2886525 + 33200 2000 -0 7.5954345 7.76789 6.2886545 + 33300 2000 -0 7.5954319 7.7678907 6.2886578 + 33400 2000 -0 7.5954292 7.7678914 6.2886612 + 33500 2000 -0 7.5954262 7.767892 6.2886633 + 33600 2000 -0 7.5954232 7.7678927 6.2886662 + 33700 2000 -0 7.5954203 7.7678934 6.2886697 + 33800 2000 -0 7.5954172 7.767894 6.2886722 + 33900 2000 -0 7.5954142 7.7678945 6.288675 + 34000 2000 -0 7.5954113 7.7678952 6.2886785 + 34100 2000 -0 7.5954084 7.7678956 6.2886814 + 34200 2000 -0 7.5954056 7.767896 6.2886841 + 34300 2000 -0 7.595403 7.7678964 6.2886876 + 34400 2000 -0 7.5954005 7.7678968 6.2886908 + 34500 2000 -0 7.5953981 7.7678969 6.2886936 + 34600 2000 -0 7.5953959 7.7678971 6.2886968 + 34700 2000 -0 7.595394 7.7678972 6.2887001 + 34800 2000 -0 7.5953953 7.7678972 6.288703 + 34900 2000 -0 7.5953889 7.767897 6.2887047 + 35000 2000 -0 7.5953908 7.7678971 6.2887098 + 35100 2000 -0 7.5953877 7.7678973 6.2887122 + 35200 2000 -0 7.5953867 7.767897 6.2887144 + 35300 2000 -0 7.5953863 7.7678962 6.2887182 + 35400 2000 -0 7.5953856 7.7678962 6.288722 + 35500 2000 -0 7.5953849 7.7678956 6.2887237 + 35600 2000 -0 7.5953846 7.7678951 6.2887271 + 35700 2000 -0 7.5953844 7.7678947 6.2887309 + 35800 2000 -0 7.595384 7.767894 6.2887334 + 35900 2000 -0 7.5953838 7.7678933 6.2887362 + 36000 2000 -0 7.5953837 7.7678927 6.2887403 + 36100 2000 -0 7.5953834 7.767892 6.2887432 + 36200 2000 -0 7.595383 7.7678913 6.2887459 + 36300 2000 -0 7.5953827 7.7678907 6.2887498 + 36400 2000 -0 7.5953821 7.7678901 6.2887531 + 36500 2000 -0 7.5953814 7.7678895 6.2887558 + 36600 2000 -0 7.5953807 7.7678891 6.2887593 + 36700 2000 -0 7.5953797 7.7678887 6.2887627 + 36800 2000 -0 7.5953785 7.7678884 6.2887654 + 36900 2000 -0 7.5953772 7.7678883 6.2887685 + 37000 2000 -0 7.5953757 7.7678884 6.2887717 + 37100 2000 -0 7.595374 7.7678885 6.2887744 + 37200 2000 -0 7.5953721 7.7678888 6.2887771 + 37300 2000 -0 7.59537 7.7678892 6.2887801 + 37400 2000 -0 7.5953678 7.7678897 6.2887827 + 37500 2000 -0 7.5953654 7.7678903 6.2887851 + 37600 2000 -0 7.5953628 7.767891 6.2887879 + 37700 2000 -0 7.5953602 7.7678918 6.2887906 + 37800 2000 -0 7.5953571 7.7678929 6.288793 + 37900 2000 -0 7.5953545 7.7678935 6.2887957 + 38000 2000 -0 7.5953517 7.7678941 6.2887985 + 38100 2000 -0 7.5953488 7.7678949 6.2888011 + 38200 2000 -0 7.5953459 7.7678956 6.2888037 + 38300 2000 -0 7.5953431 7.7678962 6.2888066 + 38400 2000 -0 7.5953404 7.7678969 6.2888094 + 38500 2000 -0 7.5953377 7.7678974 6.2888122 + 38600 2000 -0 7.5953352 7.7678979 6.2888151 + 38700 2000 -0 7.5953328 7.7678983 6.288818 + 38800 2000 -0 7.5953306 7.7678987 6.2888209 + 38900 2000 -0 7.5953285 7.7678991 6.2888238 + 39000 2000 -0 7.5953266 7.7678994 6.2888267 + 39100 2000 -0 7.5953284 7.7678993 6.2888299 + 39200 2000 -0 7.5953221 7.7679002 6.2888311 + 39300 2000 -0 7.5953225 7.7678998 6.2888359 + 39400 2000 -0 7.5953215 7.7678999 6.2888384 + 39500 2000 -0 7.5953234 7.7678996 6.2888401 + 39600 2000 -0 7.5953197 7.7678996 6.2888437 + 39700 2000 -0 7.5953193 7.7678996 6.2888471 + 39800 2000 -0 7.5953187 7.7678992 6.2888486 + 39900 2000 -0 7.5953185 7.7678989 6.2888519 + 40000 2000 -0 7.5953185 7.7678987 6.2888555 + 40100 2000 -0 7.5953171 7.7678976 6.2888576 + 40200 2000 -0 7.595318 7.7678977 6.2888603 + 40300 2000 -0 7.5953181 7.7678973 6.2888642 + 40400 2000 -0 7.5953178 7.7678967 6.2888668 + 40500 2000 -0 7.5953175 7.7678962 6.2888695 + 40600 2000 -0 7.5953174 7.7678958 6.2888733 + 40700 2000 -0 7.5953169 7.7678954 6.2888761 + 40800 2000 -0 7.5953162 7.767895 6.2888787 + 40900 2000 -0 7.5953155 7.7678947 6.288882 + 41000 2000 -0 7.5953147 7.7678946 6.2888851 + 41100 2000 -0 7.5953136 7.7678944 6.2888876 + 41200 2000 -0 7.5953123 7.7678945 6.2888905 + 41300 2000 -0 7.5953109 7.7678948 6.2888936 + 41400 2000 -0 7.5953091 7.7678948 6.2888961 + 41500 2000 -0 7.595307 7.7678943 6.2888989 + 41600 2000 -0 7.5953046 7.7678939 6.2889022 + 41700 2000 -0 7.5953019 7.7678935 6.2889051 + 41800 2000 -0 7.595299 7.7678933 6.2889079 + 41900 2000 -0 7.5952973 7.7678931 6.2889112 + 42000 2000 -0 7.595293 7.7678931 6.2889142 + 42100 2000 -0 7.5952897 7.7678929 6.2889165 + 42200 2000 -0 7.5952864 7.7678928 6.2889198 + 42300 2000 -0 7.5952831 7.7678928 6.288923 + 42400 2000 -0 7.5952797 7.7678926 6.2889256 + 42500 2000 -0 7.5952764 7.7678925 6.2889289 + 42600 2000 -0 7.595274 7.7678914 6.2889322 + 42700 2000 -0 7.5952704 7.7678916 6.2889354 + 42800 2000 -0 7.595267 7.7678911 6.2889384 + 42900 2000 -0 7.5952656 7.7678941 6.2889425 + 43000 2000 -0 7.5952627 7.7678921 6.2889451 + 43100 2000 -0 7.5952594 7.7678889 6.2889481 + 43200 2000 -0 7.5952565 7.7678879 6.2889509 + 43300 2000 -0 7.5952547 7.7678871 6.2889548 + 43400 2000 -0 7.5952557 7.767886 6.2889583 + 43500 2000 -0 7.5952503 7.7678854 6.2889594 + 43600 2000 -0 7.5952493 7.7678839 6.288965 + 43700 2000 -0 7.5952482 7.7678827 6.2889677 + 43800 2000 -0 7.5952467 7.7678813 6.2889694 + 43900 2000 -0 7.5952458 7.7678801 6.2889739 + 44000 2000 -0 7.5952454 7.7678787 6.2889774 + 44100 2000 -0 7.5952449 7.7678768 6.2889786 + 44200 2000 -0 7.5952449 7.7678753 6.2889822 + 44300 2000 -0 7.595245 7.7678737 6.288986 + 44400 2000 -0 7.5952448 7.7678718 6.2889879 + 44500 2000 -0 7.5952448 7.7678699 6.2889908 + 44600 2000 -0 7.595245 7.7678683 6.2889949 + 44700 2000 -0 7.5952448 7.7678663 6.2889974 + 44800 2000 -0 7.5952446 7.7678644 6.289 + 44900 2000 -0 7.595245 7.7678622 6.2890034 + 45000 2000 -0 7.5952444 7.767861 6.2890073 + 45100 2000 -0 7.5952437 7.7678593 6.2890094 + 45200 2000 -0 7.595243 7.7678577 6.2890129 + 45300 2000 -0 7.5952422 7.7678563 6.289016 + 45400 2000 -0 7.5952411 7.7678549 6.2890185 + 45500 2000 -0 7.5952399 7.7678537 6.2890214 + 45600 2000 -0 7.5952386 7.7678526 6.2890245 + 45700 2000 -0 7.595237 7.7678516 6.2890269 + 45800 2000 -0 7.5952352 7.7678508 6.2890295 + 45900 2000 -0 7.5952333 7.7678501 6.2890323 + 46000 2000 -0 7.5952312 7.7678495 6.2890348 + 46100 2000 -0 7.5952289 7.767849 6.289037 + 46200 2000 -0 7.5952265 7.7678486 6.2890397 + 46300 2000 -0 7.595224 7.7678482 6.2890422 + 46400 2000 -0 7.5952213 7.7678478 6.2890445 + 46500 2000 -0 7.5952186 7.7678474 6.2890471 + 46600 2000 -0 7.5952159 7.767847 6.2890498 + 46700 2000 -0 7.5952132 7.7678466 6.2890522 + 46800 2000 -0 7.5952105 7.7678462 6.2890548 + 46900 2000 -0 7.5952078 7.7678457 6.2890576 + 47000 2000 -0 7.5952052 7.767848 6.2890603 + 47100 2000 -0 7.5952028 7.7678445 6.2890629 + 47200 2000 -0 7.5952004 7.7678438 6.2890658 + 47300 2000 -0 7.5951983 7.767843 6.2890684 + 47400 2000 -0 7.5951963 7.7678421 6.289071 + 47500 2000 -0 7.5951945 7.7678412 6.2890739 + 47600 2000 -0 7.5951928 7.7678403 6.2890766 + 47700 2000 -0 7.5951936 7.7678391 6.2890792 + 47800 2000 -0 7.5951902 7.7678383 6.2890813 + 47900 2000 -0 7.5951889 7.7678373 6.2890856 + 48000 2000 -0 7.5951881 7.7678358 6.2890872 + 48100 2000 -0 7.5951873 7.7678344 6.2890892 + 48200 2000 -0 7.595187 7.7678333 6.2890933 + 48300 2000 -0 7.5951866 7.7678318 6.2890956 + 48400 2000 -0 7.5951861 7.7678302 6.2890972 + 48500 2000 -0 7.5951861 7.7678288 6.289101 + 48600 2000 -0 7.5951861 7.7678272 6.289104 + 48700 2000 -0 7.5951858 7.7678254 6.2891058 + 48800 2000 -0 7.5951858 7.7678255 6.2891126 + 48900 2000 -0 7.5951857 7.767822 6.2891123 + 49000 2000 -0 7.5951856 7.7678203 6.2891153 + 49100 2000 -0 7.5951853 7.7678184 6.2891183 + 49200 2000 -0 7.595185 7.7678166 6.289121 + 49300 2000 -0 7.5951845 7.7678149 6.2891242 + 49400 2000 -0 7.595184 7.7678133 6.2891272 + 49500 2000 -0 7.5951831 7.7678116 6.2891298 + 49600 2000 -0 7.5951822 7.7678102 6.2891328 + 49700 2000 -0 7.5951811 7.7678089 6.2891358 + 49800 2000 -0 7.5951797 7.7678076 6.2891384 + 49900 2000 -0 7.5951782 7.7678065 6.2891412 + 50000 2000 -0 7.5951765 7.7678056 6.289144 + 50100 2000 -0 7.5951746 7.7678048 6.2891464 + 50200 2000 -0 7.5951725 7.7678041 6.2891489 + 50300 2000 -0 7.5951703 7.7678035 6.2891515 + 50400 2000 -0 7.5951679 7.767803 6.2891539 + 50500 2000 -0 7.5951653 7.7678025 6.2891563 + 50600 2000 -0 7.5951627 7.7678021 6.2891588 + 50700 2000 -0 7.59516 7.7678018 6.2891612 + 50800 2000 -0 7.5951572 7.7678014 6.2891637 + 50900 2000 -0 7.5951543 7.767801 6.2891662 + 51000 2000 -0 7.5951515 7.7678035 6.2891689 + 51100 2000 -0 7.5951486 7.7678002 6.2891713 + 51200 2000 -0 7.5951459 7.7677995 6.2891739 + 51300 2000 -0 7.5951433 7.7677989 6.2891766 + 51400 2000 -0 7.5951407 7.7677982 6.2891793 + 51500 2000 -0 7.5951383 7.7677975 6.289182 + 51600 2000 -0 7.595136 7.7677966 6.2891847 + 51700 2000 -0 7.5951339 7.7677957 6.2891875 + 51800 2000 -0 7.595132 7.7677948 6.2891902 + 51900 2000 -0 7.5951305 7.7677938 6.289193 + 52000 2000 -0 7.5951299 7.7677923 6.289195 + 52100 2000 -0 7.5951278 7.7677914 6.2891981 + 52200 2000 -0 7.5951262 7.7677905 6.2892017 + 52300 2000 -0 7.5951252 7.767789 6.2892033 + 52400 2000 -0 7.5951244 7.7677876 6.2892055 + 52500 2000 -0 7.595124 7.7677865 6.2892095 + 52600 2000 -0 7.5951234 7.7677849 6.2892116 + 52700 2000 -0 7.5951229 7.7677832 6.2892135 + 52800 2000 -0 7.5951229 7.7677818 6.2892173 + 52900 2000 -0 7.5951227 7.7677801 6.28922 + 53000 2000 -0 7.5951223 7.7677783 6.289222 + 53100 2000 -0 7.5951223 7.7677766 6.2892254 + 53200 2000 -0 7.5951221 7.7677749 6.2892286 + 53300 2000 -0 7.5951218 7.7677731 6.2892308 + 53400 2000 -0 7.5951215 7.7677713 6.289234 + 53500 2000 -0 7.5951213 7.7677724 6.2892375 + 53600 2000 -0 7.5951205 7.7677678 6.2892398 + 53700 2000 -0 7.5951197 7.7677663 6.2892426 + 53800 2000 -0 7.5951189 7.7677649 6.2892459 + 53900 2000 -0 7.5951178 7.7677635 6.2892486 + 54000 2000 -0 7.5951165 7.7677622 6.289251 + 54100 2000 -0 7.5951151 7.7677611 6.289254 + 54200 2000 -0 7.5951135 7.7677602 6.2892567 + 54300 2000 -0 7.5951116 7.7677592 6.2892589 + 54400 2000 -0 7.5951095 7.7677585 6.2892615 + 54500 2000 -0 7.5951073 7.7677579 6.2892641 + 54600 2000 -0 7.5951059 7.7677573 6.2892662 + 54700 2000 -0 7.5951022 7.7677569 6.2892686 + 54800 2000 -0 7.5950995 7.7677565 6.2892711 + 54900 2000 -0 7.5950966 7.7677562 6.2892734 + 55000 2000 -0 7.5950936 7.7677558 6.2892757 + 55100 2000 -0 7.5950906 7.7677555 6.2892782 + 55200 2000 -0 7.5950876 7.7677552 6.2892806 + 55300 2000 -0 7.5950846 7.7677547 6.289283 + 55400 2000 -0 7.5950816 7.7677543 6.2892856 + 55500 2000 -0 7.5950787 7.7677538 6.2892882 + 55600 2000 -0 7.5950758 7.7677532 6.2892907 + 55700 2000 -0 7.5950731 7.7677526 6.2892934 + 55800 2000 -0 7.5950705 7.7677519 6.2892961 + 55900 2000 -0 7.5950681 7.7677511 6.2892987 + 56000 2000 -0 7.5950658 7.7677503 6.2893013 + 56100 2000 -0 7.5950637 7.7677494 6.289304 + 56200 2000 -0 7.5950636 7.7677489 6.2893069 + 56300 2000 -0 7.5950599 7.7677469 6.2893081 + 56400 2000 -0 7.5950591 7.7677461 6.2893121 + 56500 2000 -0 7.5950575 7.7677452 6.2893152 + 56600 2000 -0 7.595056 7.7677438 6.2893165 + 56700 2000 -0 7.5950551 7.7677425 6.2893191 + 56800 2000 -0 7.5950546 7.7677414 6.289323 + 56900 2000 -0 7.5950537 7.7677398 6.2893246 + 57000 2000 -0 7.5950531 7.7677383 6.2893268 + 57100 2000 -0 7.5950528 7.7677369 6.2893306 + 57200 2000 -0 7.5950524 7.7677352 6.289333 + 57300 2000 -0 7.5950519 7.7677334 6.289335 + 57400 2000 -0 7.5950517 7.7677318 6.2893386 + 57500 2000 -0 7.5950513 7.7677302 6.2893415 + 57600 2000 -0 7.5950507 7.7677283 6.2893436 + 57700 2000 -0 7.5950502 7.7677267 6.2893469 + 57800 2000 -0 7.5950496 7.7677251 6.2893501 + 57900 2000 -0 7.5950486 7.7677235 6.2893525 + 58000 2000 -0 7.5950476 7.767722 6.2893554 + 58100 2000 -0 7.5950465 7.7677207 6.2893585 + 58200 2000 -0 7.5950451 7.7677194 6.289361 + 58300 2000 -0 7.5950436 7.7677183 6.2893635 + 58400 2000 -0 7.5950421 7.7677174 6.2893664 + 58500 2000 -0 7.5950402 7.7677166 6.2893688 + 58600 2000 -0 7.5950381 7.7677158 6.289371 + 58700 2000 -0 7.595036 7.7677153 6.2893736 + 58800 2000 -0 7.5950336 7.7677148 6.289376 + 58900 2000 -0 7.595031 7.7677144 6.2893781 + 59000 2000 -0 7.5950283 7.7677141 6.2893804 + 59100 2000 -0 7.5950254 7.7677139 6.2893828 + 59200 2000 -0 7.5950225 7.7677137 6.2893849 + 59300 2000 -0 7.5950194 7.7677135 6.2893872 + 59400 2000 -0 7.5950163 7.7677134 6.2893896 + 59500 2000 -0 7.5950132 7.7677131 6.2893919 + 59600 2000 -0 7.5950101 7.7677129 6.2893942 + 59700 2000 -0 7.595007 7.7677126 6.2893968 + 59800 2000 -0 7.5950047 7.7677123 6.2893992 + 59900 2000 -0 7.5950011 7.7677118 6.2894016 + 60000 2000 -0 7.5949983 7.7677113 6.2894042 + 60100 2000 -0 7.5949956 7.7677107 6.2894068 + 60200 2000 -0 7.5949931 7.7677101 6.2894093 + 60300 2000 -0 7.5949908 7.7677094 6.2894119 + 60400 2000 -0 7.5949886 7.7677087 6.2894145 + 60500 2000 -0 7.5949893 7.7677082 6.2894169 + 60600 2000 -0 7.5949834 7.7677067 6.2894183 + 60700 2000 -0 7.5949837 7.7677058 6.2894226 + 60800 2000 -0 7.5949821 7.767705 6.2894252 + 60900 2000 -0 7.5949805 7.7677038 6.2894264 + 61000 2000 -0 7.5949795 7.7677026 6.2894293 + 61100 2000 -0 7.5949789 7.7677016 6.2894329 + 61200 2000 -0 7.5949779 7.7677001 6.2894343 + 61300 2000 -0 7.5949772 7.7676987 6.2894368 + 61400 2000 -0 7.5949768 7.7676974 6.2894404 + 61500 2000 -0 7.5949762 7.7676959 6.2894425 + 61600 2000 -0 7.5949757 7.7676942 6.2894446 + 61700 2000 -0 7.5949753 7.7676928 6.2894483 + 61800 2000 -0 7.5949748 7.7676912 6.2894509 + 61900 2000 -0 7.5949741 7.7676895 6.289453 + 62000 2000 -0 7.5949735 7.767688 6.2894564 + 62100 2000 -0 7.5949727 7.7676865 6.2894593 + 62200 2000 -0 7.5949717 7.767685 6.2894616 + 62300 2000 -0 7.5949706 7.7676836 6.2894646 + 62400 2000 -0 7.5949694 7.7676824 6.2894676 + 62500 2000 -0 7.5949679 7.7676812 6.2894699 + 62600 2000 -0 7.5949663 7.7676801 6.2894725 + 62700 2000 -0 7.5949645 7.7676792 6.2894754 + 62800 2000 -0 7.5949624 7.7676785 6.2894777 + 62900 2000 -0 7.5949602 7.7676778 6.2894799 + 63000 2000 -0 7.5949578 7.7676773 6.2894825 + 63100 2000 -0 7.5949553 7.7676769 6.2894848 + 63200 2000 -0 7.5949525 7.7676765 6.2894868 + 63300 2000 -0 7.5949496 7.7676763 6.2894892 + 63400 2000 -0 7.5949466 7.7676761 6.2894915 + 63500 2000 -0 7.5949435 7.7676759 6.2894935 + 63600 2000 -0 7.5949404 7.7676757 6.2894957 + 63700 2000 -0 7.5949373 7.7676755 6.2894981 + 63800 2000 -0 7.5949341 7.7676752 6.2895003 + 63900 2000 -0 7.594931 7.7676749 6.2895025 + 64000 2000 -0 7.5949281 7.7676746 6.289505 + 64100 2000 -0 7.5949249 7.7676742 6.2895073 + 64200 2000 -0 7.5949219 7.7676737 6.2895097 + 64300 2000 -0 7.5949191 7.7676731 6.2895122 + 64400 2000 -0 7.5949165 7.7676725 6.2895147 + 64500 2000 -0 7.594914 7.7676718 6.2895171 + 64600 2000 -0 7.5949116 7.7676711 6.2895196 + 64700 2000 -0 7.5949095 7.7676702 6.2895221 + 64800 2000 -0 7.5949105 7.7676688 6.2895247 + 64900 2000 -0 7.5949039 7.767668 6.2895261 + 65000 2000 -0 7.5949041 7.7676665 6.2895306 + 65100 2000 -0 7.5949026 7.7676653 6.2895328 + 65200 2000 -0 7.5949005 7.7676632 6.2895342 + 65300 2000 -0 7.5948956 7.7676549 6.2895391 + 65400 2000 -0 7.5948925 7.7676486 6.2895389 + 65500 2000 -0 7.5948924 7.7676487 6.2895397 + 65600 2000 -0 7.5948923 7.767647 6.289549 + 65700 2000 -0 7.5948909 7.7676452 6.2895471 + 65800 2000 -0 7.5948899 7.7676429 6.289548 + 65900 2000 -0 7.5948899 7.7676418 6.2895556 + 66000 2000 -0 7.5948891 7.7676399 6.2895571 + 66100 2000 -0 7.5948876 7.7676375 6.2895567 + 66200 2000 -0 7.5948874 7.7676361 6.2895627 + 66300 2000 -0 7.5948866 7.7676344 6.2895663 + 66400 2000 -0 7.5948851 7.7676323 6.2895661 + 66500 2000 -0 7.5948842 7.7676308 6.2895704 + 66600 2000 -0 7.5948833 7.7676295 6.2895749 + 66700 2000 -0 7.5948815 7.7676277 6.2895755 + 66800 2000 -0 7.5948799 7.7676263 6.2895782 + 66900 2000 -0 7.5948784 7.7676253 6.2895826 + 67000 2000 -0 7.5948762 7.7676241 6.2895841 + 67100 2000 -0 7.5948739 7.767623 6.2895858 + 67200 2000 -0 7.5948718 7.7676223 6.2895898 + 67300 2000 -0 7.5948692 7.7676216 6.289592 + 67400 2000 -0 7.5948662 7.7676208 6.2895932 + 67500 2000 -0 7.5948635 7.7676203 6.2895964 + 67600 2000 -0 7.5948605 7.7676199 6.2895991 + 67700 2000 -0 7.5948572 7.7676193 6.2896004 + 67800 2000 -0 7.594854 7.767619 6.289603 + 67900 2000 -0 7.5948508 7.7676187 6.2896061 + 68000 2000 -0 7.5948473 7.7676182 6.2896078 + 68100 2000 -0 7.5948438 7.7676178 6.28961 + 68200 2000 -0 7.5948406 7.7676174 6.2896131 + 68300 2000 -0 7.5948372 7.7676168 6.2896153 + 68400 2000 -0 7.5948339 7.7676161 6.2896175 + 68500 2000 -0 7.5948308 7.7676156 6.2896206 + 68600 2000 -0 7.5948278 7.7676148 6.2896232 + 68700 2000 -0 7.5948248 7.767614 6.2896254 + 68800 2000 -0 7.5948221 7.7676131 6.2896283 + 68900 2000 -0 7.5948196 7.7676122 6.2896311 + 69000 2000 -0 7.5948172 7.7676111 6.2896334 + 69100 2000 -0 7.5948182 7.7676099 6.2896363 + 69200 2000 -0 7.5948122 7.7676096 6.2896377 + 69300 2000 -0 7.594811 7.7676081 6.2896421 + 69400 2000 -0 7.5948092 7.767607 6.2896441 + 69500 2000 -0 7.5948073 7.7676059 6.2896459 + 69600 2000 -0 7.5948058 7.7676043 6.2896498 + 69700 2000 -0 7.5948044 7.7676026 6.2896529 + 69800 2000 -0 7.5948029 7.7676005 6.2896547 + 69900 2000 -0 7.5948018 7.7675987 6.2896584 + 70000 2000 -0 7.5948007 7.7675967 6.2896619 + 70100 2000 -0 7.5947995 7.7675945 6.2896642 + 70200 2000 -0 7.5947984 7.7675924 6.2896674 + 70300 2000 -0 7.5947974 7.7675903 6.2896713 + 70400 2000 -0 7.5947962 7.7675881 6.2896739 + 70500 2000 -0 7.594795 7.7675859 6.289677 + 70600 2000 -0 7.5947937 7.7675838 6.2896808 + 70700 2000 -0 7.5947922 7.7675817 6.2896838 + 70800 2000 -0 7.5947906 7.7675796 6.2896868 + 70900 2000 -0 7.5947889 7.7675777 6.2896903 + 71000 2000 -0 7.594787 7.7675758 6.2896935 + 71100 2000 -0 7.5947848 7.7675741 6.2896963 + 71200 2000 -0 7.5947826 7.7675725 6.2896995 + 71300 2000 -0 7.5947801 7.767571 6.2897026 + 71400 2000 -0 7.5947774 7.7675697 6.2897053 + 71500 2000 -0 7.5947745 7.7675684 6.2897081 + 71600 2000 -0 7.5947715 7.7675673 6.2897111 + 71700 2000 -0 7.5947683 7.7675663 6.2897137 + 71800 2000 -0 7.5947648 7.7675654 6.2897162 + 71900 2000 -0 7.5947613 7.7675645 6.2897191 + 72000 2000 -0 7.5947575 7.7675638 6.2897217 + 72100 2000 -0 7.5947535 7.7675631 6.2897242 + 72200 2000 -0 7.5947494 7.7675625 6.289727 + 72300 2000 -0 7.5947453 7.7675618 6.2897298 + 72400 2000 -0 7.594741 7.7675611 6.2897324 + 72500 2000 -0 7.5947368 7.7675604 6.2897352 + 72600 2000 -0 7.5947325 7.7675597 6.2897381 + 72700 2000 -0 7.5947283 7.7675588 6.2897408 + 72800 2000 -0 7.5947242 7.7675578 6.2897437 + 72900 2000 -0 7.5947201 7.7675568 6.2897466 + 73000 2000 -0 7.5947162 7.7675557 6.2897494 + 73100 2000 -0 7.5947122 7.7675546 6.2897523 + 73200 2000 -0 7.5947083 7.7675536 6.2897553 + 73300 2000 -0 7.5947045 7.7675525 6.2897583 + 73400 2000 -0 7.5947035 7.7675515 6.2897613 + 73500 2000 -0 7.5946973 7.767551 6.2897633 + 73600 2000 -0 7.5946939 7.7675499 6.2897681 + 73700 2000 -0 7.5946909 7.7675487 6.2897703 + 73800 2000 -0 7.5946877 7.7675475 6.2897725 + 73900 2000 -0 7.5946849 7.7675465 6.2897768 + 74000 2000 -0 7.5946821 7.7675453 6.2897798 + 74100 2000 -0 7.5946792 7.7675439 6.2897817 + 74200 2000 -0 7.5946768 7.7675427 6.2897857 + 74300 2000 -0 7.5946742 7.7675414 6.2897892 + 74400 2000 -0 7.5946714 7.7675399 6.2897916 + 74500 2000 -0 7.5946688 7.7675385 6.2897951 + 74600 2000 -0 7.5946662 7.7675371 6.2897992 + 74700 2000 -0 7.5946634 7.7675355 6.2898019 + 74800 2000 -0 7.5946605 7.7675341 6.2898052 + 74900 2000 -0 7.5946577 7.7675328 6.2898092 + 75000 2000 -0 7.5946545 7.7675314 6.2898123 + 75100 2000 -0 7.5946512 7.76753 6.2898154 + 75200 2000 -0 7.5946478 7.7675289 6.2898193 + 75300 2000 -0 7.5946442 7.7675278 6.2898225 + 75400 2000 -0 7.5946403 7.7675268 6.2898255 + 75500 2000 -0 7.5946363 7.767526 6.2898289 + 75600 2000 -0 7.5946321 7.7675253 6.2898322 + 75700 2000 -0 7.5946277 7.7675247 6.2898349 + 75800 2000 -0 7.594623 7.7675243 6.2898379 + 75900 2000 -0 7.5946182 7.767524 6.289841 + 76000 2000 -0 7.5946184 7.7675222 6.2898477 + 76100 2000 -0 7.5946168 7.7675198 6.2898534 + 76200 2000 -0 7.5946059 7.7675208 6.2898537 + 76300 2000 -0 7.5945934 7.7675229 6.2898545 + 76400 2000 -0 7.5945858 7.7675222 6.2898578 + 76500 2000 -0 7.594578 7.7675215 6.2898604 + 76600 2000 -0 7.5945704 7.767521 6.289865 + 76700 2000 -0 7.5945627 7.7675205 6.2898692 + 76800 2000 -0 7.5945548 7.7675198 6.2898721 + 76900 2000 -0 7.5945472 7.7675191 6.2898763 + 77000 2000 -0 7.5945397 7.7675184 6.2898809 + 77100 2000 -0 7.5945321 7.7675175 6.2898842 + 77200 2000 -0 7.5945247 7.7675166 6.289888 + 77300 2000 -0 7.5945177 7.7675156 6.2898926 + 77400 2000 -0 7.5945106 7.7675145 6.2898964 + 77500 2000 -0 7.5945037 7.7675133 6.2899 + 77600 2000 -0 7.5944972 7.7675122 6.2899045 + 77700 2000 -0 7.5944924 7.7675106 6.2899081 + 77800 2000 -0 7.5944847 7.7675094 6.2899116 + 77900 2000 -0 7.5944783 7.7675083 6.2899171 + 78000 2000 -0 7.5944725 7.7675065 6.2899202 + 78100 2000 -0 7.5944668 7.7675048 6.2899232 + 78200 2000 -0 7.5944616 7.7675034 6.2899286 + 78300 2000 -0 7.5944563 7.7675016 6.2899324 + 78400 2000 -0 7.5944509 7.7674996 6.2899353 + 78500 2000 -0 7.594446 7.7674978 6.2899402 + 78600 2000 -0 7.5944411 7.7674959 6.2899446 + 78700 2000 -0 7.594436 7.7674938 6.2899477 + 78800 2000 -0 7.5944312 7.7674918 6.2899523 + 78900 2000 -0 7.5944263 7.7674898 6.2899571 + 79000 2000 -0 7.5944211 7.7674876 6.2899606 + 79100 2000 -0 7.594416 7.7674855 6.2899649 + 79200 2000 -0 7.5944109 7.7674835 6.2899697 + 79300 2000 -0 7.5944055 7.7674815 6.2899736 + 79400 2000 -0 7.5944 7.7674795 6.2899776 + 79500 2000 -0 7.5943944 7.7674777 6.2899823 + 79600 2000 -0 7.5943887 7.767476 6.2899864 + 79700 2000 -0 7.5943826 7.7674743 6.2899902 + 79800 2000 -0 7.5943766 7.7674728 6.2899944 + 79900 2000 -0 7.5943703 7.7674715 6.2899985 + 80000 2000 -0 7.5943639 7.7674702 6.2900021 + 80100 2000 -0 7.5943573 7.7674691 6.290006 + 80200 2000 -0 7.5943506 7.7674681 6.2900099 + 80300 2000 -0 7.5943437 7.7674671 6.2900134 + 80400 2000 -0 7.5943367 7.7674662 6.2900171 + 80500 2000 -0 7.5943296 7.7674655 6.2900209 + 80600 2000 -0 7.5943224 7.7674647 6.2900245 + 80700 2000 -0 7.5943151 7.7674639 6.2900281 + 80800 2000 -0 7.5943077 7.7674632 6.290032 + 80900 2000 -0 7.5943001 7.7674623 6.290036 + 81000 2000 -0 7.5942925 7.7674614 6.2900398 + 81100 2000 -0 7.594285 7.7674604 6.2900439 + 81200 2000 -0 7.5942776 7.7674594 6.290048 + 81300 2000 -0 7.5942702 7.7674582 6.290052 + 81400 2000 -0 7.594263 7.767457 6.2900562 + 81500 2000 -0 7.594256 7.7674558 6.2900604 + 81600 2000 -0 7.5942491 7.7674544 6.2900645 + 81700 2000 -0 7.5942424 7.767453 6.2900686 + 81800 2000 -0 7.5942359 7.7674515 6.2900729 + 81900 2000 -0 7.5942312 7.7674504 6.2900799 + 82000 2000 -0 7.5942237 7.7674478 6.29008 + 82100 2000 -0 7.5942182 7.7674465 6.2900859 + 82200 2000 -0 7.5942121 7.767445 6.2900901 + 82300 2000 -0 7.5942063 7.7674429 6.2900926 + 82400 2000 -0 7.5942013 7.7674409 6.2900972 + 82500 2000 -0 7.5941965 7.7674392 6.2901025 + 82600 2000 -0 7.5941914 7.7674369 6.2901052 + 82700 2000 -0 7.5941866 7.7674347 6.2901091 + 82800 2000 -0 7.5941822 7.7674326 6.2901146 + 82900 2000 -0 7.5941776 7.7674302 6.2901181 + 83000 2000 -0 7.5941729 7.7674277 6.2901216 + 83100 2000 -0 7.5941686 7.7674254 6.2901269 + 83200 2000 -0 7.5941641 7.767423 6.2901311 + 83300 2000 -0 7.5941594 7.7674205 6.2901346 + 83400 2000 -0 7.5941549 7.7674181 6.2901396 + 83500 2000 -0 7.5941502 7.7674158 6.2901442 + 83600 2000 -0 7.5941452 7.7674133 6.2901479 + 83700 2000 -0 7.5941402 7.7674111 6.2901524 + 83800 2000 -0 7.5941351 7.7674089 6.2901572 + 83900 2000 -0 7.5941297 7.7674068 6.290161 + 84000 2000 -0 7.5941242 7.7674048 6.290165 + 84100 2000 -0 7.5941186 7.767403 6.2901696 + 84200 2000 -0 7.5941126 7.7674013 6.2901734 + 84300 2000 -0 7.5941065 7.7673997 6.2901771 + 84400 2000 -0 7.5941003 7.7673983 6.2901814 + 84500 2000 -0 7.5940939 7.767397 6.2901852 + 84600 2000 -0 7.5940872 7.7673957 6.2901888 + 84700 2000 -0 7.5940805 7.7673944 6.2901928 + 84800 2000 -0 7.5940737 7.7673931 6.2901967 + 84900 2000 -0 7.5940667 7.7673918 6.2902004 + 85000 2000 -0 7.5940597 7.7673906 6.2902042 + 85100 2000 -0 7.5940526 7.7673893 6.2902083 + 85200 2000 -0 7.5940454 7.767388 6.2902121 + 85300 2000 -0 7.5940382 7.7673867 6.290216 + 85400 2000 -0 7.5940312 7.7673853 6.2902202 + 85500 2000 -0 7.5940241 7.7673839 6.2902243 + 85600 2000 -0 7.5940172 7.7673823 6.2902282 + 85700 2000 -0 7.5940104 7.7673808 6.2902325 + 85800 2000 -0 7.5940037 7.7673791 6.2902367 + 85900 2000 -0 7.5939971 7.7673773 6.2902409 + 86000 2000 -0 7.5939906 7.7673755 6.2902452 + 86100 2000 -0 7.5939844 7.7673736 6.2902496 + 86200 2000 -0 7.5939805 7.7673722 6.2902539 + 86300 2000 -0 7.5939717 7.7673693 6.2902569 + 86400 2000 -0 7.5939672 7.7673674 6.2902627 + 86500 2000 -0 7.5939615 7.7673655 6.2902672 + 86600 2000 -0 7.5939558 7.7673632 6.2902702 + 86700 2000 -0 7.5939508 7.7673608 6.2902746 + 86800 2000 -0 7.5939461 7.7673587 6.2902801 + 86900 2000 -0 7.5939411 7.7673561 6.2902832 + 87000 2000 -0 7.5939363 7.7673536 6.2902873 + 87100 2000 -0 7.5939319 7.7673513 6.2902927 + 87200 2000 -0 7.5939273 7.7673486 6.2902967 + 87300 2000 -0 7.5939223 7.7673461 6.2903004 + 87400 2000 -0 7.5939183 7.7673434 6.2903057 + 87500 2000 -0 7.5939138 7.7673407 6.2903103 + 87600 2000 -0 7.5939091 7.7673378 6.2903141 + 87700 2000 -0 7.5939045 7.7673352 6.2903191 + 87800 2000 -0 7.5938997 7.7673326 6.290324 + 87900 2000 -0 7.5938947 7.76733 6.2903281 + 88000 2000 -0 7.5938896 7.7673275 6.2903326 + 88100 2000 -0 7.5938843 7.7673252 6.2903375 + 88200 2000 -0 7.5938785 7.767323 6.2903417 + 88300 2000 -0 7.5938726 7.767321 6.2903459 + 88400 2000 -0 7.5938666 7.7673191 6.2903505 + 88500 2000 -0 7.5938603 7.7673174 6.2903546 + 88600 2000 -0 7.5938538 7.7673157 6.2903585 + 88700 2000 -0 7.5938471 7.7673142 6.2903628 + 88800 2000 -0 7.5938403 7.7673128 6.290367 + 88900 2000 -0 7.5938333 7.7673115 6.2903707 + 89000 2000 -0 7.5938261 7.7673103 6.2903748 + 89100 2000 -0 7.5938189 7.7673091 6.2903789 + 89200 2000 -0 7.5938115 7.7673079 6.2903827 + 89300 2000 -0 7.593804 7.7673068 6.2903867 + 89400 2000 -0 7.5937967 7.7673056 6.2903909 + 89500 2000 -0 7.5937891 7.7673045 6.290395 + 89600 2000 -0 7.5937814 7.7673033 6.2903989 + 89700 2000 -0 7.593774 7.7673021 6.2904033 + 89800 2000 -0 7.5937665 7.7673008 6.2904075 + 89900 2000 -0 7.5937592 7.7672994 6.2904116 + 90000 2000 -0 7.593752 7.7672979 6.2904159 + 90100 2000 -0 7.5937449 7.7672964 6.2904203 + 90200 2000 -0 7.593738 7.7672948 6.2904245 + 90300 2000 -0 7.5937313 7.7672931 6.2904288 + 90400 2000 -0 7.5937247 7.7672914 6.2904332 + 90500 2000 -0 7.5937212 7.7672898 6.2904372 + 90600 2000 -0 7.5937109 7.7672874 6.2904407 + 90700 2000 -0 7.5937069 7.7672852 6.2904466 + 90800 2000 -0 7.5937012 7.7672832 6.2904508 + 90900 2000 -0 7.5936954 7.7672808 6.2904539 + 91000 2000 -0 7.5936902 7.7672783 6.2904586 + 91100 2000 -0 7.5936853 7.7672761 6.2904639 + 91200 2000 -0 7.5936801 7.7672734 6.290467 + 91300 2000 -0 7.5936753 7.7672708 6.2904714 + 91400 2000 -0 7.5936707 7.7672683 6.2904767 + 91500 2000 -0 7.5936659 7.7672655 6.2904805 + 91600 2000 -0 7.5936611 7.7672627 6.2904845 + 91700 2000 -0 7.5936566 7.76726 6.2904899 + 91800 2000 -0 7.5936518 7.7672571 6.2904943 + 91900 2000 -0 7.5936469 7.7672543 6.2904983 + 92000 2000 -0 7.5936421 7.7672515 6.2905034 + 92100 2000 -0 7.5936371 7.7672488 6.2905081 + 92200 2000 -0 7.5936318 7.7672461 6.2905122 + 92300 2000 -0 7.5936265 7.7672435 6.290517 + 92400 2000 -0 7.5936211 7.767241 6.2905217 + 92500 2000 -0 7.5936154 7.7672386 6.2905258 + 92600 2000 -0 7.5936095 7.7672363 6.2905302 + 92700 2000 -0 7.5936035 7.7672343 6.2905348 + 92800 2000 -0 7.5935971 7.7672324 6.2905388 + 92900 2000 -0 7.5935906 7.7672307 6.2905428 + 93000 2000 -0 7.5935838 7.7672293 6.2905471 + 93100 2000 -0 7.5935769 7.7672279 6.2905511 + 93200 2000 -0 7.5935698 7.7672265 6.2905549 + 93300 2000 -0 7.5935625 7.7672254 6.290559 + 93400 2000 -0 7.5935551 7.7672242 6.290563 + 93500 2000 -0 7.5935476 7.7672231 6.2905668 + 93600 2000 -0 7.5935401 7.7672219 6.2905708 + 93700 2000 -0 7.5935325 7.7672208 6.290575 + 93800 2000 -0 7.5935248 7.7672196 6.2905789 + 93900 2000 -0 7.5935172 7.7672184 6.290583 + 94000 2000 -0 7.5935097 7.767217 6.2905873 + 94100 2000 -0 7.5935023 7.7672156 6.2905915 + 94200 2000 -0 7.593495 7.767214 6.2905957 + 94300 2000 -0 7.5934878 7.7672123 6.2906 + 94400 2000 -0 7.5934808 7.7672106 6.2906044 + 94500 2000 -0 7.593474 7.7672087 6.2906086 + 94600 2000 -0 7.5934675 7.7672069 6.290613 + 94700 2000 -0 7.5934609 7.7672048 6.2906173 + 94800 2000 -0 7.5934577 7.7672024 6.2906217 + 94900 2000 -0 7.5934471 7.767201 6.2906246 + 95000 2000 -0 7.5934428 7.7671984 6.2906309 + 95100 2000 -0 7.5934372 7.7671962 6.2906347 + 95200 2000 -0 7.5934313 7.7671938 6.2906378 + 95300 2000 -0 7.5934261 7.7671914 6.290643 + 95400 2000 -0 7.5934211 7.7671891 6.2906478 + 95500 2000 -0 7.5934157 7.7671863 6.2906508 + 95600 2000 -0 7.5934109 7.7671838 6.2906556 + 95700 2000 -0 7.5934061 7.7671813 6.2906607 + 95800 2000 -0 7.5934012 7.7671785 6.2906643 + 95900 2000 -0 7.5933963 7.7671757 6.2906686 + 96000 2000 -0 7.5933917 7.767173 6.2906739 + 96100 2000 -0 7.5933867 7.7671702 6.290678 + 96200 2000 -0 7.5933817 7.7671673 6.2906822 + 96300 2000 -0 7.5933768 7.7671646 6.2906873 + 96400 2000 -0 7.5933716 7.7671619 6.2906918 + 96500 2000 -0 7.5933663 7.7671592 6.2906959 + 96600 2000 -0 7.5933609 7.7671567 6.2907008 + 96700 2000 -0 7.5933553 7.7671542 6.2907054 + 96800 2000 -0 7.5933494 7.7671518 6.2907095 + 96900 2000 -0 7.5933434 7.7671496 6.2907139 + 97000 2000 -0 7.5933372 7.7671476 6.2907184 + 97100 2000 -0 7.5933308 7.7671456 6.2907224 + 97200 2000 -0 7.5933242 7.7671437 6.2907265 + 97300 2000 -0 7.5933174 7.7671421 6.2907308 + 97400 2000 -0 7.5933105 7.7671404 6.2907348 + 97500 2000 -0 7.5933033 7.7671389 6.2907386 + 97600 2000 -0 7.5932961 7.7671375 6.2907428 + 97700 2000 -0 7.5932888 7.7671359 6.2907468 + 97800 2000 -0 7.5932813 7.7671343 6.2907507 + 97900 2000 -0 7.5932739 7.7671327 6.2907548 + 98000 2000 -0 7.5932664 7.7671312 6.290759 + 98100 2000 -0 7.5932588 7.7671296 6.290763 + 98200 2000 -0 7.5932513 7.7671279 6.2907672 + 98300 2000 -0 7.5932438 7.7671262 6.2907715 + 98400 2000 -0 7.5932364 7.7671245 6.2907757 + 98500 2000 -0 7.5932291 7.7671226 6.2907799 + 98600 2000 -0 7.5932219 7.7671208 6.2907843 + 98700 2000 -0 7.5932149 7.7671188 6.2907886 + 98800 2000 -0 7.593208 7.7671167 6.2907928 + 98900 2000 -0 7.5932013 7.7671147 6.2907972 + 99000 2000 -0 7.5931948 7.7671125 6.2908015 + 99100 2000 -0 7.5931916 7.7671102 6.2908061 + 99200 2000 -0 7.5931818 7.7671085 6.2908089 + 99300 2000 -0 7.5931764 7.7671057 6.2908152 + 99400 2000 -0 7.5931708 7.7671032 6.2908188 + 99500 2000 -0 7.593165 7.7671007 6.290822 + 99600 2000 -0 7.5931598 7.7670982 6.2908274 + 99700 2000 -0 7.5931546 7.7670957 6.2908319 + 99800 2000 -0 7.5931492 7.7670928 6.2908349 + 99900 2000 -0 7.5931443 7.7670902 6.29084 + 100000 2000 -0 7.5931395 7.7670875 6.2908449 +Loop time of 28.4684 on 4 procs for 100000 steps with 2000 atoms + +Performance: 303494.659 tau/day, 3512.670 timesteps/s, 7.025 Matom-step/s +96.7% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 14.471 | 15.426 | 16.874 | 24.3 | 54.19 +Neigh | 0.50185 | 0.52867 | 0.55379 | 3.1 | 1.86 +Comm | 5.277 | 6.8933 | 7.8956 | 40.4 | 24.21 +Output | 0.019683 | 0.022775 | 0.031664 | 3.4 | 0.08 +Modify | 4.7145 | 4.8537 | 5.0111 | 6.1 | 17.05 +Other | | 0.7439 | | | 2.61 + +Nlocal: 500 ave 504 max 496 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 545.75 ave 553 max 538 min +Histogram: 1 0 0 0 1 0 1 0 0 1 +Neighs: 2409.75 ave 2523 max 2343 min +Histogram: 1 1 0 1 0 0 0 0 0 1 + +Total # of neighbors = 9639 +Ave neighs/atom = 4.8195 +Neighbor list builds = 3151 +Dangerous builds = 0 + +Total wall time: 0:00:28 diff --git a/examples/granular/log.29Oct20.pour.drum.g++.1 b/examples/granular/log.29Oct20.pour.drum.g++.1 deleted file mode 100644 index 8c4b828488..0000000000 --- a/examples/granular/log.29Oct20.pour.drum.g++.1 +++ /dev/null @@ -1,271 +0,0 @@ -LAMMPS (29 Oct 2020) - using 1 OpenMP thread(s) per MPI task -# pour two types of particles (cohesive and non-cohesive) into cylinder -# 'turn' cylinder by changing direction of gravity, then rotate it. -# This simulates a rotating drum powder characterization experiment. - -variable name string rotating_drum_two_types - -atom_style sphere -units lj - -############################################### -# Geometry-related parameters -############################################### - -variable boxx equal 30 -variable boxy equal 30 -variable boxz equal 50 - -variable drum_rad equal ${boxx}*0.5 -variable drum_rad equal 30*0.5 -variable drum_height equal 20 - -variable xc equal 0.5*${boxx} -variable xc equal 0.5*30 -variable yc equal 0.5*${boxx} -variable yc equal 0.5*30 -variable zc equal 0.5*${boxz} -variable zc equal 0.5*50 - -############################################### -# Particle-related parameters -############################################### -variable rlo equal 0.25 -variable rhi equal 0.5 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.25 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.5 - -variable cyl_rad_inner equal ${drum_rad}-1.1*${rhi} -variable cyl_rad_inner equal 15-1.1*${rhi} -variable cyl_rad_inner equal 15-1.1*0.5 - -variable dens equal 1.0 - -variable skin equal 0.4*${rhi} -variable skin equal 0.4*0.5 - -############# -processors * * 1 -region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} -region boxreg block 0 30 0 ${boxy} 0 ${boxz} -region boxreg block 0 30 0 30 0 ${boxz} -region boxreg block 0 30 0 30 0 50 -create_box 2 boxreg -Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (30.000000 30.000000 50.000000) - 1 by 1 by 1 MPI processor grid -change_box all boundary p p f -Changing box ... - -pair_style granular -pair_coeff 1 * hertz/material 1e5 0.2 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji -pair_coeff 2 2 jkr 1e5 0.1 0.3 50 tangential mindlin NULL 1.0 0.5 rolling sds 1e3 1e3 0.1 twisting marshall damping tsuji - -variable theta equal 0 - -region curved_wall cylinder z ${xc} ${yc} ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region curved_wall cylinder z 15 ${yc} ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region curved_wall cylinder z 15 15 ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region curved_wall cylinder z 15 15 15 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta 15 ${yc} 0 0 0 1 -region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta 15 15 0 0 0 1 -region bottom_wall plane ${xc} ${yc} 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region bottom_wall plane 15 ${yc} 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta 15 ${yc} 0 0 0 1 -region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta 15 15 0 0 0 1 - -region insreg cylinder z ${xc} ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} -region insreg cylinder z 15 ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} -region insreg cylinder z 15 15 ${cyl_rad_inner} ${drum_height} ${boxz} -region insreg cylinder z 15 15 14.45 ${drum_height} ${boxz} -region insreg cylinder z 15 15 14.45 20 ${boxz} -region insreg cylinder z 15 15 14.45 20 50 - -fix 0 all balance 100 1.0 shift xy 5 1.1 -fix 1 all nve/sphere -fix grav all gravity 10 vector 0 0 -1 -fix ins1 all pour 2000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} -fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} -fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} -fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens 1 ${dens} -fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens 1 1 -Particle insertion: 9396 every 490 steps, 2000 by step 1 -fix ins2 all pour 2000 2 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} -fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} -fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} -fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens 1 ${dens} -fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens 1 1 -Particle insertion: 9396 every 490 steps, 2000 by step 1 - -comm_modify vel yes - -neighbor ${skin} bin -neighbor 0.2 bin -neigh_modify delay 0 every 1 check yes - -fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall -fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region bottom_wall - -thermo_style custom step atoms ke v_theta -thermo_modify lost warn -thermo 100 - -timestep 0.001 - -#dump 1 all custom 100 ${name}.dump id type radius mass x y z - -#For removal later -compute 1 all property/atom radius -variable zmax atom z+c_1>0.5*${drum_height} -variable zmax atom z+c_1>0.5*20 -group delgroup dynamic all var zmax every 10000 -dynamic group delgroup defined - -run 2000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.2 - ghost atom cutoff = 1.2 - binsize = 0.6, bins = 50 50 84 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair granular, perpetual - attributes: half, newton on, size, history - pair build: half/size/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory allocation (min/avg/max) = 13.03 | 13.03 | 13.03 Mbytes -Step Atoms KinEng v_theta - 0 0 -0 0 - 100 4000 -0 0 - 200 4000 -0 0 - 300 4000 -0 0 - 400 4000 -0 0 - 500 4000 -0 0 - 600 4000 -0 0 - 700 4000 -0 0 - 800 4000 -0 0 - 900 4000 -0 0 - 1000 4000 -0 0 - 1100 4000 -0 0 - 1200 4000 -0 0 - 1300 4000 -0 0 - 1400 4000 -0 0 - 1500 4000 -0 0 - 1600 4000 -0 0 - 1700 4000 -0 0 - 1800 4000 -0 0 - 1900 4000 -0 0 - 2000 4000 -0 0 -Loop time of 10.5178 on 1 procs for 2000 steps with 4000 atoms - -Performance: 16429.309 tau/day, 190.154 timesteps/s -99.8% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 1.0701 | 1.0701 | 1.0701 | 0.0 | 10.17 -Neigh | 4.2135 | 4.2135 | 4.2135 | 0.0 | 40.06 -Comm | 0.38276 | 0.38276 | 0.38276 | 0.0 | 3.64 -Output | 0.0013647 | 0.0013647 | 0.0013647 | 0.0 | 0.01 -Modify | 4.7076 | 4.7076 | 4.7076 | 0.0 | 44.76 -Other | | 0.1424 | | | 1.35 - -Nlocal: 4000.00 ave 4000 max 4000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 171.000 ave 171 max 171 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 8093.00 ave 8093 max 8093 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 8093 -Ave neighs/atom = 2.0232500 -Neighbor list builds = 1004 -Dangerous builds = 4 - -#Remove any particles that are above z > 0.5*drum_height -delete_atoms group delgroup -Deleted 0 atoms, new total = 4000 - -#Add top lid -region top_wall plane ${xc} ${yc} ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region top_wall plane 15 ${yc} ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region top_wall plane 15 15 ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta 15 ${yc} 0 0 0 1 -region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta 15 15 0 0 0 1 -fix 5 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region top_wall - -# 'Turn' drum by switching the direction of gravity -unfix grav -unfix ins1 -unfix ins2 -fix grav all gravity 10 vector 0 -1 0 - -variable theta equal 2*PI*elapsed/20000.0 -run 3000 -Per MPI rank memory allocation (min/avg/max) = 19.37 | 19.37 | 19.37 Mbytes -Step Atoms KinEng v_theta - 2000 4000 65.647582 0 - 2100 4000 105.60001 0.031415927 - 2200 4000 112.27573 0.062831853 - 2300 4000 92.758671 0.09424778 - 2400 4000 88.925835 0.12566371 - 2500 4000 81.369163 0.15707963 - 2600 4000 32.046943 0.18849556 - 2700 4000 4.1926368 0.21991149 - 2800 4000 3.9933453 0.25132741 - 2900 4000 4.5062193 0.28274334 - 3000 4000 5.3409521 0.31415927 - 3100 4000 6.0165991 0.34557519 - 3200 4000 6.606767 0.37699112 - 3300 4000 7.3997751 0.40840704 - 3400 4000 8.1098807 0.43982297 - 3500 4000 8.6552424 0.4712389 - 3600 4000 9.8445204 0.50265482 - 3700 4000 10.098753 0.53407075 - 3800 4000 10.039489 0.56548668 - 3900 4000 9.6376278 0.5969026 - 4000 4000 9.2598836 0.62831853 - 4100 4000 8.7116037 0.65973446 - 4200 4000 8.1274117 0.69115038 - 4300 4000 7.1487627 0.72256631 - 4400 4000 6.2253778 0.75398224 - 4500 4000 5.3061398 0.78539816 - 4600 4000 4.4319316 0.81681409 - 4700 4000 4.205607 0.84823002 - 4800 4000 3.2112987 0.87964594 - 4900 4000 2.6449777 0.91106187 - 5000 4000 2.3475497 0.9424778 -Loop time of 32.4926 on 1 procs for 3000 steps with 4000 atoms - -Performance: 7977.205 tau/day, 92.329 timesteps/s -99.9% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 8.0124 | 8.0124 | 8.0124 | 0.0 | 24.66 -Neigh | 10.993 | 10.993 | 10.993 | 0.0 | 33.83 -Comm | 0.86697 | 0.86697 | 0.86697 | 0.0 | 2.67 -Output | 0.0021827 | 0.0021827 | 0.0021827 | 0.0 | 0.01 -Modify | 12.367 | 12.367 | 12.367 | 0.0 | 38.06 -Other | | 0.2515 | | | 0.77 - -Nlocal: 4000.00 ave 4000 max 4000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 318.000 ave 318 max 318 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 14807.0 ave 14807 max 14807 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 14807 -Ave neighs/atom = 3.7017500 -Neighbor list builds = 2189 -Dangerous builds = 1536 -Total wall time: 0:00:43 diff --git a/examples/granular/log.29Oct20.pour.drum.g++.4 b/examples/granular/log.29Oct20.pour.drum.g++.4 deleted file mode 100644 index e53da50b9b..0000000000 --- a/examples/granular/log.29Oct20.pour.drum.g++.4 +++ /dev/null @@ -1,271 +0,0 @@ -LAMMPS (29 Oct 2020) - using 1 OpenMP thread(s) per MPI task -# pour two types of particles (cohesive and non-cohesive) into cylinder -# 'turn' cylinder by changing direction of gravity, then rotate it. -# This simulates a rotating drum powder characterization experiment. - -variable name string rotating_drum_two_types - -atom_style sphere -units lj - -############################################### -# Geometry-related parameters -############################################### - -variable boxx equal 30 -variable boxy equal 30 -variable boxz equal 50 - -variable drum_rad equal ${boxx}*0.5 -variable drum_rad equal 30*0.5 -variable drum_height equal 20 - -variable xc equal 0.5*${boxx} -variable xc equal 0.5*30 -variable yc equal 0.5*${boxx} -variable yc equal 0.5*30 -variable zc equal 0.5*${boxz} -variable zc equal 0.5*50 - -############################################### -# Particle-related parameters -############################################### -variable rlo equal 0.25 -variable rhi equal 0.5 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.25 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.5 - -variable cyl_rad_inner equal ${drum_rad}-1.1*${rhi} -variable cyl_rad_inner equal 15-1.1*${rhi} -variable cyl_rad_inner equal 15-1.1*0.5 - -variable dens equal 1.0 - -variable skin equal 0.4*${rhi} -variable skin equal 0.4*0.5 - -############# -processors * * 1 -region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} -region boxreg block 0 30 0 ${boxy} 0 ${boxz} -region boxreg block 0 30 0 30 0 ${boxz} -region boxreg block 0 30 0 30 0 50 -create_box 2 boxreg -Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (30.000000 30.000000 50.000000) - 2 by 2 by 1 MPI processor grid -change_box all boundary p p f -Changing box ... - -pair_style granular -pair_coeff 1 * hertz/material 1e5 0.2 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji -pair_coeff 2 2 jkr 1e5 0.1 0.3 50 tangential mindlin NULL 1.0 0.5 rolling sds 1e3 1e3 0.1 twisting marshall damping tsuji - -variable theta equal 0 - -region curved_wall cylinder z ${xc} ${yc} ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region curved_wall cylinder z 15 ${yc} ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region curved_wall cylinder z 15 15 ${drum_rad} 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region curved_wall cylinder z 15 15 15 0 ${drum_height} side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta 15 ${yc} 0 0 0 1 -region curved_wall cylinder z 15 15 15 0 20 side in rotate v_theta 15 15 0 0 0 1 -region bottom_wall plane ${xc} ${yc} 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region bottom_wall plane 15 ${yc} 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta 15 ${yc} 0 0 0 1 -region bottom_wall plane 15 15 0 0 0 1 side in rotate v_theta 15 15 0 0 0 1 - -region insreg cylinder z ${xc} ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} -region insreg cylinder z 15 ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} -region insreg cylinder z 15 15 ${cyl_rad_inner} ${drum_height} ${boxz} -region insreg cylinder z 15 15 14.45 ${drum_height} ${boxz} -region insreg cylinder z 15 15 14.45 20 ${boxz} -region insreg cylinder z 15 15 14.45 20 50 - -fix 0 all balance 100 1.0 shift xy 5 1.1 -fix 1 all nve/sphere -fix grav all gravity 10 vector 0 0 -1 -fix ins1 all pour 2000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} -fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} -fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} -fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens 1 ${dens} -fix ins1 all pour 2000 1 1234 region insreg diam range 0.5 1 dens 1 1 -Particle insertion: 9396 every 490 steps, 2000 by step 1 -fix ins2 all pour 2000 2 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} -fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} -fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens ${dens} ${dens} -fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens 1 ${dens} -fix ins2 all pour 2000 2 1234 region insreg diam range 0.5 1 dens 1 1 -Particle insertion: 9396 every 490 steps, 2000 by step 1 - -comm_modify vel yes - -neighbor ${skin} bin -neighbor 0.2 bin -neigh_modify delay 0 every 1 check yes - -fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall -fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region bottom_wall - -thermo_style custom step atoms ke v_theta -thermo_modify lost warn -thermo 100 - -timestep 0.001 - -#dump 1 all custom 100 ${name}.dump id type radius mass x y z - -#For removal later -compute 1 all property/atom radius -variable zmax atom z+c_1>0.5*${drum_height} -variable zmax atom z+c_1>0.5*20 -group delgroup dynamic all var zmax every 10000 -dynamic group delgroup defined - -run 2000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.2 - ghost atom cutoff = 1.2 - binsize = 0.6, bins = 50 50 84 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair granular, perpetual - attributes: half, newton on, size, history - pair build: half/size/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory allocation (min/avg/max) = 12.25 | 12.25 | 12.25 Mbytes -Step Atoms KinEng v_theta - 0 0 -0 0 - 100 4000 -0 0 - 200 4000 -0 0 - 300 4000 -0 0 - 400 4000 -0 0 - 500 4000 -0 0 - 600 4000 -0 0 - 700 4000 -0 0 - 800 4000 -0 0 - 900 4000 -0 0 - 1000 4000 -0 0 - 1100 4000 -0 0 - 1200 4000 -0 0 - 1300 4000 -0 0 - 1400 4000 -0 0 - 1500 4000 -0 0 - 1600 4000 -0 0 - 1700 4000 -0 0 - 1800 4000 -0 0 - 1900 4000 -0 0 - 2000 4000 -0 0 -Loop time of 3.86825 on 4 procs for 2000 steps with 4000 atoms - -Performance: 44671.398 tau/day, 517.030 timesteps/s -96.7% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.26114 | 0.27918 | 0.28728 | 2.0 | 7.22 -Neigh | 1.2044 | 1.2414 | 1.3105 | 3.7 | 32.09 -Comm | 0.38592 | 0.47065 | 0.51052 | 7.4 | 12.17 -Output | 0.0007236 | 0.0013456 | 0.0024846 | 1.8 | 0.03 -Modify | 1.6217 | 1.6723 | 1.7801 | 5.0 | 43.23 -Other | | 0.2034 | | | 5.26 - -Nlocal: 1000.00 ave 1012 max 988 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 269.250 ave 278 max 256 min -Histogram: 1 0 0 0 0 0 1 1 0 1 -Neighs: 2060.50 ave 2156 max 1921 min -Histogram: 1 0 0 1 0 0 0 0 0 2 - -Total # of neighbors = 8242 -Ave neighs/atom = 2.0605000 -Neighbor list builds = 1004 -Dangerous builds = 4 - -#Remove any particles that are above z > 0.5*drum_height -delete_atoms group delgroup -Deleted 0 atoms, new total = 4000 - -#Add top lid -region top_wall plane ${xc} ${yc} ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region top_wall plane 15 ${yc} ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region top_wall plane 15 15 ${drum_height} 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta ${xc} ${yc} 0 0 0 1 -region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta 15 ${yc} 0 0 0 1 -region top_wall plane 15 15 20 0 0 -1 side in rotate v_theta 15 15 0 0 0 1 -fix 5 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region top_wall - -# 'Turn' drum by switching the direction of gravity -unfix grav -unfix ins1 -unfix ins2 -fix grav all gravity 10 vector 0 -1 0 - -variable theta equal 2*PI*elapsed/20000.0 -run 3000 -Per MPI rank memory allocation (min/avg/max) = 18.55 | 18.55 | 18.55 Mbytes -Step Atoms KinEng v_theta - 2000 4000 65.819213 0 - 2100 4000 105.02389 0.031415927 - 2200 4000 112.02469 0.062831853 - 2300 4000 92.271262 0.09424778 - 2400 4000 89.369506 0.12566371 - 2500 4000 80.910925 0.15707963 - 2600 4000 31.620722 0.18849556 - 2700 4000 4.3019937 0.21991149 - 2800 4000 3.9913967 0.25132741 - 2900 4000 4.5203726 0.28274334 - 3000 4000 5.484886 0.31415927 - 3100 4000 6.1085958 0.34557519 - 3200 4000 6.7085635 0.37699112 - 3300 4000 7.4787777 0.40840704 - 3400 4000 8.2116413 0.43982297 - 3500 4000 8.7979302 0.4712389 - 3600 4000 9.871649 0.50265482 - 3700 4000 10.012426 0.53407075 - 3800 4000 9.9067754 0.56548668 - 3900 4000 9.725458 0.5969026 - 4000 4000 9.3350056 0.62831853 - 4100 4000 8.8337295 0.65973446 - 4200 4000 8.2712493 0.69115038 - 4300 4000 6.9609934 0.72256631 - 4400 4000 6.0120294 0.75398224 - 4500 4000 5.0490036 0.78539816 - 4600 4000 4.2796544 0.81681409 - 4700 4000 4.1736483 0.84823002 - 4800 4000 3.0860106 0.87964594 - 4900 4000 2.6670909 0.91106187 - 5000 4000 2.2901814 0.9424778 -Loop time of 10.7627 on 4 procs for 3000 steps with 4000 atoms - -Performance: 24083.252 tau/day, 278.741 timesteps/s -97.9% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 1.6731 | 2.0701 | 2.3327 | 18.9 | 19.23 -Neigh | 2.7389 | 3.1706 | 3.5146 | 15.7 | 29.46 -Comm | 0.93507 | 1.5441 | 2.1182 | 39.1 | 14.35 -Output | 0.0021682 | 0.0044412 | 0.006026 | 2.2 | 0.04 -Modify | 3.0031 | 3.4223 | 3.9262 | 18.3 | 31.80 -Other | | 0.5511 | | | 5.12 - -Nlocal: 1000.00 ave 1277 max 723 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 569.750 ave 809 max 454 min -Histogram: 1 2 0 0 0 0 0 0 0 1 -Neighs: 3690.50 ave 4937 max 2426 min -Histogram: 1 1 0 0 0 0 0 0 0 2 - -Total # of neighbors = 14762 -Ave neighs/atom = 3.6905000 -Neighbor list builds = 2187 -Dangerous builds = 1610 -Total wall time: 0:00:14 diff --git a/examples/granular/log.29Oct20.pour.flatwall.g++.1 b/examples/granular/log.29Oct20.pour.flatwall.g++.1 deleted file mode 100644 index 00fc8e31a1..0000000000 --- a/examples/granular/log.29Oct20.pour.flatwall.g++.1 +++ /dev/null @@ -1,188 +0,0 @@ -LAMMPS (29 Oct 2020) - using 1 OpenMP thread(s) per MPI task -# pour two types of particles (cohesive and non-cohesive) on flat wall - -variable name string pour_two_types - -atom_style sphere -units lj - -############################################### -# Geometry-related parameters -############################################### - -variable boxx equal 20 -variable boxy equal 20 -variable boxz equal 30 - -variable xc1 equal 0.3*${boxx} -variable xc1 equal 0.3*20 -variable xc2 equal 0.7*${boxx} -variable xc2 equal 0.7*20 -variable yc equal 0.5*${boxy} -variable yc equal 0.5*20 - -############################################### -# Particle-related parameters -############################################### -variable rlo equal 0.25 -variable rhi equal 0.5 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.25 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.5 - -variable dens equal 1.0 - -variable skin equal 0.3*${rhi} -variable skin equal 0.3*0.5 - -############# -processors * * 1 -region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} -region boxreg block 0 20 0 ${boxy} 0 ${boxz} -region boxreg block 0 20 0 20 0 ${boxz} -region boxreg block 0 20 0 20 0 30 -create_box 2 boxreg -Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (20.000000 20.000000 30.000000) - 1 by 1 by 1 MPI processor grid -change_box all boundary p p f -Changing box ... - -pair_style granular -pair_coeff 1 * jkr 1000.0 50.0 0.3 10 tangential mindlin 800.0 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall -pair_coeff 2 2 hertz 200.0 20.0 tangential linear_history 300.0 1.0 0.1 rolling sds 200.0 100.0 0.1 twisting marshall - -comm_modify vel yes - -region insreg1 cylinder z ${xc1} ${yc} 5 15 ${boxz} -region insreg1 cylinder z 6 ${yc} 5 15 ${boxz} -region insreg1 cylinder z 6 10 5 15 ${boxz} -region insreg1 cylinder z 6 10 5 15 30 -region insreg2 cylinder z ${xc2} ${yc} 5 15 ${boxz} -region insreg2 cylinder z 14 ${yc} 5 15 ${boxz} -region insreg2 cylinder z 14 10 5 15 ${boxz} -region insreg2 cylinder z 14 10 5 15 30 - -fix 1 all nve/sphere -fix grav all gravity 10.0 vector 0 0 -1 -fix ins1 all pour 1500 1 3123 region insreg1 diam range ${dlo} ${dhi} dens ${dens} ${dens} -fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 ${dhi} dens ${dens} ${dens} -fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens ${dens} ${dens} -fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens 1 ${dens} -fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens 1 1 -Particle insertion: 562 every 346 steps, 1500 by step 693 -fix ins2 all pour 1500 2 3123 region insreg2 diam range ${dlo} ${dhi} dens ${dens} ${dens} -fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 ${dhi} dens ${dens} ${dens} -fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens ${dens} ${dens} -fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens 1 ${dens} -fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens 1 1 -Particle insertion: 562 every 346 steps, 1500 by step 693 - -neighbor ${skin} bin -neighbor 0.15 bin -neigh_modify delay 0 every 1 check yes - -fix 3 all wall/gran granular hertz/material 1e5 1e3 0.3 tangential mindlin NULL 1.0 0.5 zplane 0 NULL - -thermo_style custom step atoms ke -thermo_modify lost warn -thermo 100 - -timestep 0.001 - -#dump 1 all custom 100 ${name}.dump id type radius mass x y z - -run 5000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.15 - ghost atom cutoff = 1.15 - binsize = 0.575, bins = 35 35 53 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair granular, perpetual - attributes: half, newton on, size, history - pair build: half/size/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory allocation (min/avg/max) = 12.22 | 12.22 | 12.22 Mbytes -Step Atoms KinEng - 0 0 -0 - 100 926 -0 - 200 926 -0 - 300 926 -0 - 400 1498 -0 - 500 1498 -0 - 600 1498 -0 - 700 2275 -0 - 800 2275 -0 - 900 2275 -0 - 1000 2275 -0 - 1100 2954 -0 - 1200 2954 -0 - 1300 2954 -0 - 1400 3000 -0 - 1500 3000 -0 - 1600 3000 -0 - 1700 3000 -0 - 1800 3000 -0 - 1900 3000 -0 - 2000 3000 -0 - 2100 3000 -0 - 2200 3000 -0 - 2300 3000 -0 - 2400 3000 -0 - 2500 3000 -0 - 2600 3000 -0 - 2700 3000 -0 - 2800 3000 -0 - 2900 3000 -0 - 3000 3000 -0 - 3100 3000 -0 - 3200 3000 -0 - 3300 3000 -0 - 3400 3000 -0 - 3500 3000 -0 - 3600 3000 -0 - 3700 3000 -0 - 3800 3000 -0 - 3900 3000 -0 - 4000 3000 -0 - 4100 3000 -0 - 4200 3000 -0 - 4300 3000 -0 - 4400 3000 -0 - 4500 3000 -0 - 4600 3000 -0 - 4700 3000 -0 - 4800 3000 -0 - 4900 3000 -0 - 5000 3000 -0 -Loop time of 24.3889 on 1 procs for 5000 steps with 3000 atoms - -Performance: 17713.003 tau/day, 205.012 timesteps/s -99.9% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 14.362 | 14.362 | 14.362 | 0.0 | 58.89 -Neigh | 3.3483 | 3.3483 | 3.3483 | 0.0 | 13.73 -Comm | 0.42893 | 0.42893 | 0.42893 | 0.0 | 1.76 -Output | 0.0025065 | 0.0025065 | 0.0025065 | 0.0 | 0.01 -Modify | 6.059 | 6.059 | 6.059 | 0.0 | 24.84 -Other | | 0.1876 | | | 0.77 - -Nlocal: 3000.00 ave 3000 max 3000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 462.000 ave 462 max 462 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 17694.0 ave 17694 max 17694 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 17694 -Ave neighs/atom = 5.8980000 -Neighbor list builds = 1133 -Dangerous builds = 0 -Total wall time: 0:00:24 diff --git a/examples/granular/log.29Oct20.pour.flatwall.g++.4 b/examples/granular/log.29Oct20.pour.flatwall.g++.4 deleted file mode 100644 index 1688e52b43..0000000000 --- a/examples/granular/log.29Oct20.pour.flatwall.g++.4 +++ /dev/null @@ -1,188 +0,0 @@ -LAMMPS (29 Oct 2020) - using 1 OpenMP thread(s) per MPI task -# pour two types of particles (cohesive and non-cohesive) on flat wall - -variable name string pour_two_types - -atom_style sphere -units lj - -############################################### -# Geometry-related parameters -############################################### - -variable boxx equal 20 -variable boxy equal 20 -variable boxz equal 30 - -variable xc1 equal 0.3*${boxx} -variable xc1 equal 0.3*20 -variable xc2 equal 0.7*${boxx} -variable xc2 equal 0.7*20 -variable yc equal 0.5*${boxy} -variable yc equal 0.5*20 - -############################################### -# Particle-related parameters -############################################### -variable rlo equal 0.25 -variable rhi equal 0.5 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.25 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.5 - -variable dens equal 1.0 - -variable skin equal 0.3*${rhi} -variable skin equal 0.3*0.5 - -############# -processors * * 1 -region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} -region boxreg block 0 20 0 ${boxy} 0 ${boxz} -region boxreg block 0 20 0 20 0 ${boxz} -region boxreg block 0 20 0 20 0 30 -create_box 2 boxreg -Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (20.000000 20.000000 30.000000) - 2 by 2 by 1 MPI processor grid -change_box all boundary p p f -Changing box ... - -pair_style granular -pair_coeff 1 * jkr 1000.0 50.0 0.3 10 tangential mindlin 800.0 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall -pair_coeff 2 2 hertz 200.0 20.0 tangential linear_history 300.0 1.0 0.1 rolling sds 200.0 100.0 0.1 twisting marshall - -comm_modify vel yes - -region insreg1 cylinder z ${xc1} ${yc} 5 15 ${boxz} -region insreg1 cylinder z 6 ${yc} 5 15 ${boxz} -region insreg1 cylinder z 6 10 5 15 ${boxz} -region insreg1 cylinder z 6 10 5 15 30 -region insreg2 cylinder z ${xc2} ${yc} 5 15 ${boxz} -region insreg2 cylinder z 14 ${yc} 5 15 ${boxz} -region insreg2 cylinder z 14 10 5 15 ${boxz} -region insreg2 cylinder z 14 10 5 15 30 - -fix 1 all nve/sphere -fix grav all gravity 10.0 vector 0 0 -1 -fix ins1 all pour 1500 1 3123 region insreg1 diam range ${dlo} ${dhi} dens ${dens} ${dens} -fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 ${dhi} dens ${dens} ${dens} -fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens ${dens} ${dens} -fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens 1 ${dens} -fix ins1 all pour 1500 1 3123 region insreg1 diam range 0.5 1 dens 1 1 -Particle insertion: 562 every 346 steps, 1500 by step 693 -fix ins2 all pour 1500 2 3123 region insreg2 diam range ${dlo} ${dhi} dens ${dens} ${dens} -fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 ${dhi} dens ${dens} ${dens} -fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens ${dens} ${dens} -fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens 1 ${dens} -fix ins2 all pour 1500 2 3123 region insreg2 diam range 0.5 1 dens 1 1 -Particle insertion: 562 every 346 steps, 1500 by step 693 - -neighbor ${skin} bin -neighbor 0.15 bin -neigh_modify delay 0 every 1 check yes - -fix 3 all wall/gran granular hertz/material 1e5 1e3 0.3 tangential mindlin NULL 1.0 0.5 zplane 0 NULL - -thermo_style custom step atoms ke -thermo_modify lost warn -thermo 100 - -timestep 0.001 - -#dump 1 all custom 100 ${name}.dump id type radius mass x y z - -run 5000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.15 - ghost atom cutoff = 1.15 - binsize = 0.575, bins = 35 35 53 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair granular, perpetual - attributes: half, newton on, size, history - pair build: half/size/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory allocation (min/avg/max) = 11.98 | 11.98 | 11.98 Mbytes -Step Atoms KinEng - 0 0 -0 - 100 926 -0 - 200 926 -0 - 300 926 -0 - 400 1498 -0 - 500 1498 -0 - 600 1498 -0 - 700 2275 -0 - 800 2275 -0 - 900 2275 -0 - 1000 2275 -0 - 1100 2954 -0 - 1200 2954 -0 - 1300 2954 -0 - 1400 3000 -0 - 1500 3000 -0 - 1600 3000 -0 - 1700 3000 -0 - 1800 3000 -0 - 1900 3000 -0 - 2000 3000 -0 - 2100 3000 -0 - 2200 3000 -0 - 2300 3000 -0 - 2400 3000 -0 - 2500 3000 -0 - 2600 3000 -0 - 2700 3000 -0 - 2800 3000 -0 - 2900 3000 -0 - 3000 3000 -0 - 3100 3000 -0 - 3200 3000 -0 - 3300 3000 -0 - 3400 3000 -0 - 3500 3000 -0 - 3600 3000 -0 - 3700 3000 -0 - 3800 3000 -0 - 3900 3000 -0 - 4000 3000 -0 - 4100 3000 -0 - 4200 3000 -0 - 4300 3000 -0 - 4400 3000 -0 - 4500 3000 -0 - 4600 3000 -0 - 4700 3000 -0 - 4800 3000 -0 - 4900 3000 -0 - 5000 3000 -0 -Loop time of 12.1982 on 4 procs for 5000 steps with 3000 atoms - -Performance: 35414.923 tau/day, 409.895 timesteps/s -97.0% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 1.7141 | 3.8131 | 6.2143 | 107.3 | 31.26 -Neigh | 0.77648 | 0.96585 | 1.1892 | 18.3 | 7.92 -Comm | 0.7427 | 3.5566 | 5.9731 | 128.4 | 29.16 -Output | 0.0067544 | 0.0086352 | 0.011408 | 1.8 | 0.07 -Modify | 3.3476 | 3.5826 | 3.8235 | 11.5 | 29.37 -Other | | 0.2715 | | | 2.23 - -Nlocal: 750.000 ave 1033 max 463 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 435.000 ave 492 max 378 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Neighs: 4434.50 ave 7028 max 1967 min -Histogram: 2 0 0 0 0 0 0 0 0 2 - -Total # of neighbors = 17738 -Ave neighs/atom = 5.9126667 -Neighbor list builds = 1139 -Dangerous builds = 0 -Total wall time: 0:00:12 From 4af5ce3f9613192f5287fe02b83f6ec3dfc26ea7 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 25 Jan 2023 19:46:18 +0200 Subject: [PATCH 055/445] Update library.h --- src/library.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/library.h b/src/library.h index 9cd2f34d73..340b0edb7b 100644 --- a/src/library.h +++ b/src/library.h @@ -190,6 +190,9 @@ void lammps_scatter_atoms_subset(void *handle, const char *name, int type, int c int *ids, void *data); void lammps_gather_bonds(void *handle, void *data); +void lammps_gather_angles(void *handle, void *data); +void lammps_gather_dihedrals(void *handle, void *data); +void lammps_gather_impropers(void *handle, void *data); void lammps_gather(void *handle, const char *name, int type, int count, void *data); void lammps_gather_concat(void *handle, const char *name, int type, int count, void *data); From 954dbacf828aafa834c494789965d6626d2aa2c4 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 25 Jan 2023 19:48:23 +0200 Subject: [PATCH 056/445] Update library.cpp --- src/library.cpp | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/src/library.cpp b/src/library.cpp index 2c16cc6615..c97148f11a 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -3159,6 +3159,114 @@ void lammps_gather_bonds(void *handle, void *data) END_CAPTURE } +// Gather function for angles +void lammps_gather_angles(void *handle, void *data) +{ + auto lmp = (LAMMPS *) handle; + BEGIN_CAPTURE { + void *val = lammps_extract_global(handle,"nangles"); + bigint nangles = *(bigint *)val; + + // no angles + if (nangles == 0) return; + + // count per MPI rank angles, determine offsets and allocate local buffers + int localangles = lmp->atom->avec->pack_angle(nullptr); + int nprocs = lmp->comm->nprocs; + int *bufsizes = new int[nprocs]; + int *bufoffsets = new int[nprocs]; + MPI_Allgather(&localangles, 1, MPI_INT, bufsizes, 1, MPI_INT, lmp->world); + bufoffsets[0] = 0; + bufsizes[0] *= 4; // 4 items per angle: type, atom1, atom2, atom3 + for (int i = 1; i < nprocs; ++i) { + bufoffsets[i] = bufoffsets[i-1] + bufsizes[i-1]; + bufsizes[i] *= 4; // 4 items per angle: type, atom1, atom2, atom3 + } + + tagint **angles; + lmp->memory->create(angles, localangles, 4, "library:gather_angles:localangles"); + lmp->atom->avec->pack_angle(angles); + MPI_Allgatherv(&angles[0][0], 4*localangles, MPI_LMP_TAGINT, data, bufsizes, + bufoffsets, MPI_LMP_TAGINT, lmp->world); + lmp->memory->destroy(angles); + delete[] bufsizes; + delete[] bufoffsets; + } + END_CAPTURE +} + +// Gather function for dihedrals +void lammps_gather_dihedrals(void *handle, void *data) +{ + auto lmp = (LAMMPS *) handle; + BEGIN_CAPTURE { + void *val = lammps_extract_global(handle,"ndihedrals"); + bigint ndihedrals = *(bigint *)val; + + // no dihedrals + if (ndihedrals == 0) return; + + // count per MPI rank dihedrals, determine offsets and allocate local buffers + int localdihedrals = lmp->atom->avec->pack_dihedral(nullptr); + int nprocs = lmp->comm->nprocs; + int *bufsizes = new int[nprocs]; + int *bufoffsets = new int[nprocs]; + MPI_Allgather(&localdihedrals, 1, MPI_INT, bufsizes, 1, MPI_INT, lmp->world); + bufoffsets[0] = 0; + bufsizes[0] *= 5; // 5 items per dihedral: type, atom1, atom2, atom3, atom4 + for (int i = 1; i < nprocs; ++i) { + bufoffsets[i] = bufoffsets[i-1] + bufsizes[i-1]; + bufsizes[i] *= 5; // 5 items per dihedral: type, atom1, atom2, atom3, atom4 + } + + tagint **dihedrals; + lmp->memory->create(dihedrals, localdihedrals, 5, "library:gather_dihedrals:localdihedrals"); + lmp->atom->avec->pack_dihedral(dihedrals); + MPI_Allgatherv(&dihedrals[0][0], 5*localdihedrals, MPI_LMP_TAGINT, data, bufsizes, + bufoffsets, MPI_LMP_TAGINT, lmp->world); + lmp->memory->destroy(dihedrals); + delete[] bufsizes; + delete[] bufoffsets; + } + END_CAPTURE +} + +// Gather function for impropers +void lammps_gather_impropers(void *handle, void *data) +{ + auto lmp = (LAMMPS *) handle; + BEGIN_CAPTURE { + void *val = lammps_extract_global(handle,"nimpropers"); + bigint nimpropers = *(bigint *)val; + + // no impropers + if (nimpropers == 0) return; + + // count per MPI rank impropers, determine offsets and allocate local buffers + int localimpropers = lmp->atom->avec->pack_improper(nullptr); + int nprocs = lmp->comm->nprocs; + int *bufsizes = new int[nprocs]; + int *bufoffsets = new int[nprocs]; + MPI_Allgather(&localimpropers, 1, MPI_INT, bufsizes, 1, MPI_INT, lmp->world); + bufoffsets[0] = 0; + bufsizes[0] *= 5; // 5 items per improper: type, atom1, atom2, atom3, atom4 + for (int i = 1; i < nprocs; ++i) { + bufoffsets[i] = bufoffsets[i-1] + bufsizes[i-1]; + bufsizes[i] *= 5; // 5 items per improper: type, atom1, atom2, atom3, atom4 + } + + tagint **impropers; + lmp->memory->create(impropers, localimpropers, 5, "library:gather_impropers:localimpropers"); + lmp->atom->avec->pack_improper(impropers); + MPI_Allgatherv(&impropers[0][0], 5*localimpropers, MPI_LMP_TAGINT, data, bufsizes, + bufoffsets, MPI_LMP_TAGINT, lmp->world); + lmp->memory->destroy(impropers); + delete[] bufsizes; + delete[] bufoffsets; + } + END_CAPTURE +} + /** Gather the named per-atom, per-atom fix, per-atom compute, or fix property/atom-based entities * from all processes, in order by atom ID. * From d5121bf2ee304d6a08a992e9a7f8a1481ab61552 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 25 Jan 2023 19:50:31 +0200 Subject: [PATCH 057/445] Update numpy_wrapper.py --- python/lammps/numpy_wrapper.py | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/python/lammps/numpy_wrapper.py b/python/lammps/numpy_wrapper.py index b16c359d7e..e8a7a2899f 100644 --- a/python/lammps/numpy_wrapper.py +++ b/python/lammps/numpy_wrapper.py @@ -277,6 +277,60 @@ class numpy_wrapper: # ------------------------------------------------------------------------- + def gather_angles(self): + """ Retrieve global list of angles as NumPy array + + This is a wrapper around :py:meth:`lammps.gather_angles() ` + It behaves the same as the original method, but returns a NumPy array instead + of a ``ctypes`` list. + + .. versionadded:: 28Jan2023 + + :return: the requested data as a 2d-integer numpy array + :rtype: numpy.array(nangles,4) + """ + import numpy as np + nangles, value = self.lmp.gather_angles() + return np.ctypeslib.as_array(value).reshape(nangles,4) + + # ------------------------------------------------------------------------- + + def gather_dihedrals(self): + """ Retrieve global list of dihedrals as NumPy array + + This is a wrapper around :py:meth:`lammps.gather_dihedrals() ` + It behaves the same as the original method, but returns a NumPy array instead + of a ``ctypes`` list. + + .. versionadded:: 28Jan2023 + + :return: the requested data as a 2d-integer numpy array + :rtype: numpy.array(ndihedrals,5) + """ + import numpy as np + ndihedrals, value = self.lmp.gather_dihedrals() + return np.ctypeslib.as_array(value).reshape(ndihedrals,5) + + # ------------------------------------------------------------------------- + + def gather_impropers(self): + """ Retrieve global list of impropers as NumPy array + + This is a wrapper around :py:meth:`lammps.gather_impropers() ` + It behaves the same as the original method, but returns a NumPy array instead + of a ``ctypes`` list. + + .. versionadded:: 28Jan2023 + + :return: the requested data as a 2d-integer numpy array + :rtype: numpy.array(nimpropers,5) + """ + import numpy as np + nimpropers, value = self.lmp.gather_impropers() + return np.ctypeslib.as_array(value).reshape(nimpropers,5) + + # ------------------------------------------------------------------------- + def fix_external_get_force(self, fix_id): """Get access to the array with per-atom forces of a fix external instance with a given fix ID. From fae750391d8d4bd0cfb5c4bfe27cd05109a360d2 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 25 Jan 2023 19:53:41 +0200 Subject: [PATCH 058/445] Update core.py --- python/lammps/core.py | 78 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/python/lammps/core.py b/python/lammps/core.py index 19723a099e..02dd211a9e 100644 --- a/python/lammps/core.py +++ b/python/lammps/core.py @@ -210,6 +210,15 @@ class lammps(object): self.lib.lammps_gather_bonds.argtypes = [c_void_p,c_void_p] self.lib.lammps_gather_bonds.restype = None + self.lib.lammps_gather_angles.argtypes = [c_void_p,c_void_p] + self.lib.lammps_gather_angles.restype = None + + self.lib.lammps_gather_dihedrals.argtypes = [c_void_p,c_void_p] + self.lib.lammps_gather_dihedrals.restype = None + + self.lib.lammps_gather_impropers.argtypes = [c_void_p,c_void_p] + self.lib.lammps_gather_impropers.restype = None + self.lib.lammps_gather.argtypes = [c_void_p,c_char_p,c_int,c_int,c_void_p] self.lib.lammps_gather.restype = None @@ -1299,6 +1308,75 @@ class lammps(object): # ------------------------------------------------------------------------- + def gather_angles(self): + """Retrieve global list of angles + + This is a wrapper around the :cpp:func:`lammps_gather_angles` + function of the C-library interface. + + This function returns a tuple with the number of angles and a + flat list of ctypes integer values with the angle type, angle atom1, + angle atom2, angle atom3 for each angle. + + .. versionadded:: 28Jan2023 + + :return: a tuple with the number of angles and a list of c_int or c_long + :rtype: (int, 4*nangles*c_tagint) + """ + nangles = self.extract_global("nangles") + with ExceptionCheck(self): + data = ((4*nangles)*self.c_tagint)() + self.lib.lammps_gather_angles(self.lmp,data) + return nangles,data + + # ------------------------------------------------------------------------- + + def gather_dihedrals(self): + """Retrieve global list of dihedrals + + This is a wrapper around the :cpp:func:`lammps_gather_dihedrals` + function of the C-library interface. + + This function returns a tuple with the number of dihedrals and a + flat list of ctypes integer values with the dihedral type, dihedral atom1, + dihedral atom2, dihedral atom3, dihedral atom4 for each dihedral. + + .. versionadded:: 28Jan2023 + + :return: a tuple with the number of dihedrals and a list of c_int or c_long + :rtype: (int, 5*ndihedrals*c_tagint) + """ + ndihedrals = self.extract_global("ndihedrals") + with ExceptionCheck(self): + data = ((5*ndihedrals)*self.c_tagint)() + self.lib.lammps_gather_dihedrals(self.lmp,data) + return ndihedrals,data + + # ------------------------------------------------------------------------- + + def gather_impropers(self): + """Retrieve global list of impropers + + This is a wrapper around the :cpp:func:`lammps_gather_impropers` + function of the C-library interface. + + This function returns a tuple with the number of impropers and a + flat list of ctypes integer values with the improper type, improper atom1, + improper atom2, improper atom3, improper atom4 for each improper. + + .. versionadded:: 28Jan2023 + + :return: a tuple with the number of impropers and a list of c_int or c_long + :rtype: (int, 5*nimpropers*c_tagint) + """ + nimpropers = self.extract_global("nimpropers") + with ExceptionCheck(self): + data = ((5*nimpropers)*self.c_tagint)() + self.lib.lammps_gather_impropers(self.lmp,data) + return nimpropers,data + + # ------------------------------------------------------------------------- + # return vector of atom/compute/fix properties gathered across procs # 3 variants to match src/library.cpp # name = atom property recognized by LAMMPS in atom->extract() From 2620726c96a5410654d9aff088cb73f9a7e9ef9d Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 09:27:13 +0200 Subject: [PATCH 059/445] Update lammps.i --- tools/swig/lammps.i | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/swig/lammps.i b/tools/swig/lammps.i index d085eb9283..64f120bfb4 100644 --- a/tools/swig/lammps.i +++ b/tools/swig/lammps.i @@ -137,6 +137,9 @@ extern void lammps_gather_atoms_subset(void *, char *, int, int, int, int *, v extern void lammps_scatter_atoms(void *, char *, int, int, void *); extern void lammps_scatter_atoms_subset(void *, char *, int, int, int, int *, void *); extern void lammps_gather_bonds(void *handle, void *data); +extern void lammps_gather_angles(void *handle, void *data); +extern void lammps_gather_dihedrals(void *handle, void *data); +extern void lammps_gather_impropers(void *handle, void *data); extern void lammps_gather(void *, char *, int, int, void *); extern void lammps_gather_concat(void *, char *, int, int, void *); extern void lammps_gather_subset(void *, char *, int, int, int, int *, void *); @@ -316,6 +319,9 @@ extern void lammps_gather_atoms_subset(void *, char *, int, int, int, int *, v extern void lammps_scatter_atoms(void *, char *, int, int, void *); extern void lammps_scatter_atoms_subset(void *, char *, int, int, int, int *, void *); extern void lammps_gather_bonds(void *handle, void *data); +extern void lammps_gather_angles(void *handle, void *data); +extern void lammps_gather_dihedrals(void *handle, void *data); +extern void lammps_gather_impropers(void *handle, void *data); extern void lammps_gather(void *, char *, int, int, void *); extern void lammps_gather_concat(void *, char *, int, int, void *); extern void lammps_gather_subset(void *, char *, int, int, int, int *, void *); From 3714abec2414f9479081974598f413b2865a55df Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 09:34:01 +0200 Subject: [PATCH 060/445] Update liblammpsplugin.h --- examples/COUPLE/plugin/liblammpsplugin.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/COUPLE/plugin/liblammpsplugin.h b/examples/COUPLE/plugin/liblammpsplugin.h index d0981df44c..c6ec03e498 100644 --- a/examples/COUPLE/plugin/liblammpsplugin.h +++ b/examples/COUPLE/plugin/liblammpsplugin.h @@ -161,6 +161,9 @@ struct _liblammpsplugin { void (*scatter_atoms_subset)(void *, const char *, int, int, int, int *, void *); void (*gather_bonds)(void *, void *); + void (*gather_angles)(void *, void *); + void (*gather_dihedrals)(void *, void *); + void (*gather_impropers)(void *, void *); void (*gather)(void *, const char *, int, int, void *); void (*gather_concat)(void *, const char *, int, int, void *); From 19dab05b45b9f4b7242acc0589032484c996e662 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 09:35:10 +0200 Subject: [PATCH 061/445] Update liblammpsplugin.c --- examples/COUPLE/plugin/liblammpsplugin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/COUPLE/plugin/liblammpsplugin.c b/examples/COUPLE/plugin/liblammpsplugin.c index 759be31a81..d446f9cd2f 100644 --- a/examples/COUPLE/plugin/liblammpsplugin.c +++ b/examples/COUPLE/plugin/liblammpsplugin.c @@ -117,6 +117,9 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib) ADDSYM(scatter_atoms_subset); ADDSYM(gather_bonds); + ADDSYM(gather_angles); + ADDSYM(gather_dihedrals); + ADDSYM(gather_impropers); ADDSYM(gather); ADDSYM(gather_concat); From e4b2fd318f5a721ad887144f53f9d078c7c85f23 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 11:00:26 +0200 Subject: [PATCH 062/445] Update Library_scatter.rst --- doc/src/Library_scatter.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/src/Library_scatter.rst b/doc/src/Library_scatter.rst index 8380ef91bd..4c20b78c4c 100644 --- a/doc/src/Library_scatter.rst +++ b/doc/src/Library_scatter.rst @@ -18,6 +18,9 @@ It documents the following functions: - :cpp:func:`lammps_scatter_atoms` - :cpp:func:`lammps_scatter_atoms_subset` - :cpp:func:`lammps_gather_bonds` +- :cpp:func:`lammps_gather_angles` +- :cpp:func:`lammps_gather_dihedrals` +- :cpp:func:`lammps_gather_impropers` - :cpp:func:`lammps_gather` - :cpp:func:`lammps_gather_concat` - :cpp:func:`lammps_gather_subset` @@ -57,6 +60,21 @@ It documents the following functions: ----------------------- +.. doxygenfunction:: lammps_gather_angles + :project: progguide + +----------------------- + +.. doxygenfunction:: lammps_gather_dihedrals + :project: progguide + +----------------------- + +.. doxygenfunction:: lammps_gather_impropers + :project: progguide + +----------------------- + .. doxygenfunction:: lammps_gather :project: progguide From d2539f45ae7c8047380d7f802de71e919265f378 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 11:40:58 +0200 Subject: [PATCH 063/445] add doxygen style comments to document the new C library functions added --- src/library.cpp | 230 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 227 insertions(+), 3 deletions(-) diff --git a/src/library.cpp b/src/library.cpp index c97148f11a..17b4de44e3 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -3159,7 +3159,81 @@ void lammps_gather_bonds(void *handle, void *data) END_CAPTURE } -// Gather function for angles +/** Gather type and constituent atom info for all angles + * +\verbatim embed:rst + +This function copies the list of all angles into a buffer provided by +the calling code. The buffer will be filled with angle type, angle atom 1, +angle atom 2, angle atom 3 for each angle. Thus the buffer has to be allocated to the +dimension of 4 times the **total** number of angles times the size of +the LAMMPS "tagint" type, which is either 4 or 8 bytes depending on +whether they are stored in 32-bit or 64-bit integers, respectively. +This size depends on the compile time settings used when compiling +the LAMMPS library and can be queried by calling +:cpp:func:`lammps_extract_setting()` with the keyword "tagint". + +When running in parallel, the data buffer must be allocated on **all** +MPI ranks and will be filled with the information for **all** angles +in the system. + +.. versionadded:: TBD + +Below is a brief C code demonstrating accessing this collected angle information. + +.. code-block:: c + + #include "library.h" + + #include + #include + #include + + int main(int argc, char **argv) + { + int tagintsize; + int64_t i, nangles; + void *handle, *angles; + + handle = lammps_open_no_mpi(0, NULL, NULL); + lammps_file(handle, "in.some_input"); + + tagintsize = lammps_extract_setting(handle, "tagint"); + if (tagintsize == 4) + nangles = *(int32_t *)lammps_extract_global(handle, "nangles"); + else + nangles = *(int64_t *)lammps_extract_global(handle, "nangles"); + angles = malloc(nangles * 4 * tagintsize); + + lammps_gather_angles(handle, angles); + + if (lammps_extract_setting(handle, "world_rank") == 0) { + if (tagintsize == 4) { + int32_t *angles_real = (int32_t *)angles; + for (i = 0; i < nangles; ++i) { + printf("angle % 4ld: type = %d, atoms: % 4d % 4d % 4d\n",i, + angles_real[4*i], angles_real[4*i+1], angles_real[4*i+2], angles_real[4*i+3]); + } + } else { + int64_t *angles_real = (int64_t *)angles; + for (i = 0; i < nangles; ++i) { + printf("angle % 4ld: type = %ld, atoms: % 4ld % 4ld % 4ld\n",i, + angles_real[4*i], angles_real[4*i+1], angles_real[4*i+2], angles_real[4*i+3]); + } + } + } + + lammps_close(handle); + lammps_mpi_finalize(); + free(angles); + return 0; + } + +\endverbatim + * + * \param handle pointer to a previously created LAMMPS instance + * \param data pointer to data to copy the result to */ + void lammps_gather_angles(void *handle, void *data) { auto lmp = (LAMMPS *) handle; @@ -3195,7 +3269,82 @@ void lammps_gather_angles(void *handle, void *data) END_CAPTURE } -// Gather function for dihedrals +/** Gather type and constituent atom info for all dihedrals + * +\verbatim embed:rst + +This function copies the list of all dihedrals into a buffer provided by +the calling code. The buffer will be filled with dihedral type, dihedral atom 1, +dihedral atom 2, dihedral atom 3, dihedral atom 4 for each dihedral. +Thus the buffer has to be allocated to the +dimension of 5 times the **total** number of dihedrals times the size of +the LAMMPS "tagint" type, which is either 4 or 8 bytes depending on +whether they are stored in 32-bit or 64-bit integers, respectively. +This size depends on the compile time settings used when compiling +the LAMMPS library and can be queried by calling +:cpp:func:`lammps_extract_setting()` with the keyword "tagint". + +When running in parallel, the data buffer must be allocated on **all** +MPI ranks and will be filled with the information for **all** dihedrals +in the system. + +.. versionadded:: TBD + +Below is a brief C code demonstrating accessing this collected dihedral information. + +.. code-block:: c + + #include "library.h" + + #include + #include + #include + + int main(int argc, char **argv) + { + int tagintsize; + int64_t i, ndihedrals; + void *handle, *dihedrals; + + handle = lammps_open_no_mpi(0, NULL, NULL); + lammps_file(handle, "in.some_input"); + + tagintsize = lammps_extract_setting(handle, "tagint"); + if (tagintsize == 4) + ndihedrals = *(int32_t *)lammps_extract_global(handle, "ndihedrals"); + else + ndihedrals = *(int64_t *)lammps_extract_global(handle, "ndihedrals"); + dihedrals = malloc(ndihedrals * 5 * tagintsize); + + lammps_gather_dihedrals(handle, dihedrals); + + if (lammps_extract_setting(handle, "world_rank") == 0) { + if (tagintsize == 4) { + int32_t *dihedrals_real = (int32_t *)dihedrals; + for (i = 0; i < ndihedrals; ++i) { + printf("dihedral % 4ld: type = %d, atoms: % 4d % 4d % 4d % 4d\n",i, + dihedrals_real[5*i], dihedrals_real[5*i+1], dihedrals_real[5*i+2], dihedrals_real[5*i+3], dihedrals_real[5*i+4]); + } + } else { + int64_t *dihedrals_real = (int64_t *)dihedrals; + for (i = 0; i < ndihedrals; ++i) { + printf("dihedral % 4ld: type = %ld, atoms: % 4ld % 4ld % 4ld % 4ld\n",i, + dihedrals_real[5*i], dihedrals_real[5*i+1], dihedrals_real[5*i+2], dihedrals_real[5*i+3], dihedrals_real[5*i+4]); + } + } + } + + lammps_close(handle); + lammps_mpi_finalize(); + free(dihedrals); + return 0; + } + +\endverbatim + * + * \param handle pointer to a previously created LAMMPS instance + * \param data pointer to data to copy the result to */ + void lammps_gather_dihedrals(void *handle, void *data) { auto lmp = (LAMMPS *) handle; @@ -3231,7 +3380,82 @@ void lammps_gather_dihedrals(void *handle, void *data) END_CAPTURE } -// Gather function for impropers +/** Gather type and constituent atom info for all impropers + * +\verbatim embed:rst + +This function copies the list of all impropers into a buffer provided by +the calling code. The buffer will be filled with improper type, improper atom 1, +improper atom 2, improper atom 3, improper atom 4 for each improper. +Thus the buffer has to be allocated to the +dimension of 5 times the **total** number of impropers times the size of +the LAMMPS "tagint" type, which is either 4 or 8 bytes depending on +whether they are stored in 32-bit or 64-bit integers, respectively. +This size depends on the compile time settings used when compiling +the LAMMPS library and can be queried by calling +:cpp:func:`lammps_extract_setting()` with the keyword "tagint". + +When running in parallel, the data buffer must be allocated on **all** +MPI ranks and will be filled with the information for **all** impropers +in the system. + +.. versionadded:: TBD + +Below is a brief C code demonstrating accessing this collected improper information. + +.. code-block:: c + + #include "library.h" + + #include + #include + #include + + int main(int argc, char **argv) + { + int tagintsize; + int64_t i, nimpropers; + void *handle, *impropers; + + handle = lammps_open_no_mpi(0, NULL, NULL); + lammps_file(handle, "in.some_input"); + + tagintsize = lammps_extract_setting(handle, "tagint"); + if (tagintsize == 4) + nimpropers = *(int32_t *)lammps_extract_global(handle, "nimpropers"); + else + nimpropers = *(int64_t *)lammps_extract_global(handle, "nimpropers"); + impropers = malloc(nimpropers * 5 * tagintsize); + + lammps_gather_impropers(handle, impropers); + + if (lammps_extract_setting(handle, "world_rank") == 0) { + if (tagintsize == 4) { + int32_t *impropers_real = (int32_t *)impropers; + for (i = 0; i < nimpropers; ++i) { + printf("improper % 4ld: type = %d, atoms: % 4d % 4d % 4d % 4d\n",i, + impropers_real[5*i], impropers_real[5*i+1], impropers_real[5*i+2], impropers_real[5*i+3], impropers_real[5*i+4]); + } + } else { + int64_t *impropers_real = (int64_t *)impropers; + for (i = 0; i < nimpropers; ++i) { + printf("improper % 4ld: type = %ld, atoms: % 4ld % 4ld % 4ld % 4ld\n",i, + impropers_real[5*i], impropers_real[5*i+1], impropers_real[5*i+2], impropers_real[5*i+3], impropers_real[5*i+4]); + } + } + } + + lammps_close(handle); + lammps_mpi_finalize(); + free(impropers); + return 0; + } + +\endverbatim + * + * \param handle pointer to a previously created LAMMPS instance + * \param data pointer to data to copy the result to */ + void lammps_gather_impropers(void *handle, void *data) { auto lmp = (LAMMPS *) handle; From 915544e76db454852da5577668b17afd47a743f5 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 12:22:08 +0200 Subject: [PATCH 064/445] add Fortran wrappers to fortran/lammps.f90 --- fortran/lammps.f90 | 156 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) diff --git a/fortran/lammps.f90 b/fortran/lammps.f90 index de25200d87..cb7adfd34b 100644 --- a/fortran/lammps.f90 +++ b/fortran/lammps.f90 @@ -135,6 +135,18 @@ MODULE LIBLAMMPS PROCEDURE, PRIVATE :: lmp_gather_bonds_big GENERIC :: gather_bonds => lmp_gather_bonds_small, & lmp_gather_bonds_big + PROCEDURE, PRIVATE :: lmp_gather_angles_small + PROCEDURE, PRIVATE :: lmp_gather_angles_big + GENERIC :: gather_angles => lmp_gather_angles_small, & + lmp_gather_angles_big + PROCEDURE, PRIVATE :: lmp_gather_dihedrals_small + PROCEDURE, PRIVATE :: lmp_gather_dihedrals_big + GENERIC :: gather_dihedrals => lmp_gather_dihedrals_small, & + lmp_gather_dihedrals_big + PROCEDURE, PRIVATE :: lmp_gather_impropers_small + PROCEDURE, PRIVATE :: lmp_gather_impropers_big + GENERIC :: gather_impropers => lmp_gather_impropers_small, & + lmp_gather_impropers_big PROCEDURE, PRIVATE :: lmp_gather_int PROCEDURE, PRIVATE :: lmp_gather_double GENERIC :: gather => lmp_gather_int, lmp_gather_double @@ -573,6 +585,24 @@ MODULE LIBLAMMPS TYPE(c_ptr), VALUE :: handle, data END SUBROUTINE lammps_gather_bonds + SUBROUTINE lammps_gather_angles(handle, data) BIND(C) + IMPORT :: c_ptr + IMPLICIT NONE + TYPE(c_ptr), VALUE :: handle, data + END SUBROUTINE lammps_gather_angles + + SUBROUTINE lammps_gather_dihedrals(handle, data) BIND(C) + IMPORT :: c_ptr + IMPLICIT NONE + TYPE(c_ptr), VALUE :: handle, data + END SUBROUTINE lammps_gather_dihedrals + + SUBROUTINE lammps_gather_impropers(handle, data) BIND(C) + IMPORT :: c_ptr + IMPLICIT NONE + TYPE(c_ptr), VALUE :: handle, data + END SUBROUTINE lammps_gather_impropers + SUBROUTINE lammps_gather(handle, name, type, count, data) BIND(C) IMPORT :: c_ptr, c_int IMPLICIT NONE @@ -1876,6 +1906,132 @@ CONTAINS CALL lammps_gather_bonds(self%handle, Cdata) END SUBROUTINE lmp_gather_bonds_big + ! equivalent function to lammps_gather_angles (LAMMPS_SMALLSMALL or SMALLBIG) + SUBROUTINE lmp_gather_angles_small(self, data) + CLASS(lammps), INTENT(IN) :: self + INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data + INTEGER(c_int), POINTER :: nangles_small + INTEGER(c_int64_t), POINTER :: nangles_big + TYPE(c_ptr) :: Cdata + + IF (SIZE_TAGINT /= 4_c_int) THEN + CALL lmp_error(self, LMP_ERROR_ALL + LMP_ERROR_WORLD, & + 'Incompatible integer kind in gather_angles [Fortran/gather_angles]') + END IF + IF (ALLOCATED(data)) DEALLOCATE(data) + IF (SIZE_BIGINT == 4_c_int) THEN + nangles_small = lmp_extract_global(self, 'nangles') + ALLOCATE(data(4*nangles_small)) + ELSE + nangles_big = lmp_extract_global(self, 'nangles') + ALLOCATE(data(4*nangles_big)) + END IF + Cdata = C_LOC(data(1)) + CALL lammps_gather_angles(self%handle, Cdata) + END SUBROUTINE lmp_gather_angles_small + + ! equivalent function to lammps_gather_angles (LAMMPS_BIGBIG) + SUBROUTINE lmp_gather_angles_big(self, data) + CLASS(lammps), INTENT(IN) :: self + INTEGER(c_int64_t), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data + INTEGER(c_int64_t), POINTER :: nangles + TYPE(c_ptr) :: Cdata + + IF (SIZE_TAGINT /= 8_c_int) THEN + CALL lmp_error(self, LMP_ERROR_ALL + LMP_ERROR_WORLD, & + 'Incompatible integer kind in gather_angles [Fortran/gather_angles]') + END IF + nangles = lmp_extract_global(self, 'nangles') + IF (ALLOCATED(data)) DEALLOCATE(data) + ALLOCATE(data(4*nangles)) + Cdata = C_LOC(data(1)) + CALL lammps_gather_angles(self%handle, Cdata) + END SUBROUTINE lmp_gather_angles_big + + ! equivalent function to lammps_gather_dihedrals (LAMMPS_SMALLSMALL or SMALLBIG) + SUBROUTINE lmp_gather_dihedrals_small(self, data) + CLASS(lammps), INTENT(IN) :: self + INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data + INTEGER(c_int), POINTER :: ndihedrals_small + INTEGER(c_int64_t), POINTER :: ndihedrals_big + TYPE(c_ptr) :: Cdata + + IF (SIZE_TAGINT /= 4_c_int) THEN + CALL lmp_error(self, LMP_ERROR_ALL + LMP_ERROR_WORLD, & + 'Incompatible integer kind in gather_dihedrals [Fortran/gather_dihedrals]') + END IF + IF (ALLOCATED(data)) DEALLOCATE(data) + IF (SIZE_BIGINT == 4_c_int) THEN + ndihedrals_small = lmp_extract_global(self, 'ndihedrals') + ALLOCATE(data(5*ndihedrals_small)) + ELSE + ndihedrals_big = lmp_extract_global(self, 'ndihedrals') + ALLOCATE(data(5*ndihedrals_big)) + END IF + Cdata = C_LOC(data(1)) + CALL lammps_gather_dihedrals(self%handle, Cdata) + END SUBROUTINE lmp_gather_dihedrals_small + + ! equivalent function to lammps_gather_dihedrals (LAMMPS_BIGBIG) + SUBROUTINE lmp_gather_dihedrals_big(self, data) + CLASS(lammps), INTENT(IN) :: self + INTEGER(c_int64_t), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data + INTEGER(c_int64_t), POINTER :: ndihedrals + TYPE(c_ptr) :: Cdata + + IF (SIZE_TAGINT /= 8_c_int) THEN + CALL lmp_error(self, LMP_ERROR_ALL + LMP_ERROR_WORLD, & + 'Incompatible integer kind in gather_dihedrals [Fortran/gather_dihedrals]') + END IF + ndihedrals = lmp_extract_global(self, 'ndihedrals') + IF (ALLOCATED(data)) DEALLOCATE(data) + ALLOCATE(data(5*ndihedrals)) + Cdata = C_LOC(data(1)) + CALL lammps_gather_dihedrals(self%handle, Cdata) + END SUBROUTINE lmp_gather_dihedrals_big + + ! equivalent function to lammps_gather_impropers (LAMMPS_SMALLSMALL or SMALLBIG) + SUBROUTINE lmp_gather_impropers_small(self, data) + CLASS(lammps), INTENT(IN) :: self + INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data + INTEGER(c_int), POINTER :: nimpropers_small + INTEGER(c_int64_t), POINTER :: nimpropers_big + TYPE(c_ptr) :: Cdata + + IF (SIZE_TAGINT /= 4_c_int) THEN + CALL lmp_error(self, LMP_ERROR_ALL + LMP_ERROR_WORLD, & + 'Incompatible integer kind in gather_impropers [Fortran/gather_impropers]') + END IF + IF (ALLOCATED(data)) DEALLOCATE(data) + IF (SIZE_BIGINT == 4_c_int) THEN + nimpropers_small = lmp_extract_global(self, 'nimpropers') + ALLOCATE(data(5*nimpropers_small)) + ELSE + nimpropers_big = lmp_extract_global(self, 'nimpropers') + ALLOCATE(data(5*nimpropers_big)) + END IF + Cdata = C_LOC(data(1)) + CALL lammps_gather_impropers(self%handle, Cdata) + END SUBROUTINE lmp_gather_impropers_small + + ! equivalent function to lammps_gather_impropers (LAMMPS_BIGBIG) + SUBROUTINE lmp_gather_impropers_big(self, data) + CLASS(lammps), INTENT(IN) :: self + INTEGER(c_int64_t), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data + INTEGER(c_int64_t), POINTER :: nimpropers + TYPE(c_ptr) :: Cdata + + IF (SIZE_TAGINT /= 8_c_int) THEN + CALL lmp_error(self, LMP_ERROR_ALL + LMP_ERROR_WORLD, & + 'Incompatible integer kind in gather_impropers [Fortran/gather_impropers]') + END IF + nimpropers = lmp_extract_global(self, 'nimpropers') + IF (ALLOCATED(data)) DEALLOCATE(data) + ALLOCATE(data(5*nimpropers)) + Cdata = C_LOC(data(1)) + CALL lammps_gather_impropers(self%handle, Cdata) + END SUBROUTINE lmp_gather_impropers_big + ! equivalent function to lammps_gather (for int data) SUBROUTINE lmp_gather_int(self, name, count, data) CLASS(lammps), INTENT(IN) :: self From 5d941da4e911f0ef08a79e7476d131a72fe68307 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 26 Jan 2023 07:10:20 -0500 Subject: [PATCH 065/445] check if variable value is a valid number before converting it --- src/variable.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/variable.cpp b/src/variable.cpp index 78ce8d8758..4285acfb05 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -1907,12 +1907,14 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) char *var = retrieve(word+2); if (var == nullptr) print_var_error(FLERR,"Invalid variable evaluation in variable formula",ivar); - if (tree) { - auto newtree = new Tree(); - newtree->type = VALUE; - newtree->value = atof(var); - treestack[ntreestack++] = newtree; - } else argstack[nargstack++] = atof(var); + if (utils::is_double(var)) { + if (tree) { + auto newtree = new Tree(); + newtree->type = VALUE; + newtree->value = atof(var); + treestack[ntreestack++] = newtree; + } else argstack[nargstack++] = atof(var); + } else print_var_error(FLERR,"Non-numeric variable value in variable formula",ivar); // v_name = per-atom vector from atom-style variable // evaluate the atom-style variable as newtree From fca553d1c22a3f34689011a0a7153f8bf240f1da Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 15:58:00 +0200 Subject: [PATCH 066/445] document the Fortran module calls --- doc/src/Fortran.rst | 143 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) diff --git a/doc/src/Fortran.rst b/doc/src/Fortran.rst index d20c9d1df5..43e443f6e7 100644 --- a/doc/src/Fortran.rst +++ b/doc/src/Fortran.rst @@ -312,6 +312,12 @@ of the contents of the :f:mod:`LIBLAMMPS` Fortran interface to LAMMPS. :ftype scatter_atoms_subset: subroutine :f gather_bonds: :f:subr:`gather_bonds` :ftype gather_bonds: subroutine + :f gather_angles: :f:subr:`gather_angles` + :ftype gather_angles: subroutine + :f gather_dihedrals: :f:subr:`gather_dihedrals` + :ftype gather_dihedrals: subroutine + :f gather_impropers: :f:subr:`gather_impropers` + :ftype gather_impropers: subroutine :f gather: :f:subr:`gather` :ftype gather: subroutine :f gather_concat: :f:subr:`gather_concat` @@ -1541,6 +1547,51 @@ Procedures Bound to the :f:type:`lammps` Derived Type -------- +.. f:subroutine:: gather_angles(data) + + Gather type and constituent atom information for all angles. + + .. versionadded:: TBD + + This function copies the list of all angles into an allocatable array. + The array will be filled with (angle type, angle atom 1, angle atom 2, angle atom 3) + for each angle. The array is allocated to the right length (i.e., four times the + number of angles). The array *data* must be of the same type as the LAMMPS + ``tagint`` type, which is equivalent to either ``INTEGER(c_int)`` or + ``INTEGER(c_int64_t)``, depending on whether ``-DLAMMPS_BIGBIG`` was used + when LAMMPS was built. If the supplied array does not match, an error will + result at run-time. + + An example of how to use this routine is below: + + .. code-block:: fortran + + PROGRAM angles + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int + USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : OUTPUT_UNIT + USE LIBLAMMPS + IMPLICIT NONE + INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET :: angles + INTEGER(c_int), DIMENSION(:,:), POINTER :: angles_array + TYPE(lammps) :: lmp + INTEGER :: i + ! other commands to initialize LAMMPS, create angles, etc. + CALL lmp%gather_angles(angles) + angles_array(1:4, 1:SIZE(angles)/4) => angles + DO i = 1, SIZE(angles)/4 + WRITE(OUTPUT_UNIT,'(A,1X,I4,A,I4,1X,I4,1X,I4)') 'angle', angles_array(1,i), & + '; type = ', angles_array(2,i), angles_array(3,i), angles_array(4,i) + END DO + END PROGRAM angles + + :p data: array into which to copy the result. \*The ``KIND`` parameter is + either ``c_int`` or, if LAMMPS was compiled with ``-DLAMMPS_BIGBIG``, + kind ``c_int64_t``. + :ptype data: integer(kind=\*),allocatable + :to: :cpp:func:`lammps_gather_angles` + +-------- + .. f:subroutine:: gather(self, name, count, data) Gather the named per-atom, per-atom fix, per-atom compute, or fix @@ -1583,6 +1634,98 @@ Procedures Bound to the :f:type:`lammps` Derived Type -------- +.. f:subroutine:: gather_dihedrals(data) + + Gather type and constituent atom information for all dihedrals. + + .. versionadded:: TBD + + This function copies the list of all dihedrals into an allocatable array. + The array will be filled with (dihedral type, dihedral atom 1, dihedral atom 2, + dihedral atom 3, dihedral atom 4) for each dihedral. The array is allocated to + the right length (i.e., five times the number of dihedrals). + The array *data* must be of the same type as the LAMMPS + ``tagint`` type, which is equivalent to either ``INTEGER(c_int)`` or + ``INTEGER(c_int64_t)``, depending on whether ``-DLAMMPS_BIGBIG`` was used + when LAMMPS was built. If the supplied array does not match, an error will + result at run-time. + + An example of how to use this routine is below: + + .. code-block:: fortran + + PROGRAM dihedrals + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int + USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : OUTPUT_UNIT + USE LIBLAMMPS + IMPLICIT NONE + INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET :: dihedrals + INTEGER(c_int), DIMENSION(:,:), POINTER :: dihedrals_array + TYPE(lammps) :: lmp + INTEGER :: i + ! other commands to initialize LAMMPS, create dihedrals, etc. + CALL lmp%gather_dihedrals(dihedrals) + dihedrals_array(1:5, 1:SIZE(dihedrals)/5) => dihedrals + DO i = 1, SIZE(dihedrals)/5 + WRITE(OUTPUT_UNIT,'(A,1X,I4,A,I4,1X,I4,1X,I4,1X,I4)') 'dihedral', dihedrals_array(1,i), & + '; type = ', dihedrals_array(2,i), dihedrals_array(3,i), dihedrals_array(4,i), dihedrals_array(5,i) + END DO + END PROGRAM dihedrals + + :p data: array into which to copy the result. \*The ``KIND`` parameter is + either ``c_int`` or, if LAMMPS was compiled with ``-DLAMMPS_BIGBIG``, + kind ``c_int64_t``. + :ptype data: integer(kind=\*),allocatable + :to: :cpp:func:`lammps_gather_dihedrals` + +-------- + +.. f:subroutine:: gather_impropers(data) + + Gather type and constituent atom information for all impropers. + + .. versionadded:: TBD + + This function copies the list of all impropers into an allocatable array. + The array will be filled with (improper type, improper atom 1, improper atom 2, + improper atom 3, improper atom 4) for each improper. The array is allocated to + the right length (i.e., five times the number of impropers). + The array *data* must be of the same type as the LAMMPS + ``tagint`` type, which is equivalent to either ``INTEGER(c_int)`` or + ``INTEGER(c_int64_t)``, depending on whether ``-DLAMMPS_BIGBIG`` was used + when LAMMPS was built. If the supplied array does not match, an error will + result at run-time. + + An example of how to use this routine is below: + + .. code-block:: fortran + + PROGRAM impropers + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int + USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : OUTPUT_UNIT + USE LIBLAMMPS + IMPLICIT NONE + INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET :: impropers + INTEGER(c_int), DIMENSION(:,:), POINTER :: impropers_array + TYPE(lammps) :: lmp + INTEGER :: i + ! other commands to initialize LAMMPS, create impropers, etc. + CALL lmp%gather_impropers(impropers) + impropers_array(1:5, 1:SIZE(impropers)/5) => impropers + DO i = 1, SIZE(impropers)/5 + WRITE(OUTPUT_UNIT,'(A,1X,I4,A,I4,1X,I4,1X,I4,1X,I4)') 'improper', impropers_array(1,i), & + '; type = ', impropers_array(2,i), impropers_array(3,i), impropers_array(4,i), impropers_array(5,i) + END DO + END PROGRAM impropers + + :p data: array into which to copy the result. \*The ``KIND`` parameter is + either ``c_int`` or, if LAMMPS was compiled with ``-DLAMMPS_BIGBIG``, + kind ``c_int64_t``. + :ptype data: integer(kind=\*),allocatable + :to: :cpp:func:`lammps_gather_impropers` + +-------- + .. f:subroutine:: gather_concat(self, name, count, data) Gather the named per-atom, per-atom fix, per-atom compute, or fix From f7ee47f47f50496a4834286f6db424b9cd173129 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 16:33:57 +0200 Subject: [PATCH 067/445] Auxiliary test methods for angles, dihedrals and impropers --- unittest/python/python-scatter-gather.py | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/unittest/python/python-scatter-gather.py b/unittest/python/python-scatter-gather.py index cd606c2992..14cb2c4c68 100644 --- a/unittest/python/python-scatter-gather.py +++ b/unittest/python/python-scatter-gather.py @@ -38,6 +38,36 @@ class PythonGather(unittest.TestCase): else: return 0 + # angle data comparison + def checkAngle(self, vals, atype, aatom1, aatom2, aatom3): + set1 = {aatom1, aatom2, aatom3} + set2 = {vals[1], vals[2], vals[3]} + if len(set1.intersection(set2)) == 3: + self.assertEqual(vals[0], atype) + return 1 + else: + return 0 + + # dihedral data comparison + def checkDihedral(self, vals, dtype, datom1, datom2, datom3, datom4): + set1 = {datom1, datom2, datom3, datom4} + set2 = {vals[1], vals[2], vals[3], vals[4]} + if len(set1.intersection(set2)) == 4: + self.assertEqual(vals[0], dtype) + return 1 + else: + return 0 + + # improper data comparison + def checkImproper(self, vals, itype, iatom1, iatom2, iatom3, iatom4): + set1 = {iatom1, iatom2, iatom3, iatom4} + set2 = {vals[1], vals[2], vals[3], vals[4]} + if len(set1.intersection(set2)) == 4: + self.assertEqual(vals[0], itype) + return 1 + else: + return 0 + ############################## @unittest.skipIf(not has_full, "Gather_bonds test") def testGatherBond_newton_on(self): From 047e4eeebcc868d7e67c0166e3736b4da8ee4c71 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 16:41:47 +0200 Subject: [PATCH 068/445] Auxiliary test methods for angles, dihedrals and impropers in python-numpy --- unittest/python/python-numpy.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/unittest/python/python-numpy.py b/unittest/python/python-numpy.py index 3306aba1cd..f09028fa5e 100644 --- a/unittest/python/python-numpy.py +++ b/unittest/python/python-numpy.py @@ -51,6 +51,33 @@ class PythonNumpy(unittest.TestCase): else: return 0 + def checkAngle(self, vals, atype, aatom1, aatom2, aatom3): + set1 = {aatom1, aatom2, aatom3} + set2 = {vals[1], vals[2], vals[3]} + if len(set1.intersection(set2)) == 3: + self.assertEqual(vals[0], atype) + return 1 + else: + return 0 + + def checkDihedral(self, vals, dtype, datom1, datom2, datom3, datom4): + set1 = {datom1, datom2, datom3, datom4} + set2 = {vals[1], vals[2], vals[3], vals[4]} + if len(set1.intersection(set2)) == 4: + self.assertEqual(vals[0], dtype) + return 1 + else: + return 0 + + def checkImproper(self, vals, itype, iatom1, iatom2, iatom3, iatom4): + set1 = {iatom1, iatom2, iatom3, iatom4} + set2 = {vals[1], vals[2], vals[3], vals[4]} + if len(set1.intersection(set2)) == 4: + self.assertEqual(vals[0], itype) + return 1 + else: + return 0 + def testLammpsPointer(self): self.assertEqual(type(self.lmp.lmp), c_void_p) From 14e9bb00332b2b9521845181648b10f65119675a Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 16:48:49 +0200 Subject: [PATCH 069/445] Replacing arbitrary LAMMPS version with TBD in core.py --- python/lammps/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/lammps/core.py b/python/lammps/core.py index 02dd211a9e..17c19ebded 100644 --- a/python/lammps/core.py +++ b/python/lammps/core.py @@ -1318,7 +1318,7 @@ class lammps(object): flat list of ctypes integer values with the angle type, angle atom1, angle atom2, angle atom3 for each angle. - .. versionadded:: 28Jan2023 + .. versionadded:: TBD :return: a tuple with the number of angles and a list of c_int or c_long :rtype: (int, 4*nangles*c_tagint) @@ -1341,7 +1341,7 @@ class lammps(object): flat list of ctypes integer values with the dihedral type, dihedral atom1, dihedral atom2, dihedral atom3, dihedral atom4 for each dihedral. - .. versionadded:: 28Jan2023 + .. versionadded:: TBD :return: a tuple with the number of dihedrals and a list of c_int or c_long :rtype: (int, 5*ndihedrals*c_tagint) @@ -1364,7 +1364,7 @@ class lammps(object): flat list of ctypes integer values with the improper type, improper atom1, improper atom2, improper atom3, improper atom4 for each improper. - .. versionadded:: 28Jan2023 + .. versionadded:: TBD :return: a tuple with the number of impropers and a list of c_int or c_long :rtype: (int, 5*nimpropers*c_tagint) From 07566abc8f5f8c3e1fe74f68468fca7c41c1f9fe Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 26 Jan 2023 16:50:05 +0200 Subject: [PATCH 070/445] Replacing arbitrary LAMMPS version with TBD in numpy_wrapper.py --- python/lammps/numpy_wrapper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/lammps/numpy_wrapper.py b/python/lammps/numpy_wrapper.py index e8a7a2899f..8286fb9a5c 100644 --- a/python/lammps/numpy_wrapper.py +++ b/python/lammps/numpy_wrapper.py @@ -284,7 +284,7 @@ class numpy_wrapper: It behaves the same as the original method, but returns a NumPy array instead of a ``ctypes`` list. - .. versionadded:: 28Jan2023 + .. versionadded:: TBD :return: the requested data as a 2d-integer numpy array :rtype: numpy.array(nangles,4) @@ -302,7 +302,7 @@ class numpy_wrapper: It behaves the same as the original method, but returns a NumPy array instead of a ``ctypes`` list. - .. versionadded:: 28Jan2023 + .. versionadded:: TBD :return: the requested data as a 2d-integer numpy array :rtype: numpy.array(ndihedrals,5) @@ -320,7 +320,7 @@ class numpy_wrapper: It behaves the same as the original method, but returns a NumPy array instead of a ``ctypes`` list. - .. versionadded:: 28Jan2023 + .. versionadded:: TBD :return: the requested data as a 2d-integer numpy array :rtype: numpy.array(nimpropers,5) From b6a9e474944b01910d73f43a13c30b90e9b07d82 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 26 Jan 2023 16:00:11 -0500 Subject: [PATCH 071/445] update false positives --- doc/utils/sphinx-config/false_positives.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 2d12ce6845..dc2f1879fd 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -363,6 +363,7 @@ Broglie brownian brownw Broyden +Bruskin Brusselle Bryantsev Btarget @@ -2241,6 +2242,7 @@ msd msi MSI msm +msmeam msmflag msse msst From f145e855ec9da6a56096226c83061611df5c89dc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 26 Jan 2023 18:07:56 -0500 Subject: [PATCH 072/445] initialized pointer --- src/REAXFF/fix_reaxff_species.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/REAXFF/fix_reaxff_species.cpp b/src/REAXFF/fix_reaxff_species.cpp index ce04be2cc8..29441cd4b3 100644 --- a/src/REAXFF/fix_reaxff_species.cpp +++ b/src/REAXFF/fix_reaxff_species.cpp @@ -61,8 +61,8 @@ static const char cite_reaxff_species_delete[] = FixReaxFFSpecies::FixReaxFFSpecies(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), Name(nullptr), MolName(nullptr), NMol(nullptr), nd(nullptr), MolType(nullptr), molmap(nullptr), mark(nullptr), Mol2Spec(nullptr), clusterID(nullptr), - x0(nullptr), BOCut(nullptr), fp(nullptr), pos(nullptr), fdel(nullptr), ele(nullptr), - eletype(nullptr), filepos(nullptr), filedel(nullptr) + x0(nullptr), BOCut(nullptr), fp(nullptr), pos(nullptr), fdel(nullptr), delete_Tcount(nullptr), + ele(nullptr), eletype(nullptr), filepos(nullptr), filedel(nullptr) { if (narg < 7) utils::missing_cmd_args(FLERR, "fix reaxff/species", error); From 7f810ff59cef03f17d1bfa9e5a8b912f31ddef57 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 26 Jan 2023 18:27:58 -0500 Subject: [PATCH 073/445] update PIMD example1 --- examples/PACKAGES/pimd/para-h2/in.scp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/PACKAGES/pimd/para-h2/in.scp b/examples/PACKAGES/pimd/para-h2/in.scp index eac3f066b8..bee3a6e081 100644 --- a/examples/PACKAGES/pimd/para-h2/in.scp +++ b/examples/PACKAGES/pimd/para-h2/in.scp @@ -1,5 +1,5 @@ variable ibead uloop 32 pad -variable out_freq string 1 +variable out_freq string 100 variable job_name string H2 units real @@ -13,17 +13,17 @@ read_data H2.data pair_coeff 1 * pair.table PAIR_H2 -timestep 0.001 +timestep 0.001 -thermo_style custom step temp pe etotal pzz -thermo ${out_freq} +thermo_style custom step temp pe etotal pzz +thermo ${out_freq} velocity all create 1.0 1985 rot yes dist gaussian fix 1 all pimd method nmpimd fmass 1.0 temp 25.0 nhc 4 -dump dcd all dcd ${out_freq} dcd/${job_name}_${ibead}.dcd +#dump dcd all dcd ${out_freq} ${job_name}_${ibead}.dcd -restart ${out_freq} restart/${job_name}_${ibead}.restart1 restart/${job_name}_${ibead}.restart2 +#restart ${out_freq} ${job_name}_${ibead}.restart1 ${job_name}_${ibead}.restart2 -run 100000 +run 10000 From ba0d24d02894ec6239cffe9c072e9b5160c93361 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 26 Jan 2023 18:33:48 -0500 Subject: [PATCH 074/445] must initialize "np" in constructor --- src/REPLICA/fix_pimd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/REPLICA/fix_pimd.cpp b/src/REPLICA/fix_pimd.cpp index 154f3deecd..3968cd0d4b 100644 --- a/src/REPLICA/fix_pimd.cpp +++ b/src/REPLICA/fix_pimd.cpp @@ -74,6 +74,7 @@ FixPIMD::FixPIMD(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) nhc_temp = 298.15; nhc_nchain = 2; sp = 1.0; + np = universe->nworlds; for (int i = 3; i < narg - 1; i += 2) { if (strcmp(arg[i], "method") == 0) { @@ -190,7 +191,6 @@ void FixPIMD::init() // prepare the constants - np = universe->nworlds; inverse_np = 1.0 / np; /* The first solution for the force constant, using SI units From 3be1dd0488cc0043a76a3eab81f0adb81d9bc08f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 26 Jan 2023 18:48:30 -0500 Subject: [PATCH 075/445] update PIMD examples --- examples/PACKAGES/pimd/para-h2/in.scp | 7 ++++--- examples/PACKAGES/pimd/para-h2/run.sh | 2 +- examples/PACKAGES/pimd/prot-hairpin/in.scp | 11 ++++++----- examples/PACKAGES/pimd/prot-hairpin/run.sh | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/examples/PACKAGES/pimd/para-h2/in.scp b/examples/PACKAGES/pimd/para-h2/in.scp index bee3a6e081..eb8debad15 100644 --- a/examples/PACKAGES/pimd/para-h2/in.scp +++ b/examples/PACKAGES/pimd/para-h2/in.scp @@ -15,13 +15,14 @@ pair_coeff 1 * pair.table PAIR_H2 timestep 0.001 -thermo_style custom step temp pe etotal pzz -thermo ${out_freq} - velocity all create 1.0 1985 rot yes dist gaussian fix 1 all pimd method nmpimd fmass 1.0 temp 25.0 nhc 4 +thermo_style custom step temp pe etotal pzz f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +thermo ${out_freq} + #dump dcd all dcd ${out_freq} ${job_name}_${ibead}.dcd #restart ${out_freq} ${job_name}_${ibead}.restart1 ${job_name}_${ibead}.restart2 diff --git a/examples/PACKAGES/pimd/para-h2/run.sh b/examples/PACKAGES/pimd/para-h2/run.sh index ace20f84ea..5304db5917 100644 --- a/examples/PACKAGES/pimd/para-h2/run.sh +++ b/examples/PACKAGES/pimd/para-h2/run.sh @@ -1 +1 @@ -mpirun -np 64 lmp_mpi -partition 8x8 -in in.scp -log logfile/log.lammps -screen screen/screen +mpirun -np 64 lmp_mpi -partition 8x8 -in in.scp -log log.lammps -screen none diff --git a/examples/PACKAGES/pimd/prot-hairpin/in.scp b/examples/PACKAGES/pimd/prot-hairpin/in.scp index 220d29dc51..00b5150a8a 100644 --- a/examples/PACKAGES/pimd/prot-hairpin/in.scp +++ b/examples/PACKAGES/pimd/prot-hairpin/in.scp @@ -14,18 +14,19 @@ pair_modify mix arithmetic kspace_style pppm 1e-4 read_data system.data -#read_restart restart/system_${ibead}.rest1 +#read_restart system_${ibead}.rest1 special_bonds charmm fix 1 all pimd method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 thermo 10 -thermo_style custom step temp pe etotal +thermo_style custom step temp pe etotal f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial timestep 0.08 -restart 100 restart/system_${ibead}.rest1 restart/system_${ibead}.rest2 +# restart 100 system_${ibead}.rest1 system_${ibead}.rest2 group prot id <= 256 -dump 1 prot dcd 100 dcd/prot_${ibead}.dcd +# dump 1 prot dcd 100 prot_${ibead}.dcd -run 2000000 +run 200 diff --git a/examples/PACKAGES/pimd/prot-hairpin/run.sh b/examples/PACKAGES/pimd/prot-hairpin/run.sh index 1423960325..756cc14461 100644 --- a/examples/PACKAGES/pimd/prot-hairpin/run.sh +++ b/examples/PACKAGES/pimd/prot-hairpin/run.sh @@ -1 +1 @@ -mpirun -np 8 lmp_mpi -partition 8x1 -in in.scp -log logfile/log.lammps -screen screen/screen +mpirun -np 8 lmp_mpi -partition 8x1 -in in.scp -log log.lammps -screen none From e7ea5e8bf5d7a9c10e54574d2ee23e41aecb0735 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 26 Jan 2023 22:02:12 -0500 Subject: [PATCH 076/445] enable and (mostly) apply clang-format --- src/MEAM/meam_dens_final.cpp | 100 +++--- src/MEAM/meam_dens_init.cpp | 177 +++++------ src/MEAM/meam_force.cpp | 166 +++++----- src/MEAM/meam_funcs.cpp | 242 +++++++-------- src/MEAM/meam_impl.cpp | 85 +++-- src/MEAM/meam_setup_done.cpp | 552 ++++++++++++++++----------------- src/MEAM/meam_setup_global.cpp | 126 ++++---- src/MEAM/meam_setup_param.cpp | 96 +++--- src/MEAM/pair_meam.cpp | 211 ++++++------- 9 files changed, 849 insertions(+), 906 deletions(-) diff --git a/src/MEAM/meam_dens_final.cpp b/src/MEAM/meam_dens_final.cpp index ab0ac8c53f..c5dcc6ba00 100644 --- a/src/MEAM/meam_dens_final.cpp +++ b/src/MEAM/meam_dens_final.cpp @@ -15,9 +15,9 @@ using namespace LAMMPS_NS; -void -MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_atom, double* eng_vdwl, - double* eatom, int /*ntype*/, int* type, int* fmap, double** scale, int& errorflag) +void MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_atom, + double *eng_vdwl, double *eatom, int /*ntype*/, int *type, int *fmap, + double **scale, int &errorflag) { int i, elti; int m; @@ -27,7 +27,7 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ // Complete the calculation of density - if (this->msmeamflag) { + if (msmeamflag) { for (i = 0; i < nlocal; i++) { elti = fmap[type[i]]; if (elti >= 0) { @@ -40,16 +40,16 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ rho1[i] = rho1[i] + arho1[i][m] * arho1[i][m] - arho1m[i][m] * arho1m[i][m]; rho3[i] = rho3[i] - 3.0 / 5.0 * (arho3b[i][m] * arho3b[i][m] - - arho3mb[i][m] * arho3mb[i][m]); + - arho3mb[i][m] * arho3mb[i][m]); } for (m = 0; m < 6; m++) { - rho2[i] = rho2[i] + this->v2D[m] * (arho2[i][m] * arho2[i][m] - - arho2m[i][m] * arho2m[i][m]); + rho2[i] = rho2[i] + v2D[m] * (arho2[i][m] * arho2[i][m] + - arho2m[i][m] * arho2m[i][m]); } for (m = 0; m < 10; m++) { - rho3[i] = rho3[i] + this->v3D[m] * (arho3[i][m] * arho3[i][m] - - arho3m[i][m] * arho3m[i][m]); + rho3[i] = rho3[i] + v3D[m] * (arho3[i][m] * arho3[i][m] + - arho3m[i][m] * arho3m[i][m]); } // all the t weights are already accounted for with msmeam @@ -59,48 +59,48 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ gamma[i] = gamma[i] / (rho0[i] * rho0[i]); } - Z = get_Zij(this->lattce_meam[elti][elti]); + Z = get_Zij(lattce_meam[elti][elti]); - G = G_gam(gamma[i], this->ibar_meam[elti], errorflag); + G = G_gam(gamma[i], ibar_meam[elti], errorflag); if (errorflag != 0) return; - get_shpfcn(this->lattce_meam[elti][elti], this->stheta_meam[elti][elti], this->ctheta_meam[elti][elti], shp); + get_shpfcn(lattce_meam[elti][elti], stheta_meam[elti][elti], ctheta_meam[elti][elti], shp); - if (this->ibar_meam[elti] <= 0) { + if (ibar_meam[elti] <= 0) { Gbar = 1.0; dGbar = 0.0; } else { - if (this->mix_ref_t == 1) { + if (mix_ref_t == 1) { gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + t_ave[i][2] * shp[2]) / (Z * Z); } else { - gam = (this->t1_meam[elti] * shp[0] + this->t2_meam[elti] * shp[1] + this->t3_meam[elti] * shp[2]) / + gam = (t1_meam[elti] * shp[0] + t2_meam[elti] * shp[1] + t3_meam[elti] * shp[2]) / (Z * Z); } - Gbar = G_gam(gam, this->ibar_meam[elti], errorflag); + Gbar = G_gam(gam, ibar_meam[elti], errorflag); } rho[i] = rho0[i] * G; - if (this->mix_ref_t == 1) { - if (this->ibar_meam[elti] <= 0) { + if (mix_ref_t == 1) { + if (ibar_meam[elti] <= 0) { Gbar = 1.0; dGbar = 0.0; } else { gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + t_ave[i][2] * shp[2]) / (Z * Z); - Gbar = dG_gam(gam, this->ibar_meam[elti], dGbar); + Gbar = dG_gam(gam, ibar_meam[elti], dGbar); } - rho_bkgd = this->rho0_meam[elti] * Z * Gbar; + rho_bkgd = rho0_meam[elti] * Z * Gbar; } else { - if (this->bkgd_dyn == 1) { - rho_bkgd = this->rho0_meam[elti] * Z; + if (bkgd_dyn == 1) { + rho_bkgd = rho0_meam[elti] * Z; } else { - rho_bkgd = this->rho_ref_meam[elti]; + rho_bkgd = rho_ref_meam[elti]; } } rhob = rho[i] / rho_bkgd; denom = 1.0 / rho_bkgd; - G = dG_gam(gamma[i], this->ibar_meam[elti], dG); + G = dG_gam(gamma[i], ibar_meam[elti], dG); dgamma1[i] = (G - 2 * dG * gamma[i]) * denom; @@ -113,13 +113,13 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ // dgamma3 is nonzero only if we are using the "mixed" rule for // computing t in the reference system (which is not correct, but // included for backward compatibility - if (this->mix_ref_t == 1) { + if (mix_ref_t == 1) { dgamma3[i] = rho0[i] * G * dGbar / (Gbar * Z * Z) * denom; } else { dgamma3[i] = 0.0; } - Fl = embedding(this->A_meam[elti], this->Ec_meam[elti][elti], rhob, frhop[i]); + Fl = embedding(A_meam[elti], Ec_meam[elti][elti], rhob, frhop[i]); if (eflag_either != 0) { Fl *= scaleii; if (eflag_global != 0) { @@ -144,21 +144,21 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ rho3[i] = rho3[i] - 3.0 / 5.0 * arho3b[i][m] * arho3b[i][m]; } for (m = 0; m < 6; m++) { - rho2[i] = rho2[i] + this->v2D[m] * arho2[i][m] * arho2[i][m]; + rho2[i] = rho2[i] + v2D[m] * arho2[i][m] * arho2[i][m]; } for (m = 0; m < 10; m++) { - rho3[i] = rho3[i] + this->v3D[m] * arho3[i][m] * arho3[i][m]; + rho3[i] = rho3[i] + v3D[m] * arho3[i][m] * arho3[i][m]; } if (rho0[i] > 0.0) { - if (this->ialloy == 1) { + if (ialloy == 1) { t_ave[i][0] = fdiv_zero(t_ave[i][0], tsq_ave[i][0]); t_ave[i][1] = fdiv_zero(t_ave[i][1], tsq_ave[i][1]); t_ave[i][2] = fdiv_zero(t_ave[i][2], tsq_ave[i][2]); - } else if (this->ialloy == 2) { - t_ave[i][0] = this->t1_meam[elti]; - t_ave[i][1] = this->t2_meam[elti]; - t_ave[i][2] = this->t3_meam[elti]; + } else if (ialloy == 2) { + t_ave[i][0] = t1_meam[elti]; + t_ave[i][1] = t2_meam[elti]; + t_ave[i][2] = t3_meam[elti]; } else { t_ave[i][0] = t_ave[i][0] / rho0[i]; t_ave[i][1] = t_ave[i][1] / rho0[i]; @@ -172,48 +172,48 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ gamma[i] = gamma[i] / (rho0[i] * rho0[i]); } - Z = get_Zij(this->lattce_meam[elti][elti]); + Z = get_Zij(lattce_meam[elti][elti]); - G = G_gam(gamma[i], this->ibar_meam[elti], errorflag); + G = G_gam(gamma[i], ibar_meam[elti], errorflag); if (errorflag != 0) return; - get_shpfcn(this->lattce_meam[elti][elti], this->stheta_meam[elti][elti], this->ctheta_meam[elti][elti], shp); + get_shpfcn(lattce_meam[elti][elti], stheta_meam[elti][elti], ctheta_meam[elti][elti], shp); - if (this->ibar_meam[elti] <= 0) { + if (ibar_meam[elti] <= 0) { Gbar = 1.0; dGbar = 0.0; } else { - if (this->mix_ref_t == 1) { + if (mix_ref_t == 1) { gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + t_ave[i][2] * shp[2]) / (Z * Z); } else { - gam = (this->t1_meam[elti] * shp[0] + this->t2_meam[elti] * shp[1] + this->t3_meam[elti] * shp[2]) / + gam = (t1_meam[elti] * shp[0] + t2_meam[elti] * shp[1] + t3_meam[elti] * shp[2]) / (Z * Z); } - Gbar = G_gam(gam, this->ibar_meam[elti], errorflag); + Gbar = G_gam(gam, ibar_meam[elti], errorflag); } rho[i] = rho0[i] * G; - if (this->mix_ref_t == 1) { - if (this->ibar_meam[elti] <= 0) { + if (mix_ref_t == 1) { + if (ibar_meam[elti] <= 0) { Gbar = 1.0; dGbar = 0.0; } else { gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + t_ave[i][2] * shp[2]) / (Z * Z); - Gbar = dG_gam(gam, this->ibar_meam[elti], dGbar); + Gbar = dG_gam(gam, ibar_meam[elti], dGbar); } - rho_bkgd = this->rho0_meam[elti] * Z * Gbar; + rho_bkgd = rho0_meam[elti] * Z * Gbar; } else { - if (this->bkgd_dyn == 1) { - rho_bkgd = this->rho0_meam[elti] * Z; + if (bkgd_dyn == 1) { + rho_bkgd = rho0_meam[elti] * Z; } else { - rho_bkgd = this->rho_ref_meam[elti]; + rho_bkgd = rho_ref_meam[elti]; } } rhob = rho[i] / rho_bkgd; denom = 1.0 / rho_bkgd; - G = dG_gam(gamma[i], this->ibar_meam[elti], dG); + G = dG_gam(gamma[i], ibar_meam[elti], dG); dgamma1[i] = (G - 2 * dG * gamma[i]) * denom; @@ -226,13 +226,13 @@ MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_ // dgamma3 is nonzero only if we are using the "mixed" rule for // computing t in the reference system (which is not correct, but // included for backward compatibility - if (this->mix_ref_t == 1) { + if (mix_ref_t == 1) { dgamma3[i] = rho0[i] * G * dGbar / (Gbar * Z * Z) * denom; } else { dgamma3[i] = 0.0; } - Fl = embedding(this->A_meam[elti], this->Ec_meam[elti][elti], rhob, frhop[i]); + Fl = embedding(A_meam[elti], Ec_meam[elti][elti], rhob, frhop[i]); if (eflag_either != 0) { Fl *= scaleii; diff --git a/src/MEAM/meam_dens_init.cpp b/src/MEAM/meam_dens_init.cpp index 00ad276ad7..894bea1117 100644 --- a/src/MEAM/meam_dens_init.cpp +++ b/src/MEAM/meam_dens_init.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -20,8 +19,7 @@ using namespace LAMMPS_NS; -void -MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) +void MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) { int i, j; @@ -46,7 +44,7 @@ MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) memory->destroy(t_ave); memory->destroy(tsq_ave); // msmeam params - if (this->msmeamflag) { + if (msmeamflag) { memory->destroy(arho1m); memory->destroy(arho2m); memory->destroy(arho3m); @@ -74,7 +72,7 @@ MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) memory->create(t_ave, nmax, 3, "pair:t_ave"); memory->create(tsq_ave, nmax, 3, "pair:tsq_ave"); // msmeam params - if (this->msmeamflag) { + if (msmeamflag) { memory->create(arho1m, nmax, 3, "pair:arho1m"); memory->create(arho2m, nmax, 6, "pair:arho2m"); memory->create(arho3m, nmax, 10, "pair:arho3m"); @@ -99,36 +97,27 @@ MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) rho0[i] = 0.0; arho2b[i] = 0.0; arho1[i][0] = arho1[i][1] = arho1[i][2] = 0.0; - if (this->msmeamflag) { + if (msmeamflag) { arho2mb[i] = 0.0; arho1m[i][0] = arho1m[i][1] = arho1m[i][2] = 0.0; } for (j = 0; j < 6; j++) { arho2[i][j] = 0.0; - if (this->msmeamflag) { - arho2m[i][j] = 0.0; - } + if (msmeamflag) { arho2m[i][j] = 0.0; } } for (j = 0; j < 10; j++) { arho3[i][j] = 0.0; - if (this->msmeamflag) { - arho3m[i][j] = 0.0; - } + if (msmeamflag) { arho3m[i][j] = 0.0; } } arho3b[i][0] = arho3b[i][1] = arho3b[i][2] = 0.0; - if (this->msmeamflag) { - arho3mb[i][0] = arho3mb[i][1] = arho3mb[i][2] = 0.0; - } + if (msmeamflag) { arho3mb[i][0] = arho3mb[i][1] = arho3mb[i][2] = 0.0; } t_ave[i][0] = t_ave[i][1] = t_ave[i][2] = 0.0; tsq_ave[i][0] = tsq_ave[i][1] = tsq_ave[i][2] = 0.0; } - } -void -MEAM::meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, - int numneigh, int* firstneigh, - int numneigh_full, int* firstneigh_full, int fnoffset) +void MEAM::meam_dens_init(int i, int ntype, int *type, int *fmap, double **x, int numneigh, + int *firstneigh, int numneigh_full, int *firstneigh_full, int fnoffset) { // Compute screening function and derivatives getscreen(i, &scrfcn[fnoffset], &dscrfcn[fnoffset], &fcpair[fnoffset], x, numneigh, firstneigh, @@ -140,9 +129,9 @@ MEAM::meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, // ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc -void -MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** x, int numneigh, - int* firstneigh, int numneigh_full, int* firstneigh_full, int /*ntype*/, int* type, int* fmap) +void MEAM::getscreen(int i, double *scrfcn, double *dscrfcn, double *fcpair, double **x, + int numneigh, int *firstneigh, int numneigh_full, int *firstneigh_full, + int /*ntype*/, int *type, int *fmap) { int jn, j, kn, k; int elti, eltj, eltk; @@ -154,7 +143,7 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** double dCikj; double rnorm, fc, dfc, drinv; - drinv = 1.0 / this->delr_meam; + drinv = 1.0 / delr_meam; elti = fmap[type[i]]; if (elti < 0) return; @@ -177,16 +166,16 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** delzij = zjtmp - zitmp; rij2 = delxij * delxij + delyij * delyij + delzij * delzij; - if (rij2 > this->cutforcesq) { + if (rij2 > cutforcesq) { dscrfcn[jn] = 0.0; scrfcn[jn] = 0.0; fcpair[jn] = 0.0; continue; } - const double rbound = this->ebound_meam[elti][eltj] * rij2; + const double rbound = ebound_meam[elti][eltj] * rij2; rij = sqrt(rij2); - rnorm = (this->cutforce - rij) * drinv; + rnorm = (cutforce - rij) * drinv; sij = 1.0; // if rjk2 > ebound*rijsq, atom k is definitely outside the ellipse @@ -220,8 +209,8 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** if (a <= 0.0) continue; cikj = (2.0 * (xik + xjk) + a - 2.0) / a; - Cmax = this->Cmax_meam[elti][eltj][eltk]; - Cmin = this->Cmin_meam[elti][eltj][eltk]; + Cmax = Cmax_meam[elti][eltj][eltk]; + Cmin = Cmin_meam[elti][eltj][eltk]; if (cikj >= Cmax) continue; // note that cikj may be slightly negative (within numerical // tolerance) if atoms are colinear, so don't reject that case here @@ -271,8 +260,8 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** if (a <= 0.0) continue; cikj = (2.0 * (xik + xjk) + a - 2.0) / a; - Cmax = this->Cmax_meam[elti][eltj][eltk]; - Cmin = this->Cmin_meam[elti][eltj][eltk]; + Cmax = Cmax_meam[elti][eltj][eltk]; + Cmin = Cmin_meam[elti][eltj][eltk]; if (cikj >= Cmax) { continue; // Note that cikj may be slightly negative (within numerical @@ -303,9 +292,8 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** // ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc -void -MEAM::calc_rho1(int i, int /*ntype*/, int* type, int* fmap, double** x, int numneigh, int* firstneigh, - double* scrfcn, double* fcpair) +void MEAM::calc_rho1(int i, int /*ntype*/, int *type, int *fmap, double **x, int numneigh, + int *firstneigh, double *scrfcn, double *fcpair) { int jn, j, m, n, p, elti, eltj; int nv2, nv3; @@ -330,58 +318,58 @@ MEAM::calc_rho1(int i, int /*ntype*/, int* type, int* fmap, double** x, int numn delij[1] = x[j][1] - ytmp; delij[2] = x[j][2] - ztmp; rij2 = delij[0] * delij[0] + delij[1] * delij[1] + delij[2] * delij[2]; - if (rij2 < this->cutforcesq) { + if (rij2 < cutforcesq) { eltj = fmap[type[j]]; rij = sqrt(rij2); - ai = rij / this->re_meam[elti][elti] - 1.0; - aj = rij / this->re_meam[eltj][eltj] - 1.0; - ro0i = this->rho0_meam[elti]; - ro0j = this->rho0_meam[eltj]; - rhoa0j = ro0j * MathSpecial::fm_exp(-this->beta0_meam[eltj] * aj) * sij; - rhoa1j = ro0j * MathSpecial::fm_exp(-this->beta1_meam[eltj] * aj) * sij; - rhoa2j = ro0j * MathSpecial::fm_exp(-this->beta2_meam[eltj] * aj) * sij; - rhoa3j = ro0j * MathSpecial::fm_exp(-this->beta3_meam[eltj] * aj) * sij; - if (this->msmeamflag){ - rhoa1mj = ro0j * this->t1m_meam[eltj] * MathSpecial::fm_exp(-this->beta1m_meam[eltj] * aj) * sij; - rhoa2mj = ro0j * this->t2m_meam[eltj] * MathSpecial::fm_exp(-this->beta2m_meam[eltj] * aj) * sij; - rhoa3mj = ro0j * this->t3m_meam[eltj] * MathSpecial::fm_exp(-this->beta3m_meam[eltj] * aj) * sij; + ai = rij / re_meam[elti][elti] - 1.0; + aj = rij / re_meam[eltj][eltj] - 1.0; + ro0i = rho0_meam[elti]; + ro0j = rho0_meam[eltj]; + rhoa0j = ro0j * MathSpecial::fm_exp(-beta0_meam[eltj] * aj) * sij; + rhoa1j = ro0j * MathSpecial::fm_exp(-beta1_meam[eltj] * aj) * sij; + rhoa2j = ro0j * MathSpecial::fm_exp(-beta2_meam[eltj] * aj) * sij; + rhoa3j = ro0j * MathSpecial::fm_exp(-beta3_meam[eltj] * aj) * sij; + if (msmeamflag) { + rhoa1mj = ro0j * t1m_meam[eltj] * MathSpecial::fm_exp(-beta1m_meam[eltj] * aj) * sij; + rhoa2mj = ro0j * t2m_meam[eltj] * MathSpecial::fm_exp(-beta2m_meam[eltj] * aj) * sij; + rhoa3mj = ro0j * t3m_meam[eltj] * MathSpecial::fm_exp(-beta3m_meam[eltj] * aj) * sij; } - rhoa0i = ro0i * MathSpecial::fm_exp(-this->beta0_meam[elti] * ai) * sij; - rhoa1i = ro0i * MathSpecial::fm_exp(-this->beta1_meam[elti] * ai) * sij; - rhoa2i = ro0i * MathSpecial::fm_exp(-this->beta2_meam[elti] * ai) * sij; - rhoa3i = ro0i * MathSpecial::fm_exp(-this->beta3_meam[elti] * ai) * sij; - if (this->msmeamflag){ - rhoa1mi = ro0i * this->t1m_meam[elti] * MathSpecial::fm_exp(-this->beta1m_meam[elti] * ai) * sij; - rhoa2mi = ro0i * this->t2m_meam[elti] * MathSpecial::fm_exp(-this->beta2m_meam[elti] * ai) * sij; - rhoa3mi = ro0i * this->t3m_meam[elti] * MathSpecial::fm_exp(-this->beta3m_meam[elti] * ai) * sij; + rhoa0i = ro0i * MathSpecial::fm_exp(-beta0_meam[elti] * ai) * sij; + rhoa1i = ro0i * MathSpecial::fm_exp(-beta1_meam[elti] * ai) * sij; + rhoa2i = ro0i * MathSpecial::fm_exp(-beta2_meam[elti] * ai) * sij; + rhoa3i = ro0i * MathSpecial::fm_exp(-beta3_meam[elti] * ai) * sij; + if (msmeamflag) { + rhoa1mi = ro0i * t1m_meam[elti] * MathSpecial::fm_exp(-beta1m_meam[elti] * ai) * sij; + rhoa2mi = ro0i * t2m_meam[elti] * MathSpecial::fm_exp(-beta2m_meam[elti] * ai) * sij; + rhoa3mi = ro0i * t3m_meam[elti] * MathSpecial::fm_exp(-beta3m_meam[elti] * ai) * sij; } - if (this->ialloy == 1) { - rhoa1j = rhoa1j * this->t1_meam[eltj]; - rhoa2j = rhoa2j * this->t2_meam[eltj]; - rhoa3j = rhoa3j * this->t3_meam[eltj]; - rhoa1i = rhoa1i * this->t1_meam[elti]; - rhoa2i = rhoa2i * this->t2_meam[elti]; - rhoa3i = rhoa3i * this->t3_meam[elti]; + if (ialloy == 1) { + rhoa1j = rhoa1j * t1_meam[eltj]; + rhoa2j = rhoa2j * t2_meam[eltj]; + rhoa3j = rhoa3j * t3_meam[eltj]; + rhoa1i = rhoa1i * t1_meam[elti]; + rhoa2i = rhoa2i * t2_meam[elti]; + rhoa3i = rhoa3i * t3_meam[elti]; } rho0[i] = rho0[i] + rhoa0j; rho0[j] = rho0[j] + rhoa0i; // For ialloy = 2, use single-element value (not average) // For ialloy = 2, use single-element value (not average) - if (this->ialloy != 2) { - t_ave[i][0] = t_ave[i][0] + this->t1_meam[eltj] * rhoa0j; - t_ave[i][1] = t_ave[i][1] + this->t2_meam[eltj] * rhoa0j; - t_ave[i][2] = t_ave[i][2] + this->t3_meam[eltj] * rhoa0j; - t_ave[j][0] = t_ave[j][0] + this->t1_meam[elti] * rhoa0i; - t_ave[j][1] = t_ave[j][1] + this->t2_meam[elti] * rhoa0i; - t_ave[j][2] = t_ave[j][2] + this->t3_meam[elti] * rhoa0i; + if (ialloy != 2) { + t_ave[i][0] = t_ave[i][0] + t1_meam[eltj] * rhoa0j; + t_ave[i][1] = t_ave[i][1] + t2_meam[eltj] * rhoa0j; + t_ave[i][2] = t_ave[i][2] + t3_meam[eltj] * rhoa0j; + t_ave[j][0] = t_ave[j][0] + t1_meam[elti] * rhoa0i; + t_ave[j][1] = t_ave[j][1] + t2_meam[elti] * rhoa0i; + t_ave[j][2] = t_ave[j][2] + t3_meam[elti] * rhoa0i; } - if (this->ialloy == 1) { - tsq_ave[i][0] = tsq_ave[i][0] + this->t1_meam[eltj] * this->t1_meam[eltj] * rhoa0j; - tsq_ave[i][1] = tsq_ave[i][1] + this->t2_meam[eltj] * this->t2_meam[eltj] * rhoa0j; - tsq_ave[i][2] = tsq_ave[i][2] + this->t3_meam[eltj] * this->t3_meam[eltj] * rhoa0j; - tsq_ave[j][0] = tsq_ave[j][0] + this->t1_meam[elti] * this->t1_meam[elti] * rhoa0i; - tsq_ave[j][1] = tsq_ave[j][1] + this->t2_meam[elti] * this->t2_meam[elti] * rhoa0i; - tsq_ave[j][2] = tsq_ave[j][2] + this->t3_meam[elti] * this->t3_meam[elti] * rhoa0i; + if (ialloy == 1) { + tsq_ave[i][0] = tsq_ave[i][0] + t1_meam[eltj] * t1_meam[eltj] * rhoa0j; + tsq_ave[i][1] = tsq_ave[i][1] + t2_meam[eltj] * t2_meam[eltj] * rhoa0j; + tsq_ave[i][2] = tsq_ave[i][2] + t3_meam[eltj] * t3_meam[eltj] * rhoa0j; + tsq_ave[j][0] = tsq_ave[j][0] + t1_meam[elti] * t1_meam[elti] * rhoa0i; + tsq_ave[j][1] = tsq_ave[j][1] + t2_meam[elti] * t2_meam[elti] * rhoa0i; + tsq_ave[j][2] = tsq_ave[j][2] + t3_meam[elti] * t3_meam[elti] * rhoa0i; } arho2b[i] = arho2b[i] + rhoa2j; arho2b[j] = arho2b[j] + rhoa2i; @@ -394,41 +382,41 @@ MEAM::calc_rho1(int i, int /*ntype*/, int* type, int* fmap, double** x, int numn A3i = rhoa3i / (rij2 * rij); nv2 = 0; nv3 = 0; - if (this->msmeamflag) { + if (msmeamflag) { arho2mb[i] = arho2mb[i] + rhoa2mj; arho2mb[j] = arho2mb[j] + rhoa2mi; - A1mj = rhoa1mj/rij; - A2mj = rhoa2mj/rij2; - A3mj = rhoa3mj/(rij2*rij); - A1mi = rhoa1mi/rij; - A2mi = rhoa2mi/rij2; - A3mi = rhoa3mi/(rij2*rij); + A1mj = rhoa1mj / rij; + A2mj = rhoa2mj / rij2; + A3mj = rhoa3mj / (rij2 * rij); + A1mi = rhoa1mi / rij; + A2mi = rhoa2mi / rij2; + A3mi = rhoa3mi / (rij2 * rij); } for (m = 0; m < 3; m++) { arho1[i][m] = arho1[i][m] + A1j * delij[m]; arho1[j][m] = arho1[j][m] - A1i * delij[m]; arho3b[i][m] = arho3b[i][m] + rhoa3j * delij[m] / rij; arho3b[j][m] = arho3b[j][m] - rhoa3i * delij[m] / rij; - if (this->msmeamflag) { - arho1m[i][m] = arho1m[i][m] + A1mj*delij[m]; - arho1m[j][m] = arho1m[j][m] - A1mi*delij[m]; - arho3mb[i][m] = arho3mb[i][m] + rhoa3mj*delij[m] / rij; - arho3mb[j][m] = arho3mb[j][m] - rhoa3mi*delij[m] / rij; + if (msmeamflag) { + arho1m[i][m] = arho1m[i][m] + A1mj * delij[m]; + arho1m[j][m] = arho1m[j][m] - A1mi * delij[m]; + arho3mb[i][m] = arho3mb[i][m] + rhoa3mj * delij[m] / rij; + arho3mb[j][m] = arho3mb[j][m] - rhoa3mi * delij[m] / rij; } for (n = m; n < 3; n++) { arho2[i][nv2] = arho2[i][nv2] + A2j * delij[m] * delij[n]; arho2[j][nv2] = arho2[j][nv2] + A2i * delij[m] * delij[n]; - if (this->msmeamflag) { - arho2m[i][nv2] = arho2m[i][nv2] + A2mj*delij[m] * delij[n]; - arho2m[j][nv2] = arho2m[j][nv2] + A2mi*delij[m] * delij[n]; + if (msmeamflag) { + arho2m[i][nv2] = arho2m[i][nv2] + A2mj * delij[m] * delij[n]; + arho2m[j][nv2] = arho2m[j][nv2] + A2mi * delij[m] * delij[n]; } nv2 = nv2 + 1; for (p = n; p < 3; p++) { arho3[i][nv3] = arho3[i][nv3] + A3j * delij[m] * delij[n] * delij[p]; arho3[j][nv3] = arho3[j][nv3] - A3i * delij[m] * delij[n] * delij[p]; - if (this->msmeamflag) { - arho3m[i][nv3] = arho3m[i][nv3] + A3mj*delij[m]*delij[n]*delij[p]; - arho3m[j][nv3] = arho3m[j][nv3] - A3mi*delij[m]*delij[n]*delij[p]; + if (msmeamflag) { + arho3m[i][nv3] = arho3m[i][nv3] + A3mj * delij[m] * delij[n] * delij[p]; + arho3m[j][nv3] = arho3m[j][nv3] - A3mi * delij[m] * delij[n] * delij[p]; } nv3 = nv3 + 1; } @@ -438,4 +426,3 @@ MEAM::calc_rho1(int i, int /*ntype*/, int* type, int* fmap, double** x, int numn } } } - diff --git a/src/MEAM/meam_force.cpp b/src/MEAM/meam_force.cpp index 4bc7380898..23230e0fbc 100644 --- a/src/MEAM/meam_force.cpp +++ b/src/MEAM/meam_force.cpp @@ -15,16 +15,16 @@ #include "math_special.h" -#include #include +#include using namespace LAMMPS_NS; -void -MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int vflag_atom, - double* eng_vdwl, double* eatom, int /*ntype*/, int* type, int* fmap, - double** scale, double** x, int numneigh, int* firstneigh, int numneigh_full, - int* firstneigh_full, int fnoffset, double** f, double** vatom, double *virial) +void MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int vflag_atom, + double *eng_vdwl, double *eatom, int /*ntype*/, int *type, int *fmap, + double **scale, double **x, int numneigh, int *firstneigh, int numneigh_full, + int *firstneigh_full, int fnoffset, double **f, double **vatom, + double *virial) { int j, jn, k, kn, kk, m, n, p, q; int nv2, nv3, elti, eltj, eltk, ind; @@ -98,18 +98,18 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int delij[1] = x[j][1] - yitmp; delij[2] = x[j][2] - zitmp; rij2 = delij[0] * delij[0] + delij[1] * delij[1] + delij[2] * delij[2]; - if (rij2 < this->cutforcesq) { + if (rij2 < cutforcesq) { rij = sqrt(rij2); recip = 1.0 / rij; // Compute phi and phip - ind = this->eltind[elti][eltj]; - pp = rij * this->rdrar; + ind = eltind[elti][eltj]; + pp = rij * rdrar; kk = (int)pp; - kk = std::min(kk, this->nrar - 2); + kk = std::min(kk, nrar - 2); pp = pp - kk; pp = std::min(pp, 1.0); - phi = ((this->phirar3[ind][kk] * pp + this->phirar2[ind][kk]) * pp + this->phirar1[ind][kk]) * pp + this->phirar[ind][kk]; - phip = (this->phirar6[ind][kk] * pp + this->phirar5[ind][kk]) * pp + this->phirar4[ind][kk]; + phi = ((phirar3[ind][kk] * pp + phirar2[ind][kk]) * pp + phirar1[ind][kk]) * pp + phirar[ind][kk]; + phip = (phirar6[ind][kk] * pp + phirar5[ind][kk]) * pp + phirar4[ind][kk]; if (eflag_either != 0) { double phi_sc = phi * scaleij; @@ -126,47 +126,47 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int // Compute pair densities and derivatives - invrei = 1.0 / this->re_meam[elti][elti]; + invrei = 1.0 / re_meam[elti][elti]; ai = rij * invrei - 1.0; - ro0i = this->rho0_meam[elti]; - rhoa0i = ro0i * MathSpecial::fm_exp(-this->beta0_meam[elti] * ai); - drhoa0i = -this->beta0_meam[elti] * invrei * rhoa0i; - rhoa1i = ro0i * MathSpecial::fm_exp(-this->beta1_meam[elti] * ai); - drhoa1i = -this->beta1_meam[elti] * invrei * rhoa1i; - rhoa2i = ro0i * MathSpecial::fm_exp(-this->beta2_meam[elti] * ai); - drhoa2i = -this->beta2_meam[elti] * invrei * rhoa2i; - rhoa3i = ro0i * MathSpecial::fm_exp(-this->beta3_meam[elti] * ai); - drhoa3i = -this->beta3_meam[elti] * invrei * rhoa3i; + ro0i = rho0_meam[elti]; + rhoa0i = ro0i * MathSpecial::fm_exp(-beta0_meam[elti] * ai); + drhoa0i = -beta0_meam[elti] * invrei * rhoa0i; + rhoa1i = ro0i * MathSpecial::fm_exp(-beta1_meam[elti] * ai); + drhoa1i = -beta1_meam[elti] * invrei * rhoa1i; + rhoa2i = ro0i * MathSpecial::fm_exp(-beta2_meam[elti] * ai); + drhoa2i = -beta2_meam[elti] * invrei * rhoa2i; + rhoa3i = ro0i * MathSpecial::fm_exp(-beta3_meam[elti] * ai); + drhoa3i = -beta3_meam[elti] * invrei * rhoa3i; - if (this->msmeamflag) { - rhoa1mi = ro0i * MathSpecial::fm_exp(-this->beta1m_meam[elti] * ai) * t1m_meam[elti]; - drhoa1mi = -this->beta1m_meam[elti] * invrei * rhoa1mi; - rhoa2mi = ro0i * MathSpecial::fm_exp(-this->beta2m_meam[elti] * ai) * t2m_meam[elti]; - drhoa2mi = -this->beta2m_meam[elti] * invrei * rhoa2mi; - rhoa3mi = ro0i * MathSpecial::fm_exp(-this->beta3m_meam[elti] * ai) * t3m_meam[elti]; - drhoa3mi = -this->beta3m_meam[elti] * invrei * rhoa3mi; + if (msmeamflag) { + rhoa1mi = ro0i * MathSpecial::fm_exp(-beta1m_meam[elti] * ai) * t1m_meam[elti]; + drhoa1mi = -beta1m_meam[elti] * invrei * rhoa1mi; + rhoa2mi = ro0i * MathSpecial::fm_exp(-beta2m_meam[elti] * ai) * t2m_meam[elti]; + drhoa2mi = -beta2m_meam[elti] * invrei * rhoa2mi; + rhoa3mi = ro0i * MathSpecial::fm_exp(-beta3m_meam[elti] * ai) * t3m_meam[elti]; + drhoa3mi = -beta3m_meam[elti] * invrei * rhoa3mi; } if (elti != eltj) { - invrej = 1.0 / this->re_meam[eltj][eltj]; + invrej = 1.0 / re_meam[eltj][eltj]; aj = rij * invrej - 1.0; - ro0j = this->rho0_meam[eltj]; - rhoa0j = ro0j * MathSpecial::fm_exp(-this->beta0_meam[eltj] * aj); - drhoa0j = -this->beta0_meam[eltj] * invrej * rhoa0j; - rhoa1j = ro0j * MathSpecial::fm_exp(-this->beta1_meam[eltj] * aj); - drhoa1j = -this->beta1_meam[eltj] * invrej * rhoa1j; - rhoa2j = ro0j * MathSpecial::fm_exp(-this->beta2_meam[eltj] * aj); - drhoa2j = -this->beta2_meam[eltj] * invrej * rhoa2j; - rhoa3j = ro0j * MathSpecial::fm_exp(-this->beta3_meam[eltj] * aj); - drhoa3j = -this->beta3_meam[eltj] * invrej * rhoa3j; + ro0j = rho0_meam[eltj]; + rhoa0j = ro0j * MathSpecial::fm_exp(-beta0_meam[eltj] * aj); + drhoa0j = -beta0_meam[eltj] * invrej * rhoa0j; + rhoa1j = ro0j * MathSpecial::fm_exp(-beta1_meam[eltj] * aj); + drhoa1j = -beta1_meam[eltj] * invrej * rhoa1j; + rhoa2j = ro0j * MathSpecial::fm_exp(-beta2_meam[eltj] * aj); + drhoa2j = -beta2_meam[eltj] * invrej * rhoa2j; + rhoa3j = ro0j * MathSpecial::fm_exp(-beta3_meam[eltj] * aj); + drhoa3j = -beta3_meam[eltj] * invrej * rhoa3j; - if (this->msmeamflag) { - rhoa1mj = ro0j * t1m_meam[eltj] * MathSpecial::fm_exp(-this->beta1m_meam[eltj] * aj); - drhoa1mj = -this->beta1m_meam[eltj] * invrej * rhoa1mj; - rhoa2mj = ro0j * t2m_meam[eltj] * MathSpecial::fm_exp(-this->beta2m_meam[eltj] * aj); - drhoa2mj = -this->beta2m_meam[eltj] * invrej * rhoa2mj; - rhoa3mj = ro0j * t3m_meam[eltj] * MathSpecial::fm_exp(-this->beta3m_meam[eltj] * aj); - drhoa3mj = -this->beta3m_meam[eltj] * invrej * rhoa3mj; + if (msmeamflag) { + rhoa1mj = ro0j * t1m_meam[eltj] * MathSpecial::fm_exp(-beta1m_meam[eltj] * aj); + drhoa1mj = -beta1m_meam[eltj] * invrej * rhoa1mj; + rhoa2mj = ro0j * t2m_meam[eltj] * MathSpecial::fm_exp(-beta2m_meam[eltj] * aj); + drhoa2mj = -beta2m_meam[eltj] * invrej * rhoa2mj; + rhoa3mj = ro0j * t3m_meam[eltj] * MathSpecial::fm_exp(-beta3m_meam[eltj] * aj); + drhoa3mj = -beta3m_meam[eltj] * invrej * rhoa3mj; } } else { @@ -179,7 +179,7 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int rhoa3j = rhoa3i; drhoa3j = drhoa3i; - if (this->msmeamflag) { + if (msmeamflag) { rhoa1mj = rhoa1mi; drhoa1mj = drhoa1mi; rhoa2mj = rhoa2mi; @@ -189,17 +189,17 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int } } - const double t1mi = this->t1_meam[elti]; - const double t2mi = this->t2_meam[elti]; - const double t3mi = this->t3_meam[elti]; - const double t1mj = this->t1_meam[eltj]; - const double t2mj = this->t2_meam[eltj]; - const double t3mj = this->t3_meam[eltj]; + const double t1mi = t1_meam[elti]; + const double t2mi = t2_meam[elti]; + const double t3mi = t3_meam[elti]; + const double t1mj = t1_meam[eltj]; + const double t2mj = t2_meam[eltj]; + const double t3mj = t3_meam[eltj]; // ialloy mod not needed in MS-MEAM, but similarity here is that we multply rhos by t. // We did this above with rhoa1mj, rhoa2mj, etc. - if (this->ialloy == 1 || this->msmeamflag) { + if (ialloy == 1 || msmeamflag) { rhoa1j *= t1mj; rhoa2j *= t2mj; rhoa3j *= t3mj; @@ -227,12 +227,12 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int for (n = 0; n < 3; n++) { for (p = n; p < 3; p++) { for (q = p; q < 3; q++) { - arg = delij[n] * delij[p] * delij[q] * this->v3D[nv3]; + arg = delij[n] * delij[p] * delij[q] * v3D[nv3]; arg1i3 = arg1i3 + arho3[i][nv3] * arg; arg1j3 = arg1j3 - arho3[j][nv3] * arg; nv3 = nv3 + 1; } - arg = delij[n] * delij[p] * this->v2D[nv2]; + arg = delij[n] * delij[p] * v2D[nv2]; arg1i2 = arg1i2 + arho2[i][nv2] * arg; arg1j2 = arg1j2 + arho2[j][nv2] * arg; nv2 = nv2 + 1; @@ -255,16 +255,16 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int arg1j3m = 0.0; arg3i3m = 0.0; arg3j3m = 0.0; - if (this->msmeamflag) { + if (msmeamflag) { for (n = 0; n < 3; n++) { for (p = n; p < 3; p++) { for (q = p; q < 3; q++) { - arg = delij[n] * delij[p] * delij[q] * this->v3D[nv3]; + arg = delij[n] * delij[p] * delij[q] * v3D[nv3]; arg1i3m = arg1i3m - arho3m[i][nv3] * arg; arg1j3m = arg1j3m + arho3m[j][nv3] * arg; nv3 = nv3 + 1; } - arg = delij[n] * delij[p] * this->v2D[nv2]; + arg = delij[n] * delij[p] * v2D[nv2]; arg1i2m = arg1i2m + arho2m[i][nv2] * arg; arg1j2m = arg1j2m + arho2m[j][nv2] * arg; nv2 = nv2 + 1; @@ -299,8 +299,8 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int drho2drm1[m] = 0.0; drho2drm2[m] = 0.0; for (n = 0; n < 3; n++) { - drho2drm1[m] = drho2drm1[m] + arho2[i][this->vind2D[m][n]] * delij[n]; - drho2drm2[m] = drho2drm2[m] - arho2[j][this->vind2D[m][n]] * delij[n]; + drho2drm1[m] = drho2drm1[m] + arho2[i][vind2D[m][n]] * delij[n]; + drho2drm2[m] = drho2drm2[m] - arho2[j][vind2D[m][n]] * delij[n]; } drho2drm1[m] = a2 * rhoa2j * drho2drm1[m]; drho2drm2[m] = -a2 * rhoa2i * drho2drm2[m]; @@ -320,9 +320,9 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int nv2 = 0; for (n = 0; n < 3; n++) { for (p = n; p < 3; p++) { - arg = delij[n] * delij[p] * this->v2D[nv2]; - drho3drm1[m] = drho3drm1[m] + arho3[i][this->vind3D[m][n][p]] * arg; - drho3drm2[m] = drho3drm2[m] + arho3[j][this->vind3D[m][n][p]] * arg; + arg = delij[n] * delij[p] * v2D[nv2]; + drho3drm1[m] = drho3drm1[m] + arho3[i][vind3D[m][n][p]] * arg; + drho3drm2[m] = drho3drm2[m] + arho3[j][vind3D[m][n][p]] * arg; nv2 = nv2 + 1; } } @@ -330,7 +330,7 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int drho3drm2[m] = (-a3 * drho3drm2[m] + a3a * arho3b[j][m]) * rhoa3i; } - if (this->msmeamflag) { + if (msmeamflag) { // rho1m terms a1 = 2 * sij / rij; drho1mdr1 = a1 * (drhoa1mj - rhoa1mj / rij) * arg1i1m; @@ -352,8 +352,8 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int drho2mdrm1[m] = 0.0; drho2mdrm2[m] = 0.0; for (n = 0; n < 3; n++) { - drho2mdrm1[m] += arho2m[i][this->vind2D[m][n]] * delij[n]; - drho2mdrm2[m] -= arho2m[j][this->vind2D[m][n]] * delij[n]; + drho2mdrm1[m] += arho2m[i][vind2D[m][n]] * delij[n]; + drho2mdrm2[m] -= arho2m[j][vind2D[m][n]] * delij[n]; } drho2mdrm1[m] = a2 * rhoa2mj * drho2mdrm1[m]; drho2mdrm2[m] = -a2 * rhoa2mi * drho2mdrm2[m]; @@ -376,9 +376,9 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int nv2 = 0; for (n = 0; n < 3; n++) { for (p = n; p < 3; p++) { - arg = delij[n] * delij[p] * this->v2D[nv2]; - drho3mdrm1[m] += arho3m[i][this->vind3D[m][n][p]] * arg; - drho3mdrm2[m] += arho3m[j][this->vind3D[m][n][p]] * arg; + arg = delij[n] * delij[p] * v2D[nv2]; + drho3mdrm1[m] += arho3m[i][vind3D[m][n][p]] * arg; + drho3mdrm2[m] += arho3m[j][vind3D[m][n][p]] * arg; nv2 = nv2 + 1; } } @@ -399,7 +399,7 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int // compute derivatives of weighting functions t wrt rij // weighting functions t set to unity for MS-MEAM - if (this->msmeamflag) { + if (msmeamflag) { t1i = 1.0; t2i = 1.0; @@ -423,7 +423,7 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int t2j = t_ave[j][1]; t3j = t_ave[j][2]; - if (this->ialloy == 1) { + if (ialloy == 1) { a1i = fdiv_zero(drhoa0j * sij, tsq_ave[i][0]); a1j = fdiv_zero(drhoa0i * sij, tsq_ave[j][0]); @@ -439,7 +439,7 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int dt3dr1 = a3i * (t3mj - t3i * MathSpecial::square(t3mj)); dt3dr2 = a3j * (t3mi - t3j * MathSpecial::square(t3mi)); - } else if (this->ialloy == 2) { + } else if (ialloy == 2) { dt1dr1 = 0.0; dt1dr2 = 0.0; @@ -468,10 +468,10 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int } // Compute derivatives of total density wrt rij, sij and rij(3) - get_shpfcn(this->lattce_meam[elti][elti], this->stheta_meam[elti][elti], this->ctheta_meam[elti][elti], shpi); - get_shpfcn(this->lattce_meam[eltj][eltj], this->stheta_meam[elti][elti], this->ctheta_meam[elti][elti], shpj); + get_shpfcn(lattce_meam[elti][elti], stheta_meam[elti][elti], ctheta_meam[elti][elti], shpi); + get_shpfcn(lattce_meam[eltj][eltj], stheta_meam[elti][elti], ctheta_meam[elti][elti], shpj); - if (this->msmeamflag) { + if (msmeamflag) { drhodr1 = dgamma1[i] * drho0dr1 + dgamma2[i] * (dt1dr1 * rho1[i] + t1i * (drho1dr1 - drho1mdr1) + dt2dr1 * rho2[i] + t2i * (drho2dr1 - drho2mdr1) + @@ -526,7 +526,7 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int drho3ds1 = a3 * rhoa3j * arg1i3 - a3a * rhoa3j * arg3i3; drho3ds2 = a3 * rhoa3i * arg1j3 - a3a * rhoa3i * arg3j3; - if (this->msmeamflag) { + if (msmeamflag) { drho1mds1 = a1 * rhoa1mj * arg1i1m; drho1mds2 = a1 * rhoa1mi * arg1j1m; drho2mds1 = a2 * rhoa2mj * arg1i2m - 2.0 / 3.0 * arho2mb[i] * rhoa2mj; @@ -544,7 +544,7 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int drho3mds2 = 0.0; } - if (this->ialloy == 1) { + if (ialloy == 1) { a1i = fdiv_zero(rhoa0j, tsq_ave[i][0]); a1j = fdiv_zero(rhoa0i, tsq_ave[j][0]); @@ -560,7 +560,7 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int dt3ds1 = a3i * (t3mj - t3i * MathSpecial::square(t3mj)); dt3ds2 = a3j * (t3mi - t3j * MathSpecial::square(t3mi)); - } else if (this->ialloy == 2) { + } else if (ialloy == 2) { dt1ds1 = 0.0; dt1ds2 = 0.0; @@ -586,7 +586,7 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int dt3ds2 = aj * (t3mi - t3j); } - if (this->msmeamflag) { + if (msmeamflag) { drhods1 = dgamma1[i] * drho0ds1 + dgamma2[i] * (dt1ds1 * rho1[i] + t1i * (drho1ds1 - drho1mds1) + dt2ds1 * rho2[i] + t2i * (drho2ds1 - drho2mds1) + @@ -681,13 +681,13 @@ MEAM::meam_force(int i, int eflag_global, int eflag_atom, int vflag_global, int double delc, rik2, rjk2; sij = scrfcn[jn+fnoffset] * fcpair[jn+fnoffset]; - const double Cmax = this->Cmax_meam[elti][eltj][eltk]; - const double Cmin = this->Cmin_meam[elti][eltj][eltk]; + const double Cmax = Cmax_meam[elti][eltj][eltk]; + const double Cmin = Cmin_meam[elti][eltj][eltk]; dsij1 = 0.0; dsij2 = 0.0; if (!iszero(sij) && !isone(sij)) { - const double rbound = rij2 * this->ebound_meam[elti][eltj]; + const double rbound = rij2 * ebound_meam[elti][eltj]; delc = Cmax - Cmin; dxjk = x[k][0] - x[j][0]; dyjk = x[k][1] - x[j][1]; diff --git a/src/MEAM/meam_funcs.cpp b/src/MEAM/meam_funcs.cpp index f3a6e99772..13caa1e984 100644 --- a/src/MEAM/meam_funcs.cpp +++ b/src/MEAM/meam_funcs.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -24,7 +23,6 @@ using namespace LAMMPS_NS; - //----------------------------------------------------------------------------- // Compute G(gamma) based on selection flag ibar: // 0 => G = sqrt(1+gamma) @@ -34,8 +32,7 @@ using namespace LAMMPS_NS; // 4 => G = sqrt(1+gamma) // -5 => G = +-sqrt(abs(1+gamma)) // -double -MEAM::G_gam(const double gamma, const int ibar, int& errorflag) const +double MEAM::G_gam(const double gamma, const int ibar, int &errorflag) const { double gsmooth_switchpoint; @@ -76,8 +73,7 @@ MEAM::G_gam(const double gamma, const int ibar, int& errorflag) const // 4 => G = sqrt(1+gamma) // -5 => G = +-sqrt(abs(1+gamma)) // -double -MEAM::dG_gam(const double gamma, const int ibar, double& dG) const +double MEAM::dG_gam(const double gamma, const int ibar, double &dG) const { double gsmooth_switchpoint; double G; @@ -125,12 +121,11 @@ MEAM::dG_gam(const double gamma, const int ibar, double& dG) const //----------------------------------------------------------------------------- // Compute ZBL potential // -double -MEAM::zbl(const double r, const int z1, const int z2) +double MEAM::zbl(const double r, const int z1, const int z2) { int i; - const double c[] = { 0.028171, 0.28022, 0.50986, 0.18175 }; - const double d[] = { 0.20162, 0.40290, 0.94229, 3.1998 }; + const double c[] = {0.028171, 0.28022, 0.50986, 0.18175}; + const double d[] = {0.20162, 0.40290, 0.94229, 3.1998}; const double azero = 0.4685; const double cc = 14.3997; double a, x; @@ -138,33 +133,29 @@ MEAM::zbl(const double r, const int z1, const int z2) a = azero / (pow(z1, 0.23) + pow(z2, 0.23)); double result = 0.0; x = r / a; - for (i = 0; i <= 3; i++) { - result = result + c[i] * MathSpecial::fm_exp(-d[i] * x); - } - if (r > 0.0) - result = result * z1 * z2 / r * cc; + for (i = 0; i <= 3; i++) { result = result + c[i] * MathSpecial::fm_exp(-d[i] * x); } + if (r > 0.0) result = result * z1 * z2 / r * cc; return result; } //----------------------------------------------------------------------------- // Compute embedding function F(rhobar) and derivative F'(rhobar), eqn I.5 // -double -MEAM::embedding(const double A, const double Ec, const double rhobar, double& dF) const +double MEAM::embedding(const double A, const double Ec, const double rhobar, double &dF) const { const double AEc = A * Ec; if (rhobar > 0.0) { - const double lrb = log(rhobar); - dF = AEc * (1.0 + lrb); - return AEc * rhobar * lrb; + const double lrb = log(rhobar); + dF = AEc * (1.0 + lrb); + return AEc * rhobar * lrb; } else { - if (this->emb_lin_neg == 0) { + if (emb_lin_neg == 0) { dF = 0.0; return 0.0; } else { - dF = - AEc; - return - AEc * rhobar; + dF = -AEc; + return -AEc * rhobar; } } } @@ -172,9 +163,8 @@ MEAM::embedding(const double A, const double Ec, const double rhobar, double& dF //----------------------------------------------------------------------------- // Compute Rose energy function, I.16 // -double -MEAM::erose(const double r, const double re, const double alpha, const double Ec, const double repuls, - const double attrac, const int form) +double MEAM::erose(const double r, const double re, const double alpha, const double Ec, + const double repuls, const double attrac, const int form) { double astar, a3; double result = 0.0; @@ -188,11 +178,13 @@ MEAM::erose(const double r, const double re, const double alpha, const double Ec a3 = repuls; if (form == 1) - result = -Ec * (1 + astar + (-attrac + repuls / r) * MathSpecial::cube(astar)) * MathSpecial::fm_exp(-astar); + result = -Ec * (1 + astar + (-attrac + repuls / r) * MathSpecial::cube(astar)) * + MathSpecial::fm_exp(-astar); else if (form == 2) result = -Ec * (1 + astar + a3 * MathSpecial::cube(astar)) * MathSpecial::fm_exp(-astar); else - result = -Ec * (1 + astar + a3 * MathSpecial::cube(astar) / (r / re)) * MathSpecial::fm_exp(-astar); + result = -Ec * (1 + astar + a3 * MathSpecial::cube(astar) / (r / re)) * + MathSpecial::fm_exp(-astar); } return result; } @@ -200,8 +192,7 @@ MEAM::erose(const double r, const double re, const double alpha, const double Ec //----------------------------------------------------------------------------- // Shape factors for various configurations // -void -MEAM::get_shpfcn(const lattice_t latt, const double sthe, const double cthe, double (&s)[3]) +void MEAM::get_shpfcn(const lattice_t latt, const double sthe, const double cthe, double (&s)[3]) { switch (latt) { case FCC: @@ -218,7 +209,7 @@ MEAM::get_shpfcn(const lattice_t latt, const double sthe, const double cthe, dou s[1] = 0.0; s[2] = 1.0 / 3.0; break; - case CH4: // CH4 actually needs shape factor for diamond for C, dimer for H + case CH4: // CH4 actually needs shape factor for diamond for C, dimer for H case DIA: case DIA3: s[0] = 0.0; @@ -229,19 +220,19 @@ MEAM::get_shpfcn(const lattice_t latt, const double sthe, const double cthe, dou s[0] = 1.0; s[1] = 2.0 / 3.0; // s(3) = 1.d0 // this should be 0.4 unless (1-legendre) is multiplied in the density calc. - s[2] = 0.40; // this is (1-legendre) where legendre = 0.6 in dynamo is accounted. + s[2] = 0.40; // this is (1-legendre) where legendre = 0.6 in dynamo is accounted. break; - case LIN: //linear, theta being 180 + case LIN: //linear, theta being 180 s[0] = 0.0; - s[1] = 8.0 / 3.0; // 4*(co**4 + si**4 - 1.0/3.0) in zig become 4*(1-1/3) + s[1] = 8.0 / 3.0; // 4*(co**4 + si**4 - 1.0/3.0) in zig become 4*(1-1/3) s[2] = 0.0; break; - case ZIG: //zig-zag - case TRI: //trimer e.g. H2O - s[0] = 4.0*pow(cthe,2); - s[1] = 4.0*(pow(cthe,4) + pow(sthe,4) - 1.0/3.0); - s[2] = 4.0*(pow(cthe,2) * (3*pow(sthe,4) + pow(cthe,4))); - s[2] = s[2] - 0.6*s[0]; //legend in dyn, 0.6 is default value. + case ZIG: //zig-zag + case TRI: //trimer e.g. H2O + s[0] = 4.0 * pow(cthe, 2); + s[1] = 4.0 * (pow(cthe, 4) + pow(sthe, 4) - 1.0 / 3.0); + s[2] = 4.0 * (pow(cthe, 2) * (3 * pow(sthe, 4) + pow(cthe, 4))); + s[2] = s[2] - 0.6 * s[0]; //legend in dyn, 0.6 is default value. break; default: s[0] = 0.0; @@ -252,8 +243,7 @@ MEAM::get_shpfcn(const lattice_t latt, const double sthe, const double cthe, dou //----------------------------------------------------------------------------- // Number of first neighbors for reference structure // -int -MEAM::get_Zij(const lattice_t latt) +int MEAM::get_Zij(const lattice_t latt) { switch (latt) { case FCC: @@ -276,7 +266,7 @@ MEAM::get_Zij(const lattice_t latt) return 12; case B2: return 8; - case CH4: // DYNAMO currently implemented this way while it needs two Z values, 4 and 1 + case CH4: // DYNAMO currently implemented this way while it needs two Z values, 4 and 1 return 4; case LIN: case ZIG: @@ -293,9 +283,8 @@ MEAM::get_Zij(const lattice_t latt) // numscr = number of atoms that screen the 2NN bond // S = second neighbor screening function (xfac, a part of b2nn in dynamo) // -int -MEAM::get_Zij2(const lattice_t latt, const double cmin, const double cmax, - const double stheta, double& a, double& S) +int MEAM::get_Zij2(const lattice_t latt, const double cmin, const double cmax, const double stheta, + double &a, double &S) { double C, x, sijk; @@ -303,91 +292,91 @@ MEAM::get_Zij2(const lattice_t latt, const double cmin, const double cmax, switch (latt) { - case FCC: - Zij2 = 6; - a = sqrt(2.0); - numscr = 4; - break; + case FCC: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; - case BCC: - Zij2 = 6; - a = 2.0 / sqrt(3.0); - numscr = 4; - break; + case BCC: + Zij2 = 6; + a = 2.0 / sqrt(3.0); + numscr = 4; + break; - case HCP: - Zij2 = 6; - a = sqrt(2.0); - numscr = 4; - break; + case HCP: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; - case B1: - case SC: - Zij2 = 12; - a = sqrt(2.0); - numscr = 2; - break; + case B1: + case SC: + Zij2 = 12; + a = sqrt(2.0); + numscr = 2; + break; - case DIA: // 2NN - Zij2 = 12; - a = sqrt(8.0 / 3.0); - numscr = 1; - if (cmin < 0.500001) { + case DIA: // 2NN + Zij2 = 12; + a = sqrt(8.0 / 3.0); + numscr = 1; + if (cmin < 0.500001) { // call error('can not do 2NN MEAM for dia') - } - break; + } + break; - case DIA3: // 3NN - Zij2 = 12; - a = sqrt(11.0 / 3.0); - numscr = 4; - if (cmin < 0.500001) { + case DIA3: // 3NN + Zij2 = 12; + a = sqrt(11.0 / 3.0); + numscr = 4; + if (cmin < 0.500001) { // call error('can not do 2NN MEAM for dia') - } - break; + } + break; - case CH4: //does not have 2nn structure so it returns 0 - case LIN: //line - case DIM: - // this really shouldn't be allowed; make sure screening is zero - a = 1.0; - S = 0.0; - return 0; + case CH4: //does not have 2nn structure so it returns 0 + case LIN: //line + case DIM: + // this really shouldn't be allowed; make sure screening is zero + a = 1.0; + S = 0.0; + return 0; - case TRI: //TRI - Zij2 = 1; - a = 2.0*stheta; - numscr=2; - break; + case TRI: //TRI + Zij2 = 1; + a = 2.0 * stheta; + numscr = 2; + break; - case ZIG: //zig-zag - Zij2 = 2; - a = 2.0*stheta; - numscr=1; - break; + case ZIG: //zig-zag + Zij2 = 2; + a = 2.0 * stheta; + numscr = 1; + break; - case L12: - Zij2 = 6; - a = sqrt(2.0); - numscr = 4; - break; + case L12: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; - case B2: - Zij2 = 6; - a = 2.0 / sqrt(3.0); - numscr = 4; - break; - case C11: - // unsupported lattice flag C11 in get_Zij - break; - default: - // unknown lattic flag in get Zij - // call error('Lattice not defined in get_Zij.') - break; + case B2: + Zij2 = 6; + a = 2.0 / sqrt(3.0); + numscr = 4; + break; + case C11: + // unsupported lattice flag C11 in get_Zij + break; + default: + // unknown lattic flag in get Zij + // call error('Lattice not defined in get_Zij.') + break; } // Compute screening for each first neighbor - if (latt==DIA3) { // special case for 3NN diamond structure + if (latt == DIA3) { // special case for 3NN diamond structure C = 1.0; } else { C = 4.0 / (a * a) - 1.0; @@ -399,22 +388,21 @@ MEAM::get_Zij2(const lattice_t latt, const double cmin, const double cmax, return Zij2; } -int -MEAM::get_Zij2_b2nn(const lattice_t latt, const double cmin, const double cmax, double &S) +int MEAM::get_Zij2_b2nn(const lattice_t latt, const double cmin, const double cmax, double &S) { double x, sijk, C; int numscr = 0, Zij2 = 0; switch (latt) { - case ZIG: //zig-zag for b11s and b22s term - case TRI: //trimer for b11s - Zij2 = 2; - numscr=1; - break; - default: - // unknown lattic flag in get Zij - // call error('Lattice not defined in get_Zij.') - break; + case ZIG: //zig-zag for b11s and b22s term + case TRI: //trimer for b11s + Zij2 = 2; + numscr = 1; + break; + default: + // unknown lattic flag in get Zij + // call error('Lattice not defined in get_Zij.') + break; } C = 1.0; x = (C - cmin) / (cmax - cmin); diff --git a/src/MEAM/meam_impl.cpp b/src/MEAM/meam_impl.cpp index 5290647b18..473b491b01 100644 --- a/src/MEAM/meam_impl.cpp +++ b/src/MEAM/meam_impl.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -24,8 +23,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -MEAM::MEAM(Memory* mem) - : memory(mem) +MEAM::MEAM(Memory *mem) : memory(mem) { phir = phirar = phirar1 = phirar2 = phirar3 = phirar4 = phirar5 = phirar6 = nullptr; @@ -45,15 +43,14 @@ MEAM::MEAM(Memory* mem) neltypes = 0; for (int i = 0; i < maxelt; i++) { - A_meam[i] = rho0_meam[i] = beta0_meam[i] = - beta1_meam[i]= beta2_meam[i] = beta3_meam[i] = - t0_meam[i] = t1_meam[i] = t2_meam[i] = t3_meam[i] = - rho_ref_meam[i] = ibar_meam[i] = ielt_meam[i] = - t1m_meam[i] = t2m_meam[i] = t3m_meam[i] = - beta1m_meam[i] = beta2m_meam[i] = beta3m_meam[i] = 0.0; + A_meam[i] = rho0_meam[i] = beta0_meam[i] = beta1_meam[i] = beta2_meam[i] = beta3_meam[i] = + t0_meam[i] = t1_meam[i] = t2_meam[i] = t3_meam[i] = rho_ref_meam[i] = ibar_meam[i] = + ielt_meam[i] = t1m_meam[i] = t2m_meam[i] = t3m_meam[i] = beta1m_meam[i] = + beta2m_meam[i] = beta3m_meam[i] = 0.0; for (int j = 0; j < maxelt; j++) { lattce_meam[i][j] = FCC; - Ec_meam[i][j] = re_meam[i][j] = alpha_meam[i][j] = delta_meam[i][j] = ebound_meam[i][j] = attrac_meam[i][j] = repuls_meam[i][j] = 0.0; + Ec_meam[i][j] = re_meam[i][j] = alpha_meam[i][j] = delta_meam[i][j] = ebound_meam[i][j] = + attrac_meam[i][j] = repuls_meam[i][j] = 0.0; nn2_meam[i][j] = zbl_meam[i][j] = eltind[i][j] = 0; } } @@ -63,44 +60,44 @@ MEAM::~MEAM() { if (copymode) return; - memory->destroy(this->phirar6); - memory->destroy(this->phirar5); - memory->destroy(this->phirar4); - memory->destroy(this->phirar3); - memory->destroy(this->phirar2); - memory->destroy(this->phirar1); - memory->destroy(this->phirar); - memory->destroy(this->phir); + memory->destroy(phirar6); + memory->destroy(phirar5); + memory->destroy(phirar4); + memory->destroy(phirar3); + memory->destroy(phirar2); + memory->destroy(phirar1); + memory->destroy(phirar); + memory->destroy(phir); - memory->destroy(this->rho); - memory->destroy(this->rho0); - memory->destroy(this->rho1); - memory->destroy(this->rho2); - memory->destroy(this->rho3); - memory->destroy(this->frhop); - memory->destroy(this->gamma); - memory->destroy(this->dgamma1); - memory->destroy(this->dgamma2); - memory->destroy(this->dgamma3); - memory->destroy(this->arho2b); + memory->destroy(rho); + memory->destroy(rho0); + memory->destroy(rho1); + memory->destroy(rho2); + memory->destroy(rho3); + memory->destroy(frhop); + memory->destroy(gamma); + memory->destroy(dgamma1); + memory->destroy(dgamma2); + memory->destroy(dgamma3); + memory->destroy(arho2b); - memory->destroy(this->arho1); - memory->destroy(this->arho2); - memory->destroy(this->arho3); - memory->destroy(this->arho3b); - memory->destroy(this->t_ave); - memory->destroy(this->tsq_ave); + memory->destroy(arho1); + memory->destroy(arho2); + memory->destroy(arho3); + memory->destroy(arho3b); + memory->destroy(t_ave); + memory->destroy(tsq_ave); - memory->destroy(this->scrfcn); - memory->destroy(this->dscrfcn); - memory->destroy(this->fcpair); + memory->destroy(scrfcn); + memory->destroy(dscrfcn); + memory->destroy(fcpair); // msmeam - if (this->msmeamflag){ - memory->destroy(this->arho1m); - memory->destroy(this->arho2m); - memory->destroy(this->arho3m); - memory->destroy(this->arho2mb); - memory->destroy(this->arho3mb); + if (msmeamflag) { + memory->destroy(arho1m); + memory->destroy(arho2m); + memory->destroy(arho3m); + memory->destroy(arho2mb); + memory->destroy(arho3mb); } } diff --git a/src/MEAM/meam_setup_done.cpp b/src/MEAM/meam_setup_done.cpp index de1188349c..4adfd68f19 100644 --- a/src/MEAM/meam_setup_done.cpp +++ b/src/MEAM/meam_setup_done.cpp @@ -26,15 +26,15 @@ void MEAM::meam_setup_done(double* cutmax) int nv2, nv3, m, n, p; // Force cutoff - this->cutforce = this->rc_meam; - this->cutforcesq = this->cutforce * this->cutforce; + cutforce = rc_meam; + cutforcesq = cutforce * cutforce; // Pass cutoff back to calling program - *cutmax = this->cutforce; + *cutmax = cutforce; // Augment t1 term for (int i = 0; i < maxelt; i++) - this->t1_meam[i] = this->t1_meam[i] + this->augt1 * 3.0 / 5.0 * this->t3_meam[i]; + t1_meam[i] = t1_meam[i] + augt1 * 3.0 / 5.0 * t3_meam[i]; // Compute off-diagonal alloy parameters alloyparams(); @@ -44,44 +44,44 @@ void MEAM::meam_setup_done(double* cutmax) nv3 = 0; for (m = 0; m < 3; m++) { for (n = m; n < 3; n++) { - this->vind2D[m][n] = nv2; - this->vind2D[n][m] = nv2; + vind2D[m][n] = nv2; + vind2D[n][m] = nv2; nv2 = nv2 + 1; for (p = n; p < 3; p++) { - this->vind3D[m][n][p] = nv3; - this->vind3D[m][p][n] = nv3; - this->vind3D[n][m][p] = nv3; - this->vind3D[n][p][m] = nv3; - this->vind3D[p][m][n] = nv3; - this->vind3D[p][n][m] = nv3; + vind3D[m][n][p] = nv3; + vind3D[m][p][n] = nv3; + vind3D[n][m][p] = nv3; + vind3D[n][p][m] = nv3; + vind3D[p][m][n] = nv3; + vind3D[p][n][m] = nv3; nv3 = nv3 + 1; } } } - this->v2D[0] = 1; - this->v2D[1] = 2; - this->v2D[2] = 2; - this->v2D[3] = 1; - this->v2D[4] = 2; - this->v2D[5] = 1; + v2D[0] = 1; + v2D[1] = 2; + v2D[2] = 2; + v2D[3] = 1; + v2D[4] = 2; + v2D[5] = 1; - this->v3D[0] = 1; - this->v3D[1] = 3; - this->v3D[2] = 3; - this->v3D[3] = 3; - this->v3D[4] = 6; - this->v3D[5] = 3; - this->v3D[6] = 1; - this->v3D[7] = 3; - this->v3D[8] = 3; - this->v3D[9] = 1; + v3D[0] = 1; + v3D[1] = 3; + v3D[2] = 3; + v3D[3] = 3; + v3D[4] = 6; + v3D[5] = 3; + v3D[6] = 1; + v3D[7] = 3; + v3D[8] = 3; + v3D[9] = 1; nv2 = 0; - for (m = 0; m < this->neltypes; m++) { - for (n = m; n < this->neltypes; n++) { - this->eltind[m][n] = nv2; - this->eltind[n][m] = nv2; + for (m = 0; m < neltypes; m++) { + for (n = m; n < neltypes; n++) { + eltind[m][n] = nv2; + eltind[n][m] = nv2; nv2 = nv2 + 1; } } @@ -90,8 +90,8 @@ void MEAM::meam_setup_done(double* cutmax) compute_reference_density(); // Compute pair potentials and setup arrays for interpolation - this->nr = 1000; - this->dr = 1.1 * this->rc_meam / this->nr; + nr = 1000; + dr = 1.1 * rc_meam / nr; compute_pair_meam(); } @@ -104,52 +104,52 @@ void MEAM::alloyparams() double eb; // Loop over pairs - for (i = 0; i < this->neltypes; i++) { - for (j = 0; j < this->neltypes; j++) { + for (i = 0; i < neltypes; i++) { + for (j = 0; j < neltypes; j++) { // Treat off-diagonal pairs // If i>j, set all equal to i j) { - this->re_meam[i][j] = this->re_meam[j][i]; - this->Ec_meam[i][j] = this->Ec_meam[j][i]; - this->alpha_meam[i][j] = this->alpha_meam[j][i]; - this->lattce_meam[i][j] = this->lattce_meam[j][i]; - this->nn2_meam[i][j] = this->nn2_meam[j][i]; + re_meam[i][j] = re_meam[j][i]; + Ec_meam[i][j] = Ec_meam[j][i]; + alpha_meam[i][j] = alpha_meam[j][i]; + lattce_meam[i][j] = lattce_meam[j][i]; + nn2_meam[i][j] = nn2_meam[j][i]; // theta for lin,tri,zig references - this->stheta_meam[i][j] = this->stheta_meam[j][i]; - this->ctheta_meam[i][j] = this->ctheta_meam[j][i]; + stheta_meam[i][j] = stheta_meam[j][i]; + ctheta_meam[i][j] = ctheta_meam[j][i]; // If i i) { - if (iszero(this->Ec_meam[i][j])) { - if (this->lattce_meam[i][j] == L12) - this->Ec_meam[i][j] = - (3 * this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 4.0 - this->delta_meam[i][j]; - else if (this->lattce_meam[i][j] == C11) { - if (this->lattce_meam[i][i] == DIA) - this->Ec_meam[i][j] = - (2 * this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 3.0 - this->delta_meam[i][j]; + if (iszero(Ec_meam[i][j])) { + if (lattce_meam[i][j] == L12) + Ec_meam[i][j] = + (3 * Ec_meam[i][i] + Ec_meam[j][j]) / 4.0 - delta_meam[i][j]; + else if (lattce_meam[i][j] == C11) { + if (lattce_meam[i][i] == DIA) + Ec_meam[i][j] = + (2 * Ec_meam[i][i] + Ec_meam[j][j]) / 3.0 - delta_meam[i][j]; else - this->Ec_meam[i][j] = - (this->Ec_meam[i][i] + 2 * this->Ec_meam[j][j]) / 3.0 - this->delta_meam[i][j]; + Ec_meam[i][j] = + (Ec_meam[i][i] + 2 * Ec_meam[j][j]) / 3.0 - delta_meam[i][j]; } else - this->Ec_meam[i][j] = (this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 2.0 - this->delta_meam[i][j]; + Ec_meam[i][j] = (Ec_meam[i][i] + Ec_meam[j][j]) / 2.0 - delta_meam[i][j]; } - if (iszero(this->alpha_meam[i][j])) - this->alpha_meam[i][j] = (this->alpha_meam[i][i] + this->alpha_meam[j][j]) / 2.0; - if (iszero(this->re_meam[i][j])) - this->re_meam[i][j] = (this->re_meam[i][i] + this->re_meam[j][j]) / 2.0; + if (iszero(alpha_meam[i][j])) + alpha_meam[i][j] = (alpha_meam[i][i] + alpha_meam[j][j]) / 2.0; + if (iszero(re_meam[i][j])) + re_meam[i][j] = (re_meam[i][i] + re_meam[j][j]) / 2.0; } } } // Cmin[i][k][j] is symmetric in i-j, but not k. For all triplets // where i>j, set equal to the ineltypes; i++) { + for (i = 1; i < neltypes; i++) { for (j = 0; j < i; j++) { - for (k = 0; k < this->neltypes; k++) { - this->Cmin_meam[i][j][k] = this->Cmin_meam[j][i][k]; - this->Cmax_meam[i][j][k] = this->Cmax_meam[j][i][k]; + for (k = 0; k < neltypes; k++) { + Cmin_meam[i][j][k] = Cmin_meam[j][i][k]; + Cmax_meam[i][j][k] = Cmax_meam[j][i][k]; } } } @@ -158,11 +158,11 @@ void MEAM::alloyparams() // atom k definitely lies outside the screening function ellipse (so // there is no need to calculate its effects). Here, compute it for all // triplets [i][j][k] so that ebound[i][j] is the maximized over k - for (i = 0; i < this->neltypes; i++) { - for (j = 0; j < this->neltypes; j++) { - for (k = 0; k < this->neltypes; k++) { - eb = (this->Cmax_meam[i][j][k] * this->Cmax_meam[i][j][k]) / (4.0 * (this->Cmax_meam[i][j][k] - 1.0)); - this->ebound_meam[i][j] = std::max(this->ebound_meam[i][j], eb); + for (i = 0; i < neltypes; i++) { + for (j = 0; j < neltypes; j++) { + for (k = 0; k < neltypes; k++) { + eb = (Cmax_meam[i][j][k] * Cmax_meam[i][j][k]) / (4.0 * (Cmax_meam[i][j][k] - 1.0)); + ebound_meam[i][j] = std::max(ebound_meam[i][j], eb); } } } @@ -183,87 +183,87 @@ void MEAM::compute_pair_meam() double C, s111, s112, s221, S11, S22; // check for previously allocated arrays and free them - if (this->phir != nullptr) - memory->destroy(this->phir); - if (this->phirar != nullptr) - memory->destroy(this->phirar); - if (this->phirar1 != nullptr) - memory->destroy(this->phirar1); - if (this->phirar2 != nullptr) - memory->destroy(this->phirar2); - if (this->phirar3 != nullptr) - memory->destroy(this->phirar3); - if (this->phirar4 != nullptr) - memory->destroy(this->phirar4); - if (this->phirar5 != nullptr) - memory->destroy(this->phirar5); - if (this->phirar6 != nullptr) - memory->destroy(this->phirar6); + if (phir != nullptr) + memory->destroy(phir); + if (phirar != nullptr) + memory->destroy(phirar); + if (phirar1 != nullptr) + memory->destroy(phirar1); + if (phirar2 != nullptr) + memory->destroy(phirar2); + if (phirar3 != nullptr) + memory->destroy(phirar3); + if (phirar4 != nullptr) + memory->destroy(phirar4); + if (phirar5 != nullptr) + memory->destroy(phirar5); + if (phirar6 != nullptr) + memory->destroy(phirar6); // allocate memory for array that defines the potential - memory->create(this->phir, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phir"); + memory->create(phir, (neltypes * (neltypes + 1)) / 2, nr, "pair:phir"); // allocate coeff memory - memory->create(this->phirar, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar"); - memory->create(this->phirar1, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar1"); - memory->create(this->phirar2, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar2"); - memory->create(this->phirar3, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar3"); - memory->create(this->phirar4, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar4"); - memory->create(this->phirar5, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar5"); - memory->create(this->phirar6, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar6"); + memory->create(phirar, (neltypes * (neltypes + 1)) / 2, nr, "pair:phirar"); + memory->create(phirar1, (neltypes * (neltypes + 1)) / 2, nr, "pair:phirar1"); + memory->create(phirar2, (neltypes * (neltypes + 1)) / 2, nr, "pair:phirar2"); + memory->create(phirar3, (neltypes * (neltypes + 1)) / 2, nr, "pair:phirar3"); + memory->create(phirar4, (neltypes * (neltypes + 1)) / 2, nr, "pair:phirar4"); + memory->create(phirar5, (neltypes * (neltypes + 1)) / 2, nr, "pair:phirar5"); + memory->create(phirar6, (neltypes * (neltypes + 1)) / 2, nr, "pair:phirar6"); // loop over pairs of element types nv2 = 0; - for (a = 0; a < this->neltypes; a++) { - for (b = a; b < this->neltypes; b++) { + for (a = 0; a < neltypes; a++) { + for (b = a; b < neltypes; b++) { // loop over r values and compute - for (j = 0; j < this->nr; j++) { - r = j * this->dr; - this->phir[nv2][j] = phi_meam(r, a, b); + for (j = 0; j < nr; j++) { + r = j * dr; + phir[nv2][j] = phi_meam(r, a, b); // if using second-nearest neighbor, solve recursive problem // (see Lee and Baskes, PRB 62(13):8564 eqn.(21)) - if (this->nn2_meam[a][b] == 1) { - Z1 = get_Zij(this->lattce_meam[a][b]); - Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[a][a][b], - this->Cmax_meam[a][a][b], this->stheta_meam[a][b], arat, scrn); + if (nn2_meam[a][b] == 1) { + Z1 = get_Zij(lattce_meam[a][b]); + Z2 = get_Zij2(lattce_meam[a][b], Cmin_meam[a][a][b], + Cmax_meam[a][a][b], stheta_meam[a][b], arat, scrn); // The B1, B2, and L12 cases with NN2 have a trick to them; we need to // compute the contributions from second nearest neighbors, like a-a // pairs, but need to include NN2 contributions to those pairs as // well. - if (this->lattce_meam[a][b] == B1 || this->lattce_meam[a][b] == B2 || - this->lattce_meam[a][b] == L12 || this->lattce_meam[a][b] == DIA) { + if (lattce_meam[a][b] == B1 || lattce_meam[a][b] == B2 || + lattce_meam[a][b] == L12 || lattce_meam[a][b] == DIA) { rarat = r * arat; // phi_aa phiaa = phi_meam(rarat, a, a); - Z1 = get_Zij(this->lattce_meam[a][a]); - Z2 = get_Zij2(this->lattce_meam[a][a], this->Cmin_meam[a][a][a], - this->Cmax_meam[a][a][a], this->stheta_meam[a][a], arat, scrn); + Z1 = get_Zij(lattce_meam[a][a]); + Z2 = get_Zij2(lattce_meam[a][a], Cmin_meam[a][a][a], + Cmax_meam[a][a][a], stheta_meam[a][a], arat, scrn); phiaa+= phi_meam_series(scrn, Z1, Z2, a, a, rarat, arat); // phi_bb phibb = phi_meam(rarat, b, b); - Z1 = get_Zij(this->lattce_meam[b][b]); - Z2 = get_Zij2(this->lattce_meam[b][b], this->Cmin_meam[b][b][b], - this->Cmax_meam[b][b][b], this->stheta_meam[b][b], arat, scrn); + Z1 = get_Zij(lattce_meam[b][b]); + Z2 = get_Zij2(lattce_meam[b][b], Cmin_meam[b][b][b], + Cmax_meam[b][b][b], stheta_meam[b][b], arat, scrn); phibb+= phi_meam_series(scrn, Z1, Z2, b, b, rarat, arat); - if (this->lattce_meam[a][b] == B1 || this->lattce_meam[a][b] == B2 || - this->lattce_meam[a][b] == DIA) { + if (lattce_meam[a][b] == B1 || lattce_meam[a][b] == B2 || + lattce_meam[a][b] == DIA) { // Add contributions to the B1 or B2 potential - Z1 = get_Zij(this->lattce_meam[a][b]); - Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[a][a][b], - this->Cmax_meam[a][a][b], this->stheta_meam[a][b], arat, scrn); - this->phir[nv2][j] = this->phir[nv2][j] - Z2 * scrn / (2 * Z1) * phiaa; - Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[b][b][a], - this->Cmax_meam[b][b][a], this->stheta_meam[a][b], arat, scrn2); + Z1 = get_Zij(lattce_meam[a][b]); + Z2 = get_Zij2(lattce_meam[a][b], Cmin_meam[a][a][b], + Cmax_meam[a][a][b], stheta_meam[a][b], arat, scrn); + phir[nv2][j] = phir[nv2][j] - Z2 * scrn / (2 * Z1) * phiaa; + Z2 = get_Zij2(lattce_meam[a][b], Cmin_meam[b][b][a], + Cmax_meam[b][b][a], stheta_meam[a][b], arat, scrn2); - this->phir[nv2][j] = this->phir[nv2][j] - Z2 * scrn2 / (2 * Z1) * phibb; + phir[nv2][j] = phir[nv2][j] - Z2 * scrn2 / (2 * Z1) * phibb; - } else if (this->lattce_meam[a][b] == L12) { + } else if (lattce_meam[a][b] == L12) { // The L12 case has one last trick; we have to be careful to // compute // the correct screening between 2nd-neighbor pairs. 1-1 @@ -278,11 +278,11 @@ void MEAM::compute_pair_meam() get_sijk(C, b, b, a, &s221); S11 = s111 * s111 * s112 * s112; S22 = pow(s221, 4); - this->phir[nv2][j] = this->phir[nv2][j] - 0.75 * S11 * phiaa - 0.25 * S22 * phibb; + phir[nv2][j] = phir[nv2][j] - 0.75 * S11 * phiaa - 0.25 * S22 * phibb; } } else { - this->phir[nv2][j]+= phi_meam_series(scrn, Z1, Z2, a, b, r, arat); + phir[nv2][j]+= phi_meam_series(scrn, Z1, Z2, a, b, r, arat); } } @@ -292,14 +292,14 @@ void MEAM::compute_pair_meam() // else if -3 < astar < -1 // potential is linear combination with zbl potential // endif - if (this->zbl_meam[a][b] == 1) { - astar = this->alpha_meam[a][b] * (r / this->re_meam[a][b] - 1.0); + if (zbl_meam[a][b] == 1) { + astar = alpha_meam[a][b] * (r / re_meam[a][b] - 1.0); if (astar <= -3.0) - this->phir[nv2][j] = zbl(r, this->ielt_meam[a], this->ielt_meam[b]); + phir[nv2][j] = zbl(r, ielt_meam[a], ielt_meam[b]); else if (astar > -3.0 && astar < -1.0) { frac = fcut(1 - (astar + 1.0) / (-3.0 + 1.0)); - phizbl = zbl(r, this->ielt_meam[a], this->ielt_meam[b]); - this->phir[nv2][j] = frac * this->phir[nv2][j] + (1 - frac) * phizbl; + phizbl = zbl(r, ielt_meam[a], ielt_meam[b]); + phir[nv2][j] = frac * phir[nv2][j] + (1 - frac) * phizbl; } } } @@ -343,12 +343,12 @@ double MEAM::phi_meam(double r, int a, int b) // get number of neighbors in the reference structure // Nref[i][j] = # of i's neighbors of type j - Z1 = get_Zij(this->lattce_meam[a][a]); - Z2 = get_Zij(this->lattce_meam[b][b]); - Z12 = get_Zij(this->lattce_meam[a][b]); + Z1 = get_Zij(lattce_meam[a][a]); + Z2 = get_Zij(lattce_meam[b][b]); + Z12 = get_Zij(lattce_meam[a][b]); // this function has extra args for msmeam - if (this->msmeamflag) { + if (msmeamflag) { get_densref(r, a, b, &rho01, &rho11, &rho21, &rho31, &rho02, &rho12, &rho22, &rho32, &rho1m1, &rho2m1, &rho3m1, &rho1m2, &rho2m2, &rho3m2); @@ -362,39 +362,39 @@ double MEAM::phi_meam(double r, int a, int b) return 0.0; // calculate average weighting factors for the reference structure - if (this->lattce_meam[a][b] == C11) { - if (this->ialloy == 2) { - t11av = this->t1_meam[a]; - t12av = this->t1_meam[b]; - t21av = this->t2_meam[a]; - t22av = this->t2_meam[b]; - t31av = this->t3_meam[a]; - t32av = this->t3_meam[b]; + if (lattce_meam[a][b] == C11) { + if (ialloy == 2) { + t11av = t1_meam[a]; + t12av = t1_meam[b]; + t21av = t2_meam[a]; + t22av = t2_meam[b]; + t31av = t3_meam[a]; + t32av = t3_meam[b]; } else { scalfac = 1.0 / (rho01 + rho02); - t11av = scalfac * (this->t1_meam[a] * rho01 + this->t1_meam[b] * rho02); + t11av = scalfac * (t1_meam[a] * rho01 + t1_meam[b] * rho02); t12av = t11av; - t21av = scalfac * (this->t2_meam[a] * rho01 + this->t2_meam[b] * rho02); + t21av = scalfac * (t2_meam[a] * rho01 + t2_meam[b] * rho02); t22av = t21av; - t31av = scalfac * (this->t3_meam[a] * rho01 + this->t3_meam[b] * rho02); + t31av = scalfac * (t3_meam[a] * rho01 + t3_meam[b] * rho02); t32av = t31av; } } else { // average weighting factors for the reference structure, eqn. I.8 - get_tavref(&t11av, &t21av, &t31av, &t12av, &t22av, &t32av, this->t1_meam[a], this->t2_meam[a], - this->t3_meam[a], this->t1_meam[b], this->t2_meam[b], this->t3_meam[b], r, a, b, - this->lattce_meam[a][b]); + get_tavref(&t11av, &t21av, &t31av, &t12av, &t22av, &t32av, t1_meam[a], t2_meam[a], + t3_meam[a], t1_meam[b], t2_meam[b], t3_meam[b], r, a, b, + lattce_meam[a][b]); // with msmeam call twice with different sets of variables - if (this->msmeamflag) { - get_tavref(&t1m1av, &t2m1av, &t3m1av, &t1m2av, &t2m2av, &t3m2av, this->t1m_meam[a], this->t2m_meam[a], - this->t3m_meam[a], this->t1m_meam[b], this->t2m_meam[b], this->t3m_meam[b], r, a, b, - this->lattce_meam[a][b]); + if (msmeamflag) { + get_tavref(&t1m1av, &t2m1av, &t3m1av, &t1m2av, &t2m2av, &t3m2av, t1m_meam[a], t2m_meam[a], + t3m_meam[a], t1m_meam[b], t2m_meam[b], t3m_meam[b], r, a, b, + lattce_meam[a][b]); } } // for c11b structure, calculate background electron densities - if (this->lattce_meam[a][b] == C11) { - latta = this->lattce_meam[a][a]; + if (lattce_meam[a][b] == C11) { + latta = lattce_meam[a][a]; if (latta == DIA) { rhobar1 = MathSpecial::square((Z12 / 2) * (rho02 + rho01)) + t11av * MathSpecial::square(rho12 - rho11) @@ -418,26 +418,26 @@ double MEAM::phi_meam(double r, int a, int b) // composition-dependent scaling, equation I.7 // If using mixing rule for t, apply to reference structure; else // use precomputed values - if (this->mix_ref_t == 1) { - if (this->ibar_meam[a] <= 0) + if (mix_ref_t == 1) { + if (ibar_meam[a] <= 0) G1 = 1.0; else { - get_shpfcn(this->lattce_meam[a][a], this->stheta_meam[a][a], this->ctheta_meam[a][a], s1); + get_shpfcn(lattce_meam[a][a], stheta_meam[a][a], ctheta_meam[a][a], s1); Gam1 = (s1[0] * t11av + s1[1] * t21av + s1[2] * t31av) / (Z1 * Z1); - G1 = G_gam(Gam1, this->ibar_meam[a], errorflag); + G1 = G_gam(Gam1, ibar_meam[a], errorflag); } - if (this->ibar_meam[b] <= 0) + if (ibar_meam[b] <= 0) G2 = 1.0; else { - get_shpfcn(this->lattce_meam[b][b], this->stheta_meam[b][b], this->ctheta_meam[b][b], s2); + get_shpfcn(lattce_meam[b][b], stheta_meam[b][b], ctheta_meam[b][b], s2); Gam2 = (s2[0] * t12av + s2[1] * t22av + s2[2] * t32av) / (Z2 * Z2); - G2 = G_gam(Gam2, this->ibar_meam[b], errorflag); + G2 = G_gam(Gam2, ibar_meam[b], errorflag); } - rho0_1 = this->rho0_meam[a] * Z1 * G1; - rho0_2 = this->rho0_meam[b] * Z2 * G2; + rho0_1 = rho0_meam[a] * Z1 * G1; + rho0_2 = rho0_meam[b] * Z2 * G2; } - if (this->msmeamflag) { + if (msmeamflag) { // no additional use of t's here; all included in definitions of rho's for msmeam Gam1 = rho11 + rho21 + rho31 - (rho1m1 + rho2m1 + rho3m1); if (rho01 < 1.0e-14) @@ -464,18 +464,18 @@ double MEAM::phi_meam(double r, int a, int b) Gam2 = Gam2 / (rho02 * rho02); } - G1 = G_gam(Gam1, this->ibar_meam[a], errorflag); - G2 = G_gam(Gam2, this->ibar_meam[b], errorflag); - if (this->mix_ref_t == 1) { + G1 = G_gam(Gam1, ibar_meam[a], errorflag); + G2 = G_gam(Gam2, ibar_meam[b], errorflag); + if (mix_ref_t == 1) { rho_bkgd1 = rho0_1; rho_bkgd2 = rho0_2; } else { - if (this->bkgd_dyn == 1) { - rho_bkgd1 = this->rho0_meam[a] * Z1; - rho_bkgd2 = this->rho0_meam[b] * Z2; + if (bkgd_dyn == 1) { + rho_bkgd1 = rho0_meam[a] * Z1; + rho_bkgd2 = rho0_meam[b] * Z2; } else { - rho_bkgd1 = this->rho_ref_meam[a]; - rho_bkgd2 = this->rho_ref_meam[b]; + rho_bkgd1 = rho_ref_meam[a]; + rho_bkgd2 = rho_ref_meam[b]; } } rhobar1 = rho01 / rho_bkgd1 * G1; @@ -484,17 +484,17 @@ double MEAM::phi_meam(double r, int a, int b) // compute embedding functions, eqn I.5 - F1 = embedding(this->A_meam[a], this->Ec_meam[a][a], rhobar1, dF); - F2 = embedding(this->A_meam[b], this->Ec_meam[b][b], rhobar2, dF); + F1 = embedding(A_meam[a], Ec_meam[a][a], rhobar1, dF); + F2 = embedding(A_meam[b], Ec_meam[b][b], rhobar2, dF); // compute Rose function, I.16 - Eu = erose(r, this->re_meam[a][b], this->alpha_meam[a][b], this->Ec_meam[a][b], this->repuls_meam[a][b], - this->attrac_meam[a][b], this->erose_form); + Eu = erose(r, re_meam[a][b], alpha_meam[a][b], Ec_meam[a][b], repuls_meam[a][b], + attrac_meam[a][b], erose_form); // calculate the pair energy - if (this->lattce_meam[a][b] == C11) { - latta = this->lattce_meam[a][a]; + if (lattce_meam[a][b] == C11) { + latta = lattce_meam[a][a]; if (latta == DIA) { phiaa = phi_meam(r, a, a); phi_m = (3 * Eu - F2 - 2 * F1 - 5 * phiaa) / Z12; @@ -502,44 +502,44 @@ double MEAM::phi_meam(double r, int a, int b) phibb = phi_meam(r, b, b); phi_m = (3 * Eu - F1 - 2 * F2 - 5 * phibb) / Z12; } - } else if (this->lattce_meam[a][b] == L12) { + } else if (lattce_meam[a][b] == L12) { phiaa = phi_meam(r, a, a); // account for second neighbor a-a potential here... - Z1nn = get_Zij(this->lattce_meam[a][a]); - Z2nn = get_Zij2(this->lattce_meam[a][a], this->Cmin_meam[a][a][a], - this->Cmax_meam[a][a][a], this->stheta_meam[a][b], arat, scrn); + Z1nn = get_Zij(lattce_meam[a][a]); + Z2nn = get_Zij2(lattce_meam[a][a], Cmin_meam[a][a][a], + Cmax_meam[a][a][a], stheta_meam[a][b], arat, scrn); phiaa += phi_meam_series(scrn, Z1nn, Z2nn, a, a, r, arat); phi_m = Eu / 3.0 - F1 / 4.0 - F2 / 12.0 - phiaa; - } else if (this->lattce_meam[a][b] == CH4) { + } else if (lattce_meam[a][b] == CH4) { phi_m = (5 * Eu - F1 - 4*F2)/4; - } else if (this->lattce_meam[a][b] == ZIG) { + } else if (lattce_meam[a][b] == ZIG) { if (a==b) { phi_m = (2 * Eu - F1 - F2) / Z12; } else{ - Z1 = get_Zij(this->lattce_meam[a][b]); - Z2 = get_Zij2_b2nn(this->lattce_meam[a][b], this->Cmin_meam[a][a][b], this->Cmax_meam[a][a][b], scrn); + Z1 = get_Zij(lattce_meam[a][b]); + Z2 = get_Zij2_b2nn(lattce_meam[a][b], Cmin_meam[a][a][b], Cmax_meam[a][a][b], scrn); b11s = -Z2/Z1*scrn; - Z2 = get_Zij2_b2nn(this->lattce_meam[a][b], this->Cmin_meam[b][b][a], this->Cmax_meam[b][b][a], scrn2); + Z2 = get_Zij2_b2nn(lattce_meam[a][b], Cmin_meam[b][b][a], Cmax_meam[b][b][a], scrn2); b22s = -Z2/Z1*scrn2; - phiaa = phi_meam(2.0*this->stheta_meam[a][b]*r, a, a); - phibb = phi_meam(2.0*this->stheta_meam[a][b]*r, b, b); + phiaa = phi_meam(2.0*stheta_meam[a][b]*r, a, a); + phibb = phi_meam(2.0*stheta_meam[a][b]*r, b, b); phi_m = (2.0*Eu - F1 - F2 + phiaa*b11s + phibb*b22s) / Z12; } - } else if (this->lattce_meam[a][b] == TRI) { + } else if (lattce_meam[a][b] == TRI) { if (a==b) { phi_m = (3.0*Eu - 2.0*F1 - F2) / Z12; } else { - Z1 = get_Zij(this->lattce_meam[a][b]); - Z2 = get_Zij2_b2nn(this->lattce_meam[a][b], this->Cmin_meam[a][a][b], this->Cmax_meam[a][a][b], scrn); + Z1 = get_Zij(lattce_meam[a][b]); + Z2 = get_Zij2_b2nn(lattce_meam[a][b], Cmin_meam[a][a][b], Cmax_meam[a][a][b], scrn); b11s = -Z2/Z1*scrn; - phiaa = phi_meam(2.0*this->stheta_meam[a][b]*r, a, a); + phiaa = phi_meam(2.0*stheta_meam[a][b]*r, a, a); phi_m = (3.0*Eu - 2.0*F1 - F2 + phiaa*b11s) / Z12; } @@ -590,32 +590,32 @@ void MEAM::compute_reference_density() double rho0, rho0_2nn, arat, scrn; // loop over element types - for (a = 0; a < this->neltypes; a++) { - Z = get_Zij(this->lattce_meam[a][a]); - if (this->ibar_meam[a] <= 0) + for (a = 0; a < neltypes; a++) { + Z = get_Zij(lattce_meam[a][a]); + if (ibar_meam[a] <= 0) Gbar = 1.0; else { - get_shpfcn(this->lattce_meam[a][a], this->stheta_meam[a][a], this->ctheta_meam[a][a], shp); - gam = (this->t1_meam[a] * shp[0] + this->t2_meam[a] * shp[1] + this->t3_meam[a] * shp[2]) / (Z * Z); - Gbar = G_gam(gam, this->ibar_meam[a], errorflag); + get_shpfcn(lattce_meam[a][a], stheta_meam[a][a], ctheta_meam[a][a], shp); + gam = (t1_meam[a] * shp[0] + t2_meam[a] * shp[1] + t3_meam[a] * shp[2]) / (Z * Z); + Gbar = G_gam(gam, ibar_meam[a], errorflag); } // The zeroth order density in the reference structure, with // equilibrium spacing, is just the number of first neighbors times // the rho0_meam coefficient... - rho0 = this->rho0_meam[a] * Z; + rho0 = rho0_meam[a] * Z; // ...unless we have unscreened second neighbors, in which case we // add on the contribution from those (accounting for partial // screening) - if (this->nn2_meam[a][a] == 1) { - Z2 = get_Zij2(this->lattce_meam[a][a], this->Cmin_meam[a][a][a], - this->Cmax_meam[a][a][a], this->stheta_meam[a][a], arat, scrn); - rho0_2nn = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * (arat - 1)); + if (nn2_meam[a][a] == 1) { + Z2 = get_Zij2(lattce_meam[a][a], Cmin_meam[a][a][a], + Cmax_meam[a][a][a], stheta_meam[a][a], arat, scrn); + rho0_2nn = rho0_meam[a] * MathSpecial::fm_exp(-beta0_meam[a] * (arat - 1)); rho0 = rho0 + Z2 * rho0_2nn * scrn; } - this->rho_ref_meam[a] = rho0 * Gbar; + rho_ref_meam[a] = rho0 * Gbar; } } @@ -628,7 +628,7 @@ void MEAM::get_tavref(double* t11av, double* t21av, double* t31av, double* t12av double rhoa01, rhoa02, a1, a2, rho01 /*,rho02*/; // For ialloy = 2, no averaging is done - if (this->ialloy == 2) { + if (ialloy == 2) { *t11av = t11; *t21av = t21; *t31av = t31; @@ -658,10 +658,10 @@ void MEAM::get_tavref(double* t11av, double* t21av, double* t31av, double* t12av *t32av = t31; break; default: - a1 = r / this->re_meam[a][a] - 1.0; - a2 = r / this->re_meam[b][b] - 1.0; - rhoa01 = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * a1); - rhoa02 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta0_meam[b] * a2); + a1 = r / re_meam[a][a] - 1.0; + a2 = r / re_meam[b][b] - 1.0; + rhoa01 = rho0_meam[a] * MathSpecial::fm_exp(-beta0_meam[a] * a1); + rhoa02 = rho0_meam[b] * MathSpecial::fm_exp(-beta0_meam[b] * a2); if (latt == L12) { rho01 = 8 * rhoa01 + 4 * rhoa02; *t11av = (8 * t11 * rhoa01 + 4 * t12 * rhoa02) / rho01; @@ -680,7 +680,7 @@ void MEAM::get_tavref(double* t11av, double* t21av, double* t31av, double* t12av void MEAM::get_sijk(double C, int i, int j, int k, double* sijk) { double x; - x = (C - this->Cmin_meam[i][j][k]) / (this->Cmax_meam[i][j][k] - this->Cmin_meam[i][j][k]); + x = (C - Cmin_meam[i][j][k]) / (Cmax_meam[i][j][k] - Cmin_meam[i][j][k]); *sijk = fcut(x); } @@ -703,38 +703,38 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou // msmeam double rhoa1m1, rhoa2m1, rhoa3m1, rhoa1m2, rhoa2m2, rhoa3m2; - a1 = r / this->re_meam[a][a] - 1.0; - a2 = r / this->re_meam[b][b] - 1.0; + a1 = r / re_meam[a][a] - 1.0; + a2 = r / re_meam[b][b] - 1.0; - rhoa01 = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * a1); + rhoa01 = rho0_meam[a] * MathSpecial::fm_exp(-beta0_meam[a] * a1); - if (this->msmeamflag) { + if (msmeamflag) { // the rho variables are multiplied by t here since ialloy not needed in msmeam - rhoa11 = this->rho0_meam[a] * this->t1_meam[a] * MathSpecial::fm_exp(-this->beta1_meam[a] * a1); - rhoa21 = this->rho0_meam[a] * this->t2_meam[a] * MathSpecial::fm_exp(-this->beta2_meam[a] * a1); - rhoa31 = this->rho0_meam[a] * this->t3_meam[a] * MathSpecial::fm_exp(-this->beta3_meam[a] * a1); - rhoa02 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta0_meam[b] * a2); - rhoa12 = this->rho0_meam[b] * this->t1_meam[b] * MathSpecial::fm_exp(-this->beta1_meam[b] * a2); - rhoa22 = this->rho0_meam[b] * this->t2_meam[b] * MathSpecial::fm_exp(-this->beta2_meam[b] * a2); - rhoa32 = this->rho0_meam[b] * this->t3_meam[b] * MathSpecial::fm_exp(-this->beta3_meam[b] * a2); + rhoa11 = rho0_meam[a] * t1_meam[a] * MathSpecial::fm_exp(-beta1_meam[a] * a1); + rhoa21 = rho0_meam[a] * t2_meam[a] * MathSpecial::fm_exp(-beta2_meam[a] * a1); + rhoa31 = rho0_meam[a] * t3_meam[a] * MathSpecial::fm_exp(-beta3_meam[a] * a1); + rhoa02 = rho0_meam[b] * MathSpecial::fm_exp(-beta0_meam[b] * a2); + rhoa12 = rho0_meam[b] * t1_meam[b] * MathSpecial::fm_exp(-beta1_meam[b] * a2); + rhoa22 = rho0_meam[b] * t2_meam[b] * MathSpecial::fm_exp(-beta2_meam[b] * a2); + rhoa32 = rho0_meam[b] * t3_meam[b] * MathSpecial::fm_exp(-beta3_meam[b] * a2); // msmeam specific rho vars - rhoa1m1 = this->rho0_meam[a] * this->t1m_meam[a] * MathSpecial::fm_exp(-this->beta1m_meam[a] * a1); - rhoa2m1 = this->rho0_meam[a] * this->t2m_meam[a] * MathSpecial::fm_exp(-this->beta2m_meam[a] * a1); - rhoa3m1 = this->rho0_meam[a] * this->t3m_meam[a] * MathSpecial::fm_exp(-this->beta3m_meam[a] * a1); - rhoa1m2 = this->rho0_meam[b] * this->t1m_meam[b] * MathSpecial::fm_exp(-this->beta1m_meam[b] * a2); - rhoa2m2 = this->rho0_meam[b] * this->t2m_meam[b] * MathSpecial::fm_exp(-this->beta2m_meam[b] * a2); - rhoa3m2 = this->rho0_meam[b] * this->t3m_meam[b] * MathSpecial::fm_exp(-this->beta3m_meam[b] * a2); + rhoa1m1 = rho0_meam[a] * t1m_meam[a] * MathSpecial::fm_exp(-beta1m_meam[a] * a1); + rhoa2m1 = rho0_meam[a] * t2m_meam[a] * MathSpecial::fm_exp(-beta2m_meam[a] * a1); + rhoa3m1 = rho0_meam[a] * t3m_meam[a] * MathSpecial::fm_exp(-beta3m_meam[a] * a1); + rhoa1m2 = rho0_meam[b] * t1m_meam[b] * MathSpecial::fm_exp(-beta1m_meam[b] * a2); + rhoa2m2 = rho0_meam[b] * t2m_meam[b] * MathSpecial::fm_exp(-beta2m_meam[b] * a2); + rhoa3m2 = rho0_meam[b] * t3m_meam[b] * MathSpecial::fm_exp(-beta3m_meam[b] * a2); } else { - rhoa11 = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta1_meam[a] * a1); - rhoa21 = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta2_meam[a] * a1); - rhoa31 = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta3_meam[a] * a1); - rhoa02 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta0_meam[b] * a2); - rhoa12 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta1_meam[b] * a2); - rhoa22 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta2_meam[b] * a2); - rhoa32 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta3_meam[b] * a2); + rhoa11 = rho0_meam[a] * MathSpecial::fm_exp(-beta1_meam[a] * a1); + rhoa21 = rho0_meam[a] * MathSpecial::fm_exp(-beta2_meam[a] * a1); + rhoa31 = rho0_meam[a] * MathSpecial::fm_exp(-beta3_meam[a] * a1); + rhoa02 = rho0_meam[b] * MathSpecial::fm_exp(-beta0_meam[b] * a2); + rhoa12 = rho0_meam[b] * MathSpecial::fm_exp(-beta1_meam[b] * a2); + rhoa22 = rho0_meam[b] * MathSpecial::fm_exp(-beta2_meam[b] * a2); + rhoa32 = rho0_meam[b] * MathSpecial::fm_exp(-beta3_meam[b] * a2); } - lat = this->lattce_meam[a][b]; + lat = lattce_meam[a][b]; Zij = get_Zij(lat); @@ -744,7 +744,7 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou *rho12 = 0.0; *rho22 = 0.0; *rho32 = 0.0; - if (this->msmeamflag) { + if (msmeamflag) { *rho1m1 = 0.0; *rho2m1 = 0.0; *rho3m1 = 0.0; @@ -774,7 +774,7 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou *rho02 = 4.0 * rhoa01; *rho31 = 32.0 / 9.0 * rhoa32 * rhoa32; *rho32 = 32.0 / 9.0 * rhoa31 * rhoa31; - if (this->msmeamflag) { + if (msmeamflag) { *rho3m1 = 32.0 / 9.0 * rhoa3m2 * rhoa3m2; *rho3m2 = 32.0 / 9.0 * rhoa3m1 * rhoa3m1; } @@ -784,7 +784,7 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou *rho02 = 12 * rhoa01; *rho31 = 1.0 / 3.0 * rhoa32 * rhoa32; *rho32 = 1.0 / 3.0 * rhoa31 * rhoa31; - if (this->msmeamflag) { + if (msmeamflag) { *rho3m1 = 1.0 / 3.0 * rhoa3m2 * rhoa3m2; *rho3m2 = 1.0 / 3.0 * rhoa3m1 * rhoa3m1; } @@ -799,7 +799,7 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou *rho22 = s[1] * rhoa21 * rhoa21; *rho31 = s[2] * rhoa32 * rhoa32; *rho32 = s[2] * rhoa31 * rhoa31; - if (this->msmeamflag) { + if (msmeamflag) { *rho1m1 = s[0] * rhoa1m2 * rhoa1m2; *rho1m2 = s[0] * rhoa1m1 * rhoa1m1; *rho2m1 = s[1] * rhoa2m2 * rhoa2m2; @@ -817,7 +817,7 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou *rho22 = rhoa22; *rho31 = rhoa31; *rho32 = rhoa32; - if (this->msmeamflag) { + if (msmeamflag) { *rho1m1 = rhoa1m1; *rho1m2 = rhoa1m2; *rho2m1 = rhoa2m1; @@ -829,14 +829,14 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou case L12: *rho01 = 8 * rhoa01 + 4 * rhoa02; *rho02 = 12 * rhoa01; - if (this->ialloy ==1){ - *rho21 = 8. / 3. * MathSpecial::square(rhoa21 * this->t2_meam[a] - rhoa22 * this->t2_meam[b]); - denom = 8 * rhoa01 * MathSpecial::square(this->t2_meam[a]) + 4 * rhoa02 * MathSpecial::square(this->t2_meam[b]); + if (ialloy ==1){ + *rho21 = 8. / 3. * MathSpecial::square(rhoa21 * t2_meam[a] - rhoa22 * t2_meam[b]); + denom = 8 * rhoa01 * MathSpecial::square(t2_meam[a]) + 4 * rhoa02 * MathSpecial::square(t2_meam[b]); if (denom > 0.) *rho21 = *rho21 / denom * *rho01; } else *rho21 = 8. / 3. * (rhoa21 - rhoa22) * (rhoa21 - rhoa22); - if (this->msmeamflag) { + if (msmeamflag) { *rho2m1 = 8. / 3. * (rhoa2m1 - rhoa2m2) * (rhoa2m1 - rhoa2m2); } break; @@ -862,7 +862,7 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou *rho01 = rhoa02*Zij; *rho02 = rhoa01*Zij; - get_shpfcn(LIN, this->stheta_meam[a][b], this->ctheta_meam[a][b], s); + get_shpfcn(LIN, stheta_meam[a][b], ctheta_meam[a][b], s); *rho12 = s[0] * rhoa11 * rhoa11; *rho22 = s[1] * rhoa21 * rhoa21; *rho32 = s[2] * rhoa31 * rhoa31; @@ -874,7 +874,7 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou *rho01 = rhoa02*Zij; *rho02 = rhoa01*Zij; - get_shpfcn(ZIG, this->stheta_meam[a][b], this->ctheta_meam[a][b], s); + get_shpfcn(ZIG, stheta_meam[a][b], ctheta_meam[a][b], s); *rho12 = s[0] * rhoa11 * rhoa11; *rho22 = s[1] * rhoa21 * rhoa21; *rho32 = s[2] * rhoa31 * rhoa31; @@ -886,7 +886,7 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou *rho01 = rhoa02; *rho02 = rhoa01*Zij; - get_shpfcn(TRI, this->stheta_meam[a][b], this->ctheta_meam[a][b], s); + get_shpfcn(TRI, stheta_meam[a][b], ctheta_meam[a][b], s); *rho12 = s[0] * rhoa11 * rhoa11; *rho22 = s[1] * rhoa21 * rhoa21; *rho32 = s[2] * rhoa31 * rhoa31; @@ -904,17 +904,17 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou // call error('Lattice not defined in get_densref.') } - if (this->nn2_meam[a][b] == 1) { + if (nn2_meam[a][b] == 1) { - Zij2nn = get_Zij2(lat, this->Cmin_meam[a][a][b], this->Cmax_meam[a][a][b], - this->stheta_meam[a][b], arat, scrn); + Zij2nn = get_Zij2(lat, Cmin_meam[a][a][b], Cmax_meam[a][a][b], + stheta_meam[a][b], arat, scrn); - a1 = arat * r / this->re_meam[a][a] - 1.0; - a2 = arat * r / this->re_meam[b][b] - 1.0; + a1 = arat * r / re_meam[a][a] - 1.0; + a2 = arat * r / re_meam[b][b] - 1.0; - rhoa01nn = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * a1); - rhoa02nn = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta0_meam[b] * a2); + rhoa01nn = rho0_meam[a] * MathSpecial::fm_exp(-beta0_meam[a] * a1); + rhoa02nn = rho0_meam[b] * MathSpecial::fm_exp(-beta0_meam[b] * a2); if (lat == L12) { // As usual, L12 thinks it's special; we need to be careful computing @@ -935,8 +935,8 @@ void MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, dou *rho01 = *rho01 + Zij2nn * scrn * rhoa01nn; // Assume Zij2nn and arat don't depend on order, but scrn might - Zij2nn = get_Zij2(lat, this->Cmin_meam[b][b][a], this->Cmax_meam[b][b][a], - this->stheta_meam[a][b], arat, scrn); + Zij2nn = get_Zij2(lat, Cmin_meam[b][b][a], Cmax_meam[b][b][a], + stheta_meam[a][b], arat, scrn); *rho02 = *rho02 + Zij2nn * scrn * rhoa02nn; } } @@ -950,38 +950,38 @@ void MEAM::interpolate_meam(int ind) // map to coefficient space - this->nrar = this->nr; - drar = this->dr; - this->rdrar = 1.0 / drar; + nrar = nr; + drar = dr; + rdrar = 1.0 / drar; // phir interp - for (j = 0; j < this->nrar; j++) { - this->phirar[ind][j] = this->phir[ind][j]; + for (j = 0; j < nrar; j++) { + phirar[ind][j] = phir[ind][j]; } - this->phirar1[ind][0] = this->phirar[ind][1] - this->phirar[ind][0]; - this->phirar1[ind][1] = 0.5 * (this->phirar[ind][2] - this->phirar[ind][0]); - this->phirar1[ind][this->nrar - 2] = - 0.5 * (this->phirar[ind][this->nrar - 1] - this->phirar[ind][this->nrar - 3]); - this->phirar1[ind][this->nrar - 1] = 0.0; - for (j = 2; j < this->nrar - 2; j++) { - this->phirar1[ind][j] = ((this->phirar[ind][j - 2] - this->phirar[ind][j + 2]) + - 8.0 * (this->phirar[ind][j + 1] - this->phirar[ind][j - 1])) / + phirar1[ind][0] = phirar[ind][1] - phirar[ind][0]; + phirar1[ind][1] = 0.5 * (phirar[ind][2] - phirar[ind][0]); + phirar1[ind][nrar - 2] = + 0.5 * (phirar[ind][nrar - 1] - phirar[ind][nrar - 3]); + phirar1[ind][nrar - 1] = 0.0; + for (j = 2; j < nrar - 2; j++) { + phirar1[ind][j] = ((phirar[ind][j - 2] - phirar[ind][j + 2]) + + 8.0 * (phirar[ind][j + 1] - phirar[ind][j - 1])) / 12.; } - for (j = 0; j < this->nrar - 1; j++) { - this->phirar2[ind][j] = 3.0 * (this->phirar[ind][j + 1] - this->phirar[ind][j]) - - 2.0 * this->phirar1[ind][j] - this->phirar1[ind][j + 1]; - this->phirar3[ind][j] = this->phirar1[ind][j] + this->phirar1[ind][j + 1] - - 2.0 * (this->phirar[ind][j + 1] - this->phirar[ind][j]); + for (j = 0; j < nrar - 1; j++) { + phirar2[ind][j] = 3.0 * (phirar[ind][j + 1] - phirar[ind][j]) - + 2.0 * phirar1[ind][j] - phirar1[ind][j + 1]; + phirar3[ind][j] = phirar1[ind][j] + phirar1[ind][j + 1] - + 2.0 * (phirar[ind][j + 1] - phirar[ind][j]); } - this->phirar2[ind][this->nrar - 1] = 0.0; - this->phirar3[ind][this->nrar - 1] = 0.0; + phirar2[ind][nrar - 1] = 0.0; + phirar3[ind][nrar - 1] = 0.0; - for (j = 0; j < this->nrar; j++) { - this->phirar4[ind][j] = this->phirar1[ind][j] / drar; - this->phirar5[ind][j] = 2.0 * this->phirar2[ind][j] / drar; - this->phirar6[ind][j] = 3.0 * this->phirar3[ind][j] / drar; + for (j = 0; j < nrar; j++) { + phirar4[ind][j] = phirar1[ind][j] / drar; + phirar5[ind][j] = 2.0 * phirar2[ind][j] / drar; + phirar6[ind][j] = 3.0 * phirar3[ind][j] / drar; } } diff --git a/src/MEAM/meam_setup_global.cpp b/src/MEAM/meam_setup_global.cpp index 5d35242e7c..299fc4da61 100644 --- a/src/MEAM/meam_setup_global.cpp +++ b/src/MEAM/meam_setup_global.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -18,68 +17,66 @@ using namespace LAMMPS_NS; template -static inline void setall2d(TYPE (&arr)[maxi][maxj], const TYPE v) { +static inline void setall2d(TYPE (&arr)[maxi][maxj], const TYPE v) +{ for (int i = 0; i < maxi; i++) - for (int j = 0; j < maxj; j++) - arr[i][j] = v; + for (int j = 0; j < maxj; j++) arr[i][j] = v; } template -static inline void setall3d(TYPE (&arr)[maxi][maxj][maxk], const TYPE v) { +static inline void setall3d(TYPE (&arr)[maxi][maxj][maxk], const TYPE v) +{ for (int i = 0; i < maxi; i++) for (int j = 0; j < maxj; j++) - for (int k = 0; k < maxk; k++) - arr[i][j][k] = v; + for (int k = 0; k < maxk; k++) arr[i][j][k] = v; } -void -MEAM::meam_setup_global(int nelt, lattice_t* lat, int* ielement, double* /*atwt*/, double* alpha, - double* b0, double* b1, double* b2, double* b3, double* alat, double* esub, - double* asub, double* t0, double* t1, double* t2, double* t3, double* rozero, - int* ibar, double* b1m, double *b2m, double *b3m, double *t1m, double *t2m, - double *t3m) +void MEAM::meam_setup_global(int nelt, lattice_t *lat, int *ielement, double * /*atwt*/, + double *alpha, double *b0, double *b1, double *b2, double *b3, + double *alat, double *esub, double *asub, double *t0, double *t1, + double *t2, double *t3, double *rozero, int *ibar, double *b1m, + double *b2m, double *b3m, double *t1m, double *t2m, double *t3m) { - int i; double tmplat[maxelt]; - this->neltypes = nelt; + neltypes = nelt; for (i = 0; i < nelt; i++) { - this->lattce_meam[i][i] = lat[i]; + lattce_meam[i][i] = lat[i]; - this->ielt_meam[i] = ielement[i]; - this->alpha_meam[i][i] = alpha[i]; - this->beta0_meam[i] = b0[i]; - this->beta1_meam[i] = b1[i]; - this->beta2_meam[i] = b2[i]; - this->beta3_meam[i] = b3[i]; - if (this->msmeamflag){ - this->beta1m_meam[i] = b1m[i]; - this->beta2m_meam[i] = b2m[i]; - this->beta3m_meam[i] = b3m[i]; + ielt_meam[i] = ielement[i]; + alpha_meam[i][i] = alpha[i]; + beta0_meam[i] = b0[i]; + beta1_meam[i] = b1[i]; + beta2_meam[i] = b2[i]; + beta3_meam[i] = b3[i]; + if (msmeamflag) { + beta1m_meam[i] = b1m[i]; + beta2m_meam[i] = b2m[i]; + beta3m_meam[i] = b3m[i]; } tmplat[i] = alat[i]; - this->Ec_meam[i][i] = esub[i]; - this->A_meam[i] = asub[i]; - this->t0_meam[i] = t0[i]; - this->t1_meam[i] = t1[i]; - this->t2_meam[i] = t2[i]; - this->t3_meam[i] = t3[i]; - if (this->msmeamflag){ - this->t1m_meam[i] = t1m[i]; - this->t2m_meam[i] = t2m[i]; - this->t3m_meam[i] = t3m[i]; + Ec_meam[i][i] = esub[i]; + A_meam[i] = asub[i]; + t0_meam[i] = t0[i]; + t1_meam[i] = t1[i]; + t2_meam[i] = t2[i]; + t3_meam[i] = t3[i]; + if (msmeamflag) { + t1m_meam[i] = t1m[i]; + t2m_meam[i] = t2m[i]; + t3m_meam[i] = t3m[i]; } - this->rho0_meam[i] = rozero[i]; - this->ibar_meam[i] = ibar[i]; + rho0_meam[i] = rozero[i]; + ibar_meam[i] = ibar[i]; - switch(this->lattce_meam[i][i]) { + switch (lattce_meam[i][i]) { case FCC: - this->re_meam[i][i] = tmplat[i] / sqrt(2.0); + re_meam[i][i] = tmplat[i] / sqrt(2.0); break; case BCC: - this->re_meam[i][i] = tmplat[i] * sqrt(3.0) / 2.0; + re_meam[i][i] = tmplat[i] * sqrt(3.0) / 2.0; break; case HCP: case DIM: @@ -88,11 +85,11 @@ MEAM::meam_setup_global(int nelt, lattice_t* lat, int* ielement, double* /*atwt* case ZIG: case TRI: case SC: - this->re_meam[i][i] = tmplat[i]; + re_meam[i][i] = tmplat[i]; break; case DIA: case DIA3: - this->re_meam[i][i] = tmplat[i] * sqrt(3.0) / 4.0; + re_meam[i][i] = tmplat[i] * sqrt(3.0) / 4.0; break; case B1: case B2: @@ -100,31 +97,30 @@ MEAM::meam_setup_global(int nelt, lattice_t* lat, int* ielement, double* /*atwt* case L12: // do nothing break; - default: - ; - // error + default:; + // error } } // Set some defaults - this->rc_meam = 4.0; - this->delr_meam = 0.1; - setall2d(this->attrac_meam, 0.0); - setall2d(this->repuls_meam, 0.0); - setall3d(this->Cmax_meam, 2.8); - setall3d(this->Cmin_meam, 2.0); - setall2d(this->ebound_meam, (2.8*2.8) / (4.0 * (2.8 - 1.0))); - setall2d(this->delta_meam, 0.0); - setall2d(this->nn2_meam, 0); - setall2d(this->zbl_meam, 1); - this->gsmooth_factor = 99.0; - this->augt1 = 1; - this->ialloy = 0; - this->mix_ref_t = 0; - this->emb_lin_neg = 0; - this->bkgd_dyn = 0; - this->erose_form = 0; + rc_meam = 4.0; + delr_meam = 0.1; + setall2d(attrac_meam, 0.0); + setall2d(repuls_meam, 0.0); + setall3d(Cmax_meam, 2.8); + setall3d(Cmin_meam, 2.0); + setall2d(ebound_meam, (2.8 * 2.8) / (4.0 * (2.8 - 1.0))); + setall2d(delta_meam, 0.0); + setall2d(nn2_meam, 0); + setall2d(zbl_meam, 1); + gsmooth_factor = 99.0; + augt1 = 1; + ialloy = 0; + mix_ref_t = 0; + emb_lin_neg = 0; + bkgd_dyn = 0; + erose_form = 0; // for trimer, zigzag, line refernece structure, sungkwang - setall2d(this->stheta_meam, 1.0); // stheta = sin(theta/2*pi/180) where theta is 180, so 1.0 - setall2d(this->ctheta_meam, 0.0); // stheta = cos(theta/2*pi/180) where theta is 180, so 0 + setall2d(stheta_meam, 1.0); // stheta = sin(theta/2*pi/180) where theta is 180, so 1.0 + setall2d(ctheta_meam, 0.0); // stheta = cos(theta/2*pi/180) where theta is 180, so 0 } diff --git a/src/MEAM/meam_setup_param.cpp b/src/MEAM/meam_setup_param.cpp index 32634004c2..45c8d0ab78 100644 --- a/src/MEAM/meam_setup_param.cpp +++ b/src/MEAM/meam_setup_param.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -23,8 +22,8 @@ using namespace LAMMPS_NS; using MathConst::MY_PI; // do a sanity check on index parameters -void -MEAM::meam_checkindex(int num, int lim, int nidx, int* idx /*idx(3)*/, int* ierr) + +void MEAM::meam_checkindex(int num, int lim, int nidx, int *idx /*idx(3)*/, int *ierr) { //: idx[0..2] *ierr = 0; @@ -74,8 +73,8 @@ MEAM::meam_checkindex(int num, int lim, int nidx, int* idx /*idx(3)*/, int* ierr // 2 = not enough indices given // 3 = an element index is out of range -void -MEAM::meam_setup_param(int which, double value, int nindex, int* index /*index(3)*/, int* errorflag) +void MEAM::meam_setup_param(int which, double value, int nindex, int *index /*index(3)*/, + int *errorflag) { //: index[0..2] int i1, i2; @@ -86,161 +85,148 @@ MEAM::meam_setup_param(int which, double value, int nindex, int* index /*index(3 // 0 = Ec_meam case 0: meam_checkindex(2, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; - this->Ec_meam[index[0]][index[1]] = value; + if (*errorflag != 0) return; + Ec_meam[index[0]][index[1]] = value; break; // 1 = alpha_meam case 1: meam_checkindex(2, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; - this->alpha_meam[index[0]][index[1]] = value; + if (*errorflag != 0) return; + alpha_meam[index[0]][index[1]] = value; break; // 2 = rho0_meam case 2: meam_checkindex(1, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; - this->rho0_meam[index[0]] = value; + if (*errorflag != 0) return; + rho0_meam[index[0]] = value; break; // 3 = delta_meam case 3: meam_checkindex(2, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; - this->delta_meam[index[0]][index[1]] = value; + if (*errorflag != 0) return; + delta_meam[index[0]][index[1]] = value; break; // 4 = lattce_meam case 4: meam_checkindex(2, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; - vlat = (lattice_t)value; + if (*errorflag != 0) return; + vlat = (lattice_t) value; - this->lattce_meam[index[0]][index[1]] = vlat; + lattce_meam[index[0]][index[1]] = vlat; break; // 5 = attrac_meam case 5: meam_checkindex(2, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; - this->attrac_meam[index[0]][index[1]] = value; + if (*errorflag != 0) return; + attrac_meam[index[0]][index[1]] = value; break; // 6 = repuls_meam case 6: meam_checkindex(2, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; - this->repuls_meam[index[0]][index[1]] = value; + if (*errorflag != 0) return; + repuls_meam[index[0]][index[1]] = value; break; // 7 = nn2_meam case 7: meam_checkindex(2, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; + if (*errorflag != 0) return; i1 = std::min(index[0], index[1]); i2 = std::max(index[0], index[1]); - this->nn2_meam[i1][i2] = (int)value; + nn2_meam[i1][i2] = (int) value; break; // 8 = Cmin_meam case 8: meam_checkindex(3, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; - this->Cmin_meam[index[0]][index[1]][index[2]] = value; + if (*errorflag != 0) return; + Cmin_meam[index[0]][index[1]][index[2]] = value; break; // 9 = Cmax_meam case 9: meam_checkindex(3, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; - this->Cmax_meam[index[0]][index[1]][index[2]] = value; + if (*errorflag != 0) return; + Cmax_meam[index[0]][index[1]][index[2]] = value; break; // 10 = rc_meam case 10: - this->rc_meam = value; + rc_meam = value; break; // 11 = delr_meam case 11: - this->delr_meam = value; + delr_meam = value; break; // 12 = augt1 case 12: - this->augt1 = (int)value; + augt1 = (int) value; break; // 13 = gsmooth case 13: - this->gsmooth_factor = value; + gsmooth_factor = value; break; // 14 = re_meam case 14: meam_checkindex(2, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; - this->re_meam[index[0]][index[1]] = value; + if (*errorflag != 0) return; + re_meam[index[0]][index[1]] = value; break; // 15 = ialloy case 15: - this->ialloy = (int)value; + ialloy = (int) value; break; // 16 = mixture_ref_t case 16: - this->mix_ref_t = (int)value; + mix_ref_t = (int) value; break; // 17 = erose_form case 17: - this->erose_form = (int)value; + erose_form = (int) value; break; // 18 = zbl_meam case 18: meam_checkindex(2, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; + if (*errorflag != 0) return; i1 = std::min(index[0], index[1]); i2 = std::max(index[0], index[1]); - this->zbl_meam[i1][i2] = (int)value; + zbl_meam[i1][i2] = (int) value; break; // 19 = emb_lin_neg case 19: - this->emb_lin_neg = (int)value; + emb_lin_neg = (int) value; break; // 20 = bkgd_dyn case 20: - this->bkgd_dyn = (int)value; + bkgd_dyn = (int) value; break; // 21 = theta // see alloyparams(void) in meam_setup_done.cpp case 21: meam_checkindex(2, neltypes, nindex, index, errorflag); - if (*errorflag != 0) - return; + if (*errorflag != 0) return; i1 = std::min(index[0], index[1]); i2 = std::max(index[0], index[1]); // we don't use theta, instead stheta and ctheta - this->stheta_meam[i1][i2] = sin(value/2*MY_PI/180.0); - this->ctheta_meam[i1][i2] = cos(value/2*MY_PI/180.0); + stheta_meam[i1][i2] = sin(value / 2 * MY_PI / 180.0); + ctheta_meam[i1][i2] = cos(value / 2 * MY_PI / 180.0); break; default: diff --git a/src/MEAM/pair_meam.cpp b/src/MEAM/pair_meam.cpp index c4a4cfa1d7..2f095754af 100644 --- a/src/MEAM/pair_meam.cpp +++ b/src/MEAM/pair_meam.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -39,11 +38,10 @@ using namespace LAMMPS_NS; static const int nkeywords = 22; static const char *keywords[] = { - "Ec","alpha","rho0","delta","lattce", - "attrac","repuls","nn2","Cmin","Cmax","rc","delr", - "augt1","gsmooth_factor","re","ialloy", - "mixture_ref_t","erose_form","zbl", - "emb_lin_neg","bkgd_dyn", "theta"}; + "Ec", "alpha", "rho0", "delta", "lattce", "attrac", "repuls", + "nn2", "Cmin", "Cmax", "rc", "delr", "augt1", "gsmooth_factor", + "re", "ialloy", "mixture_ref_t", "erose_form", "zbl", "emb_lin_neg", "bkgd_dyn", + "theta"}; /* ---------------------------------------------------------------------- */ @@ -75,8 +73,7 @@ PairMEAM::~PairMEAM() { if (copymode) return; - if (meam_inst) - delete meam_inst; + if (meam_inst) delete meam_inst; if (allocated) { memory->destroy(setflag); @@ -89,10 +86,10 @@ PairMEAM::~PairMEAM() void PairMEAM::compute(int eflag, int vflag) { - int i,ii,n,inum_half,errorflag; - int *ilist_half,*numneigh_half,**firstneigh_half; - int *numneigh_full,**firstneigh_full; - ev_init(eflag,vflag); + int i, ii, n, inum_half, errorflag; + int *ilist_half, *numneigh_half, **firstneigh_half; + int *numneigh_full, **firstneigh_full; + ev_init(eflag, vflag); // neighbor list info @@ -107,8 +104,8 @@ void PairMEAM::compute(int eflag, int vflag) // necessary before doing neigh_f2c and neigh_c2f conversions each step if (neighbor->ago == 0) { - neigh_strip(inum_half,ilist_half,numneigh_half,firstneigh_half); - neigh_strip(inum_half,ilist_half,numneigh_full,firstneigh_full); + neigh_strip(inum_half, ilist_half, numneigh_half, firstneigh_half); + neigh_strip(inum_half, ilist_half, numneigh_full, firstneigh_full); } // check size of scrfcn based on half neighbor list @@ -133,17 +130,14 @@ void PairMEAM::compute(int eflag, int vflag) errorflag = 0; for (ii = 0; ii < inum_half; ii++) { i = ilist_half[ii]; - meam_inst->meam_dens_init(i,ntype,type,map,x, - numneigh_half[i],firstneigh_half[i], - numneigh_full[i],firstneigh_full[i], - offset); + meam_inst->meam_dens_init(i, ntype, type, map, x, numneigh_half[i], firstneigh_half[i], + numneigh_full[i], firstneigh_full[i], offset); offset += numneigh_half[i]; } comm->reverse_comm(this); - meam_inst->meam_dens_final(nlocal,eflag_either,eflag_global,eflag_atom, - &eng_vdwl,eatom,ntype,type,map,scale,errorflag); - if (errorflag) - error->one(FLERR,"MEAM library error {}",errorflag); + meam_inst->meam_dens_final(nlocal, eflag_either, eflag_global, eflag_atom, &eng_vdwl, eatom, + ntype, type, map, scale, errorflag); + if (errorflag) error->one(FLERR, "MEAM library error {}", errorflag); comm->forward_comm(this); @@ -156,11 +150,9 @@ void PairMEAM::compute(int eflag, int vflag) if (vflag_atom) vptr = vatom; for (ii = 0; ii < inum_half; ii++) { i = ilist_half[ii]; - meam_inst->meam_force(i,eflag_global,eflag_atom,vflag_global, - vflag_atom,&eng_vdwl,eatom,ntype,type,map,scale,x, - numneigh_half[i],firstneigh_half[i], - numneigh_full[i],firstneigh_full[i], - offset,f,vptr,virial); + meam_inst->meam_force(i, eflag_global, eflag_atom, vflag_global, vflag_atom, &eng_vdwl, eatom, + ntype, type, map, scale, x, numneigh_half[i], firstneigh_half[i], + numneigh_full[i], firstneigh_full[i], offset, f, vptr, virial); offset += numneigh_half[i]; } if (vflag_fdotr) virial_fdotr_compute(); @@ -171,13 +163,13 @@ void PairMEAM::compute(int eflag, int vflag) void PairMEAM::allocate() { allocated = 1; - int n = atom->ntypes; + int np1 = atom->ntypes + 1; - memory->create(setflag,n+1,n+1,"pair:setflag"); - memory->create(cutsq,n+1,n+1,"pair:cutsq"); - memory->create(scale,n+1,n+1,"pair:scale"); + memory->create(setflag, np1, np1, "pair:setflag"); + memory->create(cutsq, np1, np1, "pair:cutsq"); + memory->create(scale, np1, np1, "pair:scale"); - map = new int[n+1]; + map = new int[np1]; } /* ---------------------------------------------------------------------- @@ -186,13 +178,13 @@ void PairMEAM::allocate() void PairMEAM::settings(int narg, char ** /*arg*/) { - if (narg != 0) error->all(FLERR,"Illegal pair_style {} command", myname); + if (narg != 0) error->all(FLERR, "Illegal pair_style {} command", myname); // set comm size needed by this Pair if (msmeamflag) { - comm_forward = 38+23; // plus 23 for msmeam - comm_reverse = 30+23; // plus 23 for msmeam + comm_forward = 38 + 23; // plus 23 for msmeam + comm_reverse = 30 + 23; // plus 23 for msmeam } else { comm_forward = 38; comm_reverse = 30; @@ -205,39 +197,38 @@ void PairMEAM::settings(int narg, char ** /*arg*/) void PairMEAM::coeff(int narg, char **arg) { - int m,n; + int m, n; if (!allocated) allocate(); - if (narg < 6) error->all(FLERR,"Incorrect args for pair style {} coefficients", myname); + if (narg < 6) error->all(FLERR, "Incorrect args for pair style {} coefficients", myname); // check for presence of first meam file std::string lib_file = utils::get_potential_file_path(arg[2]); - if (lib_file.empty()) - error->all(FLERR,"Cannot open MEAM library file {}",lib_file); + if (lib_file.empty()) error->all(FLERR, "Cannot open MEAM library file {}", lib_file); // find meam parameter file in arguments: // first word that is a file or "NULL" after the MEAM library file // we need to extract at least one element, so start from index 4 - int paridx=-1; + int paridx = -1; std::string par_file; for (int i = 4; i < narg; ++i) { - if (strcmp(arg[i],"NULL") == 0) { + if (strcmp(arg[i], "NULL") == 0) { par_file = "NULL"; paridx = i; break; } par_file = utils::get_potential_file_path(arg[i]); if (!par_file.empty()) { - paridx=i; + paridx = i; break; } } - if (paridx < 0) error->all(FLERR,"No MEAM parameter file in pair coefficients"); + if (paridx < 0) error->all(FLERR, "No MEAM parameter file in pair coefficients"); if ((narg - paridx - 1) != atom->ntypes) - error->all(FLERR,"Incorrect args for pair style {} coefficients", myname); + error->all(FLERR, "Incorrect args for pair style {} coefficients", myname); // MEAM element names between 2 filenames // nlibelements = # of MEAM elements @@ -249,17 +240,21 @@ void PairMEAM::coeff(int narg, char **arg) } nlibelements = paridx - 3; - if (nlibelements < 1) error->all(FLERR,"Incorrect args for pair coefficients"); + if (nlibelements < 1) error->all(FLERR, "Incorrect args for pair coefficients"); if (nlibelements > maxelt) - error->all(FLERR,"Too many elements extracted from MEAM library (current limit: {}). " - "Increase 'maxelt' in meam.h and recompile.", maxelt); + error->all(FLERR, + "Too many elements extracted from MEAM library (current limit: {}). " + "Increase 'maxelt' in meam.h and recompile.", + maxelt); for (int i = 0; i < nlibelements; i++) { - if (std::any_of(libelements.begin(), libelements.end(), - [&](const std::string &elem) { return elem == arg[i+3]; })) - error->all(FLERR,"Must not extract the same element ({}) from MEAM library twice. ", arg[i+3]); + if (std::any_of(libelements.begin(), libelements.end(), [&](const std::string &elem) { + return elem == arg[i + 3]; + })) + error->all(FLERR, "Must not extract the same element ({}) from MEAM library twice. ", + arg[i + 3]); - libelements.emplace_back(arg[i+3]); + libelements.emplace_back(arg[i + 3]); mass.push_back(0.0); } @@ -267,28 +262,30 @@ void PairMEAM::coeff(int narg, char **arg) // pass all parameters to MEAM package // tell MEAM package that setup is done - read_files(lib_file,par_file); + read_files(lib_file, par_file); meam_inst->meam_setup_done(&cutmax); // read args that map atom types to MEAM elements // map[i] = which element the Ith atom type is, -1 if not mapped for (int i = 4 + nlibelements; i < narg; i++) { - m = i - (4+nlibelements) + 1; + m = i - (4 + nlibelements) + 1; int j; for (j = 0; j < nlibelements; j++) if (libelements[j] == arg[i]) break; - if (j < nlibelements) map[m] = j; - else if (strcmp(arg[i],"NULL") == 0) map[m] = -1; - else error->all(FLERR,"Incorrect args for pair style {} coefficients", myname); + if (j < nlibelements) + map[m] = j; + else if (strcmp(arg[i], "NULL") == 0) + map[m] = -1; + else + error->all(FLERR, "Incorrect args for pair style {} coefficients", myname); } // clear setflag since coeff() called once with I,J = * * n = atom->ntypes; for (int i = 1; i <= n; i++) - for (int j = i; j <= n; j++) - setflag[i][j] = 0; + for (int j = i; j <= n; j++) setflag[i][j] = 0; // set setflag i,j for type pairs where both are mapped to elements // set mass for i,i in atom class @@ -298,14 +295,14 @@ void PairMEAM::coeff(int narg, char **arg) for (int j = i; j <= n; j++) { if (map[i] >= 0 && map[j] >= 0) { setflag[i][j] = 1; - if (i == j) atom->set_mass(FLERR,i,mass[map[i]]); + if (i == j) atom->set_mass(FLERR, i, mass[map[i]]); count++; } scale[i][j] = 1.0; } } - if (count == 0) error->all(FLERR,"Incorrect args for pair style {} coefficients", myname); + if (count == 0) error->all(FLERR, "Incorrect args for pair style {} coefficients", myname); } /* ---------------------------------------------------------------------- @@ -314,8 +311,7 @@ void PairMEAM::coeff(int narg, char **arg) void PairMEAM::init_style() { - if (force->newton_pair == 0) - error->all(FLERR,"Pair style {} requires newton pair on", myname); + if (force->newton_pair == 0) error->all(FLERR, "Pair style {} requires newton pair on", myname); // need a full and a half neighbor list @@ -330,8 +326,10 @@ void PairMEAM::init_style() void PairMEAM::init_list(int id, NeighList *ptr) { - if (id == 1) listfull = ptr; - else if (id == 2) listhalf = ptr; + if (id == 1) + listfull = ptr; + else if (id == 2) + listhalf = ptr; } /* ---------------------------------------------------------------------- @@ -347,8 +345,7 @@ double PairMEAM::init_one(int i, int j) /* ---------------------------------------------------------------------- */ -void PairMEAM::read_files(const std::string &globalfile, - const std::string &userfile) +void PairMEAM::read_files(const std::string &globalfile, const std::string &userfile) { read_global_meam_file(globalfile); read_user_meam_file(userfile); @@ -394,7 +391,7 @@ void PairMEAM::read_global_meam_file(const std::string &globalfile) if (comm->me == 0) { PotentialFileReader reader(lmp, globalfile, "MEAM", " library"); - char * line; + char *line; constexpr int params_per_line = 19; int nset = 0; @@ -425,7 +422,7 @@ void PairMEAM::read_global_meam_file(const std::string &globalfile) std::string lattice_type = values.next_string(); if (!MEAM::str_to_lat(lattice_type, true, lat[index])) - error->one(FLERR,"Unrecognized lattice type in MEAM library file: {}", lattice_type); + error->one(FLERR, "Unrecognized lattice type in MEAM library file: {}", lattice_type); // store parameters @@ -458,11 +455,11 @@ void PairMEAM::read_global_meam_file(const std::string &globalfile) ibar[index] = values.next_int(); if (!isone(t0[index])) - error->one(FLERR,"Unsupported parameter in MEAM library file: t0 != 1"); + error->one(FLERR, "Unsupported parameter in MEAM library file: t0 != 1"); // z given is ignored: if this is mismatched, we definitely won't do what the user said -> fatal error if (z[index] != MEAM::get_Zij(lat[index])) - error->one(FLERR,"Mismatched parameter in MEAM library file: z != lat"); + error->one(FLERR, "Mismatched parameter in MEAM library file: z != lat"); nset++; } catch (TokenizerException &e) { @@ -479,7 +476,7 @@ void PairMEAM::read_global_meam_file(const std::string &globalfile) msg += " "; msg += libelements[i]; } - error->one(FLERR,msg); + error->one(FLERR, msg); } } @@ -514,16 +511,16 @@ void PairMEAM::read_global_meam_file(const std::string &globalfile) if (msmeamflag) { meam_inst->meam_setup_global(nlibelements, lat.data(), ielement.data(), atwt.data(), - alpha.data(), b0.data(), b1.data(), b2.data(), b3.data(), - alat.data(), esub.data(), asub.data(), t0.data(), t1.data(), - t2.data(), t3.data(), rozero.data(), ibar.data(), b1m.data(), - b2m.data(), b3m.data(), t1m.data(), t2m.data(), t3m.data()); + alpha.data(), b0.data(), b1.data(), b2.data(), b3.data(), + alat.data(), esub.data(), asub.data(), t0.data(), t1.data(), + t2.data(), t3.data(), rozero.data(), ibar.data(), b1m.data(), + b2m.data(), b3m.data(), t1m.data(), t2m.data(), t3m.data()); } else { meam_inst->meam_setup_global(nlibelements, lat.data(), ielement.data(), atwt.data(), - alpha.data(), b0.data(), b1.data(), b2.data(), b3.data(), - alat.data(), esub.data(), asub.data(), t0.data(), t1.data(), - t2.data(), t3.data(), rozero.data(), ibar.data(), nullptr, - nullptr, nullptr, nullptr, nullptr, nullptr); + alpha.data(), b0.data(), b1.data(), b2.data(), b3.data(), + alat.data(), esub.data(), asub.data(), t0.data(), t1.data(), + t2.data(), t3.data(), rozero.data(), ibar.data(), nullptr, nullptr, + nullptr, nullptr, nullptr, nullptr); } // set element masses @@ -543,14 +540,12 @@ void PairMEAM::read_user_meam_file(const std::string &userfile) std::shared_ptr reader; - if (comm->me == 0) { - reader = std::make_shared(lmp, userfile, "MEAM"); - } + if (comm->me == 0) { reader = std::make_shared(lmp, userfile, "MEAM"); } // read settings // pass them one at a time to MEAM package // match strings to list of corresponding ints - char * line = nullptr; + char *line = nullptr; char buffer[MAXLINE]; while (true) { @@ -562,14 +557,15 @@ void PairMEAM::read_user_meam_file(const std::string &userfile) line = reader->next_line(); if (line == nullptr) { nline = -1; - } else nline = strlen(line) + 1; + } else + nline = strlen(line) + 1; } else { line = buffer; } - MPI_Bcast(&nline,1,MPI_INT,0,world); - if (nline<0) break; - MPI_Bcast(line,nline,MPI_CHAR,0,world); + MPI_Bcast(&nline, 1, MPI_INT, 0, world); + if (nline < 0) break; + MPI_Bcast(line, nline, MPI_CHAR, 0, world); ValueTokenizer values(line, "=(), '\t\n\r\f"); int nparams = values.count(); @@ -578,7 +574,7 @@ void PairMEAM::read_user_meam_file(const std::string &userfile) for (which = 0; which < nkeywords; which++) if (keyword == keywords[which]) break; if (which == nkeywords) - error->all(FLERR,"Keyword {} in MEAM parameter file not recognized", keyword); + error->all(FLERR, "Keyword {} in MEAM parameter file not recognized", keyword); nindex = nparams - 2; for (int i = 0; i < nindex; i++) index[i] = values.next_int() - 1; @@ -590,30 +586,27 @@ void PairMEAM::read_user_meam_file(const std::string &userfile) if (!MEAM::str_to_lat(lattice_type, false, latt)) error->all(FLERR, "Unrecognized lattice type in MEAM parameter file: {}", lattice_type); value = latt; - } - else value = values.next_double(); + } else + value = values.next_double(); // pass single setting to MEAM package int errorflag = 0; - meam_inst->meam_setup_param(which,value,nindex,index,&errorflag); + meam_inst->meam_setup_param(which, value, nindex, index, &errorflag); if (errorflag) { - const char *descr[] = { "has an unknown error", - "is out of range (please report a bug)", - "expected more indices", - "has out of range element index"}; + const char *descr[] = {"has an unknown error", "is out of range (please report a bug)", + "expected more indices", "has out of range element index"}; if ((errorflag < 0) || (errorflag > 3)) errorflag = 0; - error->all(FLERR,"Error in MEAM parameter file: keyword {} {}", keyword, descr[errorflag]); + error->all(FLERR, "Error in MEAM parameter file: keyword {} {}", keyword, descr[errorflag]); } } } /* ---------------------------------------------------------------------- */ -int PairMEAM::pack_forward_comm(int n, int *list, double *buf, - int /*pbc_flag*/, int * /*pbc*/) +int PairMEAM::pack_forward_comm(int n, int *list, double *buf, int /*pbc_flag*/, int * /*pbc*/) { - int i,j,k,m; + int i, j, k, m; m = 0; for (i = 0; i < n; i++) { @@ -663,7 +656,6 @@ int PairMEAM::pack_forward_comm(int n, int *list, double *buf, buf[m++] = meam_inst->arho3mb[j][1]; buf[m++] = meam_inst->arho3mb[j][2]; } - } return m; @@ -673,7 +665,7 @@ int PairMEAM::pack_forward_comm(int n, int *list, double *buf, void PairMEAM::unpack_forward_comm(int n, int first, double *buf) { - int i,k,m,last; + int i, k, m, last; m = 0; last = first + n; @@ -730,7 +722,7 @@ void PairMEAM::unpack_forward_comm(int n, int first, double *buf) int PairMEAM::pack_reverse_comm(int n, int first, double *buf) { - int i,k,m,last; + int i, k, m, last; m = 0; last = first + n; @@ -781,7 +773,7 @@ int PairMEAM::pack_reverse_comm(int n, int first, double *buf) void PairMEAM::unpack_reverse_comm(int n, int *list, double *buf) { - int i,j,k,m; + int i, j, k, m; m = 0; for (i = 0; i < n; i++) { @@ -824,8 +816,6 @@ void PairMEAM::unpack_reverse_comm(int n, int *list, double *buf) meam_inst->arho3mb[j][2] += buf[m++]; } } - - } /* ---------------------------------------------------------------------- @@ -835,8 +825,8 @@ void PairMEAM::unpack_reverse_comm(int n, int *list, double *buf) double PairMEAM::memory_usage() { double bytes = 11 * meam_inst->nmax * sizeof(double); - bytes += (double)(3 + 6 + 10 + 3 + 3 + 3) * meam_inst->nmax * sizeof(double); - bytes += (double)3 * meam_inst->maxneigh * sizeof(double); + bytes += (double) (3 + 6 + 10 + 3 + 3 + 3) * meam_inst->nmax * sizeof(double); + bytes += (double) 3 * meam_inst->maxneigh * sizeof(double); return bytes; } @@ -847,10 +837,9 @@ double PairMEAM::memory_usage() done once per reneighbor so that neigh_f2c and neigh_c2f don't see them ------------------------------------------------------------------------- */ -void PairMEAM::neigh_strip(int inum, int *ilist, - int *numneigh, int **firstneigh) +void PairMEAM::neigh_strip(int inum, int *ilist, int *numneigh, int **firstneigh) { - int i,j,ii,jnum; + int i, j, ii, jnum; int *jlist; for (ii = 0; ii < inum; ii++) { @@ -866,6 +855,6 @@ void PairMEAM::neigh_strip(int inum, int *ilist, void *PairMEAM::extract(const char *str, int &dim) { dim = 2; - if (strcmp(str,"scale") == 0) return (void *) scale; + if (strcmp(str, "scale") == 0) return (void *) scale; return nullptr; } From 10ab0ffe1999dd0f75ef68c62186374da8cc8854 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 27 Jan 2023 09:59:28 +0200 Subject: [PATCH 077/445] Include tests for gather_angles, gather_dihedrals & gather_impropers in python-numpy.py --- unittest/python/python-numpy.py | 116 ++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/unittest/python/python-numpy.py b/unittest/python/python-numpy.py index f09028fa5e..f8e65bcd85 100644 --- a/unittest/python/python-numpy.py +++ b/unittest/python/python-numpy.py @@ -260,6 +260,122 @@ class PythonNumpy(unittest.TestCase): count += self.checkBond(bond, 5, 29, 27) self.assertEqual(count,10) + @unittest.skipIf(not has_full,"Gather angles test") + def testGatherAngle_newton_on(self): + self.lmp.command('shell cd ' + os.environ['TEST_INPUT_DIR']) + self.lmp.command("newton on on") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + angles = self.lmp.numpy.gather_angles() + self.assertEqual(len(angles),30) + count = 0 + for angle in angles: + count += self.checkAngle(angle, 4, 2, 1, 3) + count += self.checkAngle(angle, 4, 1, 3, 6) + count += self.checkAngle(angle, 2, 4, 3, 6) + count += self.checkAngle(angle, 3, 7, 6, 8) + count += self.checkAngle(angle, 3, 8, 10, 16) + count += self.checkAngle(angle, 2, 8, 10, 11) + count += self.checkAngle(angle, 1, 12, 10, 16) + count += self.checkAngle(angle, 2, 10, 12, 14) + count += self.checkAngle(angle, 1, 19, 18, 20) + count += self.checkAngle(angle, 1, 28, 27, 29) + self.assertEqual(count,10) + + @unittest.skipIf(not has_full,"Gather angles test") + def testGatherAngle_newton_off(self): + self.lmp.command('shell cd ' + os.environ['TEST_INPUT_DIR']) + self.lmp.command("newton off off") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + angles = self.lmp.numpy.gather_angles() + self.assertEqual(len(angles),30) + count = 0 + for angle in angles: + count += self.checkAngle(angle, 4, 2, 1, 3) + count += self.checkAngle(angle, 4, 1, 3, 6) + count += self.checkAngle(angle, 2, 4, 3, 6) + count += self.checkAngle(angle, 3, 7, 6, 8) + count += self.checkAngle(angle, 3, 8, 10, 16) + count += self.checkAngle(angle, 2, 8, 10, 11) + count += self.checkAngle(angle, 1, 12, 10, 16) + count += self.checkAngle(angle, 2, 10, 12, 14) + count += self.checkAngle(angle, 1, 19, 18, 20) + count += self.checkAngle(angle, 1, 28, 27, 29) + self.assertEqual(count,10) + + @unittest.skipIf(not has_full,"Gather dihedrals test") + def testGatherDihedral_newton_on(self): + self.lmp.command('shell cd ' + os.environ['TEST_INPUT_DIR']) + self.lmp.command("newton on on") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + dihedrals = self.lmp.numpy.gather_dihedrals() + self.assertEqual(len(dihedrals),31) + count = 0 + for dihedral in dihedrals: + count += self.checkDihedral(dihedral, 2, 2, 1, 3, 6) + count += self.checkDihedral(dihedral, 3, 2, 1, 3, 5) + count += self.checkDihedral(dihedral, 1, 1, 3, 6, 7) + count += self.checkDihedral(dihedral, 5, 4, 3, 6, 7) + count += self.checkDihedral(dihedral, 4, 3, 6, 8, 9) + count += self.checkDihedral(dihedral, 2, 6, 8, 10, 16) + count += self.checkDihedral(dihedral, 5, 8, 10, 12, 13) + count += self.checkDihedral(dihedral, 1, 8, 10, 12, 14) + count += self.checkDihedral(dihedral, 2, 11, 10, 16, 17) + count += self.checkDihedral(dihedral, 5, 16, 10, 12, 14) + self.assertEqual(count,10) + + @unittest.skipIf(not has_full,"Gather dihedrals test") + def testGatherDihedral_newton_off(self): + self.lmp.command('shell cd ' + os.environ['TEST_INPUT_DIR']) + self.lmp.command("newton off off") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + dihedrals = self.lmp.numpy.gather_dihedrals() + self.assertEqual(len(dihedrals),31) + count = 0 + for dihedral in dihedrals: + count += self.checkDihedral(dihedral, 2, 2, 1, 3, 6) + count += self.checkDihedral(dihedral, 3, 2, 1, 3, 5) + count += self.checkDihedral(dihedral, 1, 1, 3, 6, 7) + count += self.checkDihedral(dihedral, 5, 4, 3, 6, 7) + count += self.checkDihedral(dihedral, 4, 3, 6, 8, 9) + count += self.checkDihedral(dihedral, 2, 6, 8, 10, 16) + count += self.checkDihedral(dihedral, 5, 8, 10, 12, 13) + count += self.checkDihedral(dihedral, 1, 8, 10, 12, 14) + count += self.checkDihedral(dihedral, 2, 11, 10, 16, 17) + count += self.checkDihedral(dihedral, 5, 16, 10, 12, 14) + self.assertEqual(count,10) + + @unittest.skipIf(not has_full,"Gather impropers test") + def testGatherImproper_newton_on(self): + self.lmp.command('shell cd ' + os.environ['TEST_INPUT_DIR']) + self.lmp.command("newton on on") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + impropers = self.lmp.numpy.gather_impropers() + self.assertEqual(len(impropers),2) + count = 0 + for improper in impropers: + count += self.checkImproper(improper, 1, 6, 3, 8, 7) + count += self.checkImproper(improper, 2, 8, 6, 10, 9) + self.assertEqual(count,2) + + @unittest.skipIf(not has_full,"Gather impropers test") + def testGatherImproper_newton_off(self): + self.lmp.command('shell cd ' + os.environ['TEST_INPUT_DIR']) + self.lmp.command("newton off off") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + impropers = self.lmp.numpy.gather_impropers() + self.assertEqual(len(impropers),2) + count = 0 + for improper in impropers: + count += self.checkImproper(improper, 1, 6, 3, 8, 7) + count += self.checkImproper(improper, 2, 8, 6, 10, 9) + self.assertEqual(count,2) + def testNeighborListSimple(self): self.lmp.commands_string(""" units lj From 755766220cf55c537ef8b99fd1e44a44124ae742 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 27 Jan 2023 10:28:28 +0200 Subject: [PATCH 078/445] Include tests for gather_angles, gather_dihedrals & gather_impropers in python-scatter-gather.py --- unittest/python/python-scatter-gather.py | 122 +++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/unittest/python/python-scatter-gather.py b/unittest/python/python-scatter-gather.py index 14cb2c4c68..b9d2ae2331 100644 --- a/unittest/python/python-scatter-gather.py +++ b/unittest/python/python-scatter-gather.py @@ -115,6 +115,128 @@ class PythonGather(unittest.TestCase): count += self.checkBond(bonds[3*i:3*i+3], 5, 27, 29) self.assertEqual(count,10) + @unittest.skipIf(not has_full, "Gather_angles test") + def testGatherAngle_newton_on(self): + """Test gather_angles() with newton on""" + self.lmp.command("newton on on") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + nangles, angles = self.lmp.gather_angles() + self.assertEqual(nangles, 30) + self.assertEqual(len(angles), 120) + count = 0; + for i in range(0,nangles): + count += self.checkAngle(angles[4*i:4*i+4], 4, 2, 1, 3) + count += self.checkAngle(angles[4*i:4*i+4], 4, 1, 3, 6) + count += self.checkAngle(angles[4*i:4*i+4], 2, 4, 3, 6) + count += self.checkAngle(angles[4*i:4*i+4], 3, 7, 6, 8) + count += self.checkAngle(angles[4*i:4*i+4], 3, 8, 10, 16) + count += self.checkAngle(angles[4*i:4*i+4], 2, 8, 10, 11) + count += self.checkAngle(angles[4*i:4*i+4], 1, 12, 10, 16) + count += self.checkAngle(angles[4*i:4*i+4], 2, 10, 12, 14) + count += self.checkAngle(angles[4*i:4*i+4], 1, 19, 18, 20) + count += self.checkAngle(angles[4*i:4*i+4], 1, 28, 27, 29) + self.assertEqual(count,10) + + @unittest.skipIf(not has_full, "Gather_angles test") + def testGatherAngle_newton_off(self): + """Test gather_angles() with newton off""" + self.lmp.command("newton off off") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + nangles, angles = self.lmp.gather_angles() + self.assertEqual(nangles, 30) + self.assertEqual(len(angles), 120) + count = 0; + for i in range(0,nangles): + count += self.checkAngle(angles[4*i:4*i+4], 4, 2, 1, 3) + count += self.checkAngle(angles[4*i:4*i+4], 4, 1, 3, 6) + count += self.checkAngle(angles[4*i:4*i+4], 2, 4, 3, 6) + count += self.checkAngle(angles[4*i:4*i+4], 3, 7, 6, 8) + count += self.checkAngle(angles[4*i:4*i+4], 3, 8, 10, 16) + count += self.checkAngle(angles[4*i:4*i+4], 2, 8, 10, 11) + count += self.checkAngle(angles[4*i:4*i+4], 1, 12, 10, 16) + count += self.checkAngle(angles[4*i:4*i+4], 2, 10, 12, 14) + count += self.checkAngle(angles[4*i:4*i+4], 1, 19, 18, 20) + count += self.checkAngle(angles[4*i:4*i+4], 1, 28, 27, 29) + self.assertEqual(count,10) + + @unittest.skipIf(not has_full, "Gather_dihedrals test") + def testGatherDihedral_newton_on(self): + """Test gather_dihedrals() with newton on""" + self.lmp.command("newton on on") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + ndihedrals, dihedrals = self.lmp.gather_dihedrals() + self.assertEqual(ndihedrals, 31) + self.assertEqual(len(dihedrals), 155) + count = 0; + for i in range(0,ndihedrals): + count += self.checkDihedral(dihedrals[5*i:5*i+5], 2, 2, 1, 3, 6) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 3, 2, 1, 3, 5) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 1, 1, 3, 6, 7) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 5, 4, 3, 6, 7) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 4, 3, 6, 8, 9) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 2, 6, 8, 10, 16) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 5, 8, 10, 12, 13) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 1, 8, 10, 12, 14) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 2, 11, 10, 16, 17) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 5, 16, 10, 12, 14) + self.assertEqual(count,10) + + @unittest.skipIf(not has_full, "Gather_dihedrals test") + def testGatherDihedral_newton_off(self): + """Test gather_dihedrals() with newton off""" + self.lmp.command("newton off off") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + ndihedrals, dihedrals = self.lmp.gather_dihedrals() + self.assertEqual(ndihedrals, 31) + self.assertEqual(len(dihedrals), 155) + count = 0; + for i in range(0,ndihedrals): + count += self.checkDihedral(dihedrals[5*i:5*i+5], 2, 2, 1, 3, 6) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 3, 2, 1, 3, 5) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 1, 1, 3, 6, 7) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 5, 4, 3, 6, 7) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 4, 3, 6, 8, 9) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 2, 6, 8, 10, 16) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 5, 8, 10, 12, 13) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 1, 8, 10, 12, 14) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 2, 11, 10, 16, 17) + count += self.checkDihedral(dihedrals[5*i:5*i+5], 5, 16, 10, 12, 14) + self.assertEqual(count,10) + + @unittest.skipIf(not has_full, "Gather_impropers test") + def testGatherImproper_newton_on(self): + """Test gather_impropers() with newton on""" + self.lmp.command("newton on on") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + nimpropers, impropers = self.lmp.gather_impropers() + self.assertEqual(nimpropers, 2) + self.assertEqual(len(impropers), 10) + count = 0; + for i in range(0,nimpropers): + count += self.checkImproper(impropers[5*i:5*i+5], 1, 6, 3, 8, 7) + count += self.checkImproper(impropers[5*i:5*i+5], 2, 8, 6, 10, 9) + self.assertEqual(count,10) + + @unittest.skipIf(not has_full, "Gather_impropers test") + def testGatherImproper_newton_off(self): + """Test gather_impropers() with newton off""" + self.lmp.command("newton off off") + self.lmp.file("in.fourmol") + self.lmp.command("run 0 post no") + nimpropers, impropers = self.lmp.gather_impropers() + self.assertEqual(nimpropers, 2) + self.assertEqual(len(impropers), 10) + count = 0; + for i in range(0,nimpropers): + count += self.checkImproper(impropers[5*i:5*i+5], 1, 6, 3, 8, 7) + count += self.checkImproper(impropers[5*i:5*i+5], 2, 8, 6, 10, 9) + self.assertEqual(count,10) + ############################## if __name__ == "__main__": unittest.main() From d31595a36ce3584c622f60f1a611b3a11eb4a911 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 27 Jan 2023 15:27:13 +0200 Subject: [PATCH 079/445] fixing unit tests in python-scatter-gather.py --- unittest/python/python-scatter-gather.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unittest/python/python-scatter-gather.py b/unittest/python/python-scatter-gather.py index b9d2ae2331..86d30ea3cb 100644 --- a/unittest/python/python-scatter-gather.py +++ b/unittest/python/python-scatter-gather.py @@ -220,7 +220,7 @@ class PythonGather(unittest.TestCase): for i in range(0,nimpropers): count += self.checkImproper(impropers[5*i:5*i+5], 1, 6, 3, 8, 7) count += self.checkImproper(impropers[5*i:5*i+5], 2, 8, 6, 10, 9) - self.assertEqual(count,10) + self.assertEqual(count,2) @unittest.skipIf(not has_full, "Gather_impropers test") def testGatherImproper_newton_off(self): @@ -235,7 +235,7 @@ class PythonGather(unittest.TestCase): for i in range(0,nimpropers): count += self.checkImproper(impropers[5*i:5*i+5], 1, 6, 3, 8, 7) count += self.checkImproper(impropers[5*i:5*i+5], 2, 8, 6, 10, 9) - self.assertEqual(count,10) + self.assertEqual(count,2) ############################## if __name__ == "__main__": From 34e8a7498999cb2b525498d3b40b3a9201cc00dc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 27 Jan 2023 11:49:43 -0500 Subject: [PATCH 080/445] apply changes suggested by clang-tidy --- lib/gpu/lal_atom.cpp | 4 ++-- src/DIELECTRIC/pppm_dielectric.cpp | 2 +- src/DIELECTRIC/pppm_disp_dielectric.cpp | 2 +- src/ELECTRODE/fix_electrode_conp.cpp | 2 +- src/KOKKOS/atom_vec_hybrid_kokkos.cpp | 7 ------- src/KOKKOS/atom_vec_hybrid_kokkos.h | 1 - src/KOKKOS/kokkos.cpp | 2 +- src/KOKKOS/kokkos.h | 2 +- src/KOKKOS/mliap_descriptor_so3_kokkos.cpp | 7 ------- src/KOKKOS/mliap_descriptor_so3_kokkos.h | 1 - src/MC/fix_sgcmc.cpp | 4 ++-- src/utils.cpp | 7 ++----- 12 files changed, 11 insertions(+), 30 deletions(-) diff --git a/lib/gpu/lal_atom.cpp b/lib/gpu/lal_atom.cpp index 72cb59a912..3d1a1cc963 100644 --- a/lib/gpu/lal_atom.cpp +++ b/lib/gpu/lal_atom.cpp @@ -202,14 +202,14 @@ bool AtomT::add_fields(const bool charge, const bool rot, if (extra_fields > 0 && _extra_fields==0) { _extra_fields=extra_fields; _other=true; - if (_host_view==false) { + if (!_host_view) { success=success && (extra.alloc(_max_atoms*_extra_fields,*dev,UCL_WRITE_ONLY, UCL_READ_ONLY)==UCL_SUCCESS); gpu_bytes+=extra.device.row_bytes(); } } - if (bonds && _bonds==false) { + if (bonds && !_bonds) { _bonds=true; if (_bonds && _gpu_nbor>0) { success=success && (dev_tag.alloc(_max_atoms,*dev, diff --git a/src/DIELECTRIC/pppm_dielectric.cpp b/src/DIELECTRIC/pppm_dielectric.cpp index ca87964e76..b9ae1d65ff 100644 --- a/src/DIELECTRIC/pppm_dielectric.cpp +++ b/src/DIELECTRIC/pppm_dielectric.cpp @@ -356,7 +356,7 @@ void PPPMDielectric::make_rho() // (mx,my,mz) = global coords of moving stencil pt double *q = atom->q_scaled; - if (use_qscaled == false) q = atom->q; + if (!use_qscaled) q = atom->q; double **x = atom->x; int nlocal = atom->nlocal; diff --git a/src/DIELECTRIC/pppm_disp_dielectric.cpp b/src/DIELECTRIC/pppm_disp_dielectric.cpp index e8a954616b..2c4de6ada1 100644 --- a/src/DIELECTRIC/pppm_disp_dielectric.cpp +++ b/src/DIELECTRIC/pppm_disp_dielectric.cpp @@ -636,7 +636,7 @@ void PPPMDispDielectric::make_rho_c() // (mx,my,mz) = global coords of moving stencil pt double *q = atom->q_scaled; - if (use_qscaled == false) q = atom->q; + if (!use_qscaled) q = atom->q; double **x = atom->x; int nlocal = atom->nlocal; diff --git a/src/ELECTRODE/fix_electrode_conp.cpp b/src/ELECTRODE/fix_electrode_conp.cpp index dbb508a033..beecc18f68 100644 --- a/src/ELECTRODE/fix_electrode_conp.cpp +++ b/src/ELECTRODE/fix_electrode_conp.cpp @@ -917,7 +917,7 @@ std::vector FixElectrodeConp::gather_ngroup(std::vector x_local) std::vector FixElectrodeConp::constraint_correction(std::vector x) { - return constraint_projection(x); + return constraint_projection(std::move(x)); } /* ---------------------------------------------------------------------- diff --git a/src/KOKKOS/atom_vec_hybrid_kokkos.cpp b/src/KOKKOS/atom_vec_hybrid_kokkos.cpp index 4dfbf22fae..fce0b3b337 100644 --- a/src/KOKKOS/atom_vec_hybrid_kokkos.cpp +++ b/src/KOKKOS/atom_vec_hybrid_kokkos.cpp @@ -37,13 +37,6 @@ AtomVecKokkos(lmp), AtomVecHybrid(lmp) /* ---------------------------------------------------------------------- */ -AtomVecHybridKokkos::~AtomVecHybridKokkos() -{ - -} - -/* ---------------------------------------------------------------------- */ - void AtomVecHybridKokkos::grow(int n) { for (int k = 0; k < nstyles; k++) styles[k]->grow(n); diff --git a/src/KOKKOS/atom_vec_hybrid_kokkos.h b/src/KOKKOS/atom_vec_hybrid_kokkos.h index 2a725577ba..f3aad18937 100644 --- a/src/KOKKOS/atom_vec_hybrid_kokkos.h +++ b/src/KOKKOS/atom_vec_hybrid_kokkos.h @@ -32,7 +32,6 @@ namespace LAMMPS_NS { class AtomVecHybridKokkos : public AtomVecKokkos, public AtomVecHybrid { public: AtomVecHybridKokkos(class LAMMPS *); - ~AtomVecHybridKokkos() override; void grow(int) override; diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 9bbfb4157f..33890e4040 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -342,7 +342,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) /* ---------------------------------------------------------------------- */ -void KokkosLMP::initialize(Kokkos::InitializationSettings args, Error *error) +void KokkosLMP::initialize(const Kokkos::InitializationSettings& args, Error *error) { if (!Kokkos::is_initialized()) { if (is_finalized) diff --git a/src/KOKKOS/kokkos.h b/src/KOKKOS/kokkos.h index 02189e6c4a..4fa294e497 100644 --- a/src/KOKKOS/kokkos.h +++ b/src/KOKKOS/kokkos.h @@ -56,7 +56,7 @@ class KokkosLMP : protected Pointers { KokkosLMP(class LAMMPS *, int, char **); - static void initialize(Kokkos::InitializationSettings, Error *); + static void initialize(const Kokkos::InitializationSettings&, Error *); static void finalize(); void accelerator(int, char **); int neigh_count(int); diff --git a/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp b/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp index 6518cccaa8..de6404b691 100644 --- a/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp +++ b/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp @@ -46,13 +46,6 @@ MLIAPDescriptorSO3Kokkos::MLIAPDescriptorSO3Kokkos(LAMMPS *lmp, char /* ---------------------------------------------------------------------- */ -template -MLIAPDescriptorSO3Kokkos::~MLIAPDescriptorSO3Kokkos() -{ -} - -/* ---------------------------------------------------------------------- */ - template void MLIAPDescriptorSO3Kokkos::compute_descriptors(class MLIAPData *data_) { diff --git a/src/KOKKOS/mliap_descriptor_so3_kokkos.h b/src/KOKKOS/mliap_descriptor_so3_kokkos.h index aea4540632..2d15924fe8 100644 --- a/src/KOKKOS/mliap_descriptor_so3_kokkos.h +++ b/src/KOKKOS/mliap_descriptor_so3_kokkos.h @@ -29,7 +29,6 @@ class MLIAPDescriptorSO3Kokkos : public MLIAPDescriptorKokkos { public: MLIAPDescriptorSO3Kokkos(LAMMPS *, char *); - ~MLIAPDescriptorSO3Kokkos() override; void compute_descriptors(class MLIAPData *) override; void compute_forces(class MLIAPData *) override; diff --git a/src/MC/fix_sgcmc.cpp b/src/MC/fix_sgcmc.cpp index 7dd50a2792..a70f3240db 100644 --- a/src/MC/fix_sgcmc.cpp +++ b/src/MC/fix_sgcmc.cpp @@ -406,7 +406,7 @@ void FixSemiGrandCanonicalMC::doMC() } } - if (kappa != 0.0 && serialMode == false) { + if (kappa != 0.0 && !serialMode) { // What follows is the second rejection test for the variance-constrained // semi-grandcanonical method. @@ -472,7 +472,7 @@ void FixSemiGrandCanonicalMC::doMC() // For (parallelized) semi-grandcanonical MC we have to determine the current concentrations now. // For the serial version and variance-constrained MC it has already been done in the loop. - if (kappa == 0.0 && serialMode == false) { + if (kappa == 0.0 && !serialMode) { const int *type = atom->type; std::vector localSpeciesCounts(atom->ntypes+1, 0); for (int i = 0; i < atom->nlocal; i++, ++type) { diff --git a/src/utils.cpp b/src/utils.cpp index 31a14a352a..bc4eee7385 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1360,11 +1360,8 @@ bool utils::is_double(const std::string &str) { if (str.empty()) return false; - if (strmatch(str, "^[+-]?\\d+\\.?\\d*$") || strmatch(str, "^[+-]?\\d+\\.?\\d*[eE][+-]?\\d+$") || - strmatch(str, "^[+-]?\\d*\\.?\\d+$") || strmatch(str, "^[+-]?\\d*\\.?\\d+[eE][+-]?\\d+$")) - return true; - else - return false; + return strmatch(str, "^[+-]?\\d+\\.?\\d*$") || strmatch(str, "^[+-]?\\d+\\.?\\d*[eE][+-]?\\d+$") || + strmatch(str, "^[+-]?\\d*\\.?\\d+$") || strmatch(str, "^[+-]?\\d*\\.?\\d+[eE][+-]?\\d+$"); } /* ---------------------------------------------------------------------- From 4f0245d54207758d8804c60a2d283f4817d28d6f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 27 Jan 2023 12:21:13 -0500 Subject: [PATCH 081/445] make Kokkos lib compatible with musl-libc Note: this was adapted from https://github.com/kokkos/kokkos/pull/5678 to be usable without requiring C++17 --- lib/kokkos/core/src/Kokkos_Macros.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/kokkos/core/src/Kokkos_Macros.hpp b/lib/kokkos/core/src/Kokkos_Macros.hpp index 9dbd2de0c8..1ba11481e7 100644 --- a/lib/kokkos/core/src/Kokkos_Macros.hpp +++ b/lib/kokkos/core/src/Kokkos_Macros.hpp @@ -653,7 +653,9 @@ static constexpr bool kokkos_omp_on_host() { return false; } #if (defined(KOKKOS_COMPILER_GNU) || defined(KOKKOS_COMPILER_CLANG) || \ defined(KOKKOS_COMPILER_INTEL) || defined(KOKKOS_COMPILER_PGI)) && \ !defined(_WIN32) +#if (defined(__linux__) && defined(__GLIBC_MINOR__)) #define KOKKOS_IMPL_ENABLE_STACKTRACE +#endif #define KOKKOS_IMPL_ENABLE_CXXABI #endif From b6f98244dcac749f8b46159b548cde577e225f3c Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Fri, 27 Jan 2023 11:28:17 -0700 Subject: [PATCH 082/445] Fix out of bounds access in pair_vashishta_kokkos with skip list --- src/KOKKOS/pair_sw_kokkos.cpp | 2 +- src/KOKKOS/pair_vashishta_kokkos.cpp | 61 ++++++++++++++-------------- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index 679d022437..db7320623d 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -47,7 +47,6 @@ PairSWKokkos::PairSWKokkos(LAMMPS *lmp) : PairSW(lmp) { respa_enable = 0; - kokkosable = 1; atomKK = (AtomKokkos *) atom; execution_space = ExecutionSpaceFromDevice::space; @@ -138,6 +137,7 @@ void PairSWKokkos::compute(int eflag_in, int vflag_in) } if ((int)d_numneigh_short.extent(0) < ignum) d_numneigh_short = Kokkos::View("SW::numneighs_short",ignum*1.2); + Kokkos::parallel_for(Kokkos::RangePolicy(0,inum), *this); // loop over neighbor list of my atoms diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index aa8cb550c7..0bb2b49ece 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -117,24 +117,23 @@ void PairVashishtaKokkos::compute(int eflag_in, int vflag_in) EV_FLOAT ev; EV_FLOAT ev_all; + // build short neighbor list + int max_neighs = d_neighbors.extent(1); - if (((int)d_neighbors_short_2body.extent(1) != max_neighs) || - ((int)d_neighbors_short_2body.extent(0) != ignum)) { - d_neighbors_short_2body = Kokkos::View("Vashishta::neighbors_short_2body",ignum,max_neighs); - } - if ((int)d_numneigh_short_2body.extent(0)!=ignum) { - d_numneigh_short_2body = Kokkos::View("Vashishta::numneighs_short_2body",ignum); + if (((int)d_neighbors_short_2body.extent(1) < max_neighs) || + ((int)d_neighbors_short_2body.extent(0) < ignum)) { + d_neighbors_short_2body = Kokkos::View("Vashishta::neighbors_short_2body",ignum*1.2,max_neighs); } + if ((int)d_numneigh_short_2body.extent(0) < ignum) + d_numneigh_short_2body = Kokkos::View("Vashishta::numneighs_short_2body",ignum*1.2); - if (((int)d_neighbors_short_3body.extent(1) != max_neighs) || - ((int)d_neighbors_short_3body.extent(0) != ignum)) { - d_neighbors_short_3body = Kokkos::View("Vashishta::neighbors_short_3body",ignum,max_neighs); - } - - if ((int)d_numneigh_short_3body.extent(0)!=ignum) { - d_numneigh_short_3body = Kokkos::View("Vashishta::numneighs_short_3body",ignum); + if (((int)d_neighbors_short_3body.extent(1) < max_neighs) || + ((int)d_neighbors_short_3body.extent(0) < ignum)) { + d_neighbors_short_3body = Kokkos::View("Vashishta::neighbors_short_3body",ignum*1.2,max_neighs); } + if ((int)d_numneigh_short_3body.extent(0) < ignum) + d_numneigh_short_3body = Kokkos::View("Vashishta::numneighs_short_3body",ignum*1.2); Kokkos::parallel_for(Kokkos::RangePolicy(0,neighflag==FULL?ignum:inum), *this); @@ -217,17 +216,17 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeShortNei const F_FLOAT rsq = delx*delx + dely*dely + delz*delz; if (rsq < d_params[ijparam].cutsq) { - d_neighbors_short_2body(i,inside_2body) = j; + d_neighbors_short_2body(ii,inside_2body) = j; inside_2body++; } if (rsq < d_params[ijparam].cutsq2) { - d_neighbors_short_3body(i,inside_3body) = j; + d_neighbors_short_3body(ii,inside_3body) = j; inside_3body++; } } - d_numneigh_short_2body(i) = inside_2body; - d_numneigh_short_3body(i) = inside_3body; + d_numneigh_short_2body(ii) = inside_2body; + d_numneigh_short_3body(ii) = inside_3body; } template @@ -252,14 +251,14 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeHalf::operator()(TagPairVashishtaComputeHalf::operator()(TagPairVashishtaComputeHalf::operator()(TagPairVashishtaComputeFullA::operator()(TagPairVashishtaComputeFullA::operator()(TagPairVashishtaComputeFullA::operator()(TagPairVashishtaComputeFullB= nlocal) continue; const int jtype = d_map[type[j]]; @@ -502,10 +501,10 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeFullB Date: Fri, 27 Jan 2023 11:28:41 -0700 Subject: [PATCH 083/445] Fix memory leak in Kokkos ReaxFF --- src/KOKKOS/fix_qeq_reaxff_kokkos.cpp | 2 -- src/KOKKOS/pair_reaxff_kokkos.cpp | 22 ++++++------ src/REAXFF/reaxff_allocate.cpp | 50 ++++++++++++++-------------- src/REAXFF/reaxff_api.h | 2 +- src/REAXFF/reaxff_list.cpp | 24 ++++++------- src/REAXFF/reaxff_lookup.cpp | 36 ++++++++++---------- src/REAXFF/reaxff_tool_box.cpp | 11 ++---- 7 files changed, 70 insertions(+), 77 deletions(-) diff --git a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp index 40828013ed..386dba6d1d 100644 --- a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp @@ -175,8 +175,6 @@ void FixQEqReaxFFKokkos::init_hist() template void FixQEqReaxFFKokkos::setup_pre_force(int vflag) { - //neighbor->build_one(list); - pre_force(vflag); } diff --git a/src/KOKKOS/pair_reaxff_kokkos.cpp b/src/KOKKOS/pair_reaxff_kokkos.cpp index 0bfcef90cf..d4f41f1242 100644 --- a/src/KOKKOS/pair_reaxff_kokkos.cpp +++ b/src/KOKKOS/pair_reaxff_kokkos.cpp @@ -184,6 +184,8 @@ void PairReaxFFKokkos::init_style() if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list with pair style reaxff/kk"); + need_dup = lmp->kokkos->need_dup(); + allocate(); setup(); init_md(); @@ -197,6 +199,8 @@ void PairReaxFFKokkos::setup() int i,j,k,m; int n = atom->ntypes; + setup_flag = 1; + // general parameters for (i = 0; i < 39; i ++) gp[i] = api->system->reax_param.gp.l[i]; @@ -577,17 +581,17 @@ void PairReaxFFKokkos::Deallocate_Lookup_Tables() for (j = i; j <= ntypes; ++j) { if (map[i] == -1) continue; if (LR[i][j].n) { - sfree(api->control->error_ptr, LR[i][j].y, "LR[i,j].y"); - sfree(api->control->error_ptr, LR[i][j].H, "LR[i,j].H"); - sfree(api->control->error_ptr, LR[i][j].vdW, "LR[i,j].vdW"); - sfree(api->control->error_ptr, LR[i][j].CEvd, "LR[i,j].CEvd"); - sfree(api->control->error_ptr, LR[i][j].ele, "LR[i,j].ele"); - sfree(api->control->error_ptr, LR[i][j].CEclmb, "LR[i,j].CEclmb"); + sfree(LR[i][j].y, "LR[i,j].y"); + sfree(LR[i][j].H, "LR[i,j].H"); + sfree(LR[i][j].vdW, "LR[i,j].vdW"); + sfree(LR[i][j].CEvd, "LR[i,j].CEvd"); + sfree(LR[i][j].ele, "LR[i,j].ele"); + sfree(LR[i][j].CEclmb, "LR[i,j].CEclmb"); } } - sfree(api->control->error_ptr, LR[i], "LR[i]"); + sfree(LR[i], "LR[i]"); } - sfree(api->control->error_ptr, LR, "LR"); + sfree(LR, "LR"); } /* ---------------------------------------------------------------------- */ @@ -738,8 +742,6 @@ void PairReaxFFKokkos::compute(int eflag_in, int vflag_in) } } - need_dup = lmp->kokkos->need_dup(); - // allocate duplicated memory if (need_dup) { dup_f = Kokkos::Experimental::create_scatter_view(f); diff --git a/src/REAXFF/reaxff_allocate.cpp b/src/REAXFF/reaxff_allocate.cpp index 16b71d041c..bea4147d22 100644 --- a/src/REAXFF/reaxff_allocate.cpp +++ b/src/REAXFF/reaxff_allocate.cpp @@ -66,7 +66,7 @@ namespace ReaxFF { auto memory = system->mem_ptr; // deallocate the atom list - sfree(error, system->my_atoms, "system->my_atoms"); + sfree(system->my_atoms, "system->my_atoms"); // deallocate the ffield parameters storage memory->destroy(system->reax_param.gp.l); @@ -87,36 +87,36 @@ namespace ReaxFF { auto error = control->error_ptr; /* bond order storage */ - sfree(error, workspace->total_bond_order, "total_bo"); - sfree(error, workspace->Deltap, "Deltap"); - sfree(error, workspace->Deltap_boc, "Deltap_boc"); - sfree(error, workspace->dDeltap_self, "dDeltap_self"); - sfree(error, workspace->Delta, "Delta"); - sfree(error, workspace->Delta_lp, "Delta_lp"); - sfree(error, workspace->Delta_lp_temp, "Delta_lp_temp"); - sfree(error, workspace->dDelta_lp, "dDelta_lp"); - sfree(error, workspace->dDelta_lp_temp, "dDelta_lp_temp"); - sfree(error, workspace->Delta_e, "Delta_e"); - sfree(error, workspace->Delta_boc, "Delta_boc"); - sfree(error, workspace->Delta_val, "Delta_val"); - sfree(error, workspace->nlp, "nlp"); - sfree(error, workspace->nlp_temp, "nlp_temp"); - sfree(error, workspace->Clp, "Clp"); - sfree(error, workspace->vlpex, "vlpex"); - sfree(error, workspace->bond_mark, "bond_mark"); + sfree(workspace->total_bond_order, "total_bo"); + sfree(workspace->Deltap, "Deltap"); + sfree(workspace->Deltap_boc, "Deltap_boc"); + sfree(workspace->dDeltap_self, "dDeltap_self"); + sfree(workspace->Delta, "Delta"); + sfree(workspace->Delta_lp, "Delta_lp"); + sfree(workspace->Delta_lp_temp, "Delta_lp_temp"); + sfree(workspace->dDelta_lp, "dDelta_lp"); + sfree(workspace->dDelta_lp_temp, "dDelta_lp_temp"); + sfree(workspace->Delta_e, "Delta_e"); + sfree(workspace->Delta_boc, "Delta_boc"); + sfree(workspace->Delta_val, "Delta_val"); + sfree(workspace->nlp, "nlp"); + sfree(workspace->nlp_temp, "nlp_temp"); + sfree(workspace->Clp, "Clp"); + sfree(workspace->vlpex, "vlpex"); + sfree(workspace->bond_mark, "bond_mark"); /* force related storage */ - sfree(error, workspace->f, "f"); - sfree(error, workspace->CdDelta, "CdDelta"); + sfree(workspace->f, "f"); + sfree(workspace->CdDelta, "CdDelta"); /* reductions */ if (workspace->CdDeltaReduction) - sfree(error, workspace->CdDeltaReduction, "cddelta_reduce"); + sfree(workspace->CdDeltaReduction, "cddelta_reduce"); if (workspace->forceReduction) - sfree(error, workspace->forceReduction, "f_reduce"); + sfree(workspace->forceReduction, "f_reduce"); if (workspace->valence_angle_atom_myoffset) - sfree(error, workspace->valence_angle_atom_myoffset, "valence_angle_atom_myoffset"); + sfree(workspace->valence_angle_atom_myoffset, "valence_angle_atom_myoffset"); } void Allocate_Workspace(control_params *control, storage *workspace, int total_cap) @@ -206,7 +206,7 @@ namespace ReaxFF { if (system->omp_active) for (i = 0; i < bonds->num_intrs; ++i) - sfree(system->error_ptr, bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); + sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); Delete_List(bonds); Make_List(system->total_cap, *total_bonds, TYP_BOND, bonds); @@ -292,7 +292,7 @@ namespace ReaxFF { reax_list *bonds = (*lists)+BONDS; for (int i = 0; i < bonds->num_intrs; ++i) { - sfree(error, bonds->select.bond_list[i].bo_data.CdboReduction, + sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); bonds->select.bond_list[i].bo_data.CdboReduction = diff --git a/src/REAXFF/reaxff_api.h b/src/REAXFF/reaxff_api.h index d6a0410622..ede99bfd73 100644 --- a/src/REAXFF/reaxff_api.h +++ b/src/REAXFF/reaxff_api.h @@ -142,7 +142,7 @@ extern void Reset_Workspace(reax_system *, storage *); extern void *scalloc(LAMMPS_NS::Error *, rc_bigint, rc_bigint, const std::string &); extern void *smalloc(LAMMPS_NS::Error *, rc_bigint, const std::string &); -extern void sfree(LAMMPS_NS::Error *, void *, const std::string &); +extern void sfree(void *, const std::string &); // torsion angles diff --git a/src/REAXFF/reaxff_list.cpp b/src/REAXFF/reaxff_list.cpp index 79d96bb9d9..50be12a0c9 100644 --- a/src/REAXFF/reaxff_list.cpp +++ b/src/REAXFF/reaxff_list.cpp @@ -39,8 +39,8 @@ namespace ReaxFF { l->n = n; l->num_intrs = num_intrs; - if (l->index) sfree(l->error_ptr, l->index, "list:index"); - if (l->end_index) sfree(l->error_ptr, l->end_index, "list:end_index"); + if (l->index) sfree(l->index, "list:index"); + if (l->end_index) sfree(l->end_index, "list:end_index"); l->index = (int*) smalloc(l->error_ptr, n * sizeof(int), "list:index"); l->end_index = (int*) smalloc(l->error_ptr, n * sizeof(int), "list:end_index"); @@ -48,26 +48,26 @@ namespace ReaxFF { switch(l->type) { case TYP_THREE_BODY: - if (l->select.three_body_list) sfree(l->error_ptr, l->select.three_body_list,"list:three_bodies"); + if (l->select.three_body_list) sfree(l->select.three_body_list,"list:three_bodies"); l->select.three_body_list = (three_body_interaction_data*) smalloc(l->error_ptr, (rc_bigint) num_intrs * sizeof(three_body_interaction_data), "list:three_bodies"); break; case TYP_BOND: - if (l->select.bond_list) sfree(l->error_ptr, l->select.bond_list,"list:bonds"); + if (l->select.bond_list) sfree(l->select.bond_list,"list:bonds"); l->select.bond_list = (bond_data*) smalloc(l->error_ptr, (rc_bigint) num_intrs * sizeof(bond_data), "list:bonds"); break; case TYP_FAR_NEIGHBOR: - if (l->select.far_nbr_list) sfree(l->error_ptr, l->select.far_nbr_list,"list:far_nbrs"); + if (l->select.far_nbr_list) sfree(l->select.far_nbr_list,"list:far_nbrs"); l->select.far_nbr_list = (far_neighbor_data*) smalloc(l->error_ptr, (rc_bigint) num_intrs * sizeof(far_neighbor_data), "list:far_nbrs"); break; case TYP_HBOND: - if (l->select.hbond_list) sfree(l->error_ptr, l->select.hbond_list,"list:hbonds"); + if (l->select.hbond_list) sfree(l->select.hbond_list,"list:hbonds"); l->select.hbond_list = (hbond_data*) smalloc(l->error_ptr, (rc_bigint) num_intrs * sizeof(hbond_data), "list:hbonds"); break; @@ -83,26 +83,26 @@ namespace ReaxFF { return; l->allocated = 0; - sfree(l->error_ptr, l->index, "list:index"); - sfree(l->error_ptr, l->end_index, "list:end_index"); + sfree(l->index, "list:index"); + sfree(l->end_index, "list:end_index"); l->index = nullptr; l->end_index = nullptr; switch(l->type) { case TYP_HBOND: - sfree(l->error_ptr, l->select.hbond_list, "list:hbonds"); + sfree(l->select.hbond_list, "list:hbonds"); l->select.hbond_list = nullptr; break; case TYP_FAR_NEIGHBOR: - sfree(l->error_ptr, l->select.far_nbr_list, "list:far_nbrs"); + sfree(l->select.far_nbr_list, "list:far_nbrs"); l->select.far_nbr_list = nullptr; break; case TYP_BOND: - sfree(l->error_ptr, l->select.bond_list, "list:bonds"); + sfree(l->select.bond_list, "list:bonds"); l->select.bond_list = nullptr; break; case TYP_THREE_BODY: - sfree(l->error_ptr, l->select.three_body_list, "list:three_bodies"); + sfree(l->select.three_body_list, "list:three_bodies"); l->select.three_body_list = nullptr; break; diff --git a/src/REAXFF/reaxff_lookup.cpp b/src/REAXFF/reaxff_lookup.cpp index 6471f1e6e2..3a0fa6f6ae 100644 --- a/src/REAXFF/reaxff_lookup.cpp +++ b/src/REAXFF/reaxff_lookup.cpp @@ -90,11 +90,11 @@ namespace ReaxFF { coef[i-1].a = f[i]; } - sfree(error_ptr, a, "cubic_spline:a"); - sfree(error_ptr, b, "cubic_spline:b"); - sfree(error_ptr, c, "cubic_spline:c"); - sfree(error_ptr, d, "cubic_spline:d"); - sfree(error_ptr, v, "cubic_spline:v"); + sfree(a, "cubic_spline:a"); + sfree(b, "cubic_spline:b"); + sfree(c, "cubic_spline:c"); + sfree(d, "cubic_spline:d"); + sfree(v, "cubic_spline:v"); } void Complete_Cubic_Spline(LAMMPS_NS::Error* error_ptr, const double *h, @@ -138,11 +138,11 @@ namespace ReaxFF { coef[i-1].a = f[i]; } - sfree(error_ptr, a, "cubic_spline:a"); - sfree(error_ptr, b, "cubic_spline:b"); - sfree(error_ptr, c, "cubic_spline:c"); - sfree(error_ptr, d, "cubic_spline:d"); - sfree(error_ptr, v, "cubic_spline:v"); + sfree(a, "cubic_spline:a"); + sfree(b, "cubic_spline:b"); + sfree(c, "cubic_spline:c"); + sfree(d, "cubic_spline:d"); + sfree(v, "cubic_spline:v"); } void Init_Lookup_Tables(reax_system *system, control_params *control, @@ -276,16 +276,16 @@ namespace ReaxFF { for (i = 0; i < ntypes; ++i) { for (j = i; j < ntypes; ++j) if (LR[i][j].n) { - sfree(system->error_ptr, LR[i][j].y, "LR[i,j].y"); - sfree(system->error_ptr, LR[i][j].H, "LR[i,j].H"); - sfree(system->error_ptr, LR[i][j].vdW, "LR[i,j].vdW"); - sfree(system->error_ptr, LR[i][j].CEvd, "LR[i,j].CEvd"); - sfree(system->error_ptr, LR[i][j].ele, "LR[i,j].ele"); - sfree(system->error_ptr, LR[i][j].CEclmb, "LR[i,j].CEclmb"); + sfree(LR[i][j].y, "LR[i,j].y"); + sfree(LR[i][j].H, "LR[i,j].H"); + sfree(LR[i][j].vdW, "LR[i,j].vdW"); + sfree(LR[i][j].CEvd, "LR[i,j].CEvd"); + sfree(LR[i][j].ele, "LR[i,j].ele"); + sfree(LR[i][j].CEclmb, "LR[i,j].CEclmb"); } - sfree(system->error_ptr, LR[i], "LR[i]"); + sfree(LR[i], "LR[i]"); } - sfree(system->error_ptr, LR, "LR"); + sfree(LR, "LR"); } } diff --git a/src/REAXFF/reaxff_tool_box.cpp b/src/REAXFF/reaxff_tool_box.cpp index 5ebed0360e..bcd061dbc6 100644 --- a/src/REAXFF/reaxff_tool_box.cpp +++ b/src/REAXFF/reaxff_tool_box.cpp @@ -96,16 +96,9 @@ void *scalloc(LAMMPS_NS::Error *error_ptr, rc_bigint n, rc_bigint size, const st } /* safe free */ -void sfree(LAMMPS_NS::Error *error_ptr, void *ptr, const std::string &name) +void sfree(void *ptr, const std::string &name) { - if (ptr == nullptr) { - auto errmsg = std::string("Trying to free the already free()'d pointer: ") + name; - if (error_ptr) - error_ptr->one(FLERR, errmsg); - else - fputs(errmsg.c_str(), stderr); - return; - } + if (ptr == nullptr) return; free(ptr); ptr = nullptr; From b954c3ef860cbfd1347706680d3b991f2b25b4c7 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Fri, 27 Jan 2023 11:29:02 -0700 Subject: [PATCH 084/445] Fix memory leak in pair_lj_cut_kokkos --- src/KOKKOS/pair_lj_cut_kokkos.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/KOKKOS/pair_lj_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_kokkos.cpp index c6353cc083..5cff54a440 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_kokkos.cpp @@ -130,6 +130,7 @@ void PairLJCutKokkos::compute(int eflag_in, int vflag_in) if (vflag_fdotr) pair_virial_fdotr_compute(this); + copymode = 0; } template From a31af4f46e60a05a5fa6a0469dfbadc508d4423e Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Fri, 27 Jan 2023 12:28:21 -0700 Subject: [PATCH 085/445] Fix compile for OPENMP, remove unused var --- src/KOKKOS/pair_reaxff_kokkos.cpp | 16 +++++----- src/OPENMP/pair_reaxff_omp.cpp | 2 +- src/REAXFF/reaxff_allocate.cpp | 51 +++++++++++++++---------------- src/REAXFF/reaxff_api.h | 2 +- src/REAXFF/reaxff_list.cpp | 24 +++++++-------- src/REAXFF/reaxff_lookup.cpp | 36 +++++++++++----------- src/REAXFF/reaxff_tool_box.cpp | 2 +- 7 files changed, 66 insertions(+), 67 deletions(-) diff --git a/src/KOKKOS/pair_reaxff_kokkos.cpp b/src/KOKKOS/pair_reaxff_kokkos.cpp index d4f41f1242..5b5e1fbbea 100644 --- a/src/KOKKOS/pair_reaxff_kokkos.cpp +++ b/src/KOKKOS/pair_reaxff_kokkos.cpp @@ -581,17 +581,17 @@ void PairReaxFFKokkos::Deallocate_Lookup_Tables() for (j = i; j <= ntypes; ++j) { if (map[i] == -1) continue; if (LR[i][j].n) { - sfree(LR[i][j].y, "LR[i,j].y"); - sfree(LR[i][j].H, "LR[i,j].H"); - sfree(LR[i][j].vdW, "LR[i,j].vdW"); - sfree(LR[i][j].CEvd, "LR[i,j].CEvd"); - sfree(LR[i][j].ele, "LR[i,j].ele"); - sfree(LR[i][j].CEclmb, "LR[i,j].CEclmb"); + sfree(LR[i][j].y); + sfree(LR[i][j].H); + sfree(LR[i][j].vdW); + sfree(LR[i][j].CEvd); + sfree(LR[i][j].ele); + sfree(LR[i][j].CEclmb); } } - sfree(LR[i], "LR[i]"); + sfree(LR[i]); } - sfree(LR, "LR"); + sfree(LR); } /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_reaxff_omp.cpp b/src/OPENMP/pair_reaxff_omp.cpp index 7ac46b6078..96e6389870 100644 --- a/src/OPENMP/pair_reaxff_omp.cpp +++ b/src/OPENMP/pair_reaxff_omp.cpp @@ -93,7 +93,7 @@ PairReaxFFOMP::~PairReaxFFOMP() if (setup_flag) { reax_list * bonds = api->lists+BONDS; for (int i=0; inum_intrs; ++i) - sfree(error, bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); + sfree(bonds->select.bond_list[i].bo_data.CdboReduction); } memory->destroy(num_nbrs_offset); } diff --git a/src/REAXFF/reaxff_allocate.cpp b/src/REAXFF/reaxff_allocate.cpp index bea4147d22..cad86df9e8 100644 --- a/src/REAXFF/reaxff_allocate.cpp +++ b/src/REAXFF/reaxff_allocate.cpp @@ -66,7 +66,7 @@ namespace ReaxFF { auto memory = system->mem_ptr; // deallocate the atom list - sfree(system->my_atoms, "system->my_atoms"); + sfree(system->my_atoms); // deallocate the ffield parameters storage memory->destroy(system->reax_param.gp.l); @@ -87,36 +87,36 @@ namespace ReaxFF { auto error = control->error_ptr; /* bond order storage */ - sfree(workspace->total_bond_order, "total_bo"); - sfree(workspace->Deltap, "Deltap"); - sfree(workspace->Deltap_boc, "Deltap_boc"); - sfree(workspace->dDeltap_self, "dDeltap_self"); - sfree(workspace->Delta, "Delta"); - sfree(workspace->Delta_lp, "Delta_lp"); - sfree(workspace->Delta_lp_temp, "Delta_lp_temp"); - sfree(workspace->dDelta_lp, "dDelta_lp"); - sfree(workspace->dDelta_lp_temp, "dDelta_lp_temp"); - sfree(workspace->Delta_e, "Delta_e"); - sfree(workspace->Delta_boc, "Delta_boc"); - sfree(workspace->Delta_val, "Delta_val"); - sfree(workspace->nlp, "nlp"); - sfree(workspace->nlp_temp, "nlp_temp"); - sfree(workspace->Clp, "Clp"); - sfree(workspace->vlpex, "vlpex"); - sfree(workspace->bond_mark, "bond_mark"); + sfree(workspace->total_bond_order); + sfree(workspace->Deltap); + sfree(workspace->Deltap_boc); + sfree(workspace->dDeltap_self); + sfree(workspace->Delta); + sfree(workspace->Delta_lp); + sfree(workspace->Delta_lp_temp); + sfree(workspace->dDelta_lp); + sfree(workspace->dDelta_lp_temp); + sfree(workspace->Delta_e); + sfree(workspace->Delta_boc); + sfree(workspace->Delta_val); + sfree(workspace->nlp); + sfree(workspace->nlp_temp); + sfree(workspace->Clp); + sfree(workspace->vlpex); + sfree(workspace->bond_mark); /* force related storage */ - sfree(workspace->f, "f"); - sfree(workspace->CdDelta, "CdDelta"); + sfree(workspace->f); + sfree(workspace->CdDelta); /* reductions */ if (workspace->CdDeltaReduction) - sfree(workspace->CdDeltaReduction, "cddelta_reduce"); + sfree(workspace->CdDeltaReduction); if (workspace->forceReduction) - sfree(workspace->forceReduction, "f_reduce"); + sfree(workspace->forceReduction); if (workspace->valence_angle_atom_myoffset) - sfree(workspace->valence_angle_atom_myoffset, "valence_angle_atom_myoffset"); + sfree(workspace->valence_angle_atom_myoffset); } void Allocate_Workspace(control_params *control, storage *workspace, int total_cap) @@ -206,7 +206,7 @@ namespace ReaxFF { if (system->omp_active) for (i = 0; i < bonds->num_intrs; ++i) - sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction"); + sfree(bonds->select.bond_list[i].bo_data.CdboReduction); Delete_List(bonds); Make_List(system->total_cap, *total_bonds, TYP_BOND, bonds); @@ -292,8 +292,7 @@ namespace ReaxFF { reax_list *bonds = (*lists)+BONDS; for (int i = 0; i < bonds->num_intrs; ++i) { - sfree(bonds->select.bond_list[i].bo_data.CdboReduction, - "CdboReduction"); + sfree(bonds->select.bond_list[i].bo_data.CdboReduction); bonds->select.bond_list[i].bo_data.CdboReduction = (double*) smalloc(error, sizeof(double)*nthreads, "CdboReduction"); diff --git a/src/REAXFF/reaxff_api.h b/src/REAXFF/reaxff_api.h index ede99bfd73..f2e5aa07da 100644 --- a/src/REAXFF/reaxff_api.h +++ b/src/REAXFF/reaxff_api.h @@ -142,7 +142,7 @@ extern void Reset_Workspace(reax_system *, storage *); extern void *scalloc(LAMMPS_NS::Error *, rc_bigint, rc_bigint, const std::string &); extern void *smalloc(LAMMPS_NS::Error *, rc_bigint, const std::string &); -extern void sfree(void *, const std::string &); +extern void sfree(void *); // torsion angles diff --git a/src/REAXFF/reaxff_list.cpp b/src/REAXFF/reaxff_list.cpp index 50be12a0c9..0ff0852a04 100644 --- a/src/REAXFF/reaxff_list.cpp +++ b/src/REAXFF/reaxff_list.cpp @@ -39,8 +39,8 @@ namespace ReaxFF { l->n = n; l->num_intrs = num_intrs; - if (l->index) sfree(l->index, "list:index"); - if (l->end_index) sfree(l->end_index, "list:end_index"); + if (l->index) sfree(l->index); + if (l->end_index) sfree(l->end_index); l->index = (int*) smalloc(l->error_ptr, n * sizeof(int), "list:index"); l->end_index = (int*) smalloc(l->error_ptr, n * sizeof(int), "list:end_index"); @@ -48,26 +48,26 @@ namespace ReaxFF { switch(l->type) { case TYP_THREE_BODY: - if (l->select.three_body_list) sfree(l->select.three_body_list,"list:three_bodies"); + if (l->select.three_body_list) sfree(l->select.three_body_list); l->select.three_body_list = (three_body_interaction_data*) smalloc(l->error_ptr, (rc_bigint) num_intrs * sizeof(three_body_interaction_data), "list:three_bodies"); break; case TYP_BOND: - if (l->select.bond_list) sfree(l->select.bond_list,"list:bonds"); + if (l->select.bond_list) sfree(l->select.bond_list); l->select.bond_list = (bond_data*) smalloc(l->error_ptr, (rc_bigint) num_intrs * sizeof(bond_data), "list:bonds"); break; case TYP_FAR_NEIGHBOR: - if (l->select.far_nbr_list) sfree(l->select.far_nbr_list,"list:far_nbrs"); + if (l->select.far_nbr_list) sfree(l->select.far_nbr_list); l->select.far_nbr_list = (far_neighbor_data*) smalloc(l->error_ptr, (rc_bigint) num_intrs * sizeof(far_neighbor_data), "list:far_nbrs"); break; case TYP_HBOND: - if (l->select.hbond_list) sfree(l->select.hbond_list,"list:hbonds"); + if (l->select.hbond_list) sfree(l->select.hbond_list); l->select.hbond_list = (hbond_data*) smalloc(l->error_ptr, (rc_bigint) num_intrs * sizeof(hbond_data), "list:hbonds"); break; @@ -83,26 +83,26 @@ namespace ReaxFF { return; l->allocated = 0; - sfree(l->index, "list:index"); - sfree(l->end_index, "list:end_index"); + sfree(l->index); + sfree(l->end_index); l->index = nullptr; l->end_index = nullptr; switch(l->type) { case TYP_HBOND: - sfree(l->select.hbond_list, "list:hbonds"); + sfree(l->select.hbond_list); l->select.hbond_list = nullptr; break; case TYP_FAR_NEIGHBOR: - sfree(l->select.far_nbr_list, "list:far_nbrs"); + sfree(l->select.far_nbr_list); l->select.far_nbr_list = nullptr; break; case TYP_BOND: - sfree(l->select.bond_list, "list:bonds"); + sfree(l->select.bond_list); l->select.bond_list = nullptr; break; case TYP_THREE_BODY: - sfree(l->select.three_body_list, "list:three_bodies"); + sfree(l->select.three_body_list); l->select.three_body_list = nullptr; break; diff --git a/src/REAXFF/reaxff_lookup.cpp b/src/REAXFF/reaxff_lookup.cpp index 3a0fa6f6ae..c0e7bf2c54 100644 --- a/src/REAXFF/reaxff_lookup.cpp +++ b/src/REAXFF/reaxff_lookup.cpp @@ -90,11 +90,11 @@ namespace ReaxFF { coef[i-1].a = f[i]; } - sfree(a, "cubic_spline:a"); - sfree(b, "cubic_spline:b"); - sfree(c, "cubic_spline:c"); - sfree(d, "cubic_spline:d"); - sfree(v, "cubic_spline:v"); + sfree(a); + sfree(b); + sfree(c); + sfree(d); + sfree(v); } void Complete_Cubic_Spline(LAMMPS_NS::Error* error_ptr, const double *h, @@ -138,11 +138,11 @@ namespace ReaxFF { coef[i-1].a = f[i]; } - sfree(a, "cubic_spline:a"); - sfree(b, "cubic_spline:b"); - sfree(c, "cubic_spline:c"); - sfree(d, "cubic_spline:d"); - sfree(v, "cubic_spline:v"); + sfree(a); + sfree(b); + sfree(c); + sfree(d); + sfree(v); } void Init_Lookup_Tables(reax_system *system, control_params *control, @@ -276,16 +276,16 @@ namespace ReaxFF { for (i = 0; i < ntypes; ++i) { for (j = i; j < ntypes; ++j) if (LR[i][j].n) { - sfree(LR[i][j].y, "LR[i,j].y"); - sfree(LR[i][j].H, "LR[i,j].H"); - sfree(LR[i][j].vdW, "LR[i,j].vdW"); - sfree(LR[i][j].CEvd, "LR[i,j].CEvd"); - sfree(LR[i][j].ele, "LR[i,j].ele"); - sfree(LR[i][j].CEclmb, "LR[i,j].CEclmb"); + sfree(LR[i][j].y); + sfree(LR[i][j].H); + sfree(LR[i][j].vdW); + sfree(LR[i][j].CEvd); + sfree(LR[i][j].ele); + sfree(LR[i][j].CEclmb); } - sfree(LR[i], "LR[i]"); + sfree(LR[i]); } - sfree(LR, "LR"); + sfree(LR); } } diff --git a/src/REAXFF/reaxff_tool_box.cpp b/src/REAXFF/reaxff_tool_box.cpp index bcd061dbc6..22ef299b41 100644 --- a/src/REAXFF/reaxff_tool_box.cpp +++ b/src/REAXFF/reaxff_tool_box.cpp @@ -96,7 +96,7 @@ void *scalloc(LAMMPS_NS::Error *error_ptr, rc_bigint n, rc_bigint size, const st } /* safe free */ -void sfree(void *ptr, const std::string &name) +void sfree(void *ptr) { if (ptr == nullptr) return; From 69e7dd9fd680807ef73800c689789881eb9a10ce Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Fri, 27 Jan 2023 14:28:40 -0700 Subject: [PATCH 086/445] Change default for pair_modify neigh/trim --- src/pair.cpp | 2 +- src/pair_hybrid_overlay.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pair.cpp b/src/pair.cpp index 5d789fbb9b..92d27266b9 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -97,7 +97,7 @@ Pair::Pair(LAMMPS *lmp) : Pointers(lmp) tabinner_disp = sqrt(2.0); ftable = nullptr; fdisptable = nullptr; - trim_flag = 1; + trim_flag = 0; allocated = 0; suffix_flag = Suffix::NONE; diff --git a/src/pair_hybrid_overlay.cpp b/src/pair_hybrid_overlay.cpp index 12c84c3a71..9d2df6a65c 100644 --- a/src/pair_hybrid_overlay.cpp +++ b/src/pair_hybrid_overlay.cpp @@ -23,7 +23,9 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -PairHybridOverlay::PairHybridOverlay(LAMMPS *lmp) : PairHybrid(lmp) {} +PairHybridOverlay::PairHybridOverlay(LAMMPS *lmp) : PairHybrid(lmp) { + trim_flag = 1; +} /* ---------------------------------------------------------------------- set coeffs for one or more type pairs From 0677c1c3f598f4adf88a805b8f8b47a0a49b75f3 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Fri, 27 Jan 2023 14:29:00 -0700 Subject: [PATCH 087/445] Fix logic for neigh/trim yes and multiple runs --- src/pair_hybrid.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index efc22dbf4e..b6ce87a6de 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -304,8 +304,6 @@ void PairHybrid::settings(int narg, char **arg) // allocate list of sub-styles as big as possibly needed if no extra args styles = new Pair *[narg]; - cutmax_style = new double[narg]; - memset(cutmax_style, 0.0, narg*sizeof(double)); keywords = new char *[narg]; multiple = new int[narg]; @@ -347,6 +345,9 @@ void PairHybrid::settings(int narg, char **arg) nstyles++; } + cutmax_style = new double[nstyles]; + memset(cutmax_style, 0.0, nstyles*sizeof(double)); + // multiple[i] = 1 to M if sub-style used multiple times, else 0 int num_tip4p = 0, num_coul = 0; // count sub-styles with tip4p and coulomb @@ -582,6 +583,8 @@ void PairHybrid::init_style() { int i,m,itype,jtype,used,istyle,skip; + memset(cutmax_style, 0.0, nstyles*sizeof(double)); + // error if a sub-style is not used int ntypes = atom->ntypes; @@ -750,7 +753,7 @@ double PairHybrid::init_one(int i, int j) cutmax_style[istyle] = cut; for (auto &request : neighbor->get_pair_requests()) { - if (styles[istyle] == request->get_requestor() && styles[istyle]->trim_flag) { + if (styles[istyle] == request->get_requestor()) { request->set_cutoff(cutmax_style[istyle]); break; } From e0f090aa9eca6084d46398631dbcdf755a984b54 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Fri, 27 Jan 2023 14:43:16 -0700 Subject: [PATCH 088/445] Fix invalid memory read, from @akohlmey --- src/REAXFF/reaxff_hydrogen_bonds.cpp | 2 +- src/REAXFF/reaxff_init_md.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/REAXFF/reaxff_hydrogen_bonds.cpp b/src/REAXFF/reaxff_hydrogen_bonds.cpp index 6f5c663da0..421dd7e1a4 100644 --- a/src/REAXFF/reaxff_hydrogen_bonds.cpp +++ b/src/REAXFF/reaxff_hydrogen_bonds.cpp @@ -60,7 +60,7 @@ namespace ReaxFF { hbond_list = hbonds->select.hbond_list; for (j = 0; j < system->n; ++j) - if (system->reax_param.sbp[system->my_atoms[j].type].p_hbond == 1) { + if ((system->my_atoms[j].type >= 0) && (system->reax_param.sbp[system->my_atoms[j].type].p_hbond == 1)) { type_j = system->my_atoms[j].type; start_j = Start_Index(j, bonds); end_j = End_Index(j, bonds); diff --git a/src/REAXFF/reaxff_init_md.cpp b/src/REAXFF/reaxff_init_md.cpp index 268af75358..55c7a03f7c 100644 --- a/src/REAXFF/reaxff_init_md.cpp +++ b/src/REAXFF/reaxff_init_md.cpp @@ -56,7 +56,7 @@ namespace ReaxFF { if (control->hbond_cut > 0) for (i = 0; i < system->n; ++i) { atom = &(system->my_atoms[i]); - if (system->reax_param.sbp[atom->type].p_hbond == 1 && atom->type >= 0) + if ((atom->type >= 0) && (system->reax_param.sbp[atom->type].p_hbond == 1 && atom->type >= 0)) atom->Hindex = system->numH++; else atom->Hindex = -1; } From 03c8b0ff893021df937bc60c075d0f6dfd4a6bd1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 27 Jan 2023 20:42:37 -0500 Subject: [PATCH 089/445] use correct type for memset byte and avoid potential memory leaks --- src/pair_hybrid.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index b6ce87a6de..f05a201e33 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -345,8 +345,9 @@ void PairHybrid::settings(int narg, char **arg) nstyles++; } + delete[] cutmax_style; cutmax_style = new double[nstyles]; - memset(cutmax_style, 0.0, nstyles*sizeof(double)); + memset(cutmax_style, 0, nstyles*sizeof(double)); // multiple[i] = 1 to M if sub-style used multiple times, else 0 @@ -583,7 +584,7 @@ void PairHybrid::init_style() { int i,m,itype,jtype,used,istyle,skip; - memset(cutmax_style, 0.0, nstyles*sizeof(double)); + memset(cutmax_style, 0, nstyles*sizeof(double)); // error if a sub-style is not used @@ -822,8 +823,9 @@ void PairHybrid::read_restart(FILE *fp) delete[] compute_tally; styles = new Pair*[nstyles]; + delete[] cutmax_style; cutmax_style = new double[nstyles]; - memset(cutmax_style, 0.0, nstyles*sizeof(double)); + memset(cutmax_style, 0, nstyles*sizeof(double)); keywords = new char*[nstyles]; multiple = new int[nstyles]; From 7e6333fdd1f5986b138f01ec042b4cb9ae2858c9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 27 Jan 2023 20:48:32 -0500 Subject: [PATCH 090/445] remove dead code --- src/REAXFF/pair_reaxff.cpp | 2 +- src/REAXFF/reaxff_allocate.cpp | 6 ++---- src/REAXFF/reaxff_api.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/REAXFF/pair_reaxff.cpp b/src/REAXFF/pair_reaxff.cpp index d0713308c0..41a55aeca0 100644 --- a/src/REAXFF/pair_reaxff.cpp +++ b/src/REAXFF/pair_reaxff.cpp @@ -136,7 +136,7 @@ PairReaxFF::~PairReaxFF() Delete_List(api->lists+THREE_BODIES); Delete_List(api->lists+FAR_NBRS); - DeAllocate_Workspace(api->control, api->workspace); + DeAllocate_Workspace(api->workspace); DeAllocate_System(api->system); } diff --git a/src/REAXFF/reaxff_allocate.cpp b/src/REAXFF/reaxff_allocate.cpp index cad86df9e8..5b0a4e513c 100644 --- a/src/REAXFF/reaxff_allocate.cpp +++ b/src/REAXFF/reaxff_allocate.cpp @@ -62,7 +62,6 @@ namespace ReaxFF { void DeAllocate_System(reax_system *system) { - auto error = system->error_ptr; auto memory = system->mem_ptr; // deallocate the atom list @@ -78,13 +77,12 @@ namespace ReaxFF { } /************* workspace *************/ - void DeAllocate_Workspace(control_params *control, storage *workspace) + void DeAllocate_Workspace(storage *workspace) { if (!workspace->allocated) return; workspace->allocated = 0; - auto error = control->error_ptr; /* bond order storage */ sfree(workspace->total_bond_order); @@ -245,7 +243,7 @@ namespace ReaxFF { system->my_atoms = (reax_atom *)::realloc(system->my_atoms, system->total_cap*sizeof(reax_atom)); /* workspace */ - DeAllocate_Workspace(control, workspace); + DeAllocate_Workspace(workspace); Allocate_Workspace(control, workspace, system->total_cap); } diff --git a/src/REAXFF/reaxff_api.h b/src/REAXFF/reaxff_api.h index f2e5aa07da..44c0adb9b0 100644 --- a/src/REAXFF/reaxff_api.h +++ b/src/REAXFF/reaxff_api.h @@ -41,7 +41,7 @@ struct API { extern void Allocate_Workspace(control_params *, storage *, int); extern void DeAllocate_System(reax_system *); -extern void DeAllocate_Workspace(control_params *, storage *); +extern void DeAllocate_Workspace(storage *); extern void PreAllocate_Space(reax_system *, storage *); extern void ReAllocate(reax_system *, control_params *, simulation_data *, storage *, reax_list **); From 373b578dc02c3c1ed6c7a7e42fd3b77077922aa2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 27 Jan 2023 21:39:26 -0500 Subject: [PATCH 091/445] this is already checked for in Input class due to setting one_coeff = 1 --- src/REAXFF/pair_reaxff.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/REAXFF/pair_reaxff.cpp b/src/REAXFF/pair_reaxff.cpp index 41a55aeca0..e1580946fd 100644 --- a/src/REAXFF/pair_reaxff.cpp +++ b/src/REAXFF/pair_reaxff.cpp @@ -282,11 +282,6 @@ void PairReaxFF::coeff(int nargs, char **args) if (nargs != 3 + atom->ntypes) error->all(FLERR,"Incorrect args for pair coefficients"); - // ensure I,J args are * * - - if (strcmp(args[0],"*") != 0 || strcmp(args[1],"*") != 0) - error->all(FLERR,"Incorrect args for pair coefficients"); - // read ffield file Read_Force_Field(args[2], &(api->system->reax_param), api->control, world); From 66e3d8c56420173d6ea20f939fed2809cf80b048 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 27 Jan 2023 21:48:31 -0500 Subject: [PATCH 092/445] recover failing unit tests --- src/KOKKOS/pair_reaxff_kokkos.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/KOKKOS/pair_reaxff_kokkos.cpp b/src/KOKKOS/pair_reaxff_kokkos.cpp index 5b5e1fbbea..fbd74f24de 100644 --- a/src/KOKKOS/pair_reaxff_kokkos.cpp +++ b/src/KOKKOS/pair_reaxff_kokkos.cpp @@ -199,8 +199,6 @@ void PairReaxFFKokkos::setup() int i,j,k,m; int n = atom->ntypes; - setup_flag = 1; - // general parameters for (i = 0; i < 39; i ++) gp[i] = api->system->reax_param.gp.l[i]; From 2e52afbd86a80fea02d2917e58c4ed549a20f213 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 27 Jan 2023 22:12:33 -0500 Subject: [PATCH 093/445] consistently skip over computing interactions with atoms set to NULL in hybrid styles --- src/OPENMP/reaxff_bonds_omp.cpp | 1 + src/OPENMP/reaxff_forces_omp.cpp | 3 +++ src/OPENMP/reaxff_hydrogen_bonds_omp.cpp | 6 +++--- src/REAXFF/reaxff_bonds.cpp | 1 + src/REAXFF/reaxff_hydrogen_bonds.cpp | 9 +++++---- src/REAXFF/reaxff_init_md.cpp | 3 ++- src/REAXFF/reaxff_nonbonded.cpp | 8 ++++---- 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/OPENMP/reaxff_bonds_omp.cpp b/src/OPENMP/reaxff_bonds_omp.cpp index 41fb7a822a..234b17303f 100644 --- a/src/OPENMP/reaxff_bonds_omp.cpp +++ b/src/OPENMP/reaxff_bonds_omp.cpp @@ -99,6 +99,7 @@ namespace ReaxFF { /* set the pointers */ type_i = system->my_atoms[i].type; type_j = system->my_atoms[j].type; + if ((type_i < 0) || (type_j < 0)) continue; sbp_i = &(system->reax_param.sbp[type_i]); sbp_j = &(system->reax_param.sbp[type_j]); twbp = &(system->reax_param.tbp[type_i][type_j]); diff --git a/src/OPENMP/reaxff_forces_omp.cpp b/src/OPENMP/reaxff_forces_omp.cpp index 3cb938213f..50157da594 100644 --- a/src/OPENMP/reaxff_forces_omp.cpp +++ b/src/OPENMP/reaxff_forces_omp.cpp @@ -265,6 +265,7 @@ namespace ReaxFF { for (int i = 0; i < system->N; ++i) { atom_i = &(system->my_atoms[i]); type_i = atom_i->type; + if (type_i < 0) continue; sbp_i = &(system->reax_param.sbp[type_i]); start_i = Start_Index(i, far_nbrs); @@ -276,6 +277,7 @@ namespace ReaxFF { int j = nbr_pj->nbr; atom_j = &(system->my_atoms[j]); type_j = atom_j->type; + if (type_j < 0) continue; sbp_j = &(system->reax_param.sbp[type_j]); twbp = &(system->reax_param.tbp[type_i][type_j]); @@ -376,6 +378,7 @@ namespace ReaxFF { for (int i = 0; i < system->n; ++i) { atom_i = &(system->my_atoms[i]); type_i = atom_i->type; + if (type_i < 0) continue; sbp_i = &(system->reax_param.sbp[type_i]); ihb = sbp_i->p_hbond; diff --git a/src/OPENMP/reaxff_hydrogen_bonds_omp.cpp b/src/OPENMP/reaxff_hydrogen_bonds_omp.cpp index 6e1db5ffe7..94b1bb60e6 100644 --- a/src/OPENMP/reaxff_hydrogen_bonds_omp.cpp +++ b/src/OPENMP/reaxff_hydrogen_bonds_omp.cpp @@ -98,14 +98,14 @@ namespace ReaxFF { // for (j = 0; j < system->n; ++j) for (j = ifrom; j < ito; ++j) { /* j has to be of type H */ - if (system->reax_param.sbp[system->my_atoms[j].type].p_hbond == 1) { + type_j = system->my_atoms[j].type; + if (type_j < 0) continue; + if (system->reax_param.sbp[type_j].p_hbond == 1) { /*set j's variables */ - type_j = system->my_atoms[j].type; start_j = Start_Index(j, bonds); end_j = End_Index(j, bonds); hb_start_j = Start_Index(system->my_atoms[j].Hindex, hbonds); hb_end_j = End_Index(system->my_atoms[j].Hindex, hbonds); - if (type_j < 0) continue; top = 0; for (pi = start_j; pi < end_j; ++pi) { diff --git a/src/REAXFF/reaxff_bonds.cpp b/src/REAXFF/reaxff_bonds.cpp index cb28aaa1ca..c3e4b787c7 100644 --- a/src/REAXFF/reaxff_bonds.cpp +++ b/src/REAXFF/reaxff_bonds.cpp @@ -75,6 +75,7 @@ namespace ReaxFF { /* set the pointers */ type_i = system->my_atoms[i].type; type_j = system->my_atoms[j].type; + if ((type_i < 0) || (type_j < 0)) continue; sbp_i = &(system->reax_param.sbp[type_i]); sbp_j = &(system->reax_param.sbp[type_j]); twbp = &(system->reax_param.tbp[type_i][type_j]); diff --git a/src/REAXFF/reaxff_hydrogen_bonds.cpp b/src/REAXFF/reaxff_hydrogen_bonds.cpp index 421dd7e1a4..b66952a630 100644 --- a/src/REAXFF/reaxff_hydrogen_bonds.cpp +++ b/src/REAXFF/reaxff_hydrogen_bonds.cpp @@ -59,14 +59,14 @@ namespace ReaxFF { hbonds = (*lists) + HBONDS; hbond_list = hbonds->select.hbond_list; - for (j = 0; j < system->n; ++j) - if ((system->my_atoms[j].type >= 0) && (system->reax_param.sbp[system->my_atoms[j].type].p_hbond == 1)) { - type_j = system->my_atoms[j].type; + for (j = 0; j < system->n; ++j) { + type_j = system->my_atoms[j].type; + if (type_j < 0) continue; + if (system->reax_param.sbp[type_j].p_hbond == 1) { start_j = Start_Index(j, bonds); end_j = End_Index(j, bonds); hb_start_j = Start_Index(system->my_atoms[j].Hindex, hbonds); hb_end_j = End_Index(system->my_atoms[j].Hindex, hbonds); - if (type_j < 0) continue; top = 0; for (pi = start_j; pi < end_j; ++pi) { @@ -154,5 +154,6 @@ namespace ReaxFF { } } } + } } } diff --git a/src/REAXFF/reaxff_init_md.cpp b/src/REAXFF/reaxff_init_md.cpp index 55c7a03f7c..2d0459691f 100644 --- a/src/REAXFF/reaxff_init_md.cpp +++ b/src/REAXFF/reaxff_init_md.cpp @@ -56,7 +56,8 @@ namespace ReaxFF { if (control->hbond_cut > 0) for (i = 0; i < system->n; ++i) { atom = &(system->my_atoms[i]); - if ((atom->type >= 0) && (system->reax_param.sbp[atom->type].p_hbond == 1 && atom->type >= 0)) + if ((atom->type >= 0) + && (system->reax_param.sbp[atom->type].p_hbond == 1 && atom->type >= 0)) atom->Hindex = system->numH++; else atom->Hindex = -1; } diff --git a/src/REAXFF/reaxff_nonbonded.cpp b/src/REAXFF/reaxff_nonbonded.cpp index 7acab9915a..75cbd79b29 100644 --- a/src/REAXFF/reaxff_nonbonded.cpp +++ b/src/REAXFF/reaxff_nonbonded.cpp @@ -233,8 +233,8 @@ namespace ReaxFF { flag = 0; /* kinetic energy terms */ - double xcut = 0.5 * ( system->reax_param.sbp[ system->my_atoms[i].type ].bcut_acks2 - + system->reax_param.sbp[ system->my_atoms[j].type ].bcut_acks2 ); + double xcut = 0.5 * (system->reax_param.sbp[system->my_atoms[i].type].bcut_acks2 + + system->reax_param.sbp[system->my_atoms[j].type].bcut_acks2); if(nbr_pj->d <= xcut) { if (j < natoms) flag = 1; @@ -409,8 +409,8 @@ namespace ReaxFF { flag = 0; /* kinetic energy terms */ - double xcut = 0.5 * ( system->reax_param.sbp[ system->my_atoms[i].type ].bcut_acks2 - + system->reax_param.sbp[ system->my_atoms[j].type ].bcut_acks2 ); + double xcut = 0.5 * (system->reax_param.sbp[ system->my_atoms[i].type ].bcut_acks2 + + system->reax_param.sbp[ system->my_atoms[j].type ].bcut_acks2); if(nbr_pj->d <= xcut) { if (j < natoms) flag = 1; From 7b0153eee6ad79d025b0818d9b7d9b6fede29ee2 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Sat, 28 Jan 2023 00:34:55 -0600 Subject: [PATCH 094/445] Added lj/cut/dipole/cut/kk and lj/expand/coul/long/kk, added AtomVecKokkos, enabled FixNVESphereKokkos to update dipole --- src/DIPOLE/pair_lj_cut_dipole_cut.cpp | 2 + src/DIPOLE/pair_lj_cut_dipole_cut.h | 2 +- src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp | 2 + src/KOKKOS/atom_kokkos.h | 1 + src/KOKKOS/fix_nve_sphere_kokkos.cpp | 26 +- src/KOKKOS/fix_nve_sphere_kokkos.h | 1 + src/KOKKOS/kokkos_type.h | 38 +- src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp | 659 ++++++++++++++++++ src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h | 124 ++++ .../pair_lj_expand_coul_long_kokkos.cpp | 499 +++++++++++++ src/KOKKOS/pair_lj_expand_coul_long_kokkos.h | 149 ++++ src/atom_masks.h | 1 + 12 files changed, 1487 insertions(+), 17 deletions(-) create mode 100644 src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp create mode 100644 src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h create mode 100644 src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp create mode 100644 src/KOKKOS/pair_lj_expand_coul_long_kokkos.h diff --git a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp index a7e5674a88..237eaa183e 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp @@ -39,6 +39,8 @@ PairLJCutDipoleCut::PairLJCutDipoleCut(LAMMPS *lmp) : Pair(lmp) PairLJCutDipoleCut::~PairLJCutDipoleCut() { + if (copymode) return; + if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); diff --git a/src/DIPOLE/pair_lj_cut_dipole_cut.h b/src/DIPOLE/pair_lj_cut_dipole_cut.h index e563077835..03270f0489 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_cut.h +++ b/src/DIPOLE/pair_lj_cut_dipole_cut.h @@ -46,7 +46,7 @@ class PairLJCutDipoleCut : public Pair { double **epsilon, **sigma; double **lj1, **lj2, **lj3, **lj4, **offset; - void allocate(); + virtual void allocate(); }; } // namespace LAMMPS_NS diff --git a/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp b/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp index a63c41644f..119ad6edbf 100644 --- a/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp +++ b/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp @@ -60,6 +60,8 @@ PairLJExpandCoulLong::PairLJExpandCoulLong(LAMMPS *lmp) : Pair(lmp) PairLJExpandCoulLong::~PairLJExpandCoulLong() { + if (copymode) return; + if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); diff --git a/src/KOKKOS/atom_kokkos.h b/src/KOKKOS/atom_kokkos.h index 08bfaf20cd..8d2ae47f0e 100644 --- a/src/KOKKOS/atom_kokkos.h +++ b/src/KOKKOS/atom_kokkos.h @@ -34,6 +34,7 @@ class AtomKokkos : public Atom { DAT::tdual_float_1d k_q; DAT::tdual_float_1d k_radius; DAT::tdual_float_1d k_rmass; + DAT::tdual_float_1d_4 k_mu; DAT::tdual_v_array k_omega; DAT::tdual_v_array k_angmom; DAT::tdual_f_array k_torque; diff --git a/src/KOKKOS/fix_nve_sphere_kokkos.cpp b/src/KOKKOS/fix_nve_sphere_kokkos.cpp index a1e8e76cd8..51e57b839e 100644 --- a/src/KOKKOS/fix_nve_sphere_kokkos.cpp +++ b/src/KOKKOS/fix_nve_sphere_kokkos.cpp @@ -50,10 +50,6 @@ template void FixNVESphereKokkos::init() { FixNVESphere::init(); - - if (extra == DIPOLE) { - error->all(FLERR,"Fix nve/sphere/kk doesn't yet support dipole"); - } } /* ---------------------------------------------------------------------- */ @@ -61,7 +57,10 @@ void FixNVESphereKokkos::init() template void FixNVESphereKokkos::initial_integrate(int /*vflag*/) { - atomKK->sync(execution_space, X_MASK | V_MASK | OMEGA_MASK| F_MASK | TORQUE_MASK | RMASS_MASK | RADIUS_MASK | MASK_MASK); + if (extra == DIPOLE) + atomKK->sync(execution_space, X_MASK | V_MASK | OMEGA_MASK| F_MASK | TORQUE_MASK | RMASS_MASK | RADIUS_MASK | MASK_MASK | MU_MASK); + else + atomKK->sync(execution_space, X_MASK | V_MASK | OMEGA_MASK| F_MASK | TORQUE_MASK | RMASS_MASK | RADIUS_MASK | MASK_MASK); x = atomKK->k_x.view(); v = atomKK->k_v.view(); @@ -71,6 +70,7 @@ void FixNVESphereKokkos::initial_integrate(int /*vflag*/) mask = atomKK->k_mask.view(); rmass = atomKK->k_rmass.view(); radius = atomKK->k_radius.view(); + mu = atomKK->k_mu.view(); int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; @@ -78,7 +78,10 @@ void FixNVESphereKokkos::initial_integrate(int /*vflag*/) FixNVESphereKokkosInitialIntegrateFunctor f(this); Kokkos::parallel_for(nlocal,f); - atomKK->modified(execution_space, X_MASK | V_MASK | OMEGA_MASK); + if (extra == DIPOLE) + atomKK->modified(execution_space, X_MASK | V_MASK | OMEGA_MASK | MU_MASK); + else + atomKK->modified(execution_space, X_MASK | V_MASK | OMEGA_MASK); } /* ---------------------------------------------------------------------- */ @@ -102,6 +105,17 @@ void FixNVESphereKokkos::initial_integrate_item(const int i) const omega(i,0) += dtirotate * torque(i,0); omega(i,1) += dtirotate * torque(i,1); omega(i,2) += dtirotate * torque(i,2); + + if (extra == DIPOLE) { + const double g0 = mu(i,0) + dtv * (omega(i,1) * mu(i,2) - omega(i,2) * mu(i,1)); + const double g1 = mu(i,1) + dtv * (omega(i,2) * mu(i,0) - omega(i,0) * mu(i,2)); + const double g2 = mu(i,2) + dtv * (omega(i,0) * mu(i,1) - omega(i,1) * mu(i,0)); + const double msq = g0*g0 + g1*g1 + g2*g2; + const double scale = mu(i,3)/sqrt(msq); + mu(i,0) = g0*scale; + mu(i,1) = g1*scale; + mu(i,2) = g2*scale; + } } } diff --git a/src/KOKKOS/fix_nve_sphere_kokkos.h b/src/KOKKOS/fix_nve_sphere_kokkos.h index 551e64eb5c..268b4ea9ce 100644 --- a/src/KOKKOS/fix_nve_sphere_kokkos.h +++ b/src/KOKKOS/fix_nve_sphere_kokkos.h @@ -47,6 +47,7 @@ class FixNVESphereKokkos : public FixNVESphere { typename ArrayTypes::t_x_array x; typename ArrayTypes::t_v_array v; typename ArrayTypes::t_v_array omega; + typename ArrayTypes::t_mu_array mu; typename ArrayTypes::t_f_array f; typename ArrayTypes::t_f_array torque; typename ArrayTypes::t_float_1d rmass; diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index 7fa07b85c5..a496f6ff94 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -717,6 +717,11 @@ typedef tdual_float_3d::t_dev_um t_float_3d_um; typedef tdual_float_3d::t_dev_const_um t_float_3d_const_um; typedef tdual_float_3d::t_dev_const_randomread t_float_3d_randomread; +#ifdef LMP_KOKKOS_NO_LEGACY +typedef Kokkos::DualView tdual_float_1d_4; +#else +typedef Kokkos::DualView tdual_float_1d_4; +#endif //Position Types //1d X_FLOAT array n @@ -819,6 +824,14 @@ typedef tdual_f_array::t_dev_um t_f_array_um; typedef tdual_f_array::t_dev_const_um t_f_array_const_um; typedef tdual_f_array::t_dev_const_randomread t_f_array_randomread; +//2d F_FLOAT array n*4 (for dipoles and quaterions) + +typedef tdual_float_1d_4::t_dev t_mu_array; +typedef tdual_float_1d_4::t_dev_const t_mu_array_const; +typedef tdual_float_1d_4::t_dev_um t_mu_array_um; +typedef tdual_float_1d_4::t_dev_const_um t_mu_array_const_um; +typedef tdual_float_1d_4::t_dev_const_randomread t_mu_array_randomread; + //2d F_FLOAT array n*6 (for virial) typedef Kokkos::DualView tdual_virial_array; @@ -831,11 +844,7 @@ typedef tdual_virial_array::t_dev_const_randomread t_virial_array_randomread; // Spin Types //3d SP_FLOAT array n*4 -#ifdef LMP_KOKKOS_NO_LEGACY -typedef Kokkos::DualView tdual_float_1d_4; -#else -typedef Kokkos::DualView tdual_float_1d_4; -#endif + typedef tdual_float_1d_4::t_dev t_sp_array; typedef tdual_float_1d_4::t_dev_const t_sp_array_const; typedef tdual_float_1d_4::t_dev_um t_sp_array_um; @@ -1008,6 +1017,12 @@ typedef tdual_float_2d::t_host_um t_float_2d_um; typedef tdual_float_2d::t_host_const_um t_float_2d_const_um; typedef tdual_float_2d::t_host_const_randomread t_float_2d_randomread; +#ifdef LMP_KOKKOS_NO_LEGACY +typedef Kokkos::DualView tdual_float_1d_4; +#else +typedef Kokkos::DualView tdual_float_1d_4; +#endif + //Position Types //1d X_FLOAT array n typedef Kokkos::DualView tdual_xfloat_1d; @@ -1101,6 +1116,14 @@ typedef tdual_f_array::t_host_um t_f_array_um; typedef tdual_f_array::t_host_const_um t_f_array_const_um; typedef tdual_f_array::t_host_const_randomread t_f_array_randomread; +//2d F_FLOAT array n*4 (for dipoles and quaterions) + +typedef tdual_float_1d_4::t_host t_mu_array; +typedef tdual_float_1d_4::t_host_const t_mu_array_const; +typedef tdual_float_1d_4::t_host_um t_mu_array_um; +typedef tdual_float_1d_4::t_host_const_um t_mu_array_const_um; +typedef tdual_float_1d_4::t_host_const_randomread t_mu_array_randomread; + //2d F_FLOAT array n*6 (for virial) typedef Kokkos::DualView tdual_virial_array; typedef tdual_virial_array::t_host t_virial_array; @@ -1112,11 +1135,6 @@ typedef tdual_virial_array::t_host_const_randomread t_virial_array_randomread; // Spin types //2d X_FLOAT array n*4 -#ifdef LMP_KOKKOS_NO_LEGACY -typedef Kokkos::DualView tdual_float_1d_4; -#else -typedef Kokkos::DualView tdual_float_1d_4; -#endif typedef tdual_float_1d_4::t_host t_sp_array; typedef tdual_float_1d_4::t_host_const t_sp_array_const; typedef tdual_float_1d_4::t_host_um t_sp_array_um; diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp new file mode 100644 index 0000000000..ea0f41d4a9 --- /dev/null +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp @@ -0,0 +1,659 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS Development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Trung Nguyen (U Chicago) +------------------------------------------------------------------------- */ + +#include "pair_lj_cut_dipole_cut_kokkos.h" + +#include "atom_kokkos.h" +#include "atom_masks.h" +#include "error.h" +#include "force.h" +#include "kokkos.h" +#include "math_const.h" +#include "memory_kokkos.h" +#include "neigh_list_kokkos.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "respa.h" +#include "update.h" + +#include +#include + +using namespace LAMMPS_NS; +using namespace MathConst; + +#define KOKKOS_CUDA_MAX_THREADS 256 +#define KOKKOS_CUDA_MIN_BLOCKS 8 + +/* ---------------------------------------------------------------------- */ + +template +PairLJCutDipoleCutKokkos::PairLJCutDipoleCutKokkos(LAMMPS *lmp) : PairLJCutDipoleCut(lmp) +{ + respa_enable = 0; + + kokkosable = 1; + atomKK = (AtomKokkos *) atom; + execution_space = ExecutionSpaceFromDevice::space; + datamask_read = X_MASK | F_MASK | TORQUE_MASK | TYPE_MASK | Q_MASK | MU_MASK | ENERGY_MASK | VIRIAL_MASK; + datamask_modify = F_MASK | TORQUE_MASK | ENERGY_MASK | VIRIAL_MASK; +} + +/* ---------------------------------------------------------------------- */ + +template +PairLJCutDipoleCutKokkos::~PairLJCutDipoleCutKokkos() +{ + if (copymode) return; + + if (allocated) { + memoryKK->destroy_kokkos(k_eatom,eatom); + memoryKK->destroy_kokkos(k_vatom,vatom); + memoryKK->destroy_kokkos(k_cutsq,cutsq); + memoryKK->destroy_kokkos(k_cut_ljsq,cut_ljsq); + memoryKK->destroy_kokkos(k_cut_coulsq,cut_coulsq); + } +} + +/* ---------------------------------------------------------------------- */ + +template +void PairLJCutDipoleCutKokkos::compute(int eflag_in, int vflag_in) +{ + eflag = eflag_in; + vflag = vflag_in; + + if (neighflag == FULL) no_virial_fdotr_compute = 1; + + ev_init(eflag,vflag,0); + + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memoryKK->destroy_kokkos(k_eatom,eatom); + memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memoryKK->destroy_kokkos(k_vatom,vatom); + memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"pair:vatom"); + d_vatom = k_vatom.view(); + } + + atomKK->sync(execution_space,datamask_read); + k_cutsq.template sync(); + k_cut_ljsq.template sync(); + k_cut_coulsq.template sync(); + k_params.template sync(); + if (eflag || vflag) atomKK->modified(execution_space,datamask_modify); + else atomKK->modified(execution_space,F_MASK | TORQUE_MASK); + + x = atomKK->k_x.view(); + c_x = atomKK->k_x.view(); + f = atomKK->k_f.view(); + torque = atomKK->k_torque.view(); + q = atomKK->k_q.view(); + mu = atomKK->k_mu.view(); + type = atomKK->k_type.view(); + nlocal = atom->nlocal; + nall = atom->nlocal + atom->nghost; + special_lj[0] = force->special_lj[0]; + special_lj[1] = force->special_lj[1]; + special_lj[2] = force->special_lj[2]; + special_lj[3] = force->special_lj[3]; + special_coul[0] = force->special_coul[0]; + special_coul[1] = force->special_coul[1]; + special_coul[2] = force->special_coul[2]; + special_coul[3] = force->special_coul[3]; + qqrd2e = force->qqrd2e; + newton_pair = force->newton_pair; + + // get the neighbor list and neighbors used in operator() + + NeighListKokkos* k_list = static_cast*>(list); + d_numneigh = k_list->d_numneigh; + d_neighbors = k_list->d_neighbors; + d_ilist = k_list->d_ilist; + int inum = list->inum; + + // loop over neighbors of my atoms + + copymode = 1; + + EV_FLOAT ev; + + // compute kernel NEIGHFLAG,NEWTON_PAIR,EVFLAG,STACKPARAMS + if (atom->ntypes > MAX_TYPES_STACKPARAMS) { // STACKPARAMS==false + if (evflag) { // EVFLAG==1 + if (neighflag == HALF) { + if (newton_pair) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + } else if (neighflag == HALFTHREAD) { + if (newton_pair) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + } else if (neighflag == FULL) { + if (newton_pair) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + } + } else { // EVFLAG==0 + if (neighflag == HALF) { + if (newton_pair) Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } else if (neighflag == HALFTHREAD) { + if (newton_pair) Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } else if (neighflag == FULL) { + if (newton_pair) Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } + } + } else { // STACKPARAMS==true + if (evflag) { // EVFLAG==1 + if (neighflag == HALF) { + if (newton_pair) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + } else if (neighflag == HALFTHREAD) { + if (newton_pair) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + } else if (neighflag == FULL) { + if (newton_pair) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + } + } else { + if (neighflag == HALF) { + if (newton_pair) Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } else if (neighflag == HALFTHREAD) { + if (newton_pair) Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } else if (neighflag == FULL) { + if (newton_pair) Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } + } + } + + if (eflag) { + eng_vdwl += ev.evdwl; + eng_coul += ev.ecoul; + } + + if (vflag_global) { + virial[0] += ev.v[0]; + virial[1] += ev.v[1]; + virial[2] += ev.v[2]; + virial[3] += ev.v[3]; + virial[4] += ev.v[4]; + virial[5] += ev.v[5]; + } + + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + + copymode = 0; +} + +/* ---------------------------------------------------------------------- + needs torque as with AtomVecSphereKokkos + needs energy calculation as well + ---------------------------------------------------------------------- */ +template +template +KOKKOS_INLINE_FUNCTION +void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKernel, const int ii, EV_FLOAT &ev) const { + + // The f and torque arrays are atomic for Half/Thread neighbor style + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_torque = torque; + + const int i = d_ilist[ii]; + const X_FLOAT xtmp = x(i,0); + const X_FLOAT ytmp = x(i,1); + const X_FLOAT ztmp = x(i,2); + const X_FLOAT mui = mu(i,3); + const int itype = type(i); + const F_FLOAT qtmp = q[i]; + + const int jnum = d_numneigh[i]; + + F_FLOAT fx_i = 0.0; + F_FLOAT fy_i = 0.0; + F_FLOAT fz_i = 0.0; + F_FLOAT torquex_i = 0.0; + F_FLOAT torquey_i = 0.0; + F_FLOAT torquez_i = 0.0; + + for (int jj = 0; jj < jnum; jj++) { + int j = d_neighbors(i,jj); + const F_FLOAT factor_lj = special_lj[sbmask(j)]; + const F_FLOAT factor_coul = special_coul[sbmask(j)]; + j &= NEIGHMASK; + + const X_FLOAT delx = xtmp - x(j,0); + const X_FLOAT dely = ytmp - x(j,1); + const X_FLOAT delz = ztmp - x(j,2); + const int jtype = type(j); + const X_FLOAT muj = mu(j,3); + const F_FLOAT rsq = delx*delx + dely*dely + delz*delz; + + X_FLOAT cutsq_ij = STACKPARAMS?m_cutsq[itype][jtype]:d_cutsq(itype,jtype); + + if (rsq < cutsq_ij) { + const F_FLOAT r2inv = 1.0/rsq; + const F_FLOAT r6inv = r2inv*r2inv*r2inv; + F_FLOAT forcelj = 0; + F_FLOAT evdwl = 0; + F_FLOAT ecoul = 0; + F_FLOAT forcecoulx = 0; + F_FLOAT forcecouly = 0; + F_FLOAT forcecoulz = 0; + F_FLOAT tixcoul = 0; + F_FLOAT tiycoul = 0; + F_FLOAT tizcoul = 0; + F_FLOAT tjxcoul = 0; + F_FLOAT tjycoul = 0; + F_FLOAT tjzcoul = 0; + F_FLOAT fx = 0; + F_FLOAT fy = 0; + F_FLOAT fz = 0; + + // lj term + + X_FLOAT cut_ljsq_ij = STACKPARAMS?m_cut_ljsq[itype][jtype]:d_cut_ljsq(itype,jtype); + if (rsq < cut_ljsq_ij) { + forcelj = r6inv * ((STACKPARAMS?m_params[itype][jtype].lj1:params(itype,jtype).lj1)*r6inv - + (STACKPARAMS?m_params[itype][jtype].lj2:params(itype,jtype).lj2)); + forcelj *= r2inv; + if (eflag) { + evdwl = r6inv * ((STACKPARAMS?m_params[itype][jtype].lj3:params(itype,jtype).lj3)*r6inv - + (STACKPARAMS?m_params[itype][jtype].lj4:params(itype,jtype).lj4)) - + (STACKPARAMS?m_params[itype][jtype].offset:params(itype,jtype).offset); + evdwl *= factor_lj; + ev.evdwl += (((NEIGHFLAG==HALF || NEIGHFLAG==HALFTHREAD)&&(NEWTON_PAIR||(j 0.0 && muj > 0.0) { + + F_FLOAT r7inv = r5inv*r2inv; + + pdotp = mu(i,0)*mu(j,0) + mu(i,1)*mu(j,1) + mu(i,2)*mu(j,2); + pidotr = mu(i,0)*delx + mu(i,1)*dely + mu(i,2)*delz; + pjdotr = mu(j,0)*delx + mu(j,1)*dely + mu(j,2)*delz; + + X_FLOAT pre1 = 3.0*r5inv*pdotp - 15.0*r7inv*pidotr*pjdotr; + F_FLOAT pre2 = 3.0*r5inv*pjdotr; + F_FLOAT pre3 = 3.0*r5inv*pidotr; + F_FLOAT pre4 = -1.0*r3inv; + + forcecoulx += pre1*delx + pre2*mu(i,0) + pre3*mu(j,0); + forcecouly += pre1*dely + pre2*mu(i,1) + pre3*mu(j,1); + forcecoulz += pre1*delz + pre2*mu(i,2) + pre3*mu(j,2); + + F_FLOAT crossx = pre4 * (mu(i,1)*mu(j,2) - mu(i,2)*mu(j,1)); + F_FLOAT crossy = pre4 * (mu(i,2)*mu(j,0) - mu(i,0)*mu(j,2)); + F_FLOAT crossz = pre4 * (mu(i,0)*mu(j,1) - mu(i,1)*mu(j,0)); + + tixcoul += crossx + pre2 * (mu(i,1)*delz - mu(i,2)*dely); + tiycoul += crossy + pre2 * (mu(i,2)*delx - mu(i,0)*delz); + tizcoul += crossz + pre2 * (mu(i,0)*dely - mu(i,1)*delx); + tjxcoul += -crossx + pre3 * (mu(j,1)*delz - mu(j,2)*dely); + tjycoul += -crossy + pre3 * (mu(j,2)*delx - mu(j,0)*delz); + tjzcoul += -crossz + pre3 * (mu(j,0)*dely - mu(j,1)*delx); + } + + // dipole-charge + + if (mui > 0 && qj != 0) { + pidotr = mu(i,0)*delx + mu(i,1)*dely + mu(i,2)*delz; + F_FLOAT pre1 = 3.0*qj*r5inv * pidotr; + F_FLOAT pre2 = qj*r3inv; + + forcecoulx += pre2*mu(i,0) - pre1*delx; + forcecouly += pre2*mu(i,1) - pre1*dely; + forcecoulz += pre2*mu(i,2) - pre1*delz; + tixcoul += pre2 * (mu(i,1)*delz - mu(i,2)*dely); + tiycoul += pre2 * (mu(i,2)*delx - mu(i,0)*delz); + tizcoul += pre2 * (mu(i,0)*dely - mu(i,1)*delx); + } + + // charge-dipole + + if (qtmp != 0 && muj > 0) { + pjdotr = mu(j,0)*delx + mu(j,1)*dely + mu(j,2)*delz; + X_FLOAT pre1 = 3.0*qtmp*r5inv * pjdotr; + X_FLOAT pre2 = qtmp*r3inv; + + forcecoulx += pre1*delx - pre2*mu(j,0); + forcecouly += pre1*dely - pre2*mu(j,1); + forcecoulz += pre1*delz - pre2*mu(j,2); + tjxcoul += -pre2 * (mu(j,1)*delz - mu(j,2)*dely); + tjycoul += -pre2 * (mu(j,2)*delx - mu(j,0)*delz); + tjzcoul += -pre2 * (mu(j,0)*dely - mu(j,1)*delx); + } + + F_FLOAT fq = factor_coul*qqrd2e; + fx = fq*forcecoulx + delx*forcelj; + fy = fq*forcecouly + dely*forcelj; + fz = fq*forcecoulz + delz*forcelj; + + // force & torque accumulation + + fx_i += fx; + fy_i += fy; + fz_i += fz; + torquex_i += fq*tixcoul; + torquey_i += fq*tiycoul; + torquez_i += fq*tizcoul; + + if ((NEIGHFLAG==HALF || NEIGHFLAG==HALFTHREAD) && (NEWTON_PAIR || j < nlocal)) { + a_f(j,0) -= fx; + a_f(j,1) -= fy; + a_f(j,2) -= fz; + a_torque(j,0) += fq*tjxcoul; + a_torque(j,1) += fq*tjycoul; + a_torque(j,2) += fq*tjzcoul; + } + + if (eflag) { + ecoul = qtmp*qj*rinv; + if (mu(i,3) > 0.0 && mu(j,3) > 0.0) + ecoul += r3inv*pdotp - 3.0*r5inv*pidotr*pjdotr; + if (mu(i,3) > 0.0 && qj != 0.0) + ecoul += -qj*r3inv*pidotr; + if (mu(j,3) > 0.0 && qtmp != 0.0) + ecoul += qtmp*r3inv*pjdotr; + ecoul *= factor_coul*qqrd2e; + ev.ecoul += (((NEIGHFLAG==HALF || NEIGHFLAG==HALFTHREAD)&&(NEWTON_PAIR||(j(ev, i, j, fx, fy, fz, delx, dely, delz); + if (EVFLAG == 1) + ev_tally_xyz(ev, i, j, fx, fy, fz, delx, dely, delz); + } + + } // cutsq_ij + } + + a_f(i,0) += fx_i; + a_f(i,1) += fy_i; + a_f(i,2) += fz_i; + a_torque(i,0) += torquex_i; + a_torque(i,1) += torquey_i; + a_torque(i,2) += torquez_i; +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKernel, const int ii) const { + EV_FLOAT ev; + this->template operator()(TagPairLJCutDipoleCutKernel(), ii, ev); +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairLJCutDipoleCutKokkos::ev_tally_xyz(EV_FLOAT &ev, int i, int j, + F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, + X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const +{ + F_FLOAT v[6]; + + v[0] = delx*fx; + v[1] = dely*fy; + v[2] = delz*fz; + v[3] = delx*fy; + v[4] = delx*fz; + v[5] = dely*fz; + + if (NEIGHFLAG != FULL) { + if (NEWTON_PAIR) { // neigh half, newton on + ev.v[0] += v[0]; + ev.v[1] += v[1]; + ev.v[2] += v[2]; + ev.v[3] += v[3]; + ev.v[4] += v[4]; + ev.v[5] += v[5]; + } else { // neigh half, newton off + if (i < nlocal) { + ev.v[0] += 0.5*v[0]; + ev.v[1] += 0.5*v[1]; + ev.v[2] += 0.5*v[2]; + ev.v[3] += 0.5*v[3]; + ev.v[4] += 0.5*v[4]; + ev.v[5] += 0.5*v[5]; + } + if (j < nlocal) { + ev.v[0] += 0.5*v[0]; + ev.v[1] += 0.5*v[1]; + ev.v[2] += 0.5*v[2]; + ev.v[3] += 0.5*v[3]; + ev.v[4] += 0.5*v[4]; + ev.v[5] += 0.5*v[5]; + } + } + + } else { // NEIGHFLAG == FULL + ev.v[0] += 0.5*v[0]; + ev.v[1] += 0.5*v[1]; + ev.v[2] += 0.5*v[2]; + ev.v[3] += 0.5*v[3]; + ev.v[4] += 0.5*v[4]; + ev.v[5] += 0.5*v[5]; + } + +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairLJCutDipoleCutKokkos::ev_tally_xyz_atom(EV_FLOAT & /*ev*/, int i, int j, + F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, + X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const +{ + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); + + F_FLOAT v[6]; + + v[0] = delx*fx; + v[1] = dely*fy; + v[2] = delz*fz; + v[3] = delx*fy; + v[4] = delx*fz; + v[5] = dely*fz; + + if (NEWTON_PAIR || i < nlocal) { + v_vatom(i,0) += 0.5*v[0]; + v_vatom(i,1) += 0.5*v[1]; + v_vatom(i,2) += 0.5*v[2]; + v_vatom(i,3) += 0.5*v[3]; + v_vatom(i,4) += 0.5*v[4]; + v_vatom(i,5) += 0.5*v[5]; + } + if (NEWTON_PAIR || j < nlocal) { + v_vatom(j,0) += 0.5*v[0]; + v_vatom(j,1) += 0.5*v[1]; + v_vatom(j,2) += 0.5*v[2]; + v_vatom(j,3) += 0.5*v[3]; + v_vatom(j,4) += 0.5*v[4]; + v_vatom(j,5) += 0.5*v[5]; + } +} + +/* ---------------------------------------------------------------------- + allocate all arrays +------------------------------------------------------------------------- */ + +template +void PairLJCutDipoleCutKokkos::allocate() +{ + PairLJCutDipoleCut::allocate(); + + int n = atom->ntypes; + memory->destroy(cutsq); + memoryKK->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq"); + d_cutsq = k_cutsq.template view(); + memory->destroy(cut_ljsq); + memoryKK->create_kokkos(k_cut_ljsq,cut_ljsq,n+1,n+1,"pair:cut_ljsq"); + d_cut_ljsq = k_cut_ljsq.template view(); + memory->destroy(cut_coulsq); + memoryKK->create_kokkos(k_cut_coulsq,cut_coulsq,n+1,n+1,"pair:cut_coulsq"); + d_cut_coulsq = k_cut_coulsq.template view(); + k_params = Kokkos::DualView("PairLJCutDipoleCut::params",n+1,n+1); + params = k_params.template view(); +} + +/* ---------------------------------------------------------------------- + global settings +------------------------------------------------------------------------- */ + +template +void PairLJCutDipoleCutKokkos::settings(int narg, char **arg) +{ + if (narg > 2) error->all(FLERR,"Illegal pair_style command"); + + PairLJCutDipoleCut::settings(1,arg); +} + +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +template +void PairLJCutDipoleCutKokkos::init_style() +{ + PairLJCutDipoleCut::init_style(); + + // error if rRESPA with inner levels + + if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) { + int respa = 0; + if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; + if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; + if (respa) + error->all(FLERR,"Cannot use Kokkos pair style with rRESPA inner/middle"); + } + + // adjust neighbor list request for KOKKOS + + neighflag = lmp->kokkos->neighflag; + auto request = neighbor->find_request(this); + request->set_kokkos_host(std::is_same::value && + !std::is_same::value); + request->set_kokkos_device(std::is_same::value); + if (neighflag == FULL) request->enable_full(); +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +template +double PairLJCutDipoleCutKokkos::init_one(int i, int j) +{ + double cutone = PairLJCutDipoleCut::init_one(i,j); + double cut_ljsqm = cut_ljsq[i][j]; + double cut_coulsqm = cut_coulsq[i][j]; + + k_params.h_view(i,j).lj1 = lj1[i][j]; + k_params.h_view(i,j).lj2 = lj2[i][j]; + k_params.h_view(i,j).lj3 = lj3[i][j]; + k_params.h_view(i,j).lj4 = lj4[i][j]; + k_params.h_view(i,j).offset = offset[i][j]; + k_params.h_view(i,j).cut_ljsq = cut_ljsqm; + k_params.h_view(i,j).cut_coulsq = cut_coulsqm; + + k_params.h_view(j,i) = k_params.h_view(i,j); + if (i(); + k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm; + k_cut_ljsq.template modify(); + k_cut_coulsq.h_view(i,j) = k_cut_coulsq.h_view(j,i) = cut_coulsqm; + k_cut_coulsq.template modify(); + k_params.template modify(); + + return cutone; +} + +/* ---------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +int PairLJCutDipoleCutKokkos::sbmask(const int& j) const { + return j >> SBBITS & 3; +} + + +namespace LAMMPS_NS { +template class PairLJCutDipoleCutKokkos; +#ifdef LMP_KOKKOS_GPU +template class PairLJCutDipoleCutKokkos; +#endif +} + diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h new file mode 100644 index 0000000000..b2a60ba0ff --- /dev/null +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h @@ -0,0 +1,124 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS Development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS +// clang-format off +PairStyle(lj/cut/dipole/cut/kk,PairLJCutDipoleCutKokkos); +PairStyle(lj/cut/dipole/cut/kk/device,PairLJCutDipoleCutKokkos); +PairStyle(lj/cut/dipole/cut/kk/host,PairLJCutDipoleCutKokkos); +// clang-format on +#else + +// clang-format off +#ifndef LMP_PAIR_LJ_CUT_DIPOLE_CUT_KOKKOS_H +#define LMP_PAIR_LJ_CUT_DIPOLE_CUT_KOKKOS_H + +#include "pair_kokkos.h" +#include "pair_lj_cut_dipole_cut.h" +#include "neigh_list_kokkos.h" + +namespace LAMMPS_NS { + +template +struct TagPairLJCutDipoleCutKernel{}; + +template +class PairLJCutDipoleCutKokkos : public PairLJCutDipoleCut { + public: + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; + enum {COUL_FLAG=1}; + typedef DeviceType device_type; + typedef ArrayTypes AT; + typedef EV_FLOAT value_type; + PairLJCutDipoleCutKokkos(class LAMMPS *); + ~PairLJCutDipoleCutKokkos() override; + + void compute(int, int) override; + + void settings(int, char **) override; + void init_style() override; + double init_one(int, int) override; + + template + KOKKOS_INLINE_FUNCTION + void operator()(TagPairLJCutDipoleCutKernel, const int, EV_FLOAT &ev) const; + template + KOKKOS_INLINE_FUNCTION + void operator()(TagPairLJCutDipoleCutKernel, const int) const; + + template + KOKKOS_INLINE_FUNCTION + void ev_tally_xyz(EV_FLOAT &ev, int i, int j, + F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, + X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const; + template + KOKKOS_INLINE_FUNCTION + void ev_tally_xyz_atom(EV_FLOAT &ev, int i, int j, + F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, + X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const; + + KOKKOS_INLINE_FUNCTION + int sbmask(const int& j) const; + + protected: + Kokkos::DualView k_params; + typename Kokkos::DualView::t_dev_const_um params; + // hardwired to space for 12 atom types + params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + + F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_f_array torque; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; + typename AT::t_mu_array_randomread mu; + typename AT::t_mu_array c_mu; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; + + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; + + + int neighflag,newton_pair; + int nlocal,nall,eflag,vflag; + + double special_coul[4]; + double special_lj[4]; + double qqrd2e; + + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; + + void allocate() override; + friend void pair_virial_fdotr_compute(PairLJCutDipoleCutKokkos*); +}; + +} + +#endif +#endif + diff --git a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp new file mode 100644 index 0000000000..559b120266 --- /dev/null +++ b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp @@ -0,0 +1,499 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS Development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Trung Nguyen (U Chicago) +------------------------------------------------------------------------- */ + +#include "pair_lj_expand_coul_long_kokkos.h" + +#include "atom_kokkos.h" +#include "atom_masks.h" +#include "error.h" +#include "force.h" +#include "kokkos.h" +#include "math_const.h" +#include "memory_kokkos.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "respa.h" +#include "update.h" + +#include +#include + +using namespace LAMMPS_NS; +using namespace MathConst; + + +#define EWALD_F 1.12837917 +#define EWALD_P 0.3275911 +#define A1 0.254829592 +#define A2 -0.284496736 +#define A3 1.421413741 +#define A4 -1.453152027 +#define A5 1.061405429 + +/* ---------------------------------------------------------------------- */ + +template +PairLJExpandCoulLongKokkos::PairLJExpandCoulLongKokkos(LAMMPS *lmp) : PairLJExpandCoulLong(lmp) +{ + respa_enable = 0; + + kokkosable = 1; + atomKK = (AtomKokkos *) atom; + execution_space = ExecutionSpaceFromDevice::space; + datamask_read = X_MASK | F_MASK | TYPE_MASK | Q_MASK | ENERGY_MASK | VIRIAL_MASK; + datamask_modify = F_MASK | ENERGY_MASK | VIRIAL_MASK; +} + +/* ---------------------------------------------------------------------- */ + +template +PairLJExpandCoulLongKokkos::~PairLJExpandCoulLongKokkos() +{ + if (copymode) return; + + if (allocated) { + memoryKK->destroy_kokkos(k_eatom,eatom); + memoryKK->destroy_kokkos(k_vatom,vatom); + memoryKK->destroy_kokkos(k_cutsq,cutsq); + memoryKK->destroy_kokkos(k_cut_ljsq,cut_ljsq); + } +} + +/* ---------------------------------------------------------------------- */ + +template +void PairLJExpandCoulLongKokkos::compute(int eflag_in, int vflag_in) +{ + eflag = eflag_in; + vflag = vflag_in; + + if (neighflag == FULL) no_virial_fdotr_compute = 1; + + ev_init(eflag,vflag,0); + + + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memoryKK->destroy_kokkos(k_eatom,eatom); + memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memoryKK->destroy_kokkos(k_vatom,vatom); + memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"pair:vatom"); + d_vatom = k_vatom.view(); + } + + atomKK->sync(execution_space,datamask_read); + k_cutsq.template sync(); + k_cut_ljsq.template sync(); + k_params.template sync(); + if (eflag || vflag) atomKK->modified(execution_space,datamask_modify); + else atomKK->modified(execution_space,F_MASK); + + x = atomKK->k_x.view(); + c_x = atomKK->k_x.view(); + f = atomKK->k_f.view(); + q = atomKK->k_q.view(); + type = atomKK->k_type.view(); + nlocal = atom->nlocal; + nall = atom->nlocal + atom->nghost; + special_lj[0] = force->special_lj[0]; + special_lj[1] = force->special_lj[1]; + special_lj[2] = force->special_lj[2]; + special_lj[3] = force->special_lj[3]; + special_coul[0] = force->special_coul[0]; + special_coul[1] = force->special_coul[1]; + special_coul[2] = force->special_coul[2]; + special_coul[3] = force->special_coul[3]; + qqrd2e = force->qqrd2e; + newton_pair = force->newton_pair; + + // loop over neighbors of my atoms + + copymode = 1; + + EV_FLOAT ev; + if (ncoultablebits) + ev = pair_compute,CoulLongTable<1> > + (this,(NeighListKokkos*)list); + else + ev = pair_compute,CoulLongTable<0> > + (this,(NeighListKokkos*)list); + + + if (eflag) { + eng_vdwl += ev.evdwl; + eng_coul += ev.ecoul; + } + if (vflag_global) { + virial[0] += ev.v[0]; + virial[1] += ev.v[1]; + virial[2] += ev.v[2]; + virial[3] += ev.v[3]; + virial[4] += ev.v[4]; + virial[5] += ev.v[5]; + } + + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + + copymode = 0; +} + +/* ---------------------------------------------------------------------- + compute LJ 12-6 pair force between atoms i and j + ---------------------------------------------------------------------- */ +template +template +KOKKOS_INLINE_FUNCTION +F_FLOAT PairLJExpandCoulLongKokkos:: +compute_fpair(const F_FLOAT& rsq, const int& /*i*/, const int& /*j*/, + const int& itype, const int& jtype) const { + const F_FLOAT r = sqrt(rsq); + const F_FLOAT rshift = r - (STACKPARAMS?m_params[itype][jtype].shift:params(itype,jtype).shift); + const F_FLOAT rshiftsq = rshift*rshift; + const F_FLOAT r2inv = 1.0/rshiftsq; + const F_FLOAT r6inv = r2inv*r2inv*r2inv; + + const F_FLOAT forcelj = r6inv * + ((STACKPARAMS?m_params[itype][jtype].lj1:params(itype,jtype).lj1)*r6inv - + (STACKPARAMS?m_params[itype][jtype].lj2:params(itype,jtype).lj2)); + + return forcelj/rshift/r; +} + +/* ---------------------------------------------------------------------- + compute coulomb pair force between atoms i and j + ---------------------------------------------------------------------- */ +template +template +KOKKOS_INLINE_FUNCTION +F_FLOAT PairLJExpandCoulLongKokkos:: +compute_fcoul(const F_FLOAT& rsq, const int& /*i*/, const int&j, + const int& /*itype*/, const int& /*jtype*/, const F_FLOAT& factor_coul, const F_FLOAT& qtmp) const { + if (Specialisation::DoTable && rsq > tabinnersq) { + union_int_float_t rsq_lookup; + rsq_lookup.f = rsq; + const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits; + const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable]; + const F_FLOAT table = d_ftable[itable] + fraction*d_dftable[itable]; + F_FLOAT forcecoul = qtmp*q[j] * table; + if (factor_coul < 1.0) { + const F_FLOAT table = d_ctable[itable] + fraction*d_dctable[itable]; + const F_FLOAT prefactor = qtmp*q[j] * table; + forcecoul -= (1.0-factor_coul)*prefactor; + } + return forcecoul/rsq; + } else { + const F_FLOAT r = sqrt(rsq); + const F_FLOAT grij = g_ewald * r; + const F_FLOAT expm2 = exp(-grij*grij); + const F_FLOAT t = 1.0 / (1.0 + EWALD_P*grij); + const F_FLOAT rinv = 1.0/r; + const F_FLOAT erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; + const F_FLOAT prefactor = qqrd2e * qtmp*q[j]*rinv; + F_FLOAT forcecoul = prefactor * (erfc + EWALD_F*grij*expm2); + if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor; + + return forcecoul*rinv*rinv; + } +} + +/* ---------------------------------------------------------------------- + compute LJ 12-6 pair potential energy between atoms i and j + ---------------------------------------------------------------------- */ +template +template +KOKKOS_INLINE_FUNCTION +F_FLOAT PairLJExpandCoulLongKokkos:: +compute_evdwl(const F_FLOAT& rsq, const int& /*i*/, const int& /*j*/, + const int& itype, const int& jtype) const { + + const F_FLOAT r = sqrt(rsq); + const F_FLOAT rshift = r - (STACKPARAMS?m_params[itype][jtype].shift:params(itype,jtype).shift); + const F_FLOAT rshiftsq = rshift*rshift; + const F_FLOAT r2inv = 1.0/rshiftsq; + const F_FLOAT r6inv = r2inv*r2inv*r2inv; + + return r6inv*((STACKPARAMS?m_params[itype][jtype].lj3:params(itype,jtype).lj3)*r6inv + - (STACKPARAMS?m_params[itype][jtype].lj4:params(itype,jtype).lj4)) + - (STACKPARAMS?m_params[itype][jtype].offset:params(itype,jtype).offset); +} + +/* ---------------------------------------------------------------------- + compute coulomb pair potential energy between atoms i and j + ---------------------------------------------------------------------- */ +template +template +KOKKOS_INLINE_FUNCTION +F_FLOAT PairLJExpandCoulLongKokkos:: +compute_ecoul(const F_FLOAT& rsq, const int& /*i*/, const int&j, + const int& /*itype*/, const int& /*jtype*/, + const F_FLOAT& factor_coul, const F_FLOAT& qtmp) const { + if (Specialisation::DoTable && rsq > tabinnersq) { + union_int_float_t rsq_lookup; + rsq_lookup.f = rsq; + const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits; + const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable]; + const F_FLOAT table = d_etable[itable] + fraction*d_detable[itable]; + F_FLOAT ecoul = qtmp*q[j] * table; + if (factor_coul < 1.0) { + const F_FLOAT table = d_ctable[itable] + fraction*d_dctable[itable]; + const F_FLOAT prefactor = qtmp*q[j] * table; + ecoul -= (1.0-factor_coul)*prefactor; + } + return ecoul; + } else { + const F_FLOAT r = sqrt(rsq); + const F_FLOAT grij = g_ewald * r; + const F_FLOAT expm2 = exp(-grij*grij); + const F_FLOAT t = 1.0 / (1.0 + EWALD_P*grij); + const F_FLOAT erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; + const F_FLOAT prefactor = qqrd2e * qtmp*q[j]/r; + F_FLOAT ecoul = prefactor * erfc; + if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor; + return ecoul; + } +} + +/* ---------------------------------------------------------------------- + allocate all arrays +------------------------------------------------------------------------- */ + +template +void PairLJExpandCoulLongKokkos::allocate() +{ + PairLJExpandCoulLong::allocate(); + + int n = atom->ntypes; + memory->destroy(cutsq); + memoryKK->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq"); + d_cutsq = k_cutsq.template view(); + + memory->destroy(cut_ljsq); + memoryKK->create_kokkos(k_cut_ljsq,cut_ljsq,n+1,n+1,"pair:cut_ljsq"); + d_cut_ljsq = k_cut_ljsq.template view(); + + d_cut_coulsq = typename AT::t_ffloat_2d("pair:cut_coulsq",n+1,n+1); + + k_params = Kokkos::DualView("PairLJExpandCoulLong::params",n+1,n+1); + params = k_params.template view(); +} + +template +void PairLJExpandCoulLongKokkos::init_tables(double cut_coul, double *cut_respa) +{ + Pair::init_tables(cut_coul,cut_respa); + + typedef typename ArrayTypes::t_ffloat_1d table_type; + typedef typename ArrayTypes::t_ffloat_1d host_table_type; + + int ntable = 1; + for (int i = 0; i < ncoultablebits; i++) ntable *= 2; + + + // Copy rtable and drtable + { + host_table_type h_table("HostTable",ntable); + table_type d_table("DeviceTable",ntable); + for (int i = 0; i < ntable; i++) { + h_table(i) = rtable[i]; + } + Kokkos::deep_copy(d_table,h_table); + d_rtable = d_table; + } + + { + host_table_type h_table("HostTable",ntable); + table_type d_table("DeviceTable",ntable); + for (int i = 0; i < ntable; i++) { + h_table(i) = drtable[i]; + } + Kokkos::deep_copy(d_table,h_table); + d_drtable = d_table; + } + + { + host_table_type h_table("HostTable",ntable); + table_type d_table("DeviceTable",ntable); + + // Copy ftable and dftable + for (int i = 0; i < ntable; i++) { + h_table(i) = ftable[i]; + } + Kokkos::deep_copy(d_table,h_table); + d_ftable = d_table; + } + + { + host_table_type h_table("HostTable",ntable); + table_type d_table("DeviceTable",ntable); + + for (int i = 0; i < ntable; i++) { + h_table(i) = dftable[i]; + } + Kokkos::deep_copy(d_table,h_table); + d_dftable = d_table; + } + + { + host_table_type h_table("HostTable",ntable); + table_type d_table("DeviceTable",ntable); + + // Copy ctable and dctable + for (int i = 0; i < ntable; i++) { + h_table(i) = ctable[i]; + } + Kokkos::deep_copy(d_table,h_table); + d_ctable = d_table; + } + + { + host_table_type h_table("HostTable",ntable); + table_type d_table("DeviceTable",ntable); + + for (int i = 0; i < ntable; i++) { + h_table(i) = dctable[i]; + } + Kokkos::deep_copy(d_table,h_table); + d_dctable = d_table; + } + + { + host_table_type h_table("HostTable",ntable); + table_type d_table("DeviceTable",ntable); + + // Copy etable and detable + for (int i = 0; i < ntable; i++) { + h_table(i) = etable[i]; + } + Kokkos::deep_copy(d_table,h_table); + d_etable = d_table; + } + + { + host_table_type h_table("HostTable",ntable); + table_type d_table("DeviceTable",ntable); + + for (int i = 0; i < ntable; i++) { + h_table(i) = detable[i]; + } + Kokkos::deep_copy(d_table,h_table); + d_detable = d_table; + } +} + + +/* ---------------------------------------------------------------------- + global settings +------------------------------------------------------------------------- */ + +template +void PairLJExpandCoulLongKokkos::settings(int narg, char **arg) +{ + if (narg > 2) error->all(FLERR,"Illegal pair_style command"); + + PairLJExpandCoulLong::settings(narg,arg); +} + +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +template +void PairLJExpandCoulLongKokkos::init_style() +{ + PairLJExpandCoulLong::init_style(); + + Kokkos::deep_copy(d_cut_coulsq,cut_coulsq); + + // error if rRESPA with inner levels + + if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) { + int respa = 0; + if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; + if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; + if (respa) + error->all(FLERR,"Cannot use Kokkos pair style with rRESPA inner/middle"); + } + + // adjust neighbor list request for KOKKOS + + neighflag = lmp->kokkos->neighflag; + auto request = neighbor->find_request(this); + request->set_kokkos_host(std::is_same::value && + !std::is_same::value); + request->set_kokkos_device(std::is_same::value); + if (neighflag == FULL) request->enable_full(); +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +template +double PairLJExpandCoulLongKokkos::init_one(int i, int j) +{ + double cutone = PairLJExpandCoulLong::init_one(i,j); + double cut_ljsqm = cut_ljsq[i][j]; + + k_params.h_view(i,j).lj1 = lj1[i][j]; + k_params.h_view(i,j).lj2 = lj2[i][j]; + k_params.h_view(i,j).lj3 = lj3[i][j]; + k_params.h_view(i,j).lj4 = lj4[i][j]; + k_params.h_view(i,j).offset = offset[i][j]; + k_params.h_view(i,j).shift = shift[i][j]; + k_params.h_view(i,j).cut_ljsq = cut_ljsqm; + k_params.h_view(i,j).cut_coulsq = cut_coulsq; + + k_params.h_view(j,i) = k_params.h_view(i,j); + if (i(); + k_cut_ljsq.h_view(i,j) = k_cut_ljsq.h_view(j,i) = cut_ljsqm; + k_cut_ljsq.template modify(); + k_params.template modify(); + + return cutone; +} + +namespace LAMMPS_NS { +template class PairLJExpandCoulLongKokkos; +#ifdef LMP_KOKKOS_GPU +template class PairLJExpandCoulLongKokkos; +#endif +} + diff --git a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h new file mode 100644 index 0000000000..906db19e11 --- /dev/null +++ b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h @@ -0,0 +1,149 @@ +// clang-format off +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS Development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS +// clang-format off +PairStyle(lj/expand/coul/long/kk,PairLJExpandCoulLongKokkos); +PairStyle(lj/expand/coul/long/kk/device,PairLJExpandCoulLongKokkos); +PairStyle(lj/expand/coul/long/kk/host,PairLJExpandCoulLongKokkos); +// clang-format on +#else + +// clang-format off +#ifndef LMP_PAIR_LJ_EXPAND_COUL_LONG_KOKKOS_H +#define LMP_PAIR_LJ_EXPAND_COUL_LONG_KOKKOS_H + +#include "pair_kokkos.h" +#include "pair_lj_expand_coul_long.h" +#include "neigh_list_kokkos.h" + +namespace LAMMPS_NS { + +template +class PairLJExpandCoulLongKokkos : public PairLJExpandCoulLong { + public: + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; + enum {COUL_FLAG=1}; + typedef DeviceType device_type; + typedef ArrayTypes AT; + PairLJExpandCoulLongKokkos(class LAMMPS *); + ~PairLJExpandCoulLongKokkos() override; + + void compute(int, int) override; + + void settings(int, char **) override; + void init_tables(double cut_coul, double *cut_respa) override; + void init_style() override; + double init_one(int, int) override; + + struct params_lj_coul{ + KOKKOS_INLINE_FUNCTION + params_lj_coul() {cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;shift=0;}; + KOKKOS_INLINE_FUNCTION + params_lj_coul(int /*i*/) {cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;shift=0;}; + F_FLOAT cut_ljsq,cut_coulsq,lj1,lj2,lj3,lj4,offset,shift; + }; + + protected: + template + KOKKOS_INLINE_FUNCTION + F_FLOAT compute_fpair(const F_FLOAT& rsq, const int& i, const int&j, + const int& itype, const int& jtype) const; + + template + KOKKOS_INLINE_FUNCTION + F_FLOAT compute_fcoul(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, + const int& jtype, const F_FLOAT& factor_coul, const F_FLOAT& qtmp) const; + + template + KOKKOS_INLINE_FUNCTION + F_FLOAT compute_evdwl(const F_FLOAT& rsq, const int& i, const int&j, + const int& itype, const int& jtype) const; + + template + KOKKOS_INLINE_FUNCTION + F_FLOAT compute_ecoul(const F_FLOAT& rsq, const int& i, const int&j, + const int& itype, const int& jtype, const F_FLOAT& factor_coul, const F_FLOAT& qtmp) const; + + Kokkos::DualView k_params; + typename Kokkos::DualView::t_dev_const_um params; + // hardwired to space for 12 atom types + params_lj_coul m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + + F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; + + int newton_pair; + + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::t_ffloat_2d d_cut_coulsq; + + typename AT::t_ffloat_1d_randomread + d_rtable, d_drtable, d_ftable, d_dftable, + d_ctable, d_dctable, d_etable, d_detable; + + int neighflag; + int nlocal,nall,eflag,vflag; + + double special_coul[4]; + double special_lj[4]; + double qqrd2e; + + void allocate() override; + friend struct PairComputeFunctor >; + friend struct PairComputeFunctor >; + friend struct PairComputeFunctor >; + friend struct PairComputeFunctor >; + friend struct PairComputeFunctor >; + friend struct PairComputeFunctor >; + friend EV_FLOAT pair_compute_neighlist >(PairLJExpandCoulLongKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute_neighlist >(PairLJExpandCoulLongKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute_neighlist >(PairLJExpandCoulLongKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute >(PairLJExpandCoulLongKokkos*, + NeighListKokkos*); + friend struct PairComputeFunctor >; + friend struct PairComputeFunctor >; + friend struct PairComputeFunctor >; + friend struct PairComputeFunctor >; + friend struct PairComputeFunctor >; + friend struct PairComputeFunctor >; + friend EV_FLOAT pair_compute_neighlist >(PairLJExpandCoulLongKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute_neighlist >(PairLJExpandCoulLongKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute_neighlist >(PairLJExpandCoulLongKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute >(PairLJExpandCoulLongKokkos*, + NeighListKokkos*); + friend void pair_virial_fdotr_compute(PairLJExpandCoulLongKokkos*); + +}; + +} + +#endif +#endif + diff --git a/src/atom_masks.h b/src/atom_masks.h index f94ecd6cbd..0058c3f57f 100644 --- a/src/atom_masks.h +++ b/src/atom_masks.h @@ -42,6 +42,7 @@ #define MAP_MASK 0x00008000 #define ENERGY_MASK 0x00010000 #define VIRIAL_MASK 0x00020000 +#define MU_MASK 0x00040000 // SPIN From 9c46f4dd3943b836aff030963f98dd408cc5365d Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Sat, 28 Jan 2023 11:22:45 -0600 Subject: [PATCH 095/445] Updated doc pages --- doc/src/pair_dipole.rst | 2 +- doc/src/pair_lj_expand.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/pair_dipole.rst b/doc/src/pair_dipole.rst index 6253b2916d..b0655b4ca5 100644 --- a/doc/src/pair_dipole.rst +++ b/doc/src/pair_dipole.rst @@ -11,7 +11,7 @@ pair_style lj/cut/dipole/cut command ==================================== -Accelerator Variants: *lj/cut/dipole/cut/gpu*, *lj/cut/dipole/cut/omp* +Accelerator Variants: *lj/cut/dipole/cut/gpu*, *lj/cut/dipole/cut/kk*, *lj/cut/dipole/cut/omp* pair_style lj/sf/dipole/sf command ================================== diff --git a/doc/src/pair_lj_expand.rst b/doc/src/pair_lj_expand.rst index dca7a2dd2f..4a1d7bcbf1 100644 --- a/doc/src/pair_lj_expand.rst +++ b/doc/src/pair_lj_expand.rst @@ -13,7 +13,7 @@ Accelerator Variants: *lj/expand/gpu*, *lj/expand/kk*, *lj/expand/omp* pair_style lj/expand/coul/long command ====================================== -Accelerator Variants: *lj/expand/coul/long/gpu* +Accelerator Variants: *lj/expand/coul/long/gpu*, *lj/expand/coul/long/kk* Syntax """""" From 370c701f8905c88e1582eeb6eea16d29b7b82a96 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 29 Jan 2023 13:42:36 -0500 Subject: [PATCH 096/445] whitespace --- doc/src/Fortran.rst | 12 ++++++------ python/lammps/core.py | 10 +++++----- src/library.cpp | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/src/Fortran.rst b/doc/src/Fortran.rst index 43e443f6e7..2daa7b0734 100644 --- a/doc/src/Fortran.rst +++ b/doc/src/Fortran.rst @@ -1641,9 +1641,9 @@ Procedures Bound to the :f:type:`lammps` Derived Type .. versionadded:: TBD This function copies the list of all dihedrals into an allocatable array. - The array will be filled with (dihedral type, dihedral atom 1, dihedral atom 2, - dihedral atom 3, dihedral atom 4) for each dihedral. The array is allocated to - the right length (i.e., five times the number of dihedrals). + The array will be filled with (dihedral type, dihedral atom 1, dihedral atom 2, + dihedral atom 3, dihedral atom 4) for each dihedral. The array is allocated to + the right length (i.e., five times the number of dihedrals). The array *data* must be of the same type as the LAMMPS ``tagint`` type, which is equivalent to either ``INTEGER(c_int)`` or ``INTEGER(c_int64_t)``, depending on whether ``-DLAMMPS_BIGBIG`` was used @@ -1687,9 +1687,9 @@ Procedures Bound to the :f:type:`lammps` Derived Type .. versionadded:: TBD This function copies the list of all impropers into an allocatable array. - The array will be filled with (improper type, improper atom 1, improper atom 2, - improper atom 3, improper atom 4) for each improper. The array is allocated to - the right length (i.e., five times the number of impropers). + The array will be filled with (improper type, improper atom 1, improper atom 2, + improper atom 3, improper atom 4) for each improper. The array is allocated to + the right length (i.e., five times the number of impropers). The array *data* must be of the same type as the LAMMPS ``tagint`` type, which is equivalent to either ``INTEGER(c_int)`` or ``INTEGER(c_int64_t)``, depending on whether ``-DLAMMPS_BIGBIG`` was used diff --git a/python/lammps/core.py b/python/lammps/core.py index 17c19ebded..e4f8d807b6 100644 --- a/python/lammps/core.py +++ b/python/lammps/core.py @@ -217,8 +217,8 @@ class lammps(object): self.lib.lammps_gather_dihedrals.restype = None self.lib.lammps_gather_impropers.argtypes = [c_void_p,c_void_p] - self.lib.lammps_gather_impropers.restype = None - + self.lib.lammps_gather_impropers.restype = None + self.lib.lammps_gather.argtypes = [c_void_p,c_char_p,c_int,c_int,c_void_p] self.lib.lammps_gather.restype = None @@ -1330,7 +1330,7 @@ class lammps(object): return nangles,data # ------------------------------------------------------------------------- - + def gather_dihedrals(self): """Retrieve global list of dihedrals @@ -1375,8 +1375,8 @@ class lammps(object): self.lib.lammps_gather_impropers(self.lmp,data) return nimpropers,data - # ------------------------------------------------------------------------- - + # ------------------------------------------------------------------------- + # return vector of atom/compute/fix properties gathered across procs # 3 variants to match src/library.cpp # name = atom property recognized by LAMMPS in atom->extract() diff --git a/src/library.cpp b/src/library.cpp index 17b4de44e3..3d4d2b5102 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -3275,7 +3275,7 @@ void lammps_gather_angles(void *handle, void *data) This function copies the list of all dihedrals into a buffer provided by the calling code. The buffer will be filled with dihedral type, dihedral atom 1, -dihedral atom 2, dihedral atom 3, dihedral atom 4 for each dihedral. +dihedral atom 2, dihedral atom 3, dihedral atom 4 for each dihedral. Thus the buffer has to be allocated to the dimension of 5 times the **total** number of dihedrals times the size of the LAMMPS "tagint" type, which is either 4 or 8 bytes depending on @@ -3386,7 +3386,7 @@ void lammps_gather_dihedrals(void *handle, void *data) This function copies the list of all impropers into a buffer provided by the calling code. The buffer will be filled with improper type, improper atom 1, -improper atom 2, improper atom 3, improper atom 4 for each improper. +improper atom 2, improper atom 3, improper atom 4 for each improper. Thus the buffer has to be allocated to the dimension of 5 times the **total** number of impropers times the size of the LAMMPS "tagint" type, which is either 4 or 8 bytes depending on From f653ad7990cdf00336dceb4da328b01072531f0b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 29 Jan 2023 14:13:28 -0500 Subject: [PATCH 097/445] add unit tests for c-library interface --- .../c-library/test_library_scatter_gather.cpp | 234 ++++++++++++++++++ 1 file changed, 234 insertions(+) diff --git a/unittest/c-library/test_library_scatter_gather.cpp b/unittest/c-library/test_library_scatter_gather.cpp index c2b1604091..ee672c9b86 100644 --- a/unittest/c-library/test_library_scatter_gather.cpp +++ b/unittest/c-library/test_library_scatter_gather.cpp @@ -92,6 +92,7 @@ TEST_F(GatherProperties, gather_bonds_newton_on) } EXPECT_EQ(count, 10); delete[] bonds; +#undef CHECK_BOND }; TEST_F(GatherProperties, gather_bonds_newton_off) @@ -132,4 +133,237 @@ TEST_F(GatherProperties, gather_bonds_newton_off) } EXPECT_EQ(count, 10); delete[] bonds; +#undef CHECK_BOND +}; + +TEST_F(GatherProperties, gather_angles_newton_on) +{ + if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); + std::string input = path_join(INPUT_DIR, "in.fourmol"); + if (!verbose) ::testing::internal::CaptureStdout(); + lammps_command(lmp, "newton on on"); + lammps_file(lmp, input.c_str()); + if (!verbose) ::testing::internal::GetCapturedStdout(); + + bigint nangles = *(bigint *)lammps_extract_global(lmp, "nangles"); + EXPECT_EQ(nangles, 30); + + tagint *angles = new tagint[4 * nangles]; + lammps_gather_angles(lmp, angles); + +#define CHECK_ANGLE(idx, type, atom1, atom2, atom3) \ + if (((angles[4 * idx + 1] == atom1) && (angles[4 * idx + 2] == atom2) && \ + (angles[4 * idx + 3] == atom3)) || \ + ((angles[4 * idx + 1] == atom3) && (angles[4 * idx + 2] == atom2) && \ + (angles[4 * idx + 3] == atom1))) { \ + EXPECT_EQ(angles[4 * idx], type); \ + ++count; \ + } + + // check validity of a few angles by comparing the angle type and counting the matches. + int count = 0; + for (bigint i = 0; i < nangles; ++i) { + CHECK_ANGLE(i, 4, 2, 1, 3); + CHECK_ANGLE(i, 4, 1, 3, 5); + CHECK_ANGLE(i, 4, 1, 3, 4); + CHECK_ANGLE(i, 4, 13, 12, 15); + CHECK_ANGLE(i, 4, 13, 12, 14); + CHECK_ANGLE(i, 2, 5, 3, 6); + CHECK_ANGLE(i, 2, 4, 3, 6); + CHECK_ANGLE(i, 3, 3, 6, 7); + CHECK_ANGLE(i, 3, 3, 6, 8); + CHECK_ANGLE(i, 1, 22, 21, 23); + } + EXPECT_EQ(count, 10); + delete[] angles; +#undef CHECK_ANGLE +}; + +TEST_F(GatherProperties, gather_angles_newton_off) +{ + if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); + std::string input = path_join(INPUT_DIR, "in.fourmol"); + if (!verbose) ::testing::internal::CaptureStdout(); + lammps_command(lmp, "newton off off"); + lammps_file(lmp, input.c_str()); + if (!verbose) ::testing::internal::GetCapturedStdout(); + + bigint nangles = *(bigint *)lammps_extract_global(lmp, "nangles"); + EXPECT_EQ(nangles, 30); + + tagint *angles = new tagint[4 * nangles]; + lammps_gather_angles(lmp, angles); + +#define CHECK_ANGLE(idx, type, atom1, atom2, atom3) \ + if (((angles[4 * idx + 1] == atom1) && (angles[4 * idx + 2] == atom2) && \ + (angles[4 * idx + 3] == atom3)) || \ + ((angles[4 * idx + 1] == atom3) && (angles[4 * idx + 2] == atom2) && \ + (angles[4 * idx + 3] == atom1))) { \ + EXPECT_EQ(angles[4 * idx], type); \ + ++count; \ + } + + // check validity of a few angles by comparing the angle type and counting the matches. + int count = 0; + for (bigint i = 0; i < nangles; ++i) { + CHECK_ANGLE(i, 4, 2, 1, 3); + CHECK_ANGLE(i, 4, 1, 3, 5); + CHECK_ANGLE(i, 4, 1, 3, 4); + CHECK_ANGLE(i, 4, 13, 12, 15); + CHECK_ANGLE(i, 4, 13, 12, 14); + CHECK_ANGLE(i, 2, 5, 3, 6); + CHECK_ANGLE(i, 2, 4, 3, 6); + CHECK_ANGLE(i, 3, 3, 6, 7); + CHECK_ANGLE(i, 3, 3, 6, 8); + CHECK_ANGLE(i, 1, 22, 21, 23); + } + EXPECT_EQ(count, 10); + delete[] angles; +#undef CHECK_ANGLES +}; + +TEST_F(GatherProperties, gather_dihedrals_newton_on) +{ + if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); + std::string input = path_join(INPUT_DIR, "in.fourmol"); + if (!verbose) ::testing::internal::CaptureStdout(); + lammps_command(lmp, "newton on on"); + lammps_file(lmp, input.c_str()); + if (!verbose) ::testing::internal::GetCapturedStdout(); + + bigint ndihedrals = *(bigint *)lammps_extract_global(lmp, "ndihedrals"); + EXPECT_EQ(ndihedrals, 31); + + tagint *dihedrals = new tagint[5 * ndihedrals]; + lammps_gather_dihedrals(lmp, dihedrals); + +#define CHECK_DIHEDRAL(idx, type, atom1, atom2, atom3, atom4) \ + if ((dihedrals[5 * idx + 1] == atom1) && (dihedrals[5 * idx + 2] == atom2) && \ + (dihedrals[5 * idx + 3] == atom3) && (dihedrals[5 * idx + 4] == atom4)) { \ + EXPECT_EQ(dihedrals[5 * idx], type); \ + ++count; \ + } + + // check validity of a few dihedrals by comparing the dihedral type and counting the matches. + int count = 0; + for (bigint i = 0; i < ndihedrals; ++i) { + CHECK_DIHEDRAL(i, 2, 2, 1, 3, 6); + CHECK_DIHEDRAL(i, 2, 2, 1, 3, 4); + CHECK_DIHEDRAL(i, 3, 2, 1, 3, 5); + CHECK_DIHEDRAL(i, 1, 1, 3, 6, 8); + CHECK_DIHEDRAL(i, 1, 1, 3, 6, 7); + CHECK_DIHEDRAL(i, 5, 4, 3, 6, 8); + CHECK_DIHEDRAL(i, 5, 4, 3, 6, 7); + CHECK_DIHEDRAL(i, 5, 16, 10, 12, 13); + CHECK_DIHEDRAL(i, 5, 16, 10, 12, 14); + CHECK_DIHEDRAL(i, 5, 16, 10, 12, 15); + } + EXPECT_EQ(count, 10); + delete[] dihedrals; +#undef CHECK_DIHEDRAL +}; + +TEST_F(GatherProperties, gather_dihedrals_newton_off) +{ + if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); + std::string input = path_join(INPUT_DIR, "in.fourmol"); + if (!verbose) ::testing::internal::CaptureStdout(); + lammps_command(lmp, "newton off off"); + lammps_file(lmp, input.c_str()); + if (!verbose) ::testing::internal::GetCapturedStdout(); + + bigint ndihedrals = *(bigint *)lammps_extract_global(lmp, "ndihedrals"); + EXPECT_EQ(ndihedrals, 31); + + tagint *dihedrals = new tagint[5 * ndihedrals]; + lammps_gather_dihedrals(lmp, dihedrals); + +#define CHECK_DIHEDRAL(idx, type, atom1, atom2, atom3, atom4) \ + if ((dihedrals[5 * idx + 1] == atom1) && (dihedrals[5 * idx + 2] == atom2) && \ + (dihedrals[5 * idx + 3] == atom3) && (dihedrals[5 * idx + 4] == atom4)) { \ + EXPECT_EQ(dihedrals[5 * idx], type); \ + ++count; \ + } + // check validity of a few dihedrals by comparing the dihedral type and counting the matches. + int count = 0; + for (bigint i = 0; i < ndihedrals; ++i) { + CHECK_DIHEDRAL(i, 2, 2, 1, 3, 6); + CHECK_DIHEDRAL(i, 2, 2, 1, 3, 4); + CHECK_DIHEDRAL(i, 3, 2, 1, 3, 5); + CHECK_DIHEDRAL(i, 1, 1, 3, 6, 8); + CHECK_DIHEDRAL(i, 1, 1, 3, 6, 7); + CHECK_DIHEDRAL(i, 5, 4, 3, 6, 8); + CHECK_DIHEDRAL(i, 5, 4, 3, 6, 7); + CHECK_DIHEDRAL(i, 5, 16, 10, 12, 13); + CHECK_DIHEDRAL(i, 5, 16, 10, 12, 14); + CHECK_DIHEDRAL(i, 5, 16, 10, 12, 15); + } + EXPECT_EQ(count, 10); + delete[] dihedrals; +#undef CHECK_DIHEDRALS +}; + +TEST_F(GatherProperties, gather_impropers_newton_on) +{ + if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); + std::string input = path_join(INPUT_DIR, "in.fourmol"); + if (!verbose) ::testing::internal::CaptureStdout(); + lammps_command(lmp, "newton on on"); + lammps_file(lmp, input.c_str()); + if (!verbose) ::testing::internal::GetCapturedStdout(); + + bigint nimpropers = *(bigint *)lammps_extract_global(lmp, "nimpropers"); + EXPECT_EQ(nimpropers, 2); + + tagint *impropers = new tagint[5 * nimpropers]; + lammps_gather_impropers(lmp, impropers); + +#define CHECK_IMPROPER(idx, type, atom1, atom2, atom3, atom4) \ + if ((impropers[5 * idx + 1] == atom1) && (impropers[5 * idx + 2] == atom2) && \ + (impropers[5 * idx + 3] == atom3) && (impropers[5 * idx + 4] == atom4)) { \ + EXPECT_EQ(impropers[5 * idx], type); \ + ++count; \ + } + + // check validity of a few impropers by comparing the improper type and counting the matches. + int count = 0; + for (bigint i = 0; i < nimpropers; ++i) { + CHECK_IMPROPER(i, 1, 6, 3, 8, 7); + CHECK_IMPROPER(i, 2, 8, 6, 10, 9); + } + EXPECT_EQ(count, 2); + delete[] impropers; +#undef CHECK_IMPROPER +}; + +TEST_F(GatherProperties, gather_impropers_newton_off) +{ + if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); + std::string input = path_join(INPUT_DIR, "in.fourmol"); + if (!verbose) ::testing::internal::CaptureStdout(); + lammps_command(lmp, "newton off off"); + lammps_file(lmp, input.c_str()); + if (!verbose) ::testing::internal::GetCapturedStdout(); + + bigint nimpropers = *(bigint *)lammps_extract_global(lmp, "nimpropers"); + EXPECT_EQ(nimpropers, 2); + + tagint *impropers = new tagint[5 * nimpropers]; + lammps_gather_impropers(lmp, impropers); + +#define CHECK_IMPROPER(idx, type, atom1, atom2, atom3, atom4) \ + if ((impropers[5 * idx + 1] == atom1) && (impropers[5 * idx + 2] == atom2) && \ + (impropers[5 * idx + 3] == atom3) && (impropers[5 * idx + 4] == atom4)) { \ + EXPECT_EQ(impropers[5 * idx], type); \ + ++count; \ + } + // check validity of a few impropers by comparing the improper type and counting the matches. + int count = 0; + for (bigint i = 0; i < nimpropers; ++i) { + CHECK_IMPROPER(i, 1, 6, 3, 8, 7); + CHECK_IMPROPER(i, 2, 8, 6, 10, 9); + } + EXPECT_EQ(count, 2); + delete[] impropers; +#undef CHECK_IMPROPERS }; From 2a18c76361b2fe71bb39d440fc8d74532ab56c38 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 29 Jan 2023 23:55:11 -0500 Subject: [PATCH 098/445] preparations for unit tests of the Fortran module --- unittest/fortran/CMakeLists.txt | 1 + unittest/fortran/data.fourmol | 210 +++++++++++++++++++++++ unittest/fortran/in.fourmol | 25 +++ unittest/fortran/wrap_gather_scatter.cpp | 10 +- 4 files changed, 244 insertions(+), 2 deletions(-) create mode 100644 unittest/fortran/data.fourmol create mode 100644 unittest/fortran/in.fourmol diff --git a/unittest/fortran/CMakeLists.txt b/unittest/fortran/CMakeLists.txt index 138af65f18..b03b4c32ca 100644 --- a/unittest/fortran/CMakeLists.txt +++ b/unittest/fortran/CMakeLists.txt @@ -73,6 +73,7 @@ if(CMAKE_Fortran_COMPILER) add_test(NAME FortranExtractVariable COMMAND test_fortran_extract_variable) add_executable(test_fortran_gather_scatter wrap_gather_scatter.cpp test_fortran_gather_scatter.f90) + target_compile_definitions(test_fortran_gather_scatter PRIVATE -DTEST_INPUT_FOLDER=${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(test_fortran_gather_scatter PRIVATE flammps lammps GTest::GTestMain) add_test(NAME FortranGatherScatter COMMAND test_fortran_gather_scatter) diff --git a/unittest/fortran/data.fourmol b/unittest/fortran/data.fourmol new file mode 100644 index 0000000000..386ad81c49 --- /dev/null +++ b/unittest/fortran/data.fourmol @@ -0,0 +1,210 @@ +LAMMPS data file via write_data, version 5 May 2020, timestep = 0 + +29 atoms +5 atom types +24 bonds +5 bond types +30 angles +4 angle types +31 dihedrals +5 dihedral types +2 impropers +2 improper types + + -6.024572 8.975428 xlo xhi + -7.692866 7.307134 ylo yhi + -8.086924 6.913076 zlo zhi + +Masses + +1 12.0107 +2 4.00794 +3 14.0067 +4 15.9994 +5 15.9994 + +Pair Coeffs # zero + +1 +2 +3 +4 +5 + +Bond Coeffs # zero + +1 1.5 +2 1.1 +3 1.3 +4 1.2 +5 1 + +Angle Coeffs # zero + +1 110.1 +2 111 +3 120 +4 108.5 + +Atoms # full + +10 2 1 7.0000000000000007e-02 2.0185283555536988e+00 -1.4283966846517357e+00 -9.6733527271133024e-01 0 0 0 +11 2 2 8.9999999999999997e-02 1.7929780509347666e+00 -1.9871047540768743e+00 -1.8840626643185674e+00 0 0 0 +12 2 1 -2.7000000000000002e-01 3.0030247876861225e+00 -4.8923319967572748e-01 -1.6188658531537248e+00 0 0 0 +13 2 2 8.9999999999999997e-02 4.0447273787895934e+00 -9.0131998547446246e-01 -1.6384447268320836e+00 0 0 0 +14 2 2 8.9999999999999997e-02 2.6033152817257075e+00 -4.0789761505963579e-01 -2.6554413538823063e+00 0 0 0 +2 1 2 3.1000000000000000e-01 3.0197083955402204e-01 2.9515239068888608e+00 -8.5689735572907566e-01 0 0 0 +3 1 1 -2.0000000000000000e-02 -6.9435377880558602e-01 1.2440473127136711e+00 -6.2233801468892025e-01 0 0 0 +4 1 2 8.9999999999999997e-02 -1.5771614164685133e+00 1.4915333140468066e+00 -1.2487126845040522e+00 0 0 0 +6 1 1 5.1000000000000001e-01 2.9412607937706009e-01 2.2719282656652909e-01 -1.2843094067857870e+00 0 0 0 +7 1 4 -5.1000000000000001e-01 3.4019871062879609e-01 -9.1277350075786561e-03 -2.4633113224304561e+00 0 0 0 +19 3 2 4.2359999999999998e-01 1.5349125211132961e+00 2.6315969880333707e+00 -4.2472859440220647e+00 0 0 0 +15 2 2 8.9999999999999997e-02 2.9756315249791303e+00 5.6334269722969288e-01 -1.2437650754599008e+00 0 0 0 +18 3 4 -8.4719999999999995e-01 2.1384791188033843e+00 3.0177261773770208e+00 -3.5160827596876225e+00 0 0 0 +20 3 2 4.2359999999999998e-01 2.7641167828863153e+00 3.6833419064000221e+00 -3.9380850623312638e+00 0 0 0 +8 2 3 -4.6999999999999997e-01 1.1641187171852805e+00 -4.8375305955385234e-01 -6.7659823767368688e-01 0 0 0 +9 2 2 3.1000000000000000e-01 1.3777459838125838e+00 -2.5366338669522998e-01 2.6877644730326306e-01 0 0 0 +16 2 1 5.1000000000000001e-01 2.6517554244980306e+00 -2.3957110424978438e+00 3.2908335999178327e-02 0 0 0 +17 2 4 -5.1000000000000001e-01 2.2309964792710639e+00 -2.1022918943319384e+00 1.1491948328949437e+00 0 0 0 +1 1 3 -4.6999999999999997e-01 -2.7993683669226832e-01 2.4726588069312840e+00 -1.7200860244148433e-01 0 0 0 +5 1 2 8.9999999999999997e-02 -8.9501761359359255e-01 9.3568128743071344e-01 4.0227731871484346e-01 0 0 0 +21 4 5 -8.4719999999999995e-01 4.9064454390208301e+00 -4.0751205255383196e+00 -3.6215576073601046e+00 0 0 0 +22 4 2 4.2359999999999998e-01 4.3687453488627543e+00 -4.2054270536772504e+00 -4.4651491269372565e+00 0 0 0 +23 4 2 4.2359999999999998e-01 5.7374928154769504e+00 -3.5763355905184966e+00 -3.8820297194230728e+00 0 0 0 +24 5 5 -8.4719999999999995e-01 2.0684115301174013e+00 3.1518221747664397e+00 3.1554242678474576e+00 0 0 0 +25 5 2 4.2359999999999998e-01 1.2998381073113014e+00 3.2755513587518097e+00 2.5092990173114837e+00 0 0 0 +26 5 2 4.2359999999999998e-01 2.5807438597688113e+00 4.0120175892854135e+00 3.2133398379059099e+00 0 0 0 +27 6 5 -8.4719999999999995e-01 -1.9613581876744359e+00 -4.3556300596085160e+00 2.1101467673534788e+00 0 0 0 +28 6 2 4.2359999999999998e-01 -2.7406520384725965e+00 -4.0207251278130975e+00 1.5828689861678511e+00 0 0 0 +29 6 2 4.2359999999999998e-01 -1.3108232656499081e+00 -3.5992986322410760e+00 2.2680459788743503e+00 0 0 0 + +Velocities + +1 7.7867804888392077e-04 5.8970331623292821e-04 -2.2179517633030531e-04 +2 2.7129529964126462e-03 4.6286427111164284e-03 3.5805549693846352e-03 +3 -1.2736791029204805e-03 1.6108674226414498e-03 -3.3618185901550799e-04 +4 -9.2828595122009308e-04 -1.2537885319521818e-03 -4.1204974953432108e-03 +5 -1.1800848061603740e-03 7.5424401975844038e-04 6.9023177964912290e-05 +6 -3.0914004879905335e-04 1.2755385764678133e-03 7.9574303350202582e-04 +7 -1.1037894966874103e-04 -7.6764845099077425e-04 -7.7217630460203659e-04 +8 3.9060281273221989e-04 -8.1444231918053418e-04 1.5134641148324972e-04 +9 1.2475530960659720e-03 -2.6608454451432528e-03 1.1117602907112732e-03 +10 4.5008983776042893e-04 4.9530197647538077e-04 -2.3336234361093645e-04 +11 -3.6977669078869707e-04 -1.5289071951960539e-03 -2.9176389881837113e-03 +12 1.0850834530183159e-03 -6.4965897903201833e-04 -1.2971152622619948e-03 +13 4.0754559196230639e-03 3.5043502394946119e-03 -7.8324487687854666e-04 +14 -1.3837220448746613e-04 -4.0656048637594394e-03 -3.9333461173944500e-03 +15 -4.3301707382721859e-03 -3.1802661664634938e-03 3.2037919043360571e-03 +16 -9.6715751018414326e-05 -5.0016572678960377e-04 1.4945658875149626e-03 +17 6.5692180538157174e-04 3.6635779995305095e-04 8.3495414466050911e-04 +18 -6.0936815808025862e-04 -9.3774557532468582e-04 -3.3558072507805731e-04 +19 -6.9919768291957119e-04 -3.6060777270430031e-03 4.2833405289822791e-03 +20 4.7777805013736515e-03 5.1003745845520452e-03 1.8002873923729241e-03 +21 -9.5568188553430398e-04 1.6594630943762931e-04 -1.8199788009966615e-04 +22 -3.3137518957653462e-03 -2.8683968287936054e-03 3.6384389958326871e-03 +23 2.4209481134686401e-04 -4.5457709985051130e-03 2.7663581642115042e-03 +24 2.5447450568861086e-04 4.8412447786110117e-04 -4.8021914527341357e-04 +25 4.3722771097312743e-03 -4.5184411669545515e-03 2.5200952006556795e-03 +26 -1.9250110555001179e-03 -3.0342169883610837e-03 3.5062814567984532e-03 +27 -2.6510179146429716e-04 3.6306203629019116e-04 -5.6235585400647747e-04 +28 -2.3068708109787484e-04 -8.5663070212203200e-04 2.1302563179109169e-03 +29 -2.5054744388303732e-03 -1.6773997805290820e-04 2.8436699761004796e-03 + +Bonds + +1 5 1 2 +2 3 1 3 +3 2 3 4 +4 2 3 5 +5 1 3 6 +6 3 6 8 +7 4 6 7 +8 5 8 9 +9 3 8 10 +10 2 10 11 +11 1 10 12 +12 1 10 16 +13 2 12 13 +14 2 12 14 +15 2 12 15 +16 4 16 17 +17 5 18 19 +18 5 18 20 +19 5 21 22 +20 5 21 23 +21 5 24 25 +22 5 24 26 +23 5 27 28 +24 5 27 29 + +Angles + +1 4 2 1 3 +2 4 1 3 5 +3 4 1 3 4 +4 4 1 3 6 +5 4 4 3 5 +6 2 5 3 6 +7 2 4 3 6 +8 3 3 6 7 +9 3 3 6 8 +10 3 7 6 8 +11 2 6 8 9 +12 2 9 8 10 +13 3 6 8 10 +14 2 8 10 11 +15 3 8 10 16 +16 2 11 10 12 +17 1 12 10 16 +18 1 8 10 12 +19 2 11 10 16 +20 2 10 12 15 +21 2 10 12 14 +22 2 10 12 13 +23 4 13 12 15 +24 4 13 12 14 +25 4 14 12 15 +26 4 10 16 17 +27 1 19 18 20 +28 1 22 21 23 +29 1 25 24 26 +30 1 28 27 29 + +Dihedrals + +1 2 2 1 3 6 +2 2 2 1 3 4 +3 3 2 1 3 5 +4 1 1 3 6 8 +5 1 1 3 6 7 +6 5 4 3 6 8 +7 5 4 3 6 7 +8 5 5 3 6 8 +9 5 5 3 6 7 +10 4 3 6 8 9 +11 3 3 6 8 10 +12 3 7 6 8 9 +13 4 7 6 8 10 +14 2 6 8 10 12 +15 2 6 8 10 16 +16 2 6 8 10 11 +17 2 9 8 10 12 +18 4 9 8 10 16 +19 5 9 8 10 11 +20 5 8 10 12 13 +21 1 8 10 12 14 +22 5 8 10 12 15 +23 4 8 10 16 17 +24 5 11 10 12 13 +25 5 11 10 12 14 +26 5 11 10 12 15 +27 2 11 10 16 17 +28 2 12 10 16 17 +29 5 16 10 12 13 +30 5 16 10 12 14 +31 5 16 10 12 15 + +Impropers + +1 1 6 3 8 7 +2 2 8 6 10 9 diff --git a/unittest/fortran/in.fourmol b/unittest/fortran/in.fourmol new file mode 100644 index 0000000000..e0c3dfc7c1 --- /dev/null +++ b/unittest/fortran/in.fourmol @@ -0,0 +1,25 @@ +variable units index real +variable input_dir index . +variable data_file index ${input_dir}/data.fourmol +variable pair_style index 'zero 8.0' +variable bond_style index zero +variable angle_style index zero +variable dihedral_style index zero +variable improper_style index zero + +atom_style full +atom_modify map array +neigh_modify delay 2 every 2 check no +units ${units} +timestep 0.1 + +pair_style ${pair_style} +bond_style ${bond_style} +angle_style ${angle_style} +dihedral_style ${dihedral_style} +improper_style ${improper_style} + +read_data ${data_file} +dihedral_coeff * +improper_coeff * + diff --git a/unittest/fortran/wrap_gather_scatter.cpp b/unittest/fortran/wrap_gather_scatter.cpp index 5eecf763a6..02d9f1d487 100644 --- a/unittest/fortran/wrap_gather_scatter.cpp +++ b/unittest/fortran/wrap_gather_scatter.cpp @@ -1,9 +1,10 @@ // unit tests for gathering and scattering data from a LAMMPS instance through // the Fortran wrapper +#include "atom.h" +#include "input.h" #include "lammps.h" #include "library.h" -#include "atom.h" #include #include #include @@ -11,7 +12,11 @@ #include "gtest/gtest.h" +#define STRINGIFY(val) XSTR(val) +#define XSTR(val) #val + // prototypes for Fortran reverse wrapper functions + extern "C" { void *f_lammps_with_args(); void f_lammps_close(); @@ -45,7 +50,8 @@ protected: void SetUp() override { ::testing::internal::CaptureStdout(); - lmp = (LAMMPS_NS::LAMMPS *)f_lammps_with_args(); + lmp = (LAMMPS_NS::LAMMPS *)f_lammps_with_args(); + lmp->input->one("variable index input_dir " STRINGIFY(TEST_INPUT_FOLDER)); std::string output = ::testing::internal::GetCapturedStdout(); EXPECT_STREQ(output.substr(0, 8).c_str(), "LAMMPS ("); } From 4637072a26cb1ed5fad414518050b1c043df520a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 30 Jan 2023 00:08:51 -0500 Subject: [PATCH 099/445] simplify --- unittest/testing/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittest/testing/core.h b/unittest/testing/core.h index b64affc0c7..272d1d21c5 100644 --- a/unittest/testing/core.h +++ b/unittest/testing/core.h @@ -54,7 +54,7 @@ extern bool verbose; class LAMMPSTest : public ::testing::Test { public: - void command(const std::string &line) { lmp->input->one(line.c_str()); } + void command(const std::string &line) { lmp->input->one(line); } void BEGIN_HIDE_OUTPUT() { From 41e834d27fab059858bc69d299c907918faa50ed Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 30 Jan 2023 06:12:45 -0500 Subject: [PATCH 100/445] pair style gauss *does* support pair_modify shift --- doc/src/pair_gauss.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/src/pair_gauss.rst b/doc/src/pair_gauss.rst index 4eb45a416b..091bd52d45 100644 --- a/doc/src/pair_gauss.rst +++ b/doc/src/pair_gauss.rst @@ -127,9 +127,8 @@ before mixing, and converted back after mixing This way, if either particle is repulsive (if Ai<0 or Aj<0), then the default interaction between both particles will be repulsive. -The *gauss* style does not support the :doc:`pair_modify ` -shift option. There is no effect due to the Gaussian well beyond the -cutoff; hence reasonable cutoffs need to be specified. +For the *gauss* style there is no effect due to the Gaussian well +beyond the cutoff; hence reasonable cutoffs need to be specified. The *gauss/cut* style supports the :doc:`pair_modify ` shift option for the energy of the Gauss-potential portion of the pair From b115229dd2cc58fa438aeffe4a475603f6ba1ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lacroix?= Date: Mon, 30 Jan 2023 13:30:34 +0100 Subject: [PATCH 101/445] Fix QUIP compilation with Intel compilers. --- cmake/Modules/Packages/ML-QUIP.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/Modules/Packages/ML-QUIP.cmake b/cmake/Modules/Packages/ML-QUIP.cmake index 10e0f38b78..a90b77190f 100644 --- a/cmake/Modules/Packages/ML-QUIP.cmake +++ b/cmake/Modules/Packages/ML-QUIP.cmake @@ -16,6 +16,7 @@ if(DOWNLOAD_QUIP) set(temp "${temp}DEFINES += -DGETARG_F2003 -DFORTRAN_UNDERSCORE\n") set(temp "${temp}F95FLAGS += -fpp -free -fPIC\n") set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n") + set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n") elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}}\n") set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n") From 5c5bc2026d54fb0c69250e3ae13b931f4a0a2145 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 30 Jan 2023 12:17:55 -0500 Subject: [PATCH 102/445] compare region extent with box bounds for triclinic --- src/MC/fix_gcmc.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 063eeee7e8..384237391f 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -138,10 +138,18 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) : region_zlo = region->extent_zlo; region_zhi = region->extent_zhi; - if (region_xlo < domain->boxlo[0] || region_xhi > domain->boxhi[0] || - region_ylo < domain->boxlo[1] || region_yhi > domain->boxhi[1] || - region_zlo < domain->boxlo[2] || region_zhi > domain->boxhi[2]) - error->all(FLERR,"Fix gcmc region extends outside simulation box"); + if (triclinic) { + if ((region_xlo < domain->boxlo_bound[0]) || (region_xhi > domain->boxhi_bound[0]) || + (region_ylo < domain->boxlo_bound[1]) || (region_yhi > domain->boxhi_bound[1]) || + (region_zlo < domain->boxlo_bound[2]) || (region_zhi > domain->boxhi_bound[2])) + error->all(FLERR,"Fix gcmc region extends outside simulation box"); + } else { + if ((region_xlo < domain->boxlo[0]) || (region_xhi > domain->boxhi[0]) || + (region_ylo < domain->boxlo[1]) || (region_yhi > domain->boxhi[1]) || + (region_zlo < domain->boxlo[2]) || (region_zhi > domain->boxhi[2])) + error->all(FLERR,"Fix gcmc region extends outside simulation box"); + + } // estimate region volume using MC trials From a92a3ec50b422d357cca167413f0d1f8eae0d912 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Mon, 30 Jan 2023 12:27:54 -0700 Subject: [PATCH 103/445] Try again to fix memory leak --- src/KOKKOS/pair_reaxff_kokkos.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/KOKKOS/pair_reaxff_kokkos.cpp b/src/KOKKOS/pair_reaxff_kokkos.cpp index fbd74f24de..273430fd63 100644 --- a/src/KOKKOS/pair_reaxff_kokkos.cpp +++ b/src/KOKKOS/pair_reaxff_kokkos.cpp @@ -95,6 +95,8 @@ PairReaxFFKokkos::~PairReaxFFKokkos() { if (copymode) return; + DeAllocate_System(api->system); + memoryKK->destroy_kokkos(k_eatom,eatom); memoryKK->destroy_kokkos(k_vatom,vatom); From a74e57cfc1aca0ef22ec6c81ed8adc37f687935f Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Mon, 30 Jan 2023 12:31:27 -0700 Subject: [PATCH 104/445] Revert 69e7dd9 --- src/pair.cpp | 2 +- src/pair_hybrid_overlay.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pair.cpp b/src/pair.cpp index 92d27266b9..5d789fbb9b 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -97,7 +97,7 @@ Pair::Pair(LAMMPS *lmp) : Pointers(lmp) tabinner_disp = sqrt(2.0); ftable = nullptr; fdisptable = nullptr; - trim_flag = 0; + trim_flag = 1; allocated = 0; suffix_flag = Suffix::NONE; diff --git a/src/pair_hybrid_overlay.cpp b/src/pair_hybrid_overlay.cpp index 9d2df6a65c..12c84c3a71 100644 --- a/src/pair_hybrid_overlay.cpp +++ b/src/pair_hybrid_overlay.cpp @@ -23,9 +23,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -PairHybridOverlay::PairHybridOverlay(LAMMPS *lmp) : PairHybrid(lmp) { - trim_flag = 1; -} +PairHybridOverlay::PairHybridOverlay(LAMMPS *lmp) : PairHybrid(lmp) {} /* ---------------------------------------------------------------------- set coeffs for one or more type pairs From b54cdc48e2fb88a89de5367e900ceb95f83ac747 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Mon, 30 Jan 2023 12:34:29 -0700 Subject: [PATCH 105/445] whitespace --- src/REAXFF/reaxff_hydrogen_bonds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/REAXFF/reaxff_hydrogen_bonds.cpp b/src/REAXFF/reaxff_hydrogen_bonds.cpp index b66952a630..6a56675f19 100644 --- a/src/REAXFF/reaxff_hydrogen_bonds.cpp +++ b/src/REAXFF/reaxff_hydrogen_bonds.cpp @@ -154,6 +154,6 @@ namespace ReaxFF { } } } - } + } } } From 0d8ba92b4df87449cf163f226b49fb1c251b3b6a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 30 Jan 2023 14:44:20 -0500 Subject: [PATCH 106/445] update N2P2 library to version 2.2.0 --- cmake/Modules/Packages/ML-HDNNP.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/Packages/ML-HDNNP.cmake b/cmake/Modules/Packages/ML-HDNNP.cmake index f71d08f3ab..6c340dcb68 100644 --- a/cmake/Modules/Packages/ML-HDNNP.cmake +++ b/cmake/Modules/Packages/ML-HDNNP.cmake @@ -6,8 +6,8 @@ else() endif() option(DOWNLOAD_N2P2 "Download n2p2 library instead of using an already installed one)" ${DOWNLOAD_N2P2_DEFAULT}) if(DOWNLOAD_N2P2) - set(N2P2_URL "https://github.com/CompPhysVienna/n2p2/archive/v2.1.4.tar.gz" CACHE STRING "URL for n2p2 tarball") - set(N2P2_MD5 "9595b066636cd6b90b0fef93398297a5" CACHE STRING "MD5 checksum of N2P2 tarball") + set(N2P2_URL "https://github.com/CompPhysVienna/n2p2/archive/v2.2.0.tar.gz" CACHE STRING "URL for n2p2 tarball") + set(N2P2_MD5 "4f857e204693917d49dc5d0906b4c602" CACHE STRING "MD5 checksum of N2P2 tarball") mark_as_advanced(N2P2_URL) mark_as_advanced(N2P2_MD5) From 0870bc3046af89fc3dee00624e35b8a4f2dd69ed Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Mon, 30 Jan 2023 16:14:39 -0700 Subject: [PATCH 107/445] Allow neighbor class to set newton flag in Kokkos neigh list --- src/KOKKOS/npair_kokkos.cpp | 151 +++++++++++++------------------ src/KOKKOS/npair_kokkos.h | 172 +++++++++++++++++++++++------------- 2 files changed, 171 insertions(+), 152 deletions(-) diff --git a/src/KOKKOS/npair_kokkos.cpp b/src/KOKKOS/npair_kokkos.cpp index aae8592b7a..3ead5a2e34 100644 --- a/src/KOKKOS/npair_kokkos.cpp +++ b/src/KOKKOS/npair_kokkos.cpp @@ -28,8 +28,8 @@ namespace LAMMPS_NS { /* ---------------------------------------------------------------------- */ -template -NPairKokkos::NPairKokkos(LAMMPS *lmp) : NPair(lmp) { +template +NPairKokkos::NPairKokkos(LAMMPS *lmp) : NPair(lmp) { last_stencil_old = -1; @@ -49,8 +49,8 @@ NPairKokkos::NPairKokkos(LAMMPS *lmp) : NP copy needed info from Neighbor class to this build class ------------------------------------------------------------------------- */ -template -void NPairKokkos::copy_neighbor_info() +template +void NPairKokkos::copy_neighbor_info() { NPair::copy_neighbor_info(); @@ -58,7 +58,6 @@ void NPairKokkos::copy_neighbor_info() // general params - newton_pair = force->newton_pair; k_cutneighsq = neighborKK->k_cutneighsq; // overwrite per-type Neighbor cutoffs with custom value set by requestor @@ -93,8 +92,8 @@ void NPairKokkos::copy_neighbor_info() copy per-atom and per-bin vectors from NBin class to this build class ------------------------------------------------------------------------- */ -template -void NPairKokkos::copy_bin_info() +template +void NPairKokkos::copy_bin_info() { NPair::copy_bin_info(); @@ -110,8 +109,8 @@ void NPairKokkos::copy_bin_info() copy needed info from NStencil class to this build class ------------------------------------------------------------------------- */ -template -void NPairKokkos::copy_stencil_info() +template +void NPairKokkos::copy_stencil_info() { NPair::copy_stencil_info(); nstencil = ns->nstencil; @@ -145,8 +144,8 @@ void NPairKokkos::copy_stencil_info() /* ---------------------------------------------------------------------- */ -template -void NPairKokkos::build(NeighList *list_) +template +void NPairKokkos::build(NeighList *list_) { NeighListKokkos* list = (NeighListKokkos*) list_; const int nlocal = includegroup?atom->nfirst:atom->nlocal; @@ -244,7 +243,7 @@ void NPairKokkos::build(NeighList *list_) #endif if (GHOST) { - NPairKokkosBuildFunctorGhost f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); + NPairKokkosBuildFunctorGhost f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); #ifdef LMP_KOKKOS_GPU if (ExecutionSpaceFromDevice::space == Device) { int team_size = atoms_per_bin*factor; @@ -262,82 +261,42 @@ void NPairKokkos::build(NeighList *list_) Kokkos::parallel_for(nall, f); #endif } else { - if (newton_pair) { - if (SIZE) { - NPairKokkosBuildFunctorSize f(data,atoms_per_bin * 6 * sizeof(X_FLOAT) * factor); + if (SIZE) { + NPairKokkosBuildFunctorSize f(data,atoms_per_bin * 6 * sizeof(X_FLOAT) * factor); #ifdef LMP_KOKKOS_GPU - if (ExecutionSpaceFromDevice::space == Device) { - int team_size = atoms_per_bin*factor; - int team_size_max = Kokkos::TeamPolicy(team_size,Kokkos::AUTO).team_size_max(f,Kokkos::ParallelForTag()); - if (team_size <= team_size_max) { - Kokkos::TeamPolicy config((mbins+factor-1)/factor,team_size); - Kokkos::parallel_for(config, f); - } else { // fall back to flat method - f.sharedsize = 0; - Kokkos::parallel_for(nall, f); - } - } else + if (ExecutionSpaceFromDevice::space == Device) { + int team_size = atoms_per_bin*factor; + int team_size_max = Kokkos::TeamPolicy(team_size,Kokkos::AUTO).team_size_max(f,Kokkos::ParallelForTag()); + if (team_size <= team_size_max) { + Kokkos::TeamPolicy config((mbins+factor-1)/factor,team_size); + Kokkos::parallel_for(config, f); + } else { // fall back to flat method + f.sharedsize = 0; Kokkos::parallel_for(nall, f); -#else + } + } else Kokkos::parallel_for(nall, f); -#endif - } else { - NPairKokkosBuildFunctor f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); -#ifdef LMP_KOKKOS_GPU - if (ExecutionSpaceFromDevice::space == Device) { - int team_size = atoms_per_bin*factor; - int team_size_max = Kokkos::TeamPolicy(team_size,Kokkos::AUTO).team_size_max(f,Kokkos::ParallelForTag()); - if (team_size <= team_size_max) { - Kokkos::TeamPolicy config((mbins+factor-1)/factor,team_size); - Kokkos::parallel_for(config, f); - } else { // fall back to flat method - f.sharedsize = 0; - Kokkos::parallel_for(nall, f); - } - } else - Kokkos::parallel_for(nall, f); #else - Kokkos::parallel_for(nall, f); + Kokkos::parallel_for(nall, f); #endif - } } else { - if (SIZE) { - NPairKokkosBuildFunctorSize f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); + NPairKokkosBuildFunctor f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); #ifdef LMP_KOKKOS_GPU - if (ExecutionSpaceFromDevice::space == Device) { - int team_size = atoms_per_bin*factor; - int team_size_max = Kokkos::TeamPolicy(team_size,Kokkos::AUTO).team_size_max(f,Kokkos::ParallelForTag()); - if (team_size <= team_size_max) { - Kokkos::TeamPolicy config((mbins+factor-1)/factor,team_size); - Kokkos::parallel_for(config, f); - } else { // fall back to flat method - f.sharedsize = 0; - Kokkos::parallel_for(nall, f); - } - } else + if (ExecutionSpaceFromDevice::space == Device) { + int team_size = atoms_per_bin*factor; + int team_size_max = Kokkos::TeamPolicy(team_size,Kokkos::AUTO).team_size_max(f,Kokkos::ParallelForTag()); + if (team_size <= team_size_max) { + Kokkos::TeamPolicy config((mbins+factor-1)/factor,team_size); + Kokkos::parallel_for(config, f); + } else { // fall back to flat method + f.sharedsize = 0; Kokkos::parallel_for(nall, f); -#else + } + } else Kokkos::parallel_for(nall, f); -#endif - } else { - NPairKokkosBuildFunctor f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); -#ifdef LMP_KOKKOS_GPU - if (ExecutionSpaceFromDevice::space == Device) { - int team_size = atoms_per_bin*factor; - int team_size_max = Kokkos::TeamPolicy(team_size,Kokkos::AUTO).team_size_max(f,Kokkos::ParallelForTag()); - if (team_size <= team_size_max) { - Kokkos::TeamPolicy config((mbins+factor-1)/factor,team_size); - Kokkos::parallel_for(config, f); - } else { // fall back to flat method - f.sharedsize = 0; - Kokkos::parallel_for(nall, f); - } - } else - Kokkos::parallel_for(nall, f); #else - Kokkos::parallel_for(nall, f); + Kokkos::parallel_for(nall, f); #endif - } } } Kokkos::deep_copy(h_scalars, d_scalars); @@ -1402,20 +1361,30 @@ void NeighborKokkosExecute::build_ItemSizeGPU(typename Kokkos::TeamP } namespace LAMMPS_NS { -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; #ifdef LMP_KOKKOS_GPU -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; #endif } diff --git a/src/KOKKOS/npair_kokkos.h b/src/KOKKOS/npair_kokkos.h index ce63c30c4b..78d735f829 100644 --- a/src/KOKKOS/npair_kokkos.h +++ b/src/KOKKOS/npair_kokkos.h @@ -13,75 +13,125 @@ #ifdef NPAIR_CLASS // clang-format off -typedef NPairKokkos NPairKokkosFullBinHost; +typedef NPairKokkos NPairKokkosFullBinHost; NPairStyle(full/bin/kk/host, NPairKokkosFullBinHost, - NP_FULL | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI); + NP_BIN | NP_KOKKOS_HOST | NP_FULL | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI); -typedef NPairKokkos NPairKokkosFullBinDevice; +typedef NPairKokkos NPairKokkosFullBinDevice; NPairStyle(full/bin/kk/device, NPairKokkosFullBinDevice, - NP_FULL | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI); + NP_BIN | NP_KOKKOS_DEVICE | NP_FULL | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI); -typedef NPairKokkos NPairKokkosFullBinGhostHost; +typedef NPairKokkos NPairKokkosFullBinGhostHost; NPairStyle(full/bin/ghost/kk/host, NPairKokkosFullBinGhostHost, - NP_FULL | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI); + NP_BIN | NP_KOKKOS_HOST | NP_FULL | NP_NEWTON | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI); -typedef NPairKokkos NPairKokkosFullBinGhostDevice; +typedef NPairKokkos NPairKokkosFullBinGhostDevice; NPairStyle(full/bin/ghost/kk/device, NPairKokkosFullBinGhostDevice, - NP_FULL | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI); + NP_BIN | NP_KOKKOS_DEVICE | NP_FULL | NP_NEWTON | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI); -typedef NPairKokkos NPairKokkosHalfBinHost; -NPairStyle(half/bin/kk/host, - NPairKokkosHalfBinHost, - NP_HALF | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_ORTHO); +typedef NPairKokkos NPairKokkosHalfBinNewtonHost; +NPairStyle(half/bin/newton/kk/host, + NPairKokkosHalfBinNewtonHost, + NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTON | NP_ORTHO); -typedef NPairKokkos NPairKokkosHalfBinDevice; -NPairStyle(half/bin/kk/device, - NPairKokkosHalfBinDevice, - NP_HALF | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_ORTHO); +typedef NPairKokkos NPairKokkosHalfBinNewtoffHost; +NPairStyle(half/bin/newtoff/kk/host, + NPairKokkosHalfBinNewtoffHost, + NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTOFF | NP_ORTHO); -typedef NPairKokkos NPairKokkosHalfBinHostTri; -NPairStyle(half/bin/kk/host, - NPairKokkosHalfBinHostTri, - NP_HALF | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_TRI); +typedef NPairKokkos NPairKokkosHalfBinNewtonDevice; +NPairStyle(half/bin/newton/kk/device, + NPairKokkosHalfBinNewtonDevice, + NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTON | NP_ORTHO); -typedef NPairKokkos NPairKokkosHalfBinDeviceTri; -NPairStyle(half/bin/kk/device, - NPairKokkosHalfBinDeviceTri, - NP_HALF | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_TRI); +typedef NPairKokkos NPairKokkosHalfBinNewtoffDevice; +NPairStyle(half/bin/newtoff/kk/device, + NPairKokkosHalfBinNewtoffDevice, + NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTOFF | NP_ORTHO); -typedef NPairKokkos NPairKokkosHalfBinGhostHost; -NPairStyle(half/bin/ghost/kk/host, - NPairKokkosHalfBinGhostHost, - NP_HALF | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI); +typedef NPairKokkos NPairKokkosHalfBinNewtonTriHost; +NPairStyle(half/bin/newton/kk/host, + NPairKokkosHalfBinNewtonTriHost, + NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTON | NP_TRI); -typedef NPairKokkos NPairKokkosHalfBinGhostDevice; -NPairStyle(half/bin/ghost/kk/device, - NPairKokkosHalfBinGhostDevice, - NP_HALF | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI); +typedef NPairKokkos NPairKokkosHalfBinNewtoffTriHost; +NPairStyle(half/bin/newtoff/kk/host, + NPairKokkosHalfBinNewtoffTriHost, + NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTOFF | NP_TRI); -typedef NPairKokkos NPairKokkosHalfSizeBinHost; -NPairStyle(half/size/bin/kk/host, - NPairKokkosHalfSizeBinHost, - NP_HALF | NP_SIZE | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_ORTHO); +typedef NPairKokkos NPairKokkosHalfBinNewtonTriDevice; +NPairStyle(half/bin/newton/kk/device, + NPairKokkosHalfBinNewtonTriDevice, + NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTON | NP_TRI); -typedef NPairKokkos NPairKokkosHalfSizeBinDevice; -NPairStyle(half/size/bin/kk/device, - NPairKokkosHalfSizeBinDevice, - NP_HALF | NP_SIZE | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_ORTHO); +typedef NPairKokkos NPairKokkosHalfBinNewtoffTriDevice; +NPairStyle(half/bin/newtoff/kk/device, + NPairKokkosHalfBinNewtoffTriDevice, + NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTOFF | NP_TRI); -typedef NPairKokkos NPairKokkosHalfSizeBinHostTri; -NPairStyle(half/size/bin/kk/host, - NPairKokkosHalfSizeBinHostTri, - NP_HALF | NP_SIZE | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_TRI); +typedef NPairKokkos NPairKokkosHalfBinNewtonGhostHost; +NPairStyle(half/bin/newton/ghost/kk/host, + NPairKokkosHalfBinNewtonGhostHost, + NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTON | NP_GHOST | NP_ORTHO | NP_TRI); -typedef NPairKokkos NPairKokkosHalfSizeBinDeviceTri; -NPairStyle(half/size/bin/kk/device, - NPairKokkosHalfSizeBinDeviceTri, - NP_HALF | NP_SIZE | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_TRI); +typedef NPairKokkos NPairKokkosHalfBinNewtoffGhostHost; +NPairStyle(half/bin/newtoff/ghost/kk/host, + NPairKokkosHalfBinNewtoffGhostHost, + NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI); + +typedef NPairKokkos NPairKokkosHalfBinNewtonGhostDevice; +NPairStyle(half/bin/newton/ghost/kk/device, + NPairKokkosHalfBinNewtonGhostDevice, + NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTON | NP_GHOST | NP_ORTHO | NP_TRI); + +typedef NPairKokkos NPairKokkosHalfBinNewtoffGhostDevice; +NPairStyle(half/bin/newtoff/ghost/kk/device, + NPairKokkosHalfBinNewtoffGhostDevice, + NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI); + +typedef NPairKokkos NPairKokkosHalfBinNewtonSizeHost; +NPairStyle(half/bin/newton/size/kk/host, + NPairKokkosHalfBinNewtonSizeHost, + NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTON | NP_SIZE | NP_ORTHO); + +typedef NPairKokkos NPairKokkosHalfBinNewtoffSizeHost; +NPairStyle(half/bin/newtoff/size/kk/host, + NPairKokkosHalfBinNewtoffSizeHost, + NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTOFF | NP_SIZE | NP_ORTHO); + +typedef NPairKokkos NPairKokkosHalfBinNewtonSizeDevice; +NPairStyle(half/bin/newton/size/kk/device, + NPairKokkosHalfBinNewtonSizeDevice, + NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTON | NP_SIZE | NP_ORTHO); + +typedef NPairKokkos NPairKokkosHalfBinNewtoffSizeDevice; +NPairStyle(half/bin/newtoff/size/kk/device, + NPairKokkosHalfBinNewtoffSizeDevice, + NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTOFF | NP_SIZE | NP_ORTHO); + +typedef NPairKokkos NPairKokkosHalfBinNewtonSizeTriHost; +NPairStyle(half/bin/newton/size/kk/host, + NPairKokkosHalfBinNewtonSizeTriHost, + NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTON | NP_SIZE | NP_TRI); + +typedef NPairKokkos NPairKokkosHalfBinNewtoffSizeTriHost; +NPairStyle(half/bin/newtoff/size/kk/host, + NPairKokkosHalfBinNewtoffSizeTriHost, + NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTOFF | NP_SIZE | NP_TRI); + +typedef NPairKokkos NPairKokkosHalfBinNewtonSizeTriDevice; +NPairStyle(half/bin/newton/size/kk/device, + NPairKokkosHalfBinNewtonSizeTriDevice, + NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTON | NP_SIZE | NP_TRI); + +typedef NPairKokkos NPairKokkosHalfBinNewtoffSizeTriDevice; +NPairStyle(half/bin/newtoff/size/kk/device, + NPairKokkosHalfBinNewtoffSizeTriDevice, + NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTOFF | NP_SIZE | NP_TRI); // clang-format on #else @@ -94,7 +144,7 @@ NPairStyle(half/size/bin/kk/device, namespace LAMMPS_NS { -template +template class NPairKokkos : public NPair { typedef ArrayTypes AT; @@ -379,7 +429,7 @@ class NeighborKokkosExecute }; -template +template struct NPairKokkosBuildFunctor { typedef DeviceType device_type; @@ -392,19 +442,19 @@ struct NPairKokkosBuildFunctor { KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { - c.template build_Item(i); + c.template build_Item(i); } #ifdef LMP_KOKKOS_GPU LAMMPS_DEVICE_FUNCTION inline void operator() (typename Kokkos::TeamPolicy::member_type dev) const { - c.template build_ItemGPU(dev, sharedsize); + c.template build_ItemGPU(dev, sharedsize); } size_t team_shmem_size(const int team_size) const { (void) team_size; return sharedsize; } #endif }; -template -struct NPairKokkosBuildFunctor { +template +struct NPairKokkosBuildFunctor { typedef LMPHostType device_type; const NeighborKokkosExecute c; @@ -416,7 +466,7 @@ struct NPairKokkosBuildFunctor { KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { - c.template build_Item(i); + c.template build_Item(i); } void operator() (typename Kokkos::TeamPolicy::member_type /*dev*/) const {} // Should error out @@ -466,7 +516,7 @@ struct NPairKokkosBuildFunctorGhost { void operator() (typename Kokkos::TeamPolicy::member_type /*dev*/) const {} // Should error out }; -template +template struct NPairKokkosBuildFunctorSize { typedef DeviceType device_type; @@ -478,20 +528,20 @@ struct NPairKokkosBuildFunctorSize { KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { - c.template build_ItemSize(i); + c.template build_ItemSize(i); } #ifdef LMP_KOKKOS_GPU LAMMPS_DEVICE_FUNCTION inline void operator() (typename Kokkos::TeamPolicy::member_type dev) const { - c.template build_ItemSizeGPU(dev, sharedsize); + c.template build_ItemSizeGPU(dev, sharedsize); } size_t team_shmem_size(const int team_size) const { (void) team_size; return sharedsize; } #endif }; -template -struct NPairKokkosBuildFunctorSize { +template +struct NPairKokkosBuildFunctorSize { typedef LMPHostType device_type; const NeighborKokkosExecute c; @@ -502,7 +552,7 @@ struct NPairKokkosBuildFunctorSize { KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { - c.template build_ItemSize(i); + c.template build_ItemSize(i); } void operator() (typename Kokkos::TeamPolicy::member_type /*dev*/) const {} // Should error out From e5615f2579f8791ddf02cd2822b6db190de55b9c Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Mon, 30 Jan 2023 17:20:23 -0700 Subject: [PATCH 108/445] Fix bug in ReaxFF with pair hybrid --- src/REAXFF/pair_reaxff.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/REAXFF/pair_reaxff.cpp b/src/REAXFF/pair_reaxff.cpp index e1580946fd..1817efba33 100644 --- a/src/REAXFF/pair_reaxff.cpp +++ b/src/REAXFF/pair_reaxff.cpp @@ -649,7 +649,7 @@ int PairReaxFF::write_reax_lists() jlist = firstneigh[i]; Set_Start_Index(i, num_nbrs, far_nbrs); - if (i < inum) + if (itr_i < inum) cutoff_sqr = SQR(api->control->nonb_cut); else cutoff_sqr = SQR(api->control->bond_cut); From 6bf5fc734e82d283043f35cc61ff28e353db42d6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 31 Jan 2023 06:40:15 -0500 Subject: [PATCH 109/445] revert MD5 hash to current value after GitHub reversed its change --- cmake/Modules/Packages/ML-HDNNP.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/Packages/ML-HDNNP.cmake b/cmake/Modules/Packages/ML-HDNNP.cmake index 6c340dcb68..2be8e5a348 100644 --- a/cmake/Modules/Packages/ML-HDNNP.cmake +++ b/cmake/Modules/Packages/ML-HDNNP.cmake @@ -7,7 +7,7 @@ endif() option(DOWNLOAD_N2P2 "Download n2p2 library instead of using an already installed one)" ${DOWNLOAD_N2P2_DEFAULT}) if(DOWNLOAD_N2P2) set(N2P2_URL "https://github.com/CompPhysVienna/n2p2/archive/v2.2.0.tar.gz" CACHE STRING "URL for n2p2 tarball") - set(N2P2_MD5 "4f857e204693917d49dc5d0906b4c602" CACHE STRING "MD5 checksum of N2P2 tarball") + set(N2P2_MD5 "a2d9ab7f676b3a74a324fc1eda0a911d" CACHE STRING "MD5 checksum of N2P2 tarball") mark_as_advanced(N2P2_URL) mark_as_advanced(N2P2_MD5) From e5d921585bad76a810e2072ecd831a73f1dc147c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 31 Jan 2023 06:49:21 -0500 Subject: [PATCH 110/445] cosmetic/whitespace --- src/REAXFF/pair_reaxff.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/REAXFF/pair_reaxff.cpp b/src/REAXFF/pair_reaxff.cpp index 1817efba33..1867aec81b 100644 --- a/src/REAXFF/pair_reaxff.cpp +++ b/src/REAXFF/pair_reaxff.cpp @@ -110,9 +110,7 @@ PairReaxFF::PairReaxFF(LAMMPS *lmp) : Pair(lmp) setup_flag = 0; fixspecies_flag = 0; - nmax = 0; - list_blocking_flag = 0; } @@ -130,8 +128,8 @@ PairReaxFF::~PairReaxFF() // deallocate reax data-structures if (api->control->tabulate) Deallocate_Lookup_Tables(api->system); - if (api->control->hbond_cut > 0) Delete_List(api->lists+HBONDS); + Delete_List(api->lists+BONDS); Delete_List(api->lists+THREE_BODIES); Delete_List(api->lists+FAR_NBRS); @@ -153,17 +151,16 @@ PairReaxFF::~PairReaxFF() memory->destroy(cutsq); memory->destroy(cutghost); - delete [] chi; - delete [] eta; - delete [] gamma; - delete [] bcut_acks2; + delete[] chi; + delete[] eta; + delete[] gamma; + delete[] bcut_acks2; } memory->destroy(tmpid); memory->destroy(tmpbo); - delete [] pvector; - + delete[] pvector; } /* ---------------------------------------------------------------------- */ @@ -531,7 +528,6 @@ void PairReaxFF::compute(int eflag, int vflag) } FindBond(); } - } /* ---------------------------------------------------------------------- */ From daf23068dfbfdeaf4c67d2de99d98283520a81e0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 31 Jan 2023 07:40:13 -0500 Subject: [PATCH 111/445] update n2p2 lib version for traditional make, too. --- lib/hdnnp/Install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/hdnnp/Install.py b/lib/hdnnp/Install.py index 3b232f400b..0793da0f58 100644 --- a/lib/hdnnp/Install.py +++ b/lib/hdnnp/Install.py @@ -17,7 +17,7 @@ parser = ArgumentParser(prog='Install.py', # settings -version = "2.1.4" +version = "2.2.0" # help message @@ -38,6 +38,7 @@ make lib-hdnnp args="-p $HOME/n2p2" # use existing n2p2 installation in $HOME/n2 # known checksums for different n2p2 versions. used to validate the download. checksums = { \ + '2.2.0' : 'a2d9ab7f676b3a74a324fc1eda0a911d', \ '2.1.4' : '9595b066636cd6b90b0fef93398297a5', \ } From 6b44d93eac76c8cd926b6a025d3e03612a6ddb97 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 31 Jan 2023 09:08:58 -0500 Subject: [PATCH 112/445] port triclinic region vs box check from fix gcmc to fix widom --- src/MC/fix_gcmc.cpp | 5 ++--- src/MC/fix_widom.cpp | 15 +++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 384237391f..2181c0de97 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -142,13 +142,12 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) : if ((region_xlo < domain->boxlo_bound[0]) || (region_xhi > domain->boxhi_bound[0]) || (region_ylo < domain->boxlo_bound[1]) || (region_yhi > domain->boxhi_bound[1]) || (region_zlo < domain->boxlo_bound[2]) || (region_zhi > domain->boxhi_bound[2])) - error->all(FLERR,"Fix gcmc region extends outside simulation box"); + error->all(FLERR,"Fix gcmc region {} extends outside simulation box", region->id); } else { if ((region_xlo < domain->boxlo[0]) || (region_xhi > domain->boxhi[0]) || (region_ylo < domain->boxlo[1]) || (region_yhi > domain->boxhi[1]) || (region_zlo < domain->boxlo[2]) || (region_zhi > domain->boxhi[2])) - error->all(FLERR,"Fix gcmc region extends outside simulation box"); - + error->all(FLERR,"Fix gcmc region {} extends outside simulation box", region->id); } // estimate region volume using MC trials diff --git a/src/MC/fix_widom.cpp b/src/MC/fix_widom.cpp index 6f0afdc6ba..e043eaabd6 100644 --- a/src/MC/fix_widom.cpp +++ b/src/MC/fix_widom.cpp @@ -111,10 +111,17 @@ FixWidom::FixWidom(LAMMPS *lmp, int narg, char **arg) : region_zlo = region->extent_zlo; region_zhi = region->extent_zhi; - if (region_xlo < domain->boxlo[0] || region_xhi > domain->boxhi[0] || - region_ylo < domain->boxlo[1] || region_yhi > domain->boxhi[1] || - region_zlo < domain->boxlo[2] || region_zhi > domain->boxhi[2]) - error->all(FLERR,"Fix widom region {} extends outside simulation box", region->id); + if (triclinic) { + if ((region_xlo < domain->boxlo_bound[0]) || (region_xhi > domain->boxhi_bound[0]) || + (region_ylo < domain->boxlo_bound[1]) || (region_yhi > domain->boxhi_bound[1]) || + (region_zlo < domain->boxlo_bound[2]) || (region_zhi > domain->boxhi_bound[2])) + error->all(FLERR,"Fix widom region {} extends outside simulation box", region->id); + } else { + if ((region_xlo < domain->boxlo[0]) || (region_xhi > domain->boxhi[0]) || + (region_ylo < domain->boxlo[1]) || (region_yhi > domain->boxhi[1]) || + (region_zlo < domain->boxlo[2]) || (region_zhi > domain->boxhi[2])) + error->all(FLERR,"Fix widom region {} extends outside simulation box", region->id); + } // estimate region volume using MC trials From 83b578f6040a0c4a2c1c3077d4ce2dd7b59059d7 Mon Sep 17 00:00:00 2001 From: Yury Lysogorskiy Date: Tue, 31 Jan 2023 21:08:32 +0100 Subject: [PATCH 113/445] BUGFIX: update ML_PACE library version (that fix compilation issue with nvcc) extra update doc/src/pair_pace.rst --- cmake/Modules/Packages/ML-PACE.cmake | 4 ++-- doc/src/pair_pace.rst | 2 +- lib/pace/Install.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/Modules/Packages/ML-PACE.cmake b/cmake/Modules/Packages/ML-PACE.cmake index b64584e5a7..50581b0676 100644 --- a/cmake/Modules/Packages/ML-PACE.cmake +++ b/cmake/Modules/Packages/ML-PACE.cmake @@ -1,6 +1,6 @@ -set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.01.3.tar.gz" CACHE STRING "URL for PACE evaluator library sources") +set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.01.3.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources") -set(PACELIB_MD5 "f418d32b60e531063ac4285bf702b468" CACHE STRING "MD5 checksum of PACE evaluator library tarball") +set(PACELIB_MD5 "4f0b3b5b14456fe9a73b447de3765caa" CACHE STRING "MD5 checksum of PACE evaluator library tarball") mark_as_advanced(PACELIB_URL) mark_as_advanced(PACELIB_MD5) diff --git a/doc/src/pair_pace.rst b/doc/src/pair_pace.rst index 01f7df63f6..10c91e31e1 100644 --- a/doc/src/pair_pace.rst +++ b/doc/src/pair_pace.rst @@ -6,7 +6,7 @@ pair_style pace command ======================= -Accelerator Variants: *pace/kk* +Accelerator Variants: *pace/kk*, *pace/extrapolation/kk* pair_style pace/extrapolation command ===================================== diff --git a/lib/pace/Install.py b/lib/pace/Install.py index f7f50d4f6d..c72271aa7a 100644 --- a/lib/pace/Install.py +++ b/lib/pace/Install.py @@ -18,11 +18,11 @@ from install_helpers import fullpath, geturl, checkmd5sum # settings thisdir = fullpath('.') -version ='v.2023.01.3' +version ='v.2023.01.3.fix' # known checksums for different PACE versions. used to validate the download. checksums = { \ - 'v.2023.01.3': 'f418d32b60e531063ac4285bf702b468' + 'v.2023.01.3.fix': '4f0b3b5b14456fe9a73b447de3765caa' } parser = ArgumentParser(prog='Install.py', description="LAMMPS library build wrapper script") From 5d16bea899d64abb1d948823dacd8f88a67dcfc1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 31 Jan 2023 16:35:06 -0500 Subject: [PATCH 114/445] implement download fallback URLs pointing to download.lammps.org for CMake --- cmake/Modules/ExternalCMakeProject.cmake | 18 ++++++++++++++++-- cmake/Modules/LAMMPSUtils.cmake | 11 +++++++++++ cmake/Modules/Packages/GPU.cmake | 6 ++++-- cmake/Modules/Packages/KOKKOS.cmake | 4 +++- cmake/Modules/Packages/LATTE.cmake | 3 ++- cmake/Modules/Packages/MDI.cmake | 3 ++- cmake/Modules/Packages/ML-HDNNP.cmake | 3 ++- cmake/Modules/Packages/ML-PACE.cmake | 16 +++++++++++++++- cmake/Modules/Packages/PLUMED.cmake | 3 ++- cmake/Modules/Packages/SCAFACOS.cmake | 4 +++- 10 files changed, 60 insertions(+), 11 deletions(-) diff --git a/cmake/Modules/ExternalCMakeProject.cmake b/cmake/Modules/ExternalCMakeProject.cmake index 855ce254c9..75c33ab99e 100644 --- a/cmake/Modules/ExternalCMakeProject.cmake +++ b/cmake/Modules/ExternalCMakeProject.cmake @@ -9,8 +9,22 @@ function(ExternalCMakeProject target url hash basedir cmakedir cmakefile) get_filename_component(archive ${url} NAME) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/_deps/src) - message(STATUS "Downloading ${url}") - file(DOWNLOAD ${url} ${CMAKE_BINARY_DIR}/_deps/${archive} EXPECTED_HASH MD5=${hash} SHOW_PROGRESS) + if(EXISTS ${CMAKE_BINARY_DIR}/_deps/${archive}) + file(MD5 ${CMAKE_BINARY_DIR}/_deps/${archive} DL_MD5) + endif() + if(NOT "${DL_MD5}" STREQUAL "${hash}") + message(STATUS "Downloading ${url}") + file(DOWNLOAD ${url} ${CMAKE_BINARY_DIR}/_deps/${archive} STATUS DL_STATUS SHOW_PROGRESS) + file(MD5 ${CMAKE_BINARY_DIR}/_deps/${archive} DL_MD5) + if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${hash}")) + set(${target}_URL ${url}) + GetFallbackURL(${target}_URL fallback) + message(WARNING "Download from primary URL ${url} failed\nTrying fallback URL ${fallback}") + file(DOWNLOAD ${fallback} ${CMAKE_BINARY_DIR}/_deps/${archive} EXPECTED_HASH MD5=${hash} SHOW_PROGRESS) + endif() + else() + message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/_deps/${archive}") + endif() message(STATUS "Unpacking and configuring ${archive}") execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_BINARY_DIR}/_deps/${archive} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/_deps/src) diff --git a/cmake/Modules/LAMMPSUtils.cmake b/cmake/Modules/LAMMPSUtils.cmake index 9b42dafc44..bb69104308 100644 --- a/cmake/Modules/LAMMPSUtils.cmake +++ b/cmake/Modules/LAMMPSUtils.cmake @@ -158,3 +158,14 @@ if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (EXISTS /etc/os-release)) set(CMAKE_LINUX_DISTRO ${distro}) set(CMAKE_DISTRO_VERSION ${disversion}) endif() + +function(GetFallbackURL input output) + string(REPLACE "_URL" "" _tmp ${input}) + string(TOLOWER ${_tmp} libname) + string(REGEX REPLACE "^https://.*/([^/]+gz)" "${LAMMPS_THIRDPARTY_URL}/${libname}-\\1" newurl "${${input}}") + if ("${newurl}" STREQUAL "${${input}}") + set(${output} "" PARENT_SCOPE) + else() + set(${output} ${newurl} PARENT_SCOPE) + endif() +endfunction(GetFallbackURL) diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index 24d9538206..cf321eee9a 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -428,15 +428,17 @@ elseif(GPU_API STREQUAL "HIP") if(DOWNLOAD_CUB) message(STATUS "CUB download requested") - set(CUB_URL "https://github.com/NVlabs/cub/archive/1.12.0.tar.gz" CACHE STRING "URL for CUB tarball") + # TODO: test update to current version 1.17.2 + set(CUB_URL "https://github.com/nvidia/cub/archive/1.12.0.tar.gz" CACHE STRING "URL for CUB tarball") set(CUB_MD5 "1cf595beacafff104700921bac8519f3" CACHE STRING "MD5 checksum of CUB tarball") mark_as_advanced(CUB_URL) mark_as_advanced(CUB_MD5) + GetFallbackURL(CUB_URL CUB_FALLBACK) include(ExternalProject) ExternalProject_Add(CUB - URL ${CUB_URL} + URL ${CUB_URL} ${CUB_FALLBACK} URL_MD5 ${CUB_MD5} PREFIX "${CMAKE_CURRENT_BINARY_DIR}" CONFIGURE_COMMAND "" diff --git a/cmake/Modules/Packages/KOKKOS.cmake b/cmake/Modules/Packages/KOKKOS.cmake index de64df7268..b4eb227d61 100644 --- a/cmake/Modules/Packages/KOKKOS.cmake +++ b/cmake/Modules/Packages/KOKKOS.cmake @@ -53,8 +53,10 @@ if(DOWNLOAD_KOKKOS) set(KOKKOS_MD5 "f140e02b826223b1045207d9bc10d404" CACHE STRING "MD5 checksum of KOKKOS tarball") mark_as_advanced(KOKKOS_URL) mark_as_advanced(KOKKOS_MD5) + GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK) + ExternalProject_Add(kokkos_build - URL ${KOKKOS_URL} + URL ${KOKKOS_URL} ${KOKKOS_FALLBACK} URL_MD5 ${KOKKOS_MD5} CMAKE_ARGS ${KOKKOS_LIB_BUILD_ARGS} BUILD_BYPRODUCTS /lib/libkokkoscore.a /lib/libkokkoscontainers.a diff --git a/cmake/Modules/Packages/LATTE.cmake b/cmake/Modules/Packages/LATTE.cmake index d7793fa257..bedd7a64fc 100644 --- a/cmake/Modules/Packages/LATTE.cmake +++ b/cmake/Modules/Packages/LATTE.cmake @@ -19,6 +19,7 @@ if(DOWNLOAD_LATTE) set(LATTE_MD5 "820e73a457ced178c08c71389a385de7" CACHE STRING "MD5 checksum of LATTE tarball") mark_as_advanced(LATTE_URL) mark_as_advanced(LATTE_MD5) + GetFallbackURL(LATTE_URL LATTE_FALLBACK) # CMake cannot pass BLAS or LAPACK library variable to external project if they are a list list(LENGTH BLAS_LIBRARIES} NUM_BLAS) @@ -30,7 +31,7 @@ if(DOWNLOAD_LATTE) include(ExternalProject) ExternalProject_Add(latte_build - URL ${LATTE_URL} + URL ${LATTE_URL} ${LATTE_FALLBACK} URL_MD5 ${LATTE_MD5} SOURCE_SUBDIR cmake CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= ${CMAKE_REQUEST_PIC} -DCMAKE_INSTALL_LIBDIR=lib diff --git a/cmake/Modules/Packages/MDI.cmake b/cmake/Modules/Packages/MDI.cmake index c1e25347af..67c1b82dab 100644 --- a/cmake/Modules/Packages/MDI.cmake +++ b/cmake/Modules/Packages/MDI.cmake @@ -12,6 +12,7 @@ if(DOWNLOAD_MDI) set(MDI_MD5 "7a222353ae8e03961d5365e6cd48baee" CACHE STRING "MD5 checksum for MDI tarball") mark_as_advanced(MDI_URL) mark_as_advanced(MDI_MD5) + GetFallbackURL(MDI_URL MDI_FALLBACK) enable_language(C) # only ON/OFF are allowed for "mpi" flag when building MDI library @@ -63,7 +64,7 @@ if(DOWNLOAD_MDI) # support cross-compilation and ninja-build include(ExternalProject) ExternalProject_Add(mdi_build - URL ${MDI_URL} + URL ${MDI_URL} ${MDI_FALLBACK} URL_MD5 ${MDI_MD5} PREFIX ${CMAKE_CURRENT_BINARY_DIR}/mdi_build_ext CMAKE_ARGS diff --git a/cmake/Modules/Packages/ML-HDNNP.cmake b/cmake/Modules/Packages/ML-HDNNP.cmake index f71d08f3ab..adffcfa77e 100644 --- a/cmake/Modules/Packages/ML-HDNNP.cmake +++ b/cmake/Modules/Packages/ML-HDNNP.cmake @@ -10,6 +10,7 @@ if(DOWNLOAD_N2P2) set(N2P2_MD5 "9595b066636cd6b90b0fef93398297a5" CACHE STRING "MD5 checksum of N2P2 tarball") mark_as_advanced(N2P2_URL) mark_as_advanced(N2P2_MD5) + GetFallbackURL(N2P2_URL N2P2_FALLBACK) # adjust settings from detected compiler to compiler platform in n2p2 library # set compiler specific flag to turn on C++11 syntax (required on macOS and CentOS 7) @@ -72,7 +73,7 @@ if(DOWNLOAD_N2P2) # download compile n2p2 library. much patch MPI calls in LAMMPS interface to accommodate MPI-2 (e.g. for cross-compiling) include(ExternalProject) ExternalProject_Add(n2p2_build - URL ${N2P2_URL} + URL ${N2P2_URL} ${N2P2_FALLBACK} URL_MD5 ${N2P2_MD5} UPDATE_COMMAND "" CONFIGURE_COMMAND "" diff --git a/cmake/Modules/Packages/ML-PACE.cmake b/cmake/Modules/Packages/ML-PACE.cmake index b64584e5a7..f0e4b49e49 100644 --- a/cmake/Modules/Packages/ML-PACE.cmake +++ b/cmake/Modules/Packages/ML-PACE.cmake @@ -3,9 +3,23 @@ set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2 set(PACELIB_MD5 "f418d32b60e531063ac4285bf702b468" CACHE STRING "MD5 checksum of PACE evaluator library tarball") mark_as_advanced(PACELIB_URL) mark_as_advanced(PACELIB_MD5) +GetFallbackURL(PACELIB_URL PACELIB_FALLBACK) # download library sources to build folder -file(DOWNLOAD ${PACELIB_URL} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${PACELIB_MD5}) #SHOW_PROGRESS +if(EXISTS ${CMAKE_BINARY_DIR}/libpace.tar.gz) + file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5) +endif() +if(NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}") + message(STATUS "Downloading ${PACELIB_URL}") + file(DOWNLOAD ${PACELIB_URL} ${CMAKE_BINARY_DIR}/libpace.tar.gz STATUS DL_STATUS SHOW_PROGRESS) + file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5) + if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}")) + message(WARNING "Download from primary URL ${PACELIB_URL} failed\nTrying fallback URL ${PACELIB_FALLBACK}") + file(DOWNLOAD ${PACELIB_FALLBACK} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${PACELIB_MD5} SHOW_PROGRESS) + else() + message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz") + endif() +endif() # uncompress downloaded sources execute_process( diff --git a/cmake/Modules/Packages/PLUMED.cmake b/cmake/Modules/Packages/PLUMED.cmake index e0e4ff0dde..f231d148bd 100644 --- a/cmake/Modules/Packages/PLUMED.cmake +++ b/cmake/Modules/Packages/PLUMED.cmake @@ -59,10 +59,11 @@ if(DOWNLOAD_PLUMED) mark_as_advanced(PLUMED_URL) mark_as_advanced(PLUMED_MD5) + GetFallbackURL(PLUMED_URL PLUMED_FALLBACK) include(ExternalProject) ExternalProject_Add(plumed_build - URL ${PLUMED_URL} + URL ${PLUMED_URL} ${PLUMED_FALLBACK} URL_MD5 ${PLUMED_MD5} BUILD_IN_SOURCE 1 CONFIGURE_COMMAND /configure --prefix= diff --git a/cmake/Modules/Packages/SCAFACOS.cmake b/cmake/Modules/Packages/SCAFACOS.cmake index de611a1edb..9a5580163f 100644 --- a/cmake/Modules/Packages/SCAFACOS.cmake +++ b/cmake/Modules/Packages/SCAFACOS.cmake @@ -18,6 +18,8 @@ if(DOWNLOAD_SCAFACOS) set(SCAFACOS_MD5 "bd46d74e3296bd8a444d731bb10c1738" CACHE STRING "MD5 checksum of SCAFACOS tarball") mark_as_advanced(SCAFACOS_URL) mark_as_advanced(SCAFACOS_MD5) + GetFallbackURL(SCAFACOS_URL SCAFACOS_FALLBACK) + # version 1.0.1 needs a patch to compile and linke cleanly with GCC 10 and later. file(DOWNLOAD ${LAMMPS_THIRDPARTY_URL}/scafacos-1.0.1-fix.diff ${CMAKE_CURRENT_BINARY_DIR}/scafacos-1.0.1.fix.diff @@ -30,7 +32,7 @@ if(DOWNLOAD_SCAFACOS) include(ExternalProject) ExternalProject_Add(scafacos_build - URL ${SCAFACOS_URL} + URL ${SCAFACOS_URL} ${SCAFACOS_FALLBACK} URL_MD5 ${SCAFACOS_MD5} PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_BINARY_DIR}/scafacos-1.0.1.fix.diff CONFIGURE_COMMAND /configure --prefix= --disable-doc From 6776c4215d4f341a2bc132ebc490a5040c468961 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 31 Jan 2023 22:23:41 -0500 Subject: [PATCH 115/445] add support for building a static lammps-shell executable with Linux/MUSL --- cmake/Modules/Tools.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/Tools.cmake b/cmake/Modules/Tools.cmake index 75e4333abd..c4c33cc40c 100644 --- a/cmake/Modules/Tools.cmake +++ b/cmake/Modules/Tools.cmake @@ -50,12 +50,16 @@ if(BUILD_LAMMPS_SHELL) add_executable(lammps-shell ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.cpp ${ICON_RC_FILE}) target_include_directories(lammps-shell PRIVATE ${LAMMPS_TOOLS_DIR}/lammps-shell) + target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::READLINE) # workaround for broken readline pkg-config file on FreeBSD if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") target_include_directories(lammps-shell PRIVATE /usr/local/include) endif() - target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::READLINE) + if(CMAKE_SYSTEM_NAME STREQUAL "LinuxMUSL") + pkg_check_modules(TERMCAP IMPORTED_TARGET REQUIRED termcap) + target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::TERMCAP) + endif() install(TARGETS lammps-shell EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR}) install(DIRECTORY ${LAMMPS_TOOLS_DIR}/lammps-shell/icons DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/) install(FILES ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/) From dade985558e82b66b4cf7a56990648ebd7b2e638 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 31 Jan 2023 23:17:50 -0500 Subject: [PATCH 116/445] skip tests for lepton pair styles with INTEL package --- unittest/force-styles/tests/mol-pair-lepton.yaml | 2 +- unittest/force-styles/tests/mol-pair-lepton_coul.yaml | 2 +- unittest/force-styles/tests/mol-pair-lepton_coul_long.yaml | 4 ++-- unittest/force-styles/tests/mol-pair-lepton_zbl.yaml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/unittest/force-styles/tests/mol-pair-lepton.yaml b/unittest/force-styles/tests/mol-pair-lepton.yaml index 81d8286588..03117a9aa5 100644 --- a/unittest/force-styles/tests/mol-pair-lepton.yaml +++ b/unittest/force-styles/tests/mol-pair-lepton.yaml @@ -2,7 +2,7 @@ lammps_version: 22 Dec 2022 date_generated: Thu Dec 22 09:57:30 2022 epsilon: 5e-14 -skip_tests: +skip_tests: intel prerequisites: ! | atom full pair lepton diff --git a/unittest/force-styles/tests/mol-pair-lepton_coul.yaml b/unittest/force-styles/tests/mol-pair-lepton_coul.yaml index 06dba1ebb1..2092072eb3 100644 --- a/unittest/force-styles/tests/mol-pair-lepton_coul.yaml +++ b/unittest/force-styles/tests/mol-pair-lepton_coul.yaml @@ -2,7 +2,7 @@ lammps_version: 22 Dec 2022 date_generated: Fri Jan 6 13:07:07 2023 epsilon: 5e-13 -skip_tests: +skip_tests: intel prerequisites: ! | atom full pair lepton/coul diff --git a/unittest/force-styles/tests/mol-pair-lepton_coul_long.yaml b/unittest/force-styles/tests/mol-pair-lepton_coul_long.yaml index e9e6e12ec4..8f909c9492 100644 --- a/unittest/force-styles/tests/mol-pair-lepton_coul_long.yaml +++ b/unittest/force-styles/tests/mol-pair-lepton_coul_long.yaml @@ -1,8 +1,8 @@ --- lammps_version: 22 Dec 2022 date_generated: Fri Jan 6 11:43:19 2023 -epsilon: 5e-14 -skip_tests: +epsilon: 1e-13 +skip_tests: intel prerequisites: ! | atom full pair lepton/coul diff --git a/unittest/force-styles/tests/mol-pair-lepton_zbl.yaml b/unittest/force-styles/tests/mol-pair-lepton_zbl.yaml index 883021c26b..8ffb36eac8 100644 --- a/unittest/force-styles/tests/mol-pair-lepton_zbl.yaml +++ b/unittest/force-styles/tests/mol-pair-lepton_zbl.yaml @@ -2,7 +2,7 @@ lammps_version: 22 Dec 2022 date_generated: Sun Jan 8 01:13:49 2023 epsilon: 5e-10 -skip_tests: +skip_tests: intel prerequisites: ! | atom full pair lepton From 7172d1bdd1d1b7157a285d168f09b48e8db0a7d5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 1 Feb 2023 03:53:32 -0500 Subject: [PATCH 117/445] correct syntax error --- unittest/fortran/wrap_gather_scatter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittest/fortran/wrap_gather_scatter.cpp b/unittest/fortran/wrap_gather_scatter.cpp index 02d9f1d487..bbadbbc1a7 100644 --- a/unittest/fortran/wrap_gather_scatter.cpp +++ b/unittest/fortran/wrap_gather_scatter.cpp @@ -51,7 +51,7 @@ protected: { ::testing::internal::CaptureStdout(); lmp = (LAMMPS_NS::LAMMPS *)f_lammps_with_args(); - lmp->input->one("variable index input_dir " STRINGIFY(TEST_INPUT_FOLDER)); + lmp->input->one("variable input_dir index " STRINGIFY(TEST_INPUT_FOLDER)); std::string output = ::testing::internal::GetCapturedStdout(); EXPECT_STREQ(output.substr(0, 8).c_str(), "LAMMPS ("); } From 89b37c51dffb7dadffcf2f4d16ac6e58e27cd673 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 1 Feb 2023 06:47:25 -0500 Subject: [PATCH 118/445] implement download fallback for traditional make build --- lib/hdnnp/.gitignore | 3 ++ lib/hdnnp/Install.py | 17 ++++++++---- lib/install_helpers.py | 24 ++++++++++------ lib/latte/Install.py | 16 ++++++++--- lib/mdi/Install.py | 61 ++++++++--------------------------------- lib/mscg/Install.py | 16 +++++++++-- lib/pace/Install.py | 15 +++++++--- lib/plumed/Install.py | 16 ++++++++--- lib/scafacos/Install.py | 21 +++++++++----- 9 files changed, 105 insertions(+), 84 deletions(-) create mode 100644 lib/hdnnp/.gitignore diff --git a/lib/hdnnp/.gitignore b/lib/hdnnp/.gitignore new file mode 100644 index 0000000000..2a6742ed7a --- /dev/null +++ b/lib/hdnnp/.gitignore @@ -0,0 +1,3 @@ +/includelink +/liblink +/n2p2-* diff --git a/lib/hdnnp/Install.py b/lib/hdnnp/Install.py index 3b232f400b..45c14a5aff 100644 --- a/lib/hdnnp/Install.py +++ b/lib/hdnnp/Install.py @@ -10,7 +10,7 @@ import sys, os, platform, subprocess, shutil from argparse import ArgumentParser sys.path.append('..') -from install_helpers import get_cpus, fullpath, geturl, checkmd5sum +from install_helpers import get_cpus, fullpath, geturl, checkmd5sum, getfallback parser = ArgumentParser(prog='Install.py', description="LAMMPS library build wrapper script") @@ -76,14 +76,21 @@ if pathflag: if buildflag: url = "https://github.com/CompPhysVienna/n2p2/archive/v%s.tar.gz" % (version) - filename = "n2p2-%s.tar.gz" %version - print("Downloading n2p2 ...") - geturl(url, filename) + filename = "n2p2-%s.tar.gz" % version + fallback = getfallback('n2p2', url) + print("Downloading n2p2 from", url) + try: + geturl(url, filename) + except: + geturl(fallback, filename) # verify downloaded archive integrity via md5 checksum, if known. if version in checksums: if not checkmd5sum(checksums[version], filename): - sys.exit("Checksum for n2p2 library does not match") + print("Checksum did not match. Trying fallback URL", fallback) + geturl(fallback, filename) + if not checkmd5sum(checksums[version], filename): + sys.exit("Checksum for n2p2 library does not match for fallback, too.") print("Unpacking n2p2 source tarball ...") if os.path.exists("%s/n2p2-%s" % (homepath, version)): diff --git a/lib/install_helpers.py b/lib/install_helpers.py index e1ebd1cde7..59171ee4e0 100644 --- a/lib/install_helpers.py +++ b/lib/install_helpers.py @@ -1,4 +1,7 @@ -import hashlib,os,subprocess +import hashlib +import os +import re +import subprocess # try to auto-detect the maximum number of available CPUs def get_cpus(): @@ -32,31 +35,31 @@ def which(program): return None -def geturl(url,fname): +def geturl(url, fname): success = False if which('curl') != None: - cmd = 'curl -L -o "%s" %s' % (fname,url) + cmd = 'curl -L -o "%s" %s' % (fname, url) try: - subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) success = True except subprocess.CalledProcessError as e: print("Calling curl failed with: %s" % e.output.decode('UTF-8')) if not success and which('wget') != None: - cmd = 'wget -O "%s" %s' % (fname,url) + cmd = 'wget -O "%s" %s' % (fname, url) try: - subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) success = True except subprocess.CalledProcessError as e: print("Calling wget failed with: %s" % e.output.decode('UTF-8')) if not success: - error("Failed to download source code with 'curl' or 'wget'") + raise Exception("Failed to download source code with 'curl' or 'wget' from " + url) return -def checkmd5sum(md5sum,fname): - with open(fname,'rb') as fh: +def checkmd5sum(md5sum, fname): + with open(fname, 'rb') as fh: m = hashlib.md5() while True: data = fh.read(81920) @@ -66,3 +69,6 @@ def checkmd5sum(md5sum,fname): fh.close() return m.hexdigest() == md5sum +def getfallback(lib, url): + archive = re.sub(r'^https://.*/([^/]+gz)', r'-\1', url) + return 'https://download.lammps.org/thirdparty/' + lib + archive diff --git a/lib/latte/Install.py b/lib/latte/Install.py index 2e8f9bee8d..4e3b27859c 100644 --- a/lib/latte/Install.py +++ b/lib/latte/Install.py @@ -10,7 +10,7 @@ import sys, os, subprocess, shutil, tarfile from argparse import ArgumentParser sys.path.append('..') -from install_helpers import fullpath, geturl, checkmd5sum +from install_helpers import fullpath, geturl, checkmd5sum, getfallback parser = ArgumentParser(prog='Install.py', description="LAMMPS library build wrapper script") @@ -86,17 +86,25 @@ if buildflag: url = "https://github.com/lanl/LATTE/archive/v%s.tar.gz" % version lattepath = fullpath(homepath) lattedir = os.path.join(lattepath, homedir) + fallback = getfallback('latte', url) + filename = 'LATTE.tar.gz' # download and unpack LATTE tarball if buildflag: print("Downloading LATTE ...") - geturl(url, "LATTE.tar.gz") + try: + geturl(url, filename) + except: + geturl(fallback, filename) # verify downloaded archive integrity via md5 checksum, if known. if version in checksums: - if not checkmd5sum(checksums[version], 'LATTE.tar.gz'): - sys.exit("Checksum for LATTE library does not match") + if not checkmd5sum(checksums[version], filename): + print("Checksum did not match. Trying fallback URL", fallback) + geturl(fallback, filename) + if not checkmd5sum(checksums[version], filename): + sys.exit("Checksum for LATTE library does not match for fallback, too.") print("Unpacking LATTE ...") if os.path.exists(lattedir): diff --git a/lib/mdi/Install.py b/lib/mdi/Install.py index 59d218b1f9..77d13d3e8b 100644 --- a/lib/mdi/Install.py +++ b/lib/mdi/Install.py @@ -9,7 +9,7 @@ import sys,os,subprocess import glob sys.path.append('..') -from install_helpers import checkmd5sum +from install_helpers import fullpath, geturl, checkmd5sum, getfallback # help message @@ -51,49 +51,6 @@ def error(str=None): # expand to full path name # process leading '~' or relative path -def fullpath(path): - return os.path.abspath(os.path.expanduser(path)) - -def which(program): - def is_exe(fpath): - return os.path.isfile(fpath) and os.access(fpath, os.X_OK) - - fpath, fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - path = path.strip('"') - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None - -def geturl(url,fname): - success = False - - if which('curl') != None: - cmd = 'curl -L -o "%s" %s' % (fname,url) - try: - subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) - success = True - except subprocess.CalledProcessError as e: - print("Calling curl failed with: %s" % e.output.decode('UTF-8')) - - if not success and which('wget') != None: - cmd = 'wget -O "%s" %s' % (fname,url) - try: - subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) - success = True - except subprocess.CalledProcessError as e: - print("Calling wget failed with: %s" % e.output.decode('UTF-8')) - - if not success: - error("Failed to download source code with 'curl' or 'wget'") - return - # parse args args = sys.argv[1:] @@ -123,17 +80,24 @@ lib = os.path.basename(cwd) # download and unpack MDI_Library tarball -homepath = "." +homepath = fullpath('.') homedir = "%s/MDI_Library" % homepath print("Downloading MDI_Library ...") -mditar = "%s/v%s.tar.gz" % (homepath,version) -geturl(url, mditar) +mditar = "%s/v%s.tar.gz" % (homepath, version) +fallback = getfallback('mdi', url) +try: + geturl(url, mditar) +except: + geturl(fallback, mditar) # verify downloaded archive integrity via md5 checksum, if known. if version in checksums: if not checkmd5sum(checksums[version], mditar): - sys.exit("Checksum for MDI library does not match") + print("Checksum did not match. Trying fallback URL", fallback) + geturl(fallback, mditar) + if not checkmd5sum(checksums[version], mditar): + sys.exit("Checksum for MDI library does not match") print("Unpacking MDI_Library tarball ...") if os.path.exists("%s/v%s" % (homepath,version)): @@ -199,7 +163,6 @@ makefile_lammps = open(str(dir_path) + "/Makefile.lammps", "a") makefile_lammps.write(str(rpath_option) + "\n") makefile_lammps.close() - shared_files = glob.glob( os.path.join( homepath, "liblink", "lib%s.a" % lib) ) if len(shared_files) > 0: print("Build was successful") diff --git a/lib/mscg/Install.py b/lib/mscg/Install.py index 9d18b7c083..df17005dca 100644 --- a/lib/mscg/Install.py +++ b/lib/mscg/Install.py @@ -10,7 +10,7 @@ import sys, os, subprocess, shutil, tarfile from argparse import ArgumentParser sys.path.append('..') -from install_helpers import fullpath, geturl +from install_helpers import fullpath, geturl, checkmd5sum, getfallback parser = ArgumentParser(prog='Install.py', description="LAMMPS library build wrapper script") @@ -84,7 +84,19 @@ if pathflag: if buildflag: print("Downloading MS-CG ...") tarname = os.path.join(homepath, tarname) - geturl(url, tarname) + fallback = getfallback('mscg', url) + try: + geturl(url, tarname) + except: + geturl(fallback, tarname) + + # verify downloaded archive integrity via md5 checksum, if known. + if mscgver in checksums: + if not checkmd5sum(checksums[mscgver], tarname): + print("Checksum did not match. Trying fallback URL", fallback) + geturl(fallback, tarname) + if not checkmd5sum(checksums[mscgver], tarname): + sys.exit("Checksum for LATTE library does not match for fallback, too.") print("Unpacking MS-CG tarfile ...") diff --git a/lib/pace/Install.py b/lib/pace/Install.py index f7f50d4f6d..21cadbb20a 100644 --- a/lib/pace/Install.py +++ b/lib/pace/Install.py @@ -13,7 +13,7 @@ import sys from argparse import ArgumentParser sys.path.append('..') -from install_helpers import fullpath, geturl, checkmd5sum +from install_helpers import fullpath, geturl, checkmd5sum, getfallback # settings @@ -77,14 +77,21 @@ if buildflag: print("Downloading pace tarball ...") archive_filename = "%s.%s" % (version, archive_extension) download_filename = "%s/%s" % (thisdir, archive_filename) + fallback = getfallback('pacelib', url) print("Downloading from ", url, " to ", download_filename, end=" ") - geturl(url, download_filename) + try: + geturl(url, download_filename) + except: + geturl(fallback, download_filename) print(" done") # verify downloaded archive integrity via md5 checksum, if known. if version in checksums: - if not checkmd5sum(checksums[version], archive_filename): - sys.exit("Checksum for pace library does not match") + if not checkmd5sum(checksums[version], download_filename): + print("Checksum did not match. Trying fallback URL", fallback) + geturl(fallback, download_filename) + if not checkmd5sum(checksums[version], download_filename): + sys.exit("Checksum for pace library does not match for fallback, too.") print("Unpacking pace tarball ...") src_folder = thisdir + "/src" diff --git a/lib/plumed/Install.py b/lib/plumed/Install.py index bb3a158bd4..bb6f27fddb 100644 --- a/lib/plumed/Install.py +++ b/lib/plumed/Install.py @@ -10,7 +10,7 @@ import sys, os, platform, subprocess, shutil from argparse import ArgumentParser sys.path.append('..') -from install_helpers import get_cpus, fullpath, geturl, checkmd5sum +from install_helpers import get_cpus, fullpath, geturl, checkmd5sum, getfallback parser = ArgumentParser(prog='Install.py', description="LAMMPS library build wrapper script") @@ -86,6 +86,7 @@ buildflag = args.build pathflag = args.path is not None plumedpath = args.path mode = args.mode +version = args.version homepath = fullpath('.') homedir = "%s/plumed2" % (homepath) @@ -101,14 +102,21 @@ if pathflag: if buildflag: url = "https://github.com/plumed/plumed2/releases/download/v%s/plumed-src-%s.tgz" % (version, version) - filename = "plumed-src-%s.tar.gz" %version + filename = "plumed-src-%s.tar.gz" % version + fallback = getfallback('plumed', url) print("Downloading plumed ...") - geturl(url, filename) + try: + geturl(url, filename) + except: + geturl(fallback, filename) # verify downloaded archive integrity via md5 checksum, if known. if version in checksums: if not checkmd5sum(checksums[version], filename): - sys.exit("Checksum for plumed2 library does not match") + print("Checksum did not match. Trying fallback URL", fallback) + geturl(fallback, filename) + if not checkmd5sum(checksums[version], filename): + sys.exit("Checksum for plumed2 library does not match for fallback, too.") print("Unpacking plumed2 source tarball ...") if os.path.exists("%s/plumed-%s" % (homepath, version)): diff --git a/lib/scafacos/Install.py b/lib/scafacos/Install.py index 8044215d47..28bcf43086 100644 --- a/lib/scafacos/Install.py +++ b/lib/scafacos/Install.py @@ -10,15 +10,13 @@ import sys, os, subprocess, shutil, tarfile from argparse import ArgumentParser sys.path.append('..') -from install_helpers import fullpath, geturl, get_cpus, checkmd5sum +from install_helpers import fullpath, geturl, get_cpus, checkmd5sum, getfallback -parser = ArgumentParser(prog='Install.py', - description="LAMMPS library build wrapper script") +parser = ArgumentParser(prog='Install.py', description="LAMMPS library build wrapper script") # settings version = "1.0.1" -url = "https://github.com/scafacos/scafacos/releases/download/v%s/scafacos-%s.tar.gz" % (version, version) # known checksums for different ScaFaCoS versions. used to validate the download. checksums = { \ @@ -59,6 +57,7 @@ if not args.build and not args.path: buildflag = args.build pathflag = args.path is not None version = args.version +url = "https://github.com/scafacos/scafacos/releases/download/v%s/scafacos-%s.tar.gz" % (version, version) homepath = fullpath(".") scafacospath = os.path.join(homepath, "scafacos-%s" % version) @@ -76,12 +75,20 @@ if pathflag: if buildflag: print("Downloading ScaFaCoS ...") - geturl(url, "%s/scafacos-%s.tar.gz" % (homepath, version)) + filename = "%s/scafacos-%s.tar.gz" % (homepath, version) + fallback = getfallback('scafacos', url) + try: + geturl(url, filename) + except: + geturl(fallback, filename) # verify downloaded archive integrity via md5 checksum, if known. if version in checksums: - if not checkmd5sum(checksums[version], '%s/scafacos-%s.tar.gz' % (homepath, version)): - sys.exit("Checksum for ScaFaCoS library does not match") + if not checkmd5sum(checksums[version], filename): + print("Checksum did not match. Trying fallback URL", fallback) + geturl(fallback, filename) + if not checkmd5sum(checksums[version], filename): + sys.exit("Checksum for ScaFaCoS library does not match for fallback, too.") print("Unpacking ScaFaCoS tarball ...") if os.path.exists(scafacospath): From c0c5c342909d50aa6f744775e302f4a79a9cdbf6 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 1 Feb 2023 16:13:09 -0700 Subject: [PATCH 119/445] Disable Kokkos GPU <--> CPU overlap when using pair hybrid with non-Kokkos styles --- src/KOKKOS/kokkos.cpp | 1 + src/KOKKOS/kokkos.h | 1 + src/KOKKOS/pair_hybrid_kokkos.cpp | 14 ++- src/KOKKOS/pair_hybrid_kokkos.h | 1 + src/KOKKOS/verlet_kokkos.cpp | 144 +++++++++++++----------------- 5 files changed, 78 insertions(+), 83 deletions(-) diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 9bbfb4157f..b6c1a54636 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -99,6 +99,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) memoryKK = (MemoryKokkos*) memory; auto_sync = 1; + allow_overlap = 1; int me = 0; MPI_Comm_rank(world,&me); diff --git a/src/KOKKOS/kokkos.h b/src/KOKKOS/kokkos.h index 02189e6c4a..d945878d4c 100644 --- a/src/KOKKOS/kokkos.h +++ b/src/KOKKOS/kokkos.h @@ -49,6 +49,7 @@ class KokkosLMP : protected Pointers { int neigh_thread_set; int neigh_transpose; int newtonflag; + int allow_overlap; double binsize; static int is_finalized; diff --git a/src/KOKKOS/pair_hybrid_kokkos.cpp b/src/KOKKOS/pair_hybrid_kokkos.cpp index 2be290658c..eabce17a1c 100644 --- a/src/KOKKOS/pair_hybrid_kokkos.cpp +++ b/src/KOKKOS/pair_hybrid_kokkos.cpp @@ -43,6 +43,19 @@ PairHybridKokkos::PairHybridKokkos(LAMMPS *lmp) : PairHybrid(lmp) datamask_modify = EMPTY_MASK; } +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +void PairHybridKokkos::init_style() +{ + PairHybrid::init_style(); + + for (int m = 0; m < nstyles; m++) + if (styles[m]->execution_space == Host) + lmp->kokkos->allow_overlap = 0; +} + /* ---------------------------------------------------------------------- call each sub-style's compute() or compute_outer() function accumulate sub-style global/peratom energy/virial in hybrid @@ -157,7 +170,6 @@ void PairHybridKokkos::compute(int eflag, int vflag) } } } - } delete [] saved_special; diff --git a/src/KOKKOS/pair_hybrid_kokkos.h b/src/KOKKOS/pair_hybrid_kokkos.h index c50224cddd..5f3cc57fd6 100644 --- a/src/KOKKOS/pair_hybrid_kokkos.h +++ b/src/KOKKOS/pair_hybrid_kokkos.h @@ -40,6 +40,7 @@ class PairHybridKokkos : public PairHybrid { PairHybridKokkos(class LAMMPS *); void compute(int, int) override; + void init_style() override; private: DAT::t_x_array_randomread x; diff --git a/src/KOKKOS/verlet_kokkos.cpp b/src/KOKKOS/verlet_kokkos.cpp index e3fc6fe925..fcfba2f0e7 100644 --- a/src/KOKKOS/verlet_kokkos.cpp +++ b/src/KOKKOS/verlet_kokkos.cpp @@ -372,123 +372,103 @@ void VerletKokkos::run(int n) } bool execute_on_host = false; - unsigned int datamask_read_device = 0; - unsigned int datamask_modify_device = 0; unsigned int datamask_read_host = 0; + unsigned int datamask_exclude = 0; + int allow_overlap = lmp->kokkos->allow_overlap; - if (pair_compute_flag) { - if (force->pair->execution_space==Host) { - execute_on_host = true; - datamask_read_host |= force->pair->datamask_read; - datamask_modify_device |= force->pair->datamask_modify; - } else { - datamask_read_device |= force->pair->datamask_read; - datamask_modify_device |= force->pair->datamask_modify; - } - } - if (atomKK->molecular && force->bond) { - if (force->bond->execution_space==Host) { - execute_on_host = true; - datamask_read_host |= force->bond->datamask_read; - datamask_modify_device |= force->bond->datamask_modify; - } else { - datamask_read_device |= force->bond->datamask_read; - datamask_modify_device |= force->bond->datamask_modify; - } - } - if (atomKK->molecular && force->angle) { - if (force->angle->execution_space==Host) { - execute_on_host = true; - datamask_read_host |= force->angle->datamask_read; - datamask_modify_device |= force->angle->datamask_modify; - } else { - datamask_read_device |= force->angle->datamask_read; - datamask_modify_device |= force->angle->datamask_modify; - } - } - if (atomKK->molecular && force->dihedral) { - if (force->dihedral->execution_space==Host) { - execute_on_host = true; - datamask_read_host |= force->dihedral->datamask_read; - datamask_modify_device |= force->dihedral->datamask_modify; - } else { - datamask_read_device |= force->dihedral->datamask_read; - datamask_modify_device |= force->dihedral->datamask_modify; - } - } - if (atomKK->molecular && force->improper) { - if (force->improper->execution_space==Host) { - execute_on_host = true; - datamask_read_host |= force->improper->datamask_read; - datamask_modify_device |= force->improper->datamask_modify; - } else { - datamask_read_device |= force->improper->datamask_read; - datamask_modify_device |= force->improper->datamask_modify; - } - } - if (kspace_compute_flag) { - if (force->kspace->execution_space==Host) { - execute_on_host = true; - datamask_read_host |= force->kspace->datamask_read; - datamask_modify_device |= force->kspace->datamask_modify; - } else { - datamask_read_device |= force->kspace->datamask_read; - datamask_modify_device |= force->kspace->datamask_modify; - } - } + if (allow_overlap) { + datamask_exclude = (F_MASK | ENERGY_MASK | VIRIAL_MASK); + + if (pair_compute_flag) { + if (force->pair->execution_space == Host) { + execute_on_host = true; + datamask_read_host |= force->pair->datamask_read; + } + } + if (atomKK->molecular && force->bond) { + if (force->bond->execution_space == Host) { + execute_on_host = true; + datamask_read_host |= force->bond->datamask_read; + } + } + if (atomKK->molecular && force->angle) { + if (force->angle->execution_space == Host) { + execute_on_host = true; + datamask_read_host |= force->angle->datamask_read; + } + } + if (atomKK->molecular && force->dihedral) { + if (force->dihedral->execution_space == Host) { + execute_on_host = true; + datamask_read_host |= force->dihedral->datamask_read; + } + } + if (atomKK->molecular && force->improper) { + if (force->improper->execution_space == Host) { + execute_on_host = true; + datamask_read_host |= force->improper->datamask_read; + } + } + if (kspace_compute_flag) { + if (force->kspace->execution_space == Host) { + execute_on_host = true; + datamask_read_host |= force->kspace->datamask_read; + } + } + } if (pair_compute_flag) { atomKK->sync(force->pair->execution_space,force->pair->datamask_read); - atomKK->sync(force->pair->execution_space,~(~force->pair->datamask_read|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->sync(force->pair->execution_space,~(~force->pair->datamask_read|datamask_exclude)); force->pair->compute(eflag,vflag); atomKK->modified(force->pair->execution_space,force->pair->datamask_modify); - atomKK->modified(force->pair->execution_space,~(~force->pair->datamask_modify|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->modified(force->pair->execution_space,~(~force->pair->datamask_modify|datamask_exclude)); timer->stamp(Timer::PAIR); } - if (execute_on_host) { - if (pair_compute_flag && force->pair->datamask_modify!=(F_MASK | ENERGY_MASK | VIRIAL_MASK)) - Kokkos::fence(); - atomKK->sync_overlapping_device(Host,~(~datamask_read_host|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); - if (pair_compute_flag && force->pair->execution_space!=Host) { - Kokkos::deep_copy(LMPHostType(),atomKK->k_f.h_view,0.0); - } + if (execute_on_host) { + if (pair_compute_flag && force->pair->datamask_modify != datamask_exclude) + Kokkos::fence(); + atomKK->sync_overlapping_device(Host,~(~datamask_read_host|datamask_exclude)); + if (pair_compute_flag && force->pair->execution_space != Host) { + Kokkos::deep_copy(LMPHostType(),atomKK->k_f.h_view,0.0); + } } if (atomKK->molecular) { if (force->bond) { - atomKK->sync(force->bond->execution_space,~(~force->bond->datamask_read|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->sync(force->bond->execution_space,~(~force->bond->datamask_read|datamask_exclude)); force->bond->compute(eflag,vflag); - atomKK->modified(force->bond->execution_space,~(~force->bond->datamask_modify|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->modified(force->bond->execution_space,~(~force->bond->datamask_modify|datamask_exclude)); } if (force->angle) { - atomKK->sync(force->angle->execution_space,~(~force->angle->datamask_read|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->sync(force->angle->execution_space,~(~force->angle->datamask_read|datamask_exclude)); force->angle->compute(eflag,vflag); - atomKK->modified(force->angle->execution_space,~(~force->angle->datamask_modify|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->modified(force->angle->execution_space,~(~force->angle->datamask_modify|datamask_exclude)); } if (force->dihedral) { - atomKK->sync(force->dihedral->execution_space,~(~force->dihedral->datamask_read|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->sync(force->dihedral->execution_space,~(~force->dihedral->datamask_read|datamask_exclude)); force->dihedral->compute(eflag,vflag); - atomKK->modified(force->dihedral->execution_space,~(~force->dihedral->datamask_modify|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->modified(force->dihedral->execution_space,~(~force->dihedral->datamask_modify|datamask_exclude)); } if (force->improper) { - atomKK->sync(force->improper->execution_space,~(~force->improper->datamask_read|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->sync(force->improper->execution_space,~(~force->improper->datamask_read|datamask_exclude)); force->improper->compute(eflag,vflag); - atomKK->modified(force->improper->execution_space,~(~force->improper->datamask_modify|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->modified(force->improper->execution_space,~(~force->improper->datamask_modify|datamask_exclude)); } timer->stamp(Timer::BOND); } if (kspace_compute_flag) { - atomKK->sync(force->kspace->execution_space,~(~force->kspace->datamask_read|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->sync(force->kspace->execution_space,~(~force->kspace->datamask_read|datamask_exclude)); force->kspace->compute(eflag,vflag); - atomKK->modified(force->kspace->execution_space,~(~force->kspace->datamask_modify|(F_MASK | ENERGY_MASK | VIRIAL_MASK))); + atomKK->modified(force->kspace->execution_space,~(~force->kspace->datamask_modify|datamask_exclude)); timer->stamp(Timer::KSPACE); } if (execute_on_host && atomKK->k_f.h_view.data() != atomKK->k_f.d_view.data()) { - if (f_merge_copy.extent(0)k_f.extent(0)) { + if (f_merge_copy.extent(0) < atomKK->k_f.extent(0)) { f_merge_copy = DAT::t_f_array("VerletKokkos::f_merge_copy",atomKK->k_f.extent(0)); } f = atomKK->k_f.d_view; From c9b23b8a034cae92e31d4bd8877da85bcc58a2f6 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Thu, 2 Feb 2023 10:25:31 -0700 Subject: [PATCH 120/445] Remove this-> --- src/KOKKOS/meam_force_kokkos.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KOKKOS/meam_force_kokkos.h b/src/KOKKOS/meam_force_kokkos.h index 5c4244e99b..d086230fc7 100644 --- a/src/KOKKOS/meam_force_kokkos.h +++ b/src/KOKKOS/meam_force_kokkos.h @@ -446,7 +446,7 @@ KOKKOS_INLINE_FUNCTION void MEAMKokkos::operator()(TagMEAMForcev2D[nv2]; + arg = delij[n] * delij[p] * v2D[nv2]; drho3mdrm1[m] = drho3mdrm1[m] + d_arho3m(i, vind3D[m][n][p]) * arg; drho3mdrm2[m] = drho3mdrm2[m] + d_arho3m(j, vind3D[m][n][p]) * arg; nv2 = nv2 + 1; From e19f873f4904b1e49a839439559aeb9be666493d Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 2 Feb 2023 12:31:21 -0600 Subject: [PATCH 121/445] Added the missing source files for AtomVecDipoleKokkos --- src/KOKKOS/atom_vec_dipole_kokkos.cpp | 666 ++++++++++++++++++++++++++ src/KOKKOS/atom_vec_dipole_kokkos.h | 83 ++++ 2 files changed, 749 insertions(+) create mode 100644 src/KOKKOS/atom_vec_dipole_kokkos.cpp create mode 100644 src/KOKKOS/atom_vec_dipole_kokkos.h diff --git a/src/KOKKOS/atom_vec_dipole_kokkos.cpp b/src/KOKKOS/atom_vec_dipole_kokkos.cpp new file mode 100644 index 0000000000..564ccf93f4 --- /dev/null +++ b/src/KOKKOS/atom_vec_dipole_kokkos.cpp @@ -0,0 +1,666 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS Development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "atom_vec_dipole_kokkos.h" + +#include "atom_kokkos.h" +#include "atom_masks.h" +#include "comm_kokkos.h" +#include "domain.h" +#include "error.h" +#include "fix.h" +#include "memory_kokkos.h" +#include "modify.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +AtomVecDipoleKokkos::AtomVecDipoleKokkos(LAMMPS *lmp) : AtomVec(lmp), +AtomVecKokkos(lmp), AtomVecDipole(lmp) +{ + +} + +/* ---------------------------------------------------------------------- + grow atom arrays + n = 0 grows arrays by DELTA + n > 0 allocates arrays to size n +------------------------------------------------------------------------- */ + +void AtomVecDipoleKokkos::grow(int n) +{ + auto DELTA = LMP_KOKKOS_AV_DELTA; + int step = MAX(DELTA,nmax*0.01); + if (n == 0) nmax += step; + else nmax = n; + atomKK->nmax = nmax; + if (nmax < 0 || nmax > MAXSMALLINT) + error->one(FLERR,"Per-processor system is too big"); + + atomKK->sync(Device,ALL_MASK); + atomKK->modified(Device,ALL_MASK); + + memoryKK->grow_kokkos(atomKK->k_tag,atomKK->tag,nmax,"atom:tag"); + memoryKK->grow_kokkos(atomKK->k_type,atomKK->type,nmax,"atom:type"); + memoryKK->grow_kokkos(atomKK->k_mask,atomKK->mask,nmax,"atom:mask"); + memoryKK->grow_kokkos(atomKK->k_image,atomKK->image,nmax,"atom:image"); + + memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,"atom:x"); + memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,"atom:v"); + memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,"atom:f"); + + memoryKK->grow_kokkos(atomKK->k_q,atomKK->q,nmax,"atom:q"); + memoryKK->grow_kokkos(atomKK->k_mu,atomKK->mu,nmax,"atom:mu"); + + grow_pointers(); + atomKK->sync(Host,ALL_MASK); + + if (atom->nextra_grow) + for (int iextra = 0; iextra < atom->nextra_grow; iextra++) + modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); +} + +/* ---------------------------------------------------------------------- + reset local array ptrs +------------------------------------------------------------------------- */ + +void AtomVecDipoleKokkos::grow_pointers() +{ + tag = atomKK->tag; + d_tag = atomKK->k_tag.d_view; + h_tag = atomKK->k_tag.h_view; + + type = atomKK->type; + d_type = atomKK->k_type.d_view; + h_type = atomKK->k_type.h_view; + mask = atomKK->mask; + d_mask = atomKK->k_mask.d_view; + h_mask = atomKK->k_mask.h_view; + image = atomKK->image; + d_image = atomKK->k_image.d_view; + h_image = atomKK->k_image.h_view; + + x = atomKK->x; + d_x = atomKK->k_x.d_view; + h_x = atomKK->k_x.h_view; + v = atomKK->v; + d_v = atomKK->k_v.d_view; + h_v = atomKK->k_v.h_view; + f = atomKK->f; + d_f = atomKK->k_f.d_view; + h_f = atomKK->k_f.h_view; + + q = atomKK->q; + d_q = atomKK->k_q.d_view; + h_q = atomKK->k_q.h_view; + mu = atomKK->mu; + d_mu = atomKK->k_mu.d_view; + h_mu = atomKK->k_mu.h_view; +} + +/* ---------------------------------------------------------------------- */ + +template +struct AtomVecDipoleKokkos_PackComm { + typedef DeviceType device_type; + + typename ArrayTypes::t_x_array_randomread _x; + typename ArrayTypes::t_mu_array_randomread _mu; + typename ArrayTypes::t_xfloat_2d_um _buf; + typename ArrayTypes::t_int_2d_const _list; + const int _iswap; + X_FLOAT _xprd,_yprd,_zprd,_xy,_xz,_yz; + X_FLOAT _pbc[6]; + + AtomVecDipoleKokkos_PackComm( + const typename DAT::tdual_x_array &x, + const typename DAT::tdual_float_1d_4 &mu, + const typename DAT::tdual_xfloat_2d &buf, + const typename DAT::tdual_int_2d &list, + const int & iswap, + const X_FLOAT &xprd, const X_FLOAT &yprd, const X_FLOAT &zprd, + const X_FLOAT &xy, const X_FLOAT &xz, const X_FLOAT &yz, const int* const pbc): + _x(x.view()), + _mu(mu.view()), + _list(list.view()),_iswap(iswap), + _xprd(xprd),_yprd(yprd),_zprd(zprd), + _xy(xy),_xz(xz),_yz(yz) { + const size_t elements = 7; // size_forward + const size_t maxsend = (buf.view().extent(0)*buf.view().extent(1))/elements; + buffer_view(_buf,buf,maxsend,elements); + _pbc[0] = pbc[0]; _pbc[1] = pbc[1]; _pbc[2] = pbc[2]; + _pbc[3] = pbc[3]; _pbc[4] = pbc[4]; _pbc[5] = pbc[5]; + }; + + KOKKOS_INLINE_FUNCTION + void operator() (const int& i) const { + const int j = _list(_iswap,i); + if (PBC_FLAG == 0) { + _buf(i,0) = _x(j,0); + _buf(i,1) = _x(j,1); + _buf(i,2) = _x(j,2); + _buf(i,3) = _mu(j,0); + _buf(i,4) = _mu(j,1); + _buf(i,5) = _mu(j,2); + _buf(i,6) = _mu(j,3); + } else { + if (TRICLINIC == 0) { + _buf(i,0) = _x(j,0) + _pbc[0]*_xprd; + _buf(i,1) = _x(j,1) + _pbc[1]*_yprd; + _buf(i,2) = _x(j,2) + _pbc[2]*_zprd; + _buf(i,3) = _mu(j,0); + _buf(i,4) = _mu(j,1); + _buf(i,5) = _mu(j,2); + _buf(i,6) = _mu(j,3); + } else { + _buf(i,0) = _x(j,0) + _pbc[0]*_xprd + _pbc[5]*_xy + _pbc[4]*_xz; + _buf(i,1) = _x(j,1) + _pbc[1]*_yprd + _pbc[3]*_yz; + _buf(i,2) = _x(j,2) + _pbc[2]*_zprd; + _buf(i,3) = _mu(j,0); + _buf(i,4) = _mu(j,1); + _buf(i,5) = _mu(j,2); + _buf(i,6) = _mu(j,3); + } + } + } +}; + +/* ---------------------------------------------------------------------- */ + +template +struct AtomVecDipoleKokkos_PackBorder { + typedef DeviceType device_type; + + typename ArrayTypes::t_xfloat_2d _buf; + const typename ArrayTypes::t_int_2d_const _list; + const int _iswap; + const typename ArrayTypes::t_x_array_randomread _x; + const typename ArrayTypes::t_tagint_1d _tag; + const typename ArrayTypes::t_int_1d _type; + const typename ArrayTypes::t_int_1d _mask; + const typename ArrayTypes::t_float_1d _q; + const typename ArrayTypes::t_mu_array_randomread _mu; + X_FLOAT _dx,_dy,_dz; + + AtomVecDipoleKokkos_PackBorder( + const typename ArrayTypes::t_xfloat_2d &buf, + const typename ArrayTypes::t_int_2d_const &list, + const int & iswap, + const typename ArrayTypes::t_x_array &x, + const typename ArrayTypes::t_tagint_1d &tag, + const typename ArrayTypes::t_int_1d &type, + const typename ArrayTypes::t_int_1d &mask, + const typename ArrayTypes::t_float_1d &q, + const typename ArrayTypes::t_mu_array_randomread &mu, + const X_FLOAT &dx, const X_FLOAT &dy, const X_FLOAT &dz): + _buf(buf),_list(list),_iswap(iswap), + _x(x),_tag(tag),_type(type),_mask(mask),_q(q),_mu(mu), + _dx(dx),_dy(dy),_dz(dz) {} + + KOKKOS_INLINE_FUNCTION + void operator() (const int& i) const { + const int j = _list(_iswap,i); + if (PBC_FLAG == 0) { + _buf(i,0) = _x(j,0); + _buf(i,1) = _x(j,1); + _buf(i,2) = _x(j,2); + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; + _buf(i,6) = _q(j); + _buf(i,7) = _mu(j,0); + _buf(i,8) = _mu(j,1); + _buf(i,9) = _mu(j,2); + _buf(i,10) = _mu(j,3); + } else { + _buf(i,0) = _x(j,0) + _dx; + _buf(i,1) = _x(j,1) + _dy; + _buf(i,2) = _x(j,2) + _dz; + _buf(i,3) = d_ubuf(_tag(j)).d; + _buf(i,4) = d_ubuf(_type(j)).d; + _buf(i,5) = d_ubuf(_mask(j)).d; + _buf(i,6) = _q(j); + _buf(i,7) = _mu(j,0); + _buf(i,8) = _mu(j,1); + _buf(i,9) = _mu(j,2); + _buf(i,10) = _mu(j,3); + } + } +}; + +/* ---------------------------------------------------------------------- */ + +int AtomVecDipoleKokkos::pack_border_kokkos(int n, DAT::tdual_int_2d k_sendlist, DAT::tdual_xfloat_2d buf,int iswap, + int pbc_flag, int *pbc, ExecutionSpace space) +{ + X_FLOAT dx,dy,dz; + + if (pbc_flag != 0) { + if (domain->triclinic == 0) { + dx = pbc[0]*domain->xprd; + dy = pbc[1]*domain->yprd; + dz = pbc[2]*domain->zprd; + } else { + dx = pbc[0]; + dy = pbc[1]; + dz = pbc[2]; + } + if (space==Host) { + AtomVecDipoleKokkos_PackBorder f( + buf.view(), k_sendlist.view(), + iswap,h_x,h_tag,h_type,h_mask,h_q,h_mu,dx,dy,dz); + Kokkos::parallel_for(n,f); + } else { + AtomVecDipoleKokkos_PackBorder f( + buf.view(), k_sendlist.view(), + iswap,d_x,d_tag,d_type,d_mask,d_q,d_mu,dx,dy,dz); + Kokkos::parallel_for(n,f); + } + + } else { + dx = dy = dz = 0; + if (space==Host) { + AtomVecDipoleKokkos_PackBorder f( + buf.view(), k_sendlist.view(), + iswap,h_x,h_tag,h_type,h_mask,h_q,h_mu,dx,dy,dz); + Kokkos::parallel_for(n,f); + } else { + AtomVecDipoleKokkos_PackBorder f( + buf.view(), k_sendlist.view(), + iswap,d_x,d_tag,d_type,d_mask,d_q,d_mu,dx,dy,dz); + Kokkos::parallel_for(n,f); + } + } + return n*size_border; +} + +/* ---------------------------------------------------------------------- */ + +template +struct AtomVecDipoleKokkos_UnpackBorder { + typedef DeviceType device_type; + + const typename ArrayTypes::t_xfloat_2d_const _buf; + typename ArrayTypes::t_x_array _x; + typename ArrayTypes::t_tagint_1d _tag; + typename ArrayTypes::t_int_1d _type; + typename ArrayTypes::t_int_1d _mask; + typename ArrayTypes::t_float_1d _q; + typename ArrayTypes::t_mu_array _mu; + int _first; + + + AtomVecDipoleKokkos_UnpackBorder( + const typename ArrayTypes::t_xfloat_2d_const &buf, + typename ArrayTypes::t_x_array &x, + typename ArrayTypes::t_tagint_1d &tag, + typename ArrayTypes::t_int_1d &type, + typename ArrayTypes::t_int_1d &mask, + typename ArrayTypes::t_float_1d &q, + typename ArrayTypes::t_mu_array &mu, + const int& first): + _buf(buf),_x(x),_tag(tag),_type(type),_mask(mask),_q(q),_mu(mu),_first(first) { + }; + + KOKKOS_INLINE_FUNCTION + void operator() (const int& i) const { + _x(i+_first,0) = _buf(i,0); + _x(i+_first,1) = _buf(i,1); + _x(i+_first,2) = _buf(i,2); + _tag(i+_first) = (tagint) d_ubuf(_buf(i,3)).i; + _type(i+_first) = (int) d_ubuf(_buf(i,4)).i; + _mask(i+_first) = (int) d_ubuf(_buf(i,5)).i; + _q(i+_first) = _buf(i,6); + _mu(i+_first,0) = _buf(i,7); + _mu(i+_first,1) = _buf(i,8); + _mu(i+_first,2) = _buf(i,9); + _mu(i+_first,3) = _buf(i,10); + } +}; + +/* ---------------------------------------------------------------------- */ + +void AtomVecDipoleKokkos::unpack_border_kokkos(const int &n, const int &first, + const DAT::tdual_xfloat_2d &buf,ExecutionSpace space) { + atomKK->modified(space,X_MASK|TAG_MASK|TYPE_MASK|MASK_MASK|Q_MASK|MU_MASK); + while (first+n >= nmax) grow(0); + atomKK->modified(space,X_MASK|TAG_MASK|TYPE_MASK|MASK_MASK|Q_MASK|MU_MASK); + if (space==Host) { + struct AtomVecDipoleKokkos_UnpackBorder + f(buf.view(),h_x,h_tag,h_type,h_mask,h_q,h_mu,first); + Kokkos::parallel_for(n,f); + } else { + struct AtomVecDipoleKokkos_UnpackBorder + f(buf.view(),d_x,d_tag,d_type,d_mask,d_q,d_mu,first); + Kokkos::parallel_for(n,f); + } +} + +/* ---------------------------------------------------------------------- */ + +template +struct AtomVecDipoleKokkos_PackExchangeFunctor { + typedef DeviceType device_type; + typedef ArrayTypes AT; + typename AT::t_x_array_randomread _x; + typename AT::t_v_array_randomread _v; + typename AT::t_tagint_1d_randomread _tag; + typename AT::t_int_1d_randomread _type; + typename AT::t_int_1d_randomread _mask; + typename AT::t_imageint_1d_randomread _image; + typename AT::t_float_1d_randomread _q; + typename AT::t_mu_array_randomread _mu; + typename AT::t_x_array _xw; + typename AT::t_v_array _vw; + typename AT::t_tagint_1d _tagw; + typename AT::t_int_1d _typew; + typename AT::t_int_1d _maskw; + typename AT::t_imageint_1d _imagew; + typename AT::t_float_1d _qw; + typename AT::t_sp_array _muw; + + typename AT::t_xfloat_2d_um _buf; + typename AT::t_int_1d_const _sendlist; + typename AT::t_int_1d_const _copylist; + int _nlocal,_dim; + X_FLOAT _lo,_hi; + + AtomVecDipoleKokkos_PackExchangeFunctor( + const AtomKokkos* atom, + const typename AT::tdual_xfloat_2d buf, + typename AT::tdual_int_1d sendlist, + typename AT::tdual_int_1d copylist,int nlocal, int dim, + X_FLOAT lo, X_FLOAT hi): + _x(atom->k_x.view()), + _v(atom->k_v.view()), + _tag(atom->k_tag.view()), + _type(atom->k_type.view()), + _mask(atom->k_mask.view()), + _image(atom->k_image.view()), + _q(atom->k_q.view()), + _mu(atom->k_mu.view()), + _xw(atom->k_x.view()), + _vw(atom->k_v.view()), + _tagw(atom->k_tag.view()), + _typew(atom->k_type.view()), + _maskw(atom->k_mask.view()), + _imagew(atom->k_image.view()), + _qw(atom->k_q.view()), + _muw(atom->k_mu.view()), + _sendlist(sendlist.template view()), + _copylist(copylist.template view()), + _nlocal(nlocal),_dim(dim), + _lo(lo),_hi(hi) { + const size_t elements = 16; // 1st = # of values, followed by 15 values (see below) + const int maxsendlist = (buf.template view().extent(0)* + buf.template view().extent(1))/elements; + + buffer_view(_buf,buf,maxsendlist,elements); + } + + KOKKOS_INLINE_FUNCTION + void operator() (const int &mysend) const { + const int i = _sendlist(mysend); + _buf(mysend,0) = 16; // elements + _buf(mysend,1) = _x(i,0); + _buf(mysend,2) = _x(i,1); + _buf(mysend,3) = _x(i,2); + _buf(mysend,4) = _v(i,0); + _buf(mysend,5) = _v(i,1); + _buf(mysend,6) = _v(i,2); + _buf(mysend,7) = d_ubuf(_tag[i]).d; + _buf(mysend,8) = d_ubuf(_type[i]).d; + _buf(mysend,9) = d_ubuf(_mask[i]).d; + _buf(mysend,10) = d_ubuf(_image[i]).d; + _buf(mysend,11) = _q[i]; + _buf(mysend,12) = _mu(i,0); + _buf(mysend,13) = _mu(i,1); + _buf(mysend,14) = _mu(i,2); + _buf(mysend,15) = _mu(i,3); + const int j = _copylist(mysend); + + if (j>-1) { + _xw(i,0) = _x(j,0); + _xw(i,1) = _x(j,1); + _xw(i,2) = _x(j,2); + _vw(i,0) = _v(j,0); + _vw(i,1) = _v(j,1); + _vw(i,2) = _v(j,2); + _tagw(i) = _tag(j); + _typew(i) = _type(j); + _maskw(i) = _mask(j); + _imagew(i) = _image(j); + _qw(i) = _q(j); + _muw(i,0) = _mu(j,0); + _muw(i,1) = _mu(j,1); + _muw(i,2) = _mu(j,2); + _muw(i,3) = _mu(j,3); + } + } +}; + +/* ---------------------------------------------------------------------- */ + +int AtomVecDipoleKokkos::pack_exchange_kokkos(const int &nsend,DAT::tdual_xfloat_2d &k_buf, + DAT::tdual_int_1d k_sendlist, + DAT::tdual_int_1d k_copylist, + ExecutionSpace space,int dim, + X_FLOAT lo,X_FLOAT hi ) +{ + const size_t nelements = 16; // # of elements packed + if (nsend > (int) (k_buf.view().extent(0)*k_buf.view().extent(1))/12) { + int newsize = nsend*nelements/k_buf.view().extent(1)+1; + k_buf.resize(newsize,k_buf.view().extent(1)); + } + if (space == Host) { + AtomVecDipoleKokkos_PackExchangeFunctor + f(atomKK,k_buf,k_sendlist,k_copylist,atom->nlocal,dim,lo,hi); + Kokkos::parallel_for(nsend,f); + return nsend*nelements; + } else { + AtomVecDipoleKokkos_PackExchangeFunctor + f(atomKK,k_buf,k_sendlist,k_copylist,atom->nlocal,dim,lo,hi); + Kokkos::parallel_for(nsend,f); + return nsend*nelements; + } +} + +/* ---------------------------------------------------------------------- */ + +template +struct AtomVecDipoleKokkos_UnpackExchangeFunctor { + typedef DeviceType device_type; + typedef ArrayTypes AT; + typename AT::t_x_array _x; + typename AT::t_v_array _v; + typename AT::t_tagint_1d _tag; + typename AT::t_int_1d _type; + typename AT::t_int_1d _mask; + typename AT::t_imageint_1d _image; + typename AT::t_float_1d _q; + typename AT::t_mu_array _mu; + typename AT::t_xfloat_2d_um _buf; + typename AT::t_int_1d _nlocal; + int _dim; + X_FLOAT _lo,_hi; + + AtomVecDipoleKokkos_UnpackExchangeFunctor( + const AtomKokkos* atom, + const typename AT::tdual_xfloat_2d buf, + typename AT::tdual_int_1d nlocal, + int dim, X_FLOAT lo, X_FLOAT hi): + _x(atom->k_x.view()), + _v(atom->k_v.view()), + _tag(atom->k_tag.view()), + _type(atom->k_type.view()), + _mask(atom->k_mask.view()), + _image(atom->k_image.view()), + _q(atom->k_q.view()), + _mu(atom->k_mu.view()), + _nlocal(nlocal.template view()),_dim(dim), + _lo(lo),_hi(hi) { + const size_t elements = 16; + const int maxsendlist = (buf.template view().extent(0)*buf.template view().extent(1))/elements; + + buffer_view(_buf,buf,maxsendlist,elements); + } + + KOKKOS_INLINE_FUNCTION + void operator() (const int &myrecv) const { + X_FLOAT x = _buf(myrecv,_dim+1); + if (x >= _lo && x < _hi) { + int i = Kokkos::atomic_fetch_add(&_nlocal(0),1); + _x(i,0) = _buf(myrecv,1); + _x(i,1) = _buf(myrecv,2); + _x(i,2) = _buf(myrecv,3); + _v(i,0) = _buf(myrecv,4); + _v(i,1) = _buf(myrecv,5); + _v(i,2) = _buf(myrecv,6); + _tag[i] = (tagint) d_ubuf(_buf(myrecv,7)).i; + _type[i] = (int) d_ubuf(_buf(myrecv,8)).i; + _mask[i] = (int) d_ubuf(_buf(myrecv,9)).i; + _image[i] = (imageint) d_ubuf(_buf(myrecv,10)).i; + _q[i] = _buf(myrecv,11); + _mu(i,0) = _buf(myrecv,12); + _mu(i,1) = _buf(myrecv,13); + _mu(i,2) = _buf(myrecv,14); + _mu(i,3) = _buf(myrecv,15); + } + } +}; + +/* ---------------------------------------------------------------------- */ + +int AtomVecDipoleKokkos::unpack_exchange_kokkos(DAT::tdual_xfloat_2d &k_buf,int nrecv, + int nlocal,int dim,X_FLOAT lo,X_FLOAT hi, + ExecutionSpace space) { + const size_t nelements = 16; // # of elements packed + if (space == Host) { + k_count.h_view(0) = nlocal; + AtomVecDipoleKokkos_UnpackExchangeFunctor f(atomKK,k_buf,k_count,dim,lo,hi); + Kokkos::parallel_for(nrecv/nelements,f); + return k_count.h_view(0); + } else { + k_count.h_view(0) = nlocal; + k_count.modify(); + k_count.sync(); + AtomVecDipoleKokkos_UnpackExchangeFunctor + f(atomKK,k_buf,k_count,dim,lo,hi); + Kokkos::parallel_for(nrecv/nelements,f); + k_count.modify(); + k_count.sync(); + + return k_count.h_view(0); + } +} + +/* ---------------------------------------------------------------------- */ + +void AtomVecDipoleKokkos::sync(ExecutionSpace space, unsigned int mask) +{ + if (space == Device) { + if (mask & X_MASK) atomKK->k_x.sync(); + if (mask & V_MASK) atomKK->k_v.sync(); + if (mask & F_MASK) atomKK->k_f.sync(); + if (mask & TAG_MASK) atomKK->k_tag.sync(); + if (mask & TYPE_MASK) atomKK->k_type.sync(); + if (mask & MASK_MASK) atomKK->k_mask.sync(); + if (mask & IMAGE_MASK) atomKK->k_image.sync(); + if (mask & Q_MASK) atomKK->k_q.sync(); + if (mask & MU_MASK) atomKK->k_mu.sync(); + } else { + if (mask & X_MASK) atomKK->k_x.sync(); + if (mask & V_MASK) atomKK->k_v.sync(); + if (mask & F_MASK) atomKK->k_f.sync(); + if (mask & TAG_MASK) atomKK->k_tag.sync(); + if (mask & TYPE_MASK) atomKK->k_type.sync(); + if (mask & MASK_MASK) atomKK->k_mask.sync(); + if (mask & IMAGE_MASK) atomKK->k_image.sync(); + if (mask & Q_MASK) atomKK->k_q.sync(); + if (mask & MU_MASK) atomKK->k_mu.sync(); + } +} + +/* ---------------------------------------------------------------------- */ + +void AtomVecDipoleKokkos::modified(ExecutionSpace space, unsigned int mask) +{ + if (space == Device) { + if (mask & X_MASK) atomKK->k_x.modify(); + if (mask & V_MASK) atomKK->k_v.modify(); + if (mask & F_MASK) atomKK->k_f.modify(); + if (mask & TAG_MASK) atomKK->k_tag.modify(); + if (mask & TYPE_MASK) atomKK->k_type.modify(); + if (mask & MASK_MASK) atomKK->k_mask.modify(); + if (mask & IMAGE_MASK) atomKK->k_image.modify(); + if (mask & Q_MASK) atomKK->k_q.modify(); + if (mask & MU_MASK) atomKK->k_mu.modify(); + } else { + if (mask & X_MASK) atomKK->k_x.modify(); + if (mask & V_MASK) atomKK->k_v.modify(); + if (mask & F_MASK) atomKK->k_f.modify(); + if (mask & TAG_MASK) atomKK->k_tag.modify(); + if (mask & TYPE_MASK) atomKK->k_type.modify(); + if (mask & MASK_MASK) atomKK->k_mask.modify(); + if (mask & IMAGE_MASK) atomKK->k_image.modify(); + if (mask & Q_MASK) atomKK->k_q.modify(); + if (mask & MU_MASK) atomKK->k_mu.modify(); + } +} + +/* ---------------------------------------------------------------------- */ + +void AtomVecDipoleKokkos::sync_overlapping_device(ExecutionSpace space, unsigned int mask) +{ + if (space == Device) { + if ((mask & X_MASK) && atomKK->k_x.need_sync()) + perform_async_copy(atomKK->k_x,space); + if ((mask & V_MASK) && atomKK->k_v.need_sync()) + perform_async_copy(atomKK->k_v,space); + if ((mask & F_MASK) && atomKK->k_f.need_sync()) + perform_async_copy(atomKK->k_f,space); + if ((mask & TAG_MASK) && atomKK->k_tag.need_sync()) + perform_async_copy(atomKK->k_tag,space); + if ((mask & TYPE_MASK) && atomKK->k_type.need_sync()) + perform_async_copy(atomKK->k_type,space); + if ((mask & MASK_MASK) && atomKK->k_mask.need_sync()) + perform_async_copy(atomKK->k_mask,space); + if ((mask & IMAGE_MASK) && atomKK->k_image.need_sync()) + perform_async_copy(atomKK->k_image,space); + if ((mask & Q_MASK) && atomKK->k_q.need_sync()) + perform_async_copy(atomKK->k_q,space); + if ((mask & MU_MASK) && atomKK->k_mu.need_sync()) + perform_async_copy(atomKK->k_mu,space); + } else { + if ((mask & X_MASK) && atomKK->k_x.need_sync()) + perform_async_copy(atomKK->k_x,space); + if ((mask & V_MASK) && atomKK->k_v.need_sync()) + perform_async_copy(atomKK->k_v,space); + if ((mask & F_MASK) && atomKK->k_f.need_sync()) + perform_async_copy(atomKK->k_f,space); + if ((mask & TAG_MASK) && atomKK->k_tag.need_sync()) + perform_async_copy(atomKK->k_tag,space); + if ((mask & TYPE_MASK) && atomKK->k_type.need_sync()) + perform_async_copy(atomKK->k_type,space); + if ((mask & MASK_MASK) && atomKK->k_mask.need_sync()) + perform_async_copy(atomKK->k_mask,space); + if ((mask & IMAGE_MASK) && atomKK->k_image.need_sync()) + perform_async_copy(atomKK->k_image,space); + if ((mask & Q_MASK) && atomKK->k_q.need_sync()) + perform_async_copy(atomKK->k_q,space); + if ((mask & MU_MASK) && atomKK->k_mu.need_sync()) + perform_async_copy(atomKK->k_mu,space); + } +} diff --git a/src/KOKKOS/atom_vec_dipole_kokkos.h b/src/KOKKOS/atom_vec_dipole_kokkos.h new file mode 100644 index 0000000000..4485a7b3a5 --- /dev/null +++ b/src/KOKKOS/atom_vec_dipole_kokkos.h @@ -0,0 +1,83 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef ATOM_CLASS +// clang-format off +AtomStyle(dipole/kk,AtomVecDipoleKokkos); +AtomStyle(dipole/kk/device,AtomVecDipoleKokkos); +AtomStyle(dipole/kk/host,AtomVecDipoleKokkos); +// clang-format on +#else + +// clang-format off +#ifndef LMP_ATOM_VEC_DIPOLE_KOKKOS_H +#define LMP_ATOM_VEC_DIPOLE_KOKKOS_H + +#include "atom_vec_kokkos.h" +#include "atom_vec_dipole.h" +#include "kokkos_type.h" + +namespace LAMMPS_NS { + +class AtomVecDipoleKokkos : public AtomVecKokkos, public AtomVecDipole { + public: + AtomVecDipoleKokkos(class LAMMPS *); + + void grow(int) override; + void grow_pointers() override; + int pack_border_kokkos(int n, DAT::tdual_int_2d k_sendlist, + DAT::tdual_xfloat_2d buf,int iswap, + int pbc_flag, int *pbc, ExecutionSpace space) override; + void unpack_border_kokkos(const int &n, const int &nfirst, + const DAT::tdual_xfloat_2d &buf, + ExecutionSpace space) override; + int pack_exchange_kokkos(const int &nsend,DAT::tdual_xfloat_2d &buf, + DAT::tdual_int_1d k_sendlist, + DAT::tdual_int_1d k_copylist, + ExecutionSpace space, int dim, + X_FLOAT lo, X_FLOAT hi) override; + int unpack_exchange_kokkos(DAT::tdual_xfloat_2d &k_buf, int nrecv, + int nlocal, int dim, X_FLOAT lo, X_FLOAT hi, + ExecutionSpace space) override; + + void sync(ExecutionSpace space, unsigned int mask) override; + void modified(ExecutionSpace space, unsigned int mask) override; + void sync_overlapping_device(ExecutionSpace space, unsigned int mask) override; + + protected: + double *q; + double **mu; + + DAT::t_tagint_1d d_tag; + HAT::t_tagint_1d h_tag; + + DAT::t_int_1d d_type, d_mask; + HAT::t_int_1d h_type, h_mask; + + DAT::t_imageint_1d d_image; + HAT::t_imageint_1d h_image; + + DAT::t_x_array d_x; + DAT::t_v_array d_v; + DAT::t_f_array d_f; + + DAT::t_float_1d d_q; + HAT::t_float_1d h_q; + DAT::t_mu_array d_mu; + HAT::t_mu_array h_mu; +}; + +} // namespace LAMMPS_NS + +#endif +#endif From d7d6cb232839e5e7121428c88e0c2c3b1bfef2a6 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Thu, 2 Feb 2023 11:52:23 -0700 Subject: [PATCH 122/445] Add new files to Kokkos Install.sh --- src/KOKKOS/Install.sh | 106 ++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 50 deletions(-) diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index f493b5438a..4f2a6a2659 100755 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -64,8 +64,8 @@ action atom_vec_bond_kokkos.cpp atom_vec_bond.cpp action atom_vec_bond_kokkos.h atom_vec_bond.h action atom_vec_charge_kokkos.cpp action atom_vec_charge_kokkos.h -action atom_vec_spin_kokkos.cpp atom_vec_spin.cpp -action atom_vec_spin_kokkos.h atom_vec_spin.h +action atom_vec_dipole_kokkos.cpp atom_vec_dipole.cpp +action atom_vec_dipole_kokkos.h atom_vec_dipole.h action atom_vec_dpd_kokkos.cpp atom_vec_dpd.cpp action atom_vec_dpd_kokkos.h atom_vec_dpd.h action atom_vec_full_kokkos.cpp atom_vec_full.cpp @@ -78,6 +78,8 @@ action atom_vec_molecular_kokkos.cpp atom_vec_molecular.cpp action atom_vec_molecular_kokkos.h atom_vec_molecular.h action atom_vec_sphere_kokkos.cpp atom_vec_sphere.cpp action atom_vec_sphere_kokkos.h atom_vec_sphere.h +action atom_vec_spin_kokkos.cpp atom_vec_spin.cpp +action atom_vec_spin_kokkos.h atom_vec_spin.h action bond_class2_kokkos.cpp bond_class2.cpp action bond_class2_kokkos.h bond_class2.h action bond_fene_kokkos.cpp bond_fene.cpp @@ -94,10 +96,10 @@ action compute_coord_atom_kokkos.cpp action compute_coord_atom_kokkos.h action compute_orientorder_atom_kokkos.cpp action compute_orientorder_atom_kokkos.h -action compute_temp_kokkos.cpp -action compute_temp_kokkos.h action compute_temp_deform_kokkos.cpp action compute_temp_deform_kokkos.h +action compute_temp_kokkos.cpp +action compute_temp_kokkos.h action dihedral_charmm_kokkos.cpp dihedral_charmm.cpp action dihedral_charmm_kokkos.h dihedral_charmm.h action dihedral_class2_kokkos.cpp dihedral_class2.cpp @@ -110,13 +112,15 @@ action domain_kokkos.cpp action domain_kokkos.h action dynamical_matrix_kokkos.cpp dynamical_matrix.cpp action dynamical_matrix_kokkos.h dynamical_matrix.h -action fftdata_kokkos.h fft3d.h action fft3d_kokkos.cpp fft3d.cpp action fft3d_kokkos.h fft3d.h +action fftdata_kokkos.h fft3d.h action fix_acks2_reaxff_kokkos.cpp fix_acks2_reaxff.cpp action fix_acks2_reaxff_kokkos.h fix_acks2_reaxff.h action fix_deform_kokkos.cpp action fix_deform_kokkos.h +action fix_dpd_energy_kokkos.cpp fix_dpd_energy.cpp +action fix_dpd_energy_kokkos.h fix_dpd_energy.h action fix_dt_reset_kokkos.cpp action fix_dt_reset_kokkos.h action fix_enforce2d_kokkos.cpp @@ -131,6 +135,8 @@ action fix_langevin_kokkos.cpp action fix_langevin_kokkos.h action fix_minimize_kokkos.cpp action fix_minimize_kokkos.h +action fix_momentum_kokkos.cpp +action fix_momentum_kokkos.h action fix_neigh_history_kokkos.cpp action fix_neigh_history_kokkos.h action fix_nh_kokkos.cpp @@ -155,24 +161,20 @@ action fix_reaxff_bonds_kokkos.cpp fix_reaxff_bonds.cpp action fix_reaxff_bonds_kokkos.h fix_reaxff_bonds.h action fix_reaxff_species_kokkos.cpp fix_reaxff_species.cpp action fix_reaxff_species_kokkos.h fix_reaxff_species.h +action fix_rx_kokkos.cpp fix_rx.cpp +action fix_rx_kokkos.h fix_rx.h action fix_setforce_kokkos.cpp action fix_setforce_kokkos.h action fix_shake_kokkos.cpp fix_shake.cpp action fix_shake_kokkos.h fix_shake.h action fix_shardlow_kokkos.cpp fix_shardlow.cpp action fix_shardlow_kokkos.h fix_shardlow.h -action fix_momentum_kokkos.cpp -action fix_momentum_kokkos.h +action fix_viscous_kokkos.cpp +action fix_viscous_kokkos.h action fix_wall_lj93_kokkos.cpp action fix_wall_lj93_kokkos.h action fix_wall_reflect_kokkos.cpp action fix_wall_reflect_kokkos.h -action fix_viscous_kokkos.cpp -action fix_viscous_kokkos.h -action fix_dpd_energy_kokkos.cpp fix_dpd_energy.cpp -action fix_dpd_energy_kokkos.h fix_dpd_energy.h -action fix_rx_kokkos.cpp fix_rx.cpp -action fix_rx_kokkos.h fix_rx.h action grid3d_kokkos.cpp fft3d.h action grid3d_kokkos.h fft3d.h action improper_class2_kokkos.cpp improper_class2.cpp @@ -180,36 +182,48 @@ action improper_class2_kokkos.h improper_class2.h action improper_harmonic_kokkos.cpp improper_harmonic.cpp action improper_harmonic_kokkos.h improper_harmonic.h action kissfft_kokkos.h kissfft.h -action kokkos.cpp -action kokkos.h -action kokkos_base.h action kokkos_base_fft.h fft3d.h +action kokkos_base.h action kokkos_few.h action kokkos_type.h -action meam_kokkos.h meam.h +action kokkos.cpp +action kokkos.h +action math_special_kokkos.cpp +action math_special_kokkos.h action meam_dens_final_kokkos.h meam_dens_final.cpp action meam_dens_init_kokkos.h meam_dens_init.cpp action meam_force_kokkos.h meam_force.cpp action meam_funcs_kokkos.h meam_funcs.cpp action meam_impl_kokkos.h meam_impl.cpp +action meam_kokkos.h meam.h action meam_setup_done_kokkos.h meam_setup_done.cpp action memory_kokkos.h +action min_cg_kokkos.cpp +action min_cg_kokkos.h +action min_kokkos.cpp +action min_kokkos.h +action min_linesearch_kokkos.cpp +action min_linesearch_kokkos.h action mliap_data_kokkos.cpp mliap_data.cpp action mliap_data_kokkos.h mliap_data.h action mliap_descriptor_kokkos.h mliap_descriptor.h action mliap_descriptor_so3_kokkos.cpp mliap_descriptor_so3.cpp action mliap_descriptor_so3_kokkos.h mliap_descriptor_so3.h +action mliap_model_kokkos.h mliap_model.h action mliap_model_linear_kokkos.cpp mliap_model_linear.cpp action mliap_model_linear_kokkos.h mliap_model_linear.h action mliap_model_python_kokkos.cpp mliap_model_linear.cpp action mliap_model_python_kokkos.h mliap_model_linear.h -action mliap_model_kokkos.h mliap_model.h -action mliap_unified_kokkos.cpp mliap_unified.cpp -action mliap_unified_kokkos.h mliap_unified.h action mliap_so3_kokkos.cpp mliap_so3.cpp action mliap_so3_kokkos.h mliap_so3.h +action mliap_unified_kokkos.cpp mliap_unified.cpp +action mliap_unified_kokkos.h mliap_unified.h action modify_kokkos.cpp action modify_kokkos.h +action nbin_kokkos.cpp +action nbin_kokkos.h +action nbin_ssa_kokkos.cpp nbin_ssa.cpp +action nbin_ssa_kokkos.h nbin_ssa.h action neigh_bond_kokkos.cpp action neigh_bond_kokkos.h action neigh_list_kokkos.cpp @@ -220,26 +234,14 @@ action npair_copy_kokkos.cpp action npair_copy_kokkos.h action npair_halffull_kokkos.cpp action npair_halffull_kokkos.h -action npair_skip_kokkos.cpp -action npair_skip_kokkos.h -action npair_trim_kokkos.cpp -action npair_trim_kokkos.h action npair_kokkos.cpp action npair_kokkos.h +action npair_skip_kokkos.cpp +action npair_skip_kokkos.h action npair_ssa_kokkos.cpp npair_half_bin_newton_ssa.cpp action npair_ssa_kokkos.h npair_half_bin_newton_ssa.h -action nbin_kokkos.cpp -action nbin_kokkos.h -action nbin_ssa_kokkos.cpp nbin_ssa.cpp -action nbin_ssa_kokkos.h nbin_ssa.h -action math_special_kokkos.cpp -action math_special_kokkos.h -action min_cg_kokkos.cpp -action min_cg_kokkos.h -action min_kokkos.cpp -action min_kokkos.h -action min_linesearch_kokkos.cpp -action min_linesearch_kokkos.h +action npair_trim_kokkos.cpp +action npair_trim_kokkos.h action pack_kokkos.h pack.h action pair_adp_kokkos.cpp pair_adp.cpp action pair_adp_kokkos.h pair_adp.h @@ -259,26 +261,26 @@ action pair_coul_long_kokkos.cpp pair_coul_long.cpp action pair_coul_long_kokkos.h pair_coul_long.h action pair_coul_wolf_kokkos.cpp action pair_coul_wolf_kokkos.h -action pair_dpd_kokkos.h pair_dpd.h -action pair_dpd_kokkos.cpp pair_dpd.cpp action pair_dpd_ext_kokkos.cpp pair_dpd_ext.cpp action pair_dpd_ext_kokkos.h pair_dpd_ext.h -action pair_dpd_ext_tstat_kokkos.h pair_dpd_ext_tstat.h action pair_dpd_ext_tstat_kokkos.cpp pair_dpd_ext_tstat.cpp -action pair_dpd_tstat_kokkos.h pair_dpd_tstat.h -action pair_dpd_tstat_kokkos.cpp pair_dpd_tstat.cpp +action pair_dpd_ext_tstat_kokkos.h pair_dpd_ext_tstat.h action pair_dpd_fdt_energy_kokkos.cpp pair_dpd_fdt_energy.cpp action pair_dpd_fdt_energy_kokkos.h pair_dpd_fdt_energy.h -action pair_eam_kokkos.cpp pair_eam.cpp -action pair_eam_kokkos.h pair_eam.h +action pair_dpd_kokkos.cpp pair_dpd.cpp +action pair_dpd_kokkos.h pair_dpd.h +action pair_dpd_tstat_kokkos.cpp pair_dpd_tstat.cpp +action pair_dpd_tstat_kokkos.h pair_dpd_tstat.h action pair_eam_alloy_kokkos.cpp pair_eam_alloy.cpp action pair_eam_alloy_kokkos.h pair_eam_alloy.h action pair_eam_fs_kokkos.cpp pair_eam_fs.cpp action pair_eam_fs_kokkos.h pair_eam_fs.h +action pair_eam_kokkos.cpp pair_eam.cpp +action pair_eam_kokkos.h pair_eam.h action pair_exp6_rx_kokkos.cpp pair_exp6_rx.cpp action pair_exp6_rx_kokkos.h pair_exp6_rx.h -action pair_gran_hooke_history_kokkos.h pair_gran_hooke_history.h action pair_gran_hooke_history_kokkos.cpp pair_gran_hooke_history.cpp +action pair_gran_hooke_history_kokkos.h pair_gran_hooke_history.h action pair_hybrid_kokkos.cpp action pair_hybrid_kokkos.h action pair_hybrid_overlay_kokkos.cpp @@ -304,8 +306,12 @@ action pair_lj_cut_coul_dsf_kokkos.cpp pair_lj_cut_coul_dsf.cpp action pair_lj_cut_coul_dsf_kokkos.h pair_lj_cut_coul_dsf.h action pair_lj_cut_coul_long_kokkos.cpp pair_lj_cut_coul_long.cpp action pair_lj_cut_coul_long_kokkos.h pair_lj_cut_coul_long.h +action pair_lj_cut_dipole_cut_kokkos.cpp pair_lj_cut_dipole_cut.cpp +action pair_lj_cut_dipole_cut_kokkos.h pair_lj_cut_dipole_cut.h action pair_lj_cut_kokkos.cpp action pair_lj_cut_kokkos.h +action pair_lj_expand_coul_long_kokkos.cpp pair_lj_expand_coul_long.cpp  +action pair_lj_expand_coul_long_kokkos.h pair_lj_expand_coul_long.h action pair_lj_expand_kokkos.cpp action pair_lj_expand_kokkos.h action pair_lj_gromacs_coul_gromacs_kokkos.cpp pair_lj_gromacs_coul_gromacs.cpp @@ -324,19 +330,17 @@ action pair_morse_kokkos.cpp action pair_morse_kokkos.h action pair_multi_lucy_rx_kokkos.cpp pair_multi_lucy_rx.cpp action pair_multi_lucy_rx_kokkos.h pair_multi_lucy_rx.h -action pair_pace_kokkos.cpp pair_pace.cpp -action pair_pace_kokkos.h pair_pace.h action pair_pace_extrapolation_kokkos.cpp pair_pace_extrapolation.cpp action pair_pace_extrapolation_kokkos.h pair_pace_extrapolation.h +action pair_pace_kokkos.cpp pair_pace.cpp +action pair_pace_kokkos.h pair_pace.h action pair_reaxff_kokkos.cpp pair_reaxff.cpp action pair_reaxff_kokkos.h pair_reaxff.h +action pair_snap_kokkos_impl.h pair_snap.cpp action pair_snap_kokkos.cpp pair_snap.cpp action pair_snap_kokkos.h pair_snap.h -action pair_snap_kokkos_impl.h pair_snap.cpp action pair_sw_kokkos.cpp pair_sw.cpp action pair_sw_kokkos.h pair_sw.h -action pair_vashishta_kokkos.cpp pair_vashishta.cpp -action pair_vashishta_kokkos.h pair_vashishta.h action pair_table_kokkos.cpp action pair_table_kokkos.h action pair_table_rx_kokkos.cpp pair_table_rx.cpp @@ -347,6 +351,8 @@ action pair_tersoff_mod_kokkos.cpp pair_tersoff_mod.cpp action pair_tersoff_mod_kokkos.h pair_tersoff_mod.h action pair_tersoff_zbl_kokkos.cpp pair_tersoff_zbl.cpp action pair_tersoff_zbl_kokkos.h pair_tersoff_zbl.h +action pair_vashishta_kokkos.cpp pair_vashishta.cpp +action pair_vashishta_kokkos.h pair_vashishta.h action pair_yukawa_kokkos.cpp action pair_yukawa_kokkos.h action pair_zbl_kokkos.cpp @@ -359,8 +365,8 @@ action region_block_kokkos.cpp action region_block_kokkos.h action remap_kokkos.cpp remap.cpp action remap_kokkos.h remap.h -action sna_kokkos.h sna.h action sna_kokkos_impl.h sna.cpp +action sna_kokkos.h sna.h action third_order_kokkos.cpp dynamical_matrix.cpp action third_order_kokkos.h dynamical_matrix.h action transpose_helper_kokkos.h From 9b7e4478b3d45887c69ec3d8b2bb1508328d2d73 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Thu, 2 Feb 2023 12:00:42 -0700 Subject: [PATCH 123/445] Update docs --- doc/src/Commands_pair.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index 7f7b2d4b7d..0912ddcc41 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -166,7 +166,7 @@ OPT. * :doc:`lj/cut/coul/msm (go) ` * :doc:`lj/cut/coul/msm/dielectric ` * :doc:`lj/cut/coul/wolf (o) ` - * :doc:`lj/cut/dipole/cut (go) ` + * :doc:`lj/cut/dipole/cut (gko) ` * :doc:`lj/cut/dipole/long (g) ` * :doc:`lj/cut/dipole/sf (go) ` * :doc:`lj/cut/soft (o) ` @@ -175,7 +175,7 @@ OPT. * :doc:`lj/cut/tip4p/long (got) ` * :doc:`lj/cut/tip4p/long/soft (o) ` * :doc:`lj/expand (gko) ` - * :doc:`lj/expand/coul/long (g) ` + * :doc:`lj/expand/coul/long (gk) ` * :doc:`lj/gromacs (gko) ` * :doc:`lj/gromacs/coul/gromacs (ko) ` * :doc:`lj/long/coul/long (iot) ` From a70efd9a1b3606bd3d11139bacef0fd8dd230f35 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Thu, 2 Feb 2023 12:19:55 -0700 Subject: [PATCH 124/445] Small cleanup --- src/.gitignore | 2 ++ src/KOKKOS/Install.sh | 2 +- src/KOKKOS/atom_vec_atomic_kokkos.h | 1 - src/KOKKOS/atom_vec_dipole_kokkos.cpp | 8 ++++---- src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp | 11 ++++------- src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h | 2 +- src/KOKKOS/pair_lj_cut_kokkos.cpp | 1 - src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp | 5 ++--- src/KOKKOS/pair_lj_expand_coul_long_kokkos.h | 3 +-- 9 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index f8efbc8f50..22cb5f1ee0 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -102,6 +102,8 @@ /meam*.cpp /pair_meam.cpp /pair_meam.h +/pair_meam_ms.cpp +/pair_meam_ms.h /compute_mliap.cpp /compute_mliap.h diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index 4f2a6a2659..65fec6999e 100755 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -310,7 +310,7 @@ action pair_lj_cut_dipole_cut_kokkos.cpp pair_lj_cut_dipole_cut.cpp action pair_lj_cut_dipole_cut_kokkos.h pair_lj_cut_dipole_cut.h action pair_lj_cut_kokkos.cpp action pair_lj_cut_kokkos.h -action pair_lj_expand_coul_long_kokkos.cpp pair_lj_expand_coul_long.cpp  +action pair_lj_expand_coul_long_kokkos.cpp pair_lj_expand_coul_long.cpp action pair_lj_expand_coul_long_kokkos.h pair_lj_expand_coul_long.h action pair_lj_expand_kokkos.cpp action pair_lj_expand_kokkos.h diff --git a/src/KOKKOS/atom_vec_atomic_kokkos.h b/src/KOKKOS/atom_vec_atomic_kokkos.h index 41059b3ec4..25e1616d6c 100644 --- a/src/KOKKOS/atom_vec_atomic_kokkos.h +++ b/src/KOKKOS/atom_vec_atomic_kokkos.h @@ -71,4 +71,3 @@ class AtomVecAtomicKokkos : public AtomVecKokkos, public AtomVecAtomic { #endif #endif - diff --git a/src/KOKKOS/atom_vec_dipole_kokkos.cpp b/src/KOKKOS/atom_vec_dipole_kokkos.cpp index 564ccf93f4..050fe2d0d1 100644 --- a/src/KOKKOS/atom_vec_dipole_kokkos.cpp +++ b/src/KOKKOS/atom_vec_dipole_kokkos.cpp @@ -2,7 +2,7 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - LAMMPS Development team: developers@lammps.org + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -205,9 +205,9 @@ struct AtomVecDipoleKokkos_PackBorder { const typename ArrayTypes::t_float_1d &q, const typename ArrayTypes::t_mu_array_randomread &mu, const X_FLOAT &dx, const X_FLOAT &dy, const X_FLOAT &dz): - _buf(buf),_list(list),_iswap(iswap), - _x(x),_tag(tag),_type(type),_mask(mask),_q(q),_mu(mu), - _dx(dx),_dy(dy),_dz(dz) {} + _buf(buf),_list(list),_iswap(iswap), + _x(x),_tag(tag),_type(type),_mask(mask),_q(q),_mu(mu), + _dx(dx),_dy(dy),_dz(dz) {} KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp index ea0f41d4a9..808c755303 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp @@ -2,7 +2,7 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - LAMMPS Development team: developers@lammps.org + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -37,9 +37,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -#define KOKKOS_CUDA_MAX_THREADS 256 -#define KOKKOS_CUDA_MIN_BLOCKS 8 - /* ---------------------------------------------------------------------- */ template @@ -188,7 +185,7 @@ void PairLJCutDipoleCutKokkos::compute(int eflag_in, int vflag_in) } } - if (eflag) { + if (eflag_global) { eng_vdwl += ev.evdwl; eng_coul += ev.ecoul; } @@ -288,7 +285,7 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne forcelj = r6inv * ((STACKPARAMS?m_params[itype][jtype].lj1:params(itype,jtype).lj1)*r6inv - (STACKPARAMS?m_params[itype][jtype].lj2:params(itype,jtype).lj2)); forcelj *= r2inv; - if (eflag) { + if (eflag_global) { evdwl = r6inv * ((STACKPARAMS?m_params[itype][jtype].lj3:params(itype,jtype).lj3)*r6inv - (STACKPARAMS?m_params[itype][jtype].lj4:params(itype,jtype).lj4)) - (STACKPARAMS?m_params[itype][jtype].offset:params(itype,jtype).offset); @@ -404,7 +401,7 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne a_torque(j,2) += fq*tjzcoul; } - if (eflag) { + if (eflag_global) { ecoul = qtmp*qj*rinv; if (mu(i,3) > 0.0 && mu(j,3) > 0.0) ecoul += r3inv*pdotp - 3.0*r5inv*pidotr*pjdotr; diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h index b2a60ba0ff..a3d56db41c 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h @@ -1,7 +1,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - LAMMPS Development team: developers@lammps.org + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains diff --git a/src/KOKKOS/pair_lj_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_kokkos.cpp index 5cff54a440..6896967563 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_kokkos.cpp @@ -66,7 +66,6 @@ void PairLJCutKokkos::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (neighflag == FULL) no_virial_fdotr_compute = 1; ev_init(eflag,vflag,0); diff --git a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp index 559b120266..fe87612cbf 100644 --- a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp @@ -2,7 +2,7 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - LAMMPS Development team: developers@lammps.org + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -87,7 +87,6 @@ void PairLJExpandCoulLongKokkos::compute(int eflag_in, int vflag_in) ev_init(eflag,vflag,0); - // reallocate per-atom arrays if necessary if (eflag_atom) { @@ -139,7 +138,7 @@ void PairLJExpandCoulLongKokkos::compute(int eflag_in, int vflag_in) (this,(NeighListKokkos*)list); - if (eflag) { + if (eflag_global) { eng_vdwl += ev.evdwl; eng_coul += ev.ecoul; } diff --git a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h index 906db19e11..09a694a122 100644 --- a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h +++ b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h @@ -2,7 +2,7 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories - LAMMPS Development team: developers@lammps.org + LAMMPS development team: developers@lammps.org Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains @@ -139,7 +139,6 @@ class PairLJExpandCoulLongKokkos : public PairLJExpandCoulLong { friend EV_FLOAT pair_compute >(PairLJExpandCoulLongKokkos*, NeighListKokkos*); friend void pair_virial_fdotr_compute(PairLJExpandCoulLongKokkos*); - }; } From 180dcf445980674c09e101e7f370dca303ae840c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 2 Feb 2023 15:06:22 -0500 Subject: [PATCH 125/445] add missing index entries --- doc/src/pair_dipole.rst | 1 + doc/src/pair_lj_expand.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/src/pair_dipole.rst b/doc/src/pair_dipole.rst index b0655b4ca5..10d0061948 100644 --- a/doc/src/pair_dipole.rst +++ b/doc/src/pair_dipole.rst @@ -1,5 +1,6 @@ .. index:: pair_style lj/cut/dipole/cut .. index:: pair_style lj/cut/dipole/cut/gpu +.. index:: pair_style lj/cut/dipole/cut/kk .. index:: pair_style lj/cut/dipole/cut/omp .. index:: pair_style lj/sf/dipole/sf .. index:: pair_style lj/sf/dipole/sf/gpu diff --git a/doc/src/pair_lj_expand.rst b/doc/src/pair_lj_expand.rst index 4a1d7bcbf1..ffdcbf66e3 100644 --- a/doc/src/pair_lj_expand.rst +++ b/doc/src/pair_lj_expand.rst @@ -3,6 +3,7 @@ .. index:: pair_style lj/expand/kk .. index:: pair_style lj/expand/omp .. index:: pair_style lj/expand/coul/long +.. index:: pair_style lj/expand/coul/long/kk .. index:: pair_style lj/expand/coul/long/gpu pair_style lj/expand command From ea9f5abc4a3ff40301d4aa87197df725e1da8569 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Thu, 2 Feb 2023 13:23:29 -0700 Subject: [PATCH 126/445] Tweak logic for CPU --- src/KOKKOS/pair_hybrid_kokkos.cpp | 2 ++ src/KOKKOS/verlet_kokkos.cpp | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/KOKKOS/pair_hybrid_kokkos.cpp b/src/KOKKOS/pair_hybrid_kokkos.cpp index eabce17a1c..bfdc81863d 100644 --- a/src/KOKKOS/pair_hybrid_kokkos.cpp +++ b/src/KOKKOS/pair_hybrid_kokkos.cpp @@ -51,9 +51,11 @@ void PairHybridKokkos::init_style() { PairHybrid::init_style(); +#ifdef LMP_KOKKOS_GPU for (int m = 0; m < nstyles; m++) if (styles[m]->execution_space == Host) lmp->kokkos->allow_overlap = 0; +#endif } /* ---------------------------------------------------------------------- diff --git a/src/KOKKOS/verlet_kokkos.cpp b/src/KOKKOS/verlet_kokkos.cpp index fcfba2f0e7..01401542cd 100644 --- a/src/KOKKOS/verlet_kokkos.cpp +++ b/src/KOKKOS/verlet_kokkos.cpp @@ -376,9 +376,9 @@ void VerletKokkos::run(int n) unsigned int datamask_exclude = 0; int allow_overlap = lmp->kokkos->allow_overlap; - if (allow_overlap) { + if (allow_overlap && atomKK->k_f.h_view.data() != atomKK->k_f.d_view.data()) { - datamask_exclude = (F_MASK | ENERGY_MASK | VIRIAL_MASK); + datamask_exclude = (F_MASK | ENERGY_MASK | VIRIAL_MASK); if (pair_compute_flag) { if (force->pair->execution_space == Host) { @@ -467,10 +467,9 @@ void VerletKokkos::run(int n) timer->stamp(Timer::KSPACE); } - if (execute_on_host && atomKK->k_f.h_view.data() != atomKK->k_f.d_view.data()) { - if (f_merge_copy.extent(0) < atomKK->k_f.extent(0)) { + if (execute_on_host) { + if (f_merge_copy.extent(0) < atomKK->k_f.extent(0)) f_merge_copy = DAT::t_f_array("VerletKokkos::f_merge_copy",atomKK->k_f.extent(0)); - } f = atomKK->k_f.d_view; Kokkos::deep_copy(LMPHostType(),f_merge_copy,atomKK->k_f.h_view); Kokkos::parallel_for(atomKK->k_f.extent(0), From 72da6007d29b957e6176104f322c8486316327d0 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Thu, 2 Feb 2023 13:32:56 -0700 Subject: [PATCH 127/445] Another tweak --- src/KOKKOS/pair_hybrid_kokkos.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/KOKKOS/pair_hybrid_kokkos.cpp b/src/KOKKOS/pair_hybrid_kokkos.cpp index bfdc81863d..eabce17a1c 100644 --- a/src/KOKKOS/pair_hybrid_kokkos.cpp +++ b/src/KOKKOS/pair_hybrid_kokkos.cpp @@ -51,11 +51,9 @@ void PairHybridKokkos::init_style() { PairHybrid::init_style(); -#ifdef LMP_KOKKOS_GPU for (int m = 0; m < nstyles; m++) if (styles[m]->execution_space == Host) lmp->kokkos->allow_overlap = 0; -#endif } /* ---------------------------------------------------------------------- From 44ff3631694d281fc0bc7afa6a3b190fd3efbd36 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 2 Feb 2023 15:31:10 -0600 Subject: [PATCH 128/445] Removed the class member variable mu in the AtomVecDipoleKokkos that shadows the parent's variable mu, now as protected --- src/DIPOLE/atom_vec_dipole.h | 2 +- src/KOKKOS/atom_vec_dipole_kokkos.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DIPOLE/atom_vec_dipole.h b/src/DIPOLE/atom_vec_dipole.h index 923454a39f..d2f5746462 100644 --- a/src/DIPOLE/atom_vec_dipole.h +++ b/src/DIPOLE/atom_vec_dipole.h @@ -31,7 +31,7 @@ class AtomVecDipole : virtual public AtomVec { void grow_pointers() override; void data_atom_post(int) override; - private: + protected: double **mu; }; diff --git a/src/KOKKOS/atom_vec_dipole_kokkos.h b/src/KOKKOS/atom_vec_dipole_kokkos.h index 4485a7b3a5..fcd422bc4d 100644 --- a/src/KOKKOS/atom_vec_dipole_kokkos.h +++ b/src/KOKKOS/atom_vec_dipole_kokkos.h @@ -56,7 +56,6 @@ class AtomVecDipoleKokkos : public AtomVecKokkos, public AtomVecDipole { protected: double *q; - double **mu; DAT::t_tagint_1d d_tag; HAT::t_tagint_1d h_tag; From a91ae836a9a5c7c1cb17beb480631c9c527d31e5 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Thu, 2 Feb 2023 14:35:35 -0700 Subject: [PATCH 129/445] Fix Kokkos GPU bug in pair_mliap_kokkos --- src/KOKKOS/pair_mliap_kokkos.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/KOKKOS/pair_mliap_kokkos.cpp b/src/KOKKOS/pair_mliap_kokkos.cpp index 71e45085ea..2178e32b85 100644 --- a/src/KOKKOS/pair_mliap_kokkos.cpp +++ b/src/KOKKOS/pair_mliap_kokkos.cpp @@ -111,6 +111,7 @@ void PairMLIAPKokkos::compute(int eflag, int vflag) k_data->modified(model_space, EATOMS_MASK); // calculate force contributions beta_i*dB_i/dR_j + atomKK->sync(descriptor_space,F_MASK); k_data->sync(descriptor_space, NUMNEIGHS_MASK | IATOMS_MASK | IELEMS_MASK | ELEMS_MASK | BETAS_MASK | JATOMS_MASK | PAIR_I_MASK | JELEMS_MASK | RIJ_MASK ); descriptor->compute_forces(data); From 914b40f4bf4c7f7ed9037bb484f9fe73d6895699 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 2 Feb 2023 17:30:32 -0500 Subject: [PATCH 130/445] LJ forces must be scaled with factor_lj --- src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp index 808c755303..9a953e2609 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp @@ -284,7 +284,7 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne if (rsq < cut_ljsq_ij) { forcelj = r6inv * ((STACKPARAMS?m_params[itype][jtype].lj1:params(itype,jtype).lj1)*r6inv - (STACKPARAMS?m_params[itype][jtype].lj2:params(itype,jtype).lj2)); - forcelj *= r2inv; + forcelj *= factor_lj*r2inv; if (eflag_global) { evdwl = r6inv * ((STACKPARAMS?m_params[itype][jtype].lj3:params(itype,jtype).lj3)*r6inv - (STACKPARAMS?m_params[itype][jtype].lj4:params(itype,jtype).lj4)) - From 5797ba5bcfd9802a55f1c0a4e335311ecf7e4e84 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 2 Feb 2023 19:10:51 -0500 Subject: [PATCH 131/445] convert Fortran version of lammps_gather_bonds() test to be similar to C version --- .../fortran/test_fortran_gather_scatter.f90 | 117 ++++++++++++------ unittest/fortran/wrap_gather_scatter.cpp | 8 +- 2 files changed, 86 insertions(+), 39 deletions(-) diff --git a/unittest/fortran/test_fortran_gather_scatter.f90 b/unittest/fortran/test_fortran_gather_scatter.f90 index ab345127e5..b7e70edf88 100644 --- a/unittest/fortran/test_fortran_gather_scatter.f90 +++ b/unittest/fortran/test_fortran_gather_scatter.f90 @@ -205,66 +205,113 @@ SUBROUTINE f_lammps_scatter_atoms_subset_mask() BIND(C) CALL lmp%scatter_atoms_subset('mask', tags, masks) ! push the swap to LAMMPS END SUBROUTINE f_lammps_scatter_atoms_subset_mask -SUBROUTINE f_lammps_setup_gather_bonds() BIND(C) +SUBROUTINE f_lammps_setup_gather_topology() BIND(C) USE LIBLAMMPS USE keepstuff, ONLY : lmp, cont_input, more_input, pair_input IMPLICIT NONE - INTERFACE - SUBROUTINE f_lammps_setup_gather_scatter() BIND(C) - END SUBROUTINE f_lammps_setup_gather_scatter - END INTERFACE + CALL lmp%command('include ${input_dir}/in.fourmol') + CALL lmp%command('run 0 post no') +END SUBROUTINE f_lammps_setup_gather_topology - CALL lmp%command('atom_modify map array') - CALL lmp%command('atom_style full') - CALL lmp%command('region simbox block 0 4 0 5 0 4') - CALL lmp%command('create_box 1 simbox bond/types 1 extra/bond/per/atom 2') - CALL lmp%command('create_atoms 1 single 1.0 1.0 ${zpos}') - CALL lmp%commands_list(cont_input) - CALL lmp%commands_list(more_input) - CALL lmp%commands_list(pair_input) - CALL lmp%command('bond_style zero') - CALL lmp%command('bond_coeff *') - CALL lmp%command('create_bonds many all all 1 0.0 1.5') - CALL lmp%command('run 0') -END SUBROUTINE f_lammps_setup_gather_bonds - -FUNCTION f_lammps_test_gather_bonds_small() BIND(C) RESULT(success) +FUNCTION f_lammps_test_gather_bonds_small() BIND(C) RESULT(count) USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int, c_int64_t USE LIBLAMMPS USE keepstuff, ONLY : lmp IMPLICIT NONE - INTEGER(c_int) :: success + INTEGER :: i, nbonds, size_bigint + INTEGER(c_int) :: count INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET :: bonds INTEGER(c_int), DIMENSION(:,:), POINTER :: bonds_array + INTEGER(c_int), POINTER :: nbonds_small + INTEGER(c_int64_t), POINTER :: nbonds_big + + size_bigint = lmp%extract_setting('bigint') + IF (size_bigint == 4) THEN + nbonds_small = lmp%extract_global('nbonds') + nbonds = nbonds_small + ELSE + nbonds_big = lmp%extract_global('nbonds') + nbonds = nbonds_big + END IF CALL lmp%gather_bonds(bonds) bonds_array(1:3,1:SIZE(bonds)/3) => bonds - IF ( ALL(bonds_array(:,1) == [INTEGER(c_int) :: 1,1,3]) & - .AND. ALL(bonds_array(:,2) == [INTEGER(c_int) :: 1,2,3])) THEN - success = 1_c_int - ELSE - success = 0_c_int - END IF + count = 0 + DO i=1, nbonds + count = count + check_bond(i, 5, 1, 2, bonds_array) + count = count + check_bond(i, 3, 1, 3, bonds_array); + count = count + check_bond(i, 2, 3, 4, bonds_array); + count = count + check_bond(i, 2, 3, 5, bonds_array); + count = count + check_bond(i, 1, 3, 6, bonds_array); + count = count + check_bond(i, 3, 6, 8, bonds_array); + count = count + check_bond(i, 4, 6, 7, bonds_array); + count = count + check_bond(i, 5, 8, 9, bonds_array); + count = count + check_bond(i, 5, 27, 28, bonds_array); + count = count + check_bond(i, 5, 27, 29, bonds_array); + END DO + +CONTAINS + + INTEGER FUNCTION check_bond(idx, batom1, batom2, btype, barray) + IMPLICIT NONE + INTEGER, INTENT(IN) :: idx, batom1, batom2, btype + INTEGER(c_int), DIMENSION(:,:) :: barray + check_bond = 0 + IF ((barray(1,idx) == batom1) .AND. (barray(2,idx) == batom2)) THEN + IF (barray(3,idx) == btype) check_bond = 1 + END IF + IF ((barray(1,idx) == batom2) .AND. (barray(2,idx) == batom1)) THEN + IF (barray(3,idx) == btype) check_bond = 1 + END IF + END FUNCTION check_bond + END FUNCTION f_lammps_test_gather_bonds_small -FUNCTION f_lammps_test_gather_bonds_big() BIND(C) RESULT(success) +FUNCTION f_lammps_test_gather_bonds_big() BIND(C) RESULT(count) USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int, c_int64_t USE LIBLAMMPS USE keepstuff, ONLY : lmp IMPLICIT NONE - INTEGER(c_int) :: success + INTEGER :: i, nbonds + INTEGER(c_int) :: count INTEGER(c_int64_t), DIMENSION(:), ALLOCATABLE, TARGET :: bonds INTEGER(c_int64_t), DIMENSION(:,:), POINTER :: bonds_array + INTEGER(c_int64_t), POINTER :: nbonds_big + nbonds_big = lmp%extract_global('nbonds') + nbonds = nbonds_big CALL lmp%gather_bonds(bonds) bonds_array(1:3,1:SIZE(bonds)/3) => bonds - IF ( ALL(bonds_array(:,1) == [INTEGER(c_int64_t) :: 1,1,3]) & - .AND. ALL(bonds_array(:,2) == [INTEGER(c_int64_t) :: 1,2,3])) THEN - success = 1_c_int - ELSE - success = 0_c_int - END IF + count = 0 + DO i=1, nbonds + count = count + check_bond(i, 5, 1, 2, bonds_array) + count = count + check_bond(i, 3, 1, 3, bonds_array); + count = count + check_bond(i, 2, 3, 4, bonds_array); + count = count + check_bond(i, 2, 3, 5, bonds_array); + count = count + check_bond(i, 1, 3, 6, bonds_array); + count = count + check_bond(i, 3, 6, 8, bonds_array); + count = count + check_bond(i, 4, 6, 7, bonds_array); + count = count + check_bond(i, 5, 8, 9, bonds_array); + count = count + check_bond(i, 5, 27, 28, bonds_array); + count = count + check_bond(i, 5, 27, 29, bonds_array); + END DO + +CONTAINS + + INTEGER FUNCTION check_bond(idx, batom1, batom2, btype, barray) + IMPLICIT NONE + INTEGER, INTENT(IN) :: idx, batom1, batom2, btype + INTEGER(c_int64_t), DIMENSION(:,:) :: barray + check_bond = 0 + IF ((barray(1,idx) == batom1) .AND. (barray(2,idx) == batom2)) THEN + IF (barray(3,idx) == btype) check_bond = 1 + END IF + IF ((barray(1,idx) == batom2) .AND. (barray(2,idx) == batom1)) THEN + IF (barray(3,idx) == btype) check_bond = 1 + END IF + END FUNCTION check_bond + END FUNCTION f_lammps_test_gather_bonds_big FUNCTION f_lammps_gather_pe_atom(i) BIND(C) diff --git a/unittest/fortran/wrap_gather_scatter.cpp b/unittest/fortran/wrap_gather_scatter.cpp index bbadbbc1a7..4a0cd1455e 100644 --- a/unittest/fortran/wrap_gather_scatter.cpp +++ b/unittest/fortran/wrap_gather_scatter.cpp @@ -29,7 +29,7 @@ int f_lammps_gather_atoms_subset_mask(int); double f_lammps_gather_atoms_subset_position(int, int); void f_lammps_scatter_atoms_masks(); void f_lammps_scatter_atoms_positions(); -void f_lammps_setup_gather_bonds(); +void f_lammps_setup_gather_topology(); int f_lammps_test_gather_bonds_small(); int f_lammps_test_gather_bonds_big(); double f_lammps_gather_pe_atom(int); @@ -221,11 +221,11 @@ TEST_F(LAMMPS_gather_scatter, scatter_atoms_subset_mask) TEST_F(LAMMPS_gather_scatter, gather_bonds) { if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); - f_lammps_setup_gather_bonds(); + f_lammps_setup_gather_topology(); #ifdef LAMMPS_BIGBIG - EXPECT_EQ(f_lammps_test_gather_bonds_big(), 1); + EXPECT_EQ(f_lammps_test_gather_bonds_big(), 10); #else - EXPECT_EQ(f_lammps_test_gather_bonds_small(), 1); + EXPECT_EQ(f_lammps_test_gather_bonds_small(), 10); #endif }; From 8a0e9f60189252d3dde99f06646c7c10e79b5355 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 2 Feb 2023 20:58:47 -0500 Subject: [PATCH 132/445] add tests for gathering angles, dihedrals, impropers from fortran --- .../fortran/test_fortran_gather_scatter.f90 | 312 +++++++++++++++++- unittest/fortran/wrap_gather_scatter.cpp | 70 +++- 2 files changed, 347 insertions(+), 35 deletions(-) diff --git a/unittest/fortran/test_fortran_gather_scatter.f90 b/unittest/fortran/test_fortran_gather_scatter.f90 index b7e70edf88..1f8d4f0905 100644 --- a/unittest/fortran/test_fortran_gather_scatter.f90 +++ b/unittest/fortran/test_fortran_gather_scatter.f90 @@ -240,15 +240,15 @@ FUNCTION f_lammps_test_gather_bonds_small() BIND(C) RESULT(count) count = 0 DO i=1, nbonds count = count + check_bond(i, 5, 1, 2, bonds_array) - count = count + check_bond(i, 3, 1, 3, bonds_array); - count = count + check_bond(i, 2, 3, 4, bonds_array); - count = count + check_bond(i, 2, 3, 5, bonds_array); - count = count + check_bond(i, 1, 3, 6, bonds_array); - count = count + check_bond(i, 3, 6, 8, bonds_array); - count = count + check_bond(i, 4, 6, 7, bonds_array); - count = count + check_bond(i, 5, 8, 9, bonds_array); - count = count + check_bond(i, 5, 27, 28, bonds_array); - count = count + check_bond(i, 5, 27, 29, bonds_array); + count = count + check_bond(i, 3, 1, 3, bonds_array) + count = count + check_bond(i, 2, 3, 4, bonds_array) + count = count + check_bond(i, 2, 3, 5, bonds_array) + count = count + check_bond(i, 1, 3, 6, bonds_array) + count = count + check_bond(i, 3, 6, 8, bonds_array) + count = count + check_bond(i, 4, 6, 7, bonds_array) + count = count + check_bond(i, 5, 8, 9, bonds_array) + count = count + check_bond(i, 5, 27, 28, bonds_array) + count = count + check_bond(i, 5, 27, 29, bonds_array) END DO CONTAINS @@ -286,15 +286,15 @@ FUNCTION f_lammps_test_gather_bonds_big() BIND(C) RESULT(count) count = 0 DO i=1, nbonds count = count + check_bond(i, 5, 1, 2, bonds_array) - count = count + check_bond(i, 3, 1, 3, bonds_array); - count = count + check_bond(i, 2, 3, 4, bonds_array); - count = count + check_bond(i, 2, 3, 5, bonds_array); - count = count + check_bond(i, 1, 3, 6, bonds_array); - count = count + check_bond(i, 3, 6, 8, bonds_array); - count = count + check_bond(i, 4, 6, 7, bonds_array); - count = count + check_bond(i, 5, 8, 9, bonds_array); - count = count + check_bond(i, 5, 27, 28, bonds_array); - count = count + check_bond(i, 5, 27, 29, bonds_array); + count = count + check_bond(i, 3, 1, 3, bonds_array) + count = count + check_bond(i, 2, 3, 4, bonds_array) + count = count + check_bond(i, 2, 3, 5, bonds_array) + count = count + check_bond(i, 1, 3, 6, bonds_array) + count = count + check_bond(i, 3, 6, 8, bonds_array) + count = count + check_bond(i, 4, 6, 7, bonds_array) + count = count + check_bond(i, 5, 8, 9, bonds_array) + count = count + check_bond(i, 5, 27, 28, bonds_array) + count = count + check_bond(i, 5, 27, 29, bonds_array) END DO CONTAINS @@ -314,6 +314,282 @@ CONTAINS END FUNCTION f_lammps_test_gather_bonds_big +FUNCTION f_lammps_test_gather_angles_small() BIND(C) RESULT(count) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int, c_int64_t + USE LIBLAMMPS + USE keepstuff, ONLY : lmp + IMPLICIT NONE + INTEGER :: i, nangles, size_bigint + INTEGER(c_int) :: count + INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET :: angles + INTEGER(c_int), DIMENSION(:,:), POINTER :: angles_array + INTEGER(c_int), POINTER :: nangles_small + INTEGER(c_int64_t), POINTER :: nangles_big + + size_bigint = lmp%extract_setting('bigint') + IF (size_bigint == 4) THEN + nangles_small = lmp%extract_global('nangles') + nangles = nangles_small + ELSE + nangles_big = lmp%extract_global('nangles') + nangles = nangles_big + END IF + + CALL lmp%gather_angles(angles) + angles_array(1:4,1:SIZE(angles)/4) => angles + count = 0 + DO i=1, nangles + count = count + check_angle(i, 4, 2, 1, 3, angles_array) + count = count + check_angle(i, 4, 1, 3, 5, angles_array) + count = count + check_angle(i, 4, 1, 3, 4, angles_array) + count = count + check_angle(i, 4, 13, 12, 15, angles_array) + count = count + check_angle(i, 4, 13, 12, 14, angles_array) + count = count + check_angle(i, 2, 5, 3, 6, angles_array) + count = count + check_angle(i, 2, 4, 3, 6, angles_array) + count = count + check_angle(i, 3, 3, 6, 7, angles_array) + count = count + check_angle(i, 3, 3, 6, 8, angles_array) + count = count + check_angle(i, 1, 22, 21, 23, angles_array) + END DO + +CONTAINS + + INTEGER FUNCTION check_angle(idx, aatom1, aatom2, aatom3, atype, aarray) + IMPLICIT NONE + INTEGER, INTENT(IN) :: idx, aatom1, aatom2, aatom3, atype + INTEGER(c_int), DIMENSION(:,:) :: aarray + check_angle = 0 + IF ((aarray(1,idx) == aatom1) .AND. (aarray(2,idx) == aatom2) .AND. (aarray(3,idx) == aatom3)) THEN + IF (aarray(4,idx) == atype) check_angle = 1 + END IF + IF ((aarray(1,idx) == aatom3) .AND. (aarray(2,idx) == aatom2) .AND. (aarray(3,idx) == aatom1)) THEN + IF (aarray(4,idx) == atype) check_angle = 1 + END IF + END FUNCTION check_angle + +END FUNCTION f_lammps_test_gather_angles_small + +FUNCTION f_lammps_test_gather_angles_big() BIND(C) RESULT(count) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int, c_int64_t + USE LIBLAMMPS + USE keepstuff, ONLY : lmp + IMPLICIT NONE + INTEGER :: i, nangles + INTEGER(c_int) :: count + INTEGER(c_int64_t), DIMENSION(:), ALLOCATABLE, TARGET :: angles + INTEGER(c_int64_t), DIMENSION(:,:), POINTER :: angles_array + INTEGER(c_int64_t), POINTER :: nangles_big + + nangles_big = lmp%extract_global('nangles') + nangles = nangles_big + CALL lmp%gather_angles(angles) + angles_array(1:4,1:SIZE(angles)/4) => angles + count = 0 + DO i=1, nangles + count = count + check_angle(i, 4, 2, 1, 3, angles_array) + count = count + check_angle(i, 4, 1, 3, 5, angles_array) + count = count + check_angle(i, 4, 1, 3, 4, angles_array) + count = count + check_angle(i, 4, 13, 12, 15, angles_array) + count = count + check_angle(i, 4, 13, 12, 14, angles_array) + count = count + check_angle(i, 2, 5, 3, 6, angles_array) + count = count + check_angle(i, 2, 4, 3, 6, angles_array) + count = count + check_angle(i, 3, 3, 6, 7, angles_array) + count = count + check_angle(i, 3, 3, 6, 8, angles_array) + count = count + check_angle(i, 1, 22, 21, 23, angles_array) + END DO + +CONTAINS + + INTEGER FUNCTION check_angle(idx, aatom1, aatom2, aatom3, atype, aarray) + IMPLICIT NONE + INTEGER, INTENT(IN) :: idx, aatom1, aatom2, aatom3, atype + INTEGER(c_int64_t), DIMENSION(:,:) :: aarray + check_angle = 0 + IF ((aarray(1,idx) == aatom1) .AND. (aarray(2,idx) == aatom2) .AND. (aarray(3,idx) == aatom3)) THEN + IF (aarray(4,idx) == atype) check_angle = 1 + END IF + IF ((aarray(1,idx) == aatom3) .AND. (aarray(2,idx) == aatom2) .AND. (aarray(3,idx) == aatom1)) THEN + IF (aarray(4,idx) == atype) check_angle = 1 + END IF + END FUNCTION check_angle + +END FUNCTION f_lammps_test_gather_angles_big + +FUNCTION f_lammps_test_gather_dihedrals_small() BIND(C) RESULT(count) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int, c_int64_t + USE LIBLAMMPS + USE keepstuff, ONLY : lmp + IMPLICIT NONE + INTEGER :: i, ndihedrals, size_bigint + INTEGER(c_int) :: count + INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET :: dihedrals + INTEGER(c_int), DIMENSION(:,:), POINTER :: dihedrals_array + INTEGER(c_int), POINTER :: ndihedrals_small + INTEGER(c_int64_t), POINTER :: ndihedrals_big + + size_bigint = lmp%extract_setting('bigint') + IF (size_bigint == 4) THEN + ndihedrals_small = lmp%extract_global('ndihedrals') + ndihedrals = ndihedrals_small + ELSE + ndihedrals_big = lmp%extract_global('ndihedrals') + ndihedrals = ndihedrals_big + END IF + + CALL lmp%gather_dihedrals(dihedrals) + dihedrals_array(1:5,1:SIZE(dihedrals)/5) => dihedrals + count = 0 + DO i=1, ndihedrals + count = count + check_dihedral(i, 2, 2, 1, 3, 6, dihedrals_array) + count = count + check_dihedral(i, 2, 2, 1, 3, 4, dihedrals_array) + count = count + check_dihedral(i, 3, 2, 1, 3, 5, dihedrals_array) + count = count + check_dihedral(i, 1, 1, 3, 6, 8, dihedrals_array) + count = count + check_dihedral(i, 1, 1, 3, 6, 7, dihedrals_array) + count = count + check_dihedral(i, 5, 4, 3, 6, 8, dihedrals_array) + count = count + check_dihedral(i, 5, 4, 3, 6, 7, dihedrals_array) + count = count + check_dihedral(i, 5, 16, 10, 12, 13, dihedrals_array) + count = count + check_dihedral(i, 5, 16, 10, 12, 14, dihedrals_array) + count = count + check_dihedral(i, 5, 16, 10, 12, 15, dihedrals_array) + END DO + +CONTAINS + + INTEGER FUNCTION check_dihedral(idx, datom1, datom2, datom3, datom4, dtype, darray) + IMPLICIT NONE + INTEGER, INTENT(IN) :: idx, datom1, datom2, datom3, datom4, dtype + INTEGER(c_int), DIMENSION(:,:) :: darray + check_dihedral = 0 + IF ((darray(1,idx) == datom1) .AND. (darray(2,idx) == datom2) & + .AND. (darray(3,idx) == datom3) .AND. (darray(4,idx) == datom4)) THEN + IF (darray(5,idx) == dtype) check_dihedral = 1 + END IF + END FUNCTION check_dihedral + +END FUNCTION f_lammps_test_gather_dihedrals_small + +FUNCTION f_lammps_test_gather_dihedrals_big() BIND(C) RESULT(count) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int, c_int64_t + USE LIBLAMMPS + USE keepstuff, ONLY : lmp + IMPLICIT NONE + INTEGER :: i, ndihedrals + INTEGER(c_int) :: count + INTEGER(c_int64_t), DIMENSION(:), ALLOCATABLE, TARGET :: dihedrals + INTEGER(c_int64_t), DIMENSION(:,:), POINTER :: dihedrals_array + INTEGER(c_int64_t), POINTER :: ndihedrals_big + + ndihedrals_big = lmp%extract_global('ndihedrals') + ndihedrals = ndihedrals_big + CALL lmp%gather_dihedrals(dihedrals) + dihedrals_array(1:5,1:SIZE(dihedrals)/5) => dihedrals + count = 0 + DO i=1, ndihedrals + count = count + check_dihedral(i, 2, 2, 1, 3, 6, dihedrals_array) + count = count + check_dihedral(i, 2, 2, 1, 3, 4, dihedrals_array) + count = count + check_dihedral(i, 3, 2, 1, 3, 5, dihedrals_array) + count = count + check_dihedral(i, 1, 1, 3, 6, 8, dihedrals_array) + count = count + check_dihedral(i, 1, 1, 3, 6, 7, dihedrals_array) + count = count + check_dihedral(i, 5, 4, 3, 6, 8, dihedrals_array) + count = count + check_dihedral(i, 5, 4, 3, 6, 7, dihedrals_array) + count = count + check_dihedral(i, 5, 16, 10, 12, 13, dihedrals_array) + count = count + check_dihedral(i, 5, 16, 10, 12, 14, dihedrals_array) + count = count + check_dihedral(i, 5, 16, 10, 12, 15, dihedrals_array) + END DO + +CONTAINS + + INTEGER FUNCTION check_dihedral(idx, datom1, datom2, datom3, datom4, dtype, darray) + IMPLICIT NONE + INTEGER, INTENT(IN) :: idx, datom1, datom2, datom3, datom4, dtype + INTEGER(c_int64_t), DIMENSION(:,:) :: darray + check_dihedral = 0 + IF ((darray(1,idx) == datom1) .AND. (darray(2,idx) == datom2) & + .AND. (darray(3,idx) == datom3) .AND. (darray(4,idx) == datom4)) THEN + IF (darray(5,idx) == dtype) check_dihedral = 1 + END IF + END FUNCTION check_dihedral + +END FUNCTION f_lammps_test_gather_dihedrals_big + +FUNCTION f_lammps_test_gather_impropers_small() BIND(C) RESULT(count) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int, c_int64_t + USE LIBLAMMPS + USE keepstuff, ONLY : lmp + IMPLICIT NONE + INTEGER :: i, nimpropers, size_bigint + INTEGER(c_int) :: count + INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET :: impropers + INTEGER(c_int), DIMENSION(:,:), POINTER :: impropers_array + INTEGER(c_int), POINTER :: nimpropers_small + INTEGER(c_int64_t), POINTER :: nimpropers_big + + size_bigint = lmp%extract_setting('bigint') + IF (size_bigint == 4) THEN + nimpropers_small = lmp%extract_global('nimpropers') + nimpropers = nimpropers_small + ELSE + nimpropers_big = lmp%extract_global('nimpropers') + nimpropers = nimpropers_big + END IF + + CALL lmp%gather_impropers(impropers) + impropers_array(1:5,1:SIZE(impropers)/5) => impropers + count = 0 + DO i=1, nimpropers + count = count + check_improper(i, 1, 6, 3, 8, 7, impropers_array) + count = count + check_improper(i, 2, 8, 6, 10, 9, impropers_array) + END DO + +CONTAINS + + INTEGER FUNCTION check_improper(idx, datom1, datom2, datom3, datom4, dtype, darray) + IMPLICIT NONE + INTEGER, INTENT(IN) :: idx, datom1, datom2, datom3, datom4, dtype + INTEGER(c_int), DIMENSION(:,:) :: darray + check_improper = 0 + IF ((darray(1,idx) == datom1) .AND. (darray(2,idx) == datom2) & + .AND. (darray(3,idx) == datom3) .AND. (darray(4,idx) == datom4)) THEN + IF (darray(5,idx) == dtype) check_improper = 1 + END IF + END FUNCTION check_improper + +END FUNCTION f_lammps_test_gather_impropers_small + +FUNCTION f_lammps_test_gather_impropers_big() BIND(C) RESULT(count) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int, c_int64_t + USE LIBLAMMPS + USE keepstuff, ONLY : lmp + IMPLICIT NONE + INTEGER :: i, nimpropers + INTEGER(c_int) :: count + INTEGER(c_int64_t), DIMENSION(:), ALLOCATABLE, TARGET :: impropers + INTEGER(c_int64_t), DIMENSION(:,:), POINTER :: impropers_array + INTEGER(c_int64_t), POINTER :: nimpropers_big + + nimpropers_big = lmp%extract_global('nimpropers') + nimpropers = nimpropers_big + CALL lmp%gather_impropers(impropers) + impropers_array(1:5,1:SIZE(impropers)/5) => impropers + count = 0 + DO i=1, nimpropers + count = count + check_improper(i, 1, 6, 3, 8, 7, impropers_array) + count = count + check_improper(i, 2, 8, 6, 10, 9, impropers_array) + END DO + +CONTAINS + + INTEGER FUNCTION check_improper(idx, datom1, datom2, datom3, datom4, dtype, darray) + IMPLICIT NONE + INTEGER, INTENT(IN) :: idx, datom1, datom2, datom3, datom4, dtype + INTEGER(c_int64_t), DIMENSION(:,:) :: darray + check_improper = 0 + IF ((darray(1,idx) == datom1) .AND. (darray(2,idx) == datom2) & + .AND. (darray(3,idx) == datom3) .AND. (darray(4,idx) == datom4)) THEN + IF (darray(5,idx) == dtype) check_improper = 1 + END IF + END FUNCTION check_improper + +END FUNCTION f_lammps_test_gather_impropers_big + FUNCTION f_lammps_gather_pe_atom(i) BIND(C) USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int, c_double USE LIBLAMMPS diff --git a/unittest/fortran/wrap_gather_scatter.cpp b/unittest/fortran/wrap_gather_scatter.cpp index 4a0cd1455e..1578f0e138 100644 --- a/unittest/fortran/wrap_gather_scatter.cpp +++ b/unittest/fortran/wrap_gather_scatter.cpp @@ -32,9 +32,15 @@ void f_lammps_scatter_atoms_positions(); void f_lammps_setup_gather_topology(); int f_lammps_test_gather_bonds_small(); int f_lammps_test_gather_bonds_big(); +int f_lammps_test_gather_angles_small(); +int f_lammps_test_gather_angles_big(); +int f_lammps_test_gather_dihedrals_small(); +int f_lammps_test_gather_dihedrals_big(); +int f_lammps_test_gather_impropers_small(); +int f_lammps_test_gather_impropers_big(); double f_lammps_gather_pe_atom(int); double f_lammps_gather_pe_atom_concat(int); -void f_lammps_gather_pe_atom_subset(int*, double*); +void f_lammps_gather_pe_atom_subset(int *, double *); void f_lammps_scatter_compute(); void f_lammps_scatter_subset_compute(); } @@ -229,6 +235,39 @@ TEST_F(LAMMPS_gather_scatter, gather_bonds) #endif }; +TEST_F(LAMMPS_gather_scatter, gather_angles) +{ + if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); + f_lammps_setup_gather_topology(); +#ifdef LAMMPS_BIGBIG + EXPECT_EQ(f_lammps_test_gather_angles_big(), 10); +#else + EXPECT_EQ(f_lammps_test_gather_angles_small(), 10); +#endif +}; + +TEST_F(LAMMPS_gather_scatter, gather_dihedrals) +{ + if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); + f_lammps_setup_gather_topology(); +#ifdef LAMMPS_BIGBIG + EXPECT_EQ(f_lammps_test_gather_dihedrals_big(), 10); +#else + EXPECT_EQ(f_lammps_test_gather_dihedrals_small(), 10); +#endif +}; + +TEST_F(LAMMPS_gather_scatter, gather_impropers) +{ + if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); + f_lammps_setup_gather_topology(); +#ifdef LAMMPS_BIGBIG + EXPECT_EQ(f_lammps_test_gather_impropers_big(), 2); +#else + EXPECT_EQ(f_lammps_test_gather_impropers_small(), 2); +#endif +}; + TEST_F(LAMMPS_gather_scatter, gather_compute) { #ifdef LAMMPS_BIGBIG @@ -237,9 +276,8 @@ TEST_F(LAMMPS_gather_scatter, gather_compute) f_lammps_setup_gather_scatter(); lammps_command(lmp, "run 0"); int natoms = lmp->atom->natoms; - int *tag = lmp->atom->tag; - double *pe = (double*) lammps_extract_compute(lmp, "pe", LMP_STYLE_ATOM, - LMP_TYPE_VECTOR); + int *tag = lmp->atom->tag; + double *pe = (double *)lammps_extract_compute(lmp, "pe", LMP_STYLE_ATOM, LMP_TYPE_VECTOR); for (int i = 0; i < natoms; i++) EXPECT_DOUBLE_EQ(f_lammps_gather_pe_atom(tag[i]), pe[i]); #endif @@ -253,9 +291,8 @@ TEST_F(LAMMPS_gather_scatter, gather_compute_concat) f_lammps_setup_gather_scatter(); lammps_command(lmp, "run 0"); int natoms = lmp->atom->natoms; - int *tag = lmp->atom->tag; - double *pe = (double*) lammps_extract_compute(lmp, "pe", LMP_STYLE_ATOM, - LMP_TYPE_VECTOR); + int *tag = lmp->atom->tag; + double *pe = (double *)lammps_extract_compute(lmp, "pe", LMP_STYLE_ATOM, LMP_TYPE_VECTOR); for (int i = 0; i < natoms; i++) EXPECT_DOUBLE_EQ(f_lammps_gather_pe_atom(tag[i]), pe[i]); #endif @@ -268,16 +305,15 @@ TEST_F(LAMMPS_gather_scatter, gather_compute_subset) #else f_lammps_setup_gather_scatter(); lammps_command(lmp, "run 0"); - int ids[2] = {3, 1}; - int *tag = lmp->atom->tag; - double pe[2] = {0.0, 0.0}; - int nlocal = lammps_extract_setting(lmp, "nlocal"); - double *pa_pe = (double*) lammps_extract_compute(lmp, "pe", LMP_STYLE_ATOM, - LMP_TYPE_VECTOR); + int ids[2] = {3, 1}; + int *tag = lmp->atom->tag; + double pe[2] = {0.0, 0.0}; + int nlocal = lammps_extract_setting(lmp, "nlocal"); + double *pa_pe = (double *)lammps_extract_compute(lmp, "pe", LMP_STYLE_ATOM, LMP_TYPE_VECTOR); for (int i = 0; i < nlocal; i++) { - if(tag[i] == ids[0]) pe[0] = pa_pe[i]; - if(tag[i] == ids[1]) pe[1] = pa_pe[i]; + if (tag[i] == ids[0]) pe[0] = pa_pe[i]; + if (tag[i] == ids[1]) pe[1] = pa_pe[i]; } double ftn_pe[2]; @@ -299,7 +335,7 @@ TEST_F(LAMMPS_gather_scatter, scatter_compute) lammps_gather(lmp, "c_pe", 1, 1, pe); double *old_pe = new double[natoms]; for (int i = 0; i < natoms; i++) - old_pe[i] = pe[i]; + old_pe[i] = pe[i]; EXPECT_DOUBLE_EQ(pe[0], old_pe[0]); EXPECT_DOUBLE_EQ(pe[1], old_pe[1]); EXPECT_DOUBLE_EQ(pe[2], old_pe[2]); @@ -325,7 +361,7 @@ TEST_F(LAMMPS_gather_scatter, scatter_subset_compute) lammps_gather(lmp, "c_pe", 1, 1, pe); double *old_pe = new double[natoms]; for (int i = 0; i < natoms; i++) - old_pe[i] = pe[i]; + old_pe[i] = pe[i]; EXPECT_DOUBLE_EQ(pe[0], old_pe[0]); EXPECT_DOUBLE_EQ(pe[1], old_pe[1]); EXPECT_DOUBLE_EQ(pe[2], old_pe[2]); From f717debbd492f1bcbe61e6921d3ff3bd2d0b1d97 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 2 Feb 2023 21:09:45 -0500 Subject: [PATCH 133/445] use same main() function as with c-library interface. --- unittest/fortran/CMakeLists.txt | 58 +++++++++++++++--------------- unittest/fortran/test_main.cpp | 60 ++++++++++++++++++++++++++++++++ unittest/fortran/test_main.h | 19 ++++++++++ unittest/fortran/wrap_create.cpp | 4 +-- 4 files changed, 109 insertions(+), 32 deletions(-) create mode 100644 unittest/fortran/test_main.cpp create mode 100644 unittest/fortran/test_main.h diff --git a/unittest/fortran/CMakeLists.txt b/unittest/fortran/CMakeLists.txt index b03b4c32ca..6d6fe4cd54 100644 --- a/unittest/fortran/CMakeLists.txt +++ b/unittest/fortran/CMakeLists.txt @@ -30,69 +30,69 @@ if(CMAKE_Fortran_COMPILER) target_link_libraries(flammps PUBLIC gfortran) endif() - add_executable(test_fortran_create wrap_create.cpp test_fortran_create.f90) - target_link_libraries(test_fortran_create PRIVATE flammps lammps GTest::GTestMain) + add_executable(test_fortran_create wrap_create.cpp test_fortran_create.f90 test_main.cpp) + target_link_libraries(test_fortran_create PRIVATE flammps lammps GTest::GMock) target_include_directories(test_fortran_create PRIVATE "${LAMMPS_SOURCE_DIR}/../fortran") add_test(NAME FortranOpen COMMAND test_fortran_create) - add_executable(test_fortran_commands wrap_commands.cpp test_fortran_commands.f90) - target_link_libraries(test_fortran_commands PRIVATE flammps lammps GTest::GTestMain) + add_executable(test_fortran_commands wrap_commands.cpp test_fortran_commands.f90 test_main.cpp) + target_link_libraries(test_fortran_commands PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranCommands COMMAND test_fortran_commands) - add_executable(test_fortran_get_thermo wrap_get_thermo.cpp test_fortran_get_thermo.f90) - target_link_libraries(test_fortran_get_thermo PRIVATE flammps lammps GTest::GTestMain) + add_executable(test_fortran_get_thermo wrap_get_thermo.cpp test_fortran_get_thermo.f90 test_main.cpp) + target_link_libraries(test_fortran_get_thermo PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranGetThermo COMMAND test_fortran_get_thermo) - add_executable(test_fortran_box wrap_box.cpp test_fortran_box.f90) - target_link_libraries(test_fortran_box PRIVATE flammps lammps GTest::GTestMain) + add_executable(test_fortran_box wrap_box.cpp test_fortran_box.f90 test_main.cpp) + target_link_libraries(test_fortran_box PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranBox COMMAND test_fortran_box) - add_executable(test_fortran_properties wrap_properties.cpp test_fortran_properties.f90 test_fortran_commands.f90) + add_executable(test_fortran_properties wrap_properties.cpp test_fortran_properties.f90 test_fortran_commands.f90 test_main.cpp) target_link_libraries(test_fortran_properties PRIVATE flammps lammps GTest::GMockMain) add_test(NAME FortranProperties COMMAND test_fortran_properties) - add_executable(test_fortran_extract_global wrap_extract_global.cpp test_fortran_extract_global.f90) - target_link_libraries(test_fortran_extract_global PRIVATE flammps lammps GTest::GTestMain) + add_executable(test_fortran_extract_global wrap_extract_global.cpp test_fortran_extract_global.f90 test_main.cpp) + target_link_libraries(test_fortran_extract_global PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranExtractGlobal COMMAND test_fortran_extract_global) - add_executable(test_fortran_extract_atom wrap_extract_atom.cpp test_fortran_extract_atom.f90) - target_link_libraries(test_fortran_extract_atom PRIVATE flammps lammps GTest::GTestMain) + add_executable(test_fortran_extract_atom wrap_extract_atom.cpp test_fortran_extract_atom.f90 test_main.cpp) + target_link_libraries(test_fortran_extract_atom PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranExtractAtom COMMAND test_fortran_extract_atom) - add_executable(test_fortran_extract_compute wrap_extract_compute.cpp test_fortran_extract_compute.f90) - target_link_libraries(test_fortran_extract_compute PRIVATE flammps lammps GTest::GTestMain) + add_executable(test_fortran_extract_compute wrap_extract_compute.cpp test_fortran_extract_compute.f90 test_main.cpp) + target_link_libraries(test_fortran_extract_compute PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranExtractCompute COMMAND test_fortran_extract_compute) - add_executable(test_fortran_extract_fix wrap_extract_fix.cpp test_fortran_extract_fix.f90) - target_link_libraries(test_fortran_extract_fix PRIVATE flammps lammps GTest::GTestMain) + add_executable(test_fortran_extract_fix wrap_extract_fix.cpp test_fortran_extract_fix.f90 test_main.cpp) + target_link_libraries(test_fortran_extract_fix PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranExtractFix COMMAND test_fortran_extract_fix) - add_executable(test_fortran_extract_variable wrap_extract_variable.cpp test_fortran_extract_variable.f90) + add_executable(test_fortran_extract_variable wrap_extract_variable.cpp test_fortran_extract_variable.f90 test_main.cpp) target_compile_definitions(test_fortran_extract_variable PRIVATE -DTEST_INPUT_FOLDER=${CMAKE_CURRENT_SOURCE_DIR}) - target_link_libraries(test_fortran_extract_variable PRIVATE flammps lammps GTest::GTestMain) + target_link_libraries(test_fortran_extract_variable PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranExtractVariable COMMAND test_fortran_extract_variable) - add_executable(test_fortran_gather_scatter wrap_gather_scatter.cpp test_fortran_gather_scatter.f90) + add_executable(test_fortran_gather_scatter wrap_gather_scatter.cpp test_fortran_gather_scatter.f90 test_main.cpp) target_compile_definitions(test_fortran_gather_scatter PRIVATE -DTEST_INPUT_FOLDER=${CMAKE_CURRENT_SOURCE_DIR}) - target_link_libraries(test_fortran_gather_scatter PRIVATE flammps lammps GTest::GTestMain) + target_link_libraries(test_fortran_gather_scatter PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranGatherScatter COMMAND test_fortran_gather_scatter) - add_executable(test_fortran_create_atoms wrap_create_atoms.cpp test_fortran_create_atoms.f90) - target_link_libraries(test_fortran_create_atoms PRIVATE flammps lammps GTest::GTestMain) + add_executable(test_fortran_create_atoms wrap_create_atoms.cpp test_fortran_create_atoms.f90 test_main.cpp) + target_link_libraries(test_fortran_create_atoms PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranCreateAtoms COMMAND test_fortran_create_atoms) - add_executable(test_fortran_configuration wrap_configuration.cpp test_fortran_configuration.f90 test_fortran_commands.f90) - target_link_libraries(test_fortran_configuration PRIVATE flammps lammps GTest::GMockMain) + add_executable(test_fortran_configuration wrap_configuration.cpp test_fortran_configuration.f90 test_fortran_commands.f90 test_main.cpp) + target_link_libraries(test_fortran_configuration PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranConfiguration COMMAND test_fortran_configuration) - add_executable(test_fortran_neighlist wrap_neighlist.cpp test_fortran_neighlist.f90) - target_link_libraries(test_fortran_neighlist PRIVATE flammps lammps GTest::GMockMain) + add_executable(test_fortran_neighlist wrap_neighlist.cpp test_fortran_neighlist.f90 test_main.cpp) + target_link_libraries(test_fortran_neighlist PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranNeighlist COMMAND test_fortran_neighlist) # gfortran from GCC 9 on ubuntu has an ICE compiling this test. if ((CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") AND (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 9.9)) - add_executable(test_fortran_fixexternal wrap_fixexternal.cpp test_fortran_fixexternal.f90) - target_link_libraries(test_fortran_fixexternal PRIVATE flammps lammps GTest::GMockMain) + add_executable(test_fortran_fixexternal wrap_fixexternal.cpp test_fortran_fixexternal.f90 test_main.cpp) + target_link_libraries(test_fortran_fixexternal PRIVATE flammps lammps GTest::GMock) add_test(NAME FortranFixExternal COMMAND test_fortran_fixexternal) endif() diff --git a/unittest/fortran/test_main.cpp b/unittest/fortran/test_main.cpp new file mode 100644 index 0000000000..ef1f921680 --- /dev/null +++ b/unittest/fortran/test_main.cpp @@ -0,0 +1,60 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS Development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "test_main.h" +#include "pointers.h" +#include "utils.h" +#include "gmock/gmock.h" +#include "gtest/gtest.h" + +#include +#include + +// whether to print verbose output (i.e. not capturing LAMMPS screen output). +bool verbose = false; + +int main(int argc, char **argv) +{ + MPI_Init(&argc, &argv); + ::testing::InitGoogleMock(&argc, argv); + + if (argc < 1) { + return 1; + } + + // handle arguments passed via environment variable + if (const char *var = getenv("TEST_ARGS")) { + std::vector env = LAMMPS_NS::utils::split_words(var); + for (auto arg : env) { + if (arg == "-v") { + verbose = true; + } + } + } + + int iarg = 1; + while (iarg < argc) { + if (strcmp(argv[iarg], "-v") == 0) { + verbose = true; + ++iarg; + } else { + std::cerr << "unknown option: " << argv[iarg] << "\n\n"; + MPI_Finalize(); + return 1; + } + } + + int rv = RUN_ALL_TESTS(); + MPI_Finalize(); + return rv; +} diff --git a/unittest/fortran/test_main.h b/unittest/fortran/test_main.h new file mode 100644 index 0000000000..343a5ec8ae --- /dev/null +++ b/unittest/fortran/test_main.h @@ -0,0 +1,19 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/ Sandia National Laboratories + LAMMPS Development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef TEST_MAIN_H +#define TEST_MAIN_H + +extern bool verbose; + +#endif diff --git a/unittest/fortran/wrap_create.cpp b/unittest/fortran/wrap_create.cpp index 789e9fca6a..260e6ba1f1 100644 --- a/unittest/fortran/wrap_create.cpp +++ b/unittest/fortran/wrap_create.cpp @@ -30,13 +30,11 @@ TEST(open_no_mpi, no_args) ::testing::internal::CaptureStdout(); int mpi_init = 0; MPI_Initialized(&mpi_init); - EXPECT_EQ(mpi_init, 0); + EXPECT_EQ(mpi_init, 1); void *handle = f_lammps_no_mpi_no_args(); std::string output = ::testing::internal::GetCapturedStdout(); EXPECT_STREQ(output.substr(0, 6).c_str(), "LAMMPS"); LAMMPS_NS::LAMMPS *lmp = (LAMMPS_NS::LAMMPS *)handle; - MPI_Initialized(&mpi_init); - EXPECT_NE(mpi_init, 0); EXPECT_EQ(lmp->world, MPI_COMM_WORLD); EXPECT_EQ(lmp->infile, stdin); EXPECT_EQ(lmp->screen, stdout); From 8994633dab5a0a372b95216a80c7b484c06c5632 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 2 Feb 2023 23:25:57 -0500 Subject: [PATCH 134/445] fix broken link --- doc/src/Intro_portability.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/Intro_portability.rst b/doc/src/Intro_portability.rst index 119453eb27..239eacd1b7 100644 --- a/doc/src/Intro_portability.rst +++ b/doc/src/Intro_portability.rst @@ -2,7 +2,7 @@ LAMMPS portability and compatibility ------------------------------------ The primary form of distributing LAMMPS is through highly portable -source code. But also several ways of obtaining LAMMPS as `precompiled +source code. But also several ways of obtaining LAMMPS as :doc:`precompiled packages or through automated build mechanisms ` exist. Most of LAMMPS is written in C++, some support tools are written in Fortran or Python or MATLAB. From 0823117ec551c9258416fee4df8b7f39281cf394 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Fri, 3 Feb 2023 09:57:17 -0600 Subject: [PATCH 135/445] Corrected per-atom energy and stress tally, removed the redundant kernel in lj/cut/dipole/cut/kk --- src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp | 133 ++++++++----------- src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h | 7 +- 2 files changed, 60 insertions(+), 80 deletions(-) diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp index 9a953e2609..7260fda31a 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp @@ -414,12 +414,8 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne } } // cutsq_coulsq_ij - if (EVFLAG) { - if (EVFLAG == 2) - ev_tally_xyz_atom(ev, i, j, fx, fy, fz, delx, dely, delz); - if (EVFLAG == 1) - ev_tally_xyz(ev, i, j, fx, fy, fz, delx, dely, delz); - } + if (EVFLAG) + ev_tally_xyz(ev, i, j, ecoul+evdwl, fx, fy, fz, delx, dely, delz); } // cutsq_ij } @@ -447,92 +443,81 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne template template KOKKOS_INLINE_FUNCTION -void PairLJCutDipoleCutKokkos::ev_tally_xyz(EV_FLOAT &ev, int i, int j, +void PairLJCutDipoleCutKokkos::ev_tally_xyz(EV_FLOAT &ev, int i, int j, const F_FLOAT &epair, F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const { - F_FLOAT v[6]; + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); - v[0] = delx*fx; - v[1] = dely*fy; - v[2] = delz*fz; - v[3] = delx*fy; - v[4] = delx*fz; - v[5] = dely*fz; + const E_FLOAT v0 = delx*fx; + const E_FLOAT v1 = dely*fy; + const E_FLOAT v2 = delz*fz; + const E_FLOAT v3 = delx*fy; + const E_FLOAT v4 = delx*fz; + const E_FLOAT v5 = dely*fz; if (NEIGHFLAG != FULL) { if (NEWTON_PAIR) { // neigh half, newton on - ev.v[0] += v[0]; - ev.v[1] += v[1]; - ev.v[2] += v[2]; - ev.v[3] += v[3]; - ev.v[4] += v[4]; - ev.v[5] += v[5]; + ev.v[0] += v0; + ev.v[1] += v1; + ev.v[2] += v2; + ev.v[3] += v3; + ev.v[4] += v4; + ev.v[5] += v5; } else { // neigh half, newton off if (i < nlocal) { - ev.v[0] += 0.5*v[0]; - ev.v[1] += 0.5*v[1]; - ev.v[2] += 0.5*v[2]; - ev.v[3] += 0.5*v[3]; - ev.v[4] += 0.5*v[4]; - ev.v[5] += 0.5*v[5]; + ev.v[0] += 0.5*v0; + ev.v[1] += 0.5*v1; + ev.v[2] += 0.5*v2; + ev.v[3] += 0.5*v3; + ev.v[4] += 0.5*v4; + ev.v[5] += 0.5*v5; } if (j < nlocal) { - ev.v[0] += 0.5*v[0]; - ev.v[1] += 0.5*v[1]; - ev.v[2] += 0.5*v[2]; - ev.v[3] += 0.5*v[3]; - ev.v[4] += 0.5*v[4]; - ev.v[5] += 0.5*v[5]; + ev.v[0] += 0.5*v0; + ev.v[1] += 0.5*v1; + ev.v[2] += 0.5*v2; + ev.v[3] += 0.5*v3; + ev.v[4] += 0.5*v4; + ev.v[5] += 0.5*v5; } } } else { // NEIGHFLAG == FULL - ev.v[0] += 0.5*v[0]; - ev.v[1] += 0.5*v[1]; - ev.v[2] += 0.5*v[2]; - ev.v[3] += 0.5*v[3]; - ev.v[4] += 0.5*v[4]; - ev.v[5] += 0.5*v[5]; + ev.v[0] += 0.5*v0; + ev.v[1] += 0.5*v1; + ev.v[2] += 0.5*v2; + ev.v[3] += 0.5*v3; + ev.v[4] += 0.5*v4; + ev.v[5] += 0.5*v5; } -} - -/* ---------------------------------------------------------------------- */ - -template -template -KOKKOS_INLINE_FUNCTION -void PairLJCutDipoleCutKokkos::ev_tally_xyz_atom(EV_FLOAT & /*ev*/, int i, int j, - F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, - X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const -{ - Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); - - F_FLOAT v[6]; - - v[0] = delx*fx; - v[1] = dely*fy; - v[2] = delz*fz; - v[3] = delx*fy; - v[4] = delx*fz; - v[5] = dely*fz; - - if (NEWTON_PAIR || i < nlocal) { - v_vatom(i,0) += 0.5*v[0]; - v_vatom(i,1) += 0.5*v[1]; - v_vatom(i,2) += 0.5*v[2]; - v_vatom(i,3) += 0.5*v[3]; - v_vatom(i,4) += 0.5*v[4]; - v_vatom(i,5) += 0.5*v[5]; + if (eflag_atom) { + const E_FLOAT epairhalf = 0.5 * epair; + v_eatom[i] += epairhalf; + if (NEIGHFLAG != FULL) + v_eatom[j] += epairhalf; } - if (NEWTON_PAIR || j < nlocal) { - v_vatom(j,0) += 0.5*v[0]; - v_vatom(j,1) += 0.5*v[1]; - v_vatom(j,2) += 0.5*v[2]; - v_vatom(j,3) += 0.5*v[3]; - v_vatom(j,4) += 0.5*v[4]; - v_vatom(j,5) += 0.5*v[5]; + + if (vflag_atom) { + if (NEWTON_PAIR || i < nlocal) { + v_vatom(i,0) += 0.5*v0; + v_vatom(i,1) += 0.5*v1; + v_vatom(i,2) += 0.5*v2; + v_vatom(i,3) += 0.5*v3; + v_vatom(i,4) += 0.5*v4; + v_vatom(i,5) += 0.5*v5; + } + + if ((NEWTON_PAIR || j < nlocal) && NEIGHFLAG != FULL) { + v_vatom(j,0) += 0.5*v0; + v_vatom(j,1) += 0.5*v1; + v_vatom(j,2) += 0.5*v2; + v_vatom(j,3) += 0.5*v3; + v_vatom(j,4) += 0.5*v4; + v_vatom(j,5) += 0.5*v5; + } } } diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h index a3d56db41c..d9d548d077 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h @@ -58,14 +58,9 @@ class PairLJCutDipoleCutKokkos : public PairLJCutDipoleCut { template KOKKOS_INLINE_FUNCTION - void ev_tally_xyz(EV_FLOAT &ev, int i, int j, + void ev_tally_xyz(EV_FLOAT &ev, int i, int j, const F_FLOAT &epair, F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const; - template - KOKKOS_INLINE_FUNCTION - void ev_tally_xyz_atom(EV_FLOAT &ev, int i, int j, - F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, - X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const; KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; From 1f9aaa345f8531230af338148c0bb0df043ab939 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Fri, 3 Feb 2023 09:21:30 -0700 Subject: [PATCH 136/445] Add logic for full list --- src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp | 126 +++++++++---------- 1 file changed, 59 insertions(+), 67 deletions(-) diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp index 7260fda31a..b6eb7ca859 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp @@ -401,7 +401,7 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne a_torque(j,2) += fq*tjzcoul; } - if (eflag_global) { + if (EVFLAG && eflag_global) { ecoul = qtmp*qj*rinv; if (mu(i,3) > 0.0 && mu(j,3) > 0.0) ecoul += r3inv*pdotp - 3.0*r5inv*pidotr*pjdotr; @@ -414,9 +414,8 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne } } // cutsq_coulsq_ij - if (EVFLAG) + if (EVFLAG && (eflag_atom || vflag_either)) ev_tally_xyz(ev, i, j, ecoul+evdwl, fx, fy, fz, delx, dely, delz); - } // cutsq_ij } @@ -438,85 +437,78 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne this->template operator()(TagPairLJCutDipoleCutKernel(), ii, ev); } -/* ---------------------------------------------------------------------- */ - template template KOKKOS_INLINE_FUNCTION -void PairLJCutDipoleCutKokkos::ev_tally_xyz(EV_FLOAT &ev, int i, int j, const F_FLOAT &epair, +void PairLJCutDipoleCutKokkos::ev_tally_xyz(EV_FLOAT & ev, int i, int j, const F_FLOAT &epair, F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const { Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); - const E_FLOAT v0 = delx*fx; - const E_FLOAT v1 = dely*fy; - const E_FLOAT v2 = delz*fz; - const E_FLOAT v3 = delx*fy; - const E_FLOAT v4 = delx*fz; - const E_FLOAT v5 = dely*fz; - - if (NEIGHFLAG != FULL) { - if (NEWTON_PAIR) { // neigh half, newton on - ev.v[0] += v0; - ev.v[1] += v1; - ev.v[2] += v2; - ev.v[3] += v3; - ev.v[4] += v4; - ev.v[5] += v5; - } else { // neigh half, newton off - if (i < nlocal) { - ev.v[0] += 0.5*v0; - ev.v[1] += 0.5*v1; - ev.v[2] += 0.5*v2; - ev.v[3] += 0.5*v3; - ev.v[4] += 0.5*v4; - ev.v[5] += 0.5*v5; - } - if (j < nlocal) { - ev.v[0] += 0.5*v0; - ev.v[1] += 0.5*v1; - ev.v[2] += 0.5*v2; - ev.v[3] += 0.5*v3; - ev.v[4] += 0.5*v4; - ev.v[5] += 0.5*v5; - } - } - - } else { // NEIGHFLAG == FULL - ev.v[0] += 0.5*v0; - ev.v[1] += 0.5*v1; - ev.v[2] += 0.5*v2; - ev.v[3] += 0.5*v3; - ev.v[4] += 0.5*v4; - ev.v[5] += 0.5*v5; - } - if (eflag_atom) { - const E_FLOAT epairhalf = 0.5 * epair; - v_eatom[i] += epairhalf; - if (NEIGHFLAG != FULL) + const double epairhalf = 0.5 * epair; + if (NEIGHFLAG == FULL || newton_pair || i < nlocal) + v_eatom[i] += epairhalf; + if (NEIGHFLAG != FULL && (newton_pair || j < nlocal)) v_eatom[j] += epairhalf; } - if (vflag_atom) { - if (NEWTON_PAIR || i < nlocal) { - v_vatom(i,0) += 0.5*v0; - v_vatom(i,1) += 0.5*v1; - v_vatom(i,2) += 0.5*v2; - v_vatom(i,3) += 0.5*v3; - v_vatom(i,4) += 0.5*v4; - v_vatom(i,5) += 0.5*v5; + if (vflag_either) { + const E_FLOAT v0 = delx*fx; + const E_FLOAT v1 = dely*fy; + const E_FLOAT v2 = delz*fz; + const E_FLOAT v3 = delx*fy; + const E_FLOAT v4 = delx*fz; + const E_FLOAT v5 = dely*fz; + + if (vflag_global) { + if (NEIGHFLAG == FULL || NEWTON_PAIR) { // neighf full or half, newton on + ev.v[0] += v0; + ev.v[1] += v1; + ev.v[2] += v2; + ev.v[3] += v3; + ev.v[4] += v4; + ev.v[5] += v5; + } else { // neigh half, newton off + if (i < nlocal) { + ev.v[0] += 0.5*v0; + ev.v[1] += 0.5*v1; + ev.v[2] += 0.5*v2; + ev.v[3] += 0.5*v3; + ev.v[4] += 0.5*v4; + ev.v[5] += 0.5*v5; + } + if (j < nlocal) { + ev.v[0] += 0.5*v0; + ev.v[1] += 0.5*v1; + ev.v[2] += 0.5*v2; + ev.v[3] += 0.5*v3; + ev.v[4] += 0.5*v4; + ev.v[5] += 0.5*v5; + } + } } - if ((NEWTON_PAIR || j < nlocal) && NEIGHFLAG != FULL) { - v_vatom(j,0) += 0.5*v0; - v_vatom(j,1) += 0.5*v1; - v_vatom(j,2) += 0.5*v2; - v_vatom(j,3) += 0.5*v3; - v_vatom(j,4) += 0.5*v4; - v_vatom(j,5) += 0.5*v5; + if (vflag_atom) { + + if (NEIGHFLAG == FULL || NEWTON_PAIR || i < nlocal) { + v_vatom(i,0) += 0.5*v0; + v_vatom(i,1) += 0.5*v1; + v_vatom(i,2) += 0.5*v2; + v_vatom(i,3) += 0.5*v3; + v_vatom(i,4) += 0.5*v4; + v_vatom(i,5) += 0.5*v5; + } + if (NEIGHFLAG != FULL && (NEWTON_PAIR || j < nlocal)) { + v_vatom(j,0) += 0.5*v0; + v_vatom(j,1) += 0.5*v1; + v_vatom(j,2) += 0.5*v2; + v_vatom(j,3) += 0.5*v3; + v_vatom(j,4) += 0.5*v4; + v_vatom(j,5) += 0.5*v5; + } } } } From afdc500379a0d7d7493a7405375d95cd91e6fbbd Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Fri, 3 Feb 2023 09:27:15 -0700 Subject: [PATCH 137/445] Small tweaks --- src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp index b6eb7ca859..4fd4bdea5a 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp @@ -437,6 +437,8 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne this->template operator()(TagPairLJCutDipoleCutKernel(), ii, ev); } +/* ---------------------------------------------------------------------- */ + template template KOKKOS_INLINE_FUNCTION @@ -448,7 +450,7 @@ void PairLJCutDipoleCutKokkos::ev_tally_xyz(EV_FLOAT & ev, int i, in Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (eflag_atom) { - const double epairhalf = 0.5 * epair; + const E_FLOAT epairhalf = 0.5 * epair; if (NEIGHFLAG == FULL || newton_pair || i < nlocal) v_eatom[i] += epairhalf; if (NEIGHFLAG != FULL && (newton_pair || j < nlocal)) @@ -456,12 +458,12 @@ void PairLJCutDipoleCutKokkos::ev_tally_xyz(EV_FLOAT & ev, int i, in } if (vflag_either) { - const E_FLOAT v0 = delx*fx; - const E_FLOAT v1 = dely*fy; - const E_FLOAT v2 = delz*fz; - const E_FLOAT v3 = delx*fy; - const E_FLOAT v4 = delx*fz; - const E_FLOAT v5 = dely*fz; + const F_FLOAT v0 = delx*fx; + const F_FLOAT v1 = dely*fy; + const F_FLOAT v2 = delz*fz; + const F_FLOAT v3 = delx*fy; + const F_FLOAT v4 = delx*fz; + const F_FLOAT v5 = dely*fz; if (vflag_global) { if (NEIGHFLAG == FULL || NEWTON_PAIR) { // neighf full or half, newton on From 9520be6aae174831afc3e69e3827d39af3027de2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Feb 2023 11:39:50 -0500 Subject: [PATCH 138/445] update versions strings for the next feature release --- doc/lammps.1 | 4 ++-- doc/src/Build_extras.rst | 2 +- doc/src/Commands_removed.rst | 4 ++-- doc/src/Fortran.rst | 8 ++++---- doc/src/Packages_details.rst | 4 ++-- doc/src/angle_lepton.rst | 2 +- doc/src/angle_write.rst | 2 +- doc/src/bond_lepton.rst | 2 +- doc/src/compute_efield_wolf_atom.rst | 2 +- doc/src/dihedral_lepton.rst | 2 +- doc/src/dihedral_write.rst | 2 +- doc/src/fix_nvt_sllod.rst | 2 +- doc/src/min_modify.rst | 2 +- doc/src/pair_amoeba.rst | 2 +- doc/src/pair_lepton.rst | 2 +- src/library.cpp | 6 +++--- src/version.h | 2 +- 17 files changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/lammps.1 b/doc/lammps.1 index ed0eecddd0..e4f6c61477 100644 --- a/doc/lammps.1 +++ b/doc/lammps.1 @@ -1,7 +1,7 @@ -.TH LAMMPS "1" "22 December 2022" "2022-12-22" +.TH LAMMPS "1" "8 February 2023" "2023-02-08" .SH NAME .B LAMMPS -\- Molecular Dynamics Simulator. Version 22 December 2022 +\- Molecular Dynamics Simulator. Version 8 February 2023 .SH SYNOPSIS .B lmp diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 659d185e18..f28a7eb1fe 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -1359,7 +1359,7 @@ module included in the LAMMPS source distribution. auto-generated consistent with those used in the core LAMMPS makefiles. - .. versionchanged:: TBD + .. versionchanged:: 8Feb2023 Please note that Colvars uses the Lepton library, which is now included with the LEPTON package; if you use anything other than diff --git a/doc/src/Commands_removed.rst b/doc/src/Commands_removed.rst index 5e71900176..06b0303037 100644 --- a/doc/src/Commands_removed.rst +++ b/doc/src/Commands_removed.rst @@ -53,7 +53,7 @@ coexist with the Fortran version. Minimize style fire/old ----------------------- -.. deprecated:: TBD +.. deprecated:: 8Feb2023 Minimize style *fire/old* has been removed. Its functionality can be reproduced with *fire* with specific options. Please see the @@ -62,7 +62,7 @@ reproduced with *fire* with specific options. Please see the Pair style mesont/tpm, compute style mesont, atom style mesont -------------------------------------------------------------- -.. deprecated:: TBD +.. deprecated:: 8Feb2023 Pair style *mesont/tpm*, compute style *mesont*, and atom style *mesont* have been removed from the :ref:`MESONT package `. diff --git a/doc/src/Fortran.rst b/doc/src/Fortran.rst index 2daa7b0734..b195721598 100644 --- a/doc/src/Fortran.rst +++ b/doc/src/Fortran.rst @@ -56,7 +56,7 @@ C++ in the ``examples/COUPLE/simple`` folder of the LAMMPS distribution. and Ubuntu 18.04 LTS and not compatible. Either newer compilers need to be installed or the Linux updated. -.. versionchanged:: TBD +.. versionchanged:: 8Feb2023 .. note:: @@ -1551,7 +1551,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type Gather type and constituent atom information for all angles. - .. versionadded:: TBD + .. versionadded:: 8Feb2023 This function copies the list of all angles into an allocatable array. The array will be filled with (angle type, angle atom 1, angle atom 2, angle atom 3) @@ -1638,7 +1638,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type Gather type and constituent atom information for all dihedrals. - .. versionadded:: TBD + .. versionadded:: 8Feb2023 This function copies the list of all dihedrals into an allocatable array. The array will be filled with (dihedral type, dihedral atom 1, dihedral atom 2, @@ -1684,7 +1684,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type Gather type and constituent atom information for all impropers. - .. versionadded:: TBD + .. versionadded:: 8Feb2023 This function copies the list of all impropers into an allocatable array. The array will be filled with (improper type, improper atom 1, improper atom 2, diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index 1944e87193..74b4eacf8f 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -1414,7 +1414,7 @@ more precise than what can be done with :ref:`tabulated potentials **Authors:** Axel Kohlmeyer (Temple U). Lepton itself is developed by Peter Eastman at Stanford University. -.. versionadded:: TBD +.. versionadded:: 8Feb2023 **Install:** @@ -1651,7 +1651,7 @@ server when the package is installed for the first time. Maxim V. Shugaev (University of Virginia), Alexey N. Volkov (University of Alabama), Leonid V. Zhigilei (University of Virginia) -.. deprecated:: TBD +.. deprecated:: 8Feb2023 **Author of the C++ styles:** Philipp Kloza (U Cambridge) diff --git a/doc/src/angle_lepton.rst b/doc/src/angle_lepton.rst index ea948c6a5f..20fa5b1fee 100644 --- a/doc/src/angle_lepton.rst +++ b/doc/src/angle_lepton.rst @@ -27,7 +27,7 @@ Examples Description """"""""""" -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Angle style *lepton* computes angular interactions between three atoms with a custom potential function. The potential function must be diff --git a/doc/src/angle_write.rst b/doc/src/angle_write.rst index 1541a7120a..702553bcd9 100644 --- a/doc/src/angle_write.rst +++ b/doc/src/angle_write.rst @@ -26,7 +26,7 @@ Examples Description """"""""""" -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Write energy and force values to a file as a function of angle for the currently defined angle potential. Force in this context means the diff --git a/doc/src/bond_lepton.rst b/doc/src/bond_lepton.rst index 91f040e183..adfd30627d 100644 --- a/doc/src/bond_lepton.rst +++ b/doc/src/bond_lepton.rst @@ -27,7 +27,7 @@ Examples Description """"""""""" -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Bond style *lepton* computes bonded interactions between two atoms with a custom function. The potential function must be provided as an diff --git a/doc/src/compute_efield_wolf_atom.rst b/doc/src/compute_efield_wolf_atom.rst index 45ec123ebb..1a709dc9f2 100644 --- a/doc/src/compute_efield_wolf_atom.rst +++ b/doc/src/compute_efield_wolf_atom.rst @@ -32,7 +32,7 @@ Examples Description """"""""""" -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Define a computation that approximates the electric field at each atom in a group. diff --git a/doc/src/dihedral_lepton.rst b/doc/src/dihedral_lepton.rst index e030c3b7c4..593377f297 100644 --- a/doc/src/dihedral_lepton.rst +++ b/doc/src/dihedral_lepton.rst @@ -28,7 +28,7 @@ Examples Description """"""""""" -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Dihedral style *lepton* computes dihedral interactions between four atoms forming a dihedral angle with a custom potential function. The diff --git a/doc/src/dihedral_write.rst b/doc/src/dihedral_write.rst index 94fa3da0fa..9b87d66eda 100644 --- a/doc/src/dihedral_write.rst +++ b/doc/src/dihedral_write.rst @@ -26,7 +26,7 @@ Examples Description """"""""""" -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Write energy and force values to a file as a function of the dihedral angle for the currently defined dihedral potential. Force in this diff --git a/doc/src/fix_nvt_sllod.rst b/doc/src/fix_nvt_sllod.rst index c9676e1c8b..48d0bb5946 100644 --- a/doc/src/fix_nvt_sllod.rst +++ b/doc/src/fix_nvt_sllod.rst @@ -75,7 +75,7 @@ Morriss) `. They were later shown to generate the desired velocity gradient and the correct production of work by stresses for all forms of homogeneous flow by :ref:`(Daivis and Todd) `. -.. versionchanged:: TBD +.. versionchanged:: 8Feb2023 For the default (*psllod* = *no*), the LAMMPS implementation adheres to the standard SLLOD equations of motion, as defined by :ref:`(Evans and diff --git a/doc/src/min_modify.rst b/doc/src/min_modify.rst index aee9a78696..f4a706e75c 100644 --- a/doc/src/min_modify.rst +++ b/doc/src/min_modify.rst @@ -152,7 +152,7 @@ reached your minimization criteria. This could happen when the system comes to be stuck in a local basin of the phase space. *vdfmax* is the maximum number of consecutive iterations with P(t) < 0. -.. versionadded:: TBD +.. versionadded:: 8Feb2023 The *abcfire* keyword allows to activate the ABC-FIRE variant of the *fire* minimization algorithm. ABC-FIRE introduces an additional factor diff --git a/doc/src/pair_amoeba.rst b/doc/src/pair_amoeba.rst index 6ef92a6938..a7f19ba91e 100644 --- a/doc/src/pair_amoeba.rst +++ b/doc/src/pair_amoeba.rst @@ -134,7 +134,7 @@ version discussed in :ref:`(Ponder) `, :ref:`(Ren) implementation of HIPPO in LAMMPS matches the version discussed in :ref:`(Rackers) `. -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Accelerator support via the GPU package is available. diff --git a/doc/src/pair_lepton.rst b/doc/src/pair_lepton.rst index 34e7b20107..dbe3d74588 100644 --- a/doc/src/pair_lepton.rst +++ b/doc/src/pair_lepton.rst @@ -51,7 +51,7 @@ Examples Description """"""""""" -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Pair styles *lepton* and *lepton/coul* compute pairwise interactions between particles which depend solely on the distance and have a cutoff. diff --git a/src/library.cpp b/src/library.cpp index 3d4d2b5102..1214885cd3 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -3177,7 +3177,7 @@ When running in parallel, the data buffer must be allocated on **all** MPI ranks and will be filled with the information for **all** angles in the system. -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Below is a brief C code demonstrating accessing this collected angle information. @@ -3288,7 +3288,7 @@ When running in parallel, the data buffer must be allocated on **all** MPI ranks and will be filled with the information for **all** dihedrals in the system. -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Below is a brief C code demonstrating accessing this collected dihedral information. @@ -3399,7 +3399,7 @@ When running in parallel, the data buffer must be allocated on **all** MPI ranks and will be filled with the information for **all** impropers in the system. -.. versionadded:: TBD +.. versionadded:: 8Feb2023 Below is a brief C code demonstrating accessing this collected improper information. diff --git a/src/version.h b/src/version.h index d05bfe6f29..ab4c21ece9 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "22 Dec 2022" +#define LAMMPS_VERSION "8 Feb 2023" From e28ff8a8aa84c4e9746132ff007ee5df2f47f324 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Fri, 3 Feb 2023 09:59:24 -0700 Subject: [PATCH 139/445] Fix bug in full logic --- src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp | 55 ++++++++++++-------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp index 4fd4bdea5a..c7532b27ab 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp @@ -466,30 +466,39 @@ void PairLJCutDipoleCutKokkos::ev_tally_xyz(EV_FLOAT & ev, int i, in const F_FLOAT v5 = dely*fz; if (vflag_global) { - if (NEIGHFLAG == FULL || NEWTON_PAIR) { // neighf full or half, newton on - ev.v[0] += v0; - ev.v[1] += v1; - ev.v[2] += v2; - ev.v[3] += v3; - ev.v[4] += v4; - ev.v[5] += v5; - } else { // neigh half, newton off - if (i < nlocal) { - ev.v[0] += 0.5*v0; - ev.v[1] += 0.5*v1; - ev.v[2] += 0.5*v2; - ev.v[3] += 0.5*v3; - ev.v[4] += 0.5*v4; - ev.v[5] += 0.5*v5; - } - if (j < nlocal) { - ev.v[0] += 0.5*v0; - ev.v[1] += 0.5*v1; - ev.v[2] += 0.5*v2; - ev.v[3] += 0.5*v3; - ev.v[4] += 0.5*v4; - ev.v[5] += 0.5*v5; + if (NEIGHFLAG != FULL) { + if (NEWTON_PAIR) { // neigh half, newton on + ev.v[0] += v0; + ev.v[1] += v1; + ev.v[2] += v2; + ev.v[3] += v3; + ev.v[4] += v4; + ev.v[5] += v5; + } else { // neigh half, newton off + if (i < nlocal) { + ev.v[0] += 0.5*v0; + ev.v[1] += 0.5*v1; + ev.v[2] += 0.5*v2; + ev.v[3] += 0.5*v3; + ev.v[4] += 0.5*v4; + ev.v[5] += 0.5*v5; + } + if (j < nlocal) { + ev.v[0] += 0.5*v0; + ev.v[1] += 0.5*v1; + ev.v[2] += 0.5*v2; + ev.v[3] += 0.5*v3; + ev.v[4] += 0.5*v4; + ev.v[5] += 0.5*v5; + } } + } else { //neigh full + ev.v[0] += 0.5*v0; + ev.v[1] += 0.5*v1; + ev.v[2] += 0.5*v2; + ev.v[3] += 0.5*v3; + ev.v[4] += 0.5*v4; + ev.v[5] += 0.5*v5; } } From 6707ab61823b4c2ce41cda6b328dde0202e18413 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Feb 2023 20:23:41 -0500 Subject: [PATCH 140/445] avoid illegal memory access in destructor after variables have been deleted --- src/variable.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/variable.cpp b/src/variable.cpp index 4285acfb05..134d80af11 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -1213,6 +1213,9 @@ void Variable::remove(int n) dvalue[i-1] = dvalue[i]; } nvar--; + data[nvar] = nullptr; + reader[nvar] = nullptr; + names[nvar] = nullptr; } /* ---------------------------------------------------------------------- From 5ace12e3efce6f8c008580934c01cf55b72034e0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Feb 2023 20:35:47 -0500 Subject: [PATCH 141/445] nullify freed pointers in list of dump data --- src/output.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/output.cpp b/src/output.cpp index ed6ccd11e1..497957f46b 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -828,6 +828,8 @@ void Output::delete_dump(const std::string &id) ivar_dump[i-1] = ivar_dump[i]; } ndump--; + dump[ndump] = nullptr; + var_dump[ndump] = nullptr; dump_list = std::vector(dump, dump + ndump); } From d1550bf9f6940dd2ecb9360abe0b80d1be99aa1c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 4 Feb 2023 18:03:30 -0500 Subject: [PATCH 142/445] starting grammar, punctuation, and spelling review for developer info sections --- doc/src/Developer_code_design.rst | 241 +++++++++++++++--------------- doc/src/Developer_comm_ops.rst | 16 +- doc/src/Developer_flow.rst | 47 +++--- doc/src/Developer_grid.rst | 6 +- doc/src/Developer_org.rst | 151 ++++++++++--------- doc/src/Developer_par_comm.rst | 16 +- doc/src/Developer_par_long.rst | 60 ++++---- doc/src/Developer_par_neigh.rst | 52 +++---- doc/src/Developer_par_openmp.rst | 38 ++--- doc/src/Developer_par_part.rst | 62 ++++---- doc/src/Library.rst | 4 +- doc/src/Tools.rst | 2 +- doc/src/fix_rigid.rst | 24 +-- doc/src/prd.rst | 2 +- src/pointers.h | 2 +- 15 files changed, 366 insertions(+), 357 deletions(-) diff --git a/doc/src/Developer_code_design.rst b/doc/src/Developer_code_design.rst index 786bd51c26..844dbd0512 100644 --- a/doc/src/Developer_code_design.rst +++ b/doc/src/Developer_code_design.rst @@ -1,52 +1,53 @@ Code design ----------- -This section explains some of the code design choices in LAMMPS with -the goal of helping developers write new code similar to the existing -code. Please see the section on :doc:`Requirements for contributed -code ` for more specific recommendations and guidelines. -While that section is organized more in the form of a checklist for -code contributors, the focus here is on overall code design strategy, -choices made between possible alternatives, and discussing some -relevant C++ programming language constructs. +This section explains some code design choices in LAMMPS with the goal +of helping developers write new code similar to the existing code. +Please see the section on :doc:`Requirements for contributed code +` for more specific recommendations and guidelines. While +that section is organized more in the form of a checklist for code +contributors, the focus here is on overall code design strategy, choices +made between possible alternatives, and discussing some relevant C++ +programming language constructs. Historically, the basic design philosophy of the LAMMPS C++ code was a "C with classes" style. The motivation was to make it easy to modify -LAMMPS for people without significant training in C++ programming. -Data structures and code constructs were used that resemble the -previous implementation(s) in Fortran. A contributing factor to this -choice also was that at the time, C++ compilers were often not mature -and some of the advanced features contained bugs or did not function -as the standard required. There were also disagreements between -compiler vendors as to how to interpret the C++ standard documents. +LAMMPS for people without significant training in C++ programming. Data +structures and code constructs were used that resemble the previous +implementation(s) in Fortran. A contributing factor to this choice was +that at the time, C++ compilers were often not mature and some advanced +features contained bugs or did not function as the standard required. +There were also disagreements between compiler vendors as to how to +interpret the C++ standard documents. -However, C++ compilers have now advanced significantly. In 2020 we -decided to to require the C++11 standard as the minimum C++ language -standard for LAMMPS. Since then we have begun to also replace some of -the C-style constructs with equivalent C++ functionality, either from -the C++ standard library or as custom classes or functions, in order -to improve readability of the code and to increase code reuse through -abstraction of commonly used functionality. +However, C++ compilers and the C++ programming language have advanced +significantly. In 2020, the LAMMPS developers decided to require the +C++11 standard as the minimum C++ language standard for LAMMPS. Since +then, we have begun to replace C-style constructs with equivalent C++ +functionality. This was taken either from the C++ standard library or +implemented as custom classes or functions. The goal is to improve +readability of the code and to increase code reuse through abstraction +of commonly used functionality. .. note:: - Please note that as of spring 2022 there is still a sizable chunk - of legacy code in LAMMPS that has not yet been refactored to - reflect these style conventions in full. LAMMPS has a large code - base and many different contributors and there also is a hierarchy - of precedence in which the code is adapted. Highest priority has - been the code in the ``src`` folder, followed by code in packages - in order of their popularity and complexity (simpler code is - adapted sooner), followed by code in the ``lib`` folder. Source - code that is downloaded from external packages or libraries during - compilation is not subject to the conventions discussed here. + Please note that as of spring 2023 there is still a sizable chunk of + legacy code in LAMMPS that has not yet been refactored to reflect + these style conventions in full. LAMMPS has a large code base and + many contributors. There is also a hierarchy of precedence in which + the code is adapted. Highest priority has been the code in the + ``src`` folder, followed by code in packages in order of their + popularity and complexity (simpler code gets adapted sooner), followed + by code in the ``lib`` folder. Source code that is downloaded from + external packages or libraries during compilation is not subject to + the conventions discussed here. -Object oriented code +Object-oriented code ^^^^^^^^^^^^^^^^^^^^ -LAMMPS is designed to be an object oriented code. Each simulation is +LAMMPS is designed to be an object-oriented code. Each simulation is represented by an instance of the LAMMPS class. When running in -parallel each MPI process creates such an instance. This can be seen +parallel, each MPI process creates such an instance. This can be seen in the ``main.cpp`` file where the core steps of running a LAMMPS simulation are the following 3 lines of code: @@ -67,14 +68,14 @@ other special features. The basic LAMMPS class hierarchy which is created by the LAMMPS class constructor is shown in :ref:`class-topology`. When input commands are processed, additional class instances are created, or deleted, or -replaced. Likewise specific member functions of specific classes are +replaced. Likewise, specific member functions of specific classes are called to trigger actions such creating atoms, computing forces, computing properties, time-propagating the system, or writing output. Compositing and Inheritance =========================== -LAMMPS makes extensive use of the object oriented programming (OOP) +LAMMPS makes extensive use of the object-oriented programming (OOP) principles of *compositing* and *inheritance*. Classes like the ``LAMMPS`` class are a **composite** containing pointers to instances of other classes like ``Atom``, ``Comm``, ``Force``, ``Neighbor``, @@ -83,7 +84,7 @@ functionality by storing and manipulating data related to the simulation and providing member functions that trigger certain actions. Some of those classes like ``Force`` are themselves composites, containing instances of classes describing different force -interactions. Similarly the ``Modify`` class contains a list of +interactions. Similarly, the ``Modify`` class contains a list of ``Fix`` and ``Compute`` classes. If the input commands that correspond to these classes include the word *style*, then LAMMPS stores only a single instance of that class. E.g. *atom_style*, @@ -100,19 +101,18 @@ derived class variant was instantiated. In LAMMPS these derived classes are often referred to as "styles", e.g. pair styles, fix styles, atom styles and so on. -This is the origin of the flexibility of LAMMPS. For example pair +This is the origin of the flexibility of LAMMPS. For example, pair styles implement a variety of different non-bonded interatomic potentials functions. All details for the implementation of a potential are stored and executed in a single class. As mentioned above, there can be multiple instances of classes derived from the ``Fix`` or ``Compute`` base classes. They represent a -different facet of LAMMPS flexibility as they provide methods which -can be called at different points in time within a timestep, as -explained in `Developer_flow`. This allows the input script to tailor -how a specific simulation is run, what diagnostic computations are -performed, and how the output of those computations is further -processed or output. +different facet of LAMMPS' flexibility, as they provide methods which +can be called at different points within a timestep, as explained in +`Developer_flow`. This allows the input script to tailor how a specific +simulation is run, what diagnostic computations are performed, and how +the output of those computations is further processed or output. Additional code sharing is possible by creating derived classes from the derived classes (e.g., to implement an accelerated version of a pair @@ -164,15 +164,15 @@ The difference in behavior of the ``normal()`` and the ``poly()`` member functions is which of the two member functions is called when executing `base1->call()` versus `base2->call()`. Without polymorphism, a function within the base class can only call member functions within the -same scope, that is ``Base::call()`` will always call -``Base::normal()``. But for the `base2->call()` case the call of the +same scope: that is, ``Base::call()`` will always call +``Base::normal()``. But for the `base2->call()` case, the call of the virtual member function will be dispatched to ``Derived::poly()`` -instead. This mechanism means that functions are called within the -scope of the class type that was used to *create* the class instance are -invoked; even if they are assigned to a pointer using the type of a base -class. This is the desired behavior and this way LAMMPS can even use -styles that are loaded at runtime from a shared object file with the -:doc:`plugin command `. +instead. This mechanism results in calling functions that are within +the scope of the class that was used to *create* the instance, even if +they are assigned to a pointer for their base class. This is the +desired behavior, and this way LAMMPS can even use styles that are loaded +at runtime from a shared object file with the :doc:`plugin command +`. A special case of virtual functions are so-called pure functions. These are virtual functions that are initialized to 0 in the class declaration @@ -189,12 +189,12 @@ This has the effect that an instance of the base class cannot be created and that derived classes **must** implement these functions. Many of the functions listed with the various class styles in the section :doc:`Modify` are pure functions. The motivation for this is -to define the interface or API of the functions but defer their +to define the interface or API of the functions, but defer their implementation to the derived classes. However, there are downsides to this. For example, calls to virtual -functions from within a constructor, will not be in the scope of the -derived class and thus it is good practice to either avoid calling them +functions from within a constructor, will *not* be in the scope of the +derived class, and thus it is good practice to either avoid calling them or to provide an explicit scope such as ``Base::poly()`` or ``Derived::poly()``. Furthermore, any destructors in classes containing virtual functions should be declared virtual too, so they will be @@ -208,8 +208,8 @@ dispatch. that are intended to replace a virtual or pure function use the ``override`` property keyword. For the same reason, the use of overloads or default arguments for virtual functions should be - avoided as they lead to confusion over which function is supposed to - override which and which arguments need to be declared. + avoided, as they lead to confusion over which function is supposed to + override which, and which arguments need to be declared. Style Factories =============== @@ -219,10 +219,10 @@ uses a programming pattern called `Factory`. Those are functions that create an instance of a specific derived class, say ``PairLJCut`` and return a pointer to the type of the common base class of that style, ``Pair`` in this case. To associate the factory function with the -style keyword, an ``std::map`` class is used with function pointers +style keyword, a ``std::map`` class is used with function pointers indexed by their keyword (for example "lj/cut" for ``PairLJCut`` and "morse" for ``PairMorse``). A couple of typedefs help keep the code -readable and a template function is used to implement the actual +readable, and a template function is used to implement the actual factory functions for the individual classes. Below is an example of such a factory function from the ``Force`` class as declared in ``force.h`` and implemented in ``force.cpp``. The file ``style_pair.h`` @@ -279,26 +279,26 @@ from and writing to files and console instead of C++ "iostreams". This is mainly motivated by better performance, better control over formatting, and less effort to achieve specific formatting. -Since mixing "stdio" and "iostreams" can lead to unexpected -behavior. use of the latter is strongly discouraged. Also output to -the screen should not use the predefined ``stdout`` FILE pointer, but -rather the ``screen`` and ``logfile`` FILE pointers managed by the -LAMMPS class. Furthermore, output should generally only be done by -MPI rank 0 (``comm->me == 0``). Output that is sent to both -``screen`` and ``logfile`` should use the :cpp:func:`utils::logmesg() -convenience function `. +Since mixing "stdio" and "iostreams" can lead to unexpected behavior, +use of the latter is strongly discouraged. Output to the screen should +*not* use the predefined ``stdout`` FILE pointer, but rather the +``screen`` and ``logfile`` FILE pointers managed by the LAMMPS class. +Furthermore, output should generally only be done by MPI rank 0 +(``comm->me == 0``). Output that is sent to both ``screen`` and +``logfile`` should use the :cpp:func:`utils::logmesg() convenience +function `. -We also discourage the use of stringstreams because the bundled {fmt} -library and the customized tokenizer classes can provide the same -functionality in a cleaner way with better performance. This also -helps maintain a consistent programming syntax with code from many -different contributors. +We discourage the use of stringstreams because the bundled {fmt} library +and the customized tokenizer classes provide the same functionality in a +cleaner way with better performance. This also helps maintain a +consistent programming syntax with code from many different +contributors. Formatting with the {fmt} library =================================== The LAMMPS source code includes a copy of the `{fmt} library -`_ which is preferred over formatting with the +`_, which is preferred over formatting with the "printf()" family of functions. The primary reason is that it allows a typesafe default format for any type of supported data. This is particularly useful for formatting integers of a given size (32-bit or @@ -313,17 +313,16 @@ been included into the C++20 language standard, so changes to adopt it are future-proof. Formatted strings are frequently created by calling the -``fmt::format()`` function which will return a string as a -``std::string`` class instance. In contrast to the ``%`` placeholder -in ``printf()``, the {fmt} library uses ``{}`` to embed format -descriptors. In the simplest case, no additional characters are -needed as {fmt} will choose the default format based on the data type -of the argument. Otherwise the ``fmt::print()`` function may be -used instead of ``printf()`` or ``fprintf()``. In addition, several -LAMMPS output functions, that originally accepted a single string as -argument have been overloaded to accept a format string with optional -arguments as well (e.g., ``Error::all()``, ``Error::one()``, -``utils::logmesg()``). +``fmt::format()`` function, which will return a string as a +``std::string`` class instance. In contrast to the ``%`` placeholder in +``printf()``, the {fmt} library uses ``{}`` to embed format descriptors. +In the simplest case, no additional characters are needed, as {fmt} will +choose the default format based on the data type of the argument. +Otherwise, the ``fmt::print()`` function may be used instead of +``printf()`` or ``fprintf()``. In addition, several LAMMPS output +functions, that originally accepted a single string as argument have +been overloaded to accept a format string with optional arguments as +well (e.g., ``Error::all()``, ``Error::one()``, ``utils::logmesg()``). Summary of the {fmt} format syntax ================================== @@ -332,10 +331,11 @@ The syntax of the format string is "{[][:]}", where either the argument id or the format spec (separated by a colon ':') is optional. The argument id is usually a number starting from 0 that is the index to the arguments following the format string. By -default these are assigned in order (i.e. 0, 1, 2, 3, 4 etc.). The most -common case for using argument id would be to use the same argument in -multiple places in the format string without having to provide it as an -argument multiple times. In LAMMPS the argument id is rarely used. +default, these are assigned in order (i.e. 0, 1, 2, 3, 4 etc.). The +most common case for using argument id would be to use the same argument +in multiple places in the format string without having to provide it as +an argument multiple times. The argument id is rarely used in the LAMMPS +source code. More common is the use of a format specifier, which starts with a colon. This may optionally be followed by a fill character (default is ' '). If @@ -347,18 +347,19 @@ width, which may be followed by a dot '.' and a precision for floating point numbers. The final character in the format string would be an indicator for the "presentation", i.e. 'd' for decimal presentation of integers, 'x' for hexadecimal, 'o' for octal, 'c' for character etc. -This mostly follows the "printf()" scheme but without requiring an +This mostly follows the "printf()" scheme, but without requiring an additional length parameter to distinguish between different integer widths. The {fmt} library will detect those and adapt the formatting accordingly. For floating point numbers there are correspondingly, 'g' for generic presentation, 'e' for exponential presentation, and 'f' for fixed point presentation. -Thus "{:8}" would represent *any* type argument using at least 8 -characters; "{:<8}" would do this as left aligned, "{:^8}" as centered, -"{:>8}" as right aligned. If a specific presentation is selected, the -argument type must be compatible or else the {fmt} formatting code will -throw an exception. Some format string examples are given below: +The format string "{:8}" would thus represent *any* type argument and be +replaced by at least 8 characters; "{:<8}" would do this as left +aligned, "{:^8}" as centered, "{:>8}" as right aligned. If a specific +presentation is selected, the argument type must be compatible or else +the {fmt} formatting code will throw an exception. Some format string +examples are given below: .. code-block:: c++ @@ -392,12 +393,12 @@ documentation `_ website. Memory management ^^^^^^^^^^^^^^^^^ -Dynamical allocation of small data and objects can be done with the -the C++ commands "new" and "delete/delete[]. Large data should use -the member functions of the ``Memory`` class, most commonly, -``Memory::create()``, ``Memory::grow()``, and ``Memory::destroy()``, -which provide variants for vectors, 2d arrays, 3d arrays, etc. -These can also be used for small data. +Dynamical allocation of small data and objects can be done with the C++ +commands "new" and "delete/delete[]". Large data should use the member +functions of the ``Memory`` class, most commonly, ``Memory::create()``, +``Memory::grow()``, and ``Memory::destroy()``, which provide variants +for vectors, 2d arrays, 3d arrays, etc. These can also be used for +small data. The use of ``malloc()``, ``calloc()``, ``realloc()`` and ``free()`` directly is strongly discouraged. To simplify adapting legacy code @@ -408,26 +409,24 @@ perform additional error checks for safety. Use of these custom memory allocation functions is motivated by the following considerations: -- memory allocation failures on *any* MPI rank during a parallel run - will trigger an immediate abort of the entire parallel calculation - instead of stalling it -- a failing "new" will trigger an exception which is also captured by - LAMMPS and triggers a global abort -- allocation of multi-dimensional arrays will be done in a C compatible - fashion but so that the storage of the actual data is stored in one - large contiguous block. Thus when MPI communication is needed, +- Memory allocation failures on *any* MPI rank during a parallel run + will trigger an immediate abort of the entire parallel calculation. +- A failing "new" will trigger an exception, which is also captured by + LAMMPS and triggers a global abort. +- Allocation of multidimensional arrays will be done in a C compatible + fashion, but such that the storage of the actual data is stored in one + large contiguous block. Thus, when MPI communication is needed, the data can be communicated directly (similar to Fortran arrays). -- the "destroy()" and "sfree()" functions may safely be called on NULL - pointers -- the "destroy()" functions will nullify the pointer variables making - "use after free" errors easy to detect -- it is possible to use a larger than default memory alignment (not on +- The "destroy()" and "sfree()" functions may safely be called on NULL + pointers. +- The "destroy()" functions will nullify the pointer variables, thus + making "use after free" errors easy to detect. +- It is possible to use a larger than default memory alignment (not on all operating systems, since the allocated storage pointers must be - compatible with ``free()`` for technical reasons) + compatible with ``free()`` for technical reasons). -In the practical implementation of code this means that any pointer -variables that are class members should be initialized to a -``nullptr`` value in their respective constructors. That way it is -safe to call ``Memory::destroy()`` or ``delete[]`` on them before -*any* allocation outside the constructor. This helps prevent memory -leaks. +In the practical implementation of code this means, that any pointer +variables, that are class members should be initialized to a ``nullptr`` +value in their respective constructors. That way, it is safe to call +``Memory::destroy()`` or ``delete[]`` on them before *any* allocation +outside the constructor. This helps prevent memory leaks. diff --git a/doc/src/Developer_comm_ops.rst b/doc/src/Developer_comm_ops.rst index 5eac8e46de..de09cbb260 100644 --- a/doc/src/Developer_comm_ops.rst +++ b/doc/src/Developer_comm_ops.rst @@ -28,7 +28,7 @@ The need to do this communication arises when data from the owned atoms is updated (e.g. their positions) and this updated information needs to be **copied** to the corresponding ghost atoms. -And second, *reverse communication* which sends ghost atom information +And second, *reverse communication*, which sends ghost atom information from each processor to the owning processor to **accumulate** (sum) the values with the corresponding owned atoms. The need for this arises when data is computed and also stored with ghost atoms @@ -58,7 +58,7 @@ embedded-atom method (EAM) which compute intermediate values in the first part of the compute() function that need to be stored by both owned and ghost atoms for the second part of the force computation. The *Comm* class methods perform the MPI communication for buffers of -per-atom data. They "call back" to the *Pair* class so it can *pack* +per-atom data. They "call back" to the *Pair* class, so it can *pack* or *unpack* the buffer with data the *Pair* class owns. There are 4 such methods that the *Pair* class must define, assuming it uses both forward and reverse communication: @@ -70,7 +70,7 @@ forward and reverse communication: The arguments to these methods include the buffer and a list of atoms to pack or unpack. The *Pair* class also must set the *comm_forward* -and *comm_reverse* variables which store the number of values stored +and *comm_reverse* variables, which store the number of values stored in the communication buffers for each operation. This means, if desired, it can choose to store multiple per-atom values in the buffer, and they will be communicated together to minimize @@ -81,11 +81,11 @@ containing ``double`` values. To correctly store integers that may be The *Fix*, *Compute*, and *Dump* classes can also invoke the same kind of forward and reverse communication operations using the same *Comm* -class methods. Likewise the same pack/unpack methods and +class methods. Likewise, the same pack/unpack methods and comm_forward/comm_reverse variables must be defined by the calling *Fix*, *Compute*, or *Dump* class. -For *Fix* classes there is an optional second argument to the +For *Fix* classes, there is an optional second argument to the *forward_comm()* and *reverse_comm()* call which can be used when the fix performs multiple modes of communication, with different numbers of values per atom. The fix should set the *comm_forward* and @@ -150,7 +150,7 @@ latter case, when the *ring* operation is complete, each processor can examine its original buffer to extract modified values. Note that the *ring* operation is similar to an MPI_Alltoall() -operation where every processor effectively sends and receives data to +operation, where every processor effectively sends and receives data to every other processor. The difference is that the *ring* operation does it one step at a time, so the total volume of data does not need to be stored by every processor. However, the *ring* operation is @@ -184,8 +184,8 @@ The *exchange_data()* method triggers the communication to be performed. Each processor provides the vector of *N* datums to send, and the size of each datum. All datums must be the same size. -The *create_atom()* and *exchange_atom()* methods are similar except -that the size of each datum can be different. Typically this is used +The *create_atom()* and *exchange_atom()* methods are similar, except +that the size of each datum can be different. Typically, this is used to communicate atoms, each with a variable amount of per-atom data, to other processors. diff --git a/doc/src/Developer_flow.rst b/doc/src/Developer_flow.rst index d582043492..115d6ee6ae 100644 --- a/doc/src/Developer_flow.rst +++ b/doc/src/Developer_flow.rst @@ -45,9 +45,9 @@ other methods in the class. zero before each timestep, so that forces (torques, etc) can be accumulated. -Now for the ``Verlet::run()`` method. Its basic structure in hi-level pseudo -code is shown below. In the actual code in ``src/verlet.cpp`` some of -these operations are conditionally invoked. +Now for the ``Verlet::run()`` method. Its basic structure in hi-level +pseudocode is shown below. In the actual code in ``src/verlet.cpp`` +some of these operations are conditionally invoked. .. code-block:: python @@ -105,17 +105,17 @@ need it. These flags are passed to the various methods that compute particle interactions, so that they either compute and tally the corresponding data or can skip the extra calculations if the energy and virial are not needed. See the comments for the ``Integrate::ev_set()`` -method which document the flag values. +method, which document the flag values. At various points of the timestep, fixes are invoked, e.g. ``fix->initial_integrate()``. In the code, this is actually done -via the Modify class which stores all the Fix objects and lists of which +via the Modify class, which stores all the Fix objects and lists of which should be invoked at what point in the timestep. Fixes are the LAMMPS mechanism for tailoring the operations of a timestep for a particular simulation. As described elsewhere, each fix has one or more methods, each of which is invoked at a specific stage of the timestep, as show in -the timestep pseudo-code. All the active fixes defined in an input -script, that are flagged to have an ``initial_integrate()`` method are +the timestep pseudocode. All the active fixes defined in an input +script, that are flagged to have an ``initial_integrate()`` method, are invoked at the beginning of each timestep. Examples are :doc:`fix nve ` or :doc:`fix nvt or fix npt ` which perform the start-of-timestep velocity-Verlet integration operations to update @@ -131,9 +131,9 @@ can be changed using the :doc:`neigh_modify every/delay/check ` command. If not, coordinates of ghost atoms are acquired by each processor via the ``forward_comm()`` method of the Comm class. If neighbor lists need to be built, several operations within -the inner if clause of the pseudo-code are first invoked. The +the inner if clause of the pseudocode are first invoked. The ``pre_exchange()`` method of any defined fixes is invoked first. -Typically this inserts or deletes particles from the system. +Typically, this inserts or deletes particles from the system. Periodic boundary conditions are then applied by the Domain class via its ``pbc()`` method to remap particles that have moved outside the @@ -148,7 +148,7 @@ The box boundaries are then reset (if needed) via the ``reset_box()`` method of the Domain class, e.g. if box boundaries are shrink-wrapped to current particle coordinates. A change in the box size or shape requires internal information for communicating ghost atoms (Comm class) -and neighbor list bins (Neighbor class) be updated. The ``setup()`` +and neighbor list bins (Neighbor class) to be updated. The ``setup()`` method of the Comm class and ``setup_bins()`` method of the Neighbor class perform the update. @@ -217,20 +217,21 @@ file, and restart files. See the :doc:`thermo_style `, :doc:`dump `, and :doc:`restart ` commands for more details. -The the flow of control during energy minimization iterations is -similar to that of a molecular dynamics timestep. Forces are computed, -neighbor lists are built as needed, atoms migrate to new processors, and -atom coordinates and forces are communicated to neighboring processors. -The only difference is what Fix class operations are invoked when. Only -a subset of LAMMPS fixes are useful during energy minimization, as +The flow of control during energy minimization iterations is similar to +that of a molecular dynamics timestep. Forces are computed, neighbor +lists are built as needed, atoms migrate to new processors, and atom +coordinates and forces are communicated to neighboring processors. The +only difference is what Fix class operations are invoked when. Only a +subset of LAMMPS fixes are useful during energy minimization, as explained in their individual doc pages. The relevant Fix class methods -are ``min_pre_exchange()``, ``min_pre_force()``, and ``min_post_force()``. -Each fix is invoked at the appropriate place within the minimization -iteration. For example, the ``min_post_force()`` method is analogous to -the ``post_force()`` method for dynamics; it is used to alter or constrain -forces on each atom, which affects the minimization procedure. +are ``min_pre_exchange()``, ``min_pre_force()``, and +``min_post_force()``. Each fix is invoked at the appropriate place +within the minimization iteration. For example, the +``min_post_force()`` method is analogous to the ``post_force()`` method +for dynamics; it is used to alter or constrain forces on each atom, +which affects the minimization procedure. -After all iterations are completed there is a ``cleanup`` step which +After all iterations are completed, there is a ``cleanup`` step which calls the ``post_run()`` method of fixes to perform operations only required -at the end of a calculations (like freeing temporary storage or creating +at the end of a calculation (like freeing temporary storage or creating final outputs). diff --git a/doc/src/Developer_grid.rst b/doc/src/Developer_grid.rst index 8adf36d6f4..cd6d8d12ab 100644 --- a/doc/src/Developer_grid.rst +++ b/doc/src/Developer_grid.rst @@ -70,7 +70,7 @@ A command can define multiple grids, each of a different size. Each grid is an instantiation of the Grid2d or Grid3d class. The command also defines what data it will store for each grid it -creates and it allocates the multi-dimensional array(s) needed to +creates and it allocates the multidimensional array(s) needed to store the data. No grid cell data is stored within the Grid2d or Grid3d classes. @@ -115,7 +115,7 @@ which stores *Nvalues* per grid cell. nyhi_out, nxlo_out, nxhi_out, nvalues, "data3d_multi"); -Note that these multi-dimensional arrays are allocated as contiguous +Note that these multidimensional arrays are allocated as contiguous chunks of memory where the x-index of the grid varies fastest, then y, and the z-index slowest. For multiple values per grid cell, the Nvalues are contiguous, so their index varies even faster than the @@ -798,7 +798,7 @@ A value of -1 is returned if the data name is not recognized. The *get_griddata_by_index()* method is called after the *get_griddata_by_name()* method, using the data index it returned as its argument. This method will return a pointer to the -multi-dimensional array which stores the requested data. +multidimensional array which stores the requested data. As in the discussion above of the Memory class *create_offset()* methods, the dimensionality of the array associated with the returned diff --git a/doc/src/Developer_org.rst b/doc/src/Developer_org.rst index 563dae7b69..f1804655ae 100644 --- a/doc/src/Developer_org.rst +++ b/doc/src/Developer_org.rst @@ -15,7 +15,7 @@ for more information about that part of the build process. LAMMPS currently supports building with :doc:`conventional makefiles ` and through :doc:`CMake `. Those procedures differ in how packages are enabled or disabled for inclusion into a -LAMMPS binary so they cannot be mixed. The source files for each +LAMMPS binary, so they cannot be mixed. The source files for each package are in all-uppercase subdirectories of the ``src`` folder, for example ``src/MOLECULE`` or ``src/EXTRA-MOLECULE``. The ``src/STUBS`` subdirectory is not a package but contains a dummy MPI library, that is @@ -26,31 +26,31 @@ with traditional makefiles. The ``lib`` directory contains the source code for several supporting libraries or files with configuration settings to use globally installed -libraries, that are required by some of the optional packages. They may +libraries, that are required by some optional packages. They may include python scripts that can transparently download additional source code on request. Each subdirectory, like ``lib/poems`` or ``lib/gpu``, contains the source files, some of which are in different languages such -as Fortran or CUDA. These libraries included in the LAMMPS build, -if the corresponding package is installed. +as Fortran or CUDA. These libraries included in the LAMMPS build, if the +corresponding package is installed. LAMMPS C++ source files almost always come in pairs, such as ``src/run.cpp`` (implementation file) and ``src/run.h`` (header file). Each pair of files defines a C++ class, for example the -:cpp:class:`LAMMPS_NS::Run` class which contains the code invoked by the -:doc:`run ` command in a LAMMPS input script. As this example +:cpp:class:`LAMMPS_NS::Run` class, which contains the code invoked by +the :doc:`run ` command in a LAMMPS input script. As this example illustrates, source file and class names often have a one-to-one correspondence with a command used in a LAMMPS input script. Some source files and classes do not have a corresponding input script -command, e.g. ``src/force.cpp`` and the :cpp:class:`LAMMPS_NS::Force` +command, for example ``src/force.cpp`` and the :cpp:class:`LAMMPS_NS::Force` class. They are discussed in the next section. The names of all source files are in lower case and may use the -underscore character '_' to separate words. Outside of bundled libraries -which may have different conventions, all C and C++ header files have a -``.h`` extension, all C++ files have a ``.cpp`` extension, and C files a -``.c`` extension. A small number of C++ classes and utility functions -are implemented with only a ``.h`` file. Examples are the Pointers and -Commands classes or the MathVec functions. +underscore character '_' to separate words. Apart from bundled, +externally maintained libraries, which may have different conventions, +all C and C++ header files have a ``.h`` extension, all C++ files have a +``.cpp`` extension, and C files a ``.c`` extension. A few C++ classes +and utility functions are implemented with only a ``.h`` file. Examples +are the Pointers and Commands classes or the MathVec functions. Class topology -------------- @@ -62,35 +62,36 @@ associated source files in the ``src`` folder, for example the class :cpp:class:`LAMMPS_NS::Memory` corresponds to the files ``memory.cpp`` and ``memory.h``, or the class :cpp:class:`LAMMPS_NS::AtomVec` corresponds to the files ``atom_vec.cpp`` and ``atom_vec.h``. Full -lines in the figure represent compositing: that is the class at the base -of the arrow holds a pointer to an instance of the class at the tip. -Dashed lines instead represent inheritance: the class to the tip of the -arrow is derived from the class at the base. Classes with a red boundary -are not instantiated directly, but they represent the base classes for -"styles". Those "styles" make up the bulk of the LAMMPS code and only -a few representative examples are included in the figure so it remains -readable. +lines in the figure represent compositing: that is, the class at the +base of the arrow holds a pointer to an instance of the class at the +tip. Dashed lines instead represent inheritance: the class at the tip +of the arrow is derived from the class at the base. Classes with a red +boundary are not instantiated directly, but they represent the base +classes for "styles". Those "styles" make up the bulk of the LAMMPS +code and only a few representative examples are included in the figure, +so it remains readable. .. _class-topology: .. figure:: JPG/lammps-classes.png LAMMPS class topology - This figure shows some of the relations of the base classes of the - LAMMPS simulation package. Full lines indicate that a class holds an - instance of the class it is pointing to; dashed lines point to - derived classes that are given as examples of what classes may be - instantiated during a LAMMPS run based on the input commands and - accessed through the API define by their respective base classes. At - the core is the :cpp:class:`LAMMPS ` class, which - holds pointers to class instances with specific purposes. Those may - hold instances of other classes, sometimes directly, or only - temporarily, sometimes as derived classes or derived classes of - derived classes, which may also hold instances of other classes. + This figure shows relations of base classes of the LAMMPS + simulation package. Full lines indicate that a class holds an + instance of the class it is pointing to; dashed lines point to + derived classes that are given as examples of what classes may be + instantiated during a LAMMPS run based on the input commands and + accessed through the API define by their respective base classes. + At the core is the :cpp:class:`LAMMPS ` class, + which holds pointers to class instances with specific purposes. + Those may hold instances of other classes, sometimes directly, or + only temporarily, sometimes as derived classes or derived classes + of derived classes, which may also hold instances of other + classes. The :cpp:class:`LAMMPS_NS::LAMMPS` class is the topmost class and -represents what is generally referred to an "instance" of LAMMPS. It is -a composite holding pointers to instances of other core classes +represents what is generally referred to as an "instance of LAMMPS". It +is a composite holding pointers to instances of other core classes providing the core functionality of the MD engine in LAMMPS and through them abstractions of the required operations. The constructor of the LAMMPS class will instantiate those instances, process the command line @@ -102,42 +103,44 @@ LAMMPS while passing it the command line flags and input script. It deletes the LAMMPS instance after the method reading the input returns and shuts down the MPI environment before it exits the executable. -The :cpp:class:`LAMMPS_NS::Pointers` is not shown in the +The :cpp:class:`LAMMPS_NS::Pointers` class is not shown in the :ref:`class-topology` figure for clarity. It holds references to many of the members of the `LAMMPS_NS::LAMMPS`, so that all classes derived from :cpp:class:`LAMMPS_NS::Pointers` have direct access to those -reference. From the class topology all classes with blue boundary are +references. From the class topology all classes with blue boundary are referenced in the Pointers class and all classes in the second and third -columns, that are not listed as derived classes are instead derived from -:cpp:class:`LAMMPS_NS::Pointers`. To initialize the pointer references -in Pointers, a pointer to the LAMMPS class instance needs to be passed -to the constructor and thus all constructors for classes derived from it -must do so and pass this pointer to the constructor for Pointers. +columns, that are not listed as derived classes, are instead derived +from :cpp:class:`LAMMPS_NS::Pointers`. To initialize the pointer +references in Pointers, a pointer to the LAMMPS class instance needs to +be passed to the constructor. All constructors for classes derived from +it, must do so and thus pass that pointer to the constructor for +:cpp:class:`LAMMPS_NS::Pointers`. The default constructor for +:cpp:class:`LAMMPS_NS::Pointers` is disabled to enforce this. Since all storage is supposed to be encapsulated (there are a few exceptions), the LAMMPS class can also be instantiated multiple times by -a calling code. Outside of the aforementioned exceptions, those LAMMPS +a calling code. Outside the aforementioned exceptions, those LAMMPS instances can be used alternately. As of the time of this writing -(early 2021) LAMMPS is not yet sufficiently thread-safe for concurrent +(early 2023) LAMMPS is not yet sufficiently thread-safe for concurrent execution. When running in parallel with MPI, care has to be taken, that suitable copies of communicators are used to not create conflicts between different instances. -The LAMMPS class currently (early 2021) holds instances of 19 classes -representing the core functionality. There are a handful of virtual -parent classes in LAMMPS that define what LAMMPS calls ``styles``. They -are shaded red in the :ref:`class-topology` figure. Each of these are -parents of a number of child classes that implement the interface -defined by the parent class. There are two main categories of these -``styles``: some may only have one instance active at a time (e.g. atom, -pair, bond, angle, dihedral, improper, kspace, comm) and there is a -dedicated pointer variable for each of them in the composite class. +The LAMMPS class currently holds instances of 19 classes representing +the core functionality. There are a handful of virtual parent classes +in LAMMPS that define what LAMMPS calls ``styles``. These are shaded +red in the :ref:`class-topology` figure. Each of these are parents of a +number of child classes that implement the interface defined by the +parent class. There are two main categories of these ``styles``: some +may only have one instance active at a time (e.g. atom, pair, bond, +angle, dihedral, improper, kspace, comm) and there is a dedicated +pointer variable for each of them in the corresponding composite class. Setups that require a mix of different such styles have to use a -*hybrid* class that takes the place of the one allowed instance and then -manages and forwards calls to the corresponding sub-styles for the -designated subset of atoms or data. The composite class may also have -lists of class instances, e.g. Modify handles lists of compute and fix -styles, while Output handles a list of dump class instances. +*hybrid* class instance that acts as a proxy, and manages and forwards +calls to the corresponding sub-style class instances for the designated +subset of atoms or data. The composite class may also have lists of +class instances, e.g. ``Modify`` handles lists of compute and fix +styles, while ``Output`` handles a list of dump class instances. The exception to this scheme are the ``command`` style classes. These implement specific commands that can be invoked before, after, or in @@ -146,19 +149,19 @@ command() method called and then, after completion, the class instance deleted. Examples for this are the create_box, create_atoms, minimize, run, set, or velocity command styles. -For all those ``styles`` certain naming conventions are employed: for +For all those ``styles``, certain naming conventions are employed: for the fix nve command the class is called FixNVE and the source files are -``fix_nve.h`` and ``fix_nve.cpp``. Similarly for fix ave/time we have +``fix_nve.h`` and ``fix_nve.cpp``. Similarly, for fix ave/time we have FixAveTime and ``fix_ave_time.h`` and ``fix_ave_time.cpp``. Style names are lower case and without spaces or special characters. A suffix or words are appended with a forward slash '/' which denotes a variant of the corresponding class without the suffix. To connect the style name and the class name, LAMMPS uses macros like: ``AtomStyle()``, ``PairStyle()``, ``BondStyle()``, ``RegionStyle()``, and so on in the -corresponding header file. During configuration or compilation files +corresponding header file. During configuration or compilation, files with the pattern ``style_.h`` are created that consist of a list of include statements including all headers of all styles of a given -type that are currently active (or "installed). +type that are currently enabled (or "installed"). More details on individual classes in the :ref:`class-topology` are as @@ -172,8 +175,8 @@ follows: that one or multiple simulations can be run, on the processors allocated for a run, e.g. by the mpirun command. -- The Input class reads and processes input input strings and files, - stores variables, and invokes :doc:`commands `. +- The Input class reads and processes input (strings and files), stores + variables, and invokes :doc:`commands `. - Command style classes are derived from the Command class. They provide input script commands that perform one-time operations @@ -192,7 +195,7 @@ follows: - The Atom class stores per-atom properties associated with atom styles. More precisely, they are allocated and managed by a class derived from the AtomVec class, and the Atom class simply stores pointers to them. - The classes derived from AtomVec represent the different atom styles + The classes derived from AtomVec represent the different atom styles, and they are instantiated through the :doc:`atom_style ` command. @@ -206,18 +209,22 @@ follows: class stores a single list (for all atoms). A NeighRequest class instance is created by pair, fix, or compute styles when they need a particular kind of neighbor list and use the NeighRequest properties - to select the neighbor list settings for the given request. There can - be multiple instances of the NeighRequest class and the Neighbor class - will try to optimize how they are computed by creating copies or - sub-lists where possible. + to select the neighbor list settings for the given request. There can + be multiple instances of the NeighRequest class. The Neighbor class + will try to optimize how the requests are processed. Depending on the + NeighRequest properties, neighbor lists are constructed from scratch, + aliased, or constructed by post-processing an existing list into + sub-lists. - The Comm class performs inter-processor communication, typically of ghost atom information. This usually involves MPI message exchanges with 6 neighboring processors in the 3d logical grid of processors mapped to the simulation box. There are two :doc:`communication styles - ` enabling different ways to do the domain decomposition. - Sometimes the Irregular class is used, when atoms may migrate to - arbitrary processors. + `, enabling different ways to perform the domain + decomposition. + +- The Irregular class is used, when atoms may migrate to arbitrary + processors. - The Domain class stores the simulation box geometry, as well as geometric Regions and any user definition of a Lattice. The latter @@ -246,7 +253,7 @@ follows: file, dump file snapshots, and restart files. These correspond to the :doc:`Thermo `, :doc:`Dump `, and :doc:`WriteRestart ` classes respectively. The Dump - class is a base class with several derived classes implementing + class is a base class, with several derived classes implementing various dump style variants. - The Timer class logs timing information, output at the end diff --git a/doc/src/Developer_par_comm.rst b/doc/src/Developer_par_comm.rst index ec3ef87f47..88f0bf7fe9 100644 --- a/doc/src/Developer_par_comm.rst +++ b/doc/src/Developer_par_comm.rst @@ -1,12 +1,12 @@ Communication ^^^^^^^^^^^^^ -Following the partitioning scheme in use all per-atom data is +Following the selected partitioning scheme, all per-atom data is distributed across the MPI processes, which allows LAMMPS to handle very large systems provided it uses a correspondingly large number of MPI processes. Since The per-atom data (atom IDs, positions, velocities, -types, etc.) To be able to compute the short-range interactions MPI -processes need not only access to data of atoms they "own" but also +types, etc.) To be able to compute the short-range interactions, MPI +processes need not only access to the data of atoms they "own" but also information about atoms from neighboring subdomains, in LAMMPS referred to as "ghost" atoms. These are copies of atoms storing required per-atom data for up to the communication cutoff distance. The green @@ -59,7 +59,7 @@ and upper *y*-boundary of rank 0's subdomain. In the *y* stage, ranks 4,5,6 send atoms in their blue-shaded regions to rank 0. This may include ghost atoms they received in the *x* stage, but only if they are needed by rank 0 to fill its extended ghost atom regions in the -+/-*y* directions (blue rectangles). Thus in this case, ranks 5 and ++/-*y* directions (blue rectangles). Thus, in this case, ranks 5 and 6 do not include ghost atoms they received from each other (in the *x* stage) in the atoms they send to rank 0. The key point is that while the pattern of communication is more complex in the irregular @@ -78,14 +78,14 @@ A "reverse" communication is when computed ghost atom attributes are sent back to the processor who owns the atom. This is used (for example) to sum partial forces on ghost atoms to the complete force on owned atoms. The order of the two stages described in the -:ref:`ghost-atom-comm` figure is inverted and the same lists of atoms +:ref:`ghost-atom-comm` figure is inverted, and the same lists of atoms are used to pack and unpack message buffers with per-atom forces. When a received buffer is unpacked, the ghost forces are summed to owned atom forces. As in forward communication, forces on atoms in the four blue corners of the diagrams are sent, received, and summed twice (once at each stage) before owning processors have the full force. -These two operations are used many places within LAMMPS aside from +These two operations are used in many places within LAMMPS aside from exchange of coordinates and forces, for example by manybody potentials to share intermediate per-atom values, or by rigid-body integrators to enable each atom in a body to access body properties. Here are @@ -105,7 +105,7 @@ performed in LAMMPS: atom pairs when building neighbor lists or computing forces. - The cutoff distance for exchanging ghost atoms is typically equal to - the neighbor cutoff. But it can also chosen to be longer if needed, + the neighbor cutoff. But it can also set to a larger value if needed, e.g. half the diameter of a rigid body composed of multiple atoms or over 3x the length of a stretched bond for dihedral interactions. It can also exceed the periodic box size. For the regular communication @@ -113,7 +113,7 @@ performed in LAMMPS: processor's subdomain, then multiple exchanges are performed in the same direction. Each exchange is with the same neighbor processor, but buffers are packed/unpacked using a different list of atoms. For - forward communication, in the first exchange a processor sends only + forward communication, in the first exchange, a processor sends only owned atoms. In subsequent exchanges, it sends ghost atoms received in previous exchanges. For the irregular pattern (right) overlaps of a processor's extended ghost-atom subdomain with all other processors diff --git a/doc/src/Developer_par_long.rst b/doc/src/Developer_par_long.rst index cd240ffd21..73b92e47c2 100644 --- a/doc/src/Developer_par_long.rst +++ b/doc/src/Developer_par_long.rst @@ -40,28 +40,28 @@ orthogonal boxes. .. _fft-parallel: .. figure:: img/fft-decomp-parallel.png - :align: center - parallel FFT in PPPM + Parallel FFT in PPPM - Stages of a parallel FFT for a simulation domain overlaid - with an 8x8x8 3d FFT grid, partitioned across 64 processors. - Within each of the 4 diagrams, grid cells of the same color are - owned by a single processor; for simplicity only cells owned by 4 - or 8 of the 64 processors are colored. The two images on the left - illustrate brick-to-pencil communication. The two images on the - right illustrate pencil-to-pencil communication, which in this - case transposes the *y* and *z* dimensions of the grid. + Stages of a parallel FFT for a simulation domain overlaid with an + 8x8x8 3d FFT grid, partitioned across 64 processors. Within each + of the 4 diagrams, grid cells of the same color are owned by a + single processor; for simplicity, only cells owned by 4 or 8 of + the 64 processors are colored. The two images on the left + illustrate brick-to-pencil communication. The two images on the + right illustrate pencil-to-pencil communication, which in this + case transposes the *y* and *z* dimensions of the grid. Parallel 3d FFTs require substantial communication relative to their computational cost. A 3d FFT is implemented by a series of 1d FFTs -along the *x-*, *y-*, and *z-*\ direction of the FFT grid. Thus the FFT -grid cannot be decomposed like atoms into 3 dimensions for parallel +along the *x-*, *y-*, and *z-*\ direction of the FFT grid. Thus, the +FFT grid cannot be decomposed like atoms into 3 dimensions for parallel processing of the FFTs but only in 1 (as planes) or 2 (as pencils) dimensions and in between the steps the grid needs to be transposed to have the FFT grid portion "owned" by each MPI process complete in the direction of the 1d FFTs it has to perform. LAMMPS uses the -pencil-decomposition algorithm as shown in the :ref:`fft-parallel` figure. +pencil-decomposition algorithm as shown in the :ref:`fft-parallel` +figure. Initially (far left), each processor owns a brick of same-color grid cells (actually grid points) contained within in its subdomain. A @@ -97,7 +97,7 @@ across all $P$ processors with a single call to ``MPI_Alltoall()``, but this is typically much slower. However, for the specialized brick and pencil tiling illustrated in :ref:`fft-parallel` figure, collective communication across the entire MPI communicator is not required. In -the example an :math:`8^3` grid with 512 grid cells is partitioned +the example, an :math:`8^3` grid with 512 grid cells is partitioned across 64 processors; each processor owns a 2x2x2 3d brick of grid cells. The initial brick-to-pencil communication (upper left to upper right) only requires collective communication within subgroups of 4 @@ -132,7 +132,7 @@ grid/particle operations that LAMMPS supports: - The fftMPI library allows each grid dimension to be a multiple of small prime factors (2,3,5), and allows any number of processors to perform the FFT. The resulting brick and pencil decompositions are - thus not always as well-aligned but the size of subgroups of + thus not always as well-aligned, but the size of subgroups of processors for the two modes of communication (brick/pencil and pencil/pencil) still scale as :math:`O(P^{\frac{1}{3}})` and :math:`O(P^{\frac{1}{2}})`. @@ -143,21 +143,23 @@ grid/particle operations that LAMMPS supports: in memory. This reordering can be done during the packing or unpacking of buffers for MPI communication. -- For large systems and particularly a large number of MPI processes, - the dominant cost for parallel FFTs is often the communication, not - the computation of 1d FFTs, even though the latter scales as :math:`N - \log(N)` in the number of grid points *N* per grid direction. This is - due to the fact that only a 2d decomposition into pencils is possible - while atom data (and their corresponding short-range force and energy - computations) can be decomposed efficiently in 3d. +- For large systems and particularly many MPI processes, the dominant + cost for parallel FFTs is often the communication, not the computation + of 1d FFTs, even though the latter scales as :math:`N \log(N)` in the + number of grid points *N* per grid direction. This is due to the fact + that only a 2d decomposition into pencils is possible while atom data + (and their corresponding short-range force and energy computations) + can be decomposed efficiently in 3d. - This can be addressed by reducing the number of MPI processes involved - in the MPI communication by using :doc:`hybrid MPI + OpenMP - parallelization `. This will use OpenMP parallelization - inside the MPI domains and while that may have a lower parallel - efficiency, it reduces the communication overhead. + Reducing the number of MPI processes involved in the MPI communication + will reduce this kind of overhead. By using a :doc:`hybrid MPI + + OpenMP parallelization ` it is still possible to use all + processes for parallel computation. It will use OpenMP + parallelization inside the MPI domains. While that may have a lower + parallel efficiency for some part of the computation, that can be less + than the communication overhead in the 3d FFTs. - As an alternative it is also possible to start a :ref:`multi-partition + As an alternative, it is also possible to start a :ref:`multi-partition ` calculation and then use the :doc:`verlet/split integrator ` to perform the PPPM computation on a dedicated, separate partition of MPI processes. This uses an integer @@ -175,7 +177,7 @@ grid/particle operations that LAMMPS supports: manner consistent with processor subdomains, and provides methods for forward and reverse communication of owned and ghost grid point values. It is used for PPPM as an FFT grid (as outlined above) and - also for the MSM algorithm which uses a cascade of grid sizes from + also for the MSM algorithm, which uses a cascade of grid sizes from fine to coarse to compute long-range Coulombic forces. The GridComm class is also useful for models where continuum fields interact with particles. For example, the two-temperature model (TTM) defines heat diff --git a/doc/src/Developer_par_neigh.rst b/doc/src/Developer_par_neigh.rst index 43cbf1b0e2..c3eaf9c0f7 100644 --- a/doc/src/Developer_par_neigh.rst +++ b/doc/src/Developer_par_neigh.rst @@ -3,12 +3,12 @@ Neighbor lists To compute forces efficiently, each processor creates a Verlet-style neighbor list which enumerates all pairs of atoms *i,j* (*i* = owned, -*j* = owned or ghost) with separation less than the applicable -neighbor list cutoff distance. In LAMMPS the neighbor lists are stored -in a multiple-page data structure; each page is a contiguous chunk of -memory which stores vectors of neighbor atoms *j* for many *i* atoms. -This allows pages to be incrementally allocated or deallocated in blocks -as needed. Neighbor lists typically consume the most memory of any data +*j* = owned or ghost) with separation less than the applicable neighbor +list cutoff distance. In LAMMPS, the neighbor lists are stored in a +multiple-page data structure; each page is a contiguous chunk of memory +which stores vectors of neighbor atoms *j* for many *i* atoms. This +allows pages to be incrementally allocated or deallocated in blocks as +needed. Neighbor lists typically consume the most memory of any data structure in LAMMPS. The neighbor list is rebuilt (from scratch) once every few timesteps, then used repeatedly each step for force or other computations. The neighbor cutoff distance is :math:`R_n = R_f + @@ -16,7 +16,7 @@ computations. The neighbor cutoff distance is :math:`R_n = R_f + the interatomic potential for computing short-range pairwise or manybody forces and :math:`\Delta_s` is a "skin" distance that allows the list to be used for multiple steps assuming that atoms do not move very far -between consecutive time steps. Typically the code triggers +between consecutive time steps. Typically, the code triggers reneighboring when any atom has moved half the skin distance since the last reneighboring; this and other options of the neighbor list rebuild can be adjusted with the :doc:`neigh_modify ` command. @@ -26,10 +26,10 @@ their owning processor's subdomain are first migrated to new processors via communication. Periodic boundary conditions are also (only) enforced on these steps to ensure each atom is re-assigned to the correct processor. After migration, the atoms owned by each processor -are stored in a contiguous vector. Periodically each processor +are stored in a contiguous vector. Periodically, each processor spatially sorts owned atoms within its vector to reorder it for improved cache efficiency in force computations and neighbor list building. For -that atoms are spatially binned and then reordered so that atoms in the +that, atoms are spatially binned and then reordered so that atoms in the same bin are adjacent in the vector. Atom sorting can be disabled or its settings modified with the :doc:`atom_modify ` command. @@ -44,7 +44,7 @@ its settings modified with the :doc:`atom_modify ` command. (left) and triclinic (right) domains. A regular grid of neighbor bins (thin lines) overlays the entire simulation domain and need not align with subdomain boundaries; only the portion overlapping the - augmented subdomain is shown. In the triclinic case it overlaps the + augmented subdomain is shown. In the triclinic case, it overlaps the bounding box of the tilted rectangle. The blue- and red-shaded bins represent a stencil of bins searched to find neighbors of a particular atom (black dot). @@ -53,12 +53,12 @@ To build a local neighbor list in linear time, the simulation domain is overlaid (conceptually) with a regular 3d (or 2d) grid of neighbor bins, as shown in the :ref:`neighbor-stencil` figure for 2d models and a single MPI processor's subdomain. Each processor stores a set of -neighbor bins which overlap its subdomain extended by the neighbor +neighbor bins which overlap its subdomain, extended by the neighbor cutoff distance :math:`R_n`. As illustrated, the bins need not align with processor boundaries; an integer number in each dimension is fit to the size of the entire simulation box. -Most often LAMMPS builds what it calls a "half" neighbor list where +Most often, LAMMPS builds what is called a "half" neighbor list where each *i,j* neighbor pair is stored only once, with either atom *i* or *j* as the central atom. The build can be done efficiently by using a pre-computed "stencil" of bins around a central origin bin which @@ -67,18 +67,18 @@ is simply a list of integer offsets in *x,y,z* of nearby bins surrounding the origin bin which are close enough to contain any neighbor atom *j* within a distance :math:`R_n` from any atom *i* in the origin bin. Note that for a half neighbor list, the stencil can be -asymmetric since each atom only need store half its nearby neighbors. +asymmetric, since each atom only need store half its nearby neighbors. These stencils are illustrated in the figure for a half list and a bin size of :math:`\frac{1}{2} R_n`. There are 13 red+blue stencil bins in 2d (for the orthogonal case, 15 for triclinic). In 3d there would be 63, 13 in the plane of bins that contain the origin bin and 25 in each of the two planes above it in the *z* direction (75 for triclinic). The -reason the triclinic stencil has extra bins is because the bins tile the -bounding box of the entire triclinic domain and thus are not periodic -with respect to the simulation box itself. The stencil and logic for -determining which *i,j* pairs to include in the neighbor list are -altered slightly to account for this. +triclinic stencil has extra bins because the bins tile the bounding box +of the entire triclinic domain, and thus are not periodic with respect +to the simulation box itself. The stencil and logic for determining +which *i,j* pairs to include in the neighbor list are altered slightly +to account for this. To build a neighbor list, a processor first loops over its "owned" plus "ghost" atoms and assigns each to a neighbor bin. This uses an integer @@ -95,7 +95,7 @@ supports: been found to be optimal for many typical cases. Smaller bins incur additional overhead to loop over; larger bins require more distance calculations. Note that for smaller bin sizes, the 2d stencil in the - figure would be more semi-circular in shape (hemispherical in 3d), + figure would be of a more semicircular shape (hemispherical in 3d), with bins near the corners of the square eliminated due to their distance from the origin bin. @@ -111,8 +111,8 @@ supports: symmetric stencil. It also includes lists with partial enumeration of ghost atom neighbors. The full and ghost-atom lists are used by various manybody interatomic potentials. Lists may also use different - criteria for inclusion of a pair interaction. Typically this simply - depends only on the distance between two atoms and the cutoff + criteria for inclusion of a pairwise interaction. Typically, this + simply depends only on the distance between two atoms and the cutoff distance. But for finite-size coarse-grained particles with individual diameters (e.g. polydisperse granular particles), it can also depend on the diameters of the two particles. @@ -121,11 +121,11 @@ supports: of the master neighbor list for the full system need to be generated, one for each sub-style, which contains only the *i,j* pairs needed to compute interactions between subsets of atoms for the corresponding - potential. This means not all *i* or *j* atoms owned by a processor + potential. This means, not all *i* or *j* atoms owned by a processor are included in a particular sub-list. - Some models use different cutoff lengths for pairwise interactions - between different kinds of particles which are stored in a single + between different kinds of particles, which are stored in a single neighbor list. One example is a solvated colloidal system with large colloidal particles where colloid/colloid, colloid/solvent, and solvent/solvent interaction cutoffs can be dramatically different. @@ -153,7 +153,7 @@ supports: For the newton pair *on* setting the atom *j* is only added to the list if its *z* coordinate is larger, or if equal the *y* coordinate is larger, and that is equal, too, the *x* coordinate is larger. For - homogeneously dense systems that will result in picking neighbors from + homogeneously dense systems, that will result in picking neighbors from a same size sector in always the same direction relative to the - "owned" atom and thus it should lead to similar length neighbor lists - and thus reduce the chance of a load imbalance. + "owned" atom, and thus it should lead to similar length neighbor lists + and reduce the chance of a load imbalance. diff --git a/doc/src/Developer_par_openmp.rst b/doc/src/Developer_par_openmp.rst index 91c649a7b8..7e2021de67 100644 --- a/doc/src/Developer_par_openmp.rst +++ b/doc/src/Developer_par_openmp.rst @@ -6,7 +6,7 @@ thread parallelism to predominantly distribute loops over local data and thus follow an orthogonal parallelization strategy to the decomposition into spatial domains used by the :doc:`MPI partitioning `. For clarity, this section discusses only the -implementation in the OPENMP package as it is the simplest. The INTEL +implementation in the OPENMP package, as it is the simplest. The INTEL and KOKKOS package offer additional options and are more complex since they support more features and different hardware like co-processors or GPUs. @@ -14,7 +14,7 @@ or GPUs. One of the key decisions when implementing the OPENMP package was to keep the changes to the source code small, so that it would be easier to maintain the code and keep it in sync with the non-threaded standard -implementation. this is achieved by a) making the OPENMP version a +implementation. This is achieved by a) making the OPENMP version a derived class from the regular version (e.g. ``PairLJCutOMP`` from ``PairLJCut``) and overriding only methods that are multi-threaded or need to be modified to support multi-threading (similar to what was done @@ -26,13 +26,13 @@ into three separate classes ``ThrOMP``, ``ThrData``, and ``FixOMP``. available in the corresponding base class (e.g. ``Pair`` for ``PairLJCutOMP``) like multi-thread aware variants of the "tally" functions. Those functions are made available through multiple -inheritance so those new functions have to have unique names to avoid +inheritance, so those new functions have to have unique names to avoid ambiguities; typically ``_thr`` is appended to the name of the function. -``ThrData`` is a classes that manages per-thread data structures. -It is used instead of extending the corresponding storage to per-thread -arrays to avoid slowdowns due to "false sharing" when multiple threads -update adjacent elements in an array and thus force the CPU cache lines -to be reset and re-fetched. ``FixOMP`` finally manages the "multi-thread +``ThrData`` is a class that manages per-thread data structures. It is +used instead of extending the corresponding storage to per-thread arrays +to avoid slowdowns due to "false sharing" when multiple threads update +adjacent elements in an array and thus force the CPU cache lines to be +reset and re-fetched. ``FixOMP`` finally manages the "multi-thread state" like settings and access to per-thread storage, it is activated by the :doc:`package omp ` command. @@ -46,24 +46,24 @@ involve multiple atoms and thus there are race conditions when multiple threads want to update per-atom data of the same atoms. Five possible strategies have been considered to avoid this: -1) restructure the code so that there is no overlapping access possible +1. Restructure the code so that there is no overlapping access possible when computing in parallel, e.g. by breaking lists into multiple parts and synchronizing threads in between. -2) have each thread be "responsible" for a specific group of atoms and +2. Have each thread be "responsible" for a specific group of atoms and compute these interactions multiple times, once on each thread that - is responsible for a given atom and then have each thread only update + is responsible for a given atom, and then have each thread only update the properties of this atom. -3) use mutexes around functions and regions of code where the data race - could happen -4) use atomic operations when updating per-atom properties -5) use replicated per-thread data structures to accumulate data without +3. Use mutexes around functions and regions of code where the data race + could happen. +4. Use atomic operations when updating per-atom properties. +5. Use replicated per-thread data structures to accumulate data without conflicts and then use a reduction to combine those results into the data structures used by the regular style. Option 5 was chosen for the OPENMP package because it would retain the -performance for the case of 1 thread and the code would be more +performance for the case of a single thread and the code would be more maintainable. Option 1 would require extensive code changes, -particularly to the neighbor list code; options 2 would have incurred a +particularly to the neighbor list code; option 2 would have incurred a 2x or more performance penalty for the serial case; option 3 causes significant overhead and would enforce serialization of operations in inner loops and thus defeat the purpose of multi-threading; option 4 @@ -80,7 +80,7 @@ equivalent to the number of CPU cores per CPU socket on high-end supercomputers. Thus arrays like the force array are dimensioned to the number of atoms -times the number of threads when enabling OpenMP support and inside the +times the number of threads when enabling OpenMP support, and inside the compute functions a pointer to a different chunk is obtained by each thread. Similarly, accumulators like potential energy or virial are kept in per-thread instances of the ``ThrData`` class and then only reduced and @@ -91,7 +91,7 @@ Loop scheduling """"""""""""""" Multi-thread parallelization is applied by distributing (outer) loops -statically across threads. Typically this would be the loop over local +statically across threads. Typically, this would be the loop over local atoms *i* when processing *i,j* pairs of atoms from a neighbor list. The design of the neighbor list code results in atoms having a similar number of neighbors for homogeneous systems and thus load imbalances diff --git a/doc/src/Developer_par_part.rst b/doc/src/Developer_par_part.rst index be42857f63..06042c59a5 100644 --- a/doc/src/Developer_par_part.rst +++ b/doc/src/Developer_par_part.rst @@ -7,36 +7,36 @@ distributed-memory parallelism is set with the :doc:`comm_style command .. _domain-decomposition: .. figure:: img/domain-decomp.png - :align: center - domain decomposition + Domain decomposition schemes - This figure shows the different kinds of domain decomposition used - for MPI parallelization: "brick" on the left with an orthogonal - (left) and a triclinic (middle) simulation domain, and a "tiled" - decomposition (right). The black lines show the division into - subdomains and the contained atoms are "owned" by the corresponding - MPI process. The green dashed lines indicate how subdomains are - extended with "ghost" atoms up to the communication cutoff distance. + This figure shows the different kinds of domain decomposition used + for MPI parallelization: "brick" on the left with an orthogonal + (left) and a triclinic (middle) simulation domain, and a "tiled" + decomposition (right). The black lines show the division into + subdomains, and the contained atoms are "owned" by the + corresponding MPI process. The green dashed lines indicate how + subdomains are extended with "ghost" atoms up to the communication + cutoff distance. -The LAMMPS simulation box is a 3d or 2d volume, which can be orthogonal -or triclinic in shape, as illustrated in the :ref:`domain-decomposition` -figure for the 2d case. Orthogonal means the box edges are aligned with -the *x*, *y*, *z* Cartesian axes, and the box faces are thus all -rectangular. Triclinic allows for a more general parallelepiped shape -in which edges are aligned with three arbitrary vectors and the box -faces are parallelograms. In each dimension box faces can be periodic, -or non-periodic with fixed or shrink-wrapped boundaries. In the fixed -case, atoms which move outside the face are deleted; shrink-wrapped -means the position of the box face adjusts continuously to enclose all -the atoms. +The LAMMPS simulation box is a 3d or 2d volume, which can be of +orthogonal or triclinic shape, as illustrated in the +:ref:`domain-decomposition` figure for the 2d case. Orthogonal means +the box edges are aligned with the *x*, *y*, *z* Cartesian axes, and the +box faces are thus all rectangular. Triclinic allows for a more general +parallelepiped shape in which edges are aligned with three arbitrary +vectors and the box faces are parallelograms. In each dimension, box +faces can be periodic, or non-periodic with fixed or shrink-wrapped +boundaries. In the fixed case, atoms which move outside the face are +deleted; shrink-wrapped means the position of the box face adjusts +continuously to enclose all the atoms. For distributed-memory MPI parallelism, the simulation box is spatially decomposed (partitioned) into non-overlapping subdomains which fill the box. The default partitioning, "brick", is most suitable when atom density is roughly uniform, as shown in the left-side images of the :ref:`domain-decomposition` figure. The subdomains comprise a regular -grid and all subdomains are identical in size and shape. Both the +grid, and all subdomains are identical in size and shape. Both the orthogonal and triclinic boxes can deform continuously during a simulation, e.g. to compress a solid or shear a liquid, in which case the processor subdomains likewise deform. @@ -76,14 +76,14 @@ the load imbalance: The pictures above demonstrate different decompositions for a 2d system with 12 MPI ranks. The atom colors indicate the load imbalance of each -subdomain with green being optimal and red the least optimal. +subdomain, with green being optimal and red the least optimal. -Due to the vacuum in the system, the default decomposition is unbalanced -with several MPI ranks without atoms (left). By forcing a 1x12x1 -processor grid, every MPI rank does computations now, but number of -atoms per subdomain is still uneven and the thin slice shape increases -the amount of communication between subdomains (center left). With a -2x6x1 processor grid and shifting the subdomain divisions, the load -imbalance is further reduced and the amount of communication required -between subdomains is less (center right). And using the recursive -bisectioning leads to further improved decomposition (right). +Due to the vacuum in the system, the default decomposition is +unbalanced, with several MPI ranks without atoms (left). By forcing a +1x12x1 processor grid, every MPI rank does computations now, but the +number of atoms per subdomain is still uneven, and the thin slice shape +increases the amount of communication between subdomains (center +left). With a 2x6x1 processor grid and shifting the subdomain divisions, +the load imbalance is further reduced and the amount of communication +required between subdomains is less (center right). And using the +recursive bisectioning leads to further improved decomposition (right). diff --git a/doc/src/Library.rst b/doc/src/Library.rst index 3533c347c8..09561cda82 100644 --- a/doc/src/Library.rst +++ b/doc/src/Library.rst @@ -136,7 +136,7 @@ The LAMMPS Python module enables calling the LAMMPS C library API from Python by dynamically loading functions in the LAMMPS shared library through the `Python ctypes module `_. Because of the dynamic loading, it is **required** that LAMMPS is compiled -in :ref:`"shared" mode `. The Python interface is object oriented, but +in :ref:`"shared" mode `. The Python interface is object-oriented, but otherwise tries to be very similar to the C library API. Three different Python classes to run LAMMPS are available and they build on each other. More information on this is in the :doc:`Python_head` @@ -152,7 +152,7 @@ LAMMPS Fortran API The LAMMPS Fortran module is a wrapper around calling functions from the LAMMPS C library API. This is done using the ISO_C_BINDING feature in -Fortran 2003. The interface is object oriented but otherwise tries to +Fortran 2003. The interface is object-oriented but otherwise tries to be very similar to the C library API and the basic Python module. .. toctree:: diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index 0421cf33e4..20e3d2c094 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -1071,7 +1071,7 @@ getting started, but not as a fully tested and supported feature of the LAMMPS distribution. Any contributions to complete this are, of course, welcome. Please also note, that for the case of creating a Python wrapper, a fully supported :doc:`Ctypes based lammps module ` -already exists. That module is designed to be object oriented while +already exists. That module is designed to be object-oriented while SWIG will generate a 1:1 translation of the functions in the interface file. Building the wrapper diff --git a/doc/src/fix_rigid.rst b/doc/src/fix_rigid.rst index 3a2477f90a..884d883f5a 100644 --- a/doc/src/fix_rigid.rst +++ b/doc/src/fix_rigid.rst @@ -730,18 +730,18 @@ is because there can only be one fix which monitors the global pressure and changes the simulation box dimensions. So you have 3 choices: -* Use one of the 4 NPT or NPH styles for the rigid bodies. Use the - *dilate* all option so that it will dilate the positions of the - non-rigid particles as well. Use :doc:`fix nvt ` (or any - other thermostat) for the non-rigid particles. -* Use :doc:`fix npt ` for the group of non-rigid particles. Use - the *dilate* all option so that it will dilate the center-of-mass - positions of the rigid bodies as well. Use one of the 4 NVE or 2 NVT - rigid styles for the rigid bodies. -* Use :doc:`fix press/berendsen ` to compute the - pressure and change the box dimensions. Use one of the 4 NVE or 2 NVT - rigid styles for the rigid bodies. Use :doc:`fix nvt ` (or - any other thermostat) for the non-rigid particles. +#. Use one of the 4 NPT or NPH styles for the rigid bodies. Use the + *dilate* all option so that it will dilate the positions of the + non-rigid particles as well. Use :doc:`fix nvt ` (or any + other thermostat) for the non-rigid particles. +#. Use :doc:`fix npt ` for the group of non-rigid particles. Use + the *dilate* all option so that it will dilate the center-of-mass + positions of the rigid bodies as well. Use one of the 4 NVE or 2 NVT + rigid styles for the rigid bodies. +#. Use :doc:`fix press/berendsen ` to compute the + pressure and change the box dimensions. Use one of the 4 NVE or 2 NVT + rigid styles for the rigid bodies. Use :doc:`fix nvt ` (or + any other thermostat) for the non-rigid particles. In all case, the rigid bodies and non-rigid particles both contribute to the global pressure and the box is scaled the same by any of the diff --git a/doc/src/prd.rst b/doc/src/prd.rst index 0f6e9e481f..7c6af3abb5 100644 --- a/doc/src/prd.rst +++ b/doc/src/prd.rst @@ -166,7 +166,7 @@ events, all the other replicas also run dynamics and event checking with the same schedule, but the final states are always overwritten by the state of the event replica. -The outer loop of the pseudo-code above continues until *N* steps of +The outer loop of the pseudocode above continues until *N* steps of dynamics have been performed. Note that *N* only includes the dynamics of stages 2 and 3, not the steps taken during dephasing or the minimization iterations of quenching. The specified *N* is diff --git a/src/pointers.h b/src/pointers.h index 09efa49cbc..7e5d5dbeb0 100644 --- a/src/pointers.h +++ b/src/pointers.h @@ -94,7 +94,7 @@ class Pointers { python(ptr->python) {} virtual ~Pointers() = default; - // remove default members execept for the copy constructor + // remove other default members Pointers() = delete; Pointers(const Pointers &) = default; From 0885edc154b3c0d1299aa54425d93a1562edba5e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 5 Feb 2023 03:02:19 -0500 Subject: [PATCH 143/445] re-enable new neighbor lists with CUDA 12.0 and later --- lib/gpu/lal_neighbor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gpu/lal_neighbor.h b/lib/gpu/lal_neighbor.h index 45ec95a9d1..37fbb3bcb5 100644 --- a/lib/gpu/lal_neighbor.h +++ b/lib/gpu/lal_neighbor.h @@ -26,8 +26,8 @@ #if !defined(USE_OPENCL) && !defined(USE_HIP) #ifndef LAL_USE_OLD_NEIGHBOR -// Issue with incorrect results with CUDA >= 11.2 -#if (CUDA_VERSION > 11019) +// Issue with incorrect results with CUDA >= 11.2 and pre-12.0 +#if (CUDA_VERSION > 11019) && (CUDA_VERSION < 12000) #define LAL_USE_OLD_NEIGHBOR #endif #endif From e7fc590f91a071bbc19cd1b858677fe8585507b6 Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sun, 5 Feb 2023 12:00:33 -0500 Subject: [PATCH 144/445] simplify and correct dedup routine --- src/REACTION/fix_bond_react.cpp | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index edddac1cb8..035c225f28 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -2671,11 +2671,8 @@ void FixBondReact::dedup_mega_gloves(int dedup_mode) // dedup_mask is size dedup_size and filters reactions that have been deleted // a value of 1 means this reaction instance has been deleted int *dedup_mask = new int[dedup_size]; - int *dup_list = new int[dedup_size]; - for (int i = 0; i < dedup_size; i++) { dedup_mask[i] = 0; - dup_list[i] = 0; } // let's randomly mix up our reaction instances first @@ -2699,42 +2696,24 @@ void FixBondReact::dedup_mega_gloves(int dedup_mode) for (int i = 0; i < dedup_size; i++) { if (dedup_mask[i] == 0) { - int num_dups = 0; int myrxnid1 = dedup_glove[0][i]; onemol = atom->molecules[unreacted_mol[myrxnid1]]; for (int j = 0; j < onemol->natoms; j++) { int check1 = dedup_glove[j+1][i]; for (int ii = i + 1; ii < dedup_size; ii++) { - int already_listed = 0; - for (int jj = 0; jj < num_dups; jj++) { - if (dup_list[jj] == ii) { - already_listed = 1; - break; - } - } - if (dedup_mask[ii] == 0 && already_listed == 0) { + if (dedup_mask[ii] == 0) { int myrxnid2 = dedup_glove[0][ii]; twomol = atom->molecules[unreacted_mol[myrxnid2]]; for (int jj = 0; jj < twomol->natoms; jj++) { int check2 = dedup_glove[jj+1][ii]; if (check2 == check1) { - // add this rxn instance as well - if (num_dups == 0) dup_list[num_dups++] = i; - dup_list[num_dups++] = ii; + dedup_mask[ii] = 1; break; } } } } } - // here we choose random number and therefore reaction instance - int myrand = 1; - if (num_dups > 0) { - myrand = floor(random[0]->uniform()*num_dups); - for (int iii = 0; iii < num_dups; iii++) { - if (iii != myrand) dedup_mask[dup_list[iii]] = 1; - } - } } } @@ -2751,7 +2730,6 @@ void FixBondReact::dedup_mega_gloves(int dedup_mode) new_local_megasize++; } } - local_num_mega = new_local_megasize; } @@ -2773,7 +2751,6 @@ void FixBondReact::dedup_mega_gloves(int dedup_mode) memory->destroy(dedup_glove); delete [] dedup_mask; - delete [] dup_list; } /* ---------------------------------------------------------------------- From 162ee16825c287cccca163a28584465cb9044ab5 Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sun, 5 Feb 2023 13:46:29 -0500 Subject: [PATCH 145/445] refactor step 1: delay check for ghosts --- src/REACTION/fix_bond_react.cpp | 107 ++++++++++++++++++++------------ src/REACTION/fix_bond_react.h | 8 ++- 2 files changed, 72 insertions(+), 43 deletions(-) diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index 035c225f28..e7dee6ea55 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -545,6 +545,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) : attempt = nullptr; nattempt = nullptr; allnattempt = 0; + my_num_mega = 0; local_num_mega = 0; ghostly_num_mega = 0; restore = nullptr; @@ -555,6 +556,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) : glove_counter = 0; guess_branch = new int[MAXGUESS](); pioneer_count = new int[max_natoms]; + my_mega_glove = nullptr; local_mega_glove = nullptr; ghostly_mega_glove = nullptr; global_mega_glove = nullptr; @@ -654,6 +656,7 @@ FixBondReact::~FixBondReact() memory->destroy(restore); memory->destroy(glove); memory->destroy(pioneers); + memory->destroy(my_mega_glove); memory->destroy(local_mega_glove); memory->destroy(ghostly_mega_glove); } @@ -1251,6 +1254,7 @@ void FixBondReact::close_partner() void FixBondReact::superimpose_algorithm() { const int nprocs = comm->nprocs; + my_num_mega = 0; local_num_mega = 0; ghostly_num_mega = 0; @@ -1269,6 +1273,7 @@ void FixBondReact::superimpose_algorithm() memory->destroy(restore); memory->destroy(glove); memory->destroy(pioneers); + memory->destroy(my_mega_glove); memory->destroy(local_mega_glove); memory->destroy(ghostly_mega_glove); } @@ -1277,18 +1282,14 @@ void FixBondReact::superimpose_algorithm() memory->create(restore_pt,MAXGUESS,4,"bond/react:restore_pt"); memory->create(pioneers,max_natoms,"bond/react:pioneers"); memory->create(restore,max_natoms,MAXGUESS*4,"bond/react:restore"); - memory->create(local_mega_glove,max_natoms+1,allnattempt,"bond/react:local_mega_glove"); - memory->create(ghostly_mega_glove,max_natoms+1,allnattempt,"bond/react:ghostly_mega_glove"); + memory->create(my_mega_glove,max_natoms+1,allnattempt,"bond/react:local_mega_glove"); + + for (int i = 0; i < max_natoms+1; i++) + for (int j = 0; j < allnattempt; j++) + my_mega_glove[i][j] = 0; attempted_rxn = 1; - for (int i = 0; i < max_natoms+1; i++) { - for (int j = 0; j < allnattempt; j++) { - local_mega_glove[i][j] = 0; - ghostly_mega_glove[i][j] = 0; - } - } - // let's finally begin the superimpose loop for (rxnID = 0; rxnID < nreacts; rxnID++) { for (lcl_inst = 0; lcl_inst < nattempt[rxnID]; lcl_inst++) { @@ -1335,7 +1336,11 @@ void FixBondReact::superimpose_algorithm() status = REJECT; } else { status = ACCEPT; - glove_ghostcheck(); + my_mega_glove[0][my_num_mega] = rxnID; + for (int i = 0; i < onemol->natoms; i++) { + my_mega_glove[i+1][my_num_mega] = glove[i][1]; + } + my_num_mega++; } } else status = REJECT; } @@ -1378,7 +1383,13 @@ void FixBondReact::superimpose_algorithm() if (status == ACCEPT) { if (fraction[rxnID] < 1.0 && random[rxnID]->uniform() >= fraction[rxnID]) status = REJECT; - else glove_ghostcheck(); + else { + my_mega_glove[0][my_num_mega] = rxnID; + for (int i = 0; i < onemol->natoms; i++) { + my_mega_glove[i+1][my_num_mega] = glove[i][1]; + } + my_num_mega++; + } } hang_catch++; // let's go ahead and catch the simplest of hangs @@ -1394,6 +1405,17 @@ void FixBondReact::superimpose_algorithm() global_megasize = 0; + memory->create(local_mega_glove,max_natoms+1,my_num_mega,"bond/react:local_mega_glove"); + memory->create(ghostly_mega_glove,max_natoms+1,my_num_mega,"bond/react:ghostly_mega_glove"); + + for (int i = 0; i < max_natoms+1; i++) { + for (int j = 0; j < my_num_mega; j++) { + local_mega_glove[i][j] = 0; + ghostly_mega_glove[i][j] = 0; + } + } + + glove_ghostcheck(); // split into 'local' and 'global' ghost_glovecast(); // consolidate all mega_gloves to all processors dedup_mega_gloves(LOCAL); // make sure atoms aren't added to more than one reaction @@ -2803,40 +2825,45 @@ void FixBondReact::glove_ghostcheck() // here we add glove to either local_mega_glove or ghostly_mega_glove // ghostly_mega_glove includes atoms that are ghosts, either of this proc or another // 'ghosts of another' indication taken from comm->sendlist + // also includes local gloves that overlap with ghostly gloves, to get dedup right - int ghostly = 0; -#if !defined(MPI_STUBS) - if (comm->style == Comm::BRICK) { - if (create_atoms_flag[rxnID] == 1) { - ghostly = 1; - } else { - for (int i = 0; i < onemol->natoms; i++) { - int ilocal = atom->map(glove[i][1]); - if (ilocal >= atom->nlocal || localsendlist[ilocal] == 1) { - ghostly = 1; - break; + for (int i = 0; i < my_num_mega; i++) { + rxnID = my_mega_glove[0][i]; + onemol = atom->molecules[unreacted_mol[rxnID]]; + int ghostly = 0; + #if !defined(MPI_STUBS) + if (comm->style == Comm::BRICK) { + if (create_atoms_flag[rxnID] == 1) { + ghostly = 1; + } else { + for (int j = 0; j < onemol->natoms; j++) { + int ilocal = atom->map(my_mega_glove[j+1][i]); + if (ilocal >= atom->nlocal || localsendlist[ilocal] == 1) { + ghostly = 1; + break; + } } } + } else { + ghostly = 1; } - } else { - ghostly = 1; - } -#endif - - if (ghostly == 1) { - ghostly_mega_glove[0][ghostly_num_mega] = rxnID; - ghostly_rxn_count[rxnID]++; //for debuginng - for (int i = 0; i < onemol->natoms; i++) { - ghostly_mega_glove[i+1][ghostly_num_mega] = glove[i][1]; + #endif + + if (ghostly == 1) { + ghostly_mega_glove[0][ghostly_num_mega] = rxnID; + ghostly_rxn_count[rxnID]++; //for debuginng + for (int j = 0; j < onemol->natoms+1; j++) { + ghostly_mega_glove[j][ghostly_num_mega] = my_mega_glove[j][i]; + } + ghostly_num_mega++; + } else { + local_mega_glove[0][local_num_mega] = rxnID; + local_rxn_count[rxnID]++; //for debuginng + for (int j = 0; j < onemol->natoms+1; j++) { + local_mega_glove[j][local_num_mega] = my_mega_glove[j][i]; + } + local_num_mega++; } - ghostly_num_mega++; - } else { - local_mega_glove[0][local_num_mega] = rxnID; - local_rxn_count[rxnID]++; //for debuginng - for (int i = 0; i < onemol->natoms; i++) { - local_mega_glove[i+1][local_num_mega] = glove[i][1]; - } - local_num_mega++; } } diff --git a/src/REACTION/fix_bond_react.h b/src/REACTION/fix_bond_react.h index b434699ec7..e9b3ffb247 100644 --- a/src/REACTION/fix_bond_react.h +++ b/src/REACTION/fix_bond_react.h @@ -154,13 +154,15 @@ class FixBondReact : public Fix { int pion, neigh, trace; // important indices for various loops. required for restore points int lcl_inst; // reaction instance tagint **glove; // 1st colmn: pre-reacted template, 2nd colmn: global IDs - // for all mega_gloves and global_mega_glove: first row is the ID of bond/react - tagint **local_mega_glove; // consolidation local of reaction instances - tagint **ghostly_mega_glove; // consolidation nonlocal of reaction instances + // for all mega_gloves: first row is the ID of bond/react + tagint **my_mega_glove; // local + ghostly reaction instances + tagint **local_mega_glove; // consolidation of local reaction instances + tagint **ghostly_mega_glove; // consolidation of nonlocal reaction instances tagint **global_mega_glove; // consolidation (inter-processor) of gloves // containing nonlocal atoms int *localsendlist; // indicates ghosts of other procs + int my_num_mega; // local + ghostly reaction instances (on this proc) int local_num_mega; // num of local reaction instances int ghostly_num_mega; // num of ghostly reaction instances int global_megasize; // num of reaction instances in global_mega_glove From ddc23bb3bf23ae6b1cbac4222aa4464156bfef15 Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sun, 5 Feb 2023 15:14:57 -0500 Subject: [PATCH 146/445] refactor step 2: reorder when to dedup reactions --- src/REACTION/fix_bond_react.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index e7dee6ea55..5da34aae21 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -1415,9 +1415,9 @@ void FixBondReact::superimpose_algorithm() } } + dedup_mega_gloves(LOCAL); // make sure atoms aren't added to more than one reaction glove_ghostcheck(); // split into 'local' and 'global' ghost_glovecast(); // consolidate all mega_gloves to all processors - dedup_mega_gloves(LOCAL); // make sure atoms aren't added to more than one reaction MPI_Allreduce(&local_rxn_count[0],&reaction_count[0],nreacts,MPI_INT,MPI_SUM,world); @@ -2661,14 +2661,14 @@ void FixBondReact::dedup_mega_gloves(int dedup_mode) { // dedup_mode == LOCAL for local_dedup // dedup_mode == GLOBAL for global_mega_glove - for (int i = 0; i < nreacts; i++) { - if (dedup_mode == LOCAL) local_rxn_count[i] = 0; - if (dedup_mode == GLOBAL) ghostly_rxn_count[i] = 0; - } + + if (dedup_mode == GLOBAL) + for (int i = 0; i < nreacts; i++) + ghostly_rxn_count[i] = 0; int dedup_size = 0; if (dedup_mode == LOCAL) { - dedup_size = local_num_mega; + dedup_size = my_num_mega; } else if (dedup_mode == GLOBAL) { dedup_size = global_megasize; } @@ -2679,7 +2679,7 @@ void FixBondReact::dedup_mega_gloves(int dedup_mode) if (dedup_mode == LOCAL) { for (int i = 0; i < dedup_size; i++) { for (int j = 0; j < max_natoms+1; j++) { - dedup_glove[j][i] = local_mega_glove[j][i]; + dedup_glove[j][i] = my_mega_glove[j][i]; } } } else if (dedup_mode == GLOBAL) { @@ -2742,17 +2742,16 @@ void FixBondReact::dedup_mega_gloves(int dedup_mode) // we must update local_mega_glove and local_megasize // we can simply overwrite local_mega_glove column by column if (dedup_mode == LOCAL) { - int new_local_megasize = 0; - for (int i = 0; i < local_num_mega; i++) { + int my_new_megasize = 0; + for (int i = 0; i < my_num_mega; i++) { if (dedup_mask[i] == 0) { - local_rxn_count[(int) dedup_glove[0][i]]++; for (int j = 0; j < max_natoms+1; j++) { - local_mega_glove[j][new_local_megasize] = dedup_glove[j][i]; + my_mega_glove[j][my_new_megasize] = dedup_glove[j][i]; } - new_local_megasize++; + my_new_megasize++; } } - local_num_mega = new_local_megasize; + my_num_mega = my_new_megasize; } // we must update global_mega_glove and global_megasize @@ -2827,6 +2826,9 @@ void FixBondReact::glove_ghostcheck() // 'ghosts of another' indication taken from comm->sendlist // also includes local gloves that overlap with ghostly gloves, to get dedup right + for (int i = 0; i < nreacts; i++) + local_rxn_count[i] = 0; + for (int i = 0; i < my_num_mega; i++) { rxnID = my_mega_glove[0][i]; onemol = atom->molecules[unreacted_mol[rxnID]]; @@ -2851,14 +2853,13 @@ void FixBondReact::glove_ghostcheck() if (ghostly == 1) { ghostly_mega_glove[0][ghostly_num_mega] = rxnID; - ghostly_rxn_count[rxnID]++; //for debuginng for (int j = 0; j < onemol->natoms+1; j++) { ghostly_mega_glove[j][ghostly_num_mega] = my_mega_glove[j][i]; } ghostly_num_mega++; } else { local_mega_glove[0][local_num_mega] = rxnID; - local_rxn_count[rxnID]++; //for debuginng + local_rxn_count[rxnID]++; for (int j = 0; j < onemol->natoms+1; j++) { local_mega_glove[j][local_num_mega] = my_mega_glove[j][i]; } From 3955bc8bfe45feb1dea17d03ef1f35dd7ab64b33 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 5 Feb 2023 18:09:36 -0500 Subject: [PATCH 147/445] revise a chunk of Howto pages with the help of languagetool.org --- doc/src/Howto.rst | 8 +-- doc/src/Howto_bpm.rst | 58 ++++++++++--------- doc/src/Howto_broken_bonds.rst | 16 +++--- doc/src/Howto_couple.rst | 56 +++++++++--------- doc/src/Howto_library.rst | 18 +++--- doc/src/Howto_mdi.rst | 100 ++++++++++++++++----------------- doc/src/Howto_multiple.rst | 2 +- doc/src/Howto_replica.rst | 4 +- doc/src/Howto_restart.rst | 13 +++-- doc/src/Howto_viz.rst | 42 +++++--------- 10 files changed, 153 insertions(+), 164 deletions(-) diff --git a/doc/src/Howto.rst b/doc/src/Howto.rst index 9423f0dd33..f229deafb3 100644 --- a/doc/src/Howto.rst +++ b/doc/src/Howto.rst @@ -4,10 +4,10 @@ Howto discussions These doc pages describe how to perform various tasks with LAMMPS, both for users and developers. The `glossary `_ website page also lists MD -terminology with links to corresponding LAMMPS manual pages. The -example input scripts included in the examples directory of the LAMMPS -distribution and highlighted on the :doc:`Examples ` doc page -also show how to setup and run various kinds of simulations. +terminology, with links to corresponding LAMMPS manual pages. The +example input scripts included in the ``examples`` directory of the LAMMPS +source code distribution and highlighted on the :doc:`Examples` page +also show how to set up and run various kinds of simulations. General howto ============= diff --git a/doc/src/Howto_bpm.rst b/doc/src/Howto_bpm.rst index 46e7e70131..8b84e96b99 100644 --- a/doc/src/Howto_bpm.rst +++ b/doc/src/Howto_bpm.rst @@ -3,16 +3,16 @@ Bonded particle models The BPM package implements bonded particle models which can be used to simulate mesoscale solids. Solids are constructed as a collection of -particles which each represent a coarse-grained region of space much -larger than the atomistic scale. Particles within a solid region are +particles, which each represent a coarse-grained region of space much +larger than the atomistic scale. Particles within a solid region are then connected by a network of bonds to provide solid elasticity. Unlike traditional bonds in molecular dynamics, the equilibrium bond length can vary between bonds. Bonds store the reference state. This includes setting the equilibrium length equal to the initial distance -between the two particles but can also include data on the bond -orientation for rotational models. This produces a stress free initial -state. Furthermore, bonds are allowed to break under large strains +between the two particles, but can also include data on the bond +orientation for rotational models. This produces a stress-free initial +state. Furthermore, bonds are allowed to break under large strains, producing fracture. The examples/bpm directory has sample input scripts for simulations of the fragmentation of an impacted plate and the pouring of extended, elastic bodies. @@ -22,8 +22,8 @@ pouring of extended, elastic bodies. Bonds can be created using a :doc:`read data ` or :doc:`create bonds ` command. Alternatively, a :doc:`molecule ` template with bonds can be used with -:doc:`fix deposit ` or :doc:`fix pour ` to -create solid grains. +:doc:`fix deposit ` or :doc:`fix pour ` to create +solid grains. In this implementation, bonds store their reference state when they are first computed in the setup of the first simulation run. Data is then @@ -35,21 +35,20 @@ such as those created by pouring grains using :doc:`fix pour ---------- -Currently there are two types of bonds included in the BPM -package. The first bond style, :doc:`bond bpm/spring -`, only applies pairwise, central body forces. Point -particles must have :doc:`bond atom style ` and may be -thought of as nodes in a spring network. Alternatively, the second -bond style, :doc:`bond bpm/rotational `, resolves -tangential forces and torques arising with the shearing, bending, and -twisting of the bond due to rotation or displacement of particles. -Particles are similar to those used in the :doc:`granular package -`, :doc:`atom style sphere `. However, -they must also track the current orientation of particles and store bonds -and therefore use a :doc:`bpm/sphere atom style `. -This also requires a unique integrator :doc:`fix nve/bpm/sphere -` which numerically integrates orientation similar -to :doc:`fix nve/asphere `. +Currently, there are two types of bonds included in the BPM package. The +first bond style, :doc:`bond bpm/spring `, only applies +pairwise, central body forces. Point particles must have :doc:`bond atom +style ` and may be thought of as nodes in a spring +network. Alternatively, the second bond style, :doc:`bond bpm/rotational +`, resolves tangential forces and torques arising +with the shearing, bending, and twisting of the bond due to rotation or +displacement of particles. Particles are similar to those used in the +:doc:`granular package `, :doc:`atom style sphere +`. However, they must also track the current orientation of +particles and store bonds, and therefore use a :doc:`bpm/sphere atom +style `. This also requires a unique integrator :doc:`fix +nve/bpm/sphere ` which numerically integrates +orientation similar to :doc:`fix nve/asphere `. In addition to bond styles, a new pair style :doc:`pair bpm/spring ` was added to accompany the bpm/spring bond @@ -63,7 +62,7 @@ A list of IDs for bonded atoms can be generated using the :doc:`compute property/local ` command. Various properties of bonds can be computed using the :doc:`compute bond/local ` command. This -command allows one to access data saved to the bond's history +command allows one to access data saved to the bond's history, such as the reference length of the bond. More information on bond history data can be found on the documentation pages for the specific BPM bond styles. Finally, this data can be output using a :doc:`dump local ` @@ -90,7 +89,7 @@ bond settings Alternatively, one can turn off all pair interactions between bonded particles. Unlike :doc:`bond quartic `, this is not done -by subtracting pair forces during the bond computation but rather by +by subtracting pair forces during the bond computation, but rather by dynamically updating the special bond list. This is the default behavior of BPM bond styles and is done by updating the 1-2 special bond list as bonds break. To do this, LAMMPS requires :doc:`newton ` bond off @@ -134,7 +133,10 @@ the following are currently compatible with BPM bond styles: * :doc:`fix bond/break ` * :doc:`fix bond/swap ` -Note :doc:`create_bonds ` requires certain special_bonds settings. -To subtract pair interactions, one will need to switch between different -special_bonds settings in the input script. An example is found in -examples/bpm/impact. +.. note:: + + The :doc:`create_bonds ` command requires certain + :doc:`special_bonds ` settings. To subtract pair + interactions, one will need to switch between different *special_bonds* + settings in the input script. An example is found in + ``examples/bpm/impact``. diff --git a/doc/src/Howto_broken_bonds.rst b/doc/src/Howto_broken_bonds.rst index 1a356df510..88c8acb87f 100644 --- a/doc/src/Howto_broken_bonds.rst +++ b/doc/src/Howto_broken_bonds.rst @@ -1,15 +1,15 @@ Broken Bonds ============ -Typically, bond interactions persist for the duration of a simulation -in LAMMPS. However, there are some exceptions that allow for bonds to -break including the :doc:`quartic bond style ` and the +Typically, bond interactions persist for the duration of a simulation in +LAMMPS. However, there are some exceptions that allow for bonds to +break, including the :doc:`quartic bond style ` and the bond styles in the :doc:`BPM package ` which contains the -:doc:`bpm/spring ` and -:doc:`bpm/rotational ` bond styles. In these cases, -a bond can be broken if it is stretched beyond a user-defined threshold. -LAMMPS accomplishes this by setting the bond type to zero such that the -bond force is no longer computed. +:doc:`bpm/spring ` and :doc:`bpm/rotational +` bond styles. In these cases, a bond can be broken +if it is stretched beyond a user-defined threshold. LAMMPS accomplishes +this by setting the bond type to 0, such that the bond force is no +longer computed. Users are normally able to weight the contribution of pair forces to atoms that are bonded using the :doc:`special_bonds command `. diff --git a/doc/src/Howto_couple.rst b/doc/src/Howto_couple.rst index 2f24fa93f8..4cd764adf1 100644 --- a/doc/src/Howto_couple.rst +++ b/doc/src/Howto_couple.rst @@ -1,27 +1,27 @@ Coupling LAMMPS to other codes ============================== -LAMMPS is designed to allow it to be coupled to other codes. For +LAMMPS is designed to support being coupled to other codes. For example, a quantum mechanics code might compute forces on a subset of atoms and pass those forces to LAMMPS. Or a continuum finite element (FE) simulation might use atom positions as boundary conditions on FE nodal points, compute a FE solution, and return interpolated forces on MD atoms. -LAMMPS can be coupled to other codes in at least 4 ways. Each has -advantages and disadvantages, which you will have to think about in the -context of your application. +LAMMPS can be coupled to other codes in at least 4 different ways. Each +has advantages and disadvantages, which you will have to think about in +the context of your application. -1. Define a new :doc:`fix ` command that calls the other code. - In this scenario, LAMMPS is the driver code. During timestepping, - the fix is invoked, and can make library calls to the other code, - which has been linked to LAMMPS as a library. This is the way the +1. Define a new :doc:`fix ` command that calls the other code. In + this scenario, LAMMPS is the driver code. During timestepping, the + fix is invoked, and can make library calls to the other code, which + has been linked to LAMMPS as a library. This is the way the :ref:`LATTE ` package, which performs density-functional tight-binding calculations using the `LATTE software - `_ to compute forces, is hooked to + `_ to compute forces, is interfaced to LAMMPS. See the :doc:`fix latte ` command for more - details. Also see the :doc:`Modify ` doc pages for info on - how to add a new fix to LAMMPS. + details. Also see the :doc:`Modify ` pages for information + on how to add a new fix to LAMMPS. .. spacer @@ -42,28 +42,26 @@ context of your application. stand-alone code could communicate with LAMMPS through files that the command writes and reads. - See the :doc:`Modify command ` page for info on how - to add a new command to LAMMPS. + See the :doc:`Modify command ` page for information + on how to add a new command to LAMMPS. .. spacer -3. Use LAMMPS as a library called by another code. In this case the - other code is the driver and calls LAMMPS as needed. Or a wrapper - code could link and call both LAMMPS and another code as libraries. - Again, the :doc:`run ` command has options that allow it to be - invoked with minimal overhead (no setup or clean-up) if you wish to - do multiple short runs, driven by another program. Details about - using the library interface are given in the :doc:`library API - ` documentation. +3. Use LAMMPS as a library called by another code. In this case, the + other code is the driver and calls LAMMPS as needed. Alternately, a + wrapper code could link and call both LAMMPS and another code as + libraries. Again, the :doc:`run ` command has options that + allow it to be invoked with minimal overhead (no setup or clean-up) + if you wish to do multiple short runs, driven by another program. + Details about using the library interface are given in the + :doc:`library API ` documentation. .. spacer -4. Couple LAMMPS with another code in a client/server fashion, using - using the `MDI Library - `_ +4. Couple LAMMPS with another code in a client/server fashion, using the + `MDI Library `_ developed by the `Molecular Sciences Software Institute (MolSSI) - `_ to run LAMMPS as either an MDI driver - (client) or an MDI engine (server). The MDI driver issues commands - to the MDI server to exchange data between them. See the - :doc:`Howto mdi ` page for more information about how - LAMMPS can operate in either of these modes. + `_ to run LAMMPS as either an MDI driver (client) + or an MDI engine (server). The MDI driver issues commands to the MDI + server to exchange data between them. See the :doc:`Howto_mdi` page for + more information about how LAMMPS can operate in either of these modes. diff --git a/doc/src/Howto_library.rst b/doc/src/Howto_library.rst index f63ea64a1b..9b62f0824f 100644 --- a/doc/src/Howto_library.rst +++ b/doc/src/Howto_library.rst @@ -6,22 +6,22 @@ can be built as a static or shared library, so that it can be called by another code, used in a :doc:`coupled manner ` with other codes, or driven through a :doc:`Python interface `. -At the core of LAMMPS is the ``LAMMPS`` class which encapsulates the +At the core of LAMMPS is the ``LAMMPS`` class, which encapsulates the state of the simulation program through the state of the various class instances that it is composed of. So a calculation using LAMMPS -requires to create an instance of the ``LAMMPS`` class and then send it +requires creating an instance of the ``LAMMPS`` class and then send it (text) commands, either individually or from a file, or perform other operations that modify the state stored inside that instance or drive -simulations. This is essentially what the ``src/main.cpp`` file does -as well for the standalone LAMMPS executable with reading commands -either from an input file or stdin. +simulations. This is essentially what the ``src/main.cpp`` file does as +well for the standalone LAMMPS executable, reading commands either from +an input file or the standard input. Creating a LAMMPS instance can be done by using C++ code directly or through a C-style interface library to LAMMPS that is provided in the -files ``src/library.cpp`` and ``library.h``. This -:ref:`C language API `, can be used from C and C++, -and is also the basis for the :doc:`Python ` and -:doc:`Fortran ` interfaces or wrappers included in the +files ``src/library.cpp`` and ``src/library.h``. This :ref:`C language +API `, can be used from C and C++, and is also the basis +for the :doc:`Python ` and :doc:`Fortran ` +interfaces or the :ref:`SWIG based wrappers ` included in the LAMMPS source code. The ``examples/COUPLE`` and ``python/examples`` directories contain some diff --git a/doc/src/Howto_mdi.rst b/doc/src/Howto_mdi.rst index 9a26aa9243..9cc947d8aa 100644 --- a/doc/src/Howto_mdi.rst +++ b/doc/src/Howto_mdi.rst @@ -12,11 +12,11 @@ developed by the `Molecular Sciences Software Institute (MolSSI) `_, which is supported by the :ref:`MDI ` package. -Alternate methods for code coupling with LAMMPS are described on the -:doc:`Howto couple ` doc page. +Alternate methods for coupling codes with LAMMPS are described on the +:doc:`Howto_couple` page. Some advantages of client/server coupling are that the codes can run -as stand-alone executables; they need not be linked together. Thus +as stand-alone executables; they need not be linked together. Thus, neither code needs to have a library interface. This also makes it easy to run the two codes on different numbers of processors. If a message protocol (format and content) is defined for a particular kind @@ -41,7 +41,7 @@ within that sub-communicator exchange messages with the corresponding engine instance, and can also send MPI messages to other processors in the driver. The driver code can also destroy engine instances and re-instantiate them. LAMMPS can operate as either a stand-alone or -plugin MDI engine. When it operates as a driver, if can use either +plugin MDI engine. When it operates as a driver, it can use either stand-alone or plugin MDI engines. The way in which an MDI driver communicates with an MDI engine is by @@ -50,83 +50,83 @@ to MPI_Send() and MPI_Recv() calls. Each send or receive operation uses a string to identify the command name, and optionally some data, which can be a single value or vector of values of any data type. Inside the MDI library, data is exchanged between the driver and -engine via MPI calls or sockets. This a run-time choice by the user. +engine via MPI calls or sockets. This is a run-time choice by the user. ---------- The :ref:`MDI ` package provides a :doc:`mdi engine ` -command which enables LAMMPS to operate as an MDI engine. Its doc +command, which enables LAMMPS to operate as an MDI engine. Its doc page explains the variety of standard and custom MDI commands which the LAMMPS engine recognizes and can respond to. -The package also provides a :doc:`mdi plugin ` command which +The package also provides a :doc:`mdi plugin ` command, which enables LAMMPS to operate as an MDI driver and load an MDI engine as a plugin library. -The package also has a `fix mdi/qm ` command in which -LAMMPS operates as an MDI driver in conjunction with a quantum +The package furthermore includes a `fix mdi/qm ` command, in +which LAMMPS operates as an MDI driver in conjunction with a quantum mechanics code as an MDI engine. The post_force() method of the -fix_mdi_qm.cpp file shows how a driver issues MDI commands to another -code. This command can be used to couple to an MDI engine which is +``fix_mdi_qm.cpp`` file shows how a driver issues MDI commands to another +code. This command can be used to couple to an MDI engine, which is either a stand-alone code or a plugin library. -As explained on the `fix mdi/qm ` command doc page, it can -be used to perform *ab initio* MD simulations or energy minimizations, -or to evaluate the quantum energy and forces for a series of -independent systems. The examples/mdi directory has example input -scripts for all of these use cases. +As explained in the `fix mdi/qm ` command documentation, it +can be used to perform *ab initio* MD simulations or energy +minimizations, or to evaluate the quantum energy and forces for a series +of independent systems. The ``examples/mdi`` directory has example +input scripts for all of these use cases. ---------- The examples/mdi directory contains Python scripts and LAMMPS input -script which use LAMMPS as either an MDI driver or engine or both. +script which use LAMMPS as either an MDI driver or engine, or both. Currently, 5 example use cases are provided: -* Run ab initio MD (AIMD) using 2 instances of LAMMPS. As a driver +* Run ab initio MD (AIMD) using 2 instances of LAMMPS. As a driver, LAMMPS performs the timestepping in either NVE or NPT mode. As an engine, LAMMPS computes forces and is a surrogate for a quantum code. -* As a driver, LAMMPS runs an MD simulation. Every N steps it passes - the current snapshot to an MDI engine to evaluate the energy, - virial, and peratom forces. As the engine LAMMPS is a surrogate for - a quantum code. - -* As a driver, LAMMPS loops over a series of data files and passes the - configuration to an MDI engine to evaluate the energy, virial, and - peratom forces. As the engine LAMMPS is a surrogate for a quantum +* LAMMPS runs an MD simulation as a driver. Every N steps it passes the + current snapshot to an MDI engine to evaluate the energy, virial, and + peratom forces. As the engine, LAMMPS is a surrogate for a quantum code. +* LAMMPS loops over a series of data files and passes the configuration + to an MDI engine to evaluate the energy, virial, and peratom forces + and thus acts as a simulation driver. As the engine, LAMMPS is used + as a surrogate for a quantum code. + * A Python script driver invokes a sequence of unrelated LAMMPS calculations. Calculations can be single-point energy/force evaluations, MD runs, or energy minimizations. -* Run AIMD with a Python driver code and 2 LAMMPS instances as - engines. The first LAMMPS instance performs MD timestepping. The - second LAMMPS instance acts as a surrogate QM code to compute - forces. +* Run AIMD with a Python driver code and 2 LAMMPS instances as engines. + The first LAMMPS instance performs MD timestepping. The second LAMMPS + instance acts as a surrogate QM code to compute forces. -Note that in any of these example where LAMMPS is used as an engine, -an actual QM code (which supports MDI) could be used in its place, -without modifying the input scripts or launch commands, except to -specify the name of the QM code. +.. note:: -The examples/mdi/Run.sh file illustrates how to launch both driver and -engine codes so that they communicate using the MDI library via either -MPI or sockets. Or using the engine as a stand-alone code or plugin -library. + In any of these example where LAMMPS is used as an engine, an actual + QM code (proivded it has support for MDI) could be used in its place, + without modifying the input scripts or launch commands, except to + specify the name of the QM code. + +The ``examples/mdi/Run.sh`` file illustrates how to launch both driver +and engine codes so that they communicate using the MDI library via +either MPI or sockets, or using the engine as a stand-alone code, or +as a plugin library. ------------- -Currently there are at least two quantum DFT codes which have direct -MDI support, `Quantum ESPRESSO (QE) -`_ and `INQ -`_. There are also several QM -codes which have indirect support through QCEngine or i-PI. The -former means they require a wrapper program (QCEngine) with MDI -support which writes/read files to pass data to the quantum code -itself. The list of QCEngine-supported and i-PI-supported quantum -codes is on the `MDI webpage +Currently, there are at least two quantum DFT codes which have direct MDI +support, `Quantum ESPRESSO (QE) `_ +and `INQ `_. There are also several +QM codes which have indirect support through QCEngine or i-PI. The +former means they require a wrapper program (QCEngine) with MDI support +which writes/read files to pass data to the quantum code itself. The +list of QCEngine-supported and i-PI-supported quantum codes is on the +`MDI webpage `_. Here is how to build QE as a stand-alone ``pw.x`` file which can be @@ -138,7 +138,7 @@ used in stand-alone mode: build the executable pw.x, following the `QE build guide `_ Here is how to build QE as a shared library which can be used in plugin mode, -which results in a libqemdi.so file in /q-e/MDI/src: +which results in a ``libqemdi.so`` file in ``/q-e/MDI/src``: .. code-block:: bash @@ -149,8 +149,8 @@ which results in a libqemdi.so file in /q-e/MDI/src: INQ cannot be built as a stand-alone code; it is by design a library. Here is how to build INQ as a shared library which can be used in -plugin mode, which results in a libinqmdi.so file in -/inq/build/examples: +plugin mode, which results in a ``libinqmdi.so`` file in +``/inq/build/examples``: .. code-block:: bash diff --git a/doc/src/Howto_multiple.rst b/doc/src/Howto_multiple.rst index f86bcccca4..a0680ccd42 100644 --- a/doc/src/Howto_multiple.rst +++ b/doc/src/Howto_multiple.rst @@ -4,7 +4,7 @@ Run multiple simulations from one input script This can be done in several ways. See the documentation for individual commands for more details on how these examples work. -If "multiple simulations" means continue a previous simulation for +If "multiple simulations" means to continue a previous simulation for more timesteps, then you simply use the :doc:`run ` command multiple times. For example, this script diff --git a/doc/src/Howto_replica.rst b/doc/src/Howto_replica.rst index d286762e01..5504133426 100644 --- a/doc/src/Howto_replica.rst +++ b/doc/src/Howto_replica.rst @@ -47,9 +47,9 @@ script which is required when running in multi-replica mode. Also note that with MPI installed on a machine (e.g. your desktop), you can run on more (virtual) processors than you have physical processors. -Thus the above commands could be run on a single-processor (or +Thus, the above commands could be run on a single-processor (or few-processor) desktop so that you can run a multi-replica simulation on more replicas than you have physical processors. This is useful for testing and debugging, since with most modern processors and MPI -libraries the efficiency of a calculation can severely diminish when +libraries, the efficiency of a calculation can severely diminish when oversubscribing processors. diff --git a/doc/src/Howto_restart.rst b/doc/src/Howto_restart.rst index 25f311f5a7..545e98137c 100644 --- a/doc/src/Howto_restart.rst +++ b/doc/src/Howto_restart.rst @@ -7,8 +7,9 @@ run will continue from where the previous run left off. Or binary restart files can be saved to disk using the :doc:`restart ` command. At a later time, these binary files can be read via a :doc:`read_restart ` command in a new script. Or they can -be converted to text data files using the :doc:`-r command-line switch ` and read by a :doc:`read_data ` -command in a new script. +be converted to text data files using the :doc:`-r command-line switch +` and read by a :doc:`read_data ` command in a +new script. Here we give examples of 2 scripts that read either a binary restart file or a converted data file and then issue a new run command to @@ -47,7 +48,7 @@ last 50 timesteps: Note that the following commands do not need to be repeated because their settings are included in the restart file: *units, atom_style, -special_bonds, pair_style, bond_style*. However these commands do +special_bonds, pair_style, bond_style*. However, these commands do need to be used, since their settings are not in the restart file: *neighbor, fix, timestep*\ . @@ -90,7 +91,7 @@ Then, this script could be used to re-run the last 50 steps: Note that nearly all the settings specified in the original *in.chain* script must be repeated, except the *pair_coeff* and *bond_coeff* -commands since the new data file lists the force field coefficients. +commands, since the new data file lists the force field coefficients. Also, the :doc:`reset_timestep ` command is used to tell -LAMMPS the current timestep. This value is stored in restart files, -but not in data files. +LAMMPS the current timestep. This value is stored in restart files, but +not in data files. diff --git a/doc/src/Howto_viz.rst b/doc/src/Howto_viz.rst index 28ecbfb838..5de8b000a1 100644 --- a/doc/src/Howto_viz.rst +++ b/doc/src/Howto_viz.rst @@ -1,33 +1,21 @@ Visualize LAMMPS snapshots ========================== -LAMMPS itself does not do visualization, but snapshots from LAMMPS -simulations can be visualized (and analyzed) in a variety of ways. +Snapshots from LAMMPS simulations can be viewed, visualized, and +analyzed in a variety of ways. -Mention dump image and dump movie. +LAMMPS snapshots are created by the :doc:`dump ` command, which +can create files in several formats. The native LAMMPS dump format is a +text file (see "dump atom" or "dump custom") which can be visualized by +`several visualization tools `_ for MD +simulation trajectories. `OVITO `_ and `VMD +`_ seem to be the most popular +choices among them. -LAMMPS snapshots are created by the :doc:`dump ` command which can -create files in several formats. The native LAMMPS dump format is a -text file (see "dump atom" or "dump custom") which can be visualized -by several popular visualization tools. The :doc:`dump image ` and :doc:`dump movie ` styles can -output internally rendered images and convert a sequence of them to a -movie during the MD run. Several programs included with LAMMPS as -auxiliary tools can convert between LAMMPS format files and other -formats. See the :doc:`Tools ` page for details. +The :doc:`dump image ` and :doc:`dump movie ` +styles can output internally rendered images or convert them to a movie +during the MD run. -A Python-based toolkit distributed by our group can read native LAMMPS -dump files, including custom dump files with additional columns of -user-specified atom information, and convert them to various formats or -pipe them into visualization software directly. See the `Pizza.py WWW -site `_ for details. Specifically, Pizza.py can convert LAMMPS -dump files into PDB, XYZ, `EnSight `_, and VTK formats. -Pizza.py can pipe LAMMPS dump files directly into the Raster3d and -RasMol visualization programs. Pizza.py has tools that do interactive -3d OpenGL visualization and one that creates SVG images of dump file -snapshots. - -.. _pizza: https://lammps.github.io/pizza - -.. _ensight: https://www.ansys.com/products/fluids/ansys-ensight - -.. _atomeye: http://li.mit.edu/Archive/Graphics/A/ +Programs included with LAMMPS as auxiliary tools can convert +between LAMMPS format files and other formats. See the :doc:`Tools +` page for details. These are rarely needed these days. From fb5c0a4c8765c15a330f2683c5c9b77f57d3fa37 Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Mon, 6 Feb 2023 15:34:58 +1000 Subject: [PATCH 148/445] Correct typos and clarify fix_controller.rst Fixes some typos and adds math expression c_0 for the initial control variable value; removes the "E-hat" term from equations (which doesn't appear elsewhere in the support doc or the source code) --- doc/src/fix_controller.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/fix_controller.rst b/doc/src/fix_controller.rst index 0ff38ae010..d03d9a123c 100644 --- a/doc/src/fix_controller.rst +++ b/doc/src/fix_controller.rst @@ -96,7 +96,7 @@ the following dynamic equation: .. math:: - \frac{dc}{dt} = \hat{E} -\alpha (K_p e + K_i \int_0^t e \, dt + K_d \frac{de}{dt} ) + \frac{dc}{dt} = -\alpha (K_p e + K_i \int_0^t e \, dt + K_d \frac{de}{dt} ) where *c* is the continuous time analog of the control variable, *e* =\ *pvar*\ -\ *setpoint* is the error in the process variable, and @@ -106,7 +106,7 @@ keywords described above. The discretized version of this equation is: .. math:: - c_n = \hat{E} c_{n-1} -\alpha \left( K_p \tau e_n + K_i \tau^2 \sum_{i=1}^n e_i + K_d (e_n - e_{n-1}) \right) + c_n = c_{n-1} -\alpha \left( K_p \tau e_n + K_i \tau^2 \sum_{i=1}^n e_i + K_d (e_n - e_{n-1}) \right) where :math:`\tau = \mathtt{Nevery} \cdot \mathtt{timestep}` is the time interval between updates, @@ -129,7 +129,7 @@ magnitudes and signs of *pvar* and *cvar*\ . The magnitude of :math:`K_p` should then be tested over a large positive range keeping :math:`K_i = K_d =0`. A good value for :math:`K_p` will produce a fast response in *pvar*, without overshooting the *setpoint*\ . For many applications, proportional -feedback is sufficient, and so :math:`K_i` = K_d =0` can be used. In cases +feedback is sufficient, and so :math:`K_i = K_d =0` can be used. In cases where there is a substantial lag time in the response of *pvar* to a change in *cvar*, this can be counteracted by increasing :math:`K_d`. In situations where *pvar* plateaus without reaching *setpoint*, this can be @@ -138,12 +138,12 @@ counteracted by increasing :math:`K_i`. In the language of Charles Dickens, the past, and :math:`K_d` the error yet to come. Because this fix updates *cvar*, but does not initialize its value, -the initial value is that assigned by the user in the input script via +the initial value :math:`c_0` is that assigned by the user in the input script via the :doc:`internal-style variable ` command. This value is -used (by the other LAMMPS command that used the variable) until this +used (by every other LAMMPS command that uses the variable) until this fix performs its first update of *cvar* after *Nevery* timesteps. On the first update, the value of the derivative term is set to zero, -because the value of :math:`e_n-1` is not yet defined. +because the value of :math:`e_{n-1}` is not yet defined. ---------- From 955004afc5e7cb52db58f8baf2a56c8bb8a2f241 Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Mon, 6 Feb 2023 15:42:41 +1000 Subject: [PATCH 149/445] Align fix_controller.cpp with documentation Documentation for `fix controller` says that the first calculation of error contributes to the integral term (in equation 2, at $n = 1$). Either the code should be changed to reflect this, or the documentation should be changed to reflect what the code currently does (i.e. start from $n = 2$ in the finite-difference integral term). --- src/EXTRA-FIX/fix_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EXTRA-FIX/fix_controller.cpp b/src/EXTRA-FIX/fix_controller.cpp index 18bc30c23d..22aecd0c13 100644 --- a/src/EXTRA-FIX/fix_controller.cpp +++ b/src/EXTRA-FIX/fix_controller.cpp @@ -215,8 +215,8 @@ void FixController::end_of_step() deltaerr = sumerr = 0.0; } else { deltaerr = err - olderr; - sumerr += err; } + sumerr += err; // 3 terms of PID equation From cd093d94b9d906b38a0cc1e34df97902845412d9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Feb 2023 11:12:02 -0500 Subject: [PATCH 150/445] add versionadded tag to "maxtry" option --- doc/src/create_atoms.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/src/create_atoms.rst b/doc/src/create_atoms.rst index 2e96a8a336..5d1e7c872c 100644 --- a/doc/src/create_atoms.rst +++ b/doc/src/create_atoms.rst @@ -421,6 +421,8 @@ non-overlapping criterion. above about systems with overlapped particles for alternate strategies that allow for overlapped insertions. +.. versionadded:: 2Jun2022 + The *maxtry* keyword only applies to the *random* style. It limits the number of attempts to generate valid coordinates for a single new particle that satisfy all requirements imposed by the *region*, *var*, From 83831ca222efeddd95c3bcf99a8d8872668321a5 Mon Sep 17 00:00:00 2001 From: Aidan Thompson Date: Mon, 6 Feb 2023 10:23:22 -0700 Subject: [PATCH 151/445] Update variable.cpp I remembered that I forgot to remove these commented printf() calls. --- src/variable.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/variable.cpp b/src/variable.cpp index 134d80af11..2d6d4694d1 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -771,10 +771,8 @@ int Variable::next(int narg, char **arg) error->one(FLERR,"Unexpected error while incrementing uloop style variable. " "Please contact the LAMMPS developers."); - //printf("READ %d %d\n",universe->me,nextindex); fp = fopen("tmp.lammps.variable.lock","w"); fprintf(fp,"%d\n",nextindex+1); - //printf("WRITE %d %d\n",universe->me,nextindex+1); fclose(fp); fp = nullptr; rename("tmp.lammps.variable.lock","tmp.lammps.variable"); From 9c2fe48a7b6e687ed71d1ceebad65d96dde280ae Mon Sep 17 00:00:00 2001 From: Aidan Thompson Date: Mon, 6 Feb 2023 10:55:18 -0700 Subject: [PATCH 152/445] Update Howto_mdi.rst --- doc/src/Howto_mdi.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/Howto_mdi.rst b/doc/src/Howto_mdi.rst index 9cc947d8aa..0e09ff2841 100644 --- a/doc/src/Howto_mdi.rst +++ b/doc/src/Howto_mdi.rst @@ -107,8 +107,8 @@ Currently, 5 example use cases are provided: .. note:: - In any of these example where LAMMPS is used as an engine, an actual - QM code (proivded it has support for MDI) could be used in its place, + In any of these examples where LAMMPS is used as an engine, an actual + QM code (provided it has support for MDI) could be used in its place, without modifying the input scripts or launch commands, except to specify the name of the QM code. From acf7f9184d01e663efae544fdc2afee20793e7b8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Feb 2023 18:40:59 -0500 Subject: [PATCH 153/445] fix failing unit tests with OpenCL --- lib/gpu/lal_beck.cu | 8 ++++---- lib/gpu/lal_colloid.cu | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/gpu/lal_beck.cu b/lib/gpu/lal_beck.cu index a2a15e4d21..12f1314c52 100644 --- a/lib/gpu/lal_beck.cu +++ b/lib/gpu/lal_beck.cu @@ -88,7 +88,7 @@ __kernel void k_beck(const __global numtyp4 *restrict x_, numtyp alphaij = beck1[mtype].y; numtyp betaij = beck1[mtype].z; numtyp term1 = aaij*aaij + rsq; - numtyp term2 = pow(term1,(numtyp)-5.0); + numtyp term2 = (numtyp)1.0/(term1*term1*term1*term1*term1); // ucl_powr(term1,(numtyp)-5.0); numtyp term3 = (numtyp)21.672 + (numtyp)30.0*aaij*aaij + (numtyp)6.0*rsq; numtyp term4 = alphaij + r5*betaij; numtyp term5 = alphaij + (numtyp)6.0*r5*betaij; @@ -102,7 +102,7 @@ __kernel void k_beck(const __global numtyp4 *restrict x_, f.z+=delz*force; if (EVFLAG && eflag) { - numtyp term6 = pow(term1,(numtyp)-3); + numtyp term6 = (numtyp)1.0/(term1*term1*term1); //ucl_powr(term1,(numtyp)-3); numtyp term1inv = ucl_recip(term1); numtyp e = beck2[mtype].x*ucl_exp((numtyp)-1.0*r*term4); e -= beck2[mtype].y*term6*((numtyp)1.0+((numtyp)2.709+(numtyp)3.0*aaij*aaij)*term1inv); @@ -193,7 +193,7 @@ __kernel void k_beck_fast(const __global numtyp4 *restrict x_, numtyp alphaij = beck1[mtype].y; numtyp betaij = beck1[mtype].z; numtyp term1 = aaij*aaij + rsq; - numtyp term2 = pow(term1,(numtyp)-5.0); + numtyp term2 = (numtyp)1.0/(term1*term1*term1*term1*term1); //ucl_powr(term1,(numtyp)-5.0); numtyp term3 = (numtyp)21.672 + (numtyp)30.0*aaij*aaij + (numtyp)6.0*rsq; numtyp term4 = alphaij + r5*betaij; numtyp term5 = alphaij + (numtyp)6.0*r5*betaij; @@ -207,7 +207,7 @@ __kernel void k_beck_fast(const __global numtyp4 *restrict x_, f.z+=delz*force; if (EVFLAG && eflag) { - numtyp term6 = pow(term1,(numtyp)-3); + numtyp term6 = (numtyp)1.0/(term1*term1*term1); //ucl_powr(term1,(numtyp)-3); numtyp term1inv = ucl_recip(term1); numtyp e = beck2[mtype].x*ucl_exp((numtyp)-1.0*r*term4); e -= beck2[mtype].y*term6*((numtyp)1.0+((numtyp)2.709+(numtyp)3.0*aaij*aaij)*term1inv); diff --git a/lib/gpu/lal_colloid.cu b/lib/gpu/lal_colloid.cu index 8a20f0c400..f59215e882 100644 --- a/lib/gpu/lal_colloid.cu +++ b/lib/gpu/lal_colloid.cu @@ -123,10 +123,10 @@ __kernel void k_colloid(const __global numtyp4 *restrict x_, K[6] = K[2]-r; K[7] = ucl_recip(K[3]*K[4]); K[8] = ucl_recip(K[5]*K[6]); - g[0] = ucl_powr(K[3],(numtyp)-7.0); - g[1] = -ucl_powr(-K[4],(numtyp)-7.0); - g[2] = ucl_powr(K[5],(numtyp)-7.0); - g[3] = -ucl_powr(-K[6],(numtyp)-7.0); + g[0] = (numtyp)1.0/(K[3]*K[3]*K[3]*K[3]*K[3]*K[3]*K[3]); // ucl_powr(K[3],(numtyp)-7.0); + g[1] = (numtyp)1.0/(K[4]*K[4]*K[4]*K[4]*K[4]*K[4]*K[4]); //-ucl_powr(-K[4],(numtyp)-7.0); + g[2] = (numtyp)1.0/(K[5]*K[5]*K[5]*K[5]*K[5]*K[5]*K[5]); // ucl_powr(K[5],(numtyp)-7.0); + g[3] = (numtyp)1.0/(K[6]*K[6]*K[6]*K[6]*K[6]*K[6]*K[6]); //-ucl_powr(-K[6],(numtyp)-7.0); h[0] = ((K[3]+(numtyp)5.0*K[1])*K[3]+(numtyp)30.0*K[0])*g[0]; h[1] = ((K[4]+(numtyp)5.0*K[1])*K[4]+(numtyp)30.0*K[0])*g[1]; h[2] = ((K[5]+(numtyp)5.0*K[2])*K[5]-(numtyp)30.0*K[0])*g[2]; @@ -290,10 +290,10 @@ __kernel void k_colloid_fast(const __global numtyp4 *restrict x_, K[6] = K[2]-r; K[7] = ucl_recip(K[3]*K[4]); K[8] = ucl_recip(K[5]*K[6]); - g[0] = ucl_powr(K[3],(numtyp)-7.0); - g[1] = -ucl_powr(-K[4],(numtyp)-7.0); - g[2] = ucl_powr(K[5],(numtyp)-7.0); - g[3] = -ucl_powr(-K[6],(numtyp)-7.0); + g[0] = (numtyp)1.0/(K[3]*K[3]*K[3]*K[3]*K[3]*K[3]*K[3]); // ucl_powr(K[3],(numtyp)-7.0); + g[1] = (numtyp)1.0/(K[4]*K[4]*K[4]*K[4]*K[4]*K[4]*K[4]); //-ucl_powr(-K[4],(numtyp)-7.0); + g[2] = (numtyp)1.0/(K[5]*K[5]*K[5]*K[5]*K[5]*K[5]*K[5]); // ucl_powr(K[5],(numtyp)-7.0); + g[3] = (numtyp)1.0/(K[6]*K[6]*K[6]*K[6]*K[6]*K[6]*K[6]); //-ucl_powr(-K[6],(numtyp)-7.0); h[0] = ((K[3]+(numtyp)5.0*K[1])*K[3]+(numtyp)30.0*K[0])*g[0]; h[1] = ((K[4]+(numtyp)5.0*K[1])*K[4]+(numtyp)30.0*K[0])*g[1]; h[2] = ((K[5]+(numtyp)5.0*K[2])*K[5]-(numtyp)30.0*K[0])*g[2]; From f4974f15185aed4c31a54ad2f1484d802ffd790f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Feb 2023 23:59:15 -0500 Subject: [PATCH 154/445] add download fallback handling --- cmake/Modules/Documentation.cmake | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/Documentation.cmake b/cmake/Modules/Documentation.cmake index cffc8888d1..46295feea3 100644 --- a/cmake/Modules/Documentation.cmake +++ b/cmake/Modules/Documentation.cmake @@ -56,14 +56,25 @@ if(BUILD_DOC) ) set(MATHJAX_URL "https://github.com/mathjax/MathJax/archive/3.1.3.tar.gz" CACHE STRING "URL for MathJax tarball") - set(MATHJAX_MD5 "d1c98c746888bfd52ca8ebc10704f92f" CACHE STRING "MD5 checksum of MathJax tarball") + set(MATHJAX_MD5 "b81661c6e6ba06278e6ae37b30b0c492" CACHE STRING "MD5 checksum of MathJax tarball") mark_as_advanced(MATHJAX_URL) + GetFallbackURL(MATHJAX_URL MATHJAX_FALLBACK) # download mathjax distribution and unpack to folder "mathjax" if(NOT EXISTS ${DOC_BUILD_STATIC_DIR}/mathjax/es5) - file(DOWNLOAD ${MATHJAX_URL} - "${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz" - EXPECTED_MD5 ${MATHJAX_MD5}) + if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz) + file(MD5 ${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz) + endif() + if(NOT "${DL_MD5}" STREQUAL "${MATHJAX_MD5}") + file(DOWNLOAD ${MATHJAX_URL} "${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz" STATUS DL_STATUS SHOW_PROGRESS) + file(MD5 ${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz DL_MD5) + if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${MATHJAX_MD5}")) + message(WARNING "Download from primary URL ${MATHJAX_URL} failed\nTrying fallback URL ${MATHJAX_FALLBACK}") + file(DOWNLOAD ${MATHJAX_FALLBACK} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${MATHJAX_MD5} SHOW_PROGRESS) + endif() + else() + message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz") + endif() execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf mathjax.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) file(GLOB MATHJAX_VERSION_DIR ${CONFIGURE_DEPENDS} ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*) execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${MATHJAX_VERSION_DIR} ${DOC_BUILD_STATIC_DIR}/mathjax) From d63d918dc5a4f0809c00b558078c47b415f37590 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Feb 2023 23:59:24 -0500 Subject: [PATCH 155/445] correct logic --- cmake/Modules/Packages/ML-PACE.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/Packages/ML-PACE.cmake b/cmake/Modules/Packages/ML-PACE.cmake index 4517aa77d4..6cdb751617 100644 --- a/cmake/Modules/Packages/ML-PACE.cmake +++ b/cmake/Modules/Packages/ML-PACE.cmake @@ -16,9 +16,9 @@ if(NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}") if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}")) message(WARNING "Download from primary URL ${PACELIB_URL} failed\nTrying fallback URL ${PACELIB_FALLBACK}") file(DOWNLOAD ${PACELIB_FALLBACK} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${PACELIB_MD5} SHOW_PROGRESS) - else() - message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz") endif() +else() + message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz") endif() # uncompress downloaded sources From b9981ac51e1028d270d65b5cacedb7bf52ac70bf Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Feb 2023 07:18:40 -0500 Subject: [PATCH 156/445] update list of KOKKOS supported architectures for Kokkos 3.7.1 --- doc/src/Build_extras.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 659d185e18..8be8ed0eb3 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -606,6 +606,9 @@ They must be specified in uppercase. * - AMPERE86 - GPU - NVIDIA Ampere generation CC 8.6 GPU + * - HOPPER90 + - GPU + - NVIDIA Hopper generation CC 9.0 GPU * - VEGA900 - GPU - AMD GPU MI25 GFX900 @@ -640,7 +643,7 @@ They must be specified in uppercase. - GPU - Intel GPU Ponte Vecchio -This list was last updated for version 3.7.0 of the Kokkos library. +This list was last updated for version 3.7.1 of the Kokkos library. .. tabs:: From bde2867251965ac5c1c6517789e9c55189fc3912 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Feb 2023 08:30:30 -0500 Subject: [PATCH 157/445] Make Kokkos configuration compatible with RTX40x0 generation consumer GPUs @stanmoore1 is this the correct way add this? --- doc/src/Build_extras.rst | 3 +++ lib/kokkos/cmake/KokkosCore_config.h.in | 1 + lib/kokkos/cmake/compile_tests/cuda_compute_capability.cc | 1 + lib/kokkos/cmake/kokkos_arch.cmake | 4 +++- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 8be8ed0eb3..d61d1f579d 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -606,6 +606,9 @@ They must be specified in uppercase. * - AMPERE86 - GPU - NVIDIA Ampere generation CC 8.6 GPU + * - ADA89 + - GPU + - NVIDIA Ada Lovelace generation CC 8.9 GPU * - HOPPER90 - GPU - NVIDIA Hopper generation CC 9.0 GPU diff --git a/lib/kokkos/cmake/KokkosCore_config.h.in b/lib/kokkos/cmake/KokkosCore_config.h.in index b83ced9243..9e614b8770 100644 --- a/lib/kokkos/cmake/KokkosCore_config.h.in +++ b/lib/kokkos/cmake/KokkosCore_config.h.in @@ -102,6 +102,7 @@ #cmakedefine KOKKOS_ARCH_AMPERE #cmakedefine KOKKOS_ARCH_AMPERE80 #cmakedefine KOKKOS_ARCH_AMPERE86 +#cmakedefine KOKKOS_ARCH_ADA89 #cmakedefine KOKKOS_ARCH_HOPPER90 #cmakedefine KOKKOS_ARCH_AMD_ZEN #cmakedefine KOKKOS_ARCH_AMD_ZEN2 diff --git a/lib/kokkos/cmake/compile_tests/cuda_compute_capability.cc b/lib/kokkos/cmake/compile_tests/cuda_compute_capability.cc index 2585a6a64c..581c8db9bc 100644 --- a/lib/kokkos/cmake/compile_tests/cuda_compute_capability.cc +++ b/lib/kokkos/cmake/compile_tests/cuda_compute_capability.cc @@ -74,6 +74,7 @@ int main() { case 75: std::cout << "Set -DKokkos_ARCH_TURING75=ON ." << std::endl; break; case 80: std::cout << "Set -DKokkos_ARCH_AMPERE80=ON ." << std::endl; break; case 86: std::cout << "Set -DKokkos_ARCH_AMPERE86=ON ." << std::endl; break; + case 89: std::cout << "Set -DKokkos_ARCH_ADA89=ON ." << std::endl; break; case 90: std::cout << "Set -DKokkos_ARCH_HOPPER90=ON ." << std::endl; break; default: std::cout << "Compute capability " << compute_capability diff --git a/lib/kokkos/cmake/kokkos_arch.cmake b/lib/kokkos/cmake/kokkos_arch.cmake index c1d76cceeb..f40e59d13d 100644 --- a/lib/kokkos/cmake/kokkos_arch.cmake +++ b/lib/kokkos/cmake/kokkos_arch.cmake @@ -86,6 +86,7 @@ KOKKOS_ARCH_OPTION(VOLTA72 GPU "NVIDIA Volta generation CC 7.2" "KOKK KOKKOS_ARCH_OPTION(TURING75 GPU "NVIDIA Turing generation CC 7.5" "KOKKOS_SHOW_CUDA_ARCHS") KOKKOS_ARCH_OPTION(AMPERE80 GPU "NVIDIA Ampere generation CC 8.0" "KOKKOS_SHOW_CUDA_ARCHS") KOKKOS_ARCH_OPTION(AMPERE86 GPU "NVIDIA Ampere generation CC 8.6" "KOKKOS_SHOW_CUDA_ARCHS") +KOKKOS_ARCH_OPTION(ADA89 GPU "NVIDIA Hopper generation CC 8.9" "KOKKOS_SHOW_CUDA_ARCHS") KOKKOS_ARCH_OPTION(HOPPER90 GPU "NVIDIA Hopper generation CC 9.0" "KOKKOS_SHOW_CUDA_ARCHS") IF(Kokkos_ENABLE_HIP OR Kokkos_ENABLE_OPENMPTARGET OR Kokkos_ENABLE_UNSUPPORTED_ARCHS) @@ -545,6 +546,7 @@ CHECK_CUDA_ARCH(VOLTA72 sm_72) CHECK_CUDA_ARCH(TURING75 sm_75) CHECK_CUDA_ARCH(AMPERE80 sm_80) CHECK_CUDA_ARCH(AMPERE86 sm_86) +CHECK_CUDA_ARCH(ADA89 sm_89) CHECK_CUDA_ARCH(HOPPER90 sm_90) SET(AMDGPU_ARCH_ALREADY_SPECIFIED "") @@ -804,7 +806,7 @@ IF (KOKKOS_ARCH_VOLTA70 OR KOKKOS_ARCH_VOLTA72) SET(KOKKOS_ARCH_VOLTA ON) ENDIF() -IF (KOKKOS_ARCH_AMPERE80 OR KOKKOS_ARCH_AMPERE86) +IF (KOKKOS_ARCH_AMPERE80 OR KOKKOS_ARCH_AMPERE86 OR KOKKOS_ARCH_ADA89) SET(KOKKOS_ARCH_AMPERE ON) ENDIF() From d170f83c6de12be9d1a48a9b9a31480ad035824c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Feb 2023 13:31:55 -0500 Subject: [PATCH 158/445] add experimental Ada CUDA architecture support for conventional make builds. --- lib/kokkos/Makefile.kokkos | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/kokkos/Makefile.kokkos b/lib/kokkos/Makefile.kokkos index 530510a0d1..c1b2ecd30f 100644 --- a/lib/kokkos/Makefile.kokkos +++ b/lib/kokkos/Makefile.kokkos @@ -401,6 +401,7 @@ KOKKOS_INTERNAL_USE_ARCH_VOLTA72 := $(call kokkos_has_string,$(KOKKOS_ARCH),Volt KOKKOS_INTERNAL_USE_ARCH_TURING75 := $(call kokkos_has_string,$(KOKKOS_ARCH),Turing75) KOKKOS_INTERNAL_USE_ARCH_AMPERE80 := $(call kokkos_has_string,$(KOKKOS_ARCH),Ampere80) KOKKOS_INTERNAL_USE_ARCH_AMPERE86 := $(call kokkos_has_string,$(KOKKOS_ARCH),Ampere86) +KOKKOS_INTERNAL_USE_ARCH_ADA89 := $(call kokkos_has_string,$(KOKKOS_ARCH),Ada89) KOKKOS_INTERNAL_USE_ARCH_HOPPER90 := $(call kokkos_has_string,$(KOKKOS_ARCH),Hopper90) KOKKOS_INTERNAL_USE_ARCH_NVIDIA := $(shell expr $(KOKKOS_INTERNAL_USE_ARCH_KEPLER30) \ + $(KOKKOS_INTERNAL_USE_ARCH_KEPLER32) \ @@ -416,6 +417,7 @@ KOKKOS_INTERNAL_USE_ARCH_NVIDIA := $(shell expr $(KOKKOS_INTERNAL_USE_ARCH_KEPLE + $(KOKKOS_INTERNAL_USE_ARCH_TURING75) \ + $(KOKKOS_INTERNAL_USE_ARCH_AMPERE80) \ + $(KOKKOS_INTERNAL_USE_ARCH_AMPERE86) \ + + $(KOKKOS_INTERNAL_USE_ARCH_ADA89) \ + $(KOKKOS_INTERNAL_USE_ARCH_HOPPER90)) #SEK: This seems like a bug to me @@ -1196,6 +1198,11 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA_ARCH), 1) tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_AMPERE86") KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_86 endif + ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ADA89), 1) + tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_AMPERE") + tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_ADA89") + KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_89 + endif ifeq ($(KOKKOS_INTERNAL_USE_ARCH_HOPPER90), 1) tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_HOPPER") tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_HOPPER90") From 3b4c873beb6d668e0be1f38b4d1dcb45f6715e20 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Feb 2023 17:31:43 -0500 Subject: [PATCH 159/445] another OpenCL bugfix attempt from Trung --- lib/gpu/lal_mie.cu | 8 ++++---- lib/gpu/lal_preprocessor.h | 2 ++ lib/gpu/lal_tersoff_extra.h | 28 +++++++++++++++------------- lib/gpu/lal_tersoff_mod_extra.h | 22 ++++++++++++---------- lib/gpu/lal_tersoff_zbl_extra.h | 32 +++++++++++++++++--------------- lib/gpu/lal_vashishta.cu | 2 +- 6 files changed, 51 insertions(+), 43 deletions(-) diff --git a/lib/gpu/lal_mie.cu b/lib/gpu/lal_mie.cu index fedfaf157a..61ac742321 100644 --- a/lib/gpu/lal_mie.cu +++ b/lib/gpu/lal_mie.cu @@ -83,8 +83,8 @@ __kernel void k_mie(const __global numtyp4 *restrict x_, int mtype=itype*lj_types+jtype; if (rsq param_c1) { - *ans_d = param_beta * (numtyp)-0.5*ucl_powr(tmp,(numtyp)-1.5); + *ans_d = param_beta * (numtyp)-0.5*ucl_pow(tmp,(numtyp)-1.5); return ucl_rsqrt(tmp); } if (tmp > param_c2) { - const numtyp ptmp = ucl_powr(tmp,-param_powern); + const numtyp ptmp = ucl_pow(tmp,-param_powern); const numtyp i2n = ucl_recip((numtyp)2.0 * param_powern); - *ans_d = param_beta * ((numtyp)-0.5*ucl_powr(tmp,(numtyp)-1.5) * + *ans_d = param_beta * ((numtyp)-0.5*ucl_pow(tmp,(numtyp)-1.5) * ((numtyp)1.0 - ((numtyp)1.0 + (numtyp)1.0 * i2n) * ptmp)); return ((numtyp)1.0 - ptmp * i2n)*ucl_rsqrt(tmp); @@ -183,14 +185,14 @@ ucl_inline numtyp ters_bij_d(const numtyp zeta, return (numtyp)1.0; } if (tmp < param_c3) { - *ans_d = (numtyp)-0.5*param_beta * ucl_powr(tmp,param_powern-(numtyp)1.0); - return (numtyp)1.0 - ucl_powr(tmp,param_powern)/((numtyp)2.0*param_powern); + *ans_d = (numtyp)-0.5*param_beta * ucl_pow(tmp,param_powern-(numtyp)1.0); + return (numtyp)1.0 - ucl_pow(tmp,param_powern)/((numtyp)2.0*param_powern); } - const numtyp tmp_n = (numtyp)1.0+ucl_powr(tmp,param_powern); + const numtyp tmp_n = (numtyp)1.0+ucl_pow(tmp,param_powern); const numtyp i2n = -ucl_recip((numtyp)2.0*param_powern); - *ans_d = (numtyp)-0.5*ucl_powr(tmp_n,(numtyp)-1.0+i2n)*(tmp_n-(numtyp)1.0)/ + *ans_d = (numtyp)-0.5*ucl_pow(tmp_n,(numtyp)-1.0+i2n)*(tmp_n-(numtyp)1.0)/ zeta; - return ucl_powr(tmp_n, i2n); + return ucl_pow(tmp_n, i2n); } /* ---------------------------------------------------------------------- */ diff --git a/lib/gpu/lal_tersoff_mod_extra.h b/lib/gpu/lal_tersoff_mod_extra.h index fb658cb0da..abf9e5dcd0 100644 --- a/lib/gpu/lal_tersoff_mod_extra.h +++ b/lib/gpu/lal_tersoff_mod_extra.h @@ -36,14 +36,16 @@ ucl_inline void vec3_add(const numtyp x[3], const numtyp y[3], numtyp z[3]) z[0] = x[0]+y[0]; z[1] = x[1]+y[1]; z[2] = x[2]+y[2]; } -ucl_inline void vec3_scale(const numtyp k, const numtyp x[3], numtyp y[3]) +ucl_inline void vec3_scale(const numtyp k, numtyp x[3], numtyp y[3]) { + // return y = k * x (y can be x) y[0] = k*x[0]; y[1] = k*x[1]; y[2] = k*x[2]; } -ucl_inline void vec3_scaleadd(const numtyp k, const numtyp x[3], +ucl_inline void vec3_scaleadd(const numtyp k, numtyp x[3], const numtyp y[3], numtyp z[3]) { + // return z = k * x + y (z can be x) z[0] = k*x[0]+y[0]; z[1] = k*x[1]+y[1]; z[2] = k*x[2]+y[2]; } @@ -84,9 +86,9 @@ ucl_inline void costheta_d(const numtyp rij_hat[3], const numtyp rij, const numtyp rik_hat[3], const numtyp rik, - numtyp *dri, - numtyp *drj, - numtyp *drk) + numtyp dri[3], + numtyp drj[3], + numtyp drk[3]) { // first element is derivative wrt Ri, second wrt Rj, third wrt Rk @@ -163,9 +165,9 @@ ucl_inline numtyp ters_bij(const numtyp zeta, { numtyp tmp = param_beta * zeta; if (tmp > param_ca1) - return ucl_powr(tmp, -param_powern/((numtyp)2.0*param_powern_del)); + return ucl_pow(tmp, -param_powern/((numtyp)2.0*param_powern_del)); if (tmp < param_ca4) return (numtyp)1.0; - return ucl_powr((numtyp)1.0 + ucl_powr(tmp,param_powern), + return ucl_pow((numtyp)1.0 + ucl_pow(tmp,param_powern), (numtyp)-1.0/((numtyp)2.0*param_powern_del)); } @@ -180,12 +182,12 @@ ucl_inline numtyp ters_bij_d(const numtyp zeta, { numtyp tmp = param_beta * zeta; if (tmp > param_ca1) return (numtyp)-0.5*(param_powern/param_powern_del) * - ucl_powr(tmp,(numtyp)-0.5*(param_powern/param_powern_del)) / zeta; + ucl_pow(tmp,(numtyp)-0.5*(param_powern/param_powern_del)) / zeta; if (tmp < param_ca4) return (numtyp)0.0; - numtyp tmp_n = ucl_powr(tmp,param_powern); + numtyp tmp_n = ucl_pow(tmp,param_powern); return (numtyp)-0.5 *(param_powern/param_powern_del) * - ucl_powr((numtyp)1.0+tmp_n, (numtyp)-1.0-((numtyp)1.0 / + ucl_pow((numtyp)1.0+tmp_n, (numtyp)-1.0-((numtyp)1.0 / ((numtyp)2.0*param_powern_del)))*tmp_n / zeta; } diff --git a/lib/gpu/lal_tersoff_zbl_extra.h b/lib/gpu/lal_tersoff_zbl_extra.h index 9e5bcb10b4..d9b691fdfa 100644 --- a/lib/gpu/lal_tersoff_zbl_extra.h +++ b/lib/gpu/lal_tersoff_zbl_extra.h @@ -37,14 +37,16 @@ ucl_inline void vec3_add(const numtyp x[3], const numtyp y[3], numtyp z[3]) z[0] = x[0]+y[0]; z[1] = x[1]+y[1]; z[2] = x[2]+y[2]; } -ucl_inline void vec3_scale(const numtyp k, const numtyp x[3], numtyp y[3]) +ucl_inline void vec3_scale(const numtyp k, numtyp x[3], numtyp y[3]) { + // return y = k * x (y can be at the same address as x) y[0] = k*x[0]; y[1] = k*x[1]; y[2] = k*x[2]; } -ucl_inline void vec3_scaleadd(const numtyp k, const numtyp x[3], +ucl_inline void vec3_scaleadd(const numtyp k, numtyp x[3], const numtyp y[3], numtyp z[3]) { + // return z = k * x + y (z can be at the same address as x) z[0] = k*x[0]+y[0]; z[1] = k*x[1]+y[1]; z[2] = k*x[2]+y[2]; } @@ -85,9 +87,9 @@ ucl_inline void costheta_d(const numtyp rij_hat[3], const numtyp rij, const numtyp rik_hat[3], const numtyp rik, - numtyp *dri, - numtyp *drj, - numtyp *drk) + numtyp dri[3], + numtyp drj[3], + numtyp drk[3]) { // first element is derivative wrt Ri, second wrt Rj, third wrt Rk @@ -187,12 +189,12 @@ ucl_inline numtyp ters_bij(const numtyp zeta, numtyp tmp = param_beta * zeta; if (tmp > param_c1) return ucl_rsqrt(tmp); if (tmp > param_c2) - return ((numtyp)1.0 - ucl_powr(tmp,-param_powern) / + return ((numtyp)1.0 - ucl_pow(tmp,-param_powern) / ((numtyp)2.0*param_powern))*ucl_rsqrt(tmp); if (tmp < param_c4) return (numtyp)1.0; if (tmp < param_c3) - return (numtyp)1.0 - ucl_powr(tmp,param_powern)/((numtyp)2.0*param_powern); - return ucl_powr((numtyp)1.0 + ucl_powr(tmp,param_powern), + return (numtyp)1.0 - ucl_pow(tmp,param_powern)/((numtyp)2.0*param_powern); + return ucl_pow((numtyp)1.0 + ucl_pow(tmp,param_powern), (numtyp)-1.0/((numtyp)2.0*param_powern)); } @@ -208,19 +210,19 @@ ucl_inline numtyp ters_bij_d(const numtyp zeta, { numtyp tmp = param_beta * zeta; if (tmp > param_c1) - return param_beta * (numtyp)-0.5*ucl_powr(tmp,(numtyp)-1.5); + return param_beta * (numtyp)-0.5*ucl_pow(tmp,(numtyp)-1.5); if (tmp > param_c2) - return param_beta * ((numtyp)-0.5*ucl_powr(tmp,(numtyp)-1.5) * + return param_beta * ((numtyp)-0.5*ucl_pow(tmp,(numtyp)-1.5) * // error in negligible 2nd term fixed 9/30/2015 // (1.0 - 0.5*(1.0 + 1.0/(2.0*param->powern)) * ((numtyp)1.0 - ((numtyp)1.0 + (numtyp)1.0 /((numtyp)2.0 * param_powern)) * - ucl_powr(tmp,-param_powern))); + ucl_pow(tmp,-param_powern))); if (tmp < param_c4) return (numtyp)0.0; if (tmp < param_c3) - return (numtyp)-0.5*param_beta * ucl_powr(tmp,param_powern-(numtyp)1.0); + return (numtyp)-0.5*param_beta * ucl_pow(tmp,param_powern-(numtyp)1.0); - numtyp tmp_n = ucl_powr(tmp,param_powern); - return (numtyp)-0.5 * ucl_powr((numtyp)1.0+tmp_n, (numtyp) - + numtyp tmp_n = ucl_pow(tmp,param_powern); + return (numtyp)-0.5 * ucl_pow((numtyp)1.0+tmp_n, (numtyp) - (numtyp)1.0-((numtyp)1.0 / ((numtyp)2.0 * param_powern)))*tmp_n / zeta; } @@ -474,7 +476,7 @@ ucl_inline void repulsive(const numtyp param_bigr, numtyp esq = global_e*global_e; numtyp a_ij = ((numtyp)0.8854*global_a_0) / - (ucl_powr(param_Z_i,(numtyp)0.23) + ucl_powr(param_Z_j,(numtyp)0.23)); + (ucl_pow(param_Z_i,(numtyp)0.23) + ucl_pow(param_Z_j,(numtyp)0.23)); numtyp premult = (param_Z_i * param_Z_j * esq)/((numtyp)4.0*MY_PI*global_epsilon_0); numtyp r_ov_a = r/a_ij; numtyp t1 = (numtyp)0.1818*ucl_exp((numtyp)-3.2*r_ov_a); diff --git a/lib/gpu/lal_vashishta.cu b/lib/gpu/lal_vashishta.cu index 6c9ba14b4a..f4595f4715 100644 --- a/lib/gpu/lal_vashishta.cu +++ b/lib/gpu/lal_vashishta.cu @@ -353,7 +353,7 @@ __kernel void k_vashishta(const __global numtyp4 *restrict x_, numtyp r4inv = rinvsq*rinvsq; numtyp r6inv = rinvsq*r4inv; - numtyp reta = pow(r,-param1_eta); + numtyp reta = ucl_powr(r,-param1_eta); numtyp lam1r = r*param1_lam1inv; numtyp lam4r = r*param1_lam4inv; numtyp vc2 = param1_zizj * ucl_exp(-lam1r)/r; From 30abe68c82fd043c091d392fa3acc789d97c8038 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Feb 2023 09:13:04 -0500 Subject: [PATCH 160/445] recover kernel failure for tersoff with mixed and single precision --- lib/gpu/lal_preprocessor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gpu/lal_preprocessor.h b/lib/gpu/lal_preprocessor.h index 71eaf07876..483e681a7a 100644 --- a/lib/gpu/lal_preprocessor.h +++ b/lib/gpu/lal_preprocessor.h @@ -171,7 +171,7 @@ #if defined(FAST_MATH) && !defined(_DOUBLE_DOUBLE) #define ucl_exp native_exp -#define ucl_pow native_pow +#define ucl_pow pow #define ucl_powr native_powr #define ucl_rsqrt native_rsqrt #define ucl_sqrt native_sqrt From 1882dc2e8ce2e12573a355284f7f3b574f933887 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Feb 2023 10:24:29 -0500 Subject: [PATCH 161/445] ensure local q pointer is initialized to NULL --- src/KOKKOS/atom_vec_charge_kokkos.cpp | 5 +---- src/KOKKOS/atom_vec_dipole_kokkos.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/KOKKOS/atom_vec_charge_kokkos.cpp b/src/KOKKOS/atom_vec_charge_kokkos.cpp index 7605112d44..b9296860c3 100644 --- a/src/KOKKOS/atom_vec_charge_kokkos.cpp +++ b/src/KOKKOS/atom_vec_charge_kokkos.cpp @@ -28,10 +28,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ AtomVecChargeKokkos::AtomVecChargeKokkos(LAMMPS *lmp) : AtomVec(lmp), -AtomVecKokkos(lmp), AtomVecCharge(lmp) -{ - -} +AtomVecKokkos(lmp), AtomVecCharge(lmp), q(nullptr) {} /* ---------------------------------------------------------------------- grow atom arrays diff --git a/src/KOKKOS/atom_vec_dipole_kokkos.cpp b/src/KOKKOS/atom_vec_dipole_kokkos.cpp index 050fe2d0d1..b2b5237107 100644 --- a/src/KOKKOS/atom_vec_dipole_kokkos.cpp +++ b/src/KOKKOS/atom_vec_dipole_kokkos.cpp @@ -28,10 +28,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ AtomVecDipoleKokkos::AtomVecDipoleKokkos(LAMMPS *lmp) : AtomVec(lmp), -AtomVecKokkos(lmp), AtomVecDipole(lmp) -{ - -} +AtomVecKokkos(lmp), AtomVecDipole(lmp), q(nullptr) {} /* ---------------------------------------------------------------------- grow atom arrays From 912f046cd79c859ad15a11999432a5099c75b872 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Feb 2023 11:16:46 -0500 Subject: [PATCH 162/445] recover compilation of tersoff kernels with CUDA --- lib/gpu/lal_preprocessor.h | 1 + lib/gpu/lal_tersoff_extra.h | 50 ++++++++++++++++----------------- lib/gpu/lal_tersoff_mod_extra.h | 44 ++++++++++++++--------------- lib/gpu/lal_tersoff_zbl_extra.h | 44 ++++++++++++++--------------- 4 files changed, 70 insertions(+), 69 deletions(-) diff --git a/lib/gpu/lal_preprocessor.h b/lib/gpu/lal_preprocessor.h index 483e681a7a..b3243c3b2e 100644 --- a/lib/gpu/lal_preprocessor.h +++ b/lib/gpu/lal_preprocessor.h @@ -101,6 +101,7 @@ #if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_pre_cuda_hip.h" +#define ucl_pow pow #endif // ------------------------------------------------------------------------- diff --git a/lib/gpu/lal_tersoff_extra.h b/lib/gpu/lal_tersoff_extra.h index 87b00bd6f1..c205eff3de 100644 --- a/lib/gpu/lal_tersoff_extra.h +++ b/lib/gpu/lal_tersoff_extra.h @@ -90,10 +90,10 @@ ucl_inline void costheta_d(const numtyp cos_theta, numtyp drk[3]) { // first element is derivative wrt Ri, second wrt Rj, third wrt Rk - vec3_scaleadd(-cos_theta,rij_hat,rik_hat,drj); - vec3_scale(ucl_recip(rij),drj,drj); - vec3_scaleadd(-cos_theta,rik_hat,rij_hat,drk); - vec3_scale(ucl_recip(rik),drk,drk); + vec3_scaleadd(-cos_theta,(numtyp *)rij_hat,(numtyp *)rik_hat,drj); + vec3_scale(ucl_recip(rij),(numtyp *)drj,drj); + vec3_scaleadd(-cos_theta,(numtyp *)rik_hat,(numtyp *)rij_hat,drk); + vec3_scale(ucl_recip(rik),(numtyp *)drk,drk); vec3_add(drj,drk,dri); vec3_scale((numtyp)-1.0,dri,dri); } @@ -240,10 +240,10 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,dri); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); vec3_scale(prefactor,dri,dri); // compute the derivative wrt Rj @@ -251,7 +251,7 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); vec3_scale(prefactor,drj,drj); // compute the derivative wrt Rk @@ -259,9 +259,9 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,rik_hat,drk); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,drk); + vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); + vec3_scaleadd(fc*gijk_d*ex_delr,(numtyp *)dcosdrk,drk,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); vec3_scale(prefactor,drk,drk); } @@ -306,10 +306,10 @@ ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,dri); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); vec3_scale(prefactor,dri,dri); } @@ -354,7 +354,7 @@ ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); vec3_scale(prefactor,drj,drj); } @@ -399,9 +399,9 @@ ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,rik_hat,drk); + vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); vec3_scale(prefactor,drk,drk); } @@ -511,8 +511,8 @@ ucl_inline void attractive(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fi, fj, fk); @@ -536,8 +536,8 @@ ucl_inline void attractive_fi(const numtyp param_bigr, numtyp fi[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d_fi(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fi); @@ -561,8 +561,8 @@ ucl_inline void attractive_fj(const numtyp param_bigr, numtyp fj[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d_fj(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fj); @@ -586,8 +586,8 @@ ucl_inline void attractive_fk(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d_fk(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fk); diff --git a/lib/gpu/lal_tersoff_mod_extra.h b/lib/gpu/lal_tersoff_mod_extra.h index abf9e5dcd0..ac4ffaaf6a 100644 --- a/lib/gpu/lal_tersoff_mod_extra.h +++ b/lib/gpu/lal_tersoff_mod_extra.h @@ -94,9 +94,9 @@ ucl_inline void costheta_d(const numtyp rij_hat[3], numtyp cos_theta = vec3_dot(rij_hat,rik_hat); - vec3_scaleadd(-cos_theta,rij_hat,rik_hat,drj); + vec3_scaleadd(-cos_theta,(numtyp *)rij_hat,(numtyp *)rik_hat,drj); vec3_scale(ucl_recip(rij),drj,drj); - vec3_scaleadd(-cos_theta,rik_hat,rij_hat,drk); + vec3_scaleadd(-cos_theta,(numtyp *)rik_hat,rij_hat,drk); vec3_scale(ucl_recip(rik),drk,drk); vec3_add(drj,drk,dri); vec3_scale((numtyp)-1.0,dri,dri); @@ -240,10 +240,10 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,dri); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); vec3_scale(prefactor,dri,dri); // compute the derivative wrt Rj @@ -251,7 +251,7 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); vec3_scale(prefactor,drj,drj); // compute the derivative wrt Rk @@ -259,9 +259,9 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,rik_hat,drk); + vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); vec3_scale(prefactor,drk,drk); } @@ -310,10 +310,10 @@ ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,dri); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); vec3_scale(prefactor,dri,dri); } @@ -361,7 +361,7 @@ ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); vec3_scale(prefactor,drj,drj); } @@ -410,9 +410,9 @@ ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,rik_hat,drk); + vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); vec3_scale(prefactor,drk,drk); } @@ -531,8 +531,8 @@ ucl_inline void attractive(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_h, param_c1, param_c2, param_c3, param_c4, param_c5, @@ -559,8 +559,8 @@ ucl_inline void attractive_fi(const numtyp param_bigr, numtyp fi[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d_fi(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_h, param_c1, param_c2, param_c3, param_c4, param_c5, @@ -587,8 +587,8 @@ ucl_inline void attractive_fj(const numtyp param_bigr, numtyp fj[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d_fj(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_h, param_c1, param_c2, param_c3, param_c4, param_c5, @@ -615,8 +615,8 @@ ucl_inline void attractive_fk(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d_fk(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_h, param_c1, param_c2, param_c3, param_c4, param_c5, diff --git a/lib/gpu/lal_tersoff_zbl_extra.h b/lib/gpu/lal_tersoff_zbl_extra.h index d9b691fdfa..e8ac3b2438 100644 --- a/lib/gpu/lal_tersoff_zbl_extra.h +++ b/lib/gpu/lal_tersoff_zbl_extra.h @@ -95,9 +95,9 @@ ucl_inline void costheta_d(const numtyp rij_hat[3], numtyp cos_theta = vec3_dot(rij_hat,rik_hat); - vec3_scaleadd(-cos_theta,rij_hat,rik_hat,drj); + vec3_scaleadd(-cos_theta,(numtyp *)rij_hat,(numtyp *)rik_hat,drj); vec3_scale(ucl_recip(rij),drj,drj); - vec3_scaleadd(-cos_theta,rik_hat,rij_hat,drk); + vec3_scaleadd(-cos_theta,(numtyp *)rik_hat,(numtyp *)rij_hat,drk); vec3_scale(ucl_recip(rik),drk,drk); vec3_add(drj,drk,dri); vec3_scale((numtyp)-1.0,dri,dri); @@ -273,10 +273,10 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,dri); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); vec3_scale(prefactor,dri,dri); // compute the derivative wrt Rj @@ -284,7 +284,7 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); vec3_scale(prefactor,drj,drj); // compute the derivative wrt Rk @@ -292,9 +292,9 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,rik_hat,drk); + vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); vec3_scale(prefactor,drk,drk); } @@ -341,10 +341,10 @@ ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,dri); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); vec3_scale(prefactor,dri,dri); } @@ -390,7 +390,7 @@ ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); vec3_scale(prefactor,drj,drj); } @@ -437,9 +437,9 @@ ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,rik_hat,drk); + vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); vec3_scale(prefactor,drk,drk); } @@ -604,8 +604,8 @@ ucl_inline void attractive(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fi, fj, fk); @@ -629,8 +629,8 @@ ucl_inline void attractive_fi(const numtyp param_bigr, numtyp fi[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d_fi(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fi); @@ -654,8 +654,8 @@ ucl_inline void attractive_fj(const numtyp param_bigr, numtyp fj[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d_fj(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fj); @@ -679,8 +679,8 @@ ucl_inline void attractive_fk(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,delrij,rij_hat); - vec3_scale(rikinv,delrik,rik_hat); + vec3_scale(rijinv,(numtyp *)delrij,rij_hat); + vec3_scale(rikinv,(numtyp *)delrik,rik_hat); ters_zetaterm_d_fk(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fk); From f67d378230f91ab94f534f61a4e775174e777e20 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Feb 2023 14:33:19 -0500 Subject: [PATCH 163/445] update comment and architecture name --- lib/kokkos/Makefile.kokkos | 2 +- lib/kokkos/cmake/kokkos_arch.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/kokkos/Makefile.kokkos b/lib/kokkos/Makefile.kokkos index c1b2ecd30f..b873fd1e06 100644 --- a/lib/kokkos/Makefile.kokkos +++ b/lib/kokkos/Makefile.kokkos @@ -20,7 +20,7 @@ KOKKOS_DEVICES ?= "OpenMP" #KOKKOS_DEVICES ?= "Threads" # Options: # Intel: KNC,KNL,SNB,HSW,BDW,SKL,SKX,ICL,ICX,SPR -# NVIDIA: Kepler,Kepler30,Kepler32,Kepler35,Kepler37,Maxwell,Maxwell50,Maxwell52,Maxwell53,Pascal60,Pascal61,Volta70,Volta72,Turing75,Ampere80,Ampere86,Hopper90 +# NVIDIA: Kepler,Kepler30,Kepler32,Kepler35,Kepler37,Maxwell,Maxwell50,Maxwell52,Maxwell53,Pascal60,Pascal61,Volta70,Volta72,Turing75,Ampere80,Ampere86,Ada89,Hopper90 # ARM: ARMv80,ARMv81,ARMv8-ThunderX,ARMv8-TX2,A64FX # IBM: BGQ,Power7,Power8,Power9 # AMD-GPUS: Vega900,Vega906,Vega908,Vega90A diff --git a/lib/kokkos/cmake/kokkos_arch.cmake b/lib/kokkos/cmake/kokkos_arch.cmake index f40e59d13d..f20a91e42f 100644 --- a/lib/kokkos/cmake/kokkos_arch.cmake +++ b/lib/kokkos/cmake/kokkos_arch.cmake @@ -86,7 +86,7 @@ KOKKOS_ARCH_OPTION(VOLTA72 GPU "NVIDIA Volta generation CC 7.2" "KOKK KOKKOS_ARCH_OPTION(TURING75 GPU "NVIDIA Turing generation CC 7.5" "KOKKOS_SHOW_CUDA_ARCHS") KOKKOS_ARCH_OPTION(AMPERE80 GPU "NVIDIA Ampere generation CC 8.0" "KOKKOS_SHOW_CUDA_ARCHS") KOKKOS_ARCH_OPTION(AMPERE86 GPU "NVIDIA Ampere generation CC 8.6" "KOKKOS_SHOW_CUDA_ARCHS") -KOKKOS_ARCH_OPTION(ADA89 GPU "NVIDIA Hopper generation CC 8.9" "KOKKOS_SHOW_CUDA_ARCHS") +KOKKOS_ARCH_OPTION(ADA89 GPU "NVIDIA Ada generation CC 8.9" "KOKKOS_SHOW_CUDA_ARCHS") KOKKOS_ARCH_OPTION(HOPPER90 GPU "NVIDIA Hopper generation CC 9.0" "KOKKOS_SHOW_CUDA_ARCHS") IF(Kokkos_ENABLE_HIP OR Kokkos_ENABLE_OPENMPTARGET OR Kokkos_ENABLE_UNSUPPORTED_ARCHS) From d7d0bc12af28ad99af7a7deee59ada6ce6871ae4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Feb 2023 15:25:46 -0500 Subject: [PATCH 164/445] cosmetic --- src/EXTRA-PAIR/pair_gauss.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/EXTRA-PAIR/pair_gauss.cpp b/src/EXTRA-PAIR/pair_gauss.cpp index 1c2bb5f0d6..698c309f48 100644 --- a/src/EXTRA-PAIR/pair_gauss.cpp +++ b/src/EXTRA-PAIR/pair_gauss.cpp @@ -109,8 +109,7 @@ void PairGauss::compute(int eflag, int vflag) if (eflag_global && rsq < 0.5/b[itype][jtype]) occ++; if (rsq < cutsq[itype][jtype]) { - fpair = -2.0*a[itype][jtype]*b[itype][jtype] * - exp(-b[itype][jtype]*rsq); + fpair = -2.0*a[itype][jtype]*b[itype][jtype] * exp(-b[itype][jtype]*rsq); f[i][0] += delx*fpair; f[i][1] += dely*fpair; @@ -122,8 +121,7 @@ void PairGauss::compute(int eflag, int vflag) } if (eflag) - evdwl = -(a[itype][jtype]*exp(-b[itype][jtype]*rsq) - - offset[itype][jtype]); + evdwl = -(a[itype][jtype]*exp(-b[itype][jtype]*rsq) - offset[itype][jtype]); if (evflag) ev_tally(i,j,nlocal,newton_pair, evdwl,0.0,fpair,delx,dely,delz); From 0ae72ce36d5ef8171f62d628826c130d44752d3a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Feb 2023 16:44:32 -0500 Subject: [PATCH 165/445] update for recent doc updates --- doc/utils/sphinx-config/false_positives.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index dc2f1879fd..fdacbf9c4c 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -2859,6 +2859,7 @@ ps Ps pscreen pscrozi +pseudocode Pseudocode pseudodynamics pseudopotential From 09099dd29fc4a1d6f91c60653e00b905cbe10cc4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Feb 2023 16:45:16 -0500 Subject: [PATCH 166/445] correct preprocessor logic for non-Linux machines --- lib/kokkos/core/src/Kokkos_Macros.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kokkos/core/src/Kokkos_Macros.hpp b/lib/kokkos/core/src/Kokkos_Macros.hpp index 1ba11481e7..e42944d819 100644 --- a/lib/kokkos/core/src/Kokkos_Macros.hpp +++ b/lib/kokkos/core/src/Kokkos_Macros.hpp @@ -653,7 +653,7 @@ static constexpr bool kokkos_omp_on_host() { return false; } #if (defined(KOKKOS_COMPILER_GNU) || defined(KOKKOS_COMPILER_CLANG) || \ defined(KOKKOS_COMPILER_INTEL) || defined(KOKKOS_COMPILER_PGI)) && \ !defined(_WIN32) -#if (defined(__linux__) && defined(__GLIBC_MINOR__)) +#if (!defined(__linux__) || defined(__GLIBC_MINOR__)) #define KOKKOS_IMPL_ENABLE_STACKTRACE #endif #define KOKKOS_IMPL_ENABLE_CXXABI From 04bed1a6e075abc3cc419addd4cf59cd986692ae Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Feb 2023 20:32:47 -0500 Subject: [PATCH 167/445] roll back changes for vec3_scale() and vec3_scaleadd() and use temporary vector --- lib/gpu/lal_tersoff_extra.h | 89 +++++++++++++++---------------- lib/gpu/lal_tersoff_mod_extra.h | 92 ++++++++++++++++----------------- lib/gpu/lal_tersoff_zbl_extra.h | 92 ++++++++++++++++----------------- 3 files changed, 137 insertions(+), 136 deletions(-) diff --git a/lib/gpu/lal_tersoff_extra.h b/lib/gpu/lal_tersoff_extra.h index c205eff3de..e886c26c86 100644 --- a/lib/gpu/lal_tersoff_extra.h +++ b/lib/gpu/lal_tersoff_extra.h @@ -36,16 +36,16 @@ ucl_inline void vec3_add(const numtyp x[3], const numtyp y[3], numtyp z[3]) z[0] = x[0]+y[0]; z[1] = x[1]+y[1]; z[2] = x[2]+y[2]; } -ucl_inline void vec3_scale(const numtyp k, numtyp x[3], numtyp y[3]) +ucl_inline void vec3_scale(const numtyp k, const numtyp x[3], numtyp y[3]) { - // return y = k * x (y can be at the same address as x) + // return y = k * x y[0] = k*x[0]; y[1] = k*x[1]; y[2] = k*x[2]; } -ucl_inline void vec3_scaleadd(const numtyp k, numtyp x[3], +ucl_inline void vec3_scaleadd(const numtyp k, const numtyp x[3], const numtyp y[3], numtyp z[3]) { - // return z = k * x + y (z can be at the same address as x) + // return z = k * x + y z[0] = k*x[0]+y[0]; z[1] = k*x[1]+y[1]; z[2] = k*x[2]+y[2]; } @@ -89,13 +89,14 @@ ucl_inline void costheta_d(const numtyp cos_theta, numtyp drj[3], numtyp drk[3]) { + numtyp tmp3[3]; // first element is derivative wrt Ri, second wrt Rj, third wrt Rk - vec3_scaleadd(-cos_theta,(numtyp *)rij_hat,(numtyp *)rik_hat,drj); - vec3_scale(ucl_recip(rij),(numtyp *)drj,drj); - vec3_scaleadd(-cos_theta,(numtyp *)rik_hat,(numtyp *)rij_hat,drk); - vec3_scale(ucl_recip(rik),(numtyp *)drk,drk); - vec3_add(drj,drk,dri); - vec3_scale((numtyp)-1.0,dri,dri); + vec3_scaleadd(-cos_theta,rij_hat,rik_hat,tmp3); + vec3_scale(ucl_recip(rij),tmp3,drj); + vec3_scaleadd(-cos_theta,rik_hat,rij_hat,tmp3); + vec3_scale(ucl_recip(rik),tmp3,drk); + vec3_add(drj,drk,tmp3); + vec3_scale((numtyp)-1.0,tmp3,dri); } /* ---------------------------------------------------------------------- */ @@ -215,7 +216,7 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, numtyp drk[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc_d(rik,param_bigr,param_bigd,&dfc); @@ -240,29 +241,29 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); - vec3_scale(prefactor,dri,dri); + vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,tmp3); + vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,tmp3,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,tmp3); + vec3_scale(prefactor,tmp3,dri); // compute the derivative wrt Rj // drj = fc*gijk_d*ex_delr*dcosdrj; // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); - vec3_scale(prefactor,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,tmp3); + vec3_scale(prefactor,tmp3,drj); // compute the derivative wrt Rk // drk = dfc*gijk*ex_delr*rik_hat; // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); - vec3_scaleadd(fc*gijk_d*ex_delr,(numtyp *)dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); - vec3_scale(prefactor,drk,drk); + vec3_scale(dfc*gijk*ex_delr,rik_hat,tmp3); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,tmp3,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,tmp3); + vec3_scale(prefactor,tmp3,drk); } ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, @@ -281,7 +282,7 @@ ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, numtyp dri[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc_d(rik,param_bigr,param_bigd,&dfc); @@ -306,11 +307,11 @@ ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); - vec3_scale(prefactor,dri,dri); + vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,tmp3); + vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,tmp3,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,tmp3); + vec3_scale(prefactor,tmp3,dri); } ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, @@ -329,7 +330,7 @@ ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, numtyp drj[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc(rik,param_bigr,param_bigd); @@ -354,8 +355,8 @@ ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); - vec3_scale(prefactor,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,tmp3); + vec3_scale(prefactor,tmp3,drj); } ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, @@ -374,7 +375,7 @@ ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, numtyp drk[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc_d(rik,param_bigr,param_bigd,&dfc); @@ -399,10 +400,10 @@ ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); - vec3_scale(prefactor,drk,drk); + vec3_scale(dfc*gijk*ex_delr,rik_hat,tmp3); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,tmp3,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,tmp3); + vec3_scale(prefactor,tmp3,drk); } /* ---------------------------------------------------------------------- */ @@ -511,8 +512,8 @@ ucl_inline void attractive(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fi, fj, fk); @@ -536,8 +537,8 @@ ucl_inline void attractive_fi(const numtyp param_bigr, numtyp fi[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d_fi(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fi); @@ -561,8 +562,8 @@ ucl_inline void attractive_fj(const numtyp param_bigr, numtyp fj[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d_fj(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fj); @@ -586,8 +587,8 @@ ucl_inline void attractive_fk(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d_fk(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fk); diff --git a/lib/gpu/lal_tersoff_mod_extra.h b/lib/gpu/lal_tersoff_mod_extra.h index ac4ffaaf6a..33e90c2a31 100644 --- a/lib/gpu/lal_tersoff_mod_extra.h +++ b/lib/gpu/lal_tersoff_mod_extra.h @@ -36,16 +36,16 @@ ucl_inline void vec3_add(const numtyp x[3], const numtyp y[3], numtyp z[3]) z[0] = x[0]+y[0]; z[1] = x[1]+y[1]; z[2] = x[2]+y[2]; } -ucl_inline void vec3_scale(const numtyp k, numtyp x[3], numtyp y[3]) +ucl_inline void vec3_scale(const numtyp k, const numtyp x[3], numtyp y[3]) { - // return y = k * x (y can be x) + // return y = k * x y[0] = k*x[0]; y[1] = k*x[1]; y[2] = k*x[2]; } -ucl_inline void vec3_scaleadd(const numtyp k, numtyp x[3], +ucl_inline void vec3_scaleadd(const numtyp k, const numtyp x[3], const numtyp y[3], numtyp z[3]) { - // return z = k * x + y (z can be x) + // return z = k * x + y z[0] = k*x[0]+y[0]; z[1] = k*x[1]+y[1]; z[2] = k*x[2]+y[2]; } @@ -90,16 +90,16 @@ ucl_inline void costheta_d(const numtyp rij_hat[3], numtyp drj[3], numtyp drk[3]) { + numtyp tmp3[3]; // first element is derivative wrt Ri, second wrt Rj, third wrt Rk + const numtyp cos_theta = vec3_dot(rij_hat,rik_hat); - numtyp cos_theta = vec3_dot(rij_hat,rik_hat); - - vec3_scaleadd(-cos_theta,(numtyp *)rij_hat,(numtyp *)rik_hat,drj); - vec3_scale(ucl_recip(rij),drj,drj); - vec3_scaleadd(-cos_theta,(numtyp *)rik_hat,rij_hat,drk); - vec3_scale(ucl_recip(rik),drk,drk); - vec3_add(drj,drk,dri); - vec3_scale((numtyp)-1.0,dri,dri); + vec3_scaleadd(-cos_theta,rij_hat,rik_hat,tmp3); + vec3_scale(ucl_recip(rij),tmp3,drj); + vec3_scaleadd(-cos_theta,rik_hat,rij_hat,tmp3); + vec3_scale(ucl_recip(rik),tmp3,drk); + vec3_add(drj,drk,tmp3); + vec3_scale((numtyp)-1.0,tmp3,dri); } /* ---------------------------------------------------------------------- */ @@ -213,7 +213,7 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, numtyp drk[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc(rik,param_bigr,param_bigd); dfc = ters_fc_d(rik,param_bigr,param_bigd); @@ -240,29 +240,29 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); - vec3_scale(prefactor,dri,dri); + vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,tmp3); + vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,tmp3,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,tmp3); + vec3_scale(prefactor,tmp3,dri); // compute the derivative wrt Rj // drj = fc*gijk_d*ex_delr*dcosdrj; // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); - vec3_scale(prefactor,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,tmp3); + vec3_scale(prefactor,tmp3,drj); // compute the derivative wrt Rk // drk = dfc*gijk*ex_delr*rik_hat; // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); - vec3_scale(prefactor,drk,drk); + vec3_scale(dfc*gijk*ex_delr,rik_hat,tmp3); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,tmp3,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,tmp3); + vec3_scale(prefactor,tmp3,drk); } ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, @@ -283,7 +283,7 @@ ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, numtyp dri[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc(rik,param_bigr,param_bigd); dfc = ters_fc_d(rik,param_bigr,param_bigd); @@ -310,11 +310,11 @@ ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); - vec3_scale(prefactor,dri,dri); + vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,tmp3); + vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,tmp3,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,tmp3); + vec3_scale(prefactor,tmp3,dri); } ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, @@ -335,7 +335,7 @@ ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, numtyp drj[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc(rik,param_bigr,param_bigd); @@ -361,8 +361,8 @@ ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); - vec3_scale(prefactor,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,tmp3); + vec3_scale(prefactor,tmp3,drj); } ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, @@ -383,7 +383,7 @@ ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, numtyp drk[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc(rik,param_bigr,param_bigd); dfc = ters_fc_d(rik,param_bigr,param_bigd); @@ -410,10 +410,10 @@ ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); - vec3_scale(prefactor,drk,drk); + vec3_scale(dfc*gijk*ex_delr,rik_hat,tmp3); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,tmp3,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,tmp3); + vec3_scale(prefactor,tmp3,drk); } /* ---------------------------------------------------------------------- */ @@ -531,8 +531,8 @@ ucl_inline void attractive(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_h, param_c1, param_c2, param_c3, param_c4, param_c5, @@ -559,8 +559,8 @@ ucl_inline void attractive_fi(const numtyp param_bigr, numtyp fi[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d_fi(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_h, param_c1, param_c2, param_c3, param_c4, param_c5, @@ -587,8 +587,8 @@ ucl_inline void attractive_fj(const numtyp param_bigr, numtyp fj[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d_fj(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_h, param_c1, param_c2, param_c3, param_c4, param_c5, @@ -615,8 +615,8 @@ ucl_inline void attractive_fk(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d_fk(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_h, param_c1, param_c2, param_c3, param_c4, param_c5, diff --git a/lib/gpu/lal_tersoff_zbl_extra.h b/lib/gpu/lal_tersoff_zbl_extra.h index e8ac3b2438..6ea3418f20 100644 --- a/lib/gpu/lal_tersoff_zbl_extra.h +++ b/lib/gpu/lal_tersoff_zbl_extra.h @@ -37,16 +37,16 @@ ucl_inline void vec3_add(const numtyp x[3], const numtyp y[3], numtyp z[3]) z[0] = x[0]+y[0]; z[1] = x[1]+y[1]; z[2] = x[2]+y[2]; } -ucl_inline void vec3_scale(const numtyp k, numtyp x[3], numtyp y[3]) +ucl_inline void vec3_scale(const numtyp k, const numtyp x[3], numtyp y[3]) { - // return y = k * x (y can be at the same address as x) + // return y = k * x y[0] = k*x[0]; y[1] = k*x[1]; y[2] = k*x[2]; } -ucl_inline void vec3_scaleadd(const numtyp k, numtyp x[3], +ucl_inline void vec3_scaleadd(const numtyp k, const numtyp x[3], const numtyp y[3], numtyp z[3]) { - // return z = k * x + y (z can be at the same address as x) + // return z = k * x + y z[0] = k*x[0]+y[0]; z[1] = k*x[1]+y[1]; z[2] = k*x[2]+y[2]; } @@ -91,16 +91,16 @@ ucl_inline void costheta_d(const numtyp rij_hat[3], numtyp drj[3], numtyp drk[3]) { + numtyp tmp3[3]; // first element is derivative wrt Ri, second wrt Rj, third wrt Rk + const numtyp cos_theta = vec3_dot(rij_hat,rik_hat); - numtyp cos_theta = vec3_dot(rij_hat,rik_hat); - - vec3_scaleadd(-cos_theta,(numtyp *)rij_hat,(numtyp *)rik_hat,drj); - vec3_scale(ucl_recip(rij),drj,drj); - vec3_scaleadd(-cos_theta,(numtyp *)rik_hat,(numtyp *)rij_hat,drk); - vec3_scale(ucl_recip(rik),drk,drk); - vec3_add(drj,drk,dri); - vec3_scale((numtyp)-1.0,dri,dri); + vec3_scaleadd(-cos_theta,rij_hat,rik_hat,tmp3); + vec3_scale(ucl_recip(rij),tmp3,drj); + vec3_scaleadd(-cos_theta,rik_hat,rij_hat,tmp3); + vec3_scale(ucl_recip(rik),tmp3,drk); + vec3_add(drj,drk,tmp3); + vec3_scale((numtyp)-1.0,tmp3,dri); } /* ---------------------------------------------------------------------- */ @@ -246,7 +246,7 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, numtyp drk[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc(rik,param_bigr,param_bigd); dfc = ters_fc_d(rik,param_bigr,param_bigd); @@ -273,29 +273,29 @@ ucl_inline void ters_zetaterm_d(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); - vec3_scale(prefactor,dri,dri); + vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,tmp3); + vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,tmp3,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,tmp3); + vec3_scale(prefactor,tmp3,dri); // compute the derivative wrt Rj // drj = fc*gijk_d*ex_delr*dcosdrj; // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); - vec3_scale(prefactor,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,tmp3); + vec3_scale(prefactor,tmp3,drj); // compute the derivative wrt Rk // drk = dfc*gijk*ex_delr*rik_hat; // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); - vec3_scale(prefactor,drk,drk); + vec3_scale(dfc*gijk*ex_delr,rik_hat,tmp3); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,tmp3,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,tmp3); + vec3_scale(prefactor,tmp3,drk); } ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, @@ -314,7 +314,7 @@ ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, numtyp dri[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc(rik,param_bigr,param_bigd); dfc = ters_fc_d(rik,param_bigr,param_bigd); @@ -341,11 +341,11 @@ ucl_inline void ters_zetaterm_d_fi(const numtyp prefactor, // dri += fc*gijk_d*ex_delr*dcosdri; // dri += fc*gijk*ex_delr_d*(rik_hat - rij_hat); - vec3_scale(-dfc*gijk*ex_delr,(numtyp *)rik_hat,dri); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,dri); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rik_hat,dri,dri); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rij_hat,dri,dri); - vec3_scale(prefactor,dri,dri); + vec3_scale(-dfc*gijk*ex_delr,rik_hat,dri); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdri,dri,tmp3); + vec3_scaleadd(fc*gijk*ex_delr_d,rik_hat,tmp3,dri); + vec3_scaleadd(-fc*gijk*ex_delr_d,rij_hat,dri,tmp3); + vec3_scale(prefactor,tmp3,dri); } ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, @@ -364,7 +364,7 @@ ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, numtyp drj[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc(rik,param_bigr,param_bigd); @@ -390,8 +390,8 @@ ucl_inline void ters_zetaterm_d_fj(const numtyp prefactor, // drj += fc*gijk*ex_delr_d*rij_hat; vec3_scale(fc*gijk_d*ex_delr,dcosdrj,drj); - vec3_scaleadd(fc*gijk*ex_delr_d,(numtyp *)rij_hat,drj,drj); - vec3_scale(prefactor,drj,drj); + vec3_scaleadd(fc*gijk*ex_delr_d,rij_hat,drj,tmp3); + vec3_scale(prefactor,tmp3,drj); } ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, @@ -410,7 +410,7 @@ ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, numtyp drk[3]) { numtyp gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp; - numtyp dcosdri[3],dcosdrj[3],dcosdrk[3]; + numtyp dcosdri[3],dcosdrj[3],dcosdrk[3],tmp3[3]; fc = ters_fc(rik,param_bigr,param_bigd); dfc = ters_fc_d(rik,param_bigr,param_bigd); @@ -437,10 +437,10 @@ ucl_inline void ters_zetaterm_d_fk(const numtyp prefactor, // drk += fc*gijk_d*ex_delr*dcosdrk; // drk += -fc*gijk*ex_delr_d*rik_hat; - vec3_scale(dfc*gijk*ex_delr,(numtyp *)rik_hat,drk); - vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,drk,drk); - vec3_scaleadd(-fc*gijk*ex_delr_d,(numtyp *)rik_hat,drk,drk); - vec3_scale(prefactor,drk,drk); + vec3_scale(dfc*gijk*ex_delr,rik_hat,tmp3); + vec3_scaleadd(fc*gijk_d*ex_delr,dcosdrk,tmp3,drk); + vec3_scaleadd(-fc*gijk*ex_delr_d,rik_hat,drk,tmp3); + vec3_scale(prefactor,tmp3,drk); } /* ---------------------------------------------------------------------- */ @@ -604,8 +604,8 @@ ucl_inline void attractive(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fi, fj, fk); @@ -629,8 +629,8 @@ ucl_inline void attractive_fi(const numtyp param_bigr, numtyp fi[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d_fi(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fi); @@ -654,8 +654,8 @@ ucl_inline void attractive_fj(const numtyp param_bigr, numtyp fj[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d_fj(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fj); @@ -679,8 +679,8 @@ ucl_inline void attractive_fk(const numtyp param_bigr, numtyp fk[3]) { numtyp rij_hat[3],rik_hat[3]; - vec3_scale(rijinv,(numtyp *)delrij,rij_hat); - vec3_scale(rikinv,(numtyp *)delrik,rik_hat); + vec3_scale(rijinv,delrij,rij_hat); + vec3_scale(rikinv,delrik,rik_hat); ters_zetaterm_d_fk(prefactor,rij_hat,rij,rik_hat,rik, param_bigr, param_bigd, param_powermint, param_lam3, param_c, param_d, param_h, param_gamma, fk); From af231a1327660c18fbfb007b7f832200d78f18aa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Feb 2023 21:20:46 -0500 Subject: [PATCH 168/445] explicitly request parallel compilation with 2 parallel processes on Windows --- .github/workflows/compile-msvc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-msvc.yml b/.github/workflows/compile-msvc.yml index e904cf7c8f..5ae0654ee0 100644 --- a/.github/workflows/compile-msvc.yml +++ b/.github/workflows/compile-msvc.yml @@ -44,7 +44,7 @@ jobs: -D BUILD_SHARED_LIBS=on \ -D LAMMPS_EXCEPTIONS=on \ -D ENABLE_TESTING=on - cmake --build build --config Release + cmake --build build --config Release --parallel 2 - name: Run LAMMPS executable shell: bash From c37c752d3693da2030b8c3bede69bf1b9d1aedc4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 9 Feb 2023 21:21:51 -0500 Subject: [PATCH 169/445] update markdown files for revised branch structure and development workflow --- SECURITY.md | 26 +++++---- doc/github-development-workflow.md | 85 ++++++++++++++++-------------- 2 files changed, 61 insertions(+), 50 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index e9b33afdcb..1664dde169 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -32,17 +32,21 @@ for unicode characters and only all-ASCII source code is accepted. LAMMPS follows a continuous release development model. We aim to keep the development version (`develop` branch) always fully functional and -employ a variety of automatic testing procedures to detect failures -of existing functionality from adding or modifying features. Most of -those tests are run on pull requests *before* merging to the `develop` -branch. The `develop` branch is protected, so all changes *must* be -submitted as a pull request and thus cannot avoid the automated tests. +employ a variety of automatic testing procedures to detect failures of +existing functionality from adding or modifying features. Most of those +tests are run on pull requests and must be passed *before* merging to +the `develop` branch. The `develop` branch is protected, so all changes +*must* be submitted as a pull request and thus cannot avoid the +automated tests. Additional tests are run *after* merging. Before releases are made *all* tests must have cleared. Then a release tag is applied and the -`release` branch is fast-forwarded to that tag. This is often referred -to as a patch release. Bug fixes and updates are -applied first to the `develop` branch. Later, they appear in the `release` -branch when the next patch release occurs. -For stable releases, selected bug fixes, updates, and new functionality -are pushed to the `stable` branch and a new stable tag is applied. +`release` branch is fast-forwarded to that tag. This is referred to to +as a "feature release". Bug fixes and updates are applied first to the +`develop` branch. Later, they appear in the `release` branch when the +next patch release occurs. For stable releases, backported bug fixes +and infrastructure updates are first applied to the `maintenance` branch +and then merged to `stable` and published as "updates". For a new +stable release the `stable` branch is updated to the corresponding state +of the `release` branch and a new stable tag is applied in addition to +the release tag. diff --git a/doc/github-development-workflow.md b/doc/github-development-workflow.md index 1c0eddedcf..8e8ac6597b 100644 --- a/doc/github-development-workflow.md +++ b/doc/github-development-workflow.md @@ -27,42 +27,45 @@ should doing the merging itself. This is currently assignment needs to be changed, it shall be done right after a stable release. If the currently assigned developer cannot merge outstanding pull requests in a timely manner, or in other extenuating circumstances, -other core LAMMPS developers with merge rights can merge pull requests, -when necessary. +other core LAMMPS developers with merge permissons may merge pull +requests. ## Pull Requests -ALL changes to the LAMMPS code and documentation, however trivial, MUST -be submitted as a pull request to GitHub. All changes to the "develop" -branch must be made exclusively through merging pull requests. The +*ALL* changes to the LAMMPS code and documentation, however trivial, MUST +be submitted as a pull request to GitHub. All changes to the "develop" +branch must be made exclusively through merging pull requests. The "release" and "stable" branches, respectively are only to be updated -upon patch or stable releases with fast-forward merges based on the -associated tags. Pull requests may also be submitted to (long-running) -feature branches created by LAMMPS developers inside the LAMMPS project, -if needed. Those are not subject to the merge and review restrictions -discussed in this document, though, but get managed as needed on a -case-by-case basis. +upon feature or stable releases based on the associated tags. Updates to +stable release in between stable releases (e.g. backported bugfixes) +are first merged into the "maintenance" branch and then into the "stable" +branch as update releases. + +Pull requests may also be submitted to (long-running) feature branches +created by LAMMPS developers inside the LAMMPS project, if needed. Those +are not subject to the merge and review restrictions discussed in this +document, though, but get managed as needed on a case-by-case basis. ### Pull Request Assignments Pull requests can be "chaperoned" by one of the LAMMPS core developers. -This is indicated by who the pull request is assigned to. LAMMPS core +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 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 -period the `work_in_progress` label may be applied to the pull -request. The assignee gets to decide what happens to the pull request -next, e.g. whether it should be assigned to a different developer for -additional checks and changes, or is recommended to be merged. Removing -the `work_in_progress` label and assigning the pull request to the -developer tasked with merging signals that a pull request is ready to be -merged. In addition, a `ready_for_merge` label may also be assigned -to signal urgency to merge this pull request quickly. +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 period the `work_in_progress` label may be applied to +the pull request. The assignee gets to decide what happens to the pull +request next, e.g. whether it should be assigned to a different +developer for additional checks and changes, or is recommended to be +merged. Removing the `work_in_progress` label and assigning the pull +request to the developer tasked with merging signals that a pull request +is ready to be merged. In addition, a `ready_for_merge` label may also +be assigned to signal urgency to merge this pull request quickly. ### Pull Request Reviews @@ -126,22 +129,26 @@ changes, i.e. significant effort is made - including automated pre-merge testing - that the code in the branch "develop" does not get easily broken. These tests are run after every update to a pull request. More extensive and time consuming tests (including regression testing) are -performed after code is merged to the "develop" branch. There are patch -releases of LAMMPS every 3-5 weeks at a point, when the LAMMPS -developers feel, that a sufficient amount of changes have happened, and -the post-merge testing has been successful. These patch releases are +performed after code is merged to the "develop" branch. There are feature +releases of LAMMPS made about every 4-6 weeks at a point, when the LAMMPS +developers feel, that a sufficient amount of changes have been included, +and all post-merge testing has been successful. These feature releases are marked with a `patch_` tag and the "release" branch -follows only these versions (and thus is always supposed to be of -production quality, unlike "develop", which may be temporary broken, in -the case of larger change sets or unexpected incompatibilities or side -effects. +follows only these versions with fast forward merges. While "develop" may +be temporary broken through issues only detected by the post-merge tests, +The "release" branch is always supposed to be of production quality. -About 1-2 times each year, there are going to be "stable" releases of +About once each year, there are going to be "stable" releases of LAMMPS. These have seen additional, manual testing and review of results from testing with instrumented code and static code analysis. -Also, the last 1-3 patch releases before a stable release are "release -candidate" versions which only contain bugfixes and documentation -updates. For release planning and the information of code contributors, -issues and pull requests being actively worked on are assigned a -"milestone", which corresponds to the next stable release or the stable -release after that, with a tentative release date. +Also, the last few feature releases before a stable release are "release +candidate" versions which only contain bugfixes, feature additions to +peripheral functionality, and documentation updates. In between stable +releases, bugfixes and infrastructure updates are backported from the +"develop" branch to the "maintenance" branch and occasionally merged +into "stable" and published as update releases. + +For release planning and the information of code contributors, issues +and pull requests being actively worked on are assigned a "milestone", +which corresponds to the next stable release or the stable release after +that, with a tentative release date. From 58a90d613bd0afa7a816da25953ff9981e6880cb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Feb 2023 00:50:36 -0500 Subject: [PATCH 170/445] update manual for revised release and branch names --- doc/src/Build_manual.rst | 2 +- doc/src/Howto_github.rst | 31 ++++++++++++++++++++----------- doc/src/Install_git.rst | 32 ++++++++++++++++++-------------- doc/src/Install_linux.rst | 30 +++++++++++++++++++++++++++++- doc/src/Install_tarball.rst | 17 +++++++++-------- doc/src/Manual_version.rst | 28 ++++++++++++++-------------- doc/src/Modify_contribute.rst | 4 ++-- 7 files changed, 93 insertions(+), 51 deletions(-) diff --git a/doc/src/Build_manual.rst b/doc/src/Build_manual.rst index eaa9f44a1c..c726d37ea6 100644 --- a/doc/src/Build_manual.rst +++ b/doc/src/Build_manual.rst @@ -33,7 +33,7 @@ various tools and files. Some of them have to be installed (see below). For the rest the build process will attempt to download and install them into a python virtual environment and local folders. -A current version of the manual (latest patch release, that is the state +A current version of the manual (latest feature release, that is the state of the *release* branch) is is available online at: `https://docs.lammps.org/ `_. A version of the manual corresponding to the ongoing development (that is diff --git a/doc/src/Howto_github.rst b/doc/src/Howto_github.rst index 0b465d318b..cbe1264d52 100644 --- a/doc/src/Howto_github.rst +++ b/doc/src/Howto_github.rst @@ -476,16 +476,25 @@ to your remote(s) as well: **Recent changes in the workflow** -Some changes to the workflow are not captured in this tutorial. For -example, in addition to the *develop* branch, to which all new features -should be submitted, there is also a *release* and a *stable* branch; -these have the same content as *develop*, but are only updated after a -patch release or stable release was made. Furthermore, the naming of -the patches now follow the pattern "patch_" to -simplify comparisons between releases. Finally, all patches and -submissions are subject to automatic testing and code checks to make -sure they at the very least compile. +Some recent changes to the workflow are not captured in this tutorial. +For example, in addition to the *develop* branch, to which all new +features should be submitted, there is also a *release*, a *stable*, and +a *maintenance* branch; the *release* branch is updated from the +*develop* as part of a feature release, and *stable* (together with +*release*) are updated from *develop* when a stable release is made. In +between stable releases, selected bug fixes and infrastructure updates +are back-ported from the *develop* branch to the *maintenance* branch +and occasionally merged to *stable* as an update release. -A discussion of the LAMMPS developer GitHub workflow can be found in the -file `doc/github-development-workflow.md +Furthermore, the naming of the release tags now follow the pattern +"patch_" to simplify comparisons between releases. +For stable releases additional "stable_" tags are +applied and update releases are tagged with +"stable__update", Finally, all releases and +submissions are subject to automatic testing and code checks to make +sure they compile with a variety of compilers and popular operating +systems. Some unit and regression testing is applied as well. + +A detailed discussion of the LAMMPS developer GitHub workflow can be +found in the file `doc/github-development-workflow.md `_ diff --git a/doc/src/Install_git.rst b/doc/src/Install_git.rst index de948b3671..b11477689b 100644 --- a/doc/src/Install_git.rst +++ b/doc/src/Install_git.rst @@ -26,15 +26,18 @@ provides `limited support for subversion clients `_. .. _git: https://git-scm.com .. _svn: https://help.github.com/en/github/importing-your-projects-to-github/working-with-subversion-on-github -You can follow the LAMMPS development on 3 different git branches: +You can follow the LAMMPS development on 4 different git branches: -* **stable** : this branch is updated from the *release* branch with - every stable release version and also has selected bug fixes and updates - back-ported from the *develop* branch * **release** : this branch is updated with every patch or feature release; updates are always "fast-forward" merges from *develop* * **develop** : this branch follows the ongoing development and is updated with every merge commit of a pull request +* **stable** : this branch is updated from the *release* branch with + every stable release version and also has selected bug fixes with every + update release when the *maintenance* branch is merged into it +* **maintenance** : this branch collects back-ported bug fixes from the + *develop* branch to the *stable* branch. It is used to update *stable* + for update releases and it synchronized with *stable* at each stable release. To access the git repositories on your box, use the clone command to create a local copy of the LAMMPS repository with a command like: @@ -60,17 +63,17 @@ between them at any time using "git checkout ".) *--depth* git command line flag. That will create a "shallow clone" of the repository, which contains only a subset of the git history. Using a depth of 1000 is usually sufficient to include the head - commits of the *develop* and the *release* branches. To include the - head commit of the *stable* branch you may need a depth of up - to 10000. If you later need more of the git history, you can always - convert the shallow clone into a "full clone". + commits of the *develop*, the *release*, and the *maintenance* + branches. To include the head commit of the *stable* branch you may + need a depth of up to 10000. If you later need more of the git + history, you can always convert the shallow clone into a "full + clone". Once the command completes, your directory will contain the same files as if you unpacked a current LAMMPS tarball, with the exception, that -the HTML documentation files are not included. They can be fetched -from the LAMMPS website by typing ``make fetch`` in the doc directory. -Or they can be generated from the content provided in ``doc/src`` by -typing ``make html`` from the ``doc`` directory. +the HTML documentation files are not included. They can be generated +from the content provided in ``doc/src`` by typing ``make html`` from +the ``doc`` directory. After initial cloning, as bug fixes and new features are added to LAMMPS you can stay up-to-date by typing the following git commands @@ -79,8 +82,9 @@ from within the "mylammps" directory: .. code-block:: bash git checkout release # not needed if you always stay in this branch - git checkout stable # use one of these 3 checkout commands + git checkout stable # use one of these 4 checkout commands git checkout develop # to choose the branch to follow + git checkout maintenance git pull Doing a "pull" will not change any files you have added to the LAMMPS @@ -145,7 +149,7 @@ changed. How to do this depends on the build system you are using. to enforce consistency of the source between the src folder and package directories. This is OK to do even if you don't use any packages. The ``make purge`` command removes any deprecated - src files if they were removed by the patch from a package + src files if they were removed by the update from a package subdirectory. .. warning:: diff --git a/doc/src/Install_linux.rst b/doc/src/Install_linux.rst index bf33e35ee2..f902b1b987 100644 --- a/doc/src/Install_linux.rst +++ b/doc/src/Install_linux.rst @@ -3,6 +3,7 @@ Download an executable for Linux Binaries are available for different versions of Linux: +- :ref:`Pre-built static Linux x86_64 executables ` - :ref:`Pre-built Ubuntu and Debian Linux executables ` - :ref:`Pre-built Fedora Linux executables ` - :ref:`Pre-built EPEL Linux executables (RHEL, CentOS) ` @@ -21,6 +22,33 @@ Binaries are available for different versions of Linux: ---------- +.. _static: + +Pre-built static Linux x86_64 executables +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Pre-built LAMMPS executables for Linux, that are statically linked and +compiled for 64-bit x86 CPUs (x86_64 or AMD64) are available for download +at `https://download.lammps.org/static/ `_. +Because of that static linkage (and unlike the Linux distribution specific +packages listed below), they do not depend on any installed software and +thus should run on *any* 64-bit x86 machine with *any* Linux version. + +These executable include most of the available packages and multi-thread +parallelization (via INTEL, KOKKOS, or OPENMP package). They are **not** +compatible with MPI. Several of the LAMMPS tools executables (e.g. ``msi2lmp``) +and the ``lammps-shell`` program are included as well. Because of the +static linkage, there is no ``liblammps.so`` library file and thus also the +LAMMPS python module, which depends on it, is not included. + +The compressed tar archives available for download have names following +the pattern `lammps-linux-x86_64-.tar.gz` and will all unpack +into a ``lammps-static`` folder. The executables are then in the +``lammps-static/bin/`` folder. Since they do not depend on any other +software, they may be freely moved or copied around. + +---------- + .. _ubuntu: Pre-built Ubuntu and Debian Linux executables @@ -232,7 +260,7 @@ There are three scripts available, named `lammps `_, `lammps-beta `_ and `lammps-git `_. They respectively -package the stable, patch and git releases. +package the stable, feature, and git releases. To install, you will need to have the git package installed. You may use any of the above names in-place of lammps. diff --git a/doc/src/Install_tarball.rst b/doc/src/Install_tarball.rst index 0765d71044..64d73ee356 100644 --- a/doc/src/Install_tarball.rst +++ b/doc/src/Install_tarball.rst @@ -10,15 +10,15 @@ of the `LAMMPS website `_. .. _lws: https://www.lammps.org You have two choices of tarballs, either the most recent stable release -or the most current patch or feature release. Stable releases occur a -few times per year, and undergo more testing before release. Feature -releases occur every 4 to 8 weeks. The new contents in all feature -releases are listed on the `bug and feature page `_ of the LAMMPS -homepage. +or the most recent feature release. Stable releases occur a few times +per year, and undergo more testing before release. Also, between stable +releases bug fixes from the feature releases are back-ported and the +tarball occasionally updated. Feature releases occur every 4 to 8 +weeks. The new contents in all feature releases are listed on the `bug +and feature page `_ of the LAMMPS homepage. Both tarballs include LAMMPS documentation (HTML and PDF files) -corresponding to that version. The download page also has an option -to download the current-version LAMMPS documentation by itself. +corresponding to that version. Tarballs of older LAMMPS versions can also be downloaded from `this page `_. @@ -44,7 +44,8 @@ with the following command, to create a lammps- directory: unzip lammps*.zip -This version corresponds to the selected LAMMPS patch or stable release. +This version corresponds to the selected LAMMPS feature or stable +release. .. _git: https://github.com/lammps/lammps/releases diff --git a/doc/src/Manual_version.rst b/doc/src/Manual_version.rst index 6f99b9f117..8fb28fef84 100644 --- a/doc/src/Manual_version.rst +++ b/doc/src/Manual_version.rst @@ -12,13 +12,12 @@ into pull requests. Pull requests will be merged into the *develop* branch of the git repository after they pass automated testing and code review by the LAMMPS developers. When a sufficient number of changes have accumulated *and* the *develop* branch version passes an extended -set of automated tests, we release it as a *feature release* (or patch -release), which are currently made every 4 to 8 weeks. The *release* -branch of the git repository is updated with every such release. A -summary of the most important changes of the patch releases are on `this -website page `_. More detailed release -notes are `available on GitHub -`_. +set of automated tests, we release it as a *feature release*, which are +currently made every 4 to 8 weeks. The *release* branch of the git +repository is updated with every such release. A summary of the most +important changes of the patch releases are on `this website page +`_. More detailed release notes are +`available on GitHub `_. Once or twice a year, we have a "stabilization period" where we apply only bug fixes and small, non-intrusive changes to the *develop* @@ -28,13 +27,14 @@ several variants of static code analysis are run to improve the overall code quality, consistency, and compliance with programming standards, best practices and style conventions. -The latest patch release after such a period is then also labeled as a -*stable* version and the *stable* branch is updated with it. Between -stable releases, we occasionally release updates to the stable release -containing only bug fixes and updates back-ported from the *develop* -branch and update the *stable* branch accordingly. +The release after such a stabilization period is called a *stable* +version and both, the *release* and the *stable* branches are updated +with it. Between stable releases, we collect back-ported bug fixes and +updates from the *develop* branch in the *maintenance* branch. From the +*maintenance* branch we make occasional update releases and update the +*stable* branch accordingly. -Each version of LAMMPS contains all the documented features up to and +Each version of LAMMPS contains all the documented *features* up to and including its version date. For recently added features, we add markers to the documentation at which specific LAMMPS version a feature or keyword was added or significantly changed. @@ -45,7 +45,7 @@ directory name created when you unpack a tarball. And it is on the first page of the :doc:`manual `. * If you browse the HTML pages of the online version of the LAMMPS - manual, they will by default describe the most current patch release + manual, they will by default describe the most current feature release version of LAMMPS. In the navigation bar on the bottom left, there is the option to view instead the documentation for the most recent *stable* version or the documentation corresponding to the state of diff --git a/doc/src/Modify_contribute.rst b/doc/src/Modify_contribute.rst index 5ccb83e328..d36e68b093 100644 --- a/doc/src/Modify_contribute.rst +++ b/doc/src/Modify_contribute.rst @@ -80,8 +80,8 @@ integrated via pull requests on GitHub and cannot be merged without passing the automated testing and an approving review by a LAMMPS core developer. Thus before submitting your contribution, you should first make certain, that your added or modified code compiles and works -correctly with the latest patch-level or development version of LAMMPS -and contains all bug fixes from it. +correctly with the latest development version of LAMMPS and contains all +bug fixes from it. Once you have prepared everything, see the :doc:`LAMMPS GitHub Tutorial ` page for instructions on how to submit your changes or From 88ccd546d84982108738ba4e66c6d0e2ea01f5fd Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 9 Feb 2023 23:55:14 -0600 Subject: [PATCH 171/445] Fixed bugs with gauss/gpu in bonded systems, including factor_lj in forces and energies --- lib/gpu/lal_gauss.cpp | 4 ++-- lib/gpu/lal_gauss.cu | 27 +++++++++++++++++---------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/lib/gpu/lal_gauss.cpp b/lib/gpu/lal_gauss.cpp index 6d8f0f02aa..5a7bd24b85 100644 --- a/lib/gpu/lal_gauss.cpp +++ b/lib/gpu/lal_gauss.cpp @@ -133,13 +133,13 @@ int GaussT::loop(const int eflag, const int vflag) { this->time_pair.start(); if (shared_types) { this->k_pair_sel->set_size(GX,BX); - this->k_pair_sel->run(&this->atom->x, &gauss1, + this->k_pair_sel->run(&this->atom->x, &gauss1, &sp_lj, &this->nbor->dev_nbor, &this->_nbor_data->begin(), &this->ans->force, &this->ans->engv, &eflag, &vflag, &ainum, &nbor_pitch, &this->_threads_per_atom); } else { this->k_pair.set_size(GX,BX); - this->k_pair.run(&this->atom->x, &gauss1, &_lj_types, + this->k_pair.run(&this->atom->x, &gauss1, &_lj_types, &sp_lj, &this->nbor->dev_nbor, &this->_nbor_data->begin(), &this->ans->force, &this->ans->engv, &eflag, &vflag, &ainum, &nbor_pitch, &this->_threads_per_atom); diff --git a/lib/gpu/lal_gauss.cu b/lib/gpu/lal_gauss.cu index 2540b8492f..cb6b72db30 100644 --- a/lib/gpu/lal_gauss.cu +++ b/lib/gpu/lal_gauss.cu @@ -27,6 +27,7 @@ _texture_2d( pos_tex,int4); __kernel void k_gauss(const __global numtyp4 *restrict x_, const __global numtyp4 *restrict gauss1, const int lj_types, + const __global numtyp *restrict sp_lj, const __global int *dev_nbor, const __global int *dev_packed, __global acctyp4 *restrict ans, @@ -56,9 +57,11 @@ __kernel void k_gauss(const __global numtyp4 *restrict x_, numtyp4 ix; fetch4(ix,i,pos_tex); //x_[i]; int itype=ix.w; + numtyp factor_lj; for ( ; nbor Date: Fri, 10 Feb 2023 04:47:19 -0500 Subject: [PATCH 172/445] consistently support special_bonds settings in pair style gauss --- doc/src/pair_gauss.rst | 25 ++- src/EXTRA-PAIR/pair_gauss.cpp | 174 +++++++++--------- src/OPENMP/pair_gauss_omp.cpp | 79 ++++---- .../force-styles/tests/mol-pair-gauss.yaml | 129 ++++++------- 4 files changed, 206 insertions(+), 201 deletions(-) diff --git a/doc/src/pair_gauss.rst b/doc/src/pair_gauss.rst index 091bd52d45..f6d8134467 100644 --- a/doc/src/pair_gauss.rst +++ b/doc/src/pair_gauss.rst @@ -137,16 +137,19 @@ interaction. The :doc:`pair_modify ` table and tail options are not relevant for these pair styles. -These pair styles write their information to :doc:`binary restart files `, so pair_style and pair_coeff commands do not need -to be specified in an input script that reads a restart file. +These pair styles write their information to :doc:`binary restart files +`, so pair_style and pair_coeff commands do not need to be +specified in an input script that reads a restart file. These pair styles can only be used via the *pair* keyword of the :doc:`run_style respa ` command. They do not support the *inner*, *middle*, *outer* keywords. -The *gauss* pair style tallies an "occupancy" count of how many Gaussian-well -sites have an atom within the distance at which the force is a maximum -= sqrt(0.5/b). This quantity can be accessed via the :doc:`compute pair ` command as a vector of values of length 1. +The *gauss* pair style tallies an "occupancy" count of how many +Gaussian-well sites have an atom within the distance at which the force +is a maximum = sqrt(0.5/b). This quantity can be accessed via the +:doc:`compute pair ` command as a vector of values of +length 1. To print this quantity to the log file (with a descriptive column heading) the following commands could be included in an input script: @@ -166,14 +169,10 @@ The *gauss* and *gauss/cut* styles are part of the EXTRA-PAIR package. They are only enabled if LAMMPS is build with that package. See the :doc:`Build package ` page for more info. -The *gauss* style does not apply :doc:`special_bonds ` -factors. When using this pair style on a system that has bonds, the -special_bonds factors, if using the default setting of 0.0, may need to -be adjusted to some very small number (e.g. 1.0e-100), so that those -special pairs are not completely excluded from the neighbor lists, but -won't contribute forces or energies from styles (e.g. when used in -combination with a :doc:`hybrid pair style `) that do -apply those factors. +.. versionchanged:: TBD + +Prior to this version, the *gauss* pair style did not apply +:doc:`special_bonds ` factors. Related commands """""""""""""""" diff --git a/src/EXTRA-PAIR/pair_gauss.cpp b/src/EXTRA-PAIR/pair_gauss.cpp index 698c309f48..a9c146999b 100644 --- a/src/EXTRA-PAIR/pair_gauss.cpp +++ b/src/EXTRA-PAIR/pair_gauss.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -18,20 +17,17 @@ #include "pair_gauss.h" -#include -#include #include "atom.h" #include "comm.h" -#include "force.h" -#include "neigh_list.h" -#include "memory.h" #include "error.h" +#include "force.h" +#include "memory.h" +#include "neigh_list.h" +#include using namespace LAMMPS_NS; -#define EPSILON 1.0e-10 - /* ---------------------------------------------------------------------- */ PairGauss::PairGauss(LAMMPS *lmp) : Pair(lmp) @@ -45,7 +41,7 @@ PairGauss::PairGauss(LAMMPS *lmp) : Pair(lmp) PairGauss::~PairGauss() { - delete [] pvector; + delete[] pvector; if (allocated) { memory->destroy(setflag); @@ -62,19 +58,19 @@ PairGauss::~PairGauss() void PairGauss::compute(int eflag, int vflag) { - int i,j,ii,jj,inum,jnum,itype,jtype; - double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; - double rsq; - int *ilist,*jlist,*numneigh,**firstneigh; + int i, j, ii, jj, inum, jnum, itype, jtype; + double xtmp, ytmp, ztmp, rsq, delx, dely, delz, evdwl, fpair, factor_lj; + int *ilist, *jlist, *numneigh, **firstneigh; evdwl = 0.0; - ev_init(eflag,vflag); + ev_init(eflag, vflag); int occ = 0; double **x = atom->x; double **f = atom->f; int *type = atom->type; int nlocal = atom->nlocal; + double *special_lj = force->special_lj; int newton_pair = force->newton_pair; inum = list->inum; @@ -95,36 +91,39 @@ void PairGauss::compute(int eflag, int vflag) for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; + factor_lj = special_lj[sbmask(j)]; j &= NEIGHMASK; delx = xtmp - x[j][0]; dely = ytmp - x[j][1]; delz = ztmp - x[j][2]; - rsq = delx*delx + dely*dely + delz*delz; + rsq = delx * delx + dely * dely + delz * delz; jtype = type[j]; // define a Gaussian well to be occupied if // the site it interacts with is within the force maximum - if (eflag_global && rsq < 0.5/b[itype][jtype]) occ++; + if (eflag_global && rsq < 0.5 / b[itype][jtype]) occ++; if (rsq < cutsq[itype][jtype]) { - fpair = -2.0*a[itype][jtype]*b[itype][jtype] * exp(-b[itype][jtype]*rsq); + fpair = -2.0 * a[itype][jtype] * b[itype][jtype] * exp(-b[itype][jtype] * rsq); + fpair *= factor_lj; - f[i][0] += delx*fpair; - f[i][1] += dely*fpair; - f[i][2] += delz*fpair; + f[i][0] += delx * fpair; + f[i][1] += dely * fpair; + f[i][2] += delz * fpair; if (newton_pair || j < nlocal) { - f[j][0] -= delx*fpair; - f[j][1] -= dely*fpair; - f[j][2] -= delz*fpair; + f[j][0] -= delx * fpair; + f[j][1] -= dely * fpair; + f[j][2] -= delz * fpair; } - if (eflag) - evdwl = -(a[itype][jtype]*exp(-b[itype][jtype]*rsq) - offset[itype][jtype]); + if (eflag) { + evdwl = -(a[itype][jtype] * exp(-b[itype][jtype] * rsq) - offset[itype][jtype]); + evdwl *= factor_lj; + } - if (evflag) ev_tally(i,j,nlocal,newton_pair, - evdwl,0.0,fpair,delx,dely,delz); + if (evflag) ev_tally(i, j, nlocal, newton_pair, evdwl, 0.0, fpair, delx, dely, delz); } } } @@ -140,19 +139,18 @@ void PairGauss::compute(int eflag, int vflag) void PairGauss::allocate() { allocated = 1; - int n = atom->ntypes; + int np1 = atom->ntypes + 1; - memory->create(setflag,n+1,n+1,"pair:setflag"); - for (int i = 1; i <= n; i++) - for (int j = 1; j <= n; j++) - setflag[i][j] = 0; + memory->create(setflag, np1, np1, "pair:setflag"); + for (int i = 1; i < np1; i++) + for (int j = 1; j < np1; j++) setflag[i][j] = 0; - memory->create(cutsq,n+1,n+1,"pair:cutsq"); + memory->create(cutsq, np1, np1, "pair:cutsq"); - memory->create(cut,n+1,n+1,"pair:cut_gauss"); - memory->create(a,n+1,n+1,"pair:a"); - memory->create(b,n+1,n+1,"pair:b"); - memory->create(offset,n+1,n+1,"pair:offset"); + memory->create(cut, np1, np1, "pair:cut_gauss"); + memory->create(a, np1, np1, "pair:a"); + memory->create(b, np1, np1, "pair:b"); + memory->create(offset, np1, np1, "pair:offset"); } /* ---------------------------------------------------------------------- @@ -161,14 +159,14 @@ void PairGauss::allocate() void PairGauss::settings(int narg, char **arg) { - if (narg != 1) error->all(FLERR,"Illegal pair_style command"); + if (narg != 1) error->all(FLERR, "Illegal pair_style command"); - cut_global = utils::numeric(FLERR,arg[0],false,lmp); + cut_global = utils::numeric(FLERR, arg[0], false, lmp); // reset cutoffs that have been explicitly set if (allocated) { - int i,j; + int i, j; for (i = 1; i <= atom->ntypes; i++) for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; @@ -181,23 +179,22 @@ void PairGauss::settings(int narg, char **arg) void PairGauss::coeff(int narg, char **arg) { - if (narg < 4 || narg > 5) - error->all(FLERR,"Incorrect args for pair coefficients"); + if (narg < 4 || narg > 5) error->all(FLERR, "Incorrect args for pair coefficients"); if (!allocated) allocate(); - int ilo,ihi,jlo,jhi; - utils::bounds(FLERR,arg[0],1,atom->ntypes,ilo,ihi,error); - utils::bounds(FLERR,arg[1],1,atom->ntypes,jlo,jhi,error); + int ilo, ihi, jlo, jhi; + utils::bounds(FLERR, arg[0], 1, atom->ntypes, ilo, ihi, error); + utils::bounds(FLERR, arg[1], 1, atom->ntypes, jlo, jhi, error); - double a_one = utils::numeric(FLERR,arg[2],false,lmp); - double b_one = utils::numeric(FLERR,arg[3],false,lmp); + double a_one = utils::numeric(FLERR, arg[2], false, lmp); + double b_one = utils::numeric(FLERR, arg[3], false, lmp); double cut_one = cut_global; - if (narg == 5) cut_one = utils::numeric(FLERR,arg[4],false,lmp); + if (narg == 5) cut_one = utils::numeric(FLERR, arg[4], false, lmp); int count = 0; for (int i = ilo; i <= ihi; i++) { - for (int j = MAX(jlo,i); j<=jhi; j++) { + for (int j = MAX(jlo, i); j <= jhi; j++) { a[i][j] = a_one; b[i][j] = b_one; cut[i][j] = cut_one; @@ -206,7 +203,7 @@ void PairGauss::coeff(int narg, char **arg) } } - if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); + if (count == 0) error->all(FLERR, "Incorrect args for pair coefficients"); } /* ---------------------------------------------------------------------- @@ -218,10 +215,10 @@ double PairGauss::init_one(int i, int j) if (setflag[i][j] == 0) { double sign_bi = (b[i][i] >= 0.0) ? 1.0 : -1.0; double sign_bj = (b[j][j] >= 0.0) ? 1.0 : -1.0; - double si = sqrt(0.5/fabs(b[i][i])); - double sj = sqrt(0.5/fabs(b[j][j])); + double si = sqrt(0.5 / fabs(b[i][i])); + double sj = sqrt(0.5 / fabs(b[j][j])); double sij = mix_distance(si, sj); - b[i][j] = 0.5 / (sij*sij); + b[i][j] = 0.5 / (sij * sij); b[i][j] *= MAX(sign_bi, sign_bj); // Negative "a" values are useful for simulating repulsive particles. @@ -232,12 +229,14 @@ double PairGauss::init_one(int i, int j) a[i][j] = mix_energy(fabs(a[i][i]), fabs(a[j][j]), si, sj); a[i][j] *= MIN(sign_ai, sign_aj); - cut[i][j] = mix_distance(cut[i][i],cut[j][j]); + cut[i][j] = mix_distance(cut[i][i], cut[j][j]); } // cutoff correction to energy - if (offset_flag) offset[i][j] = a[i][j]*exp(-b[i][j]*cut[i][j]*cut[i][j]); - else offset[i][j] = 0.0; + if (offset_flag) + offset[i][j] = a[i][j] * exp(-b[i][j] * cut[i][j] * cut[i][j]); + else + offset[i][j] = 0.0; a[j][i] = a[i][j]; b[j][i] = b[i][j]; @@ -254,14 +253,14 @@ void PairGauss::write_restart(FILE *fp) { write_restart_settings(fp); - int i,j; + int i, j; for (i = 1; i <= atom->ntypes; i++) for (j = i; j <= atom->ntypes; j++) { - fwrite(&setflag[i][j],sizeof(int),1,fp); + fwrite(&setflag[i][j], sizeof(int), 1, fp); if (setflag[i][j]) { - fwrite(&a[i][j],sizeof(double),1,fp); - fwrite(&b[i][j],sizeof(double),1,fp); - fwrite(&cut[i][j],sizeof(double),1,fp); + fwrite(&a[i][j], sizeof(double), 1, fp); + fwrite(&b[i][j], sizeof(double), 1, fp); + fwrite(&cut[i][j], sizeof(double), 1, fp); } } } @@ -275,21 +274,21 @@ void PairGauss::read_restart(FILE *fp) read_restart_settings(fp); allocate(); - int i,j; + int i, j; int me = comm->me; for (i = 1; i <= atom->ntypes; i++) for (j = i; j <= atom->ntypes; j++) { - if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,nullptr,error); - MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); + if (me == 0) utils::sfread(FLERR, &setflag[i][j], sizeof(int), 1, fp, nullptr, error); + MPI_Bcast(&setflag[i][j], 1, MPI_INT, 0, world); if (setflag[i][j]) { if (me == 0) { - utils::sfread(FLERR,&a[i][j],sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR,&b[i][j],sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,nullptr,error); + utils::sfread(FLERR, &a[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &b[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &cut[i][j], sizeof(double), 1, fp, nullptr, error); } - MPI_Bcast(&a[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&b[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world); + MPI_Bcast(&a[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&b[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&cut[i][j], 1, MPI_DOUBLE, 0, world); } } } @@ -300,9 +299,9 @@ void PairGauss::read_restart(FILE *fp) void PairGauss::write_restart_settings(FILE *fp) { - fwrite(&cut_global,sizeof(double),1,fp); - fwrite(&offset_flag,sizeof(int),1,fp); - fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&cut_global, sizeof(double), 1, fp); + fwrite(&offset_flag, sizeof(int), 1, fp); + fwrite(&mix_flag, sizeof(int), 1, fp); } /* ---------------------------------------------------------------------- @@ -312,13 +311,13 @@ void PairGauss::write_restart_settings(FILE *fp) void PairGauss::read_restart_settings(FILE *fp) { if (comm->me == 0) { - utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,nullptr,error); - utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR, &cut_global, sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &offset_flag, sizeof(int), 1, fp, nullptr, error); + utils::sfread(FLERR, &mix_flag, sizeof(int), 1, fp, nullptr, error); } - MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); - MPI_Bcast(&offset_flag,1,MPI_INT,0,world); - MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&cut_global, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&offset_flag, 1, MPI_INT, 0, world); + MPI_Bcast(&mix_flag, 1, MPI_INT, 0, world); } /* ---------------------------------------------------------------------- @@ -327,8 +326,7 @@ void PairGauss::read_restart_settings(FILE *fp) void PairGauss::write_data(FILE *fp) { - for (int i = 1; i <= atom->ntypes; i++) - fprintf(fp,"%d %g %g\n",i,a[i][i],b[i][i]); + for (int i = 1; i <= atom->ntypes; i++) fprintf(fp, "%d %g %g\n", i, a[i][i], b[i][i]); } /* ---------------------------------------------------------------------- @@ -339,18 +337,18 @@ void PairGauss::write_data_all(FILE *fp) { for (int i = 1; i <= atom->ntypes; i++) for (int j = i; j <= atom->ntypes; j++) - fprintf(fp,"%d %d %g %g %g\n",i,j,a[i][j],b[i][j],cut[i][j]); + fprintf(fp, "%d %d %g %g %g\n", i, j, a[i][j], b[i][j], cut[i][j]); } /* ---------------------------------------------------------------------- */ double PairGauss::single(int /*i*/, int /*j*/, int itype, int jtype, double rsq, - double /*factor_coul*/, double /*factor_lj*/, - double &fforce) + double /*factor_coul*/, double factor_lj, double &fforce) { - double philj = - -(a[itype][jtype]*exp(-b[itype][jtype]*rsq) - offset[itype][jtype]); - fforce = -2.0*a[itype][jtype]*b[itype][jtype] * exp(-b[itype][jtype]*rsq); + double philj = -(a[itype][jtype] * exp(-b[itype][jtype] * rsq) - offset[itype][jtype]); + philj *= factor_lj; + fforce = -2.0 * a[itype][jtype] * b[itype][jtype] * exp(-b[itype][jtype] * rsq); + fforce *= factor_lj; return philj; } @@ -359,6 +357,6 @@ double PairGauss::single(int /*i*/, int /*j*/, int itype, int jtype, double rsq, void *PairGauss::extract(const char *str, int &dim) { dim = 2; - if (strcmp(str,"a") == 0) return (void *) a; + if (strcmp(str, "a") == 0) return (void *) a; return nullptr; } diff --git a/src/OPENMP/pair_gauss_omp.cpp b/src/OPENMP/pair_gauss_omp.cpp index 12c197e768..18263d4d15 100644 --- a/src/OPENMP/pair_gauss_omp.cpp +++ b/src/OPENMP/pair_gauss_omp.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -26,11 +25,9 @@ #include "omp_compat.h" using namespace LAMMPS_NS; -#define EPSILON 1.0e-10 /* ---------------------------------------------------------------------- */ -PairGaussOMP::PairGaussOMP(LAMMPS *lmp) : - PairGauss(lmp), ThrOMP(lmp, THR_PAIR) +PairGaussOMP::PairGaussOMP(LAMMPS *lmp) : PairGauss(lmp), ThrOMP(lmp, THR_PAIR) { suffix_flag |= Suffix::OMP; respa_enable = 0; @@ -40,7 +37,7 @@ PairGaussOMP::PairGaussOMP(LAMMPS *lmp) : void PairGaussOMP::compute(int eflag, int vflag) { - ev_init(eflag,vflag); + ev_init(eflag, vflag); const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; @@ -48,7 +45,7 @@ void PairGaussOMP::compute(int eflag, int vflag) double occ = 0.0; #if defined(_OPENMP) -#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) reduction(+:occ) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag, vflag) reduction(+ : occ) #endif { int ifrom, ito, tid; @@ -60,39 +57,46 @@ void PairGaussOMP::compute(int eflag, int vflag) if (evflag) { if (eflag) { - if (force->newton_pair) occ = eval<1,1,1>(ifrom, ito, thr); - else occ = eval<1,1,0>(ifrom, ito, thr); + if (force->newton_pair) + occ = eval<1, 1, 1>(ifrom, ito, thr); + else + occ = eval<1, 1, 0>(ifrom, ito, thr); } else { - if (force->newton_pair) occ = eval<1,0,1>(ifrom, ito, thr); - else occ = eval<1,0,0>(ifrom, ito, thr); + if (force->newton_pair) + occ = eval<1, 0, 1>(ifrom, ito, thr); + else + occ = eval<1, 0, 0>(ifrom, ito, thr); } } else { - if (force->newton_pair) occ = eval<0,0,1>(ifrom, ito, thr); - else occ = eval<0,0,0>(ifrom, ito, thr); + if (force->newton_pair) + occ = eval<0, 0, 1>(ifrom, ito, thr); + else + occ = eval<0, 0, 0>(ifrom, ito, thr); } thr->timer(Timer::PAIR); reduce_thr(this, eflag, vflag, thr); - } // end of omp parallel region + } // end of omp parallel region if (eflag_global) pvector[0] = occ; } template -double PairGaussOMP::eval(int iifrom, int iito, ThrData * const thr) +double PairGaussOMP::eval(int iifrom, int iito, ThrData *const thr) { - int i,j,ii,jj,jnum,itype,jtype; - double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair,rsq; - int *ilist,*jlist,*numneigh,**firstneigh; + int i, j, ii, jj, jnum, itype, jtype; + double xtmp, ytmp, ztmp, delx, dely, delz, evdwl, fpair, rsq; + int *ilist, *jlist, *numneigh, **firstneigh; int occ = 0; evdwl = 0.0; - const auto * _noalias const x = (dbl3_t *) atom->x[0]; - auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; - const int * _noalias const type = atom->type; + const auto *_noalias const x = (dbl3_t *) atom->x[0]; + auto *_noalias const f = (dbl3_t *) thr->get_f()[0]; + const int *_noalias const type = atom->type; + const double *_noalias const special_lj = force->special_lj; const int nlocal = atom->nlocal; - double fxtmp,fytmp,fztmp; + double fxtmp, fytmp, fztmp; ilist = list->ilist; numneigh = list->numneigh; @@ -109,42 +113,45 @@ double PairGaussOMP::eval(int iifrom, int iito, ThrData * const thr) itype = type[i]; jlist = firstneigh[i]; jnum = numneigh[i]; - fxtmp=fytmp=fztmp=0.0; + fxtmp = fytmp = fztmp = 0.0; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; + const double factor_lj = special_lj[sbmask(j)]; j &= NEIGHMASK; delx = xtmp - x[j].x; dely = ytmp - x[j].y; delz = ztmp - x[j].z; - rsq = delx*delx + dely*dely + delz*delz; + rsq = delx * delx + dely * dely + delz * delz; jtype = type[j]; // define a Gaussian well to be occupied if // the site it interacts with is within the force maximum if (EFLAG) - if (eflag_global && rsq < 0.5/b[itype][jtype]) occ++; + if (eflag_global && rsq < 0.5 / b[itype][jtype]) occ++; if (rsq < cutsq[itype][jtype]) { - fpair = -2.0*a[itype][jtype]*b[itype][jtype]*exp(-b[itype][jtype]*rsq); + fpair = -2.0 * a[itype][jtype] * b[itype][jtype] * exp(-b[itype][jtype] * rsq); + fpair *= factor_lj; - fxtmp += delx*fpair; - fytmp += dely*fpair; - fztmp += delz*fpair; + fxtmp += delx * fpair; + fytmp += dely * fpair; + fztmp += delz * fpair; if (NEWTON_PAIR || j < nlocal) { - f[j].x -= delx*fpair; - f[j].y -= dely*fpair; - f[j].z -= delz*fpair; + f[j].x -= delx * fpair; + f[j].y -= dely * fpair; + f[j].z -= delz * fpair; } - if (EFLAG) - evdwl = -(a[itype][jtype]*exp(-b[itype][jtype]*rsq) - - offset[itype][jtype]); + if (EFLAG) { + evdwl = -(a[itype][jtype] * exp(-b[itype][jtype] * rsq) - offset[itype][jtype]); + evdwl *= factor_lj; + } - if (EVFLAG) ev_tally_thr(this, i,j,nlocal,NEWTON_PAIR, - evdwl,0.0,fpair,delx,dely,delz,thr); + if (EVFLAG) + ev_tally_thr(this, i, j, nlocal, NEWTON_PAIR, evdwl, 0.0, fpair, delx, dely, delz, thr); } } f[i].x += fxtmp; diff --git a/unittest/force-styles/tests/mol-pair-gauss.yaml b/unittest/force-styles/tests/mol-pair-gauss.yaml index 5df85e0c3f..8021252c0d 100644 --- a/unittest/force-styles/tests/mol-pair-gauss.yaml +++ b/unittest/force-styles/tests/mol-pair-gauss.yaml @@ -1,6 +1,7 @@ --- -lammps_version: 17 Feb 2022 -date_generated: Fri Mar 18 22:17:30 2022 +lammps_version: 8 Feb 2023 +tags: generated +date_generated: Fri Feb 10 04:35:42 2023 epsilon: 5e-14 skip_tests: prerequisites: ! | @@ -21,72 +22,72 @@ pair_coeff: ! | extract: ! | a 2 natoms: 29 -init_vdwl: -0.3864209232155955 +init_vdwl: -0.10744797594740513 init_coul: 0 init_stress: ! |- - -2.2163698035273618e-01 -2.4625537112111151e-01 -2.1305188258578470e-01 6.1866130132872003e-02 6.6571531323592207e-03 2.4462489698253043e-02 + -1.1008516714247368e-01 -1.2186754451867259e-01 -9.8542625674496995e-02 3.1449705846190668e-02 7.6089266254867642e-03 1.8309130908749447e-02 init_forces: ! |2 - 1 6.6420790881819135e-03 -2.2656352315504419e-02 -1.1151371492916272e-02 - 2 -4.2811279269361156e-03 -6.1319457093740913e-03 3.5655172207420469e-03 - 3 1.4122450625899436e-02 -6.4669361374405238e-03 -3.4547856578885819e-03 - 4 9.2022857012287029e-03 -9.6636513433784451e-04 5.6358203169252627e-03 - 5 4.8130601322131554e-03 3.8754733051119977e-03 -9.5295063547545852e-03 - 6 1.1694684866979214e-02 -1.1545676479204194e-04 8.9573160065516636e-03 - 7 9.2903486979032928e-03 2.0412909476071818e-03 2.0895988031881762e-02 - 8 8.2241496648224888e-03 3.2282787725485093e-03 -5.5984923599097887e-03 - 9 -9.1025802092398352e-04 -2.9695228458060277e-03 -1.1310732844631449e-02 - 10 -3.3216915418810807e-03 1.5165769941583293e-02 -1.2109299141022656e-03 - 11 2.8660819158744734e-03 8.4275110632676224e-03 9.5049639732687780e-03 - 12 -2.2598101552834836e-02 -4.9601916039375389e-03 8.4003031140324341e-03 - 13 -9.4516726881566388e-03 1.4305285400726016e-03 1.5058333996407797e-03 - 14 -3.4864885985541323e-04 -1.8689531090578431e-03 1.0873765307790662e-02 - 15 -4.3507528925587919e-03 -9.8039134533324957e-03 -1.2974821049077257e-03 - 16 -1.1020969725836332e-02 1.9784791088106480e-02 -1.1275809663597147e-02 - 17 -3.3419871860029715e-03 8.2289097839403427e-03 -1.8738857919511739e-02 - 18 -4.3521806872305014e-03 -7.8656826681131678e-03 6.5687503046006051e-03 - 19 9.2492265214090606e-04 7.1711662533072390e-04 5.6458533331792311e-04 - 20 -1.0085043451939246e-03 -9.3005491274762285e-04 5.0547579022850204e-05 - 21 -1.1667863590836469e-03 4.2902548011202451e-03 -2.0499762074924696e-03 - 22 3.1557118123179237e-03 9.5184863190457439e-04 3.9782856889301653e-03 - 23 -4.4281270696133268e-03 -2.5346995221498434e-03 7.5785922268409691e-04 - 24 -3.0622009464357529e-03 1.9851728054262412e-03 -6.5546361368900791e-03 - 25 3.7063223755402488e-03 -2.7523325480129519e-04 2.6231087574901247e-03 - 26 -2.9538296443943910e-03 -4.1309366766066275e-03 -6.6793595531402768e-04 - 27 1.3703266730383692e-03 6.2247400367154799e-03 -2.6349027873549895e-03 - 28 4.1766990025931270e-03 -1.2043760854333907e-03 2.6647558305012602e-03 - 29 -3.5922837617955406e-03 -3.4710661493005325e-03 -1.0719806881093012e-03 -run_vdwl: -0.3863508651617164 + 1 6.3967388935615935e-03 -8.9571493541161559e-03 -2.6243495367571021e-03 + 2 -5.8925997783387395e-04 -1.6467452362593446e-03 3.9474993583852062e-04 + 3 6.4541909782685350e-03 -2.7518790414616788e-03 -1.1988207163740401e-03 + 4 1.7173451287781348e-03 -1.0661558546877452e-04 9.4766143245350446e-04 + 5 1.3640604274609371e-03 5.2189464017124855e-04 -1.7289542395764162e-03 + 6 7.5053558116135836e-03 -7.8008442916635047e-04 2.2571851729790136e-03 + 7 8.3795968749890409e-03 8.4698140531401750e-05 7.9566896360105874e-03 + 8 2.9576378106382336e-03 2.7674589237502013e-03 -1.3800458960768092e-03 + 9 -6.8101137697709914e-05 -3.4479763208106613e-04 -2.5941356000719553e-03 + 10 -2.5606662761393502e-03 5.4931707692542301e-03 -9.3119684414857094e-04 + 11 4.8953489579958687e-04 1.9131103445091924e-03 1.6644396272410174e-03 + 12 -1.1675327637667321e-02 9.5973244924826004e-04 1.8760227478274104e-03 + 13 -1.9229408858018125e-03 -1.5273825100896492e-04 5.5179749722991656e-04 + 14 -1.2828240307888158e-03 -3.8245527716947414e-04 2.7609608498598013e-03 + 15 -2.6060442482268012e-03 -2.1186266400159987e-03 2.3778251062230583e-04 + 16 -3.3980337566683412e-03 5.9576900525289264e-03 -4.5705974537114087e-03 + 17 -3.9313325721691108e-03 5.7862524954095653e-03 -7.8476500647319345e-03 + 18 -4.4024833272868361e-03 -8.0199476070002811e-03 7.0506526853925692e-03 + 19 1.7435858376498004e-04 1.2618943785668791e-04 1.4777623368941996e-04 + 20 -2.0763763676166395e-04 -1.8486278638647300e-04 -1.4545702140610665e-05 + 21 -2.3094929681373769e-03 2.8627074594353183e-03 2.2096366480569823e-03 + 22 4.4288112377976487e-04 1.5533647577931545e-04 4.5374867545560895e-04 + 23 -5.7258977202143764e-04 -3.1064002433965675e-04 2.2783380609201144e-05 + 24 -2.0888998040544597e-03 -1.8207426839036761e-03 -4.2932649963137327e-03 + 25 1.9475456066254769e-04 -1.1833520320337950e-04 -1.6748792244510374e-04 + 26 -4.1556297189798295e-04 -4.8191923887462638e-04 -1.3871041595514520e-04 + 27 1.8904879208478888e-03 2.0114948956210790e-03 -1.1958555043652932e-03 + 28 5.4016949423872510e-04 -8.4138794056923025e-05 3.2483661978743096e-04 + 29 -4.7591550125065788e-04 -3.7805829958259914e-04 -1.7110876038516800e-04 +run_vdwl: -0.10742358116477577 run_coul: 0 run_stress: ! |- - -2.2160110236171965e-01 -2.4617131296379000e-01 -2.1305840663314177e-01 6.1838681126107659e-02 6.6381976968359312e-03 2.4402003044659750e-02 + -1.1006082820490694e-01 -1.2183895033722210e-01 -9.8544056061287286e-02 3.1434066108895035e-02 7.6054332065046241e-03 1.8296316078185181e-02 run_forces: ! |2 - 1 6.6413062980785250e-03 -2.2643146328241739e-02 -1.1142942591208689e-02 - 2 -4.2827175516235612e-03 -6.1293692790411374e-03 3.5544412327760560e-03 - 3 1.4119948940250827e-02 -6.4770130378595647e-03 -3.4543300745505934e-03 - 4 9.1950674649061044e-03 -9.6181880037213058e-04 5.6407327955521839e-03 - 5 4.8139605807970181e-03 3.8756785373474725e-03 -9.5265345859732731e-03 - 6 1.1686087085798024e-02 -1.2058408819619352e-04 8.9440737448735885e-03 - 7 9.2903951061620062e-03 2.0470436506746757e-03 2.0893971575447097e-02 - 8 8.2293078546638102e-03 3.2320594356858930e-03 -5.5960424447553192e-03 - 9 -9.0531229139671548e-04 -2.9682892647793285e-03 -1.1310091180000625e-02 - 10 -3.3259540649788755e-03 1.5162058066139865e-02 -1.2051475979010121e-03 - 11 2.8653459452275495e-03 8.4232873380028633e-03 9.4992751088281042e-03 - 12 -2.2597913046721457e-02 -4.9554168226113669e-03 8.4125389603604290e-03 - 13 -9.4443544519883221e-03 1.4213463221588211e-03 1.5001514052453023e-03 - 14 -3.4584663474122380e-04 -1.8589408798251432e-03 1.0867482270335016e-02 - 15 -4.3501928045490360e-03 -9.8084491667171560e-03 -1.3028078079482534e-03 - 16 -1.1016280904427918e-02 1.9779721304587411e-02 -1.1270569619019189e-02 - 17 -3.3423858079814819e-03 8.2235538802195984e-03 -1.8736744422015096e-02 - 18 -4.3608515422088765e-03 -7.8746354806103706e-03 6.5742308189911851e-03 - 19 9.1906994708977803e-04 7.1287404601029134e-04 5.6400074161977465e-04 - 20 -9.9447892889066537e-04 -9.1770728964396954e-04 4.8034421345478542e-05 - 21 -1.1680763991239612e-03 4.2792686042234344e-03 -2.0399769668755026e-03 - 22 3.1591713175596393e-03 9.5574540137949749e-04 3.9720638190945401e-03 - 23 -4.4307388063199804e-03 -2.5263233108993562e-03 7.5473099454995423e-04 - 24 -3.0620441606671513e-03 1.9754767097317143e-03 -6.5470110878329164e-03 - 25 3.7077221581000219e-03 -2.6401622505421555e-04 2.6260279440605853e-03 - 26 -2.9551493935843225e-03 -4.1316756613083479e-03 -6.7756590474090739e-04 - 27 1.3660170615493567e-03 6.2236935799399491e-03 -2.6252513993441232e-03 - 28 4.1796626204497374e-03 -1.2023509872189564e-03 2.6623174423427176e-03 - 29 -3.5907655914288470e-03 -3.4720702537225047e-03 -1.0790575932565119e-03 + 1 6.3951182607409262e-03 -8.9545730680437412e-03 -2.6242747559400842e-03 + 2 -5.8940132985142637e-04 -1.6432865472356978e-03 3.9314816550261645e-04 + 3 6.4493680135179910e-03 -2.7508136736323781e-03 -1.1985914252700854e-03 + 4 1.7157340254504952e-03 -1.0645373608815925e-04 9.4797119947664693e-04 + 5 1.3638703830031701e-03 5.2199495314776776e-04 -1.7280157917857904e-03 + 6 7.5027803029913730e-03 -7.7992545467626452e-04 2.2542580363439260e-03 + 7 8.3790973418566787e-03 8.6964711023362301e-05 7.9549476717222789e-03 + 8 2.9600170939576595e-03 2.7677876464161800e-03 -1.3796592742572695e-03 + 9 -6.4851944444991254e-05 -3.4672203705875542e-04 -2.5935699450003449e-03 + 10 -2.5611753535538561e-03 5.4925092261102065e-03 -9.3045690231003775e-04 + 11 4.8983736198662245e-04 1.9115748764361731e-03 1.6629308583155874e-03 + 12 -1.1670568560250798e-02 9.5936201106161740e-04 1.8766858864372907e-03 + 13 -1.9194289686350334e-03 -1.5306898539863079e-04 5.4961829174280503e-04 + 14 -1.2795546260879820e-03 -3.8095864067789689e-04 2.7581590326053668e-03 + 15 -2.6123992882847165e-03 -2.1212782856001471e-03 2.3834468823455228e-04 + 16 -3.3974822936998559e-03 5.9551171086075615e-03 -4.5676348427171106e-03 + 17 -3.9304986491614574e-03 5.7834906955578757e-03 -7.8464040391146503e-03 + 18 -4.4036759081377110e-03 -8.0214055777730296e-03 7.0529490020863929e-03 + 19 1.7246101738774175e-04 1.2467198317308374e-04 1.4771603949694447e-04 + 20 -2.0504560588348406e-04 -1.8273510588466313e-04 -1.4399117733621655e-05 + 21 -2.3100182076283716e-03 2.8627603983808606e-03 2.2112169537780555e-03 + 22 4.4298531465963761e-04 1.5549858717522525e-04 4.5294060847149182e-04 + 23 -5.7261101837172428e-04 -3.0956825334589567e-04 2.2660319228822179e-05 + 24 -2.0891130362891692e-03 -1.8217407569914542e-03 -4.2926590911060896e-03 + 25 1.9572941661502480e-04 -1.1608017944239833e-04 -1.6583785661338941e-04 + 26 -4.1608783560330648e-04 -4.8239423005540976e-04 -1.4005216918917679e-04 + 27 1.8902324250959931e-03 2.0113877029906300e-03 -1.1947874546904412e-03 + 28 5.4065339019595659e-04 -8.3834857585872457e-05 3.2474503896207270e-04 + 29 -4.7597172157538961e-04 -3.7828051059014876e-04 -1.7194912667675645e-04 ... From 4d5d04aba3596c643a81fba1689f800a19bed2d5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Feb 2023 05:09:22 -0500 Subject: [PATCH 173/445] cosmetic --- unittest/force-styles/tests/mol-pair-gauss.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/unittest/force-styles/tests/mol-pair-gauss.yaml b/unittest/force-styles/tests/mol-pair-gauss.yaml index 8021252c0d..88ea376d5f 100644 --- a/unittest/force-styles/tests/mol-pair-gauss.yaml +++ b/unittest/force-styles/tests/mol-pair-gauss.yaml @@ -1,6 +1,5 @@ --- lammps_version: 8 Feb 2023 -tags: generated date_generated: Fri Feb 10 04:35:42 2023 epsilon: 5e-14 skip_tests: From 26333c28abc0c1cad027a5984abf3ff4b4071f45 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Feb 2023 11:19:17 -0500 Subject: [PATCH 174/445] fix grammar and spelling issues --- doc/github-development-workflow.md | 109 +++++++++++++++-------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/doc/github-development-workflow.md b/doc/github-development-workflow.md index 8e8ac6597b..830ce85f48 100644 --- a/doc/github-development-workflow.md +++ b/doc/github-development-workflow.md @@ -1,12 +1,12 @@ # Outline of the GitHub Development Workflow -This purpose of this document is to provide a point of reference for the +The purpose of this document is to provide a point of reference for the core LAMMPS developers and other LAMMPS contributors to understand the choices the LAMMPS developers have agreed on. Git and GitHub provide the tools, but do not set policies, so it is up to the developers to come to an agreement as to how to define and interpret policies. This document -is likely to change as our experiences and needs change and we try to -adapt accordingly. Last change 2021-09-02. +is likely to change as our experiences and needs change, and we try to +adapt it accordingly. Last change 2023-02-10. ## Table of Contents @@ -22,24 +22,24 @@ adapt accordingly. Last change 2021-09-02. ## GitHub Merge Management In the interest of consistency, ONLY ONE of the core LAMMPS developers -should doing the merging itself. This is currently +should do the merging. This is currently [@akohlmey](https://github.com/akohlmey) (Axel Kohlmeyer). If this assignment needs to be changed, it shall be done right after a stable release. If the currently assigned developer cannot merge outstanding pull requests in a timely manner, or in other extenuating circumstances, -other core LAMMPS developers with merge permissons may merge pull +other core LAMMPS developers with merge permission may merge pull requests. ## Pull Requests -*ALL* changes to the LAMMPS code and documentation, however trivial, MUST -be submitted as a pull request to GitHub. All changes to the "develop" -branch must be made exclusively through merging pull requests. The -"release" and "stable" branches, respectively are only to be updated -upon feature or stable releases based on the associated tags. Updates to -stable release in between stable releases (e.g. backported bugfixes) -are first merged into the "maintenance" branch and then into the "stable" -branch as update releases. +*ALL* changes to the LAMMPS code and documentation, however trivial, +MUST be submitted as a pull request to GitHub. All changes to the +"develop" branch must be made exclusively through merging pull requests. +The "release" and "stable" branches, respectively, are only to be +updated upon feature or stable releases based on the associated +tags. Updates to the stable release in between stable releases +(for example, back-ported bug fixes) are first merged into the "maintenance" +branch and then into the "stable" branch as update releases. Pull requests may also be submitted to (long-running) feature branches created by LAMMPS developers inside the LAMMPS project, if needed. Those @@ -49,16 +49,16 @@ document, though, but get managed as needed on a case-by-case basis. ### Pull Request Assignments Pull requests can be "chaperoned" by one of the LAMMPS core developers. -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 +This is indicated by whom 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 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 period the `work_in_progress` label may be applied to +determine whether this might be needed or not. The assignee may either +choose to implement 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 should do +so. During this period, the `work_in_progress` label may be applied to the pull request. The assignee gets to decide what happens to the pull request next, e.g. whether it should be assigned to a different developer for additional checks and changes, or is recommended to be @@ -73,32 +73,33 @@ People can be assigned to review a pull request in two ways: * They can be assigned manually to review a pull request by the submitter or a LAMMPS developer - * They can be automatically assigned, because a developers matches - a file pattern in the `.github/CODEOWNERS` file, which associates - developers with the code they contributed and maintain. + * They can be automatically assigned, because a developer's GitHub + handle matches a file pattern in the `.github/CODEOWNERS` file, + which associates developers with the code they contributed and + maintain. 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 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. +least two approvals from LAMMPS developers with write access are +required before merging, in addition to passing all automated +compilation and unit 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 GitHub +feature, that reviews from code owners are "hard" reviews (i.e. they +must all approve before merging is allowed), is currently disabled. +It is in the discretion of the merge maintainer to assess when a +sufficient degree of approval has been reached, especially from external +collaborators. Reviews may be (automatically) dismissed, when the +reviewed code has been changed. Review may be requested a second time. ### Pull Request Discussions All discussions about a pull request should be kept as much as possible on the pull request discussion page on GitHub, so that other developers can later review the entire discussion after the fact and understand the -rationale behind choices made. Exceptions to this policy are technical -discussions, that are centered on tools or policies themselves +rationale behind choices that were made. Exceptions to this policy are +technical discussions, that are centered on tools or policies themselves (git, GitHub, c++) rather than on the content of the pull request. ## GitHub Issues @@ -112,39 +113,39 @@ marker in the subject. This is automatically done when using the corresponding template for submitting an issue. Issues may be assigned to one or more developers, if they are working on this feature or working to resolve an issue. Issues that have nobody working -on them at the moment or in the near future, have the label +on them at the moment, or in the near future, have the label `volunteer needed` attached. -When an issue, say `#125` is resolved by a specific pull request, -the comment for the pull request shall contain the text `closes #125` -or `fixes #125`, so that the issue is automatically deleted when -the pull request is merged. The template for pull requests includes -a header where connections between pull requests and issues can be listed -and thus were this comment should be placed. +When an issue, say `#125` is resolved by a specific pull request, the +comment for the pull request shall contain the text `closes #125` or +`fixes #125`, so that the issue is automatically deleted when the pull +request is merged. The template for pull requests includes a header +where connections between pull requests and issues can be listed, and +thus where this comment should be placed. ## Milestones and Release Planning LAMMPS uses a continuous release development model with incremental -changes, i.e. significant effort is made - including automated pre-merge -testing - that the code in the branch "develop" does not get easily +changes, i.e. significant effort is made -- including automated pre-merge +testing -- that the code in the branch "develop" does not get easily broken. These tests are run after every update to a pull request. More -extensive and time consuming tests (including regression testing) are +extensive and time-consuming tests (including regression testing) are performed after code is merged to the "develop" branch. There are feature releases of LAMMPS made about every 4-6 weeks at a point, when the LAMMPS -developers feel, that a sufficient amount of changes have been included, +developers feel, that a sufficient number of changes has been included and all post-merge testing has been successful. These feature releases are marked with a `patch_` tag and the "release" branch -follows only these versions with fast forward merges. While "develop" may -be temporary broken through issues only detected by the post-merge tests, +follows only these versions with fast-forward merges. While "develop" may +be temporarily broken through issues only detected by the post-merge tests, The "release" branch is always supposed to be of production quality. -About once each year, there are going to be "stable" releases of -LAMMPS. These have seen additional, manual testing and review of +About once each year, there is a "stable" release of LAMMPS. +These have seen additional, manual testing and review of results from testing with instrumented code and static code analysis. Also, the last few feature releases before a stable release are "release -candidate" versions which only contain bugfixes, feature additions to +candidate" versions which only contain bug fixes, feature additions to peripheral functionality, and documentation updates. In between stable -releases, bugfixes and infrastructure updates are backported from the +releases, bug fixes and infrastructure updates are back-ported from the "develop" branch to the "maintenance" branch and occasionally merged into "stable" and published as update releases. From 7709dfa11854561d92dd7e05d4bb76f864bdd89c Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sat, 11 Feb 2023 16:11:35 -0500 Subject: [PATCH 175/445] add 'atom type' test option to force style tests --- unittest/force-styles/test_config.h | 2 ++ unittest/force-styles/test_config_reader.cpp | 15 +++++++++++++++ unittest/force-styles/test_config_reader.h | 1 + unittest/force-styles/test_fix_timestep.cpp | 12 ++++++++++++ unittest/force-styles/test_main.cpp | 19 +++++++++++++++++++ unittest/force-styles/test_main.h | 1 + 6 files changed, 50 insertions(+) diff --git a/unittest/force-styles/test_config.h b/unittest/force-styles/test_config.h index b284052d6d..e3d6c06033 100644 --- a/unittest/force-styles/test_config.h +++ b/unittest/force-styles/test_config.h @@ -70,6 +70,7 @@ public: std::vector restart_pos; std::vector run_vel; std::vector restart_vel; + std::vector run_atom_types; TestConfig() : lammps_version(""), date_generated(""), basename(""), epsilon(1.0e-14), input_file(""), @@ -94,6 +95,7 @@ public: restart_pos.clear(); run_vel.clear(); restart_vel.clear(); + run_atom_types.clear(); global_vector.clear(); } TestConfig(const TestConfig &) = delete; diff --git a/unittest/force-styles/test_config_reader.cpp b/unittest/force-styles/test_config_reader.cpp index 3f99f251a5..5eb41db4bf 100644 --- a/unittest/force-styles/test_config_reader.cpp +++ b/unittest/force-styles/test_config_reader.cpp @@ -48,6 +48,7 @@ TestConfigReader::TestConfigReader(TestConfig &config) : config(config) consumers["run_forces"] = &TestConfigReader::run_forces; consumers["run_pos"] = &TestConfigReader::run_pos; consumers["run_vel"] = &TestConfigReader::run_vel; + consumers["run_atom_types"] = &TestConfigReader::run_atom_types; consumers["pair_style"] = &TestConfigReader::pair_style; consumers["pair_coeff"] = &TestConfigReader::pair_coeff; @@ -228,6 +229,20 @@ void TestConfigReader::run_vel(const yaml_event_t &event) } } +void TestConfigReader::run_atom_types(const yaml_event_t &event) +{ + config.run_atom_types.clear(); + config.run_atom_types.resize(config.natoms + 1); + std::stringstream data((char *)event.data.scalar.value); + std::string line; + + while (std::getline(data, line, '\n')) { + int tag, atom_type; + sscanf(line.c_str(), "%d %d", &tag, &atom_type); + config.run_atom_types[tag] = atom_type; + } +} + void TestConfigReader::pair_style(const yaml_event_t &event) { config.pair_style = (char *)event.data.scalar.value; diff --git a/unittest/force-styles/test_config_reader.h b/unittest/force-styles/test_config_reader.h index 1af7589add..91512da655 100644 --- a/unittest/force-styles/test_config_reader.h +++ b/unittest/force-styles/test_config_reader.h @@ -41,6 +41,7 @@ public: void run_forces(const yaml_event_t &event); void run_pos(const yaml_event_t &event); void run_vel(const yaml_event_t &event); + void run_atom_types(const yaml_event_t &event); void pair_style(const yaml_event_t &event); void pair_coeff(const yaml_event_t &event); void bond_style(const yaml_event_t &event); diff --git a/unittest/force-styles/test_fix_timestep.cpp b/unittest/force-styles/test_fix_timestep.cpp index d2e35b463f..302425ebd3 100644 --- a/unittest/force-styles/test_fix_timestep.cpp +++ b/unittest/force-styles/test_fix_timestep.cpp @@ -284,6 +284,7 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (normal run, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (normal run, verlet)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (normal run, verlet)", lmp->atom, test_config.run_atom_types); int ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -334,6 +335,7 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (restart, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (restart, verlet)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (restart, verlet)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -373,6 +375,7 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (rmass, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (rmass, verlet)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (rmass, verlet)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -426,6 +429,7 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (normal run, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (normal run, respa)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (normal run, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -464,6 +468,7 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (restart, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (restart, respa)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (restart, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -503,6 +508,7 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (rmass, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (rmass, respa)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (rmass, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -584,6 +590,7 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (normal run, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (normal run, verlet)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (normal run, verlet)", lmp->atom, test_config.run_atom_types); int ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -634,6 +641,7 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (restart, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (restart, verlet)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (restart, verlet)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -673,6 +681,7 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (rmass, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (rmass, verlet)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (rmass, verlet)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -725,6 +734,7 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (normal run, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (normal run, respa)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (normal run, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -763,6 +773,7 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (restart, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (restart, respa)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (restart, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -802,6 +813,7 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (rmass, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (rmass, respa)", lmp->atom, test_config.run_vel, epsilon); + EXPECT_ATOM_TYPES("run_atom_types (rmass, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { diff --git a/unittest/force-styles/test_main.cpp b/unittest/force-styles/test_main.cpp index 80f1ca4e30..4a98c489be 100644 --- a/unittest/force-styles/test_main.cpp +++ b/unittest/force-styles/test_main.cpp @@ -70,6 +70,7 @@ void EXPECT_FORCES(const std::string &name, Atom *atom, const std::vector &x_ref, double epsilon) { + if (x_ref.empty()) return; SCOPED_TRACE("EXPECT_POSITIONS: " + name); double **x = atom->x; tagint *tag = atom->tag; @@ -87,6 +88,7 @@ void EXPECT_POSITIONS(const std::string &name, Atom *atom, const std::vector &v_ref, double epsilon) { + if (v_ref.empty()) return; SCOPED_TRACE("EXPECT_VELOCITIES: " + name); double **v = atom->v; tagint *tag = atom->tag; @@ -101,6 +103,23 @@ void EXPECT_VELOCITIES(const std::string &name, Atom *atom, const std::vector &at_ref) +{ + if (at_ref.empty()) return; + SCOPED_TRACE("EXPECT_ATOM_TYPES: " + name); + int *type = atom->type; + tagint *tag = atom->tag; + const int nlocal = atom->nlocal; + ASSERT_EQ(nlocal + 1, at_ref.size()); + ErrorStats stats; + for (int i = 0; i < nlocal; ++i) { + EXPECT_EQ(type[i], at_ref[tag[i]]); + EXPECT_EQ(type[i], at_ref[tag[i]]); + EXPECT_EQ(type[i], at_ref[tag[i]]); + } + if (print_stats) std::cerr << name << " stats" << stats << std::endl; +} + // common read_yaml_file function bool read_yaml_file(const char *infile, TestConfig &config) { diff --git a/unittest/force-styles/test_main.h b/unittest/force-styles/test_main.h index 36bcd7bdff..ede7402cdc 100644 --- a/unittest/force-styles/test_main.h +++ b/unittest/force-styles/test_main.h @@ -41,5 +41,6 @@ void EXPECT_STRESS(const std::string & name, double * stress, const stress_t & e void EXPECT_FORCES(const std::string & name, LAMMPS_NS::Atom * atom, const std::vector & f_ref, double epsilon); void EXPECT_POSITIONS(const std::string & name, LAMMPS_NS::Atom * atom, const std::vector & x_ref, double epsilon); void EXPECT_VELOCITIES(const std::string & name, LAMMPS_NS::Atom * atom, const std::vector & v_ref, double epsilon); +void EXPECT_ATOM_TYPES(const std::string & name, LAMMPS_NS::Atom * atom, const std::vector & at_ref); #endif From c0e147dc576ecc6829909941ceb850c321f1df9f Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sat, 11 Feb 2023 23:38:55 -0500 Subject: [PATCH 176/445] make bond/react examples more accurate --- .../PACKAGES/reaction/create_atoms_polystyrene/in.grow_styrene | 3 +++ examples/PACKAGES/reaction/nylon,6-6_melt/in.large_nylon_melt | 3 +++ examples/PACKAGES/reaction/tiny_epoxy/in.tiny_epoxy.stabilized | 3 +++ examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized | 3 +++ .../tiny_nylon/in.tiny_nylon.stabilized_variable_probability | 3 +++ .../PACKAGES/reaction/tiny_nylon/in.tiny_nylon.unstabilized | 3 +++ .../reaction/tiny_polystyrene/in.tiny_polystyrene.stabilized | 3 +++ 7 files changed, 21 insertions(+) diff --git a/examples/PACKAGES/reaction/create_atoms_polystyrene/in.grow_styrene b/examples/PACKAGES/reaction/create_atoms_polystyrene/in.grow_styrene index b17b321fe5..7860db4e55 100644 --- a/examples/PACKAGES/reaction/create_atoms_polystyrene/in.grow_styrene +++ b/examples/PACKAGES/reaction/create_atoms_polystyrene/in.grow_styrene @@ -16,6 +16,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + variable T equal 530 read_data trimer.data & diff --git a/examples/PACKAGES/reaction/nylon,6-6_melt/in.large_nylon_melt b/examples/PACKAGES/reaction/nylon,6-6_melt/in.large_nylon_melt index 6fbf46f844..9678a714d6 100644 --- a/examples/PACKAGES/reaction/nylon,6-6_melt/in.large_nylon_melt +++ b/examples/PACKAGES/reaction/nylon,6-6_melt/in.large_nylon_melt @@ -18,6 +18,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + read_data large_nylon_melt.data.gz & extra/bond/per/atom 5 & extra/angle/per/atom 15 & diff --git a/examples/PACKAGES/reaction/tiny_epoxy/in.tiny_epoxy.stabilized b/examples/PACKAGES/reaction/tiny_epoxy/in.tiny_epoxy.stabilized index 1309eff3a3..57b03b630f 100644 --- a/examples/PACKAGES/reaction/tiny_epoxy/in.tiny_epoxy.stabilized +++ b/examples/PACKAGES/reaction/tiny_epoxy/in.tiny_epoxy.stabilized @@ -17,6 +17,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + read_data tiny_epoxy.data velocity all create 300.0 4928459 dist gaussian diff --git a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized index 81a12b4ccb..95b39033db 100644 --- a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized +++ b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized @@ -19,6 +19,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + read_data tiny_nylon.data & extra/bond/per/atom 5 & extra/angle/per/atom 15 & diff --git a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized_variable_probability b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized_variable_probability index 515d4cb2f8..88b5a95a41 100644 --- a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized_variable_probability +++ b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized_variable_probability @@ -19,6 +19,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + read_data tiny_nylon.data & extra/bond/per/atom 5 & extra/angle/per/atom 15 & diff --git a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.unstabilized b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.unstabilized index 4891e9ebff..a569e28d43 100644 --- a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.unstabilized +++ b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.unstabilized @@ -19,6 +19,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + read_data tiny_nylon.data & extra/bond/per/atom 5 & extra/angle/per/atom 15 & diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/in.tiny_polystyrene.stabilized b/examples/PACKAGES/reaction/tiny_polystyrene/in.tiny_polystyrene.stabilized index ab9c012905..4ecc481719 100644 --- a/examples/PACKAGES/reaction/tiny_polystyrene/in.tiny_polystyrene.stabilized +++ b/examples/PACKAGES/reaction/tiny_polystyrene/in.tiny_polystyrene.stabilized @@ -19,6 +19,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + variable T equal 530 read_data tiny_polystyrene.data & From b465594aec73febc9d8115b0ce1ddae426089a9e Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sun, 12 Feb 2023 00:05:07 -0500 Subject: [PATCH 177/445] bond/react restarts bugfix introduced with recent 'rate_limit' keyword --- src/REACTION/fix_bond_react.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index 5da34aae21..95f11c7f77 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -4454,13 +4454,16 @@ void FixBondReact::restart(char *buf) Set *set_restart = (Set *) &buf[n*sizeof(int)]; r_nreacts = set_restart[0].nreacts; + n2cpy = 0; if (revision > 0) { r_max_rate_limit_steps = set_restart[0].max_rate_limit_steps; - ibufcount = r_max_rate_limit_steps*r_nreacts; - memory->create(ibuf,r_max_rate_limit_steps,r_nreacts,"bond/react:ibuf"); - memcpy(&ibuf[0][0],&buf[sizeof(int)+r_nreacts*sizeof(Set)],sizeof(int)*ibufcount); - n2cpy = r_max_rate_limit_steps; - } else n2cpy = 0; + if (r_max_rate_limit_steps > 0) { + ibufcount = r_max_rate_limit_steps*r_nreacts; + memory->create(ibuf,r_max_rate_limit_steps,r_nreacts,"bond/react:ibuf"); + memcpy(&ibuf[0][0],&buf[sizeof(int)+r_nreacts*sizeof(Set)],sizeof(int)*ibufcount); + n2cpy = r_max_rate_limit_steps; + } + } if (max_rate_limit_steps < n2cpy) n2cpy = max_rate_limit_steps; for (int i = 0; i < r_nreacts; i++) { @@ -4473,7 +4476,7 @@ void FixBondReact::restart(char *buf) } } } - if (revision > 0) memory->destroy(ibuf); + if (revision > 0 && r_max_rate_limit_steps > 0) memory->destroy(ibuf); } /* ---------------------------------------------------------------------- From f2713aad9431d8eb8f5d674aca9f3b320596f347 Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sun, 12 Feb 2023 00:36:58 -0500 Subject: [PATCH 178/445] add simple bond/react unit test --- .../tests/fix-timestep-bond_react.yaml | 48 ++++++ .../tests/fourmol.molecule_template | 154 ++++++++++++++++++ unittest/force-styles/tests/fourmol.rxn_map | 28 ++++ .../tests/fourmol_modified.molecule_template | 154 ++++++++++++++++++ 4 files changed, 384 insertions(+) create mode 100644 unittest/force-styles/tests/fix-timestep-bond_react.yaml create mode 100644 unittest/force-styles/tests/fourmol.molecule_template create mode 100644 unittest/force-styles/tests/fourmol.rxn_map create mode 100644 unittest/force-styles/tests/fourmol_modified.molecule_template diff --git a/unittest/force-styles/tests/fix-timestep-bond_react.yaml b/unittest/force-styles/tests/fix-timestep-bond_react.yaml new file mode 100644 index 0000000000..8897208fe0 --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-bond_react.yaml @@ -0,0 +1,48 @@ +--- +lammps_version: 8 Feb 2023 +date_generated: Fri Feb 10 12:00:00 2023 +epsilon: 2e-14 +skip_tests: +prerequisites: ! | + atom full + fix bond/react +pre_commands: ! "" +post_commands: ! | + molecule mol1 ${input_dir}/fourmol.molecule_template + molecule mol2 ${input_dir}/fourmol_modified.molecule_template + fix test all bond/react react rxn1 all 1 0 5 mol1 mol2 ${input_dir}/fourmol.rxn_map +input_file: in.fourmol +natoms: 29 +global_vector: ! |- + 1 1 +run_atom_types: ! |2 + 21 5 + 22 2 + 23 2 + 19 2 + 18 4 + 20 2 + 28 2 + 4 3 + 10 2 + 11 4 + 12 2 + 14 3 + 3 3 + 6 2 + 7 5 + 15 4 + 8 5 + 9 3 + 16 3 + 17 5 + 5 3 + 13 4 + 2 3 + 1 4 + 27 5 + 29 2 + 24 5 + 25 2 + 26 2 +... diff --git a/unittest/force-styles/tests/fourmol.molecule_template b/unittest/force-styles/tests/fourmol.molecule_template new file mode 100644 index 0000000000..9d53791598 --- /dev/null +++ b/unittest/force-styles/tests/fourmol.molecule_template @@ -0,0 +1,154 @@ +LAMMPS molecule file generated by VMD/TopoTools v1.7 on Sat Feb 11 12:41:31 -0500 2023 + 17 atoms + 16 bonds + 26 angles + 31 dihedrals + 2 impropers + + Coords + +1 -0.279937 2.472659 -0.172009 +2 0.301971 2.951524 -0.856897 +3 -0.694354 1.244047 -0.622338 +4 -1.577161 1.491533 -1.248713 +5 -0.895018 0.935681 0.402277 +6 0.294126 0.227193 -1.284309 +7 0.340199 -0.009128 -2.463311 +8 1.164119 -0.483753 -0.676598 +9 1.377746 -0.253663 0.268776 +10 2.018528 -1.428397 -0.967335 +11 1.792978 -1.987105 -1.884063 +12 3.003025 -0.489233 -1.618866 +13 4.044727 -0.901320 -1.638445 +14 2.603315 -0.407898 -2.655441 +15 2.975631 0.563343 -1.243765 +16 2.651755 -2.395711 0.032908 +17 2.230996 -2.102292 1.149195 + + Types + +1 3 +2 2 +3 1 +4 2 +5 2 +6 1 +7 4 +8 3 +9 2 +10 1 +11 2 +12 1 +13 2 +14 2 +15 2 +16 1 +17 4 + + Charges + +1 -0.470000 +2 0.310000 +3 -0.020000 +4 0.090000 +5 0.090000 +6 0.510000 +7 -0.510000 +8 -0.470000 +9 0.310000 +10 0.070000 +11 0.090000 +12 -0.270000 +13 0.090000 +14 0.090000 +15 0.090000 +16 0.510000 +17 -0.510000 + + Bonds + +1 1 1 2 +2 1 1 3 +3 1 3 4 +4 1 3 5 +5 1 3 6 +6 1 6 8 +7 1 6 7 +8 1 8 9 +9 1 8 10 +10 1 10 11 +11 1 10 12 +12 1 10 16 +13 1 12 13 +14 1 12 14 +15 1 12 15 +16 1 16 17 + + Angles + +1 1 2 1 3 +2 1 1 3 5 +3 1 1 3 4 +4 1 1 3 6 +5 1 4 3 5 +6 1 5 3 6 +7 1 4 3 6 +8 1 3 6 7 +9 1 3 6 8 +10 1 7 6 8 +11 1 6 8 9 +12 1 9 8 10 +13 1 6 8 10 +14 1 8 10 11 +15 1 8 10 16 +16 1 11 10 12 +17 1 12 10 16 +18 1 8 10 12 +19 1 11 10 16 +20 1 10 12 15 +21 1 10 12 14 +22 1 10 12 13 +23 1 13 12 15 +24 1 13 12 14 +25 1 14 12 15 +26 1 10 16 17 + + Dihedrals + +1 1 2 1 3 6 +2 1 2 1 3 4 +3 1 2 1 3 5 +4 1 1 3 6 8 +5 1 1 3 6 7 +6 1 4 3 6 8 +7 1 4 3 6 7 +8 1 5 3 6 8 +9 1 5 3 6 7 +10 1 3 6 8 9 +11 1 3 6 8 10 +12 1 7 6 8 9 +13 1 7 6 8 10 +14 1 6 8 10 12 +15 1 6 8 10 16 +16 1 6 8 10 11 +17 1 9 8 10 12 +18 1 9 8 10 16 +19 1 9 8 10 11 +20 1 8 10 12 13 +21 1 8 10 12 14 +22 1 8 10 12 15 +23 1 8 10 16 17 +24 1 11 10 12 13 +25 1 11 10 12 14 +26 1 11 10 12 15 +27 1 11 10 16 17 +28 1 12 10 16 17 +29 1 16 10 12 13 +30 1 16 10 12 14 +31 1 16 10 12 15 + + Impropers + +1 1 6 3 8 7 +2 1 8 6 10 9 + diff --git a/unittest/force-styles/tests/fourmol.rxn_map b/unittest/force-styles/tests/fourmol.rxn_map new file mode 100644 index 0000000000..cd810b41e0 --- /dev/null +++ b/unittest/force-styles/tests/fourmol.rxn_map @@ -0,0 +1,28 @@ +map file for 'fix bond/react' + +17 equivalences + +InitiatorIDs + +6 +7 + +Equivalences + +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 diff --git a/unittest/force-styles/tests/fourmol_modified.molecule_template b/unittest/force-styles/tests/fourmol_modified.molecule_template new file mode 100644 index 0000000000..ce6f2c7f38 --- /dev/null +++ b/unittest/force-styles/tests/fourmol_modified.molecule_template @@ -0,0 +1,154 @@ +LAMMPS molecule file generated by VMD/TopoTools v1.7 on Sat Feb 11 12:41:31 -0500 2023 + 17 atoms + 16 bonds + 26 angles + 31 dihedrals + 2 impropers + + Coords + +1 -0.279937 2.472659 -0.172009 +2 0.301971 2.951524 -0.856897 +3 -0.694354 1.244047 -0.622338 +4 -1.577161 1.491533 -1.248713 +5 -0.895018 0.935681 0.402277 +6 0.294126 0.227193 -1.284309 +7 0.340199 -0.009128 -2.463311 +8 1.164119 -0.483753 -0.676598 +9 1.377746 -0.253663 0.268776 +10 2.018528 -1.428397 -0.967335 +11 1.792978 -1.987105 -1.884063 +12 3.003025 -0.489233 -1.618866 +13 4.044727 -0.901320 -1.638445 +14 2.603315 -0.407898 -2.655441 +15 2.975631 0.563343 -1.243765 +16 2.651755 -2.395711 0.032908 +17 2.230996 -2.102292 1.149195 + + Types + +1 4 +2 3 +3 3 +4 3 +5 3 +6 2 +7 5 +8 5 +9 3 +10 2 +11 4 +12 2 +13 4 +14 3 +15 4 +16 3 +17 5 + + Charges + +1 -0.470000 +2 0.310000 +3 -0.020000 +4 0.090000 +5 0.090000 +6 0.510000 +7 -0.510000 +8 -0.470000 +9 0.310000 +10 0.070000 +11 0.090000 +12 -0.270000 +13 0.090000 +14 0.090000 +15 0.090000 +16 0.510000 +17 -0.510000 + + Bonds + +1 1 1 2 +2 1 1 3 +3 1 3 4 +4 1 3 5 +5 1 3 6 +6 1 6 8 +7 1 6 7 +8 1 8 9 +9 1 8 10 +10 1 10 11 +11 1 10 12 +12 1 10 16 +13 1 12 13 +14 1 12 14 +15 1 12 15 +16 1 16 17 + + Angles + +1 1 2 1 3 +2 1 1 3 5 +3 1 1 3 4 +4 1 1 3 6 +5 1 4 3 5 +6 1 5 3 6 +7 1 4 3 6 +8 1 3 6 7 +9 1 3 6 8 +10 1 7 6 8 +11 1 6 8 9 +12 1 9 8 10 +13 1 6 8 10 +14 1 8 10 11 +15 1 8 10 16 +16 1 11 10 12 +17 1 12 10 16 +18 1 8 10 12 +19 1 11 10 16 +20 1 10 12 15 +21 1 10 12 14 +22 1 10 12 13 +23 1 13 12 15 +24 1 13 12 14 +25 1 14 12 15 +26 1 10 16 17 + + Dihedrals + +1 1 2 1 3 6 +2 1 2 1 3 4 +3 1 2 1 3 5 +4 1 1 3 6 8 +5 1 1 3 6 7 +6 1 4 3 6 8 +7 1 4 3 6 7 +8 1 5 3 6 8 +9 1 5 3 6 7 +10 1 3 6 8 9 +11 1 3 6 8 10 +12 1 7 6 8 9 +13 1 7 6 8 10 +14 1 6 8 10 12 +15 1 6 8 10 16 +16 1 6 8 10 11 +17 1 9 8 10 12 +18 1 9 8 10 16 +19 1 9 8 10 11 +20 1 8 10 12 13 +21 1 8 10 12 14 +22 1 8 10 12 15 +23 1 8 10 16 17 +24 1 11 10 12 13 +25 1 11 10 12 14 +26 1 11 10 12 15 +27 1 11 10 16 17 +28 1 12 10 16 17 +29 1 16 10 12 13 +30 1 16 10 12 14 +31 1 16 10 12 15 + + Impropers + +1 1 6 3 8 7 +2 1 8 6 10 9 + From eab3c4d382fc1aad6e52a4e4fe89f32a0f16bb74 Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sun, 12 Feb 2023 15:08:46 -0500 Subject: [PATCH 179/445] better map file error handling --- src/REACTION/fix_bond_react.cpp | 74 +++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index 95f11c7f77..dbdd5116fd 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -2850,7 +2850,7 @@ void FixBondReact::glove_ghostcheck() ghostly = 1; } #endif - + if (ghostly == 1) { ghostly_mega_glove[0][ghostly_num_mega] = rxnID; for (int j = 0; j < onemol->natoms+1; j++) { @@ -3908,6 +3908,7 @@ read map file void FixBondReact::read_map_file(int myrxn) { + int rv; char line[MAXLINE],keyword[MAXLINE]; char *eof,*ptr; @@ -3932,16 +3933,24 @@ void FixBondReact::read_map_file(int myrxn) if (strstr(line,"edgeIDs")) sscanf(line,"%d",&nedge); else if (strstr(line,"equivalences")) { - sscanf(line,"%d",&nequivalent); + rv = sscanf(line,"%d",&nequivalent); + if (rv != 1) error->one(FLERR, "Map file header is incorrectly formatted"); if (nequivalent != onemol->natoms) error->one(FLERR,"Fix bond/react: Number of equivalences in map file must " "equal number of atoms in reaction templates"); } - else if (strstr(line,"deleteIDs")) sscanf(line,"%d",&ndelete); - else if (strstr(line,"createIDs")) sscanf(line,"%d",&ncreate); - else if (strstr(line,"chiralIDs")) sscanf(line,"%d",&nchiral); - else if (strstr(line,"constraints")) { - sscanf(line,"%d",&nconstraints[myrxn]); + else if (strstr(line,"deleteIDs")) { + rv = sscanf(line,"%d",&ndelete); + if (rv != 1) error->one(FLERR, "Map file header is incorrectly formatted"); + } else if (strstr(line,"createIDs")) { + rv = sscanf(line,"%d",&ncreate); + if (rv != 1) error->one(FLERR, "Map file header is incorrectly formatted"); + } else if (strstr(line,"chiralIDs")) { + rv = sscanf(line,"%d",&nchiral); + if (rv != 1) error->one(FLERR, "Map file header is incorrectly formatted"); + } else if (strstr(line,"constraints")) { + rv = sscanf(line,"%d",&nconstraints[myrxn]); + if (rv != 1) error->one(FLERR, "Map file header is incorrectly formatted"); if (maxnconstraints < nconstraints[myrxn]) maxnconstraints = nconstraints[myrxn]; constraints.resize(maxnconstraints, std::vector(nreacts)); } else break; @@ -3961,11 +3970,13 @@ void FixBondReact::read_map_file(int myrxn) if (comm->me == 0) error->warning(FLERR,"Fix bond/react: The BondingIDs section title has been deprecated. Please use InitiatorIDs instead."); bondflag = 1; readline(line); - sscanf(line,"%d",&ibonding[myrxn]); + rv = sscanf(line,"%d",&ibonding[myrxn]); + if (rv != 1) error->one(FLERR, "InitiatorIDs section is incorrectly formatted"); if (ibonding[myrxn] > onemol->natoms) error->one(FLERR,"Fix bond/react: Invalid template atom ID in map file"); readline(line); - sscanf(line,"%d",&jbonding[myrxn]); + rv = sscanf(line,"%d",&jbonding[myrxn]); + if (rv != 1) error->one(FLERR, "InitiatorIDs section is incorrectly formatted"); if (jbonding[myrxn] > onemol->natoms) error->one(FLERR,"Fix bond/react: Invalid template atom ID in map file"); } else if (strcmp(keyword,"EdgeIDs") == 0) { @@ -3996,10 +4007,11 @@ void FixBondReact::EdgeIDs(char *line, int myrxn) { // puts a 1 at edge(edgeID) - int tmp; + int tmp,rv; for (int i = 0; i < nedge; i++) { readline(line); - sscanf(line,"%d",&tmp); + rv = sscanf(line,"%d",&tmp); + if (rv != 1) error->one(FLERR, "EdgeIDs section is incorrectly formatted"); if (tmp > onemol->natoms) error->one(FLERR,"Fix bond/react: Invalid template atom ID in map file"); edge[tmp-1][myrxn] = 1; @@ -4008,11 +4020,11 @@ void FixBondReact::EdgeIDs(char *line, int myrxn) void FixBondReact::Equivalences(char *line, int myrxn) { - int tmp1; - int tmp2; + int tmp1,tmp2,rv; for (int i = 0; i < nequivalent; i++) { readline(line); - sscanf(line,"%d %d",&tmp1,&tmp2); + rv = sscanf(line,"%d %d",&tmp1,&tmp2); + if (rv != 2) error->one(FLERR, "Equivalences section is incorrectly formatted"); if (tmp1 > onemol->natoms || tmp2 > twomol->natoms) error->one(FLERR,"Fix bond/react: Invalid template atom ID in map file"); //equivalences is-> clmn 1: post-reacted, clmn 2: pre-reacted @@ -4026,10 +4038,11 @@ void FixBondReact::Equivalences(char *line, int myrxn) void FixBondReact::DeleteAtoms(char *line, int myrxn) { - int tmp; + int tmp,rv; for (int i = 0; i < ndelete; i++) { readline(line); - sscanf(line,"%d",&tmp); + rv = sscanf(line,"%d",&tmp); + if (rv != 1) error->one(FLERR, "DeleteIDs section is incorrectly formatted"); if (tmp > onemol->natoms) error->one(FLERR,"Fix bond/react: Invalid template atom ID in map file"); delete_atoms[tmp-1][myrxn] = 1; @@ -4039,10 +4052,11 @@ void FixBondReact::DeleteAtoms(char *line, int myrxn) void FixBondReact::CreateAtoms(char *line, int myrxn) { create_atoms_flag[myrxn] = 1; - int tmp; + int tmp,rv; for (int i = 0; i < ncreate; i++) { readline(line); - sscanf(line,"%d",&tmp); + rv = sscanf(line,"%d",&tmp); + if (rv != 1) error->one(FLERR, "CreateIDs section is incorrectly formatted"); create_atoms[tmp-1][myrxn] = 1; } if (twomol->xflag == 0) @@ -4060,10 +4074,11 @@ void FixBondReact::CustomCharges(int ifragment, int myrxn) void FixBondReact::ChiralCenters(char *line, int myrxn) { - int tmp; + int tmp,rv; for (int i = 0; i < nchiral; i++) { readline(line); - sscanf(line,"%d",&tmp); + rv = sscanf(line,"%d",&tmp); + if (rv != 1) error->one(FLERR, "ChiralIDs section is incorrectly formatted"); if (tmp > onemol->natoms) error->one(FLERR,"Fix bond/react: Invalid template atom ID in map file"); chiral_atoms[tmp-1][0][myrxn] = 1; @@ -4093,6 +4108,7 @@ void FixBondReact::ChiralCenters(char *line, int myrxn) void FixBondReact::ReadConstraints(char *line, int myrxn) { + int rv; double tmp[MAXCONARGS]; char **strargs,*ptr,*lptr; memory->create(strargs,MAXCONARGS,MAXLINE,"bond/react:strargs"); @@ -4134,10 +4150,12 @@ void FixBondReact::ReadConstraints(char *line, int myrxn) } if ((ptr = strchr(lptr,')'))) *ptr = '\0'; - sscanf(line,"%s",constraint_type); + rv = sscanf(line,"%s",constraint_type); + if (rv != 1) error->one(FLERR, "Constraints section is incorrectly formatted"); if (strcmp(constraint_type,"distance") == 0) { constraints[i][myrxn].type = DISTANCE; - sscanf(line,"%*s %s %s %lg %lg",strargs[0],strargs[1],&tmp[0],&tmp[1]); + rv = sscanf(line,"%*s %s %s %lg %lg",strargs[0],strargs[1],&tmp[0],&tmp[1]); + if (rv != 4) error->one(FLERR, "Distance constraint is incorrectly formatted"); readID(strargs[0], i, myrxn, 0); readID(strargs[1], i, myrxn, 1); // cutoffs @@ -4145,7 +4163,8 @@ void FixBondReact::ReadConstraints(char *line, int myrxn) constraints[i][myrxn].par[1] = tmp[1]*tmp[1]; } else if (strcmp(constraint_type,"angle") == 0) { constraints[i][myrxn].type = ANGLE; - sscanf(line,"%*s %s %s %s %lg %lg",strargs[0],strargs[1],strargs[2],&tmp[0],&tmp[1]); + rv = sscanf(line,"%*s %s %s %s %lg %lg",strargs[0],strargs[1],strargs[2],&tmp[0],&tmp[1]); + if (rv != 5) error->one(FLERR, "Angle constraint is incorrectly formatted"); readID(strargs[0], i, myrxn, 0); readID(strargs[1], i, myrxn, 1); readID(strargs[2], i, myrxn, 2); @@ -4155,8 +4174,9 @@ void FixBondReact::ReadConstraints(char *line, int myrxn) constraints[i][myrxn].type = DIHEDRAL; tmp[2] = 181.0; // impossible range tmp[3] = 182.0; - sscanf(line,"%*s %s %s %s %s %lg %lg %lg %lg",strargs[0],strargs[1], + rv = sscanf(line,"%*s %s %s %s %s %lg %lg %lg %lg",strargs[0],strargs[1], strargs[2],strargs[3],&tmp[0],&tmp[1],&tmp[2],&tmp[3]); + if (!(rv == 6 || rv == 8)) error->one(FLERR, "Dihedral constraint is incorrectly formatted"); readID(strargs[0], i, myrxn, 0); readID(strargs[1], i, myrxn, 1); readID(strargs[2], i, myrxn, 2); @@ -4168,7 +4188,8 @@ void FixBondReact::ReadConstraints(char *line, int myrxn) } else if (strcmp(constraint_type,"arrhenius") == 0) { constraints[i][myrxn].type = ARRHENIUS; constraints[i][myrxn].par[0] = narrhenius++; - sscanf(line,"%*s %lg %lg %lg %lg",&tmp[0],&tmp[1],&tmp[2],&tmp[3]); + rv = sscanf(line,"%*s %lg %lg %lg %lg",&tmp[0],&tmp[1],&tmp[2],&tmp[3]); + if (rv != 4) error->one(FLERR, "Arrhenius constraint is incorrectly formatted"); constraints[i][myrxn].par[1] = tmp[0]; constraints[i][myrxn].par[2] = tmp[1]; constraints[i][myrxn].par[3] = tmp[2]; @@ -4176,7 +4197,8 @@ void FixBondReact::ReadConstraints(char *line, int myrxn) } else if (strcmp(constraint_type,"rmsd") == 0) { constraints[i][myrxn].type = RMSD; strcpy(strargs[0],"0"); - sscanf(line,"%*s %lg %s",&tmp[0],strargs[0]); + rv = sscanf(line,"%*s %lg %s",&tmp[0],strargs[0]); + if (!(rv == 1 || rv == 2)) error->one(FLERR, "RMSD constraint is incorrectly formatted"); constraints[i][myrxn].par[0] = tmp[0]; // RMSDmax constraints[i][myrxn].id[0] = -1; // optional molecule fragment if (isalpha(strargs[0][0])) { From 401ac8c4f7aec4916c9b8acac059eb838f24d499 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 9 Feb 2023 07:44:40 -0500 Subject: [PATCH 180/445] make fallback url function available to plugin compilations --- cmake/Modules/LAMMPSInterfacePlugin.cmake | 12 ++++++++++++ cmake/Modules/LAMMPSUtils.cmake | 1 + 2 files changed, 13 insertions(+) diff --git a/cmake/Modules/LAMMPSInterfacePlugin.cmake b/cmake/Modules/LAMMPSInterfacePlugin.cmake index 79e9a0955c..c1cc613496 100644 --- a/cmake/Modules/LAMMPSInterfacePlugin.cmake +++ b/cmake/Modules/LAMMPSInterfacePlugin.cmake @@ -88,6 +88,18 @@ function(get_lammps_version version_header variable) set(${variable} "${date}" PARENT_SCOPE) endfunction() +# determine canonical URL for downloading backup copy from download.lammps.org/thirdparty +function(GetFallbackURL input output) + string(REPLACE "_URL" "" _tmp ${input}) + string(TOLOWER ${_tmp} libname) + string(REGEX REPLACE "^https://.*/([^/]+gz)" "${LAMMPS_THIRDPARTY_URL}/${libname}-\\1" newurl "${${input}}") + if ("${newurl}" STREQUAL "${${input}}") + set(${output} "" PARENT_SCOPE) + else() + set(${output} ${newurl} PARENT_SCOPE) + endif() +endfunction(GetFallbackURL) + ################################################################################# # LAMMPS C++ interface. We only need the header related parts except on windows. add_library(lammps INTERFACE) diff --git a/cmake/Modules/LAMMPSUtils.cmake b/cmake/Modules/LAMMPSUtils.cmake index bb69104308..8a118e7a3b 100644 --- a/cmake/Modules/LAMMPSUtils.cmake +++ b/cmake/Modules/LAMMPSUtils.cmake @@ -159,6 +159,7 @@ if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (EXISTS /etc/os-release)) set(CMAKE_DISTRO_VERSION ${disversion}) endif() +# determine canonical URL for downloading backup copy from download.lammps.org/thirdparty function(GetFallbackURL input output) string(REPLACE "_URL" "" _tmp ${input}) string(TOLOWER ${_tmp} libname) From e99ec32b4b822e771daa48af92862754e597dd4a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Feb 2023 05:45:18 -0500 Subject: [PATCH 181/445] enable and apply clang-format --- src/EXTRA-PAIR/pair_beck.cpp | 229 +++++++++++++++++------------------ src/OPENMP/pair_beck_omp.cpp | 109 +++++++++-------- 2 files changed, 169 insertions(+), 169 deletions(-) diff --git a/src/EXTRA-PAIR/pair_beck.cpp b/src/EXTRA-PAIR/pair_beck.cpp index 1fdaf4bf73..f0dffed7fe 100644 --- a/src/EXTRA-PAIR/pair_beck.cpp +++ b/src/EXTRA-PAIR/pair_beck.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -18,14 +17,15 @@ #include "pair_beck.h" -#include #include "atom.h" #include "comm.h" -#include "force.h" -#include "neigh_list.h" -#include "memory.h" #include "error.h" +#include "force.h" #include "math_special.h" +#include "memory.h" +#include "neigh_list.h" + +#include using namespace LAMMPS_NS; using namespace MathSpecial; @@ -54,16 +54,16 @@ PairBeck::~PairBeck() void PairBeck::compute(int eflag, int vflag) { - int i,j,ii,jj,inum,jnum,itype,jtype; - double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; - double rsq,r5,force_beck,factor_lj; - double r,rinv; - double aaij,alphaij,betaij; - double term1,term1inv,term2,term3,term4,term5,term6; - int *ilist,*jlist,*numneigh,**firstneigh; + int i, j, ii, jj, inum, jnum, itype, jtype; + double xtmp, ytmp, ztmp, delx, dely, delz, evdwl, fpair; + double rsq, r5, force_beck, factor_lj; + double r, rinv; + double aaij, alphaij, betaij; + double term1, term1inv, term2, term3, term4, term5, term6; + int *ilist, *jlist, *numneigh, **firstneigh; evdwl = 0.0; - ev_init(eflag,vflag); + ev_init(eflag, vflag); double **x = atom->x; double **f = atom->f; @@ -96,45 +96,44 @@ void PairBeck::compute(int eflag, int vflag) delx = xtmp - x[j][0]; dely = ytmp - x[j][1]; delz = ztmp - x[j][2]; - rsq = delx*delx + dely*dely + delz*delz; + rsq = delx * delx + dely * dely + delz * delz; jtype = type[j]; if (rsq < cutsq[itype][jtype]) { r = sqrt(rsq); - r5 = rsq*rsq*r; + r5 = rsq * rsq * r; aaij = aa[itype][jtype]; alphaij = alpha[itype][jtype]; betaij = beta[itype][jtype]; - term1 = aaij*aaij + rsq; - term2 = powint(term1,-5); - term3 = 21.672 + 30.0*aaij*aaij + 6.0*rsq; - term4 = alphaij + r5*betaij; - term5 = alphaij + 6.0*r5*betaij; - rinv = 1.0/r; - force_beck = AA[itype][jtype]*exp(-1.0*r*term4)*term5; - force_beck -= BB[itype][jtype]*r*term2*term3; + term1 = aaij * aaij + rsq; + term2 = powint(term1, -5); + term3 = 21.672 + 30.0 * aaij * aaij + 6.0 * rsq; + term4 = alphaij + r5 * betaij; + term5 = alphaij + 6.0 * r5 * betaij; + rinv = 1.0 / r; + force_beck = AA[itype][jtype] * exp(-1.0 * r * term4) * term5; + force_beck -= BB[itype][jtype] * r * term2 * term3; - fpair = factor_lj*force_beck*rinv; + fpair = factor_lj * force_beck * rinv; - f[i][0] += delx*fpair; - f[i][1] += dely*fpair; - f[i][2] += delz*fpair; + f[i][0] += delx * fpair; + f[i][1] += dely * fpair; + f[i][2] += delz * fpair; if (newton_pair || j < nlocal) { - f[j][0] -= delx*fpair; - f[j][1] -= dely*fpair; - f[j][2] -= delz*fpair; + f[j][0] -= delx * fpair; + f[j][1] -= dely * fpair; + f[j][2] -= delz * fpair; } if (eflag) { - term6 = powint(term1,-3); - term1inv = 1.0/term1; - evdwl = AA[itype][jtype]*exp(-1.0*r*term4); - evdwl -= BB[itype][jtype]*term6*(1.0+(2.709+3.0*aaij*aaij)*term1inv); + term6 = powint(term1, -3); + term1inv = 1.0 / term1; + evdwl = AA[itype][jtype] * exp(-1.0 * r * term4); + evdwl -= BB[itype][jtype] * term6 * (1.0 + (2.709 + 3.0 * aaij * aaij) * term1inv); evdwl *= factor_lj; } - if (evflag) ev_tally(i,j,nlocal,newton_pair, - evdwl,0.0,fpair,delx,dely,delz); + if (evflag) ev_tally(i, j, nlocal, newton_pair, evdwl, 0.0, fpair, delx, dely, delz); } } } @@ -149,21 +148,20 @@ void PairBeck::compute(int eflag, int vflag) void PairBeck::allocate() { allocated = 1; - int n = atom->ntypes; + int np1 = atom->ntypes + 1; - memory->create(setflag,n+1,n+1,"pair:setflag"); - for (int i = 1; i <= n; i++) - for (int j = i; j <= n; j++) - setflag[i][j] = 0; + memory->create(setflag, np1, np1, "pair:setflag"); + for (int i = 1; i < np1; i++) + for (int j = i; j < np1; j++) setflag[i][j] = 0; - memory->create(cutsq,n+1,n+1,"pair:cutsq"); + memory->create(cutsq, np1, np1, "pair:cutsq"); - memory->create(cut,n+1,n+1,"pair:cut"); - memory->create(AA,n+1,n+1,"pair:AA"); - memory->create(BB,n+1,n+1,"pair:BB"); - memory->create(aa,n+1,n+1,"pair:aa"); - memory->create(alpha,n+1,n+1,"pair:alpha"); - memory->create(beta,n+1,n+1,"pair:beta"); + memory->create(cut, np1, np1, "pair:cut"); + memory->create(AA, np1, np1, "pair:AA"); + memory->create(BB, np1, np1, "pair:BB"); + memory->create(aa, np1, np1, "pair:aa"); + memory->create(alpha, np1, np1, "pair:alpha"); + memory->create(beta, np1, np1, "pair:beta"); } /* ---------------------------------------------------------------------- @@ -172,14 +170,14 @@ void PairBeck::allocate() void PairBeck::settings(int narg, char **arg) { - if (narg != 1) error->all(FLERR,"Illegal pair_style command"); + if (narg != 1) error->all(FLERR, "Illegal pair_style command"); - cut_global = utils::numeric(FLERR,arg[0],false,lmp); + cut_global = utils::numeric(FLERR, arg[0], false, lmp); // reset cutoffs that have been explicitly set if (allocated) { - int i,j; + int i, j; for (i = 1; i <= atom->ntypes; i++) for (j = i; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; @@ -192,26 +190,25 @@ void PairBeck::settings(int narg, char **arg) void PairBeck::coeff(int narg, char **arg) { - if (narg != 7 && narg != 8) - error->all(FLERR,"Incorrect args for pair coefficients"); + if (narg != 7 && narg != 8) error->all(FLERR, "Incorrect args for pair coefficients"); if (!allocated) allocate(); - int ilo,ihi,jlo,jhi; - utils::bounds(FLERR,arg[0],1,atom->ntypes,ilo,ihi,error); - utils::bounds(FLERR,arg[1],1,atom->ntypes,jlo,jhi,error); + int ilo, ihi, jlo, jhi; + utils::bounds(FLERR, arg[0], 1, atom->ntypes, ilo, ihi, error); + utils::bounds(FLERR, arg[1], 1, atom->ntypes, jlo, jhi, error); - double AA_one = utils::numeric(FLERR,arg[2],false,lmp); - double BB_one = utils::numeric(FLERR,arg[3],false,lmp); - double aa_one = utils::numeric(FLERR,arg[4],false,lmp); - double alpha_one = utils::numeric(FLERR,arg[5],false,lmp); - double beta_one = utils::numeric(FLERR,arg[6],false,lmp); + double AA_one = utils::numeric(FLERR, arg[2], false, lmp); + double BB_one = utils::numeric(FLERR, arg[3], false, lmp); + double aa_one = utils::numeric(FLERR, arg[4], false, lmp); + double alpha_one = utils::numeric(FLERR, arg[5], false, lmp); + double beta_one = utils::numeric(FLERR, arg[6], false, lmp); double cut_one = cut_global; - if (narg == 8) cut_one = utils::numeric(FLERR,arg[7],false,lmp); + if (narg == 8) cut_one = utils::numeric(FLERR, arg[7], false, lmp); int count = 0; for (int i = ilo; i <= ihi; i++) { - for (int j = MAX(jlo,i); j <= jhi; j++) { + for (int j = MAX(jlo, i); j <= jhi; j++) { AA[i][j] = AA_one; BB[i][j] = BB_one; aa[i][j] = aa_one; @@ -223,7 +220,7 @@ void PairBeck::coeff(int narg, char **arg) } } - if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); + if (count == 0) error->all(FLERR, "Incorrect args for pair coefficients"); } /* ---------------------------------------------------------------------- @@ -232,7 +229,7 @@ void PairBeck::coeff(int narg, char **arg) double PairBeck::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); AA[j][i] = AA[i][j]; BB[j][i] = BB[i][j]; @@ -251,17 +248,17 @@ void PairBeck::write_restart(FILE *fp) { write_restart_settings(fp); - int i,j; + int i, j; for (i = 1; i <= atom->ntypes; i++) for (j = i; j <= atom->ntypes; j++) { - fwrite(&setflag[i][j],sizeof(int),1,fp); + fwrite(&setflag[i][j], sizeof(int), 1, fp); if (setflag[i][j]) { - fwrite(&AA[i][j],sizeof(double),1,fp); - fwrite(&BB[i][j],sizeof(double),1,fp); - fwrite(&aa[i][j],sizeof(double),1,fp); - fwrite(&alpha[i][j],sizeof(double),1,fp); - fwrite(&beta[i][j],sizeof(double),1,fp); - fwrite(&cut[i][j],sizeof(double),1,fp); + fwrite(&AA[i][j], sizeof(double), 1, fp); + fwrite(&BB[i][j], sizeof(double), 1, fp); + fwrite(&aa[i][j], sizeof(double), 1, fp); + fwrite(&alpha[i][j], sizeof(double), 1, fp); + fwrite(&beta[i][j], sizeof(double), 1, fp); + fwrite(&cut[i][j], sizeof(double), 1, fp); } } } @@ -275,27 +272,27 @@ void PairBeck::read_restart(FILE *fp) read_restart_settings(fp); allocate(); - int i,j; + int i, j; int me = comm->me; for (i = 1; i <= atom->ntypes; i++) for (j = i; j <= atom->ntypes; j++) { - if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,nullptr,error); - MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); + if (me == 0) utils::sfread(FLERR, &setflag[i][j], sizeof(int), 1, fp, nullptr, error); + MPI_Bcast(&setflag[i][j], 1, MPI_INT, 0, world); if (setflag[i][j]) { if (me == 0) { - utils::sfread(FLERR,&AA[i][j],sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR,&BB[i][j],sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR,&aa[i][j],sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR,&alpha[i][j],sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR,&beta[i][j],sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,nullptr,error); + utils::sfread(FLERR, &AA[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &BB[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &aa[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &alpha[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &beta[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &cut[i][j], sizeof(double), 1, fp, nullptr, error); } - MPI_Bcast(&AA[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&BB[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&aa[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&alpha[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&beta[i][j],1,MPI_DOUBLE,0,world); - MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world); + MPI_Bcast(&AA[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&BB[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&aa[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&alpha[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&beta[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&cut[i][j], 1, MPI_DOUBLE, 0, world); } } } @@ -306,8 +303,8 @@ void PairBeck::read_restart(FILE *fp) void PairBeck::write_restart_settings(FILE *fp) { - fwrite(&cut_global,sizeof(double),1,fp); - fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&cut_global, sizeof(double), 1, fp); + fwrite(&mix_flag, sizeof(int), 1, fp); } /* ---------------------------------------------------------------------- @@ -318,44 +315,42 @@ void PairBeck::read_restart_settings(FILE *fp) { int me = comm->me; if (me == 0) { - utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,nullptr,error); - utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR, &cut_global, sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &mix_flag, sizeof(int), 1, fp, nullptr, error); } - MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); - MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&cut_global, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&mix_flag, 1, MPI_INT, 0, world); } /* ---------------------------------------------------------------------- */ -double PairBeck::single(int /*i*/, int /*j*/, int itype, int jtype, - double rsq, - double /*factor_coul*/, double factor_lj, - double &fforce) +double PairBeck::single(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double factor_lj, double &fforce) { - double phi_beck,r,rinv; - double r5,force_beck; - double aaij,alphaij,betaij; - double term1,term1inv,term2,term3,term4,term5,term6; + double phi_beck, r, rinv; + double r5, force_beck; + double aaij, alphaij, betaij; + double term1, term1inv, term2, term3, term4, term5, term6; r = sqrt(rsq); - r5 = rsq*rsq*r; + r5 = rsq * rsq * r; aaij = aa[itype][jtype]; alphaij = alpha[itype][jtype]; betaij = beta[itype][jtype]; - term1 = aaij*aaij + rsq; - term2 = powint(term1,-5); - term3 = 21.672 + 30.0*aaij*aaij + 6.0*rsq; - term4 = alphaij + r5*betaij; - term5 = alphaij + 6.0*r5*betaij; - rinv = 1.0/r; - force_beck = AA[itype][jtype]*exp(-1.0*r*term4)*term5; - force_beck -= BB[itype][jtype]*r*term2*term3; - fforce = factor_lj*force_beck*rinv; + term1 = aaij * aaij + rsq; + term2 = powint(term1, -5); + term3 = 21.672 + 30.0 * aaij * aaij + 6.0 * rsq; + term4 = alphaij + r5 * betaij; + term5 = alphaij + 6.0 * r5 * betaij; + rinv = 1.0 / r; + force_beck = AA[itype][jtype] * exp(-1.0 * r * term4) * term5; + force_beck -= BB[itype][jtype] * r * term2 * term3; + fforce = factor_lj * force_beck * rinv; - term6 = powint(term1,-3); - term1inv = 1.0/term1; - phi_beck = AA[itype][jtype]*exp(-1.0*r*term4); - phi_beck -= BB[itype][jtype]*term6*(1.0+(2.709+3.0*aaij*aaij)*term1inv); + term6 = powint(term1, -3); + term1inv = 1.0 / term1; + phi_beck = AA[itype][jtype] * exp(-1.0 * r * term4); + phi_beck -= BB[itype][jtype] * term6 * (1.0 + (2.709 + 3.0 * aaij * aaij) * term1inv); - return factor_lj*phi_beck; + return factor_lj * phi_beck; } diff --git a/src/OPENMP/pair_beck_omp.cpp b/src/OPENMP/pair_beck_omp.cpp index 107c348c4c..c5c44dadbb 100644 --- a/src/OPENMP/pair_beck_omp.cpp +++ b/src/OPENMP/pair_beck_omp.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -13,24 +12,24 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include "omp_compat.h" #include "pair_beck_omp.h" -#include + #include "atom.h" #include "comm.h" #include "force.h" -#include "neigh_list.h" #include "math_special.h" - - +#include "neigh_list.h" #include "suffix.h" + +#include + +#include "omp_compat.h" using namespace LAMMPS_NS; using namespace MathSpecial; /* ---------------------------------------------------------------------- */ -PairBeckOMP::PairBeckOMP(LAMMPS *lmp) : - PairBeck(lmp), ThrOMP(lmp, THR_PAIR) +PairBeckOMP::PairBeckOMP(LAMMPS *lmp) : PairBeck(lmp), ThrOMP(lmp, THR_PAIR) { suffix_flag |= Suffix::OMP; respa_enable = 0; @@ -40,14 +39,14 @@ PairBeckOMP::PairBeckOMP(LAMMPS *lmp) : void PairBeckOMP::compute(int eflag, int vflag) { - ev_init(eflag,vflag); + ev_init(eflag, vflag); const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag, vflag) #endif { int ifrom, ito, tid; @@ -59,41 +58,47 @@ void PairBeckOMP::compute(int eflag, int vflag) if (evflag) { if (eflag) { - if (force->newton_pair) eval<1,1,1>(ifrom, ito, thr); - else eval<1,1,0>(ifrom, ito, thr); + if (force->newton_pair) + eval<1, 1, 1>(ifrom, ito, thr); + else + eval<1, 1, 0>(ifrom, ito, thr); } else { - if (force->newton_pair) eval<1,0,1>(ifrom, ito, thr); - else eval<1,0,0>(ifrom, ito, thr); + if (force->newton_pair) + eval<1, 0, 1>(ifrom, ito, thr); + else + eval<1, 0, 0>(ifrom, ito, thr); } } else { - if (force->newton_pair) eval<0,0,1>(ifrom, ito, thr); - else eval<0,0,0>(ifrom, ito, thr); + if (force->newton_pair) + eval<0, 0, 1>(ifrom, ito, thr); + else + eval<0, 0, 0>(ifrom, ito, thr); } thr->timer(Timer::PAIR); reduce_thr(this, eflag, vflag, thr); - } // end of omp parallel region + } // end of omp parallel region } template -void PairBeckOMP::eval(int iifrom, int iito, ThrData * const thr) +void PairBeckOMP::eval(int iifrom, int iito, ThrData *const thr) { - int i,j,ii,jj,jnum,itype,jtype; - double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; - double rsq,r5,force_beck,factor_lj; - double r,rinv; - double aaij,alphaij,betaij; - double term1,term1inv,term2,term3,term4,term5,term6; - int *ilist,*jlist,*numneigh,**firstneigh; + int i, j, ii, jj, jnum, itype, jtype; + double xtmp, ytmp, ztmp, delx, dely, delz, evdwl, fpair; + double rsq, r5, force_beck, factor_lj; + double r, rinv; + double aaij, alphaij, betaij; + double term1, term1inv, term2, term3, term4, term5, term6; + int *ilist, *jlist, *numneigh, **firstneigh; evdwl = 0.0; - const auto * _noalias const x = (dbl3_t *) atom->x[0]; - auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto *_noalias const x = (dbl3_t *) atom->x[0]; + auto *_noalias const f = (dbl3_t *) thr->get_f()[0]; int *type = atom->type; int nlocal = atom->nlocal; double *special_lj = force->special_lj; - double fxtmp,fytmp,fztmp; + double fxtmp, fytmp, fztmp; ilist = list->ilist; numneigh = list->numneigh; @@ -110,7 +115,7 @@ void PairBeckOMP::eval(int iifrom, int iito, ThrData * const thr) itype = type[i]; jlist = firstneigh[i]; jnum = numneigh[i]; - fxtmp=fytmp=fztmp=0.0; + fxtmp = fytmp = fztmp = 0.0; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; @@ -120,45 +125,45 @@ void PairBeckOMP::eval(int iifrom, int iito, ThrData * const thr) delx = xtmp - x[j].x; dely = ytmp - x[j].y; delz = ztmp - x[j].z; - rsq = delx*delx + dely*dely + delz*delz; + rsq = delx * delx + dely * dely + delz * delz; jtype = type[j]; if (rsq < cutsq[itype][jtype]) { r = sqrt(rsq); - r5 = rsq*rsq*r; + r5 = rsq * rsq * r; aaij = aa[itype][jtype]; alphaij = alpha[itype][jtype]; betaij = beta[itype][jtype]; - term1 = aaij*aaij + rsq; - term2 = powint(term1,-5); - term3 = 21.672 + 30.0*aaij*aaij + 6.0*rsq; - term4 = alphaij + r5*betaij; - term5 = alphaij + 6.0*r5*betaij; - rinv = 1.0/r; - force_beck = AA[itype][jtype]*exp(-1.0*r*term4)*term5; - force_beck -= BB[itype][jtype]*r*term2*term3; + term1 = aaij * aaij + rsq; + term2 = powint(term1, -5); + term3 = 21.672 + 30.0 * aaij * aaij + 6.0 * rsq; + term4 = alphaij + r5 * betaij; + term5 = alphaij + 6.0 * r5 * betaij; + rinv = 1.0 / r; + force_beck = AA[itype][jtype] * exp(-1.0 * r * term4) * term5; + force_beck -= BB[itype][jtype] * r * term2 * term3; - fpair = factor_lj*force_beck*rinv; + fpair = factor_lj * force_beck * rinv; - f[i].x += delx*fpair; - f[i].y += dely*fpair; - f[i].z += delz*fpair; + f[i].x += delx * fpair; + f[i].y += dely * fpair; + f[i].z += delz * fpair; if (NEWTON_PAIR || j < nlocal) { - f[j].x -= delx*fpair; - f[j].y -= dely*fpair; - f[j].z -= delz*fpair; + f[j].x -= delx * fpair; + f[j].y -= dely * fpair; + f[j].z -= delz * fpair; } if (EFLAG) { - term6 = powint(term1,-3); - term1inv = 1.0/term1; - evdwl = AA[itype][jtype]*exp(-1.0*r*term4); - evdwl -= BB[itype][jtype]*term6*(1.0+(2.709+3.0*aaij*aaij)*term1inv); + term6 = powint(term1, -3); + term1inv = 1.0 / term1; + evdwl = AA[itype][jtype] * exp(-1.0 * r * term4); + evdwl -= BB[itype][jtype] * term6 * (1.0 + (2.709 + 3.0 * aaij * aaij) * term1inv); evdwl *= factor_lj; } - if (EVFLAG) ev_tally_thr(this, i,j,nlocal,NEWTON_PAIR, - evdwl,0.0,fpair,delx,dely,delz,thr); + if (EVFLAG) + ev_tally_thr(this, i, j, nlocal, NEWTON_PAIR, evdwl, 0.0, fpair, delx, dely, delz, thr); } } f[i].x += fxtmp; From fbe30ffec635488e40d174ecbc6e76fa024d7a35 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Feb 2023 18:59:52 -0500 Subject: [PATCH 182/445] use MAXBIGINT_DOUBLE which does not overflow when casting back to bigint --- src/lmptype.h | 5 +++++ src/variable.cpp | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/lmptype.h b/src/lmptype.h index bf56d07d77..a5aa08e390 100644 --- a/src/lmptype.h +++ b/src/lmptype.h @@ -95,6 +95,8 @@ typedef int64_t bigint; #define MAXSMALLINT INT_MAX #define MAXTAGINT INT_MAX #define MAXBIGINT INT64_MAX +// INT64_MAX cannot be represented with a double. reduce to avoid overflow when casting back. +#define MAXBIGINT_DOUBLE (INT64_MAX-512) #define MPI_LMP_TAGINT MPI_INT #define MPI_LMP_IMAGEINT MPI_INT @@ -132,6 +134,8 @@ typedef int64_t bigint; #define MAXSMALLINT INT_MAX #define MAXTAGINT INT64_MAX #define MAXBIGINT INT64_MAX +// INT64_MAX cannot be represented with a double. reduce to avoid overflow when casting back. +#define MAXBIGINT_DOUBLE (INT64_MAX-512) #define MPI_LMP_TAGINT MPI_LL #define MPI_LMP_IMAGEINT MPI_LL @@ -168,6 +172,7 @@ typedef int bigint; #define MAXSMALLINT INT_MAX #define MAXTAGINT INT_MAX #define MAXBIGINT INT_MAX +#define MAXBIGINT_DOUBLE INT_MAX #define MPI_LMP_TAGINT MPI_INT #define MPI_LMP_IMAGEINT MPI_INT diff --git a/src/variable.cpp b/src/variable.cpp index 2d6d4694d1..d26c0185db 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -2721,8 +2721,8 @@ double Variable::collapse_tree(Tree *tree) else if (update->ntimestep < ivalue2) { bigint offset = update->ntimestep - ivalue1; tree->value = ivalue1 + (offset/ivalue3)*ivalue3 + ivalue3; - if (tree->value > ivalue2) tree->value = (double) MAXBIGINT; - } else tree->value = (double) MAXBIGINT; + if (tree->value > ivalue2) tree->value = (double) MAXBIGINT_DOUBLE; + } else tree->value = (double) MAXBIGINT_DOUBLE; return tree->value; } @@ -2758,11 +2758,11 @@ double Variable::collapse_tree(Tree *tree) if (istep > ivalue5) { offset = ivalue5 - ivalue1; istep = ivalue1 + (offset/ivalue3)*ivalue3 + ivalue3; - if (istep > ivalue2) istep = MAXBIGINT; + if (istep > ivalue2) istep = MAXBIGINT_DOUBLE; } } - } else istep = MAXBIGINT; - tree->value = istep; + } else istep = MAXBIGINT_DOUBLE; + tree->value = (double)istep; return tree->value; } @@ -3060,8 +3060,8 @@ double Variable::eval_tree(Tree *tree, int i) else if (update->ntimestep < ivalue2) { bigint offset = update->ntimestep - ivalue1; arg = ivalue1 + (offset/ivalue3)*ivalue3 + ivalue3; - if (arg > ivalue2) arg = (double) MAXBIGINT; - } else arg = (double) MAXBIGINT; + if (arg > ivalue2) arg = (double) MAXBIGINT_DOUBLE; + } else arg = (double) MAXBIGINT_DOUBLE; return arg; } @@ -3092,10 +3092,10 @@ double Variable::eval_tree(Tree *tree, int i) if (istep > ivalue5) { offset = ivalue5 - ivalue1; istep = ivalue1 + (offset/ivalue3)*ivalue3 + ivalue3; - if (istep > ivalue2) istep = MAXBIGINT; + if (istep > ivalue2) istep = MAXBIGINT_DOUBLE; } } - } else istep = MAXBIGINT; + } else istep = MAXBIGINT_DOUBLE; arg = istep; return arg; } @@ -3627,8 +3627,8 @@ int Variable::math_function(char *word, char *contents, Tree **tree, Tree **tree else if (update->ntimestep < ivalue2) { bigint offset = update->ntimestep - ivalue1; value = ivalue1 + (offset/ivalue3)*ivalue3 + ivalue3; - if (value > ivalue2) value = (double) MAXBIGINT; - } else value = (double) MAXBIGINT; + if (value > ivalue2) value = (double) MAXBIGINT_DOUBLE; + } else value = (double) MAXBIGINT_DOUBLE; argstack[nargstack++] = value; } @@ -3662,10 +3662,10 @@ int Variable::math_function(char *word, char *contents, Tree **tree, Tree **tree if (istep > ivalue5) { offset = ivalue5 - ivalue1; istep = ivalue1 + (offset/ivalue3)*ivalue3 + ivalue3; - if (istep > ivalue2) istep = MAXBIGINT; + if (istep > ivalue2) istep = MAXBIGINT_DOUBLE; } } - } else istep = MAXBIGINT; + } else istep = MAXBIGINT_DOUBLE; double value = istep; argstack[nargstack++] = value; } From a0760d0ca62998680ed48454613cadabf8354452 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Feb 2023 19:01:14 -0500 Subject: [PATCH 183/445] improve error message --- src/output.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/output.cpp b/src/output.cpp index 497957f46b..a6e81d8fca 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -498,10 +498,10 @@ void Output::calculate_next_dump(int which, int idump, bigint ntimestep) next_dump[idump] += every_dump[idump]; } else { - next_dump[idump] = static_cast - (input->variable->compute_equal(ivar_dump[idump])); + next_dump[idump] = static_cast(input->variable->compute_equal(ivar_dump[idump])); if (next_dump[idump] <= ntimestep) - error->all(FLERR,"Dump every variable returned a bad timestep"); + error->all(FLERR,"Dump {} every variable {} returned a bad timestep: {}", + dump[idump]->id, var_dump[idump], next_dump[idump]); } // dump mode is by simulation time @@ -511,8 +511,7 @@ void Output::calculate_next_dump(int which, int idump, bigint ntimestep) bigint nextdump; double nexttime; - double tcurrent = update->atime + - (ntimestep - update->atimestep) * update->dt; + double tcurrent = update->atime + (ntimestep - update->atimestep) * update->dt; if (every_time_dump[idump] > 0.0) { From 9c7ba5a3292f00297894710a7fecd8c5e933934f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 13 Feb 2023 10:33:24 -0500 Subject: [PATCH 184/445] remove debug printf() --- src/KOKKOS/pair_mliap_kokkos.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/KOKKOS/pair_mliap_kokkos.cpp b/src/KOKKOS/pair_mliap_kokkos.cpp index 2178e32b85..d90bef2e2f 100644 --- a/src/KOKKOS/pair_mliap_kokkos.cpp +++ b/src/KOKKOS/pair_mliap_kokkos.cpp @@ -185,7 +185,6 @@ void PairMLIAPKokkos::settings(int narg, char ** arg) new_args.push_back(arg[iarg++]); } else if (strcmp(arg[iarg], "unified") == 0) { #ifdef MLIAP_PYTHON - printf("IN SETUP UNIFIED\n"); if (model != nullptr) error->all(FLERR,"Illegal multiple pair_style mliap model definitions"); if (descriptor != nullptr) error->all(FLERR,"Illegal multiple pair_style mliap descriptor definitions"); if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "pair_style mliap unified", error); From 115c09ce23117d9851c078bb36e89d326d29ee3b Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 14 Feb 2023 09:37:12 +0200 Subject: [PATCH 185/445] Include method declaration in bond_class2.h --- src/CLASS2/bond_class2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CLASS2/bond_class2.h b/src/CLASS2/bond_class2.h index 894a60f684..823e622a49 100644 --- a/src/CLASS2/bond_class2.h +++ b/src/CLASS2/bond_class2.h @@ -35,6 +35,7 @@ class BondClass2 : public Bond { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, double, int, int, double &) override; + void born_matrix(int, double, int, int, double &, double &) override; void *extract(const char *, int &) override; protected: From 864488adbb78edc96503ee08bb1369696e0a26b4 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 14 Feb 2023 09:39:39 +0200 Subject: [PATCH 186/445] Implement analytical expression for born_matrix in bond_class2.cpp --- src/CLASS2/bond_class2.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/CLASS2/bond_class2.cpp b/src/CLASS2/bond_class2.cpp index e49607f6ee..8c5d8159bf 100644 --- a/src/CLASS2/bond_class2.cpp +++ b/src/CLASS2/bond_class2.cpp @@ -32,7 +32,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -BondClass2::BondClass2(LAMMPS *lmp) : Bond(lmp) {} +BondClass2::BondClass2(LAMMPS *lmp) : Bond(lmp) +{ + born_matrix_enable = 1; +} /* ---------------------------------------------------------------------- */ @@ -225,6 +228,17 @@ double BondClass2::single(int type, double rsq, int /*i*/, int /*j*/, double &ff /* ---------------------------------------------------------------------- */ +void BondClass2::born_matrix(int type, double rsq, int /*i*/, int /*j*/, double &du, double &du2) +{ + double r = sqrt(rsq); + double dr = r - r0[type]; + du = 0.0; + du2 = 2*k2[type] + 6*k3[type]*dr + 12*k4[type]*dr*dr; + if (r > 0.0) du = 2*k2[type]*dr + 3*k3[type]*dr*dr + 4*k4[type]*dr*dr*dr; +} + +/* ---------------------------------------------------------------------- */ + void *BondClass2::extract(const char *str, int &dim) { dim = 1; From 7c951d60da10e8dbe4da502a7562f78b3c770a4f Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 14 Feb 2023 10:17:27 +0200 Subject: [PATCH 187/445] Include method declaration in bond_gromos.h --- src/MOLECULE/bond_gromos.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/bond_gromos.h b/src/MOLECULE/bond_gromos.h index be6a33257c..13aa240245 100644 --- a/src/MOLECULE/bond_gromos.h +++ b/src/MOLECULE/bond_gromos.h @@ -35,6 +35,7 @@ class BondGromos : public Bond { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, double, int, int, double &) override; + void born_matrix(int, double, int, int, double &, double &) override; void *extract(const char *, int &) override; protected: From 553a98036c03af5f6404b4586f3a736a0a83b870 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 14 Feb 2023 10:19:49 +0200 Subject: [PATCH 188/445] Implement analytical expression for born_matrix in bond_gromos.cpp --- src/MOLECULE/bond_gromos.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/MOLECULE/bond_gromos.cpp b/src/MOLECULE/bond_gromos.cpp index 9a7b6d4d6e..badb808007 100644 --- a/src/MOLECULE/bond_gromos.cpp +++ b/src/MOLECULE/bond_gromos.cpp @@ -30,7 +30,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -BondGromos::BondGromos(LAMMPS *_lmp) : Bond(_lmp) {} +BondGromos::BondGromos(LAMMPS *_lmp) : Bond(_lmp) +{ + born_matrix_enable = 1; +} /* ---------------------------------------------------------------------- */ @@ -191,6 +194,16 @@ double BondGromos::single(int type, double rsq, int /*i*/, int /*j*/, double &ff return k[type] * dr * dr; } +/* ---------------------------------------------------------------------- */ + +void BondGromos::born_matrix(int type, double rsq, int /*i*/, int /*j*/, double &du, double &du2) +{ + double r = sqrt(rsq); + du = 0.0; + du2 = 4 * k[type] * (3 * rsq - r0[type] * r0[type]); + if (r > 0.0) du = 4 * k[type] * r * (rsq - r0[type] * r0[type]); +} + /* ---------------------------------------------------------------------- Return ptr to internal members upon request. ------------------------------------------------------------------------ */ From d13634cd6b1c9e38aa331aacc9da36c465f506f1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 14 Feb 2023 15:37:59 -0500 Subject: [PATCH 189/445] move definition of MAXBIGINT_DOUBLE to variable.cpp --- src/lmptype.h | 5 ----- src/variable.cpp | 9 ++++++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lmptype.h b/src/lmptype.h index a5aa08e390..bf56d07d77 100644 --- a/src/lmptype.h +++ b/src/lmptype.h @@ -95,8 +95,6 @@ typedef int64_t bigint; #define MAXSMALLINT INT_MAX #define MAXTAGINT INT_MAX #define MAXBIGINT INT64_MAX -// INT64_MAX cannot be represented with a double. reduce to avoid overflow when casting back. -#define MAXBIGINT_DOUBLE (INT64_MAX-512) #define MPI_LMP_TAGINT MPI_INT #define MPI_LMP_IMAGEINT MPI_INT @@ -134,8 +132,6 @@ typedef int64_t bigint; #define MAXSMALLINT INT_MAX #define MAXTAGINT INT64_MAX #define MAXBIGINT INT64_MAX -// INT64_MAX cannot be represented with a double. reduce to avoid overflow when casting back. -#define MAXBIGINT_DOUBLE (INT64_MAX-512) #define MPI_LMP_TAGINT MPI_LL #define MPI_LMP_IMAGEINT MPI_LL @@ -172,7 +168,6 @@ typedef int bigint; #define MAXSMALLINT INT_MAX #define MAXTAGINT INT_MAX #define MAXBIGINT INT_MAX -#define MAXBIGINT_DOUBLE INT_MAX #define MPI_LMP_TAGINT MPI_INT #define MPI_LMP_IMAGEINT MPI_INT diff --git a/src/variable.cpp b/src/variable.cpp index d26c0185db..2ac9bd0364 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -73,7 +73,14 @@ enum{DONE,ADD,SUBTRACT,MULTIPLY,DIVIDE,CARAT,MODULO,UNARY, enum{SUM,XMIN,XMAX,AVE,TRAP,SLOPE}; -#define BIG 1.0e20 +static constexpr double BIG = 1.0e20; + +// INT64_MAX cannot be represented with a double. reduce to avoid overflow when casting back. +#if defined(LAMMPS_SMALLBIG) || defined(LAMMPS_BIGBIG) +static constexpr double MAXBIGINT_DOUBLE = (double) (MAXBIGINT-512); +#else +static constexpr double MAXBIGINT_DOUBLE = (double) MAXBIGINT; +#endif // constants for variable expressions. customize by adding new items. // if needed (cf. 'version') initialize in Variable class constructor. From 4a5d7c671c1ad9fee6ff8f5b9f5cf1441c6f2f82 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Tue, 14 Feb 2023 15:02:12 -0700 Subject: [PATCH 190/445] Switching from new atom style to property/atom --- src/.gitignore | 6 +- src/GRANULAR/atom_vec_sphere_temp.cpp | 173 ------------------ src/GRANULAR/atom_vec_sphere_temp.h | 52 ------ ...flow_sphere_temp.cpp => fix_heat_flow.cpp} | 113 +++++++++++- ...eat_flow_sphere_temp.h => fix_heat_flow.h} | 18 +- src/fix_property_atom.cpp | 111 ++++++++++- src/fix_property_atom.h | 1 + 7 files changed, 226 insertions(+), 248 deletions(-) delete mode 100644 src/GRANULAR/atom_vec_sphere_temp.cpp delete mode 100644 src/GRANULAR/atom_vec_sphere_temp.h rename src/GRANULAR/{fix_heat_flow_sphere_temp.cpp => fix_heat_flow.cpp} (58%) rename src/GRANULAR/{fix_heat_flow_sphere_temp.h => fix_heat_flow.h} (69%) diff --git a/src/.gitignore b/src/.gitignore index fe31736776..bead2e87e5 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -464,8 +464,6 @@ /atom_vec_oxdna.h /atom_vec_peri.cpp /atom_vec_peri.h -/atom_vec_sphere_temp.cpp -/atom_vec_sphere_temp.h /atom_vec_template.cpp /atom_vec_template.h /body_nparticle.cpp @@ -1557,8 +1555,8 @@ /fix_srp.h /fix_srp_react.cpp /fix_srp_react.h -/fix_heat_flow_sphere_temp.cpp -/fix_heat_flow_sphere_temp.h +/fix_heat_flow.cpp +/fix_heat_flow.h /fix_tfmc.cpp /fix_tfmc.h /fix_ttm.cpp diff --git a/src/GRANULAR/atom_vec_sphere_temp.cpp b/src/GRANULAR/atom_vec_sphere_temp.cpp deleted file mode 100644 index 283a55e2da..0000000000 --- a/src/GRANULAR/atom_vec_sphere_temp.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - LAMMPS development team: developers@lammps.org - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#include "atom_vec_sphere_temp.h" - -#include "atom.h" -#include "error.h" -#include "fix.h" -#include "fix_adapt.h" -#include "math_const.h" -#include "modify.h" - -using namespace LAMMPS_NS; -using namespace MathConst; - -/* ---------------------------------------------------------------------- */ - -AtomVecSphereTemp::AtomVecSphereTemp(LAMMPS *lmp) : AtomVec(lmp) -{ - mass_type = PER_ATOM; - forceclearflag = 1; - molecular = Atom::ATOMIC; - - atom->sphere_flag = 1; - atom->radius_flag = atom->rmass_flag = atom->omega_flag = atom->torque_flag = 1; - atom->temperature_flag = atom->heatflow_flag = 1; - - // strings with peratom variables to include in each AtomVec method - // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in a string does not matter - // except: fields_data_atom & fields_data_vel must match data file - - fields_grow = {"radius", "rmass", "omega", "torque", "temperature", "heatflow"}; - fields_copy = {"radius", "rmass", "omega", "temperature"}; - fields_comm_vel = {"omega", "temperature"}; - fields_reverse = {"torque", "heatflow"}; - fields_border = {"radius", "rmass", "temperature"}; - fields_border_vel = {"radius", "rmass", "omega", "temperature"}; - fields_exchange = {"radius", "rmass", "omega", "temperature"}; - fields_restart = {"radius", "rmass", "omega", "temperature"}; - fields_create = {"radius", "rmass", "omega", "temperature"}; - fields_data_atom = {"id", "type", "radius", "rmass", "x", "temperature"}; - fields_data_vel = {"id", "v", "omega"}; -} - -/* ---------------------------------------------------------------------- - process sub-style args - optional arg = 0/1 for static/dynamic particle radii -------------------------------------------------------------------------- */ - -void AtomVecSphereTemp::process_args(int narg, char **arg) -{ - if (narg != 0 && narg != 1) error->all(FLERR, "Illegal atom_style sphere command"); - - radvary = 0; - if (narg == 1) { - radvary = utils::numeric(FLERR, arg[0], true, lmp); - if (radvary < 0 || radvary > 1) error->all(FLERR, "Illegal atom_style sphere command"); - } - - // dynamic particle radius and mass must be communicated every step - - if (radvary) { - fields_comm = {"radius", "rmass"}; - fields_comm_vel = {"radius", "rmass", "omega"}; - } - - // delay setting up of fields until now - - setup_fields(); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSphereTemp::init() -{ - AtomVec::init(); - - // check if optional radvary setting should have been set to 1 - - for (int i = 0; i < modify->nfix; i++) - if (strcmp(modify->fix[i]->style, "adapt") == 0) { - auto fix = dynamic_cast(modify->fix[i]); - if (fix->diamflag && radvary == 0) - error->all(FLERR, "Fix adapt changes particle radii but atom_style sphere is not dynamic"); - } -} - -/* ---------------------------------------------------------------------- - set local copies of all grow ptrs used by this class, except defaults - needed in replicate when 2 atom classes exist and it calls pack_restart() -------------------------------------------------------------------------- */ - -void AtomVecSphereTemp::grow_pointers() -{ - radius = atom->radius; - rmass = atom->rmass; - omega = atom->omega; - temperature = atom->temperature; - heatflow = atom->heatflow; -} - -/* ---------------------------------------------------------------------- - clear extra forces starting at atom N - nbytes = # of bytes to clear for a per-atom vector -------------------------------------------------------------------------- */ - -void AtomVecSphereTemp::force_clear(int n, size_t nbytes) -{ - memset(&heatflow[n], 0, nbytes); -} - -/* ---------------------------------------------------------------------- - initialize non-zero atom quantities -------------------------------------------------------------------------- */ - -void AtomVecSphereTemp::create_atom_post(int ilocal) -{ - radius[ilocal] = 0.5; - rmass[ilocal] = 4.0 * MY_PI / 3.0 * 0.5 * 0.5 * 0.5; -} - -/* ---------------------------------------------------------------------- - modify what AtomVec::data_atom() just unpacked - or initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecSphereTemp::data_atom_post(int ilocal) -{ - radius_one = 0.5 * atom->radius[ilocal]; - radius[ilocal] = radius_one; - if (radius_one > 0.0) rmass[ilocal] *= 4.0 * MY_PI / 3.0 * radius_one * radius_one * radius_one; - - if (rmass[ilocal] <= 0.0) error->one(FLERR, "Invalid density in Atoms section of data file"); - - omega[ilocal][0] = 0.0; - omega[ilocal][1] = 0.0; - omega[ilocal][2] = 0.0; -} - -/* ---------------------------------------------------------------------- - modify values for AtomVec::pack_data() to pack -------------------------------------------------------------------------- */ - -void AtomVecSphereTemp::pack_data_pre(int ilocal) -{ - radius_one = radius[ilocal]; - rmass_one = rmass[ilocal]; - - radius[ilocal] *= 2.0; - if (radius_one != 0.0) - rmass[ilocal] = rmass_one / (4.0 * MY_PI / 3.0 * radius_one * radius_one * radius_one); -} - -/* ---------------------------------------------------------------------- - unmodify values packed by AtomVec::pack_data() -------------------------------------------------------------------------- */ - -void AtomVecSphereTemp::pack_data_post(int ilocal) -{ - radius[ilocal] = radius_one; - rmass[ilocal] = rmass_one; -} diff --git a/src/GRANULAR/atom_vec_sphere_temp.h b/src/GRANULAR/atom_vec_sphere_temp.h deleted file mode 100644 index de6d5266a5..0000000000 --- a/src/GRANULAR/atom_vec_sphere_temp.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - LAMMPS development team: developers@lammps.org - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -#ifdef ATOM_CLASS -// clang-format off -AtomStyle(sphere/temp,AtomVecSphereTemp); -// clang-format on -#else - -#ifndef LMP_ATOM_VEC_SPHERE_TEMP_H -#define LMP_ATOM_VEC_SPHERE_TEMP_H - -#include "atom_vec.h" - -namespace LAMMPS_NS { - -class AtomVecSphereTemp : public AtomVec { - public: - AtomVecSphereTemp(class LAMMPS *); - void process_args(int, char **) override; - void init() override; - - void grow_pointers() override; - void force_clear(int, size_t) override; - void create_atom_post(int) override; - void data_atom_post(int) override; - void pack_data_pre(int) override; - void pack_data_post(int) override; - - private: - double *radius, *rmass; - double **omega; - double *temperature, *heatflow; - - int radvary; - double radius_one, rmass_one; -}; - -} // namespace LAMMPS_NS - -#endif -#endif diff --git a/src/GRANULAR/fix_heat_flow_sphere_temp.cpp b/src/GRANULAR/fix_heat_flow.cpp similarity index 58% rename from src/GRANULAR/fix_heat_flow_sphere_temp.cpp rename to src/GRANULAR/fix_heat_flow.cpp index fe7fc49324..d62f914577 100644 --- a/src/GRANULAR/fix_heat_flow_sphere_temp.cpp +++ b/src/GRANULAR/fix_heat_flow.cpp @@ -12,12 +12,14 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "fix_heat_flow_sphere_temp.h" +#include "fix_heat_flow.h" #include "atom.h" +#include "comm.h" #include "error.h" #include "force.h" #include "memory.h" +#include "modify.h" #include "respa.h" #include "update.h" @@ -28,12 +30,14 @@ enum {NONE, CONSTANT, TYPE}; /* ---------------------------------------------------------------------- */ -FixHeatFlowSphereTemp::FixHeatFlowSphereTemp(LAMMPS *lmp, int narg, char **arg) : +FixHeatFlow::FixHeatFlow(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { if (narg < 4) error->all(FLERR,"Illegal fix command"); cp_style = NONE; + comm_forward = 1; + comm_reverse = 1; int ntypes = atom->ntypes; if (strcmp(arg[3],"constant") == 0) { @@ -60,7 +64,7 @@ FixHeatFlowSphereTemp::FixHeatFlowSphereTemp(LAMMPS *lmp, int narg, char **arg) /* ---------------------------------------------------------------------- */ -int FixHeatFlowSphereTemp::setmask() +int FixHeatFlow::setmask() { int mask = 0; mask |= FINAL_INTEGRATE; @@ -70,7 +74,7 @@ int FixHeatFlowSphereTemp::setmask() /* ---------------------------------------------------------------------- */ -void FixHeatFlowSphereTemp::init() +void FixHeatFlow::init() { dt = update->dt; @@ -82,7 +86,26 @@ void FixHeatFlowSphereTemp::init() /* ---------------------------------------------------------------------- */ -void FixHeatFlowSphereTemp::final_integrate() +void FixHeatFlow::setup(int /*vflag*/) +{ + // Identify whether this is the first/last instance of fix heat/flow + first_flag = 0; + last_flag = 0; + + int i = 0; + auto fixlist = modify->get_fix_by_style("heat/flow"); + for (const auto &ifix : fixlist) { + if (strcmp(ifix->id, id) == 0) break; + i++; + } + + if (i == 0) first_flag = 1; + if ((i + 1) == fixlist.size()) last_flag = 1; +} + +/* ---------------------------------------------------------------------- */ + +void FixHeatFlow::final_integrate() { // update temperature of atoms in group @@ -95,6 +118,10 @@ void FixHeatFlowSphereTemp::final_integrate() int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; + // add ghost contributions to heatflow if first instance of fix + if (first_flag) + comm->reverse_comm(this); + if (rmass) { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -106,11 +133,18 @@ void FixHeatFlowSphereTemp::final_integrate() temperature[i] += dt * heatflow[i] / (calc_cp(i) * mass[type[i]]); } } + + // send updated temperatures to ghosts if last instance of fix + // then clear heatflow for next force calculation + if (last_flag) { + comm->forward_comm(this); + for (int i = 0; i < atom->nmax; i++) heatflow[i] = 0.0; + } } /* ---------------------------------------------------------------------- */ -void FixHeatFlowSphereTemp::final_integrate_respa(int ilevel, int /*iloop*/) +void FixHeatFlow::final_integrate_respa(int ilevel, int /*iloop*/) { dt = update->dt; final_integrate(); @@ -118,14 +152,14 @@ void FixHeatFlowSphereTemp::final_integrate_respa(int ilevel, int /*iloop*/) /* ---------------------------------------------------------------------- */ -void FixHeatFlowSphereTemp::reset_dt() +void FixHeatFlow::reset_dt() { dt = update->dt; } /* ---------------------------------------------------------------------- */ -double FixHeatFlowSphereTemp::calc_cp(int i) +double FixHeatFlow::calc_cp(int i) { if (cp_style == TYPE) { return cp_type[atom->type[i]]; @@ -133,3 +167,66 @@ double FixHeatFlowSphereTemp::calc_cp(int i) return cp; } } + +/* ---------------------------------------------------------------------- */ + +int FixHeatFlow::pack_forward_comm(int n, int *list, double *buf, int /*pbc_flag*/, int * /*pbc*/) +{ + int i, j, m; + + double *temperature = atom->temperature; + + m = 0; + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = temperature[j]; + } + + return m; +} + +/* ---------------------------------------------------------------------- */ + +void FixHeatFlow::unpack_forward_comm(int n, int first, double *buf) +{ + int i, m, last; + + m = 0; + last = first + n; + + double *temperature = atom->temperature; + + for (i = first; i < last; i++) temperature[i] = buf[m++]; +} + +/* ---------------------------------------------------------------------- */ + +int FixHeatFlow::pack_reverse_comm(int n, int first, double *buf) +{ + int i,k,last; + + int m = 0; + last = first + n; + double *heatflow = atom->heatflow; + + for (i = first; i < last; i++) { + buf[m++] = heatflow[i]; + } + + return m; +} + +/* ---------------------------------------------------------------------- */ + +void FixHeatFlow::unpack_reverse_comm(int n, int *list, double *buf) +{ + int i,j,k,kk,ncount; + + int m = 0; + double *heatflow = atom->heatflow; + + for (i = 0; i < n; i++) { + j = list[i]; + heatflow[j] += buf[m++]; + } +} diff --git a/src/GRANULAR/fix_heat_flow_sphere_temp.h b/src/GRANULAR/fix_heat_flow.h similarity index 69% rename from src/GRANULAR/fix_heat_flow_sphere_temp.h rename to src/GRANULAR/fix_heat_flow.h index 6bc2d50373..2d311d0104 100644 --- a/src/GRANULAR/fix_heat_flow_sphere_temp.h +++ b/src/GRANULAR/fix_heat_flow.h @@ -13,33 +13,37 @@ #ifdef FIX_CLASS // clang-format off -FixStyle(heat/flow/sphere/temp,FixHeatFlowSphereTemp); +FixStyle(heat/flow,FixHeatFlow); // clang-format on #else -#ifndef LMP_FIX_HEAT_FLOW_SPHERE_TEMP_H -#define LMP_FIX_HEAT_FLOW_SPHERE_TEMP_H +#ifndef LMP_FIX_HEAT_FLOW_H +#define LMP_FIX_HEAT_FLOW_H #include "fix.h" namespace LAMMPS_NS { -class FixHeatFlowSphereTemp : public Fix { +class FixHeatFlow : public Fix { public: - FixHeatFlowSphereTemp(class LAMMPS *, int, char **); + FixHeatFlow(class LAMMPS *, int, char **); int setmask() override; void init() override; + void setup(int) override; void final_integrate() override; void final_integrate_respa(int, int) override; + int pack_forward_comm(int, int *, double *, int, int *) override; + void unpack_forward_comm(int, int, double *) override; + int pack_reverse_comm(int, int, double *) override; + void unpack_reverse_comm(int, int *, double *) override; void reset_dt() override; protected: double dt; double cp, *cp_type; int cp_style; - - int mass_require; + int first_flag, last_flag; double calc_cp(int); }; diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 95e25c59b2..4b43feca74 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -25,7 +25,7 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum { MOLECULE, CHARGE, RMASS, IVEC, DVEC, IARRAY, DARRAY }; +enum { MOLECULE, CHARGE, RMASS, TEMPERATURE, HEATFLOW, IVEC, DVEC, IARRAY, DARRAY }; /* ---------------------------------------------------------------------- */ @@ -46,6 +46,8 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : molecule_flag = 0; q_flag = 0; rmass_flag = 0; + temperature_flag = 0; + heatflow_flag = 0; nvalue = 0; values_peratom = 0; @@ -81,6 +83,26 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : values_peratom++; nvalue++; iarg++; + } else if (strcmp(arg[iarg], "temperature") == 0) { + if (atom->temperature_flag) + error->all(FLERR, "Fix property/atom temperature when atom_style already has temperature attribute"); + if (temperature_flag) error->all(FLERR, "Fix property/atom cannot specify temperature twice"); + styles[nvalue] = TEMPERATURE; + cols[nvalue] = 0; + atom->temperature_flag = temperature_flag = 1; + values_peratom++; + nvalue++; + iarg++; + } else if (strcmp(arg[iarg], "heatflow") == 0) { + if (atom->heatflow_flag) + error->all(FLERR, "Fix property/atom heatflow when atom_style already has heatflow attribute"); + if (heatflow_flag) error->all(FLERR, "Fix property/atom cannot specify heatflow twice"); + styles[nvalue] = HEATFLOW; + cols[nvalue] = 0; + atom->heatflow_flag = heatflow_flag = 1; + values_peratom++; + nvalue++; + iarg++; // custom atom vector @@ -163,14 +185,15 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) : if (border) comm_border = values_peratom; - // warn if mol or charge keyword used without ghost yes + // warn if mol, charge, rmass, temperature, or heatflow keyword used without ghost yes if (border == 0) { int flag = 0; for (int i = 0; i < nvalue; i++) - if (styles[i] == MOLECULE || styles[i] == CHARGE || styles[i] == RMASS) flag = 1; + if (styles[i] == MOLECULE || styles[i] == CHARGE || styles[i] == RMASS || + styles[i] == TEMPERATURE || styles[i] == HEATFLOW) flag = 1; if (flag && comm->me == 0) - error->warning(FLERR, "Fix property/atom mol or charge or rmass w/out ghost communication"); + error->warning(FLERR, "Fix property/atom mol, charge, rmass, temperature, or heatflow w/out ghost communication"); } // store current atom style @@ -213,6 +236,14 @@ FixPropertyAtom::~FixPropertyAtom() atom->rmass_flag = 0; memory->destroy(atom->rmass); atom->rmass = nullptr; + } else if (styles[nv] == TEMPERATURE) { + atom->temperature_flag = 0; + memory->destroy(atom->temperature); + atom->temperature = nullptr; + } else if (styles[nv] == HEATFLOW) { + atom->heatflow_flag = 0; + memory->destroy(atom->heatflow); + atom->heatflow = nullptr; } else if (styles[nv] == IVEC) { atom->remove_custom(index[nv], 0, cols[nv]); } else if (styles[nv] == DVEC) { @@ -298,6 +329,10 @@ void FixPropertyAtom::read_data_section(char *keyword, int n, char *buf, tagint atom->q[m] = values.next_double(); } else if (styles[j] == RMASS) { atom->rmass[m] = values.next_double(); + } else if (styles[j] == TEMPERATURE) { + atom->temperature[m] = values.next_double(); + } else if (styles[j] == HEATFLOW) { + atom->heatflow[m] = values.next_double(); } else if (styles[j] == IVEC) { atom->ivector[index[j]][m] = values.next_int(); } else if (styles[j] == DVEC) { @@ -377,6 +412,14 @@ void FixPropertyAtom::write_data_section_pack(int /*mth*/, double **buf) double *rmass = atom->rmass; for (i = 0; i < nlocal; i++) buf[i][icol] = rmass[i]; icol++; + } else if (styles[nv] == TEMPERATURE) { + double *temperature = atom->temperature; + for (i = 0; i < nlocal; i++) buf[i][icol] = temperature[i]; + icol++; + } else if (styles[nv] == HEATFLOW) { + double *heatflow = atom->heatflow; + for (i = 0; i < nlocal; i++) buf[i][icol] = heatflow[i]; + icol++; } else if (styles[nv] == IVEC) { int *ivec = atom->ivector[index[nv]]; for (i = 0; i < nlocal; i++) buf[i][icol] = ubuf(ivec[i]).d; @@ -424,6 +467,10 @@ void FixPropertyAtom::write_data_section_keyword(int /*mth*/, FILE *fp) fputs(" q", fp); else if (styles[i] == RMASS) fputs(" rmass", fp); + else if (styles[i] == TEMPERATURE) + fputs(" temperature", fp); + else if (styles[i] == HEATFLOW) + fputs(" heatflow", fp); else if (styles[i] == IVEC) fprintf(fp, " i_%s", atom->ivname[index[i]]); else if (styles[i] == DVEC) @@ -459,6 +506,10 @@ void FixPropertyAtom::write_data_section(int /*mth*/, FILE *fp, int n, double ** line += fmt::format(" {}", buf[i][icol++]); else if (styles[nv] == RMASS) line += fmt::format(" {}", buf[i][icol++]); + else if (styles[nv] == TEMPERATURE) + line += fmt::format(" {}", buf[i][icol++]); + else if (styles[nv] == HEATFLOW) + line += fmt::format(" {}", buf[i][icol++]); else if (styles[nv] == IVEC) line += fmt::format(" {}", (int) ubuf(buf[i][icol++]).i); else if (styles[nv] == DVEC) @@ -491,6 +542,10 @@ double FixPropertyAtom::memory_usage() bytes = atom->nmax * sizeof(double); else if (styles[m] == RMASS) bytes = atom->nmax * sizeof(double); + else if (styles[m] == TEMPERATURE) + bytes = atom->nmax * sizeof(double); + else if (styles[m] == HEATFLOW) + bytes = atom->nmax * sizeof(double); else if (styles[m] == IVEC) bytes = atom->nmax * sizeof(int); else if (styles[m] == DVEC) @@ -525,6 +580,14 @@ void FixPropertyAtom::grow_arrays(int nmax) memory->grow(atom->rmass, nmax, "atom:rmass"); size_t nbytes = (nmax - nmax_old) * sizeof(double); memset(&atom->rmass[nmax_old], 0, nbytes); + } else if (styles[nv] == TEMPERATURE) { + memory->grow(atom->temperature, nmax, "atom:temperature"); + size_t nbytes = (nmax - nmax_old) * sizeof(double); + memset(&atom->temperature[nmax_old], 0, nbytes); + } else if (styles[nv] == HEATFLOW) { + memory->grow(atom->heatflow, nmax, "atom:heatflow"); + size_t nbytes = (nmax - nmax_old) * sizeof(double); + memset(&atom->heatflow[nmax_old], 0, nbytes); } else if (styles[nv] == IVEC) { memory->grow(atom->ivector[index[nv]], nmax, "atom:ivector"); size_t nbytes = (nmax - nmax_old) * sizeof(int); @@ -562,6 +625,10 @@ void FixPropertyAtom::copy_arrays(int i, int j, int /*delflag*/) atom->q[j] = atom->q[i]; else if (styles[nv] == RMASS) atom->rmass[j] = atom->rmass[i]; + else if (styles[nv] == TEMPERATURE) + atom->temperature[j] = atom->temperature[i]; + else if (styles[nv] == HEATFLOW) + atom->heatflow[j] = atom->heatflow[i]; else if (styles[nv] == IVEC) atom->ivector[index[nv]][j] = atom->ivector[index[nv]][i]; else if (styles[nv] == DVEC) @@ -604,6 +671,18 @@ int FixPropertyAtom::pack_border(int n, int *list, double *buf) j = list[i]; buf[m++] = rmass[j]; } + } else if (styles[nv] == TEMPERATURE) { + double *temperature = atom->temperature; + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = temperature[j]; + } + } else if (styles[nv] == HEATFLOW) { + double *heatflow = atom->heatflow; + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = heatflow[j]; + } } else if (styles[nv] == IVEC) { int *ivector = atom->ivector[index[nv]]; for (i = 0; i < n; i++) { @@ -658,6 +737,14 @@ int FixPropertyAtom::unpack_border(int n, int first, double *buf) double *rmass = atom->rmass; last = first + n; for (i = first; i < last; i++) rmass[i] = buf[m++]; + } else if (styles[nv] == TEMPERATURE) { + double *temperature = atom->temperature; + last = first + n; + for (i = first; i < last; i++) temperature[i] = buf[m++]; + } else if (styles[nv] == HEATFLOW) { + double *heatflow = atom->heatflow; + last = first + n; + for (i = first; i < last; i++) heatflow[i] = buf[m++]; } else if (styles[nv] == IVEC) { int *ivector = atom->ivector[index[nv]]; last = first + n; @@ -700,6 +787,10 @@ int FixPropertyAtom::pack_exchange(int i, double *buf) buf[m++] = atom->q[i]; else if (styles[nv] == RMASS) buf[m++] = atom->rmass[i]; + else if (styles[nv] == TEMPERATURE) + buf[m++] = atom->temperature[i]; + else if (styles[nv] == HEATFLOW) + buf[m++] = atom->heatflow[i]; else if (styles[nv] == IVEC) buf[m++] = ubuf(atom->ivector[index[nv]][i]).d; else if (styles[nv] == DVEC) @@ -732,6 +823,10 @@ int FixPropertyAtom::unpack_exchange(int nlocal, double *buf) atom->q[nlocal] = buf[m++]; else if (styles[nv] == RMASS) atom->rmass[nlocal] = buf[m++]; + else if (styles[nv] == TEMPERATURE) + atom->temperature[nlocal] = buf[m++]; + else if (styles[nv] == HEATFLOW) + atom->heatflow[nlocal] = buf[m++]; else if (styles[nv] == IVEC) atom->ivector[index[nv]][nlocal] = (int) ubuf(buf[m++]).i; else if (styles[nv] == DVEC) @@ -768,6 +863,10 @@ int FixPropertyAtom::pack_restart(int i, double *buf) buf[m++] = atom->q[i]; else if (styles[nv] == RMASS) buf[m++] = atom->rmass[i]; + else if (styles[nv] == TEMPERATURE) + buf[m++] = atom->temperature[i]; + else if (styles[nv] == HEATFLOW) + buf[m++] = atom->heatflow[i]; else if (styles[nv] == IVEC) buf[m++] = ubuf(atom->ivector[index[nv]][i]).d; else if (styles[nv] == DVEC) @@ -807,6 +906,10 @@ void FixPropertyAtom::unpack_restart(int nlocal, int nth) atom->q[nlocal] = extra[nlocal][m++]; else if (styles[nv] == RMASS) atom->rmass[nlocal] = extra[nlocal][m++]; + else if (styles[nv] == TEMPERATURE) + atom->temperature[nlocal] = extra[nlocal][m++]; + else if (styles[nv] == HEATFLOW) + atom->heatflow[nlocal] = extra[nlocal][m++]; else if (styles[nv] == IVEC) atom->ivector[index[nv]][nlocal] = (int) ubuf(extra[nlocal][m++]).i; else if (styles[nv] == DVEC) diff --git a/src/fix_property_atom.h b/src/fix_property_atom.h index 18a4b61529..7d9f50b75e 100644 --- a/src/fix_property_atom.h +++ b/src/fix_property_atom.h @@ -54,6 +54,7 @@ class FixPropertyAtom : public Fix { protected: int nvalue, border; int molecule_flag, q_flag, rmass_flag; // flags for specific fields + int temperature_flag, heatflow_flag; int *styles; // style of each value, see enum int *index; // indices into atom custom data structs int *cols; // columns per value, for arrays From f775de18841fa02533e751eda520fab141eadb4f Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Wed, 15 Feb 2023 10:02:25 -0700 Subject: [PATCH 191/445] Fix Kokkos compile error with NVIDIA Hopper GPU --- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Half_Conversion.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Half_Conversion.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Half_Conversion.hpp index 8c40ebd60d..f25d7bd124 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Half_Conversion.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Half_Conversion.hpp @@ -290,7 +290,8 @@ KOKKOS_INLINE_FUNCTION // Go in this branch if CUDA version is >= 11.0.0 and less than 11.1.0 or if the // architecture is not Ampere #if CUDA_VERSION >= 11000 && \ - (CUDA_VERSION < 11010 || !defined(KOKKOS_ARCH_AMPERE)) + (CUDA_VERSION < 11010 || \ + !(defined(KOKKOS_ARCH_AMPERE) || defined(KOKKOS_ARCH_HOPPER))) KOKKOS_INLINE_FUNCTION bhalf_t cast_to_bhalf(bhalf_t val) { return val; } From 329dbd04852281640f8ec5b1e1251da83c40a490 Mon Sep 17 00:00:00 2001 From: jtclemm Date: Wed, 15 Feb 2023 11:00:19 -0700 Subject: [PATCH 192/445] Updating doc/examples, moving forward comm to pre_force --- doc/src/Commands_fix.rst | 2 +- doc/src/Howto_granular.rst | 7 ++-- doc/src/atom_style.rst | 14 ++++---- doc/src/fix.rst | 2 +- ...flow_sphere_temp.rst => fix_heat_flow.rst} | 16 ++++----- doc/src/fix_wall_gran.rst | 7 ++-- doc/src/fix_wall_gran_region.rst | 7 ++-- doc/src/pair_granular.rst | 6 ++-- doc/src/set.rst | 9 ++--- examples/granular/in.pour.heat | 13 +++---- examples/granular/log.15Sep22.pour.heat.g++.1 | 36 ++++++++++--------- examples/granular/log.15Sep22.pour.heat.g++.4 | 36 ++++++++++--------- src/GRANULAR/fix_heat_flow.cpp | 32 +++++++++++------ src/GRANULAR/fix_heat_flow.h | 4 ++- 14 files changed, 106 insertions(+), 85 deletions(-) rename doc/src/{fix_heat_flow_sphere_temp.rst => fix_heat_flow.rst} (80%) diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index 714485983d..1552861129 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -92,7 +92,7 @@ OPT. * :doc:`grem ` * :doc:`halt ` * :doc:`heat ` - * :doc:`heat/flow/sphere/temp ` + * :doc:`heat/flow ` * :doc:`hyper/global ` * :doc:`hyper/local ` * :doc:`imd ` diff --git a/doc/src/Howto_granular.rst b/doc/src/Howto_granular.rst index 6a2346746b..c22cab66bc 100644 --- a/doc/src/Howto_granular.rst +++ b/doc/src/Howto_granular.rst @@ -43,10 +43,11 @@ The fix style *freeze* zeroes both the force and torque of frozen atoms, and should be used for granular system instead of the fix style *setforce*\ . -To model heat conduction, one must use the atom style: -* :doc:`atom_style sphere/temp ` +To model heat conduction, one must add the temperature and heatflow +atom variables with: +* :doc:`fix property/atom ` a temperature integration fix -* :doc:`fix heat/flow/sphere/temp ` +* :doc:`fix heat/flow ` and a heat conduction option defined in both * :doc:`pair_style granular ` * :doc:`fix wall/gran ` diff --git a/doc/src/atom_style.rst b/doc/src/atom_style.rst index bd8843fd2c..2131cd12b2 100644 --- a/doc/src/atom_style.rst +++ b/doc/src/atom_style.rst @@ -123,8 +123,6 @@ quantities. +--------------+-----------------------------------------------------+--------------------------------------+ | *sphere* | diameter, mass, angular velocity | granular models | +--------------+-----------------------------------------------------+--------------------------------------+ -| *sphere/temp*| diameter, mass, angular velocity, temperature | thermal granular models | -+--------------+-----------------------------------------------------+--------------------------------------+ | *bpm/sphere* | diameter, mass, angular velocity, quaternion | granular bonded particle models (BPM)| +--------------+-----------------------------------------------------+--------------------------------------+ | *spin* | magnetic moment | system with magnetic particles | @@ -150,7 +148,7 @@ quantities. custom values. All of the above styles define point particles, except the *sphere*, -*sphere/temp*, *bpm/sphere*, *ellipsoid*, *electron*, *peri*, *wavepacket*, *line*, +*bpm/sphere*, *ellipsoid*, *electron*, *peri*, *wavepacket*, *line*, *tri*, and *body* styles, which define finite-size particles. See the :doc:`Howto spherical ` page for an overview of using finite-size particle models with LAMMPS. @@ -160,11 +158,11 @@ per-type basis, using the :doc:`mass ` command, The finite-size particle styles assign mass to individual particles on a per-particle basis. -For the *sphere*, *sphere/temp*, and *bpm/sphere* styles, the particles -are spheres and each stores a per-particle diameter and mass. If the -diameter > 0.0, the particle is a finite-size sphere. If the diameter -= 0.0, it is a point particle. Note that by use of the *disc* keyword -with the :doc:`fix nve/sphere `, :doc:`fix nvt/sphere +For the *sphere* and *bpm/sphere* styles, the particles are spheres +and each stores a per-particle diameter and mass. If the diameter > +0.0, the particle is a finite-size sphere. If the diameter = 0.0, it +is a point particle. Note that by use of the *disc* keyword with the +:doc:`fix nve/sphere `, :doc:`fix nvt/sphere `, :doc:`fix nph/sphere `, :doc:`fix npt/sphere ` commands for the *sphere* style, spheres can be effectively treated as 2d discs for a 2d simulation if diff --git a/doc/src/fix.rst b/doc/src/fix.rst index d524b06551..ed8349c953 100644 --- a/doc/src/fix.rst +++ b/doc/src/fix.rst @@ -244,7 +244,7 @@ accelerated styles exist. * :doc:`grem ` - implements the generalized replica exchange method * :doc:`halt ` - terminate a dynamics run or minimization * :doc:`heat ` - add/subtract momentum-conserving heat -* :doc:`heat/flow/sphere/temp ` - plain time integration of heat flow with per-atom temperature updates +* :doc:`heat/flow ` - plain time integration of heat flow with per-atom temperature updates * :doc:`hyper/global ` - global hyperdynamics * :doc:`hyper/local ` - local hyperdynamics * :doc:`imd ` - implements the "Interactive MD" (IMD) protocol diff --git a/doc/src/fix_heat_flow_sphere_temp.rst b/doc/src/fix_heat_flow.rst similarity index 80% rename from doc/src/fix_heat_flow_sphere_temp.rst rename to doc/src/fix_heat_flow.rst index c604b041ad..ee73d7d4f2 100644 --- a/doc/src/fix_heat_flow_sphere_temp.rst +++ b/doc/src/fix_heat_flow.rst @@ -1,6 +1,6 @@ -.. index:: fix heat/flow/sphere/temp +.. index:: fix heat/flow -fix heat/flow/sphere/temp command +fix heat/flow command ========================== Syntax @@ -8,10 +8,10 @@ Syntax .. parsed-literal:: - fix ID group-ID heat/flow/sphere/temp style values ... + fix ID group-ID heat/flow style values ... * ID, group-ID are documented in :doc:`fix ` command -* heat/flow/sphere/temp = style name of this fix command +* heat/flow = style name of this fix command * one style with corresponding value(s) needs to be listed .. parsed-literal:: @@ -29,8 +29,8 @@ Examples .. code-block:: LAMMPS - fix 1 all heat/flow/sphere/temp constant 1.0 - fix 1 all heat/flow/sphere/temp type 1.0 0.5 + fix 1 all heat/flow constant 1.0 + fix 1 all heat/flow type 1.0 0.5 Description """"""""""" @@ -57,12 +57,12 @@ Restrictions """""""""""" This fix requires that atoms store temperature and heat flow -as defined by the :doc:`atom_style sphere/temp ` command. +as defined by the :doc:`fix property/atom ` command. Related commands """""""""""""""" -:doc:`pair granular ` +:doc:`pair granular `, :doc:`fix property/atom ` Default """"""" diff --git a/doc/src/fix_wall_gran.rst b/doc/src/fix_wall_gran.rst index 0cc4798dd2..0006e1750b 100644 --- a/doc/src/fix_wall_gran.rst +++ b/doc/src/fix_wall_gran.rst @@ -185,9 +185,10 @@ The following value can either be a numeric value or an equal-style specified as v_name, where name is the variable name. In this case, the variable will be evaluated each timestep, and its value used to determine the temperature. This option must be used in conjunction with a heat -conduction model defined in :doc:`pair_style granular ` -and a compatible atom style which stores temperature and a heat flow -as defined by the :doc:`atom_style sphere/temp ` command. +conduction model defined in :doc:`pair_style granular `, +:doc:`fix property/atom ` to store temperature and a +heat flow, and :doc:`fix heat/flow ` to integrate heat +flow. Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/fix_wall_gran_region.rst b/doc/src/fix_wall_gran_region.rst index 73a2e9c973..94edebbcf1 100644 --- a/doc/src/fix_wall_gran_region.rst +++ b/doc/src/fix_wall_gran_region.rst @@ -208,9 +208,10 @@ The following value can either be a numeric value or an equal-style specified as v_name, where name is the variable name. In this case, the variable will be evaluated each timestep, and its value used to determine the temperature. This option must be used in conjunction with a heat -conduction model defined in :doc:`pair_style granular ` -and a compatible atom style which stores temperature and a heat flow -as defined by the :doc:`atom_style sphere/temp ` command. +conduction model defined in :doc:`pair_style granular `, +:doc:`fix property/atom ` to store temperature and a +heat flow, and :doc:`fix heat/flow ` to integrate heat +flow. Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index 491061b5fb..0911a3486a 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -659,9 +659,9 @@ where :math:`\Delta T` is the difference in the two particles' temperature, :math:`a` is the area of the contact and depends on the normal force model. Note that the option *none* must either be used in all or none of of the -*pair_coeff* calls. See -:doc:`fix heat/flow/sphere/temp ` for more -information on this option. +*pair_coeff* calls. See :doc:`fix heat/flow ` and +:doc:`fix property/atom ` for more information on this +option. ---------- diff --git a/doc/src/set.rst b/doc/src/set.rst index 5563d3199c..6add1de9f3 100644 --- a/doc/src/set.rst +++ b/doc/src/set.rst @@ -431,10 +431,11 @@ assumed to be in mass/distance\^2 units). If none of these cases are valid, then the mass is set to the density value directly (the input density is assumed to be in mass units). -Keyword *temperature* sets the temperature of a finite-size particle -as defined by the GRANULAR package. Currently, only -:doc:`atom_style sphere/temperature ` defines particles -with this attribute. The values for the temperature must be positive. +Keyword *temperature* sets the temperature of a finite-size particle. +Currently, only the GRANULAR package supports this attribute. The +temperature must be added using an instance of +:doc:`fix property/atom ` The values for the +temperature must be positive. Keyword *volume* sets the volume of all selected particles. Currently, only the :doc:`atom_style peri ` command defines particles diff --git a/examples/granular/in.pour.heat b/examples/granular/in.pour.heat index 69590389b5..f3bf9bcccc 100644 --- a/examples/granular/in.pour.heat +++ b/examples/granular/in.pour.heat @@ -3,7 +3,7 @@ variable name string heat_plate -atom_style sphere/temp +atom_style sphere units lj ############################################### @@ -49,9 +49,10 @@ region bottom_wall plane ${xc} ${yc} 0 0 0 1 side in region insreg cylinder z ${xc} ${yc} ${cyl_rad_inner} ${drum_height} ${boxz} -fix 0 all balance 100 1.0 shift xy 5 1.1 -fix 1 all nve/sphere -fix 2 all heat/flow/sphere/temp constant 1.0 +fix 0 all property/atom temperature heatflow +fix 1 all balance 100 1.0 shift xy 5 1.1 +fix 2 all nve/sphere +fix 3 all heat/flow constant 1.0 fix grav all gravity 10 vector 0 0 -1 fix ins1 all pour 1000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} fix ins2 all pour 1000 2 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} @@ -63,8 +64,8 @@ neigh_modify delay 0 every 1 check yes variable oscillate equal 1.0*sin(step*0.0001) -fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall -fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 region bottom_wall temperature v_oscillate +fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall +fix 5 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 region bottom_wall temperature v_oscillate thermo_style custom step atoms ke pxx pyy pzz thermo_modify lost warn diff --git a/examples/granular/log.15Sep22.pour.heat.g++.1 b/examples/granular/log.15Sep22.pour.heat.g++.1 index d232752c74..24c128c0a6 100644 --- a/examples/granular/log.15Sep22.pour.heat.g++.1 +++ b/examples/granular/log.15Sep22.pour.heat.g++.1 @@ -1,10 +1,10 @@ -LAMMPS (15 Sep 2022) +LAMMPS (22 Dec 2022) # pour one types of particles into cylinder and oscillate # temperature of the bottom plate variable name string heat_plate -atom_style sphere/temp +atom_style sphere units lj ############################################### @@ -76,9 +76,11 @@ region insreg cylinder z 5 5 4.45 ${drum_height} ${boxz} region insreg cylinder z 5 5 4.45 30 ${boxz} region insreg cylinder z 5 5 4.45 30 50 -fix 0 all balance 100 1.0 shift xy 5 1.1 -fix 1 all nve/sphere -fix 2 all heat/flow/sphere/temp constant 1.0 +fix 0 all property/atom temperature heatflow +WARNING: Fix property/atom mol, charge, rmass, temperature, or heatflow w/out ghost communication (../fix_property_atom.cpp:196) +fix 1 all balance 100 1.0 shift xy 5 1.1 +fix 2 all nve/sphere +fix 3 all heat/flow constant 1.0 fix grav all gravity 10 vector 0 0 -1 fix ins1 all pour 1000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} fix ins1 all pour 1000 1 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} @@ -101,8 +103,8 @@ neigh_modify delay 0 every 1 check yes variable oscillate equal 1.0*sin(step*0.0001) -fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall -fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 region bottom_wall temperature v_oscillate +fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall +fix 5 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 region bottom_wall temperature v_oscillate thermo_style custom step atoms ke pxx pyy pzz thermo_modify lost warn @@ -1142,20 +1144,20 @@ WARNING: Less insertions than requested (../fix_pour.cpp:681) 99800 2000 -0 7.9486941 7.5271104 6.5519215 99900 2000 -0 7.9486942 7.5271152 6.5519136 100000 2000 -0 7.9486939 7.5271185 6.5519079 -Loop time of 87.7116 on 1 procs for 100000 steps with 2000 atoms +Loop time of 85.1866 on 1 procs for 100000 steps with 2000 atoms -Performance: 98504.589 tau/day, 1140.099 timesteps/s, 2.280 Matom-step/s -99.5% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 101424.442 tau/day, 1173.894 timesteps/s, 2.348 Matom-step/s +99.4% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 66.081 | 66.081 | 66.081 | 0.0 | 75.34 -Neigh | 2.7411 | 2.7411 | 2.7411 | 0.0 | 3.13 -Comm | 1.3393 | 1.3393 | 1.3393 | 0.0 | 1.53 -Output | 0.029473 | 0.029473 | 0.029473 | 0.0 | 0.03 -Modify | 16.598 | 16.598 | 16.598 | 0.0 | 18.92 -Other | | 0.9233 | | | 1.05 +Pair | 63.448 | 63.448 | 63.448 | 0.0 | 74.48 +Neigh | 2.7318 | 2.7318 | 2.7318 | 0.0 | 3.21 +Comm | 1.2139 | 1.2139 | 1.2139 | 0.0 | 1.43 +Output | 0.030165 | 0.030165 | 0.030165 | 0.0 | 0.04 +Modify | 16.878 | 16.878 | 16.878 | 0.0 | 19.81 +Other | | 0.8845 | | | 1.04 Nlocal: 2000 ave 2000 max 2000 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -1169,4 +1171,4 @@ Ave neighs/atom = 4.8175 Neighbor list builds = 3285 Dangerous builds = 0 -Total wall time: 0:01:27 +Total wall time: 0:01:25 diff --git a/examples/granular/log.15Sep22.pour.heat.g++.4 b/examples/granular/log.15Sep22.pour.heat.g++.4 index f159302d65..864a7898c3 100644 --- a/examples/granular/log.15Sep22.pour.heat.g++.4 +++ b/examples/granular/log.15Sep22.pour.heat.g++.4 @@ -1,10 +1,10 @@ -LAMMPS (15 Sep 2022) +LAMMPS (22 Dec 2022) # pour one types of particles into cylinder and oscillate # temperature of the bottom plate variable name string heat_plate -atom_style sphere/temp +atom_style sphere units lj ############################################### @@ -76,9 +76,11 @@ region insreg cylinder z 5 5 4.45 ${drum_height} ${boxz} region insreg cylinder z 5 5 4.45 30 ${boxz} region insreg cylinder z 5 5 4.45 30 50 -fix 0 all balance 100 1.0 shift xy 5 1.1 -fix 1 all nve/sphere -fix 2 all heat/flow/sphere/temp constant 1.0 +fix 0 all property/atom temperature heatflow +WARNING: Fix property/atom mol, charge, rmass, temperature, or heatflow w/out ghost communication (../fix_property_atom.cpp:196) +fix 1 all balance 100 1.0 shift xy 5 1.1 +fix 2 all nve/sphere +fix 3 all heat/flow constant 1.0 fix grav all gravity 10 vector 0 0 -1 fix ins1 all pour 1000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens} fix ins1 all pour 1000 1 1234 region insreg diam range 0.5 ${dhi} dens ${dens} ${dens} @@ -101,8 +103,8 @@ neigh_modify delay 0 every 1 check yes variable oscillate equal 1.0*sin(step*0.0001) -fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall -fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 region bottom_wall temperature v_oscillate +fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall +fix 5 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 region bottom_wall temperature v_oscillate thermo_style custom step atoms ke pxx pyy pzz thermo_modify lost warn @@ -1142,20 +1144,20 @@ WARNING: Less insertions than requested (../fix_pour.cpp:681) 99800 2000 -0 7.5931492 7.7670928 6.2908349 99900 2000 -0 7.5931443 7.7670902 6.29084 100000 2000 -0 7.5931395 7.7670875 6.2908449 -Loop time of 28.4684 on 4 procs for 100000 steps with 2000 atoms +Loop time of 29.8443 on 4 procs for 100000 steps with 2000 atoms -Performance: 303494.659 tau/day, 3512.670 timesteps/s, 7.025 Matom-step/s -96.7% CPU use with 4 MPI tasks x no OpenMP threads +Performance: 289502.519 tau/day, 3350.724 timesteps/s, 6.701 Matom-step/s +96.9% CPU use with 4 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 14.471 | 15.426 | 16.874 | 24.3 | 54.19 -Neigh | 0.50185 | 0.52867 | 0.55379 | 3.1 | 1.86 -Comm | 5.277 | 6.8933 | 7.8956 | 40.4 | 24.21 -Output | 0.019683 | 0.022775 | 0.031664 | 3.4 | 0.08 -Modify | 4.7145 | 4.8537 | 5.0111 | 6.1 | 17.05 -Other | | 0.7439 | | | 2.61 +Pair | 14.343 | 15.321 | 16.586 | 22.2 | 51.34 +Neigh | 0.50641 | 0.541 | 0.58175 | 3.8 | 1.81 +Comm | 4.9356 | 6.3418 | 7.3742 | 38.3 | 21.25 +Output | 0.019257 | 0.022039 | 0.029648 | 3.0 | 0.07 +Modify | 6.8727 | 6.9724 | 7.084 | 2.9 | 23.36 +Other | | 0.6461 | | | 2.16 Nlocal: 500 ave 504 max 496 min Histogram: 2 0 0 0 0 0 0 0 0 2 @@ -1169,4 +1171,4 @@ Ave neighs/atom = 4.8195 Neighbor list builds = 3151 Dangerous builds = 0 -Total wall time: 0:00:28 +Total wall time: 0:00:29 diff --git a/src/GRANULAR/fix_heat_flow.cpp b/src/GRANULAR/fix_heat_flow.cpp index d62f914577..f9ad309f98 100644 --- a/src/GRANULAR/fix_heat_flow.cpp +++ b/src/GRANULAR/fix_heat_flow.cpp @@ -67,6 +67,7 @@ FixHeatFlow::FixHeatFlow(LAMMPS *lmp, int narg, char **arg) : int FixHeatFlow::setmask() { int mask = 0; + mask |= PRE_FORCE; mask |= FINAL_INTEGRATE; mask |= FINAL_INTEGRATE_RESPA; return mask; @@ -88,9 +89,8 @@ void FixHeatFlow::init() void FixHeatFlow::setup(int /*vflag*/) { - // Identify whether this is the first/last instance of fix heat/flow + // Identify whether this is the first instance of fix heat/flow first_flag = 0; - last_flag = 0; int i = 0; auto fixlist = modify->get_fix_by_style("heat/flow"); @@ -100,7 +100,26 @@ void FixHeatFlow::setup(int /*vflag*/) } if (i == 0) first_flag = 1; - if ((i + 1) == fixlist.size()) last_flag = 1; +} + +/* ---------------------------------------------------------------------- */ + +void FixHeatFlow::setup_pre_force(int /*vflag*/) +{ + pre_force(0); +} + +/* ---------------------------------------------------------------------- */ + +void FixHeatFlow::pre_force(int /*vflag*/) +{ + // send updated temperatures to ghosts if first instance of fix + // then clear heatflow for next force calculation + double *heatflow = atom->heatflow; + if (first_flag) { + comm->forward_comm(this); + for (int i = 0; i < atom->nmax; i++) heatflow[i] = 0.0; + } } /* ---------------------------------------------------------------------- */ @@ -133,13 +152,6 @@ void FixHeatFlow::final_integrate() temperature[i] += dt * heatflow[i] / (calc_cp(i) * mass[type[i]]); } } - - // send updated temperatures to ghosts if last instance of fix - // then clear heatflow for next force calculation - if (last_flag) { - comm->forward_comm(this); - for (int i = 0; i < atom->nmax; i++) heatflow[i] = 0.0; - } } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/fix_heat_flow.h b/src/GRANULAR/fix_heat_flow.h index 2d311d0104..5a06eed4d3 100644 --- a/src/GRANULAR/fix_heat_flow.h +++ b/src/GRANULAR/fix_heat_flow.h @@ -31,6 +31,8 @@ class FixHeatFlow : public Fix { int setmask() override; void init() override; void setup(int) override; + void setup_pre_force(int) override; + void pre_force(int) override; void final_integrate() override; void final_integrate_respa(int, int) override; int pack_forward_comm(int, int *, double *, int, int *) override; @@ -43,7 +45,7 @@ class FixHeatFlow : public Fix { double dt; double cp, *cp_type; int cp_style; - int first_flag, last_flag; + int first_flag; double calc_cp(int); }; From 621283bb783f593ac888411f76357ccf9709dff7 Mon Sep 17 00:00:00 2001 From: rohskopf Date: Thu, 16 Feb 2023 12:16:53 -0700 Subject: [PATCH 193/445] Enclose gradforce loops in gradgradflag conditional Co-authored-by: Nicholas Lubbers --- src/ML-IAP/mliap_data.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/ML-IAP/mliap_data.cpp b/src/ML-IAP/mliap_data.cpp index 974a125a2f..2663438c88 100644 --- a/src/ML-IAP/mliap_data.cpp +++ b/src/ML-IAP/mliap_data.cpp @@ -118,24 +118,27 @@ void MLIAPData::generate_neighdata(NeighList* list_in, int eflag_in, int vflag_i int *numneigh = list->numneigh; int **firstneigh = list->firstneigh; + int nall = atom->nlocal + atom->nghost; + ntotal = nall; + // grow nmax gradforce, elems arrays if necessary if (atom->nmax > nmax) { nmax = atom->nmax; - memory->grow(gradforce,nmax,size_gradforce, - "MLIAPData:gradforce"); memory->grow(elems,nmax,"MLIAPData:elems"); - } + if (gradgradflag == 1) memory->grow(gradforce,nmax,size_gradforce, + "MLIAPData:gradforce"); + } // clear gradforce, elems arrays - int nall = atom->nlocal + atom->nghost; - ntotal = nall; for (int i = 0; i < nall; i++) { - for (int j = 0; j < size_gradforce; j++) { - gradforce[i][j] = 0.0; - } elems[i] = 0; + if (gradgradflag == 1){ + for (int j = 0; j < size_gradforce; j++) { + gradforce[i][j] = 0.0; + } + } } // grow arrays if necessary @@ -160,7 +163,6 @@ void MLIAPData::generate_neighdata(NeighList* list_in, int eflag_in, int vflag_i } grow_neigharrays(); - npairs = 0; int ij = 0; for (int ii = 0; ii < natomneigh; ii++) { From af4c45a52bbd5c10e8f203c33ecfe170f0ec6be0 Mon Sep 17 00:00:00 2001 From: rohskopf Date: Thu, 16 Feb 2023 15:43:44 -0700 Subject: [PATCH 194/445] Confirm computes still work and use gradgradflag = -1 for pair style --- src/ML-IAP/mliap_data.cpp | 7 ++++--- src/ML-IAP/mliap_data.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ML-IAP/mliap_data.cpp b/src/ML-IAP/mliap_data.cpp index 2663438c88..1dee9167e8 100644 --- a/src/ML-IAP/mliap_data.cpp +++ b/src/ML-IAP/mliap_data.cpp @@ -126,15 +126,15 @@ void MLIAPData::generate_neighdata(NeighList* list_in, int eflag_in, int vflag_i if (atom->nmax > nmax) { nmax = atom->nmax; memory->grow(elems,nmax,"MLIAPData:elems"); - if (gradgradflag == 1) memory->grow(gradforce,nmax,size_gradforce, - "MLIAPData:gradforce"); + if (gradgradflag > -1) memory->grow(gradforce,nmax,size_gradforce, + "MLIAPData:gradforce"); } // clear gradforce, elems arrays for (int i = 0; i < nall; i++) { elems[i] = 0; - if (gradgradflag == 1){ + if (gradgradflag > -1){ for (int j = 0; j < size_gradforce; j++) { gradforce[i][j] = 0.0; } @@ -163,6 +163,7 @@ void MLIAPData::generate_neighdata(NeighList* list_in, int eflag_in, int vflag_i } grow_neigharrays(); + npairs = 0; int ij = 0; for (int ii = 0; ii < natomneigh; ii++) { diff --git a/src/ML-IAP/mliap_data.h b/src/ML-IAP/mliap_data.h index 562eb3e850..618081de20 100644 --- a/src/ML-IAP/mliap_data.h +++ b/src/ML-IAP/mliap_data.h @@ -84,7 +84,7 @@ class MLIAPData : protected Pointers { int nmax; class NeighList *list; // LAMMPS neighbor list int *map; // map LAMMPS types to [0,nelements) - int gradgradflag; // 1 for graddesc, 0 for gamma + int gradgradflag; // 1 for graddesc, 0 for gamma, -1 for pair style }; } // namespace LAMMPS_NS From ba80af3bd93d189e007c983ea0789d2a94e2f1d8 Mon Sep 17 00:00:00 2001 From: rohskopf Date: Thu, 16 Feb 2023 19:59:25 -0700 Subject: [PATCH 195/445] Update Kokkos and confirm computes work --- src/KOKKOS/mliap_data_kokkos.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/KOKKOS/mliap_data_kokkos.cpp b/src/KOKKOS/mliap_data_kokkos.cpp index 993272771d..a2a8743c66 100644 --- a/src/KOKKOS/mliap_data_kokkos.cpp +++ b/src/KOKKOS/mliap_data_kokkos.cpp @@ -75,19 +75,24 @@ void MLIAPDataKokkos::generate_neighdata(class NeighList *list_in, i if (atom->nmax > nmax) { nmax = atom->nmax; - memoryKK->destroy_kokkos(k_gradforce,gradforce); - memoryKK->create_kokkos(k_gradforce, gradforce, nmax, size_gradforce, "mliap_data:gradforce"); + if (gradgradflag > -1){ + memoryKK->destroy_kokkos(k_gradforce,gradforce); + memoryKK->create_kokkos(k_gradforce, gradforce, nmax, size_gradforce, "mliap_data:gradforce"); + } memoryKK->destroy_kokkos(k_elems,elems); memoryKK->create_kokkos(k_elems, elems, nmax, "mliap_data:elems"); } - // clear gradforce array + // clear gradforce and elems arrays int nall = atom->nlocal + atom->nghost; ntotal = nall; - auto d_gradforce = k_gradforce.template view(); - Kokkos::deep_copy(d_gradforce, 0.); + if (gradgradflag > -1){ + auto d_gradforce = k_gradforce.template view(); + Kokkos::deep_copy(d_gradforce, 0.); + } auto d_elems = k_elems.template view(); Kokkos::deep_copy(d_elems, 0.); + // grow arrays if necessary nlistatoms = list->inum; From 9c73f3212190d2c42e19d06310be5812ac4a7dc0 Mon Sep 17 00:00:00 2001 From: Jacob Gissinger Date: Fri, 17 Feb 2023 13:01:47 -0500 Subject: [PATCH 196/445] increase MAXLINE to match other parts of lammps 'custom' constraint could exceed 256 chars fairly easily --- src/REACTION/fix_bond_react.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/REACTION/fix_bond_react.h b/src/REACTION/fix_bond_react.h index e9b3ffb247..9c21aa2ea1 100644 --- a/src/REACTION/fix_bond_react.h +++ b/src/REACTION/fix_bond_react.h @@ -33,7 +33,7 @@ namespace LAMMPS_NS { class FixBondReact : public Fix { public: - enum { MAXLINE = 256 }; // max length of line read from files + enum { MAXLINE = 1024 }; // max length of line read from files enum { MAXCONIDS = 4 }; // max # of IDs used by any constraint enum { MAXCONPAR = 5 }; // max # of constraint parameters From 0ead219a8b0bbed2db629fb96842ebf912de11c2 Mon Sep 17 00:00:00 2001 From: Jacob Gissinger Date: Sat, 18 Feb 2023 00:37:28 -0500 Subject: [PATCH 197/445] backward compatibility with restart keep new maxline limit (1024 chars), but old react-ID length limit (256 chars) --- src/REACTION/fix_bond_react.cpp | 8 ++++---- src/REACTION/fix_bond_react.h | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index dbdd5116fd..75f9070fe4 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -216,7 +216,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) : // this looks excessive // the price of vectorization (all reactions in one command)? - memory->create(rxn_name,nreacts,MAXLINE,"bond/react:rxn_name"); + memory->create(rxn_name,nreacts,MAXNAME,"bond/react:rxn_name"); memory->create(nevery,nreacts,"bond/react:nevery"); memory->create(cutsq,nreacts,2,"bond/react:cutsq"); memory->create(unreacted_mol,nreacts,"bond/react:unreacted_mol"); @@ -287,7 +287,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) : iarg++; int n = strlen(arg[iarg]) + 1; - if (n > MAXLINE) error->all(FLERR,"Reaction name (react-ID) is too long (limit: 256 characters)"); + if (n > MAXNAME) error->all(FLERR,"Reaction name (react-ID) is too long (limit: 256 characters)"); strcpy(rxn_name[rxn],arg[iarg++]); int groupid = group->find(arg[iarg++]); @@ -4438,8 +4438,8 @@ void FixBondReact::write_restart(FILE *fp) for (int i = 0; i < nreacts; i++) { set[i].reaction_count_total = reaction_count_total[i]; - strncpy(set[i].rxn_name,rxn_name[i],MAXLINE-1); - set[i].rxn_name[MAXLINE-1] = '\0'; + strncpy(set[i].rxn_name,rxn_name[i],MAXNAME-1); + set[i].rxn_name[MAXNAME-1] = '\0'; } int rbufcount = max_rate_limit_steps*nreacts; diff --git a/src/REACTION/fix_bond_react.h b/src/REACTION/fix_bond_react.h index 9c21aa2ea1..66a5e4d6a0 100644 --- a/src/REACTION/fix_bond_react.h +++ b/src/REACTION/fix_bond_react.h @@ -33,7 +33,8 @@ namespace LAMMPS_NS { class FixBondReact : public Fix { public: - enum { MAXLINE = 1024 }; // max length of line read from files + enum { MAXLINE = 1024 }; // max length of line read from files + enum { MAXNAME = 256 }; // max character length of react-ID enum { MAXCONIDS = 4 }; // max # of IDs used by any constraint enum { MAXCONPAR = 5 }; // max # of constraint parameters @@ -218,7 +219,7 @@ class FixBondReact : public Fix { // store restart data struct Set { int nreacts; - char rxn_name[MAXLINE]; + char rxn_name[MAXNAME]; int reaction_count_total; int max_rate_limit_steps; }; From aa209e621de16545fd7e96097c7fc0202029086f Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sat, 18 Feb 2023 10:21:23 +0200 Subject: [PATCH 198/445] Include method declaration in pair_buck.h --- src/pair_buck.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pair_buck.h b/src/pair_buck.h index 1fdaf1a0e5..877a48f6d8 100644 --- a/src/pair_buck.h +++ b/src/pair_buck.h @@ -39,6 +39,7 @@ class PairBuck : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void *extract(const char *, int &) override; protected: From ca7cb7bd0e45c34f6d883510296d370c4643a319 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sat, 18 Feb 2023 10:24:08 +0200 Subject: [PATCH 199/445] Implement born_matrix in pair_buck.cpp --- src/pair_buck.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/pair_buck.cpp b/src/pair_buck.cpp index dcd4e5f079..ff6fb5fbde 100644 --- a/src/pair_buck.cpp +++ b/src/pair_buck.cpp @@ -32,6 +32,7 @@ using namespace MathConst; PairBuck::PairBuck(LAMMPS *lmp) : Pair(lmp) { + born_matrix_enable = 1; writedata = 1; } @@ -400,6 +401,34 @@ double PairBuck::single(int /*i*/, int /*j*/, int itype, int jtype, /* ---------------------------------------------------------------------- */ +void PairBuck::born_matrix(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double factor_lj, double &dupair, + double &du2pair) +{ + double rinv, r2inv, r6inv, r7inv, r8inv, du, du2; + double r, rexp; + + r = sqrt(rsq); + rexp = exp(-r*rhoinv[itype][jtype]); + + r2inv = 1.0 / rsq; + rinv = sqrt(r2inv); + r6inv = r2inv * r2inv * r2inv; + r7inv = r6inv * rinv; + r8inv = r6inv * r2inv; + + // Reminder: buck1[itype][jtype] = a[itype][jtype]/rho[itype][jtype]; + // Reminder: buck2[itype][jtype] = 6.0*c[itype][jtype]; + + du = buck2[itype][jtype] * r7inv - buck1[itype][jtype] * rexp; + du2 = (buck1[itype][jtype] / rho[itype][jtype]) * rexp - 7 * buck2[itype][jtype] * r8inv; + + dupair = factor_lj * du; + du2pair = factor_lj * du2; +} + +/* ---------------------------------------------------------------------- */ + void *PairBuck::extract(const char *str, int &dim) { dim = 2; From c020aba17c095ba5e70b616eca04ff6491d50384 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sat, 18 Feb 2023 11:16:55 +0200 Subject: [PATCH 200/445] Include method declaration in pair_born.h --- src/pair_born.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pair_born.h b/src/pair_born.h index acfa3ccfc9..eaae688c38 100644 --- a/src/pair_born.h +++ b/src/pair_born.h @@ -40,6 +40,7 @@ class PairBorn : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void *extract(const char *, int &) override; protected: From ac506255a619050a8cb2aeaea6bd162cebbe0410 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sat, 18 Feb 2023 11:18:27 +0200 Subject: [PATCH 201/445] Implement born_matrix in pair_born.cpp --- src/pair_born.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/pair_born.cpp b/src/pair_born.cpp index 7a76e5f547..c2a47be47f 100644 --- a/src/pair_born.cpp +++ b/src/pair_born.cpp @@ -36,6 +36,7 @@ using namespace MathConst; PairBorn::PairBorn(LAMMPS *lmp) : Pair(lmp) { + born_matrix_enable = 1; writedata = 1; } @@ -428,6 +429,36 @@ double PairBorn::single(int /*i*/, int /*j*/, int itype, int jtype, /* ---------------------------------------------------------------------- */ +void PairBorn::born_matrix(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double factor_lj, double &dupair, + double &du2pair) +{ + double rinv, r2inv, r7inv, r8inv, r9inv, r10inv, du, du2; + double r, rexp; + + r = sqrt(rsq); + rexp = exp((sigma[itype][jtype]-r)*rhoinv[itype][jtype]); + + r2inv = 1.0 / rsq; + rinv = sqrt(r2inv); + r7inv = r2inv * r2inv * r2inv * rinv; + r8inv = r7inv * rinv; + r9inv = r7inv * r2inv; + r10inv = r9inv * rinv; + + // Reminder: born1[itype][jtype] = a[itype][jtype]/rho[itype][jtype]; + // Reminder: born2[itype][jtype] = 6.0*c[itype][jtype]; + // Reminder: born3[itype][jtype] = 8.0*d[itype][jtype]; + + du = born2[itype][jtype] * r7inv - born1[itype][jtype] * rexp - born3[itype][jtype] * r9inv; + du2 = (born1[itype][jtype] / rho[itype][jtype]) * rexp - 7 * born2[itype][jtype] * r8inv + 9 * born3[itype][jtype] * r10inv; + + dupair = factor_lj * du; + du2pair = factor_lj * du2; +} + +/* ---------------------------------------------------------------------- */ + void *PairBorn::extract(const char *str, int &dim) { dim = 2; From 863aec4c79de15ca3904bb689ffdaf91f61949e0 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sat, 18 Feb 2023 20:21:44 +0200 Subject: [PATCH 202/445] Include method declaration in pair_lj_class2.h --- src/CLASS2/pair_lj_class2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CLASS2/pair_lj_class2.h b/src/CLASS2/pair_lj_class2.h index 2aff62851c..43653f5e4d 100644 --- a/src/CLASS2/pair_lj_class2.h +++ b/src/CLASS2/pair_lj_class2.h @@ -38,6 +38,7 @@ class PairLJClass2 : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void *extract(const char *, int &) override; void compute_inner() override; From a875ef77cdc4f3c91f657b20874606b0081f1be0 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sat, 18 Feb 2023 20:23:40 +0200 Subject: [PATCH 203/445] Implement born_matrix in pair_lj_class2.cpp --- src/CLASS2/pair_lj_class2.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/CLASS2/pair_lj_class2.cpp b/src/CLASS2/pair_lj_class2.cpp index c2f79c6333..1208fedfca 100644 --- a/src/CLASS2/pair_lj_class2.cpp +++ b/src/CLASS2/pair_lj_class2.cpp @@ -33,6 +33,7 @@ using namespace MathConst; PairLJClass2::PairLJClass2(LAMMPS *lmp) : Pair(lmp) { respa_enable = 1; + born_matrix_enable = 1; writedata = 1; centroidstressflag = CENTROID_SAME; cut_respa = nullptr; @@ -684,6 +685,30 @@ double PairLJClass2::single(int /*i*/, int /*j*/, int itype, int jtype, double r /* ---------------------------------------------------------------------- */ +void PairLJClass2::born_matrix(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double factor_lj, double &dupair, + double &du2pair) +{ + double rinv, r2inv, r3inv, r7inv, r8inv, du, du2; + + r2inv = 1.0 / rsq; + rinv = sqrt(r2inv); + r3inv = r2inv * rinv; + r7inv = r3inv * r3inv * rinv; + r8inv = r7inv * rinv; + + // Reminder: lj1[i][j] = 18.0 * epsilon[i][j] * pow(sigma[i][j], 9.0); + // Reminder: lj2[i][j] = 18.0 * epsilon[i][j] * pow(sigma[i][j], 6.0); + + du = r7inv * (lj2[itype][jtype] - lj1[itype][jtype] * r3inv); + du2 = r8inv * (10 * lj1[itype][jtype] * r3inv - 7 * lj2[itype][jtype]); + + dupair = factor_lj * du; + du2pair = factor_lj * du2; +} + +/* ---------------------------------------------------------------------- */ + void *PairLJClass2::extract(const char *str, int &dim) { dim = 2; From ff72268430f4dfb1a5210772a199f0b1181aa58e Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sat, 18 Feb 2023 16:33:57 -0500 Subject: [PATCH 204/445] rate_limit keyword speedup was previously checking for reactions when even one reaction would exceed rate limit --- src/REACTION/fix_bond_react.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index 75f9070fe4..eaf4dfd0ec 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -939,7 +939,7 @@ void FixBondReact::post_integrate() if (var_flag[NRATE][rxnID] == 1) { my_nrate = input->variable->compute_equal(var_id[NRATE][rxnID]); } else my_nrate = rate_limit[1][rxnID]; - if (nrxns_delta > my_nrate) rate_limit_flag = 0; + if (nrxns_delta >= my_nrate) rate_limit_flag = 0; } } if ((update->ntimestep % nevery[rxnID]) || From 42b7c400209b3aba14bcc3e3aaf999e13e5bd2cc Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sun, 19 Feb 2023 16:27:03 +0200 Subject: [PATCH 205/445] Include method declaration in angle_fourier.h --- src/EXTRA-MOLECULE/angle_fourier.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-MOLECULE/angle_fourier.h b/src/EXTRA-MOLECULE/angle_fourier.h index 104a5984a6..8fa5d14b26 100644 --- a/src/EXTRA-MOLECULE/angle_fourier.h +++ b/src/EXTRA-MOLECULE/angle_fourier.h @@ -35,6 +35,7 @@ class AngleFourier : public Angle { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, int, int, int) override; + void born_matrix(int type, int i1, int i2, int i3, double &du, double &du2) override; protected: double *k, *C0, *C1, *C2; From 8a5ee84901c303f310636d9bc3185c28e7ffa073 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sun, 19 Feb 2023 16:31:42 +0200 Subject: [PATCH 206/445] Implement born_matrix in angle_fourier.cpp --- src/EXTRA-MOLECULE/angle_fourier.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/EXTRA-MOLECULE/angle_fourier.cpp b/src/EXTRA-MOLECULE/angle_fourier.cpp index 49b8bdb698..549da0c196 100644 --- a/src/EXTRA-MOLECULE/angle_fourier.cpp +++ b/src/EXTRA-MOLECULE/angle_fourier.cpp @@ -283,3 +283,31 @@ double AngleFourier::single(int type, int i1, int i2, int i3) double eng = k[type]*(C0[type]+C1[type]*c+C2[type]*c2); return eng; } + +/* ---------------------------------------------------------------------- */ + +void AngleFourier::born_matrix(int type, int i1, int i2, int i3, double &du, double &du2) +{ + double **x = atom->x; + + double delx1 = x[i1][0] - x[i2][0]; + double dely1 = x[i1][1] - x[i2][1]; + double delz1 = x[i1][2] - x[i2][2]; + domain->minimum_image(delx1,dely1,delz1); + double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1); + + double delx2 = x[i3][0] - x[i2][0]; + double dely2 = x[i3][1] - x[i2][1]; + double delz2 = x[i3][2] - x[i2][2]; + domain->minimum_image(delx2,dely2,delz2); + double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2); + + double c = delx1*delx2 + dely1*dely2 + delz1*delz2; + c /= r1*r2; + if (c > 1.0) c = 1.0; + if (c < -1.0) c = -1.0; + + du2 = 4 * k[type] * C2[type]; + du = k[type] * (C1[type] + 4 * C2[type] * c); +} + From d300225f78422f39bc413b7d5a1110bc66efe1d9 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sun, 19 Feb 2023 17:25:28 +0200 Subject: [PATCH 207/445] Include method declaration in bond_harmonic_shift.h --- src/EXTRA-MOLECULE/bond_harmonic_shift.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-MOLECULE/bond_harmonic_shift.h b/src/EXTRA-MOLECULE/bond_harmonic_shift.h index 2df13cee27..922f1ba00d 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_shift.h +++ b/src/EXTRA-MOLECULE/bond_harmonic_shift.h @@ -35,6 +35,7 @@ class BondHarmonicShift : public Bond { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, double, int, int, double &) override; + void born_matrix(int, double, int, int, double &, double &) override; protected: double *k, *r0, *r1; From 29c5c1a0d353e29ebe869386abd0f7a29c57b0e4 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sun, 19 Feb 2023 17:27:23 +0200 Subject: [PATCH 208/445] Implement born_matrix in bond_harmonic_shift.cpp --- src/EXTRA-MOLECULE/bond_harmonic_shift.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/EXTRA-MOLECULE/bond_harmonic_shift.cpp b/src/EXTRA-MOLECULE/bond_harmonic_shift.cpp index 2f8bfbaa08..bd106c8567 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_shift.cpp +++ b/src/EXTRA-MOLECULE/bond_harmonic_shift.cpp @@ -31,7 +31,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -BondHarmonicShift::BondHarmonicShift(LAMMPS *lmp) : Bond(lmp) {} +BondHarmonicShift::BondHarmonicShift(LAMMPS *lmp) : Bond(lmp) +{ + born_matrix_enable = 1; +} /* ---------------------------------------------------------------------- */ @@ -213,3 +216,15 @@ double BondHarmonicShift::single(int type, double rsq, int /*i*/, int /*j*/, fforce = -2.0*k[type]*dr/r; return k[type]*(dr*dr - dr2*dr2); } + +/* ---------------------------------------------------------------------- */ + +void BondHarmonicShift::born_matrix(int type, double rsq, int /*i*/, int /*j*/, double &du, double &du2) +{ + double r = sqrt(rsq); + double dr = r - r0[type]; + + du = 0.0; + du2 = 2 * k[type]; + if (r > 0.0) du = du2 * dr; +} From 7383daa23ee3f82ef05ea046691c17b98cf0aca6 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sun, 19 Feb 2023 17:57:30 +0200 Subject: [PATCH 209/445] Include method declaration in pair_harmonic_cut.h --- src/EXTRA-PAIR/pair_harmonic_cut.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-PAIR/pair_harmonic_cut.h b/src/EXTRA-PAIR/pair_harmonic_cut.h index a8d368cc8c..6620361f8b 100644 --- a/src/EXTRA-PAIR/pair_harmonic_cut.h +++ b/src/EXTRA-PAIR/pair_harmonic_cut.h @@ -39,6 +39,7 @@ class PairHarmonicCut : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void *extract(const char *, int &) override; protected: From 472d32ee1759f7ee2070b0ef3246134bbcf3810e Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Sun, 19 Feb 2023 17:59:53 +0200 Subject: [PATCH 210/445] Implement born_matrix in pair_harmonic_cut.cpp --- src/EXTRA-PAIR/pair_harmonic_cut.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/EXTRA-PAIR/pair_harmonic_cut.cpp b/src/EXTRA-PAIR/pair_harmonic_cut.cpp index 84e15b54bb..8b588f2a22 100644 --- a/src/EXTRA-PAIR/pair_harmonic_cut.cpp +++ b/src/EXTRA-PAIR/pair_harmonic_cut.cpp @@ -35,6 +35,7 @@ using namespace MathConst; PairHarmonicCut::PairHarmonicCut(LAMMPS *lmp) : Pair(lmp), k(nullptr), cut(nullptr) { + born_matrix_enable = 1; writedata = 1; } @@ -306,6 +307,23 @@ double PairHarmonicCut::single(int /*i*/, int /*j*/, int itype, int jtype, doubl /* ---------------------------------------------------------------------- */ +void PairHarmonicCut::born_matrix(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double factor_lj, double &dupair, + double &du2pair) +{ + double r = sqrt(rsq); + double dr = r - cut[itype][jtype]; + + double du = 0; + double du2 = 2 * k[itype][jtype]; + if (r > 0) du = du2 * dr; + + dupair = factor_lj * du; + du2pair = factor_lj * du2; +} + +/* ---------------------------------------------------------------------- */ + void *PairHarmonicCut::extract(const char *str, int &dim) { dim = 2; From 7149143df8a64b6f73b62eba101a5b06d82d57f8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 19 Feb 2023 16:11:00 -0500 Subject: [PATCH 211/445] fix outdated or broken URLs and typos in URLs --- doc/src/Build_extras.rst | 2 +- doc/src/Build_manual.rst | 4 ++-- doc/src/Developer_comm_ops.rst | 2 +- doc/src/Errors_debug.rst | 2 +- doc/src/Fortran.rst | 2 +- doc/src/Install_git.rst | 4 ++-- doc/src/Intro_citing.rst | 2 +- doc/src/Intro_nonfeatures.rst | 9 ++++----- doc/src/Python_install.rst | 16 ++++++---------- doc/src/dump_image.rst | 16 ++++++++-------- doc/src/group.rst | 2 +- 11 files changed, 28 insertions(+), 33 deletions(-) diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 37a5da0d41..c4f9bf6aff 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -1135,7 +1135,7 @@ VORONOI package ----------------------------- To build with this package, you must download and build the -`Voro++ library `_ or install a +`Voro++ library `_ or install a binary package provided by your operating system. .. tabs:: diff --git a/doc/src/Build_manual.rst b/doc/src/Build_manual.rst index c726d37ea6..33ba5937c7 100644 --- a/doc/src/Build_manual.rst +++ b/doc/src/Build_manual.rst @@ -48,9 +48,9 @@ Build using GNU make The LAMMPS manual is written in `reStructuredText `_ format which can be translated to different output format using the `Sphinx -`_ document generator tool. It also +`_ document generator tool. It also incorporates programmer documentation extracted from the LAMMPS C++ -sources through the `Doxygen `_ program. Currently +sources through the `Doxygen `_ program. Currently the translation to HTML, PDF (via LaTeX), ePUB (for many e-book readers) and MOBI (for Amazon Kindle readers) are supported. For that to work a Python 3 interpreter, the ``doxygen`` tools and internet access to diff --git a/doc/src/Developer_comm_ops.rst b/doc/src/Developer_comm_ops.rst index de09cbb260..f8444d2993 100644 --- a/doc/src/Developer_comm_ops.rst +++ b/doc/src/Developer_comm_ops.rst @@ -77,7 +77,7 @@ buffer, and they will be communicated together to minimize communication overhead. The communication buffers are defined vectors containing ``double`` values. To correctly store integers that may be 64-bit (bigint, tagint, imageint) in the buffer, you need to use the -`ubuf union `_ construct. +`ubuf union `_ construct. The *Fix*, *Compute*, and *Dump* classes can also invoke the same kind of forward and reverse communication operations using the same *Comm* diff --git a/doc/src/Errors_debug.rst b/doc/src/Errors_debug.rst index ad0e5404e5..b3f618dbf7 100644 --- a/doc/src/Errors_debug.rst +++ b/doc/src/Errors_debug.rst @@ -75,7 +75,7 @@ Using the GDB debugger to get a stack trace There are two options to use the GDB debugger for identifying the origin of the segmentation fault or similar crash. The GDB debugger has many more features and options, as can be seen for example its `online -documentation `_. +documentation `_. Run LAMMPS from within the debugger ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/src/Fortran.rst b/doc/src/Fortran.rst index b195721598..92a42997b8 100644 --- a/doc/src/Fortran.rst +++ b/doc/src/Fortran.rst @@ -2155,7 +2155,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type The LAMMPS :doc:`dump style movie ` supports generating movies from images on-the-fly via creating a pipe to the - `ffmpeg `_ program. + `ffmpeg `_ program. This function checks whether this feature was :ref:`enabled at compile time `. It does **not** check whether the ``ffmpeg`` itself is installed and usable. diff --git a/doc/src/Install_git.rst b/doc/src/Install_git.rst index b11477689b..b6d3ced0a5 100644 --- a/doc/src/Install_git.rst +++ b/doc/src/Install_git.rst @@ -163,10 +163,10 @@ changed. How to do this depends on the build system you are using. .. admonition:: Git protocols :class: note - The servers at github.com support the "https://" access protocol for + The servers at github.com support the "https" access protocol for anonymous, read-only access. If you have a suitably configured GitHub account, you may also use SSH protocol with the URL - "git@github.com:lammps/lammps.git". + ``git@github.com:lammps/lammps.git``. The LAMMPS GitHub project is currently overseen by Axel Kohlmeyer (Temple U, akohlmey at gmail.com). diff --git a/doc/src/Intro_citing.rst b/doc/src/Intro_citing.rst index 8a6cfde878..69ccab6162 100644 --- a/doc/src/Intro_citing.rst +++ b/doc/src/Intro_citing.rst @@ -46,7 +46,7 @@ In addition there are DOIs generated for individual stable releases: - 3 March 2020 version: `DOI:10.5281/zenodo.3726417 `_ - 29 October 2020 version: `DOI:10.5281/zenodo.4157471 `_ -- 29 September 2021 version: `DOI:10.5281/zenodo.6386596 `_ +- 29 September 2021 version: `DOI:10.5281/zenodo.6386596 `_ Home page ^^^^^^^^^ diff --git a/doc/src/Intro_nonfeatures.rst b/doc/src/Intro_nonfeatures.rst index 65889efd2e..3289b838d6 100644 --- a/doc/src/Intro_nonfeatures.rst +++ b/doc/src/Intro_nonfeatures.rst @@ -34,7 +34,7 @@ Here are suggestions on how to perform these tasks: a true molecular builder that will generate complex molecular models. See the :doc:`Tools ` page for details on tools packaged with LAMMPS. The `Pre-/post-processing page - `_ of the LAMMPS homepage + `_ of the LAMMPS homepage describes a variety of third party tools for this task. Furthermore, some internal LAMMPS commands allow reconstructing, or selectively adding topology information, as well as provide the option to insert molecule @@ -66,10 +66,9 @@ Here are suggestions on how to perform these tasks: these various options. * **Visualization:** LAMMPS can produce NETPBM, JPG, or PNG format snapshot images on-the-fly via its :doc:`dump image ` - command and pass them to an external program, `FFmpeg - `_, to generate movies from them. For - high-quality, interactive visualization, there are many excellent and - free tools available. See the `Visualization Tools + command and pass them to an external program, `FFmpeg `_, + to generate movies from them. For high-quality, interactive visualization, + there are many excellent and free tools available. See the `Visualization Tools `_ page of the LAMMPS website for visualization packages that can process LAMMPS output data. * **Plotting:** See the next bullet about Pizza.py as well as the diff --git a/doc/src/Python_install.rst b/doc/src/Python_install.rst index f6b0cba6e0..bc0406ee92 100644 --- a/doc/src/Python_install.rst +++ b/doc/src/Python_install.rst @@ -15,9 +15,6 @@ Two components are necessary for Python to be able to invoke LAMMPS code: ``liblammps.dll``) from the folder where you compiled LAMMPS. .. _ctypes: https://docs.python.org/3/library/ctypes.html -.. _python_virtualenv: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment -.. _python_venv: https://docs.python.org/3/library/venv.html -.. _python_pep405: https://www.python.org/dev/peps/pep-0405 .. _python_install_guides: @@ -232,11 +229,11 @@ folder that the dynamic loader searches or inside of the installed install (newer/different) versions of Python packages that would potentially conflict with already installed system packages. It also does not requite any superuser privileges. See `PEP 405: - Python Virtual Environments `_ for more + Python Virtual Environments `_ for more information. To create a virtual environment in the folder ``$HOME/myenv``, - use the `venv `_ module as follows. + use the `venv `_ module as follows. .. code-block:: bash @@ -244,8 +241,9 @@ folder that the dynamic loader searches or inside of the installed python3 -m venv $HOME/myenv For Python versions prior 3.3 you can use `virtualenv - `_ command instead of "python3 -m venv". This - step has to be done only once. + `_ + command instead of "python3 -m venv". This step has to be done + only once. To activate the virtual environment type: @@ -414,10 +412,8 @@ follows: sudo pip install mpi4py -.. _mpi4py_install: https://mpi4py.readthedocs.io/en/stable/install.html - For more detailed installation instructions and additional options, -please see the `mpi4py installation `_ page. +please see the `mpi4py installation `_ page. To use ``mpi4py`` and LAMMPS in parallel from Python, you **must** make diff --git a/doc/src/dump_image.rst b/doc/src/dump_image.rst index fbe5a011dd..dd3354faaa 100644 --- a/doc/src/dump_image.rst +++ b/doc/src/dump_image.rst @@ -218,13 +218,13 @@ is used. .. _png_format: https://en.wikipedia.org/wiki/Portable_Network_Graphics .. _ppm_format: https://en.wikipedia.org/wiki/Netpbm -Similarly, the format of the resulting movie is chosen with the -*movie* dump style. This is handled by the underlying FFmpeg converter -and thus details have to be looked up in the `FFmpeg documentation -`_. Typical examples are: .avi, .mpg, -.m4v, .mp4, .mkv, .flv, .mov, .gif Additional settings of the movie -compression like *bitrate* and *framerate* can be set using the -dump_modify command as described below. +Similarly, the format of the resulting movie is chosen with the *movie* +dump style. This is handled by the underlying FFmpeg converter and thus +details have to be looked up in the `FFmpeg documentation +`_. Typical examples are: .avi, .mpg, .m4v, .mp4, +.mkv, .flv, .mov, .gif Additional settings of the movie compression like +*bitrate* and *framerate* can be set using the dump_modify command as +described below. To write out JPEG and PNG format files, you must build LAMMPS with support for the corresponding JPEG or PNG library. To convert images @@ -651,7 +651,7 @@ MPEG or other movie file you can use: cat snap.*.ppm | ffmpeg -y -f image2pipe -c:v ppm -i - -b:v 2400k movie.avi Front ends for FFmpeg exist for multiple platforms. For more - information see the `FFmpeg homepage `_ + information see the `FFmpeg homepage `_ ---------- diff --git a/doc/src/group.rst b/doc/src/group.rst index 387f84921d..fb1e0fb157 100644 --- a/doc/src/group.rst +++ b/doc/src/group.rst @@ -304,7 +304,7 @@ group and running further. not all allow for use of a dynamic group. If you get an error message that this is not allowed, but feel that it should be for the fix or compute in question, then please post your reasoning to the - `LAMMPS forum at MatSci `_ + `LAMMPS forum at MatSci `_ and we can look into changing it. The same applies if you come across inconsistent behavior when dynamic groups are allowed. From 9220ea5695b8514a8c8df980e41d1cff17fafa64 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 19 Feb 2023 20:45:08 -0500 Subject: [PATCH 212/445] fix a bunch more broken links --- doc/src/Developer_comm_ops.rst | 2 +- doc/src/Developer_utils.rst | 2 + doc/src/Howto_wsl.rst | 14 +++--- doc/src/Packages_details.rst | 50 +++++++++---------- doc/src/compute_smd_contact_radius.rst | 2 +- doc/src/compute_smd_damage.rst | 2 +- doc/src/compute_smd_hourglass_error.rst | 2 +- doc/src/compute_smd_internal_energy.rst | 2 +- doc/src/compute_smd_plastic_strain.rst | 2 +- doc/src/compute_smd_plastic_strain_rate.rst | 2 +- doc/src/compute_smd_rho.rst | 2 +- doc/src/compute_smd_tlsph_defgrad.rst | 2 +- doc/src/compute_smd_tlsph_dt.rst | 2 +- doc/src/compute_smd_tlsph_num_neighs.rst | 2 +- doc/src/compute_smd_tlsph_shape.rst | 2 +- doc/src/compute_smd_tlsph_strain.rst | 2 +- doc/src/compute_smd_tlsph_strain_rate.rst | 2 +- doc/src/compute_smd_tlsph_stress.rst | 2 +- doc/src/compute_smd_triangle_vertices.rst | 2 +- doc/src/compute_smd_ulsph_effm.rst | 2 +- doc/src/compute_smd_ulsph_num_neighs.rst | 2 +- doc/src/compute_smd_ulsph_strain.rst | 2 +- doc/src/compute_smd_ulsph_strain_rate.rst | 2 +- doc/src/compute_smd_ulsph_stress.rst | 2 +- doc/src/compute_smd_vol.rst | 2 +- doc/src/fix_ave_spatial.rst | 2 +- doc/src/fix_ave_spatial_sphere.rst | 2 +- doc/src/fix_smd_adjust_dt.rst | 2 +- doc/src/fix_smd_integrate_tlsph.rst | 2 +- doc/src/fix_smd_integrate_ulsph.rst | 2 +- doc/src/fix_smd_move_triangulated_surface.rst | 2 +- doc/src/fix_smd_wall_surface.rst | 2 +- doc/src/pair_smd_tlsph.rst | 2 +- doc/src/pair_smd_ulsph.rst | 2 +- src/library.cpp | 2 +- 35 files changed, 67 insertions(+), 63 deletions(-) diff --git a/doc/src/Developer_comm_ops.rst b/doc/src/Developer_comm_ops.rst index f8444d2993..116b4d6ad8 100644 --- a/doc/src/Developer_comm_ops.rst +++ b/doc/src/Developer_comm_ops.rst @@ -77,7 +77,7 @@ buffer, and they will be communicated together to minimize communication overhead. The communication buffers are defined vectors containing ``double`` values. To correctly store integers that may be 64-bit (bigint, tagint, imageint) in the buffer, you need to use the -`ubuf union `_ construct. +:ref:`ubuf union ` construct. The *Fix*, *Compute*, and *Dump* classes can also invoke the same kind of forward and reverse communication operations using the same *Comm* diff --git a/doc/src/Developer_utils.rst b/doc/src/Developer_utils.rst index 53ec0ad343..625ce15202 100644 --- a/doc/src/Developer_utils.rst +++ b/doc/src/Developer_utils.rst @@ -643,6 +643,8 @@ Tohoku University (under MIT license) --------------------------- +.. _communication_buffer_coding_with_ubuf: + Communication buffer coding with *ubuf* --------------------------------------- diff --git a/doc/src/Howto_wsl.rst b/doc/src/Howto_wsl.rst index df5644451f..fbb75d9cfd 100644 --- a/doc/src/Howto_wsl.rst +++ b/doc/src/Howto_wsl.rst @@ -11,12 +11,14 @@ LAMMPS in workshop settings, we had to redirect Windows users to Linux Virtual Machines such as VirtualBox or Unix-like compilation with Cygwin. -With the latest updates in Windows 10 (Version 2004, Build 19041 or higher), -Microsoft has added a new way to work on Linux-based code. The Windows -Subsystem for Linux (WSL). With WSL Version 2, you now get a Linux Virtual -Machine that transparently integrates into Windows. All you need is to ensure -you have the latest Windows updates installed and enable this new feature. -Linux VMs are then easily installed using the Microsoft Store. +With the latest updates in Windows 10 (Version 2004, Build 19041 or +higher), Microsoft has added a new way to work on Linux-based code. The +`Windows Subsystem for Linux (WSL) +`_. With WSL Version 2, +you now get a Linux Virtual Machine that transparently integrates into +Windows. All you need is to ensure you have the latest Windows updates +installed and enable this new feature. Linux VMs are then easily +installed using the Microsoft Store. In this tutorial, I'll show you how to set up and compile LAMMPS for both serial and MPI usage in WSL2. diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index 74b4eacf8f..c9f19f4988 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -228,8 +228,9 @@ conversion of atomic information to continuum fields. **Install:** -This package has :ref:`specific installation instructions ` on the :doc:`Build extras ` page. -The ATC package requires that also the `MANYBODY `_ package is installed. +This package has :ref:`specific installation instructions ` on the +:doc:`Build extras ` page. The ATC package requires that +also the :ref:`MANYBODY ` package is installed. **Supporting info:** @@ -391,8 +392,8 @@ rigid-body integrators with improved stability. **Install:** -The CG-DNA package requires that also the `MOLECULE `_ and -`ASPHERE `_ packages are installed. +The CG-DNA package requires that also the :ref:`MOLECULE ` +and :ref:`ASPHERE ` packages are installed. **Supporting info:** @@ -1114,15 +1115,15 @@ INTEL package **Contents:** -Dozens of pair, fix, bond, angle, dihedral, improper, and kspace -styles which are optimized for Intel CPUs and KNLs (Knights Landing). -All of them have an "intel" in their style name. The -:doc:`INTEL package ` page gives details of what hardware and -compilers are required on your system, and how to build and use this -package. Its styles can be invoked at run time via the "-sf intel" or -"-suffix intel" :doc:`command-line switches `. Also see -the :ref:`KOKKOS `, :ref:`OPT `, and :ref:`OPENMP ` packages, -which have styles optimized for CPUs and KNLs. +Dozens of pair, fix, bond, angle, dihedral, improper, and kspace styles +which are optimized for Intel CPUs and KNLs (Knights Landing). All of +them have an "intel" in their style name. The :doc:`INTEL package +` page gives details of what hardware and compilers are +required on your system, and how to build and use this package. Its +styles can be invoked at run time via the "-sf intel" or "-suffix intel" +:doc:`command-line switches `. Also see the :ref:`KOKKOS +`, :ref:`OPT `, and :ref:`OPENMP ` +packages, which have styles optimized for CPUs and KNLs. You need to have an Intel compiler, version 14 or higher to take full advantage of this package. While compilation with GNU compilers is @@ -1249,12 +1250,13 @@ Dozens of atom, pair, bond, angle, dihedral, improper, fix, compute styles adapted to compile using the Kokkos library which can convert them to OpenMP or CUDA code so that they run efficiently on multicore CPUs, KNLs, or GPUs. All the styles have a "kk" as a suffix in their -style name. The :doc:`KOKKOS package ` page gives -details of what hardware and software is required on your system, and -how to build and use this package. Its styles can be invoked at run -time via the "-sf kk" or "-suffix kk" :doc:`command-line switches `. Also see the :ref:`GPU `, :ref:`OPT `, -:ref:`INTEL `, and :ref:`OPENMP ` packages, which -have styles optimized for CPUs, KNLs, and GPUs. +style name. The :doc:`KOKKOS package ` page gives details +of what hardware and software is required on your system, and how to +build and use this package. Its styles can be invoked at run time via +the "-sf kk" or "-suffix kk" :doc:`command-line switches `. +Also see the :ref:`GPU `, :ref:`OPT `, :ref:`INTEL +`, and :ref:`OPENMP ` packages, which have styles +optimized for CPUs, KNLs, and GPUs. You must have a C++14 compatible compiler to use this package. KOKKOS makes extensive use of advanced C++ features, which can @@ -2328,7 +2330,7 @@ and third order tensor from finite differences. **Install:** -The PHONON package requires that also the `KSPACE `_ +The PHONON package requires that also the :ref:`KSPACE ` package is installed. @@ -2929,11 +2931,9 @@ VORONOI package **Contents:** A compute command which calculates the Voronoi tesselation of a -collection of atoms by wrapping the `Voro++ library `_. This -can be used to calculate the local volume or each atoms or its near -neighbors. - -.. _voro-home: https://math.lbl.gov/voro++ +collection of atoms by wrapping the `Voro++ library +`_. This can be used to calculate the +local volume or each atoms or its near neighbors. To use this package you must have the Voro++ library available on your system. diff --git a/doc/src/compute_smd_contact_radius.rst b/doc/src/compute_smd_contact_radius.rst index 25f346625c..4911ac4e27 100644 --- a/doc/src/compute_smd_contact_radius.rst +++ b/doc/src/compute_smd_contact_radius.rst @@ -29,7 +29,7 @@ contact radius is used only to prevent particles belonging to different physical bodies from penetrating each other. It is used by the contact pair styles, e.g., smd/hertz and smd/tri_surface. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. The value of the contact radius will be 0.0 for particles not in the diff --git a/doc/src/compute_smd_damage.rst b/doc/src/compute_smd_damage.rst index 10070eaf0e..fe5d94fa83 100644 --- a/doc/src/compute_smd_damage.rst +++ b/doc/src/compute_smd_damage.rst @@ -26,7 +26,7 @@ Description Define a computation that calculates the damage status of SPH particles according to the damage model which is defined via the SMD SPH pair styles, e.g., the maximum plastic strain failure criterion. -See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. +See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. **Output Info:** diff --git a/doc/src/compute_smd_hourglass_error.rst b/doc/src/compute_smd_hourglass_error.rst index aee87592aa..7e0aadd6d2 100644 --- a/doc/src/compute_smd_hourglass_error.rst +++ b/doc/src/compute_smd_hourglass_error.rst @@ -34,7 +34,7 @@ configuration. This compute is only really useful for debugging the hourglass control mechanism which is part of the Total-Lagrangian SPH pair style. -See `this PDF guide `_ to use Smooth +See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. **Output Info:** diff --git a/doc/src/compute_smd_internal_energy.rst b/doc/src/compute_smd_internal_energy.rst index 535384e38b..36bd816e8f 100644 --- a/doc/src/compute_smd_internal_energy.rst +++ b/doc/src/compute_smd_internal_energy.rst @@ -26,7 +26,7 @@ Description Define a computation which outputs the per-particle enthalpy, i.e., the sum of potential energy and heat. -See `this PDF guide `_ to use Smooth +See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. Output Info diff --git a/doc/src/compute_smd_plastic_strain.rst b/doc/src/compute_smd_plastic_strain.rst index 17614df548..00c6cb9a4a 100644 --- a/doc/src/compute_smd_plastic_strain.rst +++ b/doc/src/compute_smd_plastic_strain.rst @@ -27,7 +27,7 @@ Define a computation that outputs the equivalent plastic strain per particle. This command is only meaningful if a material model with plasticity is defined. -See `this PDF guide `_ to use Smooth +See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. **Output Info:** diff --git a/doc/src/compute_smd_plastic_strain_rate.rst b/doc/src/compute_smd_plastic_strain_rate.rst index dc78b627ef..681573be9b 100644 --- a/doc/src/compute_smd_plastic_strain_rate.rst +++ b/doc/src/compute_smd_plastic_strain_rate.rst @@ -27,7 +27,7 @@ Define a computation that outputs the time rate of the equivalent plastic strain. This command is only meaningful if a material model with plasticity is defined. -See `this PDF guide `_ to use Smooth +See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. **Output Info:** diff --git a/doc/src/compute_smd_rho.rst b/doc/src/compute_smd_rho.rst index 0adbc9db34..605dd5b79c 100644 --- a/doc/src/compute_smd_rho.rst +++ b/doc/src/compute_smd_rho.rst @@ -28,7 +28,7 @@ The mass density is the mass of a particle which is constant during the course of a simulation, divided by its volume, which can change due to mechanical deformation. -See `this PDF guide `_ to use Smooth +See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_tlsph_defgrad.rst b/doc/src/compute_smd_tlsph_defgrad.rst index 813bd32507..399e54d055 100644 --- a/doc/src/compute_smd_tlsph_defgrad.rst +++ b/doc/src/compute_smd_tlsph_defgrad.rst @@ -27,7 +27,7 @@ Define a computation that calculates the deformation gradient. It is only meaningful for particles which interact according to the Total-Lagrangian SPH pair style. -See `this PDF guide `_ to use Smooth +See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_tlsph_dt.rst b/doc/src/compute_smd_tlsph_dt.rst index 44b2311898..9490f7da14 100644 --- a/doc/src/compute_smd_tlsph_dt.rst +++ b/doc/src/compute_smd_tlsph_dt.rst @@ -32,7 +32,7 @@ time step. This calculation is performed automatically in the relevant SPH pair styles and this compute only serves to make the stable time increment accessible for output purposes. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_tlsph_num_neighs.rst b/doc/src/compute_smd_tlsph_num_neighs.rst index bc76ec260f..ef8c19d49c 100644 --- a/doc/src/compute_smd_tlsph_num_neighs.rst +++ b/doc/src/compute_smd_tlsph_num_neighs.rst @@ -27,7 +27,7 @@ Define a computation that calculates the number of particles inside of the smoothing kernel radius for particles interacting via the Total-Lagrangian SPH pair style. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_tlsph_shape.rst b/doc/src/compute_smd_tlsph_shape.rst index aefedb64eb..4a5abd868b 100644 --- a/doc/src/compute_smd_tlsph_shape.rst +++ b/doc/src/compute_smd_tlsph_shape.rst @@ -28,7 +28,7 @@ associated with a particle as a rotated ellipsoid. It is only meaningful for particles which interact according to the Total-Lagrangian SPH pair style. -See `this PDF guide `_ to use Smooth +See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_tlsph_strain.rst b/doc/src/compute_smd_tlsph_strain.rst index 3ecb509e9f..053488886b 100644 --- a/doc/src/compute_smd_tlsph_strain.rst +++ b/doc/src/compute_smd_tlsph_strain.rst @@ -26,7 +26,7 @@ Description Define a computation that calculates the Green-Lagrange strain tensor for particles interacting via the Total-Lagrangian SPH pair style. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_tlsph_strain_rate.rst b/doc/src/compute_smd_tlsph_strain_rate.rst index 41251d7095..2f3d561cee 100644 --- a/doc/src/compute_smd_tlsph_strain_rate.rst +++ b/doc/src/compute_smd_tlsph_strain_rate.rst @@ -26,7 +26,7 @@ Description Define a computation that calculates the rate of the strain tensor for particles interacting via the Total-Lagrangian SPH pair style. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_tlsph_stress.rst b/doc/src/compute_smd_tlsph_stress.rst index 11cec3bda8..4f0473f30a 100644 --- a/doc/src/compute_smd_tlsph_stress.rst +++ b/doc/src/compute_smd_tlsph_stress.rst @@ -26,7 +26,7 @@ Description Define a computation that outputs the Cauchy stress tensor for particles interacting via the Total-Lagrangian SPH pair style. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_triangle_vertices.rst b/doc/src/compute_smd_triangle_vertices.rst index d1aebfb29e..309c4260e9 100644 --- a/doc/src/compute_smd_triangle_vertices.rst +++ b/doc/src/compute_smd_triangle_vertices.rst @@ -26,7 +26,7 @@ Description Define a computation that returns the coordinates of the vertices corresponding to the triangle-elements of a mesh created by the :doc:`fix smd/wall_surface `. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_ulsph_effm.rst b/doc/src/compute_smd_ulsph_effm.rst index 4b4959fbe1..2d2b85ca21 100644 --- a/doc/src/compute_smd_ulsph_effm.rst +++ b/doc/src/compute_smd_ulsph_effm.rst @@ -26,7 +26,7 @@ Description Define a computation that outputs the effective shear modulus for particles interacting via the updated Lagrangian SPH pair style. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_ulsph_num_neighs.rst b/doc/src/compute_smd_ulsph_num_neighs.rst index c446c477c0..b7592fee9f 100644 --- a/doc/src/compute_smd_ulsph_num_neighs.rst +++ b/doc/src/compute_smd_ulsph_num_neighs.rst @@ -27,7 +27,7 @@ Define a computation that returns the number of neighbor particles inside of the smoothing kernel radius for particles interacting via the updated Lagrangian SPH pair style. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_ulsph_strain.rst b/doc/src/compute_smd_ulsph_strain.rst index 31defe4b32..9ece72c35c 100644 --- a/doc/src/compute_smd_ulsph_strain.rst +++ b/doc/src/compute_smd_ulsph_strain.rst @@ -26,7 +26,7 @@ Description Define a computation that outputs the logarithmic strain tensor. for particles interacting via the updated Lagrangian SPH pair style. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_ulsph_strain_rate.rst b/doc/src/compute_smd_ulsph_strain_rate.rst index 0a2ca91081..69e1040065 100644 --- a/doc/src/compute_smd_ulsph_strain_rate.rst +++ b/doc/src/compute_smd_ulsph_strain_rate.rst @@ -27,7 +27,7 @@ Define a computation that outputs the rate of the logarithmic strain tensor for particles interacting via the updated Lagrangian SPH pair style. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_ulsph_stress.rst b/doc/src/compute_smd_ulsph_stress.rst index a993a08c06..55f411158c 100644 --- a/doc/src/compute_smd_ulsph_stress.rst +++ b/doc/src/compute_smd_ulsph_stress.rst @@ -25,7 +25,7 @@ Description Define a computation that outputs the Cauchy stress tensor. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/compute_smd_vol.rst b/doc/src/compute_smd_vol.rst index f09c48e0ed..d31eb53785 100644 --- a/doc/src/compute_smd_vol.rst +++ b/doc/src/compute_smd_vol.rst @@ -26,7 +26,7 @@ Description Define a computation that provides the per-particle volume and the sum of the per-particle volumes of the group for which the fix is defined. -See `this PDF guide `_ to using Smooth +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Output info diff --git a/doc/src/fix_ave_spatial.rst b/doc/src/fix_ave_spatial.rst index 96d87bd8db..14c1518fd9 100644 --- a/doc/src/fix_ave_spatial.rst +++ b/doc/src/fix_ave_spatial.rst @@ -2,7 +2,7 @@ Fix ave/spatial command ======================= .. meta:: - :http-equiv=Refresh: 5; url='https://docs.lammps.org/Commands_removed.html#fix-ave-spatial-and-fix-ave-spatial-sphere' + :http-equiv=Refresh: 5; url=Commands_removed.html#fix-ave-spatial-and-fix-ave-spatial-sphere .. deprecated:: 11Dec2015 diff --git a/doc/src/fix_ave_spatial_sphere.rst b/doc/src/fix_ave_spatial_sphere.rst index a3cacc4115..c83b7c7f27 100644 --- a/doc/src/fix_ave_spatial_sphere.rst +++ b/doc/src/fix_ave_spatial_sphere.rst @@ -2,7 +2,7 @@ Fix ave/spatial command ======================= .. meta:: - :http-equiv=Refresh: 5; url='https://docs.lammps.org/Commands_removed.html#fix-ave-spatial-and-fix-ave-spatial-sphere' + :http-equiv=Refresh: 5; url=https://docs.lammps.org/Commands_removed.html#fix-ave-spatial-and-fix-ave-spatial-sphere .. deprecated:: 11Dec2015 diff --git a/doc/src/fix_smd_adjust_dt.rst b/doc/src/fix_smd_adjust_dt.rst index 0f1be7ed24..c0487cb1f7 100644 --- a/doc/src/fix_smd_adjust_dt.rst +++ b/doc/src/fix_smd_adjust_dt.rst @@ -43,7 +43,7 @@ This fix inquires the minimum stable time increment across all particles contained in the group for which this fix is defined. An additional safety factor *s_fact* is applied to the time increment. -See `this PDF guide `_ to use Smooth Mach +See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. Restart, fix_modify, output, run start/stop, minimize info diff --git a/doc/src/fix_smd_integrate_tlsph.rst b/doc/src/fix_smd_integrate_tlsph.rst index c4f5e61c7e..515b30d4ff 100644 --- a/doc/src/fix_smd_integrate_tlsph.rst +++ b/doc/src/fix_smd_integrate_tlsph.rst @@ -34,7 +34,7 @@ Description The fix performs explicit time integration for particles which interact according with the Total-Lagrangian SPH pair style. -See `this PDF guide `_ to using Smooth Mach +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. The *limit_velocity* keyword will control the velocity, scaling the diff --git a/doc/src/fix_smd_integrate_ulsph.rst b/doc/src/fix_smd_integrate_ulsph.rst index 8f2e0b2b88..17dfdb7b17 100644 --- a/doc/src/fix_smd_integrate_ulsph.rst +++ b/doc/src/fix_smd_integrate_ulsph.rst @@ -36,7 +36,7 @@ Description The fix performs explicit time integration for particles which interact with the updated Lagrangian SPH pair style. -See `this PDF guide `_ to using Smooth Mach +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. The *adjust_radius* keyword activates dynamic adjustment of the diff --git a/doc/src/fix_smd_move_triangulated_surface.rst b/doc/src/fix_smd_move_triangulated_surface.rst index 76f7240007..2eeb5a4d56 100644 --- a/doc/src/fix_smd_move_triangulated_surface.rst +++ b/doc/src/fix_smd_move_triangulated_surface.rst @@ -60,7 +60,7 @@ particle to (omega cross Rperp) where omega is its angular velocity around the rotation axis and Rperp is a perpendicular vector from the rotation axis to the particle. -See `this PDF guide `_ to using Smooth Mach +See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. Restart, fix_modify, output, run start/stop, minimize info diff --git a/doc/src/fix_smd_wall_surface.rst b/doc/src/fix_smd_wall_surface.rst index 192ab7a518..203bdb0ca5 100644 --- a/doc/src/fix_smd_wall_surface.rst +++ b/doc/src/fix_smd_wall_surface.rst @@ -47,7 +47,7 @@ be run for 0 timesteps in order to properly register the new particles in the system. See the "funnel_flow" example in the MACHDYN examples directory. -See `this PDF guide `_ to use Smooth Mach +See `this PDF guide `_ to use Smooth Mach Dynamics in LAMMPS. Restart, fix_modify, output, run start/stop, minimize info diff --git a/doc/src/pair_smd_tlsph.rst b/doc/src/pair_smd_tlsph.rst index 3884b0fec3..eb6dbcf07f 100644 --- a/doc/src/pair_smd_tlsph.rst +++ b/doc/src/pair_smd_tlsph.rst @@ -48,7 +48,7 @@ and a material model to compute shear stresses (the off-diagonal components of the stress tensor). Damage and failure models can also be added. -Please see the `SMD user guide `_ for a +Please see the `SMD user guide `_ for a complete listing of the possible keywords and material models. ---------- diff --git a/doc/src/pair_smd_ulsph.rst b/doc/src/pair_smd_ulsph.rst index fd63908e3d..b6c7df0530 100644 --- a/doc/src/pair_smd_ulsph.rst +++ b/doc/src/pair_smd_ulsph.rst @@ -59,7 +59,7 @@ Note that the use of \*GRADIENT_CORRECTION can lead to severe numerical instabilities. For a general fluid simulation, \*NO_GRADIENT_CORRECTION is recommended. -Please see the `SMD user guide `_ for a +Please see the `SMD user guide `_ for a complete listing of the possible keywords and material models. ---------- diff --git a/src/library.cpp b/src/library.cpp index 1214885cd3..7fcc22ef17 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -5302,7 +5302,7 @@ int lammps_config_has_jpeg_support() { \verbatim embed:rst The LAMMPS :doc:`dump style movie ` supports generating movies from images on-the-fly via creating a pipe to the -`ffmpeg `_ program. +`ffmpeg `_ program. This function checks whether this feature was :ref:`enabled at compile time `. It does **not** check whether the ``ffmpeg`` itself is installed and usable. \endverbatim From dfc9da802064eef974275c32e9d6d544d0afeae5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 19 Feb 2023 21:12:22 -0500 Subject: [PATCH 213/445] add link_check target calling linkchecker to manual build makefile --- doc/Makefile | 7 +++++++ doc/src/Build_manual.rst | 3 ++- doc/utils/requirements.txt | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/Makefile b/doc/Makefile index ec069fff96..a8e2ba5300 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -225,6 +225,13 @@ char_check : role_check : @( env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst && exit 1 || : ) +link_check : $(VENV) html + @(\ + . $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \ + linkchecker -F html --check-extern html/Manual.html ;\ + deactivate ;\ + ) + xmlgen : doxygen/xml/index.xml doxygen/Doxyfile: doxygen/Doxyfile.in diff --git a/doc/src/Build_manual.rst b/doc/src/Build_manual.rst index 33ba5937c7..d86ad85827 100644 --- a/doc/src/Build_manual.rst +++ b/doc/src/Build_manual.rst @@ -48,7 +48,7 @@ Build using GNU make The LAMMPS manual is written in `reStructuredText `_ format which can be translated to different output format using the `Sphinx -`_ document generator tool. It also +`_ document generator tool. It also incorporates programmer documentation extracted from the LAMMPS C++ sources through the `Doxygen `_ program. Currently the translation to HTML, PDF (via LaTeX), ePUB (for many e-book readers) @@ -87,6 +87,7 @@ folder. The following ``make`` commands are available: make anchor_check # check for duplicate anchor labels make style_check # check for complete and consistent style lists make package_check # check for complete and consistent package lists + make link_check # check for broken or outdated URLs make spelling # spell-check the manual ---------- diff --git a/doc/utils/requirements.txt b/doc/utils/requirements.txt index 6568622f0a..8bec6d4148 100644 --- a/doc/utils/requirements.txt +++ b/doc/utils/requirements.txt @@ -6,3 +6,4 @@ breathe Pygments six pyyaml +linkchecker From e1d013bf7bd0c08746b61fb51ca715d5b3176b02 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Mon, 20 Feb 2023 16:36:59 +0200 Subject: [PATCH 214/445] Include method declaration in pair_lj96_cut.h --- src/EXTRA-PAIR/pair_lj96_cut.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-PAIR/pair_lj96_cut.h b/src/EXTRA-PAIR/pair_lj96_cut.h index 658dbff35f..23273b4b04 100644 --- a/src/EXTRA-PAIR/pair_lj96_cut.h +++ b/src/EXTRA-PAIR/pair_lj96_cut.h @@ -41,6 +41,7 @@ class PairLJ96Cut : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void compute_inner() override; void compute_middle() override; From a59e4a961bef8cf5bab06984ca9eacd756732b08 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Mon, 20 Feb 2023 16:38:41 +0200 Subject: [PATCH 215/445] Implement born_matrix in pair_lj96_cut.cpp --- src/EXTRA-PAIR/pair_lj96_cut.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/EXTRA-PAIR/pair_lj96_cut.cpp b/src/EXTRA-PAIR/pair_lj96_cut.cpp index 1cc94e7827..e89f76bd4c 100644 --- a/src/EXTRA-PAIR/pair_lj96_cut.cpp +++ b/src/EXTRA-PAIR/pair_lj96_cut.cpp @@ -39,6 +39,7 @@ using namespace MathConst; PairLJ96Cut::PairLJ96Cut(LAMMPS *lmp) : Pair(lmp) { respa_enable = 1; + born_matrix_enable = 1; writedata = 1; cut_respa = nullptr; } @@ -682,3 +683,27 @@ double PairLJ96Cut::single(int /*i*/, int /*j*/, int itype, int jtype, double rs offset[itype][jtype]; return factor_lj*philj; } + +/* ---------------------------------------------------------------------- */ + +void PairLJ96Cut::born_matrix(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double factor_lj, double &dupair, + double &du2pair) +{ + double rinv, r2inv, r3inv, r6inv, du, du2; + + r2inv = 1.0/rsq; + rinv = sqrt(r2inv); + r6inv = r2inv * r2inv * r2inv; + r3inv = r2inv * rinv; + + // Reminder: lj1[i][j] = 36.0 * epsilon[i][j] * pow(sigma[i][j],9.0); + // Reminder: lj2[i][j] = 24.0 * epsilon[i][j] * pow(sigma[i][j],6.0); + + du = r6inv * rinv * (lj2[itype][jtype] - lj1[itype][jtype] * r3inv); + du2 = r6inv * r2inv * (10 * lj1[itype][jtype] * r6inv - 7 * lj2[itype][jtype]); + + dupair = factor_lj * du; + du2pair = factor_lj * du2; +} + From c7eaee117e8bc218a8fcef1d66ec0c6e35ee2b97 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 20 Feb 2023 12:48:03 -0500 Subject: [PATCH 216/445] eliminate gradgradflag class member and use flag from data class instead --- src/ML-IAP/compute_mliap.cpp | 6 +++--- src/ML-IAP/compute_mliap.h | 1 - src/ML-IAP/mliap_data.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ML-IAP/compute_mliap.cpp b/src/ML-IAP/compute_mliap.cpp index 161613fae6..4fa88abad1 100644 --- a/src/ML-IAP/compute_mliap.cpp +++ b/src/ML-IAP/compute_mliap.cpp @@ -55,7 +55,7 @@ ComputeMLIAP::ComputeMLIAP(LAMMPS *lmp, int narg, char **arg) : // default values - gradgradflag = 1; + int gradgradflag = 1; // set flags for required keywords @@ -230,7 +230,7 @@ void ComputeMLIAP::compute_array() descriptor->compute_descriptors(data); - if (gradgradflag == 1) { + if (data->gradgradflag == 1) { // calculate double gradient w.r.t. parameters and descriptors @@ -240,7 +240,7 @@ void ComputeMLIAP::compute_array() descriptor->compute_force_gradients(data); - } else if (gradgradflag == 0) { + } else if (data->gradgradflag == 0) { // calculate descriptor gradients diff --git a/src/ML-IAP/compute_mliap.h b/src/ML-IAP/compute_mliap.h index 6e4774020e..b5811751c3 100644 --- a/src/ML-IAP/compute_mliap.h +++ b/src/ML-IAP/compute_mliap.h @@ -42,7 +42,6 @@ class ComputeMLIAP : public Compute { int ndescriptors; // number of descriptors int nparams; // number of model parameters per element int nelements; - int gradgradflag; // 1 for graddesc, 0 for gamma class MLIAPModel *model; class MLIAPDescriptor *descriptor; class MLIAPData *data; diff --git a/src/ML-IAP/mliap_data.h b/src/ML-IAP/mliap_data.h index 618081de20..dc468b99cb 100644 --- a/src/ML-IAP/mliap_data.h +++ b/src/ML-IAP/mliap_data.h @@ -44,6 +44,7 @@ class MLIAPData : protected Pointers { int ndescriptors; // number of descriptors int nparams; // number of model parameters per element int nelements; // number of elements + int gradgradflag; // 1 for graddesc, 0 for gamma, -1 for pair style // data structures for grad-grad list (gamma) @@ -84,7 +85,6 @@ class MLIAPData : protected Pointers { int nmax; class NeighList *list; // LAMMPS neighbor list int *map; // map LAMMPS types to [0,nelements) - int gradgradflag; // 1 for graddesc, 0 for gamma, -1 for pair style }; } // namespace LAMMPS_NS From f7aae84cf6916a2981b3dd3559f003a3777e5854 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 20 Feb 2023 12:48:23 -0500 Subject: [PATCH 217/445] make gradgradflag a compile time constant --- src/KOKKOS/pair_mliap_kokkos.cpp | 2 +- src/ML-IAP/pair_mliap.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KOKKOS/pair_mliap_kokkos.cpp b/src/KOKKOS/pair_mliap_kokkos.cpp index 2178e32b85..0aab843811 100644 --- a/src/KOKKOS/pair_mliap_kokkos.cpp +++ b/src/KOKKOS/pair_mliap_kokkos.cpp @@ -278,7 +278,7 @@ void PairMLIAPKokkos::coeff(int narg, char **arg) { h_cutsq(itype,jtype) = descriptor->cutsq[map[itype]][map[jtype]]; k_cutsq.modify(); k_cutsq.sync(); - int gradgradflag = -1; + constexpr int gradgradflag = -1; delete data; data = new MLIAPDataKokkos(lmp, gradgradflag, map, model, descriptor, this); data->init(); diff --git a/src/ML-IAP/pair_mliap.cpp b/src/ML-IAP/pair_mliap.cpp index 929a32020b..66e8b848cd 100644 --- a/src/ML-IAP/pair_mliap.cpp +++ b/src/ML-IAP/pair_mliap.cpp @@ -260,7 +260,7 @@ void PairMLIAP::coeff(int narg, char **arg) model->init(); descriptor->init(); - int gradgradflag = -1; + constexpr int gradgradflag = -1; delete data; data = new MLIAPData(lmp, gradgradflag, map, model, descriptor, this); data->init(); From d5ba6f70f2dcced16282f084c8fb27f88ad8a91f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 20 Feb 2023 12:48:39 -0500 Subject: [PATCH 218/445] enable and apply clang-format --- src/ML-IAP/mliap_data.cpp | 123 +++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 68 deletions(-) diff --git a/src/ML-IAP/mliap_data.cpp b/src/ML-IAP/mliap_data.cpp index 1dee9167e8..1c817bd3bd 100644 --- a/src/ML-IAP/mliap_data.cpp +++ b/src/ML-IAP/mliap_data.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -27,16 +26,14 @@ using namespace LAMMPS_NS; -MLIAPData::MLIAPData(LAMMPS *lmp, int gradgradflag_in, int *map_in, - class MLIAPModel* model_in, - class MLIAPDescriptor* descriptor_in, - class PairMLIAP* pairmliap_in) : - Pointers(lmp), f(nullptr), gradforce(nullptr), betas(nullptr), - descriptors(nullptr), eatoms(nullptr), gamma(nullptr), - gamma_row_index(nullptr), gamma_col_index(nullptr), egradient(nullptr), - numneighs(nullptr), iatoms(nullptr), ielems(nullptr), pair_i(nullptr), - jatoms(nullptr), jelems(nullptr), elems(nullptr), rij(nullptr), - graddesc(nullptr), model(nullptr), descriptor(nullptr), list(nullptr) +MLIAPData::MLIAPData(LAMMPS *lmp, int gradgradflag_in, int *map_in, class MLIAPModel *model_in, + class MLIAPDescriptor *descriptor_in, class PairMLIAP *pairmliap_in) : + Pointers(lmp), + f(nullptr), gradforce(nullptr), betas(nullptr), descriptors(nullptr), eatoms(nullptr), + gamma(nullptr), gamma_row_index(nullptr), gamma_col_index(nullptr), egradient(nullptr), + numneighs(nullptr), iatoms(nullptr), ielems(nullptr), pair_i(nullptr), jatoms(nullptr), + jelems(nullptr), elems(nullptr), rij(nullptr), graddesc(nullptr), model(nullptr), + descriptor(nullptr), list(nullptr) { gradgradflag = gradgradflag_in; map = map_in; @@ -51,25 +48,24 @@ MLIAPData::MLIAPData(LAMMPS *lmp, int gradgradflag_in, int *map_in, gamma_nnz = model->get_gamma_nnz(this); ndims_force = 3; ndims_virial = 6; - yoffset = nparams*nelements; - zoffset = 2*yoffset; + yoffset = nparams * nelements; + zoffset = 2 * yoffset; natoms = atom->natoms; // must check before assigning bigint expression to regular int - if (1+ndims_force*natoms+ndims_virial > MAXSMALLINT) - error->all(FLERR,"Too many atoms for MLIAP package"); + if (1 + ndims_force * natoms + ndims_virial > MAXSMALLINT) + error->all(FLERR, "Too many atoms for MLIAP package"); - size_array_rows = 1+ndims_force*natoms+ndims_virial; - size_array_cols = nparams*nelements+1; - size_gradforce = ndims_force*nparams*nelements; + size_array_rows = 1 + ndims_force * natoms + ndims_virial; + size_array_cols = nparams * nelements + 1; + size_gradforce = ndims_force * nparams * nelements; nlistatoms_max = 0; natomneigh_max = 0; nneigh_max = 0; nmax = 0; natomgamma_max = 0; - } /* ---------------------------------------------------------------------- */ @@ -100,14 +96,14 @@ MLIAPData::~MLIAPData() void MLIAPData::init() { - memory->create(egradient,nelements*nparams,"MLIAPData:egradient"); + memory->create(egradient, nelements * nparams, "MLIAPData:egradient"); } /* ---------------------------------------------------------------------- generate neighbor arrays ------------------------------------------------------------------------- */ -void MLIAPData::generate_neighdata(NeighList* list_in, int eflag_in, int vflag_in) +void MLIAPData::generate_neighdata(NeighList *list_in, int eflag_in, int vflag_in) { list = list_in; f = atom->f; @@ -125,19 +121,16 @@ void MLIAPData::generate_neighdata(NeighList* list_in, int eflag_in, int vflag_i if (atom->nmax > nmax) { nmax = atom->nmax; - memory->grow(elems,nmax,"MLIAPData:elems"); - if (gradgradflag > -1) memory->grow(gradforce,nmax,size_gradforce, - "MLIAPData:gradforce"); + memory->grow(elems, nmax, "MLIAPData:elems"); + if (gradgradflag > -1) memory->grow(gradforce, nmax, size_gradforce, "MLIAPData:gradforce"); } // clear gradforce, elems arrays for (int i = 0; i < nall; i++) { elems[i] = 0; - if (gradgradflag > -1){ - for (int j = 0; j < size_gradforce; j++) { - gradforce[i][j] = 0.0; - } + if (gradgradflag > -1) { + for (int j = 0; j < size_gradforce; j++) { gradforce[i][j] = 0.0; } } } @@ -145,9 +138,9 @@ void MLIAPData::generate_neighdata(NeighList* list_in, int eflag_in, int vflag_i nlistatoms = list->inum; if (nlistatoms_max < nlistatoms) { - memory->grow(betas,nlistatoms,ndescriptors,"MLIAPData:betas"); - memory->grow(descriptors,nlistatoms,ndescriptors,"MLIAPData:descriptors"); - memory->grow(eatoms,nlistatoms,"MLIAPData:eatoms"); + memory->grow(betas, nlistatoms, ndescriptors, "MLIAPData:betas"); + memory->grow(descriptors, nlistatoms, ndescriptors, "MLIAPData:descriptors"); + memory->grow(eatoms, nlistatoms, "MLIAPData:eatoms"); nlistatoms_max = nlistatoms; } @@ -155,9 +148,9 @@ void MLIAPData::generate_neighdata(NeighList* list_in, int eflag_in, int vflag_i if (gradgradflag == 1) { if (natomgamma_max < nlistatoms) { - memory->grow(gamma_row_index,nlistatoms,gamma_nnz,"MLIAPData:gamma_row_index"); - memory->grow(gamma_col_index,nlistatoms,gamma_nnz,"MLIAPData:gamma_col_index"); - memory->grow(gamma,nlistatoms,gamma_nnz,"MLIAPData:gamma"); + memory->grow(gamma_row_index, nlistatoms, gamma_nnz, "MLIAPData:gamma_row_index"); + memory->grow(gamma_col_index, nlistatoms, gamma_nnz, "MLIAPData:gamma_col_index"); + memory->grow(gamma, nlistatoms, gamma_nnz, "MLIAPData:gamma"); natomgamma_max = nlistatoms; } } @@ -185,7 +178,7 @@ void MLIAPData::generate_neighdata(NeighList* list_in, int eflag_in, int vflag_i const double delx = x[j][0] - xtmp; const double dely = x[j][1] - ytmp; const double delz = x[j][2] - ztmp; - const double rsq = delx*delx + dely*dely + delz*delz; + const double rsq = delx * delx + dely * dely + delz * delz; int jtype = type[j]; const int jelem = map[jtype]; @@ -224,12 +217,11 @@ void MLIAPData::grow_neigharrays() // grow neighbor atom arrays if necessary natomneigh = list->inum; - if (list->ghost == 1) - natomneigh += list->gnum; + if (list->ghost == 1) natomneigh += list->gnum; if (natomneigh_max < natomneigh) { - memory->grow(iatoms,natomneigh,"MLIAPData:iatoms"); - memory->grow(ielems,natomneigh,"MLIAPData:ielems"); - memory->grow(numneighs,natomneigh,"MLIAPData:numneighs"); + memory->grow(iatoms, natomneigh, "MLIAPData:iatoms"); + memory->grow(ielems, natomneigh, "MLIAPData:ielems"); + memory->grow(numneighs, natomneigh, "MLIAPData:numneighs"); natomneigh_max = natomneigh; } @@ -261,7 +253,7 @@ void MLIAPData::grow_neigharrays() const double delx = x[j][0] - xtmp; const double dely = x[j][1] - ytmp; const double delz = x[j][2] - ztmp; - const double rsq = delx*delx + dely*dely + delz*delz; + const double rsq = delx * delx + dely * dely + delz * delz; int jtype = type[j]; const int jelem = map[jtype]; if (rsq < descriptor->cutsq[ielem][jelem]) ninside++; @@ -270,12 +262,11 @@ void MLIAPData::grow_neigharrays() } if (nneigh_max < nneigh) { - memory->grow(pair_i,nneigh,"MLIAPData:pair_i"); - memory->grow(jatoms,nneigh,"MLIAPData:jatoms"); - memory->grow(jelems,nneigh,"MLIAPData:jelems"); - memory->grow(rij,nneigh,3,"MLIAPData:rij"); - if (gradgradflag == 0) - memory->grow(graddesc,nneigh,ndescriptors,3,"MLIAPData:graddesc"); + memory->grow(pair_i, nneigh, "MLIAPData:pair_i"); + memory->grow(jatoms, nneigh, "MLIAPData:jatoms"); + memory->grow(jelems, nneigh, "MLIAPData:jelems"); + memory->grow(rij, nneigh, 3, "MLIAPData:rij"); + if (gradgradflag == 0) memory->grow(graddesc, nneigh, ndescriptors, 3, "MLIAPData:graddesc"); nneigh_max = nneigh; } } @@ -284,35 +275,31 @@ double MLIAPData::memory_usage() { double bytes = 0.0; - bytes += (double)nelements*nparams*sizeof(double); // egradient - bytes += (double)nmax*size_gradforce*sizeof(double); // gradforce - bytes += (double)nmax*sizeof(int); // elems + bytes += (double) nelements * nparams * sizeof(double); // egradient + bytes += (double) nmax * size_gradforce * sizeof(double); // gradforce + bytes += (double) nmax * sizeof(int); // elems if (gradgradflag == 1) { - bytes += (double)natomgamma_max* - gamma_nnz*sizeof(int); //gamma_row_index - bytes += (double)natomgamma_max* - gamma_nnz*sizeof(int); // gamma_col_index - bytes += (double)natomgamma_max* - gamma_nnz*sizeof(double); // gamma + bytes += (double) natomgamma_max * gamma_nnz * sizeof(int); //gamma_row_index + bytes += (double) natomgamma_max * gamma_nnz * sizeof(int); // gamma_col_index + bytes += (double) natomgamma_max * gamma_nnz * sizeof(double); // gamma } - bytes += (double)nlistatoms*ndescriptors*sizeof(int); // betas - bytes += (double)nlistatoms*ndescriptors*sizeof(int); // descriptors - bytes += (double)nlistatoms*sizeof(double); // eatoms + bytes += (double) nlistatoms * ndescriptors * sizeof(int); // betas + bytes += (double) nlistatoms * ndescriptors * sizeof(int); // descriptors + bytes += (double) nlistatoms * sizeof(double); // eatoms - bytes += (double)natomneigh_max*sizeof(int); // iatoms - bytes += (double)natomneigh_max*sizeof(int); // ielems - bytes += (double)natomneigh_max*sizeof(int); // numneighs + bytes += (double) natomneigh_max * sizeof(int); // iatoms + bytes += (double) natomneigh_max * sizeof(int); // ielems + bytes += (double) natomneigh_max * sizeof(int); // numneighs - bytes += (double)nneigh_max*sizeof(int); // pair_i - bytes += (double)nneigh_max*sizeof(int); // jatoms - bytes += (double)nneigh_max*sizeof(int); // jelems - bytes += (double)nneigh_max*3*sizeof(double); // rij" + bytes += (double) nneigh_max * sizeof(int); // pair_i + bytes += (double) nneigh_max * sizeof(int); // jatoms + bytes += (double) nneigh_max * sizeof(int); // jelems + bytes += (double) nneigh_max * 3 * sizeof(double); // rij" if (gradgradflag == 0) - bytes += (double)nneigh_max*ndescriptors*3*sizeof(double);// graddesc + bytes += (double) nneigh_max * ndescriptors * 3 * sizeof(double); // graddesc return bytes; } - From 994745bd5321ff77404fd73fba1bd7c621cc8a6e Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 21 Feb 2023 10:23:18 +0200 Subject: [PATCH 219/445] Include method declaration in angle_fourier_simple.h --- src/EXTRA-MOLECULE/angle_fourier_simple.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-MOLECULE/angle_fourier_simple.h b/src/EXTRA-MOLECULE/angle_fourier_simple.h index 49fae85d79..3296ba6067 100644 --- a/src/EXTRA-MOLECULE/angle_fourier_simple.h +++ b/src/EXTRA-MOLECULE/angle_fourier_simple.h @@ -35,6 +35,7 @@ class AngleFourierSimple : public Angle { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, int, int, int) override; + void born_matrix(int type, int i1, int i2, int i3, double &du, double &du2) override; protected: double *k, *C, *N; From ca8a1b80d924ed541af978b25f49d748f8dddc07 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 21 Feb 2023 10:25:04 +0200 Subject: [PATCH 220/445] Implement born_matrix in angle_fourier_simple.cpp --- src/EXTRA-MOLECULE/angle_fourier_simple.cpp | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/EXTRA-MOLECULE/angle_fourier_simple.cpp b/src/EXTRA-MOLECULE/angle_fourier_simple.cpp index 931b7c1f8f..0ba890b273 100644 --- a/src/EXTRA-MOLECULE/angle_fourier_simple.cpp +++ b/src/EXTRA-MOLECULE/angle_fourier_simple.cpp @@ -38,6 +38,7 @@ using namespace MathConst; AngleFourierSimple::AngleFourierSimple(LAMMPS *lmp) : Angle(lmp) { + born_matrix_enable = 1; k = nullptr; C = nullptr; N = nullptr; @@ -286,3 +287,32 @@ double AngleFourierSimple::single(int type, int i1, int i2, int i3) double eng = k[type] * (1.0 + C[type] * cn); return eng; } + +/* ---------------------------------------------------------------------- */ + +void AngleFourierSimple::born_matrix(int type, int i1, int i2, int i3, double &du, double &du2) +{ + double **x = atom->x; + + double delx1 = x[i1][0] - x[i2][0]; + double dely1 = x[i1][1] - x[i2][1]; + double delz1 = x[i1][2] - x[i2][2]; + domain->minimum_image(delx1,dely1,delz1); + double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1); + + double delx2 = x[i3][0] - x[i2][0]; + double dely2 = x[i3][1] - x[i2][1]; + double delz2 = x[i3][2] - x[i2][2]; + domain->minimum_image(delx2,dely2,delz2); + double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2); + + double c = delx1*delx2 + dely1*dely2 + delz1*delz2; + c /= r1*r2; + if (c > 1.0) c = 1.0; + if (c < -1.0) c = -1.0; + double theta = acos(c); + + du = k[type] * C[type] * N[type] * sin(N[type] * theta) / sin(theta); + du2 = k[type] * C[type] * N[type] * (cos(theta) * sin(N[type] * theta) + - N[type] * sin(theta) * cos(N[type] * theta)) / pow(sin(theta),3); +} From ee2b6315ec2fd16636fd01ea33cb8852b47a9d9d Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 21 Feb 2023 15:46:34 +0200 Subject: [PATCH 221/445] Include method declaration in angle_cosine_delta.h --- src/EXTRA-MOLECULE/angle_cosine_delta.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-MOLECULE/angle_cosine_delta.h b/src/EXTRA-MOLECULE/angle_cosine_delta.h index b562862da3..5fd3c01912 100644 --- a/src/EXTRA-MOLECULE/angle_cosine_delta.h +++ b/src/EXTRA-MOLECULE/angle_cosine_delta.h @@ -29,6 +29,7 @@ class AngleCosineDelta : public AngleCosineSquared { AngleCosineDelta(class LAMMPS *); void compute(int, int) override; double single(int, int, int, int) override; + void born_matrix(int type, int i1, int i2, int i3, double &du, double &du2) override; }; } // namespace LAMMPS_NS From 9611347d1b4013a8deeae3abd94266bdc324f5c1 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 21 Feb 2023 15:47:59 +0200 Subject: [PATCH 222/445] Implement born_matrix in angle_cosine_delta.cpp --- src/EXTRA-MOLECULE/angle_cosine_delta.cpp | 34 ++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/EXTRA-MOLECULE/angle_cosine_delta.cpp b/src/EXTRA-MOLECULE/angle_cosine_delta.cpp index 099f1a3c79..71acca6001 100644 --- a/src/EXTRA-MOLECULE/angle_cosine_delta.cpp +++ b/src/EXTRA-MOLECULE/angle_cosine_delta.cpp @@ -29,7 +29,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -AngleCosineDelta::AngleCosineDelta(LAMMPS *lmp) : AngleCosineSquared(lmp) {} +AngleCosineDelta::AngleCosineDelta(LAMMPS *lmp) : AngleCosineSquared(lmp) +{ + born_matrix_enable = 1; +} /* ---------------------------------------------------------------------- */ @@ -174,3 +177,32 @@ double AngleCosineDelta::single(int type, int i1, int i2, int i3) double tk = k[type] * (1.0-dcostheta); return tk; } + +/* ---------------------------------------------------------------------- */ + +void AngleCosineDelta::born_matrix(int type, int i1, int i2, int i3, double &du, double &du2) +{ + double **x = atom->x; + + double delx1 = x[i1][0] - x[i2][0]; + double dely1 = x[i1][1] - x[i2][1]; + double delz1 = x[i1][2] - x[i2][2]; + domain->minimum_image(delx1,dely1,delz1); + double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1); + + double delx2 = x[i3][0] - x[i2][0]; + double dely2 = x[i3][1] - x[i2][1]; + double delz2 = x[i3][2] - x[i2][2]; + domain->minimum_image(delx2,dely2,delz2); + double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2); + + double c = delx1*delx2 + dely1*dely2 + delz1*delz2; + c /= r1*r2; + if (c > 1.0) c = 1.0; + if (c < -1.0) c = -1.0; + double theta = acos(c); + + double dtheta = theta - theta0[type]; + du = -k[type] * sin(dtheta) / sin(theta); + du2 = k[type] * (cos(dtheta) * sin(theta) - sin(dtheta) * cos(theta)) / pow(sin(theta), 3); +} From ea9a498fcf06dce2be52214c54615c6596f21f1d Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 21 Feb 2023 15:54:13 +0200 Subject: [PATCH 223/445] Include method declaration in angle_cosine_shift.h --- src/EXTRA-MOLECULE/angle_cosine_shift.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-MOLECULE/angle_cosine_shift.h b/src/EXTRA-MOLECULE/angle_cosine_shift.h index fbf6437431..c4dfe6c923 100644 --- a/src/EXTRA-MOLECULE/angle_cosine_shift.h +++ b/src/EXTRA-MOLECULE/angle_cosine_shift.h @@ -35,6 +35,7 @@ class AngleCosineShift : public Angle { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, int, int, int) override; + void born_matrix(int type, int i1, int i2, int i3, double &du, double &du2) override; protected: double *k; From e3003ce294af14d6d68718d103aebc05b166b1ff Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 21 Feb 2023 16:09:58 +0200 Subject: [PATCH 224/445] Revert change in angle_cosine_shift.h --- src/EXTRA-MOLECULE/angle_cosine_shift.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/EXTRA-MOLECULE/angle_cosine_shift.h b/src/EXTRA-MOLECULE/angle_cosine_shift.h index c4dfe6c923..fbf6437431 100644 --- a/src/EXTRA-MOLECULE/angle_cosine_shift.h +++ b/src/EXTRA-MOLECULE/angle_cosine_shift.h @@ -35,7 +35,6 @@ class AngleCosineShift : public Angle { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, int, int, int) override; - void born_matrix(int type, int i1, int i2, int i3, double &du, double &du2) override; protected: double *k; From cdcc33aebc1e4775367cd66cc2fd0cbfd41a568b Mon Sep 17 00:00:00 2001 From: Jacob Gissinger Date: Tue, 21 Feb 2023 12:58:45 -0500 Subject: [PATCH 225/445] Revert "add simple bond/react unit test" This reverts commit f2713aad9431d8eb8f5d674aca9f3b320596f347. --- .../tests/fix-timestep-bond_react.yaml | 48 ------ .../tests/fourmol.molecule_template | 154 ------------------ unittest/force-styles/tests/fourmol.rxn_map | 28 ---- .../tests/fourmol_modified.molecule_template | 154 ------------------ 4 files changed, 384 deletions(-) delete mode 100644 unittest/force-styles/tests/fix-timestep-bond_react.yaml delete mode 100644 unittest/force-styles/tests/fourmol.molecule_template delete mode 100644 unittest/force-styles/tests/fourmol.rxn_map delete mode 100644 unittest/force-styles/tests/fourmol_modified.molecule_template diff --git a/unittest/force-styles/tests/fix-timestep-bond_react.yaml b/unittest/force-styles/tests/fix-timestep-bond_react.yaml deleted file mode 100644 index 8897208fe0..0000000000 --- a/unittest/force-styles/tests/fix-timestep-bond_react.yaml +++ /dev/null @@ -1,48 +0,0 @@ ---- -lammps_version: 8 Feb 2023 -date_generated: Fri Feb 10 12:00:00 2023 -epsilon: 2e-14 -skip_tests: -prerequisites: ! | - atom full - fix bond/react -pre_commands: ! "" -post_commands: ! | - molecule mol1 ${input_dir}/fourmol.molecule_template - molecule mol2 ${input_dir}/fourmol_modified.molecule_template - fix test all bond/react react rxn1 all 1 0 5 mol1 mol2 ${input_dir}/fourmol.rxn_map -input_file: in.fourmol -natoms: 29 -global_vector: ! |- - 1 1 -run_atom_types: ! |2 - 21 5 - 22 2 - 23 2 - 19 2 - 18 4 - 20 2 - 28 2 - 4 3 - 10 2 - 11 4 - 12 2 - 14 3 - 3 3 - 6 2 - 7 5 - 15 4 - 8 5 - 9 3 - 16 3 - 17 5 - 5 3 - 13 4 - 2 3 - 1 4 - 27 5 - 29 2 - 24 5 - 25 2 - 26 2 -... diff --git a/unittest/force-styles/tests/fourmol.molecule_template b/unittest/force-styles/tests/fourmol.molecule_template deleted file mode 100644 index 9d53791598..0000000000 --- a/unittest/force-styles/tests/fourmol.molecule_template +++ /dev/null @@ -1,154 +0,0 @@ -LAMMPS molecule file generated by VMD/TopoTools v1.7 on Sat Feb 11 12:41:31 -0500 2023 - 17 atoms - 16 bonds - 26 angles - 31 dihedrals - 2 impropers - - Coords - -1 -0.279937 2.472659 -0.172009 -2 0.301971 2.951524 -0.856897 -3 -0.694354 1.244047 -0.622338 -4 -1.577161 1.491533 -1.248713 -5 -0.895018 0.935681 0.402277 -6 0.294126 0.227193 -1.284309 -7 0.340199 -0.009128 -2.463311 -8 1.164119 -0.483753 -0.676598 -9 1.377746 -0.253663 0.268776 -10 2.018528 -1.428397 -0.967335 -11 1.792978 -1.987105 -1.884063 -12 3.003025 -0.489233 -1.618866 -13 4.044727 -0.901320 -1.638445 -14 2.603315 -0.407898 -2.655441 -15 2.975631 0.563343 -1.243765 -16 2.651755 -2.395711 0.032908 -17 2.230996 -2.102292 1.149195 - - Types - -1 3 -2 2 -3 1 -4 2 -5 2 -6 1 -7 4 -8 3 -9 2 -10 1 -11 2 -12 1 -13 2 -14 2 -15 2 -16 1 -17 4 - - Charges - -1 -0.470000 -2 0.310000 -3 -0.020000 -4 0.090000 -5 0.090000 -6 0.510000 -7 -0.510000 -8 -0.470000 -9 0.310000 -10 0.070000 -11 0.090000 -12 -0.270000 -13 0.090000 -14 0.090000 -15 0.090000 -16 0.510000 -17 -0.510000 - - Bonds - -1 1 1 2 -2 1 1 3 -3 1 3 4 -4 1 3 5 -5 1 3 6 -6 1 6 8 -7 1 6 7 -8 1 8 9 -9 1 8 10 -10 1 10 11 -11 1 10 12 -12 1 10 16 -13 1 12 13 -14 1 12 14 -15 1 12 15 -16 1 16 17 - - Angles - -1 1 2 1 3 -2 1 1 3 5 -3 1 1 3 4 -4 1 1 3 6 -5 1 4 3 5 -6 1 5 3 6 -7 1 4 3 6 -8 1 3 6 7 -9 1 3 6 8 -10 1 7 6 8 -11 1 6 8 9 -12 1 9 8 10 -13 1 6 8 10 -14 1 8 10 11 -15 1 8 10 16 -16 1 11 10 12 -17 1 12 10 16 -18 1 8 10 12 -19 1 11 10 16 -20 1 10 12 15 -21 1 10 12 14 -22 1 10 12 13 -23 1 13 12 15 -24 1 13 12 14 -25 1 14 12 15 -26 1 10 16 17 - - Dihedrals - -1 1 2 1 3 6 -2 1 2 1 3 4 -3 1 2 1 3 5 -4 1 1 3 6 8 -5 1 1 3 6 7 -6 1 4 3 6 8 -7 1 4 3 6 7 -8 1 5 3 6 8 -9 1 5 3 6 7 -10 1 3 6 8 9 -11 1 3 6 8 10 -12 1 7 6 8 9 -13 1 7 6 8 10 -14 1 6 8 10 12 -15 1 6 8 10 16 -16 1 6 8 10 11 -17 1 9 8 10 12 -18 1 9 8 10 16 -19 1 9 8 10 11 -20 1 8 10 12 13 -21 1 8 10 12 14 -22 1 8 10 12 15 -23 1 8 10 16 17 -24 1 11 10 12 13 -25 1 11 10 12 14 -26 1 11 10 12 15 -27 1 11 10 16 17 -28 1 12 10 16 17 -29 1 16 10 12 13 -30 1 16 10 12 14 -31 1 16 10 12 15 - - Impropers - -1 1 6 3 8 7 -2 1 8 6 10 9 - diff --git a/unittest/force-styles/tests/fourmol.rxn_map b/unittest/force-styles/tests/fourmol.rxn_map deleted file mode 100644 index cd810b41e0..0000000000 --- a/unittest/force-styles/tests/fourmol.rxn_map +++ /dev/null @@ -1,28 +0,0 @@ -map file for 'fix bond/react' - -17 equivalences - -InitiatorIDs - -6 -7 - -Equivalences - -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -11 11 -12 12 -13 13 -14 14 -15 15 -16 16 -17 17 diff --git a/unittest/force-styles/tests/fourmol_modified.molecule_template b/unittest/force-styles/tests/fourmol_modified.molecule_template deleted file mode 100644 index ce6f2c7f38..0000000000 --- a/unittest/force-styles/tests/fourmol_modified.molecule_template +++ /dev/null @@ -1,154 +0,0 @@ -LAMMPS molecule file generated by VMD/TopoTools v1.7 on Sat Feb 11 12:41:31 -0500 2023 - 17 atoms - 16 bonds - 26 angles - 31 dihedrals - 2 impropers - - Coords - -1 -0.279937 2.472659 -0.172009 -2 0.301971 2.951524 -0.856897 -3 -0.694354 1.244047 -0.622338 -4 -1.577161 1.491533 -1.248713 -5 -0.895018 0.935681 0.402277 -6 0.294126 0.227193 -1.284309 -7 0.340199 -0.009128 -2.463311 -8 1.164119 -0.483753 -0.676598 -9 1.377746 -0.253663 0.268776 -10 2.018528 -1.428397 -0.967335 -11 1.792978 -1.987105 -1.884063 -12 3.003025 -0.489233 -1.618866 -13 4.044727 -0.901320 -1.638445 -14 2.603315 -0.407898 -2.655441 -15 2.975631 0.563343 -1.243765 -16 2.651755 -2.395711 0.032908 -17 2.230996 -2.102292 1.149195 - - Types - -1 4 -2 3 -3 3 -4 3 -5 3 -6 2 -7 5 -8 5 -9 3 -10 2 -11 4 -12 2 -13 4 -14 3 -15 4 -16 3 -17 5 - - Charges - -1 -0.470000 -2 0.310000 -3 -0.020000 -4 0.090000 -5 0.090000 -6 0.510000 -7 -0.510000 -8 -0.470000 -9 0.310000 -10 0.070000 -11 0.090000 -12 -0.270000 -13 0.090000 -14 0.090000 -15 0.090000 -16 0.510000 -17 -0.510000 - - Bonds - -1 1 1 2 -2 1 1 3 -3 1 3 4 -4 1 3 5 -5 1 3 6 -6 1 6 8 -7 1 6 7 -8 1 8 9 -9 1 8 10 -10 1 10 11 -11 1 10 12 -12 1 10 16 -13 1 12 13 -14 1 12 14 -15 1 12 15 -16 1 16 17 - - Angles - -1 1 2 1 3 -2 1 1 3 5 -3 1 1 3 4 -4 1 1 3 6 -5 1 4 3 5 -6 1 5 3 6 -7 1 4 3 6 -8 1 3 6 7 -9 1 3 6 8 -10 1 7 6 8 -11 1 6 8 9 -12 1 9 8 10 -13 1 6 8 10 -14 1 8 10 11 -15 1 8 10 16 -16 1 11 10 12 -17 1 12 10 16 -18 1 8 10 12 -19 1 11 10 16 -20 1 10 12 15 -21 1 10 12 14 -22 1 10 12 13 -23 1 13 12 15 -24 1 13 12 14 -25 1 14 12 15 -26 1 10 16 17 - - Dihedrals - -1 1 2 1 3 6 -2 1 2 1 3 4 -3 1 2 1 3 5 -4 1 1 3 6 8 -5 1 1 3 6 7 -6 1 4 3 6 8 -7 1 4 3 6 7 -8 1 5 3 6 8 -9 1 5 3 6 7 -10 1 3 6 8 9 -11 1 3 6 8 10 -12 1 7 6 8 9 -13 1 7 6 8 10 -14 1 6 8 10 12 -15 1 6 8 10 16 -16 1 6 8 10 11 -17 1 9 8 10 12 -18 1 9 8 10 16 -19 1 9 8 10 11 -20 1 8 10 12 13 -21 1 8 10 12 14 -22 1 8 10 12 15 -23 1 8 10 16 17 -24 1 11 10 12 13 -25 1 11 10 12 14 -26 1 11 10 12 15 -27 1 11 10 16 17 -28 1 12 10 16 17 -29 1 16 10 12 13 -30 1 16 10 12 14 -31 1 16 10 12 15 - - Impropers - -1 1 6 3 8 7 -2 1 8 6 10 9 - From 633ae8bc405750ed800b98ae0ce62a02f3db5f81 Mon Sep 17 00:00:00 2001 From: Jacob Gissinger Date: Tue, 21 Feb 2023 12:58:55 -0500 Subject: [PATCH 226/445] Revert "add 'atom type' test option to force style tests" This reverts commit 7709dfa11854561d92dd7e05d4bb76f864bdd89c. --- unittest/force-styles/test_config.h | 2 -- unittest/force-styles/test_config_reader.cpp | 15 --------------- unittest/force-styles/test_config_reader.h | 1 - unittest/force-styles/test_fix_timestep.cpp | 12 ------------ unittest/force-styles/test_main.cpp | 19 ------------------- unittest/force-styles/test_main.h | 1 - 6 files changed, 50 deletions(-) diff --git a/unittest/force-styles/test_config.h b/unittest/force-styles/test_config.h index e3d6c06033..b284052d6d 100644 --- a/unittest/force-styles/test_config.h +++ b/unittest/force-styles/test_config.h @@ -70,7 +70,6 @@ public: std::vector restart_pos; std::vector run_vel; std::vector restart_vel; - std::vector run_atom_types; TestConfig() : lammps_version(""), date_generated(""), basename(""), epsilon(1.0e-14), input_file(""), @@ -95,7 +94,6 @@ public: restart_pos.clear(); run_vel.clear(); restart_vel.clear(); - run_atom_types.clear(); global_vector.clear(); } TestConfig(const TestConfig &) = delete; diff --git a/unittest/force-styles/test_config_reader.cpp b/unittest/force-styles/test_config_reader.cpp index 5eb41db4bf..3f99f251a5 100644 --- a/unittest/force-styles/test_config_reader.cpp +++ b/unittest/force-styles/test_config_reader.cpp @@ -48,7 +48,6 @@ TestConfigReader::TestConfigReader(TestConfig &config) : config(config) consumers["run_forces"] = &TestConfigReader::run_forces; consumers["run_pos"] = &TestConfigReader::run_pos; consumers["run_vel"] = &TestConfigReader::run_vel; - consumers["run_atom_types"] = &TestConfigReader::run_atom_types; consumers["pair_style"] = &TestConfigReader::pair_style; consumers["pair_coeff"] = &TestConfigReader::pair_coeff; @@ -229,20 +228,6 @@ void TestConfigReader::run_vel(const yaml_event_t &event) } } -void TestConfigReader::run_atom_types(const yaml_event_t &event) -{ - config.run_atom_types.clear(); - config.run_atom_types.resize(config.natoms + 1); - std::stringstream data((char *)event.data.scalar.value); - std::string line; - - while (std::getline(data, line, '\n')) { - int tag, atom_type; - sscanf(line.c_str(), "%d %d", &tag, &atom_type); - config.run_atom_types[tag] = atom_type; - } -} - void TestConfigReader::pair_style(const yaml_event_t &event) { config.pair_style = (char *)event.data.scalar.value; diff --git a/unittest/force-styles/test_config_reader.h b/unittest/force-styles/test_config_reader.h index 91512da655..1af7589add 100644 --- a/unittest/force-styles/test_config_reader.h +++ b/unittest/force-styles/test_config_reader.h @@ -41,7 +41,6 @@ public: void run_forces(const yaml_event_t &event); void run_pos(const yaml_event_t &event); void run_vel(const yaml_event_t &event); - void run_atom_types(const yaml_event_t &event); void pair_style(const yaml_event_t &event); void pair_coeff(const yaml_event_t &event); void bond_style(const yaml_event_t &event); diff --git a/unittest/force-styles/test_fix_timestep.cpp b/unittest/force-styles/test_fix_timestep.cpp index 302425ebd3..d2e35b463f 100644 --- a/unittest/force-styles/test_fix_timestep.cpp +++ b/unittest/force-styles/test_fix_timestep.cpp @@ -284,7 +284,6 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (normal run, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (normal run, verlet)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (normal run, verlet)", lmp->atom, test_config.run_atom_types); int ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -335,7 +334,6 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (restart, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (restart, verlet)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (restart, verlet)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -375,7 +373,6 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (rmass, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (rmass, verlet)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (rmass, verlet)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -429,7 +426,6 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (normal run, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (normal run, respa)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (normal run, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -468,7 +464,6 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (restart, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (restart, respa)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (restart, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -508,7 +503,6 @@ TEST(FixTimestep, plain) EXPECT_POSITIONS("run_pos (rmass, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (rmass, respa)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (rmass, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -590,7 +584,6 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (normal run, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (normal run, verlet)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (normal run, verlet)", lmp->atom, test_config.run_atom_types); int ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -641,7 +634,6 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (restart, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (restart, verlet)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (restart, verlet)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -681,7 +673,6 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (rmass, verlet)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (rmass, verlet)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (rmass, verlet)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -734,7 +725,6 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (normal run, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (normal run, respa)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (normal run, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -773,7 +763,6 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (restart, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (restart, respa)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (restart, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { @@ -813,7 +802,6 @@ TEST(FixTimestep, omp) EXPECT_POSITIONS("run_pos (rmass, respa)", lmp->atom, test_config.run_pos, epsilon); EXPECT_VELOCITIES("run_vel (rmass, respa)", lmp->atom, test_config.run_vel, epsilon); - EXPECT_ATOM_TYPES("run_atom_types (rmass, respa)", lmp->atom, test_config.run_atom_types); ifix = lmp->modify->find_fix("test"); if (ifix < 0) { diff --git a/unittest/force-styles/test_main.cpp b/unittest/force-styles/test_main.cpp index 4a98c489be..80f1ca4e30 100644 --- a/unittest/force-styles/test_main.cpp +++ b/unittest/force-styles/test_main.cpp @@ -70,7 +70,6 @@ void EXPECT_FORCES(const std::string &name, Atom *atom, const std::vector &x_ref, double epsilon) { - if (x_ref.empty()) return; SCOPED_TRACE("EXPECT_POSITIONS: " + name); double **x = atom->x; tagint *tag = atom->tag; @@ -88,7 +87,6 @@ void EXPECT_POSITIONS(const std::string &name, Atom *atom, const std::vector &v_ref, double epsilon) { - if (v_ref.empty()) return; SCOPED_TRACE("EXPECT_VELOCITIES: " + name); double **v = atom->v; tagint *tag = atom->tag; @@ -103,23 +101,6 @@ void EXPECT_VELOCITIES(const std::string &name, Atom *atom, const std::vector &at_ref) -{ - if (at_ref.empty()) return; - SCOPED_TRACE("EXPECT_ATOM_TYPES: " + name); - int *type = atom->type; - tagint *tag = atom->tag; - const int nlocal = atom->nlocal; - ASSERT_EQ(nlocal + 1, at_ref.size()); - ErrorStats stats; - for (int i = 0; i < nlocal; ++i) { - EXPECT_EQ(type[i], at_ref[tag[i]]); - EXPECT_EQ(type[i], at_ref[tag[i]]); - EXPECT_EQ(type[i], at_ref[tag[i]]); - } - if (print_stats) std::cerr << name << " stats" << stats << std::endl; -} - // common read_yaml_file function bool read_yaml_file(const char *infile, TestConfig &config) { diff --git a/unittest/force-styles/test_main.h b/unittest/force-styles/test_main.h index ede7402cdc..36bcd7bdff 100644 --- a/unittest/force-styles/test_main.h +++ b/unittest/force-styles/test_main.h @@ -41,6 +41,5 @@ void EXPECT_STRESS(const std::string & name, double * stress, const stress_t & e void EXPECT_FORCES(const std::string & name, LAMMPS_NS::Atom * atom, const std::vector & f_ref, double epsilon); void EXPECT_POSITIONS(const std::string & name, LAMMPS_NS::Atom * atom, const std::vector & x_ref, double epsilon); void EXPECT_VELOCITIES(const std::string & name, LAMMPS_NS::Atom * atom, const std::vector & v_ref, double epsilon); -void EXPECT_ATOM_TYPES(const std::string & name, LAMMPS_NS::Atom * atom, const std::vector & at_ref); #endif From 6c5c93438cc739678d1ba45182a3663132fd461c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 21 Feb 2023 15:00:48 -0500 Subject: [PATCH 227/445] update for ROCm 5.4.3 and CUDA 12.0 --- tools/singularity/ubuntu18.04_gpu.def | 37 ++++++++++++++------------- tools/singularity/ubuntu20.04_gpu.def | 36 +++++++++++++------------- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/tools/singularity/ubuntu18.04_gpu.def b/tools/singularity/ubuntu18.04_gpu.def index cab62c623f..0bfccf915b 100644 --- a/tools/singularity/ubuntu18.04_gpu.def +++ b/tools/singularity/ubuntu18.04_gpu.def @@ -2,18 +2,17 @@ BootStrap: docker From: ubuntu:18.04 %environment - export PATH=/usr/lib/ccache:/usr/local/cuda-11.7/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 - export CUDADIR=/usr/local/cuda-11.7 - export CUDA_PATH=/usr/local/cuda-11.7 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.7/lib64:/opt/rocm/lib:/opt/rocm-5.1.3/llvm/lib - export LIBRARY_PATH=/usr/local/cuda-11.7/lib64/stubs + export PATH=/usr/lib/ccache:/usr/local/cuda-12.0/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 + export CUDADIR=/usr/local/cuda-12.0 + export CUDA_PATH=/usr/local/cuda-12.0 + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-12.0/lib64:/opt/rocm/lib:/opt/rocm-5.4.3/llvm/lib + export LIBRARY_PATH=/usr/local/cuda-12.0/lib64/stubs %post export DEBIAN_FRONTEND=noninteractive apt-get update apt-get upgrade --no-install-recommends -y apt-get install -y --no-install-recommends curl wget libnuma-dev gnupg ca-certificates - apt-get install --no-install-recommends -y software-properties-common ########################################################################### # Latest CMake @@ -25,10 +24,10 @@ From: ubuntu:18.04 apt install -y cmake ########################################################################### - # ROCm 4.5 + # ROCm 5.4.3 ########################################################################### - wget https://repo.radeon.com/amdgpu-install/22.10.3/ubuntu/focal/amdgpu-install_22.10.3.50103-1_all.deb - apt-get install -y ./amdgpu-install_22.10.3.50103-1_all.deb + wget https://repo.radeon.com/amdgpu-install/5.4.3/ubuntu/focal/amdgpu-install_5.4.50403-1_all.deb + apt-get install -y ./amdgpu-install_5.4.50403-1_all.deb apt-get update apt-get install --no-install-recommends -y \ @@ -48,6 +47,7 @@ From: ubuntu:18.04 ########################################################################### # Common Software ########################################################################### + apt-get install --no-install-recommends -y software-properties-common add-apt-repository ppa:openkim/latest -y apt-get update apt-get install --no-install-recommends -y \ @@ -120,13 +120,13 @@ From: ubuntu:18.04 # CUDA ########################################################################### - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin - mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub - add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" + wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb + dpkg -i cuda-keyring_1.0-1_all.deb + rm cuda-keyring_1.0-1_all.deb apt-get update - export CUDA_PKG_VERSION=11.7 + export CUDA_PKG_VERSION=12.0 + export CUDA_DRV_VERSION=525 apt-get install -y --no-install-recommends \ cuda-libraries-${CUDA_PKG_VERSION} \ @@ -135,7 +135,8 @@ From: ubuntu:18.04 cuda-minimal-build-${CUDA_PKG_VERSION} \ cuda-compat-$CUDA_PKG_VERSION \ libcublas-${CUDA_PKG_VERSION} \ - libcublas-dev-${CUDA_PKG_VERSION} + libcublas-dev-${CUDA_PKG_VERSION} \ + libnvidia-compute-${CUDA_DRV_VERSION} # add missing symlink ln -s /usr/local/cuda-${CUDA_PKG_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_PKG_VERSION}/lib64/stubs/libcuda.so.1 @@ -144,8 +145,8 @@ From: ubuntu:18.04 # NVIDIA OpenCL ########################################################################### - mkdir -p /etc/OpenCL/vendors - echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd + test ! -d /etc/OpenCL/vendors && mkdir -p /etc/OpenCL/vendors && \ + echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd ########################################################################### @@ -182,7 +183,7 @@ From: ubuntu:18.04 tar -xzf plumed.tar.gz cd plumed-${PLUMED_PKG_VERSION} ./configure --disable-doc --prefix=/usr - make + make -j 4 make install cd ../../ rm -rvf plumed diff --git a/tools/singularity/ubuntu20.04_gpu.def b/tools/singularity/ubuntu20.04_gpu.def index f84c1f8926..05da01ccac 100644 --- a/tools/singularity/ubuntu20.04_gpu.def +++ b/tools/singularity/ubuntu20.04_gpu.def @@ -2,11 +2,11 @@ BootStrap: docker From: ubuntu:20.04 %environment - export PATH=/usr/lib/ccache:/usr/local/cuda-11.7/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 - export CUDADIR=/usr/local/cuda-11.7 - export CUDA_PATH=/usr/local/cuda-11.7 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.7/lib64:/opt/rocm/lib:/opt/rocm-5.1.3/llvm/lib - export LIBRARY_PATH=/usr/local/cuda-11.7/lib64/stubs + export PATH=/usr/lib/ccache:/usr/local/cuda-12.0/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 + export CUDADIR=/usr/local/cuda-12.0 + export CUDA_PATH=/usr/local/cuda-12.0 + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-12.0/lib64:/opt/rocm/lib:/opt/rocm-5.4.3/llvm/lib + export LIBRARY_PATH=/usr/local/cuda-12.0/lib64/stubs %post export DEBIAN_FRONTEND=noninteractive apt-get update @@ -15,10 +15,10 @@ From: ubuntu:20.04 apt-get install -y --no-install-recommends curl wget libnuma-dev gnupg ca-certificates ########################################################################### - # ROCm 5.1.3 + # ROCm 5.4.3 ########################################################################### - wget https://repo.radeon.com/amdgpu-install/22.10.3/ubuntu/focal/amdgpu-install_22.10.3.50103-1_all.deb - apt-get install -y ./amdgpu-install_22.10.3.50103-1_all.deb + wget https://repo.radeon.com/amdgpu-install/5.4.3/ubuntu/focal/amdgpu-install_5.4.50403-1_all.deb + apt-get install -y ./amdgpu-install_5.4.50403-1_all.deb apt-get update apt-get install --no-install-recommends -y \ @@ -107,13 +107,13 @@ From: ubuntu:20.04 # CUDA ########################################################################### - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin - mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub - add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" + wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb + dpkg -i cuda-keyring_1.0-1_all.deb + rm cuda-keyring_1.0-1_all.deb apt-get update - export CUDA_PKG_VERSION=11.5 + export CUDA_PKG_VERSION=12.0 + export CUDA_DRV_VERSION=525 apt-get install -y --no-install-recommends \ cuda-libraries-${CUDA_PKG_VERSION} \ @@ -122,7 +122,8 @@ From: ubuntu:20.04 cuda-minimal-build-${CUDA_PKG_VERSION} \ cuda-compat-$CUDA_PKG_VERSION \ libcublas-${CUDA_PKG_VERSION} \ - libcublas-dev-${CUDA_PKG_VERSION} + libcublas-dev-${CUDA_PKG_VERSION} \ + libnvidia-compute-${CUDA_DRV_VERSION} # add missing symlink ln -s /usr/local/cuda-${CUDA_PKG_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_PKG_VERSION}/lib64/stubs/libcuda.so.1 @@ -131,9 +132,8 @@ From: ubuntu:20.04 # NVIDIA OpenCL ########################################################################### - mkdir -p /etc/OpenCL/vendors - echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd - + test ! -d /etc/OpenCL/vendors && mkdir -p /etc/OpenCL/vendors && \ + echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd ########################################################################### # KIM-API @@ -169,7 +169,7 @@ From: ubuntu:20.04 tar -xzf plumed.tar.gz cd plumed-${PLUMED_PKG_VERSION} ./configure --disable-doc --prefix=/usr - make + make -j 4 make install cd ../../ rm -rvf plumed From 1aa7a6c8b869396a7e859cd7f5d097dff80f6789 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 21 Feb 2023 15:47:59 -0500 Subject: [PATCH 228/445] update from Aidan --- doc/src/compute_sna_atom.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/compute_sna_atom.rst b/doc/src/compute_sna_atom.rst index b17db625f8..d604ca9d29 100644 --- a/doc/src/compute_sna_atom.rst +++ b/doc/src/compute_sna_atom.rst @@ -451,7 +451,10 @@ piece of python code: for j in range(j1-j2,min(twojmax,j1+j2)+1,2): if (j>=j1): print j1/2.,j2/2.,j/2. -For even twojmax = 2(*m*\ -1), :math:`K = m(m+1)(2m+1)/6`, the *m*\ -th pyramidal number. For odd twojmax = 2 *m*\ -1, :math:`K = m(m+1)(m+2)/3`, twice the *m*\ -th tetrahedral number. +There are :math:`m(m+1)/2` descriptors with last index *j*, +where *m* = :math:`\lfloor j \rfloor + 1`. +Hence, for even *twojmax* = 2(*m*\ -1), :math:`K = m(m+1)(2m+1)/6`, the *m*\ -th pyramidal number, +and for odd *twojmax* = 2 *m*\ -1, :math:`K = m(m+1)(m+2)/3`, twice the *m*\ -th tetrahedral number. .. note:: From c647be0287548c370e09fbf6bebe4e7537e833a6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 21 Feb 2023 18:11:59 -0500 Subject: [PATCH 229/445] avoid segfault when atom style peri is used in a hybrid atom style --- src/PERI/atom_vec_peri.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index f0cbd6eb04..e393bc28b6 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -88,12 +88,13 @@ void AtomVecPeri::grow_pointers() void AtomVecPeri::create_atom_post(int ilocal) { + const auto xinit = atom->x; vfrac[ilocal] = 1.0; rmass[ilocal] = 1.0; s0[ilocal] = DBL_MAX; - x0[ilocal][0] = x[ilocal][0]; - x0[ilocal][1] = x[ilocal][1]; - x0[ilocal][2] = x[ilocal][2]; + x0[ilocal][0] = xinit[ilocal][0]; + x0[ilocal][1] = xinit[ilocal][1]; + x0[ilocal][2] = xinit[ilocal][2]; } /* ---------------------------------------------------------------------- @@ -103,10 +104,11 @@ void AtomVecPeri::create_atom_post(int ilocal) void AtomVecPeri::data_atom_post(int ilocal) { + const auto xinit = atom->x; s0[ilocal] = DBL_MAX; - x0[ilocal][0] = x[ilocal][0]; - x0[ilocal][1] = x[ilocal][1]; - x0[ilocal][2] = x[ilocal][2]; + x0[ilocal][0] = xinit[ilocal][0]; + x0[ilocal][1] = xinit[ilocal][1]; + x0[ilocal][2] = xinit[ilocal][2]; if (rmass[ilocal] <= 0.0) error->one(FLERR, "Invalid mass in Atoms section of data file"); } From febaf55afe7598935703858640333715533470e8 Mon Sep 17 00:00:00 2001 From: Norbert Podhorszki Date: Wed, 22 Feb 2023 07:28:00 -0500 Subject: [PATCH 230/445] Fix the adios2::ADIOS constructor calls that were deprecated in adios 2.8 and removed in 2.9. The fix is backward compatible with older adios2 versions as well. --- src/ADIOS/dump_atom_adios.cpp | 4 ++-- src/ADIOS/dump_custom_adios.cpp | 4 ++-- src/ADIOS/reader_adios.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ADIOS/dump_atom_adios.cpp b/src/ADIOS/dump_atom_adios.cpp index a807480758..7754fdf04e 100644 --- a/src/ADIOS/dump_atom_adios.cpp +++ b/src/ADIOS/dump_atom_adios.cpp @@ -63,9 +63,9 @@ DumpAtomADIOS::DumpAtomADIOS(LAMMPS *lmp, int narg, char **arg) : DumpAtom(lmp, internal = new DumpAtomADIOSInternal(); try { #if defined(MPI_STUBS) - internal->ad = new adios2::ADIOS("adios2_config.xml", adios2::DebugON); + internal->ad = new adios2::ADIOS("adios2_config.xml"); #else - internal->ad = new adios2::ADIOS("adios2_config.xml", world, adios2::DebugON); + internal->ad = new adios2::ADIOS("adios2_config.xml", world); #endif } catch (std::ios_base::failure &e) { error->all(FLERR, "ADIOS initialization failed with error: {}", e.what()); diff --git a/src/ADIOS/dump_custom_adios.cpp b/src/ADIOS/dump_custom_adios.cpp index f90cc9640e..61abc9e6a7 100644 --- a/src/ADIOS/dump_custom_adios.cpp +++ b/src/ADIOS/dump_custom_adios.cpp @@ -71,9 +71,9 @@ DumpCustomADIOS::DumpCustomADIOS(LAMMPS *lmp, int narg, char **arg) : DumpCustom internal = new DumpCustomADIOSInternal(); try { #if defined(MPI_STUBS) - internal->ad = new adios2::ADIOS("adios2_config.xml", adios2::DebugON); + internal->ad = new adios2::ADIOS("adios2_config.xml"); #else - internal->ad = new adios2::ADIOS("adios2_config.xml", world, adios2::DebugON); + internal->ad = new adios2::ADIOS("adios2_config.xml", world); #endif } catch (std::ios_base::failure &e) { error->all(FLERR, "ADIOS initialization failed with error: {}", e.what()); diff --git a/src/ADIOS/reader_adios.cpp b/src/ADIOS/reader_adios.cpp index 655df98d26..362192479e 100644 --- a/src/ADIOS/reader_adios.cpp +++ b/src/ADIOS/reader_adios.cpp @@ -83,9 +83,9 @@ ReaderADIOS::ReaderADIOS(LAMMPS *lmp) : Reader(lmp) internal = new ReadADIOSInternal(); try { #if defined(MPI_STUBS) - internal->ad = new adios2::ADIOS("adios2_config.xml", adios2::DebugON); + internal->ad = new adios2::ADIOS("adios2_config.xml"); #else - internal->ad = new adios2::ADIOS("adios2_config.xml", world, adios2::DebugON); + internal->ad = new adios2::ADIOS("adios2_config.xml", world); #endif } catch (std::ios_base::failure &e) { error->one(FLERR, "ADIOS initialization failed with error: {}", e.what()); From 27f07206f691c3e6f56ec6ddb283363fb5510029 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 22 Feb 2023 17:15:13 +0200 Subject: [PATCH 231/445] Include method declaration in angle_harmonic.h --- src/MOLECULE/angle_harmonic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/angle_harmonic.h b/src/MOLECULE/angle_harmonic.h index c50df2ab4e..284a5316ef 100644 --- a/src/MOLECULE/angle_harmonic.h +++ b/src/MOLECULE/angle_harmonic.h @@ -35,6 +35,7 @@ class AngleHarmonic : public Angle { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, int, int, int) override; + void born_matrix(int type, int i1, int i2, int i3, double &du, double &du2) override; void *extract(const char *, int &) override; protected: From c1a37ac00fc0a5b67a8187c112161ab9430c434e Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 22 Feb 2023 17:16:56 +0200 Subject: [PATCH 232/445] Implement born_matrix in angle_harmonic.cpp --- src/MOLECULE/angle_harmonic.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/MOLECULE/angle_harmonic.cpp b/src/MOLECULE/angle_harmonic.cpp index 4d0683b9bc..64f1c62f1e 100644 --- a/src/MOLECULE/angle_harmonic.cpp +++ b/src/MOLECULE/angle_harmonic.cpp @@ -35,6 +35,7 @@ static constexpr double SMALL = 0.001; AngleHarmonic::AngleHarmonic(LAMMPS *_lmp) : Angle(_lmp) { + born_matrix_enable = 1; k = nullptr; theta0 = nullptr; } @@ -266,6 +267,35 @@ double AngleHarmonic::single(int type, int i1, int i2, int i3) return tk * dtheta; } +/* ---------------------------------------------------------------------- */ + +void AngleHarmonic::born_matrix(int type, int i1, int i2, int i3, double &du, double &du2) +{ + double **x = atom->x; + + double delx1 = x[i1][0] - x[i2][0]; + double dely1 = x[i1][1] - x[i2][1]; + double delz1 = x[i1][2] - x[i2][2]; + domain->minimum_image(delx1,dely1,delz1); + double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1); + + double delx2 = x[i3][0] - x[i2][0]; + double dely2 = x[i3][1] - x[i2][1]; + double delz2 = x[i3][2] - x[i2][2]; + domain->minimum_image(delx2,dely2,delz2); + double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2); + + double c = delx1*delx2 + dely1*dely2 + delz1*delz2; + c /= r1*r2; + if (c > 1.0) c = 1.0; + if (c < -1.0) c = -1.0; + double theta = acos(c); + + double dtheta = theta - theta0[type]; + du = -2 * k[type] * dtheta / sin(theta); + du2 = 2 * k[type] * (sin(theta) - dtheta * cos(theta)) / pow(sin(theta), 3) +} + /* ---------------------------------------------------------------------- return ptr to internal members upon request ------------------------------------------------------------------------ */ From 4814578d85a5ca089b2ac1d9dfbd97e0a2f1a8a9 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 22 Feb 2023 17:22:17 +0200 Subject: [PATCH 233/445] Fixing missing semicolon --- src/MOLECULE/angle_harmonic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MOLECULE/angle_harmonic.cpp b/src/MOLECULE/angle_harmonic.cpp index 64f1c62f1e..e9f1c528ef 100644 --- a/src/MOLECULE/angle_harmonic.cpp +++ b/src/MOLECULE/angle_harmonic.cpp @@ -293,7 +293,7 @@ void AngleHarmonic::born_matrix(int type, int i1, int i2, int i3, double &du, do double dtheta = theta - theta0[type]; du = -2 * k[type] * dtheta / sin(theta); - du2 = 2 * k[type] * (sin(theta) - dtheta * cos(theta)) / pow(sin(theta), 3) + du2 = 2 * k[type] * (sin(theta) - dtheta * cos(theta)) / pow(sin(theta), 3); } /* ---------------------------------------------------------------------- From fc0d23965bf089b51881c8350b2cb21f7af61c5f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 22 Feb 2023 16:48:01 -0500 Subject: [PATCH 234/445] small cleanup --- src/MOLECULE/bond_table.cpp | 14 ++++++-------- src/MOLECULE/bond_table.h | 1 - 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/MOLECULE/bond_table.cpp b/src/MOLECULE/bond_table.cpp index bf5bbaf19d..f2e6194052 100644 --- a/src/MOLECULE/bond_table.cpp +++ b/src/MOLECULE/bond_table.cpp @@ -140,7 +140,7 @@ void BondTable::settings(int narg, char **arg) else if (strcmp(arg[0], "spline") == 0) tabstyle = SPLINE; else - error->all(FLERR, "Unknown table style in bond style table"); + error->all(FLERR, "Unknown table style {} in bond style table", arg[0]); tablength = utils::inumeric(FLERR, arg[1], false, lmp); if (tablength < 2) error->all(FLERR, "Illegal number of bond table entries"); @@ -172,17 +172,15 @@ void BondTable::coeff(int narg, char **arg) int ilo, ihi; utils::bounds(FLERR, arg[0], 1, atom->nbondtypes, ilo, ihi, error); - int me; - MPI_Comm_rank(world, &me); tables = (Table *) memory->srealloc(tables, (ntables + 1) * sizeof(Table), "bond:tables"); Table *tb = &tables[ntables]; null_table(tb); - if (me == 0) read_table(tb, arg[1], arg[2]); + if (comm->me == 0) read_table(tb, arg[1], arg[2]); bcast_table(tb); // error check on table parameters - if (tb->ninput <= 1) error->one(FLERR, "Invalid bond table length"); + if (tb->ninput <= 1) error->all(FLERR, "Invalid bond table length"); tb->lo = tb->rfile[0]; tb->hi = tb->rfile[tb->ninput - 1]; @@ -507,9 +505,9 @@ void BondTable::bcast_table(Table *tb) int me; MPI_Comm_rank(world, &me); if (me > 0) { - memory->create(tb->rfile, tb->ninput, "angle:rfile"); - memory->create(tb->efile, tb->ninput, "angle:efile"); - memory->create(tb->ffile, tb->ninput, "angle:ffile"); + memory->create(tb->rfile, tb->ninput, "bond:rfile"); + memory->create(tb->efile, tb->ninput, "bond:efile"); + memory->create(tb->ffile, tb->ninput, "bond:ffile"); } MPI_Bcast(tb->rfile, tb->ninput, MPI_DOUBLE, 0, world); diff --git a/src/MOLECULE/bond_table.h b/src/MOLECULE/bond_table.h index 18d517719c..bc62fd2799 100644 --- a/src/MOLECULE/bond_table.h +++ b/src/MOLECULE/bond_table.h @@ -69,7 +69,6 @@ class BondTable : public Bond { double splint(double *, double *, double *, int, double); void uf_lookup(int, double, double &, double &); - void u_lookup(int, double, double &); }; } // namespace LAMMPS_NS From 1411d48d9e1b480764cf3ec663db63468d33f1ea Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 22 Feb 2023 10:09:29 -0500 Subject: [PATCH 235/445] prepare fix wall argument parser to support wall/lepton and wall/table --- src/fix_wall.cpp | 76 ++++++++++++++++++++++++++++++------------------ src/fix_wall.h | 4 +-- 2 files changed, 50 insertions(+), 30 deletions(-) diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index d624ee9ff7..4477b7b22d 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -53,14 +53,21 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : fldflag = 0; int pbcflag = 0; - for (int i = 0; i < 6; i++) xstr[i] = estr[i] = sstr[i] = nullptr; + for (int i = 0; i < 6; i++) xstr[i] = estr[i] = sstr[i] = lstr[i] = tstr[i] = nullptr; int iarg = 3; + tabfile = nullptr; + if (utils::strmatch(style, "^wall/table")) { + if (iarg + 1 > narg) error->all(FLERR, "Missing argument for fix {} command", style); + tabfile = arg[iarg]; + ++iarg; + } + while (iarg < narg) { if ((strcmp(arg[iarg],"xlo") == 0) || (strcmp(arg[iarg],"xhi") == 0) || (strcmp(arg[iarg],"ylo") == 0) || (strcmp(arg[iarg],"yhi") == 0) || (strcmp(arg[iarg],"zlo") == 0) || (strcmp(arg[iarg],"zhi") == 0)) { - if (iarg+5 > narg) error->all(FLERR,"Illegal fix wall command"); + if (iarg + 4 > narg) error->all(FLERR, "Missing argument for fix {} command", style); int newwall; if (strcmp(arg[iarg],"xlo") == 0) newwall = XLO; @@ -89,37 +96,50 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : coord0[nwall] = utils::numeric(FLERR,arg[iarg+1],false,lmp); } - if (utils::strmatch(arg[iarg+2],"^v_")) { - estr[nwall] = utils::strdup(arg[iarg+2]+2); - estyle[nwall] = VARIABLE; + if (utils::strmatch(style, "^wall/lepton")) { + lstr[nwall] = utils::strdup(arg[iarg + 2]); + cutoff[nwall] = utils::numeric(FLERR, arg[iarg + 3], false, lmp); + nwall++; + iarg += 4; + } else if (utils::strmatch(style, "^wall/table")) { + tstr[nwall] = utils::strdup(arg[iarg + 2]); + cutoff[nwall] = utils::numeric(FLERR, arg[iarg + 3], false, lmp); + nwall++; + iarg += 4; } else { - epsilon[nwall] = utils::numeric(FLERR,arg[iarg+2],false,lmp); - estyle[nwall] = CONSTANT; - } + if (iarg + 5 > narg) error->all(FLERR, "Missing argument for fix {} command", style); - if (utils::strmatch(style,"^wall/morse")) { - if (utils::strmatch(arg[iarg+3],"^v_")) { - astr[nwall] = utils::strdup(arg[iarg+3]+2); - astyle[nwall] = VARIABLE; + if (utils::strmatch(arg[iarg + 2], "^v_")) { + estr[nwall] = utils::strdup(arg[iarg + 2] + 2); + estyle[nwall] = VARIABLE; } else { - alpha[nwall] = utils::numeric(FLERR,arg[iarg+3],false,lmp); - astyle[nwall] = CONSTANT; + epsilon[nwall] = utils::numeric(FLERR, arg[iarg + 2], false, lmp); + estyle[nwall] = CONSTANT; } - ++iarg; + + if (utils::strmatch(style, "^wall/morse")) { + if (utils::strmatch(arg[iarg + 3], "^v_")) { + astr[nwall] = utils::strdup(arg[iarg + 3] + 2); + astyle[nwall] = VARIABLE; + } else { + alpha[nwall] = utils::numeric(FLERR, arg[iarg + 3], false, lmp); + astyle[nwall] = CONSTANT; + } + ++iarg; + } + + if (utils::strmatch(arg[iarg + 3], "^v_")) { + sstr[nwall] = utils::strdup(arg[iarg + 3] + 2); + sstyle[nwall] = VARIABLE; + } else { + sigma[nwall] = utils::numeric(FLERR, arg[iarg + 3], false, lmp); + sstyle[nwall] = CONSTANT; + } + cutoff[nwall] = utils::numeric(FLERR, arg[iarg + 4], false, lmp); + nwall++; + iarg += 5; } - - if (utils::strmatch(arg[iarg+3],"^v_")) { - sstr[nwall] = utils::strdup(arg[iarg+3]+2); - sstyle[nwall] = VARIABLE; - } else { - sigma[nwall] = utils::numeric(FLERR,arg[iarg+3],false,lmp); - sstyle[nwall] = CONSTANT; - } - - cutoff[nwall] = utils::numeric(FLERR,arg[iarg+4],false,lmp); - nwall++; - iarg += 5; - + } else if (strcmp(arg[iarg], "units") == 0) { } else if (strcmp(arg[iarg],"units") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix wall command"); if (strcmp(arg[iarg+1],"box") == 0) scaleflag = 0; diff --git a/src/fix_wall.h b/src/fix_wall.h index 32fccea2b3..8fd0ef6910 100644 --- a/src/fix_wall.h +++ b/src/fix_wall.h @@ -50,8 +50,8 @@ class FixWall : public Fix { double xscale, yscale, zscale; int estyle[6], sstyle[6], astyle[6], wstyle[6]; int eindex[6], sindex[6]; - char *estr[6], *sstr[6], *astr[6]; - int varflag; // 1 if any wall position,epsilon,sigma is a var + char *estr[6], *sstr[6], *astr[6], *lstr[6], *tstr[6], *tabfile; + int varflag; // 1 if any wall position,epsilon,sigma is a variable int eflag; // per-wall flag for energy summation int ilevel_respa; int fldflag; From 94ac3895f982d4a9b945213e3e256b76fa4187b9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 22 Feb 2023 10:10:15 -0500 Subject: [PATCH 236/445] enable and apply clang-format, improve error messages. --- src/fix_wall.cpp | 185 ++++++++++++++++++++++++++--------------------- 1 file changed, 103 insertions(+), 82 deletions(-) diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index 4477b7b22d..cbea053dab 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -28,14 +27,14 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{XLO=0,XHI=1,YLO=2,YHI=3,ZLO=4,ZHI=5}; -enum{NONE=0,EDGE,CONSTANT,VARIABLE}; +enum { XLO = 0, XHI = 1, YLO = 2, YHI = 3, ZLO = 4, ZHI = 5 }; +enum { NONE = 0, EDGE, CONSTANT, VARIABLE }; + +static const char *wallpos[] = {"xlo", "xhi", "ylo", "yhi", "zlo", "zhi"}; /* ---------------------------------------------------------------------- */ -FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), - nwall(0) +FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), nwall(0) { scalar_flag = 1; vector_flag = 1; @@ -64,36 +63,46 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : } while (iarg < narg) { - if ((strcmp(arg[iarg],"xlo") == 0) || (strcmp(arg[iarg],"xhi") == 0) || - (strcmp(arg[iarg],"ylo") == 0) || (strcmp(arg[iarg],"yhi") == 0) || - (strcmp(arg[iarg],"zlo") == 0) || (strcmp(arg[iarg],"zhi") == 0)) { + if ((strcmp(arg[iarg], "xlo") == 0) || (strcmp(arg[iarg], "xhi") == 0) || + (strcmp(arg[iarg], "ylo") == 0) || (strcmp(arg[iarg], "yhi") == 0) || + (strcmp(arg[iarg], "zlo") == 0) || (strcmp(arg[iarg], "zhi") == 0)) { if (iarg + 4 > narg) error->all(FLERR, "Missing argument for fix {} command", style); int newwall; - if (strcmp(arg[iarg],"xlo") == 0) newwall = XLO; - else if (strcmp(arg[iarg],"xhi") == 0) newwall = XHI; - else if (strcmp(arg[iarg],"ylo") == 0) newwall = YLO; - else if (strcmp(arg[iarg],"yhi") == 0) newwall = YHI; - else if (strcmp(arg[iarg],"zlo") == 0) newwall = ZLO; - else if (strcmp(arg[iarg],"zhi") == 0) newwall = ZHI; - - for (int m = 0; (m < nwall) && (m < 6); m++) + if (strcmp(arg[iarg], "xlo") == 0) { + newwall = XLO; + } else if (strcmp(arg[iarg], "xhi") == 0) { + newwall = XHI; + } else if (strcmp(arg[iarg], "ylo") == 0) { + newwall = YLO; + } else if (strcmp(arg[iarg], "yhi") == 0) { + newwall = YHI; + } else if (strcmp(arg[iarg], "zlo") == 0) { + newwall = ZLO; + } else if (strcmp(arg[iarg], "zhi") == 0) { + newwall = ZHI; + } + for (int m = 0; (m < nwall) && (m < 6); m++) { if (newwall == wallwhich[m]) - error->all(FLERR,"Wall defined twice in fix wall command"); - + error->all(FLERR, "{} wall defined twice in fix {} command", wallpos[newwall], style); + } wallwhich[nwall] = newwall; - if (strcmp(arg[iarg+1],"EDGE") == 0) { + + if (strcmp(arg[iarg + 1], "EDGE") == 0) { xstyle[nwall] = EDGE; int dim = wallwhich[nwall] / 2; int side = wallwhich[nwall] % 2; - if (side == 0) coord0[nwall] = domain->boxlo[dim]; - else coord0[nwall] = domain->boxhi[dim]; - } else if (utils::strmatch(arg[iarg+1],"^v_")) { + if (side == 0) { + coord0[nwall] = domain->boxlo[dim]; + } else { + coord0[nwall] = domain->boxhi[dim]; + } + } else if (utils::strmatch(arg[iarg + 1], "^v_")) { xstyle[nwall] = VARIABLE; - xstr[nwall] = utils::strdup(arg[iarg+1]+2); + xstr[nwall] = utils::strdup(arg[iarg + 1] + 2); } else { xstyle[nwall] = CONSTANT; - coord0[nwall] = utils::numeric(FLERR,arg[iarg+1],false,lmp); + coord0[nwall] = utils::numeric(FLERR, arg[iarg + 1], false, lmp); } if (utils::strmatch(style, "^wall/lepton")) { @@ -140,44 +149,48 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : iarg += 5; } } else if (strcmp(arg[iarg], "units") == 0) { - } else if (strcmp(arg[iarg],"units") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal fix wall command"); - if (strcmp(arg[iarg+1],"box") == 0) scaleflag = 0; - else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = 1; - else error->all(FLERR,"Illegal fix wall command"); + if (iarg + 2 > narg) error->all(FLERR, "Illegal fix {} command", style); + if (strcmp(arg[iarg + 1], "box") == 0) + scaleflag = 0; + else if (strcmp(arg[iarg + 1], "lattice") == 0) + scaleflag = 1; + else + error->all(FLERR, "Illegal fix {} command", style); iarg += 2; - } else if (strcmp(arg[iarg],"fld") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal fix wall command"); - fldflag = utils::logical(FLERR,arg[iarg+1],false,lmp); + } else if (strcmp(arg[iarg], "fld") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal fix {} command", style); + fldflag = utils::logical(FLERR, arg[iarg + 1], false, lmp); iarg += 2; - } else if (strcmp(arg[iarg],"pbc") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal fix wall command"); - pbcflag = utils::logical(FLERR,arg[iarg+1],false,lmp); + } else if (strcmp(arg[iarg], "pbc") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal fix {} command", style); + pbcflag = utils::logical(FLERR, arg[iarg + 1], false, lmp); iarg += 2; - } else error->all(FLERR,"Illegal fix wall command"); + } else + error->all(FLERR, "Illegal fix {} command", style); } size_vector = nwall; // error checks - if (nwall == 0) error->all(FLERR,"Illegal fix wall command"); - for (int m = 0; m < nwall; m++) + if (nwall == 0) error->all(FLERR, "Illegal fix {} command: no walls defined", style); + for (int m = 0; m < nwall; m++) { if (cutoff[m] <= 0.0) - error->all(FLERR,"Fix wall cutoff <= 0.0"); + error->all(FLERR, "Fix {} cutoff <= 0.0 for {} wall", style, wallpos[wallwhich[m]]); + } for (int m = 0; m < nwall; m++) if ((wallwhich[m] == ZLO || wallwhich[m] == ZHI) && domain->dimension == 2) - error->all(FLERR,"Cannot use fix wall zlo/zhi for a 2d simulation"); + error->all(FLERR, "Cannot use fix {} zlo/zhi for a 2d simulation", style); if (!pbcflag) { for (int m = 0; m < nwall; m++) { if ((wallwhich[m] == XLO || wallwhich[m] == XHI) && domain->xperiodic) - error->all(FLERR,"Cannot use fix wall in periodic dimension"); + error->all(FLERR, "Cannot use {} wall in periodic x dimension", wallpos[wallwhich[m]]); if ((wallwhich[m] == YLO || wallwhich[m] == YHI) && domain->yperiodic) - error->all(FLERR,"Cannot use fix wall in periodic dimension"); + error->all(FLERR, "Cannot use {} wall in periodic y dimension", wallpos[wallwhich[m]]); if ((wallwhich[m] == ZLO || wallwhich[m] == ZHI) && domain->zperiodic) - error->all(FLERR,"Cannot use fix wall in periodic dimension"); + error->all(FLERR, "Cannot use {} wall in periodic z dimension", wallpos[wallwhich[m]]); } } @@ -192,14 +205,17 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : xscale = domain->lattice->xlattice; yscale = domain->lattice->ylattice; zscale = domain->lattice->zlattice; - } - else xscale = yscale = zscale = 1.0; + } else + xscale = yscale = zscale = 1.0; for (int m = 0; m < nwall; m++) { if (xstyle[m] != CONSTANT) continue; - if (wallwhich[m] < YLO) coord0[m] *= xscale; - else if (wallwhich[m] < ZLO) coord0[m] *= yscale; - else coord0[m] *= zscale; + if (wallwhich[m] < YLO) + coord0[m] *= xscale; + else if (wallwhich[m] < ZLO) + coord0[m] *= yscale; + else + coord0[m] *= zscale; } } @@ -211,8 +227,10 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : for (int m = 0; m < nwall; m++) { if (xstyle[m] == VARIABLE) xflag = 1; if (xflag || estyle[m] == VARIABLE || sstyle[m] == VARIABLE) varflag = 1; - if (estyle[m] == VARIABLE || sstyle[m] == VARIABLE) wstyle[m] = VARIABLE; - else wstyle[m] = CONSTANT; + if (estyle[m] == VARIABLE || sstyle[m] == VARIABLE) + wstyle[m] = VARIABLE; + else + wstyle[m] = CONSTANT; } eflag = 0; @@ -226,9 +244,11 @@ FixWall::~FixWall() if (copymode) return; for (int m = 0; m < nwall; m++) { - delete [] xstr[m]; - delete [] estr[m]; - delete [] sstr[m]; + delete[] xstr[m]; + delete[] estr[m]; + delete[] sstr[m]; + delete[] lstr[m]; + delete[] tstr[m]; } } @@ -240,8 +260,10 @@ int FixWall::setmask() // FLD implicit needs to invoke wall forces before pair style - if (fldflag) mask |= PRE_FORCE; - else mask |= POST_FORCE; + if (fldflag) + mask |= PRE_FORCE; + else + mask |= POST_FORCE; mask |= POST_FORCE_RESPA; mask |= MIN_POST_FORCE; @@ -255,24 +277,21 @@ void FixWall::init() for (int m = 0; m < nwall; m++) { if (xstyle[m] == VARIABLE) { xindex[m] = input->variable->find(xstr[m]); - if (xindex[m] < 0) - error->all(FLERR,"Variable name for fix wall does not exist"); + if (xindex[m] < 0) error->all(FLERR, "Variable name for fix wall does not exist"); if (!input->variable->equalstyle(xindex[m])) - error->all(FLERR,"Variable for fix wall is invalid style"); + error->all(FLERR, "Variable for fix wall is invalid style"); } if (estyle[m] == VARIABLE) { eindex[m] = input->variable->find(estr[m]); - if (eindex[m] < 0) - error->all(FLERR,"Variable name for fix wall does not exist"); + if (eindex[m] < 0) error->all(FLERR, "Variable name for fix wall does not exist"); if (!input->variable->equalstyle(eindex[m])) - error->all(FLERR,"Variable for fix wall is invalid style"); + error->all(FLERR, "Variable for fix wall is invalid style"); } if (sstyle[m] == VARIABLE) { sindex[m] = input->variable->find(sstr[m]); - if (sindex[m] < 0) - error->all(FLERR,"Variable name for fix wall does not exist"); + if (sindex[m] < 0) error->all(FLERR, "Variable name for fix wall does not exist"); if (!input->variable->equalstyle(sindex[m])) - error->all(FLERR,"Variable for fix wall is invalid style"); + error->all(FLERR, "Variable for fix wall is invalid style"); } } @@ -280,9 +299,9 @@ void FixWall::init() for (int m = 0; m < nwall; m++) precompute(m); - if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; - if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); + if (utils::strmatch(update->integrate_style, "^respa")) { + ilevel_respa = (dynamic_cast(update->integrate))->nlevels - 1; + if (respa_level >= 0) ilevel_respa = MIN(respa_level, ilevel_respa); } } @@ -290,11 +309,11 @@ void FixWall::init() void FixWall::setup(int vflag) { - if (utils::strmatch(update->integrate_style,"^verlet")) { + if (utils::strmatch(update->integrate_style, "^verlet")) { if (!fldflag) post_force(vflag); } else { (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); - post_force_respa(vflag,ilevel_respa,0); + post_force_respa(vflag, ilevel_respa, 0); (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } @@ -339,25 +358,27 @@ void FixWall::post_force(int vflag) for (int m = 0; m < nwall; m++) { if (xstyle[m] == VARIABLE) { coord = input->variable->compute_equal(xindex[m]); - if (wallwhich[m] < YLO) coord *= xscale; - else if (wallwhich[m] < ZLO) coord *= yscale; - else coord *= zscale; - } else coord = coord0[m]; + if (wallwhich[m] < YLO) + coord *= xscale; + else if (wallwhich[m] < ZLO) + coord *= yscale; + else + coord *= zscale; + } else + coord = coord0[m]; if (wstyle[m] == VARIABLE) { if (estyle[m] == VARIABLE) { epsilon[m] = input->variable->compute_equal(eindex[m]); - if (epsilon[m] < 0.0) - error->all(FLERR,"Variable evaluation in fix wall gave bad value"); + if (epsilon[m] < 0.0) error->all(FLERR, "Variable evaluation in fix wall gave bad value"); } if (sstyle[m] == VARIABLE) { sigma[m] = input->variable->compute_equal(sindex[m]); - if (sigma[m] < 0.0) - error->all(FLERR,"Variable evaluation in fix wall gave bad value"); + if (sigma[m] < 0.0) error->all(FLERR, "Variable evaluation in fix wall gave bad value"); } precompute(m); } - wall_particle(m,wallwhich[m],coord); + wall_particle(m, wallwhich[m], coord); } if (varflag) modify->addstep_compute(update->ntimestep + 1); @@ -386,7 +407,7 @@ double FixWall::compute_scalar() // only sum across procs one time if (eflag == 0) { - MPI_Allreduce(ewall,ewall_all,nwall+1,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(ewall, ewall_all, nwall + 1, MPI_DOUBLE, MPI_SUM, world); eflag = 1; } return ewall_all[0]; @@ -401,8 +422,8 @@ double FixWall::compute_vector(int n) // only sum across procs one time if (eflag == 0) { - MPI_Allreduce(ewall,ewall_all,nwall+1,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(ewall, ewall_all, nwall + 1, MPI_DOUBLE, MPI_SUM, world); eflag = 1; } - return ewall_all[n+1]; + return ewall_all[n + 1]; } From f4d8b2a57af575ccb9560089ebe4fa36e01b31a7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 22 Feb 2023 15:35:09 -0500 Subject: [PATCH 237/445] remove unused namespace import --- src/COLLOID/fix_wall_colloid.cpp | 1 - src/EXTRA-FIX/fix_wall_ees.cpp | 1 - src/EXTRA-FIX/fix_wall_reflect_stochastic.cpp | 1 - src/GRANULAR/fix_wall_gran_region.cpp | 1 - src/KOKKOS/fix_wall_lj93_kokkos.cpp | 1 - src/KOKKOS/fix_wall_reflect_kokkos.cpp | 1 - src/SHOCK/fix_wall_piston.cpp | 20 ++++++++++--------- src/SRD/fix_wall_srd.cpp | 1 - src/fix_wall_harmonic.cpp | 1 - src/fix_wall_lj126.cpp | 1 - src/fix_wall_lj93.cpp | 1 - src/fix_wall_morse.cpp | 1 - 12 files changed, 11 insertions(+), 20 deletions(-) diff --git a/src/COLLOID/fix_wall_colloid.cpp b/src/COLLOID/fix_wall_colloid.cpp index d21856bc60..3160fadb53 100644 --- a/src/COLLOID/fix_wall_colloid.cpp +++ b/src/COLLOID/fix_wall_colloid.cpp @@ -24,7 +24,6 @@ #include using namespace LAMMPS_NS; -using namespace FixConst; /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-FIX/fix_wall_ees.cpp b/src/EXTRA-FIX/fix_wall_ees.cpp index bbddd919af..d9bc2a8450 100644 --- a/src/EXTRA-FIX/fix_wall_ees.cpp +++ b/src/EXTRA-FIX/fix_wall_ees.cpp @@ -26,7 +26,6 @@ #include using namespace LAMMPS_NS; -using namespace FixConst; /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-FIX/fix_wall_reflect_stochastic.cpp b/src/EXTRA-FIX/fix_wall_reflect_stochastic.cpp index 7899c88473..c0b44530e8 100644 --- a/src/EXTRA-FIX/fix_wall_reflect_stochastic.cpp +++ b/src/EXTRA-FIX/fix_wall_reflect_stochastic.cpp @@ -31,7 +31,6 @@ #include using namespace LAMMPS_NS; -using namespace FixConst; enum{NONE,DIFFUSIVE,MAXWELL,CCL}; diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index f1bd55a7bc..68afce2b0b 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -29,7 +29,6 @@ #include using namespace LAMMPS_NS; -using namespace FixConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/fix_wall_lj93_kokkos.cpp b/src/KOKKOS/fix_wall_lj93_kokkos.cpp index 03bf6cf8ea..dff47f1c30 100644 --- a/src/KOKKOS/fix_wall_lj93_kokkos.cpp +++ b/src/KOKKOS/fix_wall_lj93_kokkos.cpp @@ -19,7 +19,6 @@ #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace FixConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/fix_wall_reflect_kokkos.cpp b/src/KOKKOS/fix_wall_reflect_kokkos.cpp index 32b9ee61b1..a8a01c1926 100644 --- a/src/KOKKOS/fix_wall_reflect_kokkos.cpp +++ b/src/KOKKOS/fix_wall_reflect_kokkos.cpp @@ -24,7 +24,6 @@ #include using namespace LAMMPS_NS; -using namespace FixConst; enum{XLO=0,XHI=1,YLO=2,YHI=3,ZLO=4,ZHI=5}; enum{NONE=0,EDGE,CONSTANT,VARIABLE}; diff --git a/src/SHOCK/fix_wall_piston.cpp b/src/SHOCK/fix_wall_piston.cpp index 82cec907f4..cb20e2d683 100644 --- a/src/SHOCK/fix_wall_piston.cpp +++ b/src/SHOCK/fix_wall_piston.cpp @@ -13,17 +13,19 @@ ------------------------------------------------------------------------- */ #include "fix_wall_piston.h" + +#include "atom.h" +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "lattice.h" +#include "math_const.h" +#include "random_mars.h" +#include "update.h" + #include #include -#include "atom.h" -#include "domain.h" -#include "lattice.h" -#include "update.h" -#include "error.h" -#include "random_mars.h" -#include "force.h" -#include "comm.h" -#include "math_const.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/SRD/fix_wall_srd.cpp b/src/SRD/fix_wall_srd.cpp index ccce252e5d..d9e55a49f2 100644 --- a/src/SRD/fix_wall_srd.cpp +++ b/src/SRD/fix_wall_srd.cpp @@ -27,7 +27,6 @@ #include using namespace LAMMPS_NS; -using namespace FixConst; enum { XLO, XHI, YLO, YHI, ZLO, ZHI }; enum { NONE, EDGE, CONSTANT, VARIABLE }; diff --git a/src/fix_wall_harmonic.cpp b/src/fix_wall_harmonic.cpp index a8e4127523..0e8fa22684 100644 --- a/src/fix_wall_harmonic.cpp +++ b/src/fix_wall_harmonic.cpp @@ -16,7 +16,6 @@ #include "error.h" using namespace LAMMPS_NS; -using namespace FixConst; /* ---------------------------------------------------------------------- */ diff --git a/src/fix_wall_lj126.cpp b/src/fix_wall_lj126.cpp index 78d9656e7f..f7458448be 100644 --- a/src/fix_wall_lj126.cpp +++ b/src/fix_wall_lj126.cpp @@ -18,7 +18,6 @@ #include "error.h" using namespace LAMMPS_NS; -using namespace FixConst; /* ---------------------------------------------------------------------- */ diff --git a/src/fix_wall_lj93.cpp b/src/fix_wall_lj93.cpp index 1e02b61fe1..7c4db056f9 100644 --- a/src/fix_wall_lj93.cpp +++ b/src/fix_wall_lj93.cpp @@ -18,7 +18,6 @@ #include "error.h" using namespace LAMMPS_NS; -using namespace FixConst; /* ---------------------------------------------------------------------- */ diff --git a/src/fix_wall_morse.cpp b/src/fix_wall_morse.cpp index a1427b380f..7ec3ed2ab5 100644 --- a/src/fix_wall_morse.cpp +++ b/src/fix_wall_morse.cpp @@ -18,7 +18,6 @@ #include using namespace LAMMPS_NS; -using namespace FixConst; /* ---------------------------------------------------------------------- */ From 36ec4a098bb42179c3defb08d562845f1fdf9ba2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 22 Feb 2023 15:38:35 -0500 Subject: [PATCH 238/445] add fix wall/lepton --- src/LEPTON/fix_wall_lepton.cpp | 139 +++++++++++++++++++++++++++++++++ src/LEPTON/fix_wall_lepton.h | 41 ++++++++++ 2 files changed, 180 insertions(+) create mode 100644 src/LEPTON/fix_wall_lepton.cpp create mode 100644 src/LEPTON/fix_wall_lepton.h diff --git a/src/LEPTON/fix_wall_lepton.cpp b/src/LEPTON/fix_wall_lepton.cpp new file mode 100644 index 0000000000..8438fa8852 --- /dev/null +++ b/src/LEPTON/fix_wall_lepton.cpp @@ -0,0 +1,139 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "fix_wall_lepton.h" +#include "atom.h" +#include "error.h" + +#include "Lepton.h" +#include "lepton_utils.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +FixWallLepton::FixWallLepton(LAMMPS *lmp, int narg, char **arg) : FixWall(lmp, narg, arg) +{ + dynamic_group_allow = 1; +} + +/* ---------------------------------------------------------------------- */ + +void FixWallLepton::post_constructor() +{ + // check validity of lepton expression + + for (int m = 0; m < nwall; ++m) { + // remove whitespace and quotes from expression string and then + // check if the expression can be parsed and evaluated without error + std::string exp_one = LeptonUtils::condense(lstr[m]); + try { + auto parsed = Lepton::Parser::parse(LeptonUtils::substitute(exp_one, lmp)); + auto wallpot = parsed.createCompiledExpression(); + auto wallforce = parsed.differentiate("r").createCompiledExpression(); + wallpot.getVariableReference("r") = 0.0; + wallforce.getVariableReference("r") = 0.0; + wallpot.evaluate(); + wallforce.evaluate(); + } catch (std::exception &e) { + error->all(FLERR, e.what()); + } + } +} + +/* ---------------------------------------------------------------------- + compute the potential energy offset so it can be shifted to zero at the cutoff +------------------------------------------------------------------------- */ + +void FixWallLepton::precompute(int m) +{ + std::string exp_one = LeptonUtils::condense(lstr[m]); + auto parsed = Lepton::Parser::parse(LeptonUtils::substitute(exp_one, lmp)); + auto wallpot = parsed.createCompiledExpression(); + + try { + wallpot.getVariableReference("rc") = cutoff[m]; + } catch (std::exception &) { + ; // do nothing + } + + wallpot.getVariableReference("r") = cutoff[m]; + offset[m] = wallpot.evaluate(); +} + +/* ---------------------------------------------------------------------- + interaction of all particles in group with a wall + m = index of wall coeffs + which = xlo,xhi,ylo,yhi,zlo,zhi + error if any particle is on or behind wall +------------------------------------------------------------------------- */ + +void FixWallLepton::wall_particle(int m, int which, double coord) +{ + std::string exp_one = LeptonUtils::condense(lstr[m]); + auto parsed = Lepton::Parser::parse(LeptonUtils::substitute(exp_one, lmp)); + auto wallpot = parsed.createCompiledExpression(); + auto wallforce = parsed.differentiate("r").createCompiledExpression(); + + // set cutoff value, if used + try { + wallpot.getVariableReference("rc") = cutoff[m]; + wallforce.getVariableReference("rc") = cutoff[m]; + } catch (std::exception &) { + ; // do nothing + } + + double delta, fwall; + double vn; + + double **x = atom->x; + double **f = atom->f; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + int dim = which / 2; + int side = which % 2; + if (side == 0) side = -1; + + int onflag = 0; + + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + if (side < 0) + delta = x[i][dim] - coord; + else + delta = coord - x[i][dim]; + if (delta >= cutoff[m]) continue; + if (delta <= 0.0) { + onflag = 1; + continue; + } + wallpot.getVariableReference("r") = delta; + wallforce.getVariableReference("r") = delta; + + fwall = side * wallforce.evaluate(); + f[i][dim] += fwall; + ewall[0] += wallpot.evaluate() - offset[m]; + ewall[m + 1] += fwall; + + if (evflag) { + if (side < 0) + vn = -fwall * delta; + else + vn = fwall * delta; + v_tally(dim, i, vn); + } + } + } + if (onflag) error->one(FLERR, "Particle on or inside fix {} surface", style); +} diff --git a/src/LEPTON/fix_wall_lepton.h b/src/LEPTON/fix_wall_lepton.h new file mode 100644 index 0000000000..4c1df801c7 --- /dev/null +++ b/src/LEPTON/fix_wall_lepton.h @@ -0,0 +1,41 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS +// clang-format off +FixStyle(wall/lepton,FixWallLepton); +// clang-format on +#else + +#ifndef LMP_FIX_WALL_LEPTON_H +#define LMP_FIX_WALL_LEPTON_H + +#include "fix_wall.h" + +namespace LAMMPS_NS { + +class FixWallLepton : public FixWall { + public: + FixWallLepton(class LAMMPS *, int, char **); + void post_constructor() override; + void precompute(int) override; + void wall_particle(int, int, double) override; + + protected: + double offset[6]; +}; + +} // namespace LAMMPS_NS + +#endif +#endif From b12facbd5470d162b4ff779770bb25621f337d47 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 22 Feb 2023 18:46:31 -0500 Subject: [PATCH 239/445] add fix wall/table --- src/LEPTON/fix_wall_lepton.cpp | 3 +- src/fix_wall.cpp | 33 ++- src/fix_wall.h | 2 +- src/fix_wall_table.cpp | 467 +++++++++++++++++++++++++++++++++ src/fix_wall_table.h | 67 +++++ 5 files changed, 552 insertions(+), 20 deletions(-) create mode 100644 src/fix_wall_table.cpp create mode 100644 src/fix_wall_table.h diff --git a/src/LEPTON/fix_wall_lepton.cpp b/src/LEPTON/fix_wall_lepton.cpp index 8438fa8852..a81d3c4edb 100644 --- a/src/LEPTON/fix_wall_lepton.cpp +++ b/src/LEPTON/fix_wall_lepton.cpp @@ -93,8 +93,7 @@ void FixWallLepton::wall_particle(int m, int which, double coord) ; // do nothing } - double delta, fwall; - double vn; + double delta, fwall, vn; double **x = atom->x; double **f = atom->f; diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index cbea053dab..f7293ffd06 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -52,21 +52,20 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), nwall fldflag = 0; int pbcflag = 0; - for (int i = 0; i < 6; i++) xstr[i] = estr[i] = sstr[i] = lstr[i] = tstr[i] = nullptr; + for (int i = 0; i < 6; i++) xstr[i] = estr[i] = sstr[i] = lstr[i] = fstr[i] = kstr[i] = nullptr; int iarg = 3; - tabfile = nullptr; - if (utils::strmatch(style, "^wall/table")) { - if (iarg + 1 > narg) error->all(FLERR, "Missing argument for fix {} command", style); - tabfile = arg[iarg]; - ++iarg; - } + if (utils::strmatch(style, "^wall/table")) iarg = 5; while (iarg < narg) { + int wantargs = 5; + if (utils::strmatch(style, "^wall/lepton")) wantargs = 4; + if (utils::strmatch(style, "^wall/morse")) wantargs = 6; + if ((strcmp(arg[iarg], "xlo") == 0) || (strcmp(arg[iarg], "xhi") == 0) || (strcmp(arg[iarg], "ylo") == 0) || (strcmp(arg[iarg], "yhi") == 0) || (strcmp(arg[iarg], "zlo") == 0) || (strcmp(arg[iarg], "zhi") == 0)) { - if (iarg + 4 > narg) error->all(FLERR, "Missing argument for fix {} command", style); + if (iarg + wantargs > narg) error->all(FLERR, "Missing argument for fix {} command", style); int newwall; if (strcmp(arg[iarg], "xlo") == 0) { @@ -108,13 +107,10 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), nwall if (utils::strmatch(style, "^wall/lepton")) { lstr[nwall] = utils::strdup(arg[iarg + 2]); cutoff[nwall] = utils::numeric(FLERR, arg[iarg + 3], false, lmp); - nwall++; - iarg += 4; } else if (utils::strmatch(style, "^wall/table")) { - tstr[nwall] = utils::strdup(arg[iarg + 2]); - cutoff[nwall] = utils::numeric(FLERR, arg[iarg + 3], false, lmp); - nwall++; - iarg += 4; + fstr[nwall] = utils::strdup(arg[iarg + 2]); + kstr[nwall] = utils::strdup(arg[iarg + 3]); + cutoff[nwall] = utils::numeric(FLERR, arg[iarg + 4], false, lmp); } else { if (iarg + 5 > narg) error->all(FLERR, "Missing argument for fix {} command", style); @@ -134,7 +130,9 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), nwall alpha[nwall] = utils::numeric(FLERR, arg[iarg + 3], false, lmp); astyle[nwall] = CONSTANT; } + // adjust so we can share the regular code path ++iarg; + --wantargs; } if (utils::strmatch(arg[iarg + 3], "^v_")) { @@ -145,9 +143,9 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), nwall sstyle[nwall] = CONSTANT; } cutoff[nwall] = utils::numeric(FLERR, arg[iarg + 4], false, lmp); - nwall++; - iarg += 5; } + nwall++; + iarg += wantargs; } else if (strcmp(arg[iarg], "units") == 0) { if (iarg + 2 > narg) error->all(FLERR, "Illegal fix {} command", style); if (strcmp(arg[iarg + 1], "box") == 0) @@ -248,7 +246,8 @@ FixWall::~FixWall() delete[] estr[m]; delete[] sstr[m]; delete[] lstr[m]; - delete[] tstr[m]; + delete[] fstr[m]; + delete[] kstr[m]; } } diff --git a/src/fix_wall.h b/src/fix_wall.h index 8fd0ef6910..12ceb17b49 100644 --- a/src/fix_wall.h +++ b/src/fix_wall.h @@ -50,7 +50,7 @@ class FixWall : public Fix { double xscale, yscale, zscale; int estyle[6], sstyle[6], astyle[6], wstyle[6]; int eindex[6], sindex[6]; - char *estr[6], *sstr[6], *astr[6], *lstr[6], *tstr[6], *tabfile; + char *estr[6], *sstr[6], *astr[6], *lstr[6], *fstr[6], *kstr[6]; int varflag; // 1 if any wall position,epsilon,sigma is a variable int eflag; // per-wall flag for energy summation int ilevel_respa; diff --git a/src/fix_wall_table.cpp b/src/fix_wall_table.cpp new file mode 100644 index 0000000000..c44864a7bd --- /dev/null +++ b/src/fix_wall_table.cpp @@ -0,0 +1,467 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "fix_wall_table.h" +#include "atom.h" +#include "comm.h" +#include "error.h" +#include "memory.h" +#include "table_file_reader.h" +#include "tokenizer.h" + +#include + +using namespace LAMMPS_NS; + +enum { NONE, LINEAR, SPLINE }; + +static constexpr double BIGNUM = 1.0e300; + +/* ---------------------------------------------------------------------- */ + +FixWallTable::FixWallTable(LAMMPS *lmp, int narg, char **arg) : + FixWall(lmp, narg, arg), tables(nullptr) +{ + dynamic_group_allow = 1; + tabstyle = NONE; + if (strcmp(arg[3], "linear") == 0) + tabstyle = LINEAR; + else if (strcmp(arg[3], "spline") == 0) + tabstyle = SPLINE; + else + error->all(FLERR, "Unknown table style {} in fix {}", arg[3], style); + + tablength = utils::inumeric(FLERR, arg[4], false, lmp); + if (tablength < 2) error->all(FLERR, "Illegal number of fix {} table entries", style); +} + +/* ---------------------------------------------------------------------- */ + +void FixWallTable::post_constructor() +{ + memory->sfree(tables); + tables = (Table *) memory->smalloc(nwall * sizeof(Table), "wall:tables"); + + for (int m = 0; m < nwall; ++m) { + Table &tb = tables[m]; + null_table(tb); + + if (comm->me == 0) read_table(tb, fstr[m], kstr[m]); + bcast_table(tb); + + // error check on table parameters + if (tb.ninput <= 1) error->all(FLERR, "Invalid fix {} table length: {}", style, tb.ninput); + tb.lo = tb.rfile[0]; + tb.hi = tb.rfile[tb.ninput - 1]; + if (tb.lo >= tb.hi) error->all(FLERR, "Fix {} table distance values do not increase", style); + if (cutoff[m] > tb.hi) + error->all(FLERR, "Fix {} wall cutoff {} is larger than table outer cutoff {}", style, + cutoff[m], tb.hi); + + // spline read-in data and compute r,e,f arrays within table + spline_table(tb); + compute_table(tb); + } +} + +/* ---------------------------------------------------------------------- */ + +FixWallTable::~FixWallTable() +{ + for (int m = 0; m < nwall; m++) free_table(tables[m]); + memory->sfree(tables); +} + +/* ---------------------------------------------------------------------- + compute the potential energy offset so it can be shifted to zero at the cutoff +------------------------------------------------------------------------- */ + +void FixWallTable::precompute(int m) +{ + double u, mdu; + + uf_lookup(m, cutoff[m], u, mdu); + offset[m] = u; +} + +/* ---------------------------------------------------------------------- + interaction of all particles in group with a wall + m = index of wall coeffs + which = xlo,xhi,ylo,yhi,zlo,zhi + error if any particle is on or behind wall +------------------------------------------------------------------------- */ + +void FixWallTable::wall_particle(int m, int which, double coord) +{ + double delta, fwall, vn, u, mdu; + + double **x = atom->x; + double **f = atom->f; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + int dim = which / 2; + int side = which % 2; + if (side == 0) side = -1; + + int onflag = 0; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + if (side < 0) + delta = x[i][dim] - coord; + else + delta = coord - x[i][dim]; + if (delta >= cutoff[m]) continue; + if (delta <= 0.0) { + onflag = 1; + continue; + } + + uf_lookup(m, delta, u, mdu); + fwall = side * mdu; + f[i][dim] -= fwall; + ewall[0] += u - offset[m]; + ewall[m + 1] += fwall; + + if (evflag) { + if (side < 0) + vn = -fwall * delta; + else + vn = fwall * delta; + v_tally(dim, i, vn); + } + } + + if (onflag) error->one(FLERR, "Particle on or inside fix {} surface", style); +} + +/* ---------------------------------------------------------------------- */ + +void FixWallTable::null_table(Table &tb) +{ + tb.rfile = tb.efile = tb.ffile = nullptr; + tb.e2file = tb.f2file = nullptr; + tb.r = tb.e = tb.de = nullptr; + tb.f = tb.df = tb.e2 = tb.f2 = nullptr; +} + +/* ---------------------------------------------------------------------- */ + +void FixWallTable::free_table(Table &tb) +{ + memory->destroy(tb.rfile); + memory->destroy(tb.efile); + memory->destroy(tb.ffile); + memory->destroy(tb.e2file); + memory->destroy(tb.f2file); + + memory->destroy(tb.r); + memory->destroy(tb.e); + memory->destroy(tb.de); + memory->destroy(tb.f); + memory->destroy(tb.df); + memory->destroy(tb.e2); + memory->destroy(tb.f2); +} + +/* ---------------------------------------------------------------------- */ + +void FixWallTable::read_table(Table &tb, const std::string &tabfile, const std::string &keyword) +{ + TableFileReader reader(lmp, tabfile, "fix wall/table"); + + char *line = reader.find_section_start(keyword); + if (!line) error->one(FLERR, "Did not find keyword {} in table file", keyword); + + // read args on 2nd line of section + // allocate table arrays for file values + + line = reader.next_line(); + param_extract(tb, line); + memory->create(tb.rfile, tb.ninput, "wall:rfile"); + memory->create(tb.efile, tb.ninput, "wall:efile"); + memory->create(tb.ffile, tb.ninput, "wall:ffile"); + + // read r,e,f table values from file + + reader.skip_line(); + for (int i = 0; i < tb.ninput; i++) { + line = reader.next_line(); + if (!line) + error->one(FLERR, "Data missing when parsing wall table '{}' line {} of {}.", keyword, i + 1, + tb.ninput); + try { + ValueTokenizer values(line); + values.next_int(); + tb.rfile[i] = values.next_double(); + tb.efile[i] = values.next_double(); + tb.ffile[i] = values.next_double(); + } catch (TokenizerException &e) { + error->one(FLERR, "Error parsing wall table '{}' line {} of {}. {}\nLine was: {}", keyword, + i + 1, tb.ninput, e.what(), line); + } + } + + // warn if force != dE/dr at any point that is not an inflection point + // check via secant approximation to dE/dr + // skip two end points since do not have surrounding secants + // inflection point is where curvature changes sign + + double r, e, f, rprev, rnext, eprev, enext, fleft, fright; + + int ferror = 0; + for (int i = 1; i < tb.ninput - 1; i++) { + r = tb.rfile[i]; + rprev = tb.rfile[i - 1]; + rnext = tb.rfile[i + 1]; + e = tb.efile[i]; + eprev = tb.efile[i - 1]; + enext = tb.efile[i + 1]; + f = tb.ffile[i]; + fleft = -(e - eprev) / (r - rprev); + fright = -(enext - e) / (rnext - r); + if (f < fleft && f < fright) ferror++; + if (f > fleft && f > fright) ferror++; + } + + if (ferror) + error->warning(FLERR, + "{} of {} force values in table are inconsistent with -dE/dr.\n" + "WARNING: Should only be flagged at inflection points", + ferror, tb.ninput); +} + +/* ---------------------------------------------------------------------- + build spline representation of e,f over entire range of read-in table + this function sets these values in e2file,f2file +------------------------------------------------------------------------- */ + +void FixWallTable::spline_table(Table &tb) +{ + memory->create(tb.e2file, tb.ninput, "wall:e2file"); + memory->create(tb.f2file, tb.ninput, "wall:f2file"); + + double ep0 = -tb.ffile[0]; + double epn = -tb.ffile[tb.ninput - 1]; + spline(tb.rfile, tb.efile, tb.ninput, ep0, epn, tb.e2file); + + if (tb.fpflag == 0) { + tb.fplo = (tb.ffile[1] - tb.ffile[0]) / (tb.rfile[1] - tb.rfile[0]); + tb.fphi = (tb.ffile[tb.ninput - 1] - tb.ffile[tb.ninput - 2]) / + (tb.rfile[tb.ninput - 1] - tb.rfile[tb.ninput - 2]); + } + + double fp0 = tb.fplo; + double fpn = tb.fphi; + spline(tb.rfile, tb.ffile, tb.ninput, fp0, fpn, tb.f2file); +} + +/* ---------------------------------------------------------------------- + compute r,e,f vectors from splined values +------------------------------------------------------------------------- */ + +void FixWallTable::compute_table(Table &tb) +{ + // delta = table spacing for N-1 bins + int tlm1 = tablength - 1; + + tb.delta = (tb.hi - tb.lo) / tlm1; + tb.invdelta = 1.0 / tb.delta; + tb.deltasq6 = tb.delta * tb.delta / 6.0; + + // N-1 evenly spaced bins in r from min to max + // r,e,f = value at lower edge of bin + // de,df values = delta values of e,f + // r,e,f are N in length so de,df arrays can compute difference + + memory->create(tb.r, tablength, "wall:r"); + memory->create(tb.e, tablength, "wall:e"); + memory->create(tb.de, tablength, "wall:de"); + memory->create(tb.f, tablength, "wall:f"); + memory->create(tb.df, tablength, "wall:df"); + memory->create(tb.e2, tablength, "wall:e2"); + memory->create(tb.f2, tablength, "wall:f2"); + + double a; + for (int i = 0; i < tablength; i++) { + a = tb.lo + i * tb.delta; + tb.r[i] = a; + tb.e[i] = splint(tb.rfile, tb.efile, tb.e2file, tb.ninput, a); + tb.f[i] = splint(tb.rfile, tb.ffile, tb.f2file, tb.ninput, a); + } + + for (int i = 0; i < tlm1; i++) { + tb.de[i] = tb.e[i + 1] - tb.e[i]; + tb.df[i] = tb.f[i + 1] - tb.f[i]; + } + // get final elements from linear extrapolation + tb.de[tlm1] = 2.0 * tb.de[tlm1 - 1] - tb.de[tlm1 - 2]; + tb.df[tlm1] = 2.0 * tb.df[tlm1 - 1] - tb.df[tlm1 - 2]; + + double ep0 = -tb.f[0]; + double epn = -tb.f[tlm1]; + spline(tb.r, tb.e, tablength, ep0, epn, tb.e2); + spline(tb.r, tb.f, tablength, tb.fplo, tb.fphi, tb.f2); +} + +/* ---------------------------------------------------------------------- + extract attributes from parameter line in table section + format of line: N value FP fplo fphi + N is required, other params are optional +------------------------------------------------------------------------- */ + +void FixWallTable::param_extract(Table &tb, char *line) +{ + tb.ninput = 0; + tb.fpflag = 0; + + try { + ValueTokenizer values(line); + + while (values.has_next()) { + std::string word = values.next_string(); + + if (word == "N") { + tb.ninput = values.next_int(); + } else if (word == "FP") { + tb.fpflag = 1; + tb.fplo = values.next_double(); + tb.fphi = values.next_double(); + } else { + error->one(FLERR, "Invalid keyword {} in fix {} table parameters", word, style); + } + } + } catch (TokenizerException &e) { + error->one(FLERR, e.what()); + } + + if (tb.ninput == 0) error->one(FLERR, "Fix {} parameters did not set N", style); +} + +/* ---------------------------------------------------------------------- + broadcast read-in table info from proc 0 to other procs + this function communicates these values in Table: + ninput,rfile,efile,ffile,fpflag,fplo,fphi +------------------------------------------------------------------------- */ + +void FixWallTable::bcast_table(Table &tb) +{ + MPI_Bcast(&tb.ninput, 1, MPI_INT, 0, world); + + if (comm->me > 0) { + memory->create(tb.rfile, tb.ninput, "wall:rfile"); + memory->create(tb.efile, tb.ninput, "wall:efile"); + memory->create(tb.ffile, tb.ninput, "wall:ffile"); + } + + MPI_Bcast(tb.rfile, tb.ninput, MPI_DOUBLE, 0, world); + MPI_Bcast(tb.efile, tb.ninput, MPI_DOUBLE, 0, world); + MPI_Bcast(tb.ffile, tb.ninput, MPI_DOUBLE, 0, world); + + MPI_Bcast(&tb.fpflag, 1, MPI_INT, 0, world); + if (tb.fpflag) { + MPI_Bcast(&tb.fplo, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&tb.fphi, 1, MPI_DOUBLE, 0, world); + } +} + +/* ---------------------------------------------------------------------- + spline and splint routines modified from Numerical Recipes +------------------------------------------------------------------------- */ + +void FixWallTable::spline(double *x, double *y, int n, double yp1, double ypn, double *y2) +{ + int i, k; + double p, qn, sig, un; + auto u = new double[n]; + + if (yp1 > BIGNUM) + y2[0] = u[0] = 0.0; + else { + y2[0] = -0.5; + u[0] = (3.0 / (x[1] - x[0])) * ((y[1] - y[0]) / (x[1] - x[0]) - yp1); + } + for (i = 1; i < n - 1; i++) { + sig = (x[i] - x[i - 1]) / (x[i + 1] - x[i - 1]); + p = sig * y2[i - 1] + 2.0; + y2[i] = (sig - 1.0) / p; + u[i] = (y[i + 1] - y[i]) / (x[i + 1] - x[i]) - (y[i] - y[i - 1]) / (x[i] - x[i - 1]); + u[i] = (6.0 * u[i] / (x[i + 1] - x[i - 1]) - sig * u[i - 1]) / p; + } + if (ypn > BIGNUM) + qn = un = 0.0; + else { + qn = 0.5; + un = (3.0 / (x[n - 1] - x[n - 2])) * (ypn - (y[n - 1] - y[n - 2]) / (x[n - 1] - x[n - 2])); + } + y2[n - 1] = (un - qn * u[n - 2]) / (qn * y2[n - 2] + 1.0); + for (k = n - 2; k >= 0; k--) y2[k] = y2[k] * y2[k + 1] + u[k]; + + delete[] u; +} + +/* ---------------------------------------------------------------------- */ + +double FixWallTable::splint(double *xa, double *ya, double *y2a, int n, double x) +{ + int klo, khi, k; + double h, b, a, y; + + klo = 0; + khi = n - 1; + while (khi - klo > 1) { + k = (khi + klo) >> 1; + if (xa[k] > x) + khi = k; + else + klo = k; + } + h = xa[khi] - xa[klo]; + a = (xa[khi] - x) / h; + b = (x - xa[klo]) / h; + y = a * ya[klo] + b * ya[khi] + + ((a * a * a - a) * y2a[klo] + (b * b * b - b) * y2a[khi]) * (h * h) / 6.0; + return y; +} + +/* ---------------------------------------------------------------------- + calculate potential u and force f at distance x + ensure x is between wall min/max, exit with error if not +------------------------------------------------------------------------- */ + +void FixWallTable::uf_lookup(int m, double x, double &u, double &f) +{ + double fraction, a, b; + const Table &tb = tables[m]; + const int itable = static_cast((x - tb.lo) * tb.invdelta); + if (itable < 0) + error->one(FLERR, "Particle / wall distance < table inner cutoff: {:.8}", x); + else if (itable >= tablength) + error->one(FLERR, "Particle / wall distance > table outer cutoff: {:.8}", x); + + if (tabstyle == LINEAR) { + fraction = (x - tb.r[itable]) * tb.invdelta; + u = tb.e[itable] + fraction * tb.de[itable]; + f = tb.f[itable] + fraction * tb.df[itable]; + } else if (tabstyle == SPLINE) { + fraction = (x - tb.r[itable]) * tb.invdelta; + + b = (x - tb.r[itable]) * tb.invdelta; + a = 1.0 - b; + u = a * tb.e[itable] + b * tb.e[itable + 1] + + ((a * a * a - a) * tb.e2[itable] + (b * b * b - b) * tb.e2[itable + 1]) * tb.deltasq6; + f = a * tb.f[itable] + b * tb.f[itable + 1] + + ((a * a * a - a) * tb.f2[itable] + (b * b * b - b) * tb.f2[itable + 1]) * tb.deltasq6; + } +} diff --git a/src/fix_wall_table.h b/src/fix_wall_table.h new file mode 100644 index 0000000000..368c2e3cd1 --- /dev/null +++ b/src/fix_wall_table.h @@ -0,0 +1,67 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS +// clang-format off +FixStyle(wall/table,FixWallTable); +// clang-format on +#else + +#ifndef LMP_FIX_WALL_TABLE_H +#define LMP_FIX_WALL_TABLE_H + +#include "fix_wall.h" + +namespace LAMMPS_NS { + +class FixWallTable : public FixWall { + public: + FixWallTable(class LAMMPS *, int, char **); + ~FixWallTable() override; + + void post_constructor() override; + void precompute(int) override; + void wall_particle(int, int, double) override; + + protected: + double offset[6]; + + int tabstyle, tablength; + struct Table { + int ninput, fpflag; + double fplo, fphi; + double lo, hi; + double *rfile, *efile, *ffile; + double *e2file, *f2file; + double delta, invdelta, deltasq6; + double *r, *e, *de, *f, *df, *e2, *f2; + }; + Table *tables; + + void null_table(Table &); + void free_table(Table &); + void read_table(Table &, const std::string &, const std::string &); + void bcast_table(Table &); + void spline_table(Table &); + void compute_table(Table &); + + void param_extract(Table &, char *); + void spline(double *, double *, int, double, double, double *); + double splint(double *, double *, double *, int, double); + void uf_lookup(int, double, double &, double &); +}; + +} // namespace LAMMPS_NS + +#endif +#endif From a92c9e3b91e52483340b62447b16f6988e938a8f Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 22 Feb 2023 19:48:46 -0700 Subject: [PATCH 240/445] cmake: remove pip install from install target --- cmake/CMakeLists.txt | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 41229e9cd6..5a30cd5aa5 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -856,35 +856,6 @@ else() ${CMAKE_COMMAND} -E echo "Must build LAMMPS as a shared library to use the Python module") endif() -############################################################################### -# Add LAMMPS python module to "install" target. This is taylored for building -# LAMMPS for package managers and with different prefix settings. -# This requires either a shared library or that the PYTHON package is included. -############################################################################### -if(BUILD_SHARED_LIBS OR PKG_PYTHON) - if(CMAKE_VERSION VERSION_LESS 3.12) - # adjust so we find Python 3 versions before Python 2 on old systems with old CMake - set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6) - find_package(PythonInterp) # Deprecated since version 3.12 - if(PYTHONINTERP_FOUND) - set(Python_EXECUTABLE ${PYTHON_EXECUTABLE}) - endif() - else() - # backward compatibility - if(PYTHON_EXECUTABLE) - set(Python_EXECUTABLE ${PYTHON_EXECUTABLE}) - endif() - find_package(Python COMPONENTS Interpreter) - endif() - if(Python_EXECUTABLE) - file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/python/lib) - file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/python/src) - file(COPY ${LAMMPS_SOURCE_DIR}/version.h DESTINATION ${CMAKE_BINARY_DIR}/python/src) - file(COPY ${LAMMPS_PYTHON_DIR}/README ${LAMMPS_PYTHON_DIR}/pyproject.toml ${LAMMPS_PYTHON_DIR}/setup.py ${LAMMPS_PYTHON_DIR}/lammps DESTINATION ${CMAKE_BINARY_DIR}/python/lib) - install(CODE "if(\"\$ENV{DESTDIR}\" STREQUAL \"\")\n execute_process(COMMAND ${Python_EXECUTABLE} -m pip install -v ${CMAKE_BINARY_DIR}/python/lib --prefix=${CMAKE_INSTALL_PREFIX})\n else()\n execute_process(COMMAND ${Python_EXECUTABLE} -m pip install -v ${CMAKE_BINARY_DIR}/python/lib --prefix=${CMAKE_INSTALL_PREFIX} --root=\$ENV{DESTDIR})\n endif()") - endif() -endif() - include(Testing) include(CodeCoverage) include(CodingStandard) From a3ff40ccf03c53c6173030eb6792dca72d9f70bb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 22 Feb 2023 23:29:46 -0500 Subject: [PATCH 241/445] fixes to avoid uninitialized or out-of-bounds memory accesses --- src/fix_wall.cpp | 2 ++ src/fix_wall_table.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index f7293ffd06..4c4406a34c 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -105,9 +105,11 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), nwall } if (utils::strmatch(style, "^wall/lepton")) { + estyle[nwall] = sstyle[nwall] = CONSTANT; lstr[nwall] = utils::strdup(arg[iarg + 2]); cutoff[nwall] = utils::numeric(FLERR, arg[iarg + 3], false, lmp); } else if (utils::strmatch(style, "^wall/table")) { + estyle[nwall] = sstyle[nwall] = CONSTANT; fstr[nwall] = utils::strdup(arg[iarg + 2]); kstr[nwall] = utils::strdup(arg[iarg + 3]); cutoff[nwall] = utils::numeric(FLERR, arg[iarg + 4], false, lmp); diff --git a/src/fix_wall_table.cpp b/src/fix_wall_table.cpp index c44864a7bd..dc1dda4504 100644 --- a/src/fix_wall_table.cpp +++ b/src/fix_wall_table.cpp @@ -90,8 +90,13 @@ void FixWallTable::precompute(int m) { double u, mdu; + // always use linear interpolation to determine the offset, since we may be at the + // outer table cutoff and spline interpolation would cause out-of-bounds array accesses + int savedtabstyle = tabstyle; + tabstyle = LINEAR; uf_lookup(m, cutoff[m], u, mdu); offset[m] = u; + tabstyle = savedtabstyle; } /* ---------------------------------------------------------------------- From 0dcb591ee8ee7c2589d0dfb6b65314f239d4156a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 22 Feb 2023 23:31:04 -0500 Subject: [PATCH 242/445] add support to create tables for fix wall/table --- tools/tabulate/tabulate.py | 47 +++++++++++++++++ tools/tabulate/wall_harmonic_tabulate.py | 25 +++++++++ tools/tabulate/wall_multi_tabulate.py | 64 ++++++++++++++++++++++++ 3 files changed, 136 insertions(+) create mode 100755 tools/tabulate/wall_harmonic_tabulate.py create mode 100755 tools/tabulate/wall_multi_tabulate.py diff --git a/tools/tabulate/tabulate.py b/tools/tabulate/tabulate.py index 3bba7c2ecf..c3cb3a256f 100755 --- a/tools/tabulate/tabulate.py +++ b/tools/tabulate/tabulate.py @@ -279,6 +279,53 @@ class DihedralTabulate(Tabulate): if self.args.filename != '-': self.fp.close() +################################################################################ +# create tabulation for fix wall/table +class WallTabulate(Tabulate): + def __init__(self, efunc, ffunc=None, units=None, comment=None): + super(WallTabulate, self).__init__('wall', efunc, ffunc, units, comment) + self.parser.add_argument('--eshift', '-e', dest='eshift', default=False, + action='store_true', + help="Shift potential energy to be zero at outer cutoff") + idx = [a.dest for a in self.parser._actions].index('xmin') + self.parser._actions[idx].required=False + self.parser._actions[idx].default=0.0 + try: + self.args = self.parser.parse_args() + except argparse.ArgumentError: + sys.exit() + + def run(self, label): + # sanity checks + if self.args.num < 2: + self.helpexit('Expect 2 or more points in table for tabulation') + if self.args.xmin < 0.0: + self.helpexit('Inner cutoff must not be negative') + + self.diff = self.args.diff + if not self.forcefunc: + self.diff = True + + table, xzero = mktable(self.tstyle, label, self.args.num, self.args.xmin, self.args.xmax, + self.energyfunc, self.args.diff, self.forcefunc) + print("# Minimum energy of tabulated potential is at %g" % xzero) + offset = 0.0 + if self.args.eshift: + offset=self.energyfunc(self.args.xmax) + + self.openfile(label) + + if self.forcefunc: + diffmin = -numdiff(self.args.xmin, self.forcefunc) + diffmax = -numdiff(self.args.xmax, self.forcefunc) + self.fp.write("N %d FP %- 22.15g %- 22.15g\n\n" % (self.args.num, diffmin, diffmax)) + else: + self.fp.write("N %d\n\n" % (self.args.num)) + + self.writetable(table, offset) + if self.args.filename != '-': + self.fp.close() + ################################################################################ if __name__ == "__main__": sys.exit("The tabulate module is not meant to be executed directly") diff --git a/tools/tabulate/wall_harmonic_tabulate.py b/tools/tabulate/wall_harmonic_tabulate.py new file mode 100755 index 0000000000..9424856dbf --- /dev/null +++ b/tools/tabulate/wall_harmonic_tabulate.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +from tabulate import WallTabulate + +################################################################################ +import math + +k = 100.0 +rzero = 4.0 + +def harmonic_force(r): + dr = r - rzero + f = -2.0 * k * dr + return f + +def harmonic_energy(r): + dr = r - rzero + f = k * dr * dr + return f + +################################################################################ + +if __name__ == "__main__": + wtable = WallTabulate(harmonic_energy, harmonic_force, units='real') + wtable.run('HARMONIC') diff --git a/tools/tabulate/wall_multi_tabulate.py b/tools/tabulate/wall_multi_tabulate.py new file mode 100755 index 0000000000..0458a929e2 --- /dev/null +++ b/tools/tabulate/wall_multi_tabulate.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python + +from tabulate import WallTabulate +import os, sys +################################################################################ +import math + +k = 100.0 +rzero = 4.0 +epsilon = 0.02 +sigma = 2.0 +depth = 20.0 +width = 2.0 +rzero = 1.2 + +def harmonic_force(r): + dr = r - rzero + f = -2.0 * k * dr + return f + +def harmonic_energy(r): + dr = r - rzero + f = k * dr * dr + return f + +def lj126_force(r): + f = -4.0*epsilon*(-12.0*math.pow(sigma/r,12.0)/r + 6.0*math.pow(sigma/r,6.0)/r) + return f + +def lj126_energy(r): + f = 4.0*epsilon*(math.pow(sigma/r,12.0) - math.pow(sigma/r,6.0)) + return f + +def morse_energy(r): + ralpha = math.exp(-width*(r-rzero)) + f = depth * (-1.0 + (1.0 - ralpha) * (1.0 - ralpha)) + return f + +def morse_force(r): + ralpha = math.exp(-width*(r-rzero)) + f = -2.0 * depth * width * (1.0 -ralpha) * ralpha + return f + + +################################################################################ + +if __name__ == "__main__": + fname = 'walltab.dat' + if os.path.exists(fname): + os.remove(fname) + sys.argv.append('--filename') + sys.argv.append(fname) + sys.argv.append('--num-points') + sys.argv.append('1000') + sys.argv.append('--inner') + sys.argv.append('0.02') + sys.argv.append('--outer') + sys.argv.append('4.0') + wtable = WallTabulate(harmonic_energy, harmonic_force, units='real') + wtable.run('HARMONIC') + wtable = WallTabulate(lj126_energy, lj126_force, units='real') + wtable.run('LJ126') + wtable = WallTabulate(morse_energy, morse_force, units='real') + wtable.run('MORSE') From ec87c71064ca25172d5b6385b7c4093169434b4d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 23 Feb 2023 00:28:58 -0500 Subject: [PATCH 243/445] add documentation for fix wall/lepton, fix wall/table and WallTabulate() --- doc/src/Commands_fix.rst | 2 + doc/src/Tools.rst | 3 +- doc/src/fix.rst | 2 + doc/src/fix_wall.rst | 257 +++++++++++++++----- doc/utils/sphinx-config/false_positives.txt | 1 + tools/tabulate/README.md | 18 +- tools/tabulate/wall_multi_tabulate.py | 10 +- 7 files changed, 224 insertions(+), 69 deletions(-) diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index 63adc56ed3..5c164c8f0a 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -263,6 +263,7 @@ OPT. * :doc:`wall/lj1043 ` * :doc:`wall/lj126 ` * :doc:`wall/lj93 (k) ` + * :doc:`wall/lepton ` * :doc:`wall/morse ` * :doc:`wall/piston ` * :doc:`wall/reflect (k) ` @@ -270,4 +271,5 @@ OPT. * :doc:`wall/region ` * :doc:`wall/region/ees ` * :doc:`wall/srd ` + * :doc:`wall/table ` * :doc:`widom ` diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index 20e3d2c094..2eae1aabc7 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -320,7 +320,8 @@ eam generate tool ----------------------------- The tools/eam_generate directory contains several one-file C programs -that convert an analytic formula into a tabulated :doc:`embedded atom method (EAM) ` setfl potential file. The potentials they +that convert an analytic formula into a tabulated :doc:`embedded atom +method (EAM) ` setfl potential file. The potentials they produce are in the potentials directory, and can be used with the :doc:`pair_style eam/alloy ` command. diff --git a/doc/src/fix.rst b/doc/src/fix.rst index 0a926d570c..ec5922163c 100644 --- a/doc/src/fix.rst +++ b/doc/src/fix.rst @@ -415,6 +415,7 @@ accelerated styles exist. * :doc:`wall/lj1043 ` - Lennard-Jones 10--4--3 wall * :doc:`wall/lj126 ` - Lennard-Jones 12--6 wall * :doc:`wall/lj93 ` - Lennard-Jones 9--3 wall +* :doc:`wall/lepton ` - Custom Lepton expression wall * :doc:`wall/morse ` - Morse potential wall * :doc:`wall/piston ` - moving reflective piston wall * :doc:`wall/reflect ` - reflecting wall(s) @@ -422,6 +423,7 @@ accelerated styles exist. * :doc:`wall/region ` - use region surface as wall * :doc:`wall/region/ees ` - use region surface as wall for ellipsoidal particles * :doc:`wall/srd ` - slip/no-slip wall for SRD particles +* :doc:`wall/table ` - Tabulated potential wall wall * :doc:`widom ` - Widom insertions of atoms or molecules Restrictions diff --git a/doc/src/fix_wall.rst b/doc/src/fix_wall.rst index 9f20470bbc..7b38b6035c 100644 --- a/doc/src/fix_wall.rst +++ b/doc/src/fix_wall.rst @@ -4,7 +4,9 @@ .. index:: fix wall/lj1043 .. index:: fix wall/colloid .. index:: fix wall/harmonic +.. index:: fix wall/lepton .. index:: fix wall/morse +.. index:: fix wall/table fix wall/lj93 command ===================== @@ -23,20 +25,31 @@ fix wall/colloid command fix wall/harmonic command ========================= +fix wall/lepton command +========================= + fix wall/morse command ====================== +fix wall/table command +========================= + Syntax """""" .. parsed-literal:: - fix ID group-ID style face args ... keyword value ... + fix ID group-ID style [tabstyle] [N] face args ... keyword value ... * ID, group-ID are documented in :doc:`fix ` command -* style = *wall/lj93* or *wall/lj126* or *wall/lj1043* or *wall/colloid* or *wall/harmonic* or *wall/morse* +* style = *wall/lj93* or *wall/lj126* or *wall/lj1043* or *wall/colloid* or *wall/harmonic* or *wall/lepton* or *wall/morse* or *wall/table* +* tabstyle = *linear* or *spline* = method of table interpolation (only applies to *wall/table*) +* N = use N values in *linear* or *spline* interpolation (only applies to *wall/table*) * one or more face/arg pairs may be appended * face = *xlo* or *xhi* or *ylo* or *yhi* or *zlo* or *zhi* + +.. spacer + * args for styles *lj93* or *lj126* or *lj1043* or *colloid* or *harmonic* .. parsed-literal:: @@ -50,7 +63,19 @@ Syntax epsilon can be a variable (see below) sigma = size factor for wall-particle interaction (distance units) sigma can be a variable (see below) - cutoff = distance from wall at which wall-particle interaction is cut off (distance units) + cutoff = distance from wall at which wall-particle interactions are cut off (distance units) + +* args for style *lepton* + + .. parsed-literal:: + + args = coord expression cutoff + coord = position of wall = EDGE or constant or variable + EDGE = current lo or hi edge of simulation box + constant = number like 0.0 or -30.0 (distance units) + variable = :doc:`equal-style variable ` like v_x or v_wiggle + expression = Lepton expression for the potential (energy units) + cutoff = distance from wall at which wall-particle interactions are cut off (distance units) * args for style *morse* @@ -67,7 +92,20 @@ Syntax alpha can be a variable (see below) r_0 = distance of the potential minimum from the face of region (distance units) r_0 can be a variable (see below) - cutoff = distance from wall at which wall-particle interaction is cut off (distance units) + cutoff = distance from wall at which wall-particle interactions are cut off (distance units) + +* args for style *table* + + .. parsed-literal:: + + args = coord filename keyword cutoff + coord = position of wall = EDGE or constant or variable + EDGE = current lo or hi edge of simulation box + constant = number like 0.0 or -30.0 (distance units) + variable = :doc:`equal-style variable ` like v_x or v_wiggle + filename = file containing tabulated energy and force values + keyword = section identifier to select a specific table in table file + cutoff = distance from wall at which wall-particle interactions are cut off (distance units) * zero or more keyword/value pairs may be appended * keyword = *units* or *fld* or *pbc* @@ -91,9 +129,13 @@ Examples fix wallhi all wall/lj93 xlo -1.0 1.0 1.0 2.5 units box fix wallhi all wall/lj93 xhi EDGE 1.0 1.0 2.5 + fix wallhi all wall/harmonic xhi EDGE 100.0 0.0 4.0 units box fix wallhi all wall/morse xhi EDGE 1.0 1.0 1.0 2.5 units box fix wallhi all wall/lj126 v_wiggle 23.2 1.0 1.0 2.5 fix zwalls all wall/colloid zlo 0.0 1.0 1.0 0.858 zhi 40.0 1.0 1.0 0.858 + fix xwall mobile wall/table spline 200 EDGE -5.0 walltab.dat HARMONIC 4.0 + fix xwalls mobile wall/lepton xlo -5.0 "k*(r-rc)^2;k=100.0" 4.0 xhi 5.0 "k*(r-rc)^2;k=100.0" 4.0 + Description """"""""""" @@ -103,7 +145,7 @@ wall that interacts with the atoms in the group by generating a force on the atom in a direction perpendicular to the wall. The energy of wall-particle interactions depends on the style. -For style *wall/lj93*, the energy E is given by the 9/3 potential: +For style *wall/lj93*, the energy E is given by the 9-3 Lennard-Jones potential: .. math:: @@ -111,7 +153,7 @@ For style *wall/lj93*, the energy E is given by the 9/3 potential: \left(\frac{\sigma}{r}\right)^3 \right] \qquad r < r_c -For style *wall/lj126*, the energy E is given by the 12/6 potential: +For style *wall/lj126*, the energy E is given by the 12-6 Lennard-Jones potential: .. math:: @@ -119,7 +161,7 @@ For style *wall/lj126*, the energy E is given by the 12/6 potential: \left(\frac{\sigma}{r}\right)^6 \right] \qquad r < r_c -For style *wall/lj1043*, the energy E is given by the 10/4/3 potential: +For style *wall/lj1043*, the energy E is given by the 10-4-3 Lennard-Jones potential: .. math:: @@ -138,8 +180,8 @@ of the :doc:`pair_style colloid ` potential: & \left. - \frac{1}{6} \left(\frac{2R(D+R) + D(D+2R) \left[ \ln D - \ln (D+2R) \right]}{D(D+2R)} \right) \right] \qquad r < r_c -For style *wall/harmonic*, the energy E is given by a harmonic spring -potential: +For style *wall/harmonic*, the energy E is given by a repulsive-only harmonic +spring potential: .. math:: @@ -152,6 +194,56 @@ For style *wall/morse*, the energy E is given by a Morse potential: E = D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] \qquad r < r_c +For style *wall/lepton*, the energy E is provided as an Lepton +expression string using "r" as the distance variable. The `Lepton +library `_, that the *wall/lepton* +style interfaces with, evaluates this expression string at run time to +compute the wall-particle energy. It also creates an analytical +representation of the first derivative of this expression with respect +to "r" and then uses that to compute the force between the wall and +atoms in the fix group. The Lepton expression must be either enclosed +in quotes or must not contain any whitespace so that LAMMPS recognizes +it as a single keyword. + +Optionally, the expression may use "rc" to refer to the cutoff distance +for the given wall. Further constants in the expression can be defined +in the same string as additional expressions separated by semi-colons. +The expression "k*(r-rc)^2;k=100.0" represents a repulsive-only harmonic +spring as in fix *wall/harmonic* with a force constant *K* (same as +:math:`\epsilon` above) of 100 energy units. More details on the Lepton +expression strings are given below. + +For style *wall/table*, the energy E and forces are determined from +interpolation tables listed in one or more files as a function of +distance. The interpolation tables are used to evaluate energy and +forces between particles and the wall similar to how analytic formulas +are used for the other wall styles. + +The interpolation tables are created as a pre-computation by fitting +cubic splines to the file values and interpolating energy and force +values at each of *N* distances. During a simulation, the tables are +used to interpolate energy and force values as needed for each wall and +particle separated by a distance *R*\ . The interpolation is done in +one of two styles: *linear* or *spline*\ . + +For the *linear* style, the distance *R* is used to find the 2 +surrounding table values from which an energy or force is computed by +linear interpolation. + +For the *spline* style, cubic spline coefficients are computed and +stored for each of the *N* values in the table, one set of splines for +energy, another for force. Note that these splines are different than +the ones used to pre-compute the *N* values. Those splines were fit +to the *Nfile* values in the tabulated file, where often *Nfile* < +*N*\ . The distance *R* is used to find the appropriate set of spline +coefficients which are used to evaluate a cubic polynomial which +computes the energy or force. + +For each wall a filename and a keyword must be provided as in the +examples above. The filename specifies a file containing tabulated +energy and force values. The keyword specifies a section of the file. +The format of this file is described below. + In all cases, *r* is the distance from the particle to the wall at position *coord*, and :math:`r_c` is the *cutoff* distance at which the particle and wall no longer interact. The energy of the wall @@ -180,11 +272,12 @@ box parameters and timestep and elapsed time. Thus it is easy to specify a time-dependent wall position. See examples below. For the *wall/lj93* and *wall/lj126* and *wall/lj1043* styles, -:math:`\epsilon` and :math:`\sigma` are the usual Lennard-Jones parameters, which -determine the strength and size of the particle as it interacts with -the wall. Epsilon has energy units. Note that this :math:`\epsilon` and -:math:`\sigma` may be different than any :math:`\epsilon` or :math:`\sigma` values defined -for a pair style that computes particle-particle interactions. +:math:`\epsilon` and :math:`\sigma` are the usual Lennard-Jones +parameters, which determine the strength and size of the particle as it +interacts with the wall. Epsilon has energy units. Note that this +:math:`\epsilon` and :math:`\sigma` may be different than any +:math:`\epsilon` or :math:`\sigma` values defined for a pair style that +computes particle-particle interactions. The *wall/lj93* interaction is derived by integrating over a 3d half-lattice of Lennard-Jones 12/6 particles. The *wall/lj126* @@ -207,11 +300,11 @@ are the number density of the constituent particles, in the wall and colloid respectively, in units of 1/volume. The *wall/colloid* interaction is derived by integrating over -constituent LJ particles of size :math:`\sigma` within the colloid particle -and a 3d half-lattice of Lennard-Jones 12/6 particles of size :math:`\sigma` -in the wall. As mentioned in the preceding paragraph, the density of -particles in the wall and colloid can be different, as specified by -the :math:`\epsilon` prefactor. +constituent LJ particles of size :math:`\sigma` within the colloid +particle and a 3d half-lattice of Lennard-Jones 12/6 particles of size +:math:`\sigma` in the wall. As mentioned in the preceding paragraph, +the density of particles in the wall and colloid can be different, as +specified by the :math:`\epsilon` prefactor. For the *wall/harmonic* style, :math:`\epsilon` is effectively the spring constant K, and has units (energy/distance\^2). The input parameter @@ -220,20 +313,21 @@ spring is at the *cutoff*\ . This is a repulsive-only spring since the interaction is truncated at the *cutoff* For the *wall/morse* style, the three parameters are in this order: -:math:`D_0` the depth of the potential, :math:`\alpha` the width parameter, and -:math:`r_0` the location of the minimum. :math:`D_0` has energy units, :math:`\alpha` -inverse distance units, and :math:`r_0` distance units. +:math:`D_0` the depth of the potential, :math:`\alpha` the width +parameter, and :math:`r_0` the location of the minimum. :math:`D_0` has +energy units, :math:`\alpha` inverse distance units, and :math:`r_0` +distance units. -For any wall, the :math:`\epsilon` and/or :math:`\sigma` and/or :math:`\alpha` parameter can -be specified -as an :doc:`equal-style variable `, in which case it should be +For any wall that supports them, the :math:`\epsilon` and/or +:math:`\sigma` and/or :math:`\alpha` parameter can be specified as an +:doc:`equal-style variable `, in which case it should be specified as v_name, where name is the variable name. As with a -variable wall position, the variable is evaluated each timestep and -the result becomes the current epsilon or sigma of the wall. -Equal-style variables can specify formulas with various mathematical -functions, and include :doc:`thermo_style ` command -keywords for the simulation box parameters and timestep and elapsed -time. Thus it is easy to specify a time-dependent wall interaction. +variable wall position, the variable is evaluated each timestep and the +result becomes the current epsilon or sigma of the wall. Equal-style +variables can specify formulas with various mathematical functions, and +include :doc:`thermo_style ` command keywords for the +simulation box parameters and timestep and elapsed time. Thus it is +easy to specify a time-dependent wall interaction. .. note:: @@ -266,20 +360,19 @@ define the lattice spacings. The *fld* keyword can be used with a *yes* setting to invoke the wall constraint before pairwise interactions are computed. This allows an implicit FLD model using :doc:`pair_style lubricateU ` -to include the wall force in its calculations. If the setting is -*no*, wall forces are imposed after pairwise interactions, in the -usual manner. +to include the wall force in its calculations. If the setting is *no*, +wall forces are imposed after pairwise interactions, in the usual +manner. -The *pbc* keyword can be used with a *yes* setting to allow walls to -be specified in a periodic dimension. See the -:doc:`boundary ` command for options on simulation box -boundaries. The default for *pbc* is *no*, which means the system -must be non-periodic when using a wall. But you may wish to use a -periodic box. E.g. to allow some particles to interact with the wall -via the fix group-ID, and others to pass through it and wrap around a -periodic box. In this case you should ensure that the wall if -sufficiently far enough away from the box boundary. If you do not, -then particles may interact with both the wall and with periodic +The *pbc* keyword can be used with a *yes* setting to allow walls to be +specified in a periodic dimension. See the :doc:`boundary ` +command for options on simulation box boundaries. The default for *pbc* +is *no*, which means the system must be non-periodic when using a wall. +But you may wish to use a periodic box. E.g. to allow some particles to +interact with the wall via the fix group-ID, and others to pass through +it and wrap around a periodic box. In this case you should ensure that +the wall if sufficiently far enough away from the box boundary. If you +do not, then particles may interact with both the wall and with periodic images on the other side of the box, which is probably not what you want. @@ -328,6 +421,57 @@ perturbation on the particles: ---------- +.. include:: lepton_expression.rst + +---------- + +Table file format +""""""""""""""""" + +Suitable tables for use with fix *wall/table* can be created by the +Python code in the ``tools/tabulate`` folder of the LAMMPS source code +distribution. + +The format of a tabulated file is as follows (without the parenthesized +comments): + +.. parsed-literal:: + + # Tabulated wall potential UNITS: real + + HARMONIC (keyword is the first text on a line) + N 100 FP 200 200 + (blank line) + 1 0.04 1568.16 792.00 (index, distance to wall, energy, force) + 2 0.08 1536.64 784.00 + 3 0.12 1505.44 776.00 + ... + 99 3.96 0.16 8.00 + 100 4.00 0 0 + +A section begins with a non-blank line whose first character is not a +"#"; blank lines or lines starting with "#" can be used as comments +between sections. The first line begins with a keyword which identifies +the section. The line can contain additional text, but the initial text +must match the argument specified in the fix *wall/table* command. The +next line lists (in any order) one or more parameters for the table. +Each parameter is a keyword followed by one or more numeric values. + +The parameter "N" is required and its value is the number of table +entries that follow. Note that this may be different than the *N* +specified in the fix *wall/table* command. Let Ntable = *N* in the fix +command, and Nfile = "N" in the tabulated file. What LAMMPS does is a +preliminary interpolation by creating splines using the Nfile tabulated +values as nodal points. It uses these to interpolate as needed to +generate energy and force values at Ntable different points. The +resulting tables of length Ntable are then used as described above, when +computing energy and force for wall-particle interactions. This means that +if you want the interpolation tables of length Ntable to match exactly +what is in the tabulated file (with effectively no preliminary +interpolation), you should set Ntable = Nfile. + +---------- + Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -354,16 +498,15 @@ fix. This allows to set at which level of the :doc:`r-RESPA ` integrator the fix is adding its forces. Default is the outermost level. -This fix computes a global scalar energy and a global vector of -forces, which can be accessed by various :doc:`output commands -`. Note that the scalar energy is the sum of -interactions with all defined walls. If you want the energy on a -per-wall basis, you need to use multiple fix wall commands. The -length of the vector is equal to the number of walls defined by the -fix. Each vector value is the normal force on a specific wall. Note -that an outward force on a wall will be a negative value for *lo* -walls and a positive value for *hi* walls. The scalar and vector -values calculated by this fix are "extensive". +This fix computes a global scalar energy and a global vector of forces, +which can be accessed by various :doc:`output commands `. +Note that the scalar energy is the sum of interactions with all defined +walls. If you want the energy on a per-wall basis, you need to use +multiple fix wall commands. The length of the vector is equal to the +number of walls defined by the fix. Each vector value is the normal +force on a specific wall. Note that an outward force on a wall will be +a negative value for *lo* walls and a positive value for *hi* walls. +The scalar and vector values calculated by this fix are "extensive". No parameter of this fix can be used with the *start/stop* keywords of the :doc:`run ` command. @@ -386,7 +529,11 @@ invoked by the :doc:`minimize ` command. Restrictions """""""""""" - none + +Fix *wall/lepton* is part of the LEPTON package and only enabled if +LAMMPS was built with this package. See the :doc:`Build package +` page for more info. + Related commands """""""""""""""" diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index fdacbf9c4c..d03300439f 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -3487,6 +3487,7 @@ sz Sz Tabbernor tabinner +tabstyle Tadmor Tafipolsky tagID diff --git a/tools/tabulate/README.md b/tools/tabulate/README.md index fb23e260a1..6f63d03a80 100644 --- a/tools/tabulate/README.md +++ b/tools/tabulate/README.md @@ -6,13 +6,14 @@ table, and angle style table To create tables, you need to define your energy and - optionally - force functions and then an instance of either the PairTabulate(), -BondTabulate(), AngleTabulate(), or DihedralTabulate() class from the -tabulate module and call its run() method to generate the table. Most -of the settings (number of points, minimum, maximum etc.) are provided -as command line flags. The run() method may be called multiple times to -generate multiple tables, for instance after changing parameters of the -energy/force functions. If the force function is not provided, the -force will be determined through numerical differentiation. +BondTabulate(), AngleTabulate(), DihedralTabulate(), or WallTabulate() +class from the tabulate module and call its run() method to generate the +table. Most of the settings (number of points, minimum, maximum etc.) +are provided as command line flags. The run() method may be called +multiple times to generate multiple tables, for instance after changing +parameters of the energy/force functions. If the force function is not +provided, the force will be determined from the energy function through +numerical differentiation. Please see the individual tabulation scripts in this folder for examples: @@ -24,7 +25,8 @@ Please see the individual tabulation scripts in this folder for examples: | angle_harmonic_tabulate.py | creates a table for a harmonic angle potential table | | dihedral_harmonic_tabulate.py | creates a table for a harmonic dihedral potential table | | pair_hybrid_tabulate.py | creates a Morse/Lennard-Jones hybrid potential table with smooth switching | -| pair_zbladd_tabulate.py | creates a table for hybrid/overlay to use ZBL repulsion with an EAM potential | +| wall_harmonic_tabulate.py | creates a table for fix wall/table with a simple repulsive harmonic potential | +| wall_multi_tabulate.py | creates a table for fix wall/table with multiple tables | | ------------------------------|-------------------------------------------------------------------------------| Common command line flags: diff --git a/tools/tabulate/wall_multi_tabulate.py b/tools/tabulate/wall_multi_tabulate.py index 0458a929e2..b1b4aa6cbf 100755 --- a/tools/tabulate/wall_multi_tabulate.py +++ b/tools/tabulate/wall_multi_tabulate.py @@ -11,7 +11,7 @@ epsilon = 0.02 sigma = 2.0 depth = 20.0 width = 2.0 -rzero = 1.2 +r0 = 1.2 def harmonic_force(r): dr = r - rzero @@ -32,12 +32,12 @@ def lj126_energy(r): return f def morse_energy(r): - ralpha = math.exp(-width*(r-rzero)) + ralpha = math.exp(-width*(r-r0)) f = depth * (-1.0 + (1.0 - ralpha) * (1.0 - ralpha)) return f def morse_force(r): - ralpha = math.exp(-width*(r-rzero)) + ralpha = math.exp(-width*(r-r0)) f = -2.0 * depth * width * (1.0 -ralpha) * ralpha return f @@ -51,9 +51,9 @@ if __name__ == "__main__": sys.argv.append('--filename') sys.argv.append(fname) sys.argv.append('--num-points') - sys.argv.append('1000') + sys.argv.append('100') sys.argv.append('--inner') - sys.argv.append('0.02') + sys.argv.append('0.04') sys.argv.append('--outer') sys.argv.append('4.0') wtable = WallTabulate(harmonic_energy, harmonic_force, units='real') From b314f73ef466bee49cc22ba648d4e9744569c5f5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 23 Feb 2023 00:29:57 -0500 Subject: [PATCH 244/445] update .gitignore and fix typo in doc makefile --- doc/Makefile | 2 +- src/.gitignore | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/Makefile b/doc/Makefile index a8e2ba5300..ad80017b7e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -214,7 +214,7 @@ style_check : $(VENV) package_check : $(VENV) @(\ - . $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \\ + . $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \ python utils/check-packages.py -s ../src -d src ;\ deactivate ;\ ) diff --git a/src/.gitignore b/src/.gitignore index 22cb5f1ee0..c49992c53e 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -62,6 +62,8 @@ /angle_lepton.h /dihedral_lepton.cpp /dihedral_lepton.h +/fix_wall_lepton.cpp +/fix_wall_lepton.h /lepton_utils.cpp /lepton_utils.h From 34430c1047dcce1cc67c2d2c925b4a2023423e74 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 23 Feb 2023 00:57:41 -0500 Subject: [PATCH 245/445] add unit tests for fix wall/lepton and fix wall/table --- .../tests/fix-timestep-wall_lepton_const.yaml | 82 +++++++ .../tests/fix-timestep-wall_table_linear.yaml | 82 +++++++ .../tests/fix-timestep-wall_table_spline.yaml | 82 +++++++ unittest/force-styles/tests/wall.table | 204 ++++++++++++++++++ 4 files changed, 450 insertions(+) create mode 100644 unittest/force-styles/tests/fix-timestep-wall_lepton_const.yaml create mode 100644 unittest/force-styles/tests/fix-timestep-wall_table_linear.yaml create mode 100644 unittest/force-styles/tests/fix-timestep-wall_table_spline.yaml create mode 100644 unittest/force-styles/tests/wall.table diff --git a/unittest/force-styles/tests/fix-timestep-wall_lepton_const.yaml b/unittest/force-styles/tests/fix-timestep-wall_lepton_const.yaml new file mode 100644 index 0000000000..947bc6a95a --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-wall_lepton_const.yaml @@ -0,0 +1,82 @@ +--- +lammps_version: 8 Feb 2023 +date_generated: Thu Feb 23 00:40:51 2023 +epsilon: 4e-14 +skip_tests: +prerequisites: ! | + atom full + fix wall/lepton +pre_commands: ! | + boundary p f p +post_commands: ! | + fix move all nve + fix test solute wall/lepton ylo EDGE "k*(r-rc)^2;k=100.0" 5.0 yhi EDGE "k*(r-rc)^2;k=100.0" 5.0 + fix_modify test virial yes +input_file: in.fourmol +natoms: 29 +run_stress: ! |2- + 0.0000000000000000e+00 -7.2422093200265749e+02 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +global_scalar: 42.69977443532441 +global_vector: ! |- + 2 0 -161.92409617466126 +run_pos: ! |2 + 1 -2.7051715090682593e-01 2.4891718422041942e+00 -1.6687343912524535e-01 + 2 3.1037661579862175e-01 2.9347166386691113e+00 -8.5496435221221156e-01 + 3 -7.0402515865264603e-01 1.2304739304383521e+00 -6.2777422080240730e-01 + 4 -1.5818156002522876e+00 1.4837443919066966e+00 -1.2538703954644463e+00 + 5 -9.0719963033698159e-01 9.2651871779341399e-01 3.9954137559444142e-01 + 6 2.4831695467823400e-01 2.8312974957866005e-01 -1.2314232372542311e+00 + 7 3.4143527599853957e-01 -2.2646552136496162e-02 -2.5292291409504188e+00 + 8 1.1743552256787158e+00 -4.8863229191571117e-01 -6.3783432834416876e-01 + 9 1.3800524227031346e+00 -2.5274721005121037e-01 2.8353985882456578e-01 + 10 2.0510765220197009e+00 -1.4604063740411815e+00 -9.8323745080488900e-01 + 11 1.7878031944407509e+00 -1.9921863272886073e+00 -1.8890602447598965e+00 + 12 3.0063007038317027e+00 -4.9013350489718083e-01 -1.6231898106978369e+00 + 13 4.0515402959160571e+00 -8.9202011606485665e-01 -1.6400005529914481e+00 + 14 2.6066963345462244e+00 -4.1789253964874307e-01 -2.6634003608727506e+00 + 15 2.9695287185264685e+00 5.5422613167055734e-01 -1.2342022021669503e+00 + 16 2.6747029695037297e+00 -2.4124119054292041e+00 -2.3435746152831470e-02 + 17 2.2153577785010934e+00 -2.0897985186506944e+00 1.1963150794337314e+00 + 18 2.1369701704267587e+00 3.0158507413153752e+00 -3.5179348337454122e+00 + 19 1.5355837136075348e+00 2.6255292355297897e+00 -4.2353987779858038e+00 + 20 2.7727573003201997e+00 3.6923910440705336e+00 -3.9330842459619779e+00 + 21 4.9040128073837339e+00 -4.0752348170758461e+00 -3.6210314709795299e+00 + 22 4.3582355554510048e+00 -4.2126119427061379e+00 -4.4612844196307497e+00 + 23 5.7439382849366911e+00 -3.5821957939240279e+00 -3.8766361295959513e+00 + 24 2.0689243582618388e+00 3.1513346906720905e+00 3.1550389755134005e+00 + 25 1.3045351331892774e+00 3.2665125705550957e+00 2.5111855258151388e+00 + 26 2.5809237402747862e+00 4.0117602605470681e+00 3.2212060529139430e+00 + 27 -1.9611343130344261e+00 -4.3563411931314180e+00 2.1098293115505782e+00 + 28 -2.7473562684511403e+00 -4.0200819932374339e+00 1.5830052163432258e+00 + 29 -1.3126000191357743e+00 -3.5962518039473323e+00 2.2746342468733483e+00 +run_vel: ! |2 + 1 8.0432349631399738e-03 1.4401841389211066e-02 4.9594370365888983e-03 + 2 6.1330361195047721e-03 -2.0880295268721639e-02 -2.0467529305087918e-03 + 3 -8.3074380171099371e-03 -1.3074180712034015e-02 -4.0925567431707903e-03 + 4 -3.7694367867060264e-03 -6.5650784618522711e-03 -1.1170951231990144e-03 + 5 -1.1026343955717478e-02 -9.8958287307442973e-03 -2.8423479505575396e-03 + 6 -3.9677127674597606e-02 4.6816039080495052e-02 3.7148638820894170e-02 + 7 9.1033730239907995e-04 -1.0128528243740664e-02 -5.1568250829251872e-02 + 8 7.9064772413549398e-03 -3.3507427942055241e-03 3.4557101116794005e-02 + 9 1.5644169779778431e-03 3.7365552198096001e-03 1.5047408727814703e-02 + 10 2.9201446825927662e-02 -2.9249578944835361e-02 -1.5018077412006624e-02 + 11 -4.7835961594766378e-03 -3.7481385002840358e-03 -2.3464104088049835e-03 + 12 2.2696449755579846e-03 -3.4774139663753189e-04 -3.0640769495163746e-03 + 13 2.7531740375147718e-03 5.8171061651960147e-03 -7.9467453772151639e-04 + 14 3.5246182201851889e-03 -5.7939995452846414e-03 -3.9478431035191398e-03 + 15 -1.8547944555517633e-03 -5.8554729566882438e-03 6.2938485388423842e-03 + 16 1.8681499934669346e-02 -1.3262466149576239e-02 -4.5638651461858082e-02 + 17 -1.2896270037715950e-02 9.7527666092669853e-03 3.7296535331498307e-02 + 18 -8.0065791408039360e-04 -8.6270482947906296e-04 -1.4483041230016354e-03 + 19 1.2452390812060241e-03 -2.5061097279531195e-03 7.2998631045687393e-03 + 20 3.5930057934746205e-03 3.6938851526077724e-03 3.2322732077980833e-03 + 21 -1.4689219756964980e-03 -2.7352107824530941e-04 7.0581625180909957e-04 + 22 -7.0694199165145339e-03 -4.2577148692717511e-03 2.8079117911325202e-04 + 23 6.0446963236685169e-03 -1.4000131545098867e-03 2.5819754799379759e-03 + 24 3.1926371811980193e-04 -9.9445676110986579e-04 1.5000003249577114e-04 + 25 1.3789762510431792e-04 -4.4335895501596235e-03 -8.1808122106664959e-04 + 26 2.0485904106950169e-03 2.7813358601316649e-03 4.3245727251785661e-03 + 27 4.5604120562021738e-04 -1.0305522931717997e-03 2.1188058006115548e-04 + 28 -6.2544520854975905e-03 1.4127711193315927e-03 -1.8429821890767147e-03 + 29 6.4110631581209827e-04 3.1273432740202478e-03 3.7253671096581838e-03 +... diff --git a/unittest/force-styles/tests/fix-timestep-wall_table_linear.yaml b/unittest/force-styles/tests/fix-timestep-wall_table_linear.yaml new file mode 100644 index 0000000000..6291de136a --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-wall_table_linear.yaml @@ -0,0 +1,82 @@ +--- +lammps_version: 8 Feb 2023 +date_generated: Thu Feb 23 00:56:30 2023 +epsilon: 4e-14 +skip_tests: +prerequisites: ! | + atom full + fix wall/table +pre_commands: ! | + boundary p f p +post_commands: ! | + fix move all nve + fix test solute wall/table linear 2000 ylo EDGE ${input_dir}/wall.table HARMONIC 4.0 yhi EDGE ${input_dir}/wall.table HARMONIC 4.0 + fix_modify test virial yes +input_file: in.fourmol +natoms: 29 +run_stress: ! |2- + 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +global_scalar: 0 +global_vector: ! |- + 2 0 0 +run_pos: ! |2 + 1 -2.7045559775384032e-01 2.4912159905679729e+00 -1.6695851791541888e-01 + 2 3.1004029573899528e-01 2.9612354631094391e+00 -8.5466363037021464e-01 + 3 -7.0398551400789477e-01 1.2305509955830618e+00 -6.2777526944456274e-01 + 4 -1.5818159336499285e+00 1.4837407818929933e+00 -1.2538710836062004e+00 + 5 -9.0719763672789266e-01 9.2652103885675297e-01 3.9954210488374786e-01 + 6 2.4831720524855985e-01 2.8313021497871271e-01 -1.2314233331711453e+00 + 7 3.4143527641386412e-01 -2.2646551041391422e-02 -2.5292291414903052e+00 + 8 1.1743552229100009e+00 -4.8863228565853950e-01 -6.3783432910825522e-01 + 9 1.3800524229500313e+00 -2.5274721030406683e-01 2.8353985887095157e-01 + 10 2.0510765220543883e+00 -1.4604063740302866e+00 -9.8323745081712954e-01 + 11 1.7878031944442556e+00 -1.9921863272948861e+00 -1.8890602447625777e+00 + 12 3.0063007039340053e+00 -4.9013350496963298e-01 -1.6231898107386231e+00 + 13 4.0515402959192999e+00 -8.9202011606653986e-01 -1.6400005529924957e+00 + 14 2.6066963345543819e+00 -4.1789253965514156e-01 -2.6634003608794394e+00 + 15 2.9695287185712913e+00 5.5422613165234025e-01 -1.2342022021790127e+00 + 16 2.6747029695228521e+00 -2.4124119054564295e+00 -2.3435746150616152e-02 + 17 2.2153577785283796e+00 -2.0897985186907717e+00 1.1963150794479436e+00 + 18 2.1369701704080528e+00 3.0158507413593689e+00 -3.5179348337197793e+00 + 19 1.5355837136080202e+00 2.6255292355367410e+00 -4.2353987779869007e+00 + 20 2.7727573003170809e+00 3.6923910440725227e+00 -3.9330842459580020e+00 + 21 4.9040128073837339e+00 -4.0752348170758461e+00 -3.6210314709795299e+00 + 22 4.3582355554510048e+00 -4.2126119427061379e+00 -4.4612844196307497e+00 + 23 5.7439382849366911e+00 -3.5821957939240279e+00 -3.8766361295959513e+00 + 24 2.0689243582422630e+00 3.1513346907271012e+00 3.1550389754828800e+00 + 25 1.3045351331492134e+00 3.2665125705842848e+00 2.5111855257433504e+00 + 26 2.5809237402711274e+00 4.0117602605482832e+00 3.2212060529089896e+00 + 27 -1.9611343130357228e+00 -4.3563411931359752e+00 2.1098293115523705e+00 + 28 -2.7473562684513411e+00 -4.0200819932379330e+00 1.5830052163433954e+00 + 29 -1.3126000191359855e+00 -3.5962518039482929e+00 2.2746342468737835e+00 +run_vel: ! |2 + 1 8.1705744183262381e-03 1.6516406176274288e-02 4.7902264318912917e-03 + 2 5.4501493445687802e-03 5.1791699408496412e-03 -1.4372931530376625e-03 + 3 -8.2298292722385660e-03 -1.2926551614621376e-02 -4.0984181178163838e-03 + 4 -3.7699042590093549e-03 -6.5722892098813894e-03 -1.1184640360133316e-03 + 5 -1.1021961004346581e-02 -9.8906780939336057e-03 -2.8410737829284403e-03 + 6 -3.9676663166400034e-02 4.6817061464710256e-02 3.7148491979476124e-02 + 7 9.1033953013898666e-04 -1.0128524411938794e-02 -5.1568251805019748e-02 + 8 7.9064712058855742e-03 -3.3507254552631780e-03 3.4557098492564629e-02 + 9 1.5644176117320923e-03 3.7365546102722164e-03 1.5047408822037646e-02 + 10 2.9201446820573192e-02 -2.9249578745486147e-02 -1.5018077424322544e-02 + 11 -4.7835961513517542e-03 -3.7481385134185211e-03 -2.3464104142290089e-03 + 12 2.2696451841920681e-03 -3.4774154398130373e-04 -3.0640770327796979e-03 + 13 2.7531740451953164e-03 5.8171061612840502e-03 -7.9467454022160680e-04 + 14 3.5246182371994213e-03 -5.7939995585585529e-03 -3.9478431172751361e-03 + 15 -1.8547943640122950e-03 -5.8554729942777795e-03 6.2938485140538675e-03 + 16 1.8681499973445252e-02 -1.3262466204585334e-02 -4.5638651457003250e-02 + 17 -1.2896269981100378e-02 9.7527665265956451e-03 3.7296535360836762e-02 + 18 -8.0065795562956103e-04 -8.6270473963802124e-04 -1.4483040662692239e-03 + 19 1.2452390821512348e-03 -2.5061097135903924e-03 7.2998631029991060e-03 + 20 3.5930057870507443e-03 3.6938851567332597e-03 3.2322732161078646e-03 + 21 -1.4689219756961610e-03 -2.7352107824530291e-04 7.0581625180892197e-04 + 22 -7.0694199165145105e-03 -4.2577148692717545e-03 2.8079117911323598e-04 + 23 6.0446963236685230e-03 -1.4000131545098772e-03 2.5819754799379716e-03 + 24 3.1926367902287880e-04 -9.9445664749276221e-04 1.4999996959365317e-04 + 25 1.3789754514814532e-04 -4.4335894884532673e-03 -8.1808136725080173e-04 + 26 2.0485904035217588e-03 2.7813358633835962e-03 4.3245727149206761e-03 + 27 4.5604120293369840e-04 -1.0305523026921111e-03 2.1188058381358413e-04 + 28 -6.2544520861855151e-03 1.4127711176146879e-03 -1.8429821884794260e-03 + 29 6.4110631534402174e-04 3.1273432719593824e-03 3.7253671105656736e-03 +... diff --git a/unittest/force-styles/tests/fix-timestep-wall_table_spline.yaml b/unittest/force-styles/tests/fix-timestep-wall_table_spline.yaml new file mode 100644 index 0000000000..6c6c674342 --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-wall_table_spline.yaml @@ -0,0 +1,82 @@ +--- +lammps_version: 8 Feb 2023 +date_generated: Thu Feb 23 00:56:30 2023 +epsilon: 4e-14 +skip_tests: +prerequisites: ! | + atom full + fix wall/table +pre_commands: ! | + boundary p f p +post_commands: ! | + fix move all nve + fix test solute wall/table spline 200 ylo EDGE ${input_dir}/wall.table HARMONIC 4.0 yhi EDGE ${input_dir}/wall.table HARMONIC 4.0 + fix_modify test virial yes +input_file: in.fourmol +natoms: 29 +run_stress: ! |2- + 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +global_scalar: 0 +global_vector: ! |- + 2 0 0 +run_pos: ! |2 + 1 -2.7045559775384032e-01 2.4912159905679729e+00 -1.6695851791541888e-01 + 2 3.1004029573899528e-01 2.9612354631094391e+00 -8.5466363037021464e-01 + 3 -7.0398551400789477e-01 1.2305509955830618e+00 -6.2777526944456274e-01 + 4 -1.5818159336499285e+00 1.4837407818929933e+00 -1.2538710836062004e+00 + 5 -9.0719763672789266e-01 9.2652103885675297e-01 3.9954210488374786e-01 + 6 2.4831720524855985e-01 2.8313021497871271e-01 -1.2314233331711453e+00 + 7 3.4143527641386412e-01 -2.2646551041391422e-02 -2.5292291414903052e+00 + 8 1.1743552229100009e+00 -4.8863228565853950e-01 -6.3783432910825522e-01 + 9 1.3800524229500313e+00 -2.5274721030406683e-01 2.8353985887095157e-01 + 10 2.0510765220543883e+00 -1.4604063740302866e+00 -9.8323745081712954e-01 + 11 1.7878031944442556e+00 -1.9921863272948861e+00 -1.8890602447625777e+00 + 12 3.0063007039340053e+00 -4.9013350496963298e-01 -1.6231898107386231e+00 + 13 4.0515402959192999e+00 -8.9202011606653986e-01 -1.6400005529924957e+00 + 14 2.6066963345543819e+00 -4.1789253965514156e-01 -2.6634003608794394e+00 + 15 2.9695287185712913e+00 5.5422613165234025e-01 -1.2342022021790127e+00 + 16 2.6747029695228521e+00 -2.4124119054564295e+00 -2.3435746150616152e-02 + 17 2.2153577785283796e+00 -2.0897985186907717e+00 1.1963150794479436e+00 + 18 2.1369701704080528e+00 3.0158507413593689e+00 -3.5179348337197793e+00 + 19 1.5355837136080202e+00 2.6255292355367410e+00 -4.2353987779869007e+00 + 20 2.7727573003170809e+00 3.6923910440725227e+00 -3.9330842459580020e+00 + 21 4.9040128073837339e+00 -4.0752348170758461e+00 -3.6210314709795299e+00 + 22 4.3582355554510048e+00 -4.2126119427061379e+00 -4.4612844196307497e+00 + 23 5.7439382849366911e+00 -3.5821957939240279e+00 -3.8766361295959513e+00 + 24 2.0689243582422630e+00 3.1513346907271012e+00 3.1550389754828800e+00 + 25 1.3045351331492134e+00 3.2665125705842848e+00 2.5111855257433504e+00 + 26 2.5809237402711274e+00 4.0117602605482832e+00 3.2212060529089896e+00 + 27 -1.9611343130357228e+00 -4.3563411931359752e+00 2.1098293115523705e+00 + 28 -2.7473562684513411e+00 -4.0200819932379330e+00 1.5830052163433954e+00 + 29 -1.3126000191359855e+00 -3.5962518039482929e+00 2.2746342468737835e+00 +run_vel: ! |2 + 1 8.1705744183262381e-03 1.6516406176274288e-02 4.7902264318912917e-03 + 2 5.4501493445687802e-03 5.1791699408496412e-03 -1.4372931530376625e-03 + 3 -8.2298292722385660e-03 -1.2926551614621376e-02 -4.0984181178163838e-03 + 4 -3.7699042590093549e-03 -6.5722892098813894e-03 -1.1184640360133316e-03 + 5 -1.1021961004346581e-02 -9.8906780939336057e-03 -2.8410737829284403e-03 + 6 -3.9676663166400034e-02 4.6817061464710256e-02 3.7148491979476124e-02 + 7 9.1033953013898666e-04 -1.0128524411938794e-02 -5.1568251805019748e-02 + 8 7.9064712058855742e-03 -3.3507254552631780e-03 3.4557098492564629e-02 + 9 1.5644176117320923e-03 3.7365546102722164e-03 1.5047408822037646e-02 + 10 2.9201446820573192e-02 -2.9249578745486147e-02 -1.5018077424322544e-02 + 11 -4.7835961513517542e-03 -3.7481385134185211e-03 -2.3464104142290089e-03 + 12 2.2696451841920681e-03 -3.4774154398130373e-04 -3.0640770327796979e-03 + 13 2.7531740451953164e-03 5.8171061612840502e-03 -7.9467454022160680e-04 + 14 3.5246182371994213e-03 -5.7939995585585529e-03 -3.9478431172751361e-03 + 15 -1.8547943640122950e-03 -5.8554729942777795e-03 6.2938485140538675e-03 + 16 1.8681499973445252e-02 -1.3262466204585334e-02 -4.5638651457003250e-02 + 17 -1.2896269981100378e-02 9.7527665265956451e-03 3.7296535360836762e-02 + 18 -8.0065795562956103e-04 -8.6270473963802124e-04 -1.4483040662692239e-03 + 19 1.2452390821512348e-03 -2.5061097135903924e-03 7.2998631029991060e-03 + 20 3.5930057870507443e-03 3.6938851567332597e-03 3.2322732161078646e-03 + 21 -1.4689219756961610e-03 -2.7352107824530291e-04 7.0581625180892197e-04 + 22 -7.0694199165145105e-03 -4.2577148692717545e-03 2.8079117911323598e-04 + 23 6.0446963236685230e-03 -1.4000131545098772e-03 2.5819754799379716e-03 + 24 3.1926367902287880e-04 -9.9445664749276221e-04 1.4999996959365317e-04 + 25 1.3789754514814532e-04 -4.4335894884532673e-03 -8.1808136725080173e-04 + 26 2.0485904035217588e-03 2.7813358633835962e-03 4.3245727149206761e-03 + 27 4.5604120293369840e-04 -1.0305523026921111e-03 2.1188058381358413e-04 + 28 -6.2544520861855151e-03 1.4127711176146879e-03 -1.8429821884794260e-03 + 29 6.4110631534402174e-04 3.1273432719593824e-03 3.7253671105656736e-03 +... diff --git a/unittest/force-styles/tests/wall.table b/unittest/force-styles/tests/wall.table new file mode 100644 index 0000000000..5c2adedd39 --- /dev/null +++ b/unittest/force-styles/tests/wall.table @@ -0,0 +1,204 @@ +# DATE: 2023-02-23 UNITS: real +HARMONIC +N 200 FP 200.000000006796 200.000000002102 + + 1 0.02 1584.04 796 + 2 0.04 1568.16 792 + 3 0.06 1552.36 788 + 4 0.08 1536.64 784 + 5 0.1 1521 780 + 6 0.12 1505.44 776 + 7 0.14 1489.96 772 + 8 0.16 1474.56 768 + 9 0.18 1459.24 764 + 10 0.2 1444 760 + 11 0.22 1428.84 756 + 12 0.24 1413.76 752 + 13 0.26 1398.76 748 + 14 0.28 1383.84 744 + 15 0.3 1369 740 + 16 0.32 1354.24 736 + 17 0.34 1339.56 732 + 18 0.36 1324.96 728 + 19 0.38 1310.44 724 + 20 0.4 1296 720 + 21 0.42 1281.64 716 + 22 0.44 1267.36 712 + 23 0.46 1253.16 708 + 24 0.48 1239.04 704 + 25 0.5 1225 700 + 26 0.52 1211.04 696 + 27 0.54 1197.16 692 + 28 0.56 1183.36 688 + 29 0.58 1169.64 684 + 30 0.6 1156 680 + 31 0.62 1142.44 676 + 32 0.64 1128.96 672 + 33 0.66 1115.56 668 + 34 0.68 1102.24 664 + 35 0.7 1089 660 + 36 0.72 1075.84 656 + 37 0.74 1062.76 652 + 38 0.76 1049.76 648 + 39 0.78 1036.84 644 + 40 0.8 1024 640 + 41 0.82 1011.24 636 + 42 0.84 998.56 632 + 43 0.86 985.96 628 + 44 0.88 973.44 624 + 45 0.9 961 620 + 46 0.92 948.64 616 + 47 0.94 936.36 612 + 48 0.96 924.16 608 + 49 0.98 912.04 604 + 50 1 900 600 + 51 1.02 888.04 596 + 52 1.04 876.16 592 + 53 1.06 864.36 588 + 54 1.08 852.64 584 + 55 1.1 841 580 + 56 1.12 829.44 576 + 57 1.14 817.96 572 + 58 1.16 806.56 568 + 59 1.18 795.24 564 + 60 1.2 784 560 + 61 1.22 772.84 556 + 62 1.24 761.76 552 + 63 1.26 750.76 548 + 64 1.28 739.84 544 + 65 1.3 729 540 + 66 1.32 718.24 536 + 67 1.34 707.56 532 + 68 1.36 696.96 528 + 69 1.38 686.44 524 + 70 1.4 676 520 + 71 1.42 665.64 516 + 72 1.44 655.36 512 + 73 1.46 645.16 508 + 74 1.48 635.04 504 + 75 1.5 625 500 + 76 1.52 615.04 496 + 77 1.54 605.16 492 + 78 1.56 595.36 488 + 79 1.58 585.64 484 + 80 1.6 576 480 + 81 1.62 566.44 476 + 82 1.64 556.96 472 + 83 1.66 547.56 468 + 84 1.68 538.24 464 + 85 1.7 529 460 + 86 1.72 519.84 456 + 87 1.74 510.76 452 + 88 1.76 501.76 448 + 89 1.78 492.84 444 + 90 1.8 484 440 + 91 1.82 475.24 436 + 92 1.84 466.56 432 + 93 1.86 457.96 428 + 94 1.88 449.44 424 + 95 1.9 441 420 + 96 1.92 432.64 416 + 97 1.94 424.36 412 + 98 1.96 416.16 408 + 99 1.98 408.04 404 + 100 2 400 400 + 101 2.02 392.04 396 + 102 2.04 384.16 392 + 103 2.06 376.36 388 + 104 2.08 368.64 384 + 105 2.1 361 380 + 106 2.12 353.44 376 + 107 2.14 345.96 372 + 108 2.16 338.56 368 + 109 2.18 331.24 364 + 110 2.2 324 360 + 111 2.22 316.84 356 + 112 2.24 309.76 352 + 113 2.26 302.76 348 + 114 2.28 295.84 344 + 115 2.3 289 340 + 116 2.32 282.24 336 + 117 2.34 275.56 332 + 118 2.36 268.96 328 + 119 2.38 262.44 324 + 120 2.4 256 320 + 121 2.42 249.64 316 + 122 2.44 243.36 312 + 123 2.46 237.16 308 + 124 2.48 231.04 304 + 125 2.5 225 300 + 126 2.52 219.04 296 + 127 2.54 213.16 292 + 128 2.56 207.36 288 + 129 2.58 201.64 284 + 130 2.6 196 280 + 131 2.62 190.44 276 + 132 2.64 184.96 272 + 133 2.66 179.56 268 + 134 2.68 174.24 264 + 135 2.7 169 260 + 136 2.72 163.84 256 + 137 2.74 158.76 252 + 138 2.76 153.76 248 + 139 2.78 148.84 244 + 140 2.8 144 240 + 141 2.82 139.24 236 + 142 2.84 134.56 232 + 143 2.86 129.96 228 + 144 2.88 125.44 224 + 145 2.9 121 220 + 146 2.92 116.64 216 + 147 2.94 112.36 212 + 148 2.96 108.16 208 + 149 2.98 104.04 204 + 150 3 100 200 + 151 3.02 96.04 196 + 152 3.04 92.16 192 + 153 3.06 88.36 188 + 154 3.08 84.64 184 + 155 3.1 81 180 + 156 3.12 77.44 176 + 157 3.14 73.96 172 + 158 3.16 70.56 168 + 159 3.18 67.24 164 + 160 3.2 64 160 + 161 3.22 60.84 156 + 162 3.24 57.76 152 + 163 3.26 54.76 148 + 164 3.28 51.84 144 + 165 3.3 49 140 + 166 3.32 46.24 136 + 167 3.34 43.56 132 + 168 3.36 40.96 128 + 169 3.38 38.44 124 + 170 3.4 36 120 + 171 3.42 33.64 116 + 172 3.44 31.36 112 + 173 3.46 29.16 108 + 174 3.48 27.04 104 + 175 3.5 25 100 + 176 3.52 23.04 96 + 177 3.54 21.16 92 + 178 3.56 19.36 88 + 179 3.58 17.64 84 + 180 3.6 16 80 + 181 3.62 14.44 76 + 182 3.64 12.96 72 + 183 3.66 11.56 68 + 184 3.68 10.24 64 + 185 3.7 8.99999999999999 60 + 186 3.72 7.83999999999999 56 + 187 3.74 6.75999999999999 52 + 188 3.76 5.75999999999999 48 + 189 3.78 4.83999999999999 44 + 190 3.8 3.99999999999999 39.9999999999999 + 191 3.82 3.23999999999999 35.9999999999999 + 192 3.84 2.55999999999999 31.9999999999999 + 193 3.86 1.96 28 + 194 3.88 1.44 24 + 195 3.9 1 20 + 196 3.92 0.640000000000001 16 + 197 3.94 0.360000000000001 12 + 198 3.96 0.16 8.00000000000001 + 199 3.98 0.0400000000000001 4 + 200 4 0 -0 From 2e5bc2f6b7a379a1996cf7d83f9e028ee7434954 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 23 Feb 2023 01:09:44 -0500 Subject: [PATCH 246/445] add test example for validating custom potentials --- examples/wall/in.wall.lepton | 110 ++ examples/wall/in.wall.table | 129 ++ examples/wall/log.23Feb23.wall.lepton.g++.1 | 894 ++++++++++++++ examples/wall/log.23Feb23.wall.lepton.g++.4 | 894 ++++++++++++++ examples/wall/log.23Feb23.wall.table.g++.1 | 1131 +++++++++++++++++ examples/wall/log.23Feb23.wall.table.g++.4 | 1131 +++++++++++++++++ examples/wall/wall.inc | 16 + examples/wall/walltab.dat | 1212 +++++++++++++++++++ tools/tabulate/wall_multi_tabulate.py | 4 +- 9 files changed, 5519 insertions(+), 2 deletions(-) create mode 100644 examples/wall/in.wall.lepton create mode 100644 examples/wall/in.wall.table create mode 100644 examples/wall/log.23Feb23.wall.lepton.g++.1 create mode 100644 examples/wall/log.23Feb23.wall.lepton.g++.4 create mode 100644 examples/wall/log.23Feb23.wall.table.g++.1 create mode 100644 examples/wall/log.23Feb23.wall.table.g++.4 create mode 100644 examples/wall/wall.inc create mode 100644 examples/wall/walltab.dat diff --git a/examples/wall/in.wall.lepton b/examples/wall/in.wall.lepton new file mode 100644 index 0000000000..76d8e71f01 --- /dev/null +++ b/examples/wall/in.wall.lepton @@ -0,0 +1,110 @@ +units real +atom_style bond +boundary f p p +region box block -5.000000000000001 5.000000000000001 -5 5 -5 5 +create_box 1 box bond/types 1 extra/bond/per/atom 1 extra/special/per/atom 1 + +pair_style zero 5.0 +pair_coeff * * +mass * 1.0 +bond_style zero +bond_coeff * 1.0 + +create_atoms 1 single -4.0 0.0 0.0 +create_atoms 1 single 4.0 0.0 0.0 +create_atoms 1 single -5.0 0.0 0.0 +create_atoms 1 single 5.0 0.0 0.0 +create_bonds single/bond 1 3 1 +create_bonds single/bond 1 4 2 + +group move id 1:2 +write_restart walltest.restart + +variable name string wall-harmonic +include wall.inc + +fix 1 move wall/harmonic xlo -5.0 100 0.0 4.0 xhi 5.0 100 1.0 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string lepton-harmonic +include wall.inc + +fix 1 move wall/lepton xlo -5.0 "k*(r-rc)^2;k=100.0" 4.0 xhi 5.0 "k*(r-rc)^2;k=100.0" 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string bond-harmonic +include wall.inc + +bond_style harmonic +bond_coeff 1 100 4.0 +run 5 post no + +variable name string pair-harmonic +include wall.inc + +pair_style harmonic/cut +pair_coeff 1 1 100 4.0 +run 5 post no + +variable eps index 0.02 +variable sig index 2.0 +variable name string wall-lj126 +include wall.inc + +fix 1 move wall/lj126 xlo -5.0 ${eps} ${sig} 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string lepton-lj126 +include wall.inc + +fix 1 move wall/lepton xlo -5.0 "4.0*epsilon*((sigma/r)^12 - (sigma/r)^6);epsilon=v_eps;sigma=v_sig" 4.0 & + xhi 5.0 "4.0*epsilon*((sigma/r)^12 - (sigma/r)^6);epsilon=v_eps;sigma=v_sig" 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string pair-lj126 +include wall.inc + +pair_style lj/cut 4.0 +pair_coeff 1 1 ${eps} ${sig} +pair_modify shift yes +run 5 post no + +variable d0 index 20.0 +variable al index 2.0 +variable r0 index 1.2 + +variable name string wall-morse +include wall.inc + +fix 1 move wall/morse xlo -5.0 ${d0} ${al} ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string lepton-morse +include wall.inc + +fix 1 move wall/lepton xlo -5.0 "d0*(-1.0 + (1.0 - ralpha) * (1.0 - ralpha));ralpha=exp(-alpha*(r-r0));d0=v_d0;alpha=v_al;r0=v_r0" 4.0 & + xhi 5.0 "d0*(-1.0 + (1.0 - ralpha) * (1.0 - ralpha));ralpha=exp(-alpha*(r-r0));d0=v_d0;alpha=v_al;r0=v_r0" 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string bond-morse +include wall.inc + +bond_style morse +bond_coeff 1 ${d0} ${al} ${r0} +run 5 post no + +variable name string pair-morse +include wall.inc + +pair_style morse 4.0 +pair_coeff 1 1 ${d0} ${al} ${r0} +pair_modify shift yes +run 5 post no + +shell rm -f walltest.restart diff --git a/examples/wall/in.wall.table b/examples/wall/in.wall.table new file mode 100644 index 0000000000..f5b8232ef8 --- /dev/null +++ b/examples/wall/in.wall.table @@ -0,0 +1,129 @@ +units real +atom_style bond +boundary f p p +region box block -5.000000000000001 5.000000000000001 -5 5 -5 5 +create_box 1 box bond/types 1 extra/bond/per/atom 1 extra/special/per/atom 1 + +pair_style zero 5.0 +pair_coeff * * +mass * 1.0 +bond_style zero +bond_coeff * 1.0 + +create_atoms 1 single -4.0 0.0 0.0 +create_atoms 1 single 4.0 0.0 0.0 +create_atoms 1 single -5.0 0.0 0.0 +create_atoms 1 single 5.0 0.0 0.0 +create_bonds single/bond 1 3 1 +create_bonds single/bond 1 4 2 + +group move id 1:2 +write_restart walltest.restart + +variable name string wall-harmonic +include wall.inc + +fix 1 move wall/harmonic xlo -5.0 100 0.0 4.0 xhi 5.0 100 1.0 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string table-harmonic +include wall.inc + +fix 1 move wall/table linear 1000 xlo -5.0 walltab.dat HARMONIC 4.0 xhi 5.0 walltab.dat HARMONIC 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string spline-harmonic +include wall.inc + +fix 1 move wall/table spline 200 xlo -5.0 walltab.dat HARMONIC 4.0 xhi 5.0 walltab.dat HARMONIC 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string bond-harmonic +include wall.inc + +bond_style harmonic +bond_coeff 1 100 4.0 +run 5 post no + +variable name string pair-harmonic +include wall.inc + +pair_style harmonic/cut +pair_coeff 1 1 100 4.0 +run 5 post no + +variable eps index 0.02 +variable sig index 2.0 +variable name string wall-lj126 +include wall.inc + +fix 1 move wall/lj126 xlo -5.0 ${eps} ${sig} 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string table-lj126 +include wall.inc + +fix 1 move wall/table linear 1000 xlo -5.0 walltab.dat LJ126 4.0 xhi 5.0 walltab.dat LJ126 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string spline-lj126 +include wall.inc + +fix 1 move wall/table spline 200 xlo -5.0 walltab.dat LJ126 4.0 xhi 5.0 walltab.dat LJ126 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string pair-lj126 +include wall.inc + +pair_style lj/cut 4.0 +pair_coeff 1 1 ${eps} ${sig} +pair_modify shift yes +run 5 post no + +variable d0 index 20.0 +variable al index 2.0 +variable r0 index 1.2 + +variable name string wall-morse +include wall.inc + +fix 1 move wall/morse xlo -5.0 ${d0} ${al} ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string table-morse +include wall.inc + +fix 1 move wall/table linear 1000 xlo -5.0 walltab.dat MORSE 4.0 xhi 5.0 walltab.dat MORSE 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string spline-morse +include wall.inc + +fix 1 move wall/table spline 1000 xlo -5.0 walltab.dat MORSE 4.0 xhi 5.0 walltab.dat MORSE 4.0 +fix_modify 1 energy yes +run 5 post no + +variable name string bond-morse +include wall.inc + +bond_style morse +bond_coeff 1 ${d0} ${al} ${r0} +run 5 post no + +variable name string pair-morse +include wall.inc + +pair_style morse 4.0 +pair_coeff 1 1 ${d0} ${al} ${r0} +pair_modify shift yes +run 5 post no + +shell rm -f walltest.restart diff --git a/examples/wall/log.23Feb23.wall.lepton.g++.1 b/examples/wall/log.23Feb23.wall.lepton.g++.1 new file mode 100644 index 0000000000..91fb3a3a53 --- /dev/null +++ b/examples/wall/log.23Feb23.wall.lepton.g++.1 @@ -0,0 +1,894 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +units real +atom_style bond +boundary f p p +region box block -5.000000000000001 5.000000000000001 -5 5 -5 5 +create_box 1 box bond/types 1 extra/bond/per/atom 1 extra/special/per/atom 1 +Created orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + +pair_style zero 5.0 +pair_coeff * * +mass * 1.0 +bond_style zero +bond_coeff * 1.0 + +create_atoms 1 single -4.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single 4.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single -5.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single 5.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_bonds single/bond 1 3 1 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/bond 1 4 2 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +group move id 1:2 +2 atoms in group move +write_restart walltest.restart +System init for write_restart ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + +variable name string wall-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/harmonic xlo -5.0 100 0.0 4.0 xhi 5.0 100 1.0 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 1800 1800 0 + 1 16146.37291 6600.295604 144.3878119 1652.527054 1796.914866 0 + 2 59294.04011 24238.149 530.232812 1258.437705 1788.670517 0 + 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 + 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 + 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 +Loop time of 5.837e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string lepton-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/lepton xlo -5.0 "k*(r-rc)^2;k=100.0" 4.0 xhi 5.0 "k*(r-rc)^2;k=100.0" 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 1800 1800 0 + 1 16146.37291 6600.295604 144.3878119 1652.527054 1796.914866 0 + 2 59294.04011 24238.149 530.232812 1258.437705 1788.670517 0 + 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 + 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 + 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 +Loop time of 0.00343046 on 1 procs for 5 steps with 4 atoms + + +variable name string bond-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +bond_style harmonic +bond_coeff 1 100 4.0 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Communication cutoff 7 is shorter than a bond length based estimate of 8. This may lead to errors. (src/comm.cpp:723) +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 27427.366 0 1800 1800 900 + 1 16146.37291 36178.74173 144.3878119 1652.527054 1796.914866 826.263527 + 2 59294.04011 58444.6962 530.232812 1258.437705 1788.670517 629.2188524 + 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 + 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 + 5 194283.6024 91313.53086 1737.367544 25.51012833 1762.877672 12.75506417 +Loop time of 6.3996e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string pair-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style harmonic/cut +pair_coeff 1 1 100 4.0 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair harmonic/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 27427.366 0 1800 1800 900 + 1 16146.37291 36178.74173 144.3878119 1652.527054 1796.914866 826.263527 + 2 59294.04011 58444.6962 530.232812 1258.437705 1788.670517 629.2188524 + 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 + 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 + 5 170540.4005 97560.47089 1525.045619 190.8165235 1715.862142 178.0614593 +Loop time of 5.4513e-05 on 1 procs for 5 steps with 4 atoms + + +variable eps index 0.02 +variable sig index 2.0 +variable name string wall-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/lj126 xlo -5.0 ${eps} ${sig} 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 ${sig} 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 0.02 ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 0.02 2.0 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 645.1224609 645.1224609 0 + 1 178153.8707 72825.53278 1593.128544 0.2259591031 1593.354503 0 + 2 178262.3593 72869.88065 1594.098696 -0.02237405364 1594.076322 0 + 3 178259.9436 72868.89314 1594.077094 -0.003385746252 1594.073708 0 + 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 + 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 5.3398e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string lepton-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/lepton xlo -5.0 "4.0*epsilon*((sigma/r)^12 - (sigma/r)^6);epsilon=v_eps;sigma=v_sig" 4.0 xhi 5.0 "4.0*epsilon*((sigma/r)^12 - (sigma/r)^6);epsilon=v_eps;sigma=v_sig" 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 645.1224609 645.1224609 0 + 1 178153.8707 72825.53278 1593.128544 0.2259591031 1593.354503 0 + 2 178262.3593 72869.88065 1594.098696 -0.02237405364 1594.076322 0 + 3 178259.9436 72868.89314 1594.077094 -0.003385746252 1594.073708 0 + 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 + 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 0.0051554 on 1 procs for 5 steps with 4 atoms + + +variable name string pair-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style lj/cut 4.0 +pair_coeff 1 1 ${eps} ${sig} +pair_coeff 1 1 0.02 ${sig} +pair_coeff 1 1 0.02 2.0 +pair_modify shift yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 178343.7047 0 645.1224609 645.1224609 322.5612305 + 1 178153.8707 72925.96146 1593.128544 0.2259591031 1593.354503 0.1129795516 + 2 178262.3593 72867.28485 1594.098696 -0.02237405364 1594.076322 -0.01118702682 + 3 178260.8147 72867.80305 1594.084884 -0.007499601847 1594.077384 -0.005806728722 + 4 176007.6835 72778.53677 1573.936415 2.772305717 1576.708721 2.772305717 + 5 1.132219912e+27 4.628275436e+26 1.012479748e+25 3.761972158e+12 1.012479748e+25 3.761972158e+12 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 5.4716e-05 on 1 procs for 5 steps with 4 atoms + + +variable d0 index 20.0 +variable al index 2.0 +variable r0 index 1.2 + +variable name string wall-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/morse xlo -5.0 ${d0} ${al} ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 ${al} ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 2.0 ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 2.0 1.2 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 -30.02905654 -30.02905654 0 + 1 144.4114716 59.032354 1.291389498 -31.40065042 -30.10926092 0 + 2 471.9742076 192.9330696 4.220596384 -34.53885647 -30.31826008 0 + 3 784.0772455 320.5141877 7.011556 -37.58109301 -30.56953701 0 + 4 961.8950756 393.2023542 8.601679525 -39.34691775 -30.74523823 0 + 5 996.609681 407.3929504 8.91211246 -39.66353245 -30.75141999 0 +Loop time of 4.8727e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string lepton-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/lepton xlo -5.0 "d0*(-1.0 + (1.0 - ralpha) * (1.0 - ralpha));ralpha=exp(-alpha*(r-r0));d0=v_d0;alpha=v_al;r0=v_r0" 4.0 xhi 5.0 "d0*(-1.0 + (1.0 - ralpha) * (1.0 - ralpha));ralpha=exp(-alpha*(r-r0));d0=v_d0;alpha=v_al;r0=v_r0" 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 -30.02905654 -30.02905654 0 + 1 146.0893547 59.71823711 1.30639385 -31.40065042 -30.09425657 0 + 2 485.8091411 198.5884977 4.34431431 -34.55987817 -30.21556386 0 + 3 822.0828974 336.0500941 7.351418888 -37.63613582 -30.28471693 0 + 4 1018.806679 416.4666136 9.110607565 -39.39265114 -30.28204357 0 + 5 1050.331347 429.3532307 9.392514704 -39.63687095 -30.24435625 0 +Loop time of 0.00478609 on 1 procs for 5 steps with 4 atoms + + +variable name string bond-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +bond_style morse +bond_coeff 1 ${d0} ${al} ${r0} +bond_coeff 1 20.0 ${al} ${r0} +bond_coeff 1 20.0 2.0 ${r0} +bond_coeff 1 20.0 2.0 1.2 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 2683.187147 0 9.675661328 9.675661328 4.837830664 + 1 146.0893547 2514.939772 1.30639385 8.304067455 9.610461305 4.152033728 + 2 485.8091411 2063.804037 4.34431431 5.144839701 9.489154012 2.572419851 + 3 822.0828974 1456.368913 7.351418888 2.06858205 9.420000938 1.034291025 + 4 1018.806679 823.4383177 9.110607565 0.3120667313 9.422674297 0.1560333657 + 5 1050.331347 253.0262957 9.392514704 0.06784692056 9.460361624 0.03392346028 +Loop time of 3.7914e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string pair-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style morse 4.0 +pair_coeff 1 1 ${d0} ${al} ${r0} +pair_coeff 1 1 20.0 ${al} ${r0} +pair_coeff 1 1 20.0 2.0 ${r0} +pair_coeff 1 1 20.0 2.0 1.2 +pair_modify shift yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair morse, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 2683.187147 0 -30.02905654 -30.02905654 -15.01452827 + 1 146.0893547 2514.939772 1.30639385 -31.40065042 -30.09425657 -15.70032521 + 2 485.8091411 2063.804037 4.34431431 -34.55987817 -30.21556386 -17.27993908 + 3 822.0828974 1456.368913 7.351418888 -37.63613582 -30.28471693 -18.81806791 + 4 1018.806679 823.4383177 9.110607565 -39.39265114 -30.28204357 -19.69632557 + 5 1050.331347 253.0262957 9.392514704 -39.63687095 -30.24435625 -19.81843547 +Loop time of 4.2699e-05 on 1 procs for 5 steps with 4 atoms + + +shell rm -f walltest.restart +Total wall time: 0:00:00 diff --git a/examples/wall/log.23Feb23.wall.lepton.g++.4 b/examples/wall/log.23Feb23.wall.lepton.g++.4 new file mode 100644 index 0000000000..ba630cc5d8 --- /dev/null +++ b/examples/wall/log.23Feb23.wall.lepton.g++.4 @@ -0,0 +1,894 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +units real +atom_style bond +boundary f p p +region box block -5.000000000000001 5.000000000000001 -5 5 -5 5 +create_box 1 box bond/types 1 extra/bond/per/atom 1 extra/special/per/atom 1 +Created orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + +pair_style zero 5.0 +pair_coeff * * +mass * 1.0 +bond_style zero +bond_coeff * 1.0 + +create_atoms 1 single -4.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single 4.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.001 seconds +create_atoms 1 single -5.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single 5.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_bonds single/bond 1 3 1 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/bond 1 4 2 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +group move id 1:2 +2 atoms in group move +write_restart walltest.restart +System init for write_restart ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + +variable name string wall-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/harmonic xlo -5.0 100 0.0 4.0 xhi 5.0 100 1.0 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 1800 1800 0 + 1 16146.37291 6600.295604 144.3878119 1652.527054 1796.914866 0 + 2 59294.04011 24238.149 530.232812 1258.437705 1788.670517 0 + 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 + 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 + 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 +Loop time of 0.000225045 on 4 procs for 5 steps with 4 atoms + + +variable name string lepton-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/lepton xlo -5.0 "k*(r-rc)^2;k=100.0" 4.0 xhi 5.0 "k*(r-rc)^2;k=100.0" 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 1800 1800 0 + 1 16146.37291 6600.295604 144.3878119 1652.527054 1796.914866 0 + 2 59294.04011 24238.149 530.232812 1258.437705 1788.670517 0 + 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 + 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 + 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 +Loop time of 0.00491331 on 4 procs for 5 steps with 4 atoms + + +variable name string bond-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +bond_style harmonic +bond_coeff 1 100 4.0 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Communication cutoff 7 is shorter than a bond length based estimate of 8. This may lead to errors. (src/comm.cpp:723) +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 27427.366 0 1800 1800 900 + 1 16146.37291 36178.74173 144.3878119 1652.527054 1796.914866 826.263527 + 2 59294.04011 58444.6962 530.232812 1258.437705 1788.670517 629.2188524 + 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 + 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 + 5 194283.6024 91313.53086 1737.367544 25.51012833 1762.877672 12.75506417 +Loop time of 0.000214841 on 4 procs for 5 steps with 4 atoms + + +variable name string pair-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style harmonic/cut +pair_coeff 1 1 100 4.0 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair harmonic/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 27427.366 0 1800 1800 900 + 1 16146.37291 36178.74173 144.3878119 1652.527054 1796.914866 826.263527 + 2 59294.04011 58444.6962 530.232812 1258.437705 1788.670517 629.2188524 + 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 + 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 + 5 170540.4005 97560.47089 1525.045619 190.8165235 1715.862142 178.0614593 +Loop time of 0.000212697 on 4 procs for 5 steps with 4 atoms + + +variable eps index 0.02 +variable sig index 2.0 +variable name string wall-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/lj126 xlo -5.0 ${eps} ${sig} 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 ${sig} 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 0.02 ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 0.02 2.0 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 645.1224609 645.1224609 0 + 1 178153.8707 72825.53278 1593.128544 0.2259591031 1593.354503 0 + 2 178262.3593 72869.88065 1594.098696 -0.02237405364 1594.076322 0 + 3 178259.9436 72868.89314 1594.077094 -0.003385746252 1594.073708 0 + 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 + 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 0.000207412 on 4 procs for 5 steps with 4 atoms + + +variable name string lepton-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/lepton xlo -5.0 "4.0*epsilon*((sigma/r)^12 - (sigma/r)^6);epsilon=v_eps;sigma=v_sig" 4.0 xhi 5.0 "4.0*epsilon*((sigma/r)^12 - (sigma/r)^6);epsilon=v_eps;sigma=v_sig" 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 645.1224609 645.1224609 0 + 1 178153.8707 72825.53278 1593.128544 0.2259591031 1593.354503 0 + 2 178262.3593 72869.88065 1594.098696 -0.02237405364 1594.076322 0 + 3 178259.9436 72868.89314 1594.077094 -0.003385746252 1594.073708 0 + 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 + 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 0.00958101 on 4 procs for 5 steps with 4 atoms + + +variable name string pair-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style lj/cut 4.0 +pair_coeff 1 1 ${eps} ${sig} +pair_coeff 1 1 0.02 ${sig} +pair_coeff 1 1 0.02 2.0 +pair_modify shift yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 178343.7047 0 645.1224609 645.1224609 322.5612305 + 1 178153.8707 72925.96146 1593.128544 0.2259591031 1593.354503 0.1129795516 + 2 178262.3593 72867.28485 1594.098696 -0.02237405364 1594.076322 -0.01118702682 + 3 178260.8147 72867.80305 1594.084884 -0.007499601847 1594.077384 -0.005806728722 + 4 176007.6835 72778.53677 1573.936415 2.772305717 1576.708721 2.772305717 + 5 1.132219912e+27 4.628275436e+26 1.012479748e+25 3.761972158e+12 1.012479748e+25 3.761972158e+12 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 0.00016574 on 4 procs for 5 steps with 4 atoms + + +variable d0 index 20.0 +variable al index 2.0 +variable r0 index 1.2 + +variable name string wall-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/morse xlo -5.0 ${d0} ${al} ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 ${al} ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 2.0 ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 2.0 1.2 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 -30.02905654 -30.02905654 0 + 1 144.4114716 59.032354 1.291389498 -31.40065042 -30.10926092 0 + 2 471.9742076 192.9330696 4.220596384 -34.53885647 -30.31826008 0 + 3 784.0772455 320.5141877 7.011556 -37.58109301 -30.56953701 0 + 4 961.8950756 393.2023542 8.601679525 -39.34691775 -30.74523823 0 + 5 996.609681 407.3929504 8.91211246 -39.66353245 -30.75141999 0 +Loop time of 0.000162994 on 4 procs for 5 steps with 4 atoms + + +variable name string lepton-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/lepton xlo -5.0 "d0*(-1.0 + (1.0 - ralpha) * (1.0 - ralpha));ralpha=exp(-alpha*(r-r0));d0=v_d0;alpha=v_al;r0=v_r0" 4.0 xhi 5.0 "d0*(-1.0 + (1.0 - ralpha) * (1.0 - ralpha));ralpha=exp(-alpha*(r-r0));d0=v_d0;alpha=v_al;r0=v_r0" 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 -30.02905654 -30.02905654 0 + 1 146.0893547 59.71823711 1.30639385 -31.40065042 -30.09425657 0 + 2 485.8091411 198.5884977 4.34431431 -34.55987817 -30.21556386 0 + 3 822.0828974 336.0500941 7.351418888 -37.63613582 -30.28471693 0 + 4 1018.806679 416.4666136 9.110607565 -39.39265114 -30.28204357 0 + 5 1050.331347 429.3532307 9.392514704 -39.63687095 -30.24435625 0 +Loop time of 0.00780516 on 4 procs for 5 steps with 4 atoms + + +variable name string bond-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +bond_style morse +bond_coeff 1 ${d0} ${al} ${r0} +bond_coeff 1 20.0 ${al} ${r0} +bond_coeff 1 20.0 2.0 ${r0} +bond_coeff 1 20.0 2.0 1.2 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 2683.187147 0 9.675661328 9.675661328 4.837830664 + 1 146.0893547 2514.939772 1.30639385 8.304067455 9.610461305 4.152033728 + 2 485.8091411 2063.804037 4.34431431 5.144839701 9.489154012 2.572419851 + 3 822.0828974 1456.368913 7.351418888 2.06858205 9.420000938 1.034291025 + 4 1018.806679 823.4383177 9.110607565 0.3120667313 9.422674297 0.1560333657 + 5 1050.331347 253.0262957 9.392514704 0.06784692056 9.460361624 0.03392346028 +Loop time of 0.000141974 on 4 procs for 5 steps with 4 atoms + + +variable name string pair-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style morse 4.0 +pair_coeff 1 1 ${d0} ${al} ${r0} +pair_coeff 1 1 20.0 ${al} ${r0} +pair_coeff 1 1 20.0 2.0 ${r0} +pair_coeff 1 1 20.0 2.0 1.2 +pair_modify shift yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair morse, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 2683.187147 0 -30.02905654 -30.02905654 -15.01452827 + 1 146.0893547 2514.939772 1.30639385 -31.40065042 -30.09425657 -15.70032521 + 2 485.8091411 2063.804037 4.34431431 -34.55987817 -30.21556386 -17.27993908 + 3 822.0828974 1456.368913 7.351418888 -37.63613582 -30.28471693 -18.81806791 + 4 1018.806679 823.4383177 9.110607565 -39.39265114 -30.28204357 -19.69632557 + 5 1050.331347 253.0262957 9.392514704 -39.63687095 -30.24435625 -19.81843547 +Loop time of 0.000196232 on 4 procs for 5 steps with 4 atoms + + +shell rm -f walltest.restart +Total wall time: 0:00:00 diff --git a/examples/wall/log.23Feb23.wall.table.g++.1 b/examples/wall/log.23Feb23.wall.table.g++.1 new file mode 100644 index 0000000000..c03bc61f23 --- /dev/null +++ b/examples/wall/log.23Feb23.wall.table.g++.1 @@ -0,0 +1,1131 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +units real +atom_style bond +boundary f p p +region box block -5.000000000000001 5.000000000000001 -5 5 -5 5 +create_box 1 box bond/types 1 extra/bond/per/atom 1 extra/special/per/atom 1 +Created orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + +pair_style zero 5.0 +pair_coeff * * +mass * 1.0 +bond_style zero +bond_coeff * 1.0 + +create_atoms 1 single -4.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single 4.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single -5.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single 5.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_bonds single/bond 1 3 1 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/bond 1 4 2 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +group move id 1:2 +2 atoms in group move +write_restart walltest.restart +System init for write_restart ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + +variable name string wall-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/harmonic xlo -5.0 100 0.0 4.0 xhi 5.0 100 1.0 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 1800 1800 0 + 1 16146.37291 6600.295604 144.3878119 1652.527054 1796.914866 0 + 2 59294.04011 24238.149 530.232812 1258.437705 1788.670517 0 + 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 + 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 + 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 +Loop time of 7.7442e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string table-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table linear 1000 xlo -5.0 walltab.dat HARMONIC 4.0 xhi 5.0 walltab.dat HARMONIC 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 1800.000356 1800.000356 0 + 1 16146.37291 6600.295604 144.3878119 1652.527723 1796.915535 0 + 2 59294.04011 24238.149 530.232812 1258.437853 1788.670665 0 + 3 115302.7492 47133.32419 1031.086781 746.8824148 1777.969196 0 + 4 165817.4572 67782.66799 1482.811029 285.5061521 1768.317181 0 + 5 194283.6024 79419.02582 1737.367544 25.51090543 1762.878449 0 +Loop time of 7.9176e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string spline-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table spline 200 xlo -5.0 walltab.dat HARMONIC 4.0 xhi 5.0 walltab.dat HARMONIC 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 1800 1800 0 + 1 16146.37291 6600.295604 144.3878119 1652.527054 1796.914866 0 + 2 59294.04011 24238.149 530.232812 1258.437705 1788.670517 0 + 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 + 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 + 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 +Loop time of 7.4164e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string bond-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +bond_style harmonic +bond_coeff 1 100 4.0 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Communication cutoff 7 is shorter than a bond length based estimate of 8. This may lead to errors. (src/comm.cpp:723) +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 27427.366 0 1800 1800 900 + 1 16146.37291 36178.74173 144.3878119 1652.527054 1796.914866 826.263527 + 2 59294.04011 58444.6962 530.232812 1258.437705 1788.670517 629.2188524 + 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 + 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 + 5 194283.6024 91313.53086 1737.367544 25.51012833 1762.877672 12.75506417 +Loop time of 7.4638e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string pair-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style harmonic/cut +pair_coeff 1 1 100 4.0 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair harmonic/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 27427.366 0 1800 1800 900 + 1 16146.37291 36178.74173 144.3878119 1652.527054 1796.914866 826.263527 + 2 59294.04011 58444.6962 530.232812 1258.437705 1788.670517 629.2188524 + 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 + 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 + 5 170540.4005 97560.47089 1525.045619 190.8165235 1715.862142 178.0614593 +Loop time of 7.6049e-05 on 1 procs for 5 steps with 4 atoms + + +variable eps index 0.02 +variable sig index 2.0 +variable name string wall-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/lj126 xlo -5.0 ${eps} ${sig} 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 ${sig} 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 0.02 ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 0.02 2.0 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 645.1224609 645.1224609 0 + 1 178153.8707 72825.53278 1593.128544 0.2259591031 1593.354503 0 + 2 178262.3593 72869.88065 1594.098696 -0.02237405364 1594.076322 0 + 3 178259.9436 72868.89314 1594.077094 -0.003385746252 1594.073708 0 + 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 + 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 6.7788e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string table-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table linear 1000 xlo -5.0 walltab.dat LJ126 4.0 xhi 5.0 walltab.dat LJ126 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +WARNING: 1 of 400 force values in table are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/fix_wall_table.cpp:244) +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +WARNING: 1 of 400 force values in table are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/fix_wall_table.cpp:244) +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 645.2141852 645.2141852 0 + 1 178212.5398 72849.51549 1593.653189 0.2256644171 1593.878854 0 + 2 178320.9331 72893.82438 1594.622489 -0.02236253394 1594.600126 0 + 3 178318.518 72892.83712 1594.600891 -0.0033818408 1594.597509 0 + 4 178318.0722 72892.6549 1594.596905 0 1594.596905 0 + 5 178318.0722 72892.6549 1594.596905 0 1594.596905 0 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 7.0625e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string spline-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table spline 200 xlo -5.0 walltab.dat LJ126 4.0 xhi 5.0 walltab.dat LJ126 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +WARNING: 1 of 400 force values in table are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/fix_wall_table.cpp:244) +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +WARNING: 1 of 400 force values in table are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/fix_wall_table.cpp:244) +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 645.3361317 645.3361317 0 + 1 161871.9611 66169.83266 1447.528705 0.3353251002 1447.86403 0 + 2 162015.342 66228.44376 1448.810879 -0.02581160308 1448.785068 0 + 3 162012.784 66227.39811 1448.788005 -0.004635008226 1448.78337 0 + 4 162012.2554 66227.18201 1448.783278 0 1448.783278 0 + 5 162012.2554 66227.18201 1448.783278 0 1448.783278 0 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 7.8628e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string pair-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style lj/cut 4.0 +pair_coeff 1 1 ${eps} ${sig} +pair_coeff 1 1 0.02 ${sig} +pair_coeff 1 1 0.02 2.0 +pair_modify shift yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 178343.7047 0 645.1224609 645.1224609 322.5612305 + 1 178153.8707 72925.96146 1593.128544 0.2259591031 1593.354503 0.1129795516 + 2 178262.3593 72867.28485 1594.098696 -0.02237405364 1594.076322 -0.01118702682 + 3 178260.8147 72867.80305 1594.084884 -0.007499601847 1594.077384 -0.005806728722 + 4 176007.6835 72778.53677 1573.936415 2.772305717 1576.708721 2.772305717 + 5 1.132219912e+27 4.628275436e+26 1.012479748e+25 3.761972158e+12 1.012479748e+25 3.761972158e+12 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 5.1616e-05 on 1 procs for 5 steps with 4 atoms + + +variable d0 index 20.0 +variable al index 2.0 +variable r0 index 1.2 + +variable name string wall-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/morse xlo -5.0 ${d0} ${al} ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 ${al} ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 2.0 ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 2.0 1.2 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 -30.02905654 -30.02905654 0 + 1 144.4114716 59.032354 1.291389498 -31.40065042 -30.10926092 0 + 2 471.9742076 192.9330696 4.220596384 -34.53885647 -30.31826008 0 + 3 784.0772455 320.5141877 7.011556 -37.58109301 -30.56953701 0 + 4 961.8950756 393.2023542 8.601679525 -39.34691775 -30.74523823 0 + 5 996.609681 407.3929504 8.91211246 -39.66353245 -30.75141999 0 +Loop time of 3.8086e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string table-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table linear 1000 xlo -5.0 walltab.dat MORSE 4.0 xhi 5.0 walltab.dat MORSE 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 -30.0282104 -30.0282104 0 + 1 146.0967469 59.72125889 1.306459954 -31.40033773 -30.09387777 0 + 2 485.8417772 198.6018386 4.344606156 -34.55851819 -30.21391203 0 + 3 822.1558136 336.0799007 7.352070936 -37.63533573 -30.28326479 0 + 4 1018.904947 416.5067832 9.111486314 -39.39200056 -30.28051425 0 + 5 1050.436268 429.3961205 9.393452958 -39.63643565 -30.24298269 0 +Loop time of 3.7571e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string spline-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table spline 1000 xlo -5.0 walltab.dat MORSE 4.0 xhi 5.0 walltab.dat MORSE 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 -30.02905657 -30.02905657 0 + 1 146.0893531 59.71823647 1.306393836 -31.40065068 -30.09425684 0 + 2 485.809133 198.5884944 4.344314238 -34.55987846 -30.21556422 0 + 3 822.0828818 336.0500877 7.351418748 -37.63613601 -30.28471726 0 + 4 1018.80666 416.4666056 9.110607389 -39.39265128 -30.28204389 0 + 5 1050.331328 429.353223 9.392514534 -39.63687099 -30.24435645 0 +Loop time of 4.1369e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string bond-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +bond_style morse +bond_coeff 1 ${d0} ${al} ${r0} +bond_coeff 1 20.0 ${al} ${r0} +bond_coeff 1 20.0 2.0 ${r0} +bond_coeff 1 20.0 2.0 1.2 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 2683.187147 0 9.675661328 9.675661328 4.837830664 + 1 146.0893547 2514.939772 1.30639385 8.304067455 9.610461305 4.152033728 + 2 485.8091411 2063.804037 4.34431431 5.144839701 9.489154012 2.572419851 + 3 822.0828974 1456.368913 7.351418888 2.06858205 9.420000938 1.034291025 + 4 1018.806679 823.4383177 9.110607565 0.3120667313 9.422674297 0.1560333657 + 5 1050.331347 253.0262957 9.392514704 0.06784692056 9.460361624 0.03392346028 +Loop time of 5.8418e-05 on 1 procs for 5 steps with 4 atoms + + +variable name string pair-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 1 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.000 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style morse 4.0 +pair_coeff 1 1 ${d0} ${al} ${r0} +pair_coeff 1 1 20.0 ${al} ${r0} +pair_coeff 1 1 20.0 2.0 ${r0} +pair_coeff 1 1 20.0 2.0 1.2 +pair_modify shift yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair morse, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 2683.187147 0 -30.02905654 -30.02905654 -15.01452827 + 1 146.0893547 2514.939772 1.30639385 -31.40065042 -30.09425657 -15.70032521 + 2 485.8091411 2063.804037 4.34431431 -34.55987817 -30.21556386 -17.27993908 + 3 822.0828974 1456.368913 7.351418888 -37.63613582 -30.28471693 -18.81806791 + 4 1018.806679 823.4383177 9.110607565 -39.39265114 -30.28204357 -19.69632557 + 5 1050.331347 253.0262957 9.392514704 -39.63687095 -30.24435625 -19.81843547 +Loop time of 6.2323e-05 on 1 procs for 5 steps with 4 atoms + + +shell rm -f walltest.restart +Total wall time: 0:00:00 diff --git a/examples/wall/log.23Feb23.wall.table.g++.4 b/examples/wall/log.23Feb23.wall.table.g++.4 new file mode 100644 index 0000000000..d8329f739e --- /dev/null +++ b/examples/wall/log.23Feb23.wall.table.g++.4 @@ -0,0 +1,1131 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +units real +atom_style bond +boundary f p p +region box block -5.000000000000001 5.000000000000001 -5 5 -5 5 +create_box 1 box bond/types 1 extra/bond/per/atom 1 extra/special/per/atom 1 +Created orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + +pair_style zero 5.0 +pair_coeff * * +mass * 1.0 +bond_style zero +bond_coeff * 1.0 + +create_atoms 1 single -4.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single 4.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single -5.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_atoms 1 single 5.0 0.0 0.0 +Created 1 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds +create_bonds single/bond 1 3 1 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/bond 1 4 2 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +group move id 1:2 +2 atoms in group move +write_restart walltest.restart +System init for write_restart ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + +variable name string wall-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/harmonic xlo -5.0 100 0.0 4.0 xhi 5.0 100 1.0 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 1800 1800 0 + 1 16146.37291 6600.295604 144.3878119 1652.527054 1796.914866 0 + 2 59294.04011 24238.149 530.232812 1258.437705 1788.670517 0 + 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 + 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 + 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 +Loop time of 0.000226889 on 4 procs for 5 steps with 4 atoms + + +variable name string table-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table linear 1000 xlo -5.0 walltab.dat HARMONIC 4.0 xhi 5.0 walltab.dat HARMONIC 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 1800.000356 1800.000356 0 + 1 16146.37291 6600.295604 144.3878119 1652.527723 1796.915535 0 + 2 59294.04011 24238.149 530.232812 1258.437853 1788.670665 0 + 3 115302.7492 47133.32419 1031.086781 746.8824148 1777.969196 0 + 4 165817.4572 67782.66799 1482.811029 285.5061521 1768.317181 0 + 5 194283.6024 79419.02582 1737.367544 25.51090543 1762.878449 0 +Loop time of 0.000222504 on 4 procs for 5 steps with 4 atoms + + +variable name string spline-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table spline 200 xlo -5.0 walltab.dat HARMONIC 4.0 xhi 5.0 walltab.dat HARMONIC 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 1800 1800 0 + 1 16146.37291 6600.295604 144.3878119 1652.527054 1796.914866 0 + 2 59294.04011 24238.149 530.232812 1258.437705 1788.670517 0 + 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 + 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 + 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 +Loop time of 0.000211631 on 4 procs for 5 steps with 4 atoms + + +variable name string bond-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +bond_style harmonic +bond_coeff 1 100 4.0 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Communication cutoff 7 is shorter than a bond length based estimate of 8. This may lead to errors. (src/comm.cpp:723) +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 27427.366 0 1800 1800 900 + 1 16146.37291 36178.74173 144.3878119 1652.527054 1796.914866 826.263527 + 2 59294.04011 58444.6962 530.232812 1258.437705 1788.670517 629.2188524 + 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 + 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 + 5 194283.6024 91313.53086 1737.367544 25.51012833 1762.877672 12.75506417 +Loop time of 0.00017705 on 4 procs for 5 steps with 4 atoms + + +variable name string pair-harmonic +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style harmonic/cut +pair_coeff 1 1 100 4.0 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair harmonic/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 27427.366 0 1800 1800 900 + 1 16146.37291 36178.74173 144.3878119 1652.527054 1796.914866 826.263527 + 2 59294.04011 58444.6962 530.232812 1258.437705 1788.670517 629.2188524 + 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 + 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 + 5 170540.4005 97560.47089 1525.045619 190.8165235 1715.862142 178.0614593 +Loop time of 0.000186388 on 4 procs for 5 steps with 4 atoms + + +variable eps index 0.02 +variable sig index 2.0 +variable name string wall-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/lj126 xlo -5.0 ${eps} ${sig} 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 ${sig} 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 ${eps} ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 0.02 ${sig} 4.0 +fix 1 move wall/lj126 xlo -5.0 0.02 2.0 4.0 xhi 5.0 0.02 2.0 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 645.1224609 645.1224609 0 + 1 178153.8707 72825.53278 1593.128544 0.2259591031 1593.354503 0 + 2 178262.3593 72869.88065 1594.098696 -0.02237405364 1594.076322 0 + 3 178259.9436 72868.89314 1594.077094 -0.003385746252 1594.073708 0 + 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 + 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 0.000258277 on 4 procs for 5 steps with 4 atoms + + +variable name string table-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table linear 1000 xlo -5.0 walltab.dat LJ126 4.0 xhi 5.0 walltab.dat LJ126 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +WARNING: 1 of 400 force values in table are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/fix_wall_table.cpp:244) +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +WARNING: 1 of 400 force values in table are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/fix_wall_table.cpp:244) +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 645.2141852 645.2141852 0 + 1 178212.5398 72849.51549 1593.653189 0.2256644171 1593.878854 0 + 2 178320.9331 72893.82438 1594.622489 -0.02236253394 1594.600126 0 + 3 178318.518 72892.83712 1594.600891 -0.0033818408 1594.597509 0 + 4 178318.0722 72892.6549 1594.596905 0 1594.596905 0 + 5 178318.0722 72892.6549 1594.596905 0 1594.596905 0 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 0.000230164 on 4 procs for 5 steps with 4 atoms + + +variable name string spline-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table spline 200 xlo -5.0 walltab.dat LJ126 4.0 xhi 5.0 walltab.dat LJ126 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +WARNING: 1 of 400 force values in table are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/fix_wall_table.cpp:244) +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +WARNING: 1 of 400 force values in table are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/fix_wall_table.cpp:244) +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 645.3361317 645.3361317 0 + 1 161871.9611 66169.83266 1447.528705 0.3353251002 1447.86403 0 + 2 162015.342 66228.44376 1448.810879 -0.02581160308 1448.785068 0 + 3 162012.784 66227.39811 1448.788005 -0.004635008226 1448.78337 0 + 4 162012.2554 66227.18201 1448.783278 0 1448.783278 0 + 5 162012.2554 66227.18201 1448.783278 0 1448.783278 0 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 0.000182437 on 4 procs for 5 steps with 4 atoms + + +variable name string pair-lj126 +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style lj/cut 4.0 +pair_coeff 1 1 ${eps} ${sig} +pair_coeff 1 1 0.02 ${sig} +pair_coeff 1 1 0.02 2.0 +pair_modify shift yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 178343.7047 0 645.1224609 645.1224609 322.5612305 + 1 178153.8707 72925.96146 1593.128544 0.2259591031 1593.354503 0.1129795516 + 2 178262.3593 72867.28485 1594.098696 -0.02237405364 1594.076322 -0.01118702682 + 3 178260.8147 72867.80305 1594.084884 -0.007499601847 1594.077384 -0.005806728722 + 4 176007.6835 72778.53677 1573.936415 2.772305717 1576.708721 2.772305717 + 5 1.132219912e+27 4.628275436e+26 1.012479748e+25 3.761972158e+12 1.012479748e+25 3.761972158e+12 +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Loop time of 0.000170205 on 4 procs for 5 steps with 4 atoms + + +variable d0 index 20.0 +variable al index 2.0 +variable r0 index 1.2 + +variable name string wall-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/morse xlo -5.0 ${d0} ${al} ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 ${al} ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 ${r0} 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 ${d0} ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 ${al} ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 2.0 ${r0} 4.0 +fix 1 move wall/morse xlo -5.0 20.0 2.0 1.2 4.0 xhi 5.0 20.0 2.0 1.2 4.0 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 -30.02905654 -30.02905654 0 + 1 144.4114716 59.032354 1.291389498 -31.40065042 -30.10926092 0 + 2 471.9742076 192.9330696 4.220596384 -34.53885647 -30.31826008 0 + 3 784.0772455 320.5141877 7.011556 -37.58109301 -30.56953701 0 + 4 961.8950756 393.2023542 8.601679525 -39.34691775 -30.74523823 0 + 5 996.609681 407.3929504 8.91211246 -39.66353245 -30.75141999 0 +Loop time of 0.000141964 on 4 procs for 5 steps with 4 atoms + + +variable name string table-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table linear 1000 xlo -5.0 walltab.dat MORSE 4.0 xhi 5.0 walltab.dat MORSE 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 -30.0282104 -30.0282104 0 + 1 146.0967469 59.72125889 1.306459954 -31.40033773 -30.09387777 0 + 2 485.8417772 198.6018386 4.344606156 -34.55851819 -30.21391203 0 + 3 822.1558136 336.0799007 7.352070936 -37.63533573 -30.28326479 0 + 4 1018.904947 416.5067832 9.111486314 -39.39200056 -30.28051425 0 + 5 1050.436268 429.3961205 9.393452958 -39.63643565 -30.24298269 0 +Loop time of 0.000146935 on 4 procs for 5 steps with 4 atoms + + +variable name string spline-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +fix 1 move wall/table spline 1000 xlo -5.0 walltab.dat MORSE 4.0 xhi 5.0 walltab.dat MORSE 4.0 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +Reading fix wall/table table potential file walltab.dat with DATE: 2023-02-23 +fix_modify 1 energy yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 0 0 -30.02905657 -30.02905657 0 + 1 146.0893531 59.71823647 1.306393836 -31.40065068 -30.09425684 0 + 2 485.809133 198.5884944 4.344314238 -34.55987846 -30.21556422 0 + 3 822.0828818 336.0500877 7.351418748 -37.63613601 -30.28471726 0 + 4 1018.80666 416.4666056 9.110607389 -39.39265128 -30.28204389 0 + 5 1050.331328 429.353223 9.392514534 -39.63687099 -30.24435645 0 +Loop time of 0.000143113 on 4 procs for 5 steps with 4 atoms + + +variable name string bond-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +bond_style morse +bond_coeff 1 ${d0} ${al} ${r0} +bond_coeff 1 20.0 ${al} ${r0} +bond_coeff 1 20.0 2.0 ${r0} +bond_coeff 1 20.0 2.0 1.2 +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 7 + ghost atom cutoff = 7 + binsize = 3.5, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 2683.187147 0 9.675661328 9.675661328 4.837830664 + 1 146.0893547 2514.939772 1.30639385 8.304067455 9.610461305 4.152033728 + 2 485.8091411 2063.804037 4.34431431 5.144839701 9.489154012 2.572419851 + 3 822.0828974 1456.368913 7.351418888 2.06858205 9.420000938 1.034291025 + 4 1018.806679 823.4383177 9.110607565 0.3120667313 9.422674297 0.1560333657 + 5 1050.331347 253.0262957 9.392514704 0.06784692056 9.460361624 0.03392346028 +Loop time of 0.000130547 on 4 procs for 5 steps with 4 atoms + + +variable name string pair-morse +include wall.inc + +clear +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +read_restart walltest.restart +Reading restart file ... + restart file = 8 Feb 2023, LAMMPS = 8 Feb 2023 + restoring atom style bond from restart + orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 2 by 2 MPI processor grid + restoring pair style zero from restart + restoring bond style zero from restart + 4 atoms + 2 bonds +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_restart CPU = 0.001 seconds +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 1 1 1 + special bond factors coul: 1 1 1 + 1 = max # of 1-2 neighbors + 3 = max # of special neighbors + special bonds CPU = 0.000 seconds + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g + +pair_style morse 4.0 +pair_coeff 1 1 ${d0} ${al} ${r0} +pair_coeff 1 1 20.0 ${al} ${r0} +pair_coeff 1 1 20.0 2.0 ${r0} +pair_coeff 1 1 20.0 2.0 1.2 +pair_modify shift yes +run 5 post no +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 6 + ghost atom cutoff = 6 + binsize = 3, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair morse, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes + Step Temp Press KinEng PotEng TotEng c_pe + 0 0 2683.187147 0 -30.02905654 -30.02905654 -15.01452827 + 1 146.0893547 2514.939772 1.30639385 -31.40065042 -30.09425657 -15.70032521 + 2 485.8091411 2063.804037 4.34431431 -34.55987817 -30.21556386 -17.27993908 + 3 822.0828974 1456.368913 7.351418888 -37.63613582 -30.28471693 -18.81806791 + 4 1018.806679 823.4383177 9.110607565 -39.39265114 -30.28204357 -19.69632557 + 5 1050.331347 253.0262957 9.392514704 -39.63687095 -30.24435625 -19.81843547 +Loop time of 0.000136551 on 4 procs for 5 steps with 4 atoms + + +shell rm -f walltest.restart +Total wall time: 0:00:00 diff --git a/examples/wall/wall.inc b/examples/wall/wall.inc new file mode 100644 index 0000000000..1b36f2c38e --- /dev/null +++ b/examples/wall/wall.inc @@ -0,0 +1,16 @@ + +clear +read_restart walltest.restart +# log ${name}.log + +compute ea move pe/atom +compute pe move reduce sum c_ea +special_bonds lj/coul 1.0 1.0 1.0 + +thermo_style custom step temp press ke pe etotal c_pe +thermo 1 +thermo_modify format float %14.10g + +fix 0 move nve +# dump 1 all custom 1 ${name}.dump id x fx +# dump_modify 1 format float %20.15g diff --git a/examples/wall/walltab.dat b/examples/wall/walltab.dat new file mode 100644 index 0000000000..53b2b42700 --- /dev/null +++ b/examples/wall/walltab.dat @@ -0,0 +1,1212 @@ +# DATE: 2023-02-23 UNITS: real +HARMONIC +N 400 FP 199.99999998802 200.000000002102 + + 1 0.01 1592.01 798 + 2 0.02 1584.04 796 + 3 0.03 1576.09 794 + 4 0.04 1568.16 792 + 5 0.05 1560.25 790 + 6 0.06 1552.36 788 + 7 0.07 1544.49 786 + 8 0.08 1536.64 784 + 9 0.09 1528.81 782 + 10 0.1 1521 780 + 11 0.11 1513.21 778 + 12 0.12 1505.44 776 + 13 0.13 1497.69 774 + 14 0.14 1489.96 772 + 15 0.15 1482.25 770 + 16 0.16 1474.56 768 + 17 0.17 1466.89 766 + 18 0.18 1459.24 764 + 19 0.19 1451.61 762 + 20 0.2 1444 760 + 21 0.21 1436.41 758 + 22 0.22 1428.84 756 + 23 0.23 1421.29 754 + 24 0.24 1413.76 752 + 25 0.25 1406.25 750 + 26 0.26 1398.76 748 + 27 0.27 1391.29 746 + 28 0.28 1383.84 744 + 29 0.29 1376.41 742 + 30 0.3 1369 740 + 31 0.31 1361.61 738 + 32 0.32 1354.24 736 + 33 0.33 1346.89 734 + 34 0.34 1339.56 732 + 35 0.35 1332.25 730 + 36 0.36 1324.96 728 + 37 0.37 1317.69 726 + 38 0.38 1310.44 724 + 39 0.39 1303.21 722 + 40 0.4 1296 720 + 41 0.41 1288.81 718 + 42 0.42 1281.64 716 + 43 0.43 1274.49 714 + 44 0.44 1267.36 712 + 45 0.45 1260.25 710 + 46 0.46 1253.16 708 + 47 0.47 1246.09 706 + 48 0.48 1239.04 704 + 49 0.49 1232.01 702 + 50 0.5 1225 700 + 51 0.51 1218.01 698 + 52 0.52 1211.04 696 + 53 0.53 1204.09 694 + 54 0.54 1197.16 692 + 55 0.55 1190.25 690 + 56 0.56 1183.36 688 + 57 0.57 1176.49 686 + 58 0.58 1169.64 684 + 59 0.59 1162.81 682 + 60 0.6 1156 680 + 61 0.61 1149.21 678 + 62 0.62 1142.44 676 + 63 0.63 1135.69 674 + 64 0.64 1128.96 672 + 65 0.65 1122.25 670 + 66 0.66 1115.56 668 + 67 0.67 1108.89 666 + 68 0.68 1102.24 664 + 69 0.69 1095.61 662 + 70 0.7 1089 660 + 71 0.71 1082.41 658 + 72 0.72 1075.84 656 + 73 0.73 1069.29 654 + 74 0.74 1062.76 652 + 75 0.75 1056.25 650 + 76 0.76 1049.76 648 + 77 0.77 1043.29 646 + 78 0.78 1036.84 644 + 79 0.79 1030.41 642 + 80 0.8 1024 640 + 81 0.81 1017.61 638 + 82 0.82 1011.24 636 + 83 0.83 1004.89 634 + 84 0.84 998.56 632 + 85 0.85 992.25 630 + 86 0.86 985.96 628 + 87 0.87 979.69 626 + 88 0.88 973.44 624 + 89 0.89 967.21 622 + 90 0.9 961 620 + 91 0.91 954.81 618 + 92 0.92 948.64 616 + 93 0.93 942.49 614 + 94 0.94 936.36 612 + 95 0.95 930.25 610 + 96 0.96 924.16 608 + 97 0.97 918.09 606 + 98 0.98 912.04 604 + 99 0.99 906.01 602 + 100 1 900 600 + 101 1.01 894.01 598 + 102 1.02 888.04 596 + 103 1.03 882.09 594 + 104 1.04 876.16 592 + 105 1.05 870.25 590 + 106 1.06 864.36 588 + 107 1.07 858.49 586 + 108 1.08 852.64 584 + 109 1.09 846.81 582 + 110 1.1 841 580 + 111 1.11 835.21 578 + 112 1.12 829.44 576 + 113 1.13 823.69 574 + 114 1.14 817.96 572 + 115 1.15 812.25 570 + 116 1.16 806.56 568 + 117 1.17 800.89 566 + 118 1.18 795.24 564 + 119 1.19 789.61 562 + 120 1.2 784 560 + 121 1.21 778.41 558 + 122 1.22 772.84 556 + 123 1.23 767.29 554 + 124 1.24 761.76 552 + 125 1.25 756.25 550 + 126 1.26 750.76 548 + 127 1.27 745.29 546 + 128 1.28 739.84 544 + 129 1.29 734.41 542 + 130 1.3 729 540 + 131 1.31 723.61 538 + 132 1.32 718.24 536 + 133 1.33 712.89 534 + 134 1.34 707.56 532 + 135 1.35 702.25 530 + 136 1.36 696.96 528 + 137 1.37 691.69 526 + 138 1.38 686.44 524 + 139 1.39 681.21 522 + 140 1.4 676 520 + 141 1.41 670.81 518 + 142 1.42 665.64 516 + 143 1.43 660.49 514 + 144 1.44 655.36 512 + 145 1.45 650.25 510 + 146 1.46 645.16 508 + 147 1.47 640.09 506 + 148 1.48 635.04 504 + 149 1.49 630.01 502 + 150 1.5 625 500 + 151 1.51 620.01 498 + 152 1.52 615.04 496 + 153 1.53 610.09 494 + 154 1.54 605.16 492 + 155 1.55 600.25 490 + 156 1.56 595.36 488 + 157 1.57 590.49 486 + 158 1.58 585.64 484 + 159 1.59 580.81 482 + 160 1.6 576 480 + 161 1.61 571.21 478 + 162 1.62 566.44 476 + 163 1.63 561.69 474 + 164 1.64 556.96 472 + 165 1.65 552.25 470 + 166 1.66 547.56 468 + 167 1.67 542.89 466 + 168 1.68 538.24 464 + 169 1.69 533.61 462 + 170 1.7 529 460 + 171 1.71 524.41 458 + 172 1.72 519.84 456 + 173 1.73 515.29 454 + 174 1.74 510.76 452 + 175 1.75 506.25 450 + 176 1.76 501.76 448 + 177 1.77 497.29 446 + 178 1.78 492.84 444 + 179 1.79 488.41 442 + 180 1.8 484 440 + 181 1.81 479.61 438 + 182 1.82 475.24 436 + 183 1.83 470.89 434 + 184 1.84 466.56 432 + 185 1.85 462.25 430 + 186 1.86 457.96 428 + 187 1.87 453.69 426 + 188 1.88 449.44 424 + 189 1.89 445.21 422 + 190 1.9 441 420 + 191 1.91 436.81 418 + 192 1.92 432.64 416 + 193 1.93 428.49 414 + 194 1.94 424.36 412 + 195 1.95 420.25 410 + 196 1.96 416.16 408 + 197 1.97 412.09 406 + 198 1.98 408.04 404 + 199 1.99 404.01 402 + 200 2 400 400 + 201 2.01 396.01 398 + 202 2.02 392.04 396 + 203 2.03 388.09 394 + 204 2.04 384.16 392 + 205 2.05 380.25 390 + 206 2.06 376.36 388 + 207 2.07 372.49 386 + 208 2.08 368.64 384 + 209 2.09 364.81 382 + 210 2.1 361 380 + 211 2.11 357.21 378 + 212 2.12 353.44 376 + 213 2.13 349.69 374 + 214 2.14 345.96 372 + 215 2.15 342.25 370 + 216 2.16 338.56 368 + 217 2.17 334.89 366 + 218 2.18 331.24 364 + 219 2.19 327.61 362 + 220 2.2 324 360 + 221 2.21 320.41 358 + 222 2.22 316.84 356 + 223 2.23 313.29 354 + 224 2.24 309.76 352 + 225 2.25 306.25 350 + 226 2.26 302.76 348 + 227 2.27 299.29 346 + 228 2.28 295.84 344 + 229 2.29 292.41 342 + 230 2.3 289 340 + 231 2.31 285.61 338 + 232 2.32 282.24 336 + 233 2.33 278.89 334 + 234 2.34 275.56 332 + 235 2.35 272.25 330 + 236 2.36 268.96 328 + 237 2.37 265.69 326 + 238 2.38 262.44 324 + 239 2.39 259.21 322 + 240 2.4 256 320 + 241 2.41 252.81 318 + 242 2.42 249.64 316 + 243 2.43 246.49 314 + 244 2.44 243.36 312 + 245 2.45 240.25 310 + 246 2.46 237.16 308 + 247 2.47 234.09 306 + 248 2.48 231.04 304 + 249 2.49 228.01 302 + 250 2.5 225 300 + 251 2.51 222.01 298 + 252 2.52 219.04 296 + 253 2.53 216.09 294 + 254 2.54 213.16 292 + 255 2.55 210.25 290 + 256 2.56 207.36 288 + 257 2.57 204.49 286 + 258 2.58 201.64 284 + 259 2.59 198.81 282 + 260 2.6 196 280 + 261 2.61 193.21 278 + 262 2.62 190.44 276 + 263 2.63 187.69 274 + 264 2.64 184.96 272 + 265 2.65 182.25 270 + 266 2.66 179.56 268 + 267 2.67 176.89 266 + 268 2.68 174.24 264 + 269 2.69 171.61 262 + 270 2.7 169 260 + 271 2.71 166.41 258 + 272 2.72 163.84 256 + 273 2.73 161.29 254 + 274 2.74 158.76 252 + 275 2.75 156.25 250 + 276 2.76 153.76 248 + 277 2.77 151.29 246 + 278 2.78 148.84 244 + 279 2.79 146.41 242 + 280 2.8 144 240 + 281 2.81 141.61 238 + 282 2.82 139.24 236 + 283 2.83 136.89 234 + 284 2.84 134.56 232 + 285 2.85 132.25 230 + 286 2.86 129.96 228 + 287 2.87 127.69 226 + 288 2.88 125.44 224 + 289 2.89 123.21 222 + 290 2.9 121 220 + 291 2.91 118.81 218 + 292 2.92 116.64 216 + 293 2.93 114.49 214 + 294 2.94 112.36 212 + 295 2.95 110.25 210 + 296 2.96 108.16 208 + 297 2.97 106.09 206 + 298 2.98 104.04 204 + 299 2.99 102.01 202 + 300 3 100 200 + 301 3.01 98.01 198 + 302 3.02 96.04 196 + 303 3.03 94.09 194 + 304 3.04 92.16 192 + 305 3.05 90.25 190 + 306 3.06 88.36 188 + 307 3.07 86.49 186 + 308 3.08 84.64 184 + 309 3.09 82.81 182 + 310 3.1 81.0000000000001 180 + 311 3.11 79.21 178 + 312 3.12 77.4400000000001 176 + 313 3.13 75.69 174 + 314 3.14 73.9600000000001 172 + 315 3.15 72.25 170 + 316 3.16 70.56 168 + 317 3.17 68.89 166 + 318 3.18 67.2400000000001 164 + 319 3.19 65.61 162 + 320 3.2 64 160 + 321 3.21 62.41 158 + 322 3.22 60.84 156 + 323 3.23 59.29 154 + 324 3.24 57.76 152 + 325 3.25 56.25 150 + 326 3.26 54.76 148 + 327 3.27 53.29 146 + 328 3.28 51.84 144 + 329 3.29 50.41 142 + 330 3.3 49 140 + 331 3.31 47.61 138 + 332 3.32 46.24 136 + 333 3.33 44.89 134 + 334 3.34 43.56 132 + 335 3.35 42.25 130 + 336 3.36 40.96 128 + 337 3.37 39.69 126 + 338 3.38 38.44 124 + 339 3.39 37.21 122 + 340 3.4 36 120 + 341 3.41 34.81 118 + 342 3.42 33.64 116 + 343 3.43 32.49 114 + 344 3.44 31.36 112 + 345 3.45 30.25 110 + 346 3.46 29.16 108 + 347 3.47 28.09 106 + 348 3.48 27.04 104 + 349 3.49 26.01 102 + 350 3.5 25 100 + 351 3.51 24.01 98 + 352 3.52 23.04 96 + 353 3.53 22.09 94 + 354 3.54 21.16 92 + 355 3.55 20.25 90 + 356 3.56 19.36 88 + 357 3.57 18.49 86 + 358 3.58 17.64 84 + 359 3.59 16.81 82 + 360 3.6 16 80.0000000000001 + 361 3.61 15.21 78 + 362 3.62 14.44 76.0000000000001 + 363 3.63 13.69 74 + 364 3.64 12.96 72.0000000000001 + 365 3.65 12.25 70 + 366 3.66 11.56 68.0000000000001 + 367 3.67 10.89 66 + 368 3.68 10.24 64.0000000000001 + 369 3.69 9.61 62 + 370 3.7 9.00000000000002 60.0000000000001 + 371 3.71 8.41 58 + 372 3.72 7.84000000000001 56 + 373 3.73 7.29 54 + 374 3.74 6.76000000000001 52 + 375 3.75 6.25 50 + 376 3.76 5.76000000000001 48 + 377 3.77 5.29 46 + 378 3.78 4.84000000000001 44 + 379 3.79 4.41 42 + 380 3.8 4.00000000000001 40 + 381 3.81 3.61 38 + 382 3.82 3.24000000000001 36 + 383 3.83 2.89 34 + 384 3.84 2.56 32 + 385 3.85 2.25000000000001 30.0000000000001 + 386 3.86 1.96 28 + 387 3.87 1.69000000000001 26.0000000000001 + 388 3.88 1.44 24 + 389 3.89 1.21000000000001 22.0000000000001 + 390 3.9 1 20 + 391 3.91 0.810000000000005 18.0000000000001 + 392 3.92 0.640000000000001 16 + 393 3.93 0.490000000000004 14.0000000000001 + 394 3.94 0.360000000000001 12 + 395 3.95 0.250000000000003 10.0000000000001 + 396 3.96 0.16 8.00000000000001 + 397 3.97 0.0900000000000015 6.00000000000005 + 398 3.98 0.0400000000000001 4 + 399 3.99 0.0100000000000005 2.00000000000005 + 400 4 0 -0 + +LJ126 +N 400 FP 5.1118735962137e+32 -0.00309082031258548 + + 1 0.01 3.27679999999995e+26 3.93215999999997e+29 + 2 0.02 7.999999999992e+22 4.7999999999976e+25 + 3 0.03 6.16587730333692e+20 2.46635092134882e+23 + 4 0.04 1.953124999875e+19 5.8593749998125e+21 + 5 0.05 1.34217727967232e+18 3.22122547160678e+20 + 6 0.06 1.50534113742974e+17 3.01068227595687e+19 + 7 0.07 2.36740987047768e+16 4.0584169245491e+18 + 8 0.08 4.7683715625e+15 7.15255735839844e+17 + 9 0.09 1.16021858535701e+15 1.54695812023214e+17 + 10 0.1 327679994880000 3.93215996928e+16 + 11 0.11 104408943457223 1.1390066716612e+16 + 12 0.12 36751490925145.1 3.67514917824839e+15 + 13 0.13 14064674137985.3 1.29827766169443e+15 + 14 0.14 5779808584731.93 495412193547970 + 15 0.15 2525542893983.11 202043449498347 + 16 0.16 1164152913093.57 87311479926109.3 + 17 0.17 562422536382.565 39700421819385.7 + 18 0.18 283256342383.657 18883761176714.3 + 19 0.19 148049315667.806 9350486531543.45 + 20 0.2 79999920000 4799997600000 + 21 0.21 44546933756.973 2545540777462.22 + 22 0.22 25490420258.9142 1390387791156.62 + 23 0.23 14952537428.7256 780133289834.579 + 24 0.24 8972505590.93106 448625949342.506 + 25 0.25 5497537167.36 263882287349.76 + 26 0.26 3433742019.34244 158480783371.887 + 27 0.27 2183142760.29056 97028860804.3568 + 28 0.28 1411075621.44501 60474897165.3154 + 29 0.29 926125673.822696 38322619763.6554 + 30 0.3 616580707.0211 24663368747.2363 + 31 0.31 416009823.905961 16103717744.5564 + 32 0.32 284212325.932458 10658051629.4343 + 33 0.33 196459888.227809 7144068017.02626 + 34 0.34 137306926.997591 4846185323.48129 + 35 0.35 96966323.2389768 3324607400.77709 + 36 0.36 69152065.1207238 2305108038.94961 + 37 0.37 49775064.9237755 1614358790.00722 + 38 0.38 36143178.5600903 1141390382.96618 + 39 0.39 26463712.6560866 814290467.337231 + 40 0.4 19530000 585918750 + 41 0.41 14521498.0087087 425035227.636584 + 42 0.42 10874798.0545347 310721841.118787 + 43 0.43 8199466.01317535 228833608.99882 + 44 0.44 6222552.56599285 169715600.787249 + 45 0.45 4751638.77735359 126718588.565834 + 46 0.46 3649989.86758843 95224175.8000662 + 47 0.47 2819697.29321996 71998334.9953008 + 48 0.48 2190141.04129116 54758758.8131646 + 49 0.49 1710027.28319849 41882748.66355 + 50 0.5 1341849.6 32208322.56 + 51 0.51 1058006.65523823 24897697.4228116 + 52 0.52 838060.998837605 19342857.3223731 + 53 0.53 666789.987179218 15099746.8961697 + 54 0.54 532790.570446716 11842084.8319641 + 55 0.55 427474.077421262 9328724.96356281 + 56 0.56 344337.465207402 7380438.67822062 + 57 0.57 278431.824939693 5863294.06820348 + 58 0.58 225972.508581954 4676684.59533017 + 59 0.59 184051.546113289 3744655.68033901 + 60 0.6 150424.374483715 3009584.88336429 + 61 0.61 123350.855088644 2427551.68856224 + 62 0.62 101476.166388201 1964927.16046069 + 63 0.63 83741.1380986279 1595849.194324 + 64 0.64 69314.433233103 1300344.11505164 + 65 0.65 57541.0221131564 1062922.4467121 + 66 0.66 47902.8627772938 871524.277886254 + 67 0.67 39988.7686350844 716723.622846053 + 68 0.68 33471.2216469342 591125.556925389 + 69 0.69 28088.4588685097 488907.487779091 + 70 0.7 23630.5794663641 405468.670411373 + 71 0.71 19928.7293797829 337161.358693302 + 72 0.72 16846.6511480469 281083.781572781 + 73 0.73 14274.0582893633 234920.128588064 + 74 0.74 12121.4223978073 196816.419317638 + 75 0.75 10315.8580177291 165283.868420841 + 76 0.76 8797.86354892769 139123.396620918 + 77 0.77 7518.73194262011 117366.462742951 + 78 0.78 6438.48720142382 99228.5368424456 + 79 0.79 5524.23497941619 84072.3974988274 + 80 0.8 4748.84033203125 71379.0893554688 + 81 0.81 4089.86471239314 60724.8728913557 + 82 0.82 3528.70901623885 51762.8763522511 + 83 0.83 3049.92086898724 44208.4488137823 + 84 0.84 2640.63320118397 37827.4351559535 + 85 0.85 2290.10805995704 32426.7645022107 + 86 0.86 1989.36500087798 27846.8755825359 + 87 0.87 1730.87763742956 23955.6046859174 + 88 0.88 1508.32525488308 20643.2413037218 + 89 0.89 1316.38902199036 17818.5184898513 + 90 0.9 1150.58441170462 15405.3533779721 + 91 0.91 1007.12309029864 13340.1912562734 + 92 0.92 882.798845070896 11569.8364467355 + 93 0.93 774.893166074233 10049.6767670538 + 94 0.94 681.096932892021 8742.22695500175 + 95 0.95 599.44532713569 7615.93117817949 + 96 0.96 528.263629303608 6644.17646696409 + 97 0.97 466.121991846633 5804.47824031498 + 98 0.98 411.797629942172 5077.80654581059 + 99 0.99 364.243154342175 4448.0275999211 + 100 1 322.56 3901.44 + 101 1.01 285.976090530384 3426.38882771447 + 102 1.02 253.827030297804 3012.94396513177 + 103 1.03 225.540239747413 2652.63144983911 + 104 1.04 200.621550834657 2338.20872331377 + 105 1.05 178.643862357643 2063.4762716918 + 106 1.06 159.23752308986 1823.11949517041 + 107 1.07 142.082166618064 1612.5757313387 + 108 1.08 126.899767943477 1427.92224653664 + 109 1.09 113.448730008354 1265.78173613026 + 110 1.1 101.518839825454 1123.24247003337 + 111 1.11 90.9269600009698 997.790708555212 + 112 1.12 81.5133431159172 887.25341556569 + 113 1.13 73.1384744523848 789.749627072004 + 114 1.14 65.6803635603396 703.649106551692 + 115 1.15 59.0322176820994 627.537144288344 + 116 1.16 53.1004405144923 560.184545032147 + 117 1.17 47.8029085455291 500.522003491118 + 118 1.18 43.0674845428558 447.618196099855 + 119 1.19 38.8307339338883 400.661024822347 + 120 1.2 35.0368149992191 358.941538195209 + 121 1.21 31.6365181642494 321.84012949674 + 122 1.22 28.5864333536624 288.81467437058 + 123 1.23 25.8482274809145 259.390322524165 + 124 1.24 23.3880167730451 233.150701977299 + 125 1.25 21.1758208568525 209.730331169784 + 126 1.26 19.1850874200435 188.808065217971 + 127 1.27 17.3922778638774 170.101428704978 + 128 1.28 15.7765057268167 153.361709399544 + 129 1.29 14.3192208191916 138.369705888684 + 130 1.3 13.0039329982385 124.93203783215 + 131 1.31 11.8159703573738 112.877940862029 + 132 1.32 10.742267325336 102.056479441995 + 133 1.33 9.77117878844351 92.3341205878234 + 134 1.34 8.89231687835239 83.5926195011401 + 135 1.35 8.09640752156034 75.7271751060856 + 136 1.36 7.37516423666038 68.6448193911968 + 137 1.37 6.72117700043457 62.2630095039278 + 138 1.38 6.12781429229003 56.5083958552413 + 139 1.39 5.58913667505634 51.3157431780328 + 140 1.4 5.09982048453558 46.6269846396698 + 141 1.41 4.65509038531888 42.3903918148852 + 142 1.42 4.25065971041413 38.5598456475375 + 143 1.43 3.88267764071721 35.094195524972 + 144 1.44 3.54768240032668 31.9566953047941 + 145 1.45 3.2425597477324 29.1145066114402 + 146 1.46 2.96450613320954 26.5382609934959 + 147 1.47 2.71099597121152 24.201673631581 + 148 1.48 2.47975254479573 22.0812022357191 + 149 1.49 2.26872211852512 20.1557455917022 + 150 1.5 2.07605088805719 18.406376926131 + 151 1.51 1.90006443978594 16.8161078750468 + 152 1.52 1.73924943332248 15.3696793745607 + 153 1.53 1.59223725404604 14.0533762549498 + 154 1.54 1.45778941308428 12.8548627219953 + 155 1.55 1.3347844984538 11.7630362591856 + 156 1.56 1.22220650419816 10.7678977889214 + 157 1.57 1.11913438462253 9.8604361961486 + 158 1.58 1.0247326985066 9.03252554917343 + 159 1.59 0.938243223797885 8.27683355430592 + 160 1.6 0.858977437019348 7.58673995733261 + 161 1.61 0.786309763707168 6.95626375900101 + 162 1.62 0.719671516833175 6.37999824660786 + 163 1.63 0.658545449541767 5.85305296192972 + 164 1.64 0.602460856799685 5.37100182928644 + 165 1.65 0.550989167855032 4.92983675836218 + 166 1.66 0.50373997784832 4.52592611615155 + 167 1.67 0.460357472616855 4.15597753246054 + 168 1.68 0.420517205774839 3.81700456499657 + 169 1.69 0.383923191614426 3.5062968042922 + 170 1.7 0.350305281326764 3.22139304644752 + 171 1.71 0.319416793547456 2.96005720375087 + 172 1.72 0.291032373340814 2.72025666034601 + 173 1.73 0.264946056498474 2.50014281286752 + 174 1.74 0.240969518481067 2.29803356489672 + 175 1.75 0.218930489512642 2.11239756966217 + 176 1.76 0.198671319277887 1.94184003802907 + 177 1.77 0.180047676399622 1.78508994884384 + 178 1.78 0.162927369412905 1.64098851643657 + 179 1.79 0.147189277323862 1.50847878580419 + 180 1.8 0.132722379065058 1.38659623994277 + 181 1.81 0.119424872251388 1.27446031617392 + 182 1.82 0.107203372615978 1.17126673930439 + 183 1.83 0.0959721863774054 1.07628058922823 + 184 1.84 0.0856526485691159 0.988830029271115 + 185 1.85 0.0761725210595532 0.908300629309384 + 186 1.86 0.0674654446160545 0.834130224582963 + 187 1.87 0.0594704399251235 0.765804257257523 + 188 1.88 0.0521314529832651 0.702851553262425 + 189 1.89 0.0453969407224163 0.644840491811995 + 190 1.9 0.0392194931377522 0.591375529375228 + 191 1.91 0.0335554885481552 0.542094043751032 + 192 1.92 0.0283647789453533 0.49666346738496 + 193 1.93 0.0236104026805308 0.454778682174315 + 194 1.94 0.0192583220005616 0.416159650792266 + 195 1.95 0.0152771831830326 0.380549262054052 + 196 1.96 0.011638097232609 0.347711370081059 + 197 1.97 0.00831443929356093 0.317429009019945 + 198 1.98 0.00528166510655355 0.289502766868822 + 199 1.99 0.00251714299408876 0.263749303573146 + 200 2 0 0.24 + 201 2.01 -0.00228901906429909 0.218099725698431 + 202 2.02 -0.00436768079912425 0.197905714521054 + 203 2.03 -0.00625238164979804 0.179286538232021 + 204 2.04 -0.00795825652836287 0.162121169171087 + 205 2.05 -0.00949927847321568 0.14629812389388 + 206 2.06 -0.0108883501192544 0.131714680474321 + 207 2.07 -0.0121373876814899 0.118276162845335 + 208 2.08 -0.0132573980920064 0.105895286176151 + 209 2.09 -0.0142585498729917 0.0944915578457512 + 210 2.1 -0.0151502382767254 0.0839907290785127 + 211 2.11 -0.0159411451764045 0.0743242927653805 + 212 2.12 -0.016639294149014 0.0654290234070173 + 213 2.13 -0.0172521011527193 0.0572465554886841 + 214 2.14 -0.0177864211660622 0.0497229969341964 + 215 2.15 -0.0182485911242772 0.0428085745916192 + 216 2.16 -0.0186444694589691 0.0364573089797509 + 217 2.17 -0.0189794725209579 0.0306267157746301 + 218 2.18 -0.0192586081420424 0.0252775317419794 + 219 2.19 -0.019486506569534 0.020373463026883 + 220 2.2 -0.0196674489874736 0.0158809538982407 + 221 2.21 -0.0198053938202783 0.0117689742144395 + 222 2.22 -0.0199040009980056 0.0080088240299791 + 223 2.23 -0.0199666543473297 0.00457395390192573 + 224 2.24 -0.0199964822585545 0.00143979958145524 + 225 2.25 -0.019996376766422 -0.00141637010943526 + 226 2.26 -0.019969011171008 -0.00401559331158788 + 227 2.27 -0.0199168563145235 -0.00637734407335522 + 228 2.28 -0.0198421956202703 -0.00851965112057023 + 229 2.29 -0.0197471389912575 -0.0104592072875345 + 230 2.3 -0.0196336356579912 -0.0122114703731947 + 231 2.31 -0.0195034860576381 -0.0137907561215244 + 232 2.32 -0.0193583528200755 -0.0152103239657529 + 233 2.33 -0.0191997709302198 -0.0164824561219656 + 234 2.34 -0.0190291571304174 -0.0176185305682534 + 235 2.35 -0.0188478186215532 -0.0186290884005698 + 236 2.36 -0.0186569611168248 -0.0195238960153759 + 237 2.37 -0.0184576962978232 -0.0203120025316505 + 238 2.38 -0.0182510487186061 -0.0210017928305951 + 239 2.39 -0.0180379621998275 -0.0216010365600731 + 240 2.4 -0.0178193057516615 -0.0221169334222308 + 241 2.41 -0.0175958790612055 -0.0225561550366037 + 242 2.42 -0.0173684175772469 -0.0229248836471039 + 243 2.43 -0.0171375972227052 -0.023228847919412 + 244 2.44 -0.0169040387626965 -0.0234733560552774 + 245 2.45 -0.0166683118539951 -0.0236633264319042 + 246 2.46 -0.0164309387996731 -0.0238033159578182 + 247 2.47 -0.0161923980308578 -0.0238975463212279 + 248 2.48 -0.0159531273358642 -0.0239499282928091 + 249 2.49 -0.0157135268554007 -0.0239640842319152 + 250 2.5 -0.01547396186112 -0.023943368933376 + 251 2.51 -0.0152347653334678 -0.0238908889411751 + 252 2.52 -0.0149962403535728 -0.0238095204453263 + 253 2.53 -0.0147586623228006 -0.0237019258691133 + 254 2.54 -0.0145222810225697 -0.0235705692454532 + 255 2.55 -0.0142873225260751 -0.0234177304734231 + 256 2.56 -0.0140539909726934 -0.0232455185388944 + 257 2.57 -0.0138224702150363 -0.0230558837767028 + 258 2.58 -0.0135929253478739 -0.0228506292457848 + 259 2.59 -0.0133655041274656 -0.0226314212832035 + 260 2.6 -0.013140338289201 -0.0223997992979115 + 261 2.61 -0.012917544770867 -0.0221571848604376 + 262 2.62 -0.0126972268483229 -0.0219048901403872 + 263 2.63 -0.0124794751898578 -0.021644125739692 + 264 2.64 -0.0122643688350524 -0.0213760079659045 + 265 2.65 -0.0120519761035347 -0.0211015655864784 + 266 2.66 -0.0118423554386299 -0.0208217461018842 + 267 2.67 -0.0116355561905371 -0.020537421572559 + 268 2.68 -0.0114316193433321 -0.0202493940320658 + 269 2.69 -0.0112305781897813 -0.0199584005164126 + 270 2.7 -0.0110324589576661 -0.0196651177372457 + 271 2.71 -0.0108372813910468 -0.0193701664245735 + 272 2.72 -0.0106450592896536 -0.0190741153627698 + 273 2.73 -0.0104558010093575 -0.0187774851418501 + 274 2.74 -0.0102695099264674 -0.0184807516443931 + 275 2.75 -0.0100861848683998 -0.018184349286978 + 276 2.76 -0.00990582051308903 -0.0178886740336262 + 277 2.77 -0.00972840775933402 -0.0175940861974542 + 278 2.78 -0.00955393407012526 -0.0173009130455639 + 279 2.79 -0.00938238379084764 -0.0170094512211008 + 280 2.8 -0.0092137384441229 -0.0167199689953997 + 281 2.81 -0.00904797700292975 -0.0164327083622032 + 282 2.82 -0.00888507614352483 -0.0161478869850703 + 283 2.83 -0.00872501047958036 -0.0158657000082945 + 284 2.84 -0.00856775277885475 -0.0155863217409045 + 285 2.85 -0.00841327416362063 -0.0153099072226406 + 286 2.86 -0.00826154429598848 -0.0150365936801558 + 287 2.87 -0.008112531549185 -0.0147665018811108 + 288 2.88 -0.00796620316577118 -0.0144997373932774 + 289 2.89 -0.00782252540371654 -0.0142363917552666 + 290 2.9 -0.00768146367118216 -0.0139765435650238 + 291 2.91 -0.00754298265080599 -0.0137202594918023 + 292 2.92 -0.00740704641422874 -0.0134675952169205 + 293 2.93 -0.0072736185275476 -0.0132185963082382 + 294 2.94 -0.00714266214833727 -0.0129732990329359 + 295 2.95 -0.00701414011483394 -0.0127317311128642 + 296 2.96 -0.00688801502783611 -0.0124939124264287 + 297 2.97 -0.00676424932583852 -0.0122598556607 + 298 2.98 -0.00664280535387939 -0.0120295669171802 + 299 2.99 -0.00652364542654837 -0.0118030462744207 + 300 3 -0.00640673188557149 -0.0115802883104616 + 301 3.01 -0.00629202715236113 -0.0113612825878578 + 302 3.02 -0.00617949377589186 -0.0111460141038675 + 303 3.03 -0.00606909447623864 -0.0109344637081976 + 304 3.04 -0.00596079218409037 -0.010726608490537 + 305 3.05 -0.00585455007653046 -0.0105224221399565 + 306 3.06 -0.00575033160935592 -0.0103218752781076 + 307 3.07 -0.00564810054618798 -0.0101249357680231 + 308 3.08 -0.00554782098460957 -0.0099315690001964 + 309 3.09 -0.00544945737954914 -0.00974173815750352 + 310 3.1 -0.00535297456411485 -0.00955540446042336 + 311 3.11 -0.00525833776806946 -0.00937252739391286 + 312 3.12 -0.00516551263412281 -0.00919306491720141 + 313 3.13 -0.00507446523220689 -0.00901697365768222 + 314 3.14 -0.00498516207188684 -0.00884420908999869 + 315 3.15 -0.00489757011305085 -0.0086747257013485 + 316 3.16 -0.00481165677501198 -0.00850847714395953 + 317 3.17 -0.0047273899441455 -0.00834541637562582 + 318 3.18 -0.00464473798017724 -0.00818549578913289 + 319 3.19 -0.0045636697212299 -0.00802866733134403 + 320 3.2 -0.00448415448772721 -0.00787488261266845 + 321 3.21 -0.0044061620852487 -0.0077240930075819 + 322 3.22 -0.00432966280642131 -0.00757624974682629 + 323 3.23 -0.00425462743192826 -0.00743130400187142 + 324 3.24 -0.00418102723070959 -0.00728920696218331 + 325 3.25 -0.00410883395942396 -0.00714990990580627 + 326 3.26 -0.00403801986123603 -0.00701336426373192 + 327 3.27 -0.00396855766398934 -0.00687952167849605 + 328 3.28 -0.00390042057782043 -0.00674833405741498 + 329 3.29 -0.0038335822922657 -0.00661975362084443 + 330 3.3 -0.00376801697290912 -0.00649373294581906 + 331 3.31 -0.00370369925761526 -0.00637022500540547 + 332 3.32 -0.00364060425238888 -0.00624918320408006 + 333 3.33 -0.00357870752689941 -0.00613056140942109 + 334 3.34 -0.00351798510970581 -0.00601431398038557 + 335 3.35 -0.00345841348321468 -0.0059003957924224 + 336 3.36 -0.00339996957840208 -0.00578876225965695 + 337 3.37 -0.00334263076932723 -0.00567936935436567 + 338 3.38 -0.00328637486746409 -0.00557217362394473 + 339 3.39 -0.00323118011587515 -0.00546713220556294 + 340 3.4 -0.0031770251832493 -0.0053642028386758 + 341 3.41 -0.00312388915782479 -0.00526334387556606 + 342 3.42 -0.00307175154121582 -0.0051645142900641 + 343 3.43 -0.00302059224216055 -0.00506767368459182 + 344 3.44 -0.00297039157020643 -0.00497278229566303 + 345 3.45 -0.00292113022934775 -0.00487980099796471 + 346 3.46 -0.00287278931162898 -0.00478869130713483 + 347 3.47 -0.00282535029072639 -0.00469941538134419 + 348 3.48 -0.0027787950155194 -0.0046119360217826 + 349 3.49 -0.00273310570366224 -0.00452621667214249 + 350 3.5 -0.00268826493516526 -0.00444222141718669 + 351 3.51 -0.00264425564599499 -0.00435991498048109 + 352 3.52 -0.00260106112170057 -0.00427926272136684 + 353 3.53 -0.0025586649910741 -0.00420023063124215 + 354 3.54 -0.00251705121985127 -0.00412278532921804 + 355 3.55 -0.0024762041044583 -0.0040468940572084 + 356 3.56 -0.00243610826581068 -0.00397252467451004 + 357 3.57 -0.00239674864316831 -0.00389964565192452 + 358 3.58 -0.00235811048805159 -0.0038282260654699 + 359 3.59 -0.00232017935822227 -0.0037582355897268 + 360 3.6 -0.0022829411117324 -0.00368964449086024 + 361 3.61 -0.00224638190104462 -0.0036224236193553 + 362 3.62 -0.00221048816722635 -0.00355654440250213 + 363 3.63 -0.00217524663422022 -0.00349197883666304 + 364 3.64 -0.00214064430319279 -0.00342869947935186 + 365 3.65 -0.00210666844696334 -0.00336667944115366 + 366 3.66 -0.00207330660451415 -0.00330589237751054 + 367 3.67 -0.00204054657558338 -0.00324631248039738 + 368 3.68 -0.00200837641534185 -0.00318791446990948 + 369 3.69 -0.00197678442915411 -0.00313067358578226 + 370 3.7 -0.00194575916742469 -0.00307456557886165 + 371 3.71 -0.00191528942052976 -0.00301956670254226 + 372 3.72 -0.00188536421383456 -0.00296565370418886 + 373 3.73 -0.00185597280279656 -0.00291280381655574 + 374 3.74 -0.00182710466815449 -0.00286099474921692 + 375 3.75 -0.00179874951120284 -0.00281020468001918 + 376 3.76 -0.00177089724915176 -0.00276041224656904 + 377 3.77 -0.00174353801057185 -0.00271159653776342 + 378 3.78 -0.00171666213092339 -0.0026637370853732 + 379 3.79 -0.0016902601481694 -0.00261681385568771 + 380 3.8 -0.00166432279847199 -0.00257080724122772 + 381 3.81 -0.00163884101197116 -0.00252569805253342 + 382 3.82 -0.00161380590864532 -0.00248146751003353 + 383 3.83 -0.0015892087942527 -0.00243809723600076 + 384 3.84 -0.00156504115635276 -0.00239556924659847 + 385 3.85 -0.00154129466040667 -0.00235386594402276 + 386 3.86 -0.00151796114595583 -0.0023129701087436 + 387 3.87 -0.00149503262287753 -0.0022728648918484 + 388 3.88 -0.00147250126771658 -0.00223353380749066 + 389 3.89 -0.00145035942009203 -0.00219496072544632 + 390 3.9 -0.00142859957917763 -0.00215712986377968 + 391 3.91 -0.00140721440025518 -0.00212002578162075 + 392 3.92 -0.00138619669133956 -0.00208363337205523 + 393 3.93 -0.00136553940987418 -0.00204793785512849 + 394 3.94 -0.00134523565949593 -0.00201292477096412 + 395 3.95 -0.00132527868686831 -0.00197857997299782 + 396 3.96 -0.00130566187858167 -0.00194488962132692 + 397 3.97 -0.00128637875811934 -0.00191184017617574 + 398 3.98 -0.00126742298288858 -0.00187941839147665 + 399 3.99 -0.00124878834131509 -0.0018476113085668 + 400 4 -0.00123046875 -0.00181640625 + +MORSE +N 400 FP 35629.9118333254 -0.587282451914145 + + 1 0.01 1902.72240342255 8475.28184280469 + 2 0.02 1819.72699525883 8126.18409723003 + 3 0.03 1740.15198891874 7791.10688069349 + 4 0.04 1663.85997942269 7469.49386217661 + 5 0.05 1590.71901464609 7160.81065496952 + 6 0.06 1520.60238022017 6864.54395364299 + 7 0.07 1453.38839289256 6580.20070491139 + 8 0.08 1388.96020201532 6307.30731105669 + 9 0.09 1327.20559884127 6045.40886463566 + 10 0.1 1268.016833322 5794.06841324272 + 11 0.11 1211.29043811285 5552.86625314907 + 12 0.12 1156.92705950192 5321.39925068477 + 13 0.13 1104.83129499106 5099.28019027514 + 14 0.14 1054.9115372676 4886.1371480854 + 15 0.15 1007.0798243158 4681.6128902686 + 16 0.16 961.251695426879 4485.36429485122 + 17 0.17 917.346052875832 4297.06179632881 + 18 0.18 875.285029042485 4116.38885208026 + 19 0.19 834.993858762904 3943.04142974457 + 20 0.2 796.400756705659 3776.72751473709 + 21 0.21 759.436799575541 3617.16663711504 + 22 0.22 724.035812955044 3464.08941703271 + 23 0.23 690.134262601413 3317.23712805663 + 24 0.24 657.671150024154 3176.36127763988 + 25 0.25 626.587912174846 3041.22320408172 + 26 0.26 596.828325087614 2911.59368932575 + 27 0.27 568.33841131505 2787.25258697453 + 28 0.28 541.066351010385 2667.98846492367 + 29 0.29 514.962396512638 2553.59826204124 + 30 0.3 489.978790297042 2443.8869583412 + 31 0.31 466.069686158486 2338.66725812124 + 32 0.32 443.191073500887 2237.75928555576 + 33 0.33 421.300704610396 2140.99029225534 + 34 0.34 400.358024795147 2048.19437632267 + 35 0.35 380.324105278852 1959.21221245358 + 36 0.36 361.161578739974 1873.89079264966 + 37 0.37 342.834577392459 1792.08317712559 + 38 0.38 325.308673508092 1713.64825501114 + 39 0.39 308.550822284476 1638.45051446301 + 40 0.4 292.529306966382 1566.35982181714 + 41 0.41 277.213686131865 1497.25120942645 + 42 0.42 262.574743057994 1431.004671843 + 43 0.43 248.584437084416 1367.50497001672 + 44 0.44 235.215856896169 1306.64144319605 + 45 0.45 222.443175650231 1248.30782822797 + 46 0.46 210.241607873305 1192.40208596672 + 47 0.47 198.587368061129 1138.82623451213 + 48 0.48 187.457630912382 1087.48618900925 + 49 0.49 176.830493132862 1038.29160775156 + 50 0.5 166.684936748154 991.15574434019 + 51 0.51 157.000793865418 945.995305661252 + 52 0.52 147.758712827269 902.730315452694 + 53 0.53 138.940125702962 861.283983241156 + 54 0.54 130.527217064238 821.58257843782 + 55 0.55 122.502893995264 783.555309390595 + 56 0.56 114.85075728809 747.134207197903 + 57 0.57 107.555073776936 712.254014096973 + 58 0.58 100.600749766475 678.852076246914 + 59 0.59 93.9733055110433 646.86824073388 + 60 0.6 87.6588507033701 616.244756632404 + 61 0.61 81.6440609330888 586.926179963529 + 62 0.62 75.9161550768193 558.859282396572 + 63 0.63 70.4628735831318 531.99296354742 + 64 0.64 65.2724576171355 506.278166731982 + 65 0.65 60.3336290308251 481.667798039015 + 66 0.66 55.6355711266481 458.116648591834 + 67 0.67 51.1679101830355 435.581319873578 + 68 0.68 46.9206977118646 414.020151995583 + 69 0.69 42.884393419008 393.393154793176 + 70 0.7 39.0498488402512 373.661941637728 + 71 0.71 35.4082916259559 354.789665858177 + 72 0.72 31.9513104488903 336.740959669411 + 73 0.73 28.6708405106521 319.48187550895 + 74 0.74 25.5591496230812 302.979829687229 + 75 0.75 22.6088248419809 287.20354826048 + 76 0.76 19.8127596313634 272.12301503883 + 77 0.77 17.1641415372893 257.709421645621 + 78 0.78 14.6564403511958 243.935119547271 + 79 0.79 12.2833967433974 230.773573976182 + 80 0.8 10.0390113482036 218.199319672212 + 81 0.81 7.91753428282901 206.187918371172 + 82 0.82 5.91345508297041 194.715917971627 + 83 0.83 4.02149303860052 183.760813313951 + 84 0.84 2.23658791417552 173.301008508213 + 85 0.85 0.553891038074434 163.315780749936 + 86 0.86 -1.03124325331362 153.785245565181 + 87 0.87 -2.52326583086401 144.690323428706 + 88 0.88 -3.92644066081243 136.012707701146 + 89 0.89 -5.24485237860018 127.734833833307 + 90 0.9 -6.48241356088942 119.839849787683 + 91 0.91 -7.64287170767925 112.311587629289 + 92 0.92 -8.72981594598401 105.134536239752 + 93 0.93 -9.74668346608387 98.2938151104532 + 94 0.94 -10.6967657009243 91.7751491722138 + 95 0.95 -11.5832142588242 85.5648446207133 + 96 0.96 -12.4090466192534 79.6497656984179 + 97 0.97 -13.1771516010533 74.0173123953453 + 98 0.98 -13.8902946121092 68.6553990324699 + 99 0.99 -14.5511226891235 63.5524336929966 + 100 1 -15.1621693358015 58.6972984680958 + 101 1.01 -15.7258591674326 54.0793304850075 + 102 1.02 -16.2445123695359 49.6883036866838 + 103 1.03 -16.7203489779348 45.5144113333483 + 104 1.04 -17.1554929873393 41.5482491975195 + 105 1.05 -17.5519762952299 37.7807994251605 + 106 1.06 -17.9117424875755 34.2034150366931 + 107 1.07 -18.2366504726531 30.8078050426491 + 108 1.08 -18.5284779689983 27.5860201497191 + 109 1.09 -18.7889248532685 24.5304390339164 + 110 1.1 -19.0196163735814 21.633755158488 + 111 1.11 -19.2221062336656 18.8889641150824 + 112 1.12 -19.3978795529533 16.2893514675317 + 113 1.13 -19.5483557075404 13.8284810784167 + 114 1.14 -19.6748910567469 11.5001838993623 + 115 1.15 -19.7787815598225 9.29854720676174 + 116 1.16 -19.8612652871621 7.2179042653481 + 117 1.17 -19.9235248302269 5.25282440272129 + 118 1.18 -19.9666896141964 3.39810347860562 + 119 1.19 -19.9918381172225 1.64875473325059 + 120 1.2 -20 -0 + 121 1.21 -19.9921581492237 -1.55273873235457 + 122 1.22 -19.9692506383602 -3.013847421255 + 123 1.23 -19.9321726090268 -4.3875277493673 + 124 1.24 -19.8817780761412 -5.67780459363396 + 125 1.25 -19.8188816598787 -6.88853319663822 + 126 1.26 -19.7442602473552 -8.02340605204834 + 127 1.27 -19.6586545868377 -9.08595951544643 + 128 1.28 -19.5627708171746 -10.0795801514016 + 129 1.29 -19.4572819350303 -11.0075108272193 + 130 1.3 -19.3428292024065 -11.8728565633874 + 131 1.31 -19.2200234968363 -12.678590150347 + 132 1.32 -19.0894466065393 -13.427557540833 + 133 1.33 -18.9516524727388 -14.1224830266698 + 134 1.34 -18.8071683812527 -14.7659742085529 + 135 1.35 -18.6564961053882 -15.3605267670153 + 136 1.36 -18.5001130020867 -15.9085290424514 + 137 1.37 -18.3384730631926 -16.4122664317616 + 138 1.38 -18.1720079236418 -16.8739256088848 + 139 1.39 -18.001127828296 -17.2955985761957 + 140 1.4 -17.8262225590811 -17.6792865534734 + 141 1.41 -17.6476623240207 -18.0269037108782 + 142 1.42 -17.465798609694 -18.3402807521248 + 143 1.43 -17.2809649985868 -18.6211683537929 + 144 1.44 -17.0934779527434 -18.8712404664823 + 145 1.45 -16.9036375650765 -19.0920974832953 + 146 1.46 -16.7117282796322 -19.2852692809131 + 147 1.47 -16.5180195820608 -19.452218138324 + 148 1.48 -16.3227666614918 -19.594341538062 + 149 1.49 -16.126211044964 -19.7129748546237 + 150 1.5 -15.928581205517 -19.8093939345459 + 151 1.51 -15.730093145006 -19.8848175724499 + 152 1.52 -15.5309509526581 -19.9404098871884 + 153 1.53 -15.331347340351 -19.9772826020679 + 154 1.54 -15.1314641555525 -19.9964972329627 + 155 1.55 -14.9314728728242 -19.9990671879842 + 156 1.56 -14.7315350647564 -19.985959782228 + 157 1.57 -14.5318028531651 -19.9580981709777 + 158 1.58 -14.3324193413521 -19.9163632046156 + 159 1.59 -14.1335190281936 -19.8615952083567 + 160 1.6 -13.9352282047958 -19.7945956898053 + 161 1.61 -13.7376653344221 -19.7161289772086 + 162 1.62 -13.540941416375 -19.6269237911736 + 163 1.63 -13.3451603344801 -19.5276747525004 + 164 1.64 -13.1504191908022 -19.4190438286825 + 165 1.65 -12.9568086251922 -19.301661721521 + 166 1.66 -12.7644131212421 -19.1761291982075 + 167 1.67 -12.5733112992032 -19.043018368131 + 168 1.68 -12.3835761963975 -18.902873907581 + 169 1.69 -12.1952755356351 -18.7562142344284 + 170 1.7 -12.0084719821254 -18.6035326347864 + 171 1.71 -11.8232233893546 -18.4452983435722 + 172 1.72 -11.6395830343796 -18.2819575808158 + 173 1.73 -11.4575998429732 -18.1139345454881 + 174 1.74 -11.2773186050363 -17.9416323685501 + 175 1.75 -11.0987801806765 -17.7654340268597 + 176 1.76 -10.9220216973365 -17.5857032195029 + 177 1.77 -10.7470767383414 -17.4027852080613 + 178 1.78 -10.573975523217 -17.2170076222595 + 179 1.79 -10.4027450801192 -17.0286812323863 + 180 1.8 -10.2334094106998 -16.8381006898232 + 181 1.81 -10.0659896477209 -16.6455452369626 + 182 1.82 -9.9005042057181 -16.4512793877484 + 183 1.83 -9.73696892500016 -16.255553580019 + 184 1.84 -9.57539720926177 -16.0586048007915 + 185 1.85 -9.41580015707382 -15.8606571855743 + 186 1.86 -9.25818668750629 -15.6619225927571 + 187 1.87 -9.10256366012748 -15.4626011540838 + 188 1.88 -8.94893598961417 -15.2628818021722 + 189 1.89 -8.79730675519744 -15.0629427760093 + 190 1.9 -8.6476773051599 -14.8629521053111 + 191 1.91 -8.50004735659144 -14.6630680746028 + 192 1.92 -8.35441509060219 -14.463439667839 + 193 1.93 -8.21077724318323 -14.2642069943522 + 194 1.94 -8.06912919189799 -14.065501696887 + 195 1.95 -7.92946503857991 -13.8674473424453 + 196 1.96 -7.79177768820462 -13.6701597966413 + 197 1.97 -7.65605892409823 -13.4737475822347 + 198 1.98 -7.52229947963673 -13.2783122224857 + 199 1.99 -7.39048910658511 -13.0839485699498 + 200 2 -7.26061664021889 -12.8907451213031 + 201 2.01 -7.13267006136484 -12.6987843187702 + 202 2.02 -7.00663655549215 -12.5081428386973 + 203 2.03 -6.88250256897989 -12.3188918677979 + 204 2.04 -6.76025386268163 -12.1310973675737 + 205 2.05 -6.63987556290287 -11.9448203273927 + 206 2.06 -6.52135220990252 -11.7601170066906 + 207 2.07 -6.40466780402486 -11.5770391667397 + 208 2.08 -6.28980584956419 -11.3956342924127 + 209 2.09 -6.17674939646013 -11.2159458043529 + 210 2.1 -6.06548107991761 -11.0380132619435 + 211 2.11 -5.95598315804147 -10.8618725574554 + 212 2.12 -5.84823754757229 -10.6875561017355 + 213 2.13 -5.74222585780607 -10.5150930017845 + 214 2.14 -5.63792942277742 -10.344509230559 + 215 2.15 -5.53532933178209 -10.1758277893176 + 216 2.16 -5.43440645831221 -10.0090688628208 + 217 2.17 -5.33514148747387 -9.84424996767923 + 218 2.18 -5.2375149419544 -9.68138609413398 + 219 2.19 -5.14150720660348 -9.52048984154249 + 220 2.2 -5.04709855168983 -9.36157154783029 + 221 2.21 -4.9542691548924 -9.20463941315987 + 222 2.22 -4.86299912208293 -9.04969961805766 + 223 2.23 -4.77326850695383 -8.89675643622967 + 224 2.24 -4.68505732954364 -8.74581234228797 + 225 2.25 -4.59834559370972 -8.59686811460034 + 226 2.26 -4.51311330359602 -8.44992293346755 + 227 2.27 -4.42934047914158 -8.30497447482397 + 228 2.28 -4.34700717067363 -8.1620189996495 + 229 2.29 -4.26609347262728 -8.02105143927313 + 230 2.3 -4.18657953643199 -7.88206547674124 + 231 2.31 -4.10844558260329 -7.74505362441651 + 232 2.32 -4.03167191207677 -7.61000729796684 + 233 2.33 -3.95623891681951 -7.47691688689685 + 234 2.34 -3.88212708975296 -7.34577182176885 + 235 2.35 -3.80931703401948 -7.21656063825362 + 236 2.36 -3.7377894716237 -7.0892710381459 + 237 2.37 -3.66752525147843 -6.96388994747427 + 238 2.38 -3.5985053568833 -6.84040357182902 + 239 2.39 -3.53071091246377 -6.71879744902762 + 240 2.4 -3.4641231905961 -6.5990564992314 + 241 2.41 -3.39872361734359 -6.48116507262343 + 242 2.42 -3.3344937779277 -6.3651069947523 + 243 2.43 -3.27141542175708 -6.25086560964261 + 244 2.44 -3.20947046703613 -6.13842382076884 + 245 2.45 -3.14864100497424 -6.02776412998507 + 246 2.46 -3.08890930361551 -5.91886867449944 + 247 2.47 -3.03025781130815 -5.81171926197859 + 248 2.48 -2.97266915983187 -5.7062974038635 + 249 2.49 -2.91612616720074 -5.6025843469753 + 250 2.5 -2.86061184015814 -5.50056110348585 + 251 2.51 -2.80610937638002 -5.40020847932522 + 252 2.52 -2.75260216640146 -5.30150710109495 + 253 2.53 -2.70007379528143 -5.20443744155327 + 254 2.54 -2.64850804401945 -5.10897984373557 + 255 2.55 -2.59788889073774 -5.01511454377097 + 256 2.56 -2.54820051164134 -4.92282169245312 + 257 2.57 -2.49942728176866 -4.83208137562115 + 258 2.58 -2.45155377554382 -4.74287363340403 + 259 2.59 -2.40456476714212 -4.65517847837982 + 260 2.6 -2.35844523067906 -4.5689759126988 + 261 2.61 -2.31318034023315 -4.48424594421744 + 262 2.62 -2.26875546971212 -4.40096860168843 + 263 2.63 -2.22515619257182 -4.3191239490499 + 264 2.64 -2.18236828139646 -4.23869209885514 + 265 2.65 -2.14037770734877 -4.15965322488251 + 266 2.66 -2.09917063949799 -4.08198757396348 + 267 2.67 -2.05873344403328 -4.00567547706508 + 268 2.68 -2.01905268336996 -3.93069735966176 + 269 2.69 -1.9801151151554 -3.85703375142971 + 270 2.7 -1.94190769118123 -3.78466529529581 + 271 2.71 -1.90441755620818 -3.71357275587169 + 272 2.72 -1.86763204670949 -3.6437370273021 + 273 2.73 -1.83153868953869 -3.57513914055568 + 274 2.74 -1.79612520052711 -3.50776027018492 + 275 2.75 -1.7613794830164 -3.44158174058097 + 276 2.76 -1.72728962633081 -3.37658503174782 + 277 2.77 -1.69384390419419 -3.31275178461948 + 278 2.78 -1.66103077309585 -3.25006380594246 + 279 2.79 -1.62883887060978 -3.18850307274528 + 280 2.8 -1.59725701367117 -3.12805173641538 + 281 2.81 -1.56627419681391 -3.06869212640333 + 282 2.82 -1.53587959037299 -3.01040675357301 + 283 2.83 -1.506062538655 -2.95317831321585 + 284 2.84 -1.47681255808011 -2.89698968774635 + 285 2.85 -1.44811933529864 -2.84182394909537 + 286 2.86 -1.41997272528513 -2.7876643608168 + 287 2.87 -1.3923627494127 -2.7344943799229 + 288 2.88 -1.36527959351038 -2.68229765846244 + 289 2.89 -1.33871360590588 -2.63105804485558 + 290 2.9 -1.31265529545615 -2.5807595849985 + 291 2.91 -1.287095329568 -2.53138652315042 + 292 2.92 -1.26202453221094 -2.48292330261488 + 293 2.93 -1.23743388192408 -2.43535456622692 + 294 2.94 -1.21331450981923 -2.38866515665682 + 295 2.95 -1.18965769758165 -2.34284011654112 + 296 2.96 -1.16645487547052 -2.2978646884507 + 297 2.97 -1.14369762032031 -2.25372431470548 + 298 2.98 -1.1213776535449 -2.21040463704483 + 299 2.99 -1.09948683914553 -2.16789149616236 + 300 3 -1.07801718172417 -2.12617093111327 + 301 3.01 -1.05696082450334 -2.08522917860231 + 302 3.02 -1.03631004735366 -2.04505267215961 + 303 3.03 -1.01605726483015 -2.00562804121181 + 304 3.04 -0.996195024218316 -1.9669421100551 + 305 3.05 -0.976716003590983 -1.92898189673679 + 306 3.06 -0.957613009876723 -1.89173461185161 + 307 3.07 -0.938878976940747 -1.85518765725859 + 308 3.08 -0.920506963678969 -1.81932862472411 + 309 3.09 -0.902490152126019 -1.78414529449664 + 310 3.1 -0.884821845577815 -1.749625633818 + 311 3.11 -0.867495466729296 -1.71575779537626 + 312 3.12 -0.850504555827964 -1.68253011570466 + 313 3.13 -0.833842768843598 -1.64993111353108 + 314 3.14 -0.81750387565479 -1.61794948808215 + 315 3.15 -0.801481758252578 -1.58657411734597 + 316 3.16 -0.785770408961712 -1.55579405629722 + 317 3.17 -0.770363928679763 -1.52559853508822 + 318 3.18 -0.755256525134567 -1.49597695720933 + 319 3.19 -0.740442511160115 -1.46691889762184 + 320 3.2 -0.725916302991318 -1.43841410086653 + 321 3.21 -0.711672418577733 -1.41045247915071 + 322 3.22 -0.697705475916561 -1.38302411041638 + 323 3.23 -0.68401019140502 -1.35611923639237 + 324 3.24 -0.670581378212263 -1.32972826063263 + 325 3.25 -0.657413944671006 -1.30384174654313 + 326 3.26 -0.644502892688901 -1.27845041539961 + 327 3.27 -0.631843316179772 -1.25354514435816 + 328 3.28 -0.6194303995148 -1.22911696446058 + 329 3.29 -0.60725941599364 -1.20515705863651 + 330 3.3 -0.595325726335532 -1.18165675970391 + 331 3.31 -0.583624777190441 -1.15860754836962 + 332 3.32 -0.57215209967014 -1.13600105123157 + 333 3.33 -0.560903307899276 -1.11382903878399 + 334 3.34 -0.549874097586374 -1.09208342342712 + 335 3.35 -0.539060244614689 -1.07075625748267 + 336 3.36 -0.528457603652897 -1.0498397312161 + 337 3.37 -0.518062106785528 -1.0293261708671 + 338 3.38 -0.507869762162994 -1.00920803668912 + 339 3.39 -0.497876652671245 -0.98947792099903 + 340 3.4 -0.488078934620828 -0.970128546237837 + 341 3.41 -0.478472836455297 -0.951152763043287 + 342 3.42 -0.469054657478829 -0.932543548335185 + 343 3.43 -0.459820766602912 -0.914294003414172 + 344 3.44 -0.450767601112008 -0.89639735207464 + 345 3.45 -0.441891665447958 -0.87884693873245 + 346 3.46 -0.433189530013092 -0.861636226568009 + 347 3.47 -0.424657829991779 -0.844758795685292 + 348 3.48 -0.416293264190357 -0.828208341287285 + 349 3.49 -0.40809259389516 -0.811978671868322 + 350 3.5 -0.400052641748598 -0.796063707423719 + 351 3.51 -0.392170290643024 -0.780457477677113 + 352 3.52 -0.384442482632212 -0.765154120325826 + 353 3.53 -0.376866217860354 -0.750147879304586 + 354 3.54 -0.369438553508263 -0.735433103067872 + 355 3.55 -0.362156602756698 -0.721004242891135 + 356 3.56 -0.355017533766573 -0.706855851191119 + 357 3.57 -0.348018568675832 -0.692982579865472 + 358 3.58 -0.341156982612913 -0.679379178651804 + 359 3.59 -0.334430102726415 -0.666040493506349 + 360 3.6 -0.327835307230984 -0.652961465002335 + 361 3.61 -0.321370024469032 -0.640137126748166 + 362 3.62 -0.31503173198824 -0.62756260382549 + 363 3.63 -0.308817955634535 -0.615233111247194 + 364 3.64 -0.3027262686604 -0.603143952435389 + 365 3.65 -0.296754290848331 -0.591290517719373 + 366 3.66 -0.290899687649171 -0.579668282853603 + 367 3.67 -0.285160169335201 -0.568272807555637 + 368 3.68 -0.279533490167716 -0.55709973406403 + 369 3.69 -0.274017447578963 -0.54614478571615 + 370 3.7 -0.268609881368169 -0.535403765545839 + 371 3.71 -0.263308672911511 -0.524872554900861 + 372 3.72 -0.258111744385805 -0.514547112080069 + 373 3.73 -0.253017058005729 -0.504423470990179 + 374 3.74 -0.248022615274373 -0.494497739822078 + 375 3.75 -0.243126456246943 -0.484766099746521 + 376 3.76 -0.238326658807406 -0.475224803629145 + 377 3.77 -0.233621337957872 -0.465870174764632 + 378 3.78 -0.229008645120563 -0.456698605629917 + 379 3.79 -0.224486767452152 -0.447706556656279 + 380 3.8 -0.220053927170263 -0.43889055502019 + 381 3.81 -0.215708380892004 -0.430247193452744 + 382 3.82 -0.211448418984292 -0.421773129067537 + 383 3.83 -0.207272364925806 -0.413465082206802 + 384 3.84 -0.203178574680398 -0.405319835305661 + 385 3.85 -0.199165436081776 -0.397334231774297 + 386 3.86 -0.195231368229261 -0.38950517489789 + 387 3.87 -0.191374820894459 -0.381829626754123 + 388 3.88 -0.187594273938687 -0.374304607148077 + 389 3.89 -0.183888236740939 -0.366927192564339 + 390 3.9 -0.180255247636283 -0.359694515136119 + 391 3.91 -0.176693873364433 -0.352603761631208 + 392 3.92 -0.173202708528413 -0.34565217245455 + 393 3.93 -0.16978037506312 -0.33883704066727 + 394 3.94 -0.166425521713567 -0.332155711021943 + 395 3.95 -0.163136823522756 -0.325605579013906 + 396 3.96 -0.159912981328916 -0.319184089948422 + 397 3.97 -0.156752721271987 -0.312888738023495 + 398 3.98 -0.153654794309244 -0.306717065428139 + 399 3.99 -0.150617975739817 -0.30066666145589 + 400 4 -0.147641064738004 -0.29473516163338 diff --git a/tools/tabulate/wall_multi_tabulate.py b/tools/tabulate/wall_multi_tabulate.py index b1b4aa6cbf..576889cf75 100755 --- a/tools/tabulate/wall_multi_tabulate.py +++ b/tools/tabulate/wall_multi_tabulate.py @@ -51,9 +51,9 @@ if __name__ == "__main__": sys.argv.append('--filename') sys.argv.append(fname) sys.argv.append('--num-points') - sys.argv.append('100') + sys.argv.append('400') sys.argv.append('--inner') - sys.argv.append('0.04') + sys.argv.append('0.01') sys.argv.append('--outer') sys.argv.append('4.0') wtable = WallTabulate(harmonic_energy, harmonic_force, units='real') From e422ae947727605e70b3856a8c327aa4e240b13c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 23 Feb 2023 09:40:51 -0500 Subject: [PATCH 247/445] improve error messages and make them consistent across variants --- src/MOLECULE/angle_table.cpp | 12 ++++++------ src/MOLECULE/bond_table.cpp | 10 +++++----- src/MOLECULE/dihedral_table.cpp | 21 +++++++++------------ 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/MOLECULE/angle_table.cpp b/src/MOLECULE/angle_table.cpp index 54c98ffb61..c5e65be402 100644 --- a/src/MOLECULE/angle_table.cpp +++ b/src/MOLECULE/angle_table.cpp @@ -185,17 +185,17 @@ void AngleTable::allocate() void AngleTable::settings(int narg, char **arg) { - if (narg != 2) error->all(FLERR, "Illegal angle_style command"); + if (narg != 2) error->all(FLERR, "Illegal angle_style command: must have 2 arguments"); if (strcmp(arg[0], "linear") == 0) tabstyle = LINEAR; else if (strcmp(arg[0], "spline") == 0) tabstyle = SPLINE; else - error->all(FLERR, "Unknown table style in angle style table"); + error->all(FLERR, "Unknown table style {} in angle style table", arg[0]); tablength = utils::inumeric(FLERR, arg[1], false, lmp); - if (tablength < 2) error->all(FLERR, "Illegal number of angle table entries"); + if (tablength < 2) error->all(FLERR, "Illegal number of angle table entries: {}", arg[1]); // delete old tables, since cannot just change settings @@ -218,7 +218,7 @@ void AngleTable::settings(int narg, char **arg) void AngleTable::coeff(int narg, char **arg) { - if (narg != 3) error->all(FLERR, "Illegal angle_coeff command"); + if (narg != 3) error->all(FLERR, "Illegal angle_coeff command: must have 3 arguments"); if (!allocated) allocate(); int ilo, ihi; @@ -234,7 +234,7 @@ void AngleTable::coeff(int narg, char **arg) // error check on table parameters - if (tb->ninput <= 1) error->one(FLERR, "Invalid angle table length"); + if (tb->ninput <= 1) error->one(FLERR, "Invalid angle table length: {}", tb->ninput); double alo, ahi; alo = tb->afile[0]; @@ -523,7 +523,7 @@ void AngleTable::param_extract(Table *tb, char *line) } else if (word == "EQ") { tb->theta0 = DEG2RAD * values.next_double(); } else { - error->one(FLERR, "Invalid keyword in angle table parameters"); + error->one(FLERR, "Unknown keyword {} in angle table parameters", word); } } } catch (TokenizerException &e) { diff --git a/src/MOLECULE/bond_table.cpp b/src/MOLECULE/bond_table.cpp index f2e6194052..4068e98e8d 100644 --- a/src/MOLECULE/bond_table.cpp +++ b/src/MOLECULE/bond_table.cpp @@ -132,7 +132,7 @@ void BondTable::allocate() void BondTable::settings(int narg, char **arg) { - if (narg != 2) error->all(FLERR, "Illegal bond_style command"); + if (narg != 2) error->all(FLERR, "Illegal bond_style command: must have 2 arguments"); tabstyle = NONE; if (strcmp(arg[0], "linear") == 0) @@ -143,7 +143,7 @@ void BondTable::settings(int narg, char **arg) error->all(FLERR, "Unknown table style {} in bond style table", arg[0]); tablength = utils::inumeric(FLERR, arg[1], false, lmp); - if (tablength < 2) error->all(FLERR, "Illegal number of bond table entries"); + if (tablength < 2) error->all(FLERR, "Illegal number of bond table entries: {}", arg[1]); // delete old tables, since cannot just change settings @@ -166,7 +166,7 @@ void BondTable::settings(int narg, char **arg) void BondTable::coeff(int narg, char **arg) { - if (narg != 3) error->all(FLERR, "Illegal bond_coeff command"); + if (narg != 3) error->all(FLERR, "Illegal bond_coeff command: must have 3 arguments"); if (!allocated) allocate(); int ilo, ihi; @@ -180,7 +180,7 @@ void BondTable::coeff(int narg, char **arg) // error check on table parameters - if (tb->ninput <= 1) error->all(FLERR, "Invalid bond table length"); + if (tb->ninput <= 1) error->all(FLERR, "Invalid bond table length: {}", tb->ninput); tb->lo = tb->rfile[0]; tb->hi = tb->rfile[tb->ninput - 1]; @@ -481,7 +481,7 @@ void BondTable::param_extract(Table *tb, char *line) } else if (word == "EQ") { tb->r0 = values.next_double(); } else { - error->one(FLERR, "Invalid keyword in bond table parameters"); + error->one(FLERR, "Unknown keyword {} in bond table parameters", word); } } } catch (TokenizerException &e) { diff --git a/src/MOLECULE/dihedral_table.cpp b/src/MOLECULE/dihedral_table.cpp index fc4c41d3bd..1fb05c211c 100644 --- a/src/MOLECULE/dihedral_table.cpp +++ b/src/MOLECULE/dihedral_table.cpp @@ -697,15 +697,15 @@ void DihedralTable::allocate() void DihedralTable::settings(int narg, char **arg) { - if (narg != 2) error->all(FLERR,"Illegal dihedral_style command"); + if (narg != 2) error->all(FLERR,"Illegal dihedral_style command: must have 2 arguments"); if (strcmp(arg[0],"linear") == 0) tabstyle = LINEAR; else if (strcmp(arg[0],"spline") == 0) tabstyle = SPLINE; - else error->all(FLERR,"Unknown table style in dihedral style table"); + else error->all(FLERR,"Unknown table style {} in dihedral style table", arg[0]); tablength = utils::inumeric(FLERR,arg[1],false,lmp); if (tablength < 3) - error->all(FLERR,"Illegal number of dihedral table entries"); + error->all(FLERR,"Illegal number of dihedral table entries: {}", arg[1]); // delete old tables, since cannot just change settings for (int m = 0; m < ntables; m++) free_table(&tables[m]); @@ -727,7 +727,7 @@ void DihedralTable::settings(int narg, char **arg) void DihedralTable::coeff(int narg, char **arg) { - if (narg != 3) error->all(FLERR,"Incorrect args for dihedral coefficients"); + if (narg != 3) error->all(FLERR,"Illegal dihedral_coeff command: must have 3 arguments"); if (!allocated) allocate(); int ilo,ihi; @@ -746,10 +746,9 @@ void DihedralTable::coeff(int narg, char **arg) // --- and resolve issues with periodicity --- if (tb->ninput < 2) - error->all(FLERR,"Invalid dihedral table length: {}",arg[2]); + error->all(FLERR,"Invalid dihedral table length: {}", arg[2]); else if ((tb->ninput == 2) && (tabstyle == SPLINE)) - error->all(FLERR,"Invalid dihedral spline table length: {} " - "(Try linear)",arg[2]); + error->all(FLERR,"Invalid dihedral spline table length: {} (Try linear)",arg[2]); // check for monotonicity for (int i=0; i < tb->ninput-1; i++) { @@ -767,12 +766,10 @@ void DihedralTable::coeff(int narg, char **arg) double phihi = tb->phifile[tb->ninput-1]; if (tb->use_degrees) { if ((phihi - philo) >= 360) - error->all(FLERR,"Dihedral table angle range must be < 360 " - "degrees ({}).",arg[2]); + error->all(FLERR,"Dihedral table angle range must be < 360 degrees ({}).",arg[2]); } else { if ((phihi - philo) >= MY_2PI) - error->all(FLERR,"Dihedral table angle range must be < 2*PI " - "radians ({}).",arg[2]); + error->all(FLERR,"Dihedral table angle range must be < 2*PI radians ({}).",arg[2]); } // convert phi from degrees to radians @@ -1200,7 +1197,7 @@ void DihedralTable::param_extract(Table *tb, char *line) checkU_fname = values.next_string(); } else if (word == "CHECKF") { checkF_fname = values.next_string(); - } else error->one(FLERR,"Invalid keyword in dihedral angle table parameters ({})", word); + } else error->one(FLERR,"Unknown keyword {} in dihedral table parameters", word); } } catch (TokenizerException &e) { error->one(FLERR, e.what()); From fc0efd43fcedc608900f85d7f614ee896fa021cd Mon Sep 17 00:00:00 2001 From: Matt Bettencourt Date: Mon, 13 Feb 2023 17:07:32 +0100 Subject: [PATCH 248/445] added kokkos functinos to the list of functions registered for ML-IAP --- src/PYTHON/python_impl.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index 9177381a35..57f8ea1cf0 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -35,6 +35,17 @@ // However, that exposes -too many- headers. #include "mliap_model_python_couple.h" #include "mliap_unified_couple.h" +#ifdef LMP_KOKKOS +#include "mliap_model_python_kokkos.h" +#include "mliap_unified_kokkos.h" +// The above should somehow really be included in the next file. +// We could get around this with cython --capi-reexport-cincludes +// However, that exposes -too many- headers. +#include "mliap_model_python_couple_kokkos.h" +#include "mliap_unified_couple_kokkos.h" + + +#endif #endif using namespace LAMMPS_NS; @@ -71,6 +82,16 @@ PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp) err = PyImport_AppendInittab("mliap_unified_couple", PyInit_mliap_unified_couple); if (err) error->all(FLERR, "Could not register MLIAPPY unified embedded python module."); +#ifdef LMP_KOKKOS + // Inform python intialization scheme of the mliappy module. + // This -must- happen before python is initialized. + err = PyImport_AppendInittab("mliap_model_python_couple_kokkos", PyInit_mliap_model_python_couple_kokkos); + if (err) error->all(FLERR, "Could not register MLIAPPY embedded python module."); + + err = PyImport_AppendInittab("mliap_unified_couple_kokkos", PyInit_mliap_unified_couple_kokkos); + if (err) error->all(FLERR, "Could not register MLIAPPY unified embedded python module."); + +#endif #endif Py_Initialize(); From cad3c5ba953bf24efe8809095d4f1feeaa1227f9 Mon Sep 17 00:00:00 2001 From: Matt Bettencourt Date: Thu, 23 Feb 2023 15:52:49 +0100 Subject: [PATCH 249/445] Fixed code to run with hippynn --- src/KOKKOS/mliap_unified_couple_kokkos.pyx | 41 ++++++++++++++-------- src/KOKKOS/mliap_unified_kokkos.cpp | 15 ++++---- src/KOKKOS/pair_mliap_kokkos.cpp | 7 ++-- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/src/KOKKOS/mliap_unified_couple_kokkos.pyx b/src/KOKKOS/mliap_unified_couple_kokkos.pyx index 37326263d3..5e274d7f36 100644 --- a/src/KOKKOS/mliap_unified_couple_kokkos.pyx +++ b/src/KOKKOS/mliap_unified_couple_kokkos.pyx @@ -115,7 +115,6 @@ cdef create_array(device, void *pointer, shape,is_int): size=1 for i in shape: size = size*i - if ( device == 1): mem = cupy.cuda.UnownedMemory(ptr=int( pointer), owner=None, size=size) memptr = cupy.cuda.MemoryPointer(mem, 0) @@ -146,10 +145,18 @@ cdef class MLIAPDataPy: self.data = NULL def update_pair_energy_cpu(self, eij): - cdef double[:] eij_arr = eij + cdef double[:] eij_arr + try: + eij_arr = eij + except: + eij_arr = eij.detach().numpy().astype(np.double) update_pair_energy(self.data, &eij_arr[0]) def update_pair_energy_gpu(self, eij): - cdef uintptr_t ptr = eij.data.ptr + cdef uintptr_t ptr; + try: + ptr = eij.data.ptr + except: + ptr = eij.data_ptr() update_pair_energy(self.data, ptr) def update_pair_energy(self, eij): if self.data.dev==0: @@ -158,10 +165,18 @@ cdef class MLIAPDataPy: self.update_pair_energy_gpu(eij) def update_pair_forces_cpu(self, fij): - cdef double[:, ::1] fij_arr = fij + cdef double[:, ::1] fij_arr + try: + fij_arr = fij + except: + fij_arr = fij.detach().numpy().astype(np.double) update_pair_forces(self.data, &fij_arr[0][0]) def update_pair_forces_gpu(self, fij): - cdef uintptr_t ptr = fij.data.ptr + cdef uintptr_t ptr + try: + ptr = fij.data.ptr + except: + ptr = fij.data_ptr() update_pair_forces(self.data, ptr) def update_pair_forces(self, fij): if self.data.dev==0: @@ -172,7 +187,8 @@ cdef class MLIAPDataPy: def f(self): if self.data.f is NULL: return None - return cupy.asarray( self.data.f) + return create_array(self.data.dev, self.data.f, [self.ntotal, 3],False) + @property def size_gradforce(self): @@ -205,14 +221,11 @@ cdef class MLIAPDataPy: descriptors_view[:] = value_view print("This code has not been tested or optimized for the GPU, if you are getting this warning optimize descriptors") - @write_only_property - def eatoms(self, value): + @property + def eatoms(self): if self.data.eatoms is NULL: raise ValueError("attempt to set NULL eatoms") - cdef double[:] eatoms_view = &self.data.eatoms[0] - cdef double[:] value_view = value - eatoms_view[:] = value_view - print("This code has not been tested or optimized for the GPU, if you are getting this warning optimize eatoms") + return create_array(self.data.dev, self.data.eatoms, [self.nlistatoms],False) @write_only_property @@ -351,7 +364,7 @@ cdef class MLIAPDataPy: # Interface between C and Python compute functions -cdef class MLIAPUnifiedInterface: +cdef class MLIAPUnifiedInterfaceKokkos: cdef MLIAPDummyModel * model cdef MLIAPDummyDescriptor * descriptor cdef unified_impl @@ -404,7 +417,7 @@ cdef public object mliap_unified_connect_kokkos(char *fname, MLIAPDummyModel * m with open(str_fname, 'rb') as pfile: unified = pickle.load(pfile) - unified_int = MLIAPUnifiedInterface(unified) + unified_int = MLIAPUnifiedInterfaceKokkos(unified) unified_int.model = model unified_int.descriptor = descriptor diff --git a/src/KOKKOS/mliap_unified_kokkos.cpp b/src/KOKKOS/mliap_unified_kokkos.cpp index bfb9193df6..1fdf039473 100644 --- a/src/KOKKOS/mliap_unified_kokkos.cpp +++ b/src/KOKKOS/mliap_unified_kokkos.cpp @@ -269,7 +269,6 @@ MLIAPBuildUnifiedKokkos_t LAMMPS_NS::build_unified(char *unified_fna void LAMMPS_NS::update_pair_energy(MLIAPDataKokkosDevice *data, double *eij) { - double e_total = 0.0; auto d_eatoms = data->eatoms; auto d_pair_i= data->pair_i; const auto nlistatoms = data->nlistatoms; @@ -301,8 +300,13 @@ void LAMMPS_NS::update_pair_forces(MLIAPDataKokkosDevice *data, double *fij) auto j_atoms = data->jatoms; auto vflag = data->vflag; auto rij = data->rij; - int vflag_either=data->pairmliap->vflag_either, vflag_global=data->pairmliap->vflag_global, vflag_atom=data->pairmliap->vflag_atom; + int vflag_global=data->pairmliap->vflag_global, vflag_atom=data->pairmliap->vflag_atom; + if (vflag_atom) { + data->pairmliap->k_vatom.template modify(); + data->pairmliap->k_vatom.template sync(); + } auto d_vatom = data->pairmliap->k_vatom.template view(); + Kokkos::View virial("virial"); Kokkos::parallel_for(data->npairs,KOKKOS_LAMBDA (int ii) { @@ -310,7 +314,6 @@ void LAMMPS_NS::update_pair_forces(MLIAPDataKokkosDevice *data, double *fij) int ii3 = ii * 3; int i = pair_i[ii]; int j = j_atoms[ii]; - // must not count any contribution where i is not a local atom if (i < nlistatoms) { Kokkos::atomic_add(&f[i*3+0], fij[ii3+0]); @@ -335,7 +338,7 @@ void LAMMPS_NS::update_pair_forces(MLIAPDataKokkosDevice *data, double *fij) Kokkos::atomic_add(&virial[4], v[4]); Kokkos::atomic_add(&virial[5], v[5]); } - if (vflag_atom) { + if (vflag_atom ) { Kokkos::atomic_add(&d_vatom(i,0), 0.5*v[0]); Kokkos::atomic_add(&d_vatom(i,1), 0.5*v[1]); Kokkos::atomic_add(&d_vatom(i,2), 0.5*v[2]); @@ -373,15 +376,11 @@ template class MLIAPDummyModelKokkos; template class MLIAPDummyDescriptorKokkos; template MLIAPBuildUnifiedKokkos_t LAMMPS_NS::build_unified(char *unified_fname, MLIAPDataKokkos *data, LAMMPS *lmp, char *coefffilename); -//template void LAMMPS_NS::update_pair_energy(MLIAPDataKokkos *data, double *eij); -//template void LAMMPS_NS::update_pair_forces(MLIAPDataKokkos *data, double *fij); #ifdef LMP_KOKKOS_GPU template class MLIAPDummyModelKokkos; template class MLIAPDummyDescriptorKokkos; template MLIAPBuildUnifiedKokkos_t LAMMPS_NS::build_unified(char *unified_fname, MLIAPDataKokkos *data, LAMMPS *lmp, char *coefffilename); -//template void LAMMPS_NS::update_pair_energy(MLIAPDataKokkos *data, double *eij); -//template void LAMMPS_NS::update_pair_forces(MLIAPDataKokkos *data, double *fij); #endif } #endif diff --git a/src/KOKKOS/pair_mliap_kokkos.cpp b/src/KOKKOS/pair_mliap_kokkos.cpp index 558901c6ff..d19d81e314 100644 --- a/src/KOKKOS/pair_mliap_kokkos.cpp +++ b/src/KOKKOS/pair_mliap_kokkos.cpp @@ -74,7 +74,6 @@ void PairMLIAPKokkos::compute(int eflag, int vflag) int is_kokkos_descriptor = (dynamic_cast*>(descriptor)) != nullptr; auto model_space = is_kokkos_model ? execution_space : Host; auto descriptor_space = is_kokkos_descriptor? execution_space : Host; - // consistency checks if (data->ndescriptors != model->ndescriptors) error->all(FLERR, "Incompatible model and descriptor descriptor count"); @@ -107,12 +106,14 @@ void PairMLIAPKokkos::compute(int eflag, int vflag) k_data->sync(model_space, IELEMS_MASK | DESCRIPTORS_MASK); model->compute_gradients(data); k_data->modified(model_space, BETAS_MASK); - if (eflag_atom) + if (eflag_atom) { k_data->modified(model_space, EATOMS_MASK); + } // calculate force contributions beta_i*dB_i/dR_j atomKK->sync(descriptor_space,F_MASK); k_data->sync(descriptor_space, NUMNEIGHS_MASK | IATOMS_MASK | IELEMS_MASK | ELEMS_MASK | BETAS_MASK | JATOMS_MASK | PAIR_I_MASK | JELEMS_MASK | RIJ_MASK ); + descriptor->compute_forces(data); e_tally(data); @@ -293,7 +294,7 @@ void PairMLIAPKokkos::e_tally(MLIAPData* data) if (eflag_global) eng_vdwl += data->energy; if (eflag_atom) { MLIAPDataKokkos *k_data = static_cast*>(data); - k_data->sync(execution_space, IATOMS_MASK | EATOMS_MASK); + k_data->sync(execution_space, IATOMS_MASK | EATOMS_MASK, true); auto d_iatoms = k_data->k_iatoms.template view(); auto d_eatoms = k_data->k_eatoms.template view(); auto d_eatom = k_eatom.template view(); From 5fb11e3f06e07407b95feb22ff96802a439122e0 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 23 Feb 2023 18:14:23 +0200 Subject: [PATCH 250/445] Include method declaration in bond_fene.h --- src/MOLECULE/bond_fene.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MOLECULE/bond_fene.h b/src/MOLECULE/bond_fene.h index eb9e981a32..1628e7a2a2 100644 --- a/src/MOLECULE/bond_fene.h +++ b/src/MOLECULE/bond_fene.h @@ -26,7 +26,7 @@ namespace LAMMPS_NS { class BondFENE : public Bond { public: - BondFENE(class LAMMPS *_lmp) : Bond(_lmp) {} + BondFENE(class LAMMPS *); ~BondFENE() override; void compute(int, int) override; void coeff(int, char **) override; @@ -36,6 +36,7 @@ class BondFENE : public Bond { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, double, int, int, double &) override; + void born_matrix(int, double, int, int, double &, double &) override; void *extract(const char *, int &) override; protected: From bb75ed50718c1080854713e9dcdb7bdc45c63cb4 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 23 Feb 2023 18:15:43 +0200 Subject: [PATCH 251/445] Implement born_matrix in bond_fene.cpp --- src/MOLECULE/bond_fene.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/MOLECULE/bond_fene.cpp b/src/MOLECULE/bond_fene.cpp index 0f279fccb6..7f55c89296 100644 --- a/src/MOLECULE/bond_fene.cpp +++ b/src/MOLECULE/bond_fene.cpp @@ -30,6 +30,13 @@ using MathConst::MY_CUBEROOT2; /* ---------------------------------------------------------------------- */ +BondFENE::BondFENE(LAMMPS *_lmp) : Bond(_lmp) +{ + born_matrix_enable = 1; +} + +/* ---------------------------------------------------------------------- */ + BondFENE::~BondFENE() { if (allocated && !copymode) { @@ -262,6 +269,28 @@ double BondFENE::single(int type, double rsq, int /*i*/, int /*j*/, double &ffor /* ---------------------------------------------------------------------- */ +void BondFENE::born_matrix(int type, double rsq, int /*i*/, int /*j*/, double &du, double &du2) +{ + double r = sqrt(rsq); + double r0sq = r0[type] * r0[type]; + double rlogarg = 1.0 - rsq / r0sq; + + // Contribution from the attractive term + du = k[type] * r / rlogarg; + du2 = k[type] * (1.0 + rsq / r0sq) / (rlogarg * rlogarg); + + // Contribution from the repulsive Lennard-Jones term + if (rsq < MY_CUBEROOT2 * sigma[type] * sigma[type]) { + double sr2 = sigma[type] * sigma[type] / rsq; + double sr6 = sr2 * sr2 * sr2; + + du += 48.0 * epsilon[type] * sr6 * (0.5 - sr6) / r; + du2 += 48.0 * epsilon[type] * sr6 * (13.0 * sr6 - 3.5) / rsq; + } +} + +/* ---------------------------------------------------------------------- */ + void *BondFENE::extract(const char *str, int &dim) { dim = 1; From 6ae177f37ebe93f32eaf1f0e7c4817862ab66df1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 23 Feb 2023 12:26:42 -0500 Subject: [PATCH 252/445] rename fix pimd to fix pimd/nvt (with backward compatibility) --- doc/src/Commands_fix.rst | 2 +- doc/src/fix.rst | 2 +- doc/src/fix_pimd.rst | 108 +++++++++--------- doc/utils/check-styles.py | 4 +- examples/PACKAGES/pimd/para-h2/in.scp | 2 +- examples/PACKAGES/pimd/prot-hairpin/in.scp | 2 +- src/.gitignore | 2 + src/Purge.list | 3 + .../{fix_pimd.cpp => fix_pimd_nvt.cpp} | 108 +++++++++--------- src/REPLICA/{fix_pimd.h => fix_pimd_nvt.h} | 13 ++- 10 files changed, 129 insertions(+), 117 deletions(-) rename src/REPLICA/{fix_pimd.cpp => fix_pimd_nvt.cpp} (89%) rename src/REPLICA/{fix_pimd.h => fix_pimd_nvt.h} (93%) diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index 63adc56ed3..d275b33eba 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -168,7 +168,7 @@ OPT. * :doc:`pafi ` * :doc:`pair ` * :doc:`phonon ` - * :doc:`pimd ` + * :doc:`pimd/nvt ` * :doc:`planeforce ` * :doc:`plumed ` * :doc:`poems ` diff --git a/doc/src/fix.rst b/doc/src/fix.rst index 0a926d570c..2dfe97a3ec 100644 --- a/doc/src/fix.rst +++ b/doc/src/fix.rst @@ -320,7 +320,7 @@ accelerated styles exist. * :doc:`pafi ` - constrained force averages on hyper-planes to compute free energies (PAFI) * :doc:`pair ` - access per-atom info from pair styles * :doc:`phonon ` - calculate dynamical matrix from MD simulations -* :doc:`pimd ` - Feynman path integral molecular dynamics +* :doc:`pimd/nvt ` - Feynman path integral molecular dynamics with Nose-Hoover thermostat * :doc:`planeforce ` - constrain atoms to move in a plane * :doc:`plumed ` - wrapper on PLUMED free energy library * :doc:`poems ` - constrain clusters of atoms to move as coupled rigid bodies diff --git a/doc/src/fix_pimd.rst b/doc/src/fix_pimd.rst index e5d42eb15f..0a4f9a38fb 100644 --- a/doc/src/fix_pimd.rst +++ b/doc/src/fix_pimd.rst @@ -1,6 +1,6 @@ -.. index:: fix pimd +.. index:: fix pimd/nvt -fix pimd command +fix pimd/nvt command ================ Syntax @@ -8,10 +8,10 @@ Syntax .. parsed-literal:: - fix ID group-ID pimd keyword value ... + fix ID group-ID pimd/nvt keyword value ... * ID, group-ID are documented in :doc:`fix ` command -* pimd = style name of this fix command +* pimd/nvt = style name of this fix command * zero or more keyword/value pairs may be appended * keyword = *method* or *fmass* or *sp* or *temp* or *nhc* @@ -28,11 +28,15 @@ Examples .. code-block:: LAMMPS - fix 1 all pimd method nmpimd fmass 1.0 sp 2.0 temp 300.0 nhc 4 + fix 1 all pimd/nvt method nmpimd fmass 1.0 sp 2.0 temp 300.0 nhc 4 Description """"""""""" +.. versionchanged:: TBD + +Fix pimd was renamed to fix pimd/nvt. + This command performs quantum molecular dynamics simulations based on the Feynman path integral to include effects of tunneling and zero-point motion. In this formalism, the isomorphism of a quantum @@ -67,7 +71,7 @@ number of NH thermostats would be 3 x N x P x Nc. .. note:: - This fix implements a complete velocity-verlet integrator + Fix pimd/nvt implements a complete velocity-verlet integrator combined with NH massive chain thermostat, so no other time integration fix should be used. @@ -76,31 +80,33 @@ value of *pimd* is standard PIMD. A value of *nmpimd* is for normal-mode PIMD. A value of *cmd* is for centroid molecular dynamics (CMD). The difference between the styles is as follows. -In standard PIMD, the value used for a bead's fictitious mass is -arbitrary. A common choice is to use Mi = m/P, which results in the -mass of the entire ring-polymer being equal to the real quantum -particle. But it can be difficult to efficiently integrate the -equations of motion for the stiff harmonic interactions in the ring -polymers. + In standard PIMD, the value used for a bead's fictitious mass is + arbitrary. A common choice is to use Mi = m/P, which results in the + mass of the entire ring-polymer being equal to the real quantum + particle. But it can be difficult to efficiently integrate the + equations of motion for the stiff harmonic interactions in the ring + polymers. -A useful way to resolve this issue is to integrate the equations of -motion in a normal mode representation, using Normal Mode -Path-Integral Molecular Dynamics (NMPIMD) :ref:`(Cao1) `. In NMPIMD, -the NH chains are attached to each normal mode of the ring-polymer and -the fictitious mass of each mode is chosen as Mk = the eigenvalue of -the Kth normal mode for k > 0. The k = 0 mode, referred to as the -zero-frequency mode or centroid, corresponds to overall translation of -the ring-polymer and is assigned the mass of the real particle. + A useful way to resolve this issue is to integrate the equations of + motion in a normal mode representation, using Normal Mode + Path-Integral Molecular Dynamics (NMPIMD) :ref:`(Cao1) `. In + NMPIMD, the NH chains are attached to each normal mode of the + ring-polymer and the fictitious mass of each mode is chosen as Mk = + the eigenvalue of the Kth normal mode for k > 0. The k = 0 mode, + referred to as the zero-frequency mode or centroid, corresponds to + overall translation of the ring-polymer and is assigned the mass of + the real particle. -Motion of the centroid can be effectively uncoupled from the other -normal modes by scaling the fictitious masses to achieve a partial -adiabatic separation. This is called a Centroid Molecular Dynamics -(CMD) approximation :ref:`(Cao2) `. The time-evolution (and resulting -dynamics) of the quantum particles can be used to obtain centroid time -correlation functions, which can be further used to obtain the true -quantum correlation function for the original system. The CMD method -also uses normal modes to evolve the system, except only the k > 0 -modes are thermostatted, not the centroid degrees of freedom. + Motion of the centroid can be effectively uncoupled from the other + normal modes by scaling the fictitious masses to achieve a partial + adiabatic separation. This is called a Centroid Molecular Dynamics + (CMD) approximation :ref:`(Cao2) `. The time-evolution (and + resulting dynamics) of the quantum particles can be used to obtain + centroid time correlation functions, which can be further used to + obtain the true quantum correlation function for the original system. + The CMD method also uses normal modes to evolve the system, except + only the k > 0 modes are thermostatted, not the centroid degrees of + freedom. The keyword *fmass* sets a further scaling factor for the fictitious masses of beads, which can be used for the Partial Adiabatic CMD @@ -152,47 +158,47 @@ related tasks for each of the partitions, e.g. Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" -This fix writes the state of the Nose/Hoover thermostat over all +Fix pimd/nvt writes the state of the Nose/Hoover thermostat over all quasi-beads to :doc:`binary restart files `. See the :doc:`read_restart ` command for info on how to re-specify a fix in an input script that reads a restart file, so that the operation of the fix continues in an uninterrupted fashion. None of the :doc:`fix_modify ` options -are relevant to this fix. +are relevant to fix pimd/nvt. -This fix computes a global 3-vector, which can be accessed by various -:doc:`output commands `. The three quantities in the -global vector are +Fix pimd/nvt computes a global 3-vector, which can be accessed by +various :doc:`output commands `. The three quantities in +the global vector are: -#. the total spring energy of the quasi-beads, -#. the current temperature of the classical system of ring polymers, -#. the current value of the scalar virial estimator for the kinetic - energy of the quantum system :ref:`(Herman) `. + #. the total spring energy of the quasi-beads, + #. the current temperature of the classical system of ring polymers, + #. the current value of the scalar virial estimator for the kinetic + energy of the quantum system :ref:`(Herman) `. -The vector values calculated by this fix are "extensive", except for the +The vector values calculated by fix pimd/nvt are "extensive", except for the temperature, which is "intensive". -No parameter of this fix can be used with the *start/stop* keywords of -the :doc:`run ` command. This fix is not invoked during +No parameter of fix pimd/nvt can be used with the *start/stop* keywords +of the :doc:`run ` command. Fix pimd/nvt is not invoked during :doc:`energy minimization `. Restrictions """""""""""" -This fix is part of the REPLICA package. It is only enabled if -LAMMPS was built with that package. See the -:doc:`Build package ` page for more info. +This fix is part of the REPLICA package. It is only enabled if LAMMPS +was built with that package. See the :doc:`Build package +` page for more info. -Fix pid cannot be used with :doc:`lj units `. +Fix pimd/nvt cannot be used with :doc:`lj units `. A PIMD simulation can be initialized with a single data file read via the :doc:`read_data ` command. However, this means all quasi-beads in a ring polymer will have identical positions and -velocities, resulting in identical trajectories for all quasi-beads. -To avoid this, users can simply initialize velocities with different -random number seeds assigned to each partition, as defined by the -uloop variable, e.g. +velocities, resulting in identical trajectories for all quasi-beads. To +avoid this, users can simply initialize velocities with different random +number seeds assigned to each partition, as defined by the uloop +variable, e.g. .. code-block:: LAMMPS @@ -201,8 +207,8 @@ uloop variable, e.g. Default """"""" -The keyword defaults are method = pimd, fmass = 1.0, sp = 1.0, temp = 300.0, -and nhc = 2. +The keyword defaults for fix pimd/nvt are method = pimd, fmass = 1.0, sp += 1.0, temp = 300.0, and nhc = 2. ---------- diff --git a/doc/utils/check-styles.py b/doc/utils/check-styles.py index 82de537863..3015ece7a9 100644 --- a/doc/utils/check-styles.py +++ b/doc/utils/check-styles.py @@ -256,7 +256,7 @@ for command_type, entries in index.items(): print("Total number of style index entries:", total_index) skip_angle = ('sdk') -skip_fix = ('python', 'NEIGH_HISTORY/omp','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species') +skip_fix = ('python', 'NEIGH_HISTORY/omp','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species', 'pimd') skip_pair = ('meam/c','lj/sf','reax/c','lj/sdk','lj/sdk/coul/long','lj/sdk/coul/msm') skip_compute = ('pressure/cylinder') @@ -286,7 +286,7 @@ if counter: counter = 0 counter += check_style_index("compute", compute, index["compute"], skip=['pressure/cylinder']) -counter += check_style_index("fix", fix, index["fix"], skip=['python','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species']) +counter += check_style_index("fix", fix, index["fix"], skip=['python','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species','pimd']) counter += check_style_index("angle_style", angle, index["angle_style"], skip=['sdk']) counter += check_style_index("bond_style", bond, index["bond_style"]) counter += check_style_index("dihedral_style", dihedral, index["dihedral_style"]) diff --git a/examples/PACKAGES/pimd/para-h2/in.scp b/examples/PACKAGES/pimd/para-h2/in.scp index eb8debad15..627d94310f 100644 --- a/examples/PACKAGES/pimd/para-h2/in.scp +++ b/examples/PACKAGES/pimd/para-h2/in.scp @@ -17,7 +17,7 @@ timestep 0.001 velocity all create 1.0 1985 rot yes dist gaussian -fix 1 all pimd method nmpimd fmass 1.0 temp 25.0 nhc 4 +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 25.0 nhc 4 thermo_style custom step temp pe etotal pzz f_1[1] f_1[2] f_1[3] thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial diff --git a/examples/PACKAGES/pimd/prot-hairpin/in.scp b/examples/PACKAGES/pimd/prot-hairpin/in.scp index 00b5150a8a..a5dea4da63 100644 --- a/examples/PACKAGES/pimd/prot-hairpin/in.scp +++ b/examples/PACKAGES/pimd/prot-hairpin/in.scp @@ -17,7 +17,7 @@ read_data system.data #read_restart system_${ibead}.rest1 special_bonds charmm -fix 1 all pimd method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 thermo 10 thermo_style custom step temp pe etotal f_1[1] f_1[2] f_1[3] diff --git a/src/.gitignore b/src/.gitignore index 22cb5f1ee0..8f0f577a45 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1533,6 +1533,8 @@ /fix_mol_swap.h /fix_pimd.cpp /fix_pimd.h +/fix_pimd_nvt.cpp +/fix_pimd_nvt.h /fix_qbmsst.cpp /fix_qbmsst.h /fix_qtb.cpp diff --git a/src/Purge.list b/src/Purge.list index a1fcc88b00..5f7182d5fd 100644 --- a/src/Purge.list +++ b/src/Purge.list @@ -51,6 +51,9 @@ lmpinstalledpkgs.h lmpgitversion.h mliap_model_python_couple.cpp mliap_model_python_couple.h +# renamed on 23 February 2023 +fix_pimd.cpp +fix_pimd.h # removed on 20 January 2023 atom_vec_mesont.cpp atom_vec_mesont.h diff --git a/src/REPLICA/fix_pimd.cpp b/src/REPLICA/fix_pimd_nvt.cpp similarity index 89% rename from src/REPLICA/fix_pimd.cpp rename to src/REPLICA/fix_pimd_nvt.cpp index 3968cd0d4b..89d9a4127f 100644 --- a/src/REPLICA/fix_pimd.cpp +++ b/src/REPLICA/fix_pimd_nvt.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Package FixPIMD + Package FixPIMDNVT Purpose Quantum Path Integral Algorithm for Quantum Chemistry Copyright Voth Group @ University of Chicago Authors Chris Knight & Yuxing Peng (yuxing at uchicago.edu) @@ -21,7 +21,7 @@ Version 1.0 ------------------------------------------------------------------------- */ -#include "fix_pimd.h" +#include "fix_pimd_nvt.h" #include "atom.h" #include "comm.h" @@ -44,7 +44,7 @@ enum { PIMD, NMPIMD, CMD }; /* ---------------------------------------------------------------------- */ -FixPIMD::FixPIMD(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) +FixPIMDNVT::FixPIMDNVT(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { max_nsend = 0; tag_send = nullptr; @@ -85,27 +85,27 @@ FixPIMD::FixPIMD(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) else if (strcmp(arg[i + 1], "cmd") == 0) method = CMD; else - error->universe_all(FLERR, fmt::format("Unknown method parameter {} for fix pimd", - arg[i + 1])); + error->universe_all( + FLERR, fmt::format("Unknown method parameter {} for fix pimd/nvt", arg[i + 1])); } else if (strcmp(arg[i], "fmass") == 0) { fmass = utils::numeric(FLERR, arg[i + 1], false, lmp); if ((fmass < 0.0) || (fmass > np)) - error->universe_all(FLERR, fmt::format("Invalid fmass value {} for fix pimd", fmass)); + error->universe_all(FLERR, fmt::format("Invalid fmass value {} for fix pimd/nvt", fmass)); } else if (strcmp(arg[i], "sp") == 0) { sp = utils::numeric(FLERR, arg[i + 1], false, lmp); - if (sp < 0.0) error->universe_all(FLERR, "Invalid sp value for fix pimd"); + if (sp < 0.0) error->universe_all(FLERR, "Invalid sp value for fix pimd/nvt"); } else if (strcmp(arg[i], "temp") == 0) { nhc_temp = utils::numeric(FLERR, arg[i + 1], false, lmp); - if (nhc_temp < 0.0) error->universe_all(FLERR, "Invalid temp value for fix pimd"); + if (nhc_temp < 0.0) error->universe_all(FLERR, "Invalid temp value for fix pimd/nvt"); } else if (strcmp(arg[i], "nhc") == 0) { nhc_nchain = utils::inumeric(FLERR, arg[i + 1], false, lmp); - if (nhc_nchain < 2) error->universe_all(FLERR, "Invalid nhc value for fix pimd"); + if (nhc_nchain < 2) error->universe_all(FLERR, "Invalid nhc value for fix pimd/nvt"); } else - error->universe_all(FLERR, fmt::format("Unknown keyword {} for fix pimd", arg[i])); + error->universe_all(FLERR, fmt::format("Unknown keyword {} for fix pimd/nvt", arg[i])); } if (strcmp(update->unit_style, "lj") == 0) - error->all(FLERR, "Fix pimd does not support lj units"); + error->all(FLERR, "Fix pimd/nvt does not support lj units"); /* Initiation */ @@ -138,7 +138,7 @@ FixPIMD::FixPIMD(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) /* ---------------------------------------------------------------------- */ -FixPIMD::~FixPIMD() +FixPIMDNVT::~FixPIMDNVT() { delete[] mass; atom->delete_callback(id, Atom::GROW); @@ -170,7 +170,7 @@ FixPIMD::~FixPIMD() /* ---------------------------------------------------------------------- */ -int FixPIMD::setmask() +int FixPIMDNVT::setmask() { int mask = 0; mask |= POST_FORCE; @@ -181,13 +181,13 @@ int FixPIMD::setmask() /* ---------------------------------------------------------------------- */ -void FixPIMD::init() +void FixPIMDNVT::init() { if (atom->map_style == Atom::MAP_NONE) - error->all(FLERR, "Fix pimd requires an atom map, see atom_modify"); + error->universe_all(FLERR, "Fix pimd/nvt requires an atom map, see atom_modify"); if (universe->me == 0 && universe->uscreen) - fprintf(universe->uscreen, "Fix pimd initializing Path-Integral ...\n"); + fprintf(universe->uscreen, "Fix pimd/nvt initializing Path-Integral ...\n"); // prepare the constants @@ -222,7 +222,7 @@ void FixPIMD::init() fbond = -_fbond * force->mvv2e; if (universe->me == 0) - printf("Fix pimd -P/(beta^2 * hbar^2) = %20.7lE (kcal/mol/A^2)\n\n", fbond); + utils::logmesg(lmp, "Fix pimd/nvt -P/(beta^2 * hbar^2) = {:20.7e} (kcal/mol/A^2)\n\n", fbond); dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; @@ -241,7 +241,7 @@ void FixPIMD::init() /* ---------------------------------------------------------------------- */ -void FixPIMD::setup(int vflag) +void FixPIMDNVT::setup(int vflag) { if (universe->me == 0 && universe->uscreen) fprintf(universe->uscreen, "Setting up Path-Integral ...\n"); @@ -251,7 +251,7 @@ void FixPIMD::setup(int vflag) /* ---------------------------------------------------------------------- */ -void FixPIMD::initial_integrate(int /*vflag*/) +void FixPIMDNVT::initial_integrate(int /*vflag*/) { nhc_update_v(); nhc_update_x(); @@ -259,14 +259,14 @@ void FixPIMD::initial_integrate(int /*vflag*/) /* ---------------------------------------------------------------------- */ -void FixPIMD::final_integrate() +void FixPIMDNVT::final_integrate() { nhc_update_v(); } /* ---------------------------------------------------------------------- */ -void FixPIMD::post_force(int /*flag*/) +void FixPIMDNVT::post_force(int /*flag*/) { for (int i = 0; i < atom->nlocal; i++) for (int j = 0; j < 3; j++) atom->f[i][j] /= np; @@ -293,7 +293,7 @@ void FixPIMD::post_force(int /*flag*/) Nose-Hoover Chains ------------------------------------------------------------------------- */ -void FixPIMD::nhc_init() +void FixPIMDNVT::nhc_init() { double tau = 1.0 / omega_np; double KT = force->boltz * nhc_temp; @@ -309,7 +309,7 @@ void FixPIMD::nhc_init() nhc_eta_dotdot[i][ichain] = 0.0; nhc_eta_mass[i][ichain] = mass0; if ((method == CMD || method == NMPIMD) && universe->iworld == 0) - ; // do nothing + ; // do nothing else nhc_eta_mass[i][ichain] *= fmass; } @@ -334,7 +334,7 @@ void FixPIMD::nhc_init() /* ---------------------------------------------------------------------- */ -void FixPIMD::nhc_update_x() +void FixPIMDNVT::nhc_update_x() { int n = atom->nlocal; double **x = atom->x; @@ -359,7 +359,7 @@ void FixPIMD::nhc_update_x() /* ---------------------------------------------------------------------- */ -void FixPIMD::nhc_update_v() +void FixPIMDNVT::nhc_update_v() { int n = atom->nlocal; int *type = atom->type; @@ -447,14 +447,14 @@ void FixPIMD::nhc_update_v() Normal Mode PIMD ------------------------------------------------------------------------- */ -void FixPIMD::nmpimd_init() +void FixPIMDNVT::nmpimd_init() { memory->create(M_x2xp, np, np, "fix_feynman:M_x2xp"); memory->create(M_xp2x, np, np, "fix_feynman:M_xp2x"); memory->create(M_f2fp, np, np, "fix_feynman:M_f2fp"); memory->create(M_fp2f, np, np, "fix_feynman:M_fp2f"); - lam = (double *) memory->smalloc(sizeof(double) * np, "FixPIMD::lam"); + lam = (double *) memory->smalloc(sizeof(double) * np, "pimd_nvt:lam"); // Set up eigenvalues @@ -505,7 +505,7 @@ void FixPIMD::nmpimd_init() /* ---------------------------------------------------------------------- */ -void FixPIMD::nmpimd_fill(double **ptr) +void FixPIMDNVT::nmpimd_fill(double **ptr) { comm_ptr = ptr; comm->forward_comm(this); @@ -513,7 +513,7 @@ void FixPIMD::nmpimd_fill(double **ptr) /* ---------------------------------------------------------------------- */ -void FixPIMD::nmpimd_transform(double **src, double **des, double *vector) +void FixPIMDNVT::nmpimd_transform(double **src, double **des, double *vector) { int n = atom->nlocal; int m = 0; @@ -528,7 +528,7 @@ void FixPIMD::nmpimd_transform(double **src, double **des, double *vector) /* ---------------------------------------------------------------------- */ -void FixPIMD::spring_force() +void FixPIMDNVT::spring_force() { spring_energy = 0.0; @@ -576,7 +576,7 @@ void FixPIMD::spring_force() Comm operations ------------------------------------------------------------------------- */ -void FixPIMD::comm_init() +void FixPIMDNVT::comm_init() { if (size_plan) { delete[] plan_send; @@ -634,17 +634,17 @@ void FixPIMD::comm_init() /* ---------------------------------------------------------------------- */ -void FixPIMD::comm_exec(double **ptr) +void FixPIMDNVT::comm_exec(double **ptr) { int nlocal = atom->nlocal; if (nlocal > max_nlocal) { max_nlocal = nlocal + 200; int size = sizeof(double) * max_nlocal * 3; - buf_recv = (double *) memory->srealloc(buf_recv, size, "FixPIMD:x_recv"); + buf_recv = (double *) memory->srealloc(buf_recv, size, "FixPIMDNVT:x_recv"); for (int i = 0; i < np; i++) - buf_beads[i] = (double *) memory->srealloc(buf_beads[i], size, "FixPIMD:x_beads[i]"); + buf_beads[i] = (double *) memory->srealloc(buf_beads[i], size, "FixPIMDNVT:x_beads[i]"); } // copy local positions @@ -666,9 +666,9 @@ void FixPIMD::comm_exec(double **ptr) if (nsend > max_nsend) { max_nsend = nsend + 200; tag_send = - (tagint *) memory->srealloc(tag_send, sizeof(tagint) * max_nsend, "FixPIMD:tag_send"); - buf_send = - (double *) memory->srealloc(buf_send, sizeof(double) * max_nsend * 3, "FixPIMD:x_send"); + (tagint *) memory->srealloc(tag_send, sizeof(tagint) * max_nsend, "FixPIMDNVT:tag_send"); + buf_send = (double *) memory->srealloc(buf_send, sizeof(double) * max_nsend * 3, + "FixPIMDNVT:x_send"); } // send tags @@ -709,7 +709,7 @@ void FixPIMD::comm_exec(double **ptr) /* ---------------------------------------------------------------------- */ -int FixPIMD::pack_forward_comm(int n, int *list, double *buf, int /*pbc_flag*/, int * /*pbc*/) +int FixPIMDNVT::pack_forward_comm(int n, int *list, double *buf, int /*pbc_flag*/, int * /*pbc*/) { int i, j, m; @@ -727,7 +727,7 @@ int FixPIMD::pack_forward_comm(int n, int *list, double *buf, int /*pbc_flag*/, /* ---------------------------------------------------------------------- */ -void FixPIMD::unpack_forward_comm(int n, int first, double *buf) +void FixPIMDNVT::unpack_forward_comm(int n, int first, double *buf) { int i, m, last; @@ -744,28 +744,28 @@ void FixPIMD::unpack_forward_comm(int n, int first, double *buf) Memory operations ------------------------------------------------------------------------- */ -double FixPIMD::memory_usage() +double FixPIMDNVT::memory_usage() { return (double) atom->nmax * size_peratom_cols * sizeof(double); } /* ---------------------------------------------------------------------- */ -void FixPIMD::grow_arrays(int nmax) +void FixPIMDNVT::grow_arrays(int nmax) { if (nmax == 0) return; int count = nmax * 3; - memory->grow(array_atom, nmax, size_peratom_cols, "FixPIMD::array_atom"); - memory->grow(nhc_eta, count, nhc_nchain, "FixPIMD::nh_eta"); - memory->grow(nhc_eta_dot, count, nhc_nchain + 1, "FixPIMD::nh_eta_dot"); - memory->grow(nhc_eta_dotdot, count, nhc_nchain, "FixPIMD::nh_eta_dotdot"); - memory->grow(nhc_eta_mass, count, nhc_nchain, "FixPIMD::nh_eta_mass"); + memory->grow(array_atom, nmax, size_peratom_cols, "pimd_nvt:array_atom"); + memory->grow(nhc_eta, count, nhc_nchain, "pimd_nvt:nh_eta"); + memory->grow(nhc_eta_dot, count, nhc_nchain + 1, "pimd_nvt:nh_eta_dot"); + memory->grow(nhc_eta_dotdot, count, nhc_nchain, "pimd_nvt:nh_eta_dotdot"); + memory->grow(nhc_eta_mass, count, nhc_nchain, "pimd_nvt:nh_eta_mass"); } /* ---------------------------------------------------------------------- */ -void FixPIMD::copy_arrays(int i, int j, int /*delflag*/) +void FixPIMDNVT::copy_arrays(int i, int j, int /*delflag*/) { int i_pos = i * 3; int j_pos = j * 3; @@ -778,7 +778,7 @@ void FixPIMD::copy_arrays(int i, int j, int /*delflag*/) /* ---------------------------------------------------------------------- */ -int FixPIMD::pack_exchange(int i, double *buf) +int FixPIMDNVT::pack_exchange(int i, double *buf) { int offset = 0; int pos = i * 3; @@ -797,7 +797,7 @@ int FixPIMD::pack_exchange(int i, double *buf) /* ---------------------------------------------------------------------- */ -int FixPIMD::unpack_exchange(int nlocal, double *buf) +int FixPIMDNVT::unpack_exchange(int nlocal, double *buf) { int offset = 0; int pos = nlocal * 3; @@ -816,7 +816,7 @@ int FixPIMD::unpack_exchange(int nlocal, double *buf) /* ---------------------------------------------------------------------- */ -int FixPIMD::pack_restart(int i, double *buf) +int FixPIMDNVT::pack_restart(int i, double *buf) { int offset = 0; int pos = i * 3; @@ -837,7 +837,7 @@ int FixPIMD::pack_restart(int i, double *buf) /* ---------------------------------------------------------------------- */ -void FixPIMD::unpack_restart(int nlocal, int nth) +void FixPIMDNVT::unpack_restart(int nlocal, int nth) { double **extra = atom->extra; @@ -864,21 +864,21 @@ void FixPIMD::unpack_restart(int nlocal, int nth) /* ---------------------------------------------------------------------- */ -int FixPIMD::maxsize_restart() +int FixPIMDNVT::maxsize_restart() { return size_peratom_cols + 1; } /* ---------------------------------------------------------------------- */ -int FixPIMD::size_restart(int /*nlocal*/) +int FixPIMDNVT::size_restart(int /*nlocal*/) { return size_peratom_cols + 1; } /* ---------------------------------------------------------------------- */ -double FixPIMD::compute_vector(int n) +double FixPIMDNVT::compute_vector(int n) { if (n == 0) { return spring_energy; } if (n == 1) { return t_sys; } diff --git a/src/REPLICA/fix_pimd.h b/src/REPLICA/fix_pimd_nvt.h similarity index 93% rename from src/REPLICA/fix_pimd.h rename to src/REPLICA/fix_pimd_nvt.h index b96c088efe..6f1321bbda 100644 --- a/src/REPLICA/fix_pimd.h +++ b/src/REPLICA/fix_pimd_nvt.h @@ -13,21 +13,22 @@ #ifdef FIX_CLASS // clang-format off -FixStyle(pimd,FixPIMD); +FixStyle(pimd,FixPIMDNVT); +FixStyle(pimd/nvt,FixPIMDNVT); // clang-format on #else -#ifndef FIX_PIMD_H -#define FIX_PIMD_H +#ifndef FIX_PIMD_NVT_H +#define FIX_PIMD_NVT_H #include "fix.h" namespace LAMMPS_NS { -class FixPIMD : public Fix { +class FixPIMDNVT : public Fix { public: - FixPIMD(class LAMMPS *, int, char **); - ~FixPIMD() override; + FixPIMDNVT(class LAMMPS *, int, char **); + ~FixPIMDNVT() override; int setmask() override; From d3ac4a728da710f018f6b033a7830d5fea17e434 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 23 Feb 2023 15:20:43 -0500 Subject: [PATCH 253/445] fix bug in fix wall/morse that was computing the force incorrectly --- examples/wall/log.23Feb23.wall.lepton.g++.1 | 44 ++++++---------- examples/wall/log.23Feb23.wall.lepton.g++.4 | 50 +++++++----------- examples/wall/log.23Feb23.wall.table.g++.1 | 57 ++++++++------------- examples/wall/log.23Feb23.wall.table.g++.4 | 57 ++++++++------------- src/fix_wall_morse.cpp | 2 +- 5 files changed, 78 insertions(+), 132 deletions(-) diff --git a/examples/wall/log.23Feb23.wall.lepton.g++.1 b/examples/wall/log.23Feb23.wall.lepton.g++.1 index 91fb3a3a53..5d555b2717 100644 --- a/examples/wall/log.23Feb23.wall.lepton.g++.1 +++ b/examples/wall/log.23Feb23.wall.lepton.g++.1 @@ -1,5 +1,4 @@ LAMMPS (8 Feb 2023) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task units real atom_style bond @@ -72,7 +71,6 @@ variable name string wall-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -137,14 +135,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 -Loop time of 5.837e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 7.6828e-05 on 1 procs for 5 steps with 4 atoms variable name string lepton-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -209,14 +206,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 -Loop time of 0.00343046 on 1 procs for 5 steps with 4 atoms +Loop time of 0.00134915 on 1 procs for 5 steps with 4 atoms variable name string bond-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -282,14 +278,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 5 194283.6024 91313.53086 1737.367544 25.51012833 1762.877672 12.75506417 -Loop time of 6.3996e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 4.6572e-05 on 1 procs for 5 steps with 4 atoms variable name string pair-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -354,7 +349,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 5 170540.4005 97560.47089 1525.045619 190.8165235 1715.862142 178.0614593 -Loop time of 5.4513e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 8.4058e-05 on 1 procs for 5 steps with 4 atoms variable eps index 0.02 @@ -363,7 +358,6 @@ variable name string wall-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -433,14 +427,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 5.3398e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 4.3942e-05 on 1 procs for 5 steps with 4 atoms variable name string lepton-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -506,14 +499,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 0.0051554 on 1 procs for 5 steps with 4 atoms +Loop time of 0.00298781 on 1 procs for 5 steps with 4 atoms variable name string pair-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -582,7 +574,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes 4 176007.6835 72778.53677 1573.936415 2.772305717 1576.708721 2.772305717 5 1.132219912e+27 4.628275436e+26 1.012479748e+25 3.761972158e+12 1.012479748e+25 3.761972158e+12 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 5.4716e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 4.4455e-05 on 1 procs for 5 steps with 4 atoms variable d0 index 20.0 @@ -593,7 +585,6 @@ variable name string wall-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -659,19 +650,18 @@ Neighbor list info ... Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes Step Temp Press KinEng PotEng TotEng c_pe 0 0 0 0 -30.02905654 -30.02905654 0 - 1 144.4114716 59.032354 1.291389498 -31.40065042 -30.10926092 0 - 2 471.9742076 192.9330696 4.220596384 -34.53885647 -30.31826008 0 - 3 784.0772455 320.5141877 7.011556 -37.58109301 -30.56953701 0 - 4 961.8950756 393.2023542 8.601679525 -39.34691775 -30.74523823 0 - 5 996.609681 407.3929504 8.91211246 -39.66353245 -30.75141999 0 -Loop time of 4.8727e-05 on 1 procs for 5 steps with 4 atoms + 1 146.0893547 59.71823711 1.30639385 -31.40065042 -30.09425657 0 + 2 485.8091411 198.5884977 4.34431431 -34.55987817 -30.21556386 0 + 3 822.0828974 336.0500941 7.351418888 -37.63613582 -30.28471693 0 + 4 1018.806679 416.4666136 9.110607565 -39.39265114 -30.28204357 0 + 5 1050.331347 429.3532307 9.392514704 -39.63687095 -30.24435625 0 +Loop time of 7.6505e-05 on 1 procs for 5 steps with 4 atoms variable name string lepton-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -736,14 +726,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 822.0828974 336.0500941 7.351418888 -37.63613582 -30.28471693 0 4 1018.806679 416.4666136 9.110607565 -39.39265114 -30.28204357 0 5 1050.331347 429.3532307 9.392514704 -39.63687095 -30.24435625 0 -Loop time of 0.00478609 on 1 procs for 5 steps with 4 atoms +Loop time of 0.00266357 on 1 procs for 5 steps with 4 atoms variable name string bond-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -811,14 +800,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 822.0828974 1456.368913 7.351418888 2.06858205 9.420000938 1.034291025 4 1018.806679 823.4383177 9.110607565 0.3120667313 9.422674297 0.1560333657 5 1050.331347 253.0262957 9.392514704 0.06784692056 9.460361624 0.03392346028 -Loop time of 3.7914e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 0.000120428 on 1 procs for 5 steps with 4 atoms variable name string pair-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -887,7 +875,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes 3 822.0828974 1456.368913 7.351418888 -37.63613582 -30.28471693 -18.81806791 4 1018.806679 823.4383177 9.110607565 -39.39265114 -30.28204357 -19.69632557 5 1050.331347 253.0262957 9.392514704 -39.63687095 -30.24435625 -19.81843547 -Loop time of 4.2699e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 3.6356e-05 on 1 procs for 5 steps with 4 atoms shell rm -f walltest.restart diff --git a/examples/wall/log.23Feb23.wall.lepton.g++.4 b/examples/wall/log.23Feb23.wall.lepton.g++.4 index ba630cc5d8..7820f2a9ae 100644 --- a/examples/wall/log.23Feb23.wall.lepton.g++.4 +++ b/examples/wall/log.23Feb23.wall.lepton.g++.4 @@ -1,5 +1,4 @@ LAMMPS (8 Feb 2023) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task units real atom_style bond @@ -22,7 +21,7 @@ Created 1 atoms create_atoms 1 single 4.0 0.0 0.0 Created 1 atoms using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) - create_atoms CPU = 0.001 seconds + create_atoms CPU = 0.000 seconds create_atoms 1 single -5.0 0.0 0.0 Created 1 atoms using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) @@ -48,7 +47,7 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-3 neighbors 0 = max # of 1-4 neighbors 3 = max # of special neighbors - special bonds CPU = 0.000 seconds + special bonds CPU = 0.001 seconds group move id 1:2 2 atoms in group move @@ -72,7 +71,6 @@ variable name string wall-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -137,14 +135,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 -Loop time of 0.000225045 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000266179 on 4 procs for 5 steps with 4 atoms variable name string lepton-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -209,14 +206,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 -Loop time of 0.00491331 on 4 procs for 5 steps with 4 atoms +Loop time of 0.00230794 on 4 procs for 5 steps with 4 atoms variable name string bond-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -282,14 +278,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 5 194283.6024 91313.53086 1737.367544 25.51012833 1762.877672 12.75506417 -Loop time of 0.000214841 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000358068 on 4 procs for 5 steps with 4 atoms variable name string pair-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -354,7 +349,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 5 170540.4005 97560.47089 1525.045619 190.8165235 1715.862142 178.0614593 -Loop time of 0.000212697 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000341881 on 4 procs for 5 steps with 4 atoms variable eps index 0.02 @@ -363,7 +358,6 @@ variable name string wall-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -433,14 +427,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 0.000207412 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000345376 on 4 procs for 5 steps with 4 atoms variable name string lepton-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -506,14 +499,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 0.00958101 on 4 procs for 5 steps with 4 atoms +Loop time of 0.00332789 on 4 procs for 5 steps with 4 atoms variable name string pair-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -582,7 +574,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes 4 176007.6835 72778.53677 1573.936415 2.772305717 1576.708721 2.772305717 5 1.132219912e+27 4.628275436e+26 1.012479748e+25 3.761972158e+12 1.012479748e+25 3.761972158e+12 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 0.00016574 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000404238 on 4 procs for 5 steps with 4 atoms variable d0 index 20.0 @@ -593,7 +585,6 @@ variable name string wall-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -659,19 +650,18 @@ Neighbor list info ... Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes Step Temp Press KinEng PotEng TotEng c_pe 0 0 0 0 -30.02905654 -30.02905654 0 - 1 144.4114716 59.032354 1.291389498 -31.40065042 -30.10926092 0 - 2 471.9742076 192.9330696 4.220596384 -34.53885647 -30.31826008 0 - 3 784.0772455 320.5141877 7.011556 -37.58109301 -30.56953701 0 - 4 961.8950756 393.2023542 8.601679525 -39.34691775 -30.74523823 0 - 5 996.609681 407.3929504 8.91211246 -39.66353245 -30.75141999 0 -Loop time of 0.000162994 on 4 procs for 5 steps with 4 atoms + 1 146.0893547 59.71823711 1.30639385 -31.40065042 -30.09425657 0 + 2 485.8091411 198.5884977 4.34431431 -34.55987817 -30.21556386 0 + 3 822.0828974 336.0500941 7.351418888 -37.63613582 -30.28471693 0 + 4 1018.806679 416.4666136 9.110607565 -39.39265114 -30.28204357 0 + 5 1050.331347 429.3532307 9.392514704 -39.63687095 -30.24435625 0 +Loop time of 0.000748817 on 4 procs for 5 steps with 4 atoms variable name string lepton-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -736,14 +726,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 822.0828974 336.0500941 7.351418888 -37.63613582 -30.28471693 0 4 1018.806679 416.4666136 9.110607565 -39.39265114 -30.28204357 0 5 1050.331347 429.3532307 9.392514704 -39.63687095 -30.24435625 0 -Loop time of 0.00780516 on 4 procs for 5 steps with 4 atoms +Loop time of 0.00347272 on 4 procs for 5 steps with 4 atoms variable name string bond-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -762,7 +751,7 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-3 neighbors 0 = max # of 1-4 neighbors 3 = max # of special neighbors - special bonds CPU = 0.000 seconds + special bonds CPU = 0.001 seconds read_restart CPU = 0.001 seconds # log ${name}.log @@ -811,14 +800,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 822.0828974 1456.368913 7.351418888 2.06858205 9.420000938 1.034291025 4 1018.806679 823.4383177 9.110607565 0.3120667313 9.422674297 0.1560333657 5 1050.331347 253.0262957 9.392514704 0.06784692056 9.460361624 0.03392346028 -Loop time of 0.000141974 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000859458 on 4 procs for 5 steps with 4 atoms variable name string pair-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -887,7 +875,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes 3 822.0828974 1456.368913 7.351418888 -37.63613582 -30.28471693 -18.81806791 4 1018.806679 823.4383177 9.110607565 -39.39265114 -30.28204357 -19.69632557 5 1050.331347 253.0262957 9.392514704 -39.63687095 -30.24435625 -19.81843547 -Loop time of 0.000196232 on 4 procs for 5 steps with 4 atoms +Loop time of 0.00029769 on 4 procs for 5 steps with 4 atoms shell rm -f walltest.restart diff --git a/examples/wall/log.23Feb23.wall.table.g++.1 b/examples/wall/log.23Feb23.wall.table.g++.1 index c03bc61f23..f734be7403 100644 --- a/examples/wall/log.23Feb23.wall.table.g++.1 +++ b/examples/wall/log.23Feb23.wall.table.g++.1 @@ -1,5 +1,4 @@ LAMMPS (8 Feb 2023) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task units real atom_style bond @@ -22,7 +21,7 @@ Created 1 atoms create_atoms 1 single 4.0 0.0 0.0 Created 1 atoms using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) - create_atoms CPU = 0.000 seconds + create_atoms CPU = 0.001 seconds create_atoms 1 single -5.0 0.0 0.0 Created 1 atoms using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) @@ -72,7 +71,6 @@ variable name string wall-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -137,14 +135,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 -Loop time of 7.7442e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 4.6507e-05 on 1 procs for 5 steps with 4 atoms variable name string table-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -211,14 +208,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 115302.7492 47133.32419 1031.086781 746.8824148 1777.969196 0 4 165817.4572 67782.66799 1482.811029 285.5061521 1768.317181 0 5 194283.6024 79419.02582 1737.367544 25.51090543 1762.878449 0 -Loop time of 7.9176e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 5.7549e-05 on 1 procs for 5 steps with 4 atoms variable name string spline-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -285,14 +281,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 -Loop time of 7.4164e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 7.285e-05 on 1 procs for 5 steps with 4 atoms variable name string bond-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -358,14 +353,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 5 194283.6024 91313.53086 1737.367544 25.51012833 1762.877672 12.75506417 -Loop time of 7.4638e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 4.5844e-05 on 1 procs for 5 steps with 4 atoms variable name string pair-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -430,7 +424,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 5 170540.4005 97560.47089 1525.045619 190.8165235 1715.862142 178.0614593 -Loop time of 7.6049e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 4.6409e-05 on 1 procs for 5 steps with 4 atoms variable eps index 0.02 @@ -439,7 +433,6 @@ variable name string wall-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -509,14 +502,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 6.7788e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 4.3816e-05 on 1 procs for 5 steps with 4 atoms variable name string table-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -588,14 +580,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 4 178318.0722 72892.6549 1594.596905 0 1594.596905 0 5 178318.0722 72892.6549 1594.596905 0 1594.596905 0 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 7.0625e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 4.2027e-05 on 1 procs for 5 steps with 4 atoms variable name string spline-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -667,14 +658,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 4 162012.2554 66227.18201 1448.783278 0 1448.783278 0 5 162012.2554 66227.18201 1448.783278 0 1448.783278 0 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 7.8628e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 7.5223e-05 on 1 procs for 5 steps with 4 atoms variable name string pair-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -743,7 +733,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes 4 176007.6835 72778.53677 1573.936415 2.772305717 1576.708721 2.772305717 5 1.132219912e+27 4.628275436e+26 1.012479748e+25 3.761972158e+12 1.012479748e+25 3.761972158e+12 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 5.1616e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 8.0904e-05 on 1 procs for 5 steps with 4 atoms variable d0 index 20.0 @@ -754,7 +744,6 @@ variable name string wall-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -820,19 +809,18 @@ Neighbor list info ... Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes Step Temp Press KinEng PotEng TotEng c_pe 0 0 0 0 -30.02905654 -30.02905654 0 - 1 144.4114716 59.032354 1.291389498 -31.40065042 -30.10926092 0 - 2 471.9742076 192.9330696 4.220596384 -34.53885647 -30.31826008 0 - 3 784.0772455 320.5141877 7.011556 -37.58109301 -30.56953701 0 - 4 961.8950756 393.2023542 8.601679525 -39.34691775 -30.74523823 0 - 5 996.609681 407.3929504 8.91211246 -39.66353245 -30.75141999 0 -Loop time of 3.8086e-05 on 1 procs for 5 steps with 4 atoms + 1 146.0893547 59.71823711 1.30639385 -31.40065042 -30.09425657 0 + 2 485.8091411 198.5884977 4.34431431 -34.55987817 -30.21556386 0 + 3 822.0828974 336.0500941 7.351418888 -37.63613582 -30.28471693 0 + 4 1018.806679 416.4666136 9.110607565 -39.39265114 -30.28204357 0 + 5 1050.331347 429.3532307 9.392514704 -39.63687095 -30.24435625 0 +Loop time of 7.721e-05 on 1 procs for 5 steps with 4 atoms variable name string table-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -899,14 +887,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 822.1558136 336.0799007 7.352070936 -37.63533573 -30.28326479 0 4 1018.904947 416.5067832 9.111486314 -39.39200056 -30.28051425 0 5 1050.436268 429.3961205 9.393452958 -39.63643565 -30.24298269 0 -Loop time of 3.7571e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 5.4273e-05 on 1 procs for 5 steps with 4 atoms variable name string spline-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -973,14 +960,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 822.0828818 336.0500877 7.351418748 -37.63613601 -30.28471726 0 4 1018.80666 416.4666056 9.110607389 -39.39265128 -30.28204389 0 5 1050.331328 429.353223 9.392514534 -39.63687099 -30.24435645 0 -Loop time of 4.1369e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 3.4052e-05 on 1 procs for 5 steps with 4 atoms variable name string bond-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -1000,7 +986,7 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-4 neighbors 3 = max # of special neighbors special bonds CPU = 0.000 seconds - read_restart CPU = 0.001 seconds + read_restart CPU = 0.000 seconds # log ${name}.log compute ea move pe/atom @@ -1048,14 +1034,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.429 | 4.429 | 4.429 Mbytes 3 822.0828974 1456.368913 7.351418888 2.06858205 9.420000938 1.034291025 4 1018.806679 823.4383177 9.110607565 0.3120667313 9.422674297 0.1560333657 5 1050.331347 253.0262957 9.392514704 0.06784692056 9.460361624 0.03392346028 -Loop time of 5.8418e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 7.2553e-05 on 1 procs for 5 steps with 4 atoms variable name string pair-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -1124,7 +1109,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.43 | 4.43 | 4.43 Mbytes 3 822.0828974 1456.368913 7.351418888 -37.63613582 -30.28471693 -18.81806791 4 1018.806679 823.4383177 9.110607565 -39.39265114 -30.28204357 -19.69632557 5 1050.331347 253.0262957 9.392514704 -39.63687095 -30.24435625 -19.81843547 -Loop time of 6.2323e-05 on 1 procs for 5 steps with 4 atoms +Loop time of 4.2481e-05 on 1 procs for 5 steps with 4 atoms shell rm -f walltest.restart diff --git a/examples/wall/log.23Feb23.wall.table.g++.4 b/examples/wall/log.23Feb23.wall.table.g++.4 index d8329f739e..8b0e9e0902 100644 --- a/examples/wall/log.23Feb23.wall.table.g++.4 +++ b/examples/wall/log.23Feb23.wall.table.g++.4 @@ -1,5 +1,4 @@ LAMMPS (8 Feb 2023) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task units real atom_style bond @@ -48,7 +47,7 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-3 neighbors 0 = max # of 1-4 neighbors 3 = max # of special neighbors - special bonds CPU = 0.000 seconds + special bonds CPU = 0.001 seconds group move id 1:2 2 atoms in group move @@ -72,7 +71,6 @@ variable name string wall-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -103,7 +101,7 @@ Finding 1-2 1-3 1-4 neighbors ... special bond factors coul: 1 1 1 1 = max # of 1-2 neighbors 3 = max # of special neighbors - special bonds CPU = 0.000 seconds + special bonds CPU = 0.001 seconds thermo_style custom step temp press ke pe etotal c_pe thermo 1 @@ -137,14 +135,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 -Loop time of 0.000226889 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000766029 on 4 procs for 5 steps with 4 atoms variable name string table-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -211,14 +208,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 115302.7492 47133.32419 1031.086781 746.8824148 1777.969196 0 4 165817.4572 67782.66799 1482.811029 285.5061521 1768.317181 0 5 194283.6024 79419.02582 1737.367544 25.51090543 1762.878449 0 -Loop time of 0.000222504 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000395044 on 4 procs for 5 steps with 4 atoms variable name string spline-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -285,14 +281,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 115302.7492 47133.32419 1031.086781 746.8819904 1777.968771 0 4 165817.4572 67782.66799 1482.811029 285.5057515 1768.31678 0 5 194283.6024 79419.02582 1737.367544 25.51012833 1762.877672 0 -Loop time of 0.000211631 on 4 procs for 5 steps with 4 atoms +Loop time of 0.00033613 on 4 procs for 5 steps with 4 atoms variable name string bond-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -358,14 +353,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 5 194283.6024 91313.53086 1737.367544 25.51012833 1762.877672 12.75506417 -Loop time of 0.00017705 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000380067 on 4 procs for 5 steps with 4 atoms variable name string pair-harmonic include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -430,7 +424,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes 3 115302.7492 83661.44348 1031.086781 746.8819904 1777.968771 373.4409952 4 165817.4572 98424.89283 1482.811029 285.5057515 1768.31678 142.7528758 5 170540.4005 97560.47089 1525.045619 190.8165235 1715.862142 178.0614593 -Loop time of 0.000186388 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000337009 on 4 procs for 5 steps with 4 atoms variable eps index 0.02 @@ -439,7 +433,6 @@ variable name string wall-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -509,14 +502,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 4 178259.4975 72868.71081 1594.073105 0 1594.073105 0 5 178259.4975 72868.71081 1594.073105 0 1594.073105 0 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 0.000258277 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000404521 on 4 procs for 5 steps with 4 atoms variable name string table-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -588,14 +580,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 4 178318.0722 72892.6549 1594.596905 0 1594.596905 0 5 178318.0722 72892.6549 1594.596905 0 1594.596905 0 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 0.000230164 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000334746 on 4 procs for 5 steps with 4 atoms variable name string spline-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -667,14 +658,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 4 162012.2554 66227.18201 1448.783278 0 1448.783278 0 5 162012.2554 66227.18201 1448.783278 0 1448.783278 0 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 0.000182437 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000345529 on 4 procs for 5 steps with 4 atoms variable name string pair-lj126 include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -743,7 +733,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes 4 176007.6835 72778.53677 1573.936415 2.772305717 1576.708721 2.772305717 5 1.132219912e+27 4.628275436e+26 1.012479748e+25 3.761972158e+12 1.012479748e+25 3.761972158e+12 WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) -Loop time of 0.000170205 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000315196 on 4 procs for 5 steps with 4 atoms variable d0 index 20.0 @@ -754,7 +744,6 @@ variable name string wall-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -820,19 +809,18 @@ Neighbor list info ... Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes Step Temp Press KinEng PotEng TotEng c_pe 0 0 0 0 -30.02905654 -30.02905654 0 - 1 144.4114716 59.032354 1.291389498 -31.40065042 -30.10926092 0 - 2 471.9742076 192.9330696 4.220596384 -34.53885647 -30.31826008 0 - 3 784.0772455 320.5141877 7.011556 -37.58109301 -30.56953701 0 - 4 961.8950756 393.2023542 8.601679525 -39.34691775 -30.74523823 0 - 5 996.609681 407.3929504 8.91211246 -39.66353245 -30.75141999 0 -Loop time of 0.000141964 on 4 procs for 5 steps with 4 atoms + 1 146.0893547 59.71823711 1.30639385 -31.40065042 -30.09425657 0 + 2 485.8091411 198.5884977 4.34431431 -34.55987817 -30.21556386 0 + 3 822.0828974 336.0500941 7.351418888 -37.63613582 -30.28471693 0 + 4 1018.806679 416.4666136 9.110607565 -39.39265114 -30.28204357 0 + 5 1050.331347 429.3532307 9.392514704 -39.63687095 -30.24435625 0 +Loop time of 0.000711295 on 4 procs for 5 steps with 4 atoms variable name string table-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -899,14 +887,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 822.1558136 336.0799007 7.352070936 -37.63533573 -30.28326479 0 4 1018.904947 416.5067832 9.111486314 -39.39200056 -30.28051425 0 5 1050.436268 429.3961205 9.393452958 -39.63643565 -30.24298269 0 -Loop time of 0.000146935 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000302153 on 4 procs for 5 steps with 4 atoms variable name string spline-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -973,14 +960,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 822.0828818 336.0500877 7.351418748 -37.63613601 -30.28471726 0 4 1018.80666 416.4666056 9.110607389 -39.39265128 -30.28204389 0 5 1050.331328 429.353223 9.392514534 -39.63687099 -30.24435645 0 -Loop time of 0.000143113 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000295181 on 4 procs for 5 steps with 4 atoms variable name string bond-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -1048,14 +1034,13 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.379 | 4.559 Mbytes 3 822.0828974 1456.368913 7.351418888 2.06858205 9.420000938 1.034291025 4 1018.806679 823.4383177 9.110607565 0.3120667313 9.422674297 0.1560333657 5 1050.331347 253.0262957 9.392514704 0.06784692056 9.460361624 0.03392346028 -Loop time of 0.000130547 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000710295 on 4 procs for 5 steps with 4 atoms variable name string pair-morse include wall.inc clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task read_restart walltest.restart Reading restart file ... @@ -1124,7 +1109,7 @@ Per MPI rank memory allocation (min/avg/max) = 4.32 | 4.38 | 4.56 Mbytes 3 822.0828974 1456.368913 7.351418888 -37.63613582 -30.28471693 -18.81806791 4 1018.806679 823.4383177 9.110607565 -39.39265114 -30.28204357 -19.69632557 5 1050.331347 253.0262957 9.392514704 -39.63687095 -30.24435625 -19.81843547 -Loop time of 0.000136551 on 4 procs for 5 steps with 4 atoms +Loop time of 0.000297435 on 4 procs for 5 steps with 4 atoms shell rm -f walltest.restart diff --git a/src/fix_wall_morse.cpp b/src/fix_wall_morse.cpp index 7ec3ed2ab5..6c5eee885d 100644 --- a/src/fix_wall_morse.cpp +++ b/src/fix_wall_morse.cpp @@ -71,7 +71,7 @@ void FixWallMorse::wall_particle(int m, int which, double coord) } double dr = delta - sigma[m]; double dexp = exp(-alpha[m] * dr); - fwall = side * coeff1[m] * (dexp * dexp - dexp) / delta; + fwall = side * coeff1[m] * (dexp * dexp - dexp); ewall[0] += epsilon[m] * (dexp * dexp - 2.0 * dexp) - offset[m]; f[i][dim] -= fwall; ewall[m + 1] += fwall; From 6b9911dd743f3213b8936a69d392f9e9fdbe6bce Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 23 Feb 2023 15:28:21 -0500 Subject: [PATCH 254/445] update unit test for correct fix wall/morse --- .../tests/fix-timestep-wall_morse_const.yaml | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/unittest/force-styles/tests/fix-timestep-wall_morse_const.yaml b/unittest/force-styles/tests/fix-timestep-wall_morse_const.yaml index 89290d9d7d..391070609f 100644 --- a/unittest/force-styles/tests/fix-timestep-wall_morse_const.yaml +++ b/unittest/force-styles/tests/fix-timestep-wall_morse_const.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 17 Feb 2022 -date_generated: Fri Mar 18 22:18:01 2022 +lammps_version: 8 Feb 2023 +date_generated: Thu Feb 23 15:26:55 2023 epsilon: 4e-14 skip_tests: prerequisites: ! | @@ -15,68 +15,68 @@ post_commands: ! | input_file: in.fourmol natoms: 29 run_stress: ! |2- - 0.0000000000000000e+00 -1.6447328969000660e+03 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -global_scalar: -715.4154062573953 + 0.0000000000000000e+00 -7.4088044731917480e+03 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +global_scalar: -860.4604684981359 global_vector: ! |- - 2 0 -362.76807567062644 + 2 0 -1661.6917920590186 run_pos: ! |2 - 1 -2.7045893790409276e-01 2.5008322800634093e+00 -1.6714018607090519e-01 - 2 3.0963184116147618e-01 3.0014595399936281e+00 -8.5430140686816214e-01 - 3 -7.0384894984747937e-01 1.2309015375308219e+00 -6.2768436035697617e-01 - 4 -1.5818176791640250e+00 1.4837231080448017e+00 -1.2538740983093204e+00 - 5 -9.0718849446796412e-01 9.2653164987898939e-01 3.9954632131545287e-01 - 6 2.4831839235845354e-01 2.8313265654301789e-01 -1.2314236357880461e+00 - 7 3.4143526822589915e-01 -2.2646538152574006e-02 -2.5292291434660381e+00 - 8 1.1743552107695057e+00 -4.8863225989226533e-01 -6.3783434531274807e-01 - 9 1.3800524241606595e+00 -2.5274721157120961e-01 2.8353985893838241e-01 - 10 2.0510765222277745e+00 -1.4604063739388657e+00 -9.8323745091734549e-01 - 11 1.7878031944633563e+00 -1.9921863273237430e+00 -1.8890602447741953e+00 - 12 3.0063007043413612e+00 -4.9013350523119031e-01 -1.6231898109107055e+00 - 13 4.0515402959324174e+00 -8.9202011607291531e-01 -1.6400005529969197e+00 - 14 2.6066963345867493e+00 -4.1789253967796969e-01 -2.6634003609064330e+00 - 15 2.9695287187403183e+00 5.5422613159536682e-01 -1.2342022022307726e+00 - 16 2.6747029696074671e+00 -2.4124119055741526e+00 -2.3435746141560052e-02 - 17 2.2153577786599099e+00 -2.0897985188852957e+00 1.1963150795174466e+00 - 18 2.1369701703250228e+00 3.0158507415756075e+00 -3.5179348336071414e+00 - 19 1.5355837136078994e+00 2.6255292355588757e+00 -4.2353987779851296e+00 - 20 2.7727573003071933e+00 3.6923910440783931e+00 -3.9330842459453148e+00 - 21 4.9040128073837348e+00 -4.0752348170758461e+00 -3.6210314709795308e+00 - 22 4.3582355554510048e+00 -4.2126119427061379e+00 -4.4612844196307497e+00 + 1 -2.7052284503817647e-01 2.5377015779332015e+00 -1.6774875378942034e-01 + 2 3.0838020114212900e-01 3.1365125714942814e+00 -8.5319486865475569e-01 + 3 -7.0337031356085378e-01 1.2321701278769190e+00 -6.2734420450713768e-01 + 4 -1.5818244447736622e+00 1.4836560550089251e+00 -1.2538854411390039e+00 + 5 -9.0715422690957381e-01 9.2657174436972001e-01 3.9956243697054195e-01 + 6 2.4832286843402734e-01 2.8314189926636496e-01 -1.2314248449469583e+00 + 7 3.4143523635211903e-01 -2.2646489955513913e-02 -2.5292291519080385e+00 + 8 1.1743551641371968e+00 -4.8863216431954298e-01 -6.3783440815706915e-01 + 9 1.3800524287137592e+00 -2.5274721633920649e-01 2.8353985915157709e-01 + 10 2.0510765228876604e+00 -1.4604063735798947e+00 -9.8323745129680751e-01 + 11 1.7878031945360704e+00 -1.9921863274327181e+00 -1.8890602448178007e+00 + 12 3.0063007058665141e+00 -4.9013350620738022e-01 -1.6231898115581911e+00 + 13 4.0515402959817353e+00 -8.9202011609685838e-01 -1.6400005530136157e+00 + 14 2.6066963347079004e+00 -4.1789253976309604e-01 -2.6634003610076054e+00 + 15 2.9695287193709681e+00 5.5422613138408361e-01 -1.2342022024260366e+00 + 16 2.6747029699261105e+00 -2.4124119060177067e+00 -2.3435746107727345e-02 + 17 2.2153577791583658e+00 -2.0897985196245372e+00 1.1963150797810624e+00 + 18 2.1369701700141044e+00 3.0158507424085670e+00 -3.5179348331855556e+00 + 19 1.5355837136077577e+00 2.6255292356409377e+00 -4.2353987779789071e+00 + 20 2.7727573002707873e+00 3.6923910441005812e+00 -3.9330842458985629e+00 + 21 4.9040128073837366e+00 -4.0752348170758461e+00 -3.6210314709795313e+00 + 22 4.3582355554510057e+00 -4.2126119427061379e+00 -4.4612844196307497e+00 23 5.7439382849366911e+00 -3.5821957939240279e+00 -3.8766361295959513e+00 - 24 2.0689243581498653e+00 3.1513346909599651e+00 3.1550389753492256e+00 - 25 1.3045351329547377e+00 3.2665125707112610e+00 2.5111855254067215e+00 - 26 2.5809237402542604e+00 4.0117602605530056e+00 3.2212060528871826e+00 - 27 -1.9611343130419832e+00 -4.3563411931577498e+00 2.1098293115609912e+00 - 28 -2.7473562684536628e+00 -4.0200819932434282e+00 1.5830052163452875e+00 - 29 -1.3126000191369560e+00 -3.5962518039526832e+00 2.2746342468757565e+00 + 24 2.0689243578022922e+00 3.1513346918494771e+00 3.1550389748497025e+00 + 25 1.3045351322134413e+00 3.2665125712054777e+00 2.5111855241267289e+00 + 26 2.5809237401898266e+00 4.0117602605713625e+00 3.2212060528040980e+00 + 27 -1.9611343130657364e+00 -4.3563411932404206e+00 2.1098293115936815e+00 + 28 -2.7473562684585944e+00 -4.0200819932554426e+00 1.5830052163493729e+00 + 29 -1.3126000191406215e+00 -3.5962518039692939e+00 2.2746342468831999e+00 run_vel: ! |2 - 1 8.1789148947012790e-03 2.6011139448739451e-02 4.4419168461127482e-03 - 2 4.6260716342741079e-03 4.5085766258259774e-02 -7.0825186386967308e-04 - 3 -7.9721954985889319e-03 -1.2268783977531032e-02 -3.9361845956729386e-03 - 4 -3.7725559552080636e-03 -6.6074130975376346e-03 -1.1239964478779332e-03 - 5 -1.1002605235858455e-02 -9.8680015994752728e-03 -2.8327888280266942e-03 - 6 -3.9674547907414821e-02 4.6822592792817204e-02 3.7148318739351066e-02 - 7 9.1031746047128470e-04 -1.0128481892033168e-02 -5.1568253048218646e-02 - 8 7.9064457287878788e-03 -3.3506582863990068e-03 3.4557045247921400e-02 - 9 1.5644208034781776e-03 3.7365512668284797e-03 1.5047408581112285e-02 - 10 2.9201446942760539e-02 -2.9249577856792598e-02 -1.5018077696249433e-02 - 11 -4.7835960986765723e-03 -3.7481385797508478e-03 -2.3464104367979396e-03 - 12 2.2696460154049596e-03 -3.4774207770823769e-04 -3.0640773817331617e-03 - 13 2.7531740760828424e-03 5.8171061464595821e-03 -7.9467455065097717e-04 - 14 3.5246183046552903e-03 -5.7939996060507011e-03 -3.9478431727489067e-03 - 15 -1.8547940192371359e-03 -5.8554731130000919e-03 6.2938484079631211e-03 - 16 1.8681500141579217e-02 -1.3262466439236464e-02 -4.5638651434422119e-02 - 17 -1.2896269711984213e-02 9.7527661294105131e-03 3.7296535503389051e-02 - 18 -8.0065813058176056e-04 -8.6270429918499042e-04 -1.4483038312432231e-03 - 19 1.2452390823893668e-03 -2.5061096678311726e-03 7.2998631081901150e-03 - 20 3.5930057672106052e-03 3.6938851692874418e-03 3.2322732421069351e-03 - 21 -1.4689219756942099e-03 -2.7352107824552571e-04 7.0581625180796419e-04 - 22 -7.0694199165143787e-03 -4.2577148692717762e-03 2.8079117911313845e-04 - 23 6.0446963236686149e-03 -1.4000131545098178e-03 2.5819754799379282e-03 - 24 3.1926349353317952e-04 -9.9445617038915342e-04 1.4999970019575790e-04 - 25 1.3789715718110098e-04 -4.4335892217948255e-03 -8.1808204442383866e-04 - 26 2.0485903705729164e-03 2.7813358762743667e-03 4.3245726703719217e-03 - 27 4.5604119012943235e-04 -1.0305523473710114e-03 2.1188060159221209e-04 - 28 -6.2544520902254328e-03 1.4127711077263102e-03 -1.8429821850450522e-03 - 29 6.4110631319827462e-04 3.1273432626741622e-03 3.7253671146110553e-03 + 1 8.1150399525879938e-03 6.2469278935841172e-02 3.3151656604757515e-03 + 2 2.1567380411534119e-03 1.7915358216757693e-01 1.4693442192945936e-03 + 3 -7.1017845324814833e-03 -9.9511431531007291e-03 -3.3513817570289613e-03 + 4 -3.7830796561061893e-03 -6.7399523607674736e-03 -1.1446225458905915e-03 + 5 -1.0930964471138178e-02 -9.7830218971492900e-03 -2.8011654927760140e-03 + 6 -3.9666631417159662e-02 4.6843374202377414e-02 3.7147439358181544e-02 + 7 9.1023281310935661e-04 -1.0128325648562678e-02 -5.1568260731589974e-02 + 8 7.9063456532381289e-03 -3.3504119308433618e-03 3.4556841455369552e-02 + 9 1.5644327139035345e-03 3.7365387627339643e-03 1.5047407499366916e-02 + 10 2.9201447428873879e-02 -2.9249574477797566e-02 -1.5018078715987209e-02 + 11 -4.7835958975253005e-03 -3.7481388302490464e-03 -2.3464105205019963e-03 + 12 2.2696491096390347e-03 -3.4774406295422266e-04 -3.0640786872695716e-03 + 13 2.7531741917975823e-03 5.8171060908898987e-03 -7.9467458985718424e-04 + 14 3.5246185557631796e-03 -5.7939997826183271e-03 -3.9478433795418670e-03 + 15 -1.8547927399342281e-03 -5.8554735533316513e-03 6.2938480095073527e-03 + 16 1.8681500769926061e-02 -1.3262467318026393e-02 -4.5638651349980318e-02 + 17 -1.2896268698689695e-02 9.7527646273574461e-03 3.7296536040864851e-02 + 18 -8.0065877706055109e-04 -8.6270259764277839e-04 -1.4483029635571510e-03 + 19 1.2452390851199488e-03 -2.5061094984920639e-03 7.2998631241499162e-03 + 20 3.5930056948307956e-03 3.6938852174526323e-03 3.2322733371807980e-03 + 21 -1.4689219756868180e-03 -2.7352107824634250e-04 7.0581625180429135e-04 + 22 -7.0694199165138548e-03 -4.2577148692718603e-03 2.8079117911282870e-04 + 23 6.0446963236688717e-03 -1.4000131545096391e-03 2.5819754799378150e-03 + 24 3.1926280192234435e-04 -9.9445434351455022e-04 1.4999870519578711e-04 + 25 1.3789568252928821e-04 -4.4335881727435517e-03 -8.1808460956663540e-04 + 26 2.0485902447450752e-03 2.7813359267364313e-03 4.3245725007170490e-03 + 27 4.5604114182182037e-04 -1.0305525160278991e-03 2.1188066858079724e-04 + 28 -6.2544520979275183e-03 1.4127710874880792e-03 -1.8429821780491747e-03 + 29 6.4110630514945563e-04 3.1273432277213126e-03 3.7253671297833627e-03 ... From 2d4f2532ae0604393cddf566a564dbbce0d3ea26 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Thu, 23 Feb 2023 14:58:59 -0700 Subject: [PATCH 255/445] Allow fix_deform/kk to use rigid bodies --- src/KOKKOS/fix_deform_kokkos.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/KOKKOS/fix_deform_kokkos.cpp b/src/KOKKOS/fix_deform_kokkos.cpp index cdfbeb1a60..d49e335986 100644 --- a/src/KOKKOS/fix_deform_kokkos.cpp +++ b/src/KOKKOS/fix_deform_kokkos.cpp @@ -315,14 +315,13 @@ void FixDeformKokkos::end_of_step() int nlocal = atom->nlocal; domainKK->x2lamda(nlocal); - //for (i = 0; i < nlocal; i++) - // if (mask[i] & groupbit) - // domain->x2lamda(x[i],x[i]); - if (rfix.size() > 0) - error->all(FLERR,"Cannot (yet) use rigid bodies with fix deform and Kokkos"); - //for (i = 0; i < nrigid; i++) - // modify->fix[rfix[i]]->deform(0); + if (rfix.size() > 0) { + atomKK->sync(Host,ALL_MASK); + for (auto &ifix : rfix) + ifix->deform(0); + atomKK->modified(Host,ALL_MASK); + } } // reset global and local box to new size/shape @@ -355,13 +354,13 @@ void FixDeformKokkos::end_of_step() int nlocal = atom->nlocal; domainKK->lamda2x(nlocal); - //for (i = 0; i < nlocal; i++) - // if (mask[i] & groupbit) - // domain->lamda2x(x[i],x[i]); - //if (nrigid) - // for (i = 0; i < nrigid; i++) - // modify->fix[rfix[i]]->deform(1); + if (rfix.size() > 0) { + atomKK->sync(Host,ALL_MASK); + for (auto &ifix : rfix) + ifix->deform(1); + atomKK->modified(Host,ALL_MASK); + } } // redo KSpace coeffs since box has changed From e61092464143452d5149e0fb005910c78533c301 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 24 Feb 2023 08:48:40 +0200 Subject: [PATCH 256/445] Include method declaration in dihedral_opls.h --- src/MOLECULE/dihedral_opls.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/dihedral_opls.h b/src/MOLECULE/dihedral_opls.h index c6286b3b6f..82180cf323 100644 --- a/src/MOLECULE/dihedral_opls.h +++ b/src/MOLECULE/dihedral_opls.h @@ -33,6 +33,7 @@ class DihedralOPLS : public Dihedral { void write_restart(FILE *) override; void read_restart(FILE *) override; void write_data(FILE *) override; + void born_matrix(int, int, int, int, int, double &, double &) override; protected: double *k1, *k2, *k3, *k4; From c35b32961b28b1509643b7c905c7c049aca13391 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 24 Feb 2023 08:51:25 +0200 Subject: [PATCH 257/445] Implement born_matrix in dihedral_opls.cpp --- src/MOLECULE/dihedral_opls.cpp | 99 ++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/src/MOLECULE/dihedral_opls.cpp b/src/MOLECULE/dihedral_opls.cpp index af34cd24db..eced454d68 100644 --- a/src/MOLECULE/dihedral_opls.cpp +++ b/src/MOLECULE/dihedral_opls.cpp @@ -37,6 +37,7 @@ static constexpr double SMALLER = 0.00001; DihedralOPLS::DihedralOPLS(LAMMPS *_lmp) : Dihedral(_lmp) { writedata = 1; + born_matrix_enable = 1; } /* ---------------------------------------------------------------------- */ @@ -332,3 +333,101 @@ void DihedralOPLS::write_data(FILE *fp) for (int i = 1; i <= atom->ndihedraltypes; i++) fprintf(fp, "%d %g %g %g %g\n", i, 2.0 * k1[i], 2.0 * k2[i], 2.0 * k3[i], 2.0 * k4[i]); } + +/* ----------------------------------------------------------------------*/ + +void DihedralOPLS::born_matrix(int nd, int i1, int i2, int i3, int i4, + double &du, double &du2) +{ + double vb1x, vb1y, vb1z, vb2x, vb2y, vb2z, vb3x, vb3y, vb3z, vb2xm, vb2ym, vb2zm; + double sb1, sb3, rb1, rb3, c0, b1mag2, b1mag, b2mag2; + double b2mag, b3mag2, b3mag, ctmp, r12c1, c1mag, r12c2; + double c2mag, sc1, sc2, s12, c; + double cx, cy, cz, cmag, dx, phi, si, sin2; + + double **x = atom->x; + int **dihedrallist = neighbor->dihedrallist; + + int type = dihedrallist[nd][4]; + + // 1st bond + vb1x = x[i1][0] - x[i2][0]; + vb1y = x[i1][1] - x[i2][1]; + vb1z = x[i1][2] - x[i2][2]; + + // 2nd bond + vb2x = x[i3][0] - x[i2][0]; + vb2y = x[i3][1] - x[i2][1]; + vb2z = x[i3][2] - x[i2][2]; + + vb2xm = -vb2x; + vb2ym = -vb2y; + vb2zm = -vb2z; + + // 3rd bond + vb3x = x[i4][0] - x[i3][0]; + vb3y = x[i4][1] - x[i3][1]; + vb3z = x[i4][2] - x[i3][2]; + + // c0 calculation + sb1 = 1.0 / (vb1x * vb1x + vb1y * vb1y + vb1z * vb1z); + sb3 = 1.0 / (vb3x * vb3x + vb3y * vb3y + vb3z * vb3z); + + rb1 = sqrt(sb1); + rb3 = sqrt(sb3); + + c0 = (vb1x * vb3x + vb1y * vb3y + vb1z * vb3z) * rb1 * rb3; + + // 1st and 2nd angle + b1mag2 = vb1x * vb1x + vb1y * vb1y + vb1z * vb1z; + b1mag = sqrt(b1mag2); + b2mag2 = vb2x * vb2x + vb2y * vb2y + vb2z * vb2z; + b2mag = sqrt(b2mag2); + b3mag2 = vb3x * vb3x + vb3y * vb3y + vb3z * vb3z; + b3mag = sqrt(b3mag2); + + ctmp = vb1x * vb2x + vb1y * vb2y + vb1z * vb2z; + r12c1 = 1.0 / (b1mag * b2mag); + c1mag = ctmp * r12c1; + + ctmp = vb2xm * vb3x + vb2ym * vb3y + vb2zm * vb3z; + r12c2 = 1.0 / (b2mag * b3mag); + c2mag = ctmp * r12c2; + + // cos and sin of 2 angles and final c + sin2 = MAX(1.0 - c1mag * c1mag, 0.0); + sc1 = sqrt(sin2); + if (sc1 < SMALL) sc1 = SMALL; + sc1 = 1.0 / sc1; + + sin2 = MAX(1.0 - c2mag * c2mag, 0.0); + sc2 = sqrt(sin2); + if (sc2 < SMALL) sc2 = SMALL; + sc2 = 1.0 / sc2; + + s12 = sc1 * sc2; + c = (c0 + c1mag * c2mag) * s12; + + cx = vb1y * vb2z - vb1z * vb2y; + cy = vb1z * vb2x - vb1x * vb2z; + cz = vb1x * vb2y - vb1y * vb2x; + cmag = sqrt(cx * cx + cy * cy + cz * cz); + dx = (cx * vb3x + cy * vb3y + cz * vb3z) / cmag / b3mag; + + // error check + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) problem(FLERR, i1, i2, i3, i4); + + if (c > 1.0) c = 1.0; + if (c < -1.0) c = -1.0; + + phi = acos(c); + if (dx < 0.0) phi *= -1.0; + si = sin(phi); + if (fabs(si) < SMALLER) si = SMALLER; + + du = k1[type] - 2.0 * k2[type] * sin(2.0 * phi) / si + 3.0 * k3[type] * sin(3.0 * phi) / si + - 4.0 * k4[type] * sin(4.0 * phi) / si; + du2 = (4.0 * k2[type] * si * cos(2.0 * phi) - 2.0 * k2[type] * sin(2.0 * phi) + - 9.0 * k3[type] * si * cos(3.0 * phi) + 3.0 * k3[type] * sin(3.0 * phi) + + 16.0 * k4[type] * si * cos(4.0 * phi) - 4.0 * k4[type] * sin(4.0 * phi)) / (si * si * si); +} From c4bf0f0ab52eec3ee8734a0455e8c3c4b14250e8 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 24 Feb 2023 09:39:38 +0200 Subject: [PATCH 258/445] Include method declaration in dihedral_multi_harmonic.h --- src/MOLECULE/dihedral_multi_harmonic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/dihedral_multi_harmonic.h b/src/MOLECULE/dihedral_multi_harmonic.h index 4780028181..45f1112b4f 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.h +++ b/src/MOLECULE/dihedral_multi_harmonic.h @@ -33,6 +33,7 @@ class DihedralMultiHarmonic : public Dihedral { void write_restart(FILE *) override; void read_restart(FILE *) override; void write_data(FILE *) override; + void born_matrix(int, int, int, int, int, double &, double &) override; protected: double *a1, *a2, *a3, *a4, *a5; From 3ea04477157e66514031af4831e3014398fd467f Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 24 Feb 2023 09:41:52 +0200 Subject: [PATCH 259/445] Implement born_matrix in dihedral_multi_harmonic.cpp --- src/MOLECULE/dihedral_multi_harmonic.cpp | 85 ++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/src/MOLECULE/dihedral_multi_harmonic.cpp b/src/MOLECULE/dihedral_multi_harmonic.cpp index 11213b59cd..8e6685cac9 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.cpp +++ b/src/MOLECULE/dihedral_multi_harmonic.cpp @@ -36,6 +36,7 @@ static constexpr double SMALL = 0.001; DihedralMultiHarmonic::DihedralMultiHarmonic(LAMMPS *_lmp) : Dihedral(_lmp) { writedata = 1; + born_matrix_enable = 1; } /* ---------------------------------------------------------------------- */ @@ -322,3 +323,87 @@ void DihedralMultiHarmonic::write_data(FILE *fp) for (int i = 1; i <= atom->ndihedraltypes; i++) fprintf(fp, "%d %g %g %g %g %g\n", i, a1[i], a2[i], a3[i], a4[i], a5[i]); } + +/* ---------------------------------------------------------------------- */ + +void DihedralMultiHarmonic::born_matrix(int nd, int i1, int i2, int i3, int i4, + double &du, double &du2) +{ + double vb1x, vb1y, vb1z, vb2x, vb2y, vb2z, vb3x, vb3y, vb3z, vb2xm, vb2ym, vb2zm; + double sb1, sb3, rb1, rb3, c0, b1mag2, b1mag, b2mag2; + double b2mag, b3mag2, b3mag, ctmp, r12c1, c1mag, r12c2; + double c2mag, sc1, sc2, s12, c; + double sin2; + + double **x = atom->x; + int **dihedrallist = neighbor->dihedrallist; + + int type = dihedrallist[nd][4]; + + // 1st bond + vb1x = x[i1][0] - x[i2][0]; + vb1y = x[i1][1] - x[i2][1]; + vb1z = x[i1][2] - x[i2][2]; + + // 2nd bond + vb2x = x[i3][0] - x[i2][0]; + vb2y = x[i3][1] - x[i2][1]; + vb2z = x[i3][2] - x[i2][2]; + + vb2xm = -vb2x; + vb2ym = -vb2y; + vb2zm = -vb2z; + + // 3rd bond + vb3x = x[i4][0] - x[i3][0]; + vb3y = x[i4][1] - x[i3][1]; + vb3z = x[i4][2] - x[i3][2]; + + // c0 calculation + sb1 = 1.0 / (vb1x * vb1x + vb1y * vb1y + vb1z * vb1z); + sb3 = 1.0 / (vb3x * vb3x + vb3y * vb3y + vb3z * vb3z); + + rb1 = sqrt(sb1); + rb3 = sqrt(sb3); + + c0 = (vb1x * vb3x + vb1y * vb3y + vb1z * vb3z) * rb1 * rb3; + + // 1st and 2nd angle + b1mag2 = vb1x * vb1x + vb1y * vb1y + vb1z * vb1z; + b1mag = sqrt(b1mag2); + b2mag2 = vb2x * vb2x + vb2y * vb2y + vb2z * vb2z; + b2mag = sqrt(b2mag2); + b3mag2 = vb3x * vb3x + vb3y * vb3y + vb3z * vb3z; + b3mag = sqrt(b3mag2); + + ctmp = vb1x * vb2x + vb1y * vb2y + vb1z * vb2z; + r12c1 = 1.0 / (b1mag * b2mag); + c1mag = ctmp * r12c1; + + ctmp = vb2xm * vb3x + vb2ym * vb3y + vb2zm * vb3z; + r12c2 = 1.0 / (b2mag * b3mag); + c2mag = ctmp * r12c2; + + // cos and sin of 2 angles and final c + sin2 = MAX(1.0 - c1mag * c1mag, 0.0); + sc1 = sqrt(sin2); + if (sc1 < SMALL) sc1 = SMALL; + sc1 = 1.0 / sc1; + + sin2 = MAX(1.0 - c2mag * c2mag, 0.0); + sc2 = sqrt(sin2); + if (sc2 < SMALL) sc2 = SMALL; + sc2 = 1.0 / sc2; + + s12 = sc1 * sc2; + c = (c0 + c1mag * c2mag) * s12; + + // error check + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) problem(FLERR, i1, i2, i3, i4); + + if (c > 1.0) c = 1.0; + if (c < -1.0) c = -1.0; + + du = a2[type] + c * (2.0 * a3[type] + c * (3.0 * a4[type] + c * 4.0 * a5[type])); + du2 = 2.0 * a3[type] + 6.0 * c * (a4[type] + 2.0 * a5[type] * c); +} From 885c4d76093435b0bcf8caa1515ec9f85cf439c6 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 24 Feb 2023 11:56:22 +0200 Subject: [PATCH 260/445] Include method declaration in bond_fene_nm.h --- src/EXTRA-MOLECULE/bond_fene_nm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-MOLECULE/bond_fene_nm.h b/src/EXTRA-MOLECULE/bond_fene_nm.h index 07da20e425..4e9899648b 100644 --- a/src/EXTRA-MOLECULE/bond_fene_nm.h +++ b/src/EXTRA-MOLECULE/bond_fene_nm.h @@ -35,6 +35,7 @@ class BondFENENM : public BondFENE { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, double, int, int, double &) override; + void born_matrix(int, double, int, int, double &, double &) override; void *extract(const char *, int &) override; protected: From a32440cdef5f90ea1daa812394304c640d2e9193 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 24 Feb 2023 11:58:42 +0200 Subject: [PATCH 261/445] Implement born_matrix in bond_fene_nm.cpp --- src/EXTRA-MOLECULE/bond_fene_nm.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/EXTRA-MOLECULE/bond_fene_nm.cpp b/src/EXTRA-MOLECULE/bond_fene_nm.cpp index 5451479881..59f60379bd 100644 --- a/src/EXTRA-MOLECULE/bond_fene_nm.cpp +++ b/src/EXTRA-MOLECULE/bond_fene_nm.cpp @@ -28,7 +28,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -BondFENENM::BondFENENM(LAMMPS *lmp) : BondFENE(lmp), nn(nullptr), mm(nullptr) {} +BondFENENM::BondFENENM(LAMMPS *lmp) : BondFENE(lmp), nn(nullptr), mm(nullptr) +{ + born_matrix_enable = 1; +} /* ---------------------------------------------------------------------- */ @@ -270,6 +273,27 @@ double BondFENENM::single(int type, double rsq, int /*i*/, int /*j*/, double &ff /* ---------------------------------------------------------------------- */ +void BondFENENM::born_matrix(int type, double rsq, int /*i*/, int /*j*/, double &du, double &du2) +{ + double r = sqrt(rsq); + double r0sq = r0[type] * r0[type]; + double rlogarg = 1.0 - rsq / r0sq; + + // Contribution from the attractive term + du = k[type] * r / rlogarg; + du2 = k[type] * (1.0 + rsq / r0sq) / (rlogarg * rlogarg); + + // Contribution from the repulsive Lennard-Jones term + if (rsq < sigma[type] * sigma[type]) { + double prefactor = epsilon[type] * nn[type] * mm[type] / (nn[type] - mm[type]); + du += prefactor * (pow(sigma[type] / r, mm[type]) - pow(sigma[type] / r, nn[type])) / r; + du2 += prefactor * ((nn[type] + 1.0) * pow(sigma[type] / r, nn[type]) - + (mm[type] + 1.0) * pow(sigma[type] / r, mm[type])) / rsq; + } +} + +/* ---------------------------------------------------------------------- */ + void *BondFENENM::extract(const char *str, int &dim) { dim = 1; From f264631267fc8bd170b3c32f0a70fc8c870c4012 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 24 Feb 2023 12:24:45 +0200 Subject: [PATCH 262/445] Include method declaration in pair_nm_cut.h --- src/EXTRA-PAIR/pair_nm_cut.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-PAIR/pair_nm_cut.h b/src/EXTRA-PAIR/pair_nm_cut.h index ab91747252..a9a800af23 100644 --- a/src/EXTRA-PAIR/pair_nm_cut.h +++ b/src/EXTRA-PAIR/pair_nm_cut.h @@ -40,6 +40,7 @@ class PairNMCut : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void *extract(const char *, int &) override; protected: From 8ba61e11a24b94929fe68b22585245d078aa0d84 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 24 Feb 2023 12:25:55 +0200 Subject: [PATCH 263/445] Implement born_matrix in pair_nm_cut.cpp --- src/EXTRA-PAIR/pair_nm_cut.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/EXTRA-PAIR/pair_nm_cut.cpp b/src/EXTRA-PAIR/pair_nm_cut.cpp index 18b5810abc..3156ec224d 100644 --- a/src/EXTRA-PAIR/pair_nm_cut.cpp +++ b/src/EXTRA-PAIR/pair_nm_cut.cpp @@ -36,6 +36,7 @@ using namespace MathConst; PairNMCut::PairNMCut(LAMMPS *lmp) : Pair(lmp) { + born_matrix_enable = 1; writedata = 1; } @@ -416,6 +417,25 @@ double PairNMCut::single(int /*i*/, int /*j*/, int itype, int jtype, /* ---------------------------------------------------------------------- */ +void PairNMCut::born_matrix(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double factor_lj, double &dupair, + double &du2pair) +{ + double r = sqrt(rsq); + double prefactor = e0nm[itype][jtype]*nm[itype][jtype]; + + double du = prefactor * + (r0m[itype][jtype]/pow(r,mm[itype][jtype]) - r0n[itype][jtype]/pow(r,nn[itype][jtype])) / r; + double du2 = prefactor * + (r0n[itype][jtype]*(nn[itype][jtype] + 1.0) / pow(r,nn[itype][jtype]) - + r0m[itype][jtype]*(mm[itype][jtype] + 1.0) / pow(r,mm[itype][jtype])) / rsq; + + dupair = factor_lj * du; + du2pair = factor_lj * du2; +} + +/* ---------------------------------------------------------------------- */ + void *PairNMCut::extract(const char *str, int &dim) { dim = 2; From d831562e1fb3f45dce34ecf79c5347b1e8fb8ca9 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Fri, 24 Feb 2023 12:27:53 +0200 Subject: [PATCH 264/445] Fixing typo in equation for fene/nm --- doc/src/bond_fene.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/bond_fene.rst b/doc/src/bond_fene.rst index be7775489a..24b3a4e1e2 100644 --- a/doc/src/bond_fene.rst +++ b/doc/src/bond_fene.rst @@ -51,7 +51,7 @@ in the same form as in pair style :doc:`nm/cut `. The bond energy is th .. math:: - E = -0.5 K r_0^2 \ln \left[ 1 - \left(\frac{r}{R_0}\right)^2\right] + \frac{E_0}{(n-m)} \left[ m \left(\frac{r_0}{r}\right)^n - n \left(\frac{r_0}{r}\right)^m \right] + E = -0.5 K R_0^2 \ln \left[ 1 - \left(\frac{r}{R_0}\right)^2\right] + \frac{E_0}{(n-m)} \left[ m \left(\frac{r_0}{r}\right)^n - n \left(\frac{r_0}{r}\right)^m \right] Similar to the *fene* style, the generalized Lennard-Jones is cut off at the potential minimum, :math:`r_0`, to be repulsive only. The following From ed822f8002d0438d751f668f1b7707dbb572750a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 Feb 2023 15:41:04 -0500 Subject: [PATCH 265/445] WIP --- examples/PACKAGES/alchemy/h2o.mol | 62 ++++++++++++ examples/PACKAGES/alchemy/h3o+.mol | 39 ++++++++ examples/PACKAGES/alchemy/in.twowater | 53 ++++++++++ examples/PACKAGES/alchemy/oh-.mol | 24 +++++ src/REPLICA/fix_alchemy.cpp | 134 ++++++++++++++++++++++++++ src/REPLICA/fix_alchemy.h | 49 ++++++++++ 6 files changed, 361 insertions(+) create mode 100644 examples/PACKAGES/alchemy/h2o.mol create mode 100644 examples/PACKAGES/alchemy/h3o+.mol create mode 100644 examples/PACKAGES/alchemy/in.twowater create mode 100644 examples/PACKAGES/alchemy/oh-.mol create mode 100644 src/REPLICA/fix_alchemy.cpp create mode 100644 src/REPLICA/fix_alchemy.h diff --git a/examples/PACKAGES/alchemy/h2o.mol b/examples/PACKAGES/alchemy/h2o.mol new file mode 100644 index 0000000000..e5a5e4fe93 --- /dev/null +++ b/examples/PACKAGES/alchemy/h2o.mol @@ -0,0 +1,62 @@ +# Water molecule. SPC/E model. + +3 atoms +2 bonds +1 angles + +Coords + +1 1.12456 0.09298 1.27452 +2 1.53683 0.75606 1.89928 +3 0.49482 0.56390 0.65678 + +Types + +1 1 +2 2 +3 2 + +Charges + +1 -0.8472 +2 0.4236 +3 0.4236 + +Bonds + +1 1 1 2 +2 1 1 3 + +Angles + +1 1 2 1 3 + +Shake Flags + +1 1 +2 1 +3 1 + +Shake Atoms + +1 1 2 3 +2 1 2 3 +3 1 2 3 + +Shake Bond Types + +1 1 1 1 +2 1 1 1 +3 1 1 1 + +Special Bond Counts + +1 2 0 0 +2 1 1 0 +3 1 1 0 + +Special Bonds + +1 2 3 +2 1 3 +3 1 2 diff --git a/examples/PACKAGES/alchemy/h3o+.mol b/examples/PACKAGES/alchemy/h3o+.mol new file mode 100644 index 0000000000..699438e7a4 --- /dev/null +++ b/examples/PACKAGES/alchemy/h3o+.mol @@ -0,0 +1,39 @@ +# Hydronium ion. SPC/E model. + +4 atoms +3 bonds +3 angles + +Coords + +1 0.00000 1.00000 0.00000 +2 0.00000 0.00000 0.00000 +3 0.00000 -0.50000 -0.8660 +4 0.00000 -0.50000 0.8660 + +Types + +1 2 +2 1 +3 2 +4 2 + +Charges + +1 0.56775 +2 -0.70305 +3 0.56775 +4 0.56775 + +Bonds + +1 1 2 1 +2 1 2 3 +3 1 2 4 + +Angles + +1 1 1 2 3 +1 1 3 2 4 +1 1 1 2 4 + diff --git a/examples/PACKAGES/alchemy/in.twowater b/examples/PACKAGES/alchemy/in.twowater new file mode 100644 index 0000000000..62e0dacd60 --- /dev/null +++ b/examples/PACKAGES/alchemy/in.twowater @@ -0,0 +1,53 @@ +# set up names for two partitions with different topologies +variable name world twowater twoions + +units real +atom_style full +atom_modify map array +region box block -10 10 -10 10 -10 10 +boundary m m m +create_box 2 box bond/types 1 angle/types 1 & + extra/bond/per/atom 3 extra/angle/per/atom 3 extra/special/per/atom 3 + +mass 1 15.9994 +mass 2 1.008 + +pair_style lj/cut/coul/cut 10.0 +pair_coeff 1 1 0.1553 3.166 +pair_coeff 1 2 0.0 1.0 +pair_coeff 2 2 0.0 1.0 + +bond_style harmonic +bond_coeff 1 1000.0 1.0 + +angle_style harmonic +angle_coeff 1 100.0 109.47 + +molecule water h2o.mol +molecule hydronium h3o+.mol +molecule hydroxyl oh-.mol + + +timestep 0.1 + +# generate different topologies with the same number of atoms +if "${name} == twowater" then & + "create_atoms 0 single -2.0 0.0 0.0 mol water 453624" & + "create_atoms 0 single 2.0 0.0 0.0 mol water 767353" & +else & + "create_atoms 0 single 2.0 0.0 0.0 mol hydroxyl 767353" & + "create_atoms 0 single -2.0 0.0 0.0 mol hydronium 453624" + +velocity all create 100 5463576 + +fix 1 all nve +fix 2 all alchemy + +dump 1 all atom 100 ${name}.lammpstrj +dump_modify 1 sort id + +thermo_style custom step temp press etotal pe ke f_2[*] +thermo 100 + +reset_timestep 100 +run 10000 start 0 stop 20000 diff --git a/examples/PACKAGES/alchemy/oh-.mol b/examples/PACKAGES/alchemy/oh-.mol new file mode 100644 index 0000000000..782d1fa88f --- /dev/null +++ b/examples/PACKAGES/alchemy/oh-.mol @@ -0,0 +1,24 @@ +# Hydroxyl ion. SPC/E model. + +2 atoms +1 bonds + +Coords + +1 0.5 0.0 0.0 +2 -0.5 0.0 0.0 + +Types + +1 1 +2 2 + +Charges + +1 -1.1354 +2 0.1354 + +Bonds + +1 1 1 2 + diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp new file mode 100644 index 0000000000..da10f8261f --- /dev/null +++ b/src/REPLICA/fix_alchemy.cpp @@ -0,0 +1,134 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "fix_alchemy.h" + +#include "atom.h" +#include "comm.h" +#include "error.h" +#include "memory.h" +#include "universe.h" +#include "update.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +static double get_lambda(const bigint &step, const bigint &begin, const bigint &end, int iworld) +{ + double lambda = step - begin; + if (lambda != 0.0) lambda /= end - begin; + if (iworld == 0) lambda = 1.0 - lambda; + return lambda; +} + +/* ---------------------------------------------------------------------- */ + +FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), coordbuf(nullptr) +{ + lambda = epot[0] = epot[1] = 0.0; + + no_change_box = 1; + vector_flag = 1; + size_vector = 3; + extvector = 0; + + // set up communicators + if (universe->nworlds != 2) error->all(FLERR, "Must use exactly two partitions"); + int color = comm->me; + int key = universe->iworld; + MPI_Comm_split(universe->uworld, color, key, &samerank); + + if (narg != 3) error->all(FLERR, "Incorrect number of arguments for fix alchemy"); +} + +/* ---------------------------------------------------------------------- */ + +FixAlchemy::~FixAlchemy() +{ + MPI_Comm_free(&samerank); +} + +/* ---------------------------------------------------------------------- */ + +int FixAlchemy::setmask() +{ + int mask = 0; + mask |= POST_INTEGRATE; + mask |= POST_FORCE; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixAlchemy::init() {} + +/* ---------------------------------------------------------------------- */ + +void FixAlchemy::setup(int /*vflag*/) +{ + const int nall = atom->nlocal; + const auto tag = atom->tag; + const auto x = atom->x; + + memory->destroy(coordbuf); + memory->create(coordbuf, 4 * sizeof(double) * nall, "alchemy:coordbuf"); + + if (universe->iworld == 0) { + int m = 0; + for (int i = 0; i < nall; ++i) { + coordbuf[m++] = ubuf(tag[i]).d; + coordbuf[m++] = x[i][0]; + coordbuf[m++] = x[i][1]; + coordbuf[m++] = x[i][2]; + } + } + + MPI_Bcast(coordbuf, 4 * nall, MPI_DOUBLE, 0, samerank); + + if (universe->iworld == 1) { + int m = 0; + for (int i = 0; i < nall; ++i) { + tagint mytag = (tagint) ubuf(coordbuf[m++]).i; + x[atom->map(mytag)][0] = coordbuf[m++]; + x[atom->map(mytag)][1] = coordbuf[m++]; + x[atom->map(mytag)][2] = coordbuf[m++]; + } + } + + lambda = get_lambda(update->ntimestep, update->beginstep, update->endstep, universe->iworld); +} + +/* ---------------------------------------------------------------------- */ + +void FixAlchemy::post_integrate() +{ + int nall = 3 * (atom->nlocal + atom->nghost); + // MPI_Bcast(&atom->x[0][0], nall, MPI_DOUBLE, 0, samerank); +} + +/* ---------------------------------------------------------------------- */ + +void FixAlchemy::post_force(int /*vflag*/) +{ + lambda = get_lambda(update->ntimestep, update->beginstep, update->endstep, universe->iworld); +} + +/* ---------------------------------------------------------------------- */ + +double FixAlchemy::compute_vector(int n) +{ + if (n == 0) return lambda; + return epot[n - 1]; +} diff --git a/src/REPLICA/fix_alchemy.h b/src/REPLICA/fix_alchemy.h new file mode 100644 index 0000000000..2c48b5b4e7 --- /dev/null +++ b/src/REPLICA/fix_alchemy.h @@ -0,0 +1,49 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS +// clang-format off +FixStyle(alchemy,FixAlchemy); +// clang-format on +#else + +#ifndef LMP_FIX_ALCHEMY_H +#define LMP_FIX_ALCHEMY_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixAlchemy : public Fix { + public: + FixAlchemy(class LAMMPS *, int, char **); + ~FixAlchemy() override; + + int setmask() override; + void init() override; + void setup(int) override; + void post_integrate() override; + void post_force(int) override; + double compute_vector(int) override; + + protected: + MPI_Comm samerank; + MPI_Comm rankzero; + double *coordbuf; + double lambda; // changes from 0 to 1 during run + double epot[2]; // last (unscaled) potential energy from each replica +}; +} // namespace LAMMPS_NS + +#endif +#endif From 7a4b23938eb5c7875347b846231784a78fbc58ef Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 Feb 2023 19:00:12 -0500 Subject: [PATCH 266/445] update example so we can use the simpler communication pattern --- examples/PACKAGES/alchemy/h3o+.mol | 39 -------------- examples/PACKAGES/alchemy/in.twowater | 75 +++++++++++++++++++-------- examples/PACKAGES/alchemy/oh-.mol | 24 --------- 3 files changed, 54 insertions(+), 84 deletions(-) delete mode 100644 examples/PACKAGES/alchemy/h3o+.mol delete mode 100644 examples/PACKAGES/alchemy/oh-.mol diff --git a/examples/PACKAGES/alchemy/h3o+.mol b/examples/PACKAGES/alchemy/h3o+.mol deleted file mode 100644 index 699438e7a4..0000000000 --- a/examples/PACKAGES/alchemy/h3o+.mol +++ /dev/null @@ -1,39 +0,0 @@ -# Hydronium ion. SPC/E model. - -4 atoms -3 bonds -3 angles - -Coords - -1 0.00000 1.00000 0.00000 -2 0.00000 0.00000 0.00000 -3 0.00000 -0.50000 -0.8660 -4 0.00000 -0.50000 0.8660 - -Types - -1 2 -2 1 -3 2 -4 2 - -Charges - -1 0.56775 -2 -0.70305 -3 0.56775 -4 0.56775 - -Bonds - -1 1 2 1 -2 1 2 3 -3 1 2 4 - -Angles - -1 1 1 2 3 -1 1 3 2 4 -1 1 1 2 4 - diff --git a/examples/PACKAGES/alchemy/in.twowater b/examples/PACKAGES/alchemy/in.twowater index 62e0dacd60..dd246666bf 100644 --- a/examples/PACKAGES/alchemy/in.twowater +++ b/examples/PACKAGES/alchemy/in.twowater @@ -1,12 +1,16 @@ -# set up names for two partitions with different topologies +# Example for alchemical transformation of two water molecules into a hydronium and hydroxyl ion +# WARNING: This input is for demonstrating the method. +# Force field parameters are made up and not suitable for production simulations. + +# set up names for two partitions with different topologies for output files. variable name world twowater twoions units real atom_style full atom_modify map array -region box block -10 10 -10 10 -10 10 -boundary m m m -create_box 2 box bond/types 1 angle/types 1 & +region box block -5 5 -5 5 -5 5 +boundary p p p +create_box 2 box bond/types 2 angle/types 2 & extra/bond/per/atom 3 extra/angle/per/atom 3 extra/special/per/atom 3 mass 1 15.9994 @@ -18,36 +22,65 @@ pair_coeff 1 2 0.0 1.0 pair_coeff 2 2 0.0 1.0 bond_style harmonic -bond_coeff 1 1000.0 1.0 +bond_coeff * 1000.0 1.0 angle_style harmonic -angle_coeff 1 100.0 109.47 +angle_coeff * 100.0 109.47 molecule water h2o.mol -molecule hydronium h3o+.mol -molecule hydroxyl oh-.mol +# create the two molecules we want to transform ... +create_atoms 0 single -2.0 0.0 0.0 mol water 453624 +create_atoms 0 single 2.0 0.0 0.0 mol water 767353 -timestep 0.1 +# ... and put them in a group +group transform id 1:6 + +# now fill the box with more water +create_atoms 0 random 32 34564 NULL mol water 25367 overlap 1.4 + +# change topology and settings for the two states +# we cannot simply create a different topology directly or +# load a different data file because the order and position +# of all atoms must be maintained across both replica + +# for that we first have to remove everything. +delete_bonds transform bond 1 +delete_bonds transform angle 1 remove # generate different topologies with the same number of atoms if "${name} == twowater" then & - "create_atoms 0 single -2.0 0.0 0.0 mol water 453624" & - "create_atoms 0 single 2.0 0.0 0.0 mol water 767353" & + "create_bonds single/bond 2 1 2" & + "create_bonds single/bond 2 1 3" & + "create_bonds single/bond 2 4 5" & + "create_bonds single/bond 2 4 6" & + "create_bonds single/angle 2 2 1 3" & + "create_bonds single/angle 2 5 4 6" & else & - "create_atoms 0 single 2.0 0.0 0.0 mol hydroxyl 767353" & - "create_atoms 0 single -2.0 0.0 0.0 mol hydronium 453624" + "create_bonds single/bond 2 1 2" & + "create_bonds single/bond 2 3 4" & + "create_bonds single/bond 2 4 5" & + "create_bonds single/bond 2 4 6" & + "create_bonds single/angle 2 3 4 5" & + "create_bonds single/angle 2 5 4 6" & + "create_bonds single/angle 2 3 4 6" & + "set atom 1 charge -1.1354" & + "set atom 2 charge 0.1354" & + "set atom 3 charge 0.56775" & + "set atom 4 charge -0.70305" & + "set atom 5*6 charge 0.56775" -velocity all create 100 5463576 +velocity all create 300.0 5463576 +timestep 0.2 -fix 1 all nve +fix 1 all nvt temp 300 300 1.0 fix 2 all alchemy +fix 3 all shake 0.0001 50 1000 b 1 a 1 -dump 1 all atom 100 ${name}.lammpstrj -dump_modify 1 sort id +if "${name} == twowater" then & + "dump 1 all atom 100 ${name}.lammpstrj" & + "dump_modify 1 sort id" -thermo_style custom step temp press etotal pe ke f_2[*] +thermo_style custom step temp press etotal density pe ke f_2[*] thermo 100 - -reset_timestep 100 -run 10000 start 0 stop 20000 +run 20000 diff --git a/examples/PACKAGES/alchemy/oh-.mol b/examples/PACKAGES/alchemy/oh-.mol deleted file mode 100644 index 782d1fa88f..0000000000 --- a/examples/PACKAGES/alchemy/oh-.mol +++ /dev/null @@ -1,24 +0,0 @@ -# Hydroxyl ion. SPC/E model. - -2 atoms -1 bonds - -Coords - -1 0.5 0.0 0.0 -2 -0.5 0.0 0.0 - -Types - -1 1 -2 2 - -Charges - -1 -1.1354 -2 0.1354 - -Bonds - -1 1 1 2 - From 6d12f7925b136bac654160bb52a13ad026f7e16f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 Feb 2023 19:00:53 -0500 Subject: [PATCH 267/445] first working implementation of fix alchemy. still w/o support for pressure and variable cell. --- src/.gitignore | 4 +- src/REPLICA/fix_alchemy.cpp | 75 ++++++++++++++++++++----------------- src/REPLICA/fix_alchemy.h | 6 +-- 3 files changed, 45 insertions(+), 40 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index 8f0f577a45..9da19ca982 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1531,8 +1531,8 @@ /fix_langevin_drude.h /fix_mol_swap.cpp /fix_mol_swap.h -/fix_pimd.cpp -/fix_pimd.h +/fix_alchemy.cpp +/fix_alchemy.h /fix_pimd_nvt.cpp /fix_pimd_nvt.h /fix_qbmsst.cpp diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp index da10f8261f..104212cb9b 100644 --- a/src/REPLICA/fix_alchemy.cpp +++ b/src/REPLICA/fix_alchemy.cpp @@ -15,8 +15,11 @@ #include "atom.h" #include "comm.h" +#include "compute.h" #include "error.h" #include "memory.h" +#include "modify.h" +#include "respa.h" #include "universe.h" #include "update.h" @@ -35,14 +38,17 @@ static double get_lambda(const bigint &step, const bigint &begin, const bigint & /* ---------------------------------------------------------------------- */ -FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), coordbuf(nullptr) +FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { + if (narg != 3) error->all(FLERR, "Incorrect number of arguments for fix alchemy"); + lambda = epot[0] = epot[1] = 0.0; no_change_box = 1; vector_flag = 1; - size_vector = 3; + size_vector = 4; extvector = 0; + ilevel_respa = 0; // set up communicators if (universe->nworlds != 2) error->all(FLERR, "Must use exactly two partitions"); @@ -50,7 +56,8 @@ FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), int key = universe->iworld; MPI_Comm_split(universe->uworld, color, key, &samerank); - if (narg != 3) error->all(FLERR, "Incorrect number of arguments for fix alchemy"); + id_pe = std::string(id) + "_pe"; + modify->add_compute(id_pe + " all pe"); } /* ---------------------------------------------------------------------- */ @@ -58,6 +65,7 @@ FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), FixAlchemy::~FixAlchemy() { MPI_Comm_free(&samerank); + modify->delete_compute(id_pe); } /* ---------------------------------------------------------------------- */ @@ -76,53 +84,50 @@ void FixAlchemy::init() {} /* ---------------------------------------------------------------------- */ -void FixAlchemy::setup(int /*vflag*/) +void FixAlchemy::setup(int vflag) { - const int nall = atom->nlocal; - const auto tag = atom->tag; - const auto x = atom->x; - - memory->destroy(coordbuf); - memory->create(coordbuf, 4 * sizeof(double) * nall, "alchemy:coordbuf"); - - if (universe->iworld == 0) { - int m = 0; - for (int i = 0; i < nall; ++i) { - coordbuf[m++] = ubuf(tag[i]).d; - coordbuf[m++] = x[i][0]; - coordbuf[m++] = x[i][1]; - coordbuf[m++] = x[i][2]; - } + if (utils::strmatch(update->integrate_style, "^respa")) { + auto respa = dynamic_cast(update->integrate); + respa->copy_flevel_f(ilevel_respa); + post_force_respa(vflag, ilevel_respa, 0); + respa->copy_f_flevel(ilevel_respa); + } else { + post_force(vflag); } - - MPI_Bcast(coordbuf, 4 * nall, MPI_DOUBLE, 0, samerank); - - if (universe->iworld == 1) { - int m = 0; - for (int i = 0; i < nall; ++i) { - tagint mytag = (tagint) ubuf(coordbuf[m++]).i; - x[atom->map(mytag)][0] = coordbuf[m++]; - x[atom->map(mytag)][1] = coordbuf[m++]; - x[atom->map(mytag)][2] = coordbuf[m++]; - } - } - - lambda = get_lambda(update->ntimestep, update->beginstep, update->endstep, universe->iworld); } /* ---------------------------------------------------------------------- */ void FixAlchemy::post_integrate() { - int nall = 3 * (atom->nlocal + atom->nghost); - // MPI_Bcast(&atom->x[0][0], nall, MPI_DOUBLE, 0, samerank); + const int nall = atom->nlocal + atom->nghost; + MPI_Bcast(&atom->x[0][0], 3 * nall, MPI_DOUBLE, 0, samerank); } /* ---------------------------------------------------------------------- */ void FixAlchemy::post_force(int /*vflag*/) { + const int nall = atom->nlocal; + auto f = atom->f; lambda = get_lambda(update->ntimestep, update->beginstep, update->endstep, universe->iworld); + + double *commbuf = new double[3 * nall]; + int m = 0; + for (int i = 0; i < nall; ++i) { + commbuf[m++] = f[i][0] * lambda; + commbuf[m++] = f[i][1] * lambda; + commbuf[m++] = f[i][2] * lambda; + } + MPI_Allreduce(commbuf, &f[0][0], 3 * nall, MPI_DOUBLE, MPI_SUM, samerank); + + auto pe = modify->get_compute_by_id(id_pe); + commbuf[0] = commbuf[1] = commbuf[2] = 0.0; + commbuf[universe->iworld] = pe->compute_scalar() / comm->nprocs; + commbuf[2] = lambda * pe->compute_scalar() / comm->nprocs; + MPI_Allreduce(commbuf, epot, 3, MPI_DOUBLE, MPI_SUM, universe->uworld); + delete[] commbuf; + pe->addstep(update->ntimestep + 1); } /* ---------------------------------------------------------------------- */ diff --git a/src/REPLICA/fix_alchemy.h b/src/REPLICA/fix_alchemy.h index 2c48b5b4e7..0457d12735 100644 --- a/src/REPLICA/fix_alchemy.h +++ b/src/REPLICA/fix_alchemy.h @@ -38,10 +38,10 @@ class FixAlchemy : public Fix { protected: MPI_Comm samerank; - MPI_Comm rankzero; - double *coordbuf; + std::string id_pe; double lambda; // changes from 0 to 1 during run - double epot[2]; // last (unscaled) potential energy from each replica + double epot[3]; // last (unscaled) potential energy from each replica and combined energy + int ilevel_respa; }; } // namespace LAMMPS_NS From fdf514823827068675aabd4d856cfe050b509e90 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 Feb 2023 22:55:23 -0500 Subject: [PATCH 268/445] don't store topology information with ghost atoms. they will be ignored. --- src/create_bonds.cpp | 47 ++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/src/create_bonds.cpp b/src/create_bonds.cpp index c6d3f1838e..5355ce2b7c 100644 --- a/src/create_bonds.cpp +++ b/src/create_bonds.cpp @@ -319,8 +319,6 @@ void CreateBonds::many() void CreateBonds::single_bond() { - int m; - // check that 2 atoms exist const int nlocal = atom->nlocal; @@ -341,7 +339,8 @@ void CreateBonds::single_bond() int **bond_type = atom->bond_type; tagint **bond_atom = atom->bond_atom; - if ((m = idx1) >= 0) { + int m = idx1; + if ((m >= 0) && (m < nlocal)) { if (num_bond[m] == atom->bond_per_atom) error->one(FLERR, "New bond exceeded bonds per atom in create_bonds"); bond_type[m][num_bond[m]] = btype; @@ -352,7 +351,8 @@ void CreateBonds::single_bond() if (force->newton_bond) return; - if ((m = idx2) >= 0) { + m = idx2; + if ((m >= 0) && (m < nlocal)) { if (num_bond[m] == atom->bond_per_atom) error->one(FLERR, "New bond exceeded bonds per atom in create_bonds"); bond_type[m][num_bond[m]] = btype; @@ -365,8 +365,6 @@ void CreateBonds::single_bond() void CreateBonds::single_angle() { - int m; - // check that 3 atoms exist const int nlocal = atom->nlocal; @@ -391,7 +389,8 @@ void CreateBonds::single_angle() tagint **angle_atom2 = atom->angle_atom2; tagint **angle_atom3 = atom->angle_atom3; - if ((m = idx2) >= 0) { + int m = idx2; + if ((m >= 0) && (m < nlocal)) { if (num_angle[m] == atom->angle_per_atom) error->one(FLERR, "New angle exceeded angles per atom in create_bonds"); angle_type[m][num_angle[m]] = atype; @@ -404,7 +403,8 @@ void CreateBonds::single_angle() if (force->newton_bond) return; - if ((m = idx1) >= 0) { + m = idx1; + if ((m >= 0) && (m < nlocal)) { if (num_angle[m] == atom->angle_per_atom) error->one(FLERR, "New angle exceeded angles per atom in create_bonds"); angle_type[m][num_angle[m]] = atype; @@ -414,7 +414,8 @@ void CreateBonds::single_angle() num_angle[m]++; } - if ((m = idx3) >= 0) { + m = idx3; + if ((m >= 0) && (m < nlocal)) { if (num_angle[m] == atom->angle_per_atom) error->one(FLERR, "New angle exceeded angles per atom in create_bonds"); angle_type[m][num_angle[m]] = atype; @@ -429,8 +430,6 @@ void CreateBonds::single_angle() void CreateBonds::single_dihedral() { - int m; - // check that 4 atoms exist const int nlocal = atom->nlocal; @@ -458,7 +457,8 @@ void CreateBonds::single_dihedral() tagint **dihedral_atom3 = atom->dihedral_atom3; tagint **dihedral_atom4 = atom->dihedral_atom4; - if ((m = idx2) >= 0) { + int m = idx2; + if ((m >= 0) && (m < nlocal)) { if (num_dihedral[m] == atom->dihedral_per_atom) error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds"); dihedral_type[m][num_dihedral[m]] = dtype; @@ -472,7 +472,8 @@ void CreateBonds::single_dihedral() if (force->newton_bond) return; - if ((m = idx1) >= 0) { + m = idx1; + if ((m >= 0) && (m < nlocal)) { if (num_dihedral[m] == atom->dihedral_per_atom) error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds"); dihedral_type[m][num_dihedral[m]] = dtype; @@ -483,7 +484,8 @@ void CreateBonds::single_dihedral() num_dihedral[m]++; } - if ((m = idx3) >= 0) { + m = idx3; + if ((m >= 0) && (m < nlocal)) { if (num_dihedral[m] == atom->dihedral_per_atom) error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds"); dihedral_type[m][num_dihedral[m]] = dtype; @@ -494,7 +496,8 @@ void CreateBonds::single_dihedral() num_dihedral[m]++; } - if ((m = idx4) >= 0) { + m = idx4; + if ((m >= 0) && (m < nlocal)) { if (num_dihedral[m] == atom->dihedral_per_atom) error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds"); dihedral_type[m][num_dihedral[m]] = dtype; @@ -510,8 +513,6 @@ void CreateBonds::single_dihedral() void CreateBonds::single_improper() { - int m; - // check that 4 atoms exist const int nlocal = atom->nlocal; @@ -539,7 +540,8 @@ void CreateBonds::single_improper() tagint **improper_atom3 = atom->improper_atom3; tagint **improper_atom4 = atom->improper_atom4; - if ((m = idx2) >= 0) { + int m = idx2; + if ((m >= 0) && (m < nlocal)) { if (num_improper[m] == atom->improper_per_atom) error->one(FLERR, "New improper exceeded impropers per atom in create_bonds"); improper_type[m][num_improper[m]] = dtype; @@ -553,7 +555,8 @@ void CreateBonds::single_improper() if (force->newton_bond) return; - if ((m = idx1) >= 0) { + m = idx1; + if ((m >= 0) && (m < nlocal)) { if (num_improper[m] == atom->improper_per_atom) error->one(FLERR, "New improper exceeded impropers per atom in create_bonds"); improper_type[m][num_improper[m]] = dtype; @@ -564,7 +567,8 @@ void CreateBonds::single_improper() num_improper[m]++; } - if ((m = idx3) >= 0) { + m = idx3; + if ((m >= 0) && (m < nlocal)) { if (num_improper[m] == atom->improper_per_atom) error->one(FLERR, "New improper exceeded impropers per atom in create_bonds"); improper_type[m][num_improper[m]] = dtype; @@ -575,7 +579,8 @@ void CreateBonds::single_improper() num_improper[m]++; } - if ((m = idx4) >= 0) { + m = idx4; + if ((m >= 0) && (m < nlocal)) { if (num_improper[m] == atom->improper_per_atom) error->one(FLERR, "New improper exceeded impropers per atom in create_bonds"); improper_type[m][num_improper[m]] = dtype; From 724218604545795ed4d900065bdc87da2e5b8fb3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 10:34:25 -0500 Subject: [PATCH 269/445] add compute pressure/alchemy so it can be used with fix npt --- examples/PACKAGES/alchemy/in.twowater | 30 ++++--- src/.gitignore | 2 + src/REPLICA/compute_pressure_alchemy.cpp | 102 +++++++++++++++++++++++ src/REPLICA/compute_pressure_alchemy.h | 41 +++++++++ src/REPLICA/fix_alchemy.cpp | 89 +++++++++++++++----- src/REPLICA/fix_alchemy.h | 11 ++- 6 files changed, 241 insertions(+), 34 deletions(-) create mode 100644 src/REPLICA/compute_pressure_alchemy.cpp create mode 100644 src/REPLICA/compute_pressure_alchemy.h diff --git a/examples/PACKAGES/alchemy/in.twowater b/examples/PACKAGES/alchemy/in.twowater index dd246666bf..63089d23c5 100644 --- a/examples/PACKAGES/alchemy/in.twowater +++ b/examples/PACKAGES/alchemy/in.twowater @@ -1,8 +1,8 @@ # Example for alchemical transformation of two water molecules into a hydronium and hydroxyl ion -# WARNING: This input is for demonstrating the method. -# Force field parameters are made up and not suitable for production simulations. +# WARNING: This input is intended for demonstrating the method, only +# The force field parameters are made up and NOT suitable for production simulations. -# set up names for two partitions with different topologies for output files. +# set up different names for two partitions variable name world twowater twoions units real @@ -36,19 +36,19 @@ create_atoms 0 single 2.0 0.0 0.0 mol water 767353 # ... and put them in a group group transform id 1:6 -# now fill the box with more water -create_atoms 0 random 32 34564 NULL mol water 25367 overlap 1.4 +# now fill the rest of the box with more water +create_atoms 0 random 32 34564 NULL mol water 25367 overlap 1.33 # change topology and settings for the two states # we cannot simply create a different topology directly or # load a different data file because the order and position # of all atoms must be maintained across both replica -# for that we first have to remove everything. +# we first have to remove all topology data in the transform group delete_bonds transform bond 1 delete_bonds transform angle 1 remove -# generate different topologies with the same number of atoms +# then generate different topologies for the two partitions. select by name. if "${name} == twowater" then & "create_bonds single/bond 2 1 2" & "create_bonds single/bond 2 1 3" & @@ -73,14 +73,22 @@ else & velocity all create 300.0 5463576 timestep 0.2 -fix 1 all nvt temp 300 300 1.0 -fix 2 all alchemy -fix 3 all shake 0.0001 50 1000 b 1 a 1 +# since the trajectory and forces are kept identical through fix alchemy +# we can even do fix npt simulations, but we need to use the "mixed" pressure +fix integrate all npt temp 300 300 1.0 iso 1.0 1.0 10.0 +fix transform all alchemy +compute pressure all pressure/alchemy transform +fix_modify integrate press pressure + +# only need to output a dump file form one partition if "${name} == twowater" then & "dump 1 all atom 100 ${name}.lammpstrj" & "dump_modify 1 sort id" -thermo_style custom step temp press etotal density pe ke f_2[*] +thermo_style custom step temp press etotal density pe ke f_transform[1] f_transform[4] +thermo_modify colname f_transform[1] lambda colname f_transform[4] EPot_mixed +thermo_modify press pressure + thermo 100 run 20000 diff --git a/src/.gitignore b/src/.gitignore index 9da19ca982..0d73a7911d 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1465,6 +1465,8 @@ /zstd_file_writer.cpp /zstd_file_writer.h +/compute_pressure_alchemy.cpp +/compute_pressure_alchemy.h /atom_vec_smd.cpp /atom_vec_smd.h /compute_saed.cpp diff --git a/src/REPLICA/compute_pressure_alchemy.cpp b/src/REPLICA/compute_pressure_alchemy.cpp new file mode 100644 index 0000000000..d19ea1b893 --- /dev/null +++ b/src/REPLICA/compute_pressure_alchemy.cpp @@ -0,0 +1,102 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "compute_pressure_alchemy.h" + +#include "domain.h" +#include "error.h" +#include "fix.h" +#include "modify.h" +#include "update.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +ComputePressureAlchemy::ComputePressureAlchemy(LAMMPS *lmp, int narg, char **arg) : + Compute(lmp, narg, arg) +{ + if (narg != 4) error->all(FLERR, "Illegal compute pressure/alchemy command"); + if (igroup) error->all(FLERR, "Compute pressure/alchemy must use group all"); + + scalar_flag = vector_flag = 1; + size_vector = 6; + extscalar = 0; + extvector = 0; + pressflag = 1; + timeflag = 1; + + id_fix = arg[3]; + if (!modify->get_fix_by_id(id_fix)) + error->all(FLERR, "Could not find compute pressure/alchemy fix ID {} for fix alchemy", id_fix); + + vector = new double[size_vector]; +} + +/* ---------------------------------------------------------------------- */ + +ComputePressureAlchemy::~ComputePressureAlchemy() +{ + delete[] vector; +} + +/* ---------------------------------------------------------------------- */ + +void ComputePressureAlchemy::init() +{ + + fix = modify->get_fix_by_id(id_fix); + if (!fix) + error->all(FLERR, "Could not find compute pressure/alchemy fix ID {} for fix alchemy", id_fix); + + int dim = 0; + void *ptr = fix->extract("pressure", dim); + if (!ptr || (dim != 1)) error->all(FLERR, "Could not extract pressure from fix alchemy"); +} + +/* ---------------------------------------------------------------------- + compute total pressure from tensor, averaged over Pxx, Pyy, Pzz +------------------------------------------------------------------------- */ + +double ComputePressureAlchemy::compute_scalar() +{ + invoked_scalar = update->ntimestep; + if (update->vflag_global != invoked_scalar) + error->all(FLERR, "Virial was not tallied on needed timestep"); + + compute_vector(); + + if (domain->dimension == 3) { + scalar = (vector[0] + vector[1] + vector[2]) / 3.0; + } else { + scalar = (vector[0] + vector[1]) / 2.0; + } + return scalar; +} + +/* ---------------------------------------------------------------------- + extract compute combined system pressure tensor from alchemy fix +------------------------------------------------------------------------- */ + +void ComputePressureAlchemy::compute_vector() +{ + invoked_vector = update->ntimestep; + if (update->vflag_global != invoked_vector) + error->all(FLERR, "Virial was not tallied on needed timestep"); + + int dim = 0; + double *pressure = (double *) fix->extract("pressure", dim); + if (!pressure || (dim != 1)) error->all(FLERR, "Could not extract pressure from fix alchemy"); + + for (int i = 0; i < 6; i++) vector[i] = pressure[i]; +} diff --git a/src/REPLICA/compute_pressure_alchemy.h b/src/REPLICA/compute_pressure_alchemy.h new file mode 100644 index 0000000000..0ce0039587 --- /dev/null +++ b/src/REPLICA/compute_pressure_alchemy.h @@ -0,0 +1,41 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef COMPUTE_CLASS +// clang-format off +ComputeStyle(pressure/alchemy,ComputePressureAlchemy); +// clang-format on +#else + +#ifndef LMP_COMPUTE_PRESSURE_ALCHEMY_H +#define LMP_COMPUTE_PRESSURE_ALCHEMY_H + +#include "compute.h" + +namespace LAMMPS_NS { + +class ComputePressureAlchemy : public Compute { + public: + ComputePressureAlchemy(class LAMMPS *, int, char **); + ~ComputePressureAlchemy() override; + void init() override; + double compute_scalar() override; + void compute_vector() override; + + protected: + class Fix *fix; + std::string id_fix; +}; +} // namespace LAMMPS_NS +#endif +#endif diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp index 104212cb9b..75b4c4cb73 100644 --- a/src/REPLICA/fix_alchemy.cpp +++ b/src/REPLICA/fix_alchemy.cpp @@ -23,6 +23,8 @@ #include "universe.h" #include "update.h" +#include + using namespace LAMMPS_NS; using namespace FixConst; @@ -38,26 +40,46 @@ static double get_lambda(const bigint &step, const bigint &begin, const bigint & /* ---------------------------------------------------------------------- */ -FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) +FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), commbuf(nullptr) { if (narg != 3) error->all(FLERR, "Incorrect number of arguments for fix alchemy"); lambda = epot[0] = epot[1] = 0.0; + for (int i = 0; i < 6; ++i) pressure[i] = 0.0; no_change_box = 1; vector_flag = 1; - size_vector = 4; + size_vector = 10; extvector = 0; ilevel_respa = 0; + nmax = 6; - // set up communicators + // set up rank-to-rank communicator if (universe->nworlds != 2) error->all(FLERR, "Must use exactly two partitions"); int color = comm->me; int key = universe->iworld; MPI_Comm_split(universe->uworld, color, key, &samerank); + // check that we have the same domain decomposition on all ranks + int my_nlocal[2] = {0, 0}; + int all_nlocal[2] = {0, 0}; + my_nlocal[universe->iworld] = atom->nlocal; + MPI_Allreduce(my_nlocal, all_nlocal, 2, MPI_INT, MPI_SUM, samerank); + int fail = (all_nlocal[0] == all_nlocal[1]) ? 0 : 1; + int allfail = 0; + MPI_Allreduce(&fail, &allfail, 1, MPI_INT, MPI_MAX, universe->uworld); + if (allfail) + error->all(FLERR, "Number of atoms and domain decomposition must match for both partitions"); + id_pe = std::string(id) + "_pe"; - modify->add_compute(id_pe + " all pe"); + pe = modify->add_compute(id_pe + " all pe"); + pe->addstep(update->ntimestep); + id_temp = std::string(id) + "_temp"; + temp = modify->add_compute(id_temp + " all temp"); + temp->addstep(update->ntimestep); + id_press = std::string(id) + "_press"; + press = modify->add_compute(id_press + " all pressure " + id_temp); + press->addstep(update->ntimestep); } /* ---------------------------------------------------------------------- */ @@ -66,6 +88,9 @@ FixAlchemy::~FixAlchemy() { MPI_Comm_free(&samerank); modify->delete_compute(id_pe); + modify->delete_compute(id_temp); + modify->delete_compute(id_press); + memory->destroy(commbuf); } /* ---------------------------------------------------------------------- */ @@ -80,7 +105,13 @@ int FixAlchemy::setmask() /* ---------------------------------------------------------------------- */ -void FixAlchemy::init() {} +void FixAlchemy::init() +{ + int onenmax = MAX(nmax, 3 * atom->nmax); + MPI_Allreduce(&onenmax, &nmax, 1, MPI_INT, MPI_MAX, universe->uworld); + memory->destroy(commbuf); + memory->create(commbuf, sizeof(double) * nmax, "alchemy:nmax"); +} /* ---------------------------------------------------------------------- */ @@ -108,26 +139,31 @@ void FixAlchemy::post_integrate() void FixAlchemy::post_force(int /*vflag*/) { - const int nall = atom->nlocal; - auto f = atom->f; + if (3 * atom->nmax > nmax) { + nmax = 3 * atom->nmax; + memory->grow(commbuf, sizeof(double) * atom->nmax, "alchemy:commbuf"); + } + + const int nall = 3 * atom->nlocal; + double *f = &atom->f[0][0]; lambda = get_lambda(update->ntimestep, update->beginstep, update->endstep, universe->iworld); - double *commbuf = new double[3 * nall]; - int m = 0; - for (int i = 0; i < nall; ++i) { - commbuf[m++] = f[i][0] * lambda; - commbuf[m++] = f[i][1] * lambda; - commbuf[m++] = f[i][2] * lambda; - } - MPI_Allreduce(commbuf, &f[0][0], 3 * nall, MPI_DOUBLE, MPI_SUM, samerank); + for (int i = 0; i < nall; ++i) commbuf[i] = f[i] * lambda; + MPI_Allreduce(commbuf, f, nall, MPI_DOUBLE, MPI_SUM, samerank); - auto pe = modify->get_compute_by_id(id_pe); + // sum up potential energy + const double scalefac = 1.0 / comm->nprocs; commbuf[0] = commbuf[1] = commbuf[2] = 0.0; - commbuf[universe->iworld] = pe->compute_scalar() / comm->nprocs; - commbuf[2] = lambda * pe->compute_scalar() / comm->nprocs; + commbuf[universe->iworld] = scalefac * pe->compute_scalar(); + commbuf[2] = lambda * scalefac * pe->compute_scalar(); MPI_Allreduce(commbuf, epot, 3, MPI_DOUBLE, MPI_SUM, universe->uworld); - delete[] commbuf; pe->addstep(update->ntimestep + 1); + + // sum up pressure + press->compute_vector(); + for (int i = 0; i < 6; ++i) commbuf[i] = lambda * scalefac * press->vector[i]; + MPI_Allreduce(commbuf, pressure, 6, MPI_DOUBLE, MPI_SUM, universe->uworld); + press->addstep(update->ntimestep + 1); } /* ---------------------------------------------------------------------- */ @@ -135,5 +171,18 @@ void FixAlchemy::post_force(int /*vflag*/) double FixAlchemy::compute_vector(int n) { if (n == 0) return lambda; - return epot[n - 1]; + if ((n > 0) && (n < 4)) return epot[n - 1]; + return pressure[n - 4]; +} + +/* ---------------------------------------------------------------------- */ + +void *FixAlchemy::extract(const char *str, int &dim) +{ + dim = 0; + if (strcmp(str, "lambda") == 0) { return λ } + if (strcmp(str, "pe") == 0) { return &epot[2]; } + dim = 1; + if (strcmp(str, "pressure") == 0) { return pressure; } + return nullptr; } diff --git a/src/REPLICA/fix_alchemy.h b/src/REPLICA/fix_alchemy.h index 0457d12735..9794629db3 100644 --- a/src/REPLICA/fix_alchemy.h +++ b/src/REPLICA/fix_alchemy.h @@ -35,13 +35,18 @@ class FixAlchemy : public Fix { void post_integrate() override; void post_force(int) override; double compute_vector(int) override; + void *extract(const char *, int &) override; protected: MPI_Comm samerank; - std::string id_pe; - double lambda; // changes from 0 to 1 during run - double epot[3]; // last (unscaled) potential energy from each replica and combined energy + double *commbuf; + class Compute *pe, *temp, *press; + std::string id_pe, id_temp, id_press; + double lambda; // changes from 0 to 1 during run + double epot[3]; // last (unscaled) potential energy from each replica and combined energy + double pressure[6]; // joined pressure int ilevel_respa; + int nmax; }; } // namespace LAMMPS_NS From c288a20077effb1bcb588cd166e88ebdcfb46cf0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 11:14:56 -0500 Subject: [PATCH 270/445] add progress information to screen or universe logfile --- examples/PACKAGES/alchemy/in.twowater | 12 +- .../alchemy/log.25Feb23.twowater.g++.4 | 13 + .../alchemy/log.25Feb23.twowater.g++.4.0 | 408 +++++++++++++++++ .../alchemy/log.25Feb23.twowater.g++.4.1 | 433 ++++++++++++++++++ src/REPLICA/fix_alchemy.cpp | 19 + src/REPLICA/fix_alchemy.h | 1 + 6 files changed, 880 insertions(+), 6 deletions(-) create mode 100644 examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4 create mode 100644 examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 create mode 100644 examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 diff --git a/examples/PACKAGES/alchemy/in.twowater b/examples/PACKAGES/alchemy/in.twowater index 63089d23c5..8c19eab215 100644 --- a/examples/PACKAGES/alchemy/in.twowater +++ b/examples/PACKAGES/alchemy/in.twowater @@ -73,18 +73,18 @@ else & velocity all create 300.0 5463576 timestep 0.2 -# since the trajectory and forces are kept identical through fix alchemy -# we can even do fix npt simulations, but we need to use the "mixed" pressure +# since the trajectory and forces are kept identical through fix alchemy, +# we can do fix npt simulations, but we must use the "mixed" pressure fix integrate all npt temp 300 300 1.0 iso 1.0 1.0 10.0 fix transform all alchemy compute pressure all pressure/alchemy transform fix_modify integrate press pressure -# only need to output a dump file form one partition -if "${name} == twowater" then & - "dump 1 all atom 100 ${name}.lammpstrj" & - "dump_modify 1 sort id" +# only need to output a dump file from one partition +# if "${name} == twowater" then & +# "dump 1 all atom 100 ${name}.lammpstrj" & +# "dump_modify 1 sort id" thermo_style custom step temp press etotal density pe ke f_transform[1] f_transform[4] thermo_modify colname f_transform[1] lambda colname f_transform[4] EPot_mixed diff --git a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4 b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4 new file mode 100644 index 0000000000..18375012d0 --- /dev/null +++ b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4 @@ -0,0 +1,13 @@ +LAMMPS (8 Feb 2023) +Running on 2 partitions of processors +Starting alchemical transformation at 0% + Alchemical transformation progress: 10% + Alchemical transformation progress: 20% + Alchemical transformation progress: 30% + Alchemical transformation progress: 40% + Alchemical transformation progress: 50% + Alchemical transformation progress: 60% + Alchemical transformation progress: 70% + Alchemical transformation progress: 80% + Alchemical transformation progress: 90% + Alchemical transformation progress: 100% diff --git a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 new file mode 100644 index 0000000000..7717dae784 --- /dev/null +++ b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 @@ -0,0 +1,408 @@ +LAMMPS (8 Feb 2023) +Processor partition = 0 + using 1 OpenMP thread(s) per MPI task +# Example for alchemical transformation of two water molecules into a hydronium and hydroxyl ion +# WARNING: This input is intended for demonstrating the method, only +# The force field parameters are made up and NOT suitable for production simulations. + +# set up different names for two partitions +variable name world twowater twoions + +units real +atom_style full +atom_modify map array +region box block -5 5 -5 5 -5 5 +boundary p p p +create_box 2 box bond/types 2 angle/types 2 extra/bond/per/atom 3 extra/angle/per/atom 3 extra/special/per/atom 3 +Created orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 2 MPI processor grid + +mass 1 15.9994 +mass 2 1.008 + +pair_style lj/cut/coul/cut 10.0 +pair_coeff 1 1 0.1553 3.166 +pair_coeff 1 2 0.0 1.0 +pair_coeff 2 2 0.0 1.0 + +bond_style harmonic +bond_coeff * 1000.0 1.0 + +angle_style harmonic +angle_coeff * 100.0 109.47 + +molecule water h2o.mol +Read molecule template water: + 1 molecules + 0 fragments + 3 atoms with max type 2 + 2 bonds with max type 1 + 1 angles with max type 1 + 0 dihedrals with max type 0 + 0 impropers with max type 0 + +# create the two molecules we want to transform ... +create_atoms 0 single -2.0 0.0 0.0 mol water 453624 +Created 3 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.003 seconds +create_atoms 0 single 2.0 0.0 0.0 mol water 767353 +Created 3 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds + +# ... and put them in a group +group transform id 1:6 +6 atoms in group transform + +# now fill the rest of the box with more water +create_atoms 0 random 32 34564 NULL mol water 25367 overlap 1.33 +Created 96 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.001 seconds + +# change topology and settings for the two states +# we cannot simply create a different topology directly or +# load a different data file because the order and position +# of all atoms must be maintained across both replica + +# we first have to remove all topology data in the transform group +delete_bonds transform bond 1 +System init for delete_bonds ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 2 2 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Deleting bonds ... + 68 total bonds, 64 turned on, 4 turned off + 34 total angles, 34 turned on, 0 turned off + 0 total dihedrals, 0 turned on, 0 turned off + 0 total impropers, 0 turned on, 0 turned off +delete_bonds transform angle 1 remove +System init for delete_bonds ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Deleting bonds ... + 64 total bonds, 64 turned on, 0 turned off + 32 total angles, 32 turned on, 0 turned off + 0 total dihedrals, 0 turned on, 0 turned off + 0 total impropers, 0 turned on, 0 turned off + +# then generate different topologies for the two partitions. select by name. +if "${name} == twowater" then "create_bonds single/bond 2 1 2" "create_bonds single/bond 2 1 3" "create_bonds single/bond 2 4 5" "create_bonds single/bond 2 4 6" "create_bonds single/angle 2 2 1 3" "create_bonds single/angle 2 5 4 6" else "create_bonds single/bond 2 1 2" "create_bonds single/bond 2 3 4" "create_bonds single/bond 2 4 5" "create_bonds single/bond 2 4 6" "create_bonds single/angle 2 3 4 5" "create_bonds single/angle 2 5 4 6" "create_bonds single/angle 2 3 4 6" "set atom 1 charge -1.1354" "set atom 2 charge 0.1354" "set atom 3 charge 0.56775" "set atom 4 charge -0.70305" "set atom 5*6 charge 0.56775" +create_bonds single/bond 2 1 2 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/bond 2 1 3 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/bond 2 4 5 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/bond 2 4 6 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/angle 2 2 1 3 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/angle 2 5 4 6 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds + +velocity all create 300.0 5463576 +timestep 0.2 + +# since the trajectory and forces are kept identical through fix alchemy, +# we can do fix npt simulations, but we must use the "mixed" pressure + +fix integrate all npt temp 300 300 1.0 iso 1.0 1.0 10.0 +fix transform all alchemy +compute pressure all pressure/alchemy transform +fix_modify integrate press pressure + +# only need to output a dump file from one partition +# if "${name} == twowater" then # "dump 1 all atom 100 ${name}.lammpstrj" # "dump_modify 1 sort id" + +thermo_style custom step temp press etotal density pe ke f_transform[1] f_transform[4] +thermo_modify colname f_transform[1] lambda colname f_transform[4] EPot_mixed +thermo_modify press pressure + +thermo 100 +run 20000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 7.535 | 7.535 | 7.535 Mbytes + Step Temp Press TotEng Density PotEng KinEng lambda EPot_mixed + 0 300 184631.17 -802.19609 1.0171193 -892.51464 90.318545 1 -892.51464 + 100 293.4335 -513.97927 189.09028 0.3029684 100.74865 88.341623 0.995 207.29243 + 200 320.81838 1513.3 111.09325 0.64509407 14.507087 96.586165 0.99 46.402434 + 300 261.53825 -3808.6942 -538.67351 0.88817871 -617.41269 78.739179 0.985 -614.76481 + 400 308.32444 1375.0327 -804.08042 0.97694485 -896.90513 92.824715 0.98 -897.24386 + 500 292.60623 -12843.384 -1141.5985 1.0140814 -1229.691 88.092563 0.975 -1221.948 + 600 326.16112 91608.645 2882.4855 1.0263567 2784.2908 98.194659 0.97 2786.0743 + 700 317.22811 -60420.408 -1517.0601 0.9919143 -1612.5654 95.505272 0.965 -1616.7677 + 800 309.94673 -56793.931 -1549.4612 1.0024958 -1642.7743 93.313126 0.96 -1640.8606 + 900 272.80718 -5076.2282 -1266.6775 1.0141078 -1348.8093 82.131824 0.955 -1357.1812 + 1000 346.52557 -16919.192 -1406.675 1.0170322 -1511.0006 104.32562 0.95 -1514.1398 + 1100 300.62984 -51826.972 -2469.2821 1.0063592 -2559.7903 90.508164 0.945 -2565.9668 + 1200 293.72767 45222.698 2039.1938 1.0272336 1950.7636 88.430186 0.94 1951.1683 + 1300 289.4971 94600.203 2184.5096 1.0298091 2097.3531 87.156524 0.935 2088.1011 + 1400 328.98666 35468.53 1816.723 1.0198467 1717.6777 99.045321 0.93 1716.9268 + 1500 392.9407 41220.21 1820.7312 1.0194044 1702.4317 118.29944 0.925 1690.6416 + 1600 284.90093 -37995.141 -2439.9256 1.0068497 -2525.6984 85.772791 0.92 -2529.5874 + 1700 267.67454 25275.255 1612.5912 1.0313556 1532.0046 80.586582 0.915 1520.9695 + 1800 247.16495 -68222.994 -2699.1903 1.0018048 -2773.6022 74.41193 0.91 -2788.9545 + 1900 328.41849 -51979.665 -2339.7432 1.0154952 -2438.6175 98.874268 0.905 -2461.3422 + 2000 313.8715 21726.003 1473.9594 1.018831 1379.4647 94.494725 0.9 1363.0739 + 2100 296.07341 66130.11 1379.1597 1.0224882 1290.0233 89.136398 0.895 1272.1884 + 2200 282.67889 51746.464 2376.377 1.0362683 2291.2732 85.103821 0.89 2276.1488 + 2300 281.04207 -71937.759 -2791.0867 1.0111968 -2875.6977 84.611035 0.885 -2892.2526 + 2400 321.00806 -51658.758 -2507.6376 1.0168161 -2604.2809 96.643269 0.88 -2622.9732 + 2500 288.95906 49645.753 2361.024 1.0355648 2274.0295 86.99454 0.875 2275.0348 + 2600 303.0064 -48470.216 -1973.9561 1.000439 -2065.1798 91.223657 0.87 -2082.5895 + 2700 361.7083 54973.584 1929.0772 1.0223169 1820.1806 108.89656 0.865 1817.1972 + 2800 289.27827 33564.017 1783.5154 1.0257088 1696.4248 87.090642 0.86 1682.9162 + 2900 283.94365 -47190.274 -2286.9529 1.0059224 -2372.4375 85.484591 0.855 -2395.9575 + 3000 337.10996 61988.686 2289.363 1.0258 2187.8721 101.49094 0.85 2168.1085 + 3100 305.28249 -50123.109 -1913.7375 1.0143567 -2005.6464 91.9089 0.845 -2040.3453 + 3200 270.19471 -18114.265 -1961.3048 1.0132413 -2042.6502 81.345309 0.84 -2076.9595 + 3300 263.39996 -109301.89 -2351.6647 0.99956867 -2430.9643 79.299671 0.835 -2471.0269 + 3400 249.01722 -37585.949 -2423.3849 1.0080932 -2498.3544 74.969576 0.83 -2537.734 + 3500 267.88868 65528.865 2164.3882 1.0390872 2083.7372 80.651054 0.825 2061.6421 + 3600 351.46458 -67583.574 -2861.4561 1.0059621 -2967.2687 105.81256 0.82 -3004.5028 + 3700 332.82565 -61204.843 -2275.2765 1.0053485 -2375.4776 100.20109 0.815 -2415.4435 + 3800 298.0279 61123.085 1951.1943 1.020672 1861.4695 89.724819 0.81 1831.9734 + 3900 317.04715 43210.045 1848.3875 1.0287838 1752.9367 95.450792 0.805 1721.1961 + 4000 261.75174 -111920.72 -3274.707 0.99457106 -3353.5105 78.803455 0.8 -3394.3528 + 4100 338.34245 89763.083 2115.4809 1.0318272 2013.6189 101.86199 0.795 1973.419 + 4200 288.52623 19989.792 1758.0617 1.0204119 1671.1975 86.86423 0.79 1633.1439 + 4300 322.05593 -33791.403 -2107.1643 1.0155065 -2204.1231 96.958741 0.785 -2246.4353 + 4400 280.59054 -27839.599 -1534.3265 1.0123506 -1618.8016 84.475096 0.78 -1672.1425 + 4500 296.08336 75206.112 2789.7494 1.0329133 2700.61 89.139393 0.775 2670.4908 + 4600 288.02094 -67445.101 -2983.5242 0.99579107 -3070.2363 86.712106 0.77 -3132.6352 + 4700 332.21641 -83964.647 -2746.0748 1.0053915 -2846.0925 100.01768 0.765 -2916.6652 + 4800 305.52557 -93111.682 -2354.6562 0.99824941 -2446.6383 91.982082 0.76 -2514.039 + 4900 272.82262 -53664.198 -2790.1342 0.99527907 -2872.2707 82.136472 0.755 -2947.2062 + 5000 288.96388 39846.089 1975.7895 1.0371205 1888.7935 86.99599 0.75 1833.3716 + 5100 293.25543 -71819.425 -2916.8817 0.99452016 -3005.1697 88.288011 0.745 -3069.7618 + 5200 296.16486 -64484.821 -2416.0381 1.0153125 -2505.2021 89.163931 0.74 -2589.6878 + 5300 342.07246 60255.985 1749.8984 1.0306374 1646.9134 102.98496 0.735 1608.5673 + 5400 295.53315 61421.189 1620.6432 1.0334762 1531.6695 88.973746 0.73 1492.0969 + 5500 285.1755 24845.113 1144.9009 1.0335035 1059.0454 85.855455 0.725 1014.0263 + 5600 276.79246 66244.072 1523.3405 1.0251134 1440.0089 83.331641 0.72 1390.9078 + 5700 288.43485 14629.129 1208.7278 1.02997 1121.8911 86.836719 0.715 1074.3779 + 5800 276.64233 59262.97 914.26981 1.0332305 830.98336 83.286443 0.71 763.27415 + 5900 358.25384 -111203.23 -3370.7104 1.006331 -3478.567 107.85655 0.705 -3561.6283 + 6000 327.82233 -62936.335 -1881.2426 1.0106476 -1979.9373 98.694786 0.7 -2062.107 + 6100 309.86553 -59110.381 -2698.4147 1.0076375 -2791.7034 93.28868 0.695 -2870.9566 + 6200 294.95752 -58011.845 -1819.201 1.0161986 -1908.0014 88.800448 0.69 -1971.2586 + 6300 307.27252 59016.127 1186.0709 1.0225343 1093.5629 92.508022 0.685 1032.9616 + 6400 292.21611 -118857.83 -2992.9227 1.0031304 -3080.8978 87.975114 0.68 -3175.9068 + 6500 332.21108 97132.547 2290.2726 1.0349752 2190.2565 100.01607 0.675 2121.4674 + 6600 321.93985 -50017.836 -2484.5919 1.0076385 -2581.5157 96.923796 0.67 -2673.6819 + 6700 299.07231 -98136.241 -3013.1584 1.0106261 -3103.1976 90.039252 0.665 -3194.0694 + 6800 285.33731 28487.407 455.68104 1.017186 369.77687 85.904169 0.66 294.02418 + 6900 296.41387 50054.533 2028.1018 1.0445934 1938.8629 89.238897 0.655 1851.1397 + 7000 318.34109 -71579.897 -3114.0324 1.007304 -3209.8728 95.840345 0.65 -3305.5715 + 7100 317.2192 12370.315 1139.7687 1.0177238 1044.2661 95.502589 0.645 961.68146 + 7200 289.91091 43944.333 1213.4685 1.0302599 1126.1874 87.281105 0.64 1039.3329 + 7300 324.81227 42859.173 1288.5297 1.0300698 1190.7411 97.788572 0.635 1083.5764 + 7400 305.72634 76516.72 2404.9462 1.0580673 2312.9036 92.042527 0.63 2218.3674 + 7500 283.77479 -87225.247 -3401.4354 0.9936609 -3486.8692 85.433754 0.625 -3581.9003 + 7600 318.72048 16084.995 1848.3396 1.0296163 1752.385 95.954566 0.62 1653.5125 + 7700 307.36895 74007.024 1754.8928 1.0363553 1662.3558 92.537054 0.615 1572.8568 + 7800 297.44704 28693.429 1261.5958 1.0206402 1172.0459 89.549946 0.61 1093.5903 + 7900 288.47173 -94644.76 -2455.4369 1.0095244 -2542.2847 86.847823 0.605 -2648.2974 + 8000 280.5001 63255.987 1584.7287 1.020587 1500.2808 84.44787 0.6 1418.7144 + 8100 320.23351 68383.584 2300.142 1.0419027 2203.7319 96.410082 0.595 2111.2616 + 8200 354.86765 50012.316 1350.3752 1.0292074 1243.5381 106.8371 0.59 1149.0631 + 8300 278.8859 24200.145 772.82478 1.0232468 688.86288 83.961894 0.585 569.83331 + 8400 295.95754 -12010.401 1078.6687 1.0200526 989.56716 89.101514 0.58 872.63254 + 8500 289.57525 -64114.236 -3017.5291 1.0062613 -3104.7091 87.18005 0.575 -3227.8592 + 8600 329.23192 15948.893 1427.4791 1.0271511 1328.3599 99.119161 0.57 1211.3868 + 8700 327.45998 39407.811 1697.908 1.0343756 1599.3223 98.585695 0.565 1480.9482 + 8800 296.99753 18017.036 871.11717 1.0178295 781.70256 89.414616 0.56 657.09357 + 8900 289.10016 79527.35 2536.8041 1.0462904 2449.7671 87.037018 0.555 2338.4742 + 9000 260.53308 -51430.717 -2680.1664 1.0040128 -2758.603 78.436561 0.55 -2894.7913 + 9100 314.17867 40043.249 2043.6144 1.0361707 1949.0272 94.5872 0.545 1836.5399 + 9200 362.21236 -55153.163 -2232.4614 1.0102652 -2341.5097 109.04831 0.54 -2497.8765 + 9300 266.62049 -72193.959 -2980.9254 1.0063615 -3061.1946 80.269248 0.535 -3225.2604 + 9400 259.59316 7674.9295 1378.2484 1.0326879 1300.0948 78.153588 0.53 1171.7119 + 9500 278.72962 -33127.835 -2581.8908 1.0163553 -2665.8057 83.914845 0.525 -2805.1711 + 9600 299.09039 24570.664 1839.3275 1.025317 1749.2828 90.044695 0.52 1631.8392 + 9700 336.65655 37767.059 1415.9074 1.0245842 1314.5529 101.35443 0.515 1218.4022 + 9800 279.68112 -55007.939 -2548.4947 1.0129837 -2632.696 84.201305 0.51 -2775.6909 + 9900 300.55694 14964.424 1332.287 1.0176315 1241.8008 90.486218 0.505 1127.7276 + 10000 276.77193 -75638.817 -3100.7483 1.0019055 -3184.0738 83.325459 0.5 -3341.663 + 10100 316.26926 61548.301 2406.8933 1.0427988 2311.6767 95.216598 0.495 2206.7159 + 10200 297.28171 56814.839 2073.2348 1.0270036 1983.7347 89.500171 0.49 1859.0176 + 10300 276.84774 83572.576 1920.2202 1.0322243 1836.8719 83.348283 0.485 1704.2233 + 10400 263.28687 -16549.994 1144.9186 1.0177296 1065.6529 79.265623 0.48 940.36339 + 10500 332.79252 47379.311 1538.8168 1.0223403 1438.6257 100.19112 0.475 1301.3762 + 10600 329.01105 39299.248 1330.9914 1.0230094 1231.9387 99.052663 0.47 1077.5639 + 10700 339.21335 -4217.0313 981.9193 1.0235915 879.79511 102.12419 0.465 741.87272 + 10800 297.11192 -80013.424 -3682.9794 1.0009566 -3772.4285 89.449054 0.46 -3958.8283 + 10900 299.63096 47783.864 1833.1832 1.0435283 1742.9757 90.207441 0.455 1620.9328 + 11000 363.58243 67370.65 1769.9236 1.0450565 1660.4628 109.46079 0.45 1543.803 + 11100 306.04664 50246.004 1323.7676 1.0341876 1231.6287 92.138957 0.445 1063.5345 + 11200 255.68488 43750.967 2205.2392 1.0530607 2128.2623 76.976955 0.44 1986.9636 + 11300 271.71957 -40289.299 -3083.4093 1.0168497 -3165.2137 81.804388 0.435 -3344.1558 + 11400 291.74007 -115249.24 -3319.2153 1.0067921 -3407.0471 87.831795 0.43 -3569.0256 + 11500 270.22077 28235.119 596.78348 1.0195886 515.43032 81.353155 0.425 373.78255 + 11600 297.08506 29790.701 1031.3514 1.0317561 941.91046 89.440969 0.42 803.92835 + 11700 295.33119 -101140.58 -3068.1166 1.0107252 -3157.0295 88.912943 0.415 -3348.5652 + 11800 308.77287 -120312.75 -3553.1266 0.99681611 -3646.0863 92.95972 0.41 -3835.4663 + 11900 293.86337 82287.969 1847.0953 1.0331446 1758.6242 88.47104 0.405 1625.4846 + 12000 279.9866 27919.689 2249.3175 1.0384909 2165.0242 84.293273 0.4 2028.6311 + 12100 292.19439 47035.018 1220.3593 1.0210948 1132.3908 87.968573 0.395 976.68113 + 12200 317.78325 46886.483 2039.3721 1.0310567 1943.6997 95.672401 0.39 1763.6359 + 12300 357.44038 51492.35 1898.3396 1.0414835 1790.7279 107.61165 0.385 1638.1905 + 12400 288.16042 -50528.478 -2837.5599 1.0130798 -2924.314 86.7541 0.38 -3115.1383 + 12500 300.37356 -114034.29 -3091.586 1.0130272 -3182.017 90.431009 0.375 -3364.511 + 12600 265.4402 73960.28 1297.3012 1.0343798 1217.3873 79.913907 0.37 1094.544 + 12700 287.07994 22722.337 1711.9055 1.0268893 1625.4767 86.428809 0.365 1490.443 + 12800 315.39745 46072.191 926.21362 1.0205906 831.25949 94.954129 0.36 662.83753 + 12900 307.48549 -120472.73 -3181.5418 1.005689 -3274.1139 92.57214 0.355 -3469.7834 + 13000 291.00577 -59154.878 -2652.0402 1.012821 -2739.6509 87.610727 0.35 -2966.2448 + 13100 318.37718 86703.775 2087.145 1.036209 1991.2938 95.851211 0.345 1819.7078 + 13200 280.41509 -107033.79 -2683.9682 1.0135499 -2768.3905 84.422277 0.34 -2953.8355 + 13300 275.01919 112086.85 2632.1169 1.0437945 2549.3192 82.797775 0.335 2394.6707 + 13400 299.46547 -111959.62 -3475.4354 0.98732074 -3565.593 90.157617 0.33 -3792.6798 + 13500 275.65631 17625.49 1762.6531 1.0255473 1679.6636 82.989588 0.325 1521.2745 + 13600 302.63525 122466.63 2853.8095 1.0438137 2762.6976 91.111917 0.32 2611.7188 + 13700 302.21323 -94399.663 -3003.7573 1.0068914 -3094.7422 90.984863 0.315 -3328.4539 + 13800 305.70483 30039.825 1792.3286 1.0225478 1700.2926 92.036052 0.31 1502.8476 + 13900 273.15564 -27822.597 -2346.6702 1.0131002 -2428.9069 82.236732 0.305 -2683.7804 + 14000 257.14635 -1821.0012 1378.2522 1.0172653 1300.8352 77.416947 0.3 1067.8821 + 14100 323.74174 -76139.363 -2747.4152 1.0139806 -2844.8814 97.466276 0.295 -3052.598 + 14200 274.99913 54440.943 983.27131 1.0186356 900.47957 82.791736 0.29 767.64274 + 14300 291.8774 1281.7286 1258.7881 1.0214356 1170.915 87.873139 0.285 1042.8585 + 14400 308.97245 -47961.551 -2680.7892 1.0155221 -2773.809 93.019806 0.28 -3007.3204 + 14500 311.05309 86026.739 2115.2413 1.0311818 2021.5951 93.646208 0.275 1830.5463 + 14600 269.27432 -12972.747 971.48792 1.0172239 890.41971 81.068214 0.27 711.81484 + 14700 262.20739 -77722.459 -3215.6796 1.0029421 -3294.6202 78.940634 0.265 -3537.1929 + 14800 300.33592 -107332.8 -2798.6664 1.0126785 -2889.086 90.419677 0.26 -3125.8439 + 14900 307.0173 -73204.94 -2652.7275 1.016875 -2745.1587 92.431185 0.255 -3016.0143 + 15000 334.08711 64440.709 1615.3385 1.0369481 1514.7576 100.58087 0.25 1323.9179 + 15100 293.46703 35179.395 2020.1996 1.0331703 1931.8479 88.351717 0.245 1768.9681 + 15200 307.80546 54006.291 1111.7619 1.0246134 1019.0935 92.668471 0.24 822.22754 + 15300 336.59792 33832.907 1282.8271 1.0242407 1181.4903 101.33678 0.235 956.25285 + 15400 285.46526 -99629.94 -2336.7535 1.0041261 -2422.6962 85.942688 0.23 -2730.1887 + 15500 269.15938 122546.45 3012.0792 1.0318941 2931.0456 81.033612 0.225 2695.4331 + 15600 294.50818 -104733.19 -1914.0242 1.0017241 -2002.6894 88.665166 0.22 -2281.5773 + 15700 321.05125 -40438.501 -1721.9536 1.0125007 -1818.6099 96.656271 0.215 -2084.0893 + 15800 303.22185 -42224.408 -2145.481 1.0090867 -2236.7695 91.288521 0.21 -2506.3355 + 15900 281.65025 78652.063 2791.9418 1.0460521 2707.1477 84.794136 0.205 2500.7128 + 16000 286.5056 63174.412 1725.0409 1.0185277 1638.785 86.255897 0.2 1442.2427 + 16100 271.74574 -75051.584 -2101.5778 1.0091727 -2183.3901 81.812265 0.195 -2447.1967 + 16200 266.40007 -64120.09 -2223.3693 1.0064388 -2303.5722 80.202888 0.19 -2525.4243 + 16300 330.67137 46204.124 1837.3168 1.0271037 1737.7643 99.552523 0.185 1529.8186 + 16400 310.94573 18510.676 1531.823 1.0188695 1438.2091 93.613887 0.18 1195.3041 + 16500 270.29191 79005.409 1989.9392 1.0354088 1908.5646 81.374574 0.175 1678.7342 + 16600 334.24108 17143.221 1644.1483 1.0230561 1543.521 100.62723 0.17 1379.3215 + 16700 292.28721 -78618.031 -2768.3997 0.99940789 -2856.3962 87.996518 0.165 -3087.379 + 16800 346.09157 -69398.937 -2647.1375 1.0153026 -2751.3325 104.19496 0.16 -3011.3476 + 16900 284.37042 39314.526 2287.7061 1.0343186 2202.093 85.613074 0.155 2045.8316 + 17000 281.69389 86032.163 1817.9125 1.0237583 1733.1052 84.807275 0.15 1528.8391 + 17100 297.2629 55128.393 2617.4156 1.0419182 2527.9211 89.494508 0.145 2369.0347 + 17200 328.81472 47063.86 1880.9768 1.0364627 1781.9832 98.993555 0.14 1526.7115 + 17300 313.41363 -46685.063 -2310.803 1.008117 -2405.1599 94.356878 0.135 -2685.8034 + 17400 288.17114 68721.523 2771.6788 1.0429105 2684.9215 86.757326 0.13 2490.5845 + 17500 260.01702 -23324.539 -1436.6738 1.0100415 -1514.955 78.281195 0.125 -1812.4813 + 17600 297.6633 72795.463 2635.741 1.0362827 2546.126 89.615054 0.12 2336.0152 + 17700 301.02937 93833.118 2690.518 1.0276466 2599.8896 90.628448 0.115 2364.8751 + 17800 238.92837 -78317.212 -2175.2589 1.0084077 -2247.1911 71.932208 0.11 -2579.4429 + 17900 299.27724 -65278.891 -2589.1173 1.0034773 -2679.2182 90.10095 0.105 -2987.498 + 18000 315.15753 -72437.481 -2338.6068 1.0136139 -2433.4887 94.881898 0.1 -2718.125 + 18100 268.39411 -42194.209 -2285.3824 1.0108104 -2366.1856 80.803219 0.095 -2656.3853 + 18200 284.91941 40905.162 2045.1299 1.0266185 1959.3515 85.778354 0.09 1723.6803 + 18300 329.41629 -56526.814 -2104.8386 1.0137784 -2204.0133 99.174667 0.085 -2540.6829 + 18400 293.16732 -22085.551 -1652.5444 1.0163557 -1740.8059 88.261484 0.08 -2052.7864 + 18500 276.28141 29367.359 2314.5497 1.0270087 2231.3719 83.177784 0.075 1971.9405 + 18600 331.18031 94669.124 2466.3928 1.0225403 2366.6871 99.705745 0.07 2081.8675 + 18700 265.4491 49872.536 2571.9864 1.0255308 2492.0698 79.916587 0.065 2260.4261 + 18800 314.51042 60758.629 2560.3258 1.0300818 2465.6387 94.687078 0.06 2219.6547 + 18900 317.70309 66345.835 1768.2041 1.0248229 1672.5558 95.648268 0.055 1410.3087 + 19000 291.39831 -96336.931 -2448.6251 1.0100498 -2536.354 87.728905 0.05 -2805.9396 + 19100 303.37353 -21421.495 -2012.0929 0.99771284 -2103.4271 91.334186 0.045 -2436.2173 + 19200 293.92948 36383.881 2042.0163 1.0251299 1953.5254 88.490944 0.04 1633.579 + 19300 287.24409 -46691.027 -2399.698 1.0112067 -2486.1762 86.478228 0.035 -2811.3506 + 19400 333.42205 21152.63 1524.8699 1.0189912 1424.4893 100.38065 0.03 1118.2463 + 19500 309.17989 60445.761 2298.6966 1.0338543 2205.6144 93.082259 0.025 1928.6181 + 19600 255.92246 -32795.547 -1724.7933 1.0157044 -1801.8418 77.04848 0.02 -2213.9484 + 19700 342.62332 33538.746 2439.138 1.0225905 2335.9872 103.1508 0.015 2081.9185 + 19800 295.68946 81474.342 2308.3249 1.0240743 2219.3041 89.020804 0.01 1910.5545 + 19900 306.4947 43488.052 2330.4958 1.0222707 2238.222 92.27385 0.005 1957.4368 + 20000 313.31679 -25133.284 -1161.6979 1.0163289 -1256.0256 94.327722 0 -1649.7551 +Loop time of 11.8252 on 2 procs for 20000 steps with 102 atoms + +Performance: 29.226 ns/day, 0.821 hours/ns, 1691.296 timesteps/s, 172.512 katom-step/s +99.3% CPU use with 2 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 6.8298 | 8.6298 | 10.43 | 61.3 | 72.98 +Bond | 0.045072 | 0.045296 | 0.045519 | 0.1 | 0.38 +Neigh | 0.10567 | 0.10572 | 0.10577 | 0.0 | 0.89 +Comm | 0.73714 | 2.5381 | 4.3392 | 113.0 | 21.46 +Output | 0.0032977 | 0.0035468 | 0.003796 | 0.4 | 0.03 +Modify | 0.43872 | 0.44155 | 0.44438 | 0.4 | 3.73 +Other | | 0.06121 | | | 0.52 + +Nlocal: 51 ave 51 max 51 min +Histogram: 2 0 0 0 0 0 0 0 0 0 +Nghost: 3317 ave 3317 max 3317 min +Histogram: 2 0 0 0 0 0 0 0 0 0 +Neighs: 18320 ave 21941 max 14699 min +Histogram: 1 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 36640 +Ave neighs/atom = 359.21569 +Ave special neighs/atom = 2 +Neighbor list builds = 181 +Dangerous builds = 0 +Total wall time: 0:00:11 diff --git a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 new file mode 100644 index 0000000000..8fa06d5677 --- /dev/null +++ b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 @@ -0,0 +1,433 @@ +LAMMPS (8 Feb 2023) +Processor partition = 1 + using 1 OpenMP thread(s) per MPI task +# Example for alchemical transformation of two water molecules into a hydronium and hydroxyl ion +# WARNING: This input is intended for demonstrating the method, only +# The force field parameters are made up and NOT suitable for production simulations. + +# set up different names for two partitions +variable name world twowater twoions + +units real +atom_style full +atom_modify map array +region box block -5 5 -5 5 -5 5 +boundary p p p +create_box 2 box bond/types 2 angle/types 2 extra/bond/per/atom 3 extra/angle/per/atom 3 extra/special/per/atom 3 +Created orthogonal box = (-5 -5 -5) to (5 5 5) + 1 by 1 by 2 MPI processor grid + +mass 1 15.9994 +mass 2 1.008 + +pair_style lj/cut/coul/cut 10.0 +pair_coeff 1 1 0.1553 3.166 +pair_coeff 1 2 0.0 1.0 +pair_coeff 2 2 0.0 1.0 + +bond_style harmonic +bond_coeff * 1000.0 1.0 + +angle_style harmonic +angle_coeff * 100.0 109.47 + +molecule water h2o.mol +Read molecule template water: + 1 molecules + 0 fragments + 3 atoms with max type 2 + 2 bonds with max type 1 + 1 angles with max type 1 + 0 dihedrals with max type 0 + 0 impropers with max type 0 + +# create the two molecules we want to transform ... +create_atoms 0 single -2.0 0.0 0.0 mol water 453624 +Created 3 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.004 seconds +create_atoms 0 single 2.0 0.0 0.0 mol water 767353 +Created 3 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.000 seconds + +# ... and put them in a group +group transform id 1:6 +6 atoms in group transform + +# now fill the rest of the box with more water +create_atoms 0 random 32 34564 NULL mol water 25367 overlap 1.33 +Created 96 atoms + using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) + create_atoms CPU = 0.001 seconds + +# change topology and settings for the two states +# we cannot simply create a different topology directly or +# load a different data file because the order and position +# of all atoms must be maintained across both replica + +# we first have to remove all topology data in the transform group +delete_bonds transform bond 1 +System init for delete_bonds ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 2 2 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Deleting bonds ... + 68 total bonds, 64 turned on, 4 turned off + 34 total angles, 34 turned on, 0 turned off + 0 total dihedrals, 0 turned on, 0 turned off + 0 total impropers, 0 turned on, 0 turned off +delete_bonds transform angle 1 remove +System init for delete_bonds ... +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Deleting bonds ... + 64 total bonds, 64 turned on, 0 turned off + 32 total angles, 32 turned on, 0 turned off + 0 total dihedrals, 0 turned on, 0 turned off + 0 total impropers, 0 turned on, 0 turned off + +# then generate different topologies for the two partitions. select by name. +if "${name} == twowater" then "create_bonds single/bond 2 1 2" "create_bonds single/bond 2 1 3" "create_bonds single/bond 2 4 5" "create_bonds single/bond 2 4 6" "create_bonds single/angle 2 2 1 3" "create_bonds single/angle 2 5 4 6" else "create_bonds single/bond 2 1 2" "create_bonds single/bond 2 3 4" "create_bonds single/bond 2 4 5" "create_bonds single/bond 2 4 6" "create_bonds single/angle 2 3 4 5" "create_bonds single/angle 2 5 4 6" "create_bonds single/angle 2 3 4 6" "set atom 1 charge -1.1354" "set atom 2 charge 0.1354" "set atom 3 charge 0.56775" "set atom 4 charge -0.70305" "set atom 5*6 charge 0.56775" +create_bonds single/bond 2 1 2 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/bond 2 3 4 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/bond 2 4 5 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/bond 2 4 6 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 3 = max # of 1-2 neighbors + 2 = max # of 1-3 neighbors + 2 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/angle 2 3 4 5 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 3 = max # of 1-2 neighbors + 2 = max # of 1-3 neighbors + 2 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/angle 2 5 4 6 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 3 = max # of 1-2 neighbors + 2 = max # of 1-3 neighbors + 2 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +create_bonds single/angle 2 3 4 6 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 3 = max # of 1-2 neighbors + 2 = max # of 1-3 neighbors + 2 = max # of 1-4 neighbors + 7 = max # of special neighbors + special bonds CPU = 0.000 seconds +set atom 1 charge -1.1354 +Setting atom values ... + 1 settings made for charge +set atom 2 charge 0.1354 +Setting atom values ... + 1 settings made for charge +set atom 3 charge 0.56775 +Setting atom values ... + 1 settings made for charge +set atom 4 charge -0.70305 +Setting atom values ... + 1 settings made for charge +set atom 5*6 charge 0.56775 +Setting atom values ... + 2 settings made for charge + +velocity all create 300.0 5463576 +timestep 0.2 + +# since the trajectory and forces are kept identical through fix alchemy, +# we can do fix npt simulations, but we must use the "mixed" pressure + +fix integrate all npt temp 300 300 1.0 iso 1.0 1.0 10.0 +fix transform all alchemy +compute pressure all pressure/alchemy transform +fix_modify integrate press pressure + +# only need to output a dump file from one partition +# if "${name} == twowater" then # "dump 1 all atom 100 ${name}.lammpstrj" # "dump_modify 1 sort id" + +thermo_style custom step temp press etotal density pe ke f_transform[1] f_transform[4] +thermo_modify colname f_transform[1] lambda colname f_transform[4] EPot_mixed +thermo_modify press pressure + +thermo 100 +run 20000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:936) +Per MPI rank memory allocation (min/avg/max) = 7.535 | 7.535 | 7.535 Mbytes + Step Temp Press TotEng Density PotEng KinEng lambda EPot_mixed + 0 300 184631.17 10769.267 1.0171193 10678.948 90.318545 0 -892.51464 + 100 293.4335 -513.97927 21497.846 0.3029684 21409.505 88.341623 0.005 207.29243 + 200 320.81838 1513.3 3300.6279 0.64509407 3204.0418 96.586165 0.01 46.402434 + 300 261.53825 -3808.6942 -362.14861 0.88817871 -440.88779 78.739179 0.015 -614.76481 + 400 308.32444 1375.0327 -821.01681 0.97694485 -913.84152 92.824715 0.02 -897.24386 + 500 292.60623 -12843.384 -831.87625 1.0140814 -919.96881 88.092563 0.025 -1221.948 + 600 326.16112 91608.645 2941.9339 1.0263567 2843.7393 98.194659 0.03 2786.0743 + 700 317.22811 -60420.408 -1637.1259 0.9919143 -1732.6311 95.505272 0.035 -1616.7677 + 800 309.94673 -56793.931 -1501.6195 1.0024958 -1594.9326 93.313126 0.04 -1640.8606 + 900 272.80718 -5076.2282 -1452.719 1.0141078 -1534.8508 82.131824 0.045 -1357.1812 + 1000 346.52557 -16919.192 -1469.4601 1.0170322 -1573.7857 104.32562 0.05 -1514.1398 + 1100 300.62984 -51826.972 -2581.5818 1.0063592 -2672.09 90.508164 0.055 -2565.9668 + 1200 293.72767 45222.698 2045.9381 1.0272336 1957.5079 88.430186 0.06 1951.1683 + 1300 289.4971 94600.203 2042.1709 1.0298091 1955.0144 87.156524 0.065 2088.1011 + 1400 328.98666 35468.53 1805.9965 1.0198467 1706.9512 99.045321 0.07 1716.9268 + 1500 392.9407 41220.21 1663.5291 1.0194044 1545.2297 118.29944 0.075 1690.6416 + 1600 284.90093 -37995.141 -2488.5372 1.0068497 -2574.31 85.772791 0.08 -2529.5874 + 1700 267.67454 25275.255 1482.7666 1.0313556 1402.18 80.586582 0.085 1520.9695 + 1800 247.16495 -68222.994 -2869.7712 1.0018048 -2944.1832 74.41193 0.09 -2788.9545 + 1900 328.41849 -51979.665 -2578.9515 1.0154952 -2677.8258 98.874268 0.095 -2461.3422 + 2000 313.8715 21726.003 1310.0519 1.018831 1215.5571 94.494725 0.1 1363.0739 + 2100 296.07341 66130.11 1209.3035 1.0224882 1120.1671 89.136398 0.105 1272.1884 + 2200 282.67889 51746.464 2238.8823 1.0362683 2153.7785 85.103821 0.11 2276.1488 + 2300 281.04207 -71937.759 -2935.0422 1.0111968 -3019.6532 84.611035 0.115 -2892.2526 + 2400 321.00806 -51658.758 -2663.4071 1.0168161 -2760.0503 96.643269 0.12 -2622.9732 + 2500 288.95906 49645.753 2369.0667 1.0355648 2282.0722 86.99454 0.125 2275.0348 + 2600 303.0064 -48470.216 -2107.8769 1.000439 -2199.1005 91.223657 0.13 -2082.5895 + 2700 361.7083 54973.584 1906.9779 1.0223169 1798.0813 108.89656 0.135 1817.1972 + 2800 289.27827 33564.017 1687.0255 1.0257088 1599.9349 87.090642 0.14 1682.9162 + 2900 283.94365 -47190.274 -2449.1599 1.0059224 -2534.6445 85.484591 0.145 -2395.9575 + 3000 337.10996 61988.686 2157.6059 1.0258 2056.115 101.49094 0.15 2168.1085 + 3100 305.28249 -50123.109 -2137.6015 1.0143567 -2229.5104 91.9089 0.155 -2040.3453 + 3200 270.19471 -18114.265 -2175.7381 1.0132413 -2257.0834 81.345309 0.16 -2076.9595 + 3300 263.39996 -109301.89 -2594.4684 0.99956867 -2673.7681 79.299671 0.165 -2471.0269 + 3400 249.01722 -37585.949 -2655.0291 1.0080932 -2729.9987 74.969576 0.17 -2537.734 + 3500 267.88868 65528.865 2038.1308 1.0390872 1957.4797 80.651054 0.175 2061.6421 + 3600 351.46458 -67583.574 -3068.3126 1.0059621 -3174.1251 105.81256 0.18 -3004.5028 + 3700 332.82565 -61204.843 -2491.3087 1.0053485 -2591.5097 100.20109 0.185 -2415.4435 + 3800 298.0279 61123.085 1795.9521 1.020672 1706.2273 89.724819 0.19 1831.9734 + 3900 317.04715 43210.045 1685.6151 1.0287838 1590.1643 95.450792 0.195 1721.1961 + 4000 261.75174 -111920.72 -3478.9188 0.99457106 -3557.7223 78.803455 0.2 -3394.3528 + 4100 338.34245 89763.083 1919.3836 1.0318272 1817.5216 101.86199 0.205 1973.419 + 4200 288.52623 19989.792 1576.8543 1.0204119 1489.99 86.86423 0.21 1633.1439 + 4300 322.05593 -33791.403 -2303.9654 1.0155065 -2400.9242 96.958741 0.215 -2246.4353 + 4400 280.59054 -27839.599 -1776.7852 1.0123506 -1861.2603 84.475096 0.22 -1672.1425 + 4500 296.08336 75206.112 2655.8862 1.0329133 2566.7468 89.139393 0.225 2670.4908 + 4600 288.02094 -67445.101 -3254.8238 0.99579107 -3341.5359 86.712106 0.23 -3132.6352 + 4700 332.21641 -83964.647 -3046.3841 1.0053915 -3146.4017 100.01768 0.235 -2916.6652 + 4800 305.52557 -93111.682 -2635.4926 0.99824941 -2727.4747 91.982082 0.24 -2514.039 + 4900 272.82262 -53664.198 -3095.9932 0.99527907 -3178.1297 82.136472 0.245 -2947.2062 + 5000 288.96388 39846.089 1754.1018 1.0371205 1667.1058 86.99599 0.25 1833.3716 + 5100 293.25543 -71819.425 -3170.1841 0.99452016 -3258.4721 88.288011 0.255 -3069.7618 + 5200 296.16486 -64484.821 -2740.9832 1.0153125 -2830.1471 89.163931 0.26 -2589.6878 + 5300 342.07246 60255.985 1605.1961 1.0306374 1502.2111 102.98496 0.265 1608.5673 + 5400 295.53315 61421.189 1474.0782 1.0334762 1385.1045 88.973746 0.27 1492.0969 + 5500 285.1755 24845.113 981.19505 1.0335035 895.3396 85.855455 0.275 1014.0263 + 5600 276.79246 66244.072 1347.9794 1.0251134 1264.6478 83.331641 0.28 1390.9078 + 5700 288.43485 14629.129 1042.0147 1.02997 955.17799 86.836719 0.285 1074.3779 + 5800 276.64233 59262.97 680.78976 1.0332305 597.50331 83.286443 0.29 763.27415 + 5900 358.25384 -111203.23 -3652.2742 1.006331 -3760.1307 107.85655 0.295 -3561.6283 + 6000 327.82233 -62936.335 -2155.1414 1.0106476 -2253.8362 98.694786 0.3 -2062.107 + 6100 309.86553 -59110.381 -2958.2613 1.0076375 -3051.5499 93.28868 0.305 -2870.9566 + 6200 294.95752 -58011.845 -2023.2564 1.0161986 -2112.0569 88.800448 0.31 -1971.2586 + 6300 307.27252 59016.127 993.68575 1.0225343 901.17773 92.508022 0.315 1032.9616 + 6400 292.21611 -118857.83 -3289.8257 1.0031304 -3377.8009 87.975114 0.32 -3175.9068 + 6500 332.21108 97132.547 2078.6137 1.0349752 1978.5976 100.01607 0.325 2121.4674 + 6600 321.93985 -50017.836 -2763.8832 1.0076385 -2860.807 96.923796 0.33 -2673.6819 + 6700 299.07231 -98136.241 -3284.4174 1.0106261 -3374.4566 90.039252 0.335 -3194.0694 + 6800 285.33731 28487.407 232.87902 1.017186 146.97485 85.904169 0.34 294.02418 + 6900 296.41387 50054.533 1773.8315 1.0445934 1684.5926 89.238897 0.345 1851.1397 + 7000 318.34109 -71579.897 -3387.4573 1.007304 -3483.2977 95.840345 0.35 -3305.5715 + 7100 317.2192 12370.315 907.13585 1.0177238 811.63326 95.502589 0.355 961.68146 + 7200 289.91091 43944.333 972.20602 1.0302599 884.92492 87.281105 0.36 1039.3329 + 7300 324.81227 42859.173 994.92755 1.0300698 897.13897 97.788572 0.365 1083.5764 + 7400 305.72634 76516.72 2149.4427 1.0580673 2057.4002 92.042527 0.37 2218.3674 + 7500 283.77479 -87225.247 -3654.8517 0.9936609 -3740.2855 85.433754 0.375 -3581.9003 + 7600 318.72048 16084.995 1588.1487 1.0296163 1492.1941 95.954566 0.38 1653.5125 + 7700 307.36895 74007.024 1522.4279 1.0363553 1429.8909 92.537054 0.385 1572.8568 + 7800 297.44704 28693.429 1060.4277 1.0206402 970.87774 89.549946 0.39 1093.5903 + 7900 288.47173 -94644.76 -2723.8234 1.0095244 -2810.6712 86.847823 0.395 -2648.2974 + 8000 280.5001 63255.987 1380.8125 1.020587 1296.3647 84.44787 0.4 1418.7144 + 8100 320.23351 68383.584 2071.8202 1.0419027 1975.4101 96.410082 0.405 2111.2616 + 8200 354.86765 50012.316 1119.9483 1.0292074 1013.1112 106.8371 0.41 1149.0631 + 8300 278.8859 24200.145 486.00653 1.0232468 402.04464 83.961894 0.415 569.83331 + 8400 295.95754 -12010.401 800.25292 1.0200526 711.1514 89.101514 0.42 872.63254 + 8500 289.57525 -64114.236 -3307.2939 1.0062613 -3394.4739 87.18005 0.425 -3227.8592 + 8600 329.23192 15948.893 1155.4486 1.0271511 1056.3294 99.119161 0.43 1211.3868 + 8700 327.45998 39407.811 1425.7837 1.0343756 1327.198 98.585695 0.435 1480.9482 + 8800 296.99753 18017.036 587.91493 1.0178295 498.50031 89.414616 0.44 657.09357 + 8900 289.10016 79527.35 2286.7077 1.0462904 2199.6707 87.037018 0.445 2338.4742 + 9000 260.53308 -51430.717 -2982.8072 1.0040128 -3061.2437 78.436561 0.45 -2894.7913 + 9100 314.17867 40043.249 1796.3896 1.0361707 1701.8024 94.5872 0.455 1836.5399 + 9200 362.21236 -55153.163 -2572.3893 1.0102652 -2681.4376 109.04831 0.46 -2497.8765 + 9300 266.62049 -72193.959 -3333.755 1.0063615 -3414.0242 80.269248 0.465 -3225.2604 + 9400 259.59316 7674.9295 1105.0933 1.0326879 1026.9397 78.153588 0.47 1171.7119 + 9500 278.72962 -33127.835 -2875.2917 1.0163553 -2959.2065 83.914845 0.475 -2805.1711 + 9600 299.09039 24570.664 1594.6533 1.025317 1504.6086 90.044695 0.48 1631.8392 + 9700 336.65655 37767.059 1217.6584 1.0245842 1116.3039 101.35443 0.485 1218.4022 + 9800 279.68112 -55007.939 -2840.321 1.0129837 -2924.5223 84.201305 0.49 -2775.6909 + 9900 300.55694 14964.424 1101.8362 1.0176315 1011.35 90.486218 0.495 1127.7276 + 10000 276.77193 -75638.817 -3415.9268 1.0019055 -3499.2523 83.325459 0.5 -3341.663 + 10100 316.26926 61548.301 2199.0502 1.0427988 2103.8336 95.216598 0.505 2206.7159 + 10200 297.28171 56814.839 1828.6916 1.0270036 1739.1915 89.500171 0.51 1859.0176 + 10300 276.84774 83572.576 1662.6501 1.0322243 1579.3018 83.348283 0.515 1704.2233 + 10400 263.28687 -16549.994 903.97712 1.0177296 824.71149 79.265623 0.52 940.36339 + 10500 332.79252 47379.311 1277.3892 1.0223403 1177.1981 100.19112 0.525 1301.3762 + 10600 329.01105 39299.248 1039.7181 1.0230094 940.66548 99.052663 0.53 1077.5639 + 10700 339.21335 -4217.0313 724.12043 1.0235915 621.99624 102.12419 0.535 741.87272 + 10800 297.11192 -80013.424 -4028.1643 1.0009566 -4117.6134 89.449054 0.54 -3958.8283 + 10900 299.63096 47783.864 1609.2512 1.0435283 1519.0437 90.207441 0.545 1620.9328 + 11000 363.58243 67370.65 1557.8148 1.0450565 1448.354 109.46079 0.55 1543.803 + 11100 306.04664 50246.004 1020.8953 1.0341876 928.75637 92.138957 0.555 1063.5345 + 11200 255.68488 43750.967 1952.9201 1.0530607 1875.9431 76.976955 0.56 1986.9636 + 11300 271.71957 -40289.299 -3400.121 1.0168497 -3481.9254 81.804388 0.565 -3344.1558 + 11400 291.74007 -115249.24 -3603.3881 1.0067921 -3691.2199 87.831795 0.57 -3569.0256 + 11500 270.22077 28235.119 350.43952 1.0195886 269.08637 81.353155 0.575 373.78255 + 11600 297.08506 29790.701 793.45124 1.0317561 704.01027 89.440969 0.58 803.92835 + 11700 295.33119 -101140.58 -3395.5279 1.0107252 -3484.4409 88.912943 0.585 -3348.5652 + 11800 308.77287 -120312.75 -3874.1096 0.99681611 -3967.0693 92.95972 0.59 -3835.4663 + 11900 293.86337 82287.969 1623.3312 1.0331446 1534.8602 88.47104 0.595 1625.4846 + 12000 279.9866 27919.689 2021.9956 1.0384909 1937.7024 84.293273 0.6 2028.6311 + 12100 292.19439 47035.018 962.98803 1.0210948 875.01946 87.968573 0.605 976.68113 + 12200 317.78325 46886.483 1744.1855 1.0310567 1648.5131 95.672401 0.61 1763.6359 + 12300 357.44038 51492.35 1650.3113 1.0414835 1542.6996 107.61165 0.615 1638.1905 + 12400 288.16042 -50528.478 -3145.341 1.0130798 -3232.0951 86.7541 0.62 -3115.1383 + 12500 300.37356 -114034.29 -3383.5763 1.0130272 -3474.0074 90.431009 0.625 -3364.511 + 12600 265.4402 73960.28 1102.3119 1.0343798 1022.398 79.913907 0.63 1094.544 + 12700 287.07994 22722.337 1499.2541 1.0268893 1412.8252 86.428809 0.635 1490.443 + 12800 315.39745 46072.191 663.05431 1.0205906 568.10018 94.954129 0.64 662.83753 + 12900 307.48549 -120472.73 -3484.9054 1.005689 -3577.4775 92.57214 0.645 -3469.7834 + 13000 291.00577 -59154.878 -3000.6461 1.012821 -3088.2569 87.610727 0.65 -2966.2448 + 13100 318.37718 86703.775 1825.1817 1.036209 1729.3305 95.851211 0.655 1819.7078 + 13200 280.41509 -107033.79 -2964.9455 1.0135499 -3049.3678 84.422277 0.66 -2953.8355 + 13300 275.01919 112086.85 2399.5628 1.0437945 2316.765 82.797775 0.665 2394.6707 + 13400 299.46547 -111959.62 -3814.3709 0.98732074 -3904.5286 90.157617 0.67 -3792.6798 + 13500 275.65631 17625.49 1528.0027 1.0255473 1445.0131 82.989588 0.675 1521.2745 + 13600 302.63525 122466.63 2631.7819 1.0438137 2540.67 91.111917 0.68 2611.7188 + 13700 302.21323 -94399.663 -3344.9423 1.0068914 -3435.9271 90.984863 0.685 -3328.4539 + 13800 305.70483 30039.825 1506.1765 1.0225478 1414.1404 92.036052 0.69 1502.8476 + 13900 273.15564 -27822.597 -2713.3946 1.0131002 -2795.6313 82.236732 0.695 -2683.7804 + 14000 257.14635 -1821.0012 1045.462 1.0172653 968.04508 77.416947 0.7 1067.8821 + 14100 323.74174 -76139.363 -3042.0486 1.0139806 -3139.5149 97.466276 0.705 -3052.598 + 14200 274.99913 54440.943 796.17718 1.0186356 713.38545 82.791736 0.71 767.64274 + 14300 291.8774 1281.7286 1079.6881 1.0214356 991.81498 87.873139 0.715 1042.8585 + 14400 308.97245 -47961.551 -3005.1106 1.0155221 -3098.1304 93.019806 0.72 -3007.3204 + 14500 311.05309 86026.739 1851.7257 1.0311818 1758.0795 93.646208 0.725 1830.5463 + 14600 269.27432 -12972.747 726.82371 1.0172239 645.7555 81.068214 0.73 711.81484 + 14700 262.20739 -77722.459 -3545.7104 1.0029421 -3624.651 78.940634 0.735 -3537.1929 + 14800 300.33592 -107332.8 -3118.6094 1.0126785 -3209.0291 90.419677 0.74 -3125.8439 + 14900 307.0173 -73204.94 -3016.2921 1.016875 -3108.7233 92.431185 0.745 -3016.0143 + 15000 334.08711 64440.709 1360.8856 1.0369481 1260.3047 100.58087 0.75 1323.9179 + 15100 293.46703 35179.395 1804.4648 1.0331703 1716.1131 88.351717 0.755 1768.9681 + 15200 307.80546 54006.291 852.72781 1.0246134 760.05934 92.668471 0.76 822.22754 + 15300 336.59792 33832.907 988.39905 1.0242407 887.06227 101.33678 0.765 956.25285 + 15400 285.46526 -99629.94 -2736.0944 1.0041261 -2822.0371 85.942688 0.77 -2730.1887 + 15500 269.15938 122546.45 2708.063 1.0318941 2627.0294 81.033612 0.775 2695.4331 + 15600 294.50818 -104733.19 -2271.5729 1.0017241 -2360.238 88.665166 0.78 -2281.5773 + 15700 321.05125 -40438.501 -2060.144 1.0125007 -2156.8002 96.656271 0.785 -2084.0893 + 15800 303.22185 -42224.408 -2486.7037 1.0090867 -2577.9922 91.288521 0.79 -2506.3355 + 15900 281.65025 78652.063 2532.2753 1.0460521 2447.4812 84.794136 0.795 2500.7128 + 16000 286.5056 63174.412 1479.3631 1.0185277 1393.1072 86.255897 0.8 1442.2427 + 16100 271.74574 -75051.584 -2429.2879 1.0091727 -2511.1002 81.812265 0.805 -2447.1967 + 16200 266.40007 -64120.09 -2497.2609 1.0064388 -2577.4638 80.202888 0.81 -2525.4243 + 16300 330.67137 46204.124 1582.1688 1.0271037 1482.6162 99.552523 0.815 1529.8186 + 16400 310.94573 18510.676 1235.5974 1.0188695 1141.9835 93.613887 0.82 1195.3041 + 16500 270.29191 79005.409 1711.3568 1.0354088 1629.9822 81.374574 0.825 1678.7342 + 16600 334.24108 17143.221 1446.3175 1.0230561 1345.6903 100.62723 0.83 1379.3215 + 16700 292.28721 -78618.031 -3045.0258 0.99940789 -3133.0223 87.996518 0.835 -3087.379 + 16800 346.09157 -69398.937 -2956.6793 1.0153026 -3060.8742 104.19496 0.84 -3011.3476 + 16900 284.37042 39314.526 2102.7814 1.0343186 2017.1683 85.613074 0.845 2045.8316 + 17000 281.69389 86032.163 1577.5995 1.0237583 1492.7922 84.807275 0.85 1528.8391 + 17100 297.2629 55128.393 2431.5835 1.0419182 2342.089 89.494508 0.855 2369.0347 + 17200 328.81472 47063.86 1584.1492 1.0364627 1485.1556 98.993555 0.86 1526.7115 + 17300 313.41363 -46685.063 -2635.2463 1.008117 -2729.6032 94.356878 0.865 -2685.8034 + 17400 288.17114 68721.523 2548.303 1.0429105 2461.5456 86.757326 0.87 2490.5845 + 17500 260.01702 -23324.539 -1776.7039 1.0100415 -1854.9851 78.281195 0.875 -1812.4813 + 17600 297.6633 72795.463 2396.9788 1.0362827 2307.3638 89.615054 0.88 2336.0152 + 17700 301.02937 93833.118 2424.9649 1.0276466 2334.3364 90.628448 0.885 2364.8751 + 17800 238.92837 -78317.212 -2548.5755 1.0084077 -2620.5077 71.932208 0.89 -2579.4429 + 17900 299.27724 -65278.891 -2933.564 1.0034773 -3023.6649 90.10095 0.895 -2987.498 + 18000 315.15753 -72437.481 -2654.8693 1.0136139 -2749.7512 94.881898 0.9 -2718.125 + 18100 268.39411 -42194.209 -2606.045 1.0108104 -2686.8482 80.803219 0.905 -2656.3853 + 18200 284.91941 40905.162 1786.1505 1.0266185 1700.3722 85.778354 0.91 1723.6803 + 18300 329.41629 -56526.814 -2472.7835 1.0137784 -2571.9582 99.174667 0.915 -2540.6829 + 18400 293.16732 -22085.551 -1991.6537 1.0163557 -2079.9152 88.261484 0.92 -2052.7864 + 18500 276.28141 29367.359 2034.0833 1.0270087 1950.9056 83.177784 0.925 1971.9405 + 18600 331.18031 94669.124 2160.1352 1.0225403 2060.4295 99.705745 0.93 2081.8675 + 18700 265.4491 49872.536 2324.2391 1.0255308 2244.3225 79.916587 0.935 2260.4261 + 18800 314.51042 60758.629 2298.6407 1.0300818 2203.9536 94.687078 0.94 2219.6547 + 18900 317.70309 66345.835 1490.6939 1.0248229 1395.0457 95.648268 0.945 1410.3087 + 19000 291.39831 -96336.931 -2732.3994 1.0100498 -2820.1283 87.728905 0.95 -2805.9396 + 19100 303.37353 -21421.495 -2360.5644 0.99771284 -2451.8986 91.334186 0.955 -2436.2173 + 19200 293.92948 36383.881 1708.7388 1.0251299 1620.2479 88.490944 0.96 1633.579 + 19300 287.24409 -46691.027 -2736.6663 1.0112067 -2823.1445 86.478228 0.965 -2811.3506 + 19400 333.42205 21152.63 1209.1556 1.0189912 1108.7749 100.38065 0.97 1118.2463 + 19500 309.17989 60445.761 2014.5979 1.0338543 1921.5157 93.082259 0.975 1928.6181 + 19600 255.92246 -32795.547 -2145.3103 1.0157044 -2222.3587 77.04848 0.98 -2213.9484 + 19700 342.62332 33538.746 2181.2002 1.0225905 2078.0494 103.1508 0.985 2081.9185 + 19800 295.68946 81474.342 1996.4567 1.0240743 1907.4359 89.020804 0.99 1910.5545 + 19900 306.4947 43488.052 2048.2997 1.0222707 1956.0258 92.27385 0.995 1957.4368 + 20000 313.31679 -25133.284 -1555.4274 1.0163289 -1649.7551 94.327722 1 -1649.7551 +Loop time of 11.8253 on 2 procs for 20000 steps with 102 atoms + +Performance: 29.226 ns/day, 0.821 hours/ns, 1691.295 timesteps/s, 172.512 katom-step/s +99.3% CPU use with 2 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 6.8508 | 8.6272 | 10.404 | 60.5 | 72.96 +Bond | 0.045829 | 0.046542 | 0.047256 | 0.3 | 0.39 +Neigh | 0.10781 | 0.10791 | 0.108 | 0.0 | 0.91 +Comm | 0.75178 | 2.5281 | 4.3045 | 111.7 | 21.38 +Output | 0.0032916 | 0.0035722 | 0.0038527 | 0.5 | 0.03 +Modify | 0.44867 | 0.45212 | 0.45556 | 0.5 | 3.82 +Other | | 0.05976 | | | 0.51 + +Nlocal: 51 ave 51 max 51 min +Histogram: 2 0 0 0 0 0 0 0 0 0 +Nghost: 3317 ave 3317 max 3317 min +Histogram: 2 0 0 0 0 0 0 0 0 0 +Neighs: 18319.5 ave 21940 max 14699 min +Histogram: 1 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 36639 +Ave neighs/atom = 359.20588 +Ave special neighs/atom = 2.0196078 +Neighbor list builds = 181 +Dangerous builds = 0 +Total wall time: 0:00:11 diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp index 75b4c4cb73..b0c8d6799d 100644 --- a/src/REPLICA/fix_alchemy.cpp +++ b/src/REPLICA/fix_alchemy.cpp @@ -45,6 +45,7 @@ FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), if (narg != 3) error->all(FLERR, "Incorrect number of arguments for fix alchemy"); lambda = epot[0] = epot[1] = 0.0; + progress = 0; for (int i = 0; i < 6; ++i) pressure[i] = 0.0; no_change_box = 1; @@ -125,6 +126,13 @@ void FixAlchemy::setup(int vflag) } else { post_force(vflag); } + + if (universe->me == 0) { + progress = static_cast(100.0 - lambda * 100.0); + auto msg = fmt::format("Starting alchemical transformation at {:>3d}%\n", progress); + if (universe->uscreen) fmt::print(universe->uscreen, msg); + if (universe->ulogfile) fmt::print(universe->ulogfile, msg); + } } /* ---------------------------------------------------------------------- */ @@ -164,6 +172,17 @@ void FixAlchemy::post_force(int /*vflag*/) for (int i = 0; i < 6; ++i) commbuf[i] = lambda * scalefac * press->vector[i]; MPI_Allreduce(commbuf, pressure, 6, MPI_DOUBLE, MPI_SUM, universe->uworld); press->addstep(update->ntimestep + 1); + + // print progress info + if (universe->me == 0) { + int status = static_cast(100.0 - lambda * 100.0); + if ((status / 10) > (progress / 10)) { + progress = status; + auto msg = fmt::format(" Alchemical transformation progress: {:>3d}%\n", progress); + if (universe->uscreen) fmt::print(universe->uscreen, msg); + if (universe->ulogfile) fmt::print(universe->ulogfile, msg); + } + } } /* ---------------------------------------------------------------------- */ diff --git a/src/REPLICA/fix_alchemy.h b/src/REPLICA/fix_alchemy.h index 9794629db3..f0dd7bde04 100644 --- a/src/REPLICA/fix_alchemy.h +++ b/src/REPLICA/fix_alchemy.h @@ -45,6 +45,7 @@ class FixAlchemy : public Fix { double lambda; // changes from 0 to 1 during run double epot[3]; // last (unscaled) potential energy from each replica and combined energy double pressure[6]; // joined pressure + int progress; // for progress indicator int ilevel_respa; int nmax; }; From 81b0bb47be24eda4acb7e3a73fb943245c93fb28 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 12:03:05 -0500 Subject: [PATCH 271/445] allow dynamic groups with fix oneway --- src/EXTRA-FIX/fix_oneway.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-FIX/fix_oneway.cpp b/src/EXTRA-FIX/fix_oneway.cpp index d514a081f1..f31781d936 100644 --- a/src/EXTRA-FIX/fix_oneway.cpp +++ b/src/EXTRA-FIX/fix_oneway.cpp @@ -35,6 +35,7 @@ FixOneWay::FixOneWay(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), region(nullptr), idregion(nullptr) { direction = NONE; + dynamic_group_allow = 1; if (narg < 6) error->all(FLERR, "Illegal fix oneway command"); From d691d1db78de193a4d3015827316c1f1f707ecb2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 12:42:10 -0500 Subject: [PATCH 272/445] synchronize box dimensions at the beginning and when needed --- src/REPLICA/fix_alchemy.cpp | 28 ++++++++++++++++++++++++++++ src/REPLICA/fix_alchemy.h | 1 + 2 files changed, 29 insertions(+) diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp index b0c8d6799d..ea89b1a016 100644 --- a/src/REPLICA/fix_alchemy.cpp +++ b/src/REPLICA/fix_alchemy.cpp @@ -16,6 +16,7 @@ #include "atom.h" #include "comm.h" #include "compute.h" +#include "domain.h" #include "error.h" #include "memory.h" #include "modify.h" @@ -106,12 +107,35 @@ int FixAlchemy::setmask() /* ---------------------------------------------------------------------- */ +static void synchronize_box(Domain *domain, MPI_Comm samerank) +{ + MPI_Bcast(&domain->boxlo[0], 3, MPI_DOUBLE, 0, samerank); + MPI_Bcast(&domain->boxhi[0], 3, MPI_DOUBLE, 0, samerank); + MPI_Bcast(&domain->yz, 1, MPI_DOUBLE, 0, samerank); + MPI_Bcast(&domain->xz, 1, MPI_DOUBLE, 0, samerank); + MPI_Bcast(&domain->xy, 1, MPI_DOUBLE, 0, samerank); + domain->set_global_box(); + domain->set_local_box(); +} + +/* ---------------------------------------------------------------------- */ + void FixAlchemy::init() { int onenmax = MAX(nmax, 3 * atom->nmax); MPI_Allreduce(&onenmax, &nmax, 1, MPI_INT, MPI_MAX, universe->uworld); memory->destroy(commbuf); memory->create(commbuf, sizeof(double) * nmax, "alchemy:nmax"); + + if (modify->get_fix_by_style("^balance").size() > 0) + error->all(FLERR, "Fix alchemy is not compatible with load balancing"); + + // synchronize box dimensions, determine if resync during run will be needed. + synchronize_box(domain, samerank); + + sync_box = 0; + for (auto ifix : modify->get_fix_list()) + if (ifix->box_change) sync_box = 1; } /* ---------------------------------------------------------------------- */ @@ -141,6 +165,10 @@ void FixAlchemy::post_integrate() { const int nall = atom->nlocal + atom->nghost; MPI_Bcast(&atom->x[0][0], 3 * nall, MPI_DOUBLE, 0, samerank); + + // synchronize box dimensions, if needed + if (sync_box) synchronize_box(domain, samerank); +} } /* ---------------------------------------------------------------------- */ diff --git a/src/REPLICA/fix_alchemy.h b/src/REPLICA/fix_alchemy.h index f0dd7bde04..ea342fa0ea 100644 --- a/src/REPLICA/fix_alchemy.h +++ b/src/REPLICA/fix_alchemy.h @@ -46,6 +46,7 @@ class FixAlchemy : public Fix { double epot[3]; // last (unscaled) potential energy from each replica and combined energy double pressure[6]; // joined pressure int progress; // for progress indicator + int sync_box; // 1 of box dimensions need to be synchronized int ilevel_respa; int nmax; }; From 60129958c85aa91193a6d9e256bba5b972b88c2c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 12:47:49 -0500 Subject: [PATCH 273/445] refactor how properties computed by the fix are accessed lambda is no an (intensive) scalar property and the vector property only has the potential energies. pressure is accessed via compute pressure/alchemy. --- examples/PACKAGES/alchemy/in.twowater | 4 +- .../alchemy/log.25Feb23.twowater.g++.4.0 | 22 +++++----- .../alchemy/log.25Feb23.twowater.g++.4.1 | 24 +++++------ src/REPLICA/fix_alchemy.cpp | 43 +++++++++++-------- src/REPLICA/fix_alchemy.h | 1 + 5 files changed, 52 insertions(+), 42 deletions(-) diff --git a/examples/PACKAGES/alchemy/in.twowater b/examples/PACKAGES/alchemy/in.twowater index 8c19eab215..6e1727de5a 100644 --- a/examples/PACKAGES/alchemy/in.twowater +++ b/examples/PACKAGES/alchemy/in.twowater @@ -86,8 +86,8 @@ fix_modify integrate press pressure # "dump 1 all atom 100 ${name}.lammpstrj" & # "dump_modify 1 sort id" -thermo_style custom step temp press etotal density pe ke f_transform[1] f_transform[4] -thermo_modify colname f_transform[1] lambda colname f_transform[4] EPot_mixed +thermo_style custom step temp press etotal density pe ke f_transform f_transform[3] +thermo_modify colname f_transform lambda colname f_transform[3] EPot_mixed thermo_modify press pressure thermo 100 diff --git a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 index 7717dae784..fc652dded7 100644 --- a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 +++ b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 @@ -167,8 +167,8 @@ fix_modify integrate press pressure # only need to output a dump file from one partition # if "${name} == twowater" then # "dump 1 all atom 100 ${name}.lammpstrj" # "dump_modify 1 sort id" -thermo_style custom step temp press etotal density pe ke f_transform[1] f_transform[4] -thermo_modify colname f_transform[1] lambda colname f_transform[4] EPot_mixed +thermo_style custom step temp press etotal density pe ke f_transform f_transform[3] +thermo_modify colname f_transform lambda colname f_transform[3] EPot_mixed thermo_modify press pressure thermo 100 @@ -377,21 +377,21 @@ Per MPI rank memory allocation (min/avg/max) = 7.535 | 7.535 | 7.535 Mbytes 19800 295.68946 81474.342 2308.3249 1.0240743 2219.3041 89.020804 0.01 1910.5545 19900 306.4947 43488.052 2330.4958 1.0222707 2238.222 92.27385 0.005 1957.4368 20000 313.31679 -25133.284 -1161.6979 1.0163289 -1256.0256 94.327722 0 -1649.7551 -Loop time of 11.8252 on 2 procs for 20000 steps with 102 atoms +Loop time of 11.7903 on 2 procs for 20000 steps with 102 atoms -Performance: 29.226 ns/day, 0.821 hours/ns, 1691.296 timesteps/s, 172.512 katom-step/s +Performance: 29.312 ns/day, 0.819 hours/ns, 1696.311 timesteps/s, 173.024 katom-step/s 99.3% CPU use with 2 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 6.8298 | 8.6298 | 10.43 | 61.3 | 72.98 -Bond | 0.045072 | 0.045296 | 0.045519 | 0.1 | 0.38 -Neigh | 0.10567 | 0.10572 | 0.10577 | 0.0 | 0.89 -Comm | 0.73714 | 2.5381 | 4.3392 | 113.0 | 21.46 -Output | 0.0032977 | 0.0035468 | 0.003796 | 0.4 | 0.03 -Modify | 0.43872 | 0.44155 | 0.44438 | 0.4 | 3.73 -Other | | 0.06121 | | | 0.52 +Pair | 6.8605 | 8.6071 | 10.354 | 59.5 | 73.00 +Bond | 0.044148 | 0.044761 | 0.045375 | 0.3 | 0.38 +Neigh | 0.10568 | 0.10573 | 0.10578 | 0.0 | 0.90 +Comm | 0.74919 | 2.4939 | 4.2386 | 110.5 | 21.15 +Output | 0.0033838 | 0.0036358 | 0.0038879 | 0.4 | 0.03 +Modify | 0.46825 | 0.47526 | 0.48227 | 1.0 | 4.03 +Other | | 0.05993 | | | 0.51 Nlocal: 51 ave 51 max 51 min Histogram: 2 0 0 0 0 0 0 0 0 0 diff --git a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 index 8fa06d5677..e1d32eb1c7 100644 --- a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 +++ b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 @@ -45,7 +45,7 @@ Read molecule template water: create_atoms 0 single -2.0 0.0 0.0 mol water 453624 Created 3 atoms using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) - create_atoms CPU = 0.004 seconds + create_atoms CPU = 0.003 seconds create_atoms 0 single 2.0 0.0 0.0 mol water 767353 Created 3 atoms using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) @@ -191,8 +191,8 @@ fix_modify integrate press pressure # only need to output a dump file from one partition # if "${name} == twowater" then # "dump 1 all atom 100 ${name}.lammpstrj" # "dump_modify 1 sort id" -thermo_style custom step temp press etotal density pe ke f_transform[1] f_transform[4] -thermo_modify colname f_transform[1] lambda colname f_transform[4] EPot_mixed +thermo_style custom step temp press etotal density pe ke f_transform f_transform[3] +thermo_modify colname f_transform lambda colname f_transform[3] EPot_mixed thermo_modify press pressure thermo 100 @@ -402,21 +402,21 @@ Per MPI rank memory allocation (min/avg/max) = 7.535 | 7.535 | 7.535 Mbytes 19800 295.68946 81474.342 1996.4567 1.0240743 1907.4359 89.020804 0.99 1910.5545 19900 306.4947 43488.052 2048.2997 1.0222707 1956.0258 92.27385 0.995 1957.4368 20000 313.31679 -25133.284 -1555.4274 1.0163289 -1649.7551 94.327722 1 -1649.7551 -Loop time of 11.8253 on 2 procs for 20000 steps with 102 atoms +Loop time of 11.7903 on 2 procs for 20000 steps with 102 atoms -Performance: 29.226 ns/day, 0.821 hours/ns, 1691.295 timesteps/s, 172.512 katom-step/s +Performance: 29.312 ns/day, 0.819 hours/ns, 1696.310 timesteps/s, 173.024 katom-step/s 99.3% CPU use with 2 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 6.8508 | 8.6272 | 10.404 | 60.5 | 72.96 -Bond | 0.045829 | 0.046542 | 0.047256 | 0.3 | 0.39 -Neigh | 0.10781 | 0.10791 | 0.108 | 0.0 | 0.91 -Comm | 0.75178 | 2.5281 | 4.3045 | 111.7 | 21.38 -Output | 0.0032916 | 0.0035722 | 0.0038527 | 0.5 | 0.03 -Modify | 0.44867 | 0.45212 | 0.45556 | 0.5 | 3.82 -Other | | 0.05976 | | | 0.51 +Pair | 6.8748 | 8.631 | 10.387 | 59.8 | 73.20 +Bond | 0.04667 | 0.047105 | 0.04754 | 0.2 | 0.40 +Neigh | 0.10858 | 0.10862 | 0.10866 | 0.0 | 0.92 +Comm | 0.74367 | 2.4997 | 4.2558 | 111.1 | 21.20 +Output | 0.0034405 | 0.0037033 | 0.003966 | 0.4 | 0.03 +Modify | 0.4338 | 0.4388 | 0.4438 | 0.8 | 3.72 +Other | | 0.06136 | | | 0.52 Nlocal: 51 ave 51 max 51 min Histogram: 2 0 0 0 0 0 0 0 0 0 diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp index ea89b1a016..6a65c0d116 100644 --- a/src/REPLICA/fix_alchemy.cpp +++ b/src/REPLICA/fix_alchemy.cpp @@ -31,33 +31,27 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ -static double get_lambda(const bigint &step, const bigint &begin, const bigint &end, int iworld) -{ - double lambda = step - begin; - if (lambda != 0.0) lambda /= end - begin; - if (iworld == 0) lambda = 1.0 - lambda; - return lambda; -} - -/* ---------------------------------------------------------------------- */ - FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), commbuf(nullptr) { if (narg != 3) error->all(FLERR, "Incorrect number of arguments for fix alchemy"); + if (universe->nworlds != 2) error->all(FLERR, "Must use exactly two partitions"); - lambda = epot[0] = epot[1] = 0.0; + lambda = epot[0] = epot[1] = epot[2] = 0.0; progress = 0; for (int i = 0; i < 6; ++i) pressure[i] = 0.0; no_change_box = 1; + time_depend = 1; + scalar_flag = 1; + extscalar = 0; vector_flag = 1; - size_vector = 10; - extvector = 0; + size_vector = 3; + extvector = 1; ilevel_respa = 0; nmax = 6; + sync_box = 0; // set up rank-to-rank communicator - if (universe->nworlds != 2) error->all(FLERR, "Must use exactly two partitions"); int color = comm->me; int key = universe->iworld; MPI_Comm_split(universe->uworld, color, key, &samerank); @@ -163,12 +157,22 @@ void FixAlchemy::setup(int vflag) void FixAlchemy::post_integrate() { + // synchronize atom positions const int nall = atom->nlocal + atom->nghost; MPI_Bcast(&atom->x[0][0], 3 * nall, MPI_DOUBLE, 0, samerank); // synchronize box dimensions, if needed if (sync_box) synchronize_box(domain, samerank); } + +/* ---------------------------------------------------------------------- */ + +static double get_lambda(const bigint &step, const bigint &begin, const bigint &end, int iworld) +{ + double lambda = step - begin; + if (lambda != 0.0) lambda /= end - begin; + if (iworld == 0) lambda = 1.0 - lambda; + return lambda; } /* ---------------------------------------------------------------------- */ @@ -215,11 +219,16 @@ void FixAlchemy::post_force(int /*vflag*/) /* ---------------------------------------------------------------------- */ +double FixAlchemy::compute_scalar() +{ + return lambda; +} + +/* ---------------------------------------------------------------------- */ + double FixAlchemy::compute_vector(int n) { - if (n == 0) return lambda; - if ((n > 0) && (n < 4)) return epot[n - 1]; - return pressure[n - 4]; + return epot[n]; } /* ---------------------------------------------------------------------- */ diff --git a/src/REPLICA/fix_alchemy.h b/src/REPLICA/fix_alchemy.h index ea342fa0ea..86c58a7b78 100644 --- a/src/REPLICA/fix_alchemy.h +++ b/src/REPLICA/fix_alchemy.h @@ -34,6 +34,7 @@ class FixAlchemy : public Fix { void setup(int) override; void post_integrate() override; void post_force(int) override; + double compute_scalar() override; double compute_vector(int) override; void *extract(const char *, int &) override; From 828b70fbfa45b43ef88852beb51c4891fa2cfc8b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 13:58:58 -0500 Subject: [PATCH 274/445] silence warning --- doc/src/fix_pimd.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/fix_pimd.rst b/doc/src/fix_pimd.rst index 0a4f9a38fb..84c6e47c1f 100644 --- a/doc/src/fix_pimd.rst +++ b/doc/src/fix_pimd.rst @@ -1,7 +1,7 @@ .. index:: fix pimd/nvt fix pimd/nvt command -================ +==================== Syntax """""" From 2bad63c68e9906f16e7511405e2258d0be1fda9f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 13:58:23 -0500 Subject: [PATCH 275/445] add documentation --- doc/src/Commands_compute.rst | 1 + doc/src/Commands_fix.rst | 1 + doc/src/compute.rst | 1 + doc/src/compute_pressure_alchemy.rst | 80 +++++++++++++++++++++ doc/src/fix.rst | 1 + doc/src/fix_alchemy.rst | 104 +++++++++++++++++++++++++++ src/REPLICA/fix_alchemy.cpp | 13 +++- 7 files changed, 200 insertions(+), 1 deletion(-) create mode 100644 doc/src/compute_pressure_alchemy.rst create mode 100644 doc/src/fix_alchemy.rst diff --git a/doc/src/Commands_compute.rst b/doc/src/Commands_compute.rst index aaa899ef66..c2753b2afc 100644 --- a/doc/src/Commands_compute.rst +++ b/doc/src/Commands_compute.rst @@ -104,6 +104,7 @@ KOKKOS, o = OPENMP, t = OPT. * :doc:`pe/tally ` * :doc:`plasticity/atom ` * :doc:`pressure ` + * :doc:`pressure/alchemy ` * :doc:`pressure/uef ` * :doc:`property/atom ` * :doc:`property/chunk ` diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index d275b33eba..5b331af1aa 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -29,6 +29,7 @@ OPT. * :doc:`adapt/fep ` * :doc:`addforce ` * :doc:`addtorque ` + * :doc:`alchemy ` * :doc:`amoeba/bitorsion ` * :doc:`amoeba/pitorsion ` * :doc:`append/atoms ` diff --git a/doc/src/compute.rst b/doc/src/compute.rst index 72ea31bbb4..3d74b3884e 100644 --- a/doc/src/compute.rst +++ b/doc/src/compute.rst @@ -258,6 +258,7 @@ The individual style names on the :doc:`Commands compute ` pag * :doc:`pe/tally ` - potential energy between two groups of atoms via the tally callback mechanism * :doc:`plasticity/atom ` - Peridynamic plasticity for each atom * :doc:`pressure ` - total pressure and pressure tensor +* :doc:`pressure/alchemy ` - mixed system total pressure and pressure tensor for :doc:`fix alchemy ` runs * :doc:`pressure/uef ` - pressure tensor in the reference frame of an applied flow field * :doc:`property/atom ` - convert atom attributes to per-atom vectors/arrays * :doc:`property/chunk ` - extract various per-chunk attributes diff --git a/doc/src/compute_pressure_alchemy.rst b/doc/src/compute_pressure_alchemy.rst new file mode 100644 index 0000000000..bdf9802e20 --- /dev/null +++ b/doc/src/compute_pressure_alchemy.rst @@ -0,0 +1,80 @@ +.. index:: compute pressure/alchemy + +compute pressure/alchemy command +================================ + +Syntax +"""""" + +.. code-block:: LAMMPS + + compute ID group-ID pressure/alchemy fix-ID + +* ID, group-ID are documented in :doc:`compute ` command +* pressure/alchemy = style name of this compute command +* fix-ID = ID of :doc:`fix alchemy ` command + +Examples +"""""""" + +.. code-block:: LAMMPS + + fix trans all alchemy + compute mixed all pressure/alchemy trans + thermo_modify press mixed + +Description +""""""""""" + +.. versionadded:: TBD + +Define a compute style that makes the "mixed" system pressure available +for a system that uses the :doc:`fix alchemy ` command to +transform one topology to another. This can be used in combination with +either :doc:`thermo_modify press ` or :doc:`fix_modify +press ` to output and access a pressure consistent with the +simulated combined two topology system. + +The actual pressure is determined with :doc:`compute pressure +` commands that are internally used by :doc:`fix +alchemy ` for each topology individually and then combined. +This command just extracts the information from the fix. + +The ``examples/PACKAGES/alchemy`` folder contains an example input for this command. + +---------- + +Output info +""""""""""" + +This compute calculates a global scalar (the pressure) and a global +vector of length 6 (the pressure tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses global +scalar or vector values from a compute as input. See the :doc:`Howto +output ` page for an overview of LAMMPS output options. + +The ordering of values in the symmetric pressure tensor is as follows: +:math:`p_{xx},` :math:`p_{yy},` :math:`p_{zz},` :math:`p_{xy},` +:math:`p_{xz},` :math:`p_{yz}.` + +The scalar and vector values calculated by this compute are "intensive". +The scalar and vector values will be in pressure :doc:`units `. + +Restrictions +"""""""""""" + +This compute is part of the REPLICA package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package +` page for more info. + + +Related commands +"""""""""""""""" + +:doc:`fix alchemy `, :doc:`compute pressure `, +:doc:`thermo_modify `, :doc:`fix_modify ` + +Default +""""""" + +none diff --git a/doc/src/fix.rst b/doc/src/fix.rst index 2dfe97a3ec..71f8bf9e16 100644 --- a/doc/src/fix.rst +++ b/doc/src/fix.rst @@ -181,6 +181,7 @@ accelerated styles exist. * :doc:`adapt/fep ` - enhanced version of fix adapt * :doc:`addforce ` - add a force to each atom * :doc:`addtorque ` - add a torque to a group of atoms +* :doc:`alchemy ` - perform an "alchemical transformation" between two partitions * :doc:`amoeba/bitorsion ` - torsion/torsion terms in AMOEBA force field * :doc:`amoeba/pitorsion ` - 6-body terms in AMOEBA force field * :doc:`append/atoms ` - append atoms to a running simulation diff --git a/doc/src/fix_alchemy.rst b/doc/src/fix_alchemy.rst new file mode 100644 index 0000000000..1ee9acc629 --- /dev/null +++ b/doc/src/fix_alchemy.rst @@ -0,0 +1,104 @@ +.. index:: fix alchemy + +fix alchemy command +=================== + +Syntax +"""""" + +.. parsed-literal:: + + fix ID group-ID alchemy + +* ID, group-ID are documented in :doc:`fix ` command +* alchemy = style name of this fix command + +Examples +"""""""" + +.. code-block:: LAMMPS + + fix trans all alchemy + +Description +""""""""""" + +.. versionadded:: TBD + +This fix command enables running an "alchemical transformation" MD +simulation between two topologies (i.e. the same number and positions of +atoms, but differences in atom parameters like type, charge, bonds, +angles and so on). For this a :ref:`multi-partition run ` is +required with exactly two partitions. During the MD run, the fix will +will determine a factor :math:`\lambda_p` that will be linearly ramped +*down* from 1.0 to 0.0 for the *first* partition (*p=0*) and ramped *up* +from 0.0 to 1.0 for the *second* partition (*p=1*). The forces used for +the propagation of the atoms will be the sum of the forces of the two +systems combined and scaled with their respective :math:`\lambda_p` +factor. This allows to perform transformations that are not easily +possible with :doc:`fix adapt ` or :doc:`fix adapt/fep +`. + +Due to the specifics of the implementation, the initial geometry and +dimensions of the system must be exactly the same and the fix will +synchronize them during the run. It is thus not possible to initialize +the two partitions by reading different data files or creating different +systems from scratch, but rather they have to be started from the same +system and then the desired modifications need to be applied to the +system of the second partition. The commands :doc:`fix adapt ` +or :doc:`fix adapt/fep ` could be used for simulations +where the requirements for fix alchemy are not given. + +The ``examples/PACKAGES/alchemy`` folder contains example inputs for +this command. + +---------- + +Restart, fix_modify, output, run start/stop, minimize info +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +No information about this fix is written to :doc:`binary restart files `. +None of the :doc:`fix_modify ` options are relevant to this fix. + +This fix stores a global scalar (the current value of :math:`\lambda_p`) +and a global vector or length 3 which contains the potential energy of +the first partition, the second partition and the combined value, +respectively. The global scalar is unitless and "intensive", the vector +is in :doc:`energy units ` and "extensive". This values can be +used by any command that uses a global value from a fix as input. See +the :doc:`Howto output ` doc page for an overview of +LAMMPS output options. + +The value of :math:`\lambda_p` is influenced by the *start/stop* keywords +of the :doc:`run ` command. Without them it will be ramped +linearly from 1.0 to 0.0 or 0.0 to 1.0 during the steps of a run, with +*start/stop* keywords the ramp us from the *start* time step to the +*stop* timestep. This allows to break down a simulation over multiple +*run* commands or to continue transparently from a restart. + +This fix is not invoked during :doc:`energy minimization `. + +Restrictions +"""""""""""" + +This fix is part of the REPLICA package. It is only enabled if LAMMPS +was built with that package. See the :doc:`Build package +` page for more info. + +There may be only one instance of this fix in use at any time. + +This fix requires to perform a :ref:`multi-partition run ` +with *exactly* two partitions. + +This fix is *not* compatible with :doc:`load balancing `. + +Related commands +"""""""""""""""" + +:doc:`compute pressure/alchemy ` command, +:doc:`fix adapt ` command + +Default +""""""" + +none diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp index 6a65c0d116..18e55603b9 100644 --- a/src/REPLICA/fix_alchemy.cpp +++ b/src/REPLICA/fix_alchemy.cpp @@ -51,12 +51,14 @@ FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), nmax = 6; sync_box = 0; - // set up rank-to-rank communicator + // set up rank-to-rank communicator for inter-partition communication + int color = comm->me; int key = universe->iworld; MPI_Comm_split(universe->uworld, color, key, &samerank); // check that we have the same domain decomposition on all ranks + int my_nlocal[2] = {0, 0}; int all_nlocal[2] = {0, 0}; my_nlocal[universe->iworld] = atom->nlocal; @@ -124,7 +126,11 @@ void FixAlchemy::init() if (modify->get_fix_by_style("^balance").size() > 0) error->all(FLERR, "Fix alchemy is not compatible with load balancing"); + if (modify->get_fix_by_style("^alchemy").size() > 1) + error->all(FLERR, "There may only one fix alchemy at a time"); + // synchronize box dimensions, determine if resync during run will be needed. + synchronize_box(domain, samerank); sync_box = 0; @@ -158,10 +164,12 @@ void FixAlchemy::setup(int vflag) void FixAlchemy::post_integrate() { // synchronize atom positions + const int nall = atom->nlocal + atom->nghost; MPI_Bcast(&atom->x[0][0], 3 * nall, MPI_DOUBLE, 0, samerank); // synchronize box dimensions, if needed + if (sync_box) synchronize_box(domain, samerank); } @@ -192,6 +200,7 @@ void FixAlchemy::post_force(int /*vflag*/) MPI_Allreduce(commbuf, f, nall, MPI_DOUBLE, MPI_SUM, samerank); // sum up potential energy + const double scalefac = 1.0 / comm->nprocs; commbuf[0] = commbuf[1] = commbuf[2] = 0.0; commbuf[universe->iworld] = scalefac * pe->compute_scalar(); @@ -200,12 +209,14 @@ void FixAlchemy::post_force(int /*vflag*/) pe->addstep(update->ntimestep + 1); // sum up pressure + press->compute_vector(); for (int i = 0; i < 6; ++i) commbuf[i] = lambda * scalefac * press->vector[i]; MPI_Allreduce(commbuf, pressure, 6, MPI_DOUBLE, MPI_SUM, universe->uworld); press->addstep(update->ntimestep + 1); // print progress info + if (universe->me == 0) { int status = static_cast(100.0 - lambda * 100.0); if ((status / 10) > (progress / 10)) { From bb17541c30a018176dcf419f9d4266bc26969854 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 15:09:01 -0500 Subject: [PATCH 276/445] add simple example for transforming a pure metal into an alloy --- doc/src/fix_alchemy.rst | 19 +- examples/PACKAGES/alchemy/AlCu.eam.alloy | 1 + examples/PACKAGES/alchemy/in.alloy | 39 ++++ examples/PACKAGES/alchemy/in.twowater | 6 +- .../PACKAGES/alchemy/log.25Feb23.alloy.g++.4 | 13 ++ .../alchemy/log.25Feb23.alloy.g++.4.0 | 165 +++++++++++++++++ .../alchemy/log.25Feb23.alloy.g++.4.1 | 168 ++++++++++++++++++ 7 files changed, 406 insertions(+), 5 deletions(-) create mode 120000 examples/PACKAGES/alchemy/AlCu.eam.alloy create mode 100644 examples/PACKAGES/alchemy/in.alloy create mode 100644 examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4 create mode 100644 examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.0 create mode 100644 examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.1 diff --git a/doc/src/fix_alchemy.rst b/doc/src/fix_alchemy.rst index 1ee9acc629..26ff4589a5 100644 --- a/doc/src/fix_alchemy.rst +++ b/doc/src/fix_alchemy.rst @@ -49,8 +49,23 @@ system of the second partition. The commands :doc:`fix adapt ` or :doc:`fix adapt/fep ` could be used for simulations where the requirements for fix alchemy are not given. -The ``examples/PACKAGES/alchemy`` folder contains example inputs for -this command. +The commands below demonstrate how this can be done for the example of +transforming a pure copper system into a copper aluminum bronze. + +.. code-block:: LAMMPS + + create_box 2 box + create_atoms 1 box + pair_style eam/alloy + pair_coeff * * AlCu.eam.alloy Cu Al + + # replace 5% of copper with aluminum on the second partition only + variable name world pure alloy + if "${name} == alloy" then & + "set type 1 type/fraction 2 0.05 6745234" + +The ``examples/PACKAGES/alchemy`` folder contains complete example +inputs for this command. ---------- diff --git a/examples/PACKAGES/alchemy/AlCu.eam.alloy b/examples/PACKAGES/alchemy/AlCu.eam.alloy new file mode 120000 index 0000000000..c9470b2084 --- /dev/null +++ b/examples/PACKAGES/alchemy/AlCu.eam.alloy @@ -0,0 +1 @@ +../../../potentials/AlCu.eam.alloy \ No newline at end of file diff --git a/examples/PACKAGES/alchemy/in.alloy b/examples/PACKAGES/alchemy/in.alloy new file mode 100644 index 0000000000..f041157ee6 --- /dev/null +++ b/examples/PACKAGES/alchemy/in.alloy @@ -0,0 +1,39 @@ +# Example for an alchemical transformation simulation of pure copper into an aluminium bronze + +# set up different names for two partitions +variable name world pure alloy + +# create pure copper system +units metal +lattice fcc 3.75 +region box block 0 6 0 6 0 6 +create_box 2 box + +timestep 0.002 +create_atoms 1 box +displace_atoms all random 0.3 0.3 0.3 57845645 +pair_style eam/alloy +pair_coeff * * AlCu.eam.alloy Cu Al + +# replace 5% of copper with aluminium on the second partition only +if "${name} == alloy" then & + "set type 1 type/fraction 2 0.05 6745234" + +velocity all create 5000.0 6567345 +fix 1 all nvt temp 2500.0 500.0 0.002 +fix 2 all alchemy + +compute pressure all pressure/alchemy 2 + +# only need to output a dump file from one partition +#if "${name} == alloy" then & +# "dump 1 all custom 100 ${name}.lammpstrj id type element x y z" & +# "dump_modify 1 element Cu Al" + +thermo_style custom step temp press etotal density pe ke f_2 f_2[3] +thermo_modify colname f_2 lambda colname f_2[3] EPot_mixed +thermo_modify press pressure + +thermo 100 +run 10000 post no + diff --git a/examples/PACKAGES/alchemy/in.twowater b/examples/PACKAGES/alchemy/in.twowater index 6e1727de5a..ae48436f5f 100644 --- a/examples/PACKAGES/alchemy/in.twowater +++ b/examples/PACKAGES/alchemy/in.twowater @@ -1,6 +1,6 @@ -# Example for alchemical transformation of two water molecules into a hydronium and hydroxyl ion -# WARNING: This input is intended for demonstrating the method, only -# The force field parameters are made up and NOT suitable for production simulations. +# Example for an alchemical transformation of two water molecules into a hydronium and hydroxyl ion +# WARNING: This input is intended for demonstrating the method only, +# the force field parameters are mostly made up and NOT suitable for production simulations. # set up different names for two partitions variable name world twowater twoions diff --git a/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4 b/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4 new file mode 100644 index 0000000000..18375012d0 --- /dev/null +++ b/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4 @@ -0,0 +1,13 @@ +LAMMPS (8 Feb 2023) +Running on 2 partitions of processors +Starting alchemical transformation at 0% + Alchemical transformation progress: 10% + Alchemical transformation progress: 20% + Alchemical transformation progress: 30% + Alchemical transformation progress: 40% + Alchemical transformation progress: 50% + Alchemical transformation progress: 60% + Alchemical transformation progress: 70% + Alchemical transformation progress: 80% + Alchemical transformation progress: 90% + Alchemical transformation progress: 100% diff --git a/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.0 b/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.0 new file mode 100644 index 0000000000..4b45cdedcf --- /dev/null +++ b/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.0 @@ -0,0 +1,165 @@ +LAMMPS (8 Feb 2023) +Processor partition = 0 + using 1 OpenMP thread(s) per MPI task +# Example for an alchemical transformation simulation of pure copper into an aluminium bronze + +# set up different names for two partitions +variable name world pure alloy + +# create pure copper system +units metal +lattice fcc 3.75 +Lattice spacing in x,y,z = 3.75 3.75 3.75 +region box block 0 6 0 6 0 6 +create_box 2 box +Created orthogonal box = (0 0 0) to (22.5 22.5 22.5) + 1 by 1 by 2 MPI processor grid + +timestep 0.002 +create_atoms 1 box +Created 864 atoms + using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5) + create_atoms CPU = 0.000 seconds +displace_atoms all random 0.3 0.3 0.3 57845645 +Displacing atoms ... +pair_style eam/alloy +pair_coeff * * AlCu.eam.alloy Cu Al +Reading eam/alloy potential file AlCu.eam.alloy with DATE: 2008-10-01 + +# replace 5% of copper with aluminium on the second partition only +if "${name} == alloy" then "set type 1 type/fraction 2 0.05 6745234" + +velocity all create 5000.0 6567345 +fix 1 all nvt temp 2500.0 500.0 0.002 +fix 2 all alchemy + +compute pressure all pressure/alchemy 2 + +# only need to output a dump file from one partition +#if "${name} == alloy" then # "dump 1 all custom 100 ${name}.lammpstrj id type element x y z" # "dump_modify 1 element Cu Al" + +thermo_style custom step temp press etotal density pe ke f_2 f_2[3] +thermo_modify colname f_2 lambda colname f_2[3] EPot_mixed +thermo_modify press pressure + +thermo 100 +run 10000 post no +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 8.6825 + ghost atom cutoff = 8.6825 + binsize = 4.34125, bins = 6 6 6 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair eam/alloy, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.474 | 3.474 | 3.474 Mbytes + Step Temp Press TotEng Density PotEng KinEng lambda EPot_mixed + 0 5000 2135632.8 10911.637 8.0039334 10353.88 557.75753 1 10353.88 + 100 2424.8703 98461.445 -2402.724 8.0039334 -2673.222 270.49793 0.99 -2673.3837 + 200 2404.4922 111478.55 -2381.5114 8.0039334 -2649.7361 268.22473 0.98 -2650.057 + 300 2388.2899 109429.75 -2387.7985 8.0039334 -2654.2158 266.41733 0.97 -2654.7075 + 400 2377.6418 97114.07 -2409.7114 8.0039334 -2674.9409 265.22953 0.96 -2675.755 + 500 2371.5028 98285.746 -2408.3248 8.0039334 -2672.8695 264.54471 0.95 -2673.6895 + 600 2368.0363 101125.13 -2402.9816 8.0039334 -2667.1396 264.15802 0.94 -2668.238 + 700 2364.8386 96916.491 -2410.1795 8.0039334 -2673.9808 263.80131 0.93 -2675.3394 + 800 2361.5815 101050.97 -2404.7579 8.0039334 -2668.1958 263.43797 0.92 -2669.6797 + 900 2355.1085 95290.542 -2416.4508 8.0039334 -2679.1667 262.7159 0.91 -2681.0381 + 1000 2344.579 90348.199 -2430.3553 8.0039334 -2691.8966 261.54132 0.9 -2693.7969 + 1100 2328.7808 87089.44 -2435.1426 8.0039334 -2694.9216 259.779 0.89 -2696.9199 + 1200 2310.0924 89628.642 -2438.4943 8.0039334 -2696.1886 257.69429 0.88 -2698.4983 + 1300 2288.2762 92771.824 -2430.0042 8.0039334 -2685.2648 255.26065 0.87 -2687.6406 + 1400 2258.3028 83029.221 -2451.9432 8.0039334 -2703.8603 251.91707 0.86 -2706.638 + 1500 2226.5131 83386 -2452.9658 8.0039334 -2701.3367 248.37089 0.85 -2704.0915 + 1600 2192.5777 81801.467 -2460.6692 8.0039334 -2705.2546 244.58535 0.84 -2708.3304 + 1700 2158.7421 84933.294 -2456.2782 8.0039334 -2697.0891 240.81093 0.83 -2700.142 + 1800 2123.8912 76700.779 -2474.2534 8.0039334 -2711.1767 236.92327 0.82 -2714.6978 + 1900 2091.3912 82568.985 -2469.6316 8.0039334 -2702.9295 233.29783 0.81 -2706.5643 + 2000 2061.868 79024.983 -2476.3262 8.0039334 -2706.3307 230.00448 0.8 -2710.7 + 2100 2036.179 72408.502 -2493.6936 8.0039334 -2720.8324 227.13884 0.79 -2725.1617 + 2200 2014.0161 81172.694 -2479.0525 8.0039334 -2703.719 224.66652 0.78 -2708.4618 + 2300 1996.2707 78029.129 -2485.3835 8.0039334 -2708.0706 222.687 0.77 -2712.5894 + 2400 1982.6409 79691.571 -2483.2441 8.0039334 -2704.4107 221.16658 0.76 -2709.4434 + 2500 1971.6774 75015.359 -2493.8754 8.0039334 -2713.819 219.94358 0.75 -2719.4159 + 2600 1963.0369 74845.99 -2493.3203 8.0039334 -2712.3 218.97972 0.74 -2718.1619 + 2700 1955.2025 76756.042 -2491.6282 8.0039334 -2709.7339 218.10578 0.73 -2716.0963 + 2800 1947.4326 70627.84 -2507.5853 8.0039334 -2724.8243 217.23904 0.72 -2730.7999 + 2900 1939.4308 70852.114 -2508.8277 8.0039334 -2725.1742 216.34642 0.71 -2731.5024 + 3000 1929.3184 75867.616 -2497.0826 8.0039334 -2712.301 215.21837 0.7 -2718.4146 + 3100 1916.202 68984.855 -2517.8316 8.0039334 -2731.5868 213.75522 0.69 -2738.0966 + 3200 1901.363 73304.621 -2508.0281 8.0039334 -2720.128 212.09991 0.68 -2727.1933 + 3300 1881.196 69447.29 -2513.9782 8.0039334 -2723.8285 209.85024 0.67 -2730.768 + 3400 1856.1833 64973.868 -2526.8095 8.0039334 -2733.8695 207.06004 0.66 -2741.4173 + 3500 1829.7246 64688.566 -2528.8664 8.0039334 -2732.9749 204.10853 0.65 -2740.986 + 3600 1800.1245 56451.766 -2547.6377 8.0039334 -2748.4443 200.80659 0.64 -2756.4626 + 3700 1771.5886 68268.147 -2530.5906 8.0039334 -2728.214 197.62337 0.63 -2735.8618 + 3800 1740.3894 64187.24 -2539.0772 8.0039334 -2733.2202 194.14306 0.62 -2742.67 + 3900 1709.6971 61697.296 -2548.5651 8.0039334 -2739.2844 190.71928 0.61 -2748.648 + 4000 1680.6126 58960.336 -2557.3154 8.0039334 -2744.7902 187.47487 0.6 -2753.7317 + 4100 1653.386 49607.708 -2575.5217 8.0039334 -2759.9594 184.43769 0.59 -2769.1633 + 4200 1628.5806 59615.376 -2562.3155 8.0039334 -2743.9861 181.67062 0.58 -2753.41 + 4300 1605.7638 57213.496 -2568.9241 8.0039334 -2748.0495 179.12536 0.57 -2758.0401 + 4400 1586.3539 57319.854 -2567.3656 8.0039334 -2744.3258 176.96016 0.56 -2754.0451 + 4500 1569.1762 51130.713 -2581.1996 8.0039334 -2756.2435 175.04397 0.55 -2767.0321 + 4600 1554.2279 51209.179 -2582.5415 8.0039334 -2755.918 173.37646 0.54 -2767.2662 + 4700 1541.2064 51391.73 -2584.9958 8.0039334 -2756.9197 171.92389 0.53 -2768.7565 + 4800 1529.3566 48164.466 -2590.6042 8.0039334 -2761.2062 170.60203 0.52 -2773.7243 + 4900 1517.8359 47270.397 -2595.8724 8.0039334 -2765.1893 169.31688 0.51 -2777.023 + 5000 1506.2157 46127.507 -2595.6789 8.0039334 -2763.6995 168.02063 0.5 -2777.2298 + 5100 1494.4675 45092.69 -2600.075 8.0039334 -2766.7851 166.7101 0.49 -2779.7181 + 5200 1480.2051 41485.775 -2607.0151 8.0039334 -2772.1342 165.1191 0.48 -2785.5483 + 5300 1465.1748 39849.775 -2612.3292 8.0039334 -2775.7716 163.44246 0.47 -2788.9493 + 5400 1447.9857 39330.898 -2615.0485 8.0039334 -2776.5735 161.52498 0.46 -2790.3996 + 5500 1427.9752 35674.647 -2624.4226 8.0039334 -2783.7154 159.29278 0.45 -2797.922 + 5600 1406.1138 33960.907 -2630.1163 8.0039334 -2786.9704 156.85411 0.44 -2801.8887 + 5700 1383.2834 39122.559 -2621.0951 8.0039334 -2775.4025 154.30734 0.43 -2790.3487 + 5800 1357.4953 34996.372 -2632.2759 8.0039334 -2783.7065 151.43064 0.42 -2798.8306 + 5900 1331.345 30380.598 -2640.9488 8.0039334 -2789.4624 148.51354 0.41 -2804.9873 + 6000 1304.5621 26910.214 -2652.7787 8.0039334 -2798.3046 145.52587 0.4 -2814.8623 + 6100 1278.2361 34273.343 -2642.9208 8.0039334 -2785.51 142.58917 0.39 -2801.9949 + 6200 1251.7315 29640.216 -2651.6543 8.0039334 -2791.2868 139.63253 0.38 -2807.555 + 6300 1226.3243 25302.881 -2660.8448 8.0039334 -2797.6431 136.79832 0.37 -2815.3412 + 6400 1202.0501 23978.218 -2668.9812 8.0039334 -2803.0717 134.09049 0.36 -2820.0498 + 6500 1178.656 25315.547 -2668.8266 8.0039334 -2800.3074 131.48085 0.35 -2817.3114 + 6600 1156.9362 22676.36 -2673.1256 8.0039334 -2802.1835 129.05797 0.34 -2819.6239 + 6700 1163.8953 22497.41 -2674.4164 8.0039334 -2804.2506 129.83427 0.33 -2821.3556 + 6800 1123.3867 18193.925 -2685.3997 8.0039334 -2810.7152 125.31548 0.32 -2830.2267 + 6900 1147.6164 19451.295 -2682.5112 8.0039334 -2810.5295 128.01834 0.31 -2830.1189 + 7000 1096.0437 16757.031 -2689.5567 8.0039334 -2811.822 122.26532 0.3 -2832.475 + 7100 1065.1232 11734.429 -2703.0123 8.0039334 -2821.8284 118.8161 0.29 -2841.8886 + 7200 1048.459 15187.579 -2697.6953 8.0039334 -2814.6525 116.95718 0.28 -2834.2885 + 7300 1067.9311 13697.721 -2698.4027 8.0039334 -2817.532 119.12932 0.27 -2838.9073 + 7400 998.4963 13330.213 -2707.915 8.0039334 -2819.2987 111.38377 0.26 -2840.2979 + 7500 1023.6105 7070.7227 -2712.3293 8.0039334 -2826.5146 114.18529 0.25 -2848.8706 + 7600 970.8256 7694.074 -2717.03 8.0039334 -2825.3271 108.29706 0.24 -2848.0154 + 7700 966.64807 2336.6244 -2727.1914 8.0039334 -2835.0224 107.83105 0.23 -2858.6468 + 7800 961.41051 564.58952 -2731.2826 8.0039334 -2838.5294 107.24679 0.22 -2862.4362 + 7900 880.63112 3569.7496 -2734.8614 8.0039334 -2833.0971 98.235727 0.21 -2857.2329 + 8000 904.4189 -883.03123 -2738.386 8.0039334 -2839.2753 100.88929 0.2 -2864.1778 + 8100 901.36129 -977.71992 -2739.797 8.0039334 -2840.3452 100.54821 0.19 -2864.7239 + 8200 834.53102 2535.4088 -2741.7378 8.0039334 -2834.831 93.093191 0.18 -2859.9007 + 8300 830.12299 -6039.909 -2755.2151 8.0039334 -2847.8166 92.601469 0.17 -2873.9613 + 8400 807.63492 -5386.015 -2755.7433 8.0039334 -2845.8362 90.092891 0.16 -2872.8494 + 8500 792.64609 -6372.4363 -2758.8515 8.0039334 -2847.2724 88.420864 0.15 -2874.8424 + 8600 758.58937 -11610.225 -2770.2002 8.0039334 -2854.822 84.621786 0.14 -2882.1413 + 8700 758.23023 -10178.597 -2769.9169 8.0039334 -2854.4986 84.581724 0.13 -2881.6683 + 8800 743.6008 -12026.268 -2776.0268 8.0039334 -2858.9766 82.949788 0.12 -2886.1335 + 8900 734.90694 -17472.954 -2783.3532 8.0039334 -2865.3332 81.979975 0.11 -2893.7244 + 9000 707.10989 -17006.609 -2785.8037 8.0039334 -2864.6829 78.879173 0.1 -2893.2911 + 9100 695.13334 -20282.325 -2793.2101 8.0039334 -2870.7532 77.543171 0.09 -2899.891 + 9200 642.26078 -20368.748 -2798.1031 8.0039334 -2869.7483 71.645157 0.08 -2899.7706 + 9300 641.79203 -21031.839 -2798.6175 8.0039334 -2870.2104 71.592866 0.07 -2901.0899 + 9400 640.84125 -20243.066 -2799.2216 8.0039334 -2870.7084 71.486807 0.06 -2901.4655 + 9500 609.96498 -23936.746 -2809.3896 8.0039334 -2877.4321 68.042512 0.05 -2908.2797 + 9600 574.1911 -26956.034 -2817.6178 8.0039334 -2881.6696 64.051882 0.04 -2912.6742 + 9700 567.47641 -28321.949 -2818.8602 8.0039334 -2882.163 63.302848 0.03 -2914.4223 + 9800 520.37758 -31000.6 -2828.0252 8.0039334 -2886.0741 58.048903 0.02 -2918.4921 + 9900 506.49368 -32223.744 -2830.1705 8.0039334 -2886.6706 56.500132 0.01 -2920.4741 + 10000 507.13597 -33930.476 -2834.3236 8.0039334 -2890.8954 56.571781 0 -2924.5423 +Loop time of 19.2208 on 2 procs for 10000 steps with 864 atoms + + +Total wall time: 0:00:19 diff --git a/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.1 b/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.1 new file mode 100644 index 0000000000..9f928692ed --- /dev/null +++ b/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.1 @@ -0,0 +1,168 @@ +LAMMPS (8 Feb 2023) +Processor partition = 1 + using 1 OpenMP thread(s) per MPI task +# Example for an alchemical transformation simulation of pure copper into an aluminium bronze + +# set up different names for two partitions +variable name world pure alloy + +# create pure copper system +units metal +lattice fcc 3.75 +Lattice spacing in x,y,z = 3.75 3.75 3.75 +region box block 0 6 0 6 0 6 +create_box 2 box +Created orthogonal box = (0 0 0) to (22.5 22.5 22.5) + 1 by 1 by 2 MPI processor grid + +timestep 0.002 +create_atoms 1 box +Created 864 atoms + using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5) + create_atoms CPU = 0.000 seconds +displace_atoms all random 0.3 0.3 0.3 57845645 +Displacing atoms ... +pair_style eam/alloy +pair_coeff * * AlCu.eam.alloy Cu Al +Reading eam/alloy potential file AlCu.eam.alloy with DATE: 2008-10-01 + +# replace 5% of copper with aluminium on the second partition only +if "${name} == alloy" then "set type 1 type/fraction 2 0.05 6745234" +set type 1 type/fraction 2 0.05 6745234 +Setting atom values ... + 37 settings made for type/fraction + +velocity all create 5000.0 6567345 +fix 1 all nvt temp 2500.0 500.0 0.002 +fix 2 all alchemy + +compute pressure all pressure/alchemy 2 + +# only need to output a dump file from one partition +#if "${name} == alloy" then # "dump 1 all custom 100 ${name}.lammpstrj id type element x y z" # "dump_modify 1 element Cu Al" + +thermo_style custom step temp press etotal density pe ke f_2 f_2[3] +thermo_modify colname f_2 lambda colname f_2[3] EPot_mixed +thermo_modify press pressure + +thermo 100 +run 10000 post no +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 8.6825 + ghost atom cutoff = 8.6825 + binsize = 4.34125, bins = 6 6 6 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair eam/alloy, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.474 | 3.474 | 3.474 Mbytes + Step Temp Press TotEng Density PotEng KinEng lambda EPot_mixed + 0 5000 2135632.8 11134.401 7.8067107 10576.643 557.75753 0 10353.88 + 100 2502.4638 98461.445 -2410.2394 7.8067107 -2689.393 279.1536 0.01 -2673.3837 + 200 2471.2133 111478.55 -2390.1144 7.8067107 -2665.7819 275.66756 0.02 -2650.057 + 300 2442.869 109429.75 -2398.101 7.8067107 -2670.6067 272.50571 0.03 -2654.7075 + 400 2420.4514 97114.07 -2425.2882 7.8067107 -2695.2932 270.005 0.04 -2675.755 + 500 2403.3496 98285.746 -2421.1707 7.8067107 -2689.268 268.09727 0.05 -2673.6895 + 600 2388.6644 101125.13 -2418.9873 7.8067107 -2685.4464 266.45911 0.06 -2668.238 + 700 2372.4091 96916.491 -2428.7444 7.8067107 -2693.3902 264.64581 0.07 -2675.3394 + 800 2356.5786 101050.97 -2423.8648 7.8067107 -2686.7446 262.87989 0.08 -2669.6797 + 900 2337.3256 95290.542 -2439.2282 7.8067107 -2699.9604 260.73219 0.09 -2681.0381 + 1000 2314.6552 90348.199 -2452.6965 7.8067107 -2710.8998 258.20327 0.1 -2693.7969 + 1100 2288.9862 87089.44 -2457.7481 7.8067107 -2713.088 255.33986 0.11 -2696.9199 + 1200 2263.1553 89628.642 -2462.9772 7.8067107 -2715.4356 252.45838 0.12 -2698.4983 + 1300 2238.1696 92771.824 -2453.8691 7.8067107 -2703.5403 249.67118 0.13 -2687.6406 + 1400 2209.3333 83029.221 -2477.2462 7.8067107 -2723.7006 246.45446 0.14 -2706.638 + 1500 2181.9468 83386 -2476.3027 7.8067107 -2719.7022 243.39945 0.15 -2704.0915 + 1600 2156.3929 81801.467 -2483.9294 7.8067107 -2724.4783 240.54887 0.16 -2708.3304 + 1700 2133.221 84933.294 -2477.0832 7.8067107 -2715.0473 237.96401 0.17 -2700.142 + 1800 2110.4496 76700.779 -2495.3147 7.8067107 -2730.7386 235.42383 0.18 -2714.6978 + 1900 2091.8774 82568.985 -2488.7082 7.8067107 -2722.0603 233.35207 0.19 -2706.5643 + 2000 2074.8972 79024.983 -2496.7194 7.8067107 -2728.1773 231.45791 0.2 -2710.7 + 2100 2059.7023 72408.502 -2511.6849 7.8067107 -2741.4478 229.76289 0.21 -2725.1617 + 2200 2046.5649 81172.694 -2496.9796 7.8067107 -2725.277 228.2974 0.22 -2708.4618 + 2300 2033.9024 78029.129 -2500.8329 7.8067107 -2727.7178 226.88488 0.23 -2712.5894 + 2400 2022.0535 79691.571 -2499.8173 7.8067107 -2725.3804 225.56311 0.24 -2709.4434 + 2500 2008.7841 75015.359 -2512.1238 7.8067107 -2736.2067 224.08289 0.25 -2719.4159 + 2600 1995.175 74845.99 -2512.2807 7.8067107 -2734.8455 222.56477 0.26 -2718.1619 + 2700 1979.2542 76756.042 -2512.5095 7.8067107 -2733.2983 220.78879 0.27 -2716.0963 + 2800 1961.2518 70627.84 -2527.3853 7.8067107 -2746.1659 218.78059 0.28 -2730.7999 + 2900 1942.4706 70852.114 -2530.3101 7.8067107 -2746.9956 216.68552 0.29 -2731.5024 + 3000 1922.0973 75867.616 -2518.2668 7.8067107 -2732.6796 214.41284 0.3 -2718.4146 + 3100 1898.9538 68984.855 -2540.7552 7.8067107 -2752.5863 211.83116 0.31 -2738.0966 + 3200 1874.9107 73304.621 -2533.0578 7.8067107 -2742.2069 209.14911 0.32 -2727.1933 + 3300 1848.9824 69447.29 -2538.6006 7.8067107 -2744.8574 206.25677 0.33 -2730.768 + 3400 1821.4108 64973.868 -2552.8877 7.8067107 -2756.0688 203.18111 0.34 -2741.4173 + 3500 1795.4926 64688.566 -2555.5739 7.8067107 -2755.8638 200.2899 0.35 -2740.986 + 3600 1769.4009 56451.766 -2573.338 7.8067107 -2770.7174 197.37934 0.36 -2756.4626 + 3700 1745.5646 68268.147 -2554.1634 7.8067107 -2748.8838 194.72036 0.37 -2735.8618 + 3800 1721.4956 64187.24 -2566.0526 7.8067107 -2758.088 192.03542 0.38 -2742.67 + 3900 1699.517 61697.296 -2573.7098 7.8067107 -2763.2935 189.58368 0.39 -2748.648 + 4000 1680.2819 58960.336 -2579.7058 7.8067107 -2767.1438 187.43798 0.4 -2753.7317 + 4100 1662.2079 49607.708 -2596.9862 7.8067107 -2782.408 185.42179 0.41 -2769.1633 + 4200 1645.509 59615.376 -2582.865 7.8067107 -2766.424 183.55901 0.42 -2753.41 + 4300 1628.9336 57213.496 -2589.5734 7.8067107 -2771.2834 181.71 0.43 -2758.0401 + 4400 1614.2369 57319.854 -2586.3446 7.8067107 -2766.4151 180.07055 0.44 -2754.0451 + 4500 1598.6946 51130.713 -2601.8813 7.8067107 -2780.2181 178.33679 0.45 -2767.0321 + 4600 1583.2816 51209.179 -2603.9706 7.8067107 -2780.5881 176.61745 0.46 -2767.2662 + 4700 1567.3743 51391.73 -2607.2614 7.8067107 -2782.1044 174.84296 0.47 -2768.7565 + 4800 1550.9245 48164.466 -2614.2775 7.8067107 -2787.2854 173.00797 0.48 -2773.7243 + 4900 1532.697 47270.397 -2618.365 7.8067107 -2789.3397 170.97466 0.49 -2777.023 + 5000 1513.7604 46127.507 -2621.8979 7.8067107 -2790.7601 168.86225 0.5 -2777.2298 + 5100 1494.431 45092.69 -2625.438 7.8067107 -2792.144 166.70602 0.51 -2779.7181 + 5200 1472.5263 41485.775 -2633.6681 7.8067107 -2797.9306 164.26252 0.52 -2785.5483 + 5300 1450.7978 39849.775 -2638.7965 7.8067107 -2800.6352 161.83868 0.53 -2788.9493 + 5400 1428.063 39330.898 -2642.8749 7.8067107 -2802.1774 159.30258 0.54 -2790.3996 + 5500 1404.4139 35674.647 -2652.8811 7.8067107 -2809.5456 156.66449 0.55 -2797.922 + 5600 1380.8619 33960.907 -2659.5731 7.8067107 -2813.6103 154.03722 0.56 -2801.8887 + 5700 1357.9957 39122.559 -2650.1374 7.8067107 -2801.6239 151.48646 0.57 -2790.3487 + 5800 1334.8385 34996.372 -2660.8794 7.8067107 -2809.7826 148.90324 0.58 -2798.8306 + 5900 1312.6203 30380.598 -2669.3511 7.8067107 -2815.7758 146.42476 0.59 -2804.9873 + 6000 1290.7337 26910.214 -2681.9175 7.8067107 -2825.9008 143.98328 0.6 -2814.8623 + 6100 1269.6552 34273.343 -2670.9025 7.8067107 -2812.5345 141.63195 0.61 -2801.9949 + 6200 1249.4502 29640.216 -2678.1477 7.8067107 -2817.5258 139.37805 0.62 -2807.555 + 6300 1229.8377 25302.881 -2688.545 7.8067107 -2825.7352 137.19025 0.63 -2815.3412 + 6400 1211.0142 23978.218 -2694.5096 7.8067107 -2829.6 135.09045 0.64 -2820.0498 + 6500 1192.3094 25315.547 -2693.4635 7.8067107 -2826.4674 133.0039 0.65 -2817.3114 + 6600 1174.741 22676.36 -2697.5642 7.8067107 -2828.6083 131.04413 0.66 -2819.6239 + 6700 1117.0829 22497.41 -2705.1682 7.8067107 -2829.7804 124.61228 0.67 -2821.3556 + 6800 1125.4062 18193.925 -2713.8679 7.8067107 -2839.4086 125.54075 0.68 -2830.2267 + 6900 1142.0728 19451.295 -2711.5199 7.8067107 -2838.9199 127.39994 0.69 -2830.1189 + 7000 1148.9469 16757.031 -2713.1595 7.8067107 -2841.3263 128.16676 0.7 -2832.475 + 7100 1044.2332 11734.429 -2733.5965 7.8067107 -2850.0822 116.48578 0.71 -2841.8886 + 7200 1052.3967 15187.579 -2724.5284 7.8067107 -2841.9248 117.39644 0.72 -2834.2885 + 7300 1045.9123 13697.721 -2730.1401 7.8067107 -2846.8132 116.67309 0.73 -2838.9073 + 7400 1082.9806 13330.213 -2726.8679 7.8067107 -2847.676 120.80812 0.74 -2840.2979 + 7500 980.30736 7070.7227 -2746.9678 7.8067107 -2856.3226 109.35476 0.75 -2848.8706 + 7600 982.86602 7694.074 -2745.5399 7.8067107 -2855.1801 109.64018 0.76 -2848.0154 + 7700 958.27863 2336.6244 -2758.806 7.8067107 -2865.7035 106.89742 0.77 -2858.6468 + 7800 991.25495 564.58952 -2758.6032 7.8067107 -2869.1791 110.57598 0.78 -2862.4362 + 7900 901.65217 3569.7496 -2763.0681 7.8067107 -2863.6488 100.58066 0.79 -2857.2329 + 8000 871.00782 -883.03123 -2773.2412 7.8067107 -2870.4035 97.162233 0.8 -2864.1778 + 8100 873.73598 -977.71992 -2772.9758 7.8067107 -2870.4424 97.466563 0.81 -2864.7239 + 8200 859.27838 2535.4088 -2769.5501 7.8067107 -2865.4039 95.853797 0.82 -2859.9007 + 8300 874.88664 -6039.909 -2781.7213 7.8067107 -2879.3163 97.594921 0.83 -2873.9613 + 8400 810.33098 -5386.015 -2787.6011 7.8067107 -2877.9947 90.393641 0.84 -2872.8494 + 8500 812.50682 -6372.4363 -2789.0713 7.8067107 -2879.7077 90.636359 0.85 -2874.8424 + 8600 792.27145 -11610.225 -2798.2095 7.8067107 -2886.5886 88.379073 0.86 -2882.1413 + 8700 737.92522 -10178.597 -2803.4114 7.8067107 -2885.7281 82.316669 0.87 -2881.6683 + 8800 744.31065 -12026.268 -2806.8078 7.8067107 -2889.8367 83.028973 0.88 -2886.1335 + 8900 709.31385 -17472.954 -2818.1084 7.8067107 -2897.2334 79.125027 0.89 -2893.7244 + 9000 704.20763 -17006.609 -2817.9144 7.8067107 -2896.4698 78.555422 0.9 -2893.2911 + 9100 697.72956 -20282.325 -2824.94 7.8067107 -2902.7728 77.832782 0.91 -2899.891 + 9200 696.15397 -20368.748 -2824.7243 7.8067107 -2902.3813 77.657023 0.92 -2899.7706 + 9300 627.98752 -21031.839 -2833.3613 7.8067107 -2903.4142 70.052953 0.93 -2901.0899 + 9400 603.4933 -20243.066 -2836.1082 7.8067107 -2903.4288 67.320586 0.94 -2901.4655 + 9500 599.69375 -23936.746 -2843.0066 7.8067107 -2909.9033 66.89674 0.95 -2908.2797 + 9600 587.42611 -26956.034 -2848.4377 7.8067107 -2913.966 65.528267 0.96 -2912.6742 + 9700 567.47718 -28321.949 -2852.1171 7.8067107 -2915.42 63.302933 0.97 -2914.4223 + 9800 524.81105 -31000.6 -2860.6103 7.8067107 -2919.1537 58.543462 0.98 -2918.4921 + 9900 507.60008 -32223.744 -2864.192 7.8067107 -2920.8155 56.623552 0.99 -2920.4741 + 10000 521.28866 -33930.476 -2866.3918 7.8067107 -2924.5423 58.150534 1 -2924.5423 +Loop time of 19.2208 on 2 procs for 10000 steps with 864 atoms + + +Total wall time: 0:00:19 From c9b22ba04fa4035b734ad2d95f5acc22640f620f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 17:17:41 -0500 Subject: [PATCH 277/445] mention pair style hybrid/scaled as alternative --- doc/src/fix_alchemy.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/src/fix_alchemy.rst b/doc/src/fix_alchemy.rst index 26ff4589a5..7a5ee71021 100644 --- a/doc/src/fix_alchemy.rst +++ b/doc/src/fix_alchemy.rst @@ -36,8 +36,8 @@ from 0.0 to 1.0 for the *second* partition (*p=1*). The forces used for the propagation of the atoms will be the sum of the forces of the two systems combined and scaled with their respective :math:`\lambda_p` factor. This allows to perform transformations that are not easily -possible with :doc:`fix adapt ` or :doc:`fix adapt/fep -`. +possible with :doc:`pair style hybrid/scaled `, :doc:`fix +adapt ` or :doc:`fix adapt/fep `. Due to the specifics of the implementation, the initial geometry and dimensions of the system must be exactly the same and the fix will @@ -45,12 +45,14 @@ synchronize them during the run. It is thus not possible to initialize the two partitions by reading different data files or creating different systems from scratch, but rather they have to be started from the same system and then the desired modifications need to be applied to the -system of the second partition. The commands :doc:`fix adapt ` -or :doc:`fix adapt/fep ` could be used for simulations -where the requirements for fix alchemy are not given. +system of the second partition. The commands :doc:`pair style +hybrid/scaled `, :doc:`fix adapt ` or :doc:`fix +adapt/fep ` could be used for simulations where the +requirements for fix alchemy are not given. -The commands below demonstrate how this can be done for the example of -transforming a pure copper system into a copper aluminum bronze. +The commands below demonstrate how the setup for the second partition +can be done for the example of transforming a pure copper system into a +copper/aluminum bronze. .. code-block:: LAMMPS @@ -111,7 +113,8 @@ Related commands """""""""""""""" :doc:`compute pressure/alchemy ` command, -:doc:`fix adapt ` command +:doc:`fix adapt ` command, :doc:`fix adapt/fep ` +command, :doc:`pair_style hybrid/scaled ` command. Default """"""" From 666be5c3d90268fc80baa3e5427ce1432b11685e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 23:46:58 -0500 Subject: [PATCH 278/445] add log files for example run --- .../pimd/para-h2/log.25Feb23.scp.g++.8 | 2 + .../pimd/para-h2/log.25Feb23.scp.g++.8.0 | 199 ++++++++++++++++++ .../pimd/para-h2/log.25Feb23.scp.g++.8.1 | 197 +++++++++++++++++ .../pimd/para-h2/log.25Feb23.scp.g++.8.2 | 197 +++++++++++++++++ .../pimd/para-h2/log.25Feb23.scp.g++.8.3 | 197 +++++++++++++++++ .../pimd/para-h2/log.25Feb23.scp.g++.8.4 | 197 +++++++++++++++++ .../pimd/para-h2/log.25Feb23.scp.g++.8.5 | 197 +++++++++++++++++ .../pimd/para-h2/log.25Feb23.scp.g++.8.6 | 197 +++++++++++++++++ .../pimd/para-h2/log.25Feb23.scp.g++.8.7 | 197 +++++++++++++++++ 9 files changed, 1580 insertions(+) create mode 100644 examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8 create mode 100644 examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.0 create mode 100644 examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.1 create mode 100644 examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.2 create mode 100644 examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.3 create mode 100644 examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.4 create mode 100644 examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.5 create mode 100644 examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.6 create mode 100644 examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.7 diff --git a/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8 b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8 new file mode 100644 index 0000000000..14b41c14f3 --- /dev/null +++ b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8 @@ -0,0 +1,2 @@ +LAMMPS (8 Feb 2023) +Running on 8 partitions of processors diff --git a/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.0 b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.0 new file mode 100644 index 0000000000..037ad3f2d3 --- /dev/null +++ b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.0 @@ -0,0 +1,199 @@ +LAMMPS (8 Feb 2023) +Processor partition = 0 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 32 pad +variable out_freq string 100 +variable job_name string H2 + +units real +atom_style full +pair_style table linear 10000 + +neighbor 2.0 bin +neigh_modify every 1 delay 0 check no + +read_data H2.data +Reading data file ... + orthogonal box = (0 0 0) to (19.71219 19.71219 19.71219) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 180 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.003 seconds + +pair_coeff 1 * pair.table PAIR_H2 +WARNING: 5852 of 18000 force values in table PAIR_H2 are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:466) + +timestep 0.001 + +velocity all create 1.0 1985 rot yes dist gaussian + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 25.0 nhc 4 + +thermo_style custom step temp pe etotal pzz f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +thermo ${out_freq} +thermo 100 + +#dump dcd all dcd ${out_freq} ${job_name}_${ibead}.dcd + +#restart ${out_freq} ${job_name}_${ibead}.restart1 ${job_name}_${ibead}.restart2 + +run 10000 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Fix pimd/nvt -P/(beta^2 * hbar^2) = -2.0510430e-01 (kcal/mol/A^2) + +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 11.55117 + ghost atom cutoff = 11.55117 + binsize = 5.775585, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 11.97 | 11.97 | 11.97 Mbytes + Step Temp PotEng TotEng Pzz espring T_ring virial + 0 1 -50.292986 -49.759421 16.18218 0 2.4190752e-312 4.331435e-14 + 100 1.0017926 -50.292812 -49.758291 16.197861 4.265072e-05 0.99622709 -0.027624534 + 200 1.0071966 -50.292414 -49.755009 16.235286 0.00017002327 1.0016011 -0.055248299 + 300 1.0162913 -50.291757 -49.7495 16.297361 0.00038044032 1.0106453 -0.082873452 + 400 1.0292116 -50.290849 -49.741697 16.38451 0.00067129747 1.0234938 -0.11047807 + 500 1.046152 -50.289692 -49.731502 16.497053 0.0010393068 1.0403401 -0.13806207 + 600 1.0673727 -50.288298 -49.718785 16.634959 0.0014807685 1.0614428 -0.16561253 + 700 1.0932075 -50.286675 -49.703378 16.798983 0.0019918311 1.0871342 -0.19314289 + 800 1.1240754 -50.284828 -49.68506 16.990234 0.0025687136 1.1178306 -0.22065895 + 900 1.1604938 -50.28276 -49.663562 17.210179 0.0032078786 1.1540466 -0.24818038 + 1000 1.2030968 -50.280481 -49.638551 17.460167 0.0039061562 1.196413 -0.27572028 + 1100 1.2526583 -50.277991 -49.609616 17.742341 0.0046608267 1.2456991 -0.30331246 + 1200 1.3101204 -50.275294 -49.576259 18.059364 0.0054696709 1.3028419 -0.33099732 + 1300 1.3766308 -50.272386 -49.537864 18.415203 0.0063309999 1.3689828 -0.35880748 + 1400 1.4535894 -50.269262 -49.493677 18.814095 0.007243672 1.4455139 -0.38678366 + 1500 1.5427084 -50.265919 -49.442783 19.261431 0.0082071044 1.5341378 -0.41499269 + 1600 1.6460882 -50.262344 -49.384049 19.763852 0.0092212862 1.6369433 -0.44348166 + 1700 1.7663158 -50.25853 -49.316086 20.329991 0.010286796 1.756503 -0.47232409 + 1800 1.9065905 -50.254461 -49.237171 20.96974 0.01140483 1.8959983 -0.50158483 + 1900 2.0708856 -50.250115 -49.145163 21.696809 0.012577241 2.0593807 -0.53134846 + 2000 2.2641571 -50.245477 -49.037402 22.525956 0.013806592 2.2515785 -0.5617101 + 2100 2.4926123 -50.240516 -48.910546 23.477847 0.015096239 2.4787644 -0.59276642 + 2200 2.7640541 -50.2352 -48.760398 24.577541 0.01645042 2.7486983 -0.62463764 + 2300 3.088323 -50.229491 -48.58167 25.856282 0.017874391 3.0711656 -0.65745388 + 2400 3.4778567 -50.223344 -48.367681 27.353194 0.01937458 3.4585353 -0.69135912 + 2500 3.9483938 -50.216703 -48.109978 29.11873 0.020958791 3.9264583 -0.72652121 + 2600 4.5198403 -50.209503 -47.797875 31.215234 0.02263645 4.4947301 -0.76313188 + 2700 5.2173107 -50.201663 -47.417889 33.721815 0.024418904 5.1883257 -0.80140558 + 2800 6.0723283 -50.193089 -46.953107 36.73757 0.026319777 6.0385931 -0.84159436 + 2900 7.1241213 -50.183668 -46.382487 40.38551 0.028355393 7.0845429 -0.88396874 + 3000 8.4208727 -50.173266 -45.680183 44.816478 0.030545255 8.3740901 -0.9288431 + 3100 10.020649 -50.161717 -44.81505 50.212214 0.032912578 9.9649788 -0.97656436 + 3200 11.991558 -50.148837 -43.750561 56.786471 0.035484852 11.924938 -1.0275116 + 3300 14.410456 -50.134392 -42.445477 64.781319 0.038294377 14.330398 -1.0821007 + 3400 17.359303 -50.11813 -40.855813 74.455919 0.041378722 17.262863 -1.14076 + 3500 20.918126 -50.099744 -38.938564 86.068376 0.044780961 20.801915 -1.2039443 + 3600 25.153676 -50.078895 -36.657774 99.840861 0.048549564 25.013933 -1.2720773 + 3700 30.103431 -50.055212 -33.993075 115.91254 0.052737712 29.93619 -1.3455663 + 3800 35.755845 -50.028299 -30.950232 134.28175 0.057401834 35.557201 -1.4247605 + 3900 42.029581 -49.997746 -27.572232 154.74519 0.062599126 41.796084 -1.5098692 + 4000 48.756702 -49.963159 -23.948289 176.84543 0.06838392 48.485832 -1.6010084 + 4100 55.676392 -49.924188 -20.217214 199.84979 0.074802896 55.367079 -1.6980754 + 4200 62.445716 -49.880563 -16.561714 222.7783 0.081889414 62.098795 -1.8007866 + 4300 68.671023 -49.832118 -13.191664 244.49021 0.089657516 68.289518 -1.9086164 + 4400 73.957826 -49.778843 -10.317535 263.82539 0.098096488 73.546949 -2.0208305 + 4500 77.969954 -49.7209 -8.1188616 279.77238 0.10716704 77.536788 -2.1364913 + 4600 80.483598 -49.658617 -6.7153862 291.6285 0.11680011 80.036467 -2.254524 + 4700 81.421471 -49.592506 -6.1488596 299.10183 0.12689894 80.969129 -2.3737378 + 4800 80.857888 -49.523204 -6.3802649 302.3328 0.13734453 80.408677 -2.492954 + 4900 78.994781 -49.451459 -7.3026086 301.83334 0.14800388 78.555921 -2.6110228 + 5000 76.117367 -49.378045 -8.7644823 298.36557 0.15873983 75.694493 -2.7269278 + 5100 72.542745 -49.303735 -10.597466 292.79593 0.16942116 72.139729 -2.8398052 + 5200 68.573953 -49.22923 -12.640569 285.96472 0.17993138 68.192987 -2.949009 + 5300 64.467624 -49.155126 -14.757458 278.59037 0.19017535 64.10947 -3.0540851 + 5400 60.41785 -49.081671 -16.844821 271.22804 0.20008281 60.082195 -3.1546148 + 5500 56.554431 -49.009666 -18.834201 264.2355 0.20960898 56.24024 -3.250862 + 5600 52.95111 -48.938861 -20.686002 257.84121 0.21873248 52.656937 -3.3428291 + 5700 49.638794 -48.869827 -22.384304 252.12886 0.22745138 49.363023 -3.4305128 + 5800 46.619514 -48.801888 -23.927347 247.13356 0.23577844 46.360517 -3.5141755 + 5900 43.878389 -48.73593 -25.323958 242.80111 0.24373625 43.634621 -3.5942967 + 6000 41.392437 -48.671406 -26.585851 239.09246 0.25135296 41.162479 -3.6710953 + 6100 39.136252 -48.60798 -27.726246 235.9541 0.25865905 38.918828 -3.7449553 + 6200 37.085195 -48.545774 -28.758412 233.32233 0.26568495 36.879167 -3.8159439 + 6300 35.216896 -48.484909 -29.694407 231.1392 0.27245965 35.021246 -3.884503 + 6400 33.511732 -48.42458 -30.543893 229.37842 0.2790099 33.325556 -3.9507385 + 6500 31.952789 -48.365385 -31.316496 227.98228 0.2853599 31.775274 -4.0149897 + 6600 30.525576 -48.307233 -32.019853 226.91697 0.29153132 30.35599 -4.0774486 + 6700 29.217672 -48.24981 -32.660283 226.16022 0.29754342 29.055351 -4.1382338 + 6800 28.018378 -48.192803 -33.243177 225.69366 0.30341329 27.862721 -4.1974677 + 6900 26.918418 -48.136622 -33.773896 225.48194 0.30915615 26.768871 -4.2553485 + 7000 25.909681 -48.08096 -34.256461 225.51257 0.31478562 25.765738 -4.311968 + 7100 24.985015 -48.025534 -34.694405 225.77479 0.32031392 24.84621 -4.3675242 + 7200 24.138072 -47.970746 -35.091516 226.24048 0.32575216 24.003972 -4.4219335 + 7300 23.36317 -47.916089 -35.450319 226.90757 0.33111051 23.233375 -4.4754578 + 7400 22.655198 -47.861976 -35.773956 227.75054 0.33639834 22.529336 -4.5280134 + 7500 22.009532 -47.808135 -36.064618 228.76407 0.34162439 21.887257 -4.5797622 + 7600 21.421974 -47.754508 -36.324492 229.93785 0.34679689 21.302963 -4.6307739 + 7700 20.888691 -47.700827 -36.555352 231.26801 0.35192361 20.772643 -4.6812057 + 7800 20.406177 -47.64705 -36.759028 232.73618 0.35701201 20.292809 -4.7306795 + 7900 19.971205 -47.593833 -36.937897 234.33449 0.36206923 19.860254 -4.7798815 + 8000 19.580795 -47.540435 -37.092808 236.06384 0.36710221 19.472013 -4.8285632 + 8100 19.232176 -47.487281 -37.225665 237.90655 0.37211768 19.125331 -4.8768578 + 8200 18.922755 -47.4341 -37.33758 239.86116 0.37712221 18.817628 -4.9247735 + 8300 18.650078 -47.380856 -37.429827 241.92202 0.38212226 18.546466 -4.972363 + 8400 18.4118 -47.327508 -37.503616 244.08393 0.38712418 18.309512 -5.0196756 + 8500 18.205651 -47.273789 -37.559891 246.34742 0.3921342 18.104508 -5.06671 + 8600 18.029398 -47.219424 -37.599568 248.71065 0.39715848 17.929235 -5.1133124 + 8700 17.880815 -47.165549 -37.624972 251.14475 0.4022031 17.781477 -5.1600447 + 8800 17.757645 -47.110958 -37.636101 253.66312 0.40727406 17.658991 -5.2066259 + 8900 17.657573 -47.056554 -37.635091 256.25454 0.41237724 17.559475 -5.2531731 + 9000 17.578197 -47.001835 -37.622724 258.91696 0.41751847 17.48054 -5.2996769 + 9100 17.517006 -46.946535 -37.600073 261.64727 0.42270345 17.41969 -5.3462575 + 9200 17.471368 -46.890625 -37.568515 264.44427 0.42793776 17.374305 -5.3925966 + 9300 17.438519 -46.834765 -37.530181 267.28872 0.43322691 17.341639 -5.4391596 + 9400 17.415579 -46.778464 -37.486121 270.18178 0.43857628 17.318826 -5.485798 + 9500 17.399563 -46.721685 -37.437887 273.11812 0.44399119 17.302899 -5.5325337 + 9600 17.387425 -46.664405 -37.387083 276.08982 0.44947693 17.290829 -5.5793912 + 9700 17.376109 -46.606364 -37.335081 279.09236 0.45503878 17.279575 -5.6264788 + 9800 17.362615 -46.547755 -37.283671 282.11747 0.46068208 17.266156 -5.6736623 + 9900 17.344087 -46.488783 -37.234585 285.15699 0.46641232 17.247731 -5.7209993 + 10000 17.317913 -46.42918 -37.188947 288.20641 0.4722352 17.221703 -5.7685405 +Loop time of 14.691 on 1 procs for 10000 steps with 180 atoms + +Performance: 0.059 ns/day, 408.083 hours/ns, 680.689 timesteps/s, 122.524 katom-step/s +96.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 3.0453 | 3.0453 | 3.0453 | 0.0 | 20.73 +Bond | 0.00108 | 0.00108 | 0.00108 | 0.0 | 0.01 +Neigh | 6.6815 | 6.6815 | 6.6815 | 0.0 | 45.48 +Comm | 0.55477 | 0.55477 | 0.55477 | 0.0 | 3.78 +Output | 0.0028885 | 0.0028885 | 0.0028885 | 0.0 | 0.02 +Modify | 4.3341 | 4.3341 | 4.3341 | 0.0 | 29.50 +Other | | 0.07136 | | | 0.49 + +Nlocal: 180 ave 180 max 180 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1510 ave 1510 max 1510 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 13729 ave 13729 max 13729 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 13729 +Ave neighs/atom = 76.272222 +Ave special neighs/atom = 0 +Neighbor list builds = 10000 +Dangerous builds not checked +Total wall time: 0:00:14 diff --git a/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.1 b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.1 new file mode 100644 index 0000000000..cd5ea56a2e --- /dev/null +++ b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.1 @@ -0,0 +1,197 @@ +LAMMPS (8 Feb 2023) +Processor partition = 1 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 32 pad +variable out_freq string 100 +variable job_name string H2 + +units real +atom_style full +pair_style table linear 10000 + +neighbor 2.0 bin +neigh_modify every 1 delay 0 check no + +read_data H2.data +Reading data file ... + orthogonal box = (0 0 0) to (19.71219 19.71219 19.71219) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 180 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.003 seconds + +pair_coeff 1 * pair.table PAIR_H2 +WARNING: 5852 of 18000 force values in table PAIR_H2 are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:466) + +timestep 0.001 + +velocity all create 1.0 1985 rot yes dist gaussian + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 25.0 nhc 4 + +thermo_style custom step temp pe etotal pzz f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +thermo ${out_freq} +thermo 100 + +#dump dcd all dcd ${out_freq} ${job_name}_${ibead}.dcd + +#restart ${out_freq} ${job_name}_${ibead}.restart1 ${job_name}_${ibead}.restart2 + +run 10000 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 11.55117 + ghost atom cutoff = 11.55117 + binsize = 5.775585, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 11.97 | 11.97 | 11.97 Mbytes + Step Temp PotEng TotEng Pzz espring T_ring virial + 0 1 -50.292986 -49.759421 16.18218 0 0 4.331435e-14 + 100 1.0008585 -50.292908 -49.758885 16.189586 7.3078196e-06 4.6642574 -0.013945396 + 200 1.0034473 -50.292787 -49.757382 16.20341 2.9015288e-05 4.6763219 -0.027851725 + 300 1.0078065 -50.292593 -49.754863 16.225711 6.4500006e-05 4.6966366 -0.041662754 + 400 1.0140035 -50.29233 -49.751293 16.257176 0.00011280318 4.7255165 -0.055352542 + 500 1.022135 -50.292004 -49.746629 16.297097 0.000172727 4.7634112 -0.068879202 + 600 1.0323282 -50.291621 -49.740807 16.346105 0.00024293886 4.810914 -0.082221014 + 700 1.044744 -50.291188 -49.733749 16.404167 0.00032206529 4.8687751 -0.095360512 + 800 1.0595808 -50.290712 -49.725357 16.471712 0.00040876559 4.9379182 -0.10826526 + 900 1.0770788 -50.290199 -49.715507 16.549069 0.00050178229 5.0194635 -0.1209272 + 1000 1.0975268 -50.289655 -49.704053 16.636751 0.00059997025 5.1147563 -0.13335203 + 1100 1.1212697 -50.289087 -49.690817 16.735749 0.00070230922 5.2254045 -0.14552504 + 1200 1.1487191 -50.288499 -49.675582 16.846901 0.00080790454 5.3533259 -0.15745048 + 1300 1.1803661 -50.287894 -49.658092 16.971484 0.00091598038 5.5008089 -0.16912662 + 1400 1.2167975 -50.287272 -49.638032 17.111786 0.001025869 5.6705884 -0.18056175 + 1500 1.2587169 -50.286644 -49.615037 17.26922 0.0011369979 5.8659438 -0.19176702 + 1600 1.3069713 -50.286008 -49.588654 17.446637 0.0012488773 6.0908216 -0.20274823 + 1700 1.3625842 -50.285365 -49.558338 17.646978 0.0013610874 6.349992 -0.21351296 + 1800 1.4267987 -50.284719 -49.523429 17.874056 0.0014732674 6.6492481 -0.2240754 + 1900 1.5011316 -50.284073 -49.483122 18.132347 0.0015851058 6.9956586 -0.23443788 + 2000 1.5874426 -50.283426 -49.436422 18.428012 0.0016963317 7.3978897 -0.24461477 + 2100 1.6880217 -50.282783 -49.382113 18.767914 0.0018067084 7.866614 -0.25461336 + 2200 1.805701 -50.282144 -49.318685 19.160875 0.0019160281 8.4150298 -0.26443254 + 2300 1.9439951 -50.281509 -49.244262 19.617751 0.0020241086 9.0595157 -0.27408815 + 2400 2.1072772 -50.280879 -49.15651 20.152728 0.0021307926 9.8204522 -0.28357876 + 2500 2.3009976 -50.28026 -49.052528 20.78256 0.0022359485 10.723239 -0.29290505 + 2600 2.5319494 -50.279651 -48.928691 21.528586 0.0023394759 11.799534 -0.30206821 + 2700 2.8085834 -50.279048 -48.780486 22.417919 0.0024413142 13.088719 -0.31106836 + 2800 3.1413661 -50.278457 -48.602334 23.483643 0.0025414581 14.639572 -0.31990395 + 2900 3.5431594 -50.277876 -48.38737 24.766603 0.0026399801 16.512032 -0.32855403 + 3000 4.029577 -50.277305 -48.127264 26.316279 0.0027370628 18.778862 -0.33702346 + 3100 4.6192292 -50.276739 -47.81208 28.192254 0.0028330445 21.526793 -0.3452905 + 3200 5.333716 -50.276174 -47.43029 30.464107 0.0029284791 24.856485 -0.35332773 + 3300 6.1971481 -50.275605 -46.969024 33.208128 0.0030242128 28.8803 -0.36114465 + 3400 7.2349012 -50.27502 -46.41473 36.506582 0.0031214781 33.716495 -0.36868512 + 3500 8.4712457 -50.274401 -45.754441 40.437918 0.0032219998 39.478178 -0.37595678 + 3600 9.9255066 -50.273728 -44.977825 45.065017 0.0033281047 46.255407 -0.38292345 + 3700 11.606561 -50.27297 -44.080116 50.41841 0.0034428151 54.089554 -0.38955061 + 3800 13.505865 -50.272095 -43.065838 56.472981 0.0035698989 62.940797 -0.39583139 + 3900 15.589837 -50.271059 -41.952868 63.125206 0.0037138374 72.652639 -0.40173444 + 4000 17.793286 -50.26982 -40.775945 70.171007 0.0038796665 82.921278 -0.40724146 + 4100 20.016352 -50.26833 -39.588305 77.297059 0.0040726574 93.281337 -0.350557 + 4200 22.127692 -50.266548 -38.459986 84.091411 0.0042978175 103.12072 -0.42427987 + 4300 23.975875 -50.264442 -37.471754 90.07826 0.0045592402 111.73373 -0.44332019 + 4400 25.408871 -50.262001 -36.704717 94.780152 0.0048593802 118.41186 -0.4712594 + 4500 26.298516 -50.259233 -36.227265 97.796601 0.0051983826 122.55783 -0.48751932 + 4600 26.564146 -50.256176 -36.082477 98.874143 0.0055736202 123.79574 -0.50751557 + 4700 26.188683 -50.252888 -36.279523 97.96053 0.0059795748 122.04598 -0.53463961 + 4800 25.22218 -50.249455 -36.791783 95.211762 0.0064081371 117.54183 -0.56057187 + 4900 23.771743 -50.245971 -37.562201 90.960801 0.0068493041 110.78242 -0.58649549 + 5000 21.981009 -50.242542 -38.514245 85.651619 0.0072921623 102.43714 -0.58569676 + 5100 20.005118 -50.239262 -39.565231 79.762203 0.0077259803 93.228984 -0.58814947 + 5200 17.987555 -50.236217 -40.638687 73.732022 0.0081412203 83.826622 -0.64456631 + 5300 16.043551 -50.23346 -41.673183 67.91308 0.0085303062 74.767062 -0.66253179 + 5400 14.252123 -50.231042 -42.626609 62.542995 0.0088880521 66.418547 -0.67647833 + 5500 12.656267 -50.228973 -43.476032 57.750687 0.0092117291 58.981452 -0.69035428 + 5600 11.269006 -50.227253 -44.214506 53.573237 0.0095008225 52.516458 -0.70182381 + 5700 10.082247 -50.225863 -44.846329 49.983875 0.0097565822 46.985857 -0.71107461 + 5800 9.075711 -50.224777 -45.382295 46.920816 0.0099814848 42.295142 -0.72796918 + 5900 8.2241323 -50.223954 -45.835845 44.308503 0.010178713 38.326566 -0.7341011 + 6000 7.5020778 -50.223364 -46.220518 42.071534 0.010351726 34.961607 -0.73860614 + 6100 6.8865776 -50.222972 -46.548535 40.142111 0.010503944 32.093218 -0.74169302 + 6200 6.3581625 -50.222743 -46.83025 38.464555 0.010638555 29.630669 -0.74355815 + 6300 5.9009471 -50.222651 -47.074112 36.993223 0.010758413 27.499927 -0.72351831 + 6400 5.5022478 -50.222668 -47.286861 35.692229 0.010866003 25.641886 -0.72491142 + 6500 5.1520445 -50.222775 -47.473825 34.533075 0.010963451 24.009849 -0.72550196 + 6600 4.842444 -50.222956 -47.639197 33.493966 0.011052555 22.567032 -0.72539576 + 6700 4.5672154 -50.223194 -47.786287 32.557859 0.011134828 21.284396 -0.72468094 + 6800 4.3214112 -50.22348 -47.917726 31.710288 0.011211542 20.138885 -0.69977477 + 6900 4.1010719 -50.223805 -48.035616 30.941022 0.011283771 19.112047 -0.6977173 + 7000 3.9029992 -50.224161 -48.141657 30.240625 0.011352422 18.188977 -0.69521625 + 7100 3.7245829 -50.22454 -48.237233 29.602229 0.011418274 17.357512 -0.69232721 + 7200 3.5636708 -50.224941 -48.323491 29.019374 0.011482 16.60762 -0.68909561 + 7300 3.4184697 -50.225359 -48.401383 28.487117 0.011544187 15.930946 -0.68553322 + 7400 3.2874703 -50.225791 -48.471712 28.00136 0.011605358 15.320455 -0.68167743 + 7500 3.1693898 -50.226236 -48.53516 27.5579 0.01166598 14.77017 -0.67389187 + 7600 3.0631284 -50.226689 -48.592311 27.15399 0.011726479 14.274964 -0.66987688 + 7700 2.9677349 -50.227151 -48.643671 26.786563 0.011787244 13.830406 -0.66561073 + 7800 2.8823804 -50.227616 -48.689679 26.453373 0.011848631 13.432632 -0.66110134 + 7900 2.8063371 -50.228091 -48.730728 26.151709 0.011910973 13.078251 -0.65637083 + 8000 2.7389612 -50.228567 -48.767153 25.879876 0.011974573 12.764262 -0.65142182 + 8100 2.6796793 -50.229048 -48.799265 25.636155 0.01203971 12.487993 -0.64626697 + 8200 2.6279769 -50.229528 -48.827332 25.418653 0.012106636 12.247046 -0.64092634 + 8300 2.583388 -50.230009 -48.851603 25.225967 0.012175578 12.039251 -0.63576886 + 8400 2.5454874 -50.230488 -48.872305 25.056681 0.012246734 11.862624 -0.63004687 + 8500 2.5138825 -50.230965 -48.889645 24.909342 0.012320275 11.715337 -0.62413585 + 8600 2.4882074 -50.231439 -48.903818 24.782526 0.012396346 11.595685 -0.65229004 + 8700 2.468117 -50.231904 -48.915003 24.674923 0.012475068 11.502059 -0.64624002 + 8800 2.4532823 -50.232364 -48.923378 24.585268 0.012556541 11.432925 -0.6399876 + 8900 2.4433865 -50.232811 -48.929106 24.512562 0.012640854 11.386808 -0.63354 + 9000 2.4381226 -50.233249 -48.932352 24.45498 0.012728083 11.362277 -0.62690844 + 9100 2.4371917 -50.233668 -48.933268 24.411953 0.012818306 11.357939 -0.62009589 + 9200 2.4403031 -50.234074 -48.932014 24.381442 0.012911605 11.372438 -0.61311776 + 9300 2.4471754 -50.234458 -48.928731 24.362769 0.013008072 11.404465 -0.60599097 + 9400 2.4575396 -50.234822 -48.923565 24.354135 0.013107819 11.452765 -0.60061336 + 9500 2.4711435 -50.235157 -48.916642 24.354998 0.013210974 11.516163 -0.59323525 + 9600 2.4877569 -50.235465 -48.908085 24.363855 0.013317688 11.593585 -0.58576008 + 9700 2.5071778 -50.235743 -48.898 24.380012 0.013428136 11.684092 -0.57821051 + 9800 2.5292388 -50.235983 -48.886469 24.402788 0.013542514 11.786902 -0.57061067 + 9900 2.5538131 -50.236185 -48.873559 24.431609 0.013661041 11.901424 -0.56299206 + 10000 2.5808184 -50.236346 -48.859312 24.466316 0.013783954 12.027276 -0.55538687 +Loop time of 14.691 on 1 procs for 10000 steps with 180 atoms + +Performance: 0.059 ns/day, 408.083 hours/ns, 680.690 timesteps/s, 122.524 katom-step/s +98.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 2.8924 | 2.8924 | 2.8924 | 0.0 | 19.69 +Bond | 0.00092288 | 0.00092288 | 0.00092288 | 0.0 | 0.01 +Neigh | 6.5718 | 6.5718 | 6.5718 | 0.0 | 44.73 +Comm | 0.55162 | 0.55162 | 0.55162 | 0.0 | 3.75 +Output | 0.0029431 | 0.0029431 | 0.0029431 | 0.0 | 0.02 +Modify | 4.6104 | 4.6104 | 4.6104 | 0.0 | 31.38 +Other | | 0.06102 | | | 0.42 + +Nlocal: 180 ave 180 max 180 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1510 ave 1510 max 1510 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 13680 ave 13680 max 13680 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 13680 +Ave neighs/atom = 76 +Ave special neighs/atom = 0 +Neighbor list builds = 10000 +Dangerous builds not checked +Total wall time: 0:00:14 diff --git a/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.2 b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.2 new file mode 100644 index 0000000000..5ac1655e40 --- /dev/null +++ b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.2 @@ -0,0 +1,197 @@ +LAMMPS (8 Feb 2023) +Processor partition = 2 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 32 pad +variable out_freq string 100 +variable job_name string H2 + +units real +atom_style full +pair_style table linear 10000 + +neighbor 2.0 bin +neigh_modify every 1 delay 0 check no + +read_data H2.data +Reading data file ... + orthogonal box = (0 0 0) to (19.71219 19.71219 19.71219) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 180 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.003 seconds + +pair_coeff 1 * pair.table PAIR_H2 +WARNING: 5852 of 18000 force values in table PAIR_H2 are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:466) + +timestep 0.001 + +velocity all create 1.0 1985 rot yes dist gaussian + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 25.0 nhc 4 + +thermo_style custom step temp pe etotal pzz f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +thermo ${out_freq} +thermo 100 + +#dump dcd all dcd ${out_freq} ${job_name}_${ibead}.dcd + +#restart ${out_freq} ${job_name}_${ibead}.restart1 ${job_name}_${ibead}.restart2 + +run 10000 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 11.55117 + ghost atom cutoff = 11.55117 + binsize = 5.775585, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 11.97 | 11.97 | 11.97 Mbytes + Step Temp PotEng TotEng Pzz espring T_ring virial + 0 1 -50.292986 -49.759421 16.18218 0 0 4.331435e-14 + 100 1.0008585 -50.292972 -49.758949 16.185544 6.2619058e-07 4.6642574 -0.0025876701 + 200 1.0034473 -50.292959 -49.757555 16.193637 2.4778684e-06 4.6763219 -0.0051513312 + 300 1.0078065 -50.292946 -49.755216 16.20654 5.4785827e-06 4.6966366 -0.0076677455 + 400 1.0140035 -50.292935 -49.751898 16.224472 9.5136721e-06 4.7255165 -0.010116117 + 500 1.022135 -50.292924 -49.747548 16.247769 1.4445387e-05 4.7634112 -0.012478816 + 600 1.0323281 -50.292913 -49.742099 16.276857 2.0128019e-05 4.810914 -0.014741354 + 700 1.044744 -50.292903 -49.735464 16.312269 2.6420278e-05 4.868775 -0.01689316 + 800 1.0595807 -50.292893 -49.727538 16.354636 3.3193675e-05 4.9379181 -0.018925599 + 900 1.0770788 -50.292883 -49.718191 16.404759 4.0337059e-05 5.0194633 -0.020834008 + 1000 1.0975267 -50.292873 -49.707271 16.463535 4.7758112e-05 5.114756 -0.022615739 + 1100 1.1212696 -50.292864 -49.694594 16.532005 5.5382858e-05 5.2254042 -0.024272115 + 1200 1.1487191 -50.292855 -49.679939 16.611504 6.3154057e-05 5.3533255 -0.025805429 + 1300 1.180366 -50.292847 -49.663045 16.703525 7.1029151e-05 5.5008084 -0.027221135 + 1400 1.2167974 -50.292839 -49.643599 16.809904 7.8978147e-05 5.6705878 -0.028525093 + 1500 1.2587168 -50.292831 -49.621224 16.932872 8.6981686e-05 5.8659431 -0.029723588 + 1600 1.3069711 -50.292824 -49.59547 17.075101 9.5029394e-05 6.0908207 -0.030823313 + 1700 1.362584 -50.292817 -49.56579 17.239763 0.00010311856 6.3499909 -0.031831844 + 1800 1.4267984 -50.29281 -49.53152 17.430752 0.00011125314 6.6492468 -0.032756757 + 1900 1.5011313 -50.292803 -49.491852 17.652797 0.00011944307 6.995657 -0.033606551 + 2000 1.5874422 -50.292796 -49.445792 17.911722 0.00012770381 7.3978879 -0.034390022 + 2100 1.6880212 -50.292789 -49.39212 18.214723 0.00013605623 7.866612 -0.035116463 + 2200 1.8057005 -50.292782 -49.329324 18.570726 0.00014452669 8.4150275 -0.035795677 + 2300 1.9439945 -50.292774 -49.255527 18.990774 0.00015314733 9.0595131 -0.036438481 + 2400 2.1072765 -50.292765 -49.168396 19.488686 0.00016195668 9.8204493 -0.037057048 + 2500 2.3009969 -50.292755 -49.065024 20.081627 0.00017100046 10.723236 -0.037663926 + 2600 2.5319487 -50.292742 -48.941783 20.791154 0.00018033268 11.799531 -0.038274916 + 2700 2.8085828 -50.292725 -48.794164 21.644055 0.00019001711 13.088716 -0.038907942 + 2800 3.1413656 -50.292704 -48.616581 22.673549 0.00020012896 14.63957 -0.039579122 + 2900 3.5431592 -50.292679 -48.402173 23.920341 0.00021075711 16.512031 -0.040310879 + 3000 4.0295773 -50.292645 -48.142604 25.434299 0.00022200654 18.778864 -0.041129941 + 3100 4.6192303 -50.292603 -47.827943 27.274622 0.00023400135 21.526798 -0.042063049 + 3200 5.3337183 -50.292548 -47.446663 29.510189 0.00024688797 24.856495 -0.043138944 + 3300 6.1971521 -50.292476 -46.985893 32.218076 0.00026083874 28.880319 -0.044388363 + 3400 7.2349077 -50.292383 -46.432089 35.479408 0.00027605543 33.716526 -0.04584988 + 3500 8.4712558 -50.292263 -45.772298 39.371841 0.00029277252 39.478225 -0.04755723 + 3600 9.9255215 -50.292106 -44.996195 43.95768 0.00031125948 46.255476 -0.04955234 + 3700 11.606583 -50.291907 -44.099041 49.265647 0.00033182131 54.089653 -0.051868152 + 3800 13.505895 -50.291653 -43.08538 55.269674 0.00035479603 62.940934 -0.060893692 + 3900 15.589876 -50.291332 -41.973119 61.864426 0.00038054772 72.652823 -0.064129637 + 4000 17.793337 -50.290932 -40.79703 68.843904 0.00040945342 82.921517 -0.070448746 + 4100 20.016417 -50.290444 -39.610385 75.893194 0.0004418827 93.281639 -0.087116518 + 4200 22.127771 -50.289857 -38.483253 82.59793 0.00047816979 103.12109 -0.097527157 + 4300 23.975968 -50.289169 -37.496432 88.481352 0.00051857989 111.73416 -0.10722194 + 4400 25.408977 -50.288385 -36.731045 93.065749 0.00056327427 118.41235 -0.11892611 + 4500 26.298632 -50.287506 -36.255477 95.950674 0.0006122807 122.55837 -0.1303584 + 4600 26.564268 -50.286547 -36.112784 96.88563 0.00066547749 123.79631 -0.14166752 + 4700 26.188807 -50.285529 -36.312099 95.820823 0.00072259756 122.04656 -0.15261419 + 4800 25.222299 -50.284475 -36.826739 92.916226 0.00078325554 117.54238 -0.16209083 + 4900 23.771855 -50.283413 -37.599583 88.509238 0.00084699472 110.78294 -0.17260047 + 5000 21.98111 -50.282357 -38.554006 83.049726 0.00091334478 102.43761 -0.18258656 + 5100 20.005206 -50.281326 -39.607248 77.020285 0.0009818775 93.229392 -0.17186696 + 5200 17.987631 -50.28033 -40.68276 70.86497 0.0010522474 83.826973 -0.18260146 + 5300 16.043616 -50.279377 -41.719065 64.938011 0.0011242079 74.767366 -0.18655435 + 5400 14.252181 -50.278457 -42.673992 59.48099 0.0011976018 66.41882 -0.20222138 + 5500 12.656323 -50.277568 -43.524597 54.622777 0.0012723319 58.981714 -0.21168712 + 5600 11.269064 -50.276696 -44.263917 50.401002 0.0013483229 52.516731 -0.20187998 + 5700 10.082312 -50.275828 -44.896259 46.788408 0.0014254889 46.986161 -0.22324171 + 5800 9.0757866 -50.274951 -45.432429 43.722025 0.0015037137 42.295494 -0.23860695 + 5900 8.2242212 -50.274058 -45.885902 41.123761 0.0015828465 38.326981 -0.25414759 + 6000 7.5021821 -50.273138 -46.270236 38.916656 0.0016627103 34.962093 -0.26976048 + 6100 6.8866987 -50.272182 -46.597681 37.031655 0.0017431162 32.093783 -0.28539248 + 6200 6.3583012 -50.27119 -46.878623 35.410368 0.0018238791 29.631315 -0.30095674 + 6300 5.9011035 -50.270159 -47.121537 34.005676 0.0019048302 27.500656 -0.31640935 + 6400 5.502422 -50.269086 -47.333186 32.779933 0.0019858256 25.642698 -0.33171137 + 6500 5.1522361 -50.267972 -47.518919 31.703747 0.0020667509 24.010742 -0.34682514 + 6600 4.8426527 -50.266817 -47.682947 30.753955 0.0021475225 22.568004 -0.36173006 + 6700 4.5674405 -50.265625 -47.828599 29.911814 0.0022280866 21.285445 -0.37640709 + 6800 4.3216522 -50.264395 -47.958513 29.163452 0.0023084174 20.140008 -0.39085666 + 6900 4.1013282 -50.26313 -48.074805 28.496518 0.0023885139 19.113242 -0.40506248 + 7000 3.9032702 -50.261831 -48.179183 27.90194 0.0024683969 18.19024 -0.41901469 + 7100 3.724868 -50.2605 -48.273041 27.371896 0.0025481062 17.35884 -0.43272933 + 7200 3.5639695 -50.259138 -48.357529 26.89966 0.0026276974 16.609012 -0.44620638 + 7300 3.4187816 -50.257743 -48.433601 26.480439 0.0027072396 15.932399 -0.45945212 + 7400 3.2877948 -50.256318 -48.502066 26.109145 0.0027868133 15.321967 -0.47246434 + 7500 3.1697267 -50.254865 -48.56361 25.781971 0.0028665077 14.77174 -0.48526006 + 7600 3.0634774 -50.25338 -48.618816 25.495767 0.0029464195 14.276591 -0.49784679 + 7700 2.9680959 -50.251868 -48.668196 25.247434 0.0030266508 13.832088 -0.51022378 + 7800 2.8827533 -50.250324 -48.712188 25.034584 0.0031073072 13.43437 -0.52242006 + 7900 2.8067218 -50.248752 -48.751183 24.854648 0.0031884966 13.080044 -0.53441576 + 8000 2.739358 -50.247146 -48.78552 24.705902 0.0032703269 12.766111 -0.54625728 + 8100 2.6800884 -50.245512 -48.815511 24.586269 0.003352905 12.4899 -0.55792685 + 8200 2.6283988 -50.243847 -48.841426 24.493934 0.0034363346 12.249013 -0.56944906 + 8300 2.5838233 -50.242148 -48.86351 24.42802 0.0035207151 12.041279 -0.58082697 + 8400 2.5459368 -50.240416 -48.881994 24.386467 0.0036061405 11.864719 -0.59207404 + 8500 2.5143471 -50.23866 -48.897093 24.367425 0.0036926982 11.717503 -0.6031939 + 8600 2.4886884 -50.236867 -48.90899 24.370737 0.0037804687 11.597926 -0.61420631 + 8700 2.4686158 -50.235045 -48.917878 24.393872 0.003869526 11.504383 -0.62511248 + 8800 2.4538005 -50.233192 -48.92393 24.436221 0.0039599381 11.43534 -0.63592614 + 8900 2.4439261 -50.231311 -48.927318 24.495987 0.0040517678 11.389323 -0.64665221 + 9000 2.4386859 -50.229399 -48.928202 24.571919 0.0041450744 11.364902 -0.65730127 + 9100 2.4377812 -50.227462 -48.926747 24.662499 0.0042399143 11.360686 -0.66787619 + 9200 2.4409216 -50.225498 -48.923108 24.766278 0.0043363422 11.375321 -0.67839903 + 9300 2.447826 -50.223507 -48.917432 24.882071 0.0044344105 11.407497 -0.68886647 + 9400 2.4582258 -50.22149 -48.909866 25.008577 0.0045341695 11.455963 -0.69927895 + 9500 2.471869 -50.219451 -48.900548 25.143849 0.0046356651 11.519544 -0.70966102 + 9600 2.4885255 -50.217386 -48.889596 25.286999 0.004738938 11.597167 -0.6940583 + 9700 2.5079938 -50.215302 -48.877125 25.436871 0.0048440213 11.687895 -0.70437543 + 9800 2.5301066 -50.213198 -48.863222 25.59205 0.0049509399 11.790946 -0.71464807 + 9900 2.5547371 -50.211072 -48.847954 25.752316 0.0050597095 11.90573 -0.72487926 + 10000 2.5818031 -50.208928 -48.831368 25.916904 0.0051703368 12.031865 -0.73506701 +Loop time of 14.691 on 1 procs for 10000 steps with 180 atoms + +Performance: 0.059 ns/day, 408.083 hours/ns, 680.690 timesteps/s, 122.524 katom-step/s +96.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 2.9104 | 2.9104 | 2.9104 | 0.0 | 19.81 +Bond | 0.00098079 | 0.00098079 | 0.00098079 | 0.0 | 0.01 +Neigh | 6.6139 | 6.6139 | 6.6139 | 0.0 | 45.02 +Comm | 0.55394 | 0.55394 | 0.55394 | 0.0 | 3.77 +Output | 0.0030074 | 0.0030074 | 0.0030074 | 0.0 | 0.02 +Modify | 4.5374 | 4.5374 | 4.5374 | 0.0 | 30.89 +Other | | 0.07132 | | | 0.49 + +Nlocal: 180 ave 180 max 180 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1510 ave 1510 max 1510 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 13680 ave 13680 max 13680 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 13680 +Ave neighs/atom = 76 +Ave special neighs/atom = 0 +Neighbor list builds = 10000 +Dangerous builds not checked +Total wall time: 0:00:14 diff --git a/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.3 b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.3 new file mode 100644 index 0000000000..c105df63e9 --- /dev/null +++ b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.3 @@ -0,0 +1,197 @@ +LAMMPS (8 Feb 2023) +Processor partition = 3 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 32 pad +variable out_freq string 100 +variable job_name string H2 + +units real +atom_style full +pair_style table linear 10000 + +neighbor 2.0 bin +neigh_modify every 1 delay 0 check no + +read_data H2.data +Reading data file ... + orthogonal box = (0 0 0) to (19.71219 19.71219 19.71219) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 180 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.003 seconds + +pair_coeff 1 * pair.table PAIR_H2 +WARNING: 5852 of 18000 force values in table PAIR_H2 are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:466) + +timestep 0.001 + +velocity all create 1.0 1985 rot yes dist gaussian + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 25.0 nhc 4 + +thermo_style custom step temp pe etotal pzz f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +thermo ${out_freq} +thermo 100 + +#dump dcd all dcd ${out_freq} ${job_name}_${ibead}.dcd + +#restart ${out_freq} ${job_name}_${ibead}.restart1 ${job_name}_${ibead}.restart2 + +run 10000 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 11.55117 + ghost atom cutoff = 11.55117 + binsize = 5.775585, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 11.97 | 11.97 | 11.97 Mbytes + Step Temp PotEng TotEng Pzz espring T_ring virial + 0 1 -50.292986 -49.759421 16.18218 0 0 4.331435e-14 + 100 0.99799183 -50.292972 -49.760479 16.176371 6.2763683e-07 15.879159 -0.0023935093 + 200 0.99208279 -50.292959 -49.763618 16.157336 2.500618e-06 15.785139 -0.0047805057 + 300 0.98260503 -50.292946 -49.768662 16.126279 5.5906177e-06 15.634338 -0.0071546335 + 400 0.97006821 -50.292934 -49.775339 16.085102 9.8548762e-06 15.434863 -0.0095106986 + 500 0.955104 -50.292922 -49.783311 16.036202 1.5241599e-05 15.196766 -0.011844212 + 600 0.93840578 -50.292908 -49.792208 15.982141 2.1695575e-05 14.931079 -0.014152859 + 700 0.92067359 -50.292894 -49.801655 15.925466 2.9163075e-05 14.64894 -0.016435757 + 800 0.90257158 -50.292879 -49.811298 15.868564 3.7595562e-05 14.360917 -0.018694156 + 900 0.88470062 -50.292862 -49.820817 15.813472 4.6952156e-05 14.07657 -0.020928907 + 1000 0.8675856 -50.292845 -49.829932 15.761951 5.7201072e-05 13.804251 -0.02314186 + 1100 0.85167476 -50.292826 -49.838402 15.715517 6.8320318e-05 13.551092 -0.025333843 + 1200 0.83734746 -50.292806 -49.846027 15.675218 8.0297954e-05 13.323129 -0.027508552 + 1300 0.8249274 -50.292785 -49.852632 15.642038 9.3132154e-05 13.125512 -0.0296698 + 1400 0.81469844 -50.292762 -49.858068 15.616792 0.00010683122 12.962757 -0.031821941 + 1500 0.80692178 -50.292739 -49.862194 15.600226 0.00012141373 12.839022 -0.033969494 + 1600 0.80185336 -50.292715 -49.864874 15.593117 0.0001369088 12.758378 -0.03611606 + 1700 0.79976156 -50.29269 -49.865965 15.596227 0.00015335664 12.725095 -0.038264652 + 1800 0.80094541 -50.292664 -49.865307 15.610404 0.00017080942 12.743931 -0.040416801 + 1900 0.80575383 -50.292637 -49.862715 15.636702 0.00018933238 12.820439 -0.042573524 + 2000 0.81460711 -50.292611 -49.857965 15.67644 0.00020900552 12.961304 -0.044736822 + 2100 0.82802133 -50.292583 -49.85078 15.731301 0.0002299256 13.174739 -0.046906382 + 2200 0.84663738 -50.292556 -49.84082 15.80341 0.00025220879 13.470941 -0.049081478 + 2300 0.87125571 -50.292527 -49.827656 15.895377 0.00027599404 13.862646 -0.051261652 + 2400 0.90287869 -50.292499 -49.810754 16.010541 0.00030144708 14.365803 -0.053443791 + 2500 0.94276179 -50.29247 -49.789446 16.15309 0.00032876555 15.000388 -0.055625674 + 2600 0.99247509 -50.292441 -49.762891 16.328426 0.00035818508 15.791381 -0.05780423 + 2700 1.0539754 -50.292412 -49.730048 16.543118 0.00038998665 16.76992 -0.059974442 + 2800 1.1296876 -50.292383 -49.689621 16.805367 0.00042450539 17.974586 -0.062128128 + 2900 1.2225906 -50.292352 -49.640021 17.125302 0.00046214072 19.452774 -0.064255792 + 3000 1.3362969 -50.292321 -49.57932 17.515126 0.000503368 21.261968 -0.066348705 + 3100 1.4751081 -50.292289 -49.505223 17.989435 0.0005487512 23.47061 -0.068394944 + 3200 1.6440125 -50.292255 -49.415068 18.56525 0.00059895625 26.158066 -0.070379528 + 3300 1.8485766 -50.292217 -49.305881 19.26156 0.00065476359 29.412908 -0.0722905 + 3400 2.0946636 -50.292172 -49.174533 20.098518 0.0007170785 33.328425 -0.070298499 + 3500 2.3878963 -50.292118 -49.01802 21.095116 0.00078693603 37.994084 -0.072718799 + 3600 2.7327825 -50.29205 -48.833933 22.267046 0.00086549715 43.481606 -0.071117313 + 3700 3.1314509 -50.291962 -48.621129 23.621508 0.00095403112 49.824863 -0.073902505 + 3800 3.5820285 -50.29185 -48.380605 25.151938 0.0010538788 56.994053 -0.082019029 + 3900 4.0768347 -50.291704 -48.116448 26.832847 0.0011663922 64.86697 -0.093365693 + 4000 4.6007622 -50.291519 -47.836714 28.612446 0.0012928467 73.203239 -0.10732489 + 4100 5.1304133 -50.29129 -47.553881 30.411364 0.0014343275 81.630577 -0.1197723 + 4200 5.6346502 -50.291011 -47.284558 32.123915 0.0015915962 89.653545 -0.13080997 + 4300 6.0770777 -50.290676 -47.04816 33.627475 0.0017649532 96.693059 -0.14165463 + 4400 6.4205234 -50.29029 -46.864523 34.796349 0.0019541156 102.15766 -0.15242678 + 4500 6.6328782 -50.28986 -46.750789 35.522716 0.0021581361 105.53646 -0.16280564 + 4600 6.692974 -50.289399 -46.718262 35.736356 0.0023753855 106.49265 -0.17244062 + 4700 6.5948627 -50.28892 -46.770133 35.418562 0.0026036121 104.93159 -0.18097864 + 4800 6.3491738 -50.288443 -46.900746 34.606797 0.0028400768 101.02241 -0.18808564 + 4900 5.981108 -50.287983 -47.096673 33.387033 0.0030817487 95.166073 -0.19348598 + 5000 5.5256727 -50.287549 -47.339243 31.878041 0.0033255323 87.919593 -0.19697013 + 5100 5.0215378 -50.287155 -47.607839 30.209726 0.0035684934 79.898246 -0.19841014 + 5200 4.5051017 -50.286803 -47.883038 28.504102 0.0038080527 71.681174 -0.19776394 + 5300 4.0060458 -50.286489 -48.149003 26.860164 0.0040421233 63.74064 -0.19507702 + 5400 3.5450327 -50.286205 -48.394699 25.34642 0.0042691817 56.405409 -0.17980245 + 5500 3.1335349 -50.28594 -48.613996 23.999815 0.0044882701 49.858022 -0.17499889 + 5600 2.7752591 -50.28568 -48.804899 22.832197 0.0046989433 44.157456 -0.1804676 + 5700 2.468384 -50.285415 -48.968371 21.836436 0.0049011768 39.274732 -0.17203381 + 5800 2.2078676 -50.285131 -49.10709 20.994608 0.0050952576 35.129626 -0.17967923 + 5900 1.9873283 -50.284819 -49.22445 20.285865 0.0052816779 31.620602 -0.18651596 + 6000 1.8003086 -50.284474 -49.323892 19.687668 0.0054610429 28.64491 -0.19262321 + 6100 1.640963 -50.284092 -49.408531 19.181029 0.0056340011 26.109545 -0.1982684 + 6200 1.50433 -50.283675 -49.481017 18.749125 0.0058011964 23.935562 -0.19911595 + 6300 1.3863531 -50.283219 -49.543509 18.379087 0.0059632392 22.058419 -0.20020649 + 6400 1.2837837 -50.28273 -49.597748 18.059898 0.0061206908 20.426426 -0.20439271 + 6500 1.1940433 -50.282206 -49.645106 17.783505 0.0062740588 18.998556 -0.19989782 + 6600 1.1150882 -50.281655 -49.686683 17.543117 0.0064237975 17.742293 -0.20427813 + 6700 1.0452925 -50.281076 -49.723345 17.333683 0.0065703119 16.631765 -0.20875566 + 6800 0.98335363 -50.28048 -49.755796 17.150648 0.0067139628 15.646249 -0.21165511 + 6900 0.92821916 -50.279858 -49.784593 16.991122 0.0068550735 14.768998 -0.21447191 + 7000 0.87903062 -50.279219 -49.810199 16.85215 0.0069939349 13.986354 -0.21690274 + 7100 0.83508106 -50.27857 -49.833 16.730809 0.0071308114 13.287068 -0.21879935 + 7200 0.79578318 -50.277905 -49.853302 16.625931 0.007265945 12.661795 -0.24086146 + 7300 0.76064516 -50.277227 -49.871373 16.535639 0.0073995599 12.10271 -0.24389998 + 7400 0.72925259 -50.27654 -49.887437 16.458538 0.0075318653 11.603219 -0.24724178 + 7500 0.70125479 -50.275848 -49.901683 16.39318 0.0076630586 11.157743 -0.24974257 + 7600 0.67635448 -50.275145 -49.914266 16.338958 0.0077933274 10.761551 -0.26938357 + 7700 0.65430014 -50.274434 -49.925322 16.294582 0.0079228516 10.410642 -0.27182741 + 7800 0.63488023 -50.273717 -49.934967 16.259573 0.0080518043 10.10165 -0.27327965 + 7900 0.61791898 -50.272993 -49.943293 16.233056 0.0081803536 9.8317776 -0.23270163 + 8000 0.60327334 -50.272261 -49.950375 16.214226 0.0083086629 9.5987492 -0.21174158 + 8100 0.59083054 -50.271521 -49.956274 16.203107 0.008436892 9.4007703 -0.20591477 + 8200 0.580506 -50.270774 -49.961036 16.198733 0.0085651973 9.2364955 -0.20633623 + 8300 0.57224102 -50.270016 -49.964688 16.201153 0.0086937323 9.1049904 -0.21200577 + 8400 0.56599941 -50.26925 -49.967252 16.209734 0.0088226478 9.0056795 -0.21499276 + 8500 0.56176264 -50.268474 -49.968737 16.224404 0.0089520921 8.9382678 -0.22565885 + 8600 0.55952259 -50.267687 -49.969145 16.244765 0.0090822109 8.9026261 -0.23453558 + 8700 0.55927158 -50.26689 -49.968482 16.270388 0.0092131476 8.8986323 -0.23126478 + 8800 0.56098987 -50.266078 -49.966754 16.301455 0.009345043 8.9259722 -0.23759225 + 8900 0.56463156 -50.265253 -49.963985 16.338219 0.0094780352 8.9839155 -0.25830691 + 9000 0.57011105 -50.264414 -49.960222 16.379852 0.0096122592 9.0711003 -0.24455142 + 9100 0.57729304 -50.263559 -49.955536 16.42695 0.0097478463 9.1853737 -0.25035816 + 9200 0.5859895 -50.262689 -49.950026 16.479216 0.0098849239 9.3237441 -0.2560083 + 9300 0.59596674 -50.261803 -49.943816 16.536984 0.010023615 9.482493 -0.26141076 + 9400 0.60696386 -50.2609 -49.937045 16.600194 0.010164037 9.6574694 -0.26654733 + 9500 0.61872142 -50.259982 -49.929854 16.669166 0.010306303 9.8445453 -0.2741745 + 9600 0.63101587 -50.259043 -49.922355 16.744325 0.010450522 10.040164 -0.27940426 + 9700 0.64369292 -50.258089 -49.914637 16.82549 0.010596798 10.24187 -0.28435931 + 9800 0.65669202 -50.257118 -49.906731 16.913131 0.010745233 10.4487 -0.28904477 + 9900 0.67005575 -50.256133 -49.898615 17.007446 0.01089593 10.661331 -0.29344272 + 10000 0.68392108 -50.25513 -49.890213 17.108905 0.011048996 10.881944 -0.29755711 +Loop time of 14.691 on 1 procs for 10000 steps with 180 atoms + +Performance: 0.059 ns/day, 408.083 hours/ns, 680.690 timesteps/s, 122.524 katom-step/s +98.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 2.8325 | 2.8325 | 2.8325 | 0.0 | 19.28 +Bond | 0.0010203 | 0.0010203 | 0.0010203 | 0.0 | 0.01 +Neigh | 6.5808 | 6.5808 | 6.5808 | 0.0 | 44.80 +Comm | 0.55003 | 0.55003 | 0.55003 | 0.0 | 3.74 +Output | 0.0030145 | 0.0030145 | 0.0030145 | 0.0 | 0.02 +Modify | 4.6599 | 4.6599 | 4.6599 | 0.0 | 31.72 +Other | | 0.06363 | | | 0.43 + +Nlocal: 180 ave 180 max 180 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1510 ave 1510 max 1510 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 13680 ave 13680 max 13680 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 13680 +Ave neighs/atom = 76 +Ave special neighs/atom = 0 +Neighbor list builds = 10000 +Dangerous builds not checked +Total wall time: 0:00:14 diff --git a/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.4 b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.4 new file mode 100644 index 0000000000..cf64a9f262 --- /dev/null +++ b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.4 @@ -0,0 +1,197 @@ +LAMMPS (8 Feb 2023) +Processor partition = 4 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 32 pad +variable out_freq string 100 +variable job_name string H2 + +units real +atom_style full +pair_style table linear 10000 + +neighbor 2.0 bin +neigh_modify every 1 delay 0 check no + +read_data H2.data +Reading data file ... + orthogonal box = (0 0 0) to (19.71219 19.71219 19.71219) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 180 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.003 seconds + +pair_coeff 1 * pair.table PAIR_H2 +WARNING: 5852 of 18000 force values in table PAIR_H2 are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:466) + +timestep 0.001 + +velocity all create 1.0 1985 rot yes dist gaussian + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 25.0 nhc 4 + +thermo_style custom step temp pe etotal pzz f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +thermo ${out_freq} +thermo 100 + +#dump dcd all dcd ${out_freq} ${job_name}_${ibead}.dcd + +#restart ${out_freq} ${job_name}_${ibead}.restart1 ${job_name}_${ibead}.restart2 + +run 10000 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 11.55117 + ghost atom cutoff = 11.55117 + binsize = 5.775585, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 11.97 | 11.97 | 11.97 Mbytes + Step Temp PotEng TotEng Pzz espring T_ring virial + 0 1 -50.292986 -49.759421 16.18218 0 0 4.331435e-14 + 100 0.99799183 -50.292972 -49.760479 16.17637 1.1826193e-13 15.879159 -0.0025913805 + 200 0.99208279 -50.292959 -49.763618 16.157337 7.489305e-12 15.785139 -0.0051808234 + 300 0.98260503 -50.292946 -49.768662 16.126285 8.3895453e-11 15.634338 -0.0077662384 + 400 0.97006821 -50.292933 -49.775339 16.085117 4.6129385e-10 15.434863 -0.010346287 + 500 0.955104 -50.292921 -49.783311 16.036242 1.7157587e-09 15.196766 -0.012920943 + 600 0.93840577 -50.292907 -49.792206 15.982224 4.9828406e-09 14.931079 -0.015491155 + 700 0.92067358 -50.292891 -49.801652 15.925608 1.2201305e-08 14.64894 -0.018055916 + 800 0.90257157 -50.292875 -49.811294 15.868782 2.6375763e-08 14.360917 -0.020616424 + 900 0.88470061 -50.292856 -49.820811 15.813794 5.1849593e-08 14.07657 -0.02317448 + 1000 0.86758559 -50.292836 -49.829923 15.762447 9.4579685e-08 13.804251 -0.025732882 + 1100 0.85167475 -50.292814 -49.83839 15.716171 1.6240678e-07 13.551092 -0.028294045 + 1200 0.83734745 -50.29279 -49.846011 15.676049 2.6532099e-07 13.323128 -0.030863385 + 1300 0.82492738 -50.292764 -49.852612 15.643102 4.1573034e-07 13.125511 -0.033446749 + 1400 0.81469842 -50.292737 -49.858042 15.618114 6.287493e-07 12.962757 -0.036050518 + 1500 0.80692176 -50.292706 -49.862161 15.601972 9.2253166e-07 12.839022 -0.038681006 + 1600 0.80185333 -50.292674 -49.864833 15.595319 1.3186783e-06 12.758377 -0.041346087 + 1700 0.79976154 -50.292639 -49.865914 15.598922 1.8427553e-06 12.725095 -0.044055451 + 1800 0.80094538 -50.2926 -49.865244 15.613674 2.524964e-06 12.743931 -0.046819731 + 1900 0.80575381 -50.292559 -49.862637 15.640669 3.4010112e-06 12.820438 -0.049651934 + 2000 0.81460709 -50.292514 -49.857868 15.681364 4.5132409e-06 12.961304 -0.052564979 + 2100 0.82802133 -50.292465 -49.850661 15.73743 5.9121027e-06 13.174739 -0.055577058 + 2200 0.84663739 -50.29241 -49.840674 15.810925 7.658054e-06 13.470942 -0.058707326 + 2300 0.87125574 -50.292349 -49.827477 15.904535 9.82402e-06 13.862647 -0.061977077 + 2400 0.90287875 -50.29228 -49.810536 16.021749 1.2498571e-05 14.365804 -0.065412927 + 2500 0.94276188 -50.292203 -49.789178 16.16688 1.5790021e-05 15.000389 -0.069043572 + 2600 0.99247524 -50.292117 -49.762567 16.345151 1.9831692e-05 15.791384 -0.072902664 + 2700 1.0539756 -50.292019 -49.729655 16.56334 2.4788664e-05 16.769923 -0.077026939 + 2800 1.1296879 -50.291903 -49.689141 16.830177 3.0866362e-05 17.97459 -0.081462018 + 2900 1.222591 -50.29177 -49.639438 17.155398 3.8321389e-05 19.45278 -0.086262136 + 3000 1.3362974 -50.291614 -49.578613 17.551553 4.7474995e-05 21.261976 -0.091484095 + 3100 1.4751088 -50.291433 -49.504367 18.033555 5.872952e-05 23.47062 -0.097184337 + 3200 1.6440134 -50.291218 -49.41403 18.618802 7.2587889e-05 26.158079 -0.10344427 + 3300 1.8485776 -50.290963 -49.304627 19.3265 8.9675809e-05 29.412924 -0.11033444 + 3400 2.0946648 -50.290659 -49.17302 20.177003 0.00011076549 33.328444 -0.11794183 + 3500 2.3878978 -50.290296 -49.016197 21.189599 0.00013679846 37.994106 -0.12634541 + 3600 2.7327842 -50.289862 -48.831744 22.380493 0.0001689033 43.481633 -0.13563052 + 3700 3.1314527 -50.289342 -48.618508 23.757417 0.00020840179 49.824892 -0.1458703 + 3800 3.5820304 -50.288721 -48.377475 25.31432 0.00025679499 56.994084 -0.15714078 + 3900 4.0768367 -50.287983 -48.112726 27.026228 0.0003157187 64.867001 -0.1694959 + 4000 4.6007641 -50.287108 -47.832302 28.841926 0.0003868587 73.203268 -0.18296156 + 4100 5.1304148 -50.286087 -47.548677 30.682328 0.00047181946 81.6306 -0.19756083 + 4200 5.6346511 -50.284903 -47.278451 32.442736 0.00057194846 89.653559 -0.21328268 + 4300 6.0770778 -50.283545 -47.041029 33.999964 0.00068813116 96.69306 -0.23008376 + 4400 6.4205225 -50.282013 -46.856246 35.229403 0.00082058594 102.15765 -0.24791296 + 4500 6.6328762 -50.280301 -46.74123 36.023883 0.0009687004 105.53643 -0.26668503 + 4600 6.6929711 -50.278423 -46.707288 36.312847 0.0011309529 106.49261 -0.28630381 + 4700 6.5948589 -50.27639 -46.757604 36.078132 0.0013049526 104.93153 -0.3066628 + 4800 6.3491697 -50.274211 -46.886517 35.357678 0.0014876083 101.02235 -0.32764627 + 4900 5.9811042 -50.271915 -47.080607 34.23668 0.0016754063 95.166014 -0.34912704 + 5000 5.5256699 -50.269516 -47.321212 32.833829 0.001864752 87.919547 -0.37098454 + 5100 5.0215364 -50.267032 -47.587716 31.279327 0.002052314 79.898224 -0.39310129 + 5200 4.5051023 -50.264473 -47.860708 29.694368 0.0022353117 71.681183 -0.41536062 + 5300 4.0060486 -50.261854 -48.124367 28.177158 0.0024117009 63.740684 -0.43765657 + 5400 3.5450378 -50.259179 -48.367671 26.795368 0.0025802379 56.405491 -0.45989585 + 5500 3.1335423 -50.256452 -48.584504 25.585853 0.0027404289 49.858139 -0.48198401 + 5600 2.7752685 -50.253675 -48.772889 24.559285 0.0028923937 44.157606 -0.50383681 + 5700 2.4683952 -50.250848 -48.933799 23.707506 0.0030366865 39.27491 -0.52540813 + 5800 2.2078802 -50.247975 -49.069927 23.012724 0.0031741148 35.129826 -0.54664422 + 5900 1.987342 -50.245052 -49.184676 22.453088 0.0033055867 31.62082 -0.56749825 + 6000 1.8003231 -50.242086 -49.281496 22.005599 0.0034320005 28.645141 -0.5879444 + 6100 1.6409782 -50.239078 -49.363509 21.650929 0.0035541789 26.109787 -0.6079799 + 6200 1.5043457 -50.236031 -49.433365 21.372354 0.0036728367 23.935811 -0.62757526 + 6300 1.3863692 -50.23295 -49.493232 21.15608 0.0037885737 22.058674 -0.64672985 + 6400 1.2838 -50.229836 -49.544845 20.99171 0.0039018814 20.426685 -0.66545129 + 6500 1.1940599 -50.2267 -49.589591 20.870492 0.0040131566 18.998819 -0.68374953 + 6600 1.115105 -50.223537 -49.628556 20.785791 0.0041227168 17.742559 -0.70162987 + 6700 1.0453095 -50.220351 -49.66261 20.732525 0.0042308155 16.632035 -0.7190951 + 6800 0.98337083 -50.217149 -49.692456 20.706334 0.0043376557 15.646523 -0.73616716 + 6900 0.92823665 -50.213933 -49.718658 20.703509 0.0044434008 14.769276 -0.75286641 + 7000 0.87904844 -50.210704 -49.741675 20.721268 0.0045481845 13.986637 -0.7692006 + 7100 0.83509929 -50.207463 -49.761883 20.757758 0.0046521178 13.287358 -0.78517926 + 7200 0.79580187 -50.204208 -49.779596 20.810709 0.0047552948 12.662092 -0.80082697 + 7300 0.76066442 -50.200945 -49.795082 20.878241 0.0048577976 12.103016 -0.8161606 + 7400 0.72927251 -50.197671 -49.808557 20.959362 0.0049596993 11.603536 -0.83120088 + 7500 0.70127548 -50.194387 -49.820211 21.052437 0.0050610673 11.158072 -0.84595004 + 7600 0.67637608 -50.191091 -49.830201 21.156826 0.005161965 10.761895 -0.86043159 + 7700 0.65432278 -50.187783 -49.838659 21.271416 0.0052624536 10.411002 -0.87466503 + 7800 0.63490405 -50.184459 -49.845696 21.395737 0.0053625933 10.102029 -0.88866261 + 7900 0.61794415 -50.181125 -49.851412 21.52846 0.0054624448 9.8321781 -0.90243744 + 8000 0.60330004 -50.177777 -49.855877 21.669443 0.0055620701 9.599174 -0.91600112 + 8100 0.59085898 -50.174411 -49.859149 21.81797 0.0056615336 9.4012229 -0.92936588 + 8200 0.58053641 -50.171025 -49.861271 21.974141 0.0057609033 9.2369793 -0.94255403 + 8300 0.57227364 -50.16762 -49.862274 22.13688 0.0058602524 9.1055094 -0.95557385 + 8400 0.5660345 -50.164193 -49.862177 22.306138 0.0059596607 9.0062378 -0.9684373 + 8500 0.56180048 -50.160744 -49.860987 22.48185 0.0060592167 8.9388698 -0.98115048 + 8600 0.55956345 -50.15727 -49.858706 22.663291 0.0061590199 8.9032763 -0.9937296 + 8700 0.55931575 -50.15377 -49.855339 22.850832 0.0062591826 8.899335 -1.0061868 + 8800 0.56103758 -50.150241 -49.850891 23.043918 0.006359832 8.9267313 -1.0185265 + 8900 0.564683 -50.146681 -49.845386 23.242887 0.0064611118 8.984734 -1.0307694 + 9000 0.57016633 -50.143095 -49.838874 23.44706 0.0065631821 9.0719798 -1.0429186 + 9100 0.57735215 -50.139473 -49.831418 23.657034 0.0066662188 9.1863142 -1.0549883 + 9200 0.58605231 -50.13582 -49.823123 23.872662 0.0067704103 9.3247434 -1.0669874 + 9300 0.59603298 -50.132131 -49.814109 24.094175 0.0068759533 9.483547 -1.078929 + 9400 0.60703315 -50.128412 -49.80452 24.321354 0.0069830466 9.6585719 -1.0908215 + 9500 0.61879332 -50.124656 -49.79449 24.554693 0.0070918841 9.8456893 -1.1026826 + 9600 0.63108995 -50.120866 -49.784139 24.794372 0.0072026473 10.041342 -1.1145246 + 9700 0.64376884 -50.117043 -49.773551 25.040354 0.0073154993 10.243078 -1.1263585 + 9800 0.6567696 -50.113185 -49.762755 25.293643 0.00743058 10.449934 -1.1381891 + 9900 0.67013503 -50.109296 -49.751736 25.553866 0.0075480045 10.662593 -1.150037 + 10000 0.68400233 -50.105373 -49.740413 25.821695 0.007667864 10.883237 -1.1619081 +Loop time of 14.691 on 1 procs for 10000 steps with 180 atoms + +Performance: 0.059 ns/day, 408.083 hours/ns, 680.690 timesteps/s, 122.524 katom-step/s +96.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 2.9541 | 2.9541 | 2.9541 | 0.0 | 20.11 +Bond | 0.00096595 | 0.00096595 | 0.00096595 | 0.0 | 0.01 +Neigh | 6.6965 | 6.6965 | 6.6965 | 0.0 | 45.58 +Comm | 0.55386 | 0.55386 | 0.55386 | 0.0 | 3.77 +Output | 0.0030352 | 0.0030352 | 0.0030352 | 0.0 | 0.02 +Modify | 4.4131 | 4.4131 | 4.4131 | 0.0 | 30.04 +Other | | 0.06945 | | | 0.47 + +Nlocal: 180 ave 180 max 180 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1510 ave 1510 max 1510 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 13680 ave 13680 max 13680 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 13680 +Ave neighs/atom = 76 +Ave special neighs/atom = 0 +Neighbor list builds = 10000 +Dangerous builds not checked +Total wall time: 0:00:14 diff --git a/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.5 b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.5 new file mode 100644 index 0000000000..46e98fcbe1 --- /dev/null +++ b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.5 @@ -0,0 +1,197 @@ +LAMMPS (8 Feb 2023) +Processor partition = 5 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 32 pad +variable out_freq string 100 +variable job_name string H2 + +units real +atom_style full +pair_style table linear 10000 + +neighbor 2.0 bin +neigh_modify every 1 delay 0 check no + +read_data H2.data +Reading data file ... + orthogonal box = (0 0 0) to (19.71219 19.71219 19.71219) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 180 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.003 seconds + +pair_coeff 1 * pair.table PAIR_H2 +WARNING: 5852 of 18000 force values in table PAIR_H2 are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:466) + +timestep 0.001 + +velocity all create 1.0 1985 rot yes dist gaussian + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 25.0 nhc 4 + +thermo_style custom step temp pe etotal pzz f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +thermo ${out_freq} +thermo 100 + +#dump dcd all dcd ${out_freq} ${job_name}_${ibead}.dcd + +#restart ${out_freq} ${job_name}_${ibead}.restart1 ${job_name}_${ibead}.restart2 + +run 10000 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 11.55117 + ghost atom cutoff = 11.55117 + binsize = 5.775585, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 11.97 | 11.97 | 11.97 Mbytes + Step Temp PotEng TotEng Pzz espring T_ring virial + 0 1 -50.292986 -49.759421 16.18218 0 0 4.331435e-14 + 100 0.9951423 -50.292972 -49.761999 16.167253 6.8948763e-13 27.030021 -0.0025924671 + 200 0.98099313 -50.292959 -49.769535 16.12199 4.364663e-11 26.645702 -0.0051895017 + 300 0.95873287 -50.292945 -49.781399 16.050646 4.8814317e-10 26.041069 -0.0077954546 + 400 0.93006021 -50.292933 -49.796685 15.959334 2.6734695e-09 25.262263 -0.010415337 + 500 0.89689329 -50.29292 -49.814369 15.854928 9.8711643e-09 24.361385 -0.013055676 + 600 0.86110024 -50.292904 -49.833451 15.743908 2.8339559e-08 23.389175 -0.015723485 + 700 0.82431428 -50.292887 -49.853062 15.63173 6.8290594e-08 22.389996 -0.018423373 + 800 0.78784526 -50.292868 -49.872501 15.522613 1.4463127e-07 21.399426 -0.021164155 + 900 0.7526687 -50.292845 -49.891248 15.419533 2.77427e-07 20.443961 -0.023953669 + 1000 0.71946253 -50.29282 -49.90894 15.324327 4.9211825e-07 19.542016 -0.026800589 + 1100 0.6886647 -50.29279 -49.925343 15.237994 8.1957891e-07 18.705487 -0.029714543 + 1200 0.66053403 -50.292757 -49.940319 15.160974 1.2961277e-06 17.941403 -0.032707733 + 1300 0.63520454 -50.292719 -49.953796 15.093459 1.963599e-06 17.253404 -0.035794247 + 1400 0.61273022 -50.292676 -49.965745 15.035373 2.869563e-06 16.642957 -0.03898766 + 1500 0.59312003 -50.292628 -49.976159 14.9866 4.0677665e-06 16.110306 -0.042305977 + 1600 0.57636482 -50.292572 -49.985044 14.947135 5.6188557e-06 15.655201 -0.045764398 + 1700 0.56245786 -50.292508 -49.992401 14.916846 7.5914412e-06 15.277461 -0.049383169 + 1800 0.55141125 -50.292438 -49.998224 14.895701 1.0063569e-05 14.977413 -0.053180653 + 1900 0.54326954 -50.292356 -50.002487 14.8841 1.3124682e-05 14.756269 -0.057185281 + 2000 0.53812235 -50.292262 -50.005139 14.882365 1.6878177e-05 14.616461 -0.06142508 + 2100 0.53611706 -50.292157 -50.006103 14.891003 2.1444699e-05 14.561993 -0.065932846 + 2200 0.5374728 -50.292036 -50.005259 14.911208 2.6966349e-05 14.598818 -0.070740681 + 2300 0.54249683 -50.291895 -50.002438 14.944078 3.3612057e-05 14.73528 -0.075893774 + 2400 0.55160424 -50.291734 -49.997418 14.991434 4.1584413e-05 14.982655 -0.081441387 + 2500 0.56534189 -50.291548 -49.989902 15.055565 5.1128356e-05 15.355797 -0.08743341 + 2600 0.58441729 -50.291332 -49.979508 15.139015 6.2542191e-05 15.873922 -0.093934223 + 2700 0.60973261 -50.291079 -49.965747 15.245349 7.6191529e-05 16.561536 -0.10101976 + 2800 0.64242331 -50.290782 -49.948007 15.379156 9.2526793e-05 17.44948 -0.10876973 + 2900 0.68389894 -50.290432 -49.925527 15.54557 0.00011210502 18.576039 -0.11728634 + 3000 0.7358813 -50.29002 -49.89738 15.751474 0.00013561664 19.987983 -0.12666711 + 3100 0.80043068 -50.289531 -49.862449 16.004894 0.00016391766 21.741271 -0.13702882 + 3200 0.87994476 -50.288947 -49.819439 16.314811 0.00019806723 23.901029 -0.14852041 + 3300 0.97710684 -50.288249 -49.766899 16.691936 0.00023936963 26.540142 -0.16126751 + 3400 1.0947513 -50.287415 -49.703294 17.14741 0.00028941795 29.735596 -0.17542667 + 3500 1.2356068 -50.286413 -49.627136 17.692223 0.00035013447 33.561511 -0.19115489 + 3600 1.401879 -50.285209 -49.537215 18.336419 0.00042379924 38.077789 -0.20858771 + 3700 1.5946465 -50.283764 -49.432917 19.085164 0.00051305445 43.313732 -0.22786881 + 3800 1.8130867 -50.282042 -49.314643 19.93789 0.00062086813 49.246998 -0.24911566 + 3900 2.0536114 -50.279989 -49.184254 20.885144 0.0007504384 55.780123 -0.27238956 + 4000 2.3090877 -50.277563 -49.045514 21.903844 0.00090502091 62.71936 -0.29774099 + 4100 2.5684074 -50.274725 -48.904312 22.957566 0.00108767 69.762993 -0.32513211 + 4200 2.8167154 -50.271434 -48.768533 23.996177 0.0013008998 76.507527 -0.35448596 + 4300 3.036538 -50.267666 -48.647475 24.959984 0.0015462956 82.478341 -0.38565277 + 4400 3.2098498 -50.263408 -48.550744 25.787127 0.0018241308 87.185831 -0.41841744 + 4500 3.3207993 -50.258668 -48.486806 26.421384 0.0021330655 90.199435 -0.45253018 + 4600 3.3584953 -50.253474 -48.461498 26.823507 0.0024700053 91.223334 -0.48770345 + 4700 3.3191098 -50.247864 -48.476903 26.979088 0.002830177 90.153547 -0.523627 + 4800 3.2066723 -50.24189 -48.530922 26.900395 0.0032074389 87.099523 -0.55998518 + 4900 3.032313 -50.235626 -48.61769 26.623396 0.0035947863 82.363581 -0.59650144 + 5000 2.8121843 -50.229136 -48.728653 26.202501 0.0039849754 76.384452 -0.63291394 + 5100 2.5646536 -50.222488 -48.854078 25.698898 0.0043711592 69.661033 -0.66900289 + 5200 2.3074927 -50.215744 -48.984547 25.172075 0.0047474367 62.676038 -0.70458409 + 5300 2.0556743 -50.208948 -49.112112 24.671889 0.0051092373 55.836155 -0.73953676 + 5400 1.8201204 -50.202145 -49.230993 24.233676 0.0054535012 49.438049 -0.77374738 + 5500 1.6074397 -50.195362 -49.337688 23.877579 0.0057786579 43.661222 -0.80716644 + 5600 1.4204402 -50.188613 -49.430716 23.612103 0.0060844379 38.581947 -0.83975723 + 5700 1.2590781 -50.181911 -49.510111 23.435375 0.0063715815 34.199035 -0.8715173 + 5800 1.1215024 -50.175255 -49.576861 23.340009 0.0066415095 30.462209 -0.90243963 + 5900 1.0049565 -50.168645 -49.632435 23.316226 0.0068960167 27.296594 -0.93254359 + 6000 0.90642655 -50.162073 -49.678436 23.35333 0.0071370232 24.620327 -0.96187362 + 6100 0.82303426 -50.15554 -49.716398 23.441044 0.0073664003 22.355228 -0.99044001 + 6200 0.75222945 -50.149036 -49.747672 23.571168 0.0075858646 20.432031 -1.0182716 + 6300 0.69185157 -50.142555 -49.773408 23.736184 0.0077969274 18.792049 -1.0454141 + 6400 0.64011849 -50.1361 -49.794555 23.930273 0.0080008828 17.386876 -1.0718977 + 6500 0.59558258 -50.129659 -49.811877 24.148617 0.0081988179 16.177194 -1.0977481 + 6600 0.55707711 -50.123229 -49.825992 24.387764 0.0083916354 15.131309 -1.1230042 + 6700 0.52366443 -50.11681 -49.837401 24.644278 0.0085800803 14.223755 -1.1476911 + 6800 0.49459087 -50.110398 -49.846502 24.915585 0.0087647672 13.43406 -1.1718456 + 6900 0.46924933 -50.103993 -49.853618 25.199975 0.0089462046 12.745734 -1.1954836 + 7000 0.44714908 -50.09759 -49.859007 25.495663 0.0091248169 12.145448 -1.2186489 + 7100 0.42789171 -50.09119 -49.862882 25.801204 0.0093009621 11.62238 -1.2413589 + 7200 0.41115213 -50.084791 -49.865415 26.115435 0.0094749465 11.1677 -1.2636357 + 7300 0.39666341 -50.078389 -49.866743 26.43778 0.0096470373 10.774158 -1.2855199 + 7400 0.38420469 -50.071981 -49.866983 26.767492 0.0098174711 10.435755 -1.3070246 + 7500 0.37359146 -50.065568 -49.866233 27.103933 0.0099864621 10.147478 -1.3281809 + 7600 0.36466763 -50.059148 -49.864574 27.446285 0.010154207 9.9050896 -1.3490095 + 7700 0.35729911 -50.052716 -49.862074 27.794551 0.010320892 9.7049462 -1.3695395 + 7800 0.35136861 -50.046271 -49.858793 28.148371 0.010486691 9.5438621 -1.3897895 + 7900 0.34677153 -50.039813 -49.854788 28.507205 0.010651775 9.4189963 -1.4097881 + 8000 0.34341297 -50.033336 -49.850103 28.870887 0.010816309 9.3277714 -1.4295506 + 8100 0.34120579 -50.026841 -49.844785 29.238802 0.010980456 9.2678199 -1.4491058 + 8200 0.3400696 -50.020321 -49.838872 29.611242 0.011144377 9.2369587 -1.4684765 + 8300 0.33993073 -50.013777 -49.832402 29.987651 0.011308235 9.2331869 -1.4876802 + 8400 0.34072278 -50.007208 -49.82541 30.367811 0.011472193 9.2547003 -1.5067423 + 8500 0.34238718 -50.000608 -49.817922 30.75172 0.011636417 9.2999089 -1.5256766 + 8600 0.34487349 -49.993976 -49.809964 31.138912 0.011801076 9.3674418 -1.5445114 + 8700 0.34813839 -49.987308 -49.801554 31.529558 0.011966343 9.4561231 -1.5632615 + 8800 0.35214326 -49.980605 -49.792714 31.923412 0.012132398 9.5649031 -1.5819515 + 8900 0.35684992 -49.973862 -49.783459 32.320438 0.012299427 9.6927453 -1.6005873 + 9000 0.36221521 -49.967079 -49.773813 32.720589 0.012467623 9.8384771 -1.6191906 + 9100 0.36818518 -49.96025 -49.763799 33.12412 0.012637186 10.000633 -1.6377754 + 9200 0.3746904 -49.953378 -49.753456 33.530521 0.012808324 10.177328 -1.6563518 + 9300 0.3816439 -49.946457 -49.742826 33.940033 0.01298125 10.366198 -1.6749285 + 9400 0.3889426 -49.939487 -49.73196 34.352706 0.013156185 10.564445 -1.6935206 + 9500 0.39647284 -49.932468 -49.720924 34.768109 0.01333335 10.768982 -1.712126 + 9600 0.40411904 -49.925391 -49.709767 35.186397 0.013512971 10.976668 -1.7307508 + 9700 0.41177414 -49.918266 -49.698558 35.606965 0.013695276 11.184595 -1.7493922 + 9800 0.41934973 -49.911084 -49.687333 36.03058 0.013880493 11.390363 -1.7680484 + 9900 0.42678411 -49.903846 -49.676129 36.456503 0.014068856 11.592295 -1.7867244 + 10000 0.43404714 -49.896555 -49.664963 36.884919 0.014260602 11.789574 -1.8054063 +Loop time of 14.691 on 1 procs for 10000 steps with 180 atoms + +Performance: 0.059 ns/day, 408.083 hours/ns, 680.690 timesteps/s, 122.524 katom-step/s +98.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 2.9459 | 2.9459 | 2.9459 | 0.0 | 20.05 +Bond | 0.0010983 | 0.0010983 | 0.0010983 | 0.0 | 0.01 +Neigh | 6.4646 | 6.4646 | 6.4646 | 0.0 | 44.00 +Comm | 0.54538 | 0.54538 | 0.54538 | 0.0 | 3.71 +Output | 0.0030317 | 0.0030317 | 0.0030317 | 0.0 | 0.02 +Modify | 4.662 | 4.662 | 4.662 | 0.0 | 31.73 +Other | | 0.06897 | | | 0.47 + +Nlocal: 180 ave 180 max 180 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1510 ave 1510 max 1510 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 13680 ave 13680 max 13680 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 13680 +Ave neighs/atom = 76 +Ave special neighs/atom = 0 +Neighbor list builds = 10000 +Dangerous builds not checked +Total wall time: 0:00:14 diff --git a/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.6 b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.6 new file mode 100644 index 0000000000..ae27b84d32 --- /dev/null +++ b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.6 @@ -0,0 +1,197 @@ +LAMMPS (8 Feb 2023) +Processor partition = 6 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 32 pad +variable out_freq string 100 +variable job_name string H2 + +units real +atom_style full +pair_style table linear 10000 + +neighbor 2.0 bin +neigh_modify every 1 delay 0 check no + +read_data H2.data +Reading data file ... + orthogonal box = (0 0 0) to (19.71219 19.71219 19.71219) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 180 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.003 seconds + +pair_coeff 1 * pair.table PAIR_H2 +WARNING: 5852 of 18000 force values in table PAIR_H2 are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:466) + +timestep 0.001 + +velocity all create 1.0 1985 rot yes dist gaussian + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 25.0 nhc 4 + +thermo_style custom step temp pe etotal pzz f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +thermo ${out_freq} +thermo 100 + +#dump dcd all dcd ${out_freq} ${job_name}_${ibead}.dcd + +#restart ${out_freq} ${job_name}_${ibead}.restart1 ${job_name}_${ibead}.restart2 + +run 10000 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 11.55117 + ghost atom cutoff = 11.55117 + binsize = 5.775585, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 11.97 | 11.97 | 11.97 Mbytes + Step Temp PotEng TotEng Pzz espring T_ring virial + 0 1 -50.292986 -49.759421 16.18218 0 0 4.331435e-14 + 100 0.9951423 -50.292972 -49.761999 16.167254 3.663073e-06 27.030021 -0.0025950927 + 200 0.98099313 -50.292958 -49.769535 16.121999 1.4652294e-05 26.645702 -0.0052104718 + 300 0.95873287 -50.292945 -49.781399 16.050672 3.2966429e-05 26.041069 -0.0078660339 + 400 0.93006021 -50.292932 -49.796684 15.959387 5.8599875e-05 25.262263 -0.010582044 + 500 0.89689329 -50.292917 -49.814366 15.855074 9.1539141e-05 24.361385 -0.013380753 + 600 0.86110024 -50.292898 -49.833445 15.744205 0.00013176059 23.389175 -0.016282487 + 700 0.82431428 -50.292877 -49.853052 15.632253 0.00017923062 22.389996 -0.019305323 + 800 0.78784526 -50.29285 -49.872483 15.523595 0.00023390859 21.399426 -0.022473781 + 900 0.7526687 -50.292816 -49.891219 15.421094 0.00029575217 20.443961 -0.025805439 + 1000 0.71946253 -50.292776 -49.908896 15.326586 0.0003647244 19.542016 -0.029318877 + 1100 0.6886647 -50.292726 -49.925279 15.241234 0.00044080156 18.705487 -0.033035613 + 1200 0.66053404 -50.292668 -49.94023 15.165485 0.00052398138 17.941403 -0.036980816 + 1300 0.63520455 -50.292595 -49.953672 15.099745 0.00061429107 17.253404 -0.041183239 + 1400 0.61273022 -50.292511 -49.965579 15.043883 0.00071179519 16.642957 -0.045662316 + 1500 0.59312004 -50.29241 -49.975942 14.99787 0.00081660341 16.110306 -0.050440479 + 1600 0.57636482 -50.292289 -49.984761 14.961722 0.00092887845 15.655202 -0.055550832 + 1700 0.56245787 -50.292149 -49.992041 14.935319 0.0010488445 15.277461 -0.061027295 + 1800 0.55141126 -50.291984 -49.99777 14.919091 0.0011767964 14.977414 -0.066900795 + 1900 0.54326956 -50.291792 -50.001923 14.913094 0.0013131107 14.756269 -0.073216193 + 2000 0.53812238 -50.29157 -50.004447 14.917947 0.0014582582 14.616462 -0.080017237 + 2100 0.53611709 -50.291312 -50.005259 14.934473 0.0016128191 14.561994 -0.087363239 + 2200 0.53747284 -50.291009 -50.004233 14.964038 0.0017775021 14.598819 -0.095297839 + 2300 0.54249688 -50.290657 -50.001199 15.008081 0.0019531669 14.735282 -0.10390758 + 2400 0.5516043 -50.290246 -49.995929 15.068555 0.0021408527 14.982657 -0.11326027 + 2500 0.56534197 -50.289766 -49.988119 15.147769 0.0023418123 15.355799 -0.12345646 + 2600 0.58441738 -50.289207 -49.977382 15.249155 0.0025575544 15.873925 -0.13459188 + 2700 0.60973272 -50.28855 -49.963218 15.376625 0.0027898943 16.561539 -0.14680402 + 2800 0.64242344 -50.287778 -49.945003 15.535379 0.0030410156 17.449483 -0.16021499 + 2900 0.68389909 -50.286869 -49.921964 15.731194 0.003313542 18.576043 -0.1749965 + 3000 0.73588147 -50.28579 -49.893149 15.972304 0.0036106211 19.987987 -0.19131687 + 3100 0.80043087 -50.284508 -49.857426 16.267625 0.0039360184 21.741276 -0.20938994 + 3200 0.87994497 -50.282984 -49.813476 16.627323 0.0042942181 23.901035 -0.229419 + 3300 0.97710707 -50.281162 -49.759812 17.064318 0.0046905236 26.540149 -0.25165651 + 3400 1.0947515 -50.278979 -49.694858 17.591402 0.0051311469 29.735603 -0.27634359 + 3500 1.2356071 -50.276358 -49.617081 18.222808 0.0056232657 33.561517 -0.30373125 + 3600 1.4018792 -50.273211 -49.525217 18.97057 0.0061750242 38.077795 -0.33406344 + 3700 1.5946467 -50.269438 -49.41859 19.844391 0.0067954397 43.313738 -0.36756248 + 3800 1.8130868 -50.264926 -49.297526 20.847335 0.0074941739 49.247003 -0.4044001 + 3900 2.0536116 -50.259558 -49.163823 21.972799 0.0082811282 55.780127 -0.44468343 + 4000 2.3090877 -50.253214 -49.021165 23.203274 0.0091658295 62.719362 -0.48844585 + 4100 2.5684074 -50.245778 -48.875365 24.50535 0.010156603 69.762993 -0.53559997 + 4200 2.8167153 -50.237155 -48.734254 25.832794 0.011259571 76.507524 -0.58595872 + 4300 3.0365377 -50.22728 -48.607089 27.128084 0.012477576 82.478334 -0.63920669 + 4400 3.2098494 -50.216129 -48.503465 28.32938 0.013809186 87.18582 -0.69492156 + 4500 3.3207987 -50.203729 -48.431867 29.380289 0.015247971 90.19942 -0.75258375 + 4600 3.3584946 -50.190151 -48.398176 30.239405 0.016782256 91.223315 -0.81162394 + 4700 3.319109 -50.175529 -48.404569 30.887433 0.01839546 90.153525 -0.87142276 + 4800 3.2066714 -50.160034 -48.449067 31.329923 0.020067061 87.099499 -0.93139568 + 4900 3.0323121 -50.14386 -48.525924 31.596801 0.021774071 82.363558 -0.99098372 + 5000 2.8121835 -50.127216 -48.626733 31.734704 0.02349282 76.384432 -1.04971 + 5100 2.5646531 -50.11031 -48.741901 31.798135 0.025200765 69.661019 -1.1071803 + 5200 2.3074925 -50.093317 -48.86212 31.840218 0.026878076 62.676032 -1.16309 + 5300 2.0556744 -50.076391 -48.979555 31.905031 0.028508785 55.836159 -1.217247 + 5400 1.820121 -50.059654 -49.088501 32.023732 0.030081384 49.438064 -1.2695269 + 5500 1.6074407 -50.04318 -49.185506 32.214415 0.031588873 43.661248 -1.319891 + 5600 1.4204416 -50.02701 -49.269112 32.484092 0.033028319 38.581985 -1.3683615 + 5700 1.2590798 -50.011162 -49.339361 32.830285 0.034400107 34.199083 -1.4149934 + 5800 1.1215045 -49.995631 -49.397236 33.245821 0.035707041 30.462267 -1.4598878 + 5900 1.0049589 -49.980399 -49.444188 33.721747 0.03695346 27.29666 -1.5031416 + 6000 0.90642926 -49.965438 -49.4818 34.248321 0.038144494 24.620401 -1.5448741 + 6100 0.82303723 -49.950718 -49.511574 34.817039 0.039285497 22.355309 -1.585191 + 6200 0.75223267 -49.936211 -49.534846 35.419814 0.040381668 20.432118 -1.6242074 + 6300 0.69185501 -49.921889 -49.552739 36.050843 0.041437835 18.792142 -1.6620216 + 6400 0.64012215 -49.907725 -49.566179 36.704661 0.042458347 17.386976 -1.6987306 + 6500 0.59558646 -49.893699 -49.575915 37.378286 0.04344705 16.177299 -1.7344148 + 6600 0.55708121 -49.879794 -49.582555 38.067181 0.044407312 15.131421 -1.7691453 + 6700 0.52366875 -49.865988 -49.586576 38.769884 0.045342063 14.223873 -1.8030059 + 6800 0.49459542 -49.852276 -49.588377 39.48355 0.046253857 13.434184 -1.8360506 + 6900 0.46925412 -49.838637 -49.58826 40.206955 0.047144922 12.745864 -1.8683386 + 7000 0.44715411 -49.825066 -49.58648 40.938794 0.048017218 12.145585 -1.8999205 + 7100 0.427897 -49.811553 -49.583243 41.677982 0.048872484 11.622524 -1.9308529 + 7200 0.4111577 -49.798086 -49.578707 42.423605 0.049712274 11.167851 -1.9611851 + 7300 0.39666926 -49.784662 -49.573013 43.175155 0.050538 10.774317 -1.9909515 + 7400 0.38421083 -49.771272 -49.56627 43.931762 0.051350953 10.435921 -2.0202015 + 7500 0.37359789 -49.757907 -49.558568 44.69348 0.052152332 10.147653 -2.0489622 + 7600 0.36467436 -49.744563 -49.549985 45.459725 0.052943262 9.9052723 -2.0772881 + 7700 0.35730613 -49.731235 -49.540589 46.229921 0.053724811 9.7051368 -2.1052027 + 7800 0.3513759 -49.717911 -49.530429 47.004627 0.054498005 9.54406 -2.1327445 + 7900 0.34677906 -49.704589 -49.51956 47.78318 0.055263836 9.419201 -2.1599468 + 8000 0.34342073 -49.691262 -49.508025 48.565675 0.056023277 9.327982 -2.1868375 + 8100 0.34121371 -49.677922 -49.495862 49.351802 0.056777286 9.2680351 -2.2134444 + 8200 0.34007764 -49.664566 -49.483112 50.141603 0.057526819 9.2371771 -2.2397997 + 8300 0.33993883 -49.651181 -49.469802 50.935241 0.05827283 9.2334067 -2.2659331 + 8400 0.34073085 -49.637766 -49.455963 51.732654 0.059016284 9.2549196 -2.2918688 + 8500 0.34239516 -49.62431 -49.441619 52.534019 0.059758157 9.3001256 -2.317626 + 8600 0.3448813 -49.610812 -49.426796 53.338612 0.060499441 9.367654 -2.3432261 + 8700 0.34814597 -49.597265 -49.411506 54.147073 0.061241149 9.4563288 -2.3686991 + 8800 0.35215054 -49.583658 -49.395763 54.959512 0.061984314 9.5651009 -2.3940587 + 8900 0.35685687 -49.569985 -49.379579 55.776434 0.062729991 9.692934 -2.419329 + 9000 0.36222181 -49.556241 -49.362972 56.597626 0.063479254 9.8386562 -2.4445253 + 9100 0.36819143 -49.54242 -49.345966 57.423306 0.064233198 10.000803 -2.469667 + 9200 0.37469636 -49.528518 -49.328593 58.253634 0.064992931 10.17749 -2.4947681 + 9300 0.38164964 -49.514521 -49.310886 59.088869 0.065759574 10.366354 -2.5198522 + 9400 0.38894823 -49.500427 -49.292898 59.929378 0.066534253 10.564598 -2.5449285 + 9500 0.3964785 -49.486229 -49.274681 60.775174 0.067318101 10.769135 -2.5700196 + 9600 0.4041249 -49.471917 -49.25629 61.626259 0.068112253 10.976827 -2.5951326 + 9700 0.41178035 -49.457494 -49.237782 62.482132 0.06891785 11.184764 -2.6202815 + 9800 0.41935645 -49.44294 -49.219186 63.343831 0.069736042 11.390545 -2.6454805 + 9900 0.42679147 -49.428257 -49.200536 64.211037 0.070567996 11.592495 -2.670741 + 10000 0.43405521 -49.413432 -49.181835 65.08463 0.071414903 11.789793 -2.6960774 +Loop time of 14.691 on 1 procs for 10000 steps with 180 atoms + +Performance: 0.059 ns/day, 408.083 hours/ns, 680.690 timesteps/s, 122.524 katom-step/s +95.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 3.1084 | 3.1084 | 3.1084 | 0.0 | 21.16 +Bond | 0.0010414 | 0.0010414 | 0.0010414 | 0.0 | 0.01 +Neigh | 6.6306 | 6.6306 | 6.6306 | 0.0 | 45.13 +Comm | 0.56093 | 0.56093 | 0.56093 | 0.0 | 3.82 +Output | 0.002951 | 0.002951 | 0.002951 | 0.0 | 0.02 +Modify | 4.3177 | 4.3177 | 4.3177 | 0.0 | 29.39 +Other | | 0.06942 | | | 0.47 + +Nlocal: 180 ave 180 max 180 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1510 ave 1510 max 1510 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 13680 ave 13680 max 13680 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 13680 +Ave neighs/atom = 76 +Ave special neighs/atom = 0 +Neighbor list builds = 10000 +Dangerous builds not checked +Total wall time: 0:00:14 diff --git a/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.7 b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.7 new file mode 100644 index 0000000000..ac54d52847 --- /dev/null +++ b/examples/PACKAGES/pimd/para-h2/log.25Feb23.scp.g++.8.7 @@ -0,0 +1,197 @@ +LAMMPS (8 Feb 2023) +Processor partition = 7 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 32 pad +variable out_freq string 100 +variable job_name string H2 + +units real +atom_style full +pair_style table linear 10000 + +neighbor 2.0 bin +neigh_modify every 1 delay 0 check no + +read_data H2.data +Reading data file ... + orthogonal box = (0 0 0) to (19.71219 19.71219 19.71219) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 180 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.002 seconds + +pair_coeff 1 * pair.table PAIR_H2 +WARNING: 5852 of 18000 force values in table PAIR_H2 are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:466) + +timestep 0.001 + +velocity all create 1.0 1985 rot yes dist gaussian + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 25.0 nhc 4 + +thermo_style custom step temp pe etotal pzz f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +thermo ${out_freq} +thermo 100 + +#dump dcd all dcd ${out_freq} ${job_name}_${ibead}.dcd + +#restart ${out_freq} ${job_name}_${ibead}.restart1 ${job_name}_${ibead}.restart2 + +run 10000 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 11.55117 + ghost atom cutoff = 11.55117 + binsize = 5.775585, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 11.97 | 11.97 | 11.97 Mbytes + Step Temp PotEng TotEng Pzz espring T_ring virial + 0 1 -50.292986 -49.759421 16.18218 0 0 4.331435e-14 + 100 0.99396717 -50.292908 -49.762562 16.16754 3.6546345e-06 31.630244 -0.01511026 + 200 0.97647843 -50.292785 -49.77177 16.117482 1.4519126e-05 31.073714 -0.030258999 + 300 0.94920978 -50.292584 -49.786119 16.040198 3.2307193e-05 30.205965 -0.045469889 + 400 0.91451321 -50.292301 -49.804349 15.94486 5.6578376e-05 29.101843 -0.060775514 + 500 0.87495051 -50.291935 -49.825092 15.839811 8.6783378e-05 27.84287 -0.07621024 + 600 0.83290521 -50.291484 -49.847075 15.733867 0.00012231241 26.504895 -0.091795014 + 700 0.79035049 -50.290943 -49.869239 15.633262 0.0001625386 25.150709 -0.10756384 + 800 0.74877056 -50.29031 -49.890792 15.542706 0.00020685191 23.827543 -0.12353621 + 900 0.70918842 -50.289582 -49.911184 15.465561 0.00025468227 22.567951 -0.13974782 + 1000 0.67224667 -50.288756 -49.930069 15.403036 0.00030551305 21.392383 -0.15621567 + 1100 0.63830199 -50.287828 -49.947252 15.356514 0.00035888685 20.312188 -0.17298512 + 1200 0.60751172 -50.286791 -49.962644 15.325845 0.0004144061 19.332373 -0.19008041 + 1300 0.57990404 -50.285641 -49.976225 15.311509 0.00047173031 18.453835 -0.20753645 + 1400 0.5554312 -50.284374 -49.988015 15.313263 0.00053057146 17.675055 -0.22539174 + 1500 0.53400813 -50.282975 -49.998047 15.33133 0.00059068877 16.993325 -0.24369544 + 1600 0.51553984 -50.281444 -50.00637 15.365561 0.00065188331 16.405623 -0.26248285 + 1700 0.49994085 -50.279767 -50.013016 15.416271 0.00071399304 15.909229 -0.28182209 + 1800 0.48714931 -50.277932 -50.018006 15.48387 0.00077688833 15.502174 -0.30176215 + 1900 0.47713797 -50.275928 -50.021344 15.569019 0.00084046832 15.183591 -0.32238808 + 2000 0.46992375 -50.273735 -50.023 15.673314 0.00090465799 14.954018 -0.3437631 + 2100 0.46557711 -50.271332 -50.022917 15.797801 0.00096940607 14.815698 -0.36598703 + 2200 0.46423244 -50.2687 -50.021002 15.944553 0.0010346838 14.772908 -0.38915619 + 2300 0.46610038 -50.26581 -50.017115 16.115839 0.0011004847 14.83235 -0.41338963 + 2400 0.47148286 -50.262625 -50.011058 16.314677 0.0011668255 15.003632 -0.43882597 + 2500 0.48079165 -50.259109 -50.002575 16.545079 0.0012337477 15.299859 -0.46562537 + 2600 0.49457102 -50.255212 -49.991327 16.811386 0.0013013219 15.738349 -0.49395245 + 2700 0.51352449 -50.250875 -49.976877 17.11979 0.0013696525 16.341491 -0.52401609 + 2800 0.53854543 -50.246032 -49.958683 17.477089 0.0014388859 17.137712 -0.55604082 + 2900 0.57074936 -50.240596 -49.936064 17.892199 0.0015092207 18.162513 -0.59030618 + 3000 0.61150422 -50.234467 -49.90819 18.375616 0.001580922 19.459423 -0.62708735 + 3100 0.66245096 -50.227523 -49.874062 18.939819 0.0016543394 21.080662 -0.66672955 + 3200 0.72550205 -50.219616 -49.832514 19.60023 0.0017299293 23.087088 -0.70958417 + 3300 0.80279929 -50.210579 -49.782233 20.37383 0.0018082826 25.546857 -0.75603924 + 3400 0.89660476 -50.200203 -49.721806 21.28012 0.0018901552 28.531956 -0.80651501 + 3500 1.0090938 -50.188252 -49.649835 22.340233 0.0019765002 32.111606 -0.86141363 + 3600 1.1420183 -50.174459 -49.565118 23.57558 0.0020684981 36.34156 -0.92115194 + 3700 1.2962221 -50.158518 -49.466899 25.006266 0.0021675754 41.248667 -0.98609175 + 3800 1.4710194 -50.140107 -49.355223 26.648455 0.0022754045 46.811106 -1.0565325 + 3900 1.6635051 -50.118886 -49.231298 28.511102 0.0023938687 52.936429 -1.1326688 + 4000 1.8679372 -50.094526 -49.097861 30.592386 0.0025249809 59.441913 -1.214555 + 4100 2.075405 -50.066723 -48.95936 32.878933 0.0026707445 66.044 -1.3020682 + 4200 2.2740293 -50.035234 -48.821891 35.342354 0.0028329538 72.364666 -1.394874 + 4300 2.449883 -49.999912 -48.69274 37.94169 0.0030129483 77.96072 -1.4924536 + 4400 2.5886538 -49.960721 -48.579506 40.62924 0.0032113484 82.376716 -1.5940701 + 4500 2.6778127 -49.917775 -48.488988 43.35421 0.0034278221 85.21395 -1.6987968 + 4600 2.7088053 -49.871336 -48.426012 46.071925 0.0036609337 86.200203 -1.8055903 + 4700 2.6786752 -49.821807 -48.39256 48.749456 0.0039081229 85.241397 -1.9133555 + 4800 2.5906421 -49.769708 -48.387433 51.369043 0.0041658356 82.439989 -2.0209603 + 4900 2.4534656 -49.71564 -48.406557 53.929171 0.0044297991 78.074727 -2.1273728 + 5000 2.2797967 -49.660246 -48.443826 56.439389 0.0046953978 72.548196 -2.2316692 + 5100 2.0839917 -49.60414 -48.492195 58.917167 0.0049580886 66.317246 -2.3330819 + 5200 1.8799454 -49.547898 -48.544825 61.38072 0.0052137855 59.824039 -2.4310487 + 5300 1.6794028 -49.492001 -48.59593 63.845702 0.0054591569 53.442329 -2.5251887 + 5400 1.4910004 -49.436812 -48.641266 66.323664 0.0056917984 47.446947 -2.6153153 + 5500 1.3200581 -49.382602 -48.678265 68.81759 0.0059102724 42.007182 -2.7013892 + 5600 1.1689597 -49.32954 -48.705824 71.326608 0.0061140319 37.198896 -2.7834961 + 5700 1.0378669 -49.277687 -48.723917 73.847293 0.0063032634 33.027232 -2.8618238 + 5800 0.92551081 -49.227051 -48.733231 76.373912 0.0064786911 29.451811 -2.9366159 + 5900 0.82988009 -49.177354 -48.734559 78.907054 0.0066413821 26.408629 -3.0079862 + 6000 0.74872148 -49.128988 -48.729496 81.429069 0.0067925784 23.825981 -3.0765541 + 6100 0.6798481 -49.081399 -48.718656 83.949013 0.0069335708 21.634277 -3.1425093 + 6200 0.62129621 -49.034965 -48.703463 86.450184 0.0070656124 19.771026 -3.2059256 + 6300 0.5713815 -48.989354 -48.684484 88.938306 0.0071898691 18.182629 -3.2671248 + 6400 0.52869861 -48.944483 -48.662388 91.411964 0.0073073957 16.824365 -3.326325 + 6500 0.49209369 -48.900284 -48.63772 93.869881 0.00741913 15.659515 -3.383704 + 6600 0.4606278 -48.85645 -48.610675 96.319181 0.0075258972 14.6582 -3.4393879 + 6700 0.4335401 -48.813153 -48.581831 98.754093 0.0076284202 13.796209 -3.4935699 + 6800 0.41021495 -48.770575 -48.551698 101.16784 0.0077273325 13.053951 -3.546418 + 6900 0.39015391 -48.728202 -48.520029 103.57385 0.0078231904 12.415565 -3.5980989 + 7000 0.37295279 -48.686464 -48.487469 105.95986 0.0079164859 11.868187 -3.6485312 + 7100 0.35828286 -48.645075 -48.453908 108.33347 0.008007657 11.401357 -3.6979091 + 7200 0.34587564 -48.603786 -48.419239 110.70102 0.0080970974 11.006532 -3.7462688 + 7300 0.33551045 -48.563011 -48.383994 113.05147 0.0081851643 10.676688 -3.7937749 + 7400 0.32700405 -48.5225 -48.348023 115.39114 0.008272185 10.405996 -3.8404567 + 7500 0.32020193 -48.481991 -48.311143 117.72756 0.0083584619 10.189537 -3.8863461 + 7600 0.31497086 -48.441913 -48.273856 120.0495 0.008444277 10.023073 -3.9315862 + 7700 0.31119256 -48.401778 -48.235736 122.37022 0.0085298943 9.9028389 -3.9761586 + 7800 0.30875834 -48.362027 -48.197284 124.67777 0.0086155626 9.8253766 -4.020194 + 7900 0.30756489 -48.322398 -48.158292 126.9798 0.0087015164 9.7873982 -4.0637137 + 8000 0.30751134 -48.282865 -48.118788 129.27742 0.0087879767 9.7856943 -4.1067668 + 8100 0.30849789 -48.243167 -48.078563 131.57737 0.0088751511 9.8170884 -4.1492332 + 8200 0.31042593 -48.203515 -48.037882 133.87491 0.0089632335 9.8784428 -4.1915847 + 8300 0.31319977 -48.163874 -47.996762 136.17056 0.0090524039 9.9667128 -4.2336145 + 8400 0.3167294 -48.124228 -47.955232 138.46555 0.0091428273 10.079033 -4.2753558 + 8500 0.32093339 -48.084773 -47.913534 140.75426 0.0092346543 10.212814 -4.3167737 + 8600 0.32574097 -48.045251 -47.871447 143.04447 0.0093280205 10.365802 -4.3579897 + 8700 0.33109202 -48.005633 -47.828974 145.33751 0.0094230472 10.536084 -4.3990428 + 8800 0.33693414 -47.965895 -47.786118 147.63516 0.0095198428 10.721993 -4.4399711 + 8900 0.34321684 -47.926004 -47.742875 149.9379 0.009618504 10.921922 -4.4808086 + 9000 0.34988367 -47.885934 -47.699248 152.24678 0.0097191181 11.134076 -4.5215921 + 9100 0.35686443 -47.845658 -47.655247 154.56358 0.0098217652 11.356219 -4.5623394 + 9200 0.3640698 -47.805147 -47.610893 156.88915 0.0099265208 11.58551 -4.6030874 + 9300 0.37139091 -47.764138 -47.565977 159.23099 0.010033457 11.818484 -4.6439479 + 9400 0.37870543 -47.722844 -47.52078 161.5788 0.010142648 12.051248 -4.6846276 + 9500 0.38588975 -47.68146 -47.475562 163.93728 0.010254165 12.279869 -4.7255143 + 9600 0.39283543 -47.639735 -47.430132 166.30871 0.010368088 12.500896 -4.7664862 + 9700 0.39946605 -47.597406 -47.384265 168.70114 0.010484497 12.711897 -4.8075181 + 9800 0.40575037 -47.55491 -47.338416 171.10373 0.010603483 12.911878 -4.848721 + 9900 0.41170816 -47.511756 -47.292083 173.53055 0.010725141 13.101469 -4.8900195 + 10000 0.41740707 -47.468384 -47.245671 175.97095 0.010849577 13.282821 -4.9315123 +Loop time of 14.691 on 1 procs for 10000 steps with 180 atoms + +Performance: 0.059 ns/day, 408.083 hours/ns, 680.690 timesteps/s, 122.524 katom-step/s +97.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 2.9822 | 2.9822 | 2.9822 | 0.0 | 20.30 +Bond | 0.00090722 | 0.00090722 | 0.00090722 | 0.0 | 0.01 +Neigh | 6.5119 | 6.5119 | 6.5119 | 0.0 | 44.33 +Comm | 0.55377 | 0.55377 | 0.55377 | 0.0 | 3.77 +Output | 0.0024523 | 0.0024523 | 0.0024523 | 0.0 | 0.02 +Modify | 4.5713 | 4.5713 | 4.5713 | 0.0 | 31.12 +Other | | 0.06845 | | | 0.47 + +Nlocal: 180 ave 180 max 180 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1510 ave 1510 max 1510 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 13712 ave 13712 max 13712 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 13712 +Ave neighs/atom = 76.177778 +Ave special neighs/atom = 0 +Neighbor list builds = 10000 +Dangerous builds not checked +Total wall time: 0:00:14 From 3e2b5dd9d30acef544af055c588cab71ef689312 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 25 Feb 2023 23:47:11 -0500 Subject: [PATCH 279/445] small cleanup --- src/REPLICA/fix_pimd_nvt.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/REPLICA/fix_pimd_nvt.cpp b/src/REPLICA/fix_pimd_nvt.cpp index 89d9a4127f..8f34df0b83 100644 --- a/src/REPLICA/fix_pimd_nvt.cpp +++ b/src/REPLICA/fix_pimd_nvt.cpp @@ -29,6 +29,7 @@ #include "error.h" #include "force.h" #include "math_const.h" +#include "math_special.h" #include "memory.h" #include "universe.h" #include "update.h" @@ -40,6 +41,8 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; +using MathSpecial::powint; + enum { PIMD, NMPIMD, CMD }; /* ---------------------------------------------------------------------- */ @@ -234,7 +237,7 @@ void FixPIMDNVT::init() if (method == CMD || method == NMPIMD) nmpimd_init(); else - for (int i = 1; i <= atom->ntypes; i++) mass[i] = atom->mass[i] / np * fmass; + for (int i = 1; i <= atom->ntypes; i++) mass[i] = atom->mass[i] * inverse_np * fmass; if (!nhc_ready) nhc_init(); } @@ -468,8 +471,8 @@ void FixPIMDNVT::nmpimd_init() // Set up eigenvectors for non-degenerated modes for (int i = 0; i < np; i++) { - M_x2xp[0][i] = 1.0 / np; - if (np % 2 == 0) M_x2xp[np - 1][i] = 1.0 / np * pow(-1.0, i); + M_x2xp[0][i] = inverse_np; + if (np % 2 == 0) M_x2xp[np - 1][i] = inverse_np * powint(-1.0, i); } // Set up eigenvectors for degenerated modes @@ -880,8 +883,8 @@ int FixPIMDNVT::size_restart(int /*nlocal*/) double FixPIMDNVT::compute_vector(int n) { - if (n == 0) { return spring_energy; } - if (n == 1) { return t_sys; } - if (n == 2) { return virial; } + if (n == 0) return spring_energy; + if (n == 1) return t_sys; + if (n == 2) return virial; return 0.0; } From 76c879c388c32e2bc62d879c9496a77c6c27c177 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 26 Feb 2023 00:16:03 -0500 Subject: [PATCH 280/445] make sure that output variables are initialized --- src/REPLICA/fix_pimd_nvt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/REPLICA/fix_pimd_nvt.cpp b/src/REPLICA/fix_pimd_nvt.cpp index 8f34df0b83..1f2f29f35c 100644 --- a/src/REPLICA/fix_pimd_nvt.cpp +++ b/src/REPLICA/fix_pimd_nvt.cpp @@ -72,6 +72,8 @@ FixPIMDNVT::FixPIMDNVT(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) nhc_eta_dotdot = nullptr; nhc_eta_mass = nullptr; + spring_energy = t_sys = virial = 0.0; + method = PIMD; fmass = 1.0; nhc_temp = 298.15; From 2bd6cde4e822b51af6e6e4d796cffb8a8fff2f65 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 26 Feb 2023 00:19:39 -0500 Subject: [PATCH 281/445] add reference output --- .../pimd/prot-hairpin/log.25Feb23.scp.g++.8 | 2 + .../pimd/prot-hairpin/log.25Feb23.scp.g++.8.0 | 148 ++++++++++++++++++ .../pimd/prot-hairpin/log.25Feb23.scp.g++.8.1 | 146 +++++++++++++++++ .../pimd/prot-hairpin/log.25Feb23.scp.g++.8.2 | 146 +++++++++++++++++ .../pimd/prot-hairpin/log.25Feb23.scp.g++.8.3 | 146 +++++++++++++++++ .../pimd/prot-hairpin/log.25Feb23.scp.g++.8.4 | 146 +++++++++++++++++ .../pimd/prot-hairpin/log.25Feb23.scp.g++.8.5 | 146 +++++++++++++++++ .../pimd/prot-hairpin/log.25Feb23.scp.g++.8.6 | 146 +++++++++++++++++ .../pimd/prot-hairpin/log.25Feb23.scp.g++.8.7 | 146 +++++++++++++++++ 9 files changed, 1172 insertions(+) create mode 100644 examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8 create mode 100644 examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.0 create mode 100644 examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.1 create mode 100644 examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.2 create mode 100644 examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.3 create mode 100644 examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.4 create mode 100644 examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.5 create mode 100644 examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.6 create mode 100644 examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.7 diff --git a/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8 b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8 new file mode 100644 index 0000000000..14b41c14f3 --- /dev/null +++ b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8 @@ -0,0 +1,2 @@ +LAMMPS (8 Feb 2023) +Running on 8 partitions of processors diff --git a/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.0 b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.0 new file mode 100644 index 0000000000..873d412bf1 --- /dev/null +++ b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.0 @@ -0,0 +1,148 @@ +LAMMPS (8 Feb 2023) +Processor partition = 0 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 8 pad + +units real +neigh_modify delay 2 every 1 + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic + +pair_style lj/charmm/coul/long 11 12 +pair_modify mix arithmetic +kspace_style pppm 1e-4 + +read_data system.data +Reading data file ... + orthogonal box = (-23.109 -22.733 -23.141) to (22.853 22.912 22.8) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 8674 atoms + reading velocities ... + 8674 velocities + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 18 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 5869 bonds + reading angles ... + 3264 angles + reading dihedrals ... + 708 dihedrals + reading impropers ... + 38 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 9 = max # of 1-3 neighbors + 17 = max # of 1-4 neighbors + 21 = max # of special neighbors + special bonds CPU = 0.004 seconds + read_data CPU = 0.138 seconds +#read_restart system_${ibead}.rest1 +special_bonds charmm + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 + +thermo 10 +thermo_style custom step temp pe etotal f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +timestep 0.08 + +# restart 100 system_${ibead}.rest1 system_${ibead}.rest2 + +group prot id <= 256 +256 atoms in group prot +# dump 1 prot dcd 100 prot_${ibead}.dcd + +run 200 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.22071363 + grid = 20 20 20 + stencil order = 5 + estimated absolute RMS force accuracy = 0.024910591 + estimated relative force accuracy = 7.5017505e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 15625 8000 +Generated 231 of 231 mixed pair_coeff terms from arithmetic mixing rule +Fix pimd/nvt -P/(beta^2 * hbar^2) = -2.9535019e+01 (kcal/mol/A^2) + +Neighbor list info ... + update: every = 1 steps, delay = 2 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Inconsistent image flags (src/domain.cpp:815) +Per MPI rank memory allocation (min/avg/max) = 84.59 | 84.59 | 84.59 Mbytes + Step Temp PotEng TotEng espring T_ring virial + 0 306.20099 -26166.171 -18250.089 0 0 -676.31071 + 10 131.27164 -24353.129 -20959.421 307.69774 131.25651 -622.84631 + 20 173.87922 -20639.595 -16144.371 903.19698 173.85917 -146.32235 + 30 174.36894 -14805.957 -10298.072 2123.5094 174.34883 1001.9707 + 40 209.39721 -9107.42 -3693.9648 3643.8992 209.37307 2169.6179 + 50 224.56543 -4755.7551 1049.8374 5433.6153 224.53954 3077.7538 + 60 236.84365 -1848.0123 4275.0036 7420.6008 236.81634 3690.4423 + 70 251.60145 -545.63452 5958.9084 9472.1666 251.57244 3930.8483 + 80 259.97884 -310.2814 6410.8387 11592.586 259.94887 4052.0897 + 90 266.56259 -619.03771 6272.2892 13763.979 266.53186 3895.0106 + 100 277.74387 -1327.8055 5852.5862 15788.989 277.71185 3691.775 + 110 278.73044 -1998.5 5207.397 17723.605 278.69831 2838.6857 + 120 286.74106 -2688.0018 4724.9903 19437.173 286.70801 2354.3367 + 130 284.45763 -3484.7277 3869.2319 20933.859 284.42484 2037.2135 + 140 290.24681 -4412.7819 3090.8428 22113.049 290.21335 1802.8857 + 150 294.32521 -5490.1829 2118.8788 23005.855 294.29127 1927.3626 + 160 293.9109 -6586.1293 1012.2214 23597.9 293.87701 2198.3058 + 170 290.52772 -7737.8309 -226.94392 23882.219 290.49423 2454.2765 + 180 289.91516 -8766.2419 -1271.1912 23875.129 289.88174 2549.258 + 190 292.57992 -9618.0848 -2054.1432 23580.482 292.54619 2605.4823 + 200 295.4078 -10200.536 -2563.4865 23028.461 295.37374 2587.5531 +Loop time of 35.3333 on 1 procs for 200 steps with 8674 atoms + +Performance: 0.039 ns/day, 613.425 hours/ns, 5.660 timesteps/s, 49.098 katom-step/s +99.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 27.689 | 27.689 | 27.689 | 0.0 | 78.37 +Bond | 0.1312 | 0.1312 | 0.1312 | 0.0 | 0.37 +Kspace | 2.4446 | 2.4446 | 2.4446 | 0.0 | 6.92 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.12014 | 0.12014 | 0.12014 | 0.0 | 0.34 +Output | 0.0020193 | 0.0020193 | 0.0020193 | 0.0 | 0.01 +Modify | 4.886 | 4.886 | 4.886 | 0.0 | 13.83 +Other | | 0.05992 | | | 0.17 + +Nlocal: 8674 ave 8674 max 8674 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 27366 ave 27366 max 27366 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4.48585e+06 ave 4.48585e+06 max 4.48585e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4485849 +Ave neighs/atom = 517.16036 +Ave special neighs/atom = 2.2573207 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:35 diff --git a/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.1 b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.1 new file mode 100644 index 0000000000..51a69030c2 --- /dev/null +++ b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.1 @@ -0,0 +1,146 @@ +LAMMPS (8 Feb 2023) +Processor partition = 1 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 8 pad + +units real +neigh_modify delay 2 every 1 + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic + +pair_style lj/charmm/coul/long 11 12 +pair_modify mix arithmetic +kspace_style pppm 1e-4 + +read_data system.data +Reading data file ... + orthogonal box = (-23.109 -22.733 -23.141) to (22.853 22.912 22.8) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 8674 atoms + reading velocities ... + 8674 velocities + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 18 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 5869 bonds + reading angles ... + 3264 angles + reading dihedrals ... + 708 dihedrals + reading impropers ... + 38 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 9 = max # of 1-3 neighbors + 17 = max # of 1-4 neighbors + 21 = max # of special neighbors + special bonds CPU = 0.004 seconds + read_data CPU = 0.139 seconds +#read_restart system_${ibead}.rest1 +special_bonds charmm + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 + +thermo 10 +thermo_style custom step temp pe etotal f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +timestep 0.08 + +# restart 100 system_${ibead}.rest1 system_${ibead}.rest2 + +group prot id <= 256 +256 atoms in group prot +# dump 1 prot dcd 100 prot_${ibead}.dcd + +run 200 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.22071363 + grid = 20 20 20 + stencil order = 5 + estimated absolute RMS force accuracy = 0.024910591 + estimated relative force accuracy = 7.5017505e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 15625 8000 +Generated 231 of 231 mixed pair_coeff terms from arithmetic mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 2 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Inconsistent image flags (src/domain.cpp:815) +Per MPI rank memory allocation (min/avg/max) = 84.59 | 84.59 | 84.59 Mbytes + Step Temp PotEng TotEng espring T_ring virial + 0 306.20099 -26166.171 -18250.089 0 0 -676.31071 + 10 64.17217 -26206.83 -24547.814 19.798491 300.69483 -715.39964 + 20 68.220475 -26516.716 -24753.042 40.042407 319.66418 -514.11207 + 30 57.966715 -26566.219 -25067.631 92.36071 271.61761 32.199121 + 40 49.627434 -26115.147 -24832.15 156.77313 232.54181 589.56751 + 50 50.238512 -24830.72 -23531.926 251.81147 235.40517 1098.4708 + 60 56.338925 -22753.456 -21296.951 361.53524 263.99019 1897.4199 + 70 54.380851 -19964.7 -18558.815 512.1854 254.81514 2327.9231 + 80 56.718808 -16822.195 -15355.868 692.48978 265.77022 2784.4839 + 90 57.350586 -13726.44 -12243.78 926.0914 268.73058 3260.3863 + 100 57.262365 -11280.793 -9800.4136 1186.0078 268.3172 3554.7754 + 110 58.507688 -9681.3843 -8168.8105 1483.328 274.15247 3368.3688 + 120 58.690757 -9008.7198 -7491.4132 1803.3617 275.01029 2974.5497 + 130 58.623212 -9097.3273 -7581.7669 2143.6544 274.69379 2535.9822 + 140 59.453502 -9689.6967 -8152.6711 2490.8635 278.58432 1947.3155 + 150 59.231787 -10601.929 -9070.635 2837.9543 277.54542 1774.9432 + 160 58.39319 -11413.85 -9904.2362 3183.3024 273.61596 1744.3579 + 170 60.201493 -12074.462 -10518.099 3515.6508 282.08922 1744.1497 + 180 59.592955 -12415.79 -10875.16 3827.6991 279.23776 1935.0884 + 190 59.698333 -12625.161 -11081.806 4120.4275 279.73154 1962.5444 + 200 59.87495 -12794.677 -11246.756 4387.202 280.55912 1854.7836 +Loop time of 35.3334 on 1 procs for 200 steps with 8674 atoms + +Performance: 0.039 ns/day, 613.427 hours/ns, 5.660 timesteps/s, 49.098 katom-step/s +97.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 27.948 | 27.948 | 27.948 | 0.0 | 79.10 +Bond | 0.12842 | 0.12842 | 0.12842 | 0.0 | 0.36 +Kspace | 2.4577 | 2.4577 | 2.4577 | 0.0 | 6.96 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.11986 | 0.11986 | 0.11986 | 0.0 | 0.34 +Output | 0.0021166 | 0.0021166 | 0.0021166 | 0.0 | 0.01 +Modify | 4.617 | 4.617 | 4.617 | 0.0 | 13.07 +Other | | 0.06042 | | | 0.17 + +Nlocal: 8674 ave 8674 max 8674 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 27366 ave 27366 max 27366 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4.48585e+06 ave 4.48585e+06 max 4.48585e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4485849 +Ave neighs/atom = 517.16036 +Ave special neighs/atom = 2.2573207 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:35 diff --git a/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.2 b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.2 new file mode 100644 index 0000000000..03d6c04804 --- /dev/null +++ b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.2 @@ -0,0 +1,146 @@ +LAMMPS (8 Feb 2023) +Processor partition = 2 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 8 pad + +units real +neigh_modify delay 2 every 1 + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic + +pair_style lj/charmm/coul/long 11 12 +pair_modify mix arithmetic +kspace_style pppm 1e-4 + +read_data system.data +Reading data file ... + orthogonal box = (-23.109 -22.733 -23.141) to (22.853 22.912 22.8) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 8674 atoms + reading velocities ... + 8674 velocities + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 18 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 5869 bonds + reading angles ... + 3264 angles + reading dihedrals ... + 708 dihedrals + reading impropers ... + 38 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 9 = max # of 1-3 neighbors + 17 = max # of 1-4 neighbors + 21 = max # of special neighbors + special bonds CPU = 0.004 seconds + read_data CPU = 0.139 seconds +#read_restart system_${ibead}.rest1 +special_bonds charmm + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 + +thermo 10 +thermo_style custom step temp pe etotal f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +timestep 0.08 + +# restart 100 system_${ibead}.rest1 system_${ibead}.rest2 + +group prot id <= 256 +256 atoms in group prot +# dump 1 prot dcd 100 prot_${ibead}.dcd + +run 200 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.22071363 + grid = 20 20 20 + stencil order = 5 + estimated absolute RMS force accuracy = 0.024910591 + estimated relative force accuracy = 7.5017505e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 15625 8000 +Generated 231 of 231 mixed pair_coeff terms from arithmetic mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 2 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Inconsistent image flags (src/domain.cpp:815) +Per MPI rank memory allocation (min/avg/max) = 84.59 | 84.59 | 84.59 Mbytes + Step Temp PotEng TotEng espring T_ring virial + 0 306.20099 -26166.171 -18250.089 0 0 -676.31071 + 10 64.17182 -26152.123 -24493.117 2.6867435 300.69318 -871.30328 + 20 68.223719 -26376.797 -24613.039 8.6943178 319.67938 -734.6258 + 30 57.962426 -26437.775 -24939.297 20.196606 271.59751 -442.97527 + 40 49.527052 -26345.74 -25065.339 36.486067 232.07145 -109.57718 + 50 50.00573 -26013.669 -24720.893 64.828577 234.31441 90.23132 + 60 56.176816 -25453.583 -24001.268 104.35099 263.23058 350.85294 + 70 54.335616 -24764.408 -23359.692 168.84911 254.60318 370.58559 + 80 56.386432 -24068.851 -22611.117 255.96556 264.21279 359.85013 + 90 57.394261 -23487.859 -22004.071 377.57122 268.93523 350.57006 + 100 56.595909 -23070.567 -21607.418 531.24569 265.19435 380.72648 + 110 56.785626 -22692.803 -21224.749 716.4839 266.08332 119.53289 + 120 57.068588 -22142.475 -20667.105 936.74977 267.4092 53.114976 + 130 57.211273 -21289.908 -19810.849 1184.7712 268.0778 165.3536 + 140 58.110208 -20136.125 -18633.827 1461.5509 272.28998 268.40059 + 150 57.980844 -18752.784 -17253.831 1762.042 271.68381 732.81511 + 160 58.120526 -17237.742 -15735.177 2083.496 272.33833 1353.819 + 170 58.192327 -15808.132 -14303.711 2418.0799 272.67477 1963.8895 + 180 59.169638 -14676.59 -13146.903 2755.6611 277.2542 2483.717 + 190 60.190674 -13997.692 -12441.609 3096.3553 282.03852 2865.7644 + 200 60.619191 -13706.35 -12139.188 3426.2396 284.04645 2830.1842 +Loop time of 35.3333 on 1 procs for 200 steps with 8674 atoms + +Performance: 0.039 ns/day, 613.425 hours/ns, 5.660 timesteps/s, 49.098 katom-step/s +99.2% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 27.558 | 27.558 | 27.558 | 0.0 | 77.99 +Bond | 0.1313 | 0.1313 | 0.1313 | 0.0 | 0.37 +Kspace | 2.4344 | 2.4344 | 2.4344 | 0.0 | 6.89 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.11913 | 0.11913 | 0.11913 | 0.0 | 0.34 +Output | 0.0022372 | 0.0022372 | 0.0022372 | 0.0 | 0.01 +Modify | 5.0291 | 5.0291 | 5.0291 | 0.0 | 14.23 +Other | | 0.05932 | | | 0.17 + +Nlocal: 8674 ave 8674 max 8674 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 27366 ave 27366 max 27366 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4.48585e+06 ave 4.48585e+06 max 4.48585e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4485849 +Ave neighs/atom = 517.16036 +Ave special neighs/atom = 2.2573207 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:35 diff --git a/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.3 b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.3 new file mode 100644 index 0000000000..5e15398b16 --- /dev/null +++ b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.3 @@ -0,0 +1,146 @@ +LAMMPS (8 Feb 2023) +Processor partition = 3 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 8 pad + +units real +neigh_modify delay 2 every 1 + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic + +pair_style lj/charmm/coul/long 11 12 +pair_modify mix arithmetic +kspace_style pppm 1e-4 + +read_data system.data +Reading data file ... + orthogonal box = (-23.109 -22.733 -23.141) to (22.853 22.912 22.8) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 8674 atoms + reading velocities ... + 8674 velocities + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 18 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 5869 bonds + reading angles ... + 3264 angles + reading dihedrals ... + 708 dihedrals + reading impropers ... + 38 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 9 = max # of 1-3 neighbors + 17 = max # of 1-4 neighbors + 21 = max # of special neighbors + special bonds CPU = 0.015 seconds + read_data CPU = 0.153 seconds +#read_restart system_${ibead}.rest1 +special_bonds charmm + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 + +thermo 10 +thermo_style custom step temp pe etotal f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +timestep 0.08 + +# restart 100 system_${ibead}.rest1 system_${ibead}.rest2 + +group prot id <= 256 +256 atoms in group prot +# dump 1 prot dcd 100 prot_${ibead}.dcd + +run 200 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.22071363 + grid = 20 20 20 + stencil order = 5 + estimated absolute RMS force accuracy = 0.024910591 + estimated relative force accuracy = 7.5017505e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 15625 8000 +Generated 231 of 231 mixed pair_coeff terms from arithmetic mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 2 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Inconsistent image flags (src/domain.cpp:815) +Per MPI rank memory allocation (min/avg/max) = 84.59 | 84.59 | 84.59 Mbytes + Step Temp PotEng TotEng espring T_ring virial + 0 306.20099 -26166.171 -18250.089 0 0 -676.31071 + 10 23.892089 -26194.747 -25577.075 6.0651132 382.22935 -806.80519 + 20 27.051257 -26510.555 -25811.21 19.798054 432.77021 -722.7628 + 30 27.053581 -26558.283 -25858.879 46.409761 432.8074 -314.77439 + 40 19.1336 -26301.271 -25806.618 80.715535 306.1023 33.240778 + 50 19.277021 -25564.199 -25065.839 122.0411 308.39678 420.32166 + 60 20.762569 -24490.516 -23953.751 171.68786 332.16281 922.0134 + 70 18.895283 -23277.775 -22789.283 228.13302 302.28967 1340.4892 + 80 20.103678 -22119.758 -21600.026 293.69148 321.62176 1692.277 + 90 18.733051 -21236.09 -20751.793 371.14173 299.69426 2111.5887 + 100 18.287299 -20684.674 -20211.9 458.53118 292.56305 2434.0418 + 110 18.012563 -20345.727 -19880.056 560.10663 288.16778 2560.064 + 120 17.92092 -19998.225 -19534.923 676.3247 286.70167 2752.7643 + 130 17.494577 -19524.549 -19072.269 808.35795 279.88096 3081.7784 + 140 17.122298 -18815.761 -18373.106 957.14076 273.92518 3209.6451 + 150 17.447826 -17981.659 -17530.588 1123.5613 279.13303 3627.9284 + 160 17.6202 -17066.393 -16610.866 1310.1872 281.8907 4230.0427 + 170 17.370561 -16269.055 -15819.981 1507.5411 277.89693 4602.925 + 180 17.444401 -15692.511 -15241.529 1720.5033 279.07824 5000.4081 + 190 17.587192 -15476.239 -15021.565 1938.8703 281.36263 5063.6159 + 200 18.000638 -15470.948 -15005.586 2164.2187 287.977 4707.0585 +Loop time of 35.3335 on 1 procs for 200 steps with 8674 atoms + +Performance: 0.039 ns/day, 613.428 hours/ns, 5.660 timesteps/s, 49.098 katom-step/s +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 27.094 | 27.094 | 27.094 | 0.0 | 76.68 +Bond | 0.1276 | 0.1276 | 0.1276 | 0.0 | 0.36 +Kspace | 2.3873 | 2.3873 | 2.3873 | 0.0 | 6.76 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.11312 | 0.11312 | 0.11312 | 0.0 | 0.32 +Output | 0.0020657 | 0.0020657 | 0.0020657 | 0.0 | 0.01 +Modify | 5.5507 | 5.5507 | 5.5507 | 0.0 | 15.71 +Other | | 0.05892 | | | 0.17 + +Nlocal: 8674 ave 8674 max 8674 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 27366 ave 27366 max 27366 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4.48585e+06 ave 4.48585e+06 max 4.48585e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4485849 +Ave neighs/atom = 517.16036 +Ave special neighs/atom = 2.2573207 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:35 diff --git a/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.4 b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.4 new file mode 100644 index 0000000000..997a4c1acd --- /dev/null +++ b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.4 @@ -0,0 +1,146 @@ +LAMMPS (8 Feb 2023) +Processor partition = 4 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 8 pad + +units real +neigh_modify delay 2 every 1 + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic + +pair_style lj/charmm/coul/long 11 12 +pair_modify mix arithmetic +kspace_style pppm 1e-4 + +read_data system.data +Reading data file ... + orthogonal box = (-23.109 -22.733 -23.141) to (22.853 22.912 22.8) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 8674 atoms + reading velocities ... + 8674 velocities + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 18 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 5869 bonds + reading angles ... + 3264 angles + reading dihedrals ... + 708 dihedrals + reading impropers ... + 38 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 9 = max # of 1-3 neighbors + 17 = max # of 1-4 neighbors + 21 = max # of special neighbors + special bonds CPU = 0.004 seconds + read_data CPU = 0.138 seconds +#read_restart system_${ibead}.rest1 +special_bonds charmm + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 + +thermo 10 +thermo_style custom step temp pe etotal f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +timestep 0.08 + +# restart 100 system_${ibead}.rest1 system_${ibead}.rest2 + +group prot id <= 256 +256 atoms in group prot +# dump 1 prot dcd 100 prot_${ibead}.dcd + +run 200 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.22071363 + grid = 20 20 20 + stencil order = 5 + estimated absolute RMS force accuracy = 0.024910591 + estimated relative force accuracy = 7.5017505e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 15625 8000 +Generated 231 of 231 mixed pair_coeff terms from arithmetic mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 2 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Inconsistent image flags (src/domain.cpp:815) +Per MPI rank memory allocation (min/avg/max) = 84.59 | 84.59 | 84.59 Mbytes + Step Temp PotEng TotEng espring T_ring virial + 0 306.20099 -26166.171 -18250.089 0 0 -676.31071 + 10 23.892095 -26119.899 -25502.227 4.2771563 382.22944 -813.96512 + 20 27.051103 -26287.602 -25588.262 15.607084 432.76775 -745.77933 + 30 27.042026 -26290.973 -25591.867 35.550734 432.62253 -326.69805 + 40 19.133546 -26173.654 -25679.002 70.11544 306.10144 -11.324153 + 50 19.302675 -25883.61 -25384.586 121.68648 308.8072 290.09295 + 60 20.704866 -25425.468 -24890.194 201.50535 331.23967 650.74045 + 70 18.95281 -24809.575 -24319.596 321.84847 303.21 967.87686 + 80 20.178541 -24115.258 -23593.591 491.86818 322.81943 1230.7506 + 90 18.755289 -23448.841 -22963.969 726.07287 300.05003 1426.7932 + 100 18.159265 -22868.418 -22398.954 1013.598 290.51475 1609.3405 + 110 17.922985 -22283.38 -21820.025 1355.5366 286.7347 1483.5981 + 120 17.617358 -21583.469 -21128.015 1747.6539 281.84524 1444.208 + 130 17.233206 -20748.165 -20302.643 2173.0115 275.6995 1597.8139 + 140 17.06066 -19726.034 -19284.972 2629.6918 272.9391 1704.3744 + 150 17.004216 -18648.306 -18208.703 3099.2098 272.0361 2025.6026 + 160 17.414218 -17588.638 -17138.435 3580.8838 278.59537 2747.2565 + 170 17.295959 -16669.449 -16222.304 4058.5589 276.70344 3432.2976 + 180 17.706054 -15991.367 -15533.62 4524.6837 283.26421 4008.5413 + 190 17.649786 -15623.329 -15167.037 4968.3076 282.36402 4251.4209 + 200 17.914982 -15484.434 -15021.286 5382.5961 286.60667 4187.5146 +Loop time of 35.3335 on 1 procs for 200 steps with 8674 atoms + +Performance: 0.039 ns/day, 613.428 hours/ns, 5.660 timesteps/s, 49.098 katom-step/s +98.1% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 27.644 | 27.644 | 27.644 | 0.0 | 78.24 +Bond | 0.1292 | 0.1292 | 0.1292 | 0.0 | 0.37 +Kspace | 2.4108 | 2.4108 | 2.4108 | 0.0 | 6.82 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.12913 | 0.12913 | 0.12913 | 0.0 | 0.37 +Output | 0.0021704 | 0.0021704 | 0.0021704 | 0.0 | 0.01 +Modify | 4.959 | 4.959 | 4.959 | 0.0 | 14.03 +Other | | 0.05951 | | | 0.17 + +Nlocal: 8674 ave 8674 max 8674 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 27366 ave 27366 max 27366 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4.48585e+06 ave 4.48585e+06 max 4.48585e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4485849 +Ave neighs/atom = 517.16036 +Ave special neighs/atom = 2.2573207 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:35 diff --git a/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.5 b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.5 new file mode 100644 index 0000000000..840f0e9011 --- /dev/null +++ b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.5 @@ -0,0 +1,146 @@ +LAMMPS (8 Feb 2023) +Processor partition = 5 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 8 pad + +units real +neigh_modify delay 2 every 1 + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic + +pair_style lj/charmm/coul/long 11 12 +pair_modify mix arithmetic +kspace_style pppm 1e-4 + +read_data system.data +Reading data file ... + orthogonal box = (-23.109 -22.733 -23.141) to (22.853 22.912 22.8) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 8674 atoms + reading velocities ... + 8674 velocities + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 18 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 5869 bonds + reading angles ... + 3264 angles + reading dihedrals ... + 708 dihedrals + reading impropers ... + 38 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 9 = max # of 1-3 neighbors + 17 = max # of 1-4 neighbors + 21 = max # of special neighbors + special bonds CPU = 0.004 seconds + read_data CPU = 0.139 seconds +#read_restart system_${ibead}.rest1 +special_bonds charmm + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 + +thermo 10 +thermo_style custom step temp pe etotal f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +timestep 0.08 + +# restart 100 system_${ibead}.rest1 system_${ibead}.rest2 + +group prot id <= 256 +256 atoms in group prot +# dump 1 prot dcd 100 prot_${ibead}.dcd + +run 200 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.22071363 + grid = 20 20 20 + stencil order = 5 + estimated absolute RMS force accuracy = 0.024910591 + estimated relative force accuracy = 7.5017505e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 15625 8000 +Generated 231 of 231 mixed pair_coeff terms from arithmetic mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 2 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Inconsistent image flags (src/domain.cpp:815) +Per MPI rank memory allocation (min/avg/max) = 84.59 | 84.59 | 84.59 Mbytes + Step Temp PotEng TotEng espring T_ring virial + 0 306.20099 -26166.171 -18250.089 0 0 -676.31071 + 10 14.020019 -26051.605 -25689.152 7.3596437 382.89455 -789.8534 + 20 15.752865 -25975.95 -25568.698 25.331469 430.21956 -594.00538 + 30 17.181375 -25873.108 -25428.926 57.426817 469.23297 -181.78718 + 40 11.772036 -25785.82 -25481.483 101.0172 321.50089 318.12089 + 50 11.907234 -25813.038 -25505.205 157.46734 325.19321 630.72419 + 60 12.407378 -25738.74 -25417.978 232.72881 338.85245 1042.2805 + 70 11.569463 -25485.646 -25186.546 331.59654 315.9685 1219.4474 + 80 12.423569 -25007.927 -24686.746 455.84829 339.29462 1585.4189 + 90 11.222078 -24360.128 -24070.009 610.51406 306.48124 1770.0165 + 100 10.746584 -23649.481 -23371.654 794.88729 293.49524 1751.0868 + 110 10.688659 -22906.499 -22630.17 1011.4935 291.91326 1164.4167 + 120 10.413653 -22131.25 -21862.03 1258.7802 284.40268 494.75639 + 130 10.207431 -21354.621 -21090.733 1532.012 278.77066 -85.33744 + 140 9.9484212 -20506.422 -20249.23 1833.2006 271.69695 -582.25635 + 150 9.8592991 -19641.288 -19386.399 2150.5002 269.26298 -860.97106 + 160 9.9476229 -18750.371 -18493.199 2484.32 271.67515 -781.67257 + 170 9.9050652 -17855.648 -17599.576 2822.3305 270.51287 -564.01235 + 180 9.9461836 -17049.565 -16792.431 3164.947 271.63584 -414.44888 + 190 9.9650455 -16346.398 -16088.776 3500.8641 272.15097 -250.509 + 200 10.114117 -15721.822 -15460.346 3824.3372 276.22219 -539.50977 +Loop time of 35.3336 on 1 procs for 200 steps with 8674 atoms + +Performance: 0.039 ns/day, 613.431 hours/ns, 5.660 timesteps/s, 49.098 katom-step/s +98.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 27.569 | 27.569 | 27.569 | 0.0 | 78.03 +Bond | 0.13166 | 0.13166 | 0.13166 | 0.0 | 0.37 +Kspace | 2.4398 | 2.4398 | 2.4398 | 0.0 | 6.91 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.12114 | 0.12114 | 0.12114 | 0.0 | 0.34 +Output | 0.0022707 | 0.0022707 | 0.0022707 | 0.0 | 0.01 +Modify | 5.0103 | 5.0103 | 5.0103 | 0.0 | 14.18 +Other | | 0.05914 | | | 0.17 + +Nlocal: 8674 ave 8674 max 8674 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 27366 ave 27366 max 27366 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4.48585e+06 ave 4.48585e+06 max 4.48585e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4485849 +Ave neighs/atom = 517.16036 +Ave special neighs/atom = 2.2573207 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:35 diff --git a/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.6 b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.6 new file mode 100644 index 0000000000..a98694339b --- /dev/null +++ b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.6 @@ -0,0 +1,146 @@ +LAMMPS (8 Feb 2023) +Processor partition = 6 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 8 pad + +units real +neigh_modify delay 2 every 1 + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic + +pair_style lj/charmm/coul/long 11 12 +pair_modify mix arithmetic +kspace_style pppm 1e-4 + +read_data system.data +Reading data file ... + orthogonal box = (-23.109 -22.733 -23.141) to (22.853 22.912 22.8) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 8674 atoms + reading velocities ... + 8674 velocities + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 18 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 5869 bonds + reading angles ... + 3264 angles + reading dihedrals ... + 708 dihedrals + reading impropers ... + 38 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 9 = max # of 1-3 neighbors + 17 = max # of 1-4 neighbors + 21 = max # of special neighbors + special bonds CPU = 0.004 seconds + read_data CPU = 0.139 seconds +#read_restart system_${ibead}.rest1 +special_bonds charmm + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 + +thermo 10 +thermo_style custom step temp pe etotal f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +timestep 0.08 + +# restart 100 system_${ibead}.rest1 system_${ibead}.rest2 + +group prot id <= 256 +256 atoms in group prot +# dump 1 prot dcd 100 prot_${ibead}.dcd + +run 200 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.22071363 + grid = 20 20 20 + stencil order = 5 + estimated absolute RMS force accuracy = 0.024910591 + estimated relative force accuracy = 7.5017505e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 15625 8000 +Generated 231 of 231 mixed pair_coeff terms from arithmetic mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 2 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Inconsistent image flags (src/domain.cpp:815) +Per MPI rank memory allocation (min/avg/max) = 84.59 | 84.59 | 84.59 Mbytes + Step Temp PotEng TotEng espring T_ring virial + 0 306.20099 -26166.171 -18250.089 0 0 -676.31071 + 10 14.02002 -25861.333 -25498.879 45.268744 382.8946 -722.47561 + 20 15.752886 -25289.441 -24882.188 135.42322 430.22014 -482.48877 + 30 17.181691 -24659.071 -24214.881 316.76011 469.24159 115.80651 + 40 11.76983 -24165.345 -23861.065 544.21259 321.44065 710.32531 + 50 11.904289 -24034.29 -23726.534 812.12301 325.1128 1057.7309 + 60 12.409559 -23964.986 -23644.167 1115.614 338.91201 1490.6948 + 70 11.53241 -23718.204 -23420.061 1442.0767 314.95657 1654.3805 + 80 12.377693 -23123.366 -22803.371 1794.1167 338.04173 2019.537 + 90 11.21341 -22129.26 -21839.365 2172.5974 306.24451 2037.5349 + 100 10.778526 -20922.126 -20643.474 2553.3173 294.36759 1922.6067 + 110 10.656113 -19666.579 -19391.091 2944.1884 291.02442 1115.4533 + 120 10.374573 -18508.305 -18240.096 3331.7564 283.3354 401.15223 + 130 10.057534 -17613.953 -17353.939 3714.254 274.67688 -248.49945 + 140 9.7972276 -16953.726 -16700.443 4076.4386 267.56777 -841.79062 + 150 9.8266474 -16502.516 -16248.472 4422.7241 268.37124 -1155.8854 + 160 9.9655308 -16127.142 -15869.507 4748.4514 272.16422 -1094.1994 + 170 9.9292831 -15818.923 -15562.225 5045.9331 271.17428 -884.00102 + 180 10.157102 -15473.205 -15210.618 5313.5511 277.39613 -553.25499 + 190 10.068063 -15095.751 -14835.466 5545.0144 274.96443 -237.36247 + 200 10.155151 -14754.017 -14491.48 5742.1288 277.34285 -332.89648 +Loop time of 35.3338 on 1 procs for 200 steps with 8674 atoms + +Performance: 0.039 ns/day, 613.434 hours/ns, 5.660 timesteps/s, 49.098 katom-step/s +97.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 27.875 | 27.875 | 27.875 | 0.0 | 78.89 +Bond | 0.12707 | 0.12707 | 0.12707 | 0.0 | 0.36 +Kspace | 2.4348 | 2.4348 | 2.4348 | 0.0 | 6.89 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.11906 | 0.11906 | 0.11906 | 0.0 | 0.34 +Output | 0.0021503 | 0.0021503 | 0.0021503 | 0.0 | 0.01 +Modify | 4.7164 | 4.7164 | 4.7164 | 0.0 | 13.35 +Other | | 0.05955 | | | 0.17 + +Nlocal: 8674 ave 8674 max 8674 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 27366 ave 27366 max 27366 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4.48585e+06 ave 4.48585e+06 max 4.48585e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4485849 +Ave neighs/atom = 517.16036 +Ave special neighs/atom = 2.2573207 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:35 diff --git a/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.7 b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.7 new file mode 100644 index 0000000000..55f561c6ec --- /dev/null +++ b/examples/PACKAGES/pimd/prot-hairpin/log.25Feb23.scp.g++.8.7 @@ -0,0 +1,146 @@ +LAMMPS (8 Feb 2023) +Processor partition = 7 +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable ibead uloop 8 pad + +units real +neigh_modify delay 2 every 1 + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic + +pair_style lj/charmm/coul/long 11 12 +pair_modify mix arithmetic +kspace_style pppm 1e-4 + +read_data system.data +Reading data file ... + orthogonal box = (-23.109 -22.733 -23.141) to (22.853 22.912 22.8) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 8674 atoms + reading velocities ... + 8674 velocities + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 18 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 5869 bonds + reading angles ... + 3264 angles + reading dihedrals ... + 708 dihedrals + reading impropers ... + 38 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 9 = max # of 1-3 neighbors + 17 = max # of 1-4 neighbors + 21 = max # of special neighbors + special bonds CPU = 0.004 seconds + read_data CPU = 0.138 seconds +#read_restart system_${ibead}.rest1 +special_bonds charmm + +fix 1 all pimd/nvt method nmpimd fmass 1.0 temp 300.0 nhc 4 sp 2.0 + +thermo 10 +thermo_style custom step temp pe etotal f_1[1] f_1[2] f_1[3] +thermo_modify colname f_1[1] espring colname f_1[2] T_ring colname f_1[3] virial +timestep 0.08 + +# restart 100 system_${ibead}.rest1 system_${ibead}.rest2 + +group prot id <= 256 +256 atoms in group prot +# dump 1 prot dcd 100 prot_${ibead}.dcd + +run 200 +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.22071363 + grid = 20 20 20 + stencil order = 5 + estimated absolute RMS force accuracy = 0.024910591 + estimated relative force accuracy = 7.5017505e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 15625 8000 +Generated 231 of 231 mixed pair_coeff terms from arithmetic mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 2 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +WARNING: Inconsistent image flags (src/domain.cpp:815) +Per MPI rank memory allocation (min/avg/max) = 84.59 | 84.59 | 84.59 Mbytes + Step Temp PotEng TotEng espring T_ring virial + 0 306.20099 -26166.171 -18250.089 0 0 -676.31071 + 10 11.858328 -24949.912 -24643.343 11.21746 379.42274 -589.42772 + 20 13.313433 -22332.782 -21988.595 25.891404 425.98075 -189.42618 + 30 14.492332 -18605.094 -18230.43 60.87232 463.70115 853.22726 + 40 10.100576 -15158.156 -14897.03 103.87947 323.18115 1870.5664 + 50 10.437976 -12976.762 -12706.913 161.50852 333.97672 2649.3283 + 60 10.544993 -11868.561 -11595.946 225.58416 337.40089 3264.9267 + 70 9.756396 -11851.23 -11599.002 303.66274 312.16868 3549.9084 + 80 10.642372 -12316.225 -12041.092 392.92619 340.51663 3853.3301 + 90 9.3834726 -12853.33 -12610.744 501.5373 300.2365 3943.7218 + 100 8.9858656 -13254.517 -13022.21 619.67563 287.51455 3852.5038 + 110 8.9674385 -13407.55 -13175.719 752.87088 286.92495 3047.0516 + 120 8.7200626 -13430.184 -13204.748 897.34682 279.00983 2614.6547 + 130 8.4404226 -13413.462 -13195.256 1051.1979 270.06239 2361.7563 + 140 8.1867868 -13405.663 -13194.013 1215.2723 261.94697 2042.4666 + 150 8.26024 -13427.11 -13213.561 1389.0864 264.29721 2179.5219 + 160 8.2139102 -13403.956 -13191.605 1573.9454 262.81482 2489.6486 + 170 8.2258918 -13367.291 -13154.631 1768.2198 263.19819 2793.6911 + 180 8.4548603 -13245.62 -13027.04 1968.4468 270.52434 3070.2942 + 190 8.4589955 -12920.954 -12702.268 2174.1321 270.65665 3360.4993 + 200 8.537811 -12448.973 -12228.248 2382.746 273.17846 3370.2077 +Loop time of 35.3334 on 1 procs for 200 steps with 8674 atoms + +Performance: 0.039 ns/day, 613.428 hours/ns, 5.660 timesteps/s, 49.098 katom-step/s +99.1% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 27.709 | 27.709 | 27.709 | 0.0 | 78.42 +Bond | 0.13165 | 0.13165 | 0.13165 | 0.0 | 0.37 +Kspace | 2.4416 | 2.4416 | 2.4416 | 0.0 | 6.91 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.12826 | 0.12826 | 0.12826 | 0.0 | 0.36 +Output | 0.002116 | 0.002116 | 0.002116 | 0.0 | 0.01 +Modify | 4.863 | 4.863 | 4.863 | 0.0 | 13.76 +Other | | 0.05754 | | | 0.16 + +Nlocal: 8674 ave 8674 max 8674 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 27366 ave 27366 max 27366 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4.48585e+06 ave 4.48585e+06 max 4.48585e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4485849 +Ave neighs/atom = 517.16036 +Ave special neighs/atom = 2.2573207 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:35 From 0b5acdca51fe8f1de48914ee0a6fd6831ff49fe4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 26 Feb 2023 13:47:11 -0500 Subject: [PATCH 282/445] convert hard error about invalid atom masses from EAM potentials to warning --- src/atom.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/atom.cpp b/src/atom.cpp index 32285758c0..610ac809fe 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -1914,11 +1914,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; } From 8368b78f23d25ba6643684c8fd8d11aea0501bc0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 26 Feb 2023 13:52:31 -0500 Subject: [PATCH 283/445] document the change in mass handling --- doc/src/pair_eam.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/src/pair_eam.rst b/doc/src/pair_eam.rst index 27347b77f0..654f49c166 100644 --- a/doc/src/pair_eam.rst +++ b/doc/src/pair_eam.rst @@ -116,11 +116,12 @@ are parameterized in terms of LAMMPS :doc:`metal units `. .. note:: - Note that unlike for other potentials, cutoffs for EAM - potentials are not set in the pair_style or pair_coeff command; they - are specified in the EAM potential files themselves. Likewise, the - EAM potential files list atomic masses; thus you do not need to use - the :doc:`mass ` command to specify them. + Note that unlike for other potentials, cutoffs for EAM potentials are not + set in the pair_style or pair_coeff command; they are specified in the EAM + potential files themselves. Likewise, valid EAM potential files usually + contain atomic masses; thus you may not need to use the :doc:`mass ` + command to specify them, unless the potential file uses a dummy value (e.g. + 0.0). LAMMPS will print a warning, if this is the case. There are web sites that distribute and document EAM potentials stored in DYNAMO or other formats: From 095f1d328e15993cff962163a1be5371ef5e5ae0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 Feb 2023 12:05:14 -0500 Subject: [PATCH 284/445] make non-polymorph functions and all data members protected. --- src/REPLICA/fix_pimd_nvt.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/REPLICA/fix_pimd_nvt.h b/src/REPLICA/fix_pimd_nvt.h index 6f1321bbda..2cd1397562 100644 --- a/src/REPLICA/fix_pimd_nvt.h +++ b/src/REPLICA/fix_pimd_nvt.h @@ -52,6 +52,8 @@ class FixPIMDNVT : public Fix { int pack_forward_comm(int, int *, double *, int, int *) override; void unpack_forward_comm(int, int, double *) override; + protected: + int method; int np; double inverse_np; From 83f936f31b7570618d7ca47cc0c70934ebb39671 Mon Sep 17 00:00:00 2001 From: Aidan Thompson Date: Mon, 27 Feb 2023 11:00:11 -0700 Subject: [PATCH 285/445] Update fix_alchemy.rst --- doc/src/fix_alchemy.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/src/fix_alchemy.rst b/doc/src/fix_alchemy.rst index 7a5ee71021..4f3acc62bc 100644 --- a/doc/src/fix_alchemy.rst +++ b/doc/src/fix_alchemy.rst @@ -81,15 +81,16 @@ This fix stores a global scalar (the current value of :math:`\lambda_p`) and a global vector or length 3 which contains the potential energy of the first partition, the second partition and the combined value, respectively. The global scalar is unitless and "intensive", the vector -is in :doc:`energy units ` and "extensive". This values can be +is in :doc:`energy units ` and "extensive". These values can be used by any command that uses a global value from a fix as input. See the :doc:`Howto output ` doc page for an overview of LAMMPS output options. The value of :math:`\lambda_p` is influenced by the *start/stop* keywords of the :doc:`run ` command. Without them it will be ramped -linearly from 1.0 to 0.0 or 0.0 to 1.0 during the steps of a run, with -*start/stop* keywords the ramp us from the *start* time step to the +linearly from 1.0 to 0.0 (partition 1) and 0.0 to 1.0 (partition 2) +during the steps of a run, with +*start/stop* keywords the ramp is from the *start* time step to the *stop* timestep. This allows to break down a simulation over multiple *run* commands or to continue transparently from a restart. From 446913f2f347083c4394bd613382dad883195784 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 27 Feb 2023 16:01:17 -0500 Subject: [PATCH 286/445] make ramp more flexible by defining lambda through a variable --- doc/src/fix_alchemy.rst | 45 +++++++++++-------- examples/PACKAGES/alchemy/in.alloy | 8 +++- examples/PACKAGES/alchemy/in.twowater | 8 +++- .../alchemy/log.25Feb23.alloy.g++.4.0 | 12 +++-- .../alchemy/log.25Feb23.alloy.g++.4.1 | 10 +++-- .../alchemy/log.25Feb23.twowater.g++.4.0 | 36 ++++++++------- .../alchemy/log.25Feb23.twowater.g++.4.1 | 36 ++++++++------- src/REPLICA/fix_alchemy.cpp | 38 ++++++++++------ src/REPLICA/fix_alchemy.h | 5 ++- 9 files changed, 122 insertions(+), 76 deletions(-) diff --git a/doc/src/fix_alchemy.rst b/doc/src/fix_alchemy.rst index 4f3acc62bc..2ff137917b 100644 --- a/doc/src/fix_alchemy.rst +++ b/doc/src/fix_alchemy.rst @@ -8,17 +8,18 @@ Syntax .. parsed-literal:: - fix ID group-ID alchemy + fix ID group-ID alchemy v_name * ID, group-ID are documented in :doc:`fix ` command * alchemy = style name of this fix command +* v_name = variable with name that determines the :math:`\lambda_p` value Examples """""""" .. code-block:: LAMMPS - fix trans all alchemy + fix trans all alchemy v_ramp Description """"""""""" @@ -30,14 +31,17 @@ simulation between two topologies (i.e. the same number and positions of atoms, but differences in atom parameters like type, charge, bonds, angles and so on). For this a :ref:`multi-partition run ` is required with exactly two partitions. During the MD run, the fix will -will determine a factor :math:`\lambda_p` that will be linearly ramped -*down* from 1.0 to 0.0 for the *first* partition (*p=0*) and ramped *up* -from 0.0 to 1.0 for the *second* partition (*p=1*). The forces used for -the propagation of the atoms will be the sum of the forces of the two -systems combined and scaled with their respective :math:`\lambda_p` -factor. This allows to perform transformations that are not easily -possible with :doc:`pair style hybrid/scaled `, :doc:`fix -adapt ` or :doc:`fix adapt/fep `. +will determine a factor, :math:`\lambda_p`, for each partition *p* that +will be taken from an equal style or equivalent :doc:`variable +`. Typically, this variable would be chose to linearly ramp +*down* from 1.0 to 0.0 for the *first* partition (*p=0*) and linearly +ramp *up* from 0.0 to 1.0 for the *second* partition (*p=1*). The +forces used for the propagation of the atoms will be the sum of the +forces of the two systems combined and scaled with their respective +:math:`\lambda_p` factor. This allows to perform transformations that +are not easily possible with :doc:`pair style hybrid/scaled +`, :doc:`fix adapt ` or :doc:`fix adapt/fep +`. Due to the specifics of the implementation, the initial geometry and dimensions of the system must be exactly the same and the fix will @@ -56,6 +60,8 @@ copper/aluminum bronze. .. code-block:: LAMMPS + variable name world pure alloy + create_box 2 box create_atoms 1 box pair_style eam/alloy @@ -66,6 +72,15 @@ copper/aluminum bronze. if "${name} == alloy" then & "set type 1 type/fraction 2 0.05 6745234" + # define ramp variable to combine the two different partitions + if "${name} == pure" then & + "variable ramp equal ramp(1.0,0.0)" & + else & + "variable ramp equal ramp(0.0,1.0)" + + fix 2 all alchemy v_ramp + + The ``examples/PACKAGES/alchemy`` folder contains complete example inputs for this command. @@ -78,7 +93,7 @@ No information about this fix is written to :doc:`binary restart files None of the :doc:`fix_modify ` options are relevant to this fix. This fix stores a global scalar (the current value of :math:`\lambda_p`) -and a global vector or length 3 which contains the potential energy of +and a global vector of length 3 which contains the potential energy of the first partition, the second partition and the combined value, respectively. The global scalar is unitless and "intensive", the vector is in :doc:`energy units ` and "extensive". These values can be @@ -86,14 +101,6 @@ used by any command that uses a global value from a fix as input. See the :doc:`Howto output ` doc page for an overview of LAMMPS output options. -The value of :math:`\lambda_p` is influenced by the *start/stop* keywords -of the :doc:`run ` command. Without them it will be ramped -linearly from 1.0 to 0.0 (partition 1) and 0.0 to 1.0 (partition 2) -during the steps of a run, with -*start/stop* keywords the ramp is from the *start* time step to the -*stop* timestep. This allows to break down a simulation over multiple -*run* commands or to continue transparently from a restart. - This fix is not invoked during :doc:`energy minimization `. Restrictions diff --git a/examples/PACKAGES/alchemy/in.alloy b/examples/PACKAGES/alchemy/in.alloy index f041157ee6..8cadcd7f39 100644 --- a/examples/PACKAGES/alchemy/in.alloy +++ b/examples/PACKAGES/alchemy/in.alloy @@ -19,9 +19,15 @@ pair_coeff * * AlCu.eam.alloy Cu Al if "${name} == alloy" then & "set type 1 type/fraction 2 0.05 6745234" +# define ramp variable to combine the two different partitions +if "${name} == pure" then & + "variable ramp equal ramp(1.0,0.0)" & +else & + "variable ramp equal ramp(0.0,1.0)" + velocity all create 5000.0 6567345 fix 1 all nvt temp 2500.0 500.0 0.002 -fix 2 all alchemy +fix 2 all alchemy v_ramp compute pressure all pressure/alchemy 2 diff --git a/examples/PACKAGES/alchemy/in.twowater b/examples/PACKAGES/alchemy/in.twowater index ae48436f5f..d39b0d9aaa 100644 --- a/examples/PACKAGES/alchemy/in.twowater +++ b/examples/PACKAGES/alchemy/in.twowater @@ -73,11 +73,17 @@ else & velocity all create 300.0 5463576 timestep 0.2 +# define ramp variable to combine the two different partitions +if "${name} == twowater" then & + "variable ramp equal ramp(1.0,0.0)" & +else & + "variable ramp equal ramp(0.0,1.0)" + # since the trajectory and forces are kept identical through fix alchemy, # we can do fix npt simulations, but we must use the "mixed" pressure fix integrate all npt temp 300 300 1.0 iso 1.0 1.0 10.0 -fix transform all alchemy +fix transform all alchemy v_ramp compute pressure all pressure/alchemy transform fix_modify integrate press pressure diff --git a/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.0 b/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.0 index 4b45cdedcf..c5538c3c3d 100644 --- a/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.0 +++ b/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.0 @@ -19,7 +19,7 @@ timestep 0.002 create_atoms 1 box Created 864 atoms using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5) - create_atoms CPU = 0.000 seconds + create_atoms CPU = 0.001 seconds displace_atoms all random 0.3 0.3 0.3 57845645 Displacing atoms ... pair_style eam/alloy @@ -29,9 +29,13 @@ Reading eam/alloy potential file AlCu.eam.alloy with DATE: 2008-10-01 # replace 5% of copper with aluminium on the second partition only if "${name} == alloy" then "set type 1 type/fraction 2 0.05 6745234" +# define ramp variable to combine the two different partitions +if "${name} == pure" then "variable ramp equal ramp(1.0,0.0)" else "variable ramp equal ramp(0.0,1.0)" +variable ramp equal ramp(1.0,0.0) + velocity all create 5000.0 6567345 fix 1 all nvt temp 2500.0 500.0 0.002 -fix 2 all alchemy +fix 2 all alchemy v_ramp compute pressure all pressure/alchemy 2 @@ -159,7 +163,7 @@ Per MPI rank memory allocation (min/avg/max) = 3.474 | 3.474 | 3.474 Mbytes 9800 520.37758 -31000.6 -2828.0252 8.0039334 -2886.0741 58.048903 0.02 -2918.4921 9900 506.49368 -32223.744 -2830.1705 8.0039334 -2886.6706 56.500132 0.01 -2920.4741 10000 507.13597 -33930.476 -2834.3236 8.0039334 -2890.8954 56.571781 0 -2924.5423 -Loop time of 19.2208 on 2 procs for 10000 steps with 864 atoms +Loop time of 17.7279 on 2 procs for 10000 steps with 864 atoms -Total wall time: 0:00:19 +Total wall time: 0:00:17 diff --git a/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.1 b/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.1 index 9f928692ed..b71fad8cab 100644 --- a/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.1 +++ b/examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.1 @@ -32,9 +32,13 @@ set type 1 type/fraction 2 0.05 6745234 Setting atom values ... 37 settings made for type/fraction +# define ramp variable to combine the two different partitions +if "${name} == pure" then "variable ramp equal ramp(1.0,0.0)" else "variable ramp equal ramp(0.0,1.0)" +variable ramp equal ramp(0.0,1.0) + velocity all create 5000.0 6567345 fix 1 all nvt temp 2500.0 500.0 0.002 -fix 2 all alchemy +fix 2 all alchemy v_ramp compute pressure all pressure/alchemy 2 @@ -162,7 +166,7 @@ Per MPI rank memory allocation (min/avg/max) = 3.474 | 3.474 | 3.474 Mbytes 9800 524.81105 -31000.6 -2860.6103 7.8067107 -2919.1537 58.543462 0.98 -2918.4921 9900 507.60008 -32223.744 -2864.192 7.8067107 -2920.8155 56.623552 0.99 -2920.4741 10000 521.28866 -33930.476 -2866.3918 7.8067107 -2924.5423 58.150534 1 -2924.5423 -Loop time of 19.2208 on 2 procs for 10000 steps with 864 atoms +Loop time of 17.7277 on 2 procs for 10000 steps with 864 atoms -Total wall time: 0:00:19 +Total wall time: 0:00:17 diff --git a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 index fc652dded7..49e6c6536d 100644 --- a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 +++ b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.0 @@ -1,9 +1,9 @@ LAMMPS (8 Feb 2023) Processor partition = 0 using 1 OpenMP thread(s) per MPI task -# Example for alchemical transformation of two water molecules into a hydronium and hydroxyl ion -# WARNING: This input is intended for demonstrating the method, only -# The force field parameters are made up and NOT suitable for production simulations. +# Example for an alchemical transformation of two water molecules into a hydronium and hydroxyl ion +# WARNING: This input is intended for demonstrating the method only, +# the force field parameters are mostly made up and NOT suitable for production simulations. # set up different names for two partitions variable name world twowater twoions @@ -59,7 +59,7 @@ group transform id 1:6 create_atoms 0 random 32 34564 NULL mol water 25367 overlap 1.33 Created 96 atoms using lattice units in orthogonal box = (-5 -5 -5) to (5 5 5) - create_atoms CPU = 0.001 seconds + create_atoms CPU = 0.000 seconds # change topology and settings for the two states # we cannot simply create a different topology directly or @@ -156,11 +156,15 @@ Finding 1-2 1-3 1-4 neighbors ... velocity all create 300.0 5463576 timestep 0.2 +# define ramp variable to combine the two different partitions +if "${name} == twowater" then "variable ramp equal ramp(1.0,0.0)" else "variable ramp equal ramp(0.0,1.0)" +variable ramp equal ramp(1.0,0.0) + # since the trajectory and forces are kept identical through fix alchemy, # we can do fix npt simulations, but we must use the "mixed" pressure fix integrate all npt temp 300 300 1.0 iso 1.0 1.0 10.0 -fix transform all alchemy +fix transform all alchemy v_ramp compute pressure all pressure/alchemy transform fix_modify integrate press pressure @@ -377,21 +381,21 @@ Per MPI rank memory allocation (min/avg/max) = 7.535 | 7.535 | 7.535 Mbytes 19800 295.68946 81474.342 2308.3249 1.0240743 2219.3041 89.020804 0.01 1910.5545 19900 306.4947 43488.052 2330.4958 1.0222707 2238.222 92.27385 0.005 1957.4368 20000 313.31679 -25133.284 -1161.6979 1.0163289 -1256.0256 94.327722 0 -1649.7551 -Loop time of 11.7903 on 2 procs for 20000 steps with 102 atoms +Loop time of 8.92653 on 2 procs for 20000 steps with 102 atoms -Performance: 29.312 ns/day, 0.819 hours/ns, 1696.311 timesteps/s, 173.024 katom-step/s -99.3% CPU use with 2 MPI tasks x 1 OpenMP threads +Performance: 38.716 ns/day, 0.620 hours/ns, 2240.513 timesteps/s, 228.532 katom-step/s +96.3% CPU use with 2 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 6.8605 | 8.6071 | 10.354 | 59.5 | 73.00 -Bond | 0.044148 | 0.044761 | 0.045375 | 0.3 | 0.38 -Neigh | 0.10568 | 0.10573 | 0.10578 | 0.0 | 0.90 -Comm | 0.74919 | 2.4939 | 4.2386 | 110.5 | 21.15 -Output | 0.0033838 | 0.0036358 | 0.0038879 | 0.4 | 0.03 -Modify | 0.46825 | 0.47526 | 0.48227 | 1.0 | 4.03 -Other | | 0.05993 | | | 0.51 +Pair | 4.7448 | 5.9908 | 7.2367 | 50.9 | 67.11 +Bond | 0.036126 | 0.03641 | 0.036695 | 0.1 | 0.41 +Neigh | 0.082247 | 0.082294 | 0.082342 | 0.0 | 0.92 +Comm | 0.68467 | 1.9303 | 3.1759 | 89.7 | 21.62 +Output | 0.0023377 | 0.0052347 | 0.0081317 | 4.0 | 0.06 +Modify | 0.8194 | 0.82122 | 0.82303 | 0.2 | 9.20 +Other | | 0.06029 | | | 0.68 Nlocal: 51 ave 51 max 51 min Histogram: 2 0 0 0 0 0 0 0 0 0 @@ -405,4 +409,4 @@ Ave neighs/atom = 359.21569 Ave special neighs/atom = 2 Neighbor list builds = 181 Dangerous builds = 0 -Total wall time: 0:00:11 +Total wall time: 0:00:08 diff --git a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 index e1d32eb1c7..a76489ebb3 100644 --- a/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 +++ b/examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4.1 @@ -1,9 +1,9 @@ LAMMPS (8 Feb 2023) Processor partition = 1 using 1 OpenMP thread(s) per MPI task -# Example for alchemical transformation of two water molecules into a hydronium and hydroxyl ion -# WARNING: This input is intended for demonstrating the method, only -# The force field parameters are made up and NOT suitable for production simulations. +# Example for an alchemical transformation of two water molecules into a hydronium and hydroxyl ion +# WARNING: This input is intended for demonstrating the method only, +# the force field parameters are mostly made up and NOT suitable for production simulations. # set up different names for two partitions variable name world twowater twoions @@ -106,7 +106,7 @@ Finding 1-2 1-3 1-4 neighbors ... 1 = max # of 1-3 neighbors 1 = max # of 1-4 neighbors 7 = max # of special neighbors - special bonds CPU = 0.000 seconds + special bonds CPU = 0.002 seconds create_bonds single/bond 2 3 4 Finding 1-2 1-3 1-4 neighbors ... special bond factors lj: 0 0 0 @@ -180,11 +180,15 @@ Setting atom values ... velocity all create 300.0 5463576 timestep 0.2 +# define ramp variable to combine the two different partitions +if "${name} == twowater" then "variable ramp equal ramp(1.0,0.0)" else "variable ramp equal ramp(0.0,1.0)" +variable ramp equal ramp(0.0,1.0) + # since the trajectory and forces are kept identical through fix alchemy, # we can do fix npt simulations, but we must use the "mixed" pressure fix integrate all npt temp 300 300 1.0 iso 1.0 1.0 10.0 -fix transform all alchemy +fix transform all alchemy v_ramp compute pressure all pressure/alchemy transform fix_modify integrate press pressure @@ -402,21 +406,21 @@ Per MPI rank memory allocation (min/avg/max) = 7.535 | 7.535 | 7.535 Mbytes 19800 295.68946 81474.342 1996.4567 1.0240743 1907.4359 89.020804 0.99 1910.5545 19900 306.4947 43488.052 2048.2997 1.0222707 1956.0258 92.27385 0.995 1957.4368 20000 313.31679 -25133.284 -1555.4274 1.0163289 -1649.7551 94.327722 1 -1649.7551 -Loop time of 11.7903 on 2 procs for 20000 steps with 102 atoms +Loop time of 8.92592 on 2 procs for 20000 steps with 102 atoms -Performance: 29.312 ns/day, 0.819 hours/ns, 1696.310 timesteps/s, 173.024 katom-step/s -99.3% CPU use with 2 MPI tasks x 1 OpenMP threads +Performance: 38.719 ns/day, 0.620 hours/ns, 2240.664 timesteps/s, 228.548 katom-step/s +96.2% CPU use with 2 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 6.8748 | 8.631 | 10.387 | 59.8 | 73.20 -Bond | 0.04667 | 0.047105 | 0.04754 | 0.2 | 0.40 -Neigh | 0.10858 | 0.10862 | 0.10866 | 0.0 | 0.92 -Comm | 0.74367 | 2.4997 | 4.2558 | 111.1 | 21.20 -Output | 0.0034405 | 0.0037033 | 0.003966 | 0.4 | 0.03 -Modify | 0.4338 | 0.4388 | 0.4438 | 0.8 | 3.72 -Other | | 0.06136 | | | 0.52 +Pair | 4.7753 | 6.0676 | 7.3599 | 52.5 | 67.98 +Bond | 0.036352 | 0.036909 | 0.037466 | 0.3 | 0.41 +Neigh | 0.085317 | 0.085383 | 0.085449 | 0.0 | 0.96 +Comm | 0.72794 | 2.022 | 3.3161 | 91.0 | 22.65 +Output | 0.0023255 | 0.005156 | 0.0079865 | 3.9 | 0.06 +Modify | 0.64567 | 0.64689 | 0.64812 | 0.2 | 7.25 +Other | | 0.06196 | | | 0.69 Nlocal: 51 ave 51 max 51 min Histogram: 2 0 0 0 0 0 0 0 0 0 @@ -430,4 +434,4 @@ Ave neighs/atom = 359.20588 Ave special neighs/atom = 2.0196078 Neighbor list builds = 181 Dangerous builds = 0 -Total wall time: 0:00:11 +Total wall time: 0:00:08 diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp index 18e55603b9..2f99f667b6 100644 --- a/src/REPLICA/fix_alchemy.cpp +++ b/src/REPLICA/fix_alchemy.cpp @@ -18,11 +18,13 @@ #include "compute.h" #include "domain.h" #include "error.h" +#include "input.h" #include "memory.h" #include "modify.h" #include "respa.h" #include "universe.h" #include "update.h" +#include "variable.h" #include @@ -33,8 +35,12 @@ using namespace FixConst; FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), commbuf(nullptr) { - if (narg != 3) error->all(FLERR, "Incorrect number of arguments for fix alchemy"); + if (narg != 4) error->all(FLERR, "Incorrect number of arguments for fix alchemy"); if (universe->nworlds != 2) error->all(FLERR, "Must use exactly two partitions"); + if (utils::strmatch(arg[3], "^v_")) + id_lambda = arg[3] + 2; + else + error->all(FLERR, "Must use variable as lambda argument to fix alchemy"); lambda = epot[0] = epot[1] = epot[2] = 0.0; progress = 0; @@ -129,6 +135,14 @@ void FixAlchemy::init() if (modify->get_fix_by_style("^alchemy").size() > 1) error->all(FLERR, "There may only one fix alchemy at a time"); + ivar = input->variable->find(id_lambda.c_str()); + if (ivar < 0) + error->universe_one(FLERR, fmt::format("Variable {} for fix alchemy does not exist", id_lambda)); + if (!input->variable->equalstyle(ivar)) + error->universe_one(FLERR, + fmt::format("Variable {} for fix alchemy is invalid style", id_lambda)); + lambda = input->variable->compute_equal(ivar); + // synchronize box dimensions, determine if resync during run will be needed. synchronize_box(domain, samerank); @@ -152,7 +166,10 @@ void FixAlchemy::setup(int vflag) } if (universe->me == 0) { - progress = static_cast(100.0 - lambda * 100.0); + double delta = update->ntimestep - update->beginstep; + if ((delta != 0.0) && (update->beginstep != update->endstep)) + delta /= update->endstep - update->beginstep; + progress = static_cast(delta*100.0); auto msg = fmt::format("Starting alchemical transformation at {:>3d}%\n", progress); if (universe->uscreen) fmt::print(universe->uscreen, msg); if (universe->ulogfile) fmt::print(universe->ulogfile, msg); @@ -175,16 +192,6 @@ void FixAlchemy::post_integrate() /* ---------------------------------------------------------------------- */ -static double get_lambda(const bigint &step, const bigint &begin, const bigint &end, int iworld) -{ - double lambda = step - begin; - if (lambda != 0.0) lambda /= end - begin; - if (iworld == 0) lambda = 1.0 - lambda; - return lambda; -} - -/* ---------------------------------------------------------------------- */ - void FixAlchemy::post_force(int /*vflag*/) { if (3 * atom->nmax > nmax) { @@ -194,7 +201,7 @@ void FixAlchemy::post_force(int /*vflag*/) const int nall = 3 * atom->nlocal; double *f = &atom->f[0][0]; - lambda = get_lambda(update->ntimestep, update->beginstep, update->endstep, universe->iworld); + lambda = input->variable->compute_equal(ivar); for (int i = 0; i < nall; ++i) commbuf[i] = f[i] * lambda; MPI_Allreduce(commbuf, f, nall, MPI_DOUBLE, MPI_SUM, samerank); @@ -218,7 +225,10 @@ void FixAlchemy::post_force(int /*vflag*/) // print progress info if (universe->me == 0) { - int status = static_cast(100.0 - lambda * 100.0); + double delta = update->ntimestep - update->beginstep; + if ((delta != 0.0) && (update->beginstep != update->endstep)) + delta /= update->endstep - update->beginstep; + int status = static_cast(delta*100.0); if ((status / 10) > (progress / 10)) { progress = status; auto msg = fmt::format(" Alchemical transformation progress: {:>3d}%\n", progress); diff --git a/src/REPLICA/fix_alchemy.h b/src/REPLICA/fix_alchemy.h index 86c58a7b78..677a29b643 100644 --- a/src/REPLICA/fix_alchemy.h +++ b/src/REPLICA/fix_alchemy.h @@ -42,14 +42,15 @@ class FixAlchemy : public Fix { MPI_Comm samerank; double *commbuf; class Compute *pe, *temp, *press; - std::string id_pe, id_temp, id_press; - double lambda; // changes from 0 to 1 during run + std::string id_pe, id_temp, id_press, id_lambda; + double lambda; // scaling prefactor for combining the partitions double epot[3]; // last (unscaled) potential energy from each replica and combined energy double pressure[6]; // joined pressure int progress; // for progress indicator int sync_box; // 1 of box dimensions need to be synchronized int ilevel_respa; int nmax; + int ivar; }; } // namespace LAMMPS_NS From 81a2d47c165a337face57990aece52d9a91d0684 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 27 Feb 2023 16:50:17 -0500 Subject: [PATCH 287/445] print warning about not checking lambda variable --- doc/src/fix_alchemy.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/src/fix_alchemy.rst b/doc/src/fix_alchemy.rst index 2ff137917b..90c436139e 100644 --- a/doc/src/fix_alchemy.rst +++ b/doc/src/fix_alchemy.rst @@ -43,6 +43,13 @@ are not easily possible with :doc:`pair style hybrid/scaled `, :doc:`fix adapt ` or :doc:`fix adapt/fep `. +.. note:: + + Since the definition of the variable to provide the :math:`\lambda_p` is + independent in the two partitions, no check is made that the two values + remain between 0.0 and 1.0 and that they add up to 1.0. So care needs to + be taken when defining those variables that this is the case. + Due to the specifics of the implementation, the initial geometry and dimensions of the system must be exactly the same and the fix will synchronize them during the run. It is thus not possible to initialize From 2511872823c969df85f6bff5afd2d673023bd524 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Tue, 28 Feb 2023 00:41:47 -0600 Subject: [PATCH 288/445] Updated GPU.cmake and Makefile.cuda_mps to not error out with exclusive process mode with the CUDA MPS server in use --- cmake/Modules/Packages/GPU.cmake | 4 ++-- lib/gpu/Makefile.cuda_mps | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index cf321eee9a..c873af8d9f 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -60,9 +60,9 @@ if(GPU_API STREQUAL "CUDA") option(CUDA_MPS_SUPPORT "Enable tweaks to support CUDA Multi-process service (MPS)" OFF) if(CUDA_MPS_SUPPORT) if(CUDPP_OPT) - message(FATAL_ERROR "Must use -DCUDPP_OPT=OFF with -DGPU_CUDA_MPS_SUPPORT=ON") + message(FATAL_ERROR "Must use -DCUDPP_OPT=OFF with -DCUDA_MPS_SUPPORT=ON") endif() - set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY") + set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY -DCUDA_MPS_SUPPORT") endif() set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)") diff --git a/lib/gpu/Makefile.cuda_mps b/lib/gpu/Makefile.cuda_mps index d7820e4c34..45d1b3f678 100644 --- a/lib/gpu/Makefile.cuda_mps +++ b/lib/gpu/Makefile.cuda_mps @@ -30,7 +30,7 @@ AR = ar BSH = /bin/sh CUDPP_OPT = -CUDA_MPS = -DCUDA_PROXY +CUDA_MPS = -DCUDA_PROXY -DCUDA_MPS_SUPPORT # device code compiler and settings @@ -53,7 +53,7 @@ BIN2C = $(CUDA_HOME)/bin/bin2c CUDR_CPP = mpicxx -fopenmp -DMPI_GERYON -DUCL_NO_EXIT -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1 -fPIC CUDR_OPTS = -O2 $(LMP_INC) -CUDR = $(CUDR_CPP) $(CUDR_OPTS) $(CUDA_PROXY) $(CUDA_PRECISION) $(CUDA_INCLUDE) \ +CUDR = $(CUDR_CPP) $(CUDR_OPTS) $(CUDA_MPS) $(CUDA_PRECISION) $(CUDA_INCLUDE) \ $(CUDPP_OPT) # Headers for Geryon From 22998f43ae085090e345f58f7e316fe4d2e85ef4 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 28 Feb 2023 11:59:06 +0200 Subject: [PATCH 289/445] Include method declaration in bond_morse.h --- src/MOLECULE/bond_morse.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MOLECULE/bond_morse.h b/src/MOLECULE/bond_morse.h index 5515ea023e..4d0e8e359c 100644 --- a/src/MOLECULE/bond_morse.h +++ b/src/MOLECULE/bond_morse.h @@ -35,6 +35,7 @@ class BondMorse : public Bond { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, double, int, int, double &) override; + void born_matrix(int, double, int, int, double &, double &) override; void *extract(const char *, int &) override; protected: From 3ab4735aa44189e4276ba99221dc30dda2f5b632 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 28 Feb 2023 12:00:31 +0200 Subject: [PATCH 290/445] Implement born_matrix in bond_morse.cpp --- src/MOLECULE/bond_morse.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/MOLECULE/bond_morse.cpp b/src/MOLECULE/bond_morse.cpp index e9555698da..b7020b0441 100644 --- a/src/MOLECULE/bond_morse.cpp +++ b/src/MOLECULE/bond_morse.cpp @@ -30,7 +30,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -BondMorse::BondMorse(LAMMPS *_lmp) : Bond(_lmp) {} +BondMorse::BondMorse(LAMMPS *_lmp) : Bond(_lmp) +{ + born_matrix_enable = 1; +} /* ---------------------------------------------------------------------- */ @@ -209,6 +212,18 @@ double BondMorse::single(int type, double rsq, int /*i*/, int /*j*/, double &ffo /* ---------------------------------------------------------------------- */ +void BondMorse::born_matrix(int type, double rsq, int /*i*/, int /*j*/, double &du, double &du2) +{ + double r = sqrt(rsq); + double dr = r - r0[type]; + double ralpha = exp(-alpha[type] * dr); + + du = 2.0 * d0[type] * alpha[type] * (1.0 - ralpha) * ralpha; + du2 = -2.0 * d0[type] * alpha[type] * alpha[type] * (1.0 - 2.0 * ralpha) * ralpha; +} + +/* ---------------------------------------------------------------------- */ + void *BondMorse::extract(const char *str, int &dim) { dim = 1; From 7aeccd9a6df6a24d064f505cdea8b8baad6c9240 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 28 Feb 2023 17:28:02 +0200 Subject: [PATCH 291/445] Include method declaration in bond_nonlinear.h --- src/EXTRA-MOLECULE/bond_nonlinear.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-MOLECULE/bond_nonlinear.h b/src/EXTRA-MOLECULE/bond_nonlinear.h index 3023add89d..f092643662 100644 --- a/src/EXTRA-MOLECULE/bond_nonlinear.h +++ b/src/EXTRA-MOLECULE/bond_nonlinear.h @@ -35,6 +35,7 @@ class BondNonlinear : public Bond { void read_restart(FILE *) override; void write_data(FILE *) override; double single(int, double, int, int, double &) override; + void born_matrix(int, double, int, int, double &, double &) override; void *extract(const char *, int &) override; protected: From 3cd881f0b95e63989e8498ca22c78da470a6d5a3 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Tue, 28 Feb 2023 17:29:50 +0200 Subject: [PATCH 292/445] Implement born_matrix in bond_nonlinear.cpp --- src/EXTRA-MOLECULE/bond_nonlinear.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/EXTRA-MOLECULE/bond_nonlinear.cpp b/src/EXTRA-MOLECULE/bond_nonlinear.cpp index 873c54e917..a2955b7d2e 100644 --- a/src/EXTRA-MOLECULE/bond_nonlinear.cpp +++ b/src/EXTRA-MOLECULE/bond_nonlinear.cpp @@ -28,7 +28,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -BondNonlinear::BondNonlinear(LAMMPS *lmp) : Bond(lmp) {} +BondNonlinear::BondNonlinear(LAMMPS *lmp) : Bond(lmp) +{ + born_matrix_enable = 1; +} /* ---------------------------------------------------------------------- */ @@ -207,6 +210,21 @@ double BondNonlinear::single(int type, double rsq, int /*i*/, int /*j*/, /* ---------------------------------------------------------------------- */ +void BondNonlinear::born_matrix(int type, double rsq, int /*i*/, int /*j*/, double &du, double &du2) +{ + double r = sqrt(rsq); + double dr = r - r0[type]; + double drsq = dr * dr; + double lamdasq = lamda[type] * lamda[type]; + double denom = lamdasq - drsq; + double denomsq = denom * denom; + + du = 2.0 * epsilon[type] * lamdasq * dr / denomsq; + du2 = 2.0 * epsilon[type] * lamdasq * (lamdasq + 3.0 * drsq)/ (denomsq * denom); +} + +/* ---------------------------------------------------------------------- */ + void *BondNonlinear::extract(const char *str, int &dim) { dim = 1; From a6eac92cd59016f72d71a95626bbce39d69f12a1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 28 Feb 2023 11:20:33 -0500 Subject: [PATCH 293/445] update list of pair styles that support fix adapt --- doc/src/fix_adapt.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/src/fix_adapt.rst b/doc/src/fix_adapt.rst index a3e851faf0..8dda1b3bb6 100644 --- a/doc/src/fix_adapt.rst +++ b/doc/src/fix_adapt.rst @@ -139,7 +139,7 @@ formulas for the meaning of these parameters: +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`buck/mdf ` | a,c | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ -| :doc:`coul/cut ` | scale | type pairs | +| :doc:`coul/cut, coul/cut/global ` | scale | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`coul/cut/soft ` | lambda | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ @@ -151,10 +151,16 @@ formulas for the meaning of these parameters: +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`coul/long/soft ` | scale, lambda, coulombic_cutoff | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ +| :doc:`coul/slater/long ` | scale | type pairs | ++------------------------------------------------------------------------------+--------------------------------------------------+-------------+ +| :doc:`coul/streitz ` | scale | type pairs | ++------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`eam, eam/alloy, eam/fs ` | scale | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`gauss ` | a | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ +| :doc:`harmonic/cut ` | k, cutoff | type pairs | ++------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`lennard/mdf ` | A,B | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`lj/class2 ` | epsilon,sigma | type pairs | @@ -181,6 +187,8 @@ formulas for the meaning of these parameters: +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`lubricate ` | mu | global | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ +| :doc:`meam ` | scale | type pairs | ++------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`mie/cut ` | epsilon,sigma,gamma_repulsive,gamma_attractive | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`morse, morse/smooth/linear ` | D0,R0,alpha | type pairs | @@ -191,7 +199,7 @@ formulas for the meaning of these parameters: +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`nm/cut/coul/cut, nm/cut/coul/long ` | E0,R0,m,n,coulombic_cutoff | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ -| :doc:`reaxff ` | chi, eta, gamma | type global | +| :doc:`pace, pace/extrapolation ` | scale | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`snap ` | scale | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ @@ -203,11 +211,13 @@ formulas for the meaning of these parameters: +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`spin/neel ` | coulombic_cutoff | type global | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ +| :doc:`soft ` | a | type pairs | ++------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`table ` | table_cutoff | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`ufm ` | epsilon,sigma | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ -| :doc:`soft ` | a | type pairs | +| :doc:`wf/cut ` | epsilon,sigma,nu,mu | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ .. note:: From 02190b82c2dbec001731a7b8668e3583d3b4bfe0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 28 Feb 2023 11:22:14 -0500 Subject: [PATCH 294/445] link pair style hybrid/scaled to fix adapt and fix alchemy --- doc/src/pair_hybrid.rst | 3 ++- src/ML-SNAP/pair_snap.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/pair_hybrid.rst b/doc/src/pair_hybrid.rst index 5ba5fb51d2..a33991e43e 100644 --- a/doc/src/pair_hybrid.rst +++ b/doc/src/pair_hybrid.rst @@ -91,7 +91,8 @@ contributions from sub-styles are weighted by their scale factors, which may be fractional or even negative. Furthermore the scale factors may be variables that may change during a simulation. This enables switching smoothly between two different pair styles or two different -parameter sets during a run. +parameter sets during a run in a similar fashion as could be done +with :doc:`fix adapt ` or :doc:`fix alchemy `. All pair styles that will be used are listed as "sub-styles" following the *hybrid* or *hybrid/overlay* keyword, in any order. In case of the diff --git a/src/ML-SNAP/pair_snap.cpp b/src/ML-SNAP/pair_snap.cpp index 034f76b13a..3029e9212d 100644 --- a/src/ML-SNAP/pair_snap.cpp +++ b/src/ML-SNAP/pair_snap.cpp @@ -796,6 +796,8 @@ double PairSNAP::memory_usage() return bytes; } +/* ---------------------------------------------------------------------- */ + void *PairSNAP::extract(const char *str, int &dim) { dim = 2; From a98c497dbb282fe1b0b73c5b9ca96f81a743985a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 28 Feb 2023 18:10:45 -0500 Subject: [PATCH 295/445] redesign the Howto pages on water models and add inputs and molecule files --- doc/src/Howto.rst | 1 + doc/src/Howto_spc.rst | 114 ++++++- doc/src/Howto_tip3p.rst | 244 ++++++++++++--- doc/src/Howto_tip4p.rst | 325 +++++++++++++++----- doc/src/Howto_tip5p.rst | 161 ++++++++++ doc/utils/sphinx-config/false_positives.txt | 3 + 6 files changed, 718 insertions(+), 130 deletions(-) create mode 100644 doc/src/Howto_tip5p.rst diff --git a/doc/src/Howto.rst b/doc/src/Howto.rst index f229deafb3..1366ecb839 100644 --- a/doc/src/Howto.rst +++ b/doc/src/Howto.rst @@ -70,6 +70,7 @@ Force fields howto Howto_amoeba Howto_tip3p Howto_tip4p + Howto_tip5p Howto_spc Packages howto diff --git a/doc/src/Howto_spc.rst b/doc/src/Howto_spc.rst index 520942547e..6414d3b846 100644 --- a/doc/src/Howto_spc.rst +++ b/doc/src/Howto_spc.rst @@ -20,7 +20,6 @@ atoms and the water molecule to run a rigid SPC model. | LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0 | :math:`r_0` of OH bond = 1.0 | :math:`\theta_0` of HOH angle = 109.47\ :math:`^{\circ}` -| Note that as originally proposed, the SPC model was run with a 9 Angstrom cutoff for both LJ and Coulomb terms. It can also be used @@ -33,16 +32,123 @@ the partial charge assignments change: | O charge = -0.8476 | H charge = 0.4238 -| See the :ref:`(Berendsen) ` reference for more details on both the SPC and SPC/E models. +Below is the code for a LAMMPS input file and a molecule file +(``spce.mol``) of SPC/E water for use with the :doc:`molecule command +` demonstrating how to set up a small bulk water system for +SPC/E with rigid bonds. + +.. code-block:: LAMMPS + + units real + atom_style full + region box block -5 5 -5 5 -5 5 + create_box 2 box bond/types 1 angle/types 1 & + extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2 + + mass 1 15.9994 + mass 2 1.008 + + pair_style lj/cut/coul/cut 10.0 + pair_coeff 1 1 0.1553 3.166 + pair_coeff 1 2 0.0 1.0 + pair_coeff 2 2 0.0 1.0 + + bond_style zero + bond_coeff 1 1.0 + + angle_style zero + angle_coeff 1 109.47 + + molecule water spce.mol + create_atoms 0 random 33 34564 NULL mol water 25367 overlap 1.33 + + timestep 1.0 + fix rigid all shake 0.0001 10 10000 b 1 a 1 + minimize 0.0 0.0 1000 10000 + run 0 post no + reset_timestep 0 + velocity all create 300.0 5463576 + fix integrate all nvt temp 300.0 300.0 1.0 + + thermo_style custom step temp press etotal density pe ke + thermo 1000 + run 20000 upto + write_data tip4p.data nocoeff + +.. _spce_molecule: +.. code-block:: + + # Water molecule. SPC/E geometry + + 3 atoms + 2 bonds + 1 angles + + Coords + + 1 0.00000 -0.06461 0.00000 + 2 0.81649 0.51275 0.00000 + 3 -0.81649 0.51275 0.00000 + + Types + + 1 1 # O + 2 2 # H + 3 2 # H + + Charges + + 1 -0.8476 + 2 0.4238 + 3 0.4238 + + Bonds + + 1 1 1 2 + 2 1 1 3 + + Angles + + 1 1 2 1 3 + + Shake Flags + + 1 1 + 2 1 + 3 1 + + Shake Atoms + + 1 1 2 3 + 2 1 2 3 + 3 1 2 3 + + Shake Bond Types + + 1 1 1 1 + 2 1 1 1 + 3 1 1 1 + + Special Bond Counts + + 1 2 0 0 + 2 1 1 0 + 3 1 1 0 + + Special Bonds + + 1 2 3 + 2 1 3 + 3 1 2 + Wikipedia also has a nice article on `water models `_. ---------- .. _howto-Berendsen: -**(Berendsen)** Berendsen, Grigera, Straatsma, J Phys Chem, 91, -6269-6271 (1987). +**(Berendsen)** Berendsen, Grigera, Straatsma, J Phys Chem, 91, 6269-6271 (1987). diff --git a/doc/src/Howto_tip3p.rst b/doc/src/Howto_tip3p.rst index 5571b3291a..682c7f2640 100644 --- a/doc/src/Howto_tip3p.rst +++ b/doc/src/Howto_tip3p.rst @@ -1,53 +1,211 @@ TIP3P water model ================= -The TIP3P water model as implemented in CHARMM -:ref:`(MacKerell) ` specifies a 3-site rigid water molecule with -charges and Lennard-Jones parameters assigned to each of the 3 atoms. -In LAMMPS the :doc:`fix shake ` command can be used to hold -the two O-H bonds and the H-O-H angle rigid. A bond style of -*harmonic* and an angle style of *harmonic* or *charmm* should also be -used. +The TIP3P water model as implemented in CHARMM :ref:`(MacKerell) +` specifies a 3-site rigid water molecule with charges and +Lennard-Jones parameters assigned to each of the 3 atoms. -These are the additional parameters (in real units) to set for O and H -atoms and the water molecule to run a rigid TIP3P-CHARMM model with a -cutoff. The K values can be used if a flexible TIP3P model (without -fix shake) is desired. If the LJ epsilon and sigma for HH and OH are -set to 0.0, it corresponds to the original 1983 TIP3P model -:ref:`(Jorgensen) `. +A suitable pair style with cutoff Coulomb would be: -| O mass = 15.9994 -| H mass = 1.008 -| O charge = -0.834 -| H charge = 0.417 -| LJ :math:`\epsilon` of OO = 0.1521 -| LJ :math:`\sigma` of OO = 3.1507 -| LJ :math:`\epsilon` of HH = 0.0460 -| LJ :math:`\sigma` of HH = 0.4000 -| LJ :math:`\epsilon` of OH = 0.0836 -| LJ :math:`\sigma` of OH = 1.7753 -| K of OH bond = 450 -| :math:`r_0` of OH bond = 0.9572 -| K of HOH angle = 55 -| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}` -| +* :doc:`pair_style lj/cut/coul/cut ` -These are the parameters to use for TIP3P with a long-range Coulomb -solver (e.g. Ewald or PPPM in LAMMPS), see :ref:`(Price) ` for -details: +or these commands for a long-range Coulomb model: + +* :doc:`pair_style lj/cut/coul/long ` +* :doc:`pair_style lj/cut/coul/long/soft ` +* :doc:`kspace_style pppm ` +* :doc:`kspace_style pppm/disp ` + +In LAMMPS the :doc:`fix shake or fix rattle ` command can be +used to hold the two O-H bonds and the H-O-H angle rigid. A bond style +of :doc:`harmonic ` and an angle style of :doc:`harmonic +` or :doc:`charmm ` should also be used. +In case of rigid bonds also bond style :doc:`zero ` and angle +style :doc:`zero ` can be used. + +The table below lists the force field parameters (in real :doc:`units +`) to for the water molecule atoms to run a rigid or flexible +TIP3P-CHARMM model with a cutoff, the original 1983 TIP3P model +:ref:`(Jorgensen) `, or a TIP3P model with parameters +optimized for a long-range Coulomb solver (e.g. Ewald or PPPM in LAMMPS) +:ref:`(Price) `. The K values can be used if a flexible TIP3P +model (without fix shake) is desired, for rigid bonds/angles they are +ignored. + + .. list-table:: + :header-rows: 1 + :widths: auto + + * - Parameter + - TIP3P-CHARMM + - TIP3P (original) + - TIP3P (Ewald) + * - O mass (amu) + - 15.9994 + - 15.9994 + - 15.9994 + * - H mass (amu) + - 1.008 + - 1.008 + - 1.008 + * - O charge (:math:`e`) + - -0.834 + - -0.834 + - -0.834 + * - H charge (:math:`e`) + - 0.417 + - 0.417 + - 0.417 + * - LJ :math:`\epsilon` of OO (kcal/mole) + - 0.1521 + - 0.1521 + - 0.1020 + * - LJ :math:`\sigma` of OO (:math:`\AA`) + - 3.1507 + - 3.1507 + - 3.188 + * - LJ :math:`\epsilon` of HH (kcal/mole) + - 0.0460 + - 0.0 + - 0.0 + * - LJ :math:`\sigma` of HH (:math:`\AA`) + - 0.4 + - 1.0 + - 1.0 + * - LJ :math:`\epsilon` of OH (kcal/mole) + - 0.0836 + - 0.0 + - 0.0 + * - LJ :math:`\sigma` of OH (:math:`\AA`) + - 1.7753 + - 1.0 + - 1.0 + * - K of OH bond (kcal/mole/:math:`\AA^2`) + - 450 + - 450 + - 450 + * - :math:`r_0` of OH bond (:math:`\AA`) + - 0.9572 + - 0.9572 + - 0.9572 + * - K of HOH angle (kcal/mole) + - 55.0 + - 55.0 + - 55.0 + * - :math:`\theta_0` of HOH angle + - 104.52\ :math:`^{\circ}` + - 104.52\ :math:`^{\circ}` + - 104.52\ :math:`^{\circ}` + +Below is the code for a LAMMPS input file and a molecule file +(``tip3p.mol``) of TIP3P water for use with the :doc:`molecule command +` demonstrating how to set up a small bulk water system for +TIP3P with rigid bonds. + +.. code-block:: LAMMPS + + units real + atom_style full + region box block -5 5 -5 5 -5 5 + create_box 2 box bond/types 1 angle/types 1 & + extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2 + + mass 1 15.9994 + mass 2 1.008 + + pair_style lj/cut/coul/cut 8.0 + pair_coeff 1 1 0.1521 3.1507 + pair_coeff 2 2 0.0 1.0 + + bond_style zero + bond_coeff 1 0.9574 + + angle_style zero + angle_coeff 1 104.52 + + molecule water tip3p.mol + create_atoms 0 random 33 34564 NULL mol water 25367 overlap 1.33 + + fix rigid all shake 0.001 10 10000 b 1 a 1 + minimize 0.0 0.0 1000 10000 + run 0 post no + + reset_timestep 0 + velocity all create 300.0 5463576 + fix integrate all nvt temp 300 300 1.0 + + thermo_style custom step temp press etotal pe + + thermo 1000 + run 20000 + write_data tip3p.data nocoeff + +.. _tip3p_molecule: +.. code-block:: + + # Water molecule. TIP3P geometry + + 3 atoms + 2 bonds + 1 angles + + Coords + + 1 0.00000 -0.06556 0.00000 + 2 0.75695 0.52032 0.00000 + 3 -0.75695 0.52032 0.00000 + + Types + + 1 1 # O + 2 2 # H + 3 2 # H + + Charges + + 1 -0.834 + 2 0.417 + 3 0.417 + + Bonds + + 1 1 1 2 + 2 1 1 3 + + Angles + + 1 1 2 1 3 + + Shake Flags + + 1 1 + 2 1 + 3 1 + + Shake Atoms + + 1 1 2 3 + 2 1 2 3 + 3 1 2 3 + + Shake Bond Types + + 1 1 1 1 + 2 1 1 1 + 3 1 1 1 + + Special Bond Counts + + 1 2 0 0 + 2 1 1 0 + 3 1 1 0 + + Special Bonds + + 1 2 3 + 2 1 3 + 3 1 2 -| O mass = 15.9994 -| H mass = 1.008 -| O charge = -0.830 -| H charge = 0.415 -| LJ :math:`\epsilon` of OO = 0.102 -| LJ :math:`\sigma` of OO = 3.188 -| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0 -| K of OH bond = 450 -| :math:`r_0` of OH bond = 0.9572 -| K of HOH angle = 55 -| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}` -| Wikipedia also has a nice article on `water models `_. diff --git a/doc/src/Howto_tip4p.rst b/doc/src/Howto_tip4p.rst index 19b811a282..7912557e61 100644 --- a/doc/src/Howto_tip4p.rst +++ b/doc/src/Howto_tip4p.rst @@ -2,100 +2,138 @@ TIP4P water model ================= The four-point TIP4P rigid water model extends the traditional -three-point TIP3P model by adding an additional site, usually -massless, where the charge associated with the oxygen atom is placed. -This site M is located at a fixed distance away from the oxygen along -the bisector of the HOH bond angle. A bond style of *harmonic* and an -angle style of *harmonic* or *charmm* should also be used. +:doc:`three-point TIP3P ` model by adding an additional +site M, usually massless, where the charge associated with the oxygen +atom is placed. This site M is located at a fixed distance away from +the oxygen along the bisector of the HOH bond angle. A bond style of +:doc:`harmonic ` and an angle style of :doc:`harmonic +` or :doc:`charmm ` should also be used. +In case of rigid bonds also bond style :doc:`zero ` and angle +style :doc:`zero ` can be used. -A TIP4P model is run with LAMMPS using either these commands -for a cutoff model: +There are two ways to implement TIP4P water in LAMMPS: -* :doc:`pair_style tip4p/cut ` -* :doc:`pair_style lj/cut/tip4p/cut ` +#. Use a specially written pair style that uses the :ref:`TIP3P geometry + ` without the point M. The point M location is then + implicitly derived from the other atoms or each water molecule and + used during the force computation. The forces on M are then + projected on the oxygen and the two hydrogen atoms. This is + computationally very efficient, but the charge distribution in space + is only correct within the tip4p labeled styles. So all other + computations using charges will "see" the negative charge incorrectly + on the oxygen atom. -or these commands for a long-range model: + This can be done with the following pair styles for Coulomb with a cutoff: -* :doc:`pair_style tip4p/long ` -* :doc:`pair_style lj/cut/tip4p/long ` -* :doc:`pair_style lj/long/tip4p/long ` -* :doc:`pair_style tip4p/long/soft ` -* :doc:`pair_style lj/cut/tip4p/long/soft ` -* :doc:`kspace_style pppm/tip4p ` -* :doc:`kspace_style pppm/disp/tip4p ` + * :doc:`pair_style tip4p/cut ` + * :doc:`pair_style lj/cut/tip4p/cut ` -The bond lengths and bond angles should be held fixed using the -:doc:`fix shake ` or :doc:`fix rattle ` command, -unless a parameterization for a flexible TIP4P model is used. The -parameter sets listed below are all for rigid TIP4P model variants and -thus the bond and angle force constants are not used and can be set to -any legal value; only equilibrium length and angle are used. + or these commands for a long-range Coulomb treatment: -These are the additional parameters (in real units) to set for O and H -atoms and the water molecule to run a rigid TIP4P model with a cutoff -:ref:`(Jorgensen) `. Note that the OM distance is specified in -the :doc:`pair_style ` command, not as part of the pair -coefficients. + * :doc:`pair_style tip4p/long ` + * :doc:`pair_style lj/cut/tip4p/long ` + * :doc:`pair_style lj/long/tip4p/long ` + * :doc:`pair_style tip4p/long/soft ` + * :doc:`pair_style lj/cut/tip4p/long/soft ` + * :doc:`kspace_style pppm/tip4p ` + * :doc:`kspace_style pppm/disp/tip4p ` -| O mass = 15.9994 -| H mass = 1.008 -| O charge = -1.040 -| H charge = 0.520 -| :math:`r_0` of OH bond = 0.9572 -| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}` -| OM distance = 0.15 -| LJ :math:`\epsilon` of O-O = 0.1550 -| LJ :math:`\sigma` of O-O = 3.1536 -| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0 -| Coulomb cutoff = 8.5 -| + The bond lengths and bond angles should be held fixed using the + :doc:`fix shake ` or :doc:`fix rattle ` command, + unless a parameterization for a flexible TIP4P model is used. The + parameter sets listed below are all for rigid TIP4P model variants and + thus the bond and angle force constants are not used and can be set to + any legal value; only equilibrium length and angle are used. -For the TIP4/Ice model (J Chem Phys, 122, 234511 (2005); -https://doi.org/10.1063/1.1931662) these values can be used: +#. Use an :ref:`explicit 4 point TIP4P geometry ` where + the oxygen atom carries no charge and the M point no Lennard-Jones + interactions. Since :doc:`fix shake ` or :doc:`fix rattle + ` may not be applied to this kind of geometry, :doc:`fix + rigid or fix rigid/small ` or its thermostatted variants + are required to maintain a rigid geometry. This avoids some of the + issues with respect to analysis and non-tip4p styles, but it is a + more costly force computation (more atoms in the same volume and thus + more neighbors in the neighbor lists) and requires a much shorter + timestep for stable integration of the rigid body motion. Since no + bonds or angles are required, they do not need to be defined and atom + style charge would be sufficient for a bulk TIP4P water system. In + order to avoid that LAMMPS produces an error due to the massless M + site a tiny non-zero mass needs to be assigned. -| O mass = 15.9994 -| H mass = 1.008 -| O charge = -1.1794 -| H charge = 0.5897 -| :math:`r_0` of OH bond = 0.9572 -| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}` -| OM distance = 0.1577 -| LJ :math:`\epsilon` of O-O = 0.21084 -| LJ :math:`\sigma` of O-O = 3.1668 -| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0 -| Coulomb cutoff = 8.5 -| +The table below lists the force field parameters (in real :doc:`units +`) to for a selection of popular variants of the TIP4P model. +There is the rigid TIP4P model with a cutoff :ref:`(Jorgensen) +`, the TIP4/Ice model :ref:`(Abascal1) `, the +TIP4P/2005 model :ref:`(Abascal2) ` and a version of TIP4P +parameters adjusted for use with a long-range Coulombic solver +(e.g. Ewald or PPPM in LAMMPS). Note that for implicit TIP4P models the +OM distance is specified in the :doc:`pair_style ` command, +not as part of the pair coefficients. -For the TIP4P/2005 model (J Chem Phys, 123, 234505 (2005); -https://doi.org/10.1063/1.2121687), these values can be used: + .. list-table:: + :header-rows: 1 + :widths: auto -| O mass = 15.9994 -| H mass = 1.008 -| O charge = -1.1128 -| H charge = 0.5564 -| :math:`r_0` of OH bond = 0.9572 -| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}` -| OM distance = 0.1546 -| LJ :math:`\epsilon` of O-O = 0.1852 -| LJ :math:`\sigma` of O-O = 3.1589 -| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0 -| Coulomb cutoff = 8.5 -| - -These are the parameters to use for TIP4P with a long-range Coulombic -solver (e.g. Ewald or PPPM in LAMMPS): - -| O mass = 15.9994 -| H mass = 1.008 -| O charge = -1.0484 -| H charge = 0.5242 -| :math:`r_0` of OH bond = 0.9572 -| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}` -| OM distance = 0.1250 -| LJ :math:`\epsilon` of O-O = 0.16275 -| LJ :math:`\sigma` of O-O = 3.16435 -| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0 -| + * - Parameter + - TIP4P (original) + - TIP4P/Ice + - TIP4P/2005 + - TIP4P (Ewald) + * - O mass (amu) + - 15.9994 + - 15.9994 + - 15.9994 + - 15.9994 + * - H mass (amu) + - 1.008 + - 1.008 + - 1.008 + - 1.008 + * - O or M charge (:math:`e`) + - -1.040 + - -1.1794 + - -1.1128 + - -1.04844 + * - H charge (:math:`e`) + - 0.520 + - 0.5897 + - 0.5564 + - 0.52422 + * - LJ :math:`\epsilon` of OO (kcal/mole) + - 0.1550 + - 0.1577 + - 0.1852 + - 0.16275 + * - LJ :math:`\sigma` of OO (:math:`\AA`) + - 3.1536 + - 3.1668 + - 3.1589 + - 3.16435 + * - LJ :math:`\epsilon` of HH, MM, OH, OM, HM (kcal/mole) + - 0.0 + - 0.0 + - 0.0 + - 0.0 + * - LJ :math:`\sigma` of HH, MM, OH, OM, HM (:math:`\AA`) + - 1.0 + - 1.0 + - 1.0 + - 1.0 + * - :math:`r_0` of OH bond (:math:`\AA`) + - 0.9572 + - 0.9572 + - 0.9572 + - 0.9572 + * - :math:`\theta_0` of HOH angle + - 104.52\ :math:`^{\circ}` + - 104.52\ :math:`^{\circ}` + - 104.52\ :math:`^{\circ}` + - 104.52\ :math:`^{\circ}` + * - OM distance (:math:`\AA`) + - 0.15 + - 0.1577 + - 0.1546 + - 0.1250 Note that the when using the TIP4P pair style, the neighbor list cutoff for Coulomb interactions is effectively extended by a distance 2 \* (OM @@ -108,6 +146,117 @@ trade-off for your model. The OM distance and the LJ and Coulombic cutoffs are set in the :doc:`pair_style lj/cut/tip4p/long ` command. +Below is the code for a LAMMPS input file using the implicit method and +the :ref:`TIP3P molecule file `. Because the TIP4P +charges are different from TIP3P they need to be reset (or the molecule +file changed): + +.. code-block:: LAMMPS + + units real + atom_style full + region box block -5 5 -5 5 -5 5 + create_box 2 box bond/types 1 angle/types 1 & + extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2 + + mass 1 15.9994 + mass 2 1.008 + + pair_style lj/cut/tip4p/cut 1 2 1 1 0.15 8.0 + pair_coeff 1 1 0.1550 3.1536 + pair_coeff 2 2 0.0 1.0 + + bond_style zero + bond_coeff 1 0.9574 + + angle_style zero + angle_coeff 1 104.52 + + molecule water tip3p.mol # this uses the TIP3P geometry + create_atoms 0 random 33 34564 NULL mol water 25367 overlap 1.33 + # must change charges for TIP4P + set type 1 charge -1.040 + set type 2 charge 0.520 + + fix rigid all shake 0.001 10 10000 b 1 a 1 + minimize 0.0 0.0 1000 10000 + run 0 post no + + reset_timestep 0 + velocity all create 300.0 5463576 + fix integrate all nvt temp 300 300 1.0 + + thermo_style custom step temp press etotal pe + + thermo 1000 + run 20000 + write_data tip3p.data nocoeff + +Below is the code for a LAMMPS input file using the explicit method and +a TIP4P molecule file. Because of using :doc:`fix rigid/nvt/small +` no bonds need to be defined and thus no extra storage needs +to be reserved for them, but we need to switch to atom style full or use +:doc:`fix property/atom mol ` so that fix +rigid/nvt/small can identify rigid bodies by their molecule ID: + +.. code-block:: LAMMPS + + units real + atom_style charge + region box block -5 5 -5 5 -5 5 + create_box 3 box + + mass 1 15.9994 + mass 2 1.008 + mass 3 1.0e-100 + + pair_style lj/cut/coul/cut 8.0 + pair_coeff 1 1 0.1550 3.1536 + pair_coeff 2 2 0.0 1.0 + pair_coeff 3 3 0.0 1.0 + + fix mol all property/atom mol + molecule water tip4p.mol + create_atoms 0 random 33 34564 NULL mol water 25367 overlap 1.33 + + timestep 0.1 + fix integrate all rigid/nvt/small molecule temp 300.0 300.0 1.0 + velocity all create 300.0 5463576 + + thermo_style custom step temp press etotal density pe ke + thermo 1000 + run 20000 + write_data tip4p.data nocoeff + +.. _tip4p_molecule: +.. code-block:: + + # Water molecule. Explicit TIP4P geometry for use with fix rigid + + 4 atoms + + Coords + + 1 0.00000 -0.06556 0.00000 + 2 0.75695 0.52032 0.00000 + 2 -0.75695 0.52032 0.00000 + 4 0.00000 0.08444 0.00000 + + Types + + 1 1 # O + 2 2 # H + 3 2 # H + 4 3 # M + + Charges + + 1 0.000 + 2 0.520 + 3 0.520 + 4 -1.040 + + Wikipedia also has a nice article on `water models `_. ---------- @@ -116,3 +265,13 @@ Wikipedia also has a nice article on `water models ` by adding two additional sites L, usually +massless, where the charge associated with the oxygen atom is placed. +These sites L are located at a fixed distance away from the oxygen atom, +forming a tetrahedral angle that is rotated by 90 degrees from the HOH +plane. Those sites thus somewhat approximate lone pairs of the oxygen +and consequently improve the water structure to become even more +"tetrahedral" in comparison to the :doc:`four-point TIP4P model +`. + +A suitable pair style with cutoff Coulomb would be: + +* :doc:`pair_style lj/cut/coul/cut ` + +or these commands for a long-range model: + +* :doc:`pair_style lj/cut/coul/long ` +* :doc:`pair_style lj/cut/coul/long/soft ` +* :doc:`kspace_style pppm ` +* :doc:`kspace_style pppm/disp ` + +A TIP5P model *must* be run using a :doc:`rigid fix ` since +there is no other option to keep this kind of structure rigid in LAMMPS. +In order to avoid that LAMMPS produces an error due to the massless L +sites, those need to be assigned a tiny non-zero mass. + +The table below lists the force field parameters (in real :doc:`units +`) to for a the TIP5P model with a cutoff :ref:`(Mahoney) +` and the TIP5P-E model :ref:`(Rick) ` for use with a +long-range Coulombic solver (e.g. Ewald or PPPM in LAMMPS). + + .. list-table:: + :header-rows: 1 + :widths: auto + + * - Parameter + - TIP5P + - TIP5P-E + * - O mass (amu) + - 15.9994 + - 15.9994 + * - H mass (amu) + - 1.008 + - 1.008 + * - O charge (:math:`e`) + - 0.0 + - 0.0 + * - L charge (:math:`e`) + - -0.241 + - -0.241 + * - H charge (:math:`e`) + - 0.241 + - 0.241 + * - LJ :math:`\epsilon` of OO (kcal/mole) + - 0.1600 + - 0.1780 + * - LJ :math:`\sigma` of OO (:math:`\AA`) + - 3.1200 + - 3.0970 + * - LJ :math:`\epsilon` of HH, LL, OH, OL, HL (kcal/mole) + - 0.0 + - 0.0 + * - LJ :math:`\sigma` of HH, LL, OH, OL, HL (:math:`\AA`) + - 1.0 + - 1.0 + * - :math:`r_0` of OH bond (:math:`\AA`) + - 0.9572 + - 0.9572 + * - :math:`\theta_0` of HOH angle + - 104.52\ :math:`^{\circ}` + - 104.52\ :math:`^{\circ}` + * - OL distance (:math:`\AA`) + - 0.70 + - 0.70 + * - :math:`\theta_0` of LOL angle + - 109.47\ :math:`^{\circ}` + - 109.47\ :math:`^{\circ}` + +Below is the code for a LAMMPS input file for setting up a simulation of +TIP5P water with a molecule file. Because of using :doc:`fix +rigid/nvt/small ` no bonds need to be defined and thus no +extra storage needs to be reserved for them, but we need to switch to +atom style full or use :doc:`fix property/atom mol ` +so that fix rigid/nvt/small can identify rigid bodies by their molecule +ID: + +.. code-block:: LAMMPS + + units real + atom_style charge + region box block -5 5 -5 5 -5 5 + create_box 3 box + + mass 1 15.9994 + mass 2 1.008 + mass 3 1.0e-100 + + pair_style lj/cut/coul/cut 8.0 + pair_coeff 1 1 0.160 3.12 + pair_coeff 2 2 0.0 1.0 + pair_coeff 3 3 0.0 1.0 + + fix mol all property/atom mol + molecule water tip5p.mol + create_atoms 0 random 33 34564 NULL mol water 25367 overlap 1.33 + + timestep 0.20 + fix integrate all rigid/nvt/small molecule temp 300.0 300.0 1.0 + reset_timestep 0 + velocity all create 300.0 5463576 + + thermo_style custom step temp press etotal density pe ke + thermo 1000 + run 20000 + write_data tip5p.data nocoeff + +.. _tip5p_molecule: +.. code-block:: + + # Water molecule. Explicit TIP5P geometry for use with fix rigid + + 5 atoms + + Coords + + 1 0.00000 -0.06556 0.00000 + 2 0.75695 0.52032 0.00000 + 3 -0.75695 0.52032 0.00000 + 4 0.00000 -0.46971 0.57154 + 5 0.00000 -0.46971 -0.57154 + + Types + + 1 1 # O + 2 2 # H + 3 2 # H + 4 3 # L + 5 3 # L + + Charges + + 1 0.000 + 2 0.241 + 3 0.241 + 4 -0.241 + 5 -0.241 + +Wikipedia also has a nice article on `water models `_. + +---------- + +.. _Mahoney: + +**(Mahoney)** Mahoney, Jorgensen, J Chem Phys 112, 8910 (2000) + +.. _Rick: + +**(Rick)** Rick, J Chem Phys 120, 6085 (2004) diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index fdacbf9c4c..0349c894a2 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -1,5 +1,6 @@ aa aat +Abascal abc abf ABI @@ -1985,6 +1986,7 @@ magelec Maginn magneton magnetons +Mahoney mainboard mainboards makefile @@ -3186,6 +3188,7 @@ Sandia sandybrown sanitizer Sanyal +Sanz Sarath sc scafacos From 2507e414d9e4c38f4c7d0bc9cfdee4daf51c5538 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 28 Feb 2023 18:11:05 -0500 Subject: [PATCH 296/445] fix broken link --- doc/src/fix_adapt.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/fix_adapt.rst b/doc/src/fix_adapt.rst index 8dda1b3bb6..926b8ed0c6 100644 --- a/doc/src/fix_adapt.rst +++ b/doc/src/fix_adapt.rst @@ -153,7 +153,7 @@ formulas for the meaning of these parameters: +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`coul/slater/long ` | scale | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ -| :doc:`coul/streitz ` | scale | type pairs | +| :doc:`coul/streitz ` | scale | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`eam, eam/alloy, eam/fs ` | scale | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ From 103e63eca532476df63abb586ca4b716aaf1aa35 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 28 Feb 2023 18:58:57 -0500 Subject: [PATCH 297/445] more careful checks and print error messages to global root. --- src/REPLICA/fix_alchemy.cpp | 83 +++++++++++++++++++++++++------------ src/variable.cpp | 2 +- 2 files changed, 58 insertions(+), 27 deletions(-) diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp index 2f99f667b6..c6617c4600 100644 --- a/src/REPLICA/fix_alchemy.cpp +++ b/src/REPLICA/fix_alchemy.cpp @@ -35,12 +35,12 @@ using namespace FixConst; FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), commbuf(nullptr) { - if (narg != 4) error->all(FLERR, "Incorrect number of arguments for fix alchemy"); - if (universe->nworlds != 2) error->all(FLERR, "Must use exactly two partitions"); + if (narg != 4) error->universe_all(FLERR, "Incorrect number of arguments for fix alchemy"); + if (universe->nworlds != 2) error->universe_all(FLERR, "Must use exactly two partitions"); if (utils::strmatch(arg[3], "^v_")) id_lambda = arg[3] + 2; else - error->all(FLERR, "Must use variable as lambda argument to fix alchemy"); + error->universe_all(FLERR, "Must use variable as lambda argument to fix alchemy"); lambda = epot[0] = epot[1] = epot[2] = 0.0; progress = 0; @@ -73,7 +73,9 @@ FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), int allfail = 0; MPI_Allreduce(&fail, &allfail, 1, MPI_INT, MPI_MAX, universe->uworld); if (allfail) - error->all(FLERR, "Number of atoms and domain decomposition must match for both partitions"); + error->universe_all(FLERR, + "Number of atoms and domain decomposition must be the same " + "on all partitions"); id_pe = std::string(id) + "_pe"; pe = modify->add_compute(id_pe + " all pe"); @@ -130,17 +132,19 @@ void FixAlchemy::init() memory->create(commbuf, sizeof(double) * nmax, "alchemy:nmax"); if (modify->get_fix_by_style("^balance").size() > 0) - error->all(FLERR, "Fix alchemy is not compatible with load balancing"); + error->universe_all(FLERR, "Fix alchemy is not compatible with load balancing"); if (modify->get_fix_by_style("^alchemy").size() > 1) - error->all(FLERR, "There may only one fix alchemy at a time"); + error->universe_all(FLERR, "There may only one fix alchemy at a time"); + + if (utils::strmatch(update->integrate_style, "^respa")) + error->universe_all(FLERR, "Must not use run style respa with fix alchemy"); ivar = input->variable->find(id_lambda.c_str()); if (ivar < 0) - error->universe_one(FLERR, fmt::format("Variable {} for fix alchemy does not exist", id_lambda)); + error->universe_one(FLERR, fmt::format("Fix alchemy variable {} does not exist", id_lambda)); if (!input->variable->equalstyle(ivar)) - error->universe_one(FLERR, - fmt::format("Variable {} for fix alchemy is invalid style", id_lambda)); + error->universe_one(FLERR, fmt::format("Fix alchemy variable {} is invalid style", id_lambda)); lambda = input->variable->compute_equal(ivar); // synchronize box dimensions, determine if resync during run will be needed. @@ -156,33 +160,60 @@ void FixAlchemy::init() void FixAlchemy::setup(int vflag) { - if (utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast(update->integrate); - respa->copy_flevel_f(ilevel_respa); - post_force_respa(vflag, ilevel_respa, 0); - respa->copy_f_flevel(ilevel_respa); - } else { - post_force(vflag); - } - if (universe->me == 0) { - double delta = update->ntimestep - update->beginstep; - if ((delta != 0.0) && (update->beginstep != update->endstep)) - delta /= update->endstep - update->beginstep; - progress = static_cast(delta*100.0); - auto msg = fmt::format("Starting alchemical transformation at {:>3d}%\n", progress); + progress = 0; + auto msg = fmt::format("Starting alchemical run\n"); if (universe->uscreen) fmt::print(universe->uscreen, msg); if (universe->ulogfile) fmt::print(universe->ulogfile, msg); } + + // recheck domain decomposition, atom ordering, and synchronize positions + + post_integrate(); + + // mix initial forces + + post_force(vflag); } /* ---------------------------------------------------------------------- */ void FixAlchemy::post_integrate() { + // re-check that we have the same domain decomposition on all ranks + const int nlocal = atom->nlocal; + int my_nlocal[2] = {0, 0}; + int all_nlocal[2] = {0, 0}; + my_nlocal[universe->iworld] = nlocal; + MPI_Allreduce(my_nlocal, all_nlocal, 2, MPI_INT, MPI_SUM, samerank); + int fail = (all_nlocal[0] == all_nlocal[1]) ? 0 : 1; + int allfail = 0; + MPI_Allreduce(&fail, &allfail, 1, MPI_INT, MPI_MAX, universe->uworld); + if (allfail) + error->universe_all(FLERR, + "Number of atoms and domain decomposition must be the same on " + "all partitions"); + + // check that we have the same atom order on all ranks + // re-use communication buffer for positions and forces + + tagint *tagbuf = (tagint *) commbuf; + tagint *tag = atom->tag; + if (universe->iworld == 0) { + for (int i = 0; i < nlocal; ++i) tagbuf[i] = tag[i]; + } + MPI_Bcast(tagbuf, nlocal, MPI_LMP_TAGINT, 0, samerank); + fail = allfail = 0; + if (universe->iworld > 0) { + for (int i = 0; i < nlocal; ++i) + if (tag[i] != tagbuf[i]) fail = 1; + } + MPI_Allreduce(&fail, &allfail, 1, MPI_INT, MPI_MAX, universe->uworld); + if (allfail) error->universe_all(FLERR, "Atoms must have the same order on all partitions"); + // synchronize atom positions - const int nall = atom->nlocal + atom->nghost; + const int nall = atom->nlocal; MPI_Bcast(&atom->x[0][0], 3 * nall, MPI_DOUBLE, 0, samerank); // synchronize box dimensions, if needed @@ -228,10 +259,10 @@ void FixAlchemy::post_force(int /*vflag*/) double delta = update->ntimestep - update->beginstep; if ((delta != 0.0) && (update->beginstep != update->endstep)) delta /= update->endstep - update->beginstep; - int status = static_cast(delta*100.0); + int status = static_cast(delta * 100.0); if ((status / 10) > (progress / 10)) { progress = status; - auto msg = fmt::format(" Alchemical transformation progress: {:>3d}%\n", progress); + auto msg = fmt::format(" Alchemical run progress: {:>3d}%\n", progress); if (universe->uscreen) fmt::print(universe->uscreen, msg); if (universe->ulogfile) fmt::print(universe->ulogfile, msg); } diff --git a/src/variable.cpp b/src/variable.cpp index 2ac9bd0364..fffd9b35c3 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -239,7 +239,7 @@ void Variable::set(int narg, char **arg) style[nvar] = WORLD; num[nvar] = narg - 2; if (num[nvar] != universe->nworlds) - error->all(FLERR,"World variable count doesn't match # of partitions"); + error->universe_all(FLERR,"World variable count doesn't match # of partitions"); which[nvar] = universe->iworld; pad[nvar] = 0; data[nvar] = new char*[num[nvar]]; From bc4da2afef42a5c9d23d87cf22422cd3ec81f115 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 28 Feb 2023 19:26:18 -0500 Subject: [PATCH 298/445] roll back change causing unittest failures --- src/variable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/variable.cpp b/src/variable.cpp index fffd9b35c3..2ac9bd0364 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -239,7 +239,7 @@ void Variable::set(int narg, char **arg) style[nvar] = WORLD; num[nvar] = narg - 2; if (num[nvar] != universe->nworlds) - error->universe_all(FLERR,"World variable count doesn't match # of partitions"); + error->all(FLERR,"World variable count doesn't match # of partitions"); which[nvar] = universe->iworld; pad[nvar] = 0; data[nvar] = new char*[num[nvar]]; From e59d08ee8b61f9d6a5cfe4fd83d2d4049389bdf8 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Mar 2023 10:22:07 +0200 Subject: [PATCH 299/445] Include method declaration in pair_lj_class2_coul_cut.h --- src/CLASS2/pair_lj_class2_coul_cut.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CLASS2/pair_lj_class2_coul_cut.h b/src/CLASS2/pair_lj_class2_coul_cut.h index ca5d6830f5..c4e9ba2ec9 100644 --- a/src/CLASS2/pair_lj_class2_coul_cut.h +++ b/src/CLASS2/pair_lj_class2_coul_cut.h @@ -40,6 +40,7 @@ class PairLJClass2CoulCut : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void *extract(const char *, int &) override; protected: From 85f3d6eaef260a47d118f1aa5737e2819116f61c Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Mar 2023 10:24:22 +0200 Subject: [PATCH 300/445] Implement born_matrix in pair_lj_class2_coul_cut.cpp --- src/CLASS2/pair_lj_class2_coul_cut.cpp | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/CLASS2/pair_lj_class2_coul_cut.cpp b/src/CLASS2/pair_lj_class2_coul_cut.cpp index d05eb9acae..3f66f1550f 100644 --- a/src/CLASS2/pair_lj_class2_coul_cut.cpp +++ b/src/CLASS2/pair_lj_class2_coul_cut.cpp @@ -32,6 +32,7 @@ using namespace MathConst; PairLJClass2CoulCut::PairLJClass2CoulCut(LAMMPS *lmp) : Pair(lmp) { + born_matrix_enable = 1; writedata = 1; centroidstressflag = CENTROID_SAME; } @@ -470,6 +471,37 @@ double PairLJClass2CoulCut::single(int i, int j, int itype, int jtype, double rs /* ---------------------------------------------------------------------- */ +void PairLJClass2CoulCut::born_matrix(int i, int j, int itype, int jtype, double rsq, + double factor_coul, double factor_lj, double &dupair, + double &du2pair) +{ + double rinv, r2inv, r3inv, r7inv, r8inv; + double du_lj, du2_lj, du_coul, du2_coul; + + double *q = atom->q; + double qqrd2e = force->qqrd2e; + + r2inv = 1.0 / rsq; + rinv = sqrt(r2inv); + r3inv = r2inv * rinv; + r7inv = r3inv * r3inv * rinv; + r8inv = r7inv * rinv; + + // Reminder: lj1[i][j] = 18.0 * epsilon[i][j] * pow(sigma[i][j], 9.0); + // Reminder: lj2[i][j] = 18.0 * epsilon[i][j] * pow(sigma[i][j], 6.0); + du_lj = r7inv * (lj2[itype][jtype] - lj1[itype][jtype] * r3inv); + du2_lj = r8inv * (10 * lj1[itype][jtype] * r3inv - 7 * lj2[itype][jtype]); + + // Reminder: qqrd2e converts q^2/r to energy w/ dielectric constant + du_coul = -qqrd2e * q[i] * q[j] * r2inv; + du2_coul = 2.0 * qqrd2e * q[i] * q[j] * r3inv; + + dupair = factor_lj * du_lj + factor_coul * du_coul; + du2pair = factor_lj * du2_lj + factor_coul * du2_coul; +} + +/* ---------------------------------------------------------------------- */ + void *PairLJClass2CoulCut::extract(const char *str, int &dim) { dim = 2; From e0cc7aad97325d4bd11dc39242289121eeb5e666 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Mar 2023 12:36:35 +0200 Subject: [PATCH 301/445] Include method declaration in pair_buck_coul_cut.h --- src/pair_buck_coul_cut.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pair_buck_coul_cut.h b/src/pair_buck_coul_cut.h index b5f19def38..3b13cb46b3 100644 --- a/src/pair_buck_coul_cut.h +++ b/src/pair_buck_coul_cut.h @@ -40,6 +40,7 @@ class PairBuckCoulCut : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void *extract(const char *, int &) override; protected: From 45009c8c66d6bf183b5be870a4d0d8a8e7d069c4 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Mar 2023 12:38:23 +0200 Subject: [PATCH 302/445] Implement born_matrix in pair_buck_coul_cut.cpp --- src/pair_buck_coul_cut.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index 4f85ccd430..369b77474f 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -36,6 +36,7 @@ using namespace MathConst; PairBuckCoulCut::PairBuckCoulCut(LAMMPS *lmp) : Pair(lmp) { + born_matrix_enable = 1; writedata = 1; } @@ -475,6 +476,43 @@ double PairBuckCoulCut::single(int i, int j, int itype, int jtype, double rsq, d /* ---------------------------------------------------------------------- */ +void PairBuckCoulCut::born_matrix(int i, int j, int itype, int jtype, double rsq, + double factor_coul, double factor_lj, double &dupair, + double &du2pair) +{ + double rinv, r2inv, r3inv, r6inv, r7inv, r8inv, r, rexp; + double du_lj, du2_lj, du_coul, du2_coul; + + double *q = atom->q; + double qqrd2e = force->qqrd2e; + + r = sqrt(rsq); + rexp = exp(-r*rhoinv[itype][jtype]); + + r2inv = 1.0 / rsq; + rinv = sqrt(r2inv); + r3inv = r2inv * rinv; + r6inv = r2inv * r2inv * r2inv; + r7inv = r6inv * rinv; + r8inv = r6inv * r2inv; + + // Reminder: buck1[itype][jtype] = a[itype][jtype]/rho[itype][jtype]; + // Reminder: buck2[itype][jtype] = 6.0*c[itype][jtype]; + + du_lj = buck2[itype][jtype] * r7inv - buck1[itype][jtype] * rexp; + du2_lj = (buck1[itype][jtype] / rho[itype][jtype]) * rexp - 7 * buck2[itype][jtype] * r8inv; + + // Reminder: qqrd2e converts q^2/r to energy w/ dielectric constant + + du_coul = -qqrd2e * q[i] * q[j] * r2inv; + du2_coul = 2.0 * qqrd2e * q[i] * q[j] * r3inv; + + dupair = factor_lj * du_lj + factor_coul * du_coul; + du2pair = factor_lj * du2_lj + factor_coul * du2_coul; +} + +/* ---------------------------------------------------------------------- */ + void *PairBuckCoulCut::extract(const char *str, int &dim) { dim = 2; From 060976bb262a559cb7d311e819e101985ea0154e Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Mar 2023 18:29:56 +0200 Subject: [PATCH 303/445] Include method declaration in pair_coul_cut.h --- src/pair_coul_cut.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pair_coul_cut.h b/src/pair_coul_cut.h index dc3a3df64f..0890a7da33 100644 --- a/src/pair_coul_cut.h +++ b/src/pair_coul_cut.h @@ -40,6 +40,7 @@ class PairCoulCut : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void *extract(const char *, int &) override; protected: From b8922ffe07451907179321c64879e4c6ef249326 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Mar 2023 18:30:51 +0200 Subject: [PATCH 304/445] Include method declaration in pair_coul_debye.h --- src/pair_coul_debye.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pair_coul_debye.h b/src/pair_coul_debye.h index 0f28efb46a..1d8b5760fa 100644 --- a/src/pair_coul_debye.h +++ b/src/pair_coul_debye.h @@ -32,6 +32,7 @@ class PairCoulDebye : public PairCoulCut { void write_restart_settings(FILE *) override; void read_restart_settings(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; protected: double kappa; From fa57857cc0d67744847166a3c572454ff1755ac7 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Mar 2023 18:32:11 +0200 Subject: [PATCH 305/445] Implement born_matrix in pair_coul_cut.cpp --- src/pair_coul_cut.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/pair_coul_cut.cpp b/src/pair_coul_cut.cpp index 9246e535fe..f0a749baa8 100644 --- a/src/pair_coul_cut.cpp +++ b/src/pair_coul_cut.cpp @@ -30,6 +30,7 @@ using namespace LAMMPS_NS; PairCoulCut::PairCoulCut(LAMMPS *lmp) : Pair(lmp) { + born_matrix_enable = 1; writedata = 1; } @@ -329,6 +330,31 @@ double PairCoulCut::single(int i, int j, int /*itype*/, int /*jtype*/, double rs /* ---------------------------------------------------------------------- */ +void PairCoulCut::born_matrix(int i, int j, int /*itype*/, int /*jtype*/, double rsq, + double factor_coul, double /*factor_lj*/, double &dupair, + double &du2pair) +{ + double rinv, r2inv, r3inv; + double du_coul, du2_coul; + + double *q = atom->q; + double qqrd2e = force->qqrd2e; + + r2inv = 1.0 / rsq; + rinv = sqrt(r2inv); + r3inv = r2inv * rinv; + + // Reminder: qqrd2e converts q^2/r to energy w/ dielectric constant + + du_coul = -qqrd2e * q[i] * q[j] * r2inv; + du2_coul = 2.0 * qqrd2e * q[i] * q[j] * r3inv; + + dupair = factor_coul * du_coul; + du2pair = factor_coul * du2_coul; +} + +/* ---------------------------------------------------------------------- */ + void *PairCoulCut::extract(const char *str, int &dim) { dim = 2; From 35a9771e235123c8be6124816d9377b1da3bf56b Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Wed, 1 Mar 2023 18:33:37 +0200 Subject: [PATCH 306/445] Implement born_matrix in pair_coul_debye.cpp --- src/pair_coul_debye.cpp | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/pair_coul_debye.cpp b/src/pair_coul_debye.cpp index 0f375f6e00..285b742074 100644 --- a/src/pair_coul_debye.cpp +++ b/src/pair_coul_debye.cpp @@ -26,7 +26,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -PairCoulDebye::PairCoulDebye(LAMMPS *lmp) : PairCoulCut(lmp) {} +PairCoulDebye::PairCoulDebye(LAMMPS *lmp) : PairCoulCut(lmp) +{ + born_matrix_enable = 1; +} /* ---------------------------------------------------------------------- */ @@ -177,3 +180,29 @@ double PairCoulDebye::single(int i, int j, int /*itype*/, int /*jtype*/, phicoul = force->qqrd2e * atom->q[i]*atom->q[j] * rinv * screening; return factor_coul*phicoul; } + +/* ---------------------------------------------------------------------- */ + +void PairCoulDebye::born_matrix(int i, int j, int /*itype*/, int /*jtype*/, double rsq, + double factor_coul, double /*factor_lj*/, double &dupair, + double &du2pair) +{ + double r, rinv, r2inv, r3inv, screening; + double du_coul, du2_coul; + + double *q = atom->q; + double qqrd2e = force->qqrd2e; + + r = sqrt(rsq); + r2inv = 1.0 / rsq; + rinv = sqrt(r2inv); + r3inv = r2inv * rinv; + screening = exp(-kappa*r); + + // Reminder: qqrd2e converts q^2/r to energy w/ dielectric constant + du_coul = -qqrd2e * q[i] * q[j] * r2inv * (1 + kappa * r) * screening; + du2_coul = qqrd2e * q[i] * q[j] * r3inv * (2 + 2 * kappa * r + kappa * kappa * rsq) * screening; + + dupair = factor_coul * du_coul; + du2pair = factor_coul * du2_coul; +} From 512eead15aa4b15a0a5982f085b0fbf4fced2dfe Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Wed, 1 Mar 2023 12:08:33 -0700 Subject: [PATCH 307/445] Fix logic issues in Kokkos neigh build --- src/KOKKOS/npair_kokkos.cpp | 150 ++++++++++++++++++------------------ src/KOKKOS/npair_kokkos.h | 10 --- 2 files changed, 76 insertions(+), 84 deletions(-) diff --git a/src/KOKKOS/npair_kokkos.cpp b/src/KOKKOS/npair_kokkos.cpp index 3ead5a2e34..d2db8ace57 100644 --- a/src/KOKKOS/npair_kokkos.cpp +++ b/src/KOKKOS/npair_kokkos.cpp @@ -243,6 +243,8 @@ void NPairKokkos::build(NeighList *list_) #endif if (GHOST) { + // assumes newton off + NPairKokkosBuildFunctorGhost f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); #ifdef LMP_KOKKOS_GPU if (ExecutionSpaceFromDevice::space == Device) { @@ -262,7 +264,7 @@ void NPairKokkos::build(NeighList *list_) #endif } else { if (SIZE) { - NPairKokkosBuildFunctorSize f(data,atoms_per_bin * 6 * sizeof(X_FLOAT) * factor); + NPairKokkosBuildFunctorSize f(data,atoms_per_bin * 6 * sizeof(X_FLOAT) * factor); #ifdef LMP_KOKKOS_GPU if (ExecutionSpaceFromDevice::space == Device) { int team_size = atoms_per_bin*factor; @@ -280,7 +282,7 @@ void NPairKokkos::build(NeighList *list_) Kokkos::parallel_for(nall, f); #endif } else { - NPairKokkosBuildFunctor f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); + NPairKokkosBuildFunctor f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); #ifdef LMP_KOKKOS_GPU if (ExecutionSpaceFromDevice::space == Device) { int team_size = atoms_per_bin*factor; @@ -402,7 +404,6 @@ KOKKOS_FUNCTION void NeighborKokkosExecute:: build_Item(const int &i) const { - /* if necessary, goto next page and add pages */ int n = 0; int which = 0; int moltemplate; @@ -422,24 +423,30 @@ void NeighborKokkosExecute:: const typename ArrayTypes::t_int_1d_const_um stencil = d_stencil; - // loop over all bins in neighborhood (includes ibin) - if (HalfNeigh) + // loop over rest of atoms in i's bin, ghosts are at end of linked list + // if j is owned atom, store it, since j is beyond i in linked list + // if j is ghost, only store if j coords are "above and to the right" of i + + if (HalfNeigh && Newton && !Tri) for (int m = 0; m < c_bincount(ibin); m++) { const int j = c_bins(ibin,m); - const int jtype = type(j); - //for same bin as atom i skip j if i==j and skip atoms "below and to the left" if using HalfNeighborlists - if ((j == i) || (HalfNeigh && !Newton && (j < i)) || - (HalfNeigh && Newton && ((j < i) || ((j >= nlocal) && - ((x(j, 2) < ztmp) || (x(j, 2) == ztmp && x(j, 1) < ytmp) || - (x(j, 2) == ztmp && x(j, 1) == ytmp && x(j, 0) < xtmp))))) - ) continue; + if (j >= nlocal) { + if (x(j,2) < ztmp) continue; + if (x(j,2) == ztmp) { + if (x(j,1) < ytmp) continue; + if (x(j,1) == ytmp && x(j,0) < xtmp) continue; + } + } + + const int jtype = type(j); if (exclude && exclusion(i,j,itype,jtype)) continue; const X_FLOAT delx = xtmp - x(j, 0); const X_FLOAT dely = ytmp - x(j, 1); const X_FLOAT delz = ztmp - x(j, 2); const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; + if (rsq <= cutneighsq(itype,jtype)) { if (molecular != Atom::ATOMIC) { if (!moltemplate) @@ -470,17 +477,16 @@ void NeighborKokkosExecute:: for (int k = 0; k < nstencil; k++) { const int jbin = ibin + stencil[k]; + if (HalfNeigh && Newton && !Tri && (ibin == jbin)) continue; // get subview of jbin - if (HalfNeigh && (ibin==jbin)) continue; //const ArrayTypes::t_int_1d_const_um =Kokkos::subview(bins,jbin,ALL); for (int m = 0; m < c_bincount(jbin); m++) { const int j = c_bins(jbin,m); - const int jtype = type(j); - if (HalfNeigh && !Newton && (j < i)) continue; - if (!HalfNeigh && j==i) continue; - if (Tri) { + if (HalfNeigh && !Newton && j <= i) continue; + if (!HalfNeigh && j == i) continue; + if (HalfNeigh && Newton && Tri) { if (x(j,2) < ztmp) continue; if (x(j,2) == ztmp) { if (x(j,1) < ytmp) continue; @@ -490,6 +496,8 @@ void NeighborKokkosExecute:: } } } + + const int jtype = type(j); if (exclude && exclusion(i,j,itype,jtype)) continue; const X_FLOAT delx = xtmp - x(j, 0); @@ -522,7 +530,6 @@ void NeighborKokkosExecute:: else n++; } } - } } @@ -617,31 +624,27 @@ void NeighborKokkosExecute::build_ItemGPU(typename Kokkos::TeamPolic dev.team_barrier(); #endif + // loop over rest of atoms in i's bin, ghosts are at end of linked list + // if j is owned atom, store it, since j is beyond i in linked list + // if j is ghost, only store if j coords are "above and to the right" of i + + if (HalfNeigh && Newton && !Tri) if (i >= 0 && i < nlocal) { #pragma unroll 4 for (int m = 0; m < bincount_current; m++) { int j = other_id[m]; - const int jtype = other_x[m + 3 * atoms_per_bin]; - //for same bin as atom i skip j if i==j and skip atoms "below and to the left" if using halfneighborlists - if ((j == i) || - (HalfNeigh && !Newton && (j < i)) || - (HalfNeigh && Newton && - ((j < i) || - ((j >= nlocal) && ((x(j, 2) < ztmp) || (x(j, 2) == ztmp && x(j, 1) < ytmp) || - (x(j, 2) == ztmp && x(j, 1) == ytmp && x(j, 0) < xtmp))))) - ) continue; - if (Tri) { - if (x(j,2) < ztmp) continue; - if (x(j,2) == ztmp) { - if (x(j,1) < ytmp) continue; - if (x(j,1) == ytmp) { - if (x(j,0) < xtmp) continue; - if (x(j,0) == xtmp && j <= i) continue; - } - } + if (j >= nlocal) { + if (x(j,2) < ztmp) continue; + if (x(j,2) == ztmp) { + if (x(j,1) < ytmp) continue; + if (x(j,1) == ytmp && x(j,0) < xtmp) continue; } + } + + const int jtype = other_x[m + 3 * atoms_per_bin]; if (exclude && exclusion(i,j,itype,jtype)) continue; + const X_FLOAT delx = xtmp - other_x[m]; const X_FLOAT dely = ytmp - other_x[m + atoms_per_bin]; const X_FLOAT delz = ztmp - other_x[m + 2 * atoms_per_bin]; @@ -683,7 +686,7 @@ void NeighborKokkosExecute::build_ItemGPU(typename Kokkos::TeamPolic for (int k = 0; k < nstencil; k++) { const int jbin = ibin + stencil[k]; - if (ibin == jbin) continue; + if (HalfNeigh && Newton && !Tri && (ibin == jbin)) continue; bincount_current = c_bincount[jbin]; int j = MY_II < bincount_current ? c_bins(jbin, MY_II) : -1; @@ -703,12 +706,10 @@ void NeighborKokkosExecute::build_ItemGPU(typename Kokkos::TeamPolic #pragma unroll 8 for (int m = 0; m < bincount_current; m++) { const int j = other_id[m]; - const int jtype = other_x[m + 3 * atoms_per_bin]; - //if(HalfNeigh && (j < i)) continue; - if (HalfNeigh && !Newton && (j < i)) continue; - if (!HalfNeigh && j==i) continue; - if (Tri) { + if (HalfNeigh && !Newton && j <= i) continue; + if (!HalfNeigh && j == i) continue; + if (HalfNeigh && Newton && Tri) { if (x(j,2) < ztmp) continue; if (x(j,2) == ztmp) { if (x(j,1) < ytmp) continue; @@ -718,6 +719,8 @@ void NeighborKokkosExecute::build_ItemGPU(typename Kokkos::TeamPolic } } } + + const int jtype = other_x[m + 3 * atoms_per_bin]; if (exclude && exclusion(i,j,itype,jtype)) continue; const X_FLOAT delx = xtmp - other_x[m]; @@ -1091,17 +1094,23 @@ void NeighborKokkosExecute:: const int mask_history = 3 << SBBITS; // loop over all bins in neighborhood (includes ibin) - if (HalfNeigh) + // loop over rest of atoms in i's bin, ghosts are at end of linked list + // if j is owned atom, store it, since j is beyond i in linked list + // if j is ghost, only store if j coords are "above and to the right" of i + + if (HalfNeigh && Newton && !Tri) for (int m = 0; m < c_bincount(ibin); m++) { const int j = c_bins(ibin,m); - const int jtype = type(j); - //for same bin as atom i skip j if i==j and skip atoms "below and to the left" if using HalfNeighborlists - if ((j == i) || (HalfNeigh && !Newton && (j < i)) || - (HalfNeigh && Newton && ((j < i) || ((j >= nlocal) && - ((x(j, 2) < ztmp) || (x(j, 2) == ztmp && x(j, 1) < ytmp) || - (x(j, 2) == ztmp && x(j, 1) == ytmp && x(j, 0) < xtmp))))) - ) continue; + if (j >= nlocal) { + if (x(j,2) < ztmp) continue; + if (x(j,2) == ztmp) { + if (x(j,1) < ytmp) continue; + if (x(j,1) == ytmp && x(j,0) < xtmp) continue; + } + } + + const int jtype = type(j); if (exclude && exclusion(i,j,itype,jtype)) continue; const X_FLOAT delx = xtmp - x(j, 0); @@ -1123,17 +1132,16 @@ void NeighborKokkosExecute:: for (int k = 0; k < nstencil; k++) { const int jbin = ibin + stencil[k]; + if (HalfNeigh && Newton && !Tri && (ibin == jbin)) continue; // get subview of jbin - if (HalfNeigh && (ibin==jbin)) continue; //const ArrayTypes::t_int_1d_const_um =Kokkos::subview(bins,jbin,ALL); for (int m = 0; m < c_bincount(jbin); m++) { const int j = c_bins(jbin,m); - const int jtype = type(j); - if (HalfNeigh && !Newton && (j < i)) continue; - if (!HalfNeigh && j==i) continue; - if (Tri) { + if (HalfNeigh && !Newton && j <= i) continue; + if (!HalfNeigh && j == i) continue; + if (HalfNeigh && Newton && Tri) { if (x(j,2) < ztmp) continue; if (x(j,2) == ztmp) { if (x(j,1) < ytmp) continue; @@ -1143,6 +1151,8 @@ void NeighborKokkosExecute:: } } } + + const int jtype = type(j); if (exclude && exclusion(i,j,itype,jtype)) continue; const X_FLOAT delx = xtmp - x(j, 0); @@ -1239,30 +1249,21 @@ void NeighborKokkosExecute::build_ItemSizeGPU(typename Kokkos::TeamP dev.team_barrier(); #endif + if (HalfNeigh && Newton && !Tri) if (i >= 0 && i < nlocal) { #pragma unroll 4 for (int m = 0; m < bincount_current; m++) { int j = other_id[m]; - const int jtype = other_x[m + 3 * atoms_per_bin]; - //for same bin as atom i skip j if i==j and skip atoms "below and to the left" if using halfneighborlists - if ((j == i) || - (HalfNeigh && !Newton && (j < i)) || - (HalfNeigh && Newton && - ((j < i) || - ((j >= nlocal) && ((x(j, 2) < ztmp) || (x(j, 2) == ztmp && x(j, 1) < ytmp) || - (x(j, 2) == ztmp && x(j, 1) == ytmp && x(j, 0) < xtmp))))) - ) continue; - if (Tri) { + if (j >= nlocal) { if (x(j,2) < ztmp) continue; if (x(j,2) == ztmp) { if (x(j,1) < ytmp) continue; - if (x(j,1) == ytmp) { - if (x(j,0) < xtmp) continue; - if (x(j,0) == xtmp && j <= i) continue; - } + if (x(j,1) == ytmp && x(j,0) < xtmp) continue; } } + + const int jtype = other_x[m + 3 * atoms_per_bin]; if (exclude && exclusion(i,j,itype,jtype)) continue; const X_FLOAT delx = xtmp - other_x[m]; const X_FLOAT dely = ytmp - other_x[m + atoms_per_bin]; @@ -1288,6 +1289,7 @@ void NeighborKokkosExecute::build_ItemSizeGPU(typename Kokkos::TeamP const int jbin = ibin + stencil[k]; if (ibin == jbin) continue; + if (HalfNeigh && Newton && !Tri && (ibin == jbin)) continue; bincount_current = c_bincount[jbin]; int j = MY_II < bincount_current ? c_bins(jbin, MY_II) : -1; @@ -1308,12 +1310,10 @@ void NeighborKokkosExecute::build_ItemSizeGPU(typename Kokkos::TeamP #pragma unroll 8 for (int m = 0; m < bincount_current; m++) { const int j = other_id[m]; - const int jtype = other_x[m + 3 * atoms_per_bin]; - if (HalfNeigh && (j < i)) continue; - if (HalfNeigh && !Newton && (j < i)) continue; - if (!HalfNeigh && j==i) continue; - if (Tri) { + if (HalfNeigh && !Newton && j <= i) continue; + if (!HalfNeigh && j == i) continue; + if (HalfNeigh && Newton && Tri) { if (x(j,2) < ztmp) continue; if (x(j,2) == ztmp) { if (x(j,1) < ytmp) continue; @@ -1323,6 +1323,8 @@ void NeighborKokkosExecute::build_ItemSizeGPU(typename Kokkos::TeamP } } } + + const int jtype = other_x[m + 3 * atoms_per_bin]; if (exclude && exclusion(i,j,itype,jtype)) continue; const X_FLOAT delx = xtmp - other_x[m]; diff --git a/src/KOKKOS/npair_kokkos.h b/src/KOKKOS/npair_kokkos.h index 78d735f829..5eb32951e7 100644 --- a/src/KOKKOS/npair_kokkos.h +++ b/src/KOKKOS/npair_kokkos.h @@ -73,21 +73,11 @@ NPairStyle(half/bin/newtoff/kk/device, NPairKokkosHalfBinNewtoffTriDevice, NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTOFF | NP_TRI); -typedef NPairKokkos NPairKokkosHalfBinNewtonGhostHost; -NPairStyle(half/bin/newton/ghost/kk/host, - NPairKokkosHalfBinNewtonGhostHost, - NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTON | NP_GHOST | NP_ORTHO | NP_TRI); - typedef NPairKokkos NPairKokkosHalfBinNewtoffGhostHost; NPairStyle(half/bin/newtoff/ghost/kk/host, NPairKokkosHalfBinNewtoffGhostHost, NP_BIN | NP_KOKKOS_HOST | NP_HALF | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI); -typedef NPairKokkos NPairKokkosHalfBinNewtonGhostDevice; -NPairStyle(half/bin/newton/ghost/kk/device, - NPairKokkosHalfBinNewtonGhostDevice, - NP_KOKKOS_DEVICE | NP_HALF | NP_BIN | NP_NEWTON | NP_GHOST | NP_ORTHO | NP_TRI); - typedef NPairKokkos NPairKokkosHalfBinNewtoffGhostDevice; NPairStyle(half/bin/newtoff/ghost/kk/device, NPairKokkosHalfBinNewtoffGhostDevice, From ef6f4465af372d0b421c0b1b9c20551acadc03b6 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Wed, 1 Mar 2023 13:05:03 -0700 Subject: [PATCH 308/445] Need to keep check for newton on --- src/KOKKOS/npair_kokkos.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/KOKKOS/npair_kokkos.cpp b/src/KOKKOS/npair_kokkos.cpp index d2db8ace57..ee8da12c52 100644 --- a/src/KOKKOS/npair_kokkos.cpp +++ b/src/KOKKOS/npair_kokkos.cpp @@ -431,6 +431,7 @@ void NeighborKokkosExecute:: for (int m = 0; m < c_bincount(ibin); m++) { const int j = c_bins(ibin,m); + if (j <= i) continue; if (j >= nlocal) { if (x(j,2) < ztmp) continue; if (x(j,2) == ztmp) { @@ -634,6 +635,7 @@ void NeighborKokkosExecute::build_ItemGPU(typename Kokkos::TeamPolic for (int m = 0; m < bincount_current; m++) { int j = other_id[m]; + if (j <= i) continue; if (j >= nlocal) { if (x(j,2) < ztmp) continue; if (x(j,2) == ztmp) { @@ -1102,6 +1104,7 @@ void NeighborKokkosExecute:: for (int m = 0; m < c_bincount(ibin); m++) { const int j = c_bins(ibin,m); + if (j <= i) continue; if (j >= nlocal) { if (x(j,2) < ztmp) continue; if (x(j,2) == ztmp) { @@ -1255,6 +1258,7 @@ void NeighborKokkosExecute::build_ItemSizeGPU(typename Kokkos::TeamP for (int m = 0; m < bincount_current; m++) { int j = other_id[m]; + if (j <= i) continue; if (j >= nlocal) { if (x(j,2) < ztmp) continue; if (x(j,2) == ztmp) { From 2ccfe635cef4fec352f32aeb58a047e1fbd99ac2 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Wed, 1 Mar 2023 16:38:50 -0600 Subject: [PATCH 309/445] Removed the outdated CUDA_PROXY flag, using CUDA_MPS_SUPPORT consistently in CMake and traditional builds --- cmake/Modules/Packages/GPU.cmake | 2 +- lib/gpu/Makefile.cuda | 2 +- lib/gpu/Makefile.cuda_mps | 2 +- lib/gpu/Makefile.oneapi | 2 +- lib/gpu/README | 4 +--- lib/gpu/lal_device.cpp | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index c873af8d9f..8ac1decc86 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -62,7 +62,7 @@ if(GPU_API STREQUAL "CUDA") if(CUDPP_OPT) message(FATAL_ERROR "Must use -DCUDPP_OPT=OFF with -DCUDA_MPS_SUPPORT=ON") endif() - set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY -DCUDA_MPS_SUPPORT") + set(GPU_CUDA_MPS_FLAGS "-DCUDA_MPS_SUPPORT") endif() set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)") diff --git a/lib/gpu/Makefile.cuda b/lib/gpu/Makefile.cuda index e02501d080..be8003e02e 100644 --- a/lib/gpu/Makefile.cuda +++ b/lib/gpu/Makefile.cuda @@ -54,7 +54,7 @@ BIN2C = $(CUDA_HOME)/bin/bin2c CUDR_CPP = mpicxx -DMPI_GERYON -DUCL_NO_EXIT -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1 -fPIC CUDR_OPTS = -O2 $(LMP_INC) -CUDR = $(CUDR_CPP) $(CUDR_OPTS) $(CUDA_PROXY) $(CUDA_PRECISION) $(CUDA_INCLUDE) \ +CUDR = $(CUDR_CPP) $(CUDR_OPTS) $(CUDA_MPS) $(CUDA_PRECISION) $(CUDA_INCLUDE) \ $(CUDPP_OPT) # Headers for Geryon diff --git a/lib/gpu/Makefile.cuda_mps b/lib/gpu/Makefile.cuda_mps index 45d1b3f678..06d2ef0339 100644 --- a/lib/gpu/Makefile.cuda_mps +++ b/lib/gpu/Makefile.cuda_mps @@ -30,7 +30,7 @@ AR = ar BSH = /bin/sh CUDPP_OPT = -CUDA_MPS = -DCUDA_PROXY -DCUDA_MPS_SUPPORT +CUDA_MPS = -DCUDA_MPS_SUPPORT # device code compiler and settings diff --git a/lib/gpu/Makefile.oneapi b/lib/gpu/Makefile.oneapi index d0ed78d0c4..9d11a0c4b0 100644 --- a/lib/gpu/Makefile.oneapi +++ b/lib/gpu/Makefile.oneapi @@ -18,7 +18,7 @@ OCL_CPP = mpiicpc -std=c++11 -diag-disable=10441 -DMPICH_IGNORE_CXX_SEEK \ $(LMP_INC) $(OCL_INC) $(CPP_OPT) OCL_LINK = -L$(ONEAPI_ROOT)/compiler/latest/linux/lib -lOpenCL OCL_PREC = -D_SINGLE_DOUBLE -OCL_TUNE = -DMPI_GERYON -DCUDA_PROXY -DGERYON_NUMA_FISSION -DUCL_NO_EXIT +OCL_TUNE = -DMPI_GERYON -DGERYON_NUMA_FISSION -DUCL_NO_EXIT BIN_DIR = ./ OBJ_DIR = ./ diff --git a/lib/gpu/README b/lib/gpu/README index ab7032b64d..51b21960ae 100644 --- a/lib/gpu/README +++ b/lib/gpu/README @@ -205,8 +205,7 @@ $(CUDA_HOME)/lib64/stubs), that can be used for linking. Best performance with the GPU library is typically with multiple MPI processes sharing the same GPU cards. For NVIDIA, this is most efficient with CUDA MPS enabled. To prevent runtime errors for GPUs configured in exclusive process -mode with MPS, the GPU library should be build with either of the equivalent --DCUDA_MPS_SUPPORT or -DCUDA_PROXY flags. +mode with MPS, the GPU library should be build with the -DCUDA_MPS_SUPPORT flag. ------------------------------------------------------------------------------ HIP BUILD NOTES @@ -244,7 +243,6 @@ _SINGLE_SINGLE Build library for single precision mode _SINGLE_DOUBLE Build library for mixed precision mode _DOUBLE_DOUBLE Build library for double precision mode CUDA_MPS_SUPPORT Do not generate errors for exclusive mode for CUDA -CUDA_PROXY Same as above MPI_GERYON Library should use MPI_Abort for unhandled errors GERYON_NUMA_FISSION Accelerators with main memory NUMA are split into multiple virtual accelerators for each NUMA node diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index dd3ce15827..891d67913e 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -277,7 +277,7 @@ int DeviceT::init_device(MPI_Comm /*world*/, MPI_Comm replica, const int ngpu, MPI_Comm_split(node_comm,my_gpu,0,&_comm_gpu); MPI_Comm_rank(_comm_gpu,&_gpu_rank); - #if !defined(CUDA_PROXY) && !defined(CUDA_MPS_SUPPORT) + #if !defined(CUDA_MPS_SUPPORT) if (_procs_per_gpu>1 && !gpu->sharing_supported(my_gpu)) return -7; #endif From a715a56afebcd35a7548ee6f1afd0f520ca2596e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 1 Mar 2023 20:41:00 -0500 Subject: [PATCH 310/445] fix typo --- doc/src/fix_wall.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/fix_wall.rst b/doc/src/fix_wall.rst index 7b38b6035c..2ca215bf71 100644 --- a/doc/src/fix_wall.rst +++ b/doc/src/fix_wall.rst @@ -371,7 +371,7 @@ is *no*, which means the system must be non-periodic when using a wall. But you may wish to use a periodic box. E.g. to allow some particles to interact with the wall via the fix group-ID, and others to pass through it and wrap around a periodic box. In this case you should ensure that -the wall if sufficiently far enough away from the box boundary. If you +the wall is sufficiently far enough away from the box boundary. If you do not, then particles may interact with both the wall and with periodic images on the other side of the box, which is probably not what you want. From 04d30329145047c0df69573a1ecd9ba35ef09cdb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 1 Mar 2023 20:41:13 -0500 Subject: [PATCH 311/445] improve error messages --- src/read_data.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/read_data.cpp b/src/read_data.cpp index 59db1b6937..6785e51ecc 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -1985,7 +1985,8 @@ void ReadData::paircoeffs() next = strchr(buf, '\n'); *next = '\0'; parse_coeffs(buf, nullptr, 1, 2, toffset, tlabelflag, lmap->lmap2lmap.atom); - if (ncoeffarg == 0) error->all(FLERR, "Unexpected empty line in PairCoeffs section"); + if (ncoeffarg == 0) + error->all(FLERR, "Unexpected empty line in PairCoeffs section. Expected {} lines.", ntypes); force->pair->coeff(ncoeffarg, coeffarg); buf = next + 1; } @@ -2016,7 +2017,9 @@ void ReadData::pairIJcoeffs() next = strchr(buf, '\n'); *next = '\0'; parse_coeffs(buf, nullptr, 0, 2, toffset, tlabelflag, lmap->lmap2lmap.atom); - if (ncoeffarg == 0) error->all(FLERR, "Unexpected empty line in PairCoeffs section"); + if (ncoeffarg == 0) + error->all(FLERR, "Unexpected empty line in PairIJCoeffs section. " + "Expected {} lines.", (ntypes-1)*ntypes); force->pair->coeff(ncoeffarg, coeffarg); buf = next + 1; } @@ -2045,7 +2048,8 @@ void ReadData::bondcoeffs() next = strchr(buf, '\n'); *next = '\0'; parse_coeffs(buf, nullptr, 0, 1, boffset, blabelflag, lmap->lmap2lmap.bond); - if (ncoeffarg == 0) error->all(FLERR, "Unexpected empty line in BondCoeffs section"); + if (ncoeffarg == 0) + error->all(FLERR, "Unexpected empty line in BondCoeffs section. Expected {} lines.", nbondtypes); force->bond->coeff(ncoeffarg, coeffarg); buf = next + 1; } From c5c787ca5c04075507de7c0c8bc9d99baea9b00f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 1 Mar 2023 20:41:36 -0500 Subject: [PATCH 312/445] better align with docs bundled with the MSCG library --- doc/src/fix_mscg.rst | 66 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/doc/src/fix_mscg.rst b/doc/src/fix_mscg.rst index 5e9bc520b5..3255f3fbe9 100644 --- a/doc/src/fix_mscg.rst +++ b/doc/src/fix_mscg.rst @@ -40,15 +40,15 @@ Description This fix applies the Multi-Scale Coarse-Graining (MSCG) method to snapshots from a dump file to generate potentials for coarse-grained -simulations from all-atom simulations, using a force-matching -technique (:ref:`Izvekov `, :ref:`Noid `). +simulations from all-atom simulations, using a force-matching technique +(:ref:`Izvekov `, :ref:`Noid `). -It makes use of the MS-CG library, written and maintained by Greg -Voth's group at the University of Chicago, which is freely available -on their `MS-CG GitHub site `_. See instructions -on obtaining and installing the MS-CG library in the src/MSCG/README -file, which must be done before you build LAMMPS with this fix command -and use the command in a LAMMPS input script. +It makes use of the MS-CG library, written and maintained by Greg Voth's +group at the University of Chicago, which is freely available on their +`MS-CG GitHub site `_. +See instructions on obtaining and installing the MS-CG library in the +src/MSCG/README file, which must be done before you build LAMMPS with +this fix command and use the command in a LAMMPS input script. An example script using this fix is provided the examples/mscg directory. @@ -65,15 +65,18 @@ simulations is as follows: 6. Check the results of the force matching. 7. Run coarse-grained simulations using the new coarse-grained potentials. -This fix can perform the range finding and force matching steps 4 and -5 of the above workflow when used in conjunction with the -:doc:`rerun ` command. It does not perform steps 1-3 and 6-7. +This fix can perform the range finding and force matching steps 4 and 5 +of the above workflow when used in conjunction with the :doc:`rerun +` command. It does not perform steps 1-3 and 6-7. -Step 2 can be performed using a Python script (what is the name?) -provided with the MS-CG library which defines the coarse-grained model -and converts a standard LAMMPS dump file for an all-atom simulation -(step 1) into a LAMMPS dump file which has the positions of and forces -on the coarse-grained beads. +Step 2 can be performed using a Python script (cgmap), which defines the +coarse-grained model and converts a standard LAMMPS dump file for an +all-atom simulation (step 1) into a LAMMPS dump file which has the +positions of and forces on the coarse-grained beads. To use cgmap the +following repositories need to be downloaded and installed. + +#. The custom lammpsdata branch of mdtraj from https://github.com/hockyg/mdtraj/tree/lammpsdata +#. The master branch of cgmap from https://github.com/uchicago-voth/cgmap In step 3, an input file named "control.in" is needed by the MS-CG library which sets parameters for the range finding and force matching @@ -83,12 +86,12 @@ info on this file. When this fix is used to perform steps 4 and 5, the MS-CG library also produces additional output files. The range finder functionality -(step 4) outputs files defining pair and bonded interaction ranges. -The force matching functionality (step 5) outputs tabulated force -files for every interaction in the system. Other diagnostic files can -also be output depending on the parameters in the MS-CG library input -script. Again, see the documentation provided with the MS-CG library -for more info. +(step 4) outputs files defining pair and bonded interaction ranges. The +force matching functionality (step 5) outputs tabulated force files for +every interaction in the system. Other diagnostic files can also be +output depending on the parameters in the MS-CG library input script. +Again, see the documentation provided with the MS-CG library for more +info. ---------- @@ -97,8 +100,8 @@ be invoked. If *on*, the step 4 range finder functionality is invoked. *off*, the step 5 force matching functionality is invoked. If the *name* keyword is used, string names are defined to associate -with the integer atom types in LAMMPS. *Ntype* names must be -provided, one for each atom type (1-Ntype). +with the integer atom types in LAMMPS. *Ntype* names must be provided, +one for each atom type (1-Ntype). The *max* keyword specifies the maximum number of bonds, angles, and dihedrals a bead can have in the coarse-grained model. @@ -107,16 +110,13 @@ Restrictions """""""""""" This fix is part of the MSCG package. It is only enabled if LAMMPS was -built with that package. See the :doc:`Build package ` -doc page for more info. +built with that package. Building the MSCG package also requires +external libraries. See the :doc:`Build_package` and :doc:`Build_extras` +pages for more info. -The MS-CG library uses C++11, which may not be supported by older -compilers. The MS-CG library also has some additional numeric library -dependencies, which are described in its documentation. - -Currently, the MS-CG library is not setup to run in parallel with MPI, -so this fix can only be used in a serial LAMMPS build and run -on a single processor. +Currently, the MS-CG library is not set up to run in parallel with MPI, +so this fix can only be used in a serial LAMMPS build and run on a +single processor. Related commands """""""""""""""" From 8a1771aa61011195e14f8e1c6b640b1159cc6310 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 1 Mar 2023 20:52:15 -0500 Subject: [PATCH 313/445] implement documented pair style requirements for DPD-MESO intgreation fixes --- doc/src/fix_mvv_dpd.rst | 30 +++++++++++++++++------------- doc/src/pair_mesodpd.rst | 2 +- src/DPD-MESO/fix_mvv_dpd.cpp | 9 +++++++-- src/DPD-MESO/fix_mvv_edpd.cpp | 9 +++++++-- src/DPD-MESO/fix_mvv_tdpd.cpp | 8 ++++++-- 5 files changed, 38 insertions(+), 20 deletions(-) diff --git a/doc/src/fix_mvv_dpd.rst b/doc/src/fix_mvv_dpd.rst index efabab2183..c2f8a50391 100644 --- a/doc/src/fix_mvv_dpd.rst +++ b/doc/src/fix_mvv_dpd.rst @@ -65,33 +65,37 @@ a default value of 0.5 is used, which effectively reproduces the standard velocity-Verlet (VV) scheme. For more details, see :ref:`Groot `. -Fix *mvv/dpd* updates the position and velocity of each atom. It can -be used with the :doc:`pair_style mdpd ` command or other +Fix *mvv/dpd* updates the position and velocity of each atom. It can be +used with the :doc:`pair_style mdpd ` command or other pair styles such as :doc:`pair dpd `. -Fix *mvv/edpd* updates the per-atom temperature, in addition to -position and velocity, and must be used with the :doc:`pair_style edpd ` command. +Fix *mvv/edpd* updates the per-atom temperature, in addition to position +and velocity, and must be used with the :doc:`pair_style edpd +` command. -Fix *mvv/tdpd* updates the per-atom chemical concentration, in -addition to position and velocity, and must be used with the -:doc:`pair_style tdpd ` command. +Fix *mvv/tdpd* updates the per-atom chemical concentration, in addition +to position and velocity, and must be used with the :doc:`pair_style +tdpd ` command. ---------- Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" -No information about this fix is written to :doc:`binary restart files `. None of the :doc:`fix_modify ` options -are relevant to this fix. No global or per-atom quantities are stored -by this fix for access by various :doc:`output commands `. +No information about this fix is written to :doc:`binary restart files +`. None of the :doc:`fix_modify ` options are +relevant to this fix. No global or per-atom quantities are stored by +this fix for access by various :doc:`output commands `. No parameter of this fix can be used with the *start/stop* keywords of -the :doc:`run ` command. This fix is not invoked during :doc:`energy minimization `. +the :doc:`run ` command. This fix is not invoked during +:doc:`energy minimization `. Restrictions """""""""""" -This fix is part of the DPD-MESO package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package ` page for more info. +These fixes are part of the DPD-MESO package. They are only enabled if +LAMMPS was built with that package. See the :doc:`Build package +` page for more info. Related commands """""""""""""""" diff --git a/doc/src/pair_mesodpd.rst b/doc/src/pair_mesodpd.rst index e5cd2643dd..5d244f3b1d 100644 --- a/doc/src/pair_mesodpd.rst +++ b/doc/src/pair_mesodpd.rst @@ -299,7 +299,7 @@ Restrictions """""""""""" The pair styles *edpd*, *mdpd*, *mdpd/rhosum* and *tdpd* are part of -the DPD-MESO package. It is only enabled if LAMMPS was built with +the DPD-MESO package. They are only enabled if LAMMPS was built with that package. See the :doc:`Build package ` page for more info. diff --git a/src/DPD-MESO/fix_mvv_dpd.cpp b/src/DPD-MESO/fix_mvv_dpd.cpp index c475fa6651..18c88bd293 100644 --- a/src/DPD-MESO/fix_mvv_dpd.cpp +++ b/src/DPD-MESO/fix_mvv_dpd.cpp @@ -22,11 +22,13 @@ ------------------------------------------------------------------------- */ #include "fix_mvv_dpd.h" -#include + #include "atom.h" +#include "error.h" #include "force.h" #include "update.h" -#include "error.h" + +#include using namespace LAMMPS_NS; using namespace FixConst; @@ -65,6 +67,9 @@ void FixMvvDPD::init() dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; + + if (!force->pair_match("^edpd",0) && !force->pair_match("^dpd",0)) + error->all(FLERR, "Must use a dpd or edpd pair style with fix mvv/edpd"); } /* ---------------------------------------------------------------------- diff --git a/src/DPD-MESO/fix_mvv_edpd.cpp b/src/DPD-MESO/fix_mvv_edpd.cpp index ac8ee858e3..03dd048119 100644 --- a/src/DPD-MESO/fix_mvv_edpd.cpp +++ b/src/DPD-MESO/fix_mvv_edpd.cpp @@ -31,11 +31,13 @@ ------------------------------------------------------------------------- */ #include "fix_mvv_edpd.h" -#include + #include "atom.h" +#include "error.h" #include "force.h" #include "update.h" -#include "error.h" + +#include using namespace LAMMPS_NS; using namespace FixConst; @@ -71,6 +73,9 @@ void FixMvvEDPD::init() { dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; + + if (!force->pair_match("^edpd",0)) + error->all(FLERR, "Must use pair style edpd with fix mvv/edpd"); } /* ---------------------------------------------------------------------- diff --git a/src/DPD-MESO/fix_mvv_tdpd.cpp b/src/DPD-MESO/fix_mvv_tdpd.cpp index d579dc778a..f3894da214 100644 --- a/src/DPD-MESO/fix_mvv_tdpd.cpp +++ b/src/DPD-MESO/fix_mvv_tdpd.cpp @@ -27,11 +27,13 @@ ------------------------------------------------------------------------- */ #include "fix_mvv_tdpd.h" -#include + #include "atom.h" +#include "error.h" #include "force.h" #include "update.h" -#include "error.h" + +#include using namespace LAMMPS_NS; using namespace FixConst; @@ -69,6 +71,8 @@ void FixMvvTDPD::init() { dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; + if (!force->pair_match("^tdpd",0)) + error->all(FLERR, "Must use pair style tdpd with fix mvv/tdpd"); } /* ---------------------------------------------------------------------- From e4e994f1b1bf9d57912dd26833eeed2280574635 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 1 Mar 2023 20:59:48 -0500 Subject: [PATCH 314/445] add missing versionadded tags --- doc/src/fix_wall.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/src/fix_wall.rst b/doc/src/fix_wall.rst index 2ca215bf71..cdf3c16cef 100644 --- a/doc/src/fix_wall.rst +++ b/doc/src/fix_wall.rst @@ -194,6 +194,8 @@ For style *wall/morse*, the energy E is given by a Morse potential: E = D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] \qquad r < r_c +.. versionadded:: TBD + For style *wall/lepton*, the energy E is provided as an Lepton expression string using "r" as the distance variable. The `Lepton library `_, that the *wall/lepton* @@ -213,6 +215,8 @@ spring as in fix *wall/harmonic* with a force constant *K* (same as :math:`\epsilon` above) of 100 energy units. More details on the Lepton expression strings are given below. +.. versionadded:: TBD + For style *wall/table*, the energy E and forces are determined from interpolation tables listed in one or more files as a function of distance. The interpolation tables are used to evaluate energy and From 63a391a649511a28aad1d3b3041a6dc3fe06403a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 1 Mar 2023 21:05:22 -0500 Subject: [PATCH 315/445] replace leftover -DCUDA_PROXY --- doc/src/Build_extras.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index c4f9bf6aff..ac6a27464b 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -274,7 +274,7 @@ To enable GPU binning via CUDA performance primitives set the Makefile variable most modern GPUs. To support the CUDA multiprocessor server you can set the define -``-DCUDA_PROXY``. Please note that in this case you must **not** use +``-DCUDA_MPS_SUPPORT``. Please note that in this case you must **not** use the CUDA performance primitives and thus set the variable ``CUDPP_OPT`` to empty. From de466cf998d20c8689d4c6773c4011b6379f4c3d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 2 Mar 2023 07:31:33 -0500 Subject: [PATCH 316/445] improve documentation of the use of verlet/split run style. reformat. --- doc/src/run_style.rst | 154 +++++++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 68 deletions(-) diff --git a/doc/src/run_style.rst b/doc/src/run_style.rst index 423ab762b3..0804ce5c82 100644 --- a/doc/src/run_style.rst +++ b/doc/src/run_style.rst @@ -78,27 +78,41 @@ processors. See the :doc:`-partition command-line switch ` for info on how to run LAMMPS with multiple partitions. Specifically, this style performs all computation except the -:doc:`kspace_style ` portion of the force field on the first -partition. This include the :doc:`pair style `, :doc:`bond style `, :doc:`neighbor list building `, -:doc:`fixes ` including time integration, and output. The -:doc:`kspace_style ` portion of the calculation is +:doc:`kspace_style ` portion of the force field on the +first partition. This include the :doc:`pair style `, +:doc:`bond style `, :doc:`neighbor list building +`, :doc:`fixes ` including time integration, and output. +The :doc:`kspace_style ` portion of the calculation is performed on the second partition. -This is most useful for the PPPM kspace_style when its performance on -a large number of processors degrades due to the cost of communication -in its 3d FFTs. In this scenario, splitting your P total processors -into 2 subsets of processors, P1 in the first partition and P2 in the -second partition, can enable your simulation to run faster. This is -because the long-range forces in PPPM can be calculated at the same -time as pairwise and bonded forces are being calculated, and the FFTs -can actually speed up when running on fewer processors. +This can lead to a significant speedup, if the number of processors can +be easily increased and the fraction of time is spent in computing +Kspace interactions is significant, too. The two partitions may have a +different number of processors. This is most useful for the PPPM +kspace_style when its performance on a large number of processors +degrades due to the cost of communication in its 3d FFTs. In this +scenario, splitting your P total processors into 2 subsets of +processors, P1 in the first partition and P2 in the second partition, +can enable your simulation to run faster. This is because the +long-range forces in PPPM can be calculated at the same time as pairwise +and bonded forces are being calculated *and* the parallel 3d FFTs can be +faster to compute when running on fewer processors. Please note that +the scenario of using fewer MPI processes to reduce communication +overhead can also be implemented through using MPI with OpenMP threads +via the INTEL, KOKKOS, or OPENMP package. This alternative option is +typically more effective in case of a fixed number of available +processors and less complex to execute. -To use this style, you must define 2 partitions where P1 is a multiple -of P2. Typically having P1 be 3x larger than P2 is a good choice. -The 3d processor layouts in each partition must overlay in the -following sense. If P1 is a Px1 by Py1 by Pz1 grid, and P2 = Px2 by -Py2 by Pz2, then Px1 must be an integer multiple of Px2, and similarly -for Py1 a multiple of Py2, and Pz1 a multiple of Pz2. +To use the *verlet/split* style, you must define 2 partitions with the +:doc:`-partition command-line switch `, where partition P1 +is either the same size or an integer multiple of the size of the +partition P2. Typically having P1 be 3x larger than P2 is a good +choice, since the (serial) performance of LAMMPS is often best if the +time spent in the ``Pair`` computation versus ``Kspace`` is a 3:1 split. +The 3d processor layouts in each partition must overlay in the following +sense. If P1 is a Px1 by Py1 by Pz1 grid, and P2 = Px2 by Py2 by Pz2, +then Px1 must be an integer multiple of Px2, and similarly for Py1 a +multiple of Py2, and Pz1 a multiple of Pz2. Typically the best way to do this is to let the first partition choose its own optimal layout, then require the second partition's layout to @@ -122,9 +136,10 @@ of 60 and 15 processors each: When you run in 2-partition mode with the *verlet/split* style, the thermodynamic data for the entire simulation will be output to the log and screen file of the first partition, which are log.lammps.0 and -screen.0 by default; see the :doc:`-plog and -pscreen command-line switches ` to change this. The log and screen file -for the second partition will not contain thermodynamic output beyond the -first timestep of the run. +screen.0 by default; see the :doc:`-plog and -pscreen command-line +switches ` to change this. The log and screen file for the +second partition will not contain thermodynamic output beyond the first +timestep of the run. See the :doc:`Accelerator packages ` page for performance details of the speed-up offered by the *verlet/split* @@ -137,70 +152,73 @@ options to support this, and strategies are discussed in :doc:`Section ---------- The *respa* style implements the rRESPA multi-timescale integrator -:ref:`(Tuckerman) ` with N hierarchical levels, where level 1 is -the innermost loop (shortest timestep) and level N is the outermost +:ref:`(Tuckerman) ` with N hierarchical levels, where level +1 is the innermost loop (shortest timestep) and level N is the outermost loop (largest timestep). The loop factor arguments specify what the -looping factor is between levels. N1 specifies the number of -iterations of level 1 for a single iteration of level 2, N2 is the -iterations of level 2 per iteration of level 3, etc. N-1 looping -parameters must be specified. +looping factor is between levels. N1 specifies the number of iterations +of level 1 for a single iteration of level 2, N2 is the iterations of +level 2 per iteration of level 3, etc. N-1 looping parameters must be +specified. -Thus with a 4-level respa setting of "2 2 2" for the 3 loop factors, -you could choose to have bond interactions computed 8x per large -timestep, angle interactions computed 4x, pair interactions computed -2x, and long-range interactions once per large timestep. +Thus with a 4-level respa setting of "2 2 2" for the 3 loop factors, you +could choose to have bond interactions computed 8x per large timestep, +angle interactions computed 4x, pair interactions computed 2x, and +long-range interactions once per large timestep. The :doc:`timestep ` command sets the large timestep for the outermost rRESPA level. Thus if the 3 loop factors are "2 2 2" for -4-level rRESPA, and the outer timestep is set to 4.0 fs, then the -inner timestep would be 8x smaller or 0.5 fs. All other LAMMPS -commands that specify number of timesteps (e.g. :doc:`thermo ` -for thermo output every N steps, :doc:`neigh_modify delay/every ` parameters, :doc:`dump ` every N -steps, etc) refer to the outermost timesteps. +4-level rRESPA, and the outer timestep is set to 4.0 fs, then the inner +timestep would be 8x smaller or 0.5 fs. All other LAMMPS commands that +specify number of timesteps (e.g. :doc:`thermo ` for thermo +output every N steps, :doc:`neigh_modify delay/every ` +parameters, :doc:`dump ` every N steps, etc) refer to the +outermost timesteps. -The rRESPA keywords enable you to specify at what level of the -hierarchy various forces will be computed. If not specified, the -defaults are that bond forces are computed at level 1 (innermost -loop), angle forces are computed where bond forces are, dihedral -forces are computed where angle forces are, improper forces are -computed where dihedral forces are, pair forces are computed at the -outermost level, and kspace forces are computed where pair forces are. -The inner, middle, outer forces have no defaults. +The rRESPA keywords enable you to specify at what level of the hierarchy +various forces will be computed. If not specified, the defaults are +that bond forces are computed at level 1 (innermost loop), angle forces +are computed where bond forces are, dihedral forces are computed where +angle forces are, improper forces are computed where dihedral forces +are, pair forces are computed at the outermost level, and kspace forces +are computed where pair forces are. The inner, middle, outer forces +have no defaults. For fixes that support it, the rRESPA level at which a given fix is -active, can be selected through the :doc:`fix_modify ` command. +active, can be selected through the :doc:`fix_modify ` +command. -The *inner* and *middle* keywords take additional arguments for -cutoffs that are used by the pairwise force computations. If the 2 -cutoffs for *inner* are 5.0 and 6.0, this means that all pairs up to -6.0 apart are computed by the inner force. Those between 5.0 and 6.0 -have their force go ramped to 0.0 so the overlap with the next regime -(middle or outer) is smooth. The next regime (middle or outer) will -compute forces for all pairs from 5.0 outward, with those from 5.0 to -6.0 having their value ramped in an inverse manner. +The *inner* and *middle* keywords take additional arguments for cutoffs +that are used by the pairwise force computations. If the 2 cutoffs for +*inner* are 5.0 and 6.0, this means that all pairs up to 6.0 apart are +computed by the inner force. Those between 5.0 and 6.0 have their force +go ramped to 0.0 so the overlap with the next regime (middle or outer) +is smooth. The next regime (middle or outer) will compute forces for +all pairs from 5.0 outward, with those from 5.0 to 6.0 having their +value ramped in an inverse manner. Note that you can use *inner* and *outer* without using *middle* to split the pairwise computations into two portions instead of three. -Unless you are using a very long pairwise cutoff, a 2-way split is -often faster than a 3-way split, since it avoids too much duplicate +Unless you are using a very long pairwise cutoff, a 2-way split is often +faster than a 3-way split, since it avoids too much duplicate computation of pairwise interactions near the intermediate cutoffs. -Also note that only a few pair potentials support the use of the -*inner* and *middle* and *outer* keywords. If not, only the *pair* -keyword can be used with that pair style, meaning all pairwise forces -are computed at the same rRESPA level. See the doc pages for -individual pair styles for details. +Also note that only a few pair potentials support the use of the *inner* +and *middle* and *outer* keywords. If not, only the *pair* keyword can +be used with that pair style, meaning all pairwise forces are computed +at the same rRESPA level. See the doc pages for individual pair styles +for details. Another option for using pair potentials with rRESPA is with the -*hybrid* keyword, which requires the use of the :doc:`pair_style hybrid or hybrid/overlay ` command. In this scenario, different +*hybrid* keyword, which requires the use of the :doc:`pair_style hybrid +or hybrid/overlay ` command. In this scenario, different sub-styles of the hybrid pair style are evaluated at different rRESPA -levels. This can be useful, for example, to set different timesteps -for hybrid coarse-grained/all-atom models. The *hybrid* keyword -requires as many level assignments as there are hybrid sub-styles, -which assigns each sub-style to a rRESPA level, following their order -of definition in the pair_style command. Since the *hybrid* keyword -operates on pair style computations, it is mutually exclusive with -either the *pair* or the *inner*\ /\ *middle*\ /\ *outer* keywords. +levels. This can be useful, for example, to set different timesteps for +hybrid coarse-grained/all-atom models. The *hybrid* keyword requires as +many level assignments as there are hybrid sub-styles, which assigns +each sub-style to a rRESPA level, following their order of definition in +the pair_style command. Since the *hybrid* keyword operates on pair +style computations, it is mutually exclusive with either the *pair* or +the *inner*\ /\ *middle*\ /\ *outer* keywords. When using rRESPA (or for any MD simulation) care must be taken to choose a timestep size(s) that ensures the Hamiltonian for the chosen From da79aadc8d9f3f16facd2a31e7ab9d4498f739b6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 2 Mar 2023 07:31:38 -0500 Subject: [PATCH 317/445] spelling --- doc/utils/sphinx-config/false_positives.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 0a5e58e86b..e46b5dd28b 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -438,6 +438,7 @@ cfile CFL cgdna CGDNA +cgmap cgs cgsdk CGSDK @@ -1792,6 +1793,7 @@ lammps Lammps LAMMPS lammpsbin +lammpsdata lammpsplot lammpsplugin Lamoureux @@ -2072,6 +2074,7 @@ mdi MDI mdpd mDPD +mdtraj meam MEAM meamf From 4a8aaf9f46dd31bd54b468fdb445cb0b9d38ceed Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 2 Mar 2023 14:52:01 -0600 Subject: [PATCH 318/445] Added the missing factor 4\pi in epsilon0e2q to other units --- src/DIELECTRIC/fix_polarize_bem_gmres.cpp | 8 ++++---- src/DIELECTRIC/fix_polarize_bem_icc.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp index e31337d0fd..14a645bb30 100644 --- a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp @@ -311,13 +311,13 @@ void FixPolarizeBEMGMRES::setup(int /*vflag*/) epsilon0e2q = 1.0; if (strcmp(update->unit_style, "real") == 0) - epsilon0e2q = 0.000240263377163643; + epsilon0e2q = 0.000240263377163643 * (4 * MY_PI); else if (strcmp(update->unit_style, "metal") == 0) - epsilon0e2q = 0.00553386738300813; + epsilon0e2q = 0.00553386738300813 * (4 * MY_PI); else if (strcmp(update->unit_style, "si") == 0) - epsilon0e2q = 8.854187812813e-12; + epsilon0e2q = 8.854187812813e-12 * (4 * MY_PI); else if (strcmp(update->unit_style, "nano") == 0) - epsilon0e2q = 0.000345866711328125; + epsilon0e2q = 0.000345866711328125 * (4 * MY_PI); else if (strcmp(update->unit_style, "lj") != 0) error->all(FLERR, "Only unit styles 'lj', 'real', 'metal', 'si' and 'nano' are supported"); diff --git a/src/DIELECTRIC/fix_polarize_bem_icc.cpp b/src/DIELECTRIC/fix_polarize_bem_icc.cpp index 0d503d87a7..177332546a 100644 --- a/src/DIELECTRIC/fix_polarize_bem_icc.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_icc.cpp @@ -214,13 +214,13 @@ void FixPolarizeBEMICC::setup(int /*vflag*/) epsilon0e2q = 1.0; if (strcmp(update->unit_style, "real") == 0) - epsilon0e2q = 0.000240263377163643; + epsilon0e2q = 0.000240263377163643 * (4 * MY_PI); else if (strcmp(update->unit_style, "metal") == 0) - epsilon0e2q = 0.00553386738300813; + epsilon0e2q = 0.00553386738300813 * (4 * MY_PI); else if (strcmp(update->unit_style, "si") == 0) - epsilon0e2q = 8.854187812813e-12; + epsilon0e2q = 8.854187812813e-12 * (4 * MY_PI); else if (strcmp(update->unit_style, "nano") == 0) - epsilon0e2q = 0.000345866711328125; + epsilon0e2q = 0.000345866711328125 * (4 * MY_PI); else if (strcmp(update->unit_style, "lj") != 0) error->all(FLERR, "Only unit styles 'lj', 'real', 'metal', 'si' and 'nano' are supported"); From b08fe855a1820ff4bf7de78076169c0df890ccff Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 2 Mar 2023 15:12:59 -0600 Subject: [PATCH 319/445] Increased the default max iterations to 50, put a note on setting the local epsilon for charged interface particles to be the mean dielectric value --- doc/src/fix_polarize.rst | 9 +++++---- examples/PACKAGES/dielectric/in.confined | 4 ++-- src/DIELECTRIC/fix_polarize_bem_gmres.cpp | 2 +- src/DIELECTRIC/fix_polarize_bem_icc.cpp | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/src/fix_polarize.rst b/doc/src/fix_polarize.rst index 6a997aa7ea..1101fb65ae 100644 --- a/doc/src/fix_polarize.rst +++ b/doc/src/fix_polarize.rst @@ -31,7 +31,7 @@ Examples fix 2 interface polarize/bem/gmres 5 0.0001 fix 1 interface polarize/bem/icc 1 0.0001 - fix 3 interface polarize/functional 1 0.001 + fix 3 interface polarize/functional 1 0.0001 Used in input scripts: @@ -69,8 +69,9 @@ along the normal vector is then 78 - 4 = 74, the mean dielectric value is (78 + 4) / 2 = 41. Each boundary element also has its area and the local mean curvature, which is used by these fixes for computing a correction term in the local electric field. To model charged -interfaces, the interface particle will have a non-zero charge value, -coming from its area and surface charge density. +interfaces, an interface particle will have a non-zero charge value, +coming from its area and surface charge density, and its local dielectric +constant set to the mean dielectric value. For non-interface particles such as atoms and charged particles, the interface normal vectors, element area, and dielectric mismatch are @@ -223,7 +224,7 @@ Related commands Default """"""" -*iter_max* = 20 +*iter_max* = 50 *kspace* = yes diff --git a/examples/PACKAGES/dielectric/in.confined b/examples/PACKAGES/dielectric/in.confined index 0f9dab7bba..314409fc17 100644 --- a/examples/PACKAGES/dielectric/in.confined +++ b/examples/PACKAGES/dielectric/in.confined @@ -67,10 +67,10 @@ if "${method} == gmres" then & "fix 3 interface polarize/bem/gmres 1 1.0e-4" & "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" & elif "${method} == icc"& - "fix 3 interface polarize/bem/icc 1 1.0e-4 itr_max 50" & + "fix 3 interface polarize/bem/icc 1 1.0e-4" & "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" & elif "${method} == dof" & - "fix 3 interface polarize/functional 1 0.001" & + "fix 3 interface polarize/functional 1 0.0001" & "fix_modify 3 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" & else & "print 'Unsupported polarization solver' " diff --git a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp index 14a645bb30..dafe4dc8e0 100644 --- a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp @@ -81,7 +81,7 @@ FixPolarizeBEMGMRES::FixPolarizeBEMGMRES(LAMMPS *_lmp, int narg, char **arg) : double tol = utils::numeric(FLERR, arg[4], false, lmp); tol_abs = tol_rel = tol; - itr_max = 20; + itr_max = 50; mr = 0; randomized = 0; ave_charge = 0; diff --git a/src/DIELECTRIC/fix_polarize_bem_icc.cpp b/src/DIELECTRIC/fix_polarize_bem_icc.cpp index 177332546a..034ada48ab 100644 --- a/src/DIELECTRIC/fix_polarize_bem_icc.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_icc.cpp @@ -67,7 +67,7 @@ FixPolarizeBEMICC::FixPolarizeBEMICC(LAMMPS *_lmp, int narg, char **arg) : Fix(_ double tol = utils::numeric(FLERR, arg[4], false, lmp); tol_abs = tol_rel = tol; - itr_max = 20; + itr_max = 50; omega = 0.7; randomized = 0; ave_charge = 0; From c4f095f9df18cd784f40319463e438b495a5dca3 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 2 Mar 2023 15:17:32 -0600 Subject: [PATCH 320/445] Updated the doc page of fix polarize to note that polarize/functional not supporting charged interfaces yet --- doc/src/fix_polarize.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/src/fix_polarize.rst b/doc/src/fix_polarize.rst index 1101fb65ae..dd8a0c7d75 100644 --- a/doc/src/fix_polarize.rst +++ b/doc/src/fix_polarize.rst @@ -212,6 +212,8 @@ Note that the *polarize/bem/gmres* and *polarize/bem/icc* fixes only support :doc:`units ` *lj*, *real*, *metal*, *si* and *nano* at the moment. +Note that *polarize/functional* does not yet support charged interfaces. + Related commands """""""""""""""" From fa38047749bcb349e0a97a97efea8ec10f9013f1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 2 Mar 2023 18:29:05 -0500 Subject: [PATCH 321/445] use sin(x+pi/2) instead of cos(x) on Intel OpenCL with double precision --- lib/gpu/lal_soft.cu | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/gpu/lal_soft.cu b/lib/gpu/lal_soft.cu index 74ac0e0c97..bc96a861df 100644 --- a/lib/gpu/lal_soft.cu +++ b/lib/gpu/lal_soft.cu @@ -22,6 +22,15 @@ _texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ +// hack for Intel GPU with double precision +#if defined(_DOUBLE_DOUBLE) && (CONFIG_ID == 500) +#define MY_PI_HALF (acctyp)1.57079632679489661923 +#define my_cos(x) sin(x+MY_PI_HALF) +#endif +#endif + +#if !defined(my_cos) +#define my_cos(x) cos(x) #endif #define MY_PI (acctyp)3.14159265358979323846 @@ -95,7 +104,7 @@ __kernel void k_soft(const __global numtyp4 *restrict x_, f.z+=delz*force; if (EVFLAG && eflag) { - numtyp e=coeff[mtype].x * ((numtyp)1.0+cos(arg)); + numtyp e=coeff[mtype].x * ((numtyp)1.0+my_cos(arg)); energy+=factor_lj*e; } if (EVFLAG && vflag) { @@ -186,7 +195,7 @@ __kernel void k_soft_fast(const __global numtyp4 *restrict x_, f.z+=delz*force; if (EVFLAG && eflag) { - numtyp e=coeff[mtype].x * ((numtyp)1.0+cos(arg)); + numtyp e=coeff[mtype].x * ((numtyp)1.0+my_cos(arg)); energy+=factor_lj*e; } if (EVFLAG && vflag) { From cfb967d309165587af11f3847f82313ff566f975 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 02:01:25 -0500 Subject: [PATCH 322/445] silence static code analysis warnings --- src/REPLICA/compute_pressure_alchemy.cpp | 2 +- src/REPLICA/fix_alchemy.cpp | 2 +- src/REPLICA/fix_alchemy.h | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/REPLICA/compute_pressure_alchemy.cpp b/src/REPLICA/compute_pressure_alchemy.cpp index d19ea1b893..bad2785fb8 100644 --- a/src/REPLICA/compute_pressure_alchemy.cpp +++ b/src/REPLICA/compute_pressure_alchemy.cpp @@ -24,7 +24,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ ComputePressureAlchemy::ComputePressureAlchemy(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) + Compute(lmp, narg, arg), fix(nullptr) { if (narg != 4) error->all(FLERR, "Illegal compute pressure/alchemy command"); if (igroup) error->all(FLERR, "Compute pressure/alchemy must use group all"); diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp index c6617c4600..29801d5c8d 100644 --- a/src/REPLICA/fix_alchemy.cpp +++ b/src/REPLICA/fix_alchemy.cpp @@ -53,8 +53,8 @@ FixAlchemy::FixAlchemy(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), vector_flag = 1; size_vector = 3; extvector = 1; - ilevel_respa = 0; nmax = 6; + ivar = -1; sync_box = 0; // set up rank-to-rank communicator for inter-partition communication diff --git a/src/REPLICA/fix_alchemy.h b/src/REPLICA/fix_alchemy.h index 677a29b643..53c369d551 100644 --- a/src/REPLICA/fix_alchemy.h +++ b/src/REPLICA/fix_alchemy.h @@ -48,7 +48,6 @@ class FixAlchemy : public Fix { double pressure[6]; // joined pressure int progress; // for progress indicator int sync_box; // 1 of box dimensions need to be synchronized - int ilevel_respa; int nmax; int ivar; }; From 9cdb9283cab29f782411f803f5c697f2c22a2c9a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 03:00:35 -0500 Subject: [PATCH 323/445] another workaround for Intel GPU with OpenCL and double precision --- lib/gpu/lal_device.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index 891d67913e..c98253ba4c 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -389,7 +389,12 @@ int DeviceT::set_ocl_params(std::string s_config, const std::string &extra_args) #ifdef CL_VERSION_2_0 _ocl_compile_string+="-cl-std=CL2.0 "; #endif - if (params[4]!="0") _ocl_compile_string+="-cl-fast-relaxed-math "; + // workaround for double precision with Intel OpenCL + #ifdef _DOUBLE_DOUBLE + if ((params[4] != "0") && (params[0] != "500")) _ocl_compile_string+="-cl-fast-relaxed-math "; + #else + if (params[4] != "0") _ocl_compile_string+="-cl-fast-relaxed-math "; + #endif _ocl_compile_string+=std::string(OCL_INT_TYPE)+" "+ std::string(OCL_PRECISION_COMPILE); if (gpu->has_subgroup_support()) From f23c2494eacb55da5311d7272348e6baa42fbd31 Mon Sep 17 00:00:00 2001 From: Germain Clavier Date: Fri, 3 Mar 2023 14:49:38 +0100 Subject: [PATCH 324/445] Created tool file tools/tabulate/pair_bi_tabulate.py --- tools/tabulate/pair_bi_tabulate.py | 117 +++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100755 tools/tabulate/pair_bi_tabulate.py diff --git a/tools/tabulate/pair_bi_tabulate.py b/tools/tabulate/pair_bi_tabulate.py new file mode 100755 index 0000000000..910bedf64e --- /dev/null +++ b/tools/tabulate/pair_bi_tabulate.py @@ -0,0 +1,117 @@ +#!/usr/bin/env python3 + +from tabulate import PairTabulate +import sys +import argparse +import numpy as np +from scipy.signal import savgol_filter +from scipy.optimize import curve_fit + +""" + This script gives an example on how to make tabulated forces from radial + distribution function using tabulate.py. + Required: python3, numpy, scipy. + BI stands for Boltzmann Inversion. +""" +############################################################################### + + +class BI(PairTabulate): + def __init__(self, units=None, comment=None, T=1): + super(PairTabulate, self).__init__("pair", self.energy, units, comment) + self.parser.add_argument( + "--eshift", + "-e", + dest="eshift", + default=False, + action="store_true", + help="Shift potential energy to be zero at outer cutoff", + ) + self.parser.add_argument( + "--rdffile", default="rdf.dat", help="Rdf file to be read." + ) + try: + self.args = self.parser.parse_args() + except argparse.ArgumentError: + sys.exit() + + kb = 1 + # Add more kb units if you need + if units == "si": + kb = 1.380649e-23 # J/K + elif units == "metal": + kb = 8.617333e-5 # eV/K + elif units == "real": + kb = 1.987204e-3 # kcal/mol/K + else: + sys.stdout.write("WARNING: Unknown or lj units, using kb=1\n") + self.kbT = kb * T + self.r, self.e, self.f = self.read_rdf(self.args.rdffile) + + # This function assumes LAMMPS format for rdf with a single entry + def read_rdf(self, rdffile): + data = np.loadtxt(rdffile, skiprows=4) + r = data[:, 1] + g = data[:, 2] + + # savgol_filter is an example of smoothing. + # Other filters/functions can be used. + g = savgol_filter(g, 10, 5) + return self.inversion(r, g) + + def inversion(self, r, g): + r = r + e = -self.kbT * np.log(g) + e = self.complete_exponential(r, e) + f = -np.gradient(e, r) + return r, e, f + + def complete_exponential(self, r, e): + r_temp = r[e != np.inf] + e_temp = e[e != np.inf] + + # Optimising the parameter for a function for derivation + # to be continuous. + # Here a gaussian function, can be anything relevant defined in func. + popt, pcov = curve_fit(self.func, r_temp[:2], e_temp[:2]) + for i, _ in enumerate(e): + if e[i] == np.inf: + e[i] = self.func(r[i], *popt) + return e + + def func(self, x, K, s): + return K * np.exp(-0.5 * (x / s) ** 2) / (s * np.sqrt(2 * np.pi)) + + def energy(self, x): + e = self.e + r = self.r + # Force estimation at minimum distance. + # Should not be that useful + f0 = (e[1] - e[0]) / (r[1] - r[0]) + + minr = min(r) + maxr = max(r) + # Note that you might want OOB to return an error. + if x >= maxr: + return 0 + if x < minr: + dx = minr - x + return -f0 * dx + else: + # Linear interpolation between points. + for i, ri in enumerate(r): + if r[i] < x: + r1, e1 = r[i], e[i] + r2, e2 = r[i + 1], e[i + 1] + dr12 = r2 - r1 + dr = x - r1 + de = (e2 - e1) / (r2 - r1) + return e1 + (de * dr / dr12) + + +############################################################################### + + +if __name__ == "__main__": + ptable = BI() + ptable.run("BI") From ed11cbd2c75fbe7d59bb1f5ba711037ff818bbb6 Mon Sep 17 00:00:00 2001 From: Germain Clavier Date: Fri, 3 Mar 2023 15:04:46 +0100 Subject: [PATCH 325/445] Updated tools/tabulate/README.md file to include pair_bi_tabulate.py --- tools/tabulate/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tabulate/README.md b/tools/tabulate/README.md index 6f63d03a80..0430c39111 100644 --- a/tools/tabulate/README.md +++ b/tools/tabulate/README.md @@ -27,6 +27,7 @@ Please see the individual tabulation scripts in this folder for examples: | pair_hybrid_tabulate.py | creates a Morse/Lennard-Jones hybrid potential table with smooth switching | | wall_harmonic_tabulate.py | creates a table for fix wall/table with a simple repulsive harmonic potential | | wall_multi_tabulate.py | creates a table for fix wall/table with multiple tables | +| pair_bi_tabulate.py | creates a table from radial distribution file using Boltzmann Inversion | | ------------------------------|-------------------------------------------------------------------------------| Common command line flags: From 67d4893f6e61661dbc65805210d8cf55abd741ca Mon Sep 17 00:00:00 2001 From: Germain Clavier Date: Fri, 3 Mar 2023 15:10:36 +0100 Subject: [PATCH 326/445] Added Warning section to pair_bi_tabulate.py file. --- tools/tabulate/pair_bi_tabulate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/tabulate/pair_bi_tabulate.py b/tools/tabulate/pair_bi_tabulate.py index 910bedf64e..f967bc797a 100755 --- a/tools/tabulate/pair_bi_tabulate.py +++ b/tools/tabulate/pair_bi_tabulate.py @@ -12,6 +12,8 @@ from scipy.optimize import curve_fit distribution function using tabulate.py. Required: python3, numpy, scipy. BI stands for Boltzmann Inversion. + WARNING: Using BI does not garranty an out of the box working potential for + your simulation. Check the relevamt literature. """ ############################################################################### From 4612cd94f0a3122cf98644952ad27edca0783699 Mon Sep 17 00:00:00 2001 From: Germain Clavier Date: Fri, 3 Mar 2023 15:12:27 +0100 Subject: [PATCH 327/445] Removed bits of useless force computation. --- tools/tabulate/pair_bi_tabulate.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/tabulate/pair_bi_tabulate.py b/tools/tabulate/pair_bi_tabulate.py index f967bc797a..2b15371f83 100755 --- a/tools/tabulate/pair_bi_tabulate.py +++ b/tools/tabulate/pair_bi_tabulate.py @@ -48,7 +48,7 @@ class BI(PairTabulate): else: sys.stdout.write("WARNING: Unknown or lj units, using kb=1\n") self.kbT = kb * T - self.r, self.e, self.f = self.read_rdf(self.args.rdffile) + self.r, self.e = self.read_rdf(self.args.rdffile) # This function assumes LAMMPS format for rdf with a single entry def read_rdf(self, rdffile): @@ -62,11 +62,9 @@ class BI(PairTabulate): return self.inversion(r, g) def inversion(self, r, g): - r = r e = -self.kbT * np.log(g) e = self.complete_exponential(r, e) - f = -np.gradient(e, r) - return r, e, f + return r, e, def complete_exponential(self, r, e): r_temp = r[e != np.inf] From 13f82be0353c66d1ecfed2cba66dfd5a6d6e6201 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 09:12:57 -0500 Subject: [PATCH 328/445] fix typo --- src/fix_store_force.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fix_store_force.cpp b/src/fix_store_force.cpp index 09406bb4f1..b6e2f4d8a1 100644 --- a/src/fix_store_force.cpp +++ b/src/fix_store_force.cpp @@ -29,7 +29,7 @@ FixStoreForce::FixStoreForce(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), foriginal(nullptr) { - if (narg < 3) error->all(FLERR,"Illegal fix store/coord command"); + if (narg < 3) error->all(FLERR,"Illegal fix store/force command"); peratom_flag = 1; size_peratom_cols = 3; From eb750f0217fe0f1491bd04c45f59db261cf21be8 Mon Sep 17 00:00:00 2001 From: Germain Clavier Date: Fri, 3 Mar 2023 15:22:49 +0100 Subject: [PATCH 329/445] Adde temperature for BI as a command-line argument --- tools/tabulate/pair_bi_tabulate.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/tabulate/pair_bi_tabulate.py b/tools/tabulate/pair_bi_tabulate.py index 2b15371f83..3ec67eaa31 100755 --- a/tools/tabulate/pair_bi_tabulate.py +++ b/tools/tabulate/pair_bi_tabulate.py @@ -19,7 +19,7 @@ from scipy.optimize import curve_fit class BI(PairTabulate): - def __init__(self, units=None, comment=None, T=1): + def __init__(self, units=None, comment=None): super(PairTabulate, self).__init__("pair", self.energy, units, comment) self.parser.add_argument( "--eshift", @@ -32,11 +32,19 @@ class BI(PairTabulate): self.parser.add_argument( "--rdffile", default="rdf.dat", help="Rdf file to be read." ) + self.parser.add_argument( + "--temperature", default=0, help="Temperature for BI." + ) try: self.args = self.parser.parse_args() except argparse.ArgumentError: sys.exit() + if self.args.temperature > 0: + T = self.args.temperature + else: + sys.exit("Invalid temperature provided.") + kb = 1 # Add more kb units if you need if units == "si": From e4b1a33cedcd876b6047b1f3c079884104f1a64f Mon Sep 17 00:00:00 2001 From: Germain Clavier Date: Fri, 3 Mar 2023 15:32:46 +0100 Subject: [PATCH 330/445] Corrected error in temperature argument managment, added unit as a command-line parameter --- tools/tabulate/pair_bi_tabulate.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/tabulate/pair_bi_tabulate.py b/tools/tabulate/pair_bi_tabulate.py index 3ec67eaa31..5d225ce6fc 100755 --- a/tools/tabulate/pair_bi_tabulate.py +++ b/tools/tabulate/pair_bi_tabulate.py @@ -33,7 +33,10 @@ class BI(PairTabulate): "--rdffile", default="rdf.dat", help="Rdf file to be read." ) self.parser.add_argument( - "--temperature", default=0, help="Temperature for BI." + "--units", default="lj", help="LAMMPS units to use [default lj]." + ) + self.parser.add_argument( + "--temperature", default=0, type=float, help="Temperature for BI." ) try: self.args = self.parser.parse_args() @@ -47,11 +50,11 @@ class BI(PairTabulate): kb = 1 # Add more kb units if you need - if units == "si": + if self.args.units == "si": kb = 1.380649e-23 # J/K - elif units == "metal": + elif self.args.units == "metal": kb = 8.617333e-5 # eV/K - elif units == "real": + elif self.args.units == "real": kb = 1.987204e-3 # kcal/mol/K else: sys.stdout.write("WARNING: Unknown or lj units, using kb=1\n") From c9e300f76f4ab31bb1a5fa1d8aa03bfcb3c71a56 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 16:18:31 -0500 Subject: [PATCH 331/445] implementation of bond style harmonic/restrain /w docs --- doc/src/Commands_bond.rst | 1 + doc/src/bond_harmonic_restrain.rst | 79 ++++++ doc/src/bond_style.rst | 3 +- doc/utils/sphinx-config/false_positives.txt | 1 + src/.gitignore | 2 + src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp | 244 ++++++++++++++++++ src/EXTRA-MOLECULE/bond_harmonic_restrain.h | 52 ++++ 7 files changed, 381 insertions(+), 1 deletion(-) create mode 100644 doc/src/bond_harmonic_restrain.rst create mode 100644 src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp create mode 100644 src/EXTRA-MOLECULE/bond_harmonic_restrain.h diff --git a/doc/src/Commands_bond.rst b/doc/src/Commands_bond.rst index cfc896aa0e..aaf706b5df 100644 --- a/doc/src/Commands_bond.rst +++ b/doc/src/Commands_bond.rst @@ -42,6 +42,7 @@ OPT. * :doc:`gaussian ` * :doc:`gromos (o) ` * :doc:`harmonic (iko) ` + * :doc:`harmonic/restrain ` * :doc:`harmonic/shift (o) ` * :doc:`harmonic/shift/cut (o) ` * :doc:`lepton (o) ` diff --git a/doc/src/bond_harmonic_restrain.rst b/doc/src/bond_harmonic_restrain.rst new file mode 100644 index 0000000000..a9918d8b5d --- /dev/null +++ b/doc/src/bond_harmonic_restrain.rst @@ -0,0 +1,79 @@ +.. index:: bond_style harmonic/restrain + +bond_style harmonic/restrain command +==================================== + +Syntax +"""""" + +.. code-block:: LAMMPS + + bond_style harmonic/restrain + +Examples +"""""""" + +.. code-block:: LAMMPS + + bond_style harmonic + bond_coeff 5 80.0 + +Description +""""""""""" + +The *harmonic/restrain* bond style uses the potential + +.. math:: + + E = K (r - r_{t=0})^2 + +where :math:`r_{t=0}` is the distance between the bond atoms at the +beginning of the first :doc:`run ` or :doc:`minimize ` +command after the bond style has been defined (*t=0*). Note that the +usual 1/2 factor is included in :math:`K`. This will effectively +restrain bonds to their initial length, whatever that is. + +The following coefficient must be defined for each bond type via the +:doc:`bond_coeff ` command as in the example above, or in +the data file or restart files read by the :doc:`read_data ` +or :doc:`read_restart ` commands + +* :math:`K` (energy/distance\^2) + +Restart info +"""""""""""" + +This bond style supports the :doc:`write_restart ` and +:doc:`read_restart ` commands. The state of the initial +bond lengths is stored with the restart files and read back. + +Restrictions +"""""""""""" + +This bond style can only be used if LAMMPS was built with the +EXTRA-MOLECULE package. See the :doc:`Build package ` +page for more info. + +This bond style does not write its coefficients to a data file since the +:math:`r_{t=0}` values are for individual bonds and not bond types. +Since it uses :doc:`fix property/atom ` internally, +you should use the "nofix" argument to the :doc:`write_data command +` to avoid writing a section to the data file can cannot be +read back in by the bond style. + +This bond style cannot be used with :doc:`fix shake or fix rattle +`, with :doc:`fix filter/corotate `, or +any :doc:`tip4p pair style ` since there is no specific +equilibrium distance for a given bond type. + + +Related commands +"""""""""""""""" + +:doc:`bond_coeff `, :doc:`delete_bonds `, +:doc:`bond_harmonic ` + +Default +""""""" + +none diff --git a/doc/src/bond_style.rst b/doc/src/bond_style.rst index 23b89d00a2..b33d0a9e9a 100644 --- a/doc/src/bond_style.rst +++ b/doc/src/bond_style.rst @@ -10,7 +10,7 @@ Syntax bond_style style args -* style = *none* or *zero* or *hybrid* or *bpm/rotational* or *bpm/spring* or *class2* or *fene* or *fene/expand* or *fene/nm* or *gaussian* or *gromos* or *harmonic* or *harmonic/shift* or *harmonic/shift/cut* or *lepton* or *morse* or *nonlinear* or *oxdna/fene* or *oxdena2/fene* or *oxrna2/fene* or *quartic* or *special* or *table* +* style = *none* or *zero* or *hybrid* or *bpm/rotational* or *bpm/spring* or *class2* or *fene* or *fene/expand* or *fene/nm* or *gaussian* or *gromos* or *harmonic* or *harmonic/restrain* *harmonic/shift* or *harmonic/shift/cut* or *lepton* or *morse* or *nonlinear* or *oxdna/fene* or *oxdena2/fene* or *oxrna2/fene* or *quartic* or *special* or *table* * args = none for any style except *hybrid* @@ -93,6 +93,7 @@ accelerated styles exist. * :doc:`gaussian ` - multicentered Gaussian-based bond potential * :doc:`gromos ` - GROMOS force field bond * :doc:`harmonic ` - harmonic bond +* :doc:`harmonic/restrain ` - harmonic bond to restrain to original bond distance * :doc:`harmonic/shift ` - shifted harmonic bond * :doc:`harmonic/shift/cut ` - shifted harmonic bond with a cutoff * :doc:`lepton ` - bond potential from evaluating a string diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index d03300439f..ff8f0d455b 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -2463,6 +2463,7 @@ nodeless nodeset nodesets Noehring +nofix Noffset noforce noguess diff --git a/src/.gitignore b/src/.gitignore index df02ab3397..aa57927669 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -492,6 +492,8 @@ /bond_gromos.h /bond_harmonic.cpp /bond_harmonic.h +/bond_harmonic_restrain.cpp +/bond_harmonic_restrain.h /bond_harmonic_shift.cpp /bond_harmonic_shift.h /bond_harmonic_shift_cut.cpp diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp new file mode 100644 index 0000000000..413d00226d --- /dev/null +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp @@ -0,0 +1,244 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "bond_harmonic_restrain.h" + +#include "atom.h" +#include "comm.h" +#include "error.h" +#include "fix_property_atom.h" +#include "force.h" +#include "memory.h" +#include "modify.h" +#include "neighbor.h" + +#include +#include + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +BondHarmonicRestrain::BondHarmonicRestrain(LAMMPS *_lmp) : Bond(_lmp), initial(nullptr) +{ + writedata = 0; + natoms = -1; +} + +/* ---------------------------------------------------------------------- */ + +BondHarmonicRestrain::~BondHarmonicRestrain() +{ + modify->delete_fix("BOND_RESTRAIN"); + if (allocated) { + memory->destroy(setflag); + memory->destroy(k); + } +} + +/* ---------------------------------------------------------------------- */ + +void BondHarmonicRestrain::compute(int eflag, int vflag) +{ + int i1, i2, n, type; + double delx, dely, delz, ebond, fbond; + double rsq, r, r0, dr, rk; + + ebond = 0.0; + ev_init(eflag, vflag); + + double **x = atom->x; + double **x0 = (double **) atom->extract("d2_x0"); + double **f = atom->f; + int **bondlist = neighbor->bondlist; + int nbondlist = neighbor->nbondlist; + int nlocal = atom->nlocal; + int newton_bond = force->newton_bond; + + for (n = 0; n < nbondlist; n++) { + i1 = bondlist[n][0]; + i2 = bondlist[n][1]; + type = bondlist[n][2]; + + delx = x0[i1][0] - x0[i2][0]; + dely = x0[i1][1] - x0[i2][1]; + delz = x0[i1][2] - x0[i2][2]; + rsq = delx * delx + dely * dely + delz * delz; + r0 = sqrt(rsq); + + delx = x[i1][0] - x[i2][0]; + dely = x[i1][1] - x[i2][1]; + delz = x[i1][2] - x[i2][2]; + + rsq = delx * delx + dely * dely + delz * delz; + r = sqrt(rsq); + dr = r - r0; + rk = k[type] * dr; + + // force & energy + + if (r > 0.0) + fbond = -2.0 * rk / r; + else + fbond = 0.0; + + if (eflag) ebond = rk * dr; + + // apply force to each of 2 atoms + + if (newton_bond || i1 < nlocal) { + f[i1][0] += delx * fbond; + f[i1][1] += dely * fbond; + f[i1][2] += delz * fbond; + } + + if (newton_bond || i2 < nlocal) { + f[i2][0] -= delx * fbond; + f[i2][1] -= dely * fbond; + f[i2][2] -= delz * fbond; + } + + if (evflag) ev_tally(i1, i2, nlocal, newton_bond, ebond, fbond, delx, dely, delz); + } +} + +/* ---------------------------------------------------------------------- */ + +void BondHarmonicRestrain::allocate() +{ + allocated = 1; + const int np1 = atom->nbondtypes + 1; + + memory->create(k, np1, "bond:k"); + + memory->create(setflag, np1, "bond:setflag"); + for (int i = 1; i < np1; i++) setflag[i] = 0; +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more types +------------------------------------------------------------------------- */ + +void BondHarmonicRestrain::coeff(int narg, char **arg) +{ + if (narg != 2) error->all(FLERR, "Incorrect args for bond coefficients"); + if (!allocated) allocate(); + + int ilo, ihi; + utils::bounds(FLERR, arg[0], 1, atom->nbondtypes, ilo, ihi, error); + + double k_one = utils::numeric(FLERR, arg[1], false, lmp); + + int count = 0; + for (int i = ilo; i <= ihi; i++) { + k[i] = k_one; + setflag[i] = 1; + count++; + } + + if (count == 0) error->all(FLERR, "Incorrect args for bond coefficients"); +} + +/* ---------------------------------------------------------------------- + initialize custom data storage +------------------------------------------------------------------------- */ + +void BondHarmonicRestrain::init_style() +{ + // create internal fix to store initial positions + initial = dynamic_cast( + modify->add_fix("BOND_RESTRAIN all property/atom d2_x0 3 ghost yes")); + if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); + + // store initial positions + if (natoms < 0) { + natoms = atom->natoms; + double *const *const x0 = (double **) atom->extract("d2_x0"); + const double *const *const x = atom->x; + for (int i = 0; i < atom->nlocal; ++i) + for (int j = 0; j < 3; ++j) x0[i][j] = x[i][j]; + } + + // must not add atoms + if (natoms < atom->natoms) + error->all(FLERR, "Bond style harmonic/restrain does not support adding atoms"); +} + +/* ---------------------------------------------------------------------- + proc 0 writes out coeffs to restart file +------------------------------------------------------------------------- */ + +void BondHarmonicRestrain::write_restart(FILE *fp) +{ + fwrite(&natoms, sizeof(bigint), 1, fp); + fwrite(&k[1], sizeof(double), atom->nbondtypes, fp); +} + +/* ---------------------------------------------------------------------- + proc 0 reads coeffs from restart file, bcasts them +------------------------------------------------------------------------- */ + +void BondHarmonicRestrain::read_restart(FILE *fp) +{ + allocate(); + + if (comm->me == 0) { + utils::sfread(FLERR, &natoms, sizeof(bigint), 1, fp, nullptr, error); + utils::sfread(FLERR, &k[1], sizeof(double), atom->nbondtypes, fp, nullptr, error); + } + MPI_Bcast(&natoms, 1, MPI_LMP_BIGINT, 0, world); + MPI_Bcast(&k[1], atom->nbondtypes, MPI_DOUBLE, 0, world); + + for (int i = 1; i <= atom->nbondtypes; i++) setflag[i] = 1; +} + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void BondHarmonicRestrain::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->nbondtypes; i++) fprintf(fp, "%d %g\n", i, k[i]); +} + +/* ---------------------------------------------------------------------- */ + +double BondHarmonicRestrain::single(int type, double rsq, int i, int j, double &fforce) +{ + double **x0 = (double **) atom->extract("d2_x0"); + + double delx = x0[i][0] - x0[j][0]; + double dely = x0[i][1] - x0[j][1]; + double delz = x0[i][2] - x0[j][2]; + double r0 = sqrt(delx * delx + dely * dely + delz * delz); + + double r = sqrt(rsq); + double dr = r - r0; + double rk = k[type] * dr; + fforce = 0; + if (r > 0.0) fforce = -2.0 * rk / r; + return rk * dr; +} + +/* ---------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + return ptr to internal members upon request +------------------------------------------------------------------------ */ + +void *BondHarmonicRestrain::extract(const char *str, int &dim) +{ + dim = 1; + if (strcmp(str, "k") == 0) return (void *) k; + return nullptr; +} diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.h b/src/EXTRA-MOLECULE/bond_harmonic_restrain.h new file mode 100644 index 0000000000..e17c21e125 --- /dev/null +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.h @@ -0,0 +1,52 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef BOND_CLASS +// clang-format off +BondStyle(harmonic/restrain,BondHarmonicRestrain); +// clang-format on +#else + +#ifndef LMP_BOND_HARMONIC_RESTRAIN_H +#define LMP_BOND_HARMONIC_RESTRAIN_H + +#include "bond.h" + +namespace LAMMPS_NS { + +class BondHarmonicRestrain : public Bond { + public: + BondHarmonicRestrain(class LAMMPS *); + ~BondHarmonicRestrain() override; + void compute(int, int) override; + void coeff(int, char **) override; + void init_style() override; + double equilibrium_distance(int) override { return -1.0; }; // return invalid value since not applicable + void write_restart(FILE *) override; + void read_restart(FILE *) override; + void write_data(FILE *) override; + double single(int, double, int, int, double &) override; + void *extract(const char *, int &) override; + + protected: + double *k; + bigint natoms; + class FixPropertyAtom *initial; + + virtual void allocate(); +}; + +} // namespace LAMMPS_NS + +#endif +#endif From 77ae215047b6b5ec65239f42aac8e9028347cfb2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 17:16:12 -0500 Subject: [PATCH 332/445] add versionadded tag --- doc/src/bond_harmonic_restrain.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/bond_harmonic_restrain.rst b/doc/src/bond_harmonic_restrain.rst index a9918d8b5d..5ffbfb424c 100644 --- a/doc/src/bond_harmonic_restrain.rst +++ b/doc/src/bond_harmonic_restrain.rst @@ -21,6 +21,8 @@ Examples Description """"""""""" +.. versionadded:: TBD + The *harmonic/restrain* bond style uses the potential .. math:: @@ -46,7 +48,7 @@ Restart info This bond style supports the :doc:`write_restart ` and :doc:`read_restart ` commands. The state of the initial bond lengths is stored with the restart files and read back. - + Restrictions """""""""""" From a136283312d6231ddd515804ec346feb1651986e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 17:17:07 -0500 Subject: [PATCH 333/445] update/correct section header (this is not a fix) --- doc/src/bond_table.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/src/bond_table.rst b/doc/src/bond_table.rst index 51e677d74a..1924774693 100644 --- a/doc/src/bond_table.rst +++ b/doc/src/bond_table.rst @@ -112,8 +112,9 @@ are estimated (less accurately) by the first two and last two force values in the table. The "EQ" parameter is also optional. If used, it is followed by a the -equilibrium bond length, which is used, for example, by the :doc:`fix shake ` command. If not used, the equilibrium bond -length is to the distance in the table with the lowest potential energy. +equilibrium bond length, which is used, for example, by the :doc:`fix +shake ` command. If not used, the equilibrium bond length is +to the distance in the table with the lowest potential energy. Following a blank line, the next N lines list the tabulated values. On each line, the first value is the index from 1 to N, the second value is @@ -135,16 +136,15 @@ one that matches the specified keyword. ---------- -Restart, fix_modify, output, run start/stop, minimize info -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +Restart info +"""""""""""" -This bond style writes the settings for the "bond_style table" -command to :doc:`binary restart files `, so a bond_style -command does not need to specified in an input script that reads a -restart file. However, the coefficient information is not stored in -the restart file, since it is tabulated in the potential files. Thus, -bond_coeff commands do need to be specified in the restart input -script. +This bond style writes the settings for the "bond_style table" command +to :doc:`binary restart files `, so a bond_style command does +not need to specified in an input script that reads a restart file. +However, the coefficient information is not stored in the restart file, +since it is tabulated in the potential files. Thus, bond_coeff commands +do need to be specified in the restart input script. Restrictions """""""""""" From de182aeeed33e3ad7cd62d6ebceb6a9ce28c4e20 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 17:25:28 -0500 Subject: [PATCH 334/445] fix issues due to incomplete conversion form txt2html markup --- doc/src/pair_gauss.rst | 13 +++++++------ doc/src/pair_tersoff_mod.rst | 2 +- doc/src/read_data.rst | 10 ++++++---- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/doc/src/pair_gauss.rst b/doc/src/pair_gauss.rst index f6d8134467..5ac8f2aff4 100644 --- a/doc/src/pair_gauss.rst +++ b/doc/src/pair_gauss.rst @@ -103,12 +103,13 @@ Mixing, shift, table, tail correction, restart, rRESPA info For atom type pairs I,J and I != J, the A, B, H, sigma_h, r_mh parameters, and the cutoff distance for these pair styles can be mixed: -A (energy units) -sqrt(1/B) (distance units, see below) -H (energy units) -sigma_h (distance units) -r_mh (distance units) -cutoff (distance units):ul + +* A (energy units) +* :math:`\sqrt{\frac{1}{B}}` (distance units, see below) +* H (energy units) +* :math:`r_{mh}` (distance units) +* :math:`\sigma_h` (distance units) +* cutoff (distance units) The default mix value is *geometric*\ . Only *arithmetic* and *geometric* mix values are supported. diff --git a/doc/src/pair_tersoff_mod.rst b/doc/src/pair_tersoff_mod.rst index 8c9605d62c..a667ae6605 100644 --- a/doc/src/pair_tersoff_mod.rst +++ b/doc/src/pair_tersoff_mod.rst @@ -145,7 +145,7 @@ coefficients in the formulae above: * c3 * c4 * c5 -* c0 (energy units, tersoff/mod/c only):ul +* c0 (energy units, tersoff/mod/c only) The n, :math:`\eta`, :math:`\lambda_2`, B, :math:`\lambda_1`, and A parameters are only used for two-body interactions. The :math:`\beta`, :math:`\alpha`, c1, c2, c3, c4, c5, h diff --git a/doc/src/read_data.rst b/doc/src/read_data.rst index 7c08802228..0ecd2b6fa2 100644 --- a/doc/src/read_data.rst +++ b/doc/src/read_data.rst @@ -1477,10 +1477,12 @@ The *Triangles* section must appear after the *Atoms* section. where the keywords have these meanings: -vx,vy,vz = translational velocity of atom -lx,ly,lz = angular momentum of aspherical atom -wx,wy,wz = angular velocity of spherical atom -ervel = electron radial velocity (0 for fixed-core):ul + .. parsed-literal:: + + vx,vy,vz = translational velocity of atom + lx,ly,lz = angular momentum of aspherical atom + wx,wy,wz = angular velocity of spherical atom + ervel = electron radial velocity (0 for fixed-core) The velocity lines can appear in any order. This section can only be used after an *Atoms* section. This is because the *Atoms* section From e373aa39e7f7e225d62cdd7bf570d346ec682989 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 3 Mar 2023 16:44:34 -0700 Subject: [PATCH 335/445] Update CODEOWNERS --- .github/CODEOWNERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 038f290f64..2686011281 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -150,12 +150,12 @@ tools/vim/* @hammondkd unittest/* @akohlmey # cmake -cmake/* @junghans @rbberger +cmake/* @rbberger cmake/Modules/LAMMPSInterfacePlugin.cmake @akohlmey cmake/Modules/MPI4WIN.cmake @akohlmey cmake/Modules/OpenCLLoader.cmake @akohlmey -cmake/Modules/Packages/COLVARS.cmake @junghans @rbberger @giacomofiorin -cmake/Modules/Packages/KIM.cmake @junghans @rbberger @ellio167 +cmake/Modules/Packages/COLVARS.cmake @rbberger @giacomofiorin +cmake/Modules/Packages/KIM.cmake @rbberger @ellio167 cmake/presets/*.cmake @akohlmey # python From c3c6c5f154cefc6746261535c695ed7a5e085d39 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 20:50:56 -0500 Subject: [PATCH 336/445] python2 compatibility (or rather scipy of python2) and avoid NaNs --- tools/tabulate/pair_bi_tabulate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tabulate/pair_bi_tabulate.py b/tools/tabulate/pair_bi_tabulate.py index 5d225ce6fc..615f7db14f 100755 --- a/tools/tabulate/pair_bi_tabulate.py +++ b/tools/tabulate/pair_bi_tabulate.py @@ -69,11 +69,11 @@ class BI(PairTabulate): # savgol_filter is an example of smoothing. # Other filters/functions can be used. - g = savgol_filter(g, 10, 5) + g = savgol_filter(g, 9, 5) return self.inversion(r, g) def inversion(self, r, g): - e = -self.kbT * np.log(g) + e = -self.kbT * np.log(np.clip(g,1.0e-100,1.0e100)) e = self.complete_exponential(r, e) return r, e, From fc4ca0503e09a85a88cf0f83fff2250402e7eb42 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 20:51:28 -0500 Subject: [PATCH 337/445] make --rdffile, --units, and --temperature required arguments --- tools/tabulate/pair_bi_tabulate.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/tools/tabulate/pair_bi_tabulate.py b/tools/tabulate/pair_bi_tabulate.py index 615f7db14f..233cbe4d69 100755 --- a/tools/tabulate/pair_bi_tabulate.py +++ b/tools/tabulate/pair_bi_tabulate.py @@ -29,15 +29,10 @@ class BI(PairTabulate): action="store_true", help="Shift potential energy to be zero at outer cutoff", ) - self.parser.add_argument( - "--rdffile", default="rdf.dat", help="Rdf file to be read." - ) - self.parser.add_argument( - "--units", default="lj", help="LAMMPS units to use [default lj]." - ) - self.parser.add_argument( - "--temperature", default=0, type=float, help="Temperature for BI." - ) + self.parser.add_argument("--units", required=True, help="LAMMPS units to use") + self.parser.add_argument("--rdffile", required=True, help="Rdf file to be read") + self.parser.add_argument("--temperature", required=True, type=float, + help="Temperature for Boltzman Inversion.") try: self.args = self.parser.parse_args() except argparse.ArgumentError: @@ -48,16 +43,19 @@ class BI(PairTabulate): else: sys.exit("Invalid temperature provided.") - kb = 1 + kb = 1.0 # Add more kb units if you need - if self.args.units == "si": + self.units = self.args.units + if self.units == "lj": + kb = 1.0 # reduced + elif self.units == "si": kb = 1.380649e-23 # J/K - elif self.args.units == "metal": - kb = 8.617333e-5 # eV/K - elif self.args.units == "real": - kb = 1.987204e-3 # kcal/mol/K + elif self.units == "metal": + kb = 8.617333e-5 # eV/K + elif self.units == "real": + kb = 1.987204e-3 # kcal/mol/K else: - sys.stdout.write("WARNING: Unknown or lj units, using kb=1\n") + sys.exit("Unsupported units setting " + self.units) self.kbT = kb * T self.r, self.e = self.read_rdf(self.args.rdffile) From 76387d003bc9236fecd244b93234ac5e645c220f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 23:12:17 -0500 Subject: [PATCH 338/445] fine tune package check directory matching to not match bogus entries --- doc/utils/check-packages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/utils/check-packages.py b/doc/utils/check-packages.py index cb64259f15..8fc17f28df 100644 --- a/doc/utils/check-packages.py +++ b/doc/utils/check-packages.py @@ -49,7 +49,9 @@ pkgs = [] # folder, and is not called 'MAKE' is a package for d in pkgdirs: - pkg = dirs.match(d).group(1) + match = dirs.match(d) + if not match: continue + pkg = match.group(1) if not os.path.isdir(os.path.join(src_dir, pkg)): continue if pkg in ['DEPEND','MAKE','STUBS']: continue pkgs.append(pkg) From 3df51305df8819244df62a42c73a18e58ee5d478 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 4 Mar 2023 00:32:18 -0500 Subject: [PATCH 339/445] integrate updates for fix alchemy documentation from @sjplimp --- doc/src/fix_alchemy.rst | 140 +++++++++++++++++++++++++--------------- 1 file changed, 89 insertions(+), 51 deletions(-) diff --git a/doc/src/fix_alchemy.rst b/doc/src/fix_alchemy.rst index 90c436139e..056cf60369 100644 --- a/doc/src/fix_alchemy.rst +++ b/doc/src/fix_alchemy.rst @@ -12,7 +12,7 @@ Syntax * ID, group-ID are documented in :doc:`fix ` command * alchemy = style name of this fix command -* v_name = variable with name that determines the :math:`\lambda_p` value +* v_name = variable with name that determines the :math:`\lambda_R` value Examples """""""" @@ -26,80 +26,121 @@ Description .. versionadded:: TBD -This fix command enables running an "alchemical transformation" MD -simulation between two topologies (i.e. the same number and positions of -atoms, but differences in atom parameters like type, charge, bonds, -angles and so on). For this a :ref:`multi-partition run ` is -required with exactly two partitions. During the MD run, the fix will -will determine a factor, :math:`\lambda_p`, for each partition *p* that -will be taken from an equal style or equivalent :doc:`variable -`. Typically, this variable would be chose to linearly ramp -*down* from 1.0 to 0.0 for the *first* partition (*p=0*) and linearly -ramp *up* from 0.0 to 1.0 for the *second* partition (*p=1*). The -forces used for the propagation of the atoms will be the sum of the -forces of the two systems combined and scaled with their respective -:math:`\lambda_p` factor. This allows to perform transformations that -are not easily possible with :doc:`pair style hybrid/scaled -`, :doc:`fix adapt ` or :doc:`fix adapt/fep -`. +This fix command enables an "alchemical transformation" to be performed +between two systems, whereby one system slowly transforms into the other +over the course of a molecular dynamics run. This is useful for +measuring thermodynamic differences between two different systems. It +also allows transformations that are not easily possible with the +:doc:`pair style hybrid/scaled `, :doc:`fix adapt +` or :doc:`fix adapt/fep ` commmands. -.. note:: +Example inputs are included in the ``examples/PACKAGES/alchemy`` +directory for (a) transforming a pure copper system into a +copper/aluminum bronze alloy and (b) transforming two water molecules +into a hydronium plus hydroxyl ion. - Since the definition of the variable to provide the :math:`\lambda_p` is - independent in the two partitions, no check is made that the two values - remain between 0.0 and 1.0 and that they add up to 1.0. So care needs to - be taken when defining those variables that this is the case. +The two systems must be defined in :doc:`separate replicas +` and run in separate partitions of processors using the +:doc:`-partition ` command-line switch. Exacty two +partitions must be specified and each partition must use the same number +of processors and the same domain decomposition. -Due to the specifics of the implementation, the initial geometry and -dimensions of the system must be exactly the same and the fix will -synchronize them during the run. It is thus not possible to initialize -the two partitions by reading different data files or creating different -systems from scratch, but rather they have to be started from the same -system and then the desired modifications need to be applied to the -system of the second partition. The commands :doc:`pair style -hybrid/scaled `, :doc:`fix adapt ` or :doc:`fix -adapt/fep ` could be used for simulations where the -requirements for fix alchemy are not given. +Because the forces applied to the atoms are the same mix of the forces +from each partition and the simulation starts with the same atom +positions across both partitions, they will generate the same trajectory +of coordinates for each atom, and the same simulation box size and +shape. The latter two conditions are *enforced* by this fix; it +exchanges coordinates and box information between the replicas. This is +not strictly required, but since MD simulations are an example of a +chaotic system, even the tiniest random difference will eventually grow +exponentially into an unwanted divergence. -The commands below demonstrate how the setup for the second partition -can be done for the example of transforming a pure copper system into a -copper/aluminum bronze. +Otherwise the properties of each atom (type, charge, bond and angle +partners, etc), as well as energy and forces between interacting atoms +(pair, bond, angle styles, etc) can be different in the two systems. -.. code-block:: LAMMPS +This can be initialized in the same input script by using commands which +only apply to one or the other replica. The example scripts use a +world-style :doc:`variable ` command along with +:doc:`if/then/else ` commmands for this purpose. The +:doc:`partition ` command can also be used. variable name world pure alloy +.. code-block:: LAMMPS + create_box 2 box create_atoms 1 box pair_style eam/alloy pair_coeff * * AlCu.eam.alloy Cu Al # replace 5% of copper with aluminum on the second partition only + variable name world pure alloy if "${name} == alloy" then & "set type 1 type/fraction 2 0.05 6745234" - # define ramp variable to combine the two different partitions - if "${name} == pure" then & - "variable ramp equal ramp(1.0,0.0)" & - else & - "variable ramp equal ramp(0.0,1.0)" +Both replicas must define an instance of this fix, but with a different +*v_name* variable. The named variable must be an equal-style or +equivalent :doc:`variable `. The two variables should be +defined so that one ramps *down* from 1.0 to 0.0 for the *first* replica +(*R=0*) and the other ramps *up* from 0.0 to 1.0 for the *second* +replica (*R=1*). A simple way is to do this is lineraly, which can be +done using the ramp() function of the :doc:`variable ` +command. You could also define a variable which returns a value between +0.0 and 1.0 as a non-linear function of the timestep. Here is a linear +example: +.. code-block:: LAMMPS + + partition yes 1 variable ramp equal ramp(1.0,0.0) + partition yes 2 variable ramp equal ramp(0.0,1.0) fix 2 all alchemy v_ramp +.. note:: -The ``examples/PACKAGES/alchemy`` folder contains complete example -inputs for this command. + For an alchemical transformation, the two variables should sum to + exactly 1.0 at any timestep. LAMMPS does *NOT* check that this is + the case. + +If you use the ``ramp()`` function to define the two variables, this fix +can easily be used across successive runs in the same input script by +ensuring each instance of the :doc:`run ` command specifies the +appropriate *start* or *stop* options. + +At each timestep of an MD run, the two instances of this fix evaluate +their respective variables as a :math:`\lambda_R` factor, where *R* = 0 +or 1 for each replica. The forces used by each system for the +propagation of theire atoms is set to the sum of the forces for the two +systems, each scaled by their respective :math:`\lambda_R` factor. Thus +during the MD run, the system will transform incrementally from from the +first system to the second system. + +.. note:: + + As mentioned above, the coordinates of the atoms and box size/shape + must be exactly the same in the two replicas. Thus it is generally + not a good idea to initialize the two replicas by reading different + data files or creating them from scratch. Rather, a single system + should be initialized and desired modifications applied to the system + of the second replica. If your input script somehow induces the two + systems to become different (e.g. by performing :doc:`atom_modify + sort ` differently, or by adding or depositing a + different number of atoms), then LAMMPS will detect the mismatchand + generate an error. This is done by ensuring that each step the + number and ordering of atoms is identical within each pair of + processors in the two replicas. ---------- Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" -No information about this fix is written to :doc:`binary restart files `. -None of the :doc:`fix_modify ` options are relevant to this fix. +No information about this fix is written to :doc:`binary restart files +`. None of the :doc:`fix_modify ` options are +relevant to this fix. -This fix stores a global scalar (the current value of :math:`\lambda_p`) +This fix stores a global scalar (the current value of :math:`\lambda_R`) and a global vector of length 3 which contains the potential energy of the first partition, the second partition and the combined value, respectively. The global scalar is unitless and "intensive", the vector @@ -117,12 +158,9 @@ This fix is part of the REPLICA package. It is only enabled if LAMMPS was built with that package. See the :doc:`Build package ` page for more info. -There may be only one instance of this fix in use at any time. +There may be only one instance of this fix in use at a time within +each replica. -This fix requires to perform a :ref:`multi-partition run ` -with *exactly* two partitions. - -This fix is *not* compatible with :doc:`load balancing `. Related commands """""""""""""""" From 6640e8b647384382937ea4c0bbe78e3dee5cce61 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 4 Mar 2023 00:43:43 -0500 Subject: [PATCH 340/445] address some spelling and grammar issues flagged by languagetool.org --- doc/src/fix_alchemy.rst | 54 ++++++++++----------- doc/utils/sphinx-config/false_positives.txt | 1 + 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/doc/src/fix_alchemy.rst b/doc/src/fix_alchemy.rst index 056cf60369..37c49fed47 100644 --- a/doc/src/fix_alchemy.rst +++ b/doc/src/fix_alchemy.rst @@ -32,17 +32,17 @@ over the course of a molecular dynamics run. This is useful for measuring thermodynamic differences between two different systems. It also allows transformations that are not easily possible with the :doc:`pair style hybrid/scaled `, :doc:`fix adapt -` or :doc:`fix adapt/fep ` commmands. +` or :doc:`fix adapt/fep ` commands. Example inputs are included in the ``examples/PACKAGES/alchemy`` directory for (a) transforming a pure copper system into a copper/aluminum bronze alloy and (b) transforming two water molecules -into a hydronium plus hydroxyl ion. +in a box of water into a hydronium and a hydroxyl ion. -The two systems must be defined in :doc:`separate replicas +The two systems must be defined as :doc:`separate replica ` and run in separate partitions of processors using the -:doc:`-partition ` command-line switch. Exacty two -partitions must be specified and each partition must use the same number +:doc:`-partition ` command-line switch. Exactly two +partitions must be specified, and each partition must use the same number of processors and the same domain decomposition. Because the forces applied to the atoms are the same mix of the forces @@ -55,18 +55,16 @@ not strictly required, but since MD simulations are an example of a chaotic system, even the tiniest random difference will eventually grow exponentially into an unwanted divergence. -Otherwise the properties of each atom (type, charge, bond and angle -partners, etc), as well as energy and forces between interacting atoms -(pair, bond, angle styles, etc) can be different in the two systems. +Otherwise, the properties of each atom (type, charge, bond and angle +partners, etc.), as well as energy and forces between interacting atoms +(pair, bond, angle styles, etc.) can be different in the two systems. This can be initialized in the same input script by using commands which only apply to one or the other replica. The example scripts use a world-style :doc:`variable ` command along with -:doc:`if/then/else ` commmands for this purpose. The +:doc:`if/then/else ` commands for this purpose. The :doc:`partition ` command can also be used. - variable name world pure alloy - .. code-block:: LAMMPS create_box 2 box @@ -85,7 +83,7 @@ Both replicas must define an instance of this fix, but with a different equivalent :doc:`variable `. The two variables should be defined so that one ramps *down* from 1.0 to 0.0 for the *first* replica (*R=0*) and the other ramps *up* from 0.0 to 1.0 for the *second* -replica (*R=1*). A simple way is to do this is lineraly, which can be +replica (*R=1*). A simple way is to do this is linearly, which can be done using the ramp() function of the :doc:`variable ` command. You could also define a variable which returns a value between 0.0 and 1.0 as a non-linear function of the timestep. Here is a linear @@ -111,25 +109,25 @@ appropriate *start* or *stop* options. At each timestep of an MD run, the two instances of this fix evaluate their respective variables as a :math:`\lambda_R` factor, where *R* = 0 or 1 for each replica. The forces used by each system for the -propagation of theire atoms is set to the sum of the forces for the two -systems, each scaled by their respective :math:`\lambda_R` factor. Thus -during the MD run, the system will transform incrementally from from the +propagation of their atoms is set to the sum of the forces for the two +systems, each scaled by their respective :math:`\lambda_R` factor. Thus, +during the MD run, the system will transform incrementally from the first system to the second system. .. note:: As mentioned above, the coordinates of the atoms and box size/shape - must be exactly the same in the two replicas. Thus it is generally - not a good idea to initialize the two replicas by reading different - data files or creating them from scratch. Rather, a single system - should be initialized and desired modifications applied to the system - of the second replica. If your input script somehow induces the two - systems to become different (e.g. by performing :doc:`atom_modify - sort ` differently, or by adding or depositing a - different number of atoms), then LAMMPS will detect the mismatchand - generate an error. This is done by ensuring that each step the - number and ordering of atoms is identical within each pair of - processors in the two replicas. + must be exactly the same in the two replicas. Therefore, it is + generally not a good idea to initialize the two replicas by reading + different data files or creating them individually from scratch. + Rather, a single system should be initialized and then desired + modifications applied to the system to either replica. If your + input script somehow induces the two systems to become different + (e.g. by performing :doc:`atom_modify sort ` + differently, or by adding or depositing a different number of atoms), + then LAMMPS will detect the mismatch and generate an error. This is + done by ensuring that each step the number and ordering of atoms is + identical within each pair of processors in the two replicas. ---------- @@ -146,8 +144,8 @@ the first partition, the second partition and the combined value, respectively. The global scalar is unitless and "intensive", the vector is in :doc:`energy units ` and "extensive". These values can be used by any command that uses a global value from a fix as input. See -the :doc:`Howto output ` doc page for an overview of -LAMMPS output options. +the :doc:`output howto ` page for an overview of LAMMPS +output options. This fix is not invoked during :doc:`energy minimization `. diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index e46b5dd28b..0f18e6822f 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -1444,6 +1444,7 @@ hux hwloc hx hy +hydronium hydrophobicity hydrostatic hydrostatically From 02f36f4e72baea82c2208c4384cf0677c8f44875 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 4 Mar 2023 06:30:47 -0500 Subject: [PATCH 341/445] whitespace --- doc/src/fix_alchemy.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/fix_alchemy.rst b/doc/src/fix_alchemy.rst index 37c49fed47..367b6d1cca 100644 --- a/doc/src/fix_alchemy.rst +++ b/doc/src/fix_alchemy.rst @@ -66,7 +66,7 @@ world-style :doc:`variable ` command along with :doc:`partition ` command can also be used. .. code-block:: LAMMPS - + create_box 2 box create_atoms 1 box pair_style eam/alloy @@ -115,7 +115,7 @@ during the MD run, the system will transform incrementally from the first system to the second system. .. note:: - + As mentioned above, the coordinates of the atoms and box size/shape must be exactly the same in the two replicas. Therefore, it is generally not a good idea to initialize the two replicas by reading From fcf8fc503fc71fd204af0d3c48bc217453209e0d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 4 Mar 2023 16:24:58 -0500 Subject: [PATCH 342/445] fix broken links --- doc/src/fix_shake.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/fix_shake.rst b/doc/src/fix_shake.rst index e6fbad7fdc..32cb5a2d19 100644 --- a/doc/src/fix_shake.rst +++ b/doc/src/fix_shake.rst @@ -275,8 +275,8 @@ reducing the :doc:`timestep `. Related commands """""""""""""""" -`fix rigid `, `fix ehex `, -`fix nve/manifold/rattle ` +:doc:`fix rigid `, :doc:`fix ehex `, +:doc:`fix nve/manifold/rattle ` Default From 8aad97ca4ab4cebdaf94e1c4912a27cdbb9e16d6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 4 Mar 2023 17:03:07 -0500 Subject: [PATCH 343/445] fix broken doc links --- doc/src/Build_extras.rst | 4 ++-- doc/src/Howto_mdi.rst | 22 +++++++++++----------- doc/src/Intro_features.rst | 2 +- doc/src/bond_write.rst | 2 +- doc/src/dump.rst | 2 +- doc/src/fix_nh_uef.rst | 9 +++++---- doc/src/fix_shake.rst | 16 ++++++++-------- doc/src/minimize.rst | 14 +++++++------- doc/src/pair_ylz.rst | 9 +++++---- 9 files changed, 41 insertions(+), 39 deletions(-) diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index ac6a27464b..4dd8c10b3f 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -1964,10 +1964,10 @@ OPENMP package Apple offers the `Xcode package and IDE `_ for compiling software on macOS, so you have likely installed it to compile LAMMPS. Their - compiler is based on `Clang `, but while it + compiler is based on `Clang `_, but while it is capable of processing OpenMP directives, the necessary header files and OpenMP runtime library are missing. The `R developers - ` have figured out a way to build those + `_ have figured out a way to build those in a compatible fashion. One can download them from `https://mac.r-project.org/openmp/ `_. Simply adding those files as diff --git a/doc/src/Howto_mdi.rst b/doc/src/Howto_mdi.rst index 0e09ff2841..7567462397 100644 --- a/doc/src/Howto_mdi.rst +++ b/doc/src/Howto_mdi.rst @@ -63,18 +63,18 @@ The package also provides a :doc:`mdi plugin ` command, which enables LAMMPS to operate as an MDI driver and load an MDI engine as a plugin library. -The package furthermore includes a `fix mdi/qm ` command, in -which LAMMPS operates as an MDI driver in conjunction with a quantum -mechanics code as an MDI engine. The post_force() method of the -``fix_mdi_qm.cpp`` file shows how a driver issues MDI commands to another -code. This command can be used to couple to an MDI engine, which is -either a stand-alone code or a plugin library. +The package furthermore includes a :doc:`fix mdi/qm ` +command, in which LAMMPS operates as an MDI driver in conjunction with a +quantum mechanics code as an MDI engine. The post_force() method of the +``fix_mdi_qm.cpp`` file shows how a driver issues MDI commands to +another code. This command can be used to couple to an MDI engine, +which is either a stand-alone code or a plugin library. -As explained in the `fix mdi/qm ` command documentation, it -can be used to perform *ab initio* MD simulations or energy -minimizations, or to evaluate the quantum energy and forces for a series -of independent systems. The ``examples/mdi`` directory has example -input scripts for all of these use cases. +As explained in the :doc:`fix mdi/qm ` command +documentation, it can be used to perform *ab initio* MD simulations or +energy minimizations, or to evaluate the quantum energy and forces for a +series of independent systems. The ``examples/mdi`` directory has +example input scripts for all of these use cases. ---------- diff --git a/doc/src/Intro_features.rst b/doc/src/Intro_features.rst index 76b989ad69..d8fb2269e5 100644 --- a/doc/src/Intro_features.rst +++ b/doc/src/Intro_features.rst @@ -195,7 +195,7 @@ Multi-replica models * :doc:`parallel replica dynamics ` * :doc:`temperature accelerated dynamics ` * :doc:`parallel tempering ` -* path-integral MD: `first variant `, `second variant ` +* path-integral MD: :doc:`first variant `, :doc:`second variant ` * multi-walker collective variables with :doc:`Colvars ` and :doc:`Plumed ` .. _prepost: diff --git a/doc/src/bond_write.rst b/doc/src/bond_write.rst index 43015e25e7..bd63ebea29 100644 --- a/doc/src/bond_write.rst +++ b/doc/src/bond_write.rst @@ -70,7 +70,7 @@ be specified even if the potential has a finite value at r = 0.0. Related commands """""""""""""""" -:doc:`bond_style table `, `angle_write `, +:doc:`bond_style table `, :doc:`angle_write `, :doc:`bond_style `, :doc:`bond_coeff ` Default diff --git a/doc/src/dump.rst b/doc/src/dump.rst index 01fcc2e7e1..7993ae985f 100644 --- a/doc/src/dump.rst +++ b/doc/src/dump.rst @@ -375,7 +375,7 @@ output with each snapshot: nx ny nz The value dim will be 2 or 3 for 2d or 3d simulations. It is included -so that post-processing tools like `OVITO `, +so that post-processing tools like `OVITO `_, which can visualize grid-based quantities know how to draw each grid cell. The grid size will match the input script parameters for grid(s) created by the computes or fixes which are referenced by the diff --git a/doc/src/fix_nh_uef.rst b/doc/src/fix_nh_uef.rst index cf20d56ce7..922c2d515a 100644 --- a/doc/src/fix_nh_uef.rst +++ b/doc/src/fix_nh_uef.rst @@ -218,10 +218,11 @@ use :doc:`change_box ` before invoking the fix. Related commands """""""""""""""" -:doc:`fix nvt `, :doc:`fix npt `, `fix nvt/sllod -:doc:`, `compute temp/uef `, -:doc::doc:`compute pressure/uef `, `dump cfg/uef -:doc:` +:doc:`fix nvt `, :doc:`fix npt `, +:doc:`fix nvt/sllod `, +:doc:`compute temp/uef `, +:doc:`compute pressure/uef `, +:doc:`dump cfg/uef ` Default """"""" diff --git a/doc/src/fix_shake.rst b/doc/src/fix_shake.rst index 32cb5a2d19..4688fcbf2a 100644 --- a/doc/src/fix_shake.rst +++ b/doc/src/fix_shake.rst @@ -133,9 +133,9 @@ constraint lists atom types. All bonds connected to an atom of the specified type will be constrained. The *m* constraint lists atom masses. All bonds connected to atoms of the specified masses will be constrained (within a fudge factor of MASSDELTA specified in -fix_shake.cpp). The *a* constraint lists angle types. If both bonds -in the angle are constrained then the angle will also be constrained -if its type is in the list. +``src/RIGID/fix_shake.cpp``). The *a* constraint lists angle types. If +both bonds in the angle are constrained then the angle will also be +constrained if its type is in the list. For all constraints, a particular bond is only constrained if both atoms in the bond are in the group specified with the SHAKE fix. @@ -205,11 +205,11 @@ LAMMPS closely follows (:ref:`Andersen (1983) `). The *fix rattle* command modifies forces and velocities and thus should be defined after all other integration fixes in your input script. If you define other fixes that modify velocities or forces - after *fix rattle* operates, then *fix rattle* will not take them into - account and the overall time integration will typically not satisfy - the RATTLE constraints. You can check whether the constraints work - correctly by setting the value of RATTLE_DEBUG in src/fix_rattle.cpp - to 1 and recompiling LAMMPS. + after *fix rattle* operates, then *fix rattle* will not take them + into account and the overall time integration will typically not + satisfy the RATTLE constraints. You can check whether the + constraints work correctly by setting the value of RATTLE_DEBUG in + ``src/RIGID/fix_rattle.cpp`` to 1 and recompiling LAMMPS. ---------- diff --git a/doc/src/minimize.rst b/doc/src/minimize.rst index 5143cab5d5..6221d33aad 100644 --- a/doc/src/minimize.rst +++ b/doc/src/minimize.rst @@ -49,19 +49,19 @@ and forces) by pushing the atoms off of each other. The distance that atoms can move during individual minimization steps can be quite large, especially at the beginning of a minimization. - Thus `neighbor list settings ` of *every = 1* and + Thus :doc:`neighbor list settings ` of *every = 1* and *delay = 0* are **required**. This may be combined with either *check = no* (always update the neighbor list) or *check = yes* (only update the neighbor list if at least one atom has moved more than - half the `neighbor list skin ` distance since the last + half the :doc:`neighbor list skin ` distance since the last reneighboring). Using *check = yes* is recommended since it avoids unneeded reneighboring steps when the system is closer to the minimum - and thus atoms move only small distances. Using *check = no* may - be required for debugging or when coupling LAMMPS with external - codes that require a predictable sequence of neighbor list updates. + and thus atoms move only small distances. Using *check = no* may be + required for debugging or when coupling LAMMPS with external codes + that require a predictable sequence of neighbor list updates. - If the settings are **not** *every = 1* and *delay = 0*, LAMMPS - will temporarily apply a `neigh_modify every 1 delay 0 check yes + If the settings are **not** *every = 1* and *delay = 0*, LAMMPS will + temporarily apply a :doc:`neigh_modify every 1 delay 0 check yes ` setting during the minimization and restore the original setting at the end of the minimization. A corresponding message will be printed to the screen and log file, if this happens. diff --git a/doc/src/pair_ylz.rst b/doc/src/pair_ylz.rst index 17cf0ca639..22a707e9cb 100644 --- a/doc/src/pair_ylz.rst +++ b/doc/src/pair_ylz.rst @@ -142,10 +142,11 @@ the :doc:`atom_style ellipsoid ` command. Related commands """""""""""""""" -:doc:`pair_coeff `, :doc:`fix nve/asphere -:doc:`, `compute temp/asphere `, -:doc::doc:`pair_style resquared `, :doc:`pair_style -:doc:gayberne ` +:doc:`pair_coeff `, +:doc:`fix nve/asphere `, +:doc:`compute temp/asphere `, +:doc:`pair_style resquared `, +:doc:`pair_style gayberne ` Default """"""" From 7f934e3b2515ffa05579a19dc9697e66dd3600d9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 4 Mar 2023 17:09:17 -0500 Subject: [PATCH 344/445] add check for broken doc links to doc makefile --- doc/Makefile | 15 +++++++++------ doc/src/Install_linux.rst | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index ad80017b7e..2a4edc70f3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -94,10 +94,11 @@ html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX) rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\ echo "############################################" ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \ rst_anchor_check src/*.rst ;\ - python $(BUILDDIR)/utils/check-packages.py -s ../src -d src ;\ + $(PYTHON) $(BUILDDIR)/utils/check-packages.py -s ../src -d src ;\ env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\ - python $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\ + env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\ + $(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\ echo "############################################" ;\ deactivate ;\ ) @@ -174,10 +175,11 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\ echo "############################################" ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \ rst_anchor_check src/*.rst ;\ - python utils/check-packages.py -s ../src -d src ;\ + $(PYTHON) utils/check-packages.py -s ../src -d src ;\ env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\ - python utils/check-styles.py -s ../src -d src ;\ + env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\ + $(PYTHON) utils/check-styles.py -s ../src -d src ;\ echo "############################################" ;\ deactivate ;\ ) @@ -208,14 +210,14 @@ anchor_check : $(ANCHORCHECK) style_check : $(VENV) @(\ . $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \ - python utils/check-styles.py -s ../src -d src ;\ + $(PYTHON) utils/check-styles.py -s ../src -d src ;\ deactivate ;\ ) package_check : $(VENV) @(\ . $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \ - python utils/check-packages.py -s ../src -d src ;\ + $(PYTHON) utils/check-packages.py -s ../src -d src ;\ deactivate ;\ ) @@ -224,6 +226,7 @@ char_check : role_check : @( env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst && exit 1 || : ) + @( env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst && exit 1 || : ) link_check : $(VENV) html @(\ diff --git a/doc/src/Install_linux.rst b/doc/src/Install_linux.rst index f902b1b987..91e7529879 100644 --- a/doc/src/Install_linux.rst +++ b/doc/src/Install_linux.rst @@ -42,7 +42,7 @@ static linkage, there is no ``liblammps.so`` library file and thus also the LAMMPS python module, which depends on it, is not included. The compressed tar archives available for download have names following -the pattern `lammps-linux-x86_64-.tar.gz` and will all unpack +the pattern ``lammps-linux-x86_64-.tar.gz`` and will all unpack into a ``lammps-static`` folder. The executables are then in the ``lammps-static/bin/`` folder. Since they do not depend on any other software, they may be freely moved or copied around. From 2aff3211877ce17f4c4d9e0a22885602f7adb69d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 5 Mar 2023 07:04:20 -0500 Subject: [PATCH 345/445] Revert "use sin(x+pi/2) instead of cos(x) on Intel OpenCL with double precision" This reverts commit fa38047749bcb349e0a97a97efea8ec10f9013f1 It is no longer needed since we disable fast math with Intel OpenCL and double precision setting. --- lib/gpu/lal_soft.cu | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/gpu/lal_soft.cu b/lib/gpu/lal_soft.cu index bc96a861df..74ac0e0c97 100644 --- a/lib/gpu/lal_soft.cu +++ b/lib/gpu/lal_soft.cu @@ -22,15 +22,6 @@ _texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ -// hack for Intel GPU with double precision -#if defined(_DOUBLE_DOUBLE) && (CONFIG_ID == 500) -#define MY_PI_HALF (acctyp)1.57079632679489661923 -#define my_cos(x) sin(x+MY_PI_HALF) -#endif -#endif - -#if !defined(my_cos) -#define my_cos(x) cos(x) #endif #define MY_PI (acctyp)3.14159265358979323846 @@ -104,7 +95,7 @@ __kernel void k_soft(const __global numtyp4 *restrict x_, f.z+=delz*force; if (EVFLAG && eflag) { - numtyp e=coeff[mtype].x * ((numtyp)1.0+my_cos(arg)); + numtyp e=coeff[mtype].x * ((numtyp)1.0+cos(arg)); energy+=factor_lj*e; } if (EVFLAG && vflag) { @@ -195,7 +186,7 @@ __kernel void k_soft_fast(const __global numtyp4 *restrict x_, f.z+=delz*force; if (EVFLAG && eflag) { - numtyp e=coeff[mtype].x * ((numtyp)1.0+my_cos(arg)); + numtyp e=coeff[mtype].x * ((numtyp)1.0+cos(arg)); energy+=factor_lj*e; } if (EVFLAG && vflag) { From 646ef15d8345a5d75002276dc23179afdee80fad Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 5 Mar 2023 07:18:12 -0500 Subject: [PATCH 346/445] more consistent way to disable fast math for Intel OpenCL with double precision --- lib/gpu/lal_device.cpp | 5 ++--- lib/gpu/lal_preprocessor.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index c98253ba4c..8d2211481d 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -391,10 +391,9 @@ int DeviceT::set_ocl_params(std::string s_config, const std::string &extra_args) #endif // workaround for double precision with Intel OpenCL #ifdef _DOUBLE_DOUBLE - if ((params[4] != "0") && (params[0] != "500")) _ocl_compile_string+="-cl-fast-relaxed-math "; - #else - if (params[4] != "0") _ocl_compile_string+="-cl-fast-relaxed-math "; + if (params[0] == "500") params[4] = "0"; #endif + if (params[4] != "0") _ocl_compile_string+="-cl-fast-relaxed-math "; _ocl_compile_string+=std::string(OCL_INT_TYPE)+" "+ std::string(OCL_PRECISION_COMPILE); if (gpu->has_subgroup_support()) diff --git a/lib/gpu/lal_preprocessor.h b/lib/gpu/lal_preprocessor.h index b3243c3b2e..30dec214e8 100644 --- a/lib/gpu/lal_preprocessor.h +++ b/lib/gpu/lal_preprocessor.h @@ -169,7 +169,7 @@ #define ucl_abs fabs #define ucl_erfc erfc -#if defined(FAST_MATH) && !defined(_DOUBLE_DOUBLE) +#if defined(FAST_MATH) && (FAST_MATH > 0) && !defined(_DOUBLE_DOUBLE) #define ucl_exp native_exp #define ucl_pow pow From b11049ba1a5fa22ff575f4d4afa6579973425962 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Sun, 5 Mar 2023 19:03:38 -0700 Subject: [PATCH 347/445] CMake: Use hip::host and hip::hipcub targets --- cmake/Modules/Packages/GPU.cmake | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index 8ac1decc86..21d046606f 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -412,7 +412,8 @@ elseif(GPU_API STREQUAL "HIP") set_property(TARGET gpu PROPERTY CXX_STANDARD 14) endif() # add hipCUB - target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include) + find_package(hipcub REQUIRED) + target_link_libraries(gpu PRIVATE hip::hipcub) target_compile_definitions(gpu PRIVATE -DUSE_HIP_DEVICE_SORT) if(HIP_PLATFORM STREQUAL "nvcc") @@ -461,30 +462,22 @@ elseif(GPU_API STREQUAL "HIP") add_executable(hip_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp) target_compile_definitions(hip_get_devices PRIVATE -DUCL_HIP) - target_link_libraries(hip_get_devices hip::host) + target_link_libraries(hip_get_devices PRIVATE hip::host) if(HIP_PLATFORM STREQUAL "nvcc") target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_NVCC__) - target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include) target_include_directories(gpu PRIVATE ${CUDA_INCLUDE_DIRS}) target_link_libraries(gpu PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY}) target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_NVCC__) - target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/include) target_include_directories(hip_get_devices PRIVATE ${CUDA_INCLUDE_DIRS}) target_link_libraries(hip_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY}) elseif(HIP_PLATFORM STREQUAL "hcc") target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_HCC__) - target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include) - target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_HCC__) - target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include) elseif(HIP_PLATFORM STREQUAL "amd") target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_AMD__) - target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include) - target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_AMD__) - target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include) endif() target_link_libraries(lammps PRIVATE gpu) From f658a947c608c343a78ece270184864d5f3799b7 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Sun, 5 Mar 2023 19:07:13 -0700 Subject: [PATCH 348/445] gpu: fix broken HIP code path --- lib/gpu/lal_atom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gpu/lal_atom.cpp b/lib/gpu/lal_atom.cpp index 3d1a1cc963..17ebcca413 100644 --- a/lib/gpu/lal_atom.cpp +++ b/lib/gpu/lal_atom.cpp @@ -403,7 +403,7 @@ double AtomT::host_memory_usage() const { return _max_atoms*atom_bytes*sizeof(numtyp)+sizeof(Atom); } -#ifdef USE_CUDPP +#if defined(USE_CUDPP) || defined(USE_HIP_DEVICE_SORT) #define USE_CUDPP_ARG(arg) arg #else #define USE_CUDPP_ARG(arg) From 37f22c8627b83648eb116e19b52f34202801cc83 Mon Sep 17 00:00:00 2001 From: "W. Michael Brown" Date: Sun, 5 Mar 2023 21:03:12 -0800 Subject: [PATCH 349/445] Misc Improvements to GPU Package - Optimizations for molecular systems - Improved kernel performance and greater CPU overlap - Reduced GPU to CPU communications for discrete devices - Switch classic Intel makefiles to use LLVM-based compilers - Prefetch optimizations supported for OpenCL - Optimized data repack for quaternions --- doc/src/package.rst | 2 +- lib/gpu/Makefile.oneapi | 7 +- lib/gpu/Makefile.oneapi_prof | 28 +++++++ lib/gpu/README | 1 + lib/gpu/geryon/nvd_device.h | 2 +- lib/gpu/lal_amoeba.cu | 54 +++++++------- lib/gpu/lal_answer.cpp | 53 ++++++-------- lib/gpu/lal_atom.cpp | 12 ++- lib/gpu/lal_atom.cu | 2 +- lib/gpu/lal_atom.h | 74 +++++++++++-------- lib/gpu/lal_base_amoeba.cpp | 14 ++-- lib/gpu/lal_base_dipole.cpp | 6 +- lib/gpu/lal_base_ellipsoid.cpp | 12 +-- lib/gpu/lal_base_ellipsoid.h | 5 +- lib/gpu/lal_beck.cu | 10 ++- lib/gpu/lal_born.cu | 10 ++- lib/gpu/lal_born_coul_long.cu | 10 ++- lib/gpu/lal_born_coul_long_cs.cu | 10 ++- lib/gpu/lal_born_coul_wolf.cu | 10 ++- lib/gpu/lal_born_coul_wolf_cs.cu | 10 ++- lib/gpu/lal_buck.cu | 10 ++- lib/gpu/lal_buck_coul.cu | 10 ++- lib/gpu/lal_buck_coul_long.cu | 10 ++- lib/gpu/lal_charmm.cu | 10 ++- lib/gpu/lal_charmm_long.cu | 10 ++- lib/gpu/lal_colloid.cu | 10 ++- lib/gpu/lal_coul.cu | 10 ++- lib/gpu/lal_coul_debye.cu | 10 ++- lib/gpu/lal_coul_dsf.cu | 10 ++- lib/gpu/lal_coul_long.cu | 10 ++- lib/gpu/lal_coul_long_cs.cu | 10 ++- lib/gpu/lal_device.cpp | 23 +++++- lib/gpu/lal_device.cu | 1 + lib/gpu/lal_dipole_lj.cu | 18 +++-- lib/gpu/lal_dipole_lj_sf.cu | 18 +++-- lib/gpu/lal_dipole_long_lj.cu | 18 +++-- lib/gpu/lal_dpd.cu | 10 ++- lib/gpu/lal_eam.cu | 12 ++- lib/gpu/lal_ellipsoid_extra.h | 4 +- lib/gpu/lal_gauss.cu | 10 ++- lib/gpu/lal_gayberne.cu | 8 +- lib/gpu/lal_gayberne_ext.cpp | 23 +++--- lib/gpu/lal_gayberne_lj.cu | 15 ++-- lib/gpu/lal_hippo.cu | 64 ++++++++-------- lib/gpu/lal_lj.cu | 10 ++- lib/gpu/lal_lj96.cu | 10 ++- lib/gpu/lal_lj_class2_long.cu | 10 ++- lib/gpu/lal_lj_coul.cu | 10 ++- lib/gpu/lal_lj_coul_debye.cu | 10 ++- lib/gpu/lal_lj_coul_long.cu | 10 ++- lib/gpu/lal_lj_coul_msm.cu | 10 ++- lib/gpu/lal_lj_cubic.cu | 10 ++- lib/gpu/lal_lj_dsf.cu | 10 ++- lib/gpu/lal_lj_expand.cu | 10 ++- lib/gpu/lal_lj_expand_coul_long.cu | 10 ++- lib/gpu/lal_lj_gromacs.cu | 10 ++- lib/gpu/lal_lj_smooth.cu | 18 +++-- lib/gpu/lal_lj_spica.cu | 10 ++- lib/gpu/lal_lj_spica_long.cu | 10 ++- lib/gpu/lal_lj_tip4p_long.cu | 42 ++++++----- lib/gpu/lal_mie.cu | 10 ++- lib/gpu/lal_morse.cu | 10 ++- lib/gpu/lal_neighbor_gpu.cu | 79 ++++++++++++++++---- lib/gpu/lal_pppm.cu | 4 +- lib/gpu/lal_pre_cuda_hip.h | 1 + lib/gpu/lal_pre_ocl_config.h | 18 ++--- lib/gpu/lal_precision.h | 24 ++++++ lib/gpu/lal_preprocessor.h | 68 ++++++++++++++++- lib/gpu/lal_re_squared.cu | 8 +- lib/gpu/lal_re_squared_ext.cpp | 23 +++--- lib/gpu/lal_re_squared_lj.cu | 24 +++--- lib/gpu/lal_soft.cu | 10 ++- lib/gpu/lal_sw.cu | 22 +++--- lib/gpu/lal_table.cu | 40 ++++++---- lib/gpu/lal_tersoff.cu | 22 +++--- lib/gpu/lal_tersoff_mod.cu | 22 +++--- lib/gpu/lal_tersoff_zbl.cu | 22 +++--- lib/gpu/lal_ufm.cu | 10 ++- lib/gpu/lal_vashishta.cu | 24 +++--- lib/gpu/lal_yukawa.cu | 10 ++- lib/gpu/lal_yukawa_colloid.cu | 10 ++- lib/gpu/lal_zbl.cu | 10 ++- src/GPU/fix_gpu.cpp | 14 ++++ src/GPU/fix_nve_asphere_gpu.cpp | 14 +--- src/GPU/pair_amoeba_gpu.cpp | 9 +++ src/GPU/pair_amoeba_gpu.h | 1 + src/GPU/pair_beck_gpu.cpp | 2 + src/GPU/pair_born_coul_long_cs_gpu.cpp | 2 + src/GPU/pair_born_coul_long_gpu.cpp | 2 + src/GPU/pair_born_coul_wolf_cs_gpu.cpp | 2 + src/GPU/pair_born_coul_wolf_gpu.cpp | 2 + src/GPU/pair_born_gpu.cpp | 2 + src/GPU/pair_buck_coul_cut_gpu.cpp | 2 + src/GPU/pair_buck_coul_long_gpu.cpp | 2 + src/GPU/pair_buck_gpu.cpp | 2 + src/GPU/pair_colloid_gpu.cpp | 2 + src/GPU/pair_coul_cut_gpu.cpp | 2 + src/GPU/pair_coul_debye_gpu.cpp | 2 + src/GPU/pair_coul_dsf_gpu.cpp | 2 + src/GPU/pair_coul_long_cs_gpu.cpp | 2 + src/GPU/pair_coul_long_gpu.cpp | 2 + src/GPU/pair_dpd_gpu.cpp | 2 + src/GPU/pair_dpd_tstat_gpu.cpp | 2 + src/GPU/pair_eam_alloy_gpu.cpp | 2 + src/GPU/pair_eam_fs_gpu.cpp | 2 + src/GPU/pair_eam_gpu.cpp | 2 + src/GPU/pair_gauss_gpu.cpp | 2 + src/GPU/pair_gayberne_gpu.cpp | 85 +++++++++++----------- src/GPU/pair_gayberne_gpu.h | 2 - src/GPU/pair_hippo_gpu.cpp | 9 +++ src/GPU/pair_hippo_gpu.h | 1 + src/GPU/pair_lj96_cut_gpu.cpp | 2 + src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp | 2 + src/GPU/pair_lj_charmm_coul_long_gpu.cpp | 2 + src/GPU/pair_lj_class2_coul_long_gpu.cpp | 2 + src/GPU/pair_lj_class2_gpu.cpp | 2 + src/GPU/pair_lj_cubic_gpu.cpp | 2 + src/GPU/pair_lj_cut_coul_cut_gpu.cpp | 2 + src/GPU/pair_lj_cut_coul_debye_gpu.cpp | 2 + src/GPU/pair_lj_cut_coul_dsf_gpu.cpp | 2 + src/GPU/pair_lj_cut_coul_long_gpu.cpp | 2 + src/GPU/pair_lj_cut_coul_msm_gpu.cpp | 2 + src/GPU/pair_lj_cut_dipole_cut_gpu.cpp | 2 + src/GPU/pair_lj_cut_dipole_long_gpu.cpp | 2 + src/GPU/pair_lj_cut_gpu.cpp | 2 + src/GPU/pair_lj_cut_tip4p_long_gpu.cpp | 2 + src/GPU/pair_lj_expand_coul_long_gpu.cpp | 2 + src/GPU/pair_lj_expand_gpu.cpp | 2 + src/GPU/pair_lj_gromacs_gpu.cpp | 2 + src/GPU/pair_lj_sf_dipole_sf_gpu.cpp | 2 + src/GPU/pair_lj_smooth_gpu.cpp | 2 + src/GPU/pair_lj_spica_coul_long_gpu.cpp | 2 + src/GPU/pair_lj_spica_gpu.cpp | 2 + src/GPU/pair_mie_cut_gpu.cpp | 2 + src/GPU/pair_morse_gpu.cpp | 2 + src/GPU/pair_resquared_gpu.cpp | 79 ++++++++++---------- src/GPU/pair_resquared_gpu.h | 2 - src/GPU/pair_soft_gpu.cpp | 2 + src/GPU/pair_sw_gpu.cpp | 2 + src/GPU/pair_table_gpu.cpp | 2 + src/GPU/pair_tersoff_gpu.cpp | 2 + src/GPU/pair_tersoff_mod_gpu.cpp | 2 + src/GPU/pair_tersoff_zbl_gpu.cpp | 2 + src/GPU/pair_ufm_gpu.cpp | 2 + src/GPU/pair_vashishta_gpu.cpp | 2 + src/GPU/pair_yukawa_colloid_gpu.cpp | 2 + src/GPU/pair_yukawa_gpu.cpp | 2 + src/GPU/pair_zbl_gpu.cpp | 2 + src/MAKE/OPTIONS/Makefile.oneapi | 10 +-- src/neighbor.cpp | 21 ++++++ src/neighbor.h | 6 ++ 151 files changed, 1085 insertions(+), 617 deletions(-) create mode 100644 lib/gpu/Makefile.oneapi_prof diff --git a/doc/src/package.rst b/doc/src/package.rst index 0ced387539..76bf20a97f 100644 --- a/doc/src/package.rst +++ b/doc/src/package.rst @@ -319,7 +319,7 @@ CONFIG_ID, SIMD_SIZE, MEM_THREADS, SHUFFLE_AVAIL, FAST_MATH, THREADS_PER_ATOM, THREADS_PER_CHARGE, THREADS_PER_THREE, BLOCK_PAIR, BLOCK_BIO_PAIR, BLOCK_ELLIPSE, PPPM_BLOCK_1D, BLOCK_NBOR_BUILD, BLOCK_CELL_2D, BLOCK_CELL_ID, MAX_SHARED_TYPES, MAX_BIO_SHARED_TYPES, -PPPM_MAX_SPLINE. +PPPM_MAX_SPLINE, NBOR_PREFETCH. CONFIG_ID can be 0. SHUFFLE_AVAIL in {0,1} indicates that inline-PTX (NVIDIA) or OpenCL extensions (Intel) should be used for horizontal diff --git a/lib/gpu/Makefile.oneapi b/lib/gpu/Makefile.oneapi index 9d11a0c4b0..32800676aa 100644 --- a/lib/gpu/Makefile.oneapi +++ b/lib/gpu/Makefile.oneapi @@ -12,13 +12,12 @@ EXTRAMAKE = Makefile.lammps.opencl LMP_INC = -DLAMMPS_SMALLBIG OCL_INC = -I$(ONEAPI_ROOT)/compiler/latest/linux/include/sycl/ -CPP_OPT = -xHost -O2 -qopenmp -qopenmp-simd -fp-model fast=2 -no-prec-div \ - -qoverride-limits -OCL_CPP = mpiicpc -std=c++11 -diag-disable=10441 -DMPICH_IGNORE_CXX_SEEK \ +CPP_OPT = -xHost -O2 -qopenmp -qopenmp-simd -ffast-math -freciprocal-math +OCL_CPP = mpiicpc -cxx=icpx -std=c++11 -DMPICH_IGNORE_CXX_SEEK \ $(LMP_INC) $(OCL_INC) $(CPP_OPT) OCL_LINK = -L$(ONEAPI_ROOT)/compiler/latest/linux/lib -lOpenCL OCL_PREC = -D_SINGLE_DOUBLE -OCL_TUNE = -DMPI_GERYON -DGERYON_NUMA_FISSION -DUCL_NO_EXIT +OCL_TUNE = -DMPI_GERYON -DCUDA_PROXY -DGERYON_NUMA_FISSION -DUCL_NO_EXIT -DGERYON_NO_OCL_MARKERS BIN_DIR = ./ OBJ_DIR = ./ diff --git a/lib/gpu/Makefile.oneapi_prof b/lib/gpu/Makefile.oneapi_prof new file mode 100644 index 0000000000..1e21597373 --- /dev/null +++ b/lib/gpu/Makefile.oneapi_prof @@ -0,0 +1,28 @@ +# /* ---------------------------------------------------------------------- +# Linux Makefile for Intel oneAPI - Mixed precision (with timing enabled) +# ------------------------------------------------------------------------- */ + +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.opencl + +# this setting should match LAMMPS Makefile +# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL + +LMP_INC = -DLAMMPS_SMALLBIG + +OCL_INC = -I$(ONEAPI_ROOT)/compiler/latest/linux/include/sycl/ +CPP_OPT = -xHost -O2 -qopenmp -qopenmp-simd -ffast-math -freciprocal-math +OCL_CPP = mpiicpc -cxx=icpx -std=c++11 -DMPICH_IGNORE_CXX_SEEK \ + $(LMP_INC) $(OCL_INC) $(CPP_OPT) +OCL_LINK = -L$(ONEAPI_ROOT)/compiler/latest/linux/lib -lOpenCL +OCL_PREC = -D_SINGLE_DOUBLE +OCL_TUNE = -DMPI_GERYON -DCUDA_PROXY -DGERYON_NUMA_FISSION -DUCL_NO_EXIT + +BIN_DIR = ./ +OBJ_DIR = ./ +LIB_DIR = ./ +AR = ar +BSH = /bin/sh + +include Opencl.makefile diff --git a/lib/gpu/README b/lib/gpu/README index 51b21960ae..b720aa65cb 100644 --- a/lib/gpu/README +++ b/lib/gpu/README @@ -266,6 +266,7 @@ LAL_SERIALIZE_INIT Force serialization of initialization and compilation for multiple MPI tasks sharing the same accelerator. Some accelerator API implementations have had issues with temporary file conflicts in the past. +LAL_DISABLE_PREFETCH Disable prefetch in kernels GERYON_FORCE_SHARED_MAIN_MEM_ON Should only be used for builds where the accelerator is guaranteed to share physical main memory with the host (e.g. integrated diff --git a/lib/gpu/geryon/nvd_device.h b/lib/gpu/geryon/nvd_device.h index 1b2e5b8c77..e63a1f56b2 100644 --- a/lib/gpu/geryon/nvd_device.h +++ b/lib/gpu/geryon/nvd_device.h @@ -429,7 +429,7 @@ void UCL_Device::clear() { CU_SAFE_CALL_NS(cuCtxSetCurrent(_old_context)); CU_SAFE_CALL_NS(cuDevicePrimaryCtxRelease(_cu_device)); #else - cuCtxDestroy(_context)); + cuCtxDestroy(_context); #endif } _device=-1; diff --git a/lib/gpu/lal_amoeba.cu b/lib/gpu/lal_amoeba.cu index f572d3ebd0..82a42cff6c 100644 --- a/lib/gpu/lal_amoeba.cu +++ b/lib/gpu/lal_amoeba.cu @@ -113,7 +113,7 @@ _texture( q_tex,int2); dufld[5]=red_acc[5][tid]; \ } \ if (offset==0 && ii1) \ simd_reduce_add3(t_per_atom, f.x, f.y, f.z); \ if (offset==0 && ii int AnswerT::bytes_per_atom() const { - int bytes=11*sizeof(acctyp); + int bytes=10*sizeof(acctyp); if (_rot) - bytes+=4*sizeof(acctyp); + bytes+=3*sizeof(acctyp); if (_charge) bytes+=sizeof(acctyp); return bytes; @@ -42,9 +42,9 @@ bool AnswerT::alloc(const int inum) { bool success=true; - _ans_fields=4; + _ans_fields=3; if (_rot) - _ans_fields+=4; + _ans_fields+=3; // --------------------------- Device allocations success=success && (engv.alloc(_ev_fields*_max_local,*dev,UCL_READ_ONLY, @@ -134,11 +134,11 @@ void AnswerT::clear() { template double AnswerT::host_memory_usage() const { - int atom_bytes=4; + int atom_bytes=3; if (_charge) atom_bytes+=1; if (_rot) - atom_bytes+=4; + atom_bytes+=3; int ans_bytes=atom_bytes+_ev_fields; return ans_bytes*(_max_local)*sizeof(acctyp)+ sizeof(Answer); @@ -169,9 +169,9 @@ void AnswerT::copy_answers(const bool eflag, const bool vflag, if (csize>0) engv.update_host(_ev_stride*csize,true); if (_rot) - force.update_host(_inum*4*2,true); + force.update_host(_inum*3*2,true); else - force.update_host(_inum*4,true); + force.update_host(_inum*3,true); time_answer.stop(); #ifndef GERYON_OCL_FLUSH @@ -298,10 +298,7 @@ double AnswerT::energy_virial(double *eatom, double **vatom, template void AnswerT::get_answers(double **f, double **tor) { if (_ilist==nullptr) { - typedef struct { double x,y,z; } vec3d; - typedef struct { acctyp x,y,z,w; } vec4d_t; - auto fp=reinterpret_cast(&(f[0][0])); - auto forcep=reinterpret_cast(&(force[0])); + auto fp=reinterpret_cast(&(f[0][0])); #if (LAL_USE_OMP == 1) #pragma omp parallel @@ -310,27 +307,21 @@ void AnswerT::get_answers(double **f, double **tor) { #if (LAL_USE_OMP == 1) const int nthreads = omp_get_num_threads(); const int tid = omp_get_thread_num(); - const int idelta = _inum / nthreads + 1; + const int idelta = _inum*3 / nthreads + 1; const int ifrom = tid * idelta; - const int ito = std::min(ifrom + idelta, _inum); + const int ito = std::min(ifrom + idelta, _inum*3); #else const int ifrom = 0; - const int ito = _inum; + const int ito = _inum*3; #endif - for (int i=ifrom; i(&(tor[0][0])); - auto torquep=reinterpret_cast(&(force[_inum*4])); - for (int i=ifrom; i(&(tor[0][0])); + auto torquep=&(force[_inum*3]); + for (int i=ifrom; i void AtomT::compile_kernels(UCL_Device &dev) { std::string flags = ""; atom_program=new UCL_Program(dev); - atom_program->load_string(atom,flags,nullptr,screen); + atom_program->load_string(atom,flags.c_str(),nullptr,stderr); k_cast_x.set_function(*atom_program,"kernel_cast_x"); _compiled=true; } diff --git a/lib/gpu/lal_atom.cu b/lib/gpu/lal_atom.cu index 287d72803c..1418459301 100644 --- a/lib/gpu/lal_atom.cu +++ b/lib/gpu/lal_atom.cu @@ -18,7 +18,7 @@ #endif __kernel void kernel_cast_x(__global numtyp4 *restrict x_type, - const __global numtyp *restrict x, + const __global double *restrict x, const __global int *restrict type, const int nall) { int ii=GLOBAL_ID_X; diff --git a/lib/gpu/lal_atom.h b/lib/gpu/lal_atom.h index 771c2a3571..081a1ae048 100644 --- a/lib/gpu/lal_atom.h +++ b/lib/gpu/lal_atom.h @@ -52,6 +52,12 @@ using namespace ucl_cudadr; namespace LAMMPS_AL { +struct EllipsoidBonus { + double shape[3]; + double quat[4]; + int ilocal; +}; + template class Atom { public: @@ -306,8 +312,8 @@ class Atom { if (_x_avail==false) { double t=MPI_Wtime(); #ifdef GPU_CAST - memcpy(host_x_cast.begin(),host_ptr[0],_nall*3*sizeof(double)); - memcpy(host_type_cast.begin(),host_type,_nall*sizeof(int)); + memcpy(x_cast.host.begin(),host_ptr[0],_nall*3*sizeof(double)); + memcpy(type_cast.host.begin(),host_type,_nall*sizeof(int)); #else vec3d *host_p=reinterpret_cast(&(host_ptr[0][0])); vec4d_t *xp=reinterpret_cast(&(x[0])); @@ -351,6 +357,24 @@ class Atom { add_x_data(host_ptr,host_type); } + // Cast mu data to write buffer (stored in quat) + template + inline void cast_mu_data(cpytyp *host_ptr) { + if (_quat_avail==false) { + double t=MPI_Wtime(); + if (sizeof(numtyp)==sizeof(double)) + memcpy(quat.host.begin(),host_ptr,_nall*4*sizeof(numtyp)); + else + #if (LAL_USE_OMP == 1) && (LAL_USE_OMP_SIMD == 1) + #pragma omp parallel for simd schedule(static) + #elif (LAL_USE_OMP_SIMD == 1) + #pragma omp simd + #endif + for (int i=0; i<_nall*4; i++) quat[i]=host_ptr[i]; + _time_cast+=MPI_Wtime()-t; + } + } + // Cast charges to write buffer template inline void cast_q_data(cpytyp *host_ptr) { @@ -384,22 +408,24 @@ class Atom { } // Cast quaternions to write buffer - template - inline void cast_quat_data(cpytyp *host_ptr) { + inline void cast_quat_data(const int *ellipsoid, + const EllipsoidBonus *bonus) { if (_quat_avail==false) { double t=MPI_Wtime(); - if (_host_view) { - quat.host.view((numtyp*)host_ptr,_nall*4,*dev); - quat.device.view(quat.host); - } else if (sizeof(numtyp)==sizeof(double)) - memcpy(quat.host.begin(),host_ptr,_nall*4*sizeof(numtyp)); - else - #if (LAL_USE_OMP == 1) && (LAL_USE_OMP_SIMD == 1) - #pragma omp parallel for simd schedule(static) - #elif (LAL_USE_OMP_SIMD == 1) - #pragma omp simd - #endif - for (int i=0; i<_nall*4; i++) quat[i]=host_ptr[i]; + #if (LAL_USE_OMP == 1) && (LAL_USE_OMP_SIMD == 1) + #pragma omp parallel for simd schedule(static) + #elif (LAL_USE_OMP_SIMD == 1) + #pragma omp simd + #endif + for (int i=0; i<_nall; i++) { + int qi = ellipsoid[i]; + if (qi > -1) { + quat[i*4] = bonus[qi].quat[0]; + quat[i*4+1] = bonus[qi].quat[1]; + quat[i*4+2] = bonus[qi].quat[2]; + quat[i*4+3] = bonus[qi].quat[3]; + } + } _time_cast+=MPI_Wtime()-t; } } @@ -419,10 +445,6 @@ class Atom { inline void cast_v_data(double **host_ptr, const tagint *host_tag) { if (_v_avail==false) { double t=MPI_Wtime(); - #ifdef GPU_CAST - memcpy(host_v_cast.begin(),host_ptr[0],_nall*3*sizeof(double)); - memcpy(host_tag_cast.begin(),host_tag,_nall*sizeof(int)); - #else vec3d *host_p=reinterpret_cast(&(host_ptr[0][0])); vec4d_t *vp=reinterpret_cast(&(v[0])); #if (LAL_USE_OMP == 1) @@ -434,7 +456,6 @@ class Atom { vp[i].z=host_p[i].z; vp[i].w=host_tag[i]; } - #endif _time_cast+=MPI_Wtime()-t; } } @@ -444,16 +465,7 @@ class Atom { inline void add_v_data(double ** /*host_ptr*/, tagint * /*host_tag*/) { time_vel.start(); if (_v_avail==false) { - #ifdef GPU_CAST - v_cast.update_device(_nall*3,true); - tag_cast.update_device(_nall,true); - int block_size=64; - int GX=static_cast(ceil(static_cast(_nall)/block_size)); - k_cast_x.set_size(GX,block_size); - k_cast_x.run(&v, &v_cast, &tag_cast, &_nall); - #else v.update_device(_nall*4,true); - #endif _v_avail=true; } time_vel.stop(); @@ -519,7 +531,7 @@ class Atom { UCL_Vector extra; #ifdef GPU_CAST - UCL_Vector x_cast; + UCL_Vector x_cast; UCL_Vector type_cast; #endif diff --git a/lib/gpu/lal_base_amoeba.cpp b/lib/gpu/lal_base_amoeba.cpp index 09d7386461..0821a33b06 100644 --- a/lib/gpu/lal_base_amoeba.cpp +++ b/lib/gpu/lal_base_amoeba.cpp @@ -143,10 +143,10 @@ int BaseAmoebaT::init_atomic(const int nlocal, const int nall, dev_short_nbor.alloc(ef_nall*(2+max_nbors),*(this->ucl_device),UCL_READ_WRITE); _max_tep_size=static_cast(static_cast(ef_nall)*1.10); - _tep.alloc(_max_tep_size*4,*(this->ucl_device),UCL_READ_WRITE,UCL_READ_WRITE); + _tep.alloc(_max_tep_size*3,*(this->ucl_device),UCL_READ_WRITE,UCL_READ_WRITE); _max_fieldp_size = _max_tep_size; - _fieldp.alloc(_max_fieldp_size*8,*(this->ucl_device),UCL_READ_WRITE,UCL_READ_WRITE); + _fieldp.alloc(_max_fieldp_size*6,*(this->ucl_device),UCL_READ_WRITE,UCL_READ_WRITE); _max_thetai_size = 0; @@ -387,7 +387,7 @@ void BaseAmoebaT::compute_multipole_real(const int /*ago*/, const int inum_full, if (inum_full>_max_tep_size) { _max_tep_size=static_cast(static_cast(inum_full)*1.10); - _tep.resize(_max_tep_size*4); + _tep.resize(_max_tep_size*3); } *tep_ptr=_tep.host.begin(); @@ -403,7 +403,7 @@ void BaseAmoebaT::compute_multipole_real(const int /*ago*/, const int inum_full, // copy tep from device to host - _tep.update_host(_max_tep_size*4,false); + _tep.update_host(_max_tep_size*3,false); } // --------------------------------------------------------------------------- @@ -429,7 +429,7 @@ void BaseAmoebaT::compute_udirect2b(int *host_amtype, int *host_amgroup, double // copy field and fieldp from device to host (_fieldp store both arrays, one after another) - _fieldp.update_host(_max_fieldp_size*8,false); + _fieldp.update_host(_max_fieldp_size*6,false); } // --------------------------------------------------------------------------- @@ -456,7 +456,7 @@ void BaseAmoebaT::compute_umutual2b(int *host_amtype, int *host_amgroup, double // NOTE: move this step to update_fieldp() to delay device-host transfer // after umutual1 and self are done on the GPU // *fieldp_ptr=_fieldp.host.begin(); - // _fieldp.update_host(_max_fieldp_size*8,false); + // _fieldp.update_host(_max_fieldp_size*6,false); } // --------------------------------------------------------------------------- @@ -732,7 +732,7 @@ void BaseAmoebaT::compute_polar_real(int *host_amtype, int *host_amgroup, device->add_ans_object(ans); // copy tep from device to host - _tep.update_host(_max_tep_size*4,false); + _tep.update_host(_max_tep_size*3,false); } // --------------------------------------------------------------------------- diff --git a/lib/gpu/lal_base_dipole.cpp b/lib/gpu/lal_base_dipole.cpp index 6ef1c40ca7..7f09e100f1 100644 --- a/lib/gpu/lal_base_dipole.cpp +++ b/lib/gpu/lal_base_dipole.cpp @@ -233,7 +233,7 @@ void BaseDipoleT::compute(const int f_ago, const int inum_full, atom->cast_x_data(host_x,host_type); atom->cast_q_data(host_q); - atom->cast_quat_data(host_mu[0]); + atom->cast_mu_data(host_mu[0]); hd_balancer.start_timer(); atom->add_x_data(host_x,host_type); atom->add_q_data(); @@ -297,12 +297,12 @@ int** BaseDipoleT::compute(const int ago, const int inum_full, if (!success) return nullptr; atom->cast_q_data(host_q); - atom->cast_quat_data(host_mu[0]); + atom->cast_mu_data(host_mu[0]); hd_balancer.start_timer(); } else { atom->cast_x_data(host_x,host_type); atom->cast_q_data(host_q); - atom->cast_quat_data(host_mu[0]); + atom->cast_mu_data(host_mu[0]); hd_balancer.start_timer(); atom->add_x_data(host_x,host_type); } diff --git a/lib/gpu/lal_base_ellipsoid.cpp b/lib/gpu/lal_base_ellipsoid.cpp index 0bc20615a1..bc383de18f 100644 --- a/lib/gpu/lal_base_ellipsoid.cpp +++ b/lib/gpu/lal_base_ellipsoid.cpp @@ -375,7 +375,8 @@ int* BaseEllipsoidT::compute(const int f_ago, const int inum_full, const bool eflag_in, const bool vflag_in, const bool eatom, const bool vatom, int &host_start, const double cpu_time, - bool &success, double **host_quat) { + bool &success, const int *ellipsoid, + const EllipsoidBonus *bonus) { acc_timers(); int eflag, vflag; if (eflag_in) eflag=2; @@ -409,7 +410,7 @@ int* BaseEllipsoidT::compute(const int f_ago, const int inum_full, list=ilist; atom->cast_x_data(host_x,host_type); - atom->cast_quat_data(host_quat[0]); + atom->cast_quat_data(ellipsoid,bonus); hd_balancer.start_timer(); atom->add_x_data(host_x,host_type); atom->add_quat_data(); @@ -433,7 +434,8 @@ int** BaseEllipsoidT::compute(const int ago, const int inum_full, const bool eatom, const bool vatom, int &host_start, int **ilist, int **jnum, const double cpu_time, bool &success, - double **host_quat) { + const int *ellipsoid, + const EllipsoidBonus *bonus) { acc_timers(); int eflag, vflag; if (eflag_in) eflag=2; @@ -460,11 +462,11 @@ int** BaseEllipsoidT::compute(const int ago, const int inum_full, sublo, subhi, tag, nspecial, special, success); if (!success) return nullptr; - atom->cast_quat_data(host_quat[0]); + atom->cast_quat_data(ellipsoid,bonus); hd_balancer.start_timer(); } else { atom->cast_x_data(host_x,host_type); - atom->cast_quat_data(host_quat[0]); + atom->cast_quat_data(ellipsoid,bonus); hd_balancer.start_timer(); atom->add_x_data(host_x,host_type); } diff --git a/lib/gpu/lal_base_ellipsoid.h b/lib/gpu/lal_base_ellipsoid.h index 9885e931ee..618f97da54 100644 --- a/lib/gpu/lal_base_ellipsoid.h +++ b/lib/gpu/lal_base_ellipsoid.h @@ -170,7 +170,8 @@ class BaseEllipsoid { double **host_x, int *host_type, int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, - const double cpu_time, bool &success, double **quat); + const double cpu_time, bool &success, + const int *ellipsoid, const EllipsoidBonus *bonus); /// Pair loop with device neighboring int**compute(const int ago, const int inum_full, const int nall, @@ -179,7 +180,7 @@ class BaseEllipsoid { tagint **special, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, int **ilist, int **numj, const double cpu_time, bool &success, - double **host_quat); + const int *ellipsoid, const EllipsoidBonus *bonus); // -------------------------- DEVICE DATA ------------------------- diff --git a/lib/gpu/lal_beck.cu b/lib/gpu/lal_beck.cu index 12f1314c52..b0a9a6a4c1 100644 --- a/lib/gpu/lal_beck.cu +++ b/lib/gpu/lal_beck.cu @@ -31,7 +31,7 @@ __kernel void k_beck(const __global numtyp4 *restrict x_, const __global numtyp *restrict sp_lj_in, const __global int *dev_nbor, const __global int *dev_packed, - __global acctyp4 *restrict ans, + __global acctyp3 *restrict ans, __global acctyp *restrict engv, const int eflag, const int vflag, const int inum, const int nbor_pitch, const int t_per_atom) { @@ -47,7 +47,7 @@ __kernel void k_beck(const __global numtyp4 *restrict x_, sp_lj[2]=sp_lj_in[2]; sp_lj[3]=sp_lj_in[3]; - acctyp4 f; + acctyp3 f; f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0; acctyp energy, virial[6]; if (EVFLAG) { @@ -66,6 +66,7 @@ __kernel void k_beck(const __global numtyp4 *restrict x_, numtyp factor_lj; for ( ; nbor gpu_lib_data(19,*gpu,UCL_NOT_PINNED); + UCL_Vector gpu_lib_data(20,*gpu,UCL_NOT_PINNED); k_info.set_size(1,1); k_info.run(&gpu_lib_data); gpu_lib_data.update_host(false); diff --git a/lib/gpu/lal_device.cu b/lib/gpu/lal_device.cu index 61341964b2..073c7de3d9 100644 --- a/lib/gpu/lal_device.cu +++ b/lib/gpu/lal_device.cu @@ -52,4 +52,5 @@ __kernel void kernel_info(__global int *info) { info[16]=MAX_SHARED_TYPES; info[17]=MAX_BIO_SHARED_TYPES; info[18]=PPPM_MAX_SPLINE; + info[19]=NBOR_PREFETCH; } diff --git a/lib/gpu/lal_dipole_lj.cu b/lib/gpu/lal_dipole_lj.cu index cbe68ff692..18326edd3a 100644 --- a/lib/gpu/lal_dipole_lj.cu +++ b/lib/gpu/lal_dipole_lj.cu @@ -211,7 +211,7 @@ __kernel void k_dipole_lj(const __global numtyp4 *restrict x_, const __global numtyp *restrict sp_lj_in, const __global int *dev_nbor, const __global int *dev_packed, - __global acctyp4 *restrict ans, + __global acctyp3 *restrict ans, __global acctyp *restrict engv, const int eflag, const int vflag, const int inum, const int nbor_pitch, @@ -235,7 +235,7 @@ __kernel void k_dipole_lj(const __global numtyp4 *restrict x_, sp_lj[6]=sp_lj_in[6]; sp_lj[7]=sp_lj_in[7]; - acctyp4 f, tor; + acctyp3 f, tor; f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0; tor.x=(acctyp)0; tor.y=(acctyp)0; tor.z=(acctyp)0; acctyp energy, e_coul, virial[6]; @@ -257,6 +257,7 @@ __kernel void k_dipole_lj(const __global numtyp4 *restrict x_, int itype=ix.w; for ( ; nbor(bonus)); } int * gb_gpu_compute(const int ago, const int inum_full, const int nall, double **host_x, int *host_type, int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, - const double cpu_time, bool &success, double **host_quat) { + const double cpu_time, bool &success, + const int *ellipsoid, const void *bonus) { return GBMF.compute(ago, inum_full, nall, host_x, host_type, ilist, numj, firstneigh, eflag, vflag, eatom, vatom, host_start, - cpu_time, success, host_quat); + cpu_time, success, ellipsoid, + static_cast(bonus)); } // --------------------------------------------------------------------------- diff --git a/lib/gpu/lal_gayberne_lj.cu b/lib/gpu/lal_gayberne_lj.cu index 4582f0d411..55b4eddb58 100644 --- a/lib/gpu/lal_gayberne_lj.cu +++ b/lib/gpu/lal_gayberne_lj.cu @@ -34,7 +34,7 @@ __kernel void k_gayberne_sphere_ellipsoid(const __global numtyp4 *restrict x_, const __global numtyp *restrict lshape, const __global int *dev_nbor, const int stride, - __global acctyp4 *restrict ans, + __global acctyp3 *restrict ans, __global acctyp *restrict engv, __global int *restrict err_flag, const int eflag, const int vflag, @@ -53,7 +53,7 @@ __kernel void k_gayberne_sphere_ellipsoid(const __global numtyp4 *restrict x_, sp_lj[2]=gum[5]; sp_lj[3]=gum[6]; - acctyp4 f; + acctyp3 f; f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0; acctyp energy, virial[6]; if (EVFLAG) { @@ -75,6 +75,7 @@ __kernel void k_gayberne_sphere_ellipsoid(const __global numtyp4 *restrict x_, numtyp factor_lj; for ( ; nbor1) \ simd_reduce_add3(t_per_atom, f.x, f.y, f.z); \ if (offset==0 && ii=0 && iH2>=0) { - compute_newsite(iO,iH1,iH2, &m[iO], qO, alpha, x_); + compute_newsite(iO,iH1,iH2, &m[iO], qO, alpha, x_); } else { m[iO] = ix; m[iO].w = qO; @@ -313,9 +313,9 @@ __kernel void k_lj_tip4p_newsite(const __global numtyp4 *restrict x_, /* ---------------------------------------------------------------------- Compute initial value of force, energy and virial for each local particle. The values calculated on oxygens use the virtual charge position (m) and - they are stored in a separate array (ansO) for further distribution + they are stored in a separate array (ansO) for further distribution in a separate kernel. For some hydrogens located on the boundary - of the local region, oxygens are non-local and the contribution + of the local region, oxygens are non-local and the contribution of oxygen is calculated separately in this kernel for them . ---------------------------------------------------------------------- */ __kernel void k_lj_tip4p_long(const __global numtyp4 *restrict x_, @@ -325,7 +325,7 @@ __kernel void k_lj_tip4p_long(const __global numtyp4 *restrict x_, const __global numtyp *restrict sp_lj, const __global int * dev_nbor, const __global int * dev_packed, - __global acctyp4 *restrict ans, + __global acctyp3 *restrict ans, __global acctyp *restrict engv, const int eflag, const int vflag, const int inum, const int nbor_pitch, const int t_per_atom, @@ -344,7 +344,8 @@ __kernel void k_lj_tip4p_long(const __global numtyp4 *restrict x_, int n_stride; local_allocate_store_charge(); - acctyp4 f, fO; + acctyp3 f; + acctyp4 fO; f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0; fO.x=(acctyp)0; fO.y=(acctyp)0; fO.z=(acctyp)0; acctyp energy, e_coul, virial[6], vO[6]; @@ -386,6 +387,7 @@ __kernel void k_lj_tip4p_long(const __global numtyp4 *restrict x_, } for ( ; nbor 0 + tagint special_preload[SPECIAL_DATA_PRELOAD_SIZE]; + for (int i = 0, j = 0; (i < n3) && (j < SPECIAL_DATA_PRELOAD_SIZE); i+=UNROLL_FACTOR_SPECIAL, j++) { + special_preload[j] = special[ii + i*nt]; + } +#endif - int offset=ii; - for (int i=0; i=n1) - which++; - if (i>=n2) - which++; - nbor=nbor ^ (which << SBBITS); - *list=nbor; + for ( ; list 0 + if ((c == 0) && (j < SPECIAL_DATA_PRELOAD_SIZE)) { + special_data[c] = special_preload[j]; + } + else +#endif + special_data[c] = special[ii + (i+c)*nt]; + } } - offset+=nt; + + for (int k=0; k= n1) { + which[k]++; + } + } + for (int k=0; k= n2) { + which[k]++; + } + which[k] <<= SBBITS; + } + for (int c = 0; c < UNROLL_FACTOR_SPECIAL; c++) { + if (i + c < n3) { + for (int l=0; l=PPPM_MAX_SPLINE*PPPM_MAX_SPLINE // +// NBOR_PREFETCH +// Definition: Control use of prefetch for neighbor indices +// 0 = No prefetch +// 1 = Prefetch using standard API +// 2 = Prefetch using Intel intrinsics +// Restrictions: NBOR_PREFETCH forced to 0 when LAL_DISABLE_PREFETCH +// is defined in library build //*************************************************************************/ // ------------------------------------------------------------------------- @@ -101,6 +108,7 @@ #if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_pre_cuda_hip.h" +#define ucl_prefetch(p) #define ucl_pow pow #endif @@ -169,7 +177,7 @@ #define ucl_abs fabs #define ucl_erfc erfc -#if defined(FAST_MATH) && !defined(_DOUBLE_DOUBLE) +#if (FAST_MATH > 0) && !defined(_DOUBLE_DOUBLE) #define ucl_exp native_exp #define ucl_pow pow @@ -285,6 +293,55 @@ #define simd_size() SIMD_SIZE #endif +// ------------------------------------------------------------------------- +// OPENCL KERNEL MACROS - PREFETCH +// ------------------------------------------------------------------------- + +#if (NBOR_PREFETCH == 0) +#define ucl_prefetch(p) +#endif + +#if (NBOR_PREFETCH == 1) +inline void ucl_prefetch(const __global int *p) { + prefetch(p, 1); +} +#endif + +#if (NBOR_PREFETCH == 2) +// Load message caching control +enum LSC_LDCC { + LSC_LDCC_DEFAULT, + LSC_LDCC_L1UC_L3UC, //1 Override to L1 uncached and L3 uncached + LSC_LDCC_L1UC_L3C, //1 Override to L1 uncached and L3 cached + LSC_LDCC_L1C_L3UC, //1 Override to L1 cached and L3 uncached + LSC_LDCC_L1C_L3C, //1 Override to L1 cached and L3 cached + LSC_LDCC_L1S_L3UC, //1 Override to L1 streaming load and L3 uncached + LSC_LDCC_L1S_L3C, //1 Override to L1 streaming load and L3 cached + LSC_LDCC_L1IAR_L3C, //1 Override to L1 invalidate-after-read, and L3 cached +}; + +void __builtin_IB_lsc_prefetch_global_uint(const __global uint *base, + int elemOff, + enum LSC_LDCC cacheOpt); //D32V1 + +inline void ucl_prefetch(const __global int *p) { + __builtin_IB_lsc_prefetch_global_uint((const __global uint *)p, 0, + LSC_LDCC_L1C_L3UC); +} +#endif + +struct _lgpu_float3 { + float x; float y; float z; +}; +struct _lgpu_double3 { + double x; double y; double z; +}; +#ifdef _SINGLE_SINGLE +#define acctyp3 struct _lgpu_float3 +#else +#define acctyp3 struct _lgpu_double3 +#endif + // ------------------------------------------------------------------------- // END OPENCL DEFINITIONS // ------------------------------------------------------------------------- @@ -301,6 +358,9 @@ #define numtyp4 double4 #define acctyp double #define acctyp2 double2 +#ifndef acctyp3 +#define acctyp3 double3 +#endif #define acctyp4 double4 #endif @@ -310,6 +370,9 @@ #define numtyp4 float4 #define acctyp double #define acctyp2 double2 +#ifndef acctyp3 +#define acctyp3 double3 +#endif #define acctyp4 double4 #endif @@ -319,6 +382,9 @@ #define numtyp4 float4 #define acctyp float #define acctyp2 float2 +#ifndef acctyp3 +#define acctyp3 float3 +#endif #define acctyp4 float4 #endif diff --git a/lib/gpu/lal_re_squared.cu b/lib/gpu/lal_re_squared.cu index c69a338749..318bdfdd69 100644 --- a/lib/gpu/lal_re_squared.cu +++ b/lib/gpu/lal_re_squared.cu @@ -32,6 +32,9 @@ ucl_inline numtyp det_prime(const numtyp m[9], const numtyp m2[9]) return ans; } +#ifdef INTEL_OCL +__attribute__((intel_reqd_sub_group_size(16))) +#endif __kernel void k_resquared(const __global numtyp4 *restrict x_, const __global numtyp4 *restrict q, const __global numtyp4 *restrict shape, @@ -41,7 +44,7 @@ __kernel void k_resquared(const __global numtyp4 *restrict x_, const int ntypes, const __global int *dev_nbor, const int stride, - __global acctyp4 *restrict ans, + __global acctyp3 *restrict ans, const int astride, __global acctyp *restrict engv, __global int *restrict err_flag, @@ -62,7 +65,7 @@ __kernel void k_resquared(const __global numtyp4 *restrict x_, const numtyp b_alpha=(numtyp)45.0/(numtyp)56.0; const numtyp cr60=ucl_cbrt((numtyp)60.0); - acctyp4 f, tor; + acctyp3 f, tor; f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0; tor.x=(acctyp)0; tor.y=(acctyp)0; tor.z=(acctyp)0; acctyp energy, virial[6]; @@ -122,6 +125,7 @@ __kernel void k_resquared(const __global numtyp4 *restrict x_, numtyp factor_lj; for ( ; nbor(bonus)); } int * re_gpu_compute(const int ago, const int inum_full, const int nall, double **host_x, int *host_type, int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, - const double cpu_time, bool &success, double **host_quat) { + const double cpu_time, bool &success, + const int *ellipsoid, const void *bonus) { return REMF.compute(ago, inum_full, nall, host_x, host_type, ilist, numj, firstneigh, eflag, vflag, eatom, vatom, host_start, - cpu_time, success, host_quat); + cpu_time, success, ellipsoid, + static_cast(bonus)); } // --------------------------------------------------------------------------- @@ -135,4 +139,3 @@ int * re_gpu_compute(const int ago, const int inum_full, const int nall, double re_gpu_bytes() { return REMF.host_memory_usage(); } - diff --git a/lib/gpu/lal_re_squared_lj.cu b/lib/gpu/lal_re_squared_lj.cu index ca1b08facd..b3347fcb18 100644 --- a/lib/gpu/lal_re_squared_lj.cu +++ b/lib/gpu/lal_re_squared_lj.cu @@ -86,7 +86,7 @@ ap1+=astride; \ } \ } \ - acctyp4 old=ans[ii]; \ + acctyp3 old=ans[ii]; \ old.x+=f.x; \ old.y+=f.y; \ old.z+=f.z; \ @@ -131,7 +131,7 @@ ap1+=astride; \ } \ } \ - acctyp4 old=ans[ii]; \ + acctyp3 old=ans[ii]; \ old.x+=f.x; \ old.y+=f.y; \ old.z+=f.z; \ @@ -154,7 +154,7 @@ __kernel void k_resquared_ellipsoid_sphere(const __global numtyp4 *restrict x_, const int ntypes, const __global int *dev_nbor, const int stride, - __global acctyp4 *restrict ans, + __global acctyp3 *restrict ans, const int astride, __global acctyp *restrict engv, __global int *restrict err_flag, @@ -180,7 +180,7 @@ __kernel void k_resquared_ellipsoid_sphere(const __global numtyp4 *restrict x_, const numtyp solv_f_r = (numtyp)3.0/((numtyp)16.0*ucl_atan((numtyp)1.0)*(numtyp)2025.0); - acctyp4 f, tor; + acctyp3 f, tor; f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0; tor.x=(acctyp)0; tor.y=(acctyp)0; tor.z=(acctyp)0; acctyp energy, virial[6]; @@ -216,6 +216,7 @@ __kernel void k_resquared_ellipsoid_sphere(const __global numtyp4 *restrict x_, numtyp factor_lj; for ( ; nbor1) \ simd_reduce_add3(t_per_atom, f.x, f.y, f.z); \ if (offset==0 && ii1) \ simd_reduce_add3(t_per_atom, f.x, f.y, f.z); \ if (offset==0 && ii1) \ simd_reduce_add3(t_per_atom, f.x, f.y, f.z); \ if (offset==0 && ii1) \ simd_reduce_add3(t_per_atom, f.x, f.y, f.z); \ if (offset==0 && ii1) \ simd_reduce_add3(t_per_atom, f.x, f.y, f.z); \ if (offset==0 && iimolecular != Atom::ATOMIC)) { + PairHybrid *ph = reinterpret_cast(force->pair_match("^hybrid",0)); + if (ph) { + for (int isub=0; isub < ph->nstyles; ++isub) { + if (force->pair_match("gpu",0,isub)) overlap_topo = 1; + } + } else { + if (force->pair_match("gpu",0)) overlap_topo = 1; + } + } + if (overlap_topo) neighbor->set_overlap_topo(1); + if (_gpu_mode == GPU_NEIGH || _gpu_mode == GPU_HYB_NEIGH) if (neighbor->exclude_setting() != 0) error->all(FLERR, "Cannot use neigh_modify exclude with GPU neighbor builds"); diff --git a/src/GPU/fix_nve_asphere_gpu.cpp b/src/GPU/fix_nve_asphere_gpu.cpp index 06d1d7a7ca..481f44bb63 100644 --- a/src/GPU/fix_nve_asphere_gpu.cpp +++ b/src/GPU/fix_nve_asphere_gpu.cpp @@ -243,12 +243,7 @@ void FixNVEAsphereGPU::initial_integrate(int /*vflag*/) // update angular momentum by 1/2 step if (igroup == 0) { #if (LAL_USE_OMP_SIMD == 1) - // Workaround for compiler bug - #ifdef __INTEL_COMPILER - #pragma simd - #else - #pragma omp simd - #endif + #pragma omp simd #endif for (int i = ifrom; i < ito; i++) { double *quat = bonus[ellipsoid[i]].quat; @@ -257,12 +252,7 @@ void FixNVEAsphereGPU::initial_integrate(int /*vflag*/) } } else { #if (LAL_USE_OMP_SIMD == 1) - // Workaround for compiler bug - #ifdef __INTEL_COMPILER - #pragma simd - #else - #pragma omp simd - #endif + #pragma omp simd #endif for (int i = ifrom; i < ito; i++) { if (mask[i] & groupbit) { diff --git a/src/GPU/pair_amoeba_gpu.cpp b/src/GPU/pair_amoeba_gpu.cpp index fd423486fd..1221db66b1 100644 --- a/src/GPU/pair_amoeba_gpu.cpp +++ b/src/GPU/pair_amoeba_gpu.cpp @@ -155,6 +155,15 @@ PairAmoebaGPU::~PairAmoebaGPU() amoeba_gpu_clear(); } +/* ---------------------------------------------------------------------- */ + +void PairAmoebaGPU::compute(int eflag, int vflag) +{ + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); + PairAmoeba::compute(eflag, vflag); +} + /* ---------------------------------------------------------------------- init specific to this pair style ------------------------------------------------------------------------- */ diff --git a/src/GPU/pair_amoeba_gpu.h b/src/GPU/pair_amoeba_gpu.h index be53f7ef50..75f0d26336 100644 --- a/src/GPU/pair_amoeba_gpu.h +++ b/src/GPU/pair_amoeba_gpu.h @@ -28,6 +28,7 @@ class PairAmoebaGPU : public PairAmoeba { public: PairAmoebaGPU(LAMMPS *lmp); ~PairAmoebaGPU() override; + void compute(int, int) override; void init_style() override; double memory_usage() override; diff --git a/src/GPU/pair_beck_gpu.cpp b/src/GPU/pair_beck_gpu.cpp index 3c21a99105..8d057fd317 100644 --- a/src/GPU/pair_beck_gpu.cpp +++ b/src/GPU/pair_beck_gpu.cpp @@ -109,6 +109,8 @@ void PairBeckGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_born_coul_long_cs_gpu.cpp b/src/GPU/pair_born_coul_long_cs_gpu.cpp index 788a46e2cb..798caeb97a 100644 --- a/src/GPU/pair_born_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_long_cs_gpu.cpp @@ -129,6 +129,8 @@ void PairBornCoulLongCSGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_born_coul_long_gpu.cpp b/src/GPU/pair_born_coul_long_gpu.cpp index 629f716fd6..ca12f03070 100644 --- a/src/GPU/pair_born_coul_long_gpu.cpp +++ b/src/GPU/pair_born_coul_long_gpu.cpp @@ -123,6 +123,8 @@ void PairBornCoulLongGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp index 214a9575be..9858015622 100644 --- a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp @@ -117,6 +117,8 @@ void PairBornCoulWolfCSGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_born_coul_wolf_gpu.cpp b/src/GPU/pair_born_coul_wolf_gpu.cpp index 02a671adc9..ce9956d232 100644 --- a/src/GPU/pair_born_coul_wolf_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_gpu.cpp @@ -114,6 +114,8 @@ void PairBornCoulWolfGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_born_gpu.cpp b/src/GPU/pair_born_gpu.cpp index 905278cdb7..9499cd7307 100644 --- a/src/GPU/pair_born_gpu.cpp +++ b/src/GPU/pair_born_gpu.cpp @@ -109,6 +109,8 @@ void PairBornGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_buck_coul_cut_gpu.cpp b/src/GPU/pair_buck_coul_cut_gpu.cpp index 125ffbfbbd..b6e1e8fbed 100644 --- a/src/GPU/pair_buck_coul_cut_gpu.cpp +++ b/src/GPU/pair_buck_coul_cut_gpu.cpp @@ -111,6 +111,8 @@ void PairBuckCoulCutGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_buck_coul_long_gpu.cpp b/src/GPU/pair_buck_coul_long_gpu.cpp index ca90b3e869..adae92d1ac 100644 --- a/src/GPU/pair_buck_coul_long_gpu.cpp +++ b/src/GPU/pair_buck_coul_long_gpu.cpp @@ -120,6 +120,8 @@ void PairBuckCoulLongGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_buck_gpu.cpp b/src/GPU/pair_buck_gpu.cpp index d6dcdf30bc..4e11a2ec2d 100644 --- a/src/GPU/pair_buck_gpu.cpp +++ b/src/GPU/pair_buck_gpu.cpp @@ -107,6 +107,8 @@ void PairBuckGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_colloid_gpu.cpp b/src/GPU/pair_colloid_gpu.cpp index c0e85907bb..510c4ef12f 100644 --- a/src/GPU/pair_colloid_gpu.cpp +++ b/src/GPU/pair_colloid_gpu.cpp @@ -109,6 +109,8 @@ void PairColloidGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_coul_cut_gpu.cpp b/src/GPU/pair_coul_cut_gpu.cpp index d48ee1cb7b..240ed2f91e 100644 --- a/src/GPU/pair_coul_cut_gpu.cpp +++ b/src/GPU/pair_coul_cut_gpu.cpp @@ -108,6 +108,8 @@ void PairCoulCutGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_coul_debye_gpu.cpp b/src/GPU/pair_coul_debye_gpu.cpp index ed9781c016..7d1fe8d546 100644 --- a/src/GPU/pair_coul_debye_gpu.cpp +++ b/src/GPU/pair_coul_debye_gpu.cpp @@ -109,6 +109,8 @@ void PairCoulDebyeGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_coul_dsf_gpu.cpp b/src/GPU/pair_coul_dsf_gpu.cpp index a4837ed8cb..bf207caf60 100644 --- a/src/GPU/pair_coul_dsf_gpu.cpp +++ b/src/GPU/pair_coul_dsf_gpu.cpp @@ -118,6 +118,8 @@ void PairCoulDSFGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_coul_long_cs_gpu.cpp b/src/GPU/pair_coul_long_cs_gpu.cpp index 921a294721..79c4c4ab7c 100644 --- a/src/GPU/pair_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_coul_long_cs_gpu.cpp @@ -123,6 +123,8 @@ void PairCoulLongCSGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_coul_long_gpu.cpp b/src/GPU/pair_coul_long_gpu.cpp index 0b773882b2..7ecb052f69 100644 --- a/src/GPU/pair_coul_long_gpu.cpp +++ b/src/GPU/pair_coul_long_gpu.cpp @@ -117,6 +117,8 @@ void PairCoulLongGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_dpd_gpu.cpp b/src/GPU/pair_dpd_gpu.cpp index 716978deac..e4657cf2eb 100644 --- a/src/GPU/pair_dpd_gpu.cpp +++ b/src/GPU/pair_dpd_gpu.cpp @@ -256,6 +256,8 @@ void PairDPDGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_dpd_tstat_gpu.cpp b/src/GPU/pair_dpd_tstat_gpu.cpp index 029bf7245e..4a7b05fd2c 100644 --- a/src/GPU/pair_dpd_tstat_gpu.cpp +++ b/src/GPU/pair_dpd_tstat_gpu.cpp @@ -272,6 +272,8 @@ void PairDPDTstatGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_eam_alloy_gpu.cpp b/src/GPU/pair_eam_alloy_gpu.cpp index d1d73e415c..4b7693e989 100644 --- a/src/GPU/pair_eam_alloy_gpu.cpp +++ b/src/GPU/pair_eam_alloy_gpu.cpp @@ -138,6 +138,8 @@ void PairEAMAlloyGPU::compute(int eflag, int vflag) eam_alloy_gpu_compute_force(nullptr, eflag, vflag, eflag_atom, vflag_atom); else eam_alloy_gpu_compute_force(ilist, eflag, vflag, eflag_atom, vflag_atom); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); } /* ---------------------------------------------------------------------- diff --git a/src/GPU/pair_eam_fs_gpu.cpp b/src/GPU/pair_eam_fs_gpu.cpp index c1a4c74d52..9da4e20a6f 100644 --- a/src/GPU/pair_eam_fs_gpu.cpp +++ b/src/GPU/pair_eam_fs_gpu.cpp @@ -138,6 +138,8 @@ void PairEAMFSGPU::compute(int eflag, int vflag) eam_fs_gpu_compute_force(nullptr, eflag, vflag, eflag_atom, vflag_atom); else eam_fs_gpu_compute_force(ilist, eflag, vflag, eflag_atom, vflag_atom); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); } /* ---------------------------------------------------------------------- diff --git a/src/GPU/pair_eam_gpu.cpp b/src/GPU/pair_eam_gpu.cpp index 17af6cfb22..4cb7c7f749 100644 --- a/src/GPU/pair_eam_gpu.cpp +++ b/src/GPU/pair_eam_gpu.cpp @@ -136,6 +136,8 @@ void PairEAMGPU::compute(int eflag, int vflag) eam_gpu_compute_force(nullptr, eflag, vflag, eflag_atom, vflag_atom); else eam_gpu_compute_force(ilist, eflag, vflag, eflag_atom, vflag_atom); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); } /* ---------------------------------------------------------------------- diff --git a/src/GPU/pair_gauss_gpu.cpp b/src/GPU/pair_gauss_gpu.cpp index 17b9e9a650..e6e4ccae1b 100644 --- a/src/GPU/pair_gauss_gpu.cpp +++ b/src/GPU/pair_gauss_gpu.cpp @@ -106,6 +106,8 @@ void PairGaussGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index 5f12b1eaf4..c0b0c2ecb0 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -35,33 +35,39 @@ using namespace LAMMPS_NS; // External functions from cuda library for atom decomposition -int gb_gpu_init(const int ntypes, const double gamma, const double upsilon, const double mu, - double **shape, double **well, double **cutsq, double **sigma, double **epsilon, - double *host_lshape, int **form, double **host_lj1, double **host_lj2, - double **host_lj3, double **host_lj4, double **offset, double *special_lj, - const int nlocal, const int nall, const int max_nbors, const int maxspecial, +int gb_gpu_init(const int ntypes, const double gamma, const double upsilon, + const double mu, double **shape, double **well, double **cutsq, + double **sigma, double **epsilon, double *host_lshape, + int **form, double **host_lj1, double **host_lj2, + double **host_lj3, double **host_lj4, double **offset, + double *special_lj, const int nlocal, const int nall, + const int max_nbors, const int maxspecial, const double cell_size, int &gpu_mode, FILE *screen); void gb_gpu_clear(); -int **gb_gpu_compute_n(const int ago, const int inum, const int nall, double **host_x, - int *host_type, double *sublo, double *subhi, tagint *tag, int **nspecial, - tagint **special, const bool eflag, const bool vflag, const bool eatom, - const bool vatom, int &host_start, int **ilist, int **jnum, - const double cpu_time, bool &success, double **host_quat); -int *gb_gpu_compute(const int ago, const int inum, const int nall, double **host_x, int *host_type, - int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, - const bool eatom, const bool vatom, int &host_start, const double cpu_time, - bool &success, double **host_quat); +int **gb_gpu_compute_n(const int ago, const int inum, const int nall, + double **host_x, int *host_type, double *sublo, + double *subhi, tagint *tag, int **nspecial, + tagint **special, const bool eflag, const bool vflag, + const bool eatom, const bool vatom, int &host_start, + int **ilist, int **jnum, const double cpu_time, + bool &success, const int *ellipsoid, + const void *bonus); +int *gb_gpu_compute(const int ago, const int inum, const int nall, + double **host_x, int *host_type, int *ilist, int *numj, + int **firstneigh, const bool eflag, const bool vflag, + const bool eatom, const bool vatom, int &host_start, + const double cpu_time, bool &success, const int *ellipsoid, + const void *bonus); double gb_gpu_bytes(); enum { SPHERE_SPHERE, SPHERE_ELLIPSE, ELLIPSE_SPHERE, ELLIPSE_ELLIPSE }; /* ---------------------------------------------------------------------- */ -PairGayBerneGPU::PairGayBerneGPU(LAMMPS *lmp) : PairGayBerne(lmp), gpu_mode(GPU_FORCE) +PairGayBerneGPU::PairGayBerneGPU(LAMMPS *lmp) : PairGayBerne(lmp), + gpu_mode(GPU_FORCE) { - quat_nmax = 0; reinitflag = 0; - quat = nullptr; suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } @@ -74,7 +80,6 @@ PairGayBerneGPU::~PairGayBerneGPU() { gb_gpu_clear(); cpu_time = 0.0; - memory->destroy(quat); } /* ---------------------------------------------------------------------- */ @@ -89,21 +94,8 @@ void PairGayBerneGPU::compute(int eflag, int vflag) bool success = true; int *ilist, *numneigh, **firstneigh; - if (nall > quat_nmax) { - quat_nmax = static_cast(1.1 * nall); - memory->grow(quat, quat_nmax, 4, "pair:quat"); - } AtomVecEllipsoid::Bonus *bonus = avec->bonus; int *ellipsoid = atom->ellipsoid; - for (int i = 0; i < nall; i++) { - int qi = ellipsoid[i]; - if (qi > -1) { - quat[i][0] = bonus[qi].quat[0]; - quat[i][1] = bonus[qi].quat[1]; - quat[i][2] = bonus[qi].quat[2]; - quat[i][3] = bonus[qi].quat[3]; - } - } if (gpu_mode != GPU_FORCE) { double sublo[3], subhi[3]; @@ -119,19 +111,24 @@ void PairGayBerneGPU::compute(int eflag, int vflag) } inum = atom->nlocal; firstneigh = - gb_gpu_compute_n(neighbor->ago, inum, nall, atom->x, atom->type, sublo, subhi, atom->tag, - atom->nspecial, atom->special, eflag, vflag, eflag_atom, vflag_atom, - host_start, &ilist, &numneigh, cpu_time, success, quat); + gb_gpu_compute_n(neighbor->ago, inum, nall, atom->x, atom->type, sublo, + subhi, atom->tag, atom->nspecial, atom->special, + eflag, vflag, eflag_atom, vflag_atom, + host_start, &ilist, &numneigh, cpu_time, success, + ellipsoid, bonus); } else { inum = list->inum; numneigh = list->numneigh; firstneigh = list->firstneigh; - ilist = gb_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type, list->ilist, numneigh, - firstneigh, eflag, vflag, eflag_atom, vflag_atom, host_start, cpu_time, - success, quat); + ilist = gb_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type, + list->ilist, numneigh, firstneigh, eflag, vflag, + eflag_atom, vflag_atom, host_start, cpu_time, + success, ellipsoid, bonus); } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); @@ -185,14 +182,13 @@ void PairGayBerneGPU::init_style() if (atom->molecular != Atom::ATOMIC) maxspecial = atom->maxspecial; int mnf = 5e-2 * neighbor->oneatom; int success = - gb_gpu_init(atom->ntypes + 1, gamma, upsilon, mu, shape2, well, cutsq, sigma, epsilon, lshape, - form, lj1, lj2, lj3, lj4, offset, force->special_lj, atom->nlocal, - atom->nlocal + atom->nghost, mnf, maxspecial, cell_size, gpu_mode, screen); + gb_gpu_init(atom->ntypes + 1, gamma, upsilon, mu, shape2, well, cutsq, + sigma, epsilon, lshape, form, lj1, lj2, lj3, lj4, offset, + force->special_lj, atom->nlocal, atom->nlocal + atom->nghost, + mnf, maxspecial, cell_size, gpu_mode, screen); GPU_EXTRA::check_flag(success, error, world); if (gpu_mode == GPU_FORCE) neighbor->add_request(this, NeighConst::REQ_FULL); - quat_nmax = static_cast(1.1 * (atom->nlocal + atom->nghost)); - memory->grow(quat, quat_nmax, 4, "pair:quat"); } /* ---------------------------------------------------------------------- */ @@ -200,12 +196,13 @@ void PairGayBerneGPU::init_style() double PairGayBerneGPU::memory_usage() { double bytes = Pair::memory_usage(); - return bytes + memory->usage(quat, quat_nmax) + gb_gpu_bytes(); + return bytes + gb_gpu_bytes(); } /* ---------------------------------------------------------------------- */ -void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, int *ilist, +void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag, + int /* vflag */, int *ilist, int *numneigh, int **firstneigh) { int i, j, ii, jj, jnum, itype, jtype; diff --git a/src/GPU/pair_gayberne_gpu.h b/src/GPU/pair_gayberne_gpu.h index 89d21b9046..1ce760352c 100644 --- a/src/GPU/pair_gayberne_gpu.h +++ b/src/GPU/pair_gayberne_gpu.h @@ -38,8 +38,6 @@ class PairGayBerneGPU : public PairGayBerne { private: int gpu_mode; double cpu_time; - int quat_nmax; - double **quat; }; } // namespace LAMMPS_NS diff --git a/src/GPU/pair_hippo_gpu.cpp b/src/GPU/pair_hippo_gpu.cpp index 9d286d5db7..8287a7c09d 100644 --- a/src/GPU/pair_hippo_gpu.cpp +++ b/src/GPU/pair_hippo_gpu.cpp @@ -172,6 +172,15 @@ PairHippoGPU::~PairHippoGPU() hippo_gpu_clear(); } +/* ---------------------------------------------------------------------- */ + +void PairAmoebaGPU::compute(int eflag, int vflag) +{ + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); + PairAmoeba::compute(eflag, vflag); +} + /* ---------------------------------------------------------------------- init specific to this pair style ------------------------------------------------------------------------- */ diff --git a/src/GPU/pair_hippo_gpu.h b/src/GPU/pair_hippo_gpu.h index d160446d77..50f362bafc 100644 --- a/src/GPU/pair_hippo_gpu.h +++ b/src/GPU/pair_hippo_gpu.h @@ -28,6 +28,7 @@ class PairHippoGPU : public PairAmoeba { public: PairHippoGPU(LAMMPS *lmp); ~PairHippoGPU() override; + void compute(int, int) override; void init_style() override; double memory_usage() override; diff --git a/src/GPU/pair_lj96_cut_gpu.cpp b/src/GPU/pair_lj96_cut_gpu.cpp index 5b1dd47340..f2371b14ef 100644 --- a/src/GPU/pair_lj96_cut_gpu.cpp +++ b/src/GPU/pair_lj96_cut_gpu.cpp @@ -106,6 +106,8 @@ void PairLJ96CutGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp b/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp index d894d6acf1..dbaef3b929 100644 --- a/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp @@ -101,6 +101,8 @@ void PairLJCharmmCoulCharmmGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp index 5153ea0b37..87d4896bde 100644 --- a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp @@ -122,6 +122,8 @@ void PairLJCharmmCoulLongGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.cpp b/src/GPU/pair_lj_class2_coul_long_gpu.cpp index 2de9586596..90a4682e8f 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_class2_coul_long_gpu.cpp @@ -120,6 +120,8 @@ void PairLJClass2CoulLongGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_class2_gpu.cpp b/src/GPU/pair_lj_class2_gpu.cpp index 7d7edb773d..9668c1d63a 100644 --- a/src/GPU/pair_lj_class2_gpu.cpp +++ b/src/GPU/pair_lj_class2_gpu.cpp @@ -106,6 +106,8 @@ void PairLJClass2GPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_cubic_gpu.cpp b/src/GPU/pair_lj_cubic_gpu.cpp index 4a1316a00a..bec2465b84 100644 --- a/src/GPU/pair_lj_cubic_gpu.cpp +++ b/src/GPU/pair_lj_cubic_gpu.cpp @@ -111,6 +111,8 @@ void PairLJCubicGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp index 7bae62ff02..45f98d3ce8 100644 --- a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp @@ -109,6 +109,8 @@ void PairLJCutCoulCutGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_cut_coul_debye_gpu.cpp b/src/GPU/pair_lj_cut_coul_debye_gpu.cpp index 9c598a7572..86732defb5 100644 --- a/src/GPU/pair_lj_cut_coul_debye_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_debye_gpu.cpp @@ -112,6 +112,8 @@ void PairLJCutCoulDebyeGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp index 90c8b556dc..08d90b8b57 100644 --- a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp @@ -119,6 +119,8 @@ void PairLJCutCoulDSFGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_gpu.cpp index 5094bdc7c9..c70fe555d0 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_gpu.cpp @@ -122,6 +122,8 @@ void PairLJCutCoulLongGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp index c1aaa6323a..aa1fa45ec2 100644 --- a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp @@ -112,6 +112,8 @@ void PairLJCutCoulMSMGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp b/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp index cac0582138..b71e526bf2 100644 --- a/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp @@ -113,6 +113,8 @@ void PairLJCutDipoleCutGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp index 9489a43389..df1a2d78ba 100644 --- a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp @@ -125,6 +125,8 @@ void PairLJCutDipoleLongGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_cut_gpu.cpp b/src/GPU/pair_lj_cut_gpu.cpp index 422990e1cb..46dd67dc94 100644 --- a/src/GPU/pair_lj_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_gpu.cpp @@ -109,6 +109,8 @@ void PairLJCutGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp b/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp index 3830e5dd06..d7eaf4b006 100644 --- a/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp @@ -131,6 +131,8 @@ void PairLJCutTIP4PLongGPU::compute(int eflag, int vflag) success, atom->q, atom->nlocal, domain->boxlo, domain->prd); } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); } /* ---------------------------------------------------------------------- diff --git a/src/GPU/pair_lj_expand_coul_long_gpu.cpp b/src/GPU/pair_lj_expand_coul_long_gpu.cpp index c9ffd0ac23..35cb18122a 100644 --- a/src/GPU/pair_lj_expand_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_expand_coul_long_gpu.cpp @@ -123,6 +123,8 @@ void PairLJExpandCoulLongGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_expand_gpu.cpp b/src/GPU/pair_lj_expand_gpu.cpp index 8d7dcf2c21..1e1eac603b 100644 --- a/src/GPU/pair_lj_expand_gpu.cpp +++ b/src/GPU/pair_lj_expand_gpu.cpp @@ -107,6 +107,8 @@ void PairLJExpandGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_gromacs_gpu.cpp b/src/GPU/pair_lj_gromacs_gpu.cpp index 424bce480c..8bb901f961 100644 --- a/src/GPU/pair_lj_gromacs_gpu.cpp +++ b/src/GPU/pair_lj_gromacs_gpu.cpp @@ -108,6 +108,8 @@ void PairLJGromacsGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp b/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp index 9bd5dc4749..4d8fbb5139 100644 --- a/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp +++ b/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp @@ -112,6 +112,8 @@ void PairLJSFDipoleSFGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_smooth_gpu.cpp b/src/GPU/pair_lj_smooth_gpu.cpp index 8ae295282e..5451f4a4f4 100644 --- a/src/GPU/pair_lj_smooth_gpu.cpp +++ b/src/GPU/pair_lj_smooth_gpu.cpp @@ -113,6 +113,8 @@ void PairLJSmoothGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_lj_spica_coul_long_gpu.cpp b/src/GPU/pair_lj_spica_coul_long_gpu.cpp index b315b8cc57..4317c04220 100644 --- a/src/GPU/pair_lj_spica_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_spica_coul_long_gpu.cpp @@ -125,6 +125,8 @@ void PairLJSPICACoulLongGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); if (evflag) { diff --git a/src/GPU/pair_lj_spica_gpu.cpp b/src/GPU/pair_lj_spica_gpu.cpp index 71756a8c26..d531e27284 100644 --- a/src/GPU/pair_lj_spica_gpu.cpp +++ b/src/GPU/pair_lj_spica_gpu.cpp @@ -110,6 +110,8 @@ void PairLJSPICAGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); if (evflag) { diff --git a/src/GPU/pair_mie_cut_gpu.cpp b/src/GPU/pair_mie_cut_gpu.cpp index 075546588a..0dabf9f3e2 100644 --- a/src/GPU/pair_mie_cut_gpu.cpp +++ b/src/GPU/pair_mie_cut_gpu.cpp @@ -107,6 +107,8 @@ void PairMIECutGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_morse_gpu.cpp b/src/GPU/pair_morse_gpu.cpp index b0ac2cce14..570027c1d8 100644 --- a/src/GPU/pair_morse_gpu.cpp +++ b/src/GPU/pair_morse_gpu.cpp @@ -105,6 +105,8 @@ void PairMorseGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_resquared_gpu.cpp b/src/GPU/pair_resquared_gpu.cpp index c0e700c5e6..8c1d1cec17 100644 --- a/src/GPU/pair_resquared_gpu.cpp +++ b/src/GPU/pair_resquared_gpu.cpp @@ -35,21 +35,28 @@ using namespace LAMMPS_NS; // External functions from cuda library for atom decomposition -int re_gpu_init(const int ntypes, double **shape, double **well, double **cutsq, double **sigma, - double **epsilon, int **form, double **host_lj1, double **host_lj2, - double **host_lj3, double **host_lj4, double **offset, double *special_lj, - const int nlocal, const int nall, const int max_nbors, const int maxspecial, - const double cell_size, int &gpu_mode, FILE *screen); +int re_gpu_init(const int ntypes, double **shape, double **well, double **cutsq, + double **sigma, double **epsilon, int **form, + double **host_lj1, double **host_lj2, double **host_lj3, + double **host_lj4, double **offset, double *special_lj, + const int nlocal, const int nall, const int max_nbors, + const int maxspecial, const double cell_size, int &gpu_mode, + FILE *screen); void re_gpu_clear(); -int **re_gpu_compute_n(const int ago, const int inum, const int nall, double **host_x, - int *host_type, double *sublo, double *subhi, tagint *tag, int **nspecial, - tagint **special, const bool eflag, const bool vflag, const bool eatom, - const bool vatom, int &host_start, int **ilist, int **jnum, - const double cpu_time, bool &success, double **host_quat); -int *re_gpu_compute(const int ago, const int inum, const int nall, double **host_x, int *host_type, - int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, - const bool eatom, const bool vatom, int &host_start, const double cpu_time, - bool &success, double **host_quat); +int **re_gpu_compute_n(const int ago, const int inum, const int nall, + double **host_x, int *host_type, double *sublo, + double *subhi, tagint *tag, int **nspecial, + tagint **special, const bool eflag, const bool vflag, + const bool eatom, const bool vatom, int &host_start, + int **ilist, int **jnum, const double cpu_time, + bool &success, const int *ellipsoid, + const void *bonus); +int *re_gpu_compute(const int ago, const int inum, const int nall, + double **host_x, int *host_type, int *ilist, int *numj, + int **firstneigh, const bool eflag, const bool vflag, + const bool eatom, const bool vatom, int &host_start, + const double cpu_time, bool &success, const int *ellipsoid, + const void *bonus); double re_gpu_bytes(); enum { SPHERE_SPHERE, SPHERE_ELLIPSE, ELLIPSE_SPHERE, ELLIPSE_ELLIPSE }; @@ -61,8 +68,6 @@ PairRESquaredGPU::PairRESquaredGPU(LAMMPS *lmp) : PairRESquared(lmp), gpu_mode(G reinitflag = 0; avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR, "Pair resquared/gpu requires atom style ellipsoid"); - quat_nmax = 0; - quat = nullptr; suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } @@ -75,7 +80,6 @@ PairRESquaredGPU::~PairRESquaredGPU() { re_gpu_clear(); cpu_time = 0.0; - memory->destroy(quat); } /* ---------------------------------------------------------------------- */ @@ -90,21 +94,8 @@ void PairRESquaredGPU::compute(int eflag, int vflag) bool success = true; int *ilist, *numneigh, **firstneigh; - if (nall > quat_nmax) { - quat_nmax = static_cast(1.1 * nall); - memory->grow(quat, quat_nmax, 4, "pair:quat"); - } AtomVecEllipsoid::Bonus *bonus = avec->bonus; int *ellipsoid = atom->ellipsoid; - for (int i = 0; i < nall; i++) { - int qi = ellipsoid[i]; - if (qi > -1) { - quat[i][0] = bonus[qi].quat[0]; - quat[i][1] = bonus[qi].quat[1]; - quat[i][2] = bonus[qi].quat[2]; - quat[i][3] = bonus[qi].quat[3]; - } - } if (gpu_mode != GPU_FORCE) { double sublo[3], subhi[3]; @@ -120,19 +111,24 @@ void PairRESquaredGPU::compute(int eflag, int vflag) } inum = atom->nlocal; firstneigh = - re_gpu_compute_n(neighbor->ago, inum, nall, atom->x, atom->type, sublo, subhi, atom->tag, - atom->nspecial, atom->special, eflag, vflag, eflag_atom, vflag_atom, - host_start, &ilist, &numneigh, cpu_time, success, quat); + re_gpu_compute_n(neighbor->ago, inum, nall, atom->x, atom->type, sublo, + subhi, atom->tag, atom->nspecial, atom->special, + eflag, vflag, eflag_atom, vflag_atom, host_start, + &ilist, &numneigh, cpu_time, success, ellipsoid, + bonus); } else { inum = list->inum; numneigh = list->numneigh; firstneigh = list->firstneigh; - ilist = re_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type, list->ilist, numneigh, - firstneigh, eflag, vflag, eflag_atom, vflag_atom, host_start, cpu_time, - success, quat); + ilist = re_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type, + list->ilist, numneigh, firstneigh, eflag, vflag, + eflag_atom, vflag_atom, host_start, cpu_time, + success, ellipsoid, bonus); } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); @@ -184,14 +180,13 @@ void PairRESquaredGPU::init_style() if (atom->molecular != Atom::ATOMIC) maxspecial = atom->maxspecial; int mnf = 5e-2 * neighbor->oneatom; int success = - re_gpu_init(atom->ntypes + 1, shape1, well, cutsq, sigma, epsilon, form, lj1, lj2, lj3, lj4, - offset, force->special_lj, atom->nlocal, atom->nlocal + atom->nghost, mnf, - maxspecial, cell_size, gpu_mode, screen); + re_gpu_init(atom->ntypes + 1, shape1, well, cutsq, sigma, epsilon, form, + lj1, lj2, lj3, lj4, offset, force->special_lj, atom->nlocal, + atom->nlocal + atom->nghost, mnf, maxspecial, cell_size, + gpu_mode, screen); GPU_EXTRA::check_flag(success, error, world); if (gpu_mode == GPU_FORCE) neighbor->add_request(this, NeighConst::REQ_FULL); - quat_nmax = static_cast(1.1 * (atom->nlocal + atom->nghost)); - memory->grow(quat, quat_nmax, 4, "pair:quat"); } /* ---------------------------------------------------------------------- */ @@ -199,7 +194,7 @@ void PairRESquaredGPU::init_style() double PairRESquaredGPU::memory_usage() { double bytes = Pair::memory_usage(); - return bytes + memory->usage(quat, quat_nmax) + re_gpu_bytes(); + return bytes + re_gpu_bytes(); } /* ---------------------------------------------------------------------- */ diff --git a/src/GPU/pair_resquared_gpu.h b/src/GPU/pair_resquared_gpu.h index 6d79952c39..825655a61d 100644 --- a/src/GPU/pair_resquared_gpu.h +++ b/src/GPU/pair_resquared_gpu.h @@ -38,8 +38,6 @@ class PairRESquaredGPU : public PairRESquared { private: int gpu_mode; double cpu_time; - int quat_nmax; - double **quat; }; } // namespace LAMMPS_NS diff --git a/src/GPU/pair_soft_gpu.cpp b/src/GPU/pair_soft_gpu.cpp index 973e82c13a..9d406d1eaa 100644 --- a/src/GPU/pair_soft_gpu.cpp +++ b/src/GPU/pair_soft_gpu.cpp @@ -108,6 +108,8 @@ void PairSoftGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_sw_gpu.cpp b/src/GPU/pair_sw_gpu.cpp index 67c52e0602..7645218a85 100644 --- a/src/GPU/pair_sw_gpu.cpp +++ b/src/GPU/pair_sw_gpu.cpp @@ -114,6 +114,8 @@ void PairSWGPU::compute(int eflag, int vflag) success); } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); } /* ---------------------------------------------------------------------- */ diff --git a/src/GPU/pair_table_gpu.cpp b/src/GPU/pair_table_gpu.cpp index 6615710b8a..ec927a7845 100644 --- a/src/GPU/pair_table_gpu.cpp +++ b/src/GPU/pair_table_gpu.cpp @@ -107,6 +107,8 @@ void PairTableGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_tersoff_gpu.cpp b/src/GPU/pair_tersoff_gpu.cpp index 9f0c8fa883..8610a3880c 100644 --- a/src/GPU/pair_tersoff_gpu.cpp +++ b/src/GPU/pair_tersoff_gpu.cpp @@ -118,6 +118,8 @@ void PairTersoffGPU::compute(int eflag, int vflag) cpu_time, success); } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); } /* ---------------------------------------------------------------------- */ diff --git a/src/GPU/pair_tersoff_mod_gpu.cpp b/src/GPU/pair_tersoff_mod_gpu.cpp index 15bfc9a85e..1bb09c1403 100644 --- a/src/GPU/pair_tersoff_mod_gpu.cpp +++ b/src/GPU/pair_tersoff_mod_gpu.cpp @@ -117,6 +117,8 @@ void PairTersoffMODGPU::compute(int eflag, int vflag) host_start, cpu_time, success); } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); } /* ---------------------------------------------------------------------- */ diff --git a/src/GPU/pair_tersoff_zbl_gpu.cpp b/src/GPU/pair_tersoff_zbl_gpu.cpp index 68b0d9dfa7..8d5e05ce4c 100644 --- a/src/GPU/pair_tersoff_zbl_gpu.cpp +++ b/src/GPU/pair_tersoff_zbl_gpu.cpp @@ -121,6 +121,8 @@ void PairTersoffZBLGPU::compute(int eflag, int vflag) host_start, cpu_time, success); } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); } /* ---------------------------------------------------------------------- */ diff --git a/src/GPU/pair_ufm_gpu.cpp b/src/GPU/pair_ufm_gpu.cpp index 099bfe1e63..d1c099f9fb 100644 --- a/src/GPU/pair_ufm_gpu.cpp +++ b/src/GPU/pair_ufm_gpu.cpp @@ -111,6 +111,8 @@ void PairUFMGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_vashishta_gpu.cpp b/src/GPU/pair_vashishta_gpu.cpp index 0fb0491ad3..38ad2b3c57 100644 --- a/src/GPU/pair_vashishta_gpu.cpp +++ b/src/GPU/pair_vashishta_gpu.cpp @@ -116,6 +116,8 @@ void PairVashishtaGPU::compute(int eflag, int vflag) cpu_time, success); } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); } /* ---------------------------------------------------------------------- */ diff --git a/src/GPU/pair_yukawa_colloid_gpu.cpp b/src/GPU/pair_yukawa_colloid_gpu.cpp index 8701a9ee80..c1e785380d 100644 --- a/src/GPU/pair_yukawa_colloid_gpu.cpp +++ b/src/GPU/pair_yukawa_colloid_gpu.cpp @@ -108,6 +108,8 @@ void PairYukawaColloidGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_yukawa_gpu.cpp b/src/GPU/pair_yukawa_gpu.cpp index e2caef9515..b27361e32d 100644 --- a/src/GPU/pair_yukawa_gpu.cpp +++ b/src/GPU/pair_yukawa_gpu.cpp @@ -106,6 +106,8 @@ void PairYukawaGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/GPU/pair_zbl_gpu.cpp b/src/GPU/pair_zbl_gpu.cpp index cbb2c198f7..a1fb3e4663 100644 --- a/src/GPU/pair_zbl_gpu.cpp +++ b/src/GPU/pair_zbl_gpu.cpp @@ -108,6 +108,8 @@ void PairZBLGPU::compute(int eflag, int vflag) } if (!success) error->one(FLERR, "Insufficient memory on accelerator"); + if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) + neighbor->build_topology(); if (host_start < inum) { cpu_time = platform::walltime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); diff --git a/src/MAKE/OPTIONS/Makefile.oneapi b/src/MAKE/OPTIONS/Makefile.oneapi index d34f0900c6..7f450d5340 100644 --- a/src/MAKE/OPTIONS/Makefile.oneapi +++ b/src/MAKE/OPTIONS/Makefile.oneapi @@ -6,16 +6,16 @@ SHELL = /bin/sh # compiler/linker settings # specify flags and libraries needed for your compiler -CC = mpiicpc -std=c++11 -OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits -CCFLAGS = -qopenmp -qopenmp-simd -qno-offload -ansi-alias -restrict \ +CC = mpiicpc -cxx=icpx -std=c++11 +OPTFLAGS = -xHost -O2 -ffast-math -freciprocal-math +CCFLAGS = -qopenmp-simd -qopenmp -ansi-alias \ -DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG $(OPTFLAGS) \ -I$(MKLROOT)/include SHFLAGS = -fPIC DEPFLAGS = -M -LINK = mpiicpc -std=c++11 -LINKFLAGS = -qopenmp -qopenmp-simd $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/ +LINK = mpiicpc -cxx=icpx -std=c++11 +LINKFLAGS = -qopenmp-simd -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/ LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core SIZE = size diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 05371c8259..90e0a81fd0 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -291,6 +291,10 @@ Neighbor::~Neighbor() void Neighbor::init() { + #ifdef LMP_GPU + overlap_topo = 0; + #endif + int i,j,n; ncalls = ndanger = 0; @@ -2434,7 +2438,13 @@ void Neighbor::build(int topoflag) // build topology lists for bonds/angles/etc + #ifdef LMP_GPU + if (overlap_topo == 0) { + if ((atom->molecular != Atom::ATOMIC) && topoflag) build_topology(); + } + #else if ((atom->molecular != Atom::ATOMIC) && topoflag) build_topology(); + #endif } /* ---------------------------------------------------------------------- @@ -2817,6 +2827,17 @@ int Neighbor::exclude_setting() return exclude; } +/* ---------------------------------------------------------------------- + If nonzero, call build_topology from GPU styles instead to overlap comp +------------------------------------------------------------------------- */ + +#ifdef LMP_GPU +void Neighbor::set_overlap_topo(int s) +{ + overlap_topo = s; +} +#endif + /* ---------------------------------------------------------------------- check if any of the old requested neighbor lists are full ------------------------------------------------------------------------- */ diff --git a/src/neighbor.h b/src/neighbor.h index 241f44be06..dd638880c7 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -155,6 +155,12 @@ class Neighbor : protected Pointers { void exclusion_group_group_delete(int, int); // rm a group-group exclusion int exclude_setting(); // return exclude value to accelerator pkg + // Option to call build_topology from gpu styles instead for overlapped comp + #ifdef LMP_GPU + void set_overlap_topo(int); + int overlap_topo; // 0 for default/old non-overlap mode + #endif + // find a neighbor list based on requestor NeighList *find_list(void *, const int id = 0) const; // find a neighbor request based on requestor From 2627f60a3910136d586e3dad6d186e7a67257af6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Mar 2023 08:10:30 -0500 Subject: [PATCH 350/445] fix cut-n-paste error --- src/GPU/pair_hippo_gpu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GPU/pair_hippo_gpu.cpp b/src/GPU/pair_hippo_gpu.cpp index 8287a7c09d..eb835b5f27 100644 --- a/src/GPU/pair_hippo_gpu.cpp +++ b/src/GPU/pair_hippo_gpu.cpp @@ -174,7 +174,7 @@ PairHippoGPU::~PairHippoGPU() /* ---------------------------------------------------------------------- */ -void PairAmoebaGPU::compute(int eflag, int vflag) +void PairHippoGPU::compute(int eflag, int vflag) { if (atom->molecular != Atom::ATOMIC && neighbor->ago == 0) neighbor->build_topology(); From 4089b7bd375da8af78cc16ac26df8030b7aab1f4 Mon Sep 17 00:00:00 2001 From: gtow-MD <127125244+gtow-MD@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:11:49 -0500 Subject: [PATCH 351/445] Updated fix_deposit documentation --- doc/src/fix_deposit.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/fix_deposit.rst b/doc/src/fix_deposit.rst index aa58aaee58..0199ae98ce 100644 --- a/doc/src/fix_deposit.rst +++ b/doc/src/fix_deposit.rst @@ -220,11 +220,11 @@ ignored if the *global* or *local* keywords are used, since those options choose a z-coordinate for insertion independently. The vx, vy, and vz components of velocity for the inserted particle -are set using the values specified for the *vx*, *vy*, and *vz* -keywords. Note that normally, new particles should be a assigned a -negative vertical velocity so that they move towards the surface. For -molecules, the same velocity is given to every particle (no rotation -or bond vibration). +are set by sampling a uniform distribution between the bounds set by +the values specified for the *vx*, *vy*, and *vz* keywords. Note that +normally, new particles should be a assigned a negative vertical +velocity so that they move towards the surface. For molecules, the +same velocity is given to every particle (no rotation or bond vibration). If the *target* option is used, the velocity vector of the inserted particle is changed so that it points from the insertion position From 376c7899abf6160db4710ee9ea05396e7d2b04bc Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Mon, 6 Mar 2023 09:48:33 -0700 Subject: [PATCH 352/445] add user option for performing message sorting during load balancing --- doc/src/balance.rst | 12 +++++++++++- doc/src/fix_balance.rst | 11 ++++++++++- src/balance.cpp | 32 ++++++++++++++++++++------------ src/balance.h | 5 +++-- src/fix_balance.cpp | 15 +++++++++------ src/fix_balance.h | 1 + 6 files changed, 54 insertions(+), 22 deletions(-) diff --git a/doc/src/balance.rst b/doc/src/balance.rst index a18d25c7ce..c30c133a8b 100644 --- a/doc/src/balance.rst +++ b/doc/src/balance.rst @@ -53,6 +53,7 @@ Syntax name = name of the atom-style variable *store* name = store weight in custom atom property defined by :doc:`fix property/atom ` command name = atom property name (without d\_ prefix) + *sort* arg = *no* or *yes* *out* arg = filename filename = write each processor's subdomain to a file @@ -492,6 +493,14 @@ different kinds of custom atom vectors or arrays as arguments. ---------- +The *sort* keyword determines whether the communication of per-atom +data to other processors during load-balancing will be random or +deterministic. Random is generally faster; deterministic will ensure +the new ordering of atoms on each processor is the same each time the +same simulation is run. This can be useful for debugging purposes. +Since the balance commmand is a one-time operation, the default is +*yes* to perform sorting. + The *out* keyword writes a text file to the specified *filename* with the results of the balancing operation. The file contains the bounds of the subdomain for each processor after the balancing operation @@ -569,4 +578,5 @@ Related commands Default """"""" -none +The default setting is sort = yes. + diff --git a/doc/src/fix_balance.rst b/doc/src/fix_balance.rst index d3f4c48248..8c65e8341d 100644 --- a/doc/src/fix_balance.rst +++ b/doc/src/fix_balance.rst @@ -43,6 +43,7 @@ Syntax name = name of the atom-style variable *store* name = store weight in custom atom property defined by :doc:`fix property/atom ` command name = atom property name (without d\_ prefix) + *sort* arg = *no* or *yes* *out* arg = filename filename = write each processor's subdomain to a file, at each re-balancing @@ -308,6 +309,14 @@ in that sub-box. ---------- +The *sort* keyword determines whether the communication of per-atom +data to other processors during load-balancing will be random or +deterministic. Random is generally faster; deterministic will ensure +the new ordering of atoms on each processor is the same each time the +same simulation is run. This can be useful for debugging purposes. +Since the fix balance commmand is performed during timestepping, the +default is *no* so that sorting is not performed. + The *out* keyword writes text to the specified *filename* with the results of each re-balancing operation. The file contains the bounds of the subdomain for each processor after the balancing operation @@ -415,4 +424,4 @@ Related commands Default """"""" -none +The default setting is sort = no. diff --git a/src/balance.cpp b/src/balance.cpp index 10a3c320c5..c64f3f4c25 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -252,7 +252,7 @@ void Balance::command(int narg, char **arg) // process remaining optional args - options(iarg,narg,arg); + options(iarg,narg,arg,1); if (wtflag) weight_storage(nullptr); // ensure particles are in current box & update box via shrink-wrap @@ -344,7 +344,7 @@ void Balance::command(int narg, char **arg) if (style == BISECTION) { comm->layout = Comm::LAYOUT_TILED; - bisection(1); + bisection(); } // reset proc sub-domains @@ -359,8 +359,8 @@ void Balance::command(int narg, char **arg) if (domain->triclinic) domain->x2lamda(atom->nlocal); auto irregular = new Irregular(lmp); if (wtflag) fixstore->disable = 0; - if (style == BISECTION) irregular->migrate_atoms(1,1,rcb->sendproc); - else irregular->migrate_atoms(1); + if (style == BISECTION) irregular->migrate_atoms(sortflag,1,rcb->sendproc); + else irregular->migrate_atoms(sortflag); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); @@ -421,9 +421,10 @@ void Balance::command(int narg, char **arg) /* ---------------------------------------------------------------------- process optional command args for Balance and FixBalance + sortflag_default is different for the 2 classes ------------------------------------------------------------------------- */ -void Balance::options(int iarg, int narg, char **arg) +void Balance::options(int iarg, int narg, char **arg, int sortflag_default) { // count max number of weight settings @@ -435,10 +436,11 @@ void Balance::options(int iarg, int narg, char **arg) wtflag = 0; varflag = 0; - oldrcb = 0; + sortflag = sortflag_default; outflag = 0; int outarg = 0; fp = nullptr; + oldrcb = 0; while (iarg < narg) { if (strcmp(arg[iarg],"weight") == 0) { @@ -471,14 +473,20 @@ void Balance::options(int iarg, int narg, char **arg) } iarg += 2+nopt; - } else if (strcmp(arg[iarg],"old") == 0) { - oldrcb = 1; - iarg++; + } else if (strcmp(arg[iarg+1],"sort") == 0) { + if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "balance sort", error); + sortflag = utils::logical(FLERR,arg[iarg+1],false,lmp); + iarg += 2; } else if (strcmp(arg[iarg],"out") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal (fix) balance command"); outflag = 1; outarg = iarg+1; iarg += 2; + + } else if (strcmp(arg[iarg],"old") == 0) { + oldrcb = 1; + iarg++; + } else error->all(FLERR,"Illegal (fix) balance command"); } @@ -569,11 +577,10 @@ double Balance::imbalance_factor(double &maxcost) /* ---------------------------------------------------------------------- perform balancing via RCB class - sortflag = flag for sorting order of received messages by proc ID return list of procs to send my atoms to ------------------------------------------------------------------------- */ -int *Balance::bisection(int sortflag) +int *Balance::bisection() { if (!rcb) rcb = new RCB(lmp); @@ -641,6 +648,7 @@ int *Balance::bisection(int sortflag) // invoke RCB // then invert() to create list of proc assignments for my atoms + // sortflag = flag for sorting order of received messages by proc ID // if triclinic, RCB operates on lamda coords // NOTE: (3/2017) can remove undocumented "old" option at some point // ditto in rcb.cpp, or make it an option @@ -658,7 +666,7 @@ int *Balance::bisection(int sortflag) } if (triclinic) domain->lamda2x(nlocal); - + rcb->invert(sortflag); // reset RCB lo/hi bounding box to full simulation box as needed diff --git a/src/balance.h b/src/balance.h index a21f8992f2..3a6e8bf457 100644 --- a/src/balance.h +++ b/src/balance.h @@ -30,19 +30,20 @@ class Balance : public Command { class FixStorePeratom *fixstore; // per-atom weights stored in FixStorePeratom int wtflag; // 1 if particle weighting is used int varflag; // 1 if weight style var(iable) is used + int sortflag; // 1 if sorting of comm messages is done int outflag; // 1 for output of balance results to file Balance(class LAMMPS *); ~Balance() override; void command(int, char **) override; - void options(int, int, char **); + void options(int, int, char **, int); void weight_storage(char *); void init_imbalance(int); void set_weights(); double imbalance_factor(double &); void shift_setup(char *, int, double); int shift(); - int *bisection(int sortflag = 0); + int *bisection(); void dumpout(bigint); static constexpr int BSTR_SIZE = 3; diff --git a/src/fix_balance.cpp b/src/fix_balance.cpp index 82c38d8650..0ada3d3b1f 100644 --- a/src/fix_balance.cpp +++ b/src/fix_balance.cpp @@ -104,9 +104,10 @@ FixBalance::FixBalance(LAMMPS *lmp, int narg, char **arg) : balance = new Balance(lmp); if (lbstyle == SHIFT) balance->shift_setup(bstr,nitermax,thresh); - balance->options(iarg,narg,arg); + balance->options(iarg,narg,arg,0); wtflag = balance->wtflag; - + sortflag = balance->sortflag; + if (balance->varflag && nevery == 0) error->all(FLERR,"Fix balance nevery = 0 cannot be used with weight var"); @@ -295,12 +296,14 @@ void FixBalance::rebalance() // set disable = 0, so weights migrate with atoms // important to delay disable = 1 until after pre_neighbor imbfinal calc // b/c atoms may migrate again in comm->exchange() - // NOTE: for reproducible debug runs, set 1st arg of migrate_atoms() to 1 - + // sortflag determines whether irregular sorts its + // comm messages for reproducibility + // if not, message order is random, atom order is non-deterministic + if (domain->triclinic) domain->x2lamda(atom->nlocal); if (wtflag) balance->fixstore->disable = 0; - if (lbstyle == BISECTION) irregular->migrate_atoms(0,1,sendproc); - else if (irregular->migrate_check()) irregular->migrate_atoms(); + if (lbstyle == BISECTION) irregular->migrate_atoms(sortflag,1,sendproc); + else if (irregular->migrate_check()) irregular->migrate_atoms(sortflag); if (domain->triclinic) domain->lamda2x(atom->nlocal); // notify all classes that store distributed grids diff --git a/src/fix_balance.h b/src/fix_balance.h index f1a8db57ae..074548ac0c 100644 --- a/src/fix_balance.h +++ b/src/fix_balance.h @@ -44,6 +44,7 @@ class FixBalance : public Fix { double thresh, stopthresh; char bstr[4]; int wtflag; // 1 for weighted balancing + int sortflag; // 1 for sorting comm messages double imbnow; // current imbalance factor double imbprev; // imbalance factor before last rebalancing From f63eec695395f2e649ddfe95d053d91c80ceb76e Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 6 Mar 2023 09:48:54 -0700 Subject: [PATCH 353/445] gpu: drop hcc as platform and inherit compile defs hip::host already adds the __HIP_PLATFORM_AMD__ definition See https://github.com/ROCm-Developer-Tools/hipamd/blob/develop/hip-config.cmake.in#L180 --- cmake/Modules/Packages/GPU.cmake | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index 21d046606f..7317ae1c20 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -285,7 +285,7 @@ elseif(GPU_API STREQUAL "HIP") set(ENV{HIP_PLATFORM} ${HIP_PLATFORM}) - if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "amd") + if(HIP_PLATFORM STREQUAL "amd") set(HIP_ARCH "gfx906" CACHE STRING "HIP target architecture") elseif(HIP_PLATFORM STREQUAL "spirv") set(HIP_ARCH "spirv" CACHE STRING "HIP target architecture") @@ -358,7 +358,7 @@ elseif(GPU_API STREQUAL "HIP") set(CUBIN_FILE "${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}.cubin") set(CUBIN_H_FILE "${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}_cubin.h") - if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "amd") + if(HIP_PLATFORM STREQUAL "amd") configure_file(${CU_FILE} ${CU_CPP_FILE} COPYONLY) if(HIP_COMPILER STREQUAL "clang") @@ -472,12 +472,6 @@ elseif(GPU_API STREQUAL "HIP") target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_NVCC__) target_include_directories(hip_get_devices PRIVATE ${CUDA_INCLUDE_DIRS}) target_link_libraries(hip_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY}) - elseif(HIP_PLATFORM STREQUAL "hcc") - target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_HCC__) - target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_HCC__) - elseif(HIP_PLATFORM STREQUAL "amd") - target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_AMD__) - target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_AMD__) endif() target_link_libraries(lammps PRIVATE gpu) From 4f420f8454a2780efa4f8d87fb0bcb85080a3b56 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Mar 2023 12:14:57 -0500 Subject: [PATCH 354/445] incorporate changes to fix alchemy from @sjplimp --- src/REPLICA/fix_alchemy.cpp | 93 ++++++++++++++++++++++++------------- src/REPLICA/fix_alchemy.h | 2 + 2 files changed, 62 insertions(+), 33 deletions(-) diff --git a/src/REPLICA/fix_alchemy.cpp b/src/REPLICA/fix_alchemy.cpp index 29801d5c8d..4b29da5250 100644 --- a/src/REPLICA/fix_alchemy.cpp +++ b/src/REPLICA/fix_alchemy.cpp @@ -109,7 +109,51 @@ int FixAlchemy::setmask() return mask; } -/* ---------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- + check consistency of owned atom count and ordering + compare each pair of replica procs + checked before each exchange of atom coords or forces + to ensure the replicas have not become out of sync +---------------------------------------------------------------------- */ + +void FixAlchemy::check_consistency_atoms() +{ + // check that owned atom count is same for each pair of replica procs + + const int nlocal = atom->nlocal; + int my_nlocal[2] = {0, 0}; + int all_nlocal[2] = {0, 0}; + my_nlocal[universe->iworld] = nlocal; + MPI_Allreduce(my_nlocal, all_nlocal, 2, MPI_INT, MPI_SUM, samerank); + + int fail = (all_nlocal[0] == all_nlocal[1]) ? 0 : 1; + int allfail = 0; + MPI_Allreduce(&fail, &allfail, 1, MPI_INT, MPI_MAX, universe->uworld); + if (allfail) error->universe_all(FLERR, "Fix alchemy local atom count is inconsistent"); + + // check that owned atom ordering is same for each pair of replica procs + // re-use communication buffer for positions and forces + + tagint *tagbuf = (tagint *) commbuf; + tagint *tag = atom->tag; + if (universe->iworld == 0) { + for (int i = 0; i < nlocal; ++i) tagbuf[i] = tag[i]; + } + MPI_Bcast(tagbuf, nlocal, MPI_LMP_TAGINT, 0, samerank); + + fail = allfail = 0; + if (universe->iworld > 0) { + for (int i = 0; i < nlocal; ++i) + if (tag[i] != tagbuf[i]) fail = 1; + } + MPI_Allreduce(&fail, &allfail, 1, MPI_INT, MPI_MAX, universe->uworld); + if (allfail) error->universe_all(FLERR, "Fix alchemy local atom ordering is inconsistent"); +} + +/* ---------------------------------------------------------------------- + force simulation box size and shape to be identical for 2 replicas + invoked by post_integrate() after integration may have changed box +---------------------------------------------------------------------- */ static void synchronize_box(Domain *domain, MPI_Comm samerank) { @@ -180,36 +224,9 @@ void FixAlchemy::setup(int vflag) void FixAlchemy::post_integrate() { - // re-check that we have the same domain decomposition on all ranks - const int nlocal = atom->nlocal; - int my_nlocal[2] = {0, 0}; - int all_nlocal[2] = {0, 0}; - my_nlocal[universe->iworld] = nlocal; - MPI_Allreduce(my_nlocal, all_nlocal, 2, MPI_INT, MPI_SUM, samerank); - int fail = (all_nlocal[0] == all_nlocal[1]) ? 0 : 1; - int allfail = 0; - MPI_Allreduce(&fail, &allfail, 1, MPI_INT, MPI_MAX, universe->uworld); - if (allfail) - error->universe_all(FLERR, - "Number of atoms and domain decomposition must be the same on " - "all partitions"); + // check owned atom count and ordering between replicas - // check that we have the same atom order on all ranks - // re-use communication buffer for positions and forces - - tagint *tagbuf = (tagint *) commbuf; - tagint *tag = atom->tag; - if (universe->iworld == 0) { - for (int i = 0; i < nlocal; ++i) tagbuf[i] = tag[i]; - } - MPI_Bcast(tagbuf, nlocal, MPI_LMP_TAGINT, 0, samerank); - fail = allfail = 0; - if (universe->iworld > 0) { - for (int i = 0; i < nlocal; ++i) - if (tag[i] != tagbuf[i]) fail = 1; - } - MPI_Allreduce(&fail, &allfail, 1, MPI_INT, MPI_MAX, universe->uworld); - if (allfail) error->universe_all(FLERR, "Atoms must have the same order on all partitions"); + check_consistency_atoms(); // synchronize atom positions @@ -225,15 +242,25 @@ void FixAlchemy::post_integrate() void FixAlchemy::post_force(int /*vflag*/) { + // grow commbuf if necessary + if (3 * atom->nmax > nmax) { nmax = 3 * atom->nmax; memory->grow(commbuf, sizeof(double) * atom->nmax, "alchemy:commbuf"); } - const int nall = 3 * atom->nlocal; - double *f = &atom->f[0][0]; + // check owned atom count and ordering between replicas + + check_consistency_atoms(); + + // evaluate lambda variable + lambda = input->variable->compute_equal(ivar); + // sum forces multiplied by lambda across 2 replicas + + const int nall = 3 * atom->nlocal; + double *f = &atom->f[0][0]; for (int i = 0; i < nall; ++i) commbuf[i] = f[i] * lambda; MPI_Allreduce(commbuf, f, nall, MPI_DOUBLE, MPI_SUM, samerank); @@ -253,7 +280,7 @@ void FixAlchemy::post_force(int /*vflag*/) MPI_Allreduce(commbuf, pressure, 6, MPI_DOUBLE, MPI_SUM, universe->uworld); press->addstep(update->ntimestep + 1); - // print progress info + // print progress info to universe screen/logfile if (universe->me == 0) { double delta = update->ntimestep - update->beginstep; diff --git a/src/REPLICA/fix_alchemy.h b/src/REPLICA/fix_alchemy.h index 53c369d551..f14d1b05ca 100644 --- a/src/REPLICA/fix_alchemy.h +++ b/src/REPLICA/fix_alchemy.h @@ -50,6 +50,8 @@ class FixAlchemy : public Fix { int sync_box; // 1 of box dimensions need to be synchronized int nmax; int ivar; + + void check_consistency_atoms(); }; } // namespace LAMMPS_NS From 5909a0527bce12b1c81e73bea064d19149ced445 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Mar 2023 13:39:50 -0500 Subject: [PATCH 355/445] update list of packages included into the Windows builds. --- doc/src/Install_windows.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/src/Install_windows.rst b/doc/src/Install_windows.rst index da9441fc49..f23092941a 100644 --- a/doc/src/Install_windows.rst +++ b/doc/src/Install_windows.rst @@ -17,11 +17,12 @@ install the Windows MPI package (MPICH2 from Argonne National Labs), needed to run in parallel with MPI. The LAMMPS binaries contain *all* :doc:`optional packages ` -included in the source distribution except: KIM, KOKKOS, MSCG, PYTHON, -ADIOS, H5MD, NETCDF, QMMM, ML-QUIP, and VTK. -The serial version also does not include the MPIIO and -LATBOLTZ packages. The GPU package is compiled for OpenCL with -mixed precision kernels. +included in the source distribution except: ADIOS, H5MD, KIM, ML-PACE, +ML-QUIP, MSCG, NETCDF, PLUMED, QMMM, SCAFACOS, and VTK. The serial +version also does not include the MPIIO and LATBOLTZ packages. The +PYTHON package is only available in the Python installaers that bundle a +Python runtime. The GPU package is compiled for OpenCL with mixed +precision kernels. The LAMMPS library is compiled as a shared library and the :doc:`LAMMPS Python module ` is installed, so that From 2af1949a9267dc40b375e75e713f0266435a8a01 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Mar 2023 13:42:45 -0500 Subject: [PATCH 356/445] whitespace --- src/balance.cpp | 6 +++--- src/fix_balance.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/balance.cpp b/src/balance.cpp index c64f3f4c25..91b9d70378 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -482,11 +482,11 @@ void Balance::options(int iarg, int narg, char **arg, int sortflag_default) outflag = 1; outarg = iarg+1; iarg += 2; - + } else if (strcmp(arg[iarg],"old") == 0) { oldrcb = 1; iarg++; - + } else error->all(FLERR,"Illegal (fix) balance command"); } @@ -666,7 +666,7 @@ int *Balance::bisection() } if (triclinic) domain->lamda2x(nlocal); - + rcb->invert(sortflag); // reset RCB lo/hi bounding box to full simulation box as needed diff --git a/src/fix_balance.cpp b/src/fix_balance.cpp index 0ada3d3b1f..06274eea03 100644 --- a/src/fix_balance.cpp +++ b/src/fix_balance.cpp @@ -107,7 +107,7 @@ FixBalance::FixBalance(LAMMPS *lmp, int narg, char **arg) : balance->options(iarg,narg,arg,0); wtflag = balance->wtflag; sortflag = balance->sortflag; - + if (balance->varflag && nevery == 0) error->all(FLERR,"Fix balance nevery = 0 cannot be used with weight var"); @@ -299,7 +299,7 @@ void FixBalance::rebalance() // sortflag determines whether irregular sorts its // comm messages for reproducibility // if not, message order is random, atom order is non-deterministic - + if (domain->triclinic) domain->x2lamda(atom->nlocal); if (wtflag) balance->fixstore->disable = 0; if (lbstyle == BISECTION) irregular->migrate_atoms(sortflag,1,sendproc); From 21b2bf0253c359c9024ac6e33c0ff50a8ddeebda Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Mar 2023 22:17:12 -0500 Subject: [PATCH 357/445] avoid including accelerator_kokkos.h in main.cpp --- cmake/Modules/Packages/KOKKOS.cmake | 3 --- src/KOKKOS/kokkos.cpp | 9 +++++++++ src/accelerator_kokkos.h | 5 +++++ src/main.cpp | 15 +++++++++------ 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/cmake/Modules/Packages/KOKKOS.cmake b/cmake/Modules/Packages/KOKKOS.cmake index b4eb227d61..00486e73db 100644 --- a/cmake/Modules/Packages/KOKKOS.cmake +++ b/cmake/Modules/Packages/KOKKOS.cmake @@ -72,13 +72,11 @@ if(DOWNLOAD_KOKKOS) set_target_properties(LAMMPS::KOKKOSCONTAINERS PROPERTIES IMPORTED_LOCATION "${INSTALL_DIR}/lib/libkokkoscontainers.a") target_link_libraries(lammps PRIVATE LAMMPS::KOKKOSCORE LAMMPS::KOKKOSCONTAINERS) - target_link_libraries(lmp PRIVATE LAMMPS::KOKKOSCORE LAMMPS::KOKKOSCONTAINERS) add_dependencies(LAMMPS::KOKKOSCORE kokkos_build) add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build) elseif(EXTERNAL_KOKKOS) find_package(Kokkos 3.7.01 REQUIRED CONFIG) target_link_libraries(lammps PRIVATE Kokkos::kokkos) - target_link_libraries(lmp PRIVATE Kokkos::kokkos) else() set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos) set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos) @@ -98,7 +96,6 @@ else() ${LAMMPS_LIB_KOKKOS_BIN_DIR}) target_include_directories(lammps PRIVATE ${Kokkos_INCLUDE_DIRS}) target_link_libraries(lammps PRIVATE kokkos) - target_link_libraries(lmp PRIVATE kokkos) if(BUILD_SHARED_LIBS_WAS_ON) set(BUILD_SHARED_LIBS ON) endif() diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 8b45c786e5..4e96e3218c 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -33,6 +33,10 @@ #include // for getpid() #endif +namespace LAMMPS_NS { + void kokkos_lmp_finalize(); +} + #ifdef LMP_KOKKOS_GPU // for detecting GPU-aware MPI support: @@ -80,6 +84,11 @@ using namespace LAMMPS_NS; int KokkosLMP::is_finalized = 0; int KokkosLMP::init_ngpus = 0; +void LAMMPS_NS::kokkos_lmp_finalize() +{ + KokkosLMP::finalize(); +} + /* ---------------------------------------------------------------------- */ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) diff --git a/src/accelerator_kokkos.h b/src/accelerator_kokkos.h index 36a376bff8..37d86a89e3 100644 --- a/src/accelerator_kokkos.h +++ b/src/accelerator_kokkos.h @@ -61,6 +61,11 @@ class KokkosLMP { int neigh_count(int) { return 0; } }; +void kokkos_lmp_finalize() +{ + KokkosLMP::finalize(); +} + class AtomKokkos : public Atom { public: tagint **k_special; diff --git a/src/main.cpp b/src/main.cpp index e263938e57..606f31274d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,7 +13,6 @@ #include "lammps.h" -#include "accelerator_kokkos.h" #include "input.h" #include "lmppython.h" @@ -33,6 +32,10 @@ #include #endif +namespace LAMMPS_NS { +extern void kokkos_lmp_finalize(); +} + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- @@ -76,18 +79,18 @@ int main(int argc, char **argv) lammps->input->file(); delete lammps; } catch (LAMMPSAbortException &ae) { - KokkosLMP::finalize(); + kokkos_lmp_finalize(); Python::finalize(); MPI_Abort(ae.universe, 1); } catch (LAMMPSException &) { - KokkosLMP::finalize(); + kokkos_lmp_finalize(); Python::finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); exit(1); } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - KokkosLMP::finalize(); + kokkos_lmp_finalize(); Python::finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); @@ -99,13 +102,13 @@ int main(int argc, char **argv) delete lammps; } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - KokkosLMP::finalize(); + kokkos_lmp_finalize(); Python::finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); } #endif - KokkosLMP::finalize(); + kokkos_lmp_finalize(); Python::finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); From 76cbc6f48dcacfe294c48624f02b276c41185fe7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Mar 2023 22:40:27 -0500 Subject: [PATCH 358/445] whitespace --- doc/src/fix_deposit.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/fix_deposit.rst b/doc/src/fix_deposit.rst index 0199ae98ce..7d19e93148 100644 --- a/doc/src/fix_deposit.rst +++ b/doc/src/fix_deposit.rst @@ -221,9 +221,9 @@ options choose a z-coordinate for insertion independently. The vx, vy, and vz components of velocity for the inserted particle are set by sampling a uniform distribution between the bounds set by -the values specified for the *vx*, *vy*, and *vz* keywords. Note that -normally, new particles should be a assigned a negative vertical -velocity so that they move towards the surface. For molecules, the +the values specified for the *vx*, *vy*, and *vz* keywords. Note that +normally, new particles should be a assigned a negative vertical +velocity so that they move towards the surface. For molecules, the same velocity is given to every particle (no rotation or bond vibration). If the *target* option is used, the velocity vector of the inserted From 0b204c8cb3d1aac4eb7d43b7824b9a1391ceea16 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Mar 2023 22:17:12 -0500 Subject: [PATCH 359/445] avoid including accelerator_kokkos.h in main.cpp --- cmake/Modules/Packages/KOKKOS.cmake | 3 --- src/KOKKOS/kokkos.cpp | 9 +++++++++ src/accelerator_kokkos.h | 5 +++++ src/main.cpp | 15 +++++++++------ 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/cmake/Modules/Packages/KOKKOS.cmake b/cmake/Modules/Packages/KOKKOS.cmake index b4eb227d61..00486e73db 100644 --- a/cmake/Modules/Packages/KOKKOS.cmake +++ b/cmake/Modules/Packages/KOKKOS.cmake @@ -72,13 +72,11 @@ if(DOWNLOAD_KOKKOS) set_target_properties(LAMMPS::KOKKOSCONTAINERS PROPERTIES IMPORTED_LOCATION "${INSTALL_DIR}/lib/libkokkoscontainers.a") target_link_libraries(lammps PRIVATE LAMMPS::KOKKOSCORE LAMMPS::KOKKOSCONTAINERS) - target_link_libraries(lmp PRIVATE LAMMPS::KOKKOSCORE LAMMPS::KOKKOSCONTAINERS) add_dependencies(LAMMPS::KOKKOSCORE kokkos_build) add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build) elseif(EXTERNAL_KOKKOS) find_package(Kokkos 3.7.01 REQUIRED CONFIG) target_link_libraries(lammps PRIVATE Kokkos::kokkos) - target_link_libraries(lmp PRIVATE Kokkos::kokkos) else() set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos) set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos) @@ -98,7 +96,6 @@ else() ${LAMMPS_LIB_KOKKOS_BIN_DIR}) target_include_directories(lammps PRIVATE ${Kokkos_INCLUDE_DIRS}) target_link_libraries(lammps PRIVATE kokkos) - target_link_libraries(lmp PRIVATE kokkos) if(BUILD_SHARED_LIBS_WAS_ON) set(BUILD_SHARED_LIBS ON) endif() diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 8b45c786e5..4e96e3218c 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -33,6 +33,10 @@ #include // for getpid() #endif +namespace LAMMPS_NS { + void kokkos_lmp_finalize(); +} + #ifdef LMP_KOKKOS_GPU // for detecting GPU-aware MPI support: @@ -80,6 +84,11 @@ using namespace LAMMPS_NS; int KokkosLMP::is_finalized = 0; int KokkosLMP::init_ngpus = 0; +void LAMMPS_NS::kokkos_lmp_finalize() +{ + KokkosLMP::finalize(); +} + /* ---------------------------------------------------------------------- */ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) diff --git a/src/accelerator_kokkos.h b/src/accelerator_kokkos.h index 36a376bff8..37d86a89e3 100644 --- a/src/accelerator_kokkos.h +++ b/src/accelerator_kokkos.h @@ -61,6 +61,11 @@ class KokkosLMP { int neigh_count(int) { return 0; } }; +void kokkos_lmp_finalize() +{ + KokkosLMP::finalize(); +} + class AtomKokkos : public Atom { public: tagint **k_special; diff --git a/src/main.cpp b/src/main.cpp index e263938e57..606f31274d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,7 +13,6 @@ #include "lammps.h" -#include "accelerator_kokkos.h" #include "input.h" #include "lmppython.h" @@ -33,6 +32,10 @@ #include #endif +namespace LAMMPS_NS { +extern void kokkos_lmp_finalize(); +} + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- @@ -76,18 +79,18 @@ int main(int argc, char **argv) lammps->input->file(); delete lammps; } catch (LAMMPSAbortException &ae) { - KokkosLMP::finalize(); + kokkos_lmp_finalize(); Python::finalize(); MPI_Abort(ae.universe, 1); } catch (LAMMPSException &) { - KokkosLMP::finalize(); + kokkos_lmp_finalize(); Python::finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); exit(1); } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - KokkosLMP::finalize(); + kokkos_lmp_finalize(); Python::finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); @@ -99,13 +102,13 @@ int main(int argc, char **argv) delete lammps; } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - KokkosLMP::finalize(); + kokkos_lmp_finalize(); Python::finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); } #endif - KokkosLMP::finalize(); + kokkos_lmp_finalize(); Python::finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); From 642dccceb530afc99ca6481709386be7e840e0e6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Mar 2023 22:49:20 -0500 Subject: [PATCH 360/445] fix up non-KOKKOS case --- src/accelerator_kokkos.h | 5 ----- src/main.cpp | 10 ++++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/accelerator_kokkos.h b/src/accelerator_kokkos.h index 37d86a89e3..36a376bff8 100644 --- a/src/accelerator_kokkos.h +++ b/src/accelerator_kokkos.h @@ -61,11 +61,6 @@ class KokkosLMP { int neigh_count(int) { return 0; } }; -void kokkos_lmp_finalize() -{ - KokkosLMP::finalize(); -} - class AtomKokkos : public Atom { public: tagint **k_special; diff --git a/src/main.cpp b/src/main.cpp index 606f31274d..543833498b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,9 +32,19 @@ #include #endif +#if defined(LMP_KOKKOS) namespace LAMMPS_NS { extern void kokkos_lmp_finalize(); } +#else +#include "accelerator_kokkos.h" +namespace LAMMPS_NS { +void kokkos_lmp_finalize() +{ + KokkosLMP::finalize(); +} +} +#endif using namespace LAMMPS_NS; From 40790f6c4593e9dbdf8d785dea7ec7930825caeb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 6 Mar 2023 22:49:20 -0500 Subject: [PATCH 361/445] fix up non-KOKKOS case --- src/accelerator_kokkos.h | 5 ----- src/main.cpp | 10 ++++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/accelerator_kokkos.h b/src/accelerator_kokkos.h index 37d86a89e3..36a376bff8 100644 --- a/src/accelerator_kokkos.h +++ b/src/accelerator_kokkos.h @@ -61,11 +61,6 @@ class KokkosLMP { int neigh_count(int) { return 0; } }; -void kokkos_lmp_finalize() -{ - KokkosLMP::finalize(); -} - class AtomKokkos : public Atom { public: tagint **k_special; diff --git a/src/main.cpp b/src/main.cpp index 606f31274d..543833498b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,9 +32,19 @@ #include #endif +#if defined(LMP_KOKKOS) namespace LAMMPS_NS { extern void kokkos_lmp_finalize(); } +#else +#include "accelerator_kokkos.h" +namespace LAMMPS_NS { +void kokkos_lmp_finalize() +{ + KokkosLMP::finalize(); +} +} +#endif using namespace LAMMPS_NS; From d7c783560ae4a09601b42d24d2e76e819f7cace4 Mon Sep 17 00:00:00 2001 From: "W. Michael Brown" Date: Mon, 6 Mar 2023 22:10:19 -0800 Subject: [PATCH 362/445] GPU Package: Fixing out of bounds memory access issues with special kernel unroll optimizations. --- lib/gpu/lal_neighbor_gpu.cu | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/lib/gpu/lal_neighbor_gpu.cu b/lib/gpu/lal_neighbor_gpu.cu index 49173c4c97..a7506fc5c3 100644 --- a/lib/gpu/lal_neighbor_gpu.cu +++ b/lib/gpu/lal_neighbor_gpu.cu @@ -507,27 +507,27 @@ __kernel void kernel_special(__global int *dev_nbor, if (ii 0 @@ -537,16 +537,19 @@ __kernel void kernel_special(__global int *dev_nbor, } #endif - for ( ; list Date: Tue, 7 Mar 2023 08:23:36 -0500 Subject: [PATCH 363/445] use finalize wrappers from the LAMMPS library interface --- src/KOKKOS/kokkos.cpp | 9 --------- src/main.cpp | 36 +++++++++++------------------------- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 4e96e3218c..8b45c786e5 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -33,10 +33,6 @@ #include // for getpid() #endif -namespace LAMMPS_NS { - void kokkos_lmp_finalize(); -} - #ifdef LMP_KOKKOS_GPU // for detecting GPU-aware MPI support: @@ -84,11 +80,6 @@ using namespace LAMMPS_NS; int KokkosLMP::is_finalized = 0; int KokkosLMP::init_ngpus = 0; -void LAMMPS_NS::kokkos_lmp_finalize() -{ - KokkosLMP::finalize(); -} - /* ---------------------------------------------------------------------- */ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) diff --git a/src/main.cpp b/src/main.cpp index 543833498b..746ccc41e9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,7 +14,7 @@ #include "lammps.h" #include "input.h" -#include "lmppython.h" +#include "library.h" #if defined(LAMMPS_EXCEPTIONS) #include "exceptions.h" @@ -32,20 +32,6 @@ #include #endif -#if defined(LMP_KOKKOS) -namespace LAMMPS_NS { -extern void kokkos_lmp_finalize(); -} -#else -#include "accelerator_kokkos.h" -namespace LAMMPS_NS { -void kokkos_lmp_finalize() -{ - KokkosLMP::finalize(); -} -} -#endif - using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- @@ -89,19 +75,19 @@ int main(int argc, char **argv) lammps->input->file(); delete lammps; } catch (LAMMPSAbortException &ae) { - kokkos_lmp_finalize(); - Python::finalize(); + lammps_kokkos_finalize(); + lammps_python_finalize(); MPI_Abort(ae.universe, 1); } catch (LAMMPSException &) { - kokkos_lmp_finalize(); - Python::finalize(); + lammps_kokkos_finalize(); + lammps_python_finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); exit(1); } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - kokkos_lmp_finalize(); - Python::finalize(); + lammps_kokkos_finalize(); + lammps_python_finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); } @@ -112,14 +98,14 @@ int main(int argc, char **argv) delete lammps; } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - kokkos_lmp_finalize(); - Python::finalize(); + lammps_kokkos_finalize(); + lammps_python_finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); } #endif - kokkos_lmp_finalize(); - Python::finalize(); + lammps_kokkos_finalize(); + lammps_python_finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); } From 710baff14df381d51805ac87d00c2b0d6cdbd040 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 08:23:36 -0500 Subject: [PATCH 364/445] use finalize wrappers from the LAMMPS library interface --- src/KOKKOS/kokkos.cpp | 9 --------- src/main.cpp | 36 +++++++++++------------------------- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 4e96e3218c..8b45c786e5 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -33,10 +33,6 @@ #include // for getpid() #endif -namespace LAMMPS_NS { - void kokkos_lmp_finalize(); -} - #ifdef LMP_KOKKOS_GPU // for detecting GPU-aware MPI support: @@ -84,11 +80,6 @@ using namespace LAMMPS_NS; int KokkosLMP::is_finalized = 0; int KokkosLMP::init_ngpus = 0; -void LAMMPS_NS::kokkos_lmp_finalize() -{ - KokkosLMP::finalize(); -} - /* ---------------------------------------------------------------------- */ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) diff --git a/src/main.cpp b/src/main.cpp index 543833498b..746ccc41e9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,7 +14,7 @@ #include "lammps.h" #include "input.h" -#include "lmppython.h" +#include "library.h" #if defined(LAMMPS_EXCEPTIONS) #include "exceptions.h" @@ -32,20 +32,6 @@ #include #endif -#if defined(LMP_KOKKOS) -namespace LAMMPS_NS { -extern void kokkos_lmp_finalize(); -} -#else -#include "accelerator_kokkos.h" -namespace LAMMPS_NS { -void kokkos_lmp_finalize() -{ - KokkosLMP::finalize(); -} -} -#endif - using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- @@ -89,19 +75,19 @@ int main(int argc, char **argv) lammps->input->file(); delete lammps; } catch (LAMMPSAbortException &ae) { - kokkos_lmp_finalize(); - Python::finalize(); + lammps_kokkos_finalize(); + lammps_python_finalize(); MPI_Abort(ae.universe, 1); } catch (LAMMPSException &) { - kokkos_lmp_finalize(); - Python::finalize(); + lammps_kokkos_finalize(); + lammps_python_finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); exit(1); } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - kokkos_lmp_finalize(); - Python::finalize(); + lammps_kokkos_finalize(); + lammps_python_finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); } @@ -112,14 +98,14 @@ int main(int argc, char **argv) delete lammps; } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - kokkos_lmp_finalize(); - Python::finalize(); + lammps_kokkos_finalize(); + lammps_python_finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); } #endif - kokkos_lmp_finalize(); - Python::finalize(); + lammps_kokkos_finalize(); + lammps_python_finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); } From 4265b7379ea1c6718fc4deb6d1346b09b6e9571a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 12:07:56 -0500 Subject: [PATCH 365/445] update precomputed constants. apply clang-format --- src/DIELECTRIC/fix_polarize_bem_gmres.cpp | 22 +++++++++---------- src/DIELECTRIC/fix_polarize_bem_icc.cpp | 26 +++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp index dafe4dc8e0..b11ac7e482 100644 --- a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp @@ -61,7 +61,7 @@ using namespace LAMMPS_NS; using namespace FixConst; -using MathConst::MY_PI; +using MathConst::MY_4PI; /* ---------------------------------------------------------------------- */ @@ -311,13 +311,13 @@ void FixPolarizeBEMGMRES::setup(int /*vflag*/) epsilon0e2q = 1.0; if (strcmp(update->unit_style, "real") == 0) - epsilon0e2q = 0.000240263377163643 * (4 * MY_PI); + epsilon0e2q = 0.000240263377163643 * MY_4PI; else if (strcmp(update->unit_style, "metal") == 0) - epsilon0e2q = 0.00553386738300813 * (4 * MY_PI); + epsilon0e2q = 0.00553386738300813 * MY_4PI; else if (strcmp(update->unit_style, "si") == 0) - epsilon0e2q = 8.854187812813e-12 * (4 * MY_PI); + epsilon0e2q = 8.854187812813e-12 * MY_4PI; else if (strcmp(update->unit_style, "nano") == 0) - epsilon0e2q = 0.000345866711328125 * (4 * MY_PI); + epsilon0e2q = 0.000345866711328125 * MY_4PI; else if (strcmp(update->unit_style, "lj") != 0) error->all(FLERR, "Only unit styles 'lj', 'real', 'metal', 'si' and 'nano' are supported"); @@ -403,7 +403,7 @@ void FixPolarizeBEMGMRES::compute_induced_charges() } double ndotE = epsilon0e2q * (Ex * norm[i][0] + Ey * norm[i][1] + Ez * norm[i][2]) / epsilon[i]; double sigma_f = q[i] / area[i]; - buffer[idx] = (1 - em[i]) * sigma_f - ed[i] * ndotE / (4 * MY_PI); + buffer[idx] = (1 - em[i]) * sigma_f - ed[i] * ndotE / MY_4PI; } MPI_Allreduce(buffer, rhs, num_induced_charges, MPI_DOUBLE, MPI_SUM, world); @@ -464,11 +464,11 @@ void FixPolarizeBEMGMRES::compute_induced_charges() int ncount = group->count(igroup); double sum = 0; MPI_Allreduce(&tmp, &sum, 1, MPI_DOUBLE, MPI_SUM, world); - double qboundave = sum/(double)ncount; + double qboundave = sum / (double) ncount; for (int i = 0; i < nlocal; i++) { if (!(mask[i] & groupbit)) continue; - q[i] -= qboundave; + q[i] -= qboundave; } } @@ -693,7 +693,7 @@ void FixPolarizeBEMGMRES::apply_operator(double *w, double *Aw, int /*n*/) Ez += efield_kspace[i][2]; } double ndotE = epsilon0e2q * (Ex * norm[i][0] + Ey * norm[i][1] + Ez * norm[i][2]) / epsilon[i]; - buffer[idx] = em[i] * w[idx] + ed[i] * ndotE / (4 * MY_PI); + buffer[idx] = em[i] * w[idx] + ed[i] * ndotE / MY_4PI; } MPI_Allreduce(buffer, Aw, num_induced_charges, MPI_DOUBLE, MPI_SUM, world); @@ -765,8 +765,8 @@ void FixPolarizeBEMGMRES::update_residual(double *w, double *r, int /*n*/) Ey += efield_kspace[i][1]; Ez += efield_kspace[i][2]; } - double ndotE = epsilon0e2q * (Ex * norm[i][0] + Ey * norm[i][1] + Ez * norm[i][2]) / - epsilon[i] / (4 * MY_PI); + double ndotE = + epsilon0e2q * (Ex * norm[i][0] + Ey * norm[i][1] + Ez * norm[i][2]) / epsilon[i] / MY_4PI; double sigma_f = q[i] / area[i]; buffer[idx] = (1 - em[i]) * sigma_f - em[i] * w[idx] - ed[i] * ndotE; } diff --git a/src/DIELECTRIC/fix_polarize_bem_icc.cpp b/src/DIELECTRIC/fix_polarize_bem_icc.cpp index 034ada48ab..697d45f416 100644 --- a/src/DIELECTRIC/fix_polarize_bem_icc.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_icc.cpp @@ -49,7 +49,8 @@ using namespace LAMMPS_NS; using namespace FixConst; -using MathConst::MY_PI; +using MathConst::MY_2PI; +using MathConst::MY_4PI; /* ---------------------------------------------------------------------- */ @@ -214,13 +215,13 @@ void FixPolarizeBEMICC::setup(int /*vflag*/) epsilon0e2q = 1.0; if (strcmp(update->unit_style, "real") == 0) - epsilon0e2q = 0.000240263377163643 * (4 * MY_PI); + epsilon0e2q = 0.000240263377163643 * MY_4PI; else if (strcmp(update->unit_style, "metal") == 0) - epsilon0e2q = 0.00553386738300813 * (4 * MY_PI); + epsilon0e2q = 0.00553386738300813 * MY_4PI; else if (strcmp(update->unit_style, "si") == 0) - epsilon0e2q = 8.854187812813e-12 * (4 * MY_PI); + epsilon0e2q = 8.854187812813e-12 * MY_4PI; else if (strcmp(update->unit_style, "nano") == 0) - epsilon0e2q = 0.000345866711328125 * (4 * MY_PI); + epsilon0e2q = 0.000345866711328125 * MY_4PI; else if (strcmp(update->unit_style, "lj") != 0) error->all(FLERR, "Only unit styles 'lj', 'real', 'metal', 'si' and 'nano' are supported"); @@ -286,8 +287,8 @@ void FixPolarizeBEMICC::compute_induced_charges() } // divide (Ex,Ey,Ez) by epsilon[i] here - double ndotE = epsilon0e2q * (Ex * norm[i][0] + Ey * norm[i][1] + Ez * norm[i][2]) / - epsilon[i] / (2 * MY_PI); + double ndotE = + epsilon0e2q * (Ex * norm[i][0] + Ey * norm[i][1] + Ez * norm[i][2]) / epsilon[i] / MY_2PI; double q_free = q[i]; double q_bound = 0; q_bound = (1.0 / em[i] - 1) * q_free - (ed[i] / (2 * em[i])) * ndotE * area[i]; @@ -326,8 +327,8 @@ void FixPolarizeBEMICC::compute_induced_charges() // note the area[i] is included here to ensure correct charge unit // for direct use in force/efield compute - double ndotE = epsilon0e2q * (Ex * norm[i][0] + Ey * norm[i][1] + Ez * norm[i][2]) / - (4 * MY_PI) / epsilon[i]; + double ndotE = + epsilon0e2q * (Ex * norm[i][0] + Ey * norm[i][1] + Ez * norm[i][2]) / MY_4PI / epsilon[i]; double q_bound = q_scaled[i] - q_free; q_bound = (1 - omega) * q_bound + omega * ((1.0 / em[i] - 1) * q_free - (ed[i] / em[i]) * ndotE * area[i]); @@ -343,7 +344,7 @@ void FixPolarizeBEMICC::compute_induced_charges() // hence there's no epsilon_1 in the factor f //double dot = (Ex*norm[i][0] + Ey*norm[i][1] + Ez*norm[i][2]); - //double f = (ed[i] / (2 * em[i])) / (2*MY_PI); + //double f = (ed[i] / (2 * em[i])) / MY_2PI; //q[i] = (1 - omega) * q[i] - omega * epsilon0 * f * dot * area[i]; double delta = fabs(qtmp - q_bound); @@ -378,11 +379,11 @@ void FixPolarizeBEMICC::compute_induced_charges() int ncount = group->count(igroup); double sum = 0; MPI_Allreduce(&tmp, &sum, 1, MPI_DOUBLE, MPI_SUM, world); - double qboundave = sum/(double)ncount; + double qboundave = sum / (double) ncount; for (int i = 0; i < nlocal; i++) { if (!(mask[i] & groupbit)) continue; - q[i] -= qboundave; + q[i] -= qboundave; } } @@ -467,7 +468,6 @@ void FixPolarizeBEMICC::unpack_forward_comm(int n, int first, double *buf) for (m = 0, i = first; m < n; m++, i++) atom->q_scaled[i] = buf[m]; } - /* ---------------------------------------------------------------------- set dielectric params for the atoms in the group ------------------------------------------------------------------------- */ From 353e0820e32e229ddaee15ef4216326542bce6df Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 12:26:43 -0500 Subject: [PATCH 366/445] capture log files for dielectric examples --- examples/PACKAGES/dielectric/data.sphere | 2 +- examples/PACKAGES/dielectric/in.confined | 10 +- examples/PACKAGES/dielectric/in.nopbc | 8 +- .../log.07Mar23.confined.gmres.g++.1 | 187 +++++++++++++++++ .../log.07Mar23.confined.gmres.g++.4 | 187 +++++++++++++++++ .../dielectric/log.07Mar23.confined.icc.g++.1 | 189 ++++++++++++++++++ .../dielectric/log.07Mar23.confined.icc.g++.4 | 189 ++++++++++++++++++ .../dielectric/log.07Mar23.nopbc.gmres.g++.1 | 131 ++++++++++++ .../dielectric/log.07Mar23.nopbc.gmres.g++.4 | 131 ++++++++++++ .../dielectric/log.07Mar23.nopbc.icc.g++.1 | 132 ++++++++++++ .../dielectric/log.07Mar23.nopbc.icc.g++.4 | 132 ++++++++++++ 11 files changed, 1288 insertions(+), 10 deletions(-) create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.1 create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.4 create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.1 create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.4 create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.1 create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.4 create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.1 create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.4 diff --git a/examples/PACKAGES/dielectric/data.sphere b/examples/PACKAGES/dielectric/data.sphere index 3e98e8211f..4a81df26ec 100644 --- a/examples/PACKAGES/dielectric/data.sphere +++ b/examples/PACKAGES/dielectric/data.sphere @@ -14,7 +14,7 @@ Masses 2 1 3 1 -Atoms # dielectric: id mol type q x y z normx normy normz area_per_patch ed em epsilon curvature +Atoms # dielectric : id mol type q x y z normx normy normz area_per_patch ed em epsilon curvature 1 1 1 0 50 55.2573 41.4935 0 0.525731 -0.850651 0.490491 45 57.5 57.5 0 2 1 1 0 50.4064 55.7206 41.8079 0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 diff --git a/examples/PACKAGES/dielectric/in.confined b/examples/PACKAGES/dielectric/in.confined index 314409fc17..276dd67afc 100644 --- a/examples/PACKAGES/dielectric/in.confined +++ b/examples/PACKAGES/dielectric/in.confined @@ -7,7 +7,7 @@ # Dielectric constants can be set to be different from the input data file variable epsilon1 index 20 -variable epsilon2 index 10 +variable epsilon2 index 10 variable data index data.confined @@ -53,11 +53,11 @@ kspace_modify slab 3.0 neigh_modify every 1 delay 0 check yes one 5000 #compute ef all efield/atom -dump 1 all custom 100 all.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] -dump 2 interface custom 100 interface.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] -dump_modify 1 sort id +#dump 1 all custom 100 all.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump 2 interface custom 100 interface.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id -dump 3 ions custom 100 ions.dump id mol type q x y z fx fy fz #c_ef[1] c_ef[2] c_ef[3] +#dump 3 ions custom 100 ions.dump id mol type q x y z fx fy fz #c_ef[1] c_ef[2] c_ef[3] fix 1 ions nve diff --git a/examples/PACKAGES/dielectric/in.nopbc b/examples/PACKAGES/dielectric/in.nopbc index ada9af2bf5..cbb0d45377 100644 --- a/examples/PACKAGES/dielectric/in.nopbc +++ b/examples/PACKAGES/dielectric/in.nopbc @@ -25,10 +25,10 @@ pair_coeff 1 1 0.0 1.0 neigh_modify one 5000 #compute ef all efield/atom -dump 1 all custom 100 all.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] -dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] - -dump_modify 1 sort id +#dump 1 all custom 100 all.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +# +#dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id fix 1 ions nve diff --git a/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.1 b/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.1 new file mode 100644 index 0000000000..ca0c22e5d3 --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.1 @@ -0,0 +1,187 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Two ions, a cation and an anion, confined between two interfaces: epsilon1 | epsilon2 | epsilon1 +# The interface normal vectors should be consistent with ed, pointing from region with epsilon1 to that with epsilon2 +# bottom interface: n = (0, 0, 1) +# top interface: n = (0, 0, -1) +# so that ed's are the same for both interfaces + +# Dielectric constants can be set to be different from the input data file + +variable epsilon1 index 20 +variable epsilon2 index 10 + +variable data index data.confined + +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary p p f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +# compute the relevant values for the interface particles + +variable ed equal "v_epsilon2 - v_epsilon1" +variable em equal "(v_epsilon2 + v_epsilon1)/2" +variable epsilon equal 1.0 # epsilon at the patch, not used for now +variable area equal 0.866 # patch area, same as in the data file + +read_data ${data} +read_data data.confined +Reading data file ... + orthogonal box = (0 0 0) to (40.000006 43.301277 40) + 1 by 1 by 1 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 4002 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.013 seconds + +group interface type 1 +4000 atoms in group interface +group ions type 2 3 +2 atoms in group ions + +group cations type 2 +1 atoms in group cations +group anions type 3 +1 atoms in group anions + +# set the dielectric constant of the medium where the ions reside + +set group cations epsilon ${epsilon2} +set group cations epsilon 10 +Setting atom values ... + 1 settings made for epsilon +set group anions epsilon ${epsilon2} +set group anions epsilon 10 +Setting atom values ... + 1 settings made for epsilon + +pair_style lj/cut/coul/long/dielectric 1.122 10.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +kspace_style pppm/dielectric 0.0001 +kspace_modify slab 3.0 + +neigh_modify every 1 delay 0 check yes one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump 2 interface custom 100 interface.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +#dump 3 ions custom 100 ions.dump id mol type q x y z fx fy fz #c_ef[1] c_ef[2] c_ef[3] + +fix 1 ions nve + +# fix modify is used to set the properties of the interface particle group + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == dof" "fix 3 interface polarize/functional 1 0.0001" "fix_modify 3 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" else "print 'Unsupported polarization solver' " +fix 3 interface polarize/bem/gmres 1 1.0e-4 +fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 ${em} ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 1 ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 1 0.866 NULL + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair #f_3 +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.24260797 + grid = 12 12 36 + stencil order = 5 + estimated absolute RMS force accuracy = 2.5219574e-07 + estimated relative force accuracy = 2.5219574e-07 + using double precision KISS FFT + 3d grid and FFT values/proc = 10982 5184 +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +BEM/GMRES solver for 4000 induced charges using maximum 3999 q-vectors +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 10.3 + ghost atom cutoff = 10.3 + binsize = 5.15, bins = 8 9 8 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/long/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 381.6 | 381.6 | 381.6 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 -1.7228107e-08 -1.8534756e-05 -1.8551984e-05 +Loop time of 1.872e-06 on 1 procs for 0 steps with 4002 atoms + +160.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Kspace | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 1.872e-06 | | |100.00 + +Nlocal: 4002 ave 4002 max 4002 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 4832 ave 4832 max 4832 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 1.51316e+06 ave 1.51316e+06 max 1.51316e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1513160 +Ave neighs/atom = 378.10095 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + + + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.4 b/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.4 new file mode 100644 index 0000000000..f4e855ad42 --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.4 @@ -0,0 +1,187 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Two ions, a cation and an anion, confined between two interfaces: epsilon1 | epsilon2 | epsilon1 +# The interface normal vectors should be consistent with ed, pointing from region with epsilon1 to that with epsilon2 +# bottom interface: n = (0, 0, 1) +# top interface: n = (0, 0, -1) +# so that ed's are the same for both interfaces + +# Dielectric constants can be set to be different from the input data file + +variable epsilon1 index 20 +variable epsilon2 index 10 + +variable data index data.confined + +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary p p f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +# compute the relevant values for the interface particles + +variable ed equal "v_epsilon2 - v_epsilon1" +variable em equal "(v_epsilon2 + v_epsilon1)/2" +variable epsilon equal 1.0 # epsilon at the patch, not used for now +variable area equal 0.866 # patch area, same as in the data file + +read_data ${data} +read_data data.confined +Reading data file ... + orthogonal box = (0 0 0) to (40.000006 43.301277 40) + 2 by 2 by 1 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 4002 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.011 seconds + +group interface type 1 +4000 atoms in group interface +group ions type 2 3 +2 atoms in group ions + +group cations type 2 +1 atoms in group cations +group anions type 3 +1 atoms in group anions + +# set the dielectric constant of the medium where the ions reside + +set group cations epsilon ${epsilon2} +set group cations epsilon 10 +Setting atom values ... + 1 settings made for epsilon +set group anions epsilon ${epsilon2} +set group anions epsilon 10 +Setting atom values ... + 1 settings made for epsilon + +pair_style lj/cut/coul/long/dielectric 1.122 10.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +kspace_style pppm/dielectric 0.0001 +kspace_modify slab 3.0 + +neigh_modify every 1 delay 0 check yes one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump 2 interface custom 100 interface.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +#dump 3 ions custom 100 ions.dump id mol type q x y z fx fy fz #c_ef[1] c_ef[2] c_ef[3] + +fix 1 ions nve + +# fix modify is used to set the properties of the interface particle group + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == dof" "fix 3 interface polarize/functional 1 0.0001" "fix_modify 3 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" else "print 'Unsupported polarization solver' " +fix 3 interface polarize/bem/gmres 1 1.0e-4 +fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 ${em} ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 1 ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 1 0.866 NULL + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair #f_3 +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.24260797 + grid = 12 12 36 + stencil order = 5 + estimated absolute RMS force accuracy = 2.5219574e-07 + estimated relative force accuracy = 2.5219574e-07 + using double precision KISS FFT + 3d grid and FFT values/proc = 4598 1296 +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +BEM/GMRES solver for 4000 induced charges using maximum 3999 q-vectors +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 10.3 + ghost atom cutoff = 10.3 + binsize = 5.15, bins = 8 9 8 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/long/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 376.2 | 376.2 | 376.2 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 -1.7228107e-08 -1.8534756e-05 -1.8551984e-05 +Loop time of 1.49983e-05 on 4 procs for 0 steps with 4002 atoms + +85.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Kspace | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 1.5e-05 | | |100.00 + +Nlocal: 1000.5 ave 1001 max 1000 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 2889.5 ave 2890 max 2889 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 378290 ave 378465 max 378117 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 1513160 +Ave neighs/atom = 378.10095 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + + + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.1 b/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.1 new file mode 100644 index 0000000000..9c1ab22f90 --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.1 @@ -0,0 +1,189 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Two ions, a cation and an anion, confined between two interfaces: epsilon1 | epsilon2 | epsilon1 +# The interface normal vectors should be consistent with ed, pointing from region with epsilon1 to that with epsilon2 +# bottom interface: n = (0, 0, 1) +# top interface: n = (0, 0, -1) +# so that ed's are the same for both interfaces + +# Dielectric constants can be set to be different from the input data file + +variable epsilon1 index 20 +variable epsilon2 index 10 + +variable data index data.confined + +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary p p f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +# compute the relevant values for the interface particles + +variable ed equal "v_epsilon2 - v_epsilon1" +variable em equal "(v_epsilon2 + v_epsilon1)/2" +variable epsilon equal 1.0 # epsilon at the patch, not used for now +variable area equal 0.866 # patch area, same as in the data file + +read_data ${data} +read_data data.confined +Reading data file ... + orthogonal box = (0 0 0) to (40.000006 43.301277 40) + 1 by 1 by 1 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 4002 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.013 seconds + +group interface type 1 +4000 atoms in group interface +group ions type 2 3 +2 atoms in group ions + +group cations type 2 +1 atoms in group cations +group anions type 3 +1 atoms in group anions + +# set the dielectric constant of the medium where the ions reside + +set group cations epsilon ${epsilon2} +set group cations epsilon 10 +Setting atom values ... + 1 settings made for epsilon +set group anions epsilon ${epsilon2} +set group anions epsilon 10 +Setting atom values ... + 1 settings made for epsilon + +pair_style lj/cut/coul/long/dielectric 1.122 10.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +kspace_style pppm/dielectric 0.0001 +kspace_modify slab 3.0 + +neigh_modify every 1 delay 0 check yes one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump 2 interface custom 100 interface.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +#dump 3 ions custom 100 ions.dump id mol type q x y z fx fy fz #c_ef[1] c_ef[2] c_ef[3] + +fix 1 ions nve + +# fix modify is used to set the properties of the interface particle group + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == dof" "fix 3 interface polarize/functional 1 0.0001" "fix_modify 3 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" else "print 'Unsupported polarization solver' " +fix 3 interface polarize/bem/icc 1 1.0e-4 +fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 ${em} ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 1 ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 1 0.866 NULL + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair #f_3 +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.24260797 + grid = 12 12 36 + stencil order = 5 + estimated absolute RMS force accuracy = 2.5219574e-07 + estimated relative force accuracy = 2.5219574e-07 + using double precision KISS FFT + 3d grid and FFT values/proc = 10982 5184 +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +BEM/ICC solver for 4000 induced charges + using pair style lj/cut/coul/long/dielectric + using kspace style pppm/dielectric +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 10.3 + ghost atom cutoff = 10.3 + binsize = 5.15, bins = 8 9 8 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/long/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 14.99 | 14.99 | 14.99 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 -1.7228514e-08 -1.8534756e-05 -1.8551985e-05 +Loop time of 1.573e-06 on 1 procs for 0 steps with 4002 atoms + +190.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Kspace | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 1.573e-06 | | |100.00 + +Nlocal: 4002 ave 4002 max 4002 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 4832 ave 4832 max 4832 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 1.51316e+06 ave 1.51316e+06 max 1.51316e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1513160 +Ave neighs/atom = 378.10095 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + + + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.4 b/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.4 new file mode 100644 index 0000000000..c60b803cd1 --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.4 @@ -0,0 +1,189 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Two ions, a cation and an anion, confined between two interfaces: epsilon1 | epsilon2 | epsilon1 +# The interface normal vectors should be consistent with ed, pointing from region with epsilon1 to that with epsilon2 +# bottom interface: n = (0, 0, 1) +# top interface: n = (0, 0, -1) +# so that ed's are the same for both interfaces + +# Dielectric constants can be set to be different from the input data file + +variable epsilon1 index 20 +variable epsilon2 index 10 + +variable data index data.confined + +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary p p f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +# compute the relevant values for the interface particles + +variable ed equal "v_epsilon2 - v_epsilon1" +variable em equal "(v_epsilon2 + v_epsilon1)/2" +variable epsilon equal 1.0 # epsilon at the patch, not used for now +variable area equal 0.866 # patch area, same as in the data file + +read_data ${data} +read_data data.confined +Reading data file ... + orthogonal box = (0 0 0) to (40.000006 43.301277 40) + 2 by 2 by 1 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 4002 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.012 seconds + +group interface type 1 +4000 atoms in group interface +group ions type 2 3 +2 atoms in group ions + +group cations type 2 +1 atoms in group cations +group anions type 3 +1 atoms in group anions + +# set the dielectric constant of the medium where the ions reside + +set group cations epsilon ${epsilon2} +set group cations epsilon 10 +Setting atom values ... + 1 settings made for epsilon +set group anions epsilon ${epsilon2} +set group anions epsilon 10 +Setting atom values ... + 1 settings made for epsilon + +pair_style lj/cut/coul/long/dielectric 1.122 10.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +kspace_style pppm/dielectric 0.0001 +kspace_modify slab 3.0 + +neigh_modify every 1 delay 0 check yes one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump 2 interface custom 100 interface.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +#dump 3 ions custom 100 ions.dump id mol type q x y z fx fy fz #c_ef[1] c_ef[2] c_ef[3] + +fix 1 ions nve + +# fix modify is used to set the properties of the interface particle group + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == dof" "fix 3 interface polarize/functional 1 0.0001" "fix_modify 3 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" else "print 'Unsupported polarization solver' " +fix 3 interface polarize/bem/icc 1 1.0e-4 +fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 ${em} ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 ${epsilon} ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 1 ${area} NULL +fix_modify 3 itr_max 50 dielectrics -10 15 1 0.866 NULL + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair #f_3 +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.24260797 + grid = 12 12 36 + stencil order = 5 + estimated absolute RMS force accuracy = 2.5219574e-07 + estimated relative force accuracy = 2.5219574e-07 + using double precision KISS FFT + 3d grid and FFT values/proc = 4598 1296 +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +BEM/ICC solver for 4000 induced charges + using pair style lj/cut/coul/long/dielectric + using kspace style pppm/dielectric +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 10.3 + ghost atom cutoff = 10.3 + binsize = 5.15, bins = 8 9 8 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/long/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 9.647 | 9.647 | 9.647 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 -1.7228514e-08 -1.8534756e-05 -1.8551985e-05 +Loop time of 1.23127e-05 on 4 procs for 0 steps with 4002 atoms + +103.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Kspace | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 1.231e-05 | | |100.00 + +Nlocal: 1000.5 ave 1001 max 1000 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 2889.5 ave 2890 max 2889 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 378290 ave 378465 max 378117 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 1513160 +Ave neighs/atom = 378.10095 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + + + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.1 b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.1 new file mode 100644 index 0000000000..08cbbb2b7d --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.1 @@ -0,0 +1,131 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Interface +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary f f f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +variable data index data.sphere + +read_data ${data} +read_data data.sphere +Reading data file ... + orthogonal box = (0 0 0) to (100 100 100) + 1 by 1 by 1 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 2563 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.011 seconds + +group interface type 1 +2562 atoms in group interface +group ions type 2 3 +1 atoms in group ions + +pair_style lj/cut/coul/cut/dielectric 1.122 20.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +neigh_modify one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +# +#dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +fix 1 ions nve + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" elif "${method} == dof" "fix 3 interface polarize/functional 1 1.0e-4" else "print 'Unsupported method for polarization' " +fix 3 interface polarize/bem/gmres 1 1.0e-4 + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +BEM/GMRES solver for 2562 induced charges using maximum 2561 q-vectors +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 20.3 + ghost atom cutoff = 20.3 + binsize = 10.15, bins = 10 10 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/cut/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 183.5 | 183.5 | 183.5 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 2.1870454e-07 0 2.1870454e-07 +Loop time of 1.538e-06 on 1 procs for 0 steps with 2563 atoms + +195.1% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 1.538e-06 | | |100.00 + +Nlocal: 2563 ave 2563 max 2563 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 6.56561e+06 ave 6.56561e+06 max 6.56561e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 6565612 +Ave neighs/atom = 2561.6902 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.4 b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.4 new file mode 100644 index 0000000000..060c00a9be --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.4 @@ -0,0 +1,131 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Interface +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary f f f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +variable data index data.sphere + +read_data ${data} +read_data data.sphere +Reading data file ... + orthogonal box = (0 0 0) to (100 100 100) + 1 by 2 by 2 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 2563 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.009 seconds + +group interface type 1 +2562 atoms in group interface +group ions type 2 3 +1 atoms in group ions + +pair_style lj/cut/coul/cut/dielectric 1.122 20.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +neigh_modify one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +# +#dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +fix 1 ions nve + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" elif "${method} == dof" "fix 3 interface polarize/functional 1 1.0e-4" else "print 'Unsupported method for polarization' " +fix 3 interface polarize/bem/gmres 1 1.0e-4 + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +BEM/GMRES solver for 2562 induced charges using maximum 2561 q-vectors +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 20.3 + ghost atom cutoff = 20.3 + binsize = 10.15, bins = 10 10 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/cut/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 164.6 | 164.7 | 165 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 2.1870454e-07 0 2.1870454e-07 +Loop time of 2.4415e-06 on 4 procs for 0 steps with 2563 atoms + +133.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 2.442e-06 | | |100.00 + +Nlocal: 640.75 ave 674 max 609 min +Histogram: 1 0 0 0 2 0 0 0 0 1 +Nghost: 1922.25 ave 1954 max 1889 min +Histogram: 1 0 0 0 0 2 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 1.6414e+06 ave 1.72639e+06 max 1.56007e+06 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 6565612 +Ave neighs/atom = 2561.6902 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.1 b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.1 new file mode 100644 index 0000000000..cdde6a228a --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.1 @@ -0,0 +1,132 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Interface +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary f f f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +variable data index data.sphere + +read_data ${data} +read_data data.sphere +Reading data file ... + orthogonal box = (0 0 0) to (100 100 100) + 1 by 1 by 1 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 2563 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.011 seconds + +group interface type 1 +2562 atoms in group interface +group ions type 2 3 +1 atoms in group ions + +pair_style lj/cut/coul/cut/dielectric 1.122 20.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +neigh_modify one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +# +#dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +fix 1 ions nve + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" elif "${method} == dof" "fix 3 interface polarize/functional 1 1.0e-4" else "print 'Unsupported method for polarization' " +fix 3 interface polarize/bem/icc 1 1.0e-4 + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +BEM/ICC solver for 2562 induced charges + using pair style lj/cut/coul/cut/dielectric +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 20.3 + ghost atom cutoff = 20.3 + binsize = 10.15, bins = 10 10 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/cut/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 32.96 | 32.96 | 32.96 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 2.1870503e-07 0 2.1870503e-07 +Loop time of 1.536e-06 on 1 procs for 0 steps with 2563 atoms + +195.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 1.536e-06 | | |100.00 + +Nlocal: 2563 ave 2563 max 2563 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 6.56561e+06 ave 6.56561e+06 max 6.56561e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 6565612 +Ave neighs/atom = 2561.6902 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + +Total wall time: 0:00:01 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.4 b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.4 new file mode 100644 index 0000000000..e329d5c958 --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.4 @@ -0,0 +1,132 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Interface +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary f f f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +variable data index data.sphere + +read_data ${data} +read_data data.sphere +Reading data file ... + orthogonal box = (0 0 0) to (100 100 100) + 1 by 2 by 2 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 2563 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.008 seconds + +group interface type 1 +2562 atoms in group interface +group ions type 2 3 +1 atoms in group ions + +pair_style lj/cut/coul/cut/dielectric 1.122 20.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +neigh_modify one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +# +#dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +fix 1 ions nve + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" elif "${method} == dof" "fix 3 interface polarize/functional 1 1.0e-4" else "print 'Unsupported method for polarization' " +fix 3 interface polarize/bem/icc 1 1.0e-4 + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +BEM/ICC solver for 2562 induced charges + using pair style lj/cut/coul/cut/dielectric +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 20.3 + ghost atom cutoff = 20.3 + binsize = 10.15, bins = 10 10 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/cut/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 14.03 | 14.12 | 14.41 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 2.1870503e-07 0 2.1870503e-07 +Loop time of 2.408e-06 on 4 procs for 0 steps with 2563 atoms + +135.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 2.408e-06 | | |100.00 + +Nlocal: 640.75 ave 674 max 609 min +Histogram: 1 0 0 0 2 0 0 0 0 1 +Nghost: 1922.25 ave 1954 max 1889 min +Histogram: 1 0 0 0 0 2 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 1.6414e+06 ave 1.72639e+06 max 1.56007e+06 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 6565612 +Ave neighs/atom = 2561.6902 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + +Total wall time: 0:00:00 From 9e57bedea2b4747376d8a9fc7f515a749e9d6817 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Tue, 7 Mar 2023 11:51:14 -0600 Subject: [PATCH 367/445] Fixed bugs when mistakenly replacing all "NULL" with "nullptr" with FixPolarizeFunctional, reduced the number of induced charges so that in.nopbc with dof finishes in a reasonable time --- examples/PACKAGES/dielectric/data.sphere | 3213 ++++---------------- examples/PACKAGES/dielectric/in.nopbc | 4 +- src/DIELECTRIC/fix_polarize_functional.cpp | 6 +- 3 files changed, 651 insertions(+), 2572 deletions(-) diff --git a/examples/PACKAGES/dielectric/data.sphere b/examples/PACKAGES/dielectric/data.sphere index 4a81df26ec..ede3849635 100644 --- a/examples/PACKAGES/dielectric/data.sphere +++ b/examples/PACKAGES/dielectric/data.sphere @@ -1,6 +1,6 @@ -LAMMPS data file: 2563 atoms for a single point charge near a dielectric sphere, 2564 for two opposite charges +LAMMPS data file: sphere radius = 5; ion distance to center = 7, epsilon inside = 35 outside = 80 -2563 atoms +643 atoms 3 atom types 0.000000 100.000000 xlo xhi @@ -14,2569 +14,648 @@ Masses 2 1 3 1 -Atoms # dielectric : id mol type q x y z normx normy normz area_per_patch ed em epsilon curvature +Atoms # dielectric -1 1 1 0 50 55.2573 41.4935 0 0.525731 -0.850651 0.490491 45 57.5 57.5 0 -2 1 1 0 50.4064 55.7206 41.8079 0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 -3 1 1 0 49.5936 55.7206 41.8079 -0.0406403 0.572055 -0.819208 0.490491 45 57.5 57.5 0 -4 1 1 0 50.8109 56.1564 42.1616 0.081086 0.615642 -0.783843 0.490491 45 57.5 57.5 0 -5 1 1 0 50 56.1768 42.1357 0 0.617676 -0.786433 0.490491 45 57.5 57.5 0 -6 1 1 0 49.1891 56.1564 42.1616 -0.081086 0.615642 -0.783843 0.490491 45 57.5 57.5 0 -7 1 1 0 51.2114 56.5628 42.5527 0.121144 0.656282 -0.744727 0.490491 45 57.5 57.5 0 -8 1 1 0 50.4064 56.6088 42.5061 0.0406418 0.660883 -0.749387 0.490491 45 57.5 57.5 0 -9 1 1 0 51.6062 56.9378 42.9795 0.160622 0.69378 -0.702047 0.490491 45 57.5 57.5 0 -10 1 1 0 50.8057 57.0062 42.9103 0.0805729 0.700622 -0.708969 0.490491 45 57.5 57.5 0 -11 1 1 0 50 57.0291 42.8872 0 0.702907 -0.711282 0.490491 45 57.5 57.5 0 -12 1 1 0 49.5936 56.6088 42.5061 -0.0406418 0.660883 -0.749387 0.490491 45 57.5 57.5 0 -13 1 1 0 48.7886 56.5628 42.5527 -0.121144 0.656282 -0.744727 0.490491 45 57.5 57.5 0 -14 1 1 0 49.1943 57.0062 42.9103 -0.0805729 0.700622 -0.708969 0.490491 45 57.5 57.5 0 -15 1 1 0 48.3938 56.9378 42.9795 -0.160622 0.69378 -0.702047 0.490491 45 57.5 57.5 0 -16 1 1 0 51.9933 57.2796 43.4399 0.199331 0.727959 -0.656006 0.490491 45 57.5 57.5 0 -17 1 1 0 51.2119 57.3889 43.3716 0.121192 0.738887 -0.662842 0.490491 45 57.5 57.5 0 -18 1 1 0 52.3709 57.5865 43.9317 0.237086 0.758652 -0.606825 0.490491 45 57.5 57.5 0 -19 1 1 0 51.5961 57.7184 43.8454 0.159613 0.771841 -0.615456 0.490491 45 57.5 57.5 0 -20 1 1 0 50.8114 57.802 43.7976 0.0811417 0.780205 -0.620239 0.490491 45 57.5 57.5 0 -21 1 1 0 52.7371 57.8572 44.4526 0.273706 0.785715 -0.55474 0.490491 45 57.5 57.5 0 -22 1 1 0 51.9727 58.015 44.3549 0.197274 0.801504 -0.564513 0.490491 45 57.5 57.5 0 -23 1 1 0 53.0902 58.0902 45 0.309017 0.809017 -0.5 0.490491 45 57.5 57.5 0 -24 1 1 0 52.3345 58.2715 44.888 0.233445 0.827147 -0.511205 0.490491 45 57.5 57.5 0 -25 1 1 0 51.5643 58.4018 44.8074 0.156434 0.840178 -0.519259 0.490491 45 57.5 57.5 0 -26 1 1 0 51.1908 58.1217 44.2886 0.119078 0.81217 -0.57114 0.490491 45 57.5 57.5 0 -27 1 1 0 50.4067 58.1752 44.2554 0.040675 0.817523 -0.574458 0.490491 45 57.5 57.5 0 -28 1 1 0 50.7846 58.4803 44.7589 0.0784592 0.848029 -0.52411 0.490491 45 57.5 57.5 0 -29 1 1 0 50 58.5065 44.7427 0 0.850651 -0.525731 0.490491 45 57.5 57.5 0 -30 1 1 0 48.7881 57.3889 43.3716 -0.121192 0.738887 -0.662842 0.490491 45 57.5 57.5 0 -31 1 1 0 48.0067 57.2796 43.4399 -0.199331 0.727959 -0.656006 0.490491 45 57.5 57.5 0 -32 1 1 0 49.1886 57.802 43.7976 -0.0811417 0.780205 -0.620239 0.490491 45 57.5 57.5 0 -33 1 1 0 48.4039 57.7184 43.8454 -0.159613 0.771841 -0.615456 0.490491 45 57.5 57.5 0 -34 1 1 0 47.6291 57.5865 43.9317 -0.237086 0.758652 -0.606825 0.490491 45 57.5 57.5 0 -35 1 1 0 49.5933 58.1752 44.2554 -0.040675 0.817523 -0.574458 0.490491 45 57.5 57.5 0 -36 1 1 0 48.8092 58.1217 44.2886 -0.119078 0.81217 -0.57114 0.490491 45 57.5 57.5 0 -37 1 1 0 49.2154 58.4803 44.7589 -0.0784592 0.848029 -0.52411 0.490491 45 57.5 57.5 0 -38 1 1 0 48.4357 58.4018 44.8074 -0.156434 0.840178 -0.519259 0.490491 45 57.5 57.5 0 -39 1 1 0 48.0273 58.015 44.3549 -0.197274 0.801504 -0.564513 0.490491 45 57.5 57.5 0 -40 1 1 0 47.2629 57.8572 44.4526 -0.273706 0.785715 -0.55474 0.490491 45 57.5 57.5 0 -41 1 1 0 47.6655 58.2715 44.888 -0.233445 0.827147 -0.511205 0.490491 45 57.5 57.5 0 -42 1 1 0 46.9098 58.0902 45 -0.309017 0.809017 -0.5 0.490491 45 57.5 57.5 0 -43 1 1 0 50.4068 57.435 43.325 0.0406769 0.743496 -0.667502 0.490491 45 57.5 57.5 0 -44 1 1 0 50 57.8279 43.7771 0 0.782786 -0.622291 0.490491 45 57.5 57.5 0 -45 1 1 0 49.5932 57.435 43.325 -0.0406769 0.743496 -0.667502 0.490491 45 57.5 57.5 0 -46 1 1 0 53.4285 58.2845 45.5713 0.342848 0.828447 -0.442867 0.490491 45 57.5 57.5 0 -47 1 1 0 52.7469 58.5264 45.5554 0.274694 0.85264 -0.444464 0.490491 45 57.5 57.5 0 -48 1 1 0 53.7504 58.4391 46.1639 0.375038 0.843912 -0.383614 0.490491 45 57.5 57.5 0 -49 1 1 0 53.0766 58.6973 46.1409 0.307659 0.869725 -0.385906 0.490491 45 57.5 57.5 0 -50 1 1 0 52.3868 58.9101 46.1381 0.238677 0.891007 -0.386187 0.490491 45 57.5 57.5 0 -51 1 1 0 54.0543 58.5534 46.7748 0.405434 0.855337 -0.322525 0.490491 45 57.5 57.5 0 -52 1 1 0 53.3921 58.8284 46.7514 0.339209 0.882837 -0.324863 0.490491 45 57.5 57.5 0 -53 1 1 0 54.3389 58.6267 47.4011 0.433888 0.862669 -0.259892 0.490491 45 57.5 57.5 0 -54 1 1 0 53.6852 58.9174 47.3734 0.368518 0.891742 -0.262661 0.490491 45 57.5 57.5 0 -55 1 1 0 53.0126 59.1624 47.3592 0.301258 0.916244 -0.264082 0.490491 45 57.5 57.5 0 -56 1 1 0 52.7063 59.0583 46.7407 0.270627 0.905832 -0.325929 0.490491 45 57.5 57.5 0 -57 1 1 0 52.0119 59.2388 46.7447 0.201189 0.92388 -0.32553 0.490491 45 57.5 57.5 0 -58 1 1 0 52.3245 59.3605 47.3585 0.232455 0.93605 -0.264151 0.490491 45 57.5 57.5 0 -59 1 1 0 51.6246 59.5106 47.3713 0.16246 0.951057 -0.262865 0.490491 45 57.5 57.5 0 -60 1 1 0 54.6027 58.6587 48.0398 0.460266 0.865871 -0.196015 0.490491 45 57.5 57.5 0 -61 1 1 0 53.9735 58.964 48.0359 0.39735 0.896401 -0.196412 0.490491 45 57.5 57.5 0 -62 1 1 0 54.8444 58.6493 48.688 0.484441 0.864929 -0.1312 0.490491 45 57.5 57.5 0 -63 1 1 0 54.2236 58.968 48.6825 0.422363 0.896801 -0.131749 0.490491 45 57.5 57.5 0 -64 1 1 0 53.5823 59.243 48.6834 0.358229 0.924305 -0.131656 0.490491 45 57.5 57.5 0 -65 1 1 0 55.063 58.5985 49.3424 0.506298 0.859848 -0.0657577 0.490491 45 57.5 57.5 0 -66 1 1 0 54.4537 58.9293 49.3418 0.445365 0.892927 -0.0658169 0.490491 45 57.5 57.5 0 -67 1 1 0 55.2573 58.5065 50 0.525731 0.850651 0 0.490491 45 57.5 57.5 0 -68 1 1 0 54.6566 58.8497 50 0.465657 0.884965 0 0.490491 45 57.5 57.5 0 -69 1 1 0 54.0336 59.1504 50 0.403355 0.915043 0 0.490491 45 57.5 57.5 0 -70 1 1 0 53.8172 59.2192 49.3401 0.381722 0.921919 -0.0659886 0.490491 45 57.5 57.5 0 -71 1 1 0 53.1678 59.462 49.3396 0.316778 0.946198 -0.0660427 0.490491 45 57.5 57.5 0 -72 1 1 0 53.3912 59.4074 50 0.339122 0.940742 0 0.490491 45 57.5 57.5 0 -73 1 1 0 52.7327 59.6194 50 0.273267 0.961938 0 0.490491 45 57.5 57.5 0 -74 1 1 0 51.9178 59.6119 48.0166 0.19178 0.961188 -0.198337 0.490491 45 57.5 57.5 0 -75 1 1 0 51.2273 59.7237 48.0142 0.122729 0.97237 -0.198581 0.490491 45 57.5 57.5 0 -76 1 1 0 52.2012 59.6639 48.6721 0.220117 0.966393 -0.132792 0.490491 45 57.5 57.5 0 -77 1 1 0 51.5155 59.7943 48.6674 0.151549 0.979426 -0.133256 0.490491 45 57.5 57.5 0 -78 1 1 0 50.8224 59.8769 48.6693 0.0822422 0.987688 -0.133071 0.490491 45 57.5 57.5 0 -79 1 1 0 52.4733 59.6664 49.3343 0.247326 0.966643 -0.0665668 0.490491 45 57.5 57.5 0 -80 1 1 0 51.796 59.8148 49.334 0.179596 0.981483 -0.0666046 0.490491 45 57.5 57.5 0 -81 1 1 0 52.061 59.7853 50 0.206103 0.97853 0 0.490491 45 57.5 57.5 0 -82 1 1 0 51.3795 59.9044 50 0.137952 0.990439 0 0.490491 45 57.5 57.5 0 -83 1 1 0 51.1039 59.9165 49.3329 0.110385 0.991648 -0.0667095 0.490491 45 57.5 57.5 0 -84 1 1 0 50.4125 59.9692 49.3326 0.0412479 0.996917 -0.0667412 0.490491 45 57.5 57.5 0 -85 1 1 0 50.6914 59.9761 50 0.0691418 0.997607 0 0.490491 45 57.5 57.5 0 -86 1 1 0 50 60 50 0 1 0 0.490491 45 57.5 57.5 0 -87 1 1 0 53.3061 59.2268 48.0161 0.330606 0.922682 -0.198387 0.490491 45 57.5 57.5 0 -88 1 1 0 52.8993 59.4782 48.6743 0.289929 0.947822 -0.13257 0.490491 45 57.5 57.5 0 -89 1 1 0 52.6155 59.4443 48.0091 0.26155 0.944433 -0.199094 0.490491 45 57.5 57.5 0 -90 1 1 0 47.2531 58.5264 45.5554 -0.274694 0.85264 -0.444464 0.490491 45 57.5 57.5 0 -91 1 1 0 46.5715 58.2845 45.5713 -0.342848 0.828447 -0.442867 0.490491 45 57.5 57.5 0 -92 1 1 0 47.6132 58.9101 46.1381 -0.238677 0.891007 -0.386187 0.490491 45 57.5 57.5 0 -93 1 1 0 46.9234 58.6973 46.1409 -0.307659 0.869725 -0.385906 0.490491 45 57.5 57.5 0 -94 1 1 0 46.2496 58.4391 46.1639 -0.375038 0.843912 -0.383614 0.490491 45 57.5 57.5 0 -95 1 1 0 47.9881 59.2388 46.7447 -0.201189 0.92388 -0.32553 0.490491 45 57.5 57.5 0 -96 1 1 0 47.2937 59.0583 46.7407 -0.270627 0.905832 -0.325929 0.490491 45 57.5 57.5 0 -97 1 1 0 48.3754 59.5106 47.3713 -0.16246 0.951057 -0.262865 0.490491 45 57.5 57.5 0 -98 1 1 0 47.6755 59.3605 47.3585 -0.232455 0.93605 -0.264151 0.490491 45 57.5 57.5 0 -99 1 1 0 46.9874 59.1624 47.3592 -0.301258 0.916244 -0.264082 0.490491 45 57.5 57.5 0 -100 1 1 0 46.6079 58.8284 46.7514 -0.339209 0.882837 -0.324863 0.490491 45 57.5 57.5 0 -101 1 1 0 45.9457 58.5534 46.7748 -0.405434 0.855337 -0.322525 0.490491 45 57.5 57.5 0 -102 1 1 0 46.3148 58.9174 47.3734 -0.368518 0.891742 -0.262661 0.490491 45 57.5 57.5 0 -103 1 1 0 45.6611 58.6267 47.4011 -0.433888 0.862669 -0.259892 0.490491 45 57.5 57.5 0 -104 1 1 0 48.7727 59.7237 48.0142 -0.122729 0.97237 -0.198581 0.490491 45 57.5 57.5 0 -105 1 1 0 48.0822 59.6119 48.0166 -0.19178 0.961188 -0.198337 0.490491 45 57.5 57.5 0 -106 1 1 0 49.1776 59.8769 48.6693 -0.0822422 0.987688 -0.133071 0.490491 45 57.5 57.5 0 -107 1 1 0 48.4845 59.7943 48.6674 -0.151549 0.979426 -0.133256 0.490491 45 57.5 57.5 0 -108 1 1 0 47.7988 59.6639 48.6721 -0.220117 0.966393 -0.132792 0.490491 45 57.5 57.5 0 -109 1 1 0 49.5875 59.9692 49.3326 -0.0412479 0.996917 -0.0667412 0.490491 45 57.5 57.5 0 -110 1 1 0 48.8961 59.9165 49.3329 -0.110385 0.991648 -0.0667095 0.490491 45 57.5 57.5 0 -111 1 1 0 49.3086 59.9761 50 -0.0691418 0.997607 0 0.490491 45 57.5 57.5 0 -112 1 1 0 48.6205 59.9044 50 -0.137952 0.990439 0 0.490491 45 57.5 57.5 0 -113 1 1 0 48.204 59.8148 49.334 -0.179596 0.981483 -0.0666046 0.490491 45 57.5 57.5 0 -114 1 1 0 47.5267 59.6664 49.3343 -0.247326 0.966643 -0.0665668 0.490491 45 57.5 57.5 0 -115 1 1 0 47.939 59.7853 50 -0.206103 0.97853 0 0.490491 45 57.5 57.5 0 -116 1 1 0 47.2673 59.6194 50 -0.273267 0.961938 0 0.490491 45 57.5 57.5 0 -117 1 1 0 46.0265 58.964 48.0359 -0.39735 0.896401 -0.196412 0.490491 45 57.5 57.5 0 -118 1 1 0 45.3973 58.6587 48.0398 -0.460266 0.865871 -0.196015 0.490491 45 57.5 57.5 0 -119 1 1 0 46.4177 59.243 48.6834 -0.358229 0.924305 -0.131656 0.490491 45 57.5 57.5 0 -120 1 1 0 45.7764 58.968 48.6825 -0.422363 0.896801 -0.131749 0.490491 45 57.5 57.5 0 -121 1 1 0 45.1556 58.6493 48.688 -0.484441 0.864929 -0.1312 0.490491 45 57.5 57.5 0 -122 1 1 0 46.8322 59.462 49.3396 -0.316778 0.946198 -0.0660427 0.490491 45 57.5 57.5 0 -123 1 1 0 46.1828 59.2192 49.3401 -0.381722 0.921919 -0.0659886 0.490491 45 57.5 57.5 0 -124 1 1 0 46.6088 59.4074 50 -0.339122 0.940742 0 0.490491 45 57.5 57.5 0 -125 1 1 0 45.9664 59.1504 50 -0.403355 0.915043 0 0.490491 45 57.5 57.5 0 -126 1 1 0 45.5463 58.9293 49.3418 -0.445365 0.892927 -0.0658169 0.490491 45 57.5 57.5 0 -127 1 1 0 44.937 58.5985 49.3424 -0.506298 0.859848 -0.0657577 0.490491 45 57.5 57.5 0 -128 1 1 0 45.3434 58.8497 50 -0.465657 0.884965 0 0.490491 45 57.5 57.5 0 -129 1 1 0 44.7427 58.5065 50 -0.525731 0.850651 0 0.490491 45 57.5 57.5 0 -130 1 1 0 47.3845 59.4443 48.0091 -0.26155 0.944433 -0.199094 0.490491 45 57.5 57.5 0 -131 1 1 0 47.1007 59.4782 48.6743 -0.289929 0.947822 -0.13257 0.490491 45 57.5 57.5 0 -132 1 1 0 46.6939 59.2268 48.0161 -0.330606 0.922682 -0.198387 0.490491 45 57.5 57.5 0 -133 1 1 0 51.9823 58.6853 45.4574 0.198227 0.868535 -0.454262 0.490491 45 57.5 57.5 0 -134 1 1 0 51.6101 59.0484 46.0586 0.161007 0.904839 -0.394136 0.490491 45 57.5 57.5 0 -135 1 1 0 51.228 59.3513 46.6766 0.1228 0.93513 -0.332342 0.490491 45 57.5 57.5 0 -136 1 1 0 50.8232 59.1298 46.0039 0.0823235 0.912983 -0.399607 0.490491 45 57.5 57.5 0 -137 1 1 0 51.1976 58.7934 45.3912 0.119755 0.879344 -0.460882 0.490491 45 57.5 57.5 0 -138 1 1 0 50.413 58.8476 45.3579 0.0412991 0.88476 -0.464213 0.490491 45 57.5 57.5 0 -139 1 1 0 50.815 59.6065 47.3448 0.081501 0.960655 -0.265519 0.490491 45 57.5 57.5 0 -140 1 1 0 50.4125 59.7885 47.9963 0.0412506 0.978852 -0.200368 0.490491 45 57.5 57.5 0 -141 1 1 0 50 59.6386 47.336 0 0.963861 -0.266405 0.490491 45 57.5 57.5 0 -142 1 1 0 50 59.9105 48.6648 0 0.991046 -0.133524 0.490491 45 57.5 57.5 0 -143 1 1 0 49.5875 59.7885 47.9963 -0.0412506 0.978852 -0.200368 0.490491 45 57.5 57.5 0 -144 1 1 0 49.185 59.6065 47.3448 -0.081501 0.960655 -0.265519 0.490491 45 57.5 57.5 0 -145 1 1 0 49.587 58.8476 45.3579 -0.0412991 0.88476 -0.464213 0.490491 45 57.5 57.5 0 -146 1 1 0 49.1768 59.1298 46.0039 -0.0823235 0.912983 -0.399607 0.490491 45 57.5 57.5 0 -147 1 1 0 48.8024 58.7934 45.3912 -0.119755 0.879344 -0.460882 0.490491 45 57.5 57.5 0 -148 1 1 0 48.772 59.3513 46.6766 -0.1228 0.93513 -0.332342 0.490491 45 57.5 57.5 0 -149 1 1 0 48.3899 59.0484 46.0586 -0.161007 0.904839 -0.394136 0.490491 45 57.5 57.5 0 -150 1 1 0 48.0177 58.6853 45.4574 -0.198227 0.868535 -0.454262 0.490491 45 57.5 57.5 0 -151 1 1 0 50.413 59.4162 46.6586 0.0413021 0.941618 -0.33414 0.490491 45 57.5 57.5 0 -152 1 1 0 49.587 59.4162 46.6586 -0.0413021 0.941618 -0.33414 0.490491 45 57.5 57.5 0 -153 1 1 0 50 59.1609 45.9903 0 0.916092 -0.400968 0.490491 45 57.5 57.5 0 -154 1 1 0 50 55.2573 58.5065 0 0.525731 0.850651 0.490491 45 57.5 57.5 0 -155 1 1 0 49.5936 55.7206 58.1921 -0.0406403 0.572055 0.819208 0.490491 45 57.5 57.5 0 -156 1 1 0 50.4064 55.7206 58.1921 0.0406403 0.572055 0.819208 0.490491 45 57.5 57.5 0 -157 1 1 0 49.1891 56.1564 57.8384 -0.081086 0.615642 0.783843 0.490491 45 57.5 57.5 0 -158 1 1 0 50 56.1768 57.8643 0 0.617676 0.786433 0.490491 45 57.5 57.5 0 -159 1 1 0 50.8109 56.1564 57.8384 0.081086 0.615642 0.783843 0.490491 45 57.5 57.5 0 -160 1 1 0 48.7886 56.5628 57.4473 -0.121144 0.656282 0.744727 0.490491 45 57.5 57.5 0 -161 1 1 0 49.5936 56.6088 57.4939 -0.0406418 0.660883 0.749387 0.490491 45 57.5 57.5 0 -162 1 1 0 48.3938 56.9378 57.0205 -0.160622 0.69378 0.702047 0.490491 45 57.5 57.5 0 -163 1 1 0 49.1943 57.0062 57.0897 -0.0805729 0.700622 0.708969 0.490491 45 57.5 57.5 0 -164 1 1 0 50 57.0291 57.1128 0 0.702907 0.711282 0.490491 45 57.5 57.5 0 -165 1 1 0 50.4064 56.6088 57.4939 0.0406418 0.660883 0.749387 0.490491 45 57.5 57.5 0 -166 1 1 0 51.2114 56.5628 57.4473 0.121144 0.656282 0.744727 0.490491 45 57.5 57.5 0 -167 1 1 0 50.8057 57.0062 57.0897 0.0805729 0.700622 0.708969 0.490491 45 57.5 57.5 0 -168 1 1 0 51.6062 56.9378 57.0205 0.160622 0.69378 0.702047 0.490491 45 57.5 57.5 0 -169 1 1 0 48.0067 57.2796 56.5601 -0.199331 0.727959 0.656006 0.490491 45 57.5 57.5 0 -170 1 1 0 48.7881 57.3889 56.6284 -0.121192 0.738887 0.662842 0.490491 45 57.5 57.5 0 -171 1 1 0 47.6291 57.5865 56.0683 -0.237086 0.758652 0.606825 0.490491 45 57.5 57.5 0 -172 1 1 0 48.4039 57.7184 56.1546 -0.159613 0.771841 0.615456 0.490491 45 57.5 57.5 0 -173 1 1 0 49.1886 57.802 56.2024 -0.0811417 0.780205 0.620239 0.490491 45 57.5 57.5 0 -174 1 1 0 47.2629 57.8572 55.5474 -0.273706 0.785715 0.55474 0.490491 45 57.5 57.5 0 -175 1 1 0 48.0273 58.015 55.6451 -0.197274 0.801504 0.564513 0.490491 45 57.5 57.5 0 -176 1 1 0 46.9098 58.0902 55 -0.309017 0.809017 0.5 0.490491 45 57.5 57.5 0 -177 1 1 0 47.6655 58.2715 55.112 -0.233445 0.827147 0.511205 0.490491 45 57.5 57.5 0 -178 1 1 0 48.4357 58.4018 55.1926 -0.156434 0.840178 0.519259 0.490491 45 57.5 57.5 0 -179 1 1 0 48.8092 58.1217 55.7114 -0.119078 0.81217 0.57114 0.490491 45 57.5 57.5 0 -180 1 1 0 49.5933 58.1752 55.7446 -0.040675 0.817523 0.574458 0.490491 45 57.5 57.5 0 -181 1 1 0 49.2154 58.4803 55.2411 -0.0784592 0.848029 0.52411 0.490491 45 57.5 57.5 0 -182 1 1 0 50 58.5065 55.2573 0 0.850651 0.525731 0.490491 45 57.5 57.5 0 -183 1 1 0 51.2119 57.3889 56.6284 0.121192 0.738887 0.662842 0.490491 45 57.5 57.5 0 -184 1 1 0 51.9933 57.2796 56.5601 0.199331 0.727959 0.656006 0.490491 45 57.5 57.5 0 -185 1 1 0 50.8114 57.802 56.2024 0.0811417 0.780205 0.620239 0.490491 45 57.5 57.5 0 -186 1 1 0 51.5961 57.7184 56.1546 0.159613 0.771841 0.615456 0.490491 45 57.5 57.5 0 -187 1 1 0 52.3709 57.5865 56.0683 0.237086 0.758652 0.606825 0.490491 45 57.5 57.5 0 -188 1 1 0 50.4067 58.1752 55.7446 0.040675 0.817523 0.574458 0.490491 45 57.5 57.5 0 -189 1 1 0 51.1908 58.1217 55.7114 0.119078 0.81217 0.57114 0.490491 45 57.5 57.5 0 -190 1 1 0 50.7846 58.4803 55.2411 0.0784592 0.848029 0.52411 0.490491 45 57.5 57.5 0 -191 1 1 0 51.5643 58.4018 55.1926 0.156434 0.840178 0.519259 0.490491 45 57.5 57.5 0 -192 1 1 0 51.9727 58.015 55.6451 0.197274 0.801504 0.564513 0.490491 45 57.5 57.5 0 -193 1 1 0 52.7371 57.8572 55.5474 0.273706 0.785715 0.55474 0.490491 45 57.5 57.5 0 -194 1 1 0 52.3345 58.2715 55.112 0.233445 0.827147 0.511205 0.490491 45 57.5 57.5 0 -195 1 1 0 53.0902 58.0902 55 0.309017 0.809017 0.5 0.490491 45 57.5 57.5 0 -196 1 1 0 49.5932 57.435 56.675 -0.0406769 0.743496 0.667502 0.490491 45 57.5 57.5 0 -197 1 1 0 50 57.8279 56.2229 0 0.782786 0.622291 0.490491 45 57.5 57.5 0 -198 1 1 0 50.4068 57.435 56.675 0.0406769 0.743496 0.667502 0.490491 45 57.5 57.5 0 -199 1 1 0 46.5715 58.2845 54.4287 -0.342848 0.828447 0.442867 0.490491 45 57.5 57.5 0 -200 1 1 0 47.2531 58.5264 54.4446 -0.274694 0.85264 0.444464 0.490491 45 57.5 57.5 0 -201 1 1 0 46.2496 58.4391 53.8361 -0.375038 0.843912 0.383614 0.490491 45 57.5 57.5 0 -202 1 1 0 46.9234 58.6973 53.8591 -0.307659 0.869725 0.385906 0.490491 45 57.5 57.5 0 -203 1 1 0 47.6132 58.9101 53.8619 -0.238677 0.891007 0.386187 0.490491 45 57.5 57.5 0 -204 1 1 0 45.9457 58.5534 53.2252 -0.405434 0.855337 0.322525 0.490491 45 57.5 57.5 0 -205 1 1 0 46.6079 58.8284 53.2486 -0.339209 0.882837 0.324863 0.490491 45 57.5 57.5 0 -206 1 1 0 45.6611 58.6267 52.5989 -0.433888 0.862669 0.259892 0.490491 45 57.5 57.5 0 -207 1 1 0 46.3148 58.9174 52.6266 -0.368518 0.891742 0.262661 0.490491 45 57.5 57.5 0 -208 1 1 0 46.9874 59.1624 52.6408 -0.301258 0.916244 0.264082 0.490491 45 57.5 57.5 0 -209 1 1 0 47.2937 59.0583 53.2593 -0.270627 0.905832 0.325929 0.490491 45 57.5 57.5 0 -210 1 1 0 47.9881 59.2388 53.2553 -0.201189 0.92388 0.32553 0.490491 45 57.5 57.5 0 -211 1 1 0 47.6755 59.3605 52.6415 -0.232455 0.93605 0.264151 0.490491 45 57.5 57.5 0 -212 1 1 0 48.3754 59.5106 52.6287 -0.16246 0.951057 0.262865 0.490491 45 57.5 57.5 0 -213 1 1 0 45.3973 58.6587 51.9602 -0.460266 0.865871 0.196015 0.490491 45 57.5 57.5 0 -214 1 1 0 46.0265 58.964 51.9641 -0.39735 0.896401 0.196412 0.490491 45 57.5 57.5 0 -215 1 1 0 45.1556 58.6493 51.312 -0.484441 0.864929 0.1312 0.490491 45 57.5 57.5 0 -216 1 1 0 45.7764 58.968 51.3175 -0.422363 0.896801 0.131749 0.490491 45 57.5 57.5 0 -217 1 1 0 46.4177 59.243 51.3166 -0.358229 0.924305 0.131656 0.490491 45 57.5 57.5 0 -218 1 1 0 44.937 58.5985 50.6576 -0.506298 0.859848 0.0657577 0.490491 45 57.5 57.5 0 -219 1 1 0 45.5463 58.9293 50.6582 -0.445365 0.892927 0.0658169 0.490491 45 57.5 57.5 0 -220 1 1 0 46.1828 59.2192 50.6599 -0.381722 0.921919 0.0659886 0.490491 45 57.5 57.5 0 -221 1 1 0 46.8322 59.462 50.6604 -0.316778 0.946198 0.0660427 0.490491 45 57.5 57.5 0 -222 1 1 0 48.0822 59.6119 51.9834 -0.19178 0.961188 0.198337 0.490491 45 57.5 57.5 0 -223 1 1 0 48.7727 59.7237 51.9858 -0.122729 0.97237 0.198581 0.490491 45 57.5 57.5 0 -224 1 1 0 47.7988 59.6639 51.3279 -0.220117 0.966393 0.132792 0.490491 45 57.5 57.5 0 -225 1 1 0 48.4845 59.7943 51.3326 -0.151549 0.979426 0.133256 0.490491 45 57.5 57.5 0 -226 1 1 0 49.1776 59.8769 51.3307 -0.0822422 0.987688 0.133071 0.490491 45 57.5 57.5 0 -227 1 1 0 47.5267 59.6664 50.6657 -0.247326 0.966643 0.0665668 0.490491 45 57.5 57.5 0 -228 1 1 0 48.204 59.8148 50.666 -0.179596 0.981483 0.0666046 0.490491 45 57.5 57.5 0 -229 1 1 0 48.8961 59.9165 50.6671 -0.110385 0.991648 0.0667095 0.490491 45 57.5 57.5 0 -230 1 1 0 49.5875 59.9692 50.6674 -0.0412479 0.996917 0.0667412 0.490491 45 57.5 57.5 0 -231 1 1 0 46.6939 59.2268 51.9839 -0.330606 0.922682 0.198387 0.490491 45 57.5 57.5 0 -232 1 1 0 47.1007 59.4782 51.3257 -0.289929 0.947822 0.13257 0.490491 45 57.5 57.5 0 -233 1 1 0 47.3845 59.4443 51.9909 -0.26155 0.944433 0.199094 0.490491 45 57.5 57.5 0 -234 1 1 0 52.7469 58.5264 54.4446 0.274694 0.85264 0.444464 0.490491 45 57.5 57.5 0 -235 1 1 0 53.4285 58.2845 54.4287 0.342848 0.828447 0.442867 0.490491 45 57.5 57.5 0 -236 1 1 0 52.3868 58.9101 53.8619 0.238677 0.891007 0.386187 0.490491 45 57.5 57.5 0 -237 1 1 0 53.0766 58.6973 53.8591 0.307659 0.869725 0.385906 0.490491 45 57.5 57.5 0 -238 1 1 0 53.7504 58.4391 53.8361 0.375038 0.843912 0.383614 0.490491 45 57.5 57.5 0 -239 1 1 0 52.0119 59.2388 53.2553 0.201189 0.92388 0.32553 0.490491 45 57.5 57.5 0 -240 1 1 0 52.7063 59.0583 53.2593 0.270627 0.905832 0.325929 0.490491 45 57.5 57.5 0 -241 1 1 0 51.6246 59.5106 52.6287 0.16246 0.951057 0.262865 0.490491 45 57.5 57.5 0 -242 1 1 0 52.3245 59.3605 52.6415 0.232455 0.93605 0.264151 0.490491 45 57.5 57.5 0 -243 1 1 0 53.0126 59.1624 52.6408 0.301258 0.916244 0.264082 0.490491 45 57.5 57.5 0 -244 1 1 0 53.3921 58.8284 53.2486 0.339209 0.882837 0.324863 0.490491 45 57.5 57.5 0 -245 1 1 0 54.0543 58.5534 53.2252 0.405434 0.855337 0.322525 0.490491 45 57.5 57.5 0 -246 1 1 0 53.6852 58.9174 52.6266 0.368518 0.891742 0.262661 0.490491 45 57.5 57.5 0 -247 1 1 0 54.3389 58.6267 52.5989 0.433888 0.862669 0.259892 0.490491 45 57.5 57.5 0 -248 1 1 0 51.2273 59.7237 51.9858 0.122729 0.97237 0.198581 0.490491 45 57.5 57.5 0 -249 1 1 0 51.9178 59.6119 51.9834 0.19178 0.961188 0.198337 0.490491 45 57.5 57.5 0 -250 1 1 0 50.8224 59.8769 51.3307 0.0822422 0.987688 0.133071 0.490491 45 57.5 57.5 0 -251 1 1 0 51.5155 59.7943 51.3326 0.151549 0.979426 0.133256 0.490491 45 57.5 57.5 0 -252 1 1 0 52.2012 59.6639 51.3279 0.220117 0.966393 0.132792 0.490491 45 57.5 57.5 0 -253 1 1 0 50.4125 59.9692 50.6674 0.0412479 0.996917 0.0667412 0.490491 45 57.5 57.5 0 -254 1 1 0 51.1039 59.9165 50.6671 0.110385 0.991648 0.0667095 0.490491 45 57.5 57.5 0 -255 1 1 0 51.796 59.8148 50.666 0.179596 0.981483 0.0666046 0.490491 45 57.5 57.5 0 -256 1 1 0 52.4733 59.6664 50.6657 0.247326 0.966643 0.0665668 0.490491 45 57.5 57.5 0 -257 1 1 0 53.9735 58.964 51.9641 0.39735 0.896401 0.196412 0.490491 45 57.5 57.5 0 -258 1 1 0 54.6027 58.6587 51.9602 0.460266 0.865871 0.196015 0.490491 45 57.5 57.5 0 -259 1 1 0 53.5823 59.243 51.3166 0.358229 0.924305 0.131656 0.490491 45 57.5 57.5 0 -260 1 1 0 54.2236 58.968 51.3175 0.422363 0.896801 0.131749 0.490491 45 57.5 57.5 0 -261 1 1 0 54.8444 58.6493 51.312 0.484441 0.864929 0.1312 0.490491 45 57.5 57.5 0 -262 1 1 0 53.1678 59.462 50.6604 0.316778 0.946198 0.0660427 0.490491 45 57.5 57.5 0 -263 1 1 0 53.8172 59.2192 50.6599 0.381722 0.921919 0.0659886 0.490491 45 57.5 57.5 0 -264 1 1 0 54.4537 58.9293 50.6582 0.445365 0.892927 0.0658169 0.490491 45 57.5 57.5 0 -265 1 1 0 55.063 58.5985 50.6576 0.506298 0.859848 0.0657577 0.490491 45 57.5 57.5 0 -266 1 1 0 52.6155 59.4443 51.9909 0.26155 0.944433 0.199094 0.490491 45 57.5 57.5 0 -267 1 1 0 52.8993 59.4782 51.3257 0.289929 0.947822 0.13257 0.490491 45 57.5 57.5 0 -268 1 1 0 53.3061 59.2268 51.9839 0.330606 0.922682 0.198387 0.490491 45 57.5 57.5 0 -269 1 1 0 48.0177 58.6853 54.5426 -0.198227 0.868535 0.454262 0.490491 45 57.5 57.5 0 -270 1 1 0 48.3899 59.0484 53.9414 -0.161007 0.904839 0.394136 0.490491 45 57.5 57.5 0 -271 1 1 0 48.772 59.3513 53.3234 -0.1228 0.93513 0.332342 0.490491 45 57.5 57.5 0 -272 1 1 0 49.1768 59.1298 53.9961 -0.0823235 0.912983 0.399607 0.490491 45 57.5 57.5 0 -273 1 1 0 48.8024 58.7934 54.6088 -0.119755 0.879344 0.460882 0.490491 45 57.5 57.5 0 -274 1 1 0 49.587 58.8476 54.6421 -0.0412991 0.88476 0.464213 0.490491 45 57.5 57.5 0 -275 1 1 0 49.185 59.6065 52.6552 -0.081501 0.960655 0.265519 0.490491 45 57.5 57.5 0 -276 1 1 0 49.5875 59.7885 52.0037 -0.0412506 0.978852 0.200368 0.490491 45 57.5 57.5 0 -277 1 1 0 50 59.6386 52.664 0 0.963861 0.266405 0.490491 45 57.5 57.5 0 -278 1 1 0 50 59.9105 51.3352 0 0.991046 0.133524 0.490491 45 57.5 57.5 0 -279 1 1 0 50.4125 59.7885 52.0037 0.0412506 0.978852 0.200368 0.490491 45 57.5 57.5 0 -280 1 1 0 50.815 59.6065 52.6552 0.081501 0.960655 0.265519 0.490491 45 57.5 57.5 0 -281 1 1 0 50.413 58.8476 54.6421 0.0412991 0.88476 0.464213 0.490491 45 57.5 57.5 0 -282 1 1 0 50.8232 59.1298 53.9961 0.0823235 0.912983 0.399607 0.490491 45 57.5 57.5 0 -283 1 1 0 51.1976 58.7934 54.6088 0.119755 0.879344 0.460882 0.490491 45 57.5 57.5 0 -284 1 1 0 51.228 59.3513 53.3234 0.1228 0.93513 0.332342 0.490491 45 57.5 57.5 0 -285 1 1 0 51.6101 59.0484 53.9414 0.161007 0.904839 0.394136 0.490491 45 57.5 57.5 0 -286 1 1 0 51.9823 58.6853 54.5426 0.198227 0.868535 0.454262 0.490491 45 57.5 57.5 0 -287 1 1 0 49.587 59.4162 53.3414 -0.0413021 0.941618 0.33414 0.490491 45 57.5 57.5 0 -288 1 1 0 50.413 59.4162 53.3414 0.0413021 0.941618 0.33414 0.490491 45 57.5 57.5 0 -289 1 1 0 50 59.1609 54.0097 0 0.916092 0.400968 0.490491 45 57.5 57.5 0 -290 1 1 0 50 54.6566 58.8497 0 0.465657 0.884965 0.490491 45 57.5 57.5 0 -291 1 1 0 49.3424 55.063 58.5985 -0.0657577 0.506298 0.859848 0.490491 45 57.5 57.5 0 -292 1 1 0 50 54.0336 59.1504 0 0.403355 0.915043 0.490491 45 57.5 57.5 0 -293 1 1 0 49.3418 54.4537 58.9293 -0.0658169 0.445365 0.892927 0.490491 45 57.5 57.5 0 -294 1 1 0 48.688 54.8444 58.6493 -0.1312 0.484441 0.864929 0.490491 45 57.5 57.5 0 -295 1 1 0 50 53.3912 59.4074 0 0.339122 0.940742 0.490491 45 57.5 57.5 0 -296 1 1 0 49.3401 53.8172 59.2192 -0.0659885 0.381722 0.921919 0.490491 45 57.5 57.5 0 -297 1 1 0 50 52.7327 59.6194 0 0.273267 0.961938 0.490491 45 57.5 57.5 0 -298 1 1 0 49.3396 53.1678 59.462 -0.0660427 0.316778 0.946198 0.490491 45 57.5 57.5 0 -299 1 1 0 48.6834 53.5823 59.243 -0.131656 0.358229 0.924305 0.490491 45 57.5 57.5 0 -300 1 1 0 48.6825 54.2236 58.968 -0.131749 0.422363 0.896801 0.490491 45 57.5 57.5 0 -301 1 1 0 48.0398 54.6027 58.6587 -0.196015 0.460266 0.865871 0.490491 45 57.5 57.5 0 -302 1 1 0 48.0359 53.9735 58.964 -0.196412 0.39735 0.896401 0.490491 45 57.5 57.5 0 -303 1 1 0 47.4011 54.3389 58.6267 -0.259892 0.433888 0.862669 0.490491 45 57.5 57.5 0 -304 1 1 0 50 52.061 59.7853 0 0.206103 0.97853 0.490491 45 57.5 57.5 0 -305 1 1 0 49.3343 52.4733 59.6664 -0.0665668 0.247326 0.966643 0.490491 45 57.5 57.5 0 -306 1 1 0 50 51.3795 59.9044 0 0.137952 0.990439 0.490491 45 57.5 57.5 0 -307 1 1 0 49.334 51.796 59.8148 -0.0666046 0.179596 0.981483 0.490491 45 57.5 57.5 0 -308 1 1 0 48.6721 52.2012 59.6639 -0.132792 0.220117 0.966393 0.490491 45 57.5 57.5 0 -309 1 1 0 50 50.6914 59.9761 0 0.0691418 0.997607 0.490491 45 57.5 57.5 0 -310 1 1 0 49.3329 51.1039 59.9165 -0.0667095 0.110385 0.991648 0.490491 45 57.5 57.5 0 -311 1 1 0 50 50 60 0 0 1 0.490491 45 57.5 57.5 0 -312 1 1 0 49.3326 50.4125 59.9692 -0.0667412 0.0412479 0.996917 0.490491 45 57.5 57.5 0 -313 1 1 0 48.6693 50.8224 59.8769 -0.133071 0.0822422 0.987688 0.490491 45 57.5 57.5 0 -314 1 1 0 48.6674 51.5155 59.7943 -0.133256 0.151549 0.979426 0.490491 45 57.5 57.5 0 -315 1 1 0 48.0166 51.9178 59.6119 -0.198337 0.19178 0.961188 0.490491 45 57.5 57.5 0 -316 1 1 0 48.0142 51.2273 59.7237 -0.198581 0.122729 0.97237 0.490491 45 57.5 57.5 0 -317 1 1 0 47.3713 51.6246 59.5106 -0.262865 0.16246 0.951057 0.490491 45 57.5 57.5 0 -318 1 1 0 47.3734 53.6852 58.9174 -0.262661 0.368518 0.891742 0.490491 45 57.5 57.5 0 -319 1 1 0 46.7748 54.0543 58.5534 -0.322525 0.405434 0.855337 0.490491 45 57.5 57.5 0 -320 1 1 0 47.3592 53.0126 59.1624 -0.264082 0.301258 0.916244 0.490491 45 57.5 57.5 0 -321 1 1 0 46.7514 53.3921 58.8284 -0.324863 0.339209 0.882837 0.490491 45 57.5 57.5 0 -322 1 1 0 46.1639 53.7504 58.4391 -0.383614 0.375038 0.843912 0.490491 45 57.5 57.5 0 -323 1 1 0 47.3585 52.3245 59.3605 -0.264151 0.232455 0.93605 0.490491 45 57.5 57.5 0 -324 1 1 0 46.7407 52.7063 59.0583 -0.325929 0.270627 0.905832 0.490491 45 57.5 57.5 0 -325 1 1 0 46.7447 52.0119 59.2388 -0.32553 0.201189 0.92388 0.490491 45 57.5 57.5 0 -326 1 1 0 46.1381 52.3868 58.9101 -0.386187 0.238677 0.891007 0.490491 45 57.5 57.5 0 -327 1 1 0 46.1409 53.0766 58.6973 -0.385906 0.307659 0.869725 0.490491 45 57.5 57.5 0 -328 1 1 0 45.5713 53.4285 58.2845 -0.442867 0.342848 0.828447 0.490491 45 57.5 57.5 0 -329 1 1 0 45.5554 52.7469 58.5264 -0.444464 0.274694 0.85264 0.490491 45 57.5 57.5 0 -330 1 1 0 45 53.0902 58.0902 -0.5 0.309017 0.809017 0.490491 45 57.5 57.5 0 -331 1 1 0 48.6743 52.8993 59.4782 -0.13257 0.289929 0.947822 0.490491 45 57.5 57.5 0 -332 1 1 0 48.0091 52.6155 59.4443 -0.199094 0.26155 0.944433 0.490491 45 57.5 57.5 0 -333 1 1 0 48.0161 53.3061 59.2268 -0.198387 0.330606 0.922682 0.490491 45 57.5 57.5 0 -334 1 1 0 50 49.3086 59.9761 0 -0.0691418 0.997607 0.490491 45 57.5 57.5 0 -335 1 1 0 49.3326 49.5875 59.9692 -0.0667412 -0.0412479 0.996917 0.490491 45 57.5 57.5 0 -336 1 1 0 50 48.6205 59.9044 0 -0.137952 0.990439 0.490491 45 57.5 57.5 0 -337 1 1 0 49.3329 48.8961 59.9165 -0.0667095 -0.110385 0.991648 0.490491 45 57.5 57.5 0 -338 1 1 0 48.6693 49.1776 59.8769 -0.133071 -0.0822422 0.987688 0.490491 45 57.5 57.5 0 -339 1 1 0 50 47.939 59.7853 0 -0.206103 0.97853 0.490491 45 57.5 57.5 0 -340 1 1 0 49.334 48.204 59.8148 -0.0666046 -0.179596 0.981483 0.490491 45 57.5 57.5 0 -341 1 1 0 50 47.2673 59.6194 0 -0.273267 0.961938 0.490491 45 57.5 57.5 0 -342 1 1 0 49.3343 47.5267 59.6664 -0.0665668 -0.247326 0.966643 0.490491 45 57.5 57.5 0 -343 1 1 0 48.6721 47.7988 59.6639 -0.132792 -0.220117 0.966393 0.490491 45 57.5 57.5 0 -344 1 1 0 48.6674 48.4845 59.7943 -0.133256 -0.151549 0.979426 0.490491 45 57.5 57.5 0 -345 1 1 0 48.0142 48.7727 59.7237 -0.198581 -0.122729 0.97237 0.490491 45 57.5 57.5 0 -346 1 1 0 48.0166 48.0822 59.6119 -0.198337 -0.19178 0.961188 0.490491 45 57.5 57.5 0 -347 1 1 0 47.3713 48.3754 59.5106 -0.262865 -0.16246 0.951057 0.490491 45 57.5 57.5 0 -348 1 1 0 50 46.6088 59.4074 0 -0.339122 0.940742 0.490491 45 57.5 57.5 0 -349 1 1 0 49.3396 46.8322 59.462 -0.0660427 -0.316778 0.946198 0.490491 45 57.5 57.5 0 -350 1 1 0 50 45.9664 59.1504 0 -0.403355 0.915043 0.490491 45 57.5 57.5 0 -351 1 1 0 49.3401 46.1828 59.2192 -0.0659885 -0.381722 0.921919 0.490491 45 57.5 57.5 0 -352 1 1 0 48.6834 46.4177 59.243 -0.131656 -0.358229 0.924305 0.490491 45 57.5 57.5 0 -353 1 1 0 50 45.3434 58.8497 0 -0.465657 0.884965 0.490491 45 57.5 57.5 0 -354 1 1 0 49.3418 45.5463 58.9293 -0.0658169 -0.445365 0.892927 0.490491 45 57.5 57.5 0 -355 1 1 0 50 44.7427 58.5065 0 -0.525731 0.850651 0.490491 45 57.5 57.5 0 -356 1 1 0 49.3424 44.937 58.5985 -0.0657577 -0.506298 0.859848 0.490491 45 57.5 57.5 0 -357 1 1 0 48.688 45.1556 58.6493 -0.1312 -0.484441 0.864929 0.490491 45 57.5 57.5 0 -358 1 1 0 48.6825 45.7764 58.968 -0.131749 -0.422363 0.896801 0.490491 45 57.5 57.5 0 -359 1 1 0 48.0359 46.0265 58.964 -0.196412 -0.39735 0.896401 0.490491 45 57.5 57.5 0 -360 1 1 0 48.0398 45.3973 58.6587 -0.196015 -0.460266 0.865871 0.490491 45 57.5 57.5 0 -361 1 1 0 47.4011 45.6611 58.6267 -0.259892 -0.433888 0.862669 0.490491 45 57.5 57.5 0 -362 1 1 0 47.3585 47.6755 59.3605 -0.264151 -0.232455 0.93605 0.490491 45 57.5 57.5 0 -363 1 1 0 46.7447 47.9881 59.2388 -0.32553 -0.201189 0.92388 0.490491 45 57.5 57.5 0 -364 1 1 0 47.3592 46.9874 59.1624 -0.264082 -0.301258 0.916244 0.490491 45 57.5 57.5 0 -365 1 1 0 46.7407 47.2937 59.0583 -0.325929 -0.270627 0.905832 0.490491 45 57.5 57.5 0 -366 1 1 0 46.1381 47.6132 58.9101 -0.386187 -0.238677 0.891007 0.490491 45 57.5 57.5 0 -367 1 1 0 47.3734 46.3148 58.9174 -0.262661 -0.368518 0.891742 0.490491 45 57.5 57.5 0 -368 1 1 0 46.7514 46.6079 58.8284 -0.324863 -0.339209 0.882837 0.490491 45 57.5 57.5 0 -369 1 1 0 46.7748 45.9457 58.5534 -0.322525 -0.405434 0.855337 0.490491 45 57.5 57.5 0 -370 1 1 0 46.1639 46.2496 58.4391 -0.383614 -0.375038 0.843912 0.490491 45 57.5 57.5 0 -371 1 1 0 46.1409 46.9234 58.6973 -0.385906 -0.307659 0.869725 0.490491 45 57.5 57.5 0 -372 1 1 0 45.5554 47.2531 58.5264 -0.444464 -0.274694 0.85264 0.490491 45 57.5 57.5 0 -373 1 1 0 45.5713 46.5715 58.2845 -0.442867 -0.342848 0.828447 0.490491 45 57.5 57.5 0 -374 1 1 0 45 46.9098 58.0902 -0.5 -0.309017 0.809017 0.490491 45 57.5 57.5 0 -375 1 1 0 48.6743 47.1007 59.4782 -0.13257 -0.289929 0.947822 0.490491 45 57.5 57.5 0 -376 1 1 0 48.0161 46.6939 59.2268 -0.198387 -0.330606 0.922682 0.490491 45 57.5 57.5 0 -377 1 1 0 48.0091 47.3845 59.4443 -0.199094 -0.26155 0.944433 0.490491 45 57.5 57.5 0 -378 1 1 0 44.888 52.3345 58.2715 -0.511205 0.233445 0.827147 0.490491 45 57.5 57.5 0 -379 1 1 0 44.4526 52.7371 57.8572 -0.55474 0.273706 0.785715 0.490491 45 57.5 57.5 0 -380 1 1 0 44.8074 51.5643 58.4018 -0.519259 0.156434 0.840178 0.490491 45 57.5 57.5 0 -381 1 1 0 44.3549 51.9727 58.015 -0.564513 0.197274 0.801504 0.490491 45 57.5 57.5 0 -382 1 1 0 43.9317 52.3709 57.5865 -0.606825 0.237086 0.758652 0.490491 45 57.5 57.5 0 -383 1 1 0 44.7589 50.7846 58.4803 -0.52411 0.0784592 0.848029 0.490491 45 57.5 57.5 0 -384 1 1 0 44.2886 51.1908 58.1217 -0.57114 0.119078 0.81217 0.490491 45 57.5 57.5 0 -385 1 1 0 44.7427 50 58.5065 -0.525731 0 0.850651 0.490491 45 57.5 57.5 0 -386 1 1 0 44.2554 50.4067 58.1752 -0.574458 0.040675 0.817523 0.490491 45 57.5 57.5 0 -387 1 1 0 43.7976 50.8114 57.802 -0.620239 0.0811417 0.780205 0.490491 45 57.5 57.5 0 -388 1 1 0 43.8454 51.5961 57.7184 -0.615456 0.159613 0.771841 0.490491 45 57.5 57.5 0 -389 1 1 0 43.4399 51.9933 57.2796 -0.656006 0.199331 0.727959 0.490491 45 57.5 57.5 0 -390 1 1 0 43.3716 51.2119 57.3889 -0.662842 0.121192 0.738887 0.490491 45 57.5 57.5 0 -391 1 1 0 42.9795 51.6062 56.9378 -0.702047 0.160622 0.69378 0.490491 45 57.5 57.5 0 -392 1 1 0 44.7589 49.2154 58.4803 -0.52411 -0.0784592 0.848029 0.490491 45 57.5 57.5 0 -393 1 1 0 44.2554 49.5933 58.1752 -0.574458 -0.040675 0.817523 0.490491 45 57.5 57.5 0 -394 1 1 0 44.8074 48.4357 58.4018 -0.519259 -0.156434 0.840178 0.490491 45 57.5 57.5 0 -395 1 1 0 44.2886 48.8092 58.1217 -0.57114 -0.119078 0.81217 0.490491 45 57.5 57.5 0 -396 1 1 0 43.7976 49.1886 57.802 -0.620239 -0.0811417 0.780205 0.490491 45 57.5 57.5 0 -397 1 1 0 44.888 47.6655 58.2715 -0.511205 -0.233445 0.827147 0.490491 45 57.5 57.5 0 -398 1 1 0 44.3549 48.0273 58.015 -0.564513 -0.197274 0.801504 0.490491 45 57.5 57.5 0 -399 1 1 0 44.4526 47.2629 57.8572 -0.55474 -0.273706 0.785715 0.490491 45 57.5 57.5 0 -400 1 1 0 43.9317 47.6291 57.5865 -0.606825 -0.237086 0.758652 0.490491 45 57.5 57.5 0 -401 1 1 0 43.8454 48.4039 57.7184 -0.615456 -0.159613 0.771841 0.490491 45 57.5 57.5 0 -402 1 1 0 43.3716 48.7881 57.3889 -0.662842 -0.121192 0.738887 0.490491 45 57.5 57.5 0 -403 1 1 0 43.4399 48.0067 57.2796 -0.656006 -0.199331 0.727959 0.490491 45 57.5 57.5 0 -404 1 1 0 42.9795 48.3938 56.9378 -0.702047 -0.160622 0.69378 0.490491 45 57.5 57.5 0 -405 1 1 0 42.9103 50.8057 57.0062 -0.708969 0.0805729 0.700622 0.490491 45 57.5 57.5 0 -406 1 1 0 42.5527 51.2114 56.5628 -0.744727 0.121144 0.656282 0.490491 45 57.5 57.5 0 -407 1 1 0 42.8872 50 57.0291 -0.711282 0 0.702907 0.490491 45 57.5 57.5 0 -408 1 1 0 42.5061 50.4064 56.6088 -0.749387 0.0406418 0.660883 0.490491 45 57.5 57.5 0 -409 1 1 0 42.1616 50.8109 56.1564 -0.783843 0.081086 0.615642 0.490491 45 57.5 57.5 0 -410 1 1 0 42.9103 49.1943 57.0062 -0.708969 -0.0805729 0.700622 0.490491 45 57.5 57.5 0 -411 1 1 0 42.5061 49.5936 56.6088 -0.749387 -0.0406418 0.660883 0.490491 45 57.5 57.5 0 -412 1 1 0 42.5527 48.7886 56.5628 -0.744727 -0.121144 0.656282 0.490491 45 57.5 57.5 0 -413 1 1 0 42.1616 49.1891 56.1564 -0.783843 -0.081086 0.615642 0.490491 45 57.5 57.5 0 -414 1 1 0 42.1357 50 56.1768 -0.786433 0 0.617676 0.490491 45 57.5 57.5 0 -415 1 1 0 41.8079 50.4064 55.7206 -0.819207 0.0406403 0.572055 0.490491 45 57.5 57.5 0 -416 1 1 0 41.8079 49.5936 55.7206 -0.819207 -0.0406403 0.572055 0.490491 45 57.5 57.5 0 -417 1 1 0 41.4935 50 55.2573 -0.850651 0 0.525731 0.490491 45 57.5 57.5 0 -418 1 1 0 43.7771 50 57.8279 -0.622291 0 0.782786 0.490491 45 57.5 57.5 0 -419 1 1 0 43.325 49.5932 57.435 -0.667502 -0.0406769 0.743496 0.490491 45 57.5 57.5 0 -420 1 1 0 43.325 50.4068 57.435 -0.667502 0.0406769 0.743496 0.490491 45 57.5 57.5 0 -421 1 1 0 48.6648 50 59.9105 -0.133524 0 0.991046 0.490491 45 57.5 57.5 0 -422 1 1 0 47.9963 49.5875 59.7885 -0.200368 -0.0412506 0.978852 0.490491 45 57.5 57.5 0 -423 1 1 0 47.3448 49.185 59.6065 -0.265519 -0.081501 0.960655 0.490491 45 57.5 57.5 0 -424 1 1 0 47.336 50 59.6386 -0.266405 0 0.963861 0.490491 45 57.5 57.5 0 -425 1 1 0 47.9963 50.4125 59.7885 -0.200368 0.0412506 0.978852 0.490491 45 57.5 57.5 0 -426 1 1 0 47.3448 50.815 59.6065 -0.265519 0.081501 0.960655 0.490491 45 57.5 57.5 0 -427 1 1 0 46.6766 48.772 59.3513 -0.332342 -0.1228 0.93513 0.490491 45 57.5 57.5 0 -428 1 1 0 46.0586 48.3899 59.0484 -0.394136 -0.161007 0.904839 0.490491 45 57.5 57.5 0 -429 1 1 0 46.0039 49.1768 59.1298 -0.399607 -0.0823235 0.912983 0.490491 45 57.5 57.5 0 -430 1 1 0 45.4574 48.0177 58.6853 -0.454262 -0.198227 0.868535 0.490491 45 57.5 57.5 0 -431 1 1 0 45.3912 48.8024 58.7934 -0.460882 -0.119755 0.879344 0.490491 45 57.5 57.5 0 -432 1 1 0 45.3579 49.587 58.8476 -0.464213 -0.0412991 0.88476 0.490491 45 57.5 57.5 0 -433 1 1 0 46.6766 51.228 59.3513 -0.332342 0.1228 0.93513 0.490491 45 57.5 57.5 0 -434 1 1 0 46.0039 50.8232 59.1298 -0.399607 0.0823235 0.912983 0.490491 45 57.5 57.5 0 -435 1 1 0 46.0586 51.6101 59.0484 -0.394136 0.161007 0.904839 0.490491 45 57.5 57.5 0 -436 1 1 0 45.3579 50.413 58.8476 -0.464213 0.0412991 0.88476 0.490491 45 57.5 57.5 0 -437 1 1 0 45.3912 51.1976 58.7934 -0.460882 0.119755 0.879344 0.490491 45 57.5 57.5 0 -438 1 1 0 45.4574 51.9823 58.6853 -0.454262 0.198227 0.868535 0.490491 45 57.5 57.5 0 -439 1 1 0 46.6586 49.587 59.4162 -0.33414 -0.0413021 0.941618 0.490491 45 57.5 57.5 0 -440 1 1 0 45.9903 50 59.1609 -0.400968 0 0.916092 0.490491 45 57.5 57.5 0 -441 1 1 0 46.6586 50.413 59.4162 -0.33414 0.0413021 0.941618 0.490491 45 57.5 57.5 0 -442 1 1 0 50.6576 55.063 58.5985 0.0657577 0.506298 0.859848 0.490491 45 57.5 57.5 0 -443 1 1 0 51.312 54.8444 58.6493 0.1312 0.484441 0.864929 0.490491 45 57.5 57.5 0 -444 1 1 0 50.6582 54.4537 58.9293 0.0658169 0.445365 0.892927 0.490491 45 57.5 57.5 0 -445 1 1 0 51.9602 54.6027 58.6587 0.196015 0.460266 0.865871 0.490491 45 57.5 57.5 0 -446 1 1 0 51.3175 54.2236 58.968 0.131749 0.422363 0.896801 0.490491 45 57.5 57.5 0 -447 1 1 0 52.5989 54.3389 58.6267 0.259892 0.433888 0.862669 0.490491 45 57.5 57.5 0 -448 1 1 0 51.9641 53.9735 58.964 0.196412 0.39735 0.896401 0.490491 45 57.5 57.5 0 -449 1 1 0 51.3166 53.5823 59.243 0.131656 0.358229 0.924305 0.490491 45 57.5 57.5 0 -450 1 1 0 50.6599 53.8172 59.2192 0.0659885 0.381722 0.921919 0.490491 45 57.5 57.5 0 -451 1 1 0 50.6604 53.1678 59.462 0.0660427 0.316778 0.946198 0.490491 45 57.5 57.5 0 -452 1 1 0 53.2252 54.0543 58.5534 0.322525 0.405434 0.855337 0.490491 45 57.5 57.5 0 -453 1 1 0 52.6266 53.6852 58.9174 0.262661 0.368518 0.891742 0.490491 45 57.5 57.5 0 -454 1 1 0 53.8361 53.7504 58.4391 0.383614 0.375038 0.843912 0.490491 45 57.5 57.5 0 -455 1 1 0 53.2486 53.3921 58.8284 0.324863 0.339209 0.882837 0.490491 45 57.5 57.5 0 -456 1 1 0 52.6408 53.0126 59.1624 0.264082 0.301258 0.916244 0.490491 45 57.5 57.5 0 -457 1 1 0 54.4287 53.4285 58.2845 0.442867 0.342848 0.828447 0.490491 45 57.5 57.5 0 -458 1 1 0 53.8591 53.0766 58.6973 0.385906 0.307659 0.869725 0.490491 45 57.5 57.5 0 -459 1 1 0 55 53.0902 58.0902 0.5 0.309017 0.809017 0.490491 45 57.5 57.5 0 -460 1 1 0 54.4446 52.7469 58.5264 0.444464 0.274694 0.85264 0.490491 45 57.5 57.5 0 -461 1 1 0 53.8619 52.3868 58.9101 0.386187 0.238677 0.891007 0.490491 45 57.5 57.5 0 -462 1 1 0 53.2593 52.7063 59.0583 0.325929 0.270627 0.905832 0.490491 45 57.5 57.5 0 -463 1 1 0 52.6415 52.3245 59.3605 0.264151 0.232455 0.93605 0.490491 45 57.5 57.5 0 -464 1 1 0 53.2553 52.0119 59.2388 0.32553 0.201189 0.92388 0.490491 45 57.5 57.5 0 -465 1 1 0 52.6287 51.6246 59.5106 0.262865 0.16246 0.951057 0.490491 45 57.5 57.5 0 -466 1 1 0 50.6657 52.4733 59.6664 0.0665668 0.247326 0.966643 0.490491 45 57.5 57.5 0 -467 1 1 0 51.3279 52.2012 59.6639 0.132792 0.220117 0.966393 0.490491 45 57.5 57.5 0 -468 1 1 0 50.666 51.796 59.8148 0.0666046 0.179596 0.981483 0.490491 45 57.5 57.5 0 -469 1 1 0 51.9834 51.9178 59.6119 0.198337 0.19178 0.961188 0.490491 45 57.5 57.5 0 -470 1 1 0 51.3326 51.5155 59.7943 0.133256 0.151549 0.979426 0.490491 45 57.5 57.5 0 -471 1 1 0 51.9858 51.2273 59.7237 0.198581 0.122729 0.97237 0.490491 45 57.5 57.5 0 -472 1 1 0 51.3307 50.8224 59.8769 0.133071 0.0822422 0.987688 0.490491 45 57.5 57.5 0 -473 1 1 0 50.6671 51.1039 59.9165 0.0667095 0.110385 0.991648 0.490491 45 57.5 57.5 0 -474 1 1 0 50.6674 50.4125 59.9692 0.0667412 0.0412479 0.996917 0.490491 45 57.5 57.5 0 -475 1 1 0 51.9839 53.3061 59.2268 0.198387 0.330606 0.922682 0.490491 45 57.5 57.5 0 -476 1 1 0 51.9909 52.6155 59.4443 0.199094 0.26155 0.944433 0.490491 45 57.5 57.5 0 -477 1 1 0 51.3257 52.8993 59.4782 0.13257 0.289929 0.947822 0.490491 45 57.5 57.5 0 -478 1 1 0 55.5474 52.7371 57.8572 0.55474 0.273706 0.785715 0.490491 45 57.5 57.5 0 -479 1 1 0 55.112 52.3345 58.2715 0.511205 0.233445 0.827147 0.490491 45 57.5 57.5 0 -480 1 1 0 56.0683 52.3709 57.5865 0.606825 0.237086 0.758652 0.490491 45 57.5 57.5 0 -481 1 1 0 55.6451 51.9727 58.015 0.564513 0.197274 0.801504 0.490491 45 57.5 57.5 0 -482 1 1 0 55.1926 51.5643 58.4018 0.519259 0.156434 0.840178 0.490491 45 57.5 57.5 0 -483 1 1 0 56.5601 51.9933 57.2796 0.656006 0.199331 0.727959 0.490491 45 57.5 57.5 0 -484 1 1 0 56.1546 51.5961 57.7184 0.615456 0.159613 0.771841 0.490491 45 57.5 57.5 0 -485 1 1 0 57.0205 51.6062 56.9378 0.702047 0.160622 0.69378 0.490491 45 57.5 57.5 0 -486 1 1 0 56.6284 51.2119 57.3889 0.662842 0.121192 0.738887 0.490491 45 57.5 57.5 0 -487 1 1 0 56.2024 50.8114 57.802 0.620239 0.0811417 0.780205 0.490491 45 57.5 57.5 0 -488 1 1 0 55.7114 51.1908 58.1217 0.57114 0.119078 0.81217 0.490491 45 57.5 57.5 0 -489 1 1 0 55.2411 50.7846 58.4803 0.52411 0.0784592 0.848029 0.490491 45 57.5 57.5 0 -490 1 1 0 55.7446 50.4067 58.1752 0.574458 0.040675 0.817523 0.490491 45 57.5 57.5 0 -491 1 1 0 55.2573 50 58.5065 0.525731 0 0.850651 0.490491 45 57.5 57.5 0 -492 1 1 0 57.4473 51.2114 56.5628 0.744727 0.121144 0.656282 0.490491 45 57.5 57.5 0 -493 1 1 0 57.0897 50.8057 57.0062 0.708969 0.0805729 0.700622 0.490491 45 57.5 57.5 0 -494 1 1 0 57.8384 50.8109 56.1564 0.783843 0.081086 0.615642 0.490491 45 57.5 57.5 0 -495 1 1 0 57.4939 50.4064 56.6088 0.749387 0.0406418 0.660883 0.490491 45 57.5 57.5 0 -496 1 1 0 57.1128 50 57.0291 0.711282 0 0.702907 0.490491 45 57.5 57.5 0 -497 1 1 0 58.1921 50.4064 55.7206 0.819207 0.0406403 0.572055 0.490491 45 57.5 57.5 0 -498 1 1 0 57.8643 50 56.1768 0.786433 0 0.617676 0.490491 45 57.5 57.5 0 -499 1 1 0 58.5065 50 55.2573 0.850651 0 0.525731 0.490491 45 57.5 57.5 0 -500 1 1 0 58.1921 49.5936 55.7206 0.819207 -0.0406403 0.572055 0.490491 45 57.5 57.5 0 -501 1 1 0 57.8384 49.1891 56.1564 0.783843 -0.081086 0.615642 0.490491 45 57.5 57.5 0 -502 1 1 0 57.4939 49.5936 56.6088 0.749387 -0.0406418 0.660883 0.490491 45 57.5 57.5 0 -503 1 1 0 57.0897 49.1943 57.0062 0.708969 -0.0805729 0.700622 0.490491 45 57.5 57.5 0 -504 1 1 0 57.4473 48.7886 56.5628 0.744727 -0.121144 0.656282 0.490491 45 57.5 57.5 0 -505 1 1 0 57.0205 48.3938 56.9378 0.702047 -0.160622 0.69378 0.490491 45 57.5 57.5 0 -506 1 1 0 55.7446 49.5933 58.1752 0.574458 -0.040675 0.817523 0.490491 45 57.5 57.5 0 -507 1 1 0 55.2411 49.2154 58.4803 0.52411 -0.0784592 0.848029 0.490491 45 57.5 57.5 0 -508 1 1 0 56.2024 49.1886 57.802 0.620239 -0.0811417 0.780205 0.490491 45 57.5 57.5 0 -509 1 1 0 55.7114 48.8092 58.1217 0.57114 -0.119078 0.81217 0.490491 45 57.5 57.5 0 -510 1 1 0 55.1926 48.4357 58.4018 0.519259 -0.156434 0.840178 0.490491 45 57.5 57.5 0 -511 1 1 0 56.6284 48.7881 57.3889 0.662842 -0.121192 0.738887 0.490491 45 57.5 57.5 0 -512 1 1 0 56.1546 48.4039 57.7184 0.615456 -0.159613 0.771841 0.490491 45 57.5 57.5 0 -513 1 1 0 56.5601 48.0067 57.2796 0.656006 -0.199331 0.727959 0.490491 45 57.5 57.5 0 -514 1 1 0 56.0683 47.6291 57.5865 0.606825 -0.237086 0.758652 0.490491 45 57.5 57.5 0 -515 1 1 0 55.6451 48.0273 58.015 0.564513 -0.197274 0.801504 0.490491 45 57.5 57.5 0 -516 1 1 0 55.112 47.6655 58.2715 0.511205 -0.233445 0.827147 0.490491 45 57.5 57.5 0 -517 1 1 0 55.5474 47.2629 57.8572 0.55474 -0.273706 0.785715 0.490491 45 57.5 57.5 0 -518 1 1 0 55 46.9098 58.0902 0.5 -0.309017 0.809017 0.490491 45 57.5 57.5 0 -519 1 1 0 56.675 50.4068 57.435 0.667502 0.0406769 0.743496 0.490491 45 57.5 57.5 0 -520 1 1 0 56.675 49.5932 57.435 0.667502 -0.0406769 0.743496 0.490491 45 57.5 57.5 0 -521 1 1 0 56.2229 50 57.8279 0.622291 0 0.782786 0.490491 45 57.5 57.5 0 -522 1 1 0 50.6674 49.5875 59.9692 0.0667412 -0.0412479 0.996917 0.490491 45 57.5 57.5 0 -523 1 1 0 51.3307 49.1776 59.8769 0.133071 -0.0822422 0.987688 0.490491 45 57.5 57.5 0 -524 1 1 0 50.6671 48.8961 59.9165 0.0667095 -0.110385 0.991648 0.490491 45 57.5 57.5 0 -525 1 1 0 51.9858 48.7727 59.7237 0.198581 -0.122729 0.97237 0.490491 45 57.5 57.5 0 -526 1 1 0 51.3326 48.4845 59.7943 0.133256 -0.151549 0.979426 0.490491 45 57.5 57.5 0 -527 1 1 0 52.6287 48.3754 59.5106 0.262865 -0.16246 0.951057 0.490491 45 57.5 57.5 0 -528 1 1 0 51.9834 48.0822 59.6119 0.198337 -0.19178 0.961188 0.490491 45 57.5 57.5 0 -529 1 1 0 51.3279 47.7988 59.6639 0.132792 -0.220117 0.966393 0.490491 45 57.5 57.5 0 -530 1 1 0 50.666 48.204 59.8148 0.0666046 -0.179596 0.981483 0.490491 45 57.5 57.5 0 -531 1 1 0 50.6657 47.5267 59.6664 0.0665668 -0.247326 0.966643 0.490491 45 57.5 57.5 0 -532 1 1 0 53.2553 47.9881 59.2388 0.32553 -0.201189 0.92388 0.490491 45 57.5 57.5 0 -533 1 1 0 52.6415 47.6755 59.3605 0.264151 -0.232455 0.93605 0.490491 45 57.5 57.5 0 -534 1 1 0 53.8619 47.6132 58.9101 0.386187 -0.238677 0.891007 0.490491 45 57.5 57.5 0 -535 1 1 0 53.2593 47.2937 59.0583 0.325929 -0.270627 0.905832 0.490491 45 57.5 57.5 0 -536 1 1 0 52.6408 46.9874 59.1624 0.264082 -0.301258 0.916244 0.490491 45 57.5 57.5 0 -537 1 1 0 54.4446 47.2531 58.5264 0.444464 -0.274694 0.85264 0.490491 45 57.5 57.5 0 -538 1 1 0 53.8591 46.9234 58.6973 0.385906 -0.307659 0.869725 0.490491 45 57.5 57.5 0 -539 1 1 0 54.4287 46.5715 58.2845 0.442867 -0.342848 0.828447 0.490491 45 57.5 57.5 0 -540 1 1 0 53.8361 46.2496 58.4391 0.383614 -0.375038 0.843912 0.490491 45 57.5 57.5 0 -541 1 1 0 53.2486 46.6079 58.8284 0.324863 -0.339209 0.882837 0.490491 45 57.5 57.5 0 -542 1 1 0 52.6266 46.3148 58.9174 0.262661 -0.368518 0.891742 0.490491 45 57.5 57.5 0 -543 1 1 0 53.2252 45.9457 58.5534 0.322525 -0.405434 0.855337 0.490491 45 57.5 57.5 0 -544 1 1 0 52.5989 45.6611 58.6267 0.259892 -0.433888 0.862669 0.490491 45 57.5 57.5 0 -545 1 1 0 50.6604 46.8322 59.462 0.0660427 -0.316778 0.946198 0.490491 45 57.5 57.5 0 -546 1 1 0 51.3166 46.4177 59.243 0.131656 -0.358229 0.924305 0.490491 45 57.5 57.5 0 -547 1 1 0 50.6599 46.1828 59.2192 0.0659885 -0.381722 0.921919 0.490491 45 57.5 57.5 0 -548 1 1 0 51.9641 46.0265 58.964 0.196412 -0.39735 0.896401 0.490491 45 57.5 57.5 0 -549 1 1 0 51.3175 45.7764 58.968 0.131749 -0.422363 0.896801 0.490491 45 57.5 57.5 0 -550 1 1 0 51.9602 45.3973 58.6587 0.196015 -0.460266 0.865871 0.490491 45 57.5 57.5 0 -551 1 1 0 51.312 45.1556 58.6493 0.1312 -0.484441 0.864929 0.490491 45 57.5 57.5 0 -552 1 1 0 50.6582 45.5463 58.9293 0.0658169 -0.445365 0.892927 0.490491 45 57.5 57.5 0 -553 1 1 0 50.6576 44.937 58.5985 0.0657577 -0.506298 0.859848 0.490491 45 57.5 57.5 0 -554 1 1 0 51.9909 47.3845 59.4443 0.199094 -0.26155 0.944433 0.490491 45 57.5 57.5 0 -555 1 1 0 51.9839 46.6939 59.2268 0.198387 -0.330606 0.922682 0.490491 45 57.5 57.5 0 -556 1 1 0 51.3257 47.1007 59.4782 0.13257 -0.289929 0.947822 0.490491 45 57.5 57.5 0 -557 1 1 0 54.5426 51.9823 58.6853 0.454262 0.198227 0.868535 0.490491 45 57.5 57.5 0 -558 1 1 0 54.6088 51.1976 58.7934 0.460882 0.119755 0.879344 0.490491 45 57.5 57.5 0 -559 1 1 0 54.6421 50.413 58.8476 0.464213 0.0412991 0.88476 0.490491 45 57.5 57.5 0 -560 1 1 0 53.9961 50.8232 59.1298 0.399607 0.0823235 0.912983 0.490491 45 57.5 57.5 0 -561 1 1 0 53.9414 51.6101 59.0484 0.394136 0.161007 0.904839 0.490491 45 57.5 57.5 0 -562 1 1 0 53.3234 51.228 59.3513 0.332342 0.1228 0.93513 0.490491 45 57.5 57.5 0 -563 1 1 0 54.6421 49.587 58.8476 0.464213 -0.0412991 0.88476 0.490491 45 57.5 57.5 0 -564 1 1 0 54.6088 48.8024 58.7934 0.460882 -0.119755 0.879344 0.490491 45 57.5 57.5 0 -565 1 1 0 53.9961 49.1768 59.1298 0.399607 -0.0823235 0.912983 0.490491 45 57.5 57.5 0 -566 1 1 0 54.5426 48.0177 58.6853 0.454262 -0.198227 0.868535 0.490491 45 57.5 57.5 0 -567 1 1 0 53.9414 48.3899 59.0484 0.394136 -0.161007 0.904839 0.490491 45 57.5 57.5 0 -568 1 1 0 53.3234 48.772 59.3513 0.332342 -0.1228 0.93513 0.490491 45 57.5 57.5 0 -569 1 1 0 52.6552 50.815 59.6065 0.265519 0.081501 0.960655 0.490491 45 57.5 57.5 0 -570 1 1 0 52.664 50 59.6386 0.266405 0 0.963861 0.490491 45 57.5 57.5 0 -571 1 1 0 52.0037 50.4125 59.7885 0.200368 0.0412506 0.978852 0.490491 45 57.5 57.5 0 -572 1 1 0 52.6552 49.185 59.6065 0.265519 -0.081501 0.960655 0.490491 45 57.5 57.5 0 -573 1 1 0 52.0037 49.5875 59.7885 0.200368 -0.0412506 0.978852 0.490491 45 57.5 57.5 0 -574 1 1 0 51.3352 50 59.9105 0.133524 0 0.991046 0.490491 45 57.5 57.5 0 -575 1 1 0 54.0097 50 59.1609 0.400968 0 0.916092 0.490491 45 57.5 57.5 0 -576 1 1 0 53.3414 49.587 59.4162 0.33414 -0.0413021 0.941618 0.490491 45 57.5 57.5 0 -577 1 1 0 53.3414 50.413 59.4162 0.33414 0.0413021 0.941618 0.490491 45 57.5 57.5 0 -578 1 1 0 50 54.6566 41.1503 0 0.465657 -0.884965 0.490491 45 57.5 57.5 0 -579 1 1 0 50.6576 55.063 41.4015 0.0657577 0.506298 -0.859848 0.490491 45 57.5 57.5 0 -580 1 1 0 50 54.0336 40.8496 0 0.403355 -0.915043 0.490491 45 57.5 57.5 0 -581 1 1 0 50.6582 54.4537 41.0707 0.0658169 0.445365 -0.892927 0.490491 45 57.5 57.5 0 -582 1 1 0 51.312 54.8444 41.3507 0.1312 0.484441 -0.864929 0.490491 45 57.5 57.5 0 -583 1 1 0 50 53.3912 40.5926 0 0.339122 -0.940742 0.490491 45 57.5 57.5 0 -584 1 1 0 50.6599 53.8172 40.7808 0.0659885 0.381722 -0.921919 0.490491 45 57.5 57.5 0 -585 1 1 0 50 52.7327 40.3806 0 0.273267 -0.961938 0.490491 45 57.5 57.5 0 -586 1 1 0 50.6604 53.1678 40.538 0.0660427 0.316778 -0.946198 0.490491 45 57.5 57.5 0 -587 1 1 0 51.3166 53.5823 40.757 0.131656 0.358229 -0.924305 0.490491 45 57.5 57.5 0 -588 1 1 0 51.3175 54.2236 41.032 0.131749 0.422363 -0.896801 0.490491 45 57.5 57.5 0 -589 1 1 0 51.9602 54.6027 41.3413 0.196015 0.460266 -0.865871 0.490491 45 57.5 57.5 0 -590 1 1 0 51.9641 53.9735 41.036 0.196412 0.39735 -0.896401 0.490491 45 57.5 57.5 0 -591 1 1 0 52.5989 54.3389 41.3733 0.259892 0.433888 -0.862669 0.490491 45 57.5 57.5 0 -592 1 1 0 50 52.061 40.2147 0 0.206103 -0.97853 0.490491 45 57.5 57.5 0 -593 1 1 0 50.6657 52.4733 40.3336 0.0665668 0.247326 -0.966643 0.490491 45 57.5 57.5 0 -594 1 1 0 50 51.3795 40.0956 0 0.137952 -0.990439 0.490491 45 57.5 57.5 0 -595 1 1 0 50.666 51.796 40.1852 0.0666046 0.179596 -0.981483 0.490491 45 57.5 57.5 0 -596 1 1 0 51.3279 52.2012 40.3361 0.132792 0.220117 -0.966393 0.490491 45 57.5 57.5 0 -597 1 1 0 50 50.6914 40.0239 0 0.0691418 -0.997607 0.490491 45 57.5 57.5 0 -598 1 1 0 50.6671 51.1039 40.0835 0.0667095 0.110385 -0.991648 0.490491 45 57.5 57.5 0 -599 1 1 0 50 50 40 0 0 -1 0.490491 45 57.5 57.5 0 -600 1 1 0 50.6674 50.4125 40.0308 0.0667412 0.0412479 -0.996917 0.490491 45 57.5 57.5 0 -601 1 1 0 51.3307 50.8224 40.1231 0.133071 0.0822422 -0.987688 0.490491 45 57.5 57.5 0 -602 1 1 0 51.3326 51.5155 40.2057 0.133256 0.151549 -0.979426 0.490491 45 57.5 57.5 0 -603 1 1 0 51.9834 51.9178 40.3881 0.198337 0.19178 -0.961188 0.490491 45 57.5 57.5 0 -604 1 1 0 51.9858 51.2273 40.2763 0.198581 0.122729 -0.97237 0.490491 45 57.5 57.5 0 -605 1 1 0 52.6287 51.6246 40.4894 0.262865 0.16246 -0.951057 0.490491 45 57.5 57.5 0 -606 1 1 0 52.6266 53.6852 41.0826 0.262661 0.368518 -0.891742 0.490491 45 57.5 57.5 0 -607 1 1 0 53.2252 54.0543 41.4466 0.322525 0.405434 -0.855337 0.490491 45 57.5 57.5 0 -608 1 1 0 52.6408 53.0126 40.8376 0.264082 0.301258 -0.916244 0.490491 45 57.5 57.5 0 -609 1 1 0 53.2486 53.3921 41.1716 0.324863 0.339209 -0.882837 0.490491 45 57.5 57.5 0 -610 1 1 0 53.8361 53.7504 41.5609 0.383614 0.375038 -0.843912 0.490491 45 57.5 57.5 0 -611 1 1 0 52.6415 52.3245 40.6395 0.264151 0.232455 -0.93605 0.490491 45 57.5 57.5 0 -612 1 1 0 53.2593 52.7063 40.9417 0.325929 0.270627 -0.905832 0.490491 45 57.5 57.5 0 -613 1 1 0 53.2553 52.0119 40.7612 0.32553 0.201189 -0.92388 0.490491 45 57.5 57.5 0 -614 1 1 0 53.8619 52.3868 41.0899 0.386187 0.238677 -0.891007 0.490491 45 57.5 57.5 0 -615 1 1 0 53.8591 53.0766 41.3027 0.385906 0.307659 -0.869725 0.490491 45 57.5 57.5 0 -616 1 1 0 54.4287 53.4285 41.7155 0.442867 0.342848 -0.828447 0.490491 45 57.5 57.5 0 -617 1 1 0 54.4446 52.7469 41.4736 0.444464 0.274694 -0.85264 0.490491 45 57.5 57.5 0 -618 1 1 0 55 53.0902 41.9098 0.5 0.309017 -0.809017 0.490491 45 57.5 57.5 0 -619 1 1 0 51.3257 52.8993 40.5218 0.13257 0.289929 -0.947822 0.490491 45 57.5 57.5 0 -620 1 1 0 51.9909 52.6155 40.5557 0.199094 0.26155 -0.944433 0.490491 45 57.5 57.5 0 -621 1 1 0 51.9839 53.3061 40.7732 0.198387 0.330606 -0.922682 0.490491 45 57.5 57.5 0 -622 1 1 0 50 49.3086 40.0239 0 -0.0691418 -0.997607 0.490491 45 57.5 57.5 0 -623 1 1 0 50.6674 49.5875 40.0308 0.0667412 -0.0412479 -0.996917 0.490491 45 57.5 57.5 0 -624 1 1 0 50 48.6205 40.0956 0 -0.137952 -0.990439 0.490491 45 57.5 57.5 0 -625 1 1 0 50.6671 48.8961 40.0835 0.0667095 -0.110385 -0.991648 0.490491 45 57.5 57.5 0 -626 1 1 0 51.3307 49.1776 40.1231 0.133071 -0.0822422 -0.987688 0.490491 45 57.5 57.5 0 -627 1 1 0 50 47.939 40.2147 0 -0.206103 -0.97853 0.490491 45 57.5 57.5 0 -628 1 1 0 50.666 48.204 40.1852 0.0666046 -0.179596 -0.981483 0.490491 45 57.5 57.5 0 -629 1 1 0 50 47.2673 40.3806 0 -0.273267 -0.961938 0.490491 45 57.5 57.5 0 -630 1 1 0 50.6657 47.5267 40.3336 0.0665668 -0.247326 -0.966643 0.490491 45 57.5 57.5 0 -631 1 1 0 51.3279 47.7988 40.3361 0.132792 -0.220117 -0.966393 0.490491 45 57.5 57.5 0 -632 1 1 0 51.3326 48.4845 40.2057 0.133256 -0.151549 -0.979426 0.490491 45 57.5 57.5 0 -633 1 1 0 51.9858 48.7727 40.2763 0.198581 -0.122729 -0.97237 0.490491 45 57.5 57.5 0 -634 1 1 0 51.9834 48.0822 40.3881 0.198337 -0.19178 -0.961188 0.490491 45 57.5 57.5 0 -635 1 1 0 52.6287 48.3754 40.4894 0.262865 -0.16246 -0.951057 0.490491 45 57.5 57.5 0 -636 1 1 0 50 46.6088 40.5926 0 -0.339122 -0.940742 0.490491 45 57.5 57.5 0 -637 1 1 0 50.6604 46.8322 40.538 0.0660427 -0.316778 -0.946198 0.490491 45 57.5 57.5 0 -638 1 1 0 50 45.9664 40.8496 0 -0.403355 -0.915043 0.490491 45 57.5 57.5 0 -639 1 1 0 50.6599 46.1828 40.7808 0.0659885 -0.381722 -0.921919 0.490491 45 57.5 57.5 0 -640 1 1 0 51.3166 46.4177 40.757 0.131656 -0.358229 -0.924305 0.490491 45 57.5 57.5 0 -641 1 1 0 50 45.3434 41.1503 0 -0.465657 -0.884965 0.490491 45 57.5 57.5 0 -642 1 1 0 50.6582 45.5463 41.0707 0.0658169 -0.445365 -0.892927 0.490491 45 57.5 57.5 0 -643 1 1 0 50 44.7427 41.4935 0 -0.525731 -0.850651 0.490491 45 57.5 57.5 0 -644 1 1 0 50.6576 44.937 41.4015 0.0657577 -0.506298 -0.859848 0.490491 45 57.5 57.5 0 -645 1 1 0 51.312 45.1556 41.3507 0.1312 -0.484441 -0.864929 0.490491 45 57.5 57.5 0 -646 1 1 0 51.3175 45.7764 41.032 0.131749 -0.422363 -0.896801 0.490491 45 57.5 57.5 0 -647 1 1 0 51.9641 46.0265 41.036 0.196412 -0.39735 -0.896401 0.490491 45 57.5 57.5 0 -648 1 1 0 51.9602 45.3973 41.3413 0.196015 -0.460266 -0.865871 0.490491 45 57.5 57.5 0 -649 1 1 0 52.5989 45.6611 41.3733 0.259892 -0.433888 -0.862669 0.490491 45 57.5 57.5 0 -650 1 1 0 52.6415 47.6755 40.6395 0.264151 -0.232455 -0.93605 0.490491 45 57.5 57.5 0 -651 1 1 0 53.2553 47.9881 40.7612 0.32553 -0.201189 -0.92388 0.490491 45 57.5 57.5 0 -652 1 1 0 52.6408 46.9874 40.8376 0.264082 -0.301258 -0.916244 0.490491 45 57.5 57.5 0 -653 1 1 0 53.2593 47.2937 40.9417 0.325929 -0.270627 -0.905832 0.490491 45 57.5 57.5 0 -654 1 1 0 53.8619 47.6132 41.0899 0.386187 -0.238677 -0.891007 0.490491 45 57.5 57.5 0 -655 1 1 0 52.6266 46.3148 41.0826 0.262661 -0.368518 -0.891742 0.490491 45 57.5 57.5 0 -656 1 1 0 53.2486 46.6079 41.1716 0.324863 -0.339209 -0.882837 0.490491 45 57.5 57.5 0 -657 1 1 0 53.2252 45.9457 41.4466 0.322525 -0.405434 -0.855337 0.490491 45 57.5 57.5 0 -658 1 1 0 53.8361 46.2496 41.5609 0.383614 -0.375038 -0.843912 0.490491 45 57.5 57.5 0 -659 1 1 0 53.8591 46.9234 41.3027 0.385906 -0.307659 -0.869725 0.490491 45 57.5 57.5 0 -660 1 1 0 54.4446 47.2531 41.4736 0.444464 -0.274694 -0.85264 0.490491 45 57.5 57.5 0 -661 1 1 0 54.4287 46.5715 41.7155 0.442867 -0.342848 -0.828447 0.490491 45 57.5 57.5 0 -662 1 1 0 55 46.9098 41.9098 0.5 -0.309017 -0.809017 0.490491 45 57.5 57.5 0 -663 1 1 0 51.3257 47.1007 40.5218 0.13257 -0.289929 -0.947822 0.490491 45 57.5 57.5 0 -664 1 1 0 51.9839 46.6939 40.7732 0.198387 -0.330606 -0.922682 0.490491 45 57.5 57.5 0 -665 1 1 0 51.9909 47.3845 40.5557 0.199094 -0.26155 -0.944433 0.490491 45 57.5 57.5 0 -666 1 1 0 55.112 52.3345 41.7285 0.511205 0.233445 -0.827147 0.490491 45 57.5 57.5 0 -667 1 1 0 55.5474 52.7371 42.1428 0.55474 0.273706 -0.785715 0.490491 45 57.5 57.5 0 -668 1 1 0 55.1926 51.5643 41.5982 0.519259 0.156434 -0.840178 0.490491 45 57.5 57.5 0 -669 1 1 0 55.6451 51.9727 41.985 0.564513 0.197274 -0.801504 0.490491 45 57.5 57.5 0 -670 1 1 0 56.0683 52.3709 42.4135 0.606825 0.237086 -0.758652 0.490491 45 57.5 57.5 0 -671 1 1 0 55.2411 50.7846 41.5197 0.52411 0.0784592 -0.848029 0.490491 45 57.5 57.5 0 -672 1 1 0 55.7114 51.1908 41.8783 0.57114 0.119078 -0.81217 0.490491 45 57.5 57.5 0 -673 1 1 0 55.2573 50 41.4935 0.525731 0 -0.850651 0.490491 45 57.5 57.5 0 -674 1 1 0 55.7446 50.4067 41.8248 0.574458 0.040675 -0.817523 0.490491 45 57.5 57.5 0 -675 1 1 0 56.2024 50.8114 42.198 0.620239 0.0811417 -0.780205 0.490491 45 57.5 57.5 0 -676 1 1 0 56.1546 51.5961 42.2816 0.615456 0.159613 -0.771841 0.490491 45 57.5 57.5 0 -677 1 1 0 56.5601 51.9933 42.7204 0.656006 0.199331 -0.727959 0.490491 45 57.5 57.5 0 -678 1 1 0 56.6284 51.2119 42.6111 0.662842 0.121192 -0.738887 0.490491 45 57.5 57.5 0 -679 1 1 0 57.0205 51.6062 43.0622 0.702047 0.160622 -0.69378 0.490491 45 57.5 57.5 0 -680 1 1 0 55.2411 49.2154 41.5197 0.52411 -0.0784592 -0.848029 0.490491 45 57.5 57.5 0 -681 1 1 0 55.7446 49.5933 41.8248 0.574458 -0.040675 -0.817523 0.490491 45 57.5 57.5 0 -682 1 1 0 55.1926 48.4357 41.5982 0.519259 -0.156434 -0.840178 0.490491 45 57.5 57.5 0 -683 1 1 0 55.7114 48.8092 41.8783 0.57114 -0.119078 -0.81217 0.490491 45 57.5 57.5 0 -684 1 1 0 56.2024 49.1886 42.198 0.620239 -0.0811417 -0.780205 0.490491 45 57.5 57.5 0 -685 1 1 0 55.112 47.6655 41.7285 0.511205 -0.233445 -0.827147 0.490491 45 57.5 57.5 0 -686 1 1 0 55.6451 48.0273 41.985 0.564513 -0.197274 -0.801504 0.490491 45 57.5 57.5 0 -687 1 1 0 55.5474 47.2629 42.1428 0.55474 -0.273706 -0.785715 0.490491 45 57.5 57.5 0 -688 1 1 0 56.0683 47.6291 42.4135 0.606825 -0.237086 -0.758652 0.490491 45 57.5 57.5 0 -689 1 1 0 56.1546 48.4039 42.2816 0.615456 -0.159613 -0.771841 0.490491 45 57.5 57.5 0 -690 1 1 0 56.6284 48.7881 42.6111 0.662842 -0.121192 -0.738887 0.490491 45 57.5 57.5 0 -691 1 1 0 56.5601 48.0067 42.7204 0.656006 -0.199331 -0.727959 0.490491 45 57.5 57.5 0 -692 1 1 0 57.0205 48.3938 43.0622 0.702047 -0.160622 -0.69378 0.490491 45 57.5 57.5 0 -693 1 1 0 57.0897 50.8057 42.9938 0.708969 0.0805729 -0.700622 0.490491 45 57.5 57.5 0 -694 1 1 0 57.4473 51.2114 43.4372 0.744727 0.121144 -0.656282 0.490491 45 57.5 57.5 0 -695 1 1 0 57.1128 50 42.9709 0.711282 0 -0.702907 0.490491 45 57.5 57.5 0 -696 1 1 0 57.4939 50.4064 43.3912 0.749387 0.0406418 -0.660883 0.490491 45 57.5 57.5 0 -697 1 1 0 57.8384 50.8109 43.8436 0.783843 0.081086 -0.615642 0.490491 45 57.5 57.5 0 -698 1 1 0 57.0897 49.1943 42.9938 0.708969 -0.0805729 -0.700622 0.490491 45 57.5 57.5 0 -699 1 1 0 57.4939 49.5936 43.3912 0.749387 -0.0406418 -0.660883 0.490491 45 57.5 57.5 0 -700 1 1 0 57.4473 48.7886 43.4372 0.744727 -0.121144 -0.656282 0.490491 45 57.5 57.5 0 -701 1 1 0 57.8384 49.1891 43.8436 0.783843 -0.081086 -0.615642 0.490491 45 57.5 57.5 0 -702 1 1 0 57.8643 50 43.8232 0.786433 0 -0.617676 0.490491 45 57.5 57.5 0 -703 1 1 0 58.1921 50.4064 44.2794 0.819207 0.0406403 -0.572055 0.490491 45 57.5 57.5 0 -704 1 1 0 58.1921 49.5936 44.2794 0.819207 -0.0406403 -0.572055 0.490491 45 57.5 57.5 0 -705 1 1 0 58.5065 50 44.7427 0.850651 0 -0.525731 0.490491 45 57.5 57.5 0 -706 1 1 0 56.2229 50 42.1721 0.622291 0 -0.782786 0.490491 45 57.5 57.5 0 -707 1 1 0 56.675 49.5932 42.565 0.667502 -0.0406769 -0.743496 0.490491 45 57.5 57.5 0 -708 1 1 0 56.675 50.4068 42.565 0.667502 0.0406769 -0.743496 0.490491 45 57.5 57.5 0 -709 1 1 0 51.3352 50 40.0895 0.133524 0 -0.991046 0.490491 45 57.5 57.5 0 -710 1 1 0 52.0037 49.5875 40.2115 0.200368 -0.0412506 -0.978852 0.490491 45 57.5 57.5 0 -711 1 1 0 52.6552 49.185 40.3935 0.265519 -0.081501 -0.960655 0.490491 45 57.5 57.5 0 -712 1 1 0 52.664 50 40.3614 0.266405 0 -0.963861 0.490491 45 57.5 57.5 0 -713 1 1 0 52.0037 50.4125 40.2115 0.200368 0.0412506 -0.978852 0.490491 45 57.5 57.5 0 -714 1 1 0 52.6552 50.815 40.3935 0.265519 0.081501 -0.960655 0.490491 45 57.5 57.5 0 -715 1 1 0 53.3234 48.772 40.6487 0.332342 -0.1228 -0.93513 0.490491 45 57.5 57.5 0 -716 1 1 0 53.9414 48.3899 40.9516 0.394136 -0.161007 -0.904839 0.490491 45 57.5 57.5 0 -717 1 1 0 53.9961 49.1768 40.8702 0.399607 -0.0823235 -0.912983 0.490491 45 57.5 57.5 0 -718 1 1 0 54.5426 48.0177 41.3147 0.454262 -0.198227 -0.868535 0.490491 45 57.5 57.5 0 -719 1 1 0 54.6088 48.8024 41.2066 0.460882 -0.119755 -0.879344 0.490491 45 57.5 57.5 0 -720 1 1 0 54.6421 49.587 41.1524 0.464213 -0.0412991 -0.88476 0.490491 45 57.5 57.5 0 -721 1 1 0 53.3234 51.228 40.6487 0.332342 0.1228 -0.93513 0.490491 45 57.5 57.5 0 -722 1 1 0 53.9961 50.8232 40.8702 0.399607 0.0823235 -0.912983 0.490491 45 57.5 57.5 0 -723 1 1 0 53.9414 51.6101 40.9516 0.394136 0.161007 -0.904839 0.490491 45 57.5 57.5 0 -724 1 1 0 54.6421 50.413 41.1524 0.464213 0.0412991 -0.88476 0.490491 45 57.5 57.5 0 -725 1 1 0 54.6088 51.1976 41.2066 0.460882 0.119755 -0.879344 0.490491 45 57.5 57.5 0 -726 1 1 0 54.5426 51.9823 41.3147 0.454262 0.198227 -0.868535 0.490491 45 57.5 57.5 0 -727 1 1 0 53.3414 49.587 40.5838 0.33414 -0.0413021 -0.941618 0.490491 45 57.5 57.5 0 -728 1 1 0 54.0097 50 40.8391 0.400968 0 -0.916092 0.490491 45 57.5 57.5 0 -729 1 1 0 53.3414 50.413 40.5838 0.33414 0.0413021 -0.941618 0.490491 45 57.5 57.5 0 -730 1 1 0 49.3424 55.063 41.4015 -0.0657577 0.506298 -0.859848 0.490491 45 57.5 57.5 0 -731 1 1 0 48.688 54.8444 41.3507 -0.1312 0.484441 -0.864929 0.490491 45 57.5 57.5 0 -732 1 1 0 49.3418 54.4537 41.0707 -0.0658169 0.445365 -0.892927 0.490491 45 57.5 57.5 0 -733 1 1 0 48.0398 54.6027 41.3413 -0.196015 0.460266 -0.865871 0.490491 45 57.5 57.5 0 -734 1 1 0 48.6825 54.2236 41.032 -0.131749 0.422363 -0.896801 0.490491 45 57.5 57.5 0 -735 1 1 0 47.4011 54.3389 41.3733 -0.259892 0.433888 -0.862669 0.490491 45 57.5 57.5 0 -736 1 1 0 48.0359 53.9735 41.036 -0.196412 0.39735 -0.896401 0.490491 45 57.5 57.5 0 -737 1 1 0 48.6834 53.5823 40.757 -0.131656 0.358229 -0.924305 0.490491 45 57.5 57.5 0 -738 1 1 0 49.3401 53.8172 40.7808 -0.0659885 0.381722 -0.921919 0.490491 45 57.5 57.5 0 -739 1 1 0 49.3396 53.1678 40.538 -0.0660427 0.316778 -0.946198 0.490491 45 57.5 57.5 0 -740 1 1 0 46.7748 54.0543 41.4466 -0.322525 0.405434 -0.855337 0.490491 45 57.5 57.5 0 -741 1 1 0 47.3734 53.6852 41.0826 -0.262661 0.368518 -0.891742 0.490491 45 57.5 57.5 0 -742 1 1 0 46.1639 53.7504 41.5609 -0.383614 0.375038 -0.843912 0.490491 45 57.5 57.5 0 -743 1 1 0 46.7514 53.3921 41.1716 -0.324863 0.339209 -0.882837 0.490491 45 57.5 57.5 0 -744 1 1 0 47.3592 53.0126 40.8376 -0.264082 0.301258 -0.916244 0.490491 45 57.5 57.5 0 -745 1 1 0 45.5713 53.4285 41.7155 -0.442867 0.342848 -0.828447 0.490491 45 57.5 57.5 0 -746 1 1 0 46.1409 53.0766 41.3027 -0.385906 0.307659 -0.869725 0.490491 45 57.5 57.5 0 -747 1 1 0 45 53.0902 41.9098 -0.5 0.309017 -0.809017 0.490491 45 57.5 57.5 0 -748 1 1 0 45.5554 52.7469 41.4736 -0.444464 0.274694 -0.85264 0.490491 45 57.5 57.5 0 -749 1 1 0 46.1381 52.3868 41.0899 -0.386187 0.238677 -0.891007 0.490491 45 57.5 57.5 0 -750 1 1 0 46.7407 52.7063 40.9417 -0.325929 0.270627 -0.905832 0.490491 45 57.5 57.5 0 -751 1 1 0 47.3585 52.3245 40.6395 -0.264151 0.232455 -0.93605 0.490491 45 57.5 57.5 0 -752 1 1 0 46.7447 52.0119 40.7612 -0.32553 0.201189 -0.92388 0.490491 45 57.5 57.5 0 -753 1 1 0 47.3713 51.6246 40.4894 -0.262865 0.16246 -0.951057 0.490491 45 57.5 57.5 0 -754 1 1 0 49.3343 52.4733 40.3336 -0.0665668 0.247326 -0.966643 0.490491 45 57.5 57.5 0 -755 1 1 0 48.6721 52.2012 40.3361 -0.132792 0.220117 -0.966393 0.490491 45 57.5 57.5 0 -756 1 1 0 49.334 51.796 40.1852 -0.0666046 0.179596 -0.981483 0.490491 45 57.5 57.5 0 -757 1 1 0 48.0166 51.9178 40.3881 -0.198337 0.19178 -0.961188 0.490491 45 57.5 57.5 0 -758 1 1 0 48.6674 51.5155 40.2057 -0.133256 0.151549 -0.979426 0.490491 45 57.5 57.5 0 -759 1 1 0 48.0142 51.2273 40.2763 -0.198581 0.122729 -0.97237 0.490491 45 57.5 57.5 0 -760 1 1 0 48.6693 50.8224 40.1231 -0.133071 0.0822422 -0.987688 0.490491 45 57.5 57.5 0 -761 1 1 0 49.3329 51.1039 40.0835 -0.0667095 0.110385 -0.991648 0.490491 45 57.5 57.5 0 -762 1 1 0 49.3326 50.4125 40.0308 -0.0667412 0.0412479 -0.996917 0.490491 45 57.5 57.5 0 -763 1 1 0 48.0161 53.3061 40.7732 -0.198387 0.330606 -0.922682 0.490491 45 57.5 57.5 0 -764 1 1 0 48.0091 52.6155 40.5557 -0.199094 0.26155 -0.944433 0.490491 45 57.5 57.5 0 -765 1 1 0 48.6743 52.8993 40.5218 -0.13257 0.289929 -0.947822 0.490491 45 57.5 57.5 0 -766 1 1 0 44.4526 52.7371 42.1428 -0.55474 0.273706 -0.785715 0.490491 45 57.5 57.5 0 -767 1 1 0 44.888 52.3345 41.7285 -0.511205 0.233445 -0.827147 0.490491 45 57.5 57.5 0 -768 1 1 0 43.9317 52.3709 42.4135 -0.606825 0.237086 -0.758652 0.490491 45 57.5 57.5 0 -769 1 1 0 44.3549 51.9727 41.985 -0.564513 0.197274 -0.801504 0.490491 45 57.5 57.5 0 -770 1 1 0 44.8074 51.5643 41.5982 -0.519259 0.156434 -0.840178 0.490491 45 57.5 57.5 0 -771 1 1 0 43.4399 51.9933 42.7204 -0.656006 0.199331 -0.727959 0.490491 45 57.5 57.5 0 -772 1 1 0 43.8454 51.5961 42.2816 -0.615456 0.159613 -0.771841 0.490491 45 57.5 57.5 0 -773 1 1 0 42.9795 51.6062 43.0622 -0.702047 0.160622 -0.69378 0.490491 45 57.5 57.5 0 -774 1 1 0 43.3716 51.2119 42.6111 -0.662842 0.121192 -0.738887 0.490491 45 57.5 57.5 0 -775 1 1 0 43.7976 50.8114 42.198 -0.620239 0.0811417 -0.780205 0.490491 45 57.5 57.5 0 -776 1 1 0 44.2886 51.1908 41.8783 -0.57114 0.119078 -0.81217 0.490491 45 57.5 57.5 0 -777 1 1 0 44.7589 50.7846 41.5197 -0.52411 0.0784592 -0.848029 0.490491 45 57.5 57.5 0 -778 1 1 0 44.2554 50.4067 41.8248 -0.574458 0.040675 -0.817523 0.490491 45 57.5 57.5 0 -779 1 1 0 44.7427 50 41.4935 -0.525731 0 -0.850651 0.490491 45 57.5 57.5 0 -780 1 1 0 42.5527 51.2114 43.4372 -0.744727 0.121144 -0.656282 0.490491 45 57.5 57.5 0 -781 1 1 0 42.9103 50.8057 42.9938 -0.708969 0.0805729 -0.700622 0.490491 45 57.5 57.5 0 -782 1 1 0 42.1616 50.8109 43.8436 -0.783843 0.081086 -0.615642 0.490491 45 57.5 57.5 0 -783 1 1 0 42.5061 50.4064 43.3912 -0.749387 0.0406418 -0.660883 0.490491 45 57.5 57.5 0 -784 1 1 0 42.8872 50 42.9709 -0.711282 0 -0.702907 0.490491 45 57.5 57.5 0 -785 1 1 0 41.8079 50.4064 44.2794 -0.819207 0.0406403 -0.572055 0.490491 45 57.5 57.5 0 -786 1 1 0 42.1357 50 43.8232 -0.786433 0 -0.617676 0.490491 45 57.5 57.5 0 -787 1 1 0 41.4935 50 44.7427 -0.850651 0 -0.525731 0.490491 45 57.5 57.5 0 -788 1 1 0 41.8079 49.5936 44.2794 -0.819207 -0.0406403 -0.572055 0.490491 45 57.5 57.5 0 -789 1 1 0 42.1616 49.1891 43.8436 -0.783843 -0.081086 -0.615642 0.490491 45 57.5 57.5 0 -790 1 1 0 42.5061 49.5936 43.3912 -0.749387 -0.0406418 -0.660883 0.490491 45 57.5 57.5 0 -791 1 1 0 42.9103 49.1943 42.9938 -0.708969 -0.0805729 -0.700622 0.490491 45 57.5 57.5 0 -792 1 1 0 42.5527 48.7886 43.4372 -0.744727 -0.121144 -0.656282 0.490491 45 57.5 57.5 0 -793 1 1 0 42.9795 48.3938 43.0622 -0.702047 -0.160622 -0.69378 0.490491 45 57.5 57.5 0 -794 1 1 0 44.2554 49.5933 41.8248 -0.574458 -0.040675 -0.817523 0.490491 45 57.5 57.5 0 -795 1 1 0 44.7589 49.2154 41.5197 -0.52411 -0.0784592 -0.848029 0.490491 45 57.5 57.5 0 -796 1 1 0 43.7976 49.1886 42.198 -0.620239 -0.0811417 -0.780205 0.490491 45 57.5 57.5 0 -797 1 1 0 44.2886 48.8092 41.8783 -0.57114 -0.119078 -0.81217 0.490491 45 57.5 57.5 0 -798 1 1 0 44.8074 48.4357 41.5982 -0.519259 -0.156434 -0.840178 0.490491 45 57.5 57.5 0 -799 1 1 0 43.3716 48.7881 42.6111 -0.662842 -0.121192 -0.738887 0.490491 45 57.5 57.5 0 -800 1 1 0 43.8454 48.4039 42.2816 -0.615456 -0.159613 -0.771841 0.490491 45 57.5 57.5 0 -801 1 1 0 43.4399 48.0067 42.7204 -0.656006 -0.199331 -0.727959 0.490491 45 57.5 57.5 0 -802 1 1 0 43.9317 47.6291 42.4135 -0.606825 -0.237086 -0.758652 0.490491 45 57.5 57.5 0 -803 1 1 0 44.3549 48.0273 41.985 -0.564513 -0.197274 -0.801504 0.490491 45 57.5 57.5 0 -804 1 1 0 44.888 47.6655 41.7285 -0.511205 -0.233445 -0.827147 0.490491 45 57.5 57.5 0 -805 1 1 0 44.4526 47.2629 42.1428 -0.55474 -0.273706 -0.785715 0.490491 45 57.5 57.5 0 -806 1 1 0 45 46.9098 41.9098 -0.5 -0.309017 -0.809017 0.490491 45 57.5 57.5 0 -807 1 1 0 43.325 50.4068 42.565 -0.667502 0.0406769 -0.743496 0.490491 45 57.5 57.5 0 -808 1 1 0 43.325 49.5932 42.565 -0.667502 -0.0406769 -0.743496 0.490491 45 57.5 57.5 0 -809 1 1 0 43.7771 50 42.1721 -0.622291 0 -0.782786 0.490491 45 57.5 57.5 0 -810 1 1 0 49.3326 49.5875 40.0308 -0.0667412 -0.0412479 -0.996917 0.490491 45 57.5 57.5 0 -811 1 1 0 48.6693 49.1776 40.1231 -0.133071 -0.0822422 -0.987688 0.490491 45 57.5 57.5 0 -812 1 1 0 49.3329 48.8961 40.0835 -0.0667095 -0.110385 -0.991648 0.490491 45 57.5 57.5 0 -813 1 1 0 48.0142 48.7727 40.2763 -0.198581 -0.122729 -0.97237 0.490491 45 57.5 57.5 0 -814 1 1 0 48.6674 48.4845 40.2057 -0.133256 -0.151549 -0.979426 0.490491 45 57.5 57.5 0 -815 1 1 0 47.3713 48.3754 40.4894 -0.262865 -0.16246 -0.951057 0.490491 45 57.5 57.5 0 -816 1 1 0 48.0166 48.0822 40.3881 -0.198337 -0.19178 -0.961188 0.490491 45 57.5 57.5 0 -817 1 1 0 48.6721 47.7988 40.3361 -0.132792 -0.220117 -0.966393 0.490491 45 57.5 57.5 0 -818 1 1 0 49.334 48.204 40.1852 -0.0666046 -0.179596 -0.981483 0.490491 45 57.5 57.5 0 -819 1 1 0 49.3343 47.5267 40.3336 -0.0665668 -0.247326 -0.966643 0.490491 45 57.5 57.5 0 -820 1 1 0 46.7447 47.9881 40.7612 -0.32553 -0.201189 -0.92388 0.490491 45 57.5 57.5 0 -821 1 1 0 47.3585 47.6755 40.6395 -0.264151 -0.232455 -0.93605 0.490491 45 57.5 57.5 0 -822 1 1 0 46.1381 47.6132 41.0899 -0.386187 -0.238677 -0.891007 0.490491 45 57.5 57.5 0 -823 1 1 0 46.7407 47.2937 40.9417 -0.325929 -0.270627 -0.905832 0.490491 45 57.5 57.5 0 -824 1 1 0 47.3592 46.9874 40.8376 -0.264082 -0.301258 -0.916244 0.490491 45 57.5 57.5 0 -825 1 1 0 45.5554 47.2531 41.4736 -0.444464 -0.274694 -0.85264 0.490491 45 57.5 57.5 0 -826 1 1 0 46.1409 46.9234 41.3027 -0.385906 -0.307659 -0.869725 0.490491 45 57.5 57.5 0 -827 1 1 0 45.5713 46.5715 41.7155 -0.442867 -0.342848 -0.828447 0.490491 45 57.5 57.5 0 -828 1 1 0 46.1639 46.2496 41.5609 -0.383614 -0.375038 -0.843912 0.490491 45 57.5 57.5 0 -829 1 1 0 46.7514 46.6079 41.1716 -0.324863 -0.339209 -0.882837 0.490491 45 57.5 57.5 0 -830 1 1 0 47.3734 46.3148 41.0826 -0.262661 -0.368518 -0.891742 0.490491 45 57.5 57.5 0 -831 1 1 0 46.7748 45.9457 41.4466 -0.322525 -0.405434 -0.855337 0.490491 45 57.5 57.5 0 -832 1 1 0 47.4011 45.6611 41.3733 -0.259892 -0.433888 -0.862669 0.490491 45 57.5 57.5 0 -833 1 1 0 49.3396 46.8322 40.538 -0.0660427 -0.316778 -0.946198 0.490491 45 57.5 57.5 0 -834 1 1 0 48.6834 46.4177 40.757 -0.131656 -0.358229 -0.924305 0.490491 45 57.5 57.5 0 -835 1 1 0 49.3401 46.1828 40.7808 -0.0659885 -0.381722 -0.921919 0.490491 45 57.5 57.5 0 -836 1 1 0 48.0359 46.0265 41.036 -0.196412 -0.39735 -0.896401 0.490491 45 57.5 57.5 0 -837 1 1 0 48.6825 45.7764 41.032 -0.131749 -0.422363 -0.896801 0.490491 45 57.5 57.5 0 -838 1 1 0 48.0398 45.3973 41.3413 -0.196015 -0.460266 -0.865871 0.490491 45 57.5 57.5 0 -839 1 1 0 48.688 45.1556 41.3507 -0.1312 -0.484441 -0.864929 0.490491 45 57.5 57.5 0 -840 1 1 0 49.3418 45.5463 41.0707 -0.0658169 -0.445365 -0.892927 0.490491 45 57.5 57.5 0 -841 1 1 0 49.3424 44.937 41.4015 -0.0657577 -0.506298 -0.859848 0.490491 45 57.5 57.5 0 -842 1 1 0 48.0091 47.3845 40.5557 -0.199094 -0.26155 -0.944433 0.490491 45 57.5 57.5 0 -843 1 1 0 48.0161 46.6939 40.7732 -0.198387 -0.330606 -0.922682 0.490491 45 57.5 57.5 0 -844 1 1 0 48.6743 47.1007 40.5218 -0.13257 -0.289929 -0.947822 0.490491 45 57.5 57.5 0 -845 1 1 0 45.4574 51.9823 41.3147 -0.454262 0.198227 -0.868535 0.490491 45 57.5 57.5 0 -846 1 1 0 45.3912 51.1976 41.2066 -0.460882 0.119755 -0.879344 0.490491 45 57.5 57.5 0 -847 1 1 0 45.3579 50.413 41.1524 -0.464213 0.0412991 -0.88476 0.490491 45 57.5 57.5 0 -848 1 1 0 46.0039 50.8232 40.8702 -0.399607 0.0823235 -0.912983 0.490491 45 57.5 57.5 0 -849 1 1 0 46.0586 51.6101 40.9516 -0.394136 0.161007 -0.904839 0.490491 45 57.5 57.5 0 -850 1 1 0 46.6766 51.228 40.6487 -0.332342 0.1228 -0.93513 0.490491 45 57.5 57.5 0 -851 1 1 0 45.3579 49.587 41.1524 -0.464213 -0.0412991 -0.88476 0.490491 45 57.5 57.5 0 -852 1 1 0 45.3912 48.8024 41.2066 -0.460882 -0.119755 -0.879344 0.490491 45 57.5 57.5 0 -853 1 1 0 46.0039 49.1768 40.8702 -0.399607 -0.0823235 -0.912983 0.490491 45 57.5 57.5 0 -854 1 1 0 45.4574 48.0177 41.3147 -0.454262 -0.198227 -0.868535 0.490491 45 57.5 57.5 0 -855 1 1 0 46.0586 48.3899 40.9516 -0.394136 -0.161007 -0.904839 0.490491 45 57.5 57.5 0 -856 1 1 0 46.6766 48.772 40.6487 -0.332342 -0.1228 -0.93513 0.490491 45 57.5 57.5 0 -857 1 1 0 47.3448 50.815 40.3935 -0.265519 0.081501 -0.960655 0.490491 45 57.5 57.5 0 -858 1 1 0 47.336 50 40.3614 -0.266405 0 -0.963861 0.490491 45 57.5 57.5 0 -859 1 1 0 47.9963 50.4125 40.2115 -0.200368 0.0412506 -0.978852 0.490491 45 57.5 57.5 0 -860 1 1 0 47.3448 49.185 40.3935 -0.265519 -0.081501 -0.960655 0.490491 45 57.5 57.5 0 -861 1 1 0 47.9963 49.5875 40.2115 -0.200368 -0.0412506 -0.978852 0.490491 45 57.5 57.5 0 -862 1 1 0 48.6648 50 40.0895 -0.133524 0 -0.991046 0.490491 45 57.5 57.5 0 -863 1 1 0 45.9903 50 40.8391 -0.400968 0 -0.916092 0.490491 45 57.5 57.5 0 -864 1 1 0 46.6586 49.587 40.5838 -0.33414 -0.0413021 -0.941618 0.490491 45 57.5 57.5 0 -865 1 1 0 46.6586 50.413 40.5838 -0.33414 0.0413021 -0.941618 0.490491 45 57.5 57.5 0 -866 1 1 0 50.4064 44.2794 58.1921 0.0406403 -0.572055 0.819208 0.490491 45 57.5 57.5 0 -867 1 1 0 49.5936 44.2794 58.1921 -0.0406403 -0.572055 0.819208 0.490491 45 57.5 57.5 0 -868 1 1 0 50.8109 43.8436 57.8384 0.081086 -0.615642 0.783843 0.490491 45 57.5 57.5 0 -869 1 1 0 50 43.8232 57.8643 0 -0.617676 0.786433 0.490491 45 57.5 57.5 0 -870 1 1 0 49.1891 43.8436 57.8384 -0.081086 -0.615642 0.783843 0.490491 45 57.5 57.5 0 -871 1 1 0 51.2114 43.4372 57.4473 0.121144 -0.656282 0.744727 0.490491 45 57.5 57.5 0 -872 1 1 0 50.4064 43.3912 57.4939 0.0406418 -0.660883 0.749387 0.490491 45 57.5 57.5 0 -873 1 1 0 51.6062 43.0622 57.0205 0.160622 -0.69378 0.702047 0.490491 45 57.5 57.5 0 -874 1 1 0 50.8057 42.9938 57.0897 0.0805729 -0.700622 0.708969 0.490491 45 57.5 57.5 0 -875 1 1 0 50 42.9709 57.1128 0 -0.702907 0.711282 0.490491 45 57.5 57.5 0 -876 1 1 0 49.5936 43.3912 57.4939 -0.0406418 -0.660883 0.749387 0.490491 45 57.5 57.5 0 -877 1 1 0 48.7886 43.4372 57.4473 -0.121144 -0.656282 0.744727 0.490491 45 57.5 57.5 0 -878 1 1 0 49.1943 42.9938 57.0897 -0.0805729 -0.700622 0.708969 0.490491 45 57.5 57.5 0 -879 1 1 0 48.3938 43.0622 57.0205 -0.160622 -0.69378 0.702047 0.490491 45 57.5 57.5 0 -880 1 1 0 51.9933 42.7204 56.5601 0.199331 -0.727959 0.656006 0.490491 45 57.5 57.5 0 -881 1 1 0 51.2119 42.6111 56.6284 0.121192 -0.738887 0.662842 0.490491 45 57.5 57.5 0 -882 1 1 0 52.3709 42.4135 56.0683 0.237086 -0.758652 0.606825 0.490491 45 57.5 57.5 0 -883 1 1 0 51.5961 42.2816 56.1546 0.159613 -0.771841 0.615456 0.490491 45 57.5 57.5 0 -884 1 1 0 50.8114 42.198 56.2024 0.0811417 -0.780205 0.620239 0.490491 45 57.5 57.5 0 -885 1 1 0 52.7371 42.1428 55.5474 0.273706 -0.785715 0.55474 0.490491 45 57.5 57.5 0 -886 1 1 0 51.9727 41.985 55.6451 0.197274 -0.801504 0.564513 0.490491 45 57.5 57.5 0 -887 1 1 0 53.0902 41.9098 55 0.309017 -0.809017 0.5 0.490491 45 57.5 57.5 0 -888 1 1 0 52.3345 41.7285 55.112 0.233445 -0.827147 0.511205 0.490491 45 57.5 57.5 0 -889 1 1 0 51.5643 41.5982 55.1926 0.156434 -0.840178 0.519259 0.490491 45 57.5 57.5 0 -890 1 1 0 51.1908 41.8783 55.7114 0.119078 -0.81217 0.57114 0.490491 45 57.5 57.5 0 -891 1 1 0 50.4067 41.8248 55.7446 0.040675 -0.817523 0.574458 0.490491 45 57.5 57.5 0 -892 1 1 0 50.7846 41.5197 55.2411 0.0784592 -0.848029 0.52411 0.490491 45 57.5 57.5 0 -893 1 1 0 50 41.4935 55.2573 0 -0.850651 0.525731 0.490491 45 57.5 57.5 0 -894 1 1 0 48.7881 42.6111 56.6284 -0.121192 -0.738887 0.662842 0.490491 45 57.5 57.5 0 -895 1 1 0 48.0067 42.7204 56.5601 -0.199331 -0.727959 0.656006 0.490491 45 57.5 57.5 0 -896 1 1 0 49.1886 42.198 56.2024 -0.0811417 -0.780205 0.620239 0.490491 45 57.5 57.5 0 -897 1 1 0 48.4039 42.2816 56.1546 -0.159613 -0.771841 0.615456 0.490491 45 57.5 57.5 0 -898 1 1 0 47.6291 42.4135 56.0683 -0.237086 -0.758652 0.606825 0.490491 45 57.5 57.5 0 -899 1 1 0 49.5933 41.8248 55.7446 -0.040675 -0.817523 0.574458 0.490491 45 57.5 57.5 0 -900 1 1 0 48.8092 41.8783 55.7114 -0.119078 -0.81217 0.57114 0.490491 45 57.5 57.5 0 -901 1 1 0 49.2154 41.5197 55.2411 -0.0784592 -0.848029 0.52411 0.490491 45 57.5 57.5 0 -902 1 1 0 48.4357 41.5982 55.1926 -0.156434 -0.840178 0.519259 0.490491 45 57.5 57.5 0 -903 1 1 0 48.0273 41.985 55.6451 -0.197274 -0.801504 0.564513 0.490491 45 57.5 57.5 0 -904 1 1 0 47.2629 42.1428 55.5474 -0.273706 -0.785715 0.55474 0.490491 45 57.5 57.5 0 -905 1 1 0 47.6655 41.7285 55.112 -0.233445 -0.827147 0.511205 0.490491 45 57.5 57.5 0 -906 1 1 0 46.9098 41.9098 55 -0.309017 -0.809017 0.5 0.490491 45 57.5 57.5 0 -907 1 1 0 50.4068 42.565 56.675 0.0406769 -0.743496 0.667502 0.490491 45 57.5 57.5 0 -908 1 1 0 50 42.1721 56.2229 0 -0.782786 0.622291 0.490491 45 57.5 57.5 0 -909 1 1 0 49.5932 42.565 56.675 -0.0406769 -0.743496 0.667502 0.490491 45 57.5 57.5 0 -910 1 1 0 53.4285 41.7155 54.4287 0.342848 -0.828447 0.442867 0.490491 45 57.5 57.5 0 -911 1 1 0 52.7469 41.4736 54.4446 0.274694 -0.85264 0.444464 0.490491 45 57.5 57.5 0 -912 1 1 0 53.7504 41.5609 53.8361 0.375038 -0.843912 0.383614 0.490491 45 57.5 57.5 0 -913 1 1 0 53.0766 41.3027 53.8591 0.307659 -0.869725 0.385906 0.490491 45 57.5 57.5 0 -914 1 1 0 52.3868 41.0899 53.8619 0.238677 -0.891007 0.386187 0.490491 45 57.5 57.5 0 -915 1 1 0 54.0543 41.4466 53.2252 0.405434 -0.855337 0.322525 0.490491 45 57.5 57.5 0 -916 1 1 0 53.3921 41.1716 53.2486 0.339209 -0.882837 0.324863 0.490491 45 57.5 57.5 0 -917 1 1 0 54.3389 41.3733 52.5989 0.433888 -0.862669 0.259892 0.490491 45 57.5 57.5 0 -918 1 1 0 53.6852 41.0826 52.6266 0.368518 -0.891742 0.262661 0.490491 45 57.5 57.5 0 -919 1 1 0 53.0126 40.8376 52.6408 0.301258 -0.916244 0.264082 0.490491 45 57.5 57.5 0 -920 1 1 0 52.7063 40.9417 53.2593 0.270627 -0.905832 0.325929 0.490491 45 57.5 57.5 0 -921 1 1 0 52.0119 40.7612 53.2553 0.201189 -0.92388 0.32553 0.490491 45 57.5 57.5 0 -922 1 1 0 52.3245 40.6395 52.6415 0.232455 -0.93605 0.264151 0.490491 45 57.5 57.5 0 -923 1 1 0 51.6246 40.4894 52.6287 0.16246 -0.951057 0.262865 0.490491 45 57.5 57.5 0 -924 1 1 0 54.6027 41.3413 51.9602 0.460266 -0.865871 0.196015 0.490491 45 57.5 57.5 0 -925 1 1 0 53.9735 41.036 51.9641 0.39735 -0.896401 0.196412 0.490491 45 57.5 57.5 0 -926 1 1 0 54.8444 41.3507 51.312 0.484441 -0.864929 0.1312 0.490491 45 57.5 57.5 0 -927 1 1 0 54.2236 41.032 51.3175 0.422363 -0.896801 0.131749 0.490491 45 57.5 57.5 0 -928 1 1 0 53.5823 40.757 51.3166 0.358229 -0.924305 0.131656 0.490491 45 57.5 57.5 0 -929 1 1 0 55.063 41.4015 50.6576 0.506298 -0.859848 0.0657577 0.490491 45 57.5 57.5 0 -930 1 1 0 54.4537 41.0707 50.6582 0.445365 -0.892927 0.0658169 0.490491 45 57.5 57.5 0 -931 1 1 0 55.2573 41.4935 50 0.525731 -0.850651 0 0.490491 45 57.5 57.5 0 -932 1 1 0 54.6566 41.1503 50 0.465657 -0.884965 0 0.490491 45 57.5 57.5 0 -933 1 1 0 54.0336 40.8496 50 0.403355 -0.915043 0 0.490491 45 57.5 57.5 0 -934 1 1 0 53.8172 40.7808 50.6599 0.381722 -0.921919 0.0659886 0.490491 45 57.5 57.5 0 -935 1 1 0 53.1678 40.538 50.6604 0.316778 -0.946198 0.0660427 0.490491 45 57.5 57.5 0 -936 1 1 0 53.3912 40.5926 50 0.339122 -0.940742 0 0.490491 45 57.5 57.5 0 -937 1 1 0 52.7327 40.3806 50 0.273267 -0.961938 0 0.490491 45 57.5 57.5 0 -938 1 1 0 51.9178 40.3881 51.9834 0.19178 -0.961188 0.198337 0.490491 45 57.5 57.5 0 -939 1 1 0 51.2273 40.2763 51.9858 0.122729 -0.97237 0.198581 0.490491 45 57.5 57.5 0 -940 1 1 0 52.2012 40.3361 51.3279 0.220117 -0.966393 0.132792 0.490491 45 57.5 57.5 0 -941 1 1 0 51.5155 40.2057 51.3326 0.151549 -0.979426 0.133256 0.490491 45 57.5 57.5 0 -942 1 1 0 50.8224 40.1231 51.3307 0.0822422 -0.987688 0.133071 0.490491 45 57.5 57.5 0 -943 1 1 0 52.4733 40.3336 50.6657 0.247326 -0.966643 0.0665668 0.490491 45 57.5 57.5 0 -944 1 1 0 51.796 40.1852 50.666 0.179596 -0.981483 0.0666046 0.490491 45 57.5 57.5 0 -945 1 1 0 52.061 40.2147 50 0.206103 -0.97853 0 0.490491 45 57.5 57.5 0 -946 1 1 0 51.3795 40.0956 50 0.137952 -0.990439 0 0.490491 45 57.5 57.5 0 -947 1 1 0 51.1039 40.0835 50.6671 0.110385 -0.991648 0.0667095 0.490491 45 57.5 57.5 0 -948 1 1 0 50.4125 40.0308 50.6674 0.0412479 -0.996917 0.0667412 0.490491 45 57.5 57.5 0 -949 1 1 0 50.6914 40.0239 50 0.0691418 -0.997607 0 0.490491 45 57.5 57.5 0 -950 1 1 0 50 40 50 0 -1 0 0.490491 45 57.5 57.5 0 -951 1 1 0 53.3061 40.7732 51.9839 0.330606 -0.922682 0.198387 0.490491 45 57.5 57.5 0 -952 1 1 0 52.8993 40.5218 51.3257 0.289929 -0.947822 0.13257 0.490491 45 57.5 57.5 0 -953 1 1 0 52.6155 40.5557 51.9909 0.26155 -0.944433 0.199094 0.490491 45 57.5 57.5 0 -954 1 1 0 47.2531 41.4736 54.4446 -0.274694 -0.85264 0.444464 0.490491 45 57.5 57.5 0 -955 1 1 0 46.5715 41.7155 54.4287 -0.342848 -0.828447 0.442867 0.490491 45 57.5 57.5 0 -956 1 1 0 47.6132 41.0899 53.8619 -0.238677 -0.891007 0.386187 0.490491 45 57.5 57.5 0 -957 1 1 0 46.9234 41.3027 53.8591 -0.307659 -0.869725 0.385906 0.490491 45 57.5 57.5 0 -958 1 1 0 46.2496 41.5609 53.8361 -0.375038 -0.843912 0.383614 0.490491 45 57.5 57.5 0 -959 1 1 0 47.9881 40.7612 53.2553 -0.201189 -0.92388 0.32553 0.490491 45 57.5 57.5 0 -960 1 1 0 47.2937 40.9417 53.2593 -0.270627 -0.905832 0.325929 0.490491 45 57.5 57.5 0 -961 1 1 0 48.3754 40.4894 52.6287 -0.16246 -0.951057 0.262865 0.490491 45 57.5 57.5 0 -962 1 1 0 47.6755 40.6395 52.6415 -0.232455 -0.93605 0.264151 0.490491 45 57.5 57.5 0 -963 1 1 0 46.9874 40.8376 52.6408 -0.301258 -0.916244 0.264082 0.490491 45 57.5 57.5 0 -964 1 1 0 46.6079 41.1716 53.2486 -0.339209 -0.882837 0.324863 0.490491 45 57.5 57.5 0 -965 1 1 0 45.9457 41.4466 53.2252 -0.405434 -0.855337 0.322525 0.490491 45 57.5 57.5 0 -966 1 1 0 46.3148 41.0826 52.6266 -0.368518 -0.891742 0.262661 0.490491 45 57.5 57.5 0 -967 1 1 0 45.6611 41.3733 52.5989 -0.433888 -0.862669 0.259892 0.490491 45 57.5 57.5 0 -968 1 1 0 48.7727 40.2763 51.9858 -0.122729 -0.97237 0.198581 0.490491 45 57.5 57.5 0 -969 1 1 0 48.0822 40.3881 51.9834 -0.19178 -0.961188 0.198337 0.490491 45 57.5 57.5 0 -970 1 1 0 49.1776 40.1231 51.3307 -0.0822422 -0.987688 0.133071 0.490491 45 57.5 57.5 0 -971 1 1 0 48.4845 40.2057 51.3326 -0.151549 -0.979426 0.133256 0.490491 45 57.5 57.5 0 -972 1 1 0 47.7988 40.3361 51.3279 -0.220117 -0.966393 0.132792 0.490491 45 57.5 57.5 0 -973 1 1 0 49.5875 40.0308 50.6674 -0.0412479 -0.996917 0.0667412 0.490491 45 57.5 57.5 0 -974 1 1 0 48.8961 40.0835 50.6671 -0.110385 -0.991648 0.0667095 0.490491 45 57.5 57.5 0 -975 1 1 0 49.3086 40.0239 50 -0.0691418 -0.997607 0 0.490491 45 57.5 57.5 0 -976 1 1 0 48.6205 40.0956 50 -0.137952 -0.990439 0 0.490491 45 57.5 57.5 0 -977 1 1 0 48.204 40.1852 50.666 -0.179596 -0.981483 0.0666046 0.490491 45 57.5 57.5 0 -978 1 1 0 47.5267 40.3336 50.6657 -0.247326 -0.966643 0.0665668 0.490491 45 57.5 57.5 0 -979 1 1 0 47.939 40.2147 50 -0.206103 -0.97853 0 0.490491 45 57.5 57.5 0 -980 1 1 0 47.2673 40.3806 50 -0.273267 -0.961938 0 0.490491 45 57.5 57.5 0 -981 1 1 0 46.0265 41.036 51.9641 -0.39735 -0.896401 0.196412 0.490491 45 57.5 57.5 0 -982 1 1 0 45.3973 41.3413 51.9602 -0.460266 -0.865871 0.196015 0.490491 45 57.5 57.5 0 -983 1 1 0 46.4177 40.757 51.3166 -0.358229 -0.924305 0.131656 0.490491 45 57.5 57.5 0 -984 1 1 0 45.7764 41.032 51.3175 -0.422363 -0.896801 0.131749 0.490491 45 57.5 57.5 0 -985 1 1 0 45.1556 41.3507 51.312 -0.484441 -0.864929 0.1312 0.490491 45 57.5 57.5 0 -986 1 1 0 46.8322 40.538 50.6604 -0.316778 -0.946198 0.0660427 0.490491 45 57.5 57.5 0 -987 1 1 0 46.1828 40.7808 50.6599 -0.381722 -0.921919 0.0659886 0.490491 45 57.5 57.5 0 -988 1 1 0 46.6088 40.5926 50 -0.339122 -0.940742 0 0.490491 45 57.5 57.5 0 -989 1 1 0 45.9664 40.8496 50 -0.403355 -0.915043 0 0.490491 45 57.5 57.5 0 -990 1 1 0 45.5463 41.0707 50.6582 -0.445365 -0.892927 0.0658169 0.490491 45 57.5 57.5 0 -991 1 1 0 44.937 41.4015 50.6576 -0.506298 -0.859848 0.0657577 0.490491 45 57.5 57.5 0 -992 1 1 0 45.3434 41.1503 50 -0.465657 -0.884965 0 0.490491 45 57.5 57.5 0 -993 1 1 0 44.7427 41.4935 50 -0.525731 -0.850651 0 0.490491 45 57.5 57.5 0 -994 1 1 0 47.3845 40.5557 51.9909 -0.26155 -0.944433 0.199094 0.490491 45 57.5 57.5 0 -995 1 1 0 47.1007 40.5218 51.3257 -0.289929 -0.947822 0.13257 0.490491 45 57.5 57.5 0 -996 1 1 0 46.6939 40.7732 51.9839 -0.330606 -0.922682 0.198387 0.490491 45 57.5 57.5 0 -997 1 1 0 51.9823 41.3147 54.5426 0.198227 -0.868535 0.454262 0.490491 45 57.5 57.5 0 -998 1 1 0 51.6101 40.9516 53.9414 0.161007 -0.904839 0.394136 0.490491 45 57.5 57.5 0 -999 1 1 0 51.228 40.6487 53.3234 0.1228 -0.93513 0.332342 0.490491 45 57.5 57.5 0 -1000 1 1 0 50.8232 40.8702 53.9961 0.0823235 -0.912983 0.399607 0.490491 45 57.5 57.5 0 -1001 1 1 0 51.1976 41.2066 54.6088 0.119755 -0.879344 0.460882 0.490491 45 57.5 57.5 0 -1002 1 1 0 50.413 41.1524 54.6421 0.0412991 -0.88476 0.464213 0.490491 45 57.5 57.5 0 -1003 1 1 0 50.815 40.3935 52.6552 0.081501 -0.960655 0.265519 0.490491 45 57.5 57.5 0 -1004 1 1 0 50.4125 40.2115 52.0037 0.0412506 -0.978852 0.200368 0.490491 45 57.5 57.5 0 -1005 1 1 0 50 40.3614 52.664 0 -0.963861 0.266405 0.490491 45 57.5 57.5 0 -1006 1 1 0 50 40.0895 51.3352 0 -0.991046 0.133524 0.490491 45 57.5 57.5 0 -1007 1 1 0 49.5875 40.2115 52.0037 -0.0412506 -0.978852 0.200368 0.490491 45 57.5 57.5 0 -1008 1 1 0 49.185 40.3935 52.6552 -0.081501 -0.960655 0.265519 0.490491 45 57.5 57.5 0 -1009 1 1 0 49.587 41.1524 54.6421 -0.0412991 -0.88476 0.464213 0.490491 45 57.5 57.5 0 -1010 1 1 0 49.1768 40.8702 53.9961 -0.0823235 -0.912983 0.399607 0.490491 45 57.5 57.5 0 -1011 1 1 0 48.8024 41.2066 54.6088 -0.119755 -0.879344 0.460882 0.490491 45 57.5 57.5 0 -1012 1 1 0 48.772 40.6487 53.3234 -0.1228 -0.93513 0.332342 0.490491 45 57.5 57.5 0 -1013 1 1 0 48.3899 40.9516 53.9414 -0.161007 -0.904839 0.394136 0.490491 45 57.5 57.5 0 -1014 1 1 0 48.0177 41.3147 54.5426 -0.198227 -0.868535 0.454262 0.490491 45 57.5 57.5 0 -1015 1 1 0 50.413 40.5838 53.3414 0.0413021 -0.941618 0.33414 0.490491 45 57.5 57.5 0 -1016 1 1 0 49.587 40.5838 53.3414 -0.0413021 -0.941618 0.33414 0.490491 45 57.5 57.5 0 -1017 1 1 0 50 40.8391 54.0097 0 -0.916092 0.400968 0.490491 45 57.5 57.5 0 -1018 1 1 0 49.5936 44.2794 41.8079 -0.0406403 -0.572055 -0.819208 0.490491 45 57.5 57.5 0 -1019 1 1 0 50.4064 44.2794 41.8079 0.0406403 -0.572055 -0.819208 0.490491 45 57.5 57.5 0 -1020 1 1 0 49.1891 43.8436 42.1616 -0.081086 -0.615642 -0.783843 0.490491 45 57.5 57.5 0 -1021 1 1 0 50 43.8232 42.1357 0 -0.617676 -0.786433 0.490491 45 57.5 57.5 0 -1022 1 1 0 50.8109 43.8436 42.1616 0.081086 -0.615642 -0.783843 0.490491 45 57.5 57.5 0 -1023 1 1 0 48.7886 43.4372 42.5527 -0.121144 -0.656282 -0.744727 0.490491 45 57.5 57.5 0 -1024 1 1 0 49.5936 43.3912 42.5061 -0.0406418 -0.660883 -0.749387 0.490491 45 57.5 57.5 0 -1025 1 1 0 48.3938 43.0622 42.9795 -0.160622 -0.69378 -0.702047 0.490491 45 57.5 57.5 0 -1026 1 1 0 49.1943 42.9938 42.9103 -0.0805729 -0.700622 -0.708969 0.490491 45 57.5 57.5 0 -1027 1 1 0 50 42.9709 42.8872 0 -0.702907 -0.711282 0.490491 45 57.5 57.5 0 -1028 1 1 0 50.4064 43.3912 42.5061 0.0406418 -0.660883 -0.749387 0.490491 45 57.5 57.5 0 -1029 1 1 0 51.2114 43.4372 42.5527 0.121144 -0.656282 -0.744727 0.490491 45 57.5 57.5 0 -1030 1 1 0 50.8057 42.9938 42.9103 0.0805729 -0.700622 -0.708969 0.490491 45 57.5 57.5 0 -1031 1 1 0 51.6062 43.0622 42.9795 0.160622 -0.69378 -0.702047 0.490491 45 57.5 57.5 0 -1032 1 1 0 48.0067 42.7204 43.4399 -0.199331 -0.727959 -0.656006 0.490491 45 57.5 57.5 0 -1033 1 1 0 48.7881 42.6111 43.3716 -0.121192 -0.738887 -0.662842 0.490491 45 57.5 57.5 0 -1034 1 1 0 47.6291 42.4135 43.9317 -0.237086 -0.758652 -0.606825 0.490491 45 57.5 57.5 0 -1035 1 1 0 48.4039 42.2816 43.8454 -0.159613 -0.771841 -0.615456 0.490491 45 57.5 57.5 0 -1036 1 1 0 49.1886 42.198 43.7976 -0.0811417 -0.780205 -0.620239 0.490491 45 57.5 57.5 0 -1037 1 1 0 47.2629 42.1428 44.4526 -0.273706 -0.785715 -0.55474 0.490491 45 57.5 57.5 0 -1038 1 1 0 48.0273 41.985 44.3549 -0.197274 -0.801504 -0.564513 0.490491 45 57.5 57.5 0 -1039 1 1 0 46.9098 41.9098 45 -0.309017 -0.809017 -0.5 0.490491 45 57.5 57.5 0 -1040 1 1 0 47.6655 41.7285 44.888 -0.233445 -0.827147 -0.511205 0.490491 45 57.5 57.5 0 -1041 1 1 0 48.4357 41.5982 44.8074 -0.156434 -0.840178 -0.519259 0.490491 45 57.5 57.5 0 -1042 1 1 0 48.8092 41.8783 44.2886 -0.119078 -0.81217 -0.57114 0.490491 45 57.5 57.5 0 -1043 1 1 0 49.5933 41.8248 44.2554 -0.040675 -0.817523 -0.574458 0.490491 45 57.5 57.5 0 -1044 1 1 0 49.2154 41.5197 44.7589 -0.0784592 -0.848029 -0.52411 0.490491 45 57.5 57.5 0 -1045 1 1 0 50 41.4935 44.7427 0 -0.850651 -0.525731 0.490491 45 57.5 57.5 0 -1046 1 1 0 51.2119 42.6111 43.3716 0.121192 -0.738887 -0.662842 0.490491 45 57.5 57.5 0 -1047 1 1 0 51.9933 42.7204 43.4399 0.199331 -0.727959 -0.656006 0.490491 45 57.5 57.5 0 -1048 1 1 0 50.8114 42.198 43.7976 0.0811417 -0.780205 -0.620239 0.490491 45 57.5 57.5 0 -1049 1 1 0 51.5961 42.2816 43.8454 0.159613 -0.771841 -0.615456 0.490491 45 57.5 57.5 0 -1050 1 1 0 52.3709 42.4135 43.9317 0.237086 -0.758652 -0.606825 0.490491 45 57.5 57.5 0 -1051 1 1 0 50.4067 41.8248 44.2554 0.040675 -0.817523 -0.574458 0.490491 45 57.5 57.5 0 -1052 1 1 0 51.1908 41.8783 44.2886 0.119078 -0.81217 -0.57114 0.490491 45 57.5 57.5 0 -1053 1 1 0 50.7846 41.5197 44.7589 0.0784592 -0.848029 -0.52411 0.490491 45 57.5 57.5 0 -1054 1 1 0 51.5643 41.5982 44.8074 0.156434 -0.840178 -0.519259 0.490491 45 57.5 57.5 0 -1055 1 1 0 51.9727 41.985 44.3549 0.197274 -0.801504 -0.564513 0.490491 45 57.5 57.5 0 -1056 1 1 0 52.7371 42.1428 44.4526 0.273706 -0.785715 -0.55474 0.490491 45 57.5 57.5 0 -1057 1 1 0 52.3345 41.7285 44.888 0.233445 -0.827147 -0.511205 0.490491 45 57.5 57.5 0 -1058 1 1 0 53.0902 41.9098 45 0.309017 -0.809017 -0.5 0.490491 45 57.5 57.5 0 -1059 1 1 0 49.5932 42.565 43.325 -0.0406769 -0.743496 -0.667502 0.490491 45 57.5 57.5 0 -1060 1 1 0 50 42.1721 43.7771 0 -0.782786 -0.622291 0.490491 45 57.5 57.5 0 -1061 1 1 0 50.4068 42.565 43.325 0.0406769 -0.743496 -0.667502 0.490491 45 57.5 57.5 0 -1062 1 1 0 46.5715 41.7155 45.5713 -0.342848 -0.828447 -0.442867 0.490491 45 57.5 57.5 0 -1063 1 1 0 47.2531 41.4736 45.5554 -0.274694 -0.85264 -0.444464 0.490491 45 57.5 57.5 0 -1064 1 1 0 46.2496 41.5609 46.1639 -0.375038 -0.843912 -0.383614 0.490491 45 57.5 57.5 0 -1065 1 1 0 46.9234 41.3027 46.1409 -0.307659 -0.869725 -0.385906 0.490491 45 57.5 57.5 0 -1066 1 1 0 47.6132 41.0899 46.1381 -0.238677 -0.891007 -0.386187 0.490491 45 57.5 57.5 0 -1067 1 1 0 45.9457 41.4466 46.7748 -0.405434 -0.855337 -0.322525 0.490491 45 57.5 57.5 0 -1068 1 1 0 46.6079 41.1716 46.7514 -0.339209 -0.882837 -0.324863 0.490491 45 57.5 57.5 0 -1069 1 1 0 45.6611 41.3733 47.4011 -0.433888 -0.862669 -0.259892 0.490491 45 57.5 57.5 0 -1070 1 1 0 46.3148 41.0826 47.3734 -0.368518 -0.891742 -0.262661 0.490491 45 57.5 57.5 0 -1071 1 1 0 46.9874 40.8376 47.3592 -0.301258 -0.916244 -0.264082 0.490491 45 57.5 57.5 0 -1072 1 1 0 47.2937 40.9417 46.7407 -0.270627 -0.905832 -0.325929 0.490491 45 57.5 57.5 0 -1073 1 1 0 47.9881 40.7612 46.7447 -0.201189 -0.92388 -0.32553 0.490491 45 57.5 57.5 0 -1074 1 1 0 47.6755 40.6395 47.3585 -0.232455 -0.93605 -0.264151 0.490491 45 57.5 57.5 0 -1075 1 1 0 48.3754 40.4894 47.3713 -0.16246 -0.951057 -0.262865 0.490491 45 57.5 57.5 0 -1076 1 1 0 45.3973 41.3413 48.0398 -0.460266 -0.865871 -0.196015 0.490491 45 57.5 57.5 0 -1077 1 1 0 46.0265 41.036 48.0359 -0.39735 -0.896401 -0.196412 0.490491 45 57.5 57.5 0 -1078 1 1 0 45.1556 41.3507 48.688 -0.484441 -0.864929 -0.1312 0.490491 45 57.5 57.5 0 -1079 1 1 0 45.7764 41.032 48.6825 -0.422363 -0.896801 -0.131749 0.490491 45 57.5 57.5 0 -1080 1 1 0 46.4177 40.757 48.6834 -0.358229 -0.924305 -0.131656 0.490491 45 57.5 57.5 0 -1081 1 1 0 44.937 41.4015 49.3424 -0.506298 -0.859848 -0.0657577 0.490491 45 57.5 57.5 0 -1082 1 1 0 45.5463 41.0707 49.3418 -0.445365 -0.892927 -0.0658169 0.490491 45 57.5 57.5 0 -1083 1 1 0 46.1828 40.7808 49.3401 -0.381722 -0.921919 -0.0659886 0.490491 45 57.5 57.5 0 -1084 1 1 0 46.8322 40.538 49.3396 -0.316778 -0.946198 -0.0660427 0.490491 45 57.5 57.5 0 -1085 1 1 0 48.0822 40.3881 48.0166 -0.19178 -0.961188 -0.198337 0.490491 45 57.5 57.5 0 -1086 1 1 0 48.7727 40.2763 48.0142 -0.122729 -0.97237 -0.198581 0.490491 45 57.5 57.5 0 -1087 1 1 0 47.7988 40.3361 48.6721 -0.220117 -0.966393 -0.132792 0.490491 45 57.5 57.5 0 -1088 1 1 0 48.4845 40.2057 48.6674 -0.151549 -0.979426 -0.133256 0.490491 45 57.5 57.5 0 -1089 1 1 0 49.1776 40.1231 48.6693 -0.0822422 -0.987688 -0.133071 0.490491 45 57.5 57.5 0 -1090 1 1 0 47.5267 40.3336 49.3343 -0.247326 -0.966643 -0.0665668 0.490491 45 57.5 57.5 0 -1091 1 1 0 48.204 40.1852 49.334 -0.179596 -0.981483 -0.0666046 0.490491 45 57.5 57.5 0 -1092 1 1 0 48.8961 40.0835 49.3329 -0.110385 -0.991648 -0.0667095 0.490491 45 57.5 57.5 0 -1093 1 1 0 49.5875 40.0308 49.3326 -0.0412479 -0.996917 -0.0667412 0.490491 45 57.5 57.5 0 -1094 1 1 0 46.6939 40.7732 48.0161 -0.330606 -0.922682 -0.198387 0.490491 45 57.5 57.5 0 -1095 1 1 0 47.1007 40.5218 48.6743 -0.289929 -0.947822 -0.13257 0.490491 45 57.5 57.5 0 -1096 1 1 0 47.3845 40.5557 48.0091 -0.26155 -0.944433 -0.199094 0.490491 45 57.5 57.5 0 -1097 1 1 0 52.7469 41.4736 45.5554 0.274694 -0.85264 -0.444464 0.490491 45 57.5 57.5 0 -1098 1 1 0 53.4285 41.7155 45.5713 0.342848 -0.828447 -0.442867 0.490491 45 57.5 57.5 0 -1099 1 1 0 52.3868 41.0899 46.1381 0.238677 -0.891007 -0.386187 0.490491 45 57.5 57.5 0 -1100 1 1 0 53.0766 41.3027 46.1409 0.307659 -0.869725 -0.385906 0.490491 45 57.5 57.5 0 -1101 1 1 0 53.7504 41.5609 46.1639 0.375038 -0.843912 -0.383614 0.490491 45 57.5 57.5 0 -1102 1 1 0 52.0119 40.7612 46.7447 0.201189 -0.92388 -0.32553 0.490491 45 57.5 57.5 0 -1103 1 1 0 52.7063 40.9417 46.7407 0.270627 -0.905832 -0.325929 0.490491 45 57.5 57.5 0 -1104 1 1 0 51.6246 40.4894 47.3713 0.16246 -0.951057 -0.262865 0.490491 45 57.5 57.5 0 -1105 1 1 0 52.3245 40.6395 47.3585 0.232455 -0.93605 -0.264151 0.490491 45 57.5 57.5 0 -1106 1 1 0 53.0126 40.8376 47.3592 0.301258 -0.916244 -0.264082 0.490491 45 57.5 57.5 0 -1107 1 1 0 53.3921 41.1716 46.7514 0.339209 -0.882837 -0.324863 0.490491 45 57.5 57.5 0 -1108 1 1 0 54.0543 41.4466 46.7748 0.405434 -0.855337 -0.322525 0.490491 45 57.5 57.5 0 -1109 1 1 0 53.6852 41.0826 47.3734 0.368518 -0.891742 -0.262661 0.490491 45 57.5 57.5 0 -1110 1 1 0 54.3389 41.3733 47.4011 0.433888 -0.862669 -0.259892 0.490491 45 57.5 57.5 0 -1111 1 1 0 51.2273 40.2763 48.0142 0.122729 -0.97237 -0.198581 0.490491 45 57.5 57.5 0 -1112 1 1 0 51.9178 40.3881 48.0166 0.19178 -0.961188 -0.198337 0.490491 45 57.5 57.5 0 -1113 1 1 0 50.8224 40.1231 48.6693 0.0822422 -0.987688 -0.133071 0.490491 45 57.5 57.5 0 -1114 1 1 0 51.5155 40.2057 48.6674 0.151549 -0.979426 -0.133256 0.490491 45 57.5 57.5 0 -1115 1 1 0 52.2012 40.3361 48.6721 0.220117 -0.966393 -0.132792 0.490491 45 57.5 57.5 0 -1116 1 1 0 50.4125 40.0308 49.3326 0.0412479 -0.996917 -0.0667412 0.490491 45 57.5 57.5 0 -1117 1 1 0 51.1039 40.0835 49.3329 0.110385 -0.991648 -0.0667095 0.490491 45 57.5 57.5 0 -1118 1 1 0 51.796 40.1852 49.334 0.179596 -0.981483 -0.0666046 0.490491 45 57.5 57.5 0 -1119 1 1 0 52.4733 40.3336 49.3343 0.247326 -0.966643 -0.0665668 0.490491 45 57.5 57.5 0 -1120 1 1 0 53.9735 41.036 48.0359 0.39735 -0.896401 -0.196412 0.490491 45 57.5 57.5 0 -1121 1 1 0 54.6027 41.3413 48.0398 0.460266 -0.865871 -0.196015 0.490491 45 57.5 57.5 0 -1122 1 1 0 53.5823 40.757 48.6834 0.358229 -0.924305 -0.131656 0.490491 45 57.5 57.5 0 -1123 1 1 0 54.2236 41.032 48.6825 0.422363 -0.896801 -0.131749 0.490491 45 57.5 57.5 0 -1124 1 1 0 54.8444 41.3507 48.688 0.484441 -0.864929 -0.1312 0.490491 45 57.5 57.5 0 -1125 1 1 0 53.1678 40.538 49.3396 0.316778 -0.946198 -0.0660427 0.490491 45 57.5 57.5 0 -1126 1 1 0 53.8172 40.7808 49.3401 0.381722 -0.921919 -0.0659886 0.490491 45 57.5 57.5 0 -1127 1 1 0 54.4537 41.0707 49.3418 0.445365 -0.892927 -0.0658169 0.490491 45 57.5 57.5 0 -1128 1 1 0 55.063 41.4015 49.3424 0.506298 -0.859848 -0.0657577 0.490491 45 57.5 57.5 0 -1129 1 1 0 52.6155 40.5557 48.0091 0.26155 -0.944433 -0.199094 0.490491 45 57.5 57.5 0 -1130 1 1 0 52.8993 40.5218 48.6743 0.289929 -0.947822 -0.13257 0.490491 45 57.5 57.5 0 -1131 1 1 0 53.3061 40.7732 48.0161 0.330606 -0.922682 -0.198387 0.490491 45 57.5 57.5 0 -1132 1 1 0 48.0177 41.3147 45.4574 -0.198227 -0.868535 -0.454262 0.490491 45 57.5 57.5 0 -1133 1 1 0 48.3899 40.9516 46.0586 -0.161007 -0.904839 -0.394136 0.490491 45 57.5 57.5 0 -1134 1 1 0 48.772 40.6487 46.6766 -0.1228 -0.93513 -0.332342 0.490491 45 57.5 57.5 0 -1135 1 1 0 49.1768 40.8702 46.0039 -0.0823235 -0.912983 -0.399607 0.490491 45 57.5 57.5 0 -1136 1 1 0 48.8024 41.2066 45.3912 -0.119755 -0.879344 -0.460882 0.490491 45 57.5 57.5 0 -1137 1 1 0 49.587 41.1524 45.3579 -0.0412991 -0.88476 -0.464213 0.490491 45 57.5 57.5 0 -1138 1 1 0 49.185 40.3935 47.3448 -0.081501 -0.960655 -0.265519 0.490491 45 57.5 57.5 0 -1139 1 1 0 49.5875 40.2115 47.9963 -0.0412506 -0.978852 -0.200368 0.490491 45 57.5 57.5 0 -1140 1 1 0 50 40.3614 47.336 0 -0.963861 -0.266405 0.490491 45 57.5 57.5 0 -1141 1 1 0 50 40.0895 48.6648 0 -0.991046 -0.133524 0.490491 45 57.5 57.5 0 -1142 1 1 0 50.4125 40.2115 47.9963 0.0412506 -0.978852 -0.200368 0.490491 45 57.5 57.5 0 -1143 1 1 0 50.815 40.3935 47.3448 0.081501 -0.960655 -0.265519 0.490491 45 57.5 57.5 0 -1144 1 1 0 50.413 41.1524 45.3579 0.0412991 -0.88476 -0.464213 0.490491 45 57.5 57.5 0 -1145 1 1 0 50.8232 40.8702 46.0039 0.0823235 -0.912983 -0.399607 0.490491 45 57.5 57.5 0 -1146 1 1 0 51.1976 41.2066 45.3912 0.119755 -0.879344 -0.460882 0.490491 45 57.5 57.5 0 -1147 1 1 0 51.228 40.6487 46.6766 0.1228 -0.93513 -0.332342 0.490491 45 57.5 57.5 0 -1148 1 1 0 51.6101 40.9516 46.0586 0.161007 -0.904839 -0.394136 0.490491 45 57.5 57.5 0 -1149 1 1 0 51.9823 41.3147 45.4574 0.198227 -0.868535 -0.454262 0.490491 45 57.5 57.5 0 -1150 1 1 0 49.587 40.5838 46.6586 -0.0413021 -0.941618 -0.33414 0.490491 45 57.5 57.5 0 -1151 1 1 0 50.413 40.5838 46.6586 0.0413021 -0.941618 -0.33414 0.490491 45 57.5 57.5 0 -1152 1 1 0 50 40.8391 45.9903 0 -0.916092 -0.400968 0.490491 45 57.5 57.5 0 -1153 1 1 0 44.2794 58.1921 50.4064 -0.572055 0.819207 0.0406403 0.490491 45 57.5 57.5 0 -1154 1 1 0 44.2794 58.1921 49.5936 -0.572055 0.819207 -0.0406403 0.490491 45 57.5 57.5 0 -1155 1 1 0 43.8436 57.8384 50.8109 -0.615642 0.783843 0.081086 0.490491 45 57.5 57.5 0 -1156 1 1 0 43.8232 57.8643 50 -0.617676 0.786433 0 0.490491 45 57.5 57.5 0 -1157 1 1 0 43.8436 57.8384 49.1891 -0.615642 0.783843 -0.081086 0.490491 45 57.5 57.5 0 -1158 1 1 0 43.4372 57.4473 51.2114 -0.656282 0.744727 0.121144 0.490491 45 57.5 57.5 0 -1159 1 1 0 43.3912 57.4939 50.4064 -0.660883 0.749387 0.0406418 0.490491 45 57.5 57.5 0 -1160 1 1 0 43.0622 57.0205 51.6062 -0.69378 0.702047 0.160622 0.490491 45 57.5 57.5 0 -1161 1 1 0 42.9938 57.0897 50.8057 -0.700622 0.708969 0.0805729 0.490491 45 57.5 57.5 0 -1162 1 1 0 42.9709 57.1128 50 -0.702907 0.711282 0 0.490491 45 57.5 57.5 0 -1163 1 1 0 43.3912 57.4939 49.5936 -0.660883 0.749387 -0.0406418 0.490491 45 57.5 57.5 0 -1164 1 1 0 43.4372 57.4473 48.7886 -0.656282 0.744727 -0.121144 0.490491 45 57.5 57.5 0 -1165 1 1 0 42.9938 57.0897 49.1943 -0.700622 0.708969 -0.0805729 0.490491 45 57.5 57.5 0 -1166 1 1 0 43.0622 57.0205 48.3938 -0.69378 0.702047 -0.160622 0.490491 45 57.5 57.5 0 -1167 1 1 0 42.7204 56.5601 51.9933 -0.727959 0.656006 0.199331 0.490491 45 57.5 57.5 0 -1168 1 1 0 42.6111 56.6284 51.2119 -0.738887 0.662842 0.121192 0.490491 45 57.5 57.5 0 -1169 1 1 0 42.4135 56.0683 52.3709 -0.758652 0.606825 0.237086 0.490491 45 57.5 57.5 0 -1170 1 1 0 42.2816 56.1546 51.5961 -0.771841 0.615456 0.159613 0.490491 45 57.5 57.5 0 -1171 1 1 0 42.198 56.2024 50.8114 -0.780205 0.620239 0.0811417 0.490491 45 57.5 57.5 0 -1172 1 1 0 42.1428 55.5474 52.7371 -0.785715 0.55474 0.273706 0.490491 45 57.5 57.5 0 -1173 1 1 0 41.985 55.6451 51.9727 -0.801504 0.564513 0.197274 0.490491 45 57.5 57.5 0 -1174 1 1 0 41.9098 55 53.0902 -0.809017 0.5 0.309017 0.490491 45 57.5 57.5 0 -1175 1 1 0 41.7285 55.112 52.3345 -0.827147 0.511205 0.233445 0.490491 45 57.5 57.5 0 -1176 1 1 0 41.5982 55.1926 51.5643 -0.840178 0.519259 0.156434 0.490491 45 57.5 57.5 0 -1177 1 1 0 41.8783 55.7114 51.1908 -0.81217 0.57114 0.119078 0.490491 45 57.5 57.5 0 -1178 1 1 0 41.8248 55.7446 50.4067 -0.817523 0.574458 0.040675 0.490491 45 57.5 57.5 0 -1179 1 1 0 41.5197 55.2411 50.7846 -0.848029 0.52411 0.0784592 0.490491 45 57.5 57.5 0 -1180 1 1 0 41.4935 55.2573 50 -0.850651 0.525731 0 0.490491 45 57.5 57.5 0 -1181 1 1 0 42.6111 56.6284 48.7881 -0.738887 0.662842 -0.121192 0.490491 45 57.5 57.5 0 -1182 1 1 0 42.7204 56.5601 48.0067 -0.727959 0.656006 -0.199331 0.490491 45 57.5 57.5 0 -1183 1 1 0 42.198 56.2024 49.1886 -0.780205 0.620239 -0.0811417 0.490491 45 57.5 57.5 0 -1184 1 1 0 42.2816 56.1546 48.4039 -0.771841 0.615456 -0.159613 0.490491 45 57.5 57.5 0 -1185 1 1 0 42.4135 56.0683 47.6291 -0.758652 0.606825 -0.237086 0.490491 45 57.5 57.5 0 -1186 1 1 0 41.8248 55.7446 49.5933 -0.817523 0.574458 -0.040675 0.490491 45 57.5 57.5 0 -1187 1 1 0 41.8783 55.7114 48.8092 -0.81217 0.57114 -0.119078 0.490491 45 57.5 57.5 0 -1188 1 1 0 41.5197 55.2411 49.2154 -0.848029 0.52411 -0.0784592 0.490491 45 57.5 57.5 0 -1189 1 1 0 41.5982 55.1926 48.4357 -0.840178 0.519259 -0.156434 0.490491 45 57.5 57.5 0 -1190 1 1 0 41.985 55.6451 48.0273 -0.801504 0.564513 -0.197274 0.490491 45 57.5 57.5 0 -1191 1 1 0 42.1428 55.5474 47.2629 -0.785715 0.55474 -0.273706 0.490491 45 57.5 57.5 0 -1192 1 1 0 41.7285 55.112 47.6655 -0.827147 0.511205 -0.233445 0.490491 45 57.5 57.5 0 -1193 1 1 0 41.9098 55 46.9098 -0.809017 0.5 -0.309017 0.490491 45 57.5 57.5 0 -1194 1 1 0 42.565 56.675 50.4068 -0.743496 0.667502 0.0406769 0.490491 45 57.5 57.5 0 -1195 1 1 0 42.1721 56.2229 50 -0.782786 0.622291 0 0.490491 45 57.5 57.5 0 -1196 1 1 0 42.565 56.675 49.5932 -0.743496 0.667502 -0.0406769 0.490491 45 57.5 57.5 0 -1197 1 1 0 41.7155 54.4287 53.4285 -0.828447 0.442867 0.342848 0.490491 45 57.5 57.5 0 -1198 1 1 0 41.4736 54.4446 52.7469 -0.85264 0.444464 0.274694 0.490491 45 57.5 57.5 0 -1199 1 1 0 41.5609 53.8361 53.7504 -0.843912 0.383614 0.375038 0.490491 45 57.5 57.5 0 -1200 1 1 0 41.3027 53.8591 53.0766 -0.869725 0.385906 0.307659 0.490491 45 57.5 57.5 0 -1201 1 1 0 41.0899 53.8619 52.3868 -0.891007 0.386187 0.238677 0.490491 45 57.5 57.5 0 -1202 1 1 0 41.4466 53.2252 54.0543 -0.855337 0.322525 0.405434 0.490491 45 57.5 57.5 0 -1203 1 1 0 41.1716 53.2486 53.3921 -0.882837 0.324863 0.339209 0.490491 45 57.5 57.5 0 -1204 1 1 0 41.3733 52.5989 54.3389 -0.862669 0.259892 0.433888 0.490491 45 57.5 57.5 0 -1205 1 1 0 41.0826 52.6266 53.6852 -0.891742 0.262661 0.368518 0.490491 45 57.5 57.5 0 -1206 1 1 0 40.8376 52.6408 53.0126 -0.916244 0.264082 0.301258 0.490491 45 57.5 57.5 0 -1207 1 1 0 40.9417 53.2593 52.7063 -0.905832 0.325929 0.270627 0.490491 45 57.5 57.5 0 -1208 1 1 0 40.7612 53.2553 52.0119 -0.92388 0.32553 0.201189 0.490491 45 57.5 57.5 0 -1209 1 1 0 40.6395 52.6415 52.3245 -0.93605 0.264151 0.232455 0.490491 45 57.5 57.5 0 -1210 1 1 0 40.4894 52.6287 51.6246 -0.951057 0.262865 0.16246 0.490491 45 57.5 57.5 0 -1211 1 1 0 41.3413 51.9602 54.6027 -0.865871 0.196015 0.460266 0.490491 45 57.5 57.5 0 -1212 1 1 0 41.036 51.9641 53.9735 -0.896401 0.196412 0.39735 0.490491 45 57.5 57.5 0 -1213 1 1 0 41.3507 51.312 54.8444 -0.864929 0.1312 0.484441 0.490491 45 57.5 57.5 0 -1214 1 1 0 41.032 51.3175 54.2236 -0.896801 0.131749 0.422363 0.490491 45 57.5 57.5 0 -1215 1 1 0 40.757 51.3166 53.5823 -0.924305 0.131656 0.358229 0.490491 45 57.5 57.5 0 -1216 1 1 0 41.4015 50.6576 55.063 -0.859848 0.0657577 0.506298 0.490491 45 57.5 57.5 0 -1217 1 1 0 41.0707 50.6582 54.4537 -0.892927 0.0658169 0.445365 0.490491 45 57.5 57.5 0 -1218 1 1 0 41.1503 50 54.6566 -0.884965 0 0.465657 0.490491 45 57.5 57.5 0 -1219 1 1 0 40.8496 50 54.0336 -0.915043 0 0.403355 0.490491 45 57.5 57.5 0 -1220 1 1 0 40.7808 50.6599 53.8172 -0.921919 0.0659886 0.381722 0.490491 45 57.5 57.5 0 -1221 1 1 0 40.538 50.6604 53.1678 -0.946198 0.0660427 0.316778 0.490491 45 57.5 57.5 0 -1222 1 1 0 40.5926 50 53.3912 -0.940742 0 0.339122 0.490491 45 57.5 57.5 0 -1223 1 1 0 40.3806 50 52.7327 -0.961938 0 0.273267 0.490491 45 57.5 57.5 0 -1224 1 1 0 40.3881 51.9834 51.9178 -0.961188 0.198337 0.19178 0.490491 45 57.5 57.5 0 -1225 1 1 0 40.2763 51.9858 51.2273 -0.97237 0.198581 0.122729 0.490491 45 57.5 57.5 0 -1226 1 1 0 40.3361 51.3279 52.2012 -0.966393 0.132792 0.220117 0.490491 45 57.5 57.5 0 -1227 1 1 0 40.2057 51.3326 51.5155 -0.979426 0.133256 0.151549 0.490491 45 57.5 57.5 0 -1228 1 1 0 40.1231 51.3307 50.8224 -0.987688 0.133071 0.0822422 0.490491 45 57.5 57.5 0 -1229 1 1 0 40.3336 50.6657 52.4733 -0.966643 0.0665668 0.247326 0.490491 45 57.5 57.5 0 -1230 1 1 0 40.1852 50.666 51.796 -0.981483 0.0666046 0.179596 0.490491 45 57.5 57.5 0 -1231 1 1 0 40.2147 50 52.061 -0.97853 0 0.206103 0.490491 45 57.5 57.5 0 -1232 1 1 0 40.0956 50 51.3795 -0.990439 0 0.137952 0.490491 45 57.5 57.5 0 -1233 1 1 0 40.0835 50.6671 51.1039 -0.991648 0.0667095 0.110385 0.490491 45 57.5 57.5 0 -1234 1 1 0 40.0308 50.6674 50.4125 -0.996917 0.0667412 0.0412479 0.490491 45 57.5 57.5 0 -1235 1 1 0 40.0239 50 50.6914 -0.997607 0 0.0691418 0.490491 45 57.5 57.5 0 -1236 1 1 0 40 50 50 -1 0 0 0.490491 45 57.5 57.5 0 -1237 1 1 0 40.7732 51.9839 53.3061 -0.922682 0.198387 0.330606 0.490491 45 57.5 57.5 0 -1238 1 1 0 40.5218 51.3257 52.8993 -0.947822 0.13257 0.289929 0.490491 45 57.5 57.5 0 -1239 1 1 0 40.5557 51.9909 52.6155 -0.944433 0.199094 0.26155 0.490491 45 57.5 57.5 0 -1240 1 1 0 41.4736 54.4446 47.2531 -0.85264 0.444464 -0.274694 0.490491 45 57.5 57.5 0 -1241 1 1 0 41.7155 54.4287 46.5715 -0.828447 0.442867 -0.342848 0.490491 45 57.5 57.5 0 -1242 1 1 0 41.0899 53.8619 47.6132 -0.891007 0.386187 -0.238677 0.490491 45 57.5 57.5 0 -1243 1 1 0 41.3027 53.8591 46.9234 -0.869725 0.385906 -0.307659 0.490491 45 57.5 57.5 0 -1244 1 1 0 41.5609 53.8361 46.2496 -0.843912 0.383614 -0.375038 0.490491 45 57.5 57.5 0 -1245 1 1 0 40.7612 53.2553 47.9881 -0.92388 0.32553 -0.201189 0.490491 45 57.5 57.5 0 -1246 1 1 0 40.9417 53.2593 47.2937 -0.905832 0.325929 -0.270627 0.490491 45 57.5 57.5 0 -1247 1 1 0 40.4894 52.6287 48.3754 -0.951057 0.262865 -0.16246 0.490491 45 57.5 57.5 0 -1248 1 1 0 40.6395 52.6415 47.6755 -0.93605 0.264151 -0.232455 0.490491 45 57.5 57.5 0 -1249 1 1 0 40.8376 52.6408 46.9874 -0.916244 0.264082 -0.301258 0.490491 45 57.5 57.5 0 -1250 1 1 0 41.1716 53.2486 46.6079 -0.882837 0.324863 -0.339209 0.490491 45 57.5 57.5 0 -1251 1 1 0 41.4466 53.2252 45.9457 -0.855337 0.322525 -0.405434 0.490491 45 57.5 57.5 0 -1252 1 1 0 41.0826 52.6266 46.3148 -0.891742 0.262661 -0.368518 0.490491 45 57.5 57.5 0 -1253 1 1 0 41.3733 52.5989 45.6611 -0.862669 0.259892 -0.433888 0.490491 45 57.5 57.5 0 -1254 1 1 0 40.2763 51.9858 48.7727 -0.97237 0.198581 -0.122729 0.490491 45 57.5 57.5 0 -1255 1 1 0 40.3881 51.9834 48.0822 -0.961188 0.198337 -0.19178 0.490491 45 57.5 57.5 0 -1256 1 1 0 40.1231 51.3307 49.1776 -0.987688 0.133071 -0.0822422 0.490491 45 57.5 57.5 0 -1257 1 1 0 40.2057 51.3326 48.4845 -0.979426 0.133256 -0.151549 0.490491 45 57.5 57.5 0 -1258 1 1 0 40.3361 51.3279 47.7988 -0.966393 0.132792 -0.220117 0.490491 45 57.5 57.5 0 -1259 1 1 0 40.0308 50.6674 49.5875 -0.996917 0.0667412 -0.0412479 0.490491 45 57.5 57.5 0 -1260 1 1 0 40.0835 50.6671 48.8961 -0.991648 0.0667095 -0.110385 0.490491 45 57.5 57.5 0 -1261 1 1 0 40.0239 50 49.3086 -0.997607 0 -0.0691418 0.490491 45 57.5 57.5 0 -1262 1 1 0 40.0956 50 48.6205 -0.990439 0 -0.137952 0.490491 45 57.5 57.5 0 -1263 1 1 0 40.1852 50.666 48.204 -0.981483 0.0666046 -0.179596 0.490491 45 57.5 57.5 0 -1264 1 1 0 40.3336 50.6657 47.5267 -0.966643 0.0665668 -0.247326 0.490491 45 57.5 57.5 0 -1265 1 1 0 40.2147 50 47.939 -0.97853 0 -0.206103 0.490491 45 57.5 57.5 0 -1266 1 1 0 40.3806 50 47.2673 -0.961938 0 -0.273267 0.490491 45 57.5 57.5 0 -1267 1 1 0 41.036 51.9641 46.0265 -0.896401 0.196412 -0.39735 0.490491 45 57.5 57.5 0 -1268 1 1 0 41.3413 51.9602 45.3973 -0.865871 0.196015 -0.460266 0.490491 45 57.5 57.5 0 -1269 1 1 0 40.757 51.3166 46.4177 -0.924305 0.131656 -0.358229 0.490491 45 57.5 57.5 0 -1270 1 1 0 41.032 51.3175 45.7764 -0.896801 0.131749 -0.422363 0.490491 45 57.5 57.5 0 -1271 1 1 0 41.3507 51.312 45.1556 -0.864929 0.1312 -0.484441 0.490491 45 57.5 57.5 0 -1272 1 1 0 40.538 50.6604 46.8322 -0.946198 0.0660427 -0.316778 0.490491 45 57.5 57.5 0 -1273 1 1 0 40.7808 50.6599 46.1828 -0.921919 0.0659886 -0.381722 0.490491 45 57.5 57.5 0 -1274 1 1 0 40.5926 50 46.6088 -0.940742 0 -0.339122 0.490491 45 57.5 57.5 0 -1275 1 1 0 40.8496 50 45.9664 -0.915043 0 -0.403355 0.490491 45 57.5 57.5 0 -1276 1 1 0 41.0707 50.6582 45.5463 -0.892927 0.0658169 -0.445365 0.490491 45 57.5 57.5 0 -1277 1 1 0 41.4015 50.6576 44.937 -0.859848 0.0657577 -0.506298 0.490491 45 57.5 57.5 0 -1278 1 1 0 41.1503 50 45.3434 -0.884965 0 -0.465657 0.490491 45 57.5 57.5 0 -1279 1 1 0 40.5557 51.9909 47.3845 -0.944433 0.199094 -0.26155 0.490491 45 57.5 57.5 0 -1280 1 1 0 40.5218 51.3257 47.1007 -0.947822 0.13257 -0.289929 0.490491 45 57.5 57.5 0 -1281 1 1 0 40.7732 51.9839 46.6939 -0.922682 0.198387 -0.330606 0.490491 45 57.5 57.5 0 -1282 1 1 0 41.3147 54.5426 51.9823 -0.868535 0.454262 0.198227 0.490491 45 57.5 57.5 0 -1283 1 1 0 40.9516 53.9414 51.6101 -0.904839 0.394136 0.161007 0.490491 45 57.5 57.5 0 -1284 1 1 0 40.6487 53.3234 51.228 -0.93513 0.332342 0.1228 0.490491 45 57.5 57.5 0 -1285 1 1 0 40.8702 53.9961 50.8232 -0.912983 0.399607 0.0823235 0.490491 45 57.5 57.5 0 -1286 1 1 0 41.2066 54.6088 51.1976 -0.879344 0.460882 0.119755 0.490491 45 57.5 57.5 0 -1287 1 1 0 41.1524 54.6421 50.413 -0.88476 0.464213 0.0412991 0.490491 45 57.5 57.5 0 -1288 1 1 0 40.3935 52.6552 50.815 -0.960655 0.265519 0.081501 0.490491 45 57.5 57.5 0 -1289 1 1 0 40.2115 52.0037 50.4125 -0.978852 0.200368 0.0412506 0.490491 45 57.5 57.5 0 -1290 1 1 0 40.3614 52.664 50 -0.963861 0.266405 0 0.490491 45 57.5 57.5 0 -1291 1 1 0 40.0895 51.3352 50 -0.991046 0.133524 0 0.490491 45 57.5 57.5 0 -1292 1 1 0 40.2115 52.0037 49.5875 -0.978852 0.200368 -0.0412506 0.490491 45 57.5 57.5 0 -1293 1 1 0 40.3935 52.6552 49.185 -0.960655 0.265519 -0.081501 0.490491 45 57.5 57.5 0 -1294 1 1 0 41.1524 54.6421 49.587 -0.88476 0.464213 -0.0412991 0.490491 45 57.5 57.5 0 -1295 1 1 0 40.8702 53.9961 49.1768 -0.912983 0.399607 -0.0823235 0.490491 45 57.5 57.5 0 -1296 1 1 0 41.2066 54.6088 48.8024 -0.879344 0.460882 -0.119755 0.490491 45 57.5 57.5 0 -1297 1 1 0 40.6487 53.3234 48.772 -0.93513 0.332342 -0.1228 0.490491 45 57.5 57.5 0 -1298 1 1 0 40.9516 53.9414 48.3899 -0.904839 0.394136 -0.161007 0.490491 45 57.5 57.5 0 -1299 1 1 0 41.3147 54.5426 48.0177 -0.868535 0.454262 -0.198227 0.490491 45 57.5 57.5 0 -1300 1 1 0 40.5838 53.3414 50.413 -0.941618 0.33414 0.0413021 0.490491 45 57.5 57.5 0 -1301 1 1 0 40.5838 53.3414 49.587 -0.941618 0.33414 -0.0413021 0.490491 45 57.5 57.5 0 -1302 1 1 0 40.8391 54.0097 50 -0.916092 0.400968 0 0.490491 45 57.5 57.5 0 -1303 1 1 0 44.2794 41.8079 49.5936 -0.572055 -0.819207 -0.0406403 0.490491 45 57.5 57.5 0 -1304 1 1 0 44.2794 41.8079 50.4064 -0.572055 -0.819207 0.0406403 0.490491 45 57.5 57.5 0 -1305 1 1 0 43.8436 42.1616 49.1891 -0.615642 -0.783843 -0.081086 0.490491 45 57.5 57.5 0 -1306 1 1 0 43.8232 42.1357 50 -0.617676 -0.786433 0 0.490491 45 57.5 57.5 0 -1307 1 1 0 43.8436 42.1616 50.8109 -0.615642 -0.783843 0.081086 0.490491 45 57.5 57.5 0 -1308 1 1 0 43.4372 42.5527 48.7886 -0.656282 -0.744727 -0.121144 0.490491 45 57.5 57.5 0 -1309 1 1 0 43.3912 42.5061 49.5936 -0.660883 -0.749387 -0.0406418 0.490491 45 57.5 57.5 0 -1310 1 1 0 43.0622 42.9795 48.3938 -0.69378 -0.702047 -0.160622 0.490491 45 57.5 57.5 0 -1311 1 1 0 42.9938 42.9103 49.1943 -0.700622 -0.708969 -0.0805729 0.490491 45 57.5 57.5 0 -1312 1 1 0 42.9709 42.8872 50 -0.702907 -0.711282 0 0.490491 45 57.5 57.5 0 -1313 1 1 0 43.3912 42.5061 50.4064 -0.660883 -0.749387 0.0406418 0.490491 45 57.5 57.5 0 -1314 1 1 0 43.4372 42.5527 51.2114 -0.656282 -0.744727 0.121144 0.490491 45 57.5 57.5 0 -1315 1 1 0 42.9938 42.9103 50.8057 -0.700622 -0.708969 0.0805729 0.490491 45 57.5 57.5 0 -1316 1 1 0 43.0622 42.9795 51.6062 -0.69378 -0.702047 0.160622 0.490491 45 57.5 57.5 0 -1317 1 1 0 42.7204 43.4399 48.0067 -0.727959 -0.656006 -0.199331 0.490491 45 57.5 57.5 0 -1318 1 1 0 42.6111 43.3716 48.7881 -0.738887 -0.662842 -0.121192 0.490491 45 57.5 57.5 0 -1319 1 1 0 42.4135 43.9317 47.6291 -0.758652 -0.606825 -0.237086 0.490491 45 57.5 57.5 0 -1320 1 1 0 42.2816 43.8454 48.4039 -0.771841 -0.615456 -0.159613 0.490491 45 57.5 57.5 0 -1321 1 1 0 42.198 43.7976 49.1886 -0.780205 -0.620239 -0.0811417 0.490491 45 57.5 57.5 0 -1322 1 1 0 42.1428 44.4526 47.2629 -0.785715 -0.55474 -0.273706 0.490491 45 57.5 57.5 0 -1323 1 1 0 41.985 44.3549 48.0273 -0.801504 -0.564513 -0.197274 0.490491 45 57.5 57.5 0 -1324 1 1 0 41.9098 45 46.9098 -0.809017 -0.5 -0.309017 0.490491 45 57.5 57.5 0 -1325 1 1 0 41.7285 44.888 47.6655 -0.827147 -0.511205 -0.233445 0.490491 45 57.5 57.5 0 -1326 1 1 0 41.5982 44.8074 48.4357 -0.840178 -0.519259 -0.156434 0.490491 45 57.5 57.5 0 -1327 1 1 0 41.8783 44.2886 48.8092 -0.81217 -0.57114 -0.119078 0.490491 45 57.5 57.5 0 -1328 1 1 0 41.8248 44.2554 49.5933 -0.817523 -0.574458 -0.040675 0.490491 45 57.5 57.5 0 -1329 1 1 0 41.5197 44.7589 49.2154 -0.848029 -0.52411 -0.0784592 0.490491 45 57.5 57.5 0 -1330 1 1 0 41.4935 44.7427 50 -0.850651 -0.525731 0 0.490491 45 57.5 57.5 0 -1331 1 1 0 42.6111 43.3716 51.2119 -0.738887 -0.662842 0.121192 0.490491 45 57.5 57.5 0 -1332 1 1 0 42.7204 43.4399 51.9933 -0.727959 -0.656006 0.199331 0.490491 45 57.5 57.5 0 -1333 1 1 0 42.198 43.7976 50.8114 -0.780205 -0.620239 0.0811417 0.490491 45 57.5 57.5 0 -1334 1 1 0 42.2816 43.8454 51.5961 -0.771841 -0.615456 0.159613 0.490491 45 57.5 57.5 0 -1335 1 1 0 42.4135 43.9317 52.3709 -0.758652 -0.606825 0.237086 0.490491 45 57.5 57.5 0 -1336 1 1 0 41.8248 44.2554 50.4067 -0.817523 -0.574458 0.040675 0.490491 45 57.5 57.5 0 -1337 1 1 0 41.8783 44.2886 51.1908 -0.81217 -0.57114 0.119078 0.490491 45 57.5 57.5 0 -1338 1 1 0 41.5197 44.7589 50.7846 -0.848029 -0.52411 0.0784592 0.490491 45 57.5 57.5 0 -1339 1 1 0 41.5982 44.8074 51.5643 -0.840178 -0.519259 0.156434 0.490491 45 57.5 57.5 0 -1340 1 1 0 41.985 44.3549 51.9727 -0.801504 -0.564513 0.197274 0.490491 45 57.5 57.5 0 -1341 1 1 0 42.1428 44.4526 52.7371 -0.785715 -0.55474 0.273706 0.490491 45 57.5 57.5 0 -1342 1 1 0 41.7285 44.888 52.3345 -0.827147 -0.511205 0.233445 0.490491 45 57.5 57.5 0 -1343 1 1 0 41.9098 45 53.0902 -0.809017 -0.5 0.309017 0.490491 45 57.5 57.5 0 -1344 1 1 0 42.565 43.325 49.5932 -0.743496 -0.667502 -0.0406769 0.490491 45 57.5 57.5 0 -1345 1 1 0 42.1721 43.7771 50 -0.782786 -0.622291 0 0.490491 45 57.5 57.5 0 -1346 1 1 0 42.565 43.325 50.4068 -0.743496 -0.667502 0.0406769 0.490491 45 57.5 57.5 0 -1347 1 1 0 41.7155 45.5713 46.5715 -0.828447 -0.442867 -0.342848 0.490491 45 57.5 57.5 0 -1348 1 1 0 41.4736 45.5554 47.2531 -0.85264 -0.444464 -0.274694 0.490491 45 57.5 57.5 0 -1349 1 1 0 41.5609 46.1639 46.2496 -0.843912 -0.383614 -0.375038 0.490491 45 57.5 57.5 0 -1350 1 1 0 41.3027 46.1409 46.9234 -0.869725 -0.385906 -0.307659 0.490491 45 57.5 57.5 0 -1351 1 1 0 41.0899 46.1381 47.6132 -0.891007 -0.386187 -0.238677 0.490491 45 57.5 57.5 0 -1352 1 1 0 41.4466 46.7748 45.9457 -0.855337 -0.322525 -0.405434 0.490491 45 57.5 57.5 0 -1353 1 1 0 41.1716 46.7514 46.6079 -0.882837 -0.324863 -0.339209 0.490491 45 57.5 57.5 0 -1354 1 1 0 41.3733 47.4011 45.6611 -0.862669 -0.259892 -0.433888 0.490491 45 57.5 57.5 0 -1355 1 1 0 41.0826 47.3734 46.3148 -0.891742 -0.262661 -0.368518 0.490491 45 57.5 57.5 0 -1356 1 1 0 40.8376 47.3592 46.9874 -0.916244 -0.264082 -0.301258 0.490491 45 57.5 57.5 0 -1357 1 1 0 40.9417 46.7407 47.2937 -0.905832 -0.325929 -0.270627 0.490491 45 57.5 57.5 0 -1358 1 1 0 40.7612 46.7447 47.9881 -0.92388 -0.32553 -0.201189 0.490491 45 57.5 57.5 0 -1359 1 1 0 40.6395 47.3585 47.6755 -0.93605 -0.264151 -0.232455 0.490491 45 57.5 57.5 0 -1360 1 1 0 40.4894 47.3713 48.3754 -0.951057 -0.262865 -0.16246 0.490491 45 57.5 57.5 0 -1361 1 1 0 41.3413 48.0398 45.3973 -0.865871 -0.196015 -0.460266 0.490491 45 57.5 57.5 0 -1362 1 1 0 41.036 48.0359 46.0265 -0.896401 -0.196412 -0.39735 0.490491 45 57.5 57.5 0 -1363 1 1 0 41.3507 48.688 45.1556 -0.864929 -0.1312 -0.484441 0.490491 45 57.5 57.5 0 -1364 1 1 0 41.032 48.6825 45.7764 -0.896801 -0.131749 -0.422363 0.490491 45 57.5 57.5 0 -1365 1 1 0 40.757 48.6834 46.4177 -0.924305 -0.131656 -0.358229 0.490491 45 57.5 57.5 0 -1366 1 1 0 41.4015 49.3424 44.937 -0.859848 -0.0657577 -0.506298 0.490491 45 57.5 57.5 0 -1367 1 1 0 41.0707 49.3418 45.5463 -0.892927 -0.0658169 -0.445365 0.490491 45 57.5 57.5 0 -1368 1 1 0 40.7808 49.3401 46.1828 -0.921919 -0.0659886 -0.381722 0.490491 45 57.5 57.5 0 -1369 1 1 0 40.538 49.3396 46.8322 -0.946198 -0.0660427 -0.316778 0.490491 45 57.5 57.5 0 -1370 1 1 0 40.3881 48.0166 48.0822 -0.961188 -0.198337 -0.19178 0.490491 45 57.5 57.5 0 -1371 1 1 0 40.2763 48.0142 48.7727 -0.97237 -0.198581 -0.122729 0.490491 45 57.5 57.5 0 -1372 1 1 0 40.3361 48.6721 47.7988 -0.966393 -0.132792 -0.220117 0.490491 45 57.5 57.5 0 -1373 1 1 0 40.2057 48.6674 48.4845 -0.979426 -0.133256 -0.151549 0.490491 45 57.5 57.5 0 -1374 1 1 0 40.1231 48.6693 49.1776 -0.987688 -0.133071 -0.0822422 0.490491 45 57.5 57.5 0 -1375 1 1 0 40.3336 49.3343 47.5267 -0.966643 -0.0665668 -0.247326 0.490491 45 57.5 57.5 0 -1376 1 1 0 40.1852 49.334 48.204 -0.981483 -0.0666046 -0.179596 0.490491 45 57.5 57.5 0 -1377 1 1 0 40.0835 49.3329 48.8961 -0.991648 -0.0667095 -0.110385 0.490491 45 57.5 57.5 0 -1378 1 1 0 40.0308 49.3326 49.5875 -0.996917 -0.0667412 -0.0412479 0.490491 45 57.5 57.5 0 -1379 1 1 0 40.7732 48.0161 46.6939 -0.922682 -0.198387 -0.330606 0.490491 45 57.5 57.5 0 -1380 1 1 0 40.5218 48.6743 47.1007 -0.947822 -0.13257 -0.289929 0.490491 45 57.5 57.5 0 -1381 1 1 0 40.5557 48.0091 47.3845 -0.944433 -0.199094 -0.26155 0.490491 45 57.5 57.5 0 -1382 1 1 0 41.4736 45.5554 52.7469 -0.85264 -0.444464 0.274694 0.490491 45 57.5 57.5 0 -1383 1 1 0 41.7155 45.5713 53.4285 -0.828447 -0.442867 0.342848 0.490491 45 57.5 57.5 0 -1384 1 1 0 41.0899 46.1381 52.3868 -0.891007 -0.386187 0.238677 0.490491 45 57.5 57.5 0 -1385 1 1 0 41.3027 46.1409 53.0766 -0.869725 -0.385906 0.307659 0.490491 45 57.5 57.5 0 -1386 1 1 0 41.5609 46.1639 53.7504 -0.843912 -0.383614 0.375038 0.490491 45 57.5 57.5 0 -1387 1 1 0 40.7612 46.7447 52.0119 -0.92388 -0.32553 0.201189 0.490491 45 57.5 57.5 0 -1388 1 1 0 40.9417 46.7407 52.7063 -0.905832 -0.325929 0.270627 0.490491 45 57.5 57.5 0 -1389 1 1 0 40.4894 47.3713 51.6246 -0.951057 -0.262865 0.16246 0.490491 45 57.5 57.5 0 -1390 1 1 0 40.6395 47.3585 52.3245 -0.93605 -0.264151 0.232455 0.490491 45 57.5 57.5 0 -1391 1 1 0 40.8376 47.3592 53.0126 -0.916244 -0.264082 0.301258 0.490491 45 57.5 57.5 0 -1392 1 1 0 41.1716 46.7514 53.3921 -0.882837 -0.324863 0.339209 0.490491 45 57.5 57.5 0 -1393 1 1 0 41.4466 46.7748 54.0543 -0.855337 -0.322525 0.405434 0.490491 45 57.5 57.5 0 -1394 1 1 0 41.0826 47.3734 53.6852 -0.891742 -0.262661 0.368518 0.490491 45 57.5 57.5 0 -1395 1 1 0 41.3733 47.4011 54.3389 -0.862669 -0.259892 0.433888 0.490491 45 57.5 57.5 0 -1396 1 1 0 40.2763 48.0142 51.2273 -0.97237 -0.198581 0.122729 0.490491 45 57.5 57.5 0 -1397 1 1 0 40.3881 48.0166 51.9178 -0.961188 -0.198337 0.19178 0.490491 45 57.5 57.5 0 -1398 1 1 0 40.1231 48.6693 50.8224 -0.987688 -0.133071 0.0822422 0.490491 45 57.5 57.5 0 -1399 1 1 0 40.2057 48.6674 51.5155 -0.979426 -0.133256 0.151549 0.490491 45 57.5 57.5 0 -1400 1 1 0 40.3361 48.6721 52.2012 -0.966393 -0.132792 0.220117 0.490491 45 57.5 57.5 0 -1401 1 1 0 40.0308 49.3326 50.4125 -0.996917 -0.0667412 0.0412479 0.490491 45 57.5 57.5 0 -1402 1 1 0 40.0835 49.3329 51.1039 -0.991648 -0.0667095 0.110385 0.490491 45 57.5 57.5 0 -1403 1 1 0 40.1852 49.334 51.796 -0.981483 -0.0666046 0.179596 0.490491 45 57.5 57.5 0 -1404 1 1 0 40.3336 49.3343 52.4733 -0.966643 -0.0665668 0.247326 0.490491 45 57.5 57.5 0 -1405 1 1 0 41.036 48.0359 53.9735 -0.896401 -0.196412 0.39735 0.490491 45 57.5 57.5 0 -1406 1 1 0 41.3413 48.0398 54.6027 -0.865871 -0.196015 0.460266 0.490491 45 57.5 57.5 0 -1407 1 1 0 40.757 48.6834 53.5823 -0.924305 -0.131656 0.358229 0.490491 45 57.5 57.5 0 -1408 1 1 0 41.032 48.6825 54.2236 -0.896801 -0.131749 0.422363 0.490491 45 57.5 57.5 0 -1409 1 1 0 41.3507 48.688 54.8444 -0.864929 -0.1312 0.484441 0.490491 45 57.5 57.5 0 -1410 1 1 0 40.538 49.3396 53.1678 -0.946198 -0.0660427 0.316778 0.490491 45 57.5 57.5 0 -1411 1 1 0 40.7808 49.3401 53.8172 -0.921919 -0.0659886 0.381722 0.490491 45 57.5 57.5 0 -1412 1 1 0 41.0707 49.3418 54.4537 -0.892927 -0.0658169 0.445365 0.490491 45 57.5 57.5 0 -1413 1 1 0 41.4015 49.3424 55.063 -0.859848 -0.0657577 0.506298 0.490491 45 57.5 57.5 0 -1414 1 1 0 40.5557 48.0091 52.6155 -0.944433 -0.199094 0.26155 0.490491 45 57.5 57.5 0 -1415 1 1 0 40.5218 48.6743 52.8993 -0.947822 -0.13257 0.289929 0.490491 45 57.5 57.5 0 -1416 1 1 0 40.7732 48.0161 53.3061 -0.922682 -0.198387 0.330606 0.490491 45 57.5 57.5 0 -1417 1 1 0 41.3147 45.4574 48.0177 -0.868535 -0.454262 -0.198227 0.490491 45 57.5 57.5 0 -1418 1 1 0 40.9516 46.0586 48.3899 -0.904839 -0.394136 -0.161007 0.490491 45 57.5 57.5 0 -1419 1 1 0 40.6487 46.6766 48.772 -0.93513 -0.332342 -0.1228 0.490491 45 57.5 57.5 0 -1420 1 1 0 40.8702 46.0039 49.1768 -0.912983 -0.399607 -0.0823235 0.490491 45 57.5 57.5 0 -1421 1 1 0 41.2066 45.3912 48.8024 -0.879344 -0.460882 -0.119755 0.490491 45 57.5 57.5 0 -1422 1 1 0 41.1524 45.3579 49.587 -0.88476 -0.464213 -0.0412991 0.490491 45 57.5 57.5 0 -1423 1 1 0 40.3935 47.3448 49.185 -0.960655 -0.265519 -0.081501 0.490491 45 57.5 57.5 0 -1424 1 1 0 40.2115 47.9963 49.5875 -0.978852 -0.200368 -0.0412506 0.490491 45 57.5 57.5 0 -1425 1 1 0 40.3614 47.336 50 -0.963861 -0.266405 0 0.490491 45 57.5 57.5 0 -1426 1 1 0 40.0895 48.6648 50 -0.991046 -0.133524 0 0.490491 45 57.5 57.5 0 -1427 1 1 0 40.2115 47.9963 50.4125 -0.978852 -0.200368 0.0412506 0.490491 45 57.5 57.5 0 -1428 1 1 0 40.3935 47.3448 50.815 -0.960655 -0.265519 0.081501 0.490491 45 57.5 57.5 0 -1429 1 1 0 41.1524 45.3579 50.413 -0.88476 -0.464213 0.0412991 0.490491 45 57.5 57.5 0 -1430 1 1 0 40.8702 46.0039 50.8232 -0.912983 -0.399607 0.0823235 0.490491 45 57.5 57.5 0 -1431 1 1 0 41.2066 45.3912 51.1976 -0.879344 -0.460882 0.119755 0.490491 45 57.5 57.5 0 -1432 1 1 0 40.6487 46.6766 51.228 -0.93513 -0.332342 0.1228 0.490491 45 57.5 57.5 0 -1433 1 1 0 40.9516 46.0586 51.6101 -0.904839 -0.394136 0.161007 0.490491 45 57.5 57.5 0 -1434 1 1 0 41.3147 45.4574 51.9823 -0.868535 -0.454262 0.198227 0.490491 45 57.5 57.5 0 -1435 1 1 0 40.5838 46.6586 49.587 -0.941618 -0.33414 -0.0413021 0.490491 45 57.5 57.5 0 -1436 1 1 0 40.5838 46.6586 50.413 -0.941618 -0.33414 0.0413021 0.490491 45 57.5 57.5 0 -1437 1 1 0 40.8391 45.9903 50 -0.916092 -0.400968 0 0.490491 45 57.5 57.5 0 -1438 1 1 0 55.7206 58.1921 49.5936 0.572055 0.819207 -0.0406403 0.490491 45 57.5 57.5 0 -1439 1 1 0 55.7206 58.1921 50.4064 0.572055 0.819207 0.0406403 0.490491 45 57.5 57.5 0 -1440 1 1 0 56.1564 57.8384 49.1891 0.615642 0.783843 -0.081086 0.490491 45 57.5 57.5 0 -1441 1 1 0 56.1768 57.8643 50 0.617676 0.786433 0 0.490491 45 57.5 57.5 0 -1442 1 1 0 56.1564 57.8384 50.8109 0.615642 0.783843 0.081086 0.490491 45 57.5 57.5 0 -1443 1 1 0 56.5628 57.4473 48.7886 0.656282 0.744727 -0.121144 0.490491 45 57.5 57.5 0 -1444 1 1 0 56.6088 57.4939 49.5936 0.660883 0.749387 -0.0406418 0.490491 45 57.5 57.5 0 -1445 1 1 0 56.9378 57.0205 48.3938 0.69378 0.702047 -0.160622 0.490491 45 57.5 57.5 0 -1446 1 1 0 57.0062 57.0897 49.1943 0.700622 0.708969 -0.0805729 0.490491 45 57.5 57.5 0 -1447 1 1 0 57.0291 57.1128 50 0.702907 0.711282 0 0.490491 45 57.5 57.5 0 -1448 1 1 0 56.6088 57.4939 50.4064 0.660883 0.749387 0.0406418 0.490491 45 57.5 57.5 0 -1449 1 1 0 56.5628 57.4473 51.2114 0.656282 0.744727 0.121144 0.490491 45 57.5 57.5 0 -1450 1 1 0 57.0062 57.0897 50.8057 0.700622 0.708969 0.0805729 0.490491 45 57.5 57.5 0 -1451 1 1 0 56.9378 57.0205 51.6062 0.69378 0.702047 0.160622 0.490491 45 57.5 57.5 0 -1452 1 1 0 57.2796 56.5601 48.0067 0.727959 0.656006 -0.199331 0.490491 45 57.5 57.5 0 -1453 1 1 0 57.3889 56.6284 48.7881 0.738887 0.662842 -0.121192 0.490491 45 57.5 57.5 0 -1454 1 1 0 57.5865 56.0683 47.6291 0.758652 0.606825 -0.237086 0.490491 45 57.5 57.5 0 -1455 1 1 0 57.7184 56.1546 48.4039 0.771841 0.615456 -0.159613 0.490491 45 57.5 57.5 0 -1456 1 1 0 57.802 56.2024 49.1886 0.780205 0.620239 -0.0811417 0.490491 45 57.5 57.5 0 -1457 1 1 0 57.8572 55.5474 47.2629 0.785715 0.55474 -0.273706 0.490491 45 57.5 57.5 0 -1458 1 1 0 58.015 55.6451 48.0273 0.801504 0.564513 -0.197274 0.490491 45 57.5 57.5 0 -1459 1 1 0 58.0902 55 46.9098 0.809017 0.5 -0.309017 0.490491 45 57.5 57.5 0 -1460 1 1 0 58.2715 55.112 47.6655 0.827147 0.511205 -0.233445 0.490491 45 57.5 57.5 0 -1461 1 1 0 58.4018 55.1926 48.4357 0.840178 0.519259 -0.156434 0.490491 45 57.5 57.5 0 -1462 1 1 0 58.1217 55.7114 48.8092 0.81217 0.57114 -0.119078 0.490491 45 57.5 57.5 0 -1463 1 1 0 58.1752 55.7446 49.5933 0.817523 0.574458 -0.040675 0.490491 45 57.5 57.5 0 -1464 1 1 0 58.4803 55.2411 49.2154 0.848029 0.52411 -0.0784592 0.490491 45 57.5 57.5 0 -1465 1 1 0 58.5065 55.2573 50 0.850651 0.525731 0 0.490491 45 57.5 57.5 0 -1466 1 1 0 57.3889 56.6284 51.2119 0.738887 0.662842 0.121192 0.490491 45 57.5 57.5 0 -1467 1 1 0 57.2796 56.5601 51.9933 0.727959 0.656006 0.199331 0.490491 45 57.5 57.5 0 -1468 1 1 0 57.802 56.2024 50.8114 0.780205 0.620239 0.0811417 0.490491 45 57.5 57.5 0 -1469 1 1 0 57.7184 56.1546 51.5961 0.771841 0.615456 0.159613 0.490491 45 57.5 57.5 0 -1470 1 1 0 57.5865 56.0683 52.3709 0.758652 0.606825 0.237086 0.490491 45 57.5 57.5 0 -1471 1 1 0 58.1752 55.7446 50.4067 0.817523 0.574458 0.040675 0.490491 45 57.5 57.5 0 -1472 1 1 0 58.1217 55.7114 51.1908 0.81217 0.57114 0.119078 0.490491 45 57.5 57.5 0 -1473 1 1 0 58.4803 55.2411 50.7846 0.848029 0.52411 0.0784592 0.490491 45 57.5 57.5 0 -1474 1 1 0 58.4018 55.1926 51.5643 0.840178 0.519259 0.156434 0.490491 45 57.5 57.5 0 -1475 1 1 0 58.015 55.6451 51.9727 0.801504 0.564513 0.197274 0.490491 45 57.5 57.5 0 -1476 1 1 0 57.8572 55.5474 52.7371 0.785715 0.55474 0.273706 0.490491 45 57.5 57.5 0 -1477 1 1 0 58.2715 55.112 52.3345 0.827147 0.511205 0.233445 0.490491 45 57.5 57.5 0 -1478 1 1 0 58.0902 55 53.0902 0.809017 0.5 0.309017 0.490491 45 57.5 57.5 0 -1479 1 1 0 57.435 56.675 49.5932 0.743496 0.667502 -0.0406769 0.490491 45 57.5 57.5 0 -1480 1 1 0 57.8279 56.2229 50 0.782786 0.622291 0 0.490491 45 57.5 57.5 0 -1481 1 1 0 57.435 56.675 50.4068 0.743496 0.667502 0.0406769 0.490491 45 57.5 57.5 0 -1482 1 1 0 58.2845 54.4287 46.5715 0.828447 0.442867 -0.342848 0.490491 45 57.5 57.5 0 -1483 1 1 0 58.5264 54.4446 47.2531 0.85264 0.444464 -0.274694 0.490491 45 57.5 57.5 0 -1484 1 1 0 58.4391 53.8361 46.2496 0.843912 0.383614 -0.375038 0.490491 45 57.5 57.5 0 -1485 1 1 0 58.6973 53.8591 46.9234 0.869725 0.385906 -0.307659 0.490491 45 57.5 57.5 0 -1486 1 1 0 58.9101 53.8619 47.6132 0.891007 0.386187 -0.238677 0.490491 45 57.5 57.5 0 -1487 1 1 0 58.5534 53.2252 45.9457 0.855337 0.322525 -0.405434 0.490491 45 57.5 57.5 0 -1488 1 1 0 58.8284 53.2486 46.6079 0.882837 0.324863 -0.339209 0.490491 45 57.5 57.5 0 -1489 1 1 0 58.6267 52.5989 45.6611 0.862669 0.259892 -0.433888 0.490491 45 57.5 57.5 0 -1490 1 1 0 58.9174 52.6266 46.3148 0.891742 0.262661 -0.368518 0.490491 45 57.5 57.5 0 -1491 1 1 0 59.1624 52.6408 46.9874 0.916244 0.264082 -0.301258 0.490491 45 57.5 57.5 0 -1492 1 1 0 59.0583 53.2593 47.2937 0.905832 0.325929 -0.270627 0.490491 45 57.5 57.5 0 -1493 1 1 0 59.2388 53.2553 47.9881 0.92388 0.32553 -0.201189 0.490491 45 57.5 57.5 0 -1494 1 1 0 59.3605 52.6415 47.6755 0.93605 0.264151 -0.232455 0.490491 45 57.5 57.5 0 -1495 1 1 0 59.5106 52.6287 48.3754 0.951057 0.262865 -0.16246 0.490491 45 57.5 57.5 0 -1496 1 1 0 58.6587 51.9602 45.3973 0.865871 0.196015 -0.460266 0.490491 45 57.5 57.5 0 -1497 1 1 0 58.964 51.9641 46.0265 0.896401 0.196412 -0.39735 0.490491 45 57.5 57.5 0 -1498 1 1 0 58.6493 51.312 45.1556 0.864929 0.1312 -0.484441 0.490491 45 57.5 57.5 0 -1499 1 1 0 58.968 51.3175 45.7764 0.896801 0.131749 -0.422363 0.490491 45 57.5 57.5 0 -1500 1 1 0 59.243 51.3166 46.4177 0.924305 0.131656 -0.358229 0.490491 45 57.5 57.5 0 -1501 1 1 0 58.5985 50.6576 44.937 0.859848 0.0657577 -0.506298 0.490491 45 57.5 57.5 0 -1502 1 1 0 58.9293 50.6582 45.5463 0.892927 0.0658169 -0.445365 0.490491 45 57.5 57.5 0 -1503 1 1 0 58.8497 50 45.3434 0.884965 0 -0.465657 0.490491 45 57.5 57.5 0 -1504 1 1 0 59.1504 50 45.9664 0.915043 0 -0.403355 0.490491 45 57.5 57.5 0 -1505 1 1 0 59.2192 50.6599 46.1828 0.921919 0.0659886 -0.381722 0.490491 45 57.5 57.5 0 -1506 1 1 0 59.462 50.6604 46.8322 0.946198 0.0660427 -0.316778 0.490491 45 57.5 57.5 0 -1507 1 1 0 59.4074 50 46.6088 0.940742 0 -0.339122 0.490491 45 57.5 57.5 0 -1508 1 1 0 59.6194 50 47.2673 0.961938 0 -0.273267 0.490491 45 57.5 57.5 0 -1509 1 1 0 59.6119 51.9834 48.0822 0.961188 0.198337 -0.19178 0.490491 45 57.5 57.5 0 -1510 1 1 0 59.7237 51.9858 48.7727 0.97237 0.198581 -0.122729 0.490491 45 57.5 57.5 0 -1511 1 1 0 59.6639 51.3279 47.7988 0.966393 0.132792 -0.220117 0.490491 45 57.5 57.5 0 -1512 1 1 0 59.7943 51.3326 48.4845 0.979426 0.133256 -0.151549 0.490491 45 57.5 57.5 0 -1513 1 1 0 59.8769 51.3307 49.1776 0.987688 0.133071 -0.0822422 0.490491 45 57.5 57.5 0 -1514 1 1 0 59.6664 50.6657 47.5267 0.966643 0.0665668 -0.247326 0.490491 45 57.5 57.5 0 -1515 1 1 0 59.8148 50.666 48.204 0.981483 0.0666046 -0.179596 0.490491 45 57.5 57.5 0 -1516 1 1 0 59.7853 50 47.939 0.97853 0 -0.206103 0.490491 45 57.5 57.5 0 -1517 1 1 0 59.9044 50 48.6205 0.990439 0 -0.137952 0.490491 45 57.5 57.5 0 -1518 1 1 0 59.9165 50.6671 48.8961 0.991648 0.0667095 -0.110385 0.490491 45 57.5 57.5 0 -1519 1 1 0 59.9692 50.6674 49.5875 0.996917 0.0667412 -0.0412479 0.490491 45 57.5 57.5 0 -1520 1 1 0 59.9761 50 49.3086 0.997607 0 -0.0691418 0.490491 45 57.5 57.5 0 -1521 1 1 0 60 50 50 1 0 0 0.490491 45 57.5 57.5 0 -1522 1 1 0 59.2268 51.9839 46.6939 0.922682 0.198387 -0.330606 0.490491 45 57.5 57.5 0 -1523 1 1 0 59.4782 51.3257 47.1007 0.947822 0.13257 -0.289929 0.490491 45 57.5 57.5 0 -1524 1 1 0 59.4443 51.9909 47.3845 0.944433 0.199094 -0.26155 0.490491 45 57.5 57.5 0 -1525 1 1 0 58.5264 54.4446 52.7469 0.85264 0.444464 0.274694 0.490491 45 57.5 57.5 0 -1526 1 1 0 58.2845 54.4287 53.4285 0.828447 0.442867 0.342848 0.490491 45 57.5 57.5 0 -1527 1 1 0 58.9101 53.8619 52.3868 0.891007 0.386187 0.238677 0.490491 45 57.5 57.5 0 -1528 1 1 0 58.6973 53.8591 53.0766 0.869725 0.385906 0.307659 0.490491 45 57.5 57.5 0 -1529 1 1 0 58.4391 53.8361 53.7504 0.843912 0.383614 0.375038 0.490491 45 57.5 57.5 0 -1530 1 1 0 59.2388 53.2553 52.0119 0.92388 0.32553 0.201189 0.490491 45 57.5 57.5 0 -1531 1 1 0 59.0583 53.2593 52.7063 0.905832 0.325929 0.270627 0.490491 45 57.5 57.5 0 -1532 1 1 0 59.5106 52.6287 51.6246 0.951057 0.262865 0.16246 0.490491 45 57.5 57.5 0 -1533 1 1 0 59.3605 52.6415 52.3245 0.93605 0.264151 0.232455 0.490491 45 57.5 57.5 0 -1534 1 1 0 59.1624 52.6408 53.0126 0.916244 0.264082 0.301258 0.490491 45 57.5 57.5 0 -1535 1 1 0 58.8284 53.2486 53.3921 0.882837 0.324863 0.339209 0.490491 45 57.5 57.5 0 -1536 1 1 0 58.5534 53.2252 54.0543 0.855337 0.322525 0.405434 0.490491 45 57.5 57.5 0 -1537 1 1 0 58.9174 52.6266 53.6852 0.891742 0.262661 0.368518 0.490491 45 57.5 57.5 0 -1538 1 1 0 58.6267 52.5989 54.3389 0.862669 0.259892 0.433888 0.490491 45 57.5 57.5 0 -1539 1 1 0 59.7237 51.9858 51.2273 0.97237 0.198581 0.122729 0.490491 45 57.5 57.5 0 -1540 1 1 0 59.6119 51.9834 51.9178 0.961188 0.198337 0.19178 0.490491 45 57.5 57.5 0 -1541 1 1 0 59.8769 51.3307 50.8224 0.987688 0.133071 0.0822422 0.490491 45 57.5 57.5 0 -1542 1 1 0 59.7943 51.3326 51.5155 0.979426 0.133256 0.151549 0.490491 45 57.5 57.5 0 -1543 1 1 0 59.6639 51.3279 52.2012 0.966393 0.132792 0.220117 0.490491 45 57.5 57.5 0 -1544 1 1 0 59.9692 50.6674 50.4125 0.996917 0.0667412 0.0412479 0.490491 45 57.5 57.5 0 -1545 1 1 0 59.9165 50.6671 51.1039 0.991648 0.0667095 0.110385 0.490491 45 57.5 57.5 0 -1546 1 1 0 59.9761 50 50.6914 0.997607 0 0.0691418 0.490491 45 57.5 57.5 0 -1547 1 1 0 59.9044 50 51.3795 0.990439 0 0.137952 0.490491 45 57.5 57.5 0 -1548 1 1 0 59.8148 50.666 51.796 0.981483 0.0666046 0.179596 0.490491 45 57.5 57.5 0 -1549 1 1 0 59.6664 50.6657 52.4733 0.966643 0.0665668 0.247326 0.490491 45 57.5 57.5 0 -1550 1 1 0 59.7853 50 52.061 0.97853 0 0.206103 0.490491 45 57.5 57.5 0 -1551 1 1 0 59.6194 50 52.7327 0.961938 0 0.273267 0.490491 45 57.5 57.5 0 -1552 1 1 0 58.964 51.9641 53.9735 0.896401 0.196412 0.39735 0.490491 45 57.5 57.5 0 -1553 1 1 0 58.6587 51.9602 54.6027 0.865871 0.196015 0.460266 0.490491 45 57.5 57.5 0 -1554 1 1 0 59.243 51.3166 53.5823 0.924305 0.131656 0.358229 0.490491 45 57.5 57.5 0 -1555 1 1 0 58.968 51.3175 54.2236 0.896801 0.131749 0.422363 0.490491 45 57.5 57.5 0 -1556 1 1 0 58.6493 51.312 54.8444 0.864929 0.1312 0.484441 0.490491 45 57.5 57.5 0 -1557 1 1 0 59.462 50.6604 53.1678 0.946198 0.0660427 0.316778 0.490491 45 57.5 57.5 0 -1558 1 1 0 59.2192 50.6599 53.8172 0.921919 0.0659886 0.381722 0.490491 45 57.5 57.5 0 -1559 1 1 0 59.4074 50 53.3912 0.940742 0 0.339122 0.490491 45 57.5 57.5 0 -1560 1 1 0 59.1504 50 54.0336 0.915043 0 0.403355 0.490491 45 57.5 57.5 0 -1561 1 1 0 58.9293 50.6582 54.4537 0.892927 0.0658169 0.445365 0.490491 45 57.5 57.5 0 -1562 1 1 0 58.5985 50.6576 55.063 0.859848 0.0657577 0.506298 0.490491 45 57.5 57.5 0 -1563 1 1 0 58.8497 50 54.6566 0.884965 0 0.465657 0.490491 45 57.5 57.5 0 -1564 1 1 0 59.4443 51.9909 52.6155 0.944433 0.199094 0.26155 0.490491 45 57.5 57.5 0 -1565 1 1 0 59.4782 51.3257 52.8993 0.947822 0.13257 0.289929 0.490491 45 57.5 57.5 0 -1566 1 1 0 59.2268 51.9839 53.3061 0.922682 0.198387 0.330606 0.490491 45 57.5 57.5 0 -1567 1 1 0 58.6853 54.5426 48.0177 0.868535 0.454262 -0.198227 0.490491 45 57.5 57.5 0 -1568 1 1 0 59.0484 53.9414 48.3899 0.904839 0.394136 -0.161007 0.490491 45 57.5 57.5 0 -1569 1 1 0 59.3513 53.3234 48.772 0.93513 0.332342 -0.1228 0.490491 45 57.5 57.5 0 -1570 1 1 0 59.1298 53.9961 49.1768 0.912983 0.399607 -0.0823235 0.490491 45 57.5 57.5 0 -1571 1 1 0 58.7934 54.6088 48.8024 0.879344 0.460882 -0.119755 0.490491 45 57.5 57.5 0 -1572 1 1 0 58.8476 54.6421 49.587 0.88476 0.464213 -0.0412991 0.490491 45 57.5 57.5 0 -1573 1 1 0 59.6065 52.6552 49.185 0.960655 0.265519 -0.081501 0.490491 45 57.5 57.5 0 -1574 1 1 0 59.7885 52.0037 49.5875 0.978852 0.200368 -0.0412506 0.490491 45 57.5 57.5 0 -1575 1 1 0 59.6386 52.664 50 0.963861 0.266405 0 0.490491 45 57.5 57.5 0 -1576 1 1 0 59.9105 51.3352 50 0.991046 0.133524 0 0.490491 45 57.5 57.5 0 -1577 1 1 0 59.7885 52.0037 50.4125 0.978852 0.200368 0.0412506 0.490491 45 57.5 57.5 0 -1578 1 1 0 59.6065 52.6552 50.815 0.960655 0.265519 0.081501 0.490491 45 57.5 57.5 0 -1579 1 1 0 58.8476 54.6421 50.413 0.88476 0.464213 0.0412991 0.490491 45 57.5 57.5 0 -1580 1 1 0 59.1298 53.9961 50.8232 0.912983 0.399607 0.0823235 0.490491 45 57.5 57.5 0 -1581 1 1 0 58.7934 54.6088 51.1976 0.879344 0.460882 0.119755 0.490491 45 57.5 57.5 0 -1582 1 1 0 59.3513 53.3234 51.228 0.93513 0.332342 0.1228 0.490491 45 57.5 57.5 0 -1583 1 1 0 59.0484 53.9414 51.6101 0.904839 0.394136 0.161007 0.490491 45 57.5 57.5 0 -1584 1 1 0 58.6853 54.5426 51.9823 0.868535 0.454262 0.198227 0.490491 45 57.5 57.5 0 -1585 1 1 0 59.4162 53.3414 49.587 0.941618 0.33414 -0.0413021 0.490491 45 57.5 57.5 0 -1586 1 1 0 59.4162 53.3414 50.413 0.941618 0.33414 0.0413021 0.490491 45 57.5 57.5 0 -1587 1 1 0 59.1609 54.0097 50 0.916092 0.400968 0 0.490491 45 57.5 57.5 0 -1588 1 1 0 55.7206 41.8079 50.4064 0.572055 -0.819207 0.0406403 0.490491 45 57.5 57.5 0 -1589 1 1 0 55.7206 41.8079 49.5936 0.572055 -0.819207 -0.0406403 0.490491 45 57.5 57.5 0 -1590 1 1 0 56.1564 42.1616 50.8109 0.615642 -0.783843 0.081086 0.490491 45 57.5 57.5 0 -1591 1 1 0 56.1768 42.1357 50 0.617676 -0.786433 0 0.490491 45 57.5 57.5 0 -1592 1 1 0 56.1564 42.1616 49.1891 0.615642 -0.783843 -0.081086 0.490491 45 57.5 57.5 0 -1593 1 1 0 56.5628 42.5527 51.2114 0.656282 -0.744727 0.121144 0.490491 45 57.5 57.5 0 -1594 1 1 0 56.6088 42.5061 50.4064 0.660883 -0.749387 0.0406418 0.490491 45 57.5 57.5 0 -1595 1 1 0 56.9378 42.9795 51.6062 0.69378 -0.702047 0.160622 0.490491 45 57.5 57.5 0 -1596 1 1 0 57.0062 42.9103 50.8057 0.700622 -0.708969 0.0805729 0.490491 45 57.5 57.5 0 -1597 1 1 0 57.0291 42.8872 50 0.702907 -0.711282 0 0.490491 45 57.5 57.5 0 -1598 1 1 0 56.6088 42.5061 49.5936 0.660883 -0.749387 -0.0406418 0.490491 45 57.5 57.5 0 -1599 1 1 0 56.5628 42.5527 48.7886 0.656282 -0.744727 -0.121144 0.490491 45 57.5 57.5 0 -1600 1 1 0 57.0062 42.9103 49.1943 0.700622 -0.708969 -0.0805729 0.490491 45 57.5 57.5 0 -1601 1 1 0 56.9378 42.9795 48.3938 0.69378 -0.702047 -0.160622 0.490491 45 57.5 57.5 0 -1602 1 1 0 57.2796 43.4399 51.9933 0.727959 -0.656006 0.199331 0.490491 45 57.5 57.5 0 -1603 1 1 0 57.3889 43.3716 51.2119 0.738887 -0.662842 0.121192 0.490491 45 57.5 57.5 0 -1604 1 1 0 57.5865 43.9317 52.3709 0.758652 -0.606825 0.237086 0.490491 45 57.5 57.5 0 -1605 1 1 0 57.7184 43.8454 51.5961 0.771841 -0.615456 0.159613 0.490491 45 57.5 57.5 0 -1606 1 1 0 57.802 43.7976 50.8114 0.780205 -0.620239 0.0811417 0.490491 45 57.5 57.5 0 -1607 1 1 0 57.8572 44.4526 52.7371 0.785715 -0.55474 0.273706 0.490491 45 57.5 57.5 0 -1608 1 1 0 58.015 44.3549 51.9727 0.801504 -0.564513 0.197274 0.490491 45 57.5 57.5 0 -1609 1 1 0 58.0902 45 53.0902 0.809017 -0.5 0.309017 0.490491 45 57.5 57.5 0 -1610 1 1 0 58.2715 44.888 52.3345 0.827147 -0.511205 0.233445 0.490491 45 57.5 57.5 0 -1611 1 1 0 58.4018 44.8074 51.5643 0.840178 -0.519259 0.156434 0.490491 45 57.5 57.5 0 -1612 1 1 0 58.1217 44.2886 51.1908 0.81217 -0.57114 0.119078 0.490491 45 57.5 57.5 0 -1613 1 1 0 58.1752 44.2554 50.4067 0.817523 -0.574458 0.040675 0.490491 45 57.5 57.5 0 -1614 1 1 0 58.4803 44.7589 50.7846 0.848029 -0.52411 0.0784592 0.490491 45 57.5 57.5 0 -1615 1 1 0 58.5065 44.7427 50 0.850651 -0.525731 0 0.490491 45 57.5 57.5 0 -1616 1 1 0 57.3889 43.3716 48.7881 0.738887 -0.662842 -0.121192 0.490491 45 57.5 57.5 0 -1617 1 1 0 57.2796 43.4399 48.0067 0.727959 -0.656006 -0.199331 0.490491 45 57.5 57.5 0 -1618 1 1 0 57.802 43.7976 49.1886 0.780205 -0.620239 -0.0811417 0.490491 45 57.5 57.5 0 -1619 1 1 0 57.7184 43.8454 48.4039 0.771841 -0.615456 -0.159613 0.490491 45 57.5 57.5 0 -1620 1 1 0 57.5865 43.9317 47.6291 0.758652 -0.606825 -0.237086 0.490491 45 57.5 57.5 0 -1621 1 1 0 58.1752 44.2554 49.5933 0.817523 -0.574458 -0.040675 0.490491 45 57.5 57.5 0 -1622 1 1 0 58.1217 44.2886 48.8092 0.81217 -0.57114 -0.119078 0.490491 45 57.5 57.5 0 -1623 1 1 0 58.4803 44.7589 49.2154 0.848029 -0.52411 -0.0784592 0.490491 45 57.5 57.5 0 -1624 1 1 0 58.4018 44.8074 48.4357 0.840178 -0.519259 -0.156434 0.490491 45 57.5 57.5 0 -1625 1 1 0 58.015 44.3549 48.0273 0.801504 -0.564513 -0.197274 0.490491 45 57.5 57.5 0 -1626 1 1 0 57.8572 44.4526 47.2629 0.785715 -0.55474 -0.273706 0.490491 45 57.5 57.5 0 -1627 1 1 0 58.2715 44.888 47.6655 0.827147 -0.511205 -0.233445 0.490491 45 57.5 57.5 0 -1628 1 1 0 58.0902 45 46.9098 0.809017 -0.5 -0.309017 0.490491 45 57.5 57.5 0 -1629 1 1 0 57.435 43.325 50.4068 0.743496 -0.667502 0.0406769 0.490491 45 57.5 57.5 0 -1630 1 1 0 57.8279 43.7771 50 0.782786 -0.622291 0 0.490491 45 57.5 57.5 0 -1631 1 1 0 57.435 43.325 49.5932 0.743496 -0.667502 -0.0406769 0.490491 45 57.5 57.5 0 -1632 1 1 0 58.2845 45.5713 53.4285 0.828447 -0.442867 0.342848 0.490491 45 57.5 57.5 0 -1633 1 1 0 58.5264 45.5554 52.7469 0.85264 -0.444464 0.274694 0.490491 45 57.5 57.5 0 -1634 1 1 0 58.4391 46.1639 53.7504 0.843912 -0.383614 0.375038 0.490491 45 57.5 57.5 0 -1635 1 1 0 58.6973 46.1409 53.0766 0.869725 -0.385906 0.307659 0.490491 45 57.5 57.5 0 -1636 1 1 0 58.9101 46.1381 52.3868 0.891007 -0.386187 0.238677 0.490491 45 57.5 57.5 0 -1637 1 1 0 58.5534 46.7748 54.0543 0.855337 -0.322525 0.405434 0.490491 45 57.5 57.5 0 -1638 1 1 0 58.8284 46.7514 53.3921 0.882837 -0.324863 0.339209 0.490491 45 57.5 57.5 0 -1639 1 1 0 58.6267 47.4011 54.3389 0.862669 -0.259892 0.433888 0.490491 45 57.5 57.5 0 -1640 1 1 0 58.9174 47.3734 53.6852 0.891742 -0.262661 0.368518 0.490491 45 57.5 57.5 0 -1641 1 1 0 59.1624 47.3592 53.0126 0.916244 -0.264082 0.301258 0.490491 45 57.5 57.5 0 -1642 1 1 0 59.0583 46.7407 52.7063 0.905832 -0.325929 0.270627 0.490491 45 57.5 57.5 0 -1643 1 1 0 59.2388 46.7447 52.0119 0.92388 -0.32553 0.201189 0.490491 45 57.5 57.5 0 -1644 1 1 0 59.3605 47.3585 52.3245 0.93605 -0.264151 0.232455 0.490491 45 57.5 57.5 0 -1645 1 1 0 59.5106 47.3713 51.6246 0.951057 -0.262865 0.16246 0.490491 45 57.5 57.5 0 -1646 1 1 0 58.6587 48.0398 54.6027 0.865871 -0.196015 0.460266 0.490491 45 57.5 57.5 0 -1647 1 1 0 58.964 48.0359 53.9735 0.896401 -0.196412 0.39735 0.490491 45 57.5 57.5 0 -1648 1 1 0 58.6493 48.688 54.8444 0.864929 -0.1312 0.484441 0.490491 45 57.5 57.5 0 -1649 1 1 0 58.968 48.6825 54.2236 0.896801 -0.131749 0.422363 0.490491 45 57.5 57.5 0 -1650 1 1 0 59.243 48.6834 53.5823 0.924305 -0.131656 0.358229 0.490491 45 57.5 57.5 0 -1651 1 1 0 58.5985 49.3424 55.063 0.859848 -0.0657577 0.506298 0.490491 45 57.5 57.5 0 -1652 1 1 0 58.9293 49.3418 54.4537 0.892927 -0.0658169 0.445365 0.490491 45 57.5 57.5 0 -1653 1 1 0 59.2192 49.3401 53.8172 0.921919 -0.0659886 0.381722 0.490491 45 57.5 57.5 0 -1654 1 1 0 59.462 49.3396 53.1678 0.946198 -0.0660427 0.316778 0.490491 45 57.5 57.5 0 -1655 1 1 0 59.6119 48.0166 51.9178 0.961188 -0.198337 0.19178 0.490491 45 57.5 57.5 0 -1656 1 1 0 59.7237 48.0142 51.2273 0.97237 -0.198581 0.122729 0.490491 45 57.5 57.5 0 -1657 1 1 0 59.6639 48.6721 52.2012 0.966393 -0.132792 0.220117 0.490491 45 57.5 57.5 0 -1658 1 1 0 59.7943 48.6674 51.5155 0.979426 -0.133256 0.151549 0.490491 45 57.5 57.5 0 -1659 1 1 0 59.8769 48.6693 50.8224 0.987688 -0.133071 0.0822422 0.490491 45 57.5 57.5 0 -1660 1 1 0 59.6664 49.3343 52.4733 0.966643 -0.0665668 0.247326 0.490491 45 57.5 57.5 0 -1661 1 1 0 59.8148 49.334 51.796 0.981483 -0.0666046 0.179596 0.490491 45 57.5 57.5 0 -1662 1 1 0 59.9165 49.3329 51.1039 0.991648 -0.0667095 0.110385 0.490491 45 57.5 57.5 0 -1663 1 1 0 59.9692 49.3326 50.4125 0.996917 -0.0667412 0.0412479 0.490491 45 57.5 57.5 0 -1664 1 1 0 59.2268 48.0161 53.3061 0.922682 -0.198387 0.330606 0.490491 45 57.5 57.5 0 -1665 1 1 0 59.4782 48.6743 52.8993 0.947822 -0.13257 0.289929 0.490491 45 57.5 57.5 0 -1666 1 1 0 59.4443 48.0091 52.6155 0.944433 -0.199094 0.26155 0.490491 45 57.5 57.5 0 -1667 1 1 0 58.5264 45.5554 47.2531 0.85264 -0.444464 -0.274694 0.490491 45 57.5 57.5 0 -1668 1 1 0 58.2845 45.5713 46.5715 0.828447 -0.442867 -0.342848 0.490491 45 57.5 57.5 0 -1669 1 1 0 58.9101 46.1381 47.6132 0.891007 -0.386187 -0.238677 0.490491 45 57.5 57.5 0 -1670 1 1 0 58.6973 46.1409 46.9234 0.869725 -0.385906 -0.307659 0.490491 45 57.5 57.5 0 -1671 1 1 0 58.4391 46.1639 46.2496 0.843912 -0.383614 -0.375038 0.490491 45 57.5 57.5 0 -1672 1 1 0 59.2388 46.7447 47.9881 0.92388 -0.32553 -0.201189 0.490491 45 57.5 57.5 0 -1673 1 1 0 59.0583 46.7407 47.2937 0.905832 -0.325929 -0.270627 0.490491 45 57.5 57.5 0 -1674 1 1 0 59.5106 47.3713 48.3754 0.951057 -0.262865 -0.16246 0.490491 45 57.5 57.5 0 -1675 1 1 0 59.3605 47.3585 47.6755 0.93605 -0.264151 -0.232455 0.490491 45 57.5 57.5 0 -1676 1 1 0 59.1624 47.3592 46.9874 0.916244 -0.264082 -0.301258 0.490491 45 57.5 57.5 0 -1677 1 1 0 58.8284 46.7514 46.6079 0.882837 -0.324863 -0.339209 0.490491 45 57.5 57.5 0 -1678 1 1 0 58.5534 46.7748 45.9457 0.855337 -0.322525 -0.405434 0.490491 45 57.5 57.5 0 -1679 1 1 0 58.9174 47.3734 46.3148 0.891742 -0.262661 -0.368518 0.490491 45 57.5 57.5 0 -1680 1 1 0 58.6267 47.4011 45.6611 0.862669 -0.259892 -0.433888 0.490491 45 57.5 57.5 0 -1681 1 1 0 59.7237 48.0142 48.7727 0.97237 -0.198581 -0.122729 0.490491 45 57.5 57.5 0 -1682 1 1 0 59.6119 48.0166 48.0822 0.961188 -0.198337 -0.19178 0.490491 45 57.5 57.5 0 -1683 1 1 0 59.8769 48.6693 49.1776 0.987688 -0.133071 -0.0822422 0.490491 45 57.5 57.5 0 -1684 1 1 0 59.7943 48.6674 48.4845 0.979426 -0.133256 -0.151549 0.490491 45 57.5 57.5 0 -1685 1 1 0 59.6639 48.6721 47.7988 0.966393 -0.132792 -0.220117 0.490491 45 57.5 57.5 0 -1686 1 1 0 59.9692 49.3326 49.5875 0.996917 -0.0667412 -0.0412479 0.490491 45 57.5 57.5 0 -1687 1 1 0 59.9165 49.3329 48.8961 0.991648 -0.0667095 -0.110385 0.490491 45 57.5 57.5 0 -1688 1 1 0 59.8148 49.334 48.204 0.981483 -0.0666046 -0.179596 0.490491 45 57.5 57.5 0 -1689 1 1 0 59.6664 49.3343 47.5267 0.966643 -0.0665668 -0.247326 0.490491 45 57.5 57.5 0 -1690 1 1 0 58.964 48.0359 46.0265 0.896401 -0.196412 -0.39735 0.490491 45 57.5 57.5 0 -1691 1 1 0 58.6587 48.0398 45.3973 0.865871 -0.196015 -0.460266 0.490491 45 57.5 57.5 0 -1692 1 1 0 59.243 48.6834 46.4177 0.924305 -0.131656 -0.358229 0.490491 45 57.5 57.5 0 -1693 1 1 0 58.968 48.6825 45.7764 0.896801 -0.131749 -0.422363 0.490491 45 57.5 57.5 0 -1694 1 1 0 58.6493 48.688 45.1556 0.864929 -0.1312 -0.484441 0.490491 45 57.5 57.5 0 -1695 1 1 0 59.462 49.3396 46.8322 0.946198 -0.0660427 -0.316778 0.490491 45 57.5 57.5 0 -1696 1 1 0 59.2192 49.3401 46.1828 0.921919 -0.0659886 -0.381722 0.490491 45 57.5 57.5 0 -1697 1 1 0 58.9293 49.3418 45.5463 0.892927 -0.0658169 -0.445365 0.490491 45 57.5 57.5 0 -1698 1 1 0 58.5985 49.3424 44.937 0.859848 -0.0657577 -0.506298 0.490491 45 57.5 57.5 0 -1699 1 1 0 59.4443 48.0091 47.3845 0.944433 -0.199094 -0.26155 0.490491 45 57.5 57.5 0 -1700 1 1 0 59.4782 48.6743 47.1007 0.947822 -0.13257 -0.289929 0.490491 45 57.5 57.5 0 -1701 1 1 0 59.2268 48.0161 46.6939 0.922682 -0.198387 -0.330606 0.490491 45 57.5 57.5 0 -1702 1 1 0 58.6853 45.4574 51.9823 0.868535 -0.454262 0.198227 0.490491 45 57.5 57.5 0 -1703 1 1 0 59.0484 46.0586 51.6101 0.904839 -0.394136 0.161007 0.490491 45 57.5 57.5 0 -1704 1 1 0 59.3513 46.6766 51.228 0.93513 -0.332342 0.1228 0.490491 45 57.5 57.5 0 -1705 1 1 0 59.1298 46.0039 50.8232 0.912983 -0.399607 0.0823235 0.490491 45 57.5 57.5 0 -1706 1 1 0 58.7934 45.3912 51.1976 0.879344 -0.460882 0.119755 0.490491 45 57.5 57.5 0 -1707 1 1 0 58.8476 45.3579 50.413 0.88476 -0.464213 0.0412991 0.490491 45 57.5 57.5 0 -1708 1 1 0 59.6065 47.3448 50.815 0.960655 -0.265519 0.081501 0.490491 45 57.5 57.5 0 -1709 1 1 0 59.7885 47.9963 50.4125 0.978852 -0.200368 0.0412506 0.490491 45 57.5 57.5 0 -1710 1 1 0 59.6386 47.336 50 0.963861 -0.266405 0 0.490491 45 57.5 57.5 0 -1711 1 1 0 59.9105 48.6648 50 0.991046 -0.133524 0 0.490491 45 57.5 57.5 0 -1712 1 1 0 59.7885 47.9963 49.5875 0.978852 -0.200368 -0.0412506 0.490491 45 57.5 57.5 0 -1713 1 1 0 59.6065 47.3448 49.185 0.960655 -0.265519 -0.081501 0.490491 45 57.5 57.5 0 -1714 1 1 0 58.8476 45.3579 49.587 0.88476 -0.464213 -0.0412991 0.490491 45 57.5 57.5 0 -1715 1 1 0 59.1298 46.0039 49.1768 0.912983 -0.399607 -0.0823235 0.490491 45 57.5 57.5 0 -1716 1 1 0 58.7934 45.3912 48.8024 0.879344 -0.460882 -0.119755 0.490491 45 57.5 57.5 0 -1717 1 1 0 59.3513 46.6766 48.772 0.93513 -0.332342 -0.1228 0.490491 45 57.5 57.5 0 -1718 1 1 0 59.0484 46.0586 48.3899 0.904839 -0.394136 -0.161007 0.490491 45 57.5 57.5 0 -1719 1 1 0 58.6853 45.4574 48.0177 0.868535 -0.454262 -0.198227 0.490491 45 57.5 57.5 0 -1720 1 1 0 59.4162 46.6586 50.413 0.941618 -0.33414 0.0413021 0.490491 45 57.5 57.5 0 -1721 1 1 0 59.4162 46.6586 49.587 0.941618 -0.33414 -0.0413021 0.490491 45 57.5 57.5 0 -1722 1 1 0 59.1609 45.9903 50 0.916092 -0.400968 0 0.490491 45 57.5 57.5 0 -1723 1 1 0 48.9351 55.5186 58.2711 -0.106494 0.551859 0.82711 0.490491 45 57.5 57.5 0 -1724 1 1 0 48.2747 55.2913 58.3081 -0.172532 0.529135 0.830812 0.490491 45 57.5 57.5 0 -1725 1 1 0 47.6277 55.0421 58.3036 -0.237228 0.504209 0.830359 0.490491 45 57.5 57.5 0 -1726 1 1 0 47.8698 55.7125 57.9265 -0.213023 0.571251 0.79265 0.490491 45 57.5 57.5 0 -1727 1 1 0 48.5259 55.949 57.9017 -0.147413 0.594895 0.79017 0.490491 45 57.5 57.5 0 -1728 1 1 0 48.1257 56.3458 57.4979 -0.187432 0.634579 0.749786 0.490491 45 57.5 57.5 0 -1729 1 1 0 46.962 54.7623 58.2518 -0.303801 0.476225 0.825175 0.490491 45 57.5 57.5 0 -1730 1 1 0 46.3397 54.4698 58.1623 -0.366027 0.446977 0.816233 0.490491 45 57.5 57.5 0 -1731 1 1 0 46.5385 55.1612 57.8345 -0.346153 0.516122 0.783452 0.490491 45 57.5 57.5 0 -1732 1 1 0 45.7287 54.156 58.0302 -0.427135 0.415597 0.803016 0.490491 45 57.5 57.5 0 -1733 1 1 0 45.1429 53.8268 57.859 -0.485712 0.382683 0.785899 0.490491 45 57.5 57.5 0 -1734 1 1 0 45.3157 54.5399 57.5794 -0.46843 0.45399 0.757936 0.490491 45 57.5 57.5 0 -1735 1 1 0 45.9171 54.8624 57.7258 -0.408286 0.48624 0.772575 0.490491 45 57.5 57.5 0 -1736 1 1 0 46.1327 55.5337 57.3771 -0.38673 0.553372 0.737712 0.490491 45 57.5 57.5 0 -1737 1 1 0 45.5174 55.225 57.253 -0.448259 0.522499 0.725299 0.490491 45 57.5 57.5 0 -1738 1 1 0 45.7467 55.8779 56.8819 -0.425325 0.587785 0.688191 0.490491 45 57.5 57.5 0 -1739 1 1 0 47.711 56.7232 57.0398 -0.228899 0.672319 0.703983 0.490491 45 57.5 57.5 0 -1740 1 1 0 47.04 56.4741 57.0231 -0.296004 0.647412 0.70231 0.490491 45 57.5 57.5 0 -1741 1 1 0 47.3262 57.0524 56.5662 -0.267381 0.705236 0.65662 0.490491 45 57.5 57.5 0 -1742 1 1 0 46.3841 56.1919 56.9704 -0.361591 0.619186 0.697037 0.490491 45 57.5 57.5 0 -1743 1 1 0 46.6531 56.7891 56.535 -0.334691 0.678913 0.653497 0.490491 45 57.5 57.5 0 -1744 1 1 0 46.0023 56.4945 56.4684 -0.399769 0.649448 0.64684 0.490491 45 57.5 57.5 0 -1745 1 1 0 46.2825 57.0711 56.015 -0.371748 0.707107 0.601501 0.490491 45 57.5 57.5 0 -1746 1 1 0 46.9479 57.3479 56.0574 -0.305212 0.734794 0.605742 0.490491 45 57.5 57.5 0 -1747 1 1 0 46.5857 57.6041 55.5245 -0.341435 0.760406 0.552454 0.490491 45 57.5 57.5 0 -1748 1 1 0 47.1968 55.4511 57.9011 -0.280319 0.545109 0.790112 0.490491 45 57.5 57.5 0 -1749 1 1 0 46.7786 55.8369 57.4534 -0.322141 0.583692 0.745339 0.490491 45 57.5 57.5 0 -1750 1 1 0 47.4482 56.1093 57.4944 -0.25518 0.610926 0.749435 0.490491 45 57.5 57.5 0 -1751 1 1 0 44.4755 53.4143 57.6041 -0.552454 0.341435 0.760406 0.490491 45 57.5 57.5 0 -1752 1 1 0 43.9426 53.0521 57.3479 -0.605742 0.305212 0.734794 0.490491 45 57.5 57.5 0 -1753 1 1 0 43.985 53.7175 57.0711 -0.601501 0.371748 0.707107 0.490491 45 57.5 57.5 0 -1754 1 1 0 43.4338 52.6738 57.0524 -0.65662 0.267381 0.705236 0.490491 45 57.5 57.5 0 -1755 1 1 0 42.9602 52.289 56.7232 -0.703983 0.228899 0.672319 0.490491 45 57.5 57.5 0 -1756 1 1 0 42.9769 52.96 56.4741 -0.70231 0.296004 0.647412 0.490491 45 57.5 57.5 0 -1757 1 1 0 43.465 53.3469 56.7891 -0.653497 0.334691 0.678913 0.490491 45 57.5 57.5 0 -1758 1 1 0 43.5316 53.9977 56.4945 -0.64684 0.399769 0.649448 0.490491 45 57.5 57.5 0 -1759 1 1 0 43.0296 53.6159 56.1919 -0.697037 0.361591 0.619186 0.490491 45 57.5 57.5 0 -1760 1 1 0 43.1181 54.2533 55.8779 -0.688191 0.425325 0.587785 0.490491 45 57.5 57.5 0 -1761 1 1 0 42.5021 51.8743 56.3458 -0.749786 0.187432 0.634579 0.490491 45 57.5 57.5 0 -1762 1 1 0 42.0983 51.4741 55.949 -0.79017 0.147413 0.594895 0.490491 45 57.5 57.5 0 -1763 1 1 0 42.0735 52.1302 55.7125 -0.79265 0.213023 0.571251 0.490491 45 57.5 57.5 0 -1764 1 1 0 41.7289 51.0649 55.5186 -0.82711 0.106494 0.551859 0.490491 45 57.5 57.5 0 -1765 1 1 0 41.6919 51.7253 55.2913 -0.830812 0.172532 0.529135 0.490491 45 57.5 57.5 0 -1766 1 1 0 41.6964 52.3723 55.0421 -0.830359 0.237228 0.504209 0.490491 45 57.5 57.5 0 -1767 1 1 0 42.6229 53.8673 55.5337 -0.737712 0.38673 0.553372 0.490491 45 57.5 57.5 0 -1768 1 1 0 42.747 54.4826 55.225 -0.725299 0.448259 0.522499 0.490491 45 57.5 57.5 0 -1769 1 1 0 42.1655 53.4615 55.1612 -0.783452 0.346153 0.516122 0.490491 45 57.5 57.5 0 -1770 1 1 0 42.2742 54.0829 54.8624 -0.772575 0.408286 0.48624 0.490491 45 57.5 57.5 0 -1771 1 1 0 42.4206 54.6843 54.5399 -0.757936 0.46843 0.45399 0.490491 45 57.5 57.5 0 -1772 1 1 0 41.7482 53.038 54.7623 -0.825175 0.303801 0.476225 0.490491 45 57.5 57.5 0 -1773 1 1 0 41.8377 53.6603 54.4698 -0.816233 0.366027 0.446977 0.490491 45 57.5 57.5 0 -1774 1 1 0 41.9698 54.2713 54.156 -0.803016 0.427135 0.415597 0.490491 45 57.5 57.5 0 -1775 1 1 0 42.141 54.8571 53.8268 -0.785899 0.485712 0.382683 0.490491 45 57.5 57.5 0 -1776 1 1 0 42.5056 52.5518 56.1093 -0.749435 0.25518 0.610926 0.490491 45 57.5 57.5 0 -1777 1 1 0 42.0989 52.8032 55.4511 -0.790112 0.280319 0.545109 0.490491 45 57.5 57.5 0 -1778 1 1 0 42.5466 53.2214 55.8369 -0.745339 0.322141 0.583692 0.490491 45 57.5 57.5 0 -1779 1 1 0 46.1732 57.859 54.8571 -0.382683 0.785899 0.485712 0.490491 45 57.5 57.5 0 -1780 1 1 0 45.4601 57.5794 54.6843 -0.45399 0.757936 0.46843 0.490491 45 57.5 57.5 0 -1781 1 1 0 45.844 58.0302 54.2713 -0.415597 0.803016 0.427135 0.490491 45 57.5 57.5 0 -1782 1 1 0 44.775 57.253 54.4826 -0.522499 0.725299 0.448259 0.490491 45 57.5 57.5 0 -1783 1 1 0 45.1376 57.7258 54.0829 -0.48624 0.772575 0.408286 0.490491 45 57.5 57.5 0 -1784 1 1 0 44.1221 56.8819 54.2533 -0.587785 0.688191 0.425325 0.490491 45 57.5 57.5 0 -1785 1 1 0 44.4663 57.3771 53.8673 -0.553372 0.737712 0.38673 0.490491 45 57.5 57.5 0 -1786 1 1 0 44.8388 57.8345 53.4615 -0.516122 0.783452 0.346153 0.490491 45 57.5 57.5 0 -1787 1 1 0 45.5302 58.1623 53.6603 -0.446977 0.816233 0.366027 0.490491 45 57.5 57.5 0 -1788 1 1 0 45.2377 58.2518 53.038 -0.476225 0.825175 0.303801 0.490491 45 57.5 57.5 0 -1789 1 1 0 43.5055 56.4684 53.9977 -0.649448 0.64684 0.399769 0.490491 45 57.5 57.5 0 -1790 1 1 0 43.8081 56.9704 53.6159 -0.619186 0.697037 0.361591 0.490491 45 57.5 57.5 0 -1791 1 1 0 42.9289 56.015 53.7175 -0.707107 0.601501 0.371748 0.490491 45 57.5 57.5 0 -1792 1 1 0 43.2109 56.535 53.3469 -0.678913 0.653497 0.334691 0.490491 45 57.5 57.5 0 -1793 1 1 0 43.5259 57.0231 52.96 -0.647412 0.70231 0.296004 0.490491 45 57.5 57.5 0 -1794 1 1 0 42.3959 55.5245 53.4143 -0.760406 0.552454 0.341435 0.490491 45 57.5 57.5 0 -1795 1 1 0 42.6521 56.0574 53.0521 -0.734794 0.605742 0.305212 0.490491 45 57.5 57.5 0 -1796 1 1 0 42.9476 56.5662 52.6738 -0.705236 0.65662 0.267381 0.490491 45 57.5 57.5 0 -1797 1 1 0 43.2768 57.0398 52.289 -0.672319 0.703983 0.228899 0.490491 45 57.5 57.5 0 -1798 1 1 0 44.9579 58.3036 52.3723 -0.504209 0.830359 0.237228 0.490491 45 57.5 57.5 0 -1799 1 1 0 44.2875 57.9265 52.1302 -0.571251 0.79265 0.213023 0.490491 45 57.5 57.5 0 -1800 1 1 0 44.7087 58.3081 51.7253 -0.529135 0.830812 0.172532 0.490491 45 57.5 57.5 0 -1801 1 1 0 43.6542 57.4979 51.8743 -0.634579 0.749786 0.187432 0.490491 45 57.5 57.5 0 -1802 1 1 0 44.051 57.9017 51.4741 -0.594895 0.79017 0.147413 0.490491 45 57.5 57.5 0 -1803 1 1 0 44.4814 58.2711 51.0649 -0.551859 0.82711 0.106494 0.490491 45 57.5 57.5 0 -1804 1 1 0 44.1631 57.4534 53.2214 -0.583692 0.745339 0.322141 0.490491 45 57.5 57.5 0 -1805 1 1 0 43.8907 57.4944 52.5518 -0.610926 0.749435 0.25518 0.490491 45 57.5 57.5 0 -1806 1 1 0 44.5489 57.9011 52.8032 -0.545109 0.790112 0.280319 0.490491 45 57.5 57.5 0 -1807 1 1 0 44.6322 54.1427 57.3501 -0.536784 0.414272 0.735011 0.490491 45 57.5 57.5 0 -1808 1 1 0 44.1528 54.4396 56.7898 -0.584716 0.443957 0.678977 0.490491 45 57.5 57.5 0 -1809 1 1 0 43.7169 54.7092 56.1924 -0.628313 0.470917 0.619242 0.490491 45 57.5 57.5 0 -1810 1 1 0 44.3575 55.1338 56.4658 -0.564254 0.513375 0.646578 0.490491 45 57.5 57.5 0 -1811 1 1 0 44.8203 54.8521 57.0447 -0.51797 0.485208 0.704471 0.490491 45 57.5 57.5 0 -1812 1 1 0 45.0356 55.5242 56.6961 -0.496441 0.552418 0.669612 0.490491 45 57.5 57.5 0 -1813 1 1 0 43.3039 54.9644 55.5242 -0.669612 0.496441 0.552418 0.490491 45 57.5 57.5 0 -1814 1 1 0 42.9553 55.1797 54.8521 -0.704471 0.51797 0.485208 0.490491 45 57.5 57.5 0 -1815 1 1 0 43.5342 55.6425 55.1338 -0.646578 0.564254 0.513375 0.490491 45 57.5 57.5 0 -1816 1 1 0 42.6499 55.3678 54.1427 -0.735011 0.536784 0.414272 0.490491 45 57.5 57.5 0 -1817 1 1 0 43.2102 55.8472 54.4396 -0.678977 0.584716 0.443957 0.490491 45 57.5 57.5 0 -1818 1 1 0 43.8076 56.2831 54.7092 -0.619242 0.628313 0.470917 0.490491 45 57.5 57.5 0 -1819 1 1 0 45.2908 56.1924 56.2831 -0.470917 0.619242 0.628313 0.490491 45 57.5 57.5 0 -1820 1 1 0 44.8662 56.4658 55.6425 -0.513375 0.646578 0.564254 0.490491 45 57.5 57.5 0 -1821 1 1 0 45.5604 56.7898 55.8472 -0.443957 0.678977 0.584716 0.490491 45 57.5 57.5 0 -1822 1 1 0 44.4758 56.6961 54.9644 -0.552418 0.669612 0.496441 0.490491 45 57.5 57.5 0 -1823 1 1 0 45.1479 57.0447 55.1797 -0.485208 0.704471 0.51797 0.490491 45 57.5 57.5 0 -1824 1 1 0 45.8573 57.3501 55.3678 -0.414272 0.735011 0.536784 0.490491 45 57.5 57.5 0 -1825 1 1 0 43.9252 55.4065 55.8195 -0.607478 0.54065 0.581952 0.490491 45 57.5 57.5 0 -1826 1 1 0 44.1805 56.0748 55.4065 -0.581952 0.607478 0.54065 0.490491 45 57.5 57.5 0 -1827 1 1 0 44.5935 55.8195 56.0748 -0.54065 0.581952 0.607478 0.490491 45 57.5 57.5 0 -1828 1 1 0 51.0649 55.5186 58.2711 0.106494 0.551859 0.82711 0.490491 45 57.5 57.5 0 -1829 1 1 0 51.4741 55.949 57.9017 0.147413 0.594895 0.79017 0.490491 45 57.5 57.5 0 -1830 1 1 0 51.8743 56.3458 57.4979 0.187432 0.634579 0.749786 0.490491 45 57.5 57.5 0 -1831 1 1 0 52.1302 55.7125 57.9265 0.213023 0.571251 0.79265 0.490491 45 57.5 57.5 0 -1832 1 1 0 51.7253 55.2913 58.3081 0.172532 0.529135 0.830812 0.490491 45 57.5 57.5 0 -1833 1 1 0 52.3723 55.0421 58.3036 0.237228 0.504209 0.830359 0.490491 45 57.5 57.5 0 -1834 1 1 0 52.289 56.7232 57.0398 0.228899 0.672319 0.703983 0.490491 45 57.5 57.5 0 -1835 1 1 0 52.6738 57.0524 56.5662 0.267381 0.705236 0.65662 0.490491 45 57.5 57.5 0 -1836 1 1 0 52.96 56.4741 57.0231 0.296004 0.647412 0.70231 0.490491 45 57.5 57.5 0 -1837 1 1 0 53.0521 57.3479 56.0574 0.305212 0.734794 0.605742 0.490491 45 57.5 57.5 0 -1838 1 1 0 53.4143 57.6041 55.5245 0.341435 0.760406 0.552454 0.490491 45 57.5 57.5 0 -1839 1 1 0 53.7175 57.0711 56.015 0.371748 0.707107 0.601501 0.490491 45 57.5 57.5 0 -1840 1 1 0 53.3469 56.7891 56.535 0.334691 0.678913 0.653497 0.490491 45 57.5 57.5 0 -1841 1 1 0 53.6159 56.1919 56.9704 0.361591 0.619186 0.697037 0.490491 45 57.5 57.5 0 -1842 1 1 0 53.9977 56.4945 56.4684 0.399769 0.649448 0.64684 0.490491 45 57.5 57.5 0 -1843 1 1 0 54.2533 55.8779 56.8819 0.425325 0.587785 0.688191 0.490491 45 57.5 57.5 0 -1844 1 1 0 53.038 54.7623 58.2518 0.303801 0.476225 0.825175 0.490491 45 57.5 57.5 0 -1845 1 1 0 53.4615 55.1612 57.8345 0.346153 0.516122 0.783452 0.490491 45 57.5 57.5 0 -1846 1 1 0 53.6603 54.4698 58.1623 0.366027 0.446977 0.816233 0.490491 45 57.5 57.5 0 -1847 1 1 0 53.8673 55.5337 57.3771 0.38673 0.553372 0.737712 0.490491 45 57.5 57.5 0 -1848 1 1 0 54.0829 54.8624 57.7258 0.408286 0.48624 0.772575 0.490491 45 57.5 57.5 0 -1849 1 1 0 54.4826 55.225 57.253 0.448259 0.522499 0.725299 0.490491 45 57.5 57.5 0 -1850 1 1 0 54.6843 54.5399 57.5794 0.46843 0.45399 0.757936 0.490491 45 57.5 57.5 0 -1851 1 1 0 54.2713 54.156 58.0302 0.427135 0.415597 0.803016 0.490491 45 57.5 57.5 0 -1852 1 1 0 54.8571 53.8268 57.859 0.485712 0.382683 0.785899 0.490491 45 57.5 57.5 0 -1853 1 1 0 52.5518 56.1093 57.4944 0.25518 0.610926 0.749435 0.490491 45 57.5 57.5 0 -1854 1 1 0 53.2214 55.8369 57.4534 0.322141 0.583692 0.745339 0.490491 45 57.5 57.5 0 -1855 1 1 0 52.8032 55.4511 57.9011 0.280319 0.545109 0.790112 0.490491 45 57.5 57.5 0 -1856 1 1 0 53.8268 57.859 54.8571 0.382683 0.785899 0.485712 0.490491 45 57.5 57.5 0 -1857 1 1 0 54.156 58.0302 54.2713 0.415597 0.803016 0.427135 0.490491 45 57.5 57.5 0 -1858 1 1 0 54.5399 57.5794 54.6843 0.45399 0.757936 0.46843 0.490491 45 57.5 57.5 0 -1859 1 1 0 54.4698 58.1623 53.6603 0.446977 0.816233 0.366027 0.490491 45 57.5 57.5 0 -1860 1 1 0 54.7623 58.2518 53.038 0.476225 0.825175 0.303801 0.490491 45 57.5 57.5 0 -1861 1 1 0 55.1612 57.8345 53.4615 0.516122 0.783452 0.346153 0.490491 45 57.5 57.5 0 -1862 1 1 0 54.8624 57.7258 54.0829 0.48624 0.772575 0.408286 0.490491 45 57.5 57.5 0 -1863 1 1 0 55.225 57.253 54.4826 0.522499 0.725299 0.448259 0.490491 45 57.5 57.5 0 -1864 1 1 0 55.5337 57.3771 53.8673 0.553372 0.737712 0.38673 0.490491 45 57.5 57.5 0 -1865 1 1 0 55.8779 56.8819 54.2533 0.587785 0.688191 0.425325 0.490491 45 57.5 57.5 0 -1866 1 1 0 55.0421 58.3036 52.3723 0.504209 0.830359 0.237228 0.490491 45 57.5 57.5 0 -1867 1 1 0 55.2913 58.3081 51.7253 0.529135 0.830812 0.172532 0.490491 45 57.5 57.5 0 -1868 1 1 0 55.7125 57.9265 52.1302 0.571251 0.79265 0.213023 0.490491 45 57.5 57.5 0 -1869 1 1 0 55.5186 58.2711 51.0649 0.551859 0.82711 0.106494 0.490491 45 57.5 57.5 0 -1870 1 1 0 55.949 57.9017 51.4741 0.594895 0.79017 0.147413 0.490491 45 57.5 57.5 0 -1871 1 1 0 56.3458 57.4979 51.8743 0.634579 0.749786 0.187432 0.490491 45 57.5 57.5 0 -1872 1 1 0 56.1919 56.9704 53.6159 0.619186 0.697037 0.361591 0.490491 45 57.5 57.5 0 -1873 1 1 0 56.4945 56.4684 53.9977 0.649448 0.64684 0.399769 0.490491 45 57.5 57.5 0 -1874 1 1 0 56.4741 57.0231 52.96 0.647412 0.70231 0.296004 0.490491 45 57.5 57.5 0 -1875 1 1 0 56.7891 56.535 53.3469 0.678913 0.653497 0.334691 0.490491 45 57.5 57.5 0 -1876 1 1 0 57.0711 56.015 53.7175 0.707107 0.601501 0.371748 0.490491 45 57.5 57.5 0 -1877 1 1 0 56.7232 57.0398 52.289 0.672319 0.703983 0.228899 0.490491 45 57.5 57.5 0 -1878 1 1 0 57.0524 56.5662 52.6738 0.705236 0.65662 0.267381 0.490491 45 57.5 57.5 0 -1879 1 1 0 57.3479 56.0574 53.0521 0.734794 0.605742 0.305212 0.490491 45 57.5 57.5 0 -1880 1 1 0 57.6041 55.5245 53.4143 0.760406 0.552454 0.341435 0.490491 45 57.5 57.5 0 -1881 1 1 0 55.4511 57.9011 52.8032 0.545109 0.790112 0.280319 0.490491 45 57.5 57.5 0 -1882 1 1 0 56.1093 57.4944 52.5518 0.610926 0.749435 0.25518 0.490491 45 57.5 57.5 0 -1883 1 1 0 55.8369 57.4534 53.2214 0.583692 0.745339 0.322141 0.490491 45 57.5 57.5 0 -1884 1 1 0 55.5245 53.4143 57.6041 0.552454 0.341435 0.760406 0.490491 45 57.5 57.5 0 -1885 1 1 0 56.015 53.7175 57.0711 0.601501 0.371748 0.707107 0.490491 45 57.5 57.5 0 -1886 1 1 0 56.0574 53.0521 57.3479 0.605742 0.305212 0.734794 0.490491 45 57.5 57.5 0 -1887 1 1 0 56.4684 53.9977 56.4945 0.64684 0.399769 0.649448 0.490491 45 57.5 57.5 0 -1888 1 1 0 56.535 53.3469 56.7891 0.653497 0.334691 0.678913 0.490491 45 57.5 57.5 0 -1889 1 1 0 56.8819 54.2533 55.8779 0.688191 0.425325 0.587785 0.490491 45 57.5 57.5 0 -1890 1 1 0 56.9704 53.6159 56.1919 0.697037 0.361591 0.619186 0.490491 45 57.5 57.5 0 -1891 1 1 0 57.0231 52.96 56.4741 0.70231 0.296004 0.647412 0.490491 45 57.5 57.5 0 -1892 1 1 0 56.5662 52.6738 57.0524 0.65662 0.267381 0.705236 0.490491 45 57.5 57.5 0 -1893 1 1 0 57.0398 52.289 56.7232 0.703983 0.228899 0.672319 0.490491 45 57.5 57.5 0 -1894 1 1 0 57.253 54.4826 55.225 0.725299 0.448259 0.522499 0.490491 45 57.5 57.5 0 -1895 1 1 0 57.3771 53.8673 55.5337 0.737712 0.38673 0.553372 0.490491 45 57.5 57.5 0 -1896 1 1 0 57.5794 54.6843 54.5399 0.757936 0.46843 0.45399 0.490491 45 57.5 57.5 0 -1897 1 1 0 57.7258 54.0829 54.8624 0.772575 0.408286 0.48624 0.490491 45 57.5 57.5 0 -1898 1 1 0 57.8345 53.4615 55.1612 0.783452 0.346153 0.516122 0.490491 45 57.5 57.5 0 -1899 1 1 0 57.859 54.8571 53.8268 0.785899 0.485712 0.382683 0.490491 45 57.5 57.5 0 -1900 1 1 0 58.0302 54.2713 54.156 0.803016 0.427135 0.415597 0.490491 45 57.5 57.5 0 -1901 1 1 0 58.1623 53.6603 54.4698 0.816233 0.366027 0.446977 0.490491 45 57.5 57.5 0 -1902 1 1 0 58.2518 53.038 54.7623 0.825175 0.303801 0.476225 0.490491 45 57.5 57.5 0 -1903 1 1 0 57.4979 51.8743 56.3458 0.749786 0.187432 0.634579 0.490491 45 57.5 57.5 0 -1904 1 1 0 57.9265 52.1302 55.7125 0.79265 0.213023 0.571251 0.490491 45 57.5 57.5 0 -1905 1 1 0 57.9017 51.4741 55.949 0.79017 0.147413 0.594895 0.490491 45 57.5 57.5 0 -1906 1 1 0 58.3036 52.3723 55.0421 0.830359 0.237228 0.504209 0.490491 45 57.5 57.5 0 -1907 1 1 0 58.3081 51.7253 55.2913 0.830812 0.172532 0.529135 0.490491 45 57.5 57.5 0 -1908 1 1 0 58.2711 51.0649 55.5186 0.82711 0.106494 0.551859 0.490491 45 57.5 57.5 0 -1909 1 1 0 57.4534 53.2214 55.8369 0.745339 0.322141 0.583692 0.490491 45 57.5 57.5 0 -1910 1 1 0 57.9011 52.8032 55.4511 0.790112 0.280319 0.545109 0.490491 45 57.5 57.5 0 -1911 1 1 0 57.4944 52.5518 56.1093 0.749435 0.25518 0.610926 0.490491 45 57.5 57.5 0 -1912 1 1 0 54.1427 57.3501 55.3678 0.414272 0.735011 0.536784 0.490491 45 57.5 57.5 0 -1913 1 1 0 54.8521 57.0447 55.1797 0.485208 0.704471 0.51797 0.490491 45 57.5 57.5 0 -1914 1 1 0 55.5242 56.6961 54.9644 0.552418 0.669612 0.496441 0.490491 45 57.5 57.5 0 -1915 1 1 0 55.1338 56.4658 55.6425 0.513375 0.646578 0.564254 0.490491 45 57.5 57.5 0 -1916 1 1 0 54.4396 56.7898 55.8472 0.443957 0.678977 0.584716 0.490491 45 57.5 57.5 0 -1917 1 1 0 54.7092 56.1924 56.2831 0.470917 0.619242 0.628313 0.490491 45 57.5 57.5 0 -1918 1 1 0 56.1924 56.2831 54.7092 0.619242 0.628313 0.470917 0.490491 45 57.5 57.5 0 -1919 1 1 0 56.7898 55.8472 54.4396 0.678977 0.584716 0.443957 0.490491 45 57.5 57.5 0 -1920 1 1 0 56.4658 55.6425 55.1338 0.646578 0.564254 0.513375 0.490491 45 57.5 57.5 0 -1921 1 1 0 57.3501 55.3678 54.1427 0.735011 0.536784 0.414272 0.490491 45 57.5 57.5 0 -1922 1 1 0 57.0447 55.1797 54.8521 0.704471 0.51797 0.485208 0.490491 45 57.5 57.5 0 -1923 1 1 0 56.6961 54.9644 55.5242 0.669612 0.496441 0.552418 0.490491 45 57.5 57.5 0 -1924 1 1 0 54.9644 55.5242 56.6961 0.496441 0.552418 0.669612 0.490491 45 57.5 57.5 0 -1925 1 1 0 55.6425 55.1338 56.4658 0.564254 0.513375 0.646578 0.490491 45 57.5 57.5 0 -1926 1 1 0 55.1797 54.8521 57.0447 0.51797 0.485208 0.704471 0.490491 45 57.5 57.5 0 -1927 1 1 0 56.2831 54.7092 56.1924 0.628313 0.470917 0.619242 0.490491 45 57.5 57.5 0 -1928 1 1 0 55.8472 54.4396 56.7898 0.584716 0.443957 0.678977 0.490491 45 57.5 57.5 0 -1929 1 1 0 55.3678 54.1427 57.3501 0.536784 0.414272 0.735011 0.490491 45 57.5 57.5 0 -1930 1 1 0 55.8195 56.0748 55.4065 0.581952 0.607478 0.54065 0.490491 45 57.5 57.5 0 -1931 1 1 0 56.0748 55.4065 55.8195 0.607478 0.54065 0.581952 0.490491 45 57.5 57.5 0 -1932 1 1 0 55.4065 55.8195 56.0748 0.54065 0.581952 0.607478 0.490491 45 57.5 57.5 0 -1933 1 1 0 48.9351 55.5186 41.7289 -0.106494 0.551859 -0.82711 0.490491 45 57.5 57.5 0 -1934 1 1 0 48.5259 55.949 42.0983 -0.147413 0.594895 -0.79017 0.490491 45 57.5 57.5 0 -1935 1 1 0 48.1257 56.3458 42.5021 -0.187432 0.634579 -0.749786 0.490491 45 57.5 57.5 0 -1936 1 1 0 47.8698 55.7125 42.0735 -0.213023 0.571251 -0.79265 0.490491 45 57.5 57.5 0 -1937 1 1 0 48.2747 55.2913 41.6919 -0.172532 0.529135 -0.830812 0.490491 45 57.5 57.5 0 -1938 1 1 0 47.6277 55.0421 41.6964 -0.237228 0.504209 -0.830359 0.490491 45 57.5 57.5 0 -1939 1 1 0 47.711 56.7232 42.9602 -0.228899 0.672319 -0.703983 0.490491 45 57.5 57.5 0 -1940 1 1 0 47.3262 57.0524 43.4338 -0.267381 0.705236 -0.65662 0.490491 45 57.5 57.5 0 -1941 1 1 0 47.04 56.4741 42.9769 -0.296004 0.647412 -0.70231 0.490491 45 57.5 57.5 0 -1942 1 1 0 46.9479 57.3479 43.9426 -0.305212 0.734794 -0.605742 0.490491 45 57.5 57.5 0 -1943 1 1 0 46.5857 57.6041 44.4755 -0.341435 0.760406 -0.552454 0.490491 45 57.5 57.5 0 -1944 1 1 0 46.2825 57.0711 43.985 -0.371748 0.707107 -0.601501 0.490491 45 57.5 57.5 0 -1945 1 1 0 46.6531 56.7891 43.465 -0.334691 0.678913 -0.653497 0.490491 45 57.5 57.5 0 -1946 1 1 0 46.3841 56.1919 43.0296 -0.361591 0.619186 -0.697037 0.490491 45 57.5 57.5 0 -1947 1 1 0 46.0023 56.4945 43.5316 -0.399769 0.649448 -0.64684 0.490491 45 57.5 57.5 0 -1948 1 1 0 45.7467 55.8779 43.1181 -0.425325 0.587785 -0.688191 0.490491 45 57.5 57.5 0 -1949 1 1 0 46.962 54.7623 41.7482 -0.303801 0.476225 -0.825175 0.490491 45 57.5 57.5 0 -1950 1 1 0 46.5385 55.1612 42.1655 -0.346153 0.516122 -0.783452 0.490491 45 57.5 57.5 0 -1951 1 1 0 46.3397 54.4698 41.8377 -0.366027 0.446977 -0.816233 0.490491 45 57.5 57.5 0 -1952 1 1 0 46.1327 55.5337 42.6229 -0.38673 0.553372 -0.737712 0.490491 45 57.5 57.5 0 -1953 1 1 0 45.9171 54.8624 42.2742 -0.408286 0.48624 -0.772575 0.490491 45 57.5 57.5 0 -1954 1 1 0 45.5174 55.225 42.747 -0.448259 0.522499 -0.725299 0.490491 45 57.5 57.5 0 -1955 1 1 0 45.3157 54.5399 42.4206 -0.46843 0.45399 -0.757936 0.490491 45 57.5 57.5 0 -1956 1 1 0 45.7287 54.156 41.9698 -0.427135 0.415597 -0.803016 0.490491 45 57.5 57.5 0 -1957 1 1 0 45.1429 53.8268 42.141 -0.485712 0.382683 -0.785899 0.490491 45 57.5 57.5 0 -1958 1 1 0 47.4482 56.1093 42.5056 -0.25518 0.610926 -0.749435 0.490491 45 57.5 57.5 0 -1959 1 1 0 46.7786 55.8369 42.5466 -0.322141 0.583692 -0.745339 0.490491 45 57.5 57.5 0 -1960 1 1 0 47.1968 55.4511 42.0989 -0.280319 0.545109 -0.790112 0.490491 45 57.5 57.5 0 -1961 1 1 0 46.1732 57.859 45.1429 -0.382683 0.785899 -0.485712 0.490491 45 57.5 57.5 0 -1962 1 1 0 45.844 58.0302 45.7287 -0.415597 0.803016 -0.427135 0.490491 45 57.5 57.5 0 -1963 1 1 0 45.4601 57.5794 45.3157 -0.45399 0.757936 -0.46843 0.490491 45 57.5 57.5 0 -1964 1 1 0 45.5302 58.1623 46.3397 -0.446977 0.816233 -0.366027 0.490491 45 57.5 57.5 0 -1965 1 1 0 45.2377 58.2518 46.962 -0.476225 0.825175 -0.303801 0.490491 45 57.5 57.5 0 -1966 1 1 0 44.8388 57.8345 46.5385 -0.516122 0.783452 -0.346153 0.490491 45 57.5 57.5 0 -1967 1 1 0 45.1376 57.7258 45.9171 -0.48624 0.772575 -0.408286 0.490491 45 57.5 57.5 0 -1968 1 1 0 44.775 57.253 45.5174 -0.522499 0.725299 -0.448259 0.490491 45 57.5 57.5 0 -1969 1 1 0 44.4663 57.3771 46.1327 -0.553372 0.737712 -0.38673 0.490491 45 57.5 57.5 0 -1970 1 1 0 44.1221 56.8819 45.7467 -0.587785 0.688191 -0.425325 0.490491 45 57.5 57.5 0 -1971 1 1 0 44.9579 58.3036 47.6277 -0.504209 0.830359 -0.237228 0.490491 45 57.5 57.5 0 -1972 1 1 0 44.7087 58.3081 48.2747 -0.529135 0.830812 -0.172532 0.490491 45 57.5 57.5 0 -1973 1 1 0 44.2875 57.9265 47.8698 -0.571251 0.79265 -0.213023 0.490491 45 57.5 57.5 0 -1974 1 1 0 44.4814 58.2711 48.9351 -0.551859 0.82711 -0.106494 0.490491 45 57.5 57.5 0 -1975 1 1 0 44.051 57.9017 48.5259 -0.594895 0.79017 -0.147413 0.490491 45 57.5 57.5 0 -1976 1 1 0 43.6542 57.4979 48.1257 -0.634579 0.749786 -0.187432 0.490491 45 57.5 57.5 0 -1977 1 1 0 43.8081 56.9704 46.3841 -0.619186 0.697037 -0.361591 0.490491 45 57.5 57.5 0 -1978 1 1 0 43.5055 56.4684 46.0023 -0.649448 0.64684 -0.399769 0.490491 45 57.5 57.5 0 -1979 1 1 0 43.5259 57.0231 47.04 -0.647412 0.70231 -0.296004 0.490491 45 57.5 57.5 0 -1980 1 1 0 43.2109 56.535 46.6531 -0.678913 0.653497 -0.334691 0.490491 45 57.5 57.5 0 -1981 1 1 0 42.9289 56.015 46.2825 -0.707107 0.601501 -0.371748 0.490491 45 57.5 57.5 0 -1982 1 1 0 43.2768 57.0398 47.711 -0.672319 0.703983 -0.228899 0.490491 45 57.5 57.5 0 -1983 1 1 0 42.9476 56.5662 47.3262 -0.705236 0.65662 -0.267381 0.490491 45 57.5 57.5 0 -1984 1 1 0 42.6521 56.0574 46.9479 -0.734794 0.605742 -0.305212 0.490491 45 57.5 57.5 0 -1985 1 1 0 42.3959 55.5245 46.5857 -0.760406 0.552454 -0.341435 0.490491 45 57.5 57.5 0 -1986 1 1 0 44.5489 57.9011 47.1968 -0.545109 0.790112 -0.280319 0.490491 45 57.5 57.5 0 -1987 1 1 0 43.8907 57.4944 47.4482 -0.610926 0.749435 -0.25518 0.490491 45 57.5 57.5 0 -1988 1 1 0 44.1631 57.4534 46.7786 -0.583692 0.745339 -0.322141 0.490491 45 57.5 57.5 0 -1989 1 1 0 44.4755 53.4143 42.3959 -0.552454 0.341435 -0.760406 0.490491 45 57.5 57.5 0 -1990 1 1 0 43.985 53.7175 42.9289 -0.601501 0.371748 -0.707107 0.490491 45 57.5 57.5 0 -1991 1 1 0 43.9426 53.0521 42.6521 -0.605742 0.305212 -0.734794 0.490491 45 57.5 57.5 0 -1992 1 1 0 43.5316 53.9977 43.5055 -0.64684 0.399769 -0.649448 0.490491 45 57.5 57.5 0 -1993 1 1 0 43.465 53.3469 43.2109 -0.653497 0.334691 -0.678913 0.490491 45 57.5 57.5 0 -1994 1 1 0 43.1181 54.2533 44.1221 -0.688191 0.425325 -0.587785 0.490491 45 57.5 57.5 0 -1995 1 1 0 43.0296 53.6159 43.8081 -0.697037 0.361591 -0.619186 0.490491 45 57.5 57.5 0 -1996 1 1 0 42.9769 52.96 43.5259 -0.70231 0.296004 -0.647412 0.490491 45 57.5 57.5 0 -1997 1 1 0 43.4338 52.6738 42.9476 -0.65662 0.267381 -0.705236 0.490491 45 57.5 57.5 0 -1998 1 1 0 42.9602 52.289 43.2768 -0.703983 0.228899 -0.672319 0.490491 45 57.5 57.5 0 -1999 1 1 0 42.747 54.4826 44.775 -0.725299 0.448259 -0.522499 0.490491 45 57.5 57.5 0 -2000 1 1 0 42.6229 53.8673 44.4663 -0.737712 0.38673 -0.553372 0.490491 45 57.5 57.5 0 -2001 1 1 0 42.4206 54.6843 45.4601 -0.757936 0.46843 -0.45399 0.490491 45 57.5 57.5 0 -2002 1 1 0 42.2742 54.0829 45.1376 -0.772575 0.408286 -0.48624 0.490491 45 57.5 57.5 0 -2003 1 1 0 42.1655 53.4615 44.8388 -0.783452 0.346153 -0.516122 0.490491 45 57.5 57.5 0 -2004 1 1 0 42.141 54.8571 46.1732 -0.785899 0.485712 -0.382683 0.490491 45 57.5 57.5 0 -2005 1 1 0 41.9698 54.2713 45.844 -0.803016 0.427135 -0.415597 0.490491 45 57.5 57.5 0 -2006 1 1 0 41.8377 53.6603 45.5302 -0.816233 0.366027 -0.446977 0.490491 45 57.5 57.5 0 -2007 1 1 0 41.7482 53.038 45.2377 -0.825175 0.303801 -0.476225 0.490491 45 57.5 57.5 0 -2008 1 1 0 42.5021 51.8743 43.6542 -0.749786 0.187432 -0.634579 0.490491 45 57.5 57.5 0 -2009 1 1 0 42.0735 52.1302 44.2875 -0.79265 0.213023 -0.571251 0.490491 45 57.5 57.5 0 -2010 1 1 0 42.0983 51.4741 44.051 -0.79017 0.147413 -0.594895 0.490491 45 57.5 57.5 0 -2011 1 1 0 41.6964 52.3723 44.9579 -0.830359 0.237228 -0.504209 0.490491 45 57.5 57.5 0 -2012 1 1 0 41.6919 51.7253 44.7087 -0.830812 0.172532 -0.529135 0.490491 45 57.5 57.5 0 -2013 1 1 0 41.7289 51.0649 44.4814 -0.82711 0.106494 -0.551859 0.490491 45 57.5 57.5 0 -2014 1 1 0 42.5466 53.2214 44.1631 -0.745339 0.322141 -0.583692 0.490491 45 57.5 57.5 0 -2015 1 1 0 42.0989 52.8032 44.5489 -0.790112 0.280319 -0.545109 0.490491 45 57.5 57.5 0 -2016 1 1 0 42.5056 52.5518 43.8907 -0.749435 0.25518 -0.610926 0.490491 45 57.5 57.5 0 -2017 1 1 0 45.8573 57.3501 44.6322 -0.414272 0.735011 -0.536784 0.490491 45 57.5 57.5 0 -2018 1 1 0 45.1479 57.0447 44.8203 -0.485208 0.704471 -0.51797 0.490491 45 57.5 57.5 0 -2019 1 1 0 44.4758 56.6961 45.0356 -0.552418 0.669612 -0.496441 0.490491 45 57.5 57.5 0 -2020 1 1 0 44.8662 56.4658 44.3575 -0.513375 0.646578 -0.564254 0.490491 45 57.5 57.5 0 -2021 1 1 0 45.5604 56.7898 44.1528 -0.443957 0.678977 -0.584716 0.490491 45 57.5 57.5 0 -2022 1 1 0 45.2908 56.1924 43.7169 -0.470917 0.619242 -0.628313 0.490491 45 57.5 57.5 0 -2023 1 1 0 43.8076 56.2831 45.2908 -0.619242 0.628313 -0.470917 0.490491 45 57.5 57.5 0 -2024 1 1 0 43.2102 55.8472 45.5604 -0.678977 0.584716 -0.443957 0.490491 45 57.5 57.5 0 -2025 1 1 0 43.5342 55.6425 44.8662 -0.646578 0.564254 -0.513375 0.490491 45 57.5 57.5 0 -2026 1 1 0 42.6499 55.3678 45.8573 -0.735011 0.536784 -0.414272 0.490491 45 57.5 57.5 0 -2027 1 1 0 42.9553 55.1797 45.1479 -0.704471 0.51797 -0.485208 0.490491 45 57.5 57.5 0 -2028 1 1 0 43.3039 54.9644 44.4758 -0.669612 0.496441 -0.552418 0.490491 45 57.5 57.5 0 -2029 1 1 0 45.0356 55.5242 43.3039 -0.496441 0.552418 -0.669612 0.490491 45 57.5 57.5 0 -2030 1 1 0 44.3575 55.1338 43.5342 -0.564254 0.513375 -0.646578 0.490491 45 57.5 57.5 0 -2031 1 1 0 44.8203 54.8521 42.9553 -0.51797 0.485208 -0.704471 0.490491 45 57.5 57.5 0 -2032 1 1 0 43.7169 54.7092 43.8076 -0.628313 0.470917 -0.619242 0.490491 45 57.5 57.5 0 -2033 1 1 0 44.1528 54.4396 43.2102 -0.584716 0.443957 -0.678977 0.490491 45 57.5 57.5 0 -2034 1 1 0 44.6322 54.1427 42.6499 -0.536784 0.414272 -0.735011 0.490491 45 57.5 57.5 0 -2035 1 1 0 44.1805 56.0748 44.5935 -0.581952 0.607478 -0.54065 0.490491 45 57.5 57.5 0 -2036 1 1 0 43.9252 55.4065 44.1805 -0.607478 0.54065 -0.581952 0.490491 45 57.5 57.5 0 -2037 1 1 0 44.5935 55.8195 43.9252 -0.54065 0.581952 -0.607478 0.490491 45 57.5 57.5 0 -2038 1 1 0 51.0649 55.5186 41.7289 0.106494 0.551859 -0.82711 0.490491 45 57.5 57.5 0 -2039 1 1 0 51.7253 55.2913 41.6919 0.172532 0.529135 -0.830812 0.490491 45 57.5 57.5 0 -2040 1 1 0 52.3723 55.0421 41.6964 0.237228 0.504209 -0.830359 0.490491 45 57.5 57.5 0 -2041 1 1 0 52.1302 55.7125 42.0735 0.213023 0.571251 -0.79265 0.490491 45 57.5 57.5 0 -2042 1 1 0 51.4741 55.949 42.0983 0.147413 0.594895 -0.79017 0.490491 45 57.5 57.5 0 -2043 1 1 0 51.8743 56.3458 42.5021 0.187432 0.634579 -0.749786 0.490491 45 57.5 57.5 0 -2044 1 1 0 53.038 54.7623 41.7482 0.303801 0.476225 -0.825175 0.490491 45 57.5 57.5 0 -2045 1 1 0 53.6603 54.4698 41.8377 0.366027 0.446977 -0.816233 0.490491 45 57.5 57.5 0 -2046 1 1 0 53.4615 55.1612 42.1655 0.346153 0.516122 -0.783452 0.490491 45 57.5 57.5 0 -2047 1 1 0 54.2713 54.156 41.9698 0.427135 0.415597 -0.803016 0.490491 45 57.5 57.5 0 -2048 1 1 0 54.8571 53.8268 42.141 0.485712 0.382683 -0.785899 0.490491 45 57.5 57.5 0 -2049 1 1 0 54.6843 54.5399 42.4206 0.46843 0.45399 -0.757936 0.490491 45 57.5 57.5 0 -2050 1 1 0 54.0829 54.8624 42.2742 0.408286 0.48624 -0.772575 0.490491 45 57.5 57.5 0 -2051 1 1 0 53.8673 55.5337 42.6229 0.38673 0.553372 -0.737712 0.490491 45 57.5 57.5 0 -2052 1 1 0 54.4826 55.225 42.747 0.448259 0.522499 -0.725299 0.490491 45 57.5 57.5 0 -2053 1 1 0 54.2533 55.8779 43.1181 0.425325 0.587785 -0.688191 0.490491 45 57.5 57.5 0 -2054 1 1 0 52.289 56.7232 42.9602 0.228899 0.672319 -0.703983 0.490491 45 57.5 57.5 0 -2055 1 1 0 52.96 56.4741 42.9769 0.296004 0.647412 -0.70231 0.490491 45 57.5 57.5 0 -2056 1 1 0 52.6738 57.0524 43.4338 0.267381 0.705236 -0.65662 0.490491 45 57.5 57.5 0 -2057 1 1 0 53.6159 56.1919 43.0296 0.361591 0.619186 -0.697037 0.490491 45 57.5 57.5 0 -2058 1 1 0 53.3469 56.7891 43.465 0.334691 0.678913 -0.653497 0.490491 45 57.5 57.5 0 -2059 1 1 0 53.9977 56.4945 43.5316 0.399769 0.649448 -0.64684 0.490491 45 57.5 57.5 0 -2060 1 1 0 53.7175 57.0711 43.985 0.371748 0.707107 -0.601501 0.490491 45 57.5 57.5 0 -2061 1 1 0 53.0521 57.3479 43.9426 0.305212 0.734794 -0.605742 0.490491 45 57.5 57.5 0 -2062 1 1 0 53.4143 57.6041 44.4755 0.341435 0.760406 -0.552454 0.490491 45 57.5 57.5 0 -2063 1 1 0 52.8032 55.4511 42.0989 0.280319 0.545109 -0.790112 0.490491 45 57.5 57.5 0 -2064 1 1 0 53.2214 55.8369 42.5466 0.322141 0.583692 -0.745339 0.490491 45 57.5 57.5 0 -2065 1 1 0 52.5518 56.1093 42.5056 0.25518 0.610926 -0.749435 0.490491 45 57.5 57.5 0 -2066 1 1 0 55.5245 53.4143 42.3959 0.552454 0.341435 -0.760406 0.490491 45 57.5 57.5 0 -2067 1 1 0 56.0574 53.0521 42.6521 0.605742 0.305212 -0.734794 0.490491 45 57.5 57.5 0 -2068 1 1 0 56.015 53.7175 42.9289 0.601501 0.371748 -0.707107 0.490491 45 57.5 57.5 0 -2069 1 1 0 56.5662 52.6738 42.9476 0.65662 0.267381 -0.705236 0.490491 45 57.5 57.5 0 -2070 1 1 0 57.0398 52.289 43.2768 0.703983 0.228899 -0.672319 0.490491 45 57.5 57.5 0 -2071 1 1 0 57.0231 52.96 43.5259 0.70231 0.296004 -0.647412 0.490491 45 57.5 57.5 0 -2072 1 1 0 56.535 53.3469 43.2109 0.653497 0.334691 -0.678913 0.490491 45 57.5 57.5 0 -2073 1 1 0 56.4684 53.9977 43.5055 0.64684 0.399769 -0.649448 0.490491 45 57.5 57.5 0 -2074 1 1 0 56.9704 53.6159 43.8081 0.697037 0.361591 -0.619186 0.490491 45 57.5 57.5 0 -2075 1 1 0 56.8819 54.2533 44.1221 0.688191 0.425325 -0.587785 0.490491 45 57.5 57.5 0 -2076 1 1 0 57.4979 51.8743 43.6542 0.749786 0.187432 -0.634579 0.490491 45 57.5 57.5 0 -2077 1 1 0 57.9017 51.4741 44.051 0.79017 0.147413 -0.594895 0.490491 45 57.5 57.5 0 -2078 1 1 0 57.9265 52.1302 44.2875 0.79265 0.213023 -0.571251 0.490491 45 57.5 57.5 0 -2079 1 1 0 58.2711 51.0649 44.4814 0.82711 0.106494 -0.551859 0.490491 45 57.5 57.5 0 -2080 1 1 0 58.3081 51.7253 44.7087 0.830812 0.172532 -0.529135 0.490491 45 57.5 57.5 0 -2081 1 1 0 58.3036 52.3723 44.9579 0.830359 0.237228 -0.504209 0.490491 45 57.5 57.5 0 -2082 1 1 0 57.3771 53.8673 44.4663 0.737712 0.38673 -0.553372 0.490491 45 57.5 57.5 0 -2083 1 1 0 57.253 54.4826 44.775 0.725299 0.448259 -0.522499 0.490491 45 57.5 57.5 0 -2084 1 1 0 57.8345 53.4615 44.8388 0.783452 0.346153 -0.516122 0.490491 45 57.5 57.5 0 -2085 1 1 0 57.7258 54.0829 45.1376 0.772575 0.408286 -0.48624 0.490491 45 57.5 57.5 0 -2086 1 1 0 57.5794 54.6843 45.4601 0.757936 0.46843 -0.45399 0.490491 45 57.5 57.5 0 -2087 1 1 0 58.2518 53.038 45.2377 0.825175 0.303801 -0.476225 0.490491 45 57.5 57.5 0 -2088 1 1 0 58.1623 53.6603 45.5302 0.816233 0.366027 -0.446977 0.490491 45 57.5 57.5 0 -2089 1 1 0 58.0302 54.2713 45.844 0.803016 0.427135 -0.415597 0.490491 45 57.5 57.5 0 -2090 1 1 0 57.859 54.8571 46.1732 0.785899 0.485712 -0.382683 0.490491 45 57.5 57.5 0 -2091 1 1 0 57.4944 52.5518 43.8907 0.749435 0.25518 -0.610926 0.490491 45 57.5 57.5 0 -2092 1 1 0 57.9011 52.8032 44.5489 0.790112 0.280319 -0.545109 0.490491 45 57.5 57.5 0 -2093 1 1 0 57.4534 53.2214 44.1631 0.745339 0.322141 -0.583692 0.490491 45 57.5 57.5 0 -2094 1 1 0 53.8268 57.859 45.1429 0.382683 0.785899 -0.485712 0.490491 45 57.5 57.5 0 -2095 1 1 0 54.5399 57.5794 45.3157 0.45399 0.757936 -0.46843 0.490491 45 57.5 57.5 0 -2096 1 1 0 54.156 58.0302 45.7287 0.415597 0.803016 -0.427135 0.490491 45 57.5 57.5 0 -2097 1 1 0 55.225 57.253 45.5174 0.522499 0.725299 -0.448259 0.490491 45 57.5 57.5 0 -2098 1 1 0 54.8624 57.7258 45.9171 0.48624 0.772575 -0.408286 0.490491 45 57.5 57.5 0 -2099 1 1 0 55.8779 56.8819 45.7467 0.587785 0.688191 -0.425325 0.490491 45 57.5 57.5 0 -2100 1 1 0 55.5337 57.3771 46.1327 0.553372 0.737712 -0.38673 0.490491 45 57.5 57.5 0 -2101 1 1 0 55.1612 57.8345 46.5385 0.516122 0.783452 -0.346153 0.490491 45 57.5 57.5 0 -2102 1 1 0 54.4698 58.1623 46.3397 0.446977 0.816233 -0.366027 0.490491 45 57.5 57.5 0 -2103 1 1 0 54.7623 58.2518 46.962 0.476225 0.825175 -0.303801 0.490491 45 57.5 57.5 0 -2104 1 1 0 56.4945 56.4684 46.0023 0.649448 0.64684 -0.399769 0.490491 45 57.5 57.5 0 -2105 1 1 0 56.1919 56.9704 46.3841 0.619186 0.697037 -0.361591 0.490491 45 57.5 57.5 0 -2106 1 1 0 57.0711 56.015 46.2825 0.707107 0.601501 -0.371748 0.490491 45 57.5 57.5 0 -2107 1 1 0 56.7891 56.535 46.6531 0.678913 0.653497 -0.334691 0.490491 45 57.5 57.5 0 -2108 1 1 0 56.4741 57.0231 47.04 0.647412 0.70231 -0.296004 0.490491 45 57.5 57.5 0 -2109 1 1 0 57.6041 55.5245 46.5857 0.760406 0.552454 -0.341435 0.490491 45 57.5 57.5 0 -2110 1 1 0 57.3479 56.0574 46.9479 0.734794 0.605742 -0.305212 0.490491 45 57.5 57.5 0 -2111 1 1 0 57.0524 56.5662 47.3262 0.705236 0.65662 -0.267381 0.490491 45 57.5 57.5 0 -2112 1 1 0 56.7232 57.0398 47.711 0.672319 0.703983 -0.228899 0.490491 45 57.5 57.5 0 -2113 1 1 0 55.0421 58.3036 47.6277 0.504209 0.830359 -0.237228 0.490491 45 57.5 57.5 0 -2114 1 1 0 55.7125 57.9265 47.8698 0.571251 0.79265 -0.213023 0.490491 45 57.5 57.5 0 -2115 1 1 0 55.2913 58.3081 48.2747 0.529135 0.830812 -0.172532 0.490491 45 57.5 57.5 0 -2116 1 1 0 56.3458 57.4979 48.1257 0.634579 0.749786 -0.187432 0.490491 45 57.5 57.5 0 -2117 1 1 0 55.949 57.9017 48.5259 0.594895 0.79017 -0.147413 0.490491 45 57.5 57.5 0 -2118 1 1 0 55.5186 58.2711 48.9351 0.551859 0.82711 -0.106494 0.490491 45 57.5 57.5 0 -2119 1 1 0 55.8369 57.4534 46.7786 0.583692 0.745339 -0.322141 0.490491 45 57.5 57.5 0 -2120 1 1 0 56.1093 57.4944 47.4482 0.610926 0.749435 -0.25518 0.490491 45 57.5 57.5 0 -2121 1 1 0 55.4511 57.9011 47.1968 0.545109 0.790112 -0.280319 0.490491 45 57.5 57.5 0 -2122 1 1 0 55.3678 54.1427 42.6499 0.536784 0.414272 -0.735011 0.490491 45 57.5 57.5 0 -2123 1 1 0 55.8472 54.4396 43.2102 0.584716 0.443957 -0.678977 0.490491 45 57.5 57.5 0 -2124 1 1 0 56.2831 54.7092 43.8076 0.628313 0.470917 -0.619242 0.490491 45 57.5 57.5 0 -2125 1 1 0 55.6425 55.1338 43.5342 0.564254 0.513375 -0.646578 0.490491 45 57.5 57.5 0 -2126 1 1 0 55.1797 54.8521 42.9553 0.51797 0.485208 -0.704471 0.490491 45 57.5 57.5 0 -2127 1 1 0 54.9644 55.5242 43.3039 0.496441 0.552418 -0.669612 0.490491 45 57.5 57.5 0 -2128 1 1 0 56.6961 54.9644 44.4758 0.669612 0.496441 -0.552418 0.490491 45 57.5 57.5 0 -2129 1 1 0 57.0447 55.1797 45.1479 0.704471 0.51797 -0.485208 0.490491 45 57.5 57.5 0 -2130 1 1 0 56.4658 55.6425 44.8662 0.646578 0.564254 -0.513375 0.490491 45 57.5 57.5 0 -2131 1 1 0 57.3501 55.3678 45.8573 0.735011 0.536784 -0.414272 0.490491 45 57.5 57.5 0 -2132 1 1 0 56.7898 55.8472 45.5604 0.678977 0.584716 -0.443957 0.490491 45 57.5 57.5 0 -2133 1 1 0 56.1924 56.2831 45.2908 0.619242 0.628313 -0.470917 0.490491 45 57.5 57.5 0 -2134 1 1 0 54.7092 56.1924 43.7169 0.470917 0.619242 -0.628313 0.490491 45 57.5 57.5 0 -2135 1 1 0 55.1338 56.4658 44.3575 0.513375 0.646578 -0.564254 0.490491 45 57.5 57.5 0 -2136 1 1 0 54.4396 56.7898 44.1528 0.443957 0.678977 -0.584716 0.490491 45 57.5 57.5 0 -2137 1 1 0 55.5242 56.6961 45.0356 0.552418 0.669612 -0.496441 0.490491 45 57.5 57.5 0 -2138 1 1 0 54.8521 57.0447 44.8203 0.485208 0.704471 -0.51797 0.490491 45 57.5 57.5 0 -2139 1 1 0 54.1427 57.3501 44.6322 0.414272 0.735011 -0.536784 0.490491 45 57.5 57.5 0 -2140 1 1 0 56.0748 55.4065 44.1805 0.607478 0.54065 -0.581952 0.490491 45 57.5 57.5 0 -2141 1 1 0 55.8195 56.0748 44.5935 0.581952 0.607478 -0.54065 0.490491 45 57.5 57.5 0 -2142 1 1 0 55.4065 55.8195 43.9252 0.54065 0.581952 -0.607478 0.490491 45 57.5 57.5 0 -2143 1 1 0 48.9351 44.4814 41.7289 -0.106494 -0.551859 -0.82711 0.490491 45 57.5 57.5 0 -2144 1 1 0 48.2747 44.7087 41.6919 -0.172532 -0.529135 -0.830812 0.490491 45 57.5 57.5 0 -2145 1 1 0 47.6277 44.9579 41.6964 -0.237228 -0.504209 -0.830359 0.490491 45 57.5 57.5 0 -2146 1 1 0 47.8698 44.2875 42.0735 -0.213023 -0.571251 -0.79265 0.490491 45 57.5 57.5 0 -2147 1 1 0 48.5259 44.051 42.0983 -0.147413 -0.594895 -0.79017 0.490491 45 57.5 57.5 0 -2148 1 1 0 48.1257 43.6542 42.5021 -0.187432 -0.634579 -0.749786 0.490491 45 57.5 57.5 0 -2149 1 1 0 46.962 45.2377 41.7482 -0.303801 -0.476225 -0.825175 0.490491 45 57.5 57.5 0 -2150 1 1 0 46.3397 45.5302 41.8377 -0.366027 -0.446977 -0.816233 0.490491 45 57.5 57.5 0 -2151 1 1 0 46.5385 44.8388 42.1655 -0.346153 -0.516122 -0.783452 0.490491 45 57.5 57.5 0 -2152 1 1 0 45.7287 45.844 41.9698 -0.427135 -0.415597 -0.803016 0.490491 45 57.5 57.5 0 -2153 1 1 0 45.1429 46.1732 42.141 -0.485712 -0.382683 -0.785899 0.490491 45 57.5 57.5 0 -2154 1 1 0 45.3157 45.4601 42.4206 -0.46843 -0.45399 -0.757936 0.490491 45 57.5 57.5 0 -2155 1 1 0 45.9171 45.1376 42.2742 -0.408286 -0.48624 -0.772575 0.490491 45 57.5 57.5 0 -2156 1 1 0 46.1327 44.4663 42.6229 -0.38673 -0.553372 -0.737712 0.490491 45 57.5 57.5 0 -2157 1 1 0 45.5174 44.775 42.747 -0.448259 -0.522499 -0.725299 0.490491 45 57.5 57.5 0 -2158 1 1 0 45.7467 44.1221 43.1181 -0.425325 -0.587785 -0.688191 0.490491 45 57.5 57.5 0 -2159 1 1 0 47.711 43.2768 42.9602 -0.228899 -0.672319 -0.703983 0.490491 45 57.5 57.5 0 -2160 1 1 0 47.04 43.5259 42.9769 -0.296004 -0.647412 -0.70231 0.490491 45 57.5 57.5 0 -2161 1 1 0 47.3262 42.9476 43.4338 -0.267381 -0.705236 -0.65662 0.490491 45 57.5 57.5 0 -2162 1 1 0 46.3841 43.8081 43.0296 -0.361591 -0.619186 -0.697037 0.490491 45 57.5 57.5 0 -2163 1 1 0 46.6531 43.2109 43.465 -0.334691 -0.678913 -0.653497 0.490491 45 57.5 57.5 0 -2164 1 1 0 46.0023 43.5055 43.5316 -0.399769 -0.649448 -0.64684 0.490491 45 57.5 57.5 0 -2165 1 1 0 46.2825 42.9289 43.985 -0.371748 -0.707107 -0.601501 0.490491 45 57.5 57.5 0 -2166 1 1 0 46.9479 42.6521 43.9426 -0.305212 -0.734794 -0.605742 0.490491 45 57.5 57.5 0 -2167 1 1 0 46.5857 42.3959 44.4755 -0.341435 -0.760406 -0.552454 0.490491 45 57.5 57.5 0 -2168 1 1 0 47.1968 44.5489 42.0989 -0.280319 -0.545109 -0.790112 0.490491 45 57.5 57.5 0 -2169 1 1 0 46.7786 44.1631 42.5466 -0.322141 -0.583692 -0.745339 0.490491 45 57.5 57.5 0 -2170 1 1 0 47.4482 43.8907 42.5056 -0.25518 -0.610926 -0.749435 0.490491 45 57.5 57.5 0 -2171 1 1 0 44.4755 46.5857 42.3959 -0.552454 -0.341435 -0.760406 0.490491 45 57.5 57.5 0 -2172 1 1 0 43.9426 46.9479 42.6521 -0.605742 -0.305212 -0.734794 0.490491 45 57.5 57.5 0 -2173 1 1 0 43.985 46.2825 42.9289 -0.601501 -0.371748 -0.707107 0.490491 45 57.5 57.5 0 -2174 1 1 0 43.4338 47.3262 42.9476 -0.65662 -0.267381 -0.705236 0.490491 45 57.5 57.5 0 -2175 1 1 0 42.9602 47.711 43.2768 -0.703983 -0.228899 -0.672319 0.490491 45 57.5 57.5 0 -2176 1 1 0 42.9769 47.04 43.5259 -0.70231 -0.296004 -0.647412 0.490491 45 57.5 57.5 0 -2177 1 1 0 43.465 46.6531 43.2109 -0.653497 -0.334691 -0.678913 0.490491 45 57.5 57.5 0 -2178 1 1 0 43.5316 46.0023 43.5055 -0.64684 -0.399769 -0.649448 0.490491 45 57.5 57.5 0 -2179 1 1 0 43.0296 46.3841 43.8081 -0.697037 -0.361591 -0.619186 0.490491 45 57.5 57.5 0 -2180 1 1 0 43.1181 45.7467 44.1221 -0.688191 -0.425325 -0.587785 0.490491 45 57.5 57.5 0 -2181 1 1 0 42.5021 48.1257 43.6542 -0.749786 -0.187432 -0.634579 0.490491 45 57.5 57.5 0 -2182 1 1 0 42.0983 48.5259 44.051 -0.79017 -0.147413 -0.594895 0.490491 45 57.5 57.5 0 -2183 1 1 0 42.0735 47.8698 44.2875 -0.79265 -0.213023 -0.571251 0.490491 45 57.5 57.5 0 -2184 1 1 0 41.7289 48.9351 44.4814 -0.82711 -0.106494 -0.551859 0.490491 45 57.5 57.5 0 -2185 1 1 0 41.6919 48.2747 44.7087 -0.830812 -0.172532 -0.529135 0.490491 45 57.5 57.5 0 -2186 1 1 0 41.6964 47.6277 44.9579 -0.830359 -0.237228 -0.504209 0.490491 45 57.5 57.5 0 -2187 1 1 0 42.6229 46.1327 44.4663 -0.737712 -0.38673 -0.553372 0.490491 45 57.5 57.5 0 -2188 1 1 0 42.747 45.5174 44.775 -0.725299 -0.448259 -0.522499 0.490491 45 57.5 57.5 0 -2189 1 1 0 42.1655 46.5385 44.8388 -0.783452 -0.346153 -0.516122 0.490491 45 57.5 57.5 0 -2190 1 1 0 42.2742 45.9171 45.1376 -0.772575 -0.408286 -0.48624 0.490491 45 57.5 57.5 0 -2191 1 1 0 42.4206 45.3157 45.4601 -0.757936 -0.46843 -0.45399 0.490491 45 57.5 57.5 0 -2192 1 1 0 41.7482 46.962 45.2377 -0.825175 -0.303801 -0.476225 0.490491 45 57.5 57.5 0 -2193 1 1 0 41.8377 46.3397 45.5302 -0.816233 -0.366027 -0.446977 0.490491 45 57.5 57.5 0 -2194 1 1 0 41.9698 45.7287 45.844 -0.803016 -0.427135 -0.415597 0.490491 45 57.5 57.5 0 -2195 1 1 0 42.141 45.1429 46.1732 -0.785899 -0.485712 -0.382683 0.490491 45 57.5 57.5 0 -2196 1 1 0 42.5056 47.4482 43.8907 -0.749435 -0.25518 -0.610926 0.490491 45 57.5 57.5 0 -2197 1 1 0 42.0989 47.1968 44.5489 -0.790112 -0.280319 -0.545109 0.490491 45 57.5 57.5 0 -2198 1 1 0 42.5466 46.7786 44.1631 -0.745339 -0.322141 -0.583692 0.490491 45 57.5 57.5 0 -2199 1 1 0 46.1732 42.141 45.1429 -0.382683 -0.785899 -0.485712 0.490491 45 57.5 57.5 0 -2200 1 1 0 45.4601 42.4206 45.3157 -0.45399 -0.757936 -0.46843 0.490491 45 57.5 57.5 0 -2201 1 1 0 45.844 41.9698 45.7287 -0.415597 -0.803016 -0.427135 0.490491 45 57.5 57.5 0 -2202 1 1 0 44.775 42.747 45.5174 -0.522499 -0.725299 -0.448259 0.490491 45 57.5 57.5 0 -2203 1 1 0 45.1376 42.2742 45.9171 -0.48624 -0.772575 -0.408286 0.490491 45 57.5 57.5 0 -2204 1 1 0 44.1221 43.1181 45.7467 -0.587785 -0.688191 -0.425325 0.490491 45 57.5 57.5 0 -2205 1 1 0 44.4663 42.6229 46.1327 -0.553372 -0.737712 -0.38673 0.490491 45 57.5 57.5 0 -2206 1 1 0 44.8388 42.1655 46.5385 -0.516122 -0.783452 -0.346153 0.490491 45 57.5 57.5 0 -2207 1 1 0 45.5302 41.8377 46.3397 -0.446977 -0.816233 -0.366027 0.490491 45 57.5 57.5 0 -2208 1 1 0 45.2377 41.7482 46.962 -0.476225 -0.825175 -0.303801 0.490491 45 57.5 57.5 0 -2209 1 1 0 43.5055 43.5316 46.0023 -0.649448 -0.64684 -0.399769 0.490491 45 57.5 57.5 0 -2210 1 1 0 43.8081 43.0296 46.3841 -0.619186 -0.697037 -0.361591 0.490491 45 57.5 57.5 0 -2211 1 1 0 42.9289 43.985 46.2825 -0.707107 -0.601501 -0.371748 0.490491 45 57.5 57.5 0 -2212 1 1 0 43.2109 43.465 46.6531 -0.678913 -0.653497 -0.334691 0.490491 45 57.5 57.5 0 -2213 1 1 0 43.5259 42.9769 47.04 -0.647412 -0.70231 -0.296004 0.490491 45 57.5 57.5 0 -2214 1 1 0 42.3959 44.4755 46.5857 -0.760406 -0.552454 -0.341435 0.490491 45 57.5 57.5 0 -2215 1 1 0 42.6521 43.9426 46.9479 -0.734794 -0.605742 -0.305212 0.490491 45 57.5 57.5 0 -2216 1 1 0 42.9476 43.4338 47.3262 -0.705236 -0.65662 -0.267381 0.490491 45 57.5 57.5 0 -2217 1 1 0 43.2768 42.9602 47.711 -0.672319 -0.703983 -0.228899 0.490491 45 57.5 57.5 0 -2218 1 1 0 44.9579 41.6964 47.6277 -0.504209 -0.830359 -0.237228 0.490491 45 57.5 57.5 0 -2219 1 1 0 44.2875 42.0735 47.8698 -0.571251 -0.79265 -0.213023 0.490491 45 57.5 57.5 0 -2220 1 1 0 44.7087 41.6919 48.2747 -0.529135 -0.830812 -0.172532 0.490491 45 57.5 57.5 0 -2221 1 1 0 43.6542 42.5021 48.1257 -0.634579 -0.749786 -0.187432 0.490491 45 57.5 57.5 0 -2222 1 1 0 44.051 42.0983 48.5259 -0.594895 -0.79017 -0.147413 0.490491 45 57.5 57.5 0 -2223 1 1 0 44.4814 41.7289 48.9351 -0.551859 -0.82711 -0.106494 0.490491 45 57.5 57.5 0 -2224 1 1 0 44.1631 42.5466 46.7786 -0.583692 -0.745339 -0.322141 0.490491 45 57.5 57.5 0 -2225 1 1 0 43.8907 42.5056 47.4482 -0.610926 -0.749435 -0.25518 0.490491 45 57.5 57.5 0 -2226 1 1 0 44.5489 42.0989 47.1968 -0.545109 -0.790112 -0.280319 0.490491 45 57.5 57.5 0 -2227 1 1 0 44.6322 45.8573 42.6499 -0.536784 -0.414272 -0.735011 0.490491 45 57.5 57.5 0 -2228 1 1 0 44.1528 45.5604 43.2102 -0.584716 -0.443957 -0.678977 0.490491 45 57.5 57.5 0 -2229 1 1 0 43.7169 45.2908 43.8076 -0.628313 -0.470917 -0.619242 0.490491 45 57.5 57.5 0 -2230 1 1 0 44.3575 44.8662 43.5342 -0.564254 -0.513375 -0.646578 0.490491 45 57.5 57.5 0 -2231 1 1 0 44.8203 45.1479 42.9553 -0.51797 -0.485208 -0.704471 0.490491 45 57.5 57.5 0 -2232 1 1 0 45.0356 44.4758 43.3039 -0.496441 -0.552418 -0.669612 0.490491 45 57.5 57.5 0 -2233 1 1 0 43.3039 45.0356 44.4758 -0.669612 -0.496441 -0.552418 0.490491 45 57.5 57.5 0 -2234 1 1 0 42.9553 44.8203 45.1479 -0.704471 -0.51797 -0.485208 0.490491 45 57.5 57.5 0 -2235 1 1 0 43.5342 44.3575 44.8662 -0.646578 -0.564254 -0.513375 0.490491 45 57.5 57.5 0 -2236 1 1 0 42.6499 44.6322 45.8573 -0.735011 -0.536784 -0.414272 0.490491 45 57.5 57.5 0 -2237 1 1 0 43.2102 44.1528 45.5604 -0.678977 -0.584716 -0.443957 0.490491 45 57.5 57.5 0 -2238 1 1 0 43.8076 43.7169 45.2908 -0.619242 -0.628313 -0.470917 0.490491 45 57.5 57.5 0 -2239 1 1 0 45.2908 43.8076 43.7169 -0.470917 -0.619242 -0.628313 0.490491 45 57.5 57.5 0 -2240 1 1 0 44.8662 43.5342 44.3575 -0.513375 -0.646578 -0.564254 0.490491 45 57.5 57.5 0 -2241 1 1 0 45.5604 43.2102 44.1528 -0.443957 -0.678977 -0.584716 0.490491 45 57.5 57.5 0 -2242 1 1 0 44.4758 43.3039 45.0356 -0.552418 -0.669612 -0.496441 0.490491 45 57.5 57.5 0 -2243 1 1 0 45.1479 42.9553 44.8203 -0.485208 -0.704471 -0.51797 0.490491 45 57.5 57.5 0 -2244 1 1 0 45.8573 42.6499 44.6322 -0.414272 -0.735011 -0.536784 0.490491 45 57.5 57.5 0 -2245 1 1 0 43.9252 44.5935 44.1805 -0.607478 -0.54065 -0.581952 0.490491 45 57.5 57.5 0 -2246 1 1 0 44.1805 43.9252 44.5935 -0.581952 -0.607478 -0.54065 0.490491 45 57.5 57.5 0 -2247 1 1 0 44.5935 44.1805 43.9252 -0.54065 -0.581952 -0.607478 0.490491 45 57.5 57.5 0 -2248 1 1 0 51.0649 44.4814 41.7289 0.106494 -0.551859 -0.82711 0.490491 45 57.5 57.5 0 -2249 1 1 0 51.4741 44.051 42.0983 0.147413 -0.594895 -0.79017 0.490491 45 57.5 57.5 0 -2250 1 1 0 51.8743 43.6542 42.5021 0.187432 -0.634579 -0.749786 0.490491 45 57.5 57.5 0 -2251 1 1 0 52.1302 44.2875 42.0735 0.213023 -0.571251 -0.79265 0.490491 45 57.5 57.5 0 -2252 1 1 0 51.7253 44.7087 41.6919 0.172532 -0.529135 -0.830812 0.490491 45 57.5 57.5 0 -2253 1 1 0 52.3723 44.9579 41.6964 0.237228 -0.504209 -0.830359 0.490491 45 57.5 57.5 0 -2254 1 1 0 52.289 43.2768 42.9602 0.228899 -0.672319 -0.703983 0.490491 45 57.5 57.5 0 -2255 1 1 0 52.6738 42.9476 43.4338 0.267381 -0.705236 -0.65662 0.490491 45 57.5 57.5 0 -2256 1 1 0 52.96 43.5259 42.9769 0.296004 -0.647412 -0.70231 0.490491 45 57.5 57.5 0 -2257 1 1 0 53.0521 42.6521 43.9426 0.305212 -0.734794 -0.605742 0.490491 45 57.5 57.5 0 -2258 1 1 0 53.4143 42.3959 44.4755 0.341435 -0.760406 -0.552454 0.490491 45 57.5 57.5 0 -2259 1 1 0 53.7175 42.9289 43.985 0.371748 -0.707107 -0.601501 0.490491 45 57.5 57.5 0 -2260 1 1 0 53.3469 43.2109 43.465 0.334691 -0.678913 -0.653497 0.490491 45 57.5 57.5 0 -2261 1 1 0 53.6159 43.8081 43.0296 0.361591 -0.619186 -0.697037 0.490491 45 57.5 57.5 0 -2262 1 1 0 53.9977 43.5055 43.5316 0.399769 -0.649448 -0.64684 0.490491 45 57.5 57.5 0 -2263 1 1 0 54.2533 44.1221 43.1181 0.425325 -0.587785 -0.688191 0.490491 45 57.5 57.5 0 -2264 1 1 0 53.038 45.2377 41.7482 0.303801 -0.476225 -0.825175 0.490491 45 57.5 57.5 0 -2265 1 1 0 53.4615 44.8388 42.1655 0.346153 -0.516122 -0.783452 0.490491 45 57.5 57.5 0 -2266 1 1 0 53.6603 45.5302 41.8377 0.366027 -0.446977 -0.816233 0.490491 45 57.5 57.5 0 -2267 1 1 0 53.8673 44.4663 42.6229 0.38673 -0.553372 -0.737712 0.490491 45 57.5 57.5 0 -2268 1 1 0 54.0829 45.1376 42.2742 0.408286 -0.48624 -0.772575 0.490491 45 57.5 57.5 0 -2269 1 1 0 54.4826 44.775 42.747 0.448259 -0.522499 -0.725299 0.490491 45 57.5 57.5 0 -2270 1 1 0 54.6843 45.4601 42.4206 0.46843 -0.45399 -0.757936 0.490491 45 57.5 57.5 0 -2271 1 1 0 54.2713 45.844 41.9698 0.427135 -0.415597 -0.803016 0.490491 45 57.5 57.5 0 -2272 1 1 0 54.8571 46.1732 42.141 0.485712 -0.382683 -0.785899 0.490491 45 57.5 57.5 0 -2273 1 1 0 52.5518 43.8907 42.5056 0.25518 -0.610926 -0.749435 0.490491 45 57.5 57.5 0 -2274 1 1 0 53.2214 44.1631 42.5466 0.322141 -0.583692 -0.745339 0.490491 45 57.5 57.5 0 -2275 1 1 0 52.8032 44.5489 42.0989 0.280319 -0.545109 -0.790112 0.490491 45 57.5 57.5 0 -2276 1 1 0 53.8268 42.141 45.1429 0.382683 -0.785899 -0.485712 0.490491 45 57.5 57.5 0 -2277 1 1 0 54.156 41.9698 45.7287 0.415597 -0.803016 -0.427135 0.490491 45 57.5 57.5 0 -2278 1 1 0 54.5399 42.4206 45.3157 0.45399 -0.757936 -0.46843 0.490491 45 57.5 57.5 0 -2279 1 1 0 54.4698 41.8377 46.3397 0.446977 -0.816233 -0.366027 0.490491 45 57.5 57.5 0 -2280 1 1 0 54.7623 41.7482 46.962 0.476225 -0.825175 -0.303801 0.490491 45 57.5 57.5 0 -2281 1 1 0 55.1612 42.1655 46.5385 0.516122 -0.783452 -0.346153 0.490491 45 57.5 57.5 0 -2282 1 1 0 54.8624 42.2742 45.9171 0.48624 -0.772575 -0.408286 0.490491 45 57.5 57.5 0 -2283 1 1 0 55.225 42.747 45.5174 0.522499 -0.725299 -0.448259 0.490491 45 57.5 57.5 0 -2284 1 1 0 55.5337 42.6229 46.1327 0.553372 -0.737712 -0.38673 0.490491 45 57.5 57.5 0 -2285 1 1 0 55.8779 43.1181 45.7467 0.587785 -0.688191 -0.425325 0.490491 45 57.5 57.5 0 -2286 1 1 0 55.0421 41.6964 47.6277 0.504209 -0.830359 -0.237228 0.490491 45 57.5 57.5 0 -2287 1 1 0 55.2913 41.6919 48.2747 0.529135 -0.830812 -0.172532 0.490491 45 57.5 57.5 0 -2288 1 1 0 55.7125 42.0735 47.8698 0.571251 -0.79265 -0.213023 0.490491 45 57.5 57.5 0 -2289 1 1 0 55.5186 41.7289 48.9351 0.551859 -0.82711 -0.106494 0.490491 45 57.5 57.5 0 -2290 1 1 0 55.949 42.0983 48.5259 0.594895 -0.79017 -0.147413 0.490491 45 57.5 57.5 0 -2291 1 1 0 56.3458 42.5021 48.1257 0.634579 -0.749786 -0.187432 0.490491 45 57.5 57.5 0 -2292 1 1 0 56.1919 43.0296 46.3841 0.619186 -0.697037 -0.361591 0.490491 45 57.5 57.5 0 -2293 1 1 0 56.4945 43.5316 46.0023 0.649448 -0.64684 -0.399769 0.490491 45 57.5 57.5 0 -2294 1 1 0 56.4741 42.9769 47.04 0.647412 -0.70231 -0.296004 0.490491 45 57.5 57.5 0 -2295 1 1 0 56.7891 43.465 46.6531 0.678913 -0.653497 -0.334691 0.490491 45 57.5 57.5 0 -2296 1 1 0 57.0711 43.985 46.2825 0.707107 -0.601501 -0.371748 0.490491 45 57.5 57.5 0 -2297 1 1 0 56.7232 42.9602 47.711 0.672319 -0.703983 -0.228899 0.490491 45 57.5 57.5 0 -2298 1 1 0 57.0524 43.4338 47.3262 0.705236 -0.65662 -0.267381 0.490491 45 57.5 57.5 0 -2299 1 1 0 57.3479 43.9426 46.9479 0.734794 -0.605742 -0.305212 0.490491 45 57.5 57.5 0 -2300 1 1 0 57.6041 44.4755 46.5857 0.760406 -0.552454 -0.341435 0.490491 45 57.5 57.5 0 -2301 1 1 0 55.4511 42.0989 47.1968 0.545109 -0.790112 -0.280319 0.490491 45 57.5 57.5 0 -2302 1 1 0 56.1093 42.5056 47.4482 0.610926 -0.749435 -0.25518 0.490491 45 57.5 57.5 0 -2303 1 1 0 55.8369 42.5466 46.7786 0.583692 -0.745339 -0.322141 0.490491 45 57.5 57.5 0 -2304 1 1 0 55.5245 46.5857 42.3959 0.552454 -0.341435 -0.760406 0.490491 45 57.5 57.5 0 -2305 1 1 0 56.015 46.2825 42.9289 0.601501 -0.371748 -0.707107 0.490491 45 57.5 57.5 0 -2306 1 1 0 56.0574 46.9479 42.6521 0.605742 -0.305212 -0.734794 0.490491 45 57.5 57.5 0 -2307 1 1 0 56.4684 46.0023 43.5055 0.64684 -0.399769 -0.649448 0.490491 45 57.5 57.5 0 -2308 1 1 0 56.535 46.6531 43.2109 0.653497 -0.334691 -0.678913 0.490491 45 57.5 57.5 0 -2309 1 1 0 56.8819 45.7467 44.1221 0.688191 -0.425325 -0.587785 0.490491 45 57.5 57.5 0 -2310 1 1 0 56.9704 46.3841 43.8081 0.697037 -0.361591 -0.619186 0.490491 45 57.5 57.5 0 -2311 1 1 0 57.0231 47.04 43.5259 0.70231 -0.296004 -0.647412 0.490491 45 57.5 57.5 0 -2312 1 1 0 56.5662 47.3262 42.9476 0.65662 -0.267381 -0.705236 0.490491 45 57.5 57.5 0 -2313 1 1 0 57.0398 47.711 43.2768 0.703983 -0.228899 -0.672319 0.490491 45 57.5 57.5 0 -2314 1 1 0 57.253 45.5174 44.775 0.725299 -0.448259 -0.522499 0.490491 45 57.5 57.5 0 -2315 1 1 0 57.3771 46.1327 44.4663 0.737712 -0.38673 -0.553372 0.490491 45 57.5 57.5 0 -2316 1 1 0 57.5794 45.3157 45.4601 0.757936 -0.46843 -0.45399 0.490491 45 57.5 57.5 0 -2317 1 1 0 57.7258 45.9171 45.1376 0.772575 -0.408286 -0.48624 0.490491 45 57.5 57.5 0 -2318 1 1 0 57.8345 46.5385 44.8388 0.783452 -0.346153 -0.516122 0.490491 45 57.5 57.5 0 -2319 1 1 0 57.859 45.1429 46.1732 0.785899 -0.485712 -0.382683 0.490491 45 57.5 57.5 0 -2320 1 1 0 58.0302 45.7287 45.844 0.803016 -0.427135 -0.415597 0.490491 45 57.5 57.5 0 -2321 1 1 0 58.1623 46.3397 45.5302 0.816233 -0.366027 -0.446977 0.490491 45 57.5 57.5 0 -2322 1 1 0 58.2518 46.962 45.2377 0.825175 -0.303801 -0.476225 0.490491 45 57.5 57.5 0 -2323 1 1 0 57.4979 48.1257 43.6542 0.749786 -0.187432 -0.634579 0.490491 45 57.5 57.5 0 -2324 1 1 0 57.9265 47.8698 44.2875 0.79265 -0.213023 -0.571251 0.490491 45 57.5 57.5 0 -2325 1 1 0 57.9017 48.5259 44.051 0.79017 -0.147413 -0.594895 0.490491 45 57.5 57.5 0 -2326 1 1 0 58.3036 47.6277 44.9579 0.830359 -0.237228 -0.504209 0.490491 45 57.5 57.5 0 -2327 1 1 0 58.3081 48.2747 44.7087 0.830812 -0.172532 -0.529135 0.490491 45 57.5 57.5 0 -2328 1 1 0 58.2711 48.9351 44.4814 0.82711 -0.106494 -0.551859 0.490491 45 57.5 57.5 0 -2329 1 1 0 57.4534 46.7786 44.1631 0.745339 -0.322141 -0.583692 0.490491 45 57.5 57.5 0 -2330 1 1 0 57.9011 47.1968 44.5489 0.790112 -0.280319 -0.545109 0.490491 45 57.5 57.5 0 -2331 1 1 0 57.4944 47.4482 43.8907 0.749435 -0.25518 -0.610926 0.490491 45 57.5 57.5 0 -2332 1 1 0 54.1427 42.6499 44.6322 0.414272 -0.735011 -0.536784 0.490491 45 57.5 57.5 0 -2333 1 1 0 54.8521 42.9553 44.8203 0.485208 -0.704471 -0.51797 0.490491 45 57.5 57.5 0 -2334 1 1 0 55.5242 43.3039 45.0356 0.552418 -0.669612 -0.496441 0.490491 45 57.5 57.5 0 -2335 1 1 0 55.1338 43.5342 44.3575 0.513375 -0.646578 -0.564254 0.490491 45 57.5 57.5 0 -2336 1 1 0 54.4396 43.2102 44.1528 0.443957 -0.678977 -0.584716 0.490491 45 57.5 57.5 0 -2337 1 1 0 54.7092 43.8076 43.7169 0.470917 -0.619242 -0.628313 0.490491 45 57.5 57.5 0 -2338 1 1 0 56.1924 43.7169 45.2908 0.619242 -0.628313 -0.470917 0.490491 45 57.5 57.5 0 -2339 1 1 0 56.7898 44.1528 45.5604 0.678977 -0.584716 -0.443957 0.490491 45 57.5 57.5 0 -2340 1 1 0 56.4658 44.3575 44.8662 0.646578 -0.564254 -0.513375 0.490491 45 57.5 57.5 0 -2341 1 1 0 57.3501 44.6322 45.8573 0.735011 -0.536784 -0.414272 0.490491 45 57.5 57.5 0 -2342 1 1 0 57.0447 44.8203 45.1479 0.704471 -0.51797 -0.485208 0.490491 45 57.5 57.5 0 -2343 1 1 0 56.6961 45.0356 44.4758 0.669612 -0.496441 -0.552418 0.490491 45 57.5 57.5 0 -2344 1 1 0 54.9644 44.4758 43.3039 0.496441 -0.552418 -0.669612 0.490491 45 57.5 57.5 0 -2345 1 1 0 55.6425 44.8662 43.5342 0.564254 -0.513375 -0.646578 0.490491 45 57.5 57.5 0 -2346 1 1 0 55.1797 45.1479 42.9553 0.51797 -0.485208 -0.704471 0.490491 45 57.5 57.5 0 -2347 1 1 0 56.2831 45.2908 43.8076 0.628313 -0.470917 -0.619242 0.490491 45 57.5 57.5 0 -2348 1 1 0 55.8472 45.5604 43.2102 0.584716 -0.443957 -0.678977 0.490491 45 57.5 57.5 0 -2349 1 1 0 55.3678 45.8573 42.6499 0.536784 -0.414272 -0.735011 0.490491 45 57.5 57.5 0 -2350 1 1 0 55.8195 43.9252 44.5935 0.581952 -0.607478 -0.54065 0.490491 45 57.5 57.5 0 -2351 1 1 0 56.0748 44.5935 44.1805 0.607478 -0.54065 -0.581952 0.490491 45 57.5 57.5 0 -2352 1 1 0 55.4065 44.1805 43.9252 0.54065 -0.581952 -0.607478 0.490491 45 57.5 57.5 0 -2353 1 1 0 48.9351 44.4814 58.2711 -0.106494 -0.551859 0.82711 0.490491 45 57.5 57.5 0 -2354 1 1 0 48.5259 44.051 57.9017 -0.147413 -0.594895 0.79017 0.490491 45 57.5 57.5 0 -2355 1 1 0 48.1257 43.6542 57.4979 -0.187432 -0.634579 0.749786 0.490491 45 57.5 57.5 0 -2356 1 1 0 47.8698 44.2875 57.9265 -0.213023 -0.571251 0.79265 0.490491 45 57.5 57.5 0 -2357 1 1 0 48.2747 44.7087 58.3081 -0.172532 -0.529135 0.830812 0.490491 45 57.5 57.5 0 -2358 1 1 0 47.6277 44.9579 58.3036 -0.237228 -0.504209 0.830359 0.490491 45 57.5 57.5 0 -2359 1 1 0 47.711 43.2768 57.0398 -0.228899 -0.672319 0.703983 0.490491 45 57.5 57.5 0 -2360 1 1 0 47.3262 42.9476 56.5662 -0.267381 -0.705236 0.65662 0.490491 45 57.5 57.5 0 -2361 1 1 0 47.04 43.5259 57.0231 -0.296004 -0.647412 0.70231 0.490491 45 57.5 57.5 0 -2362 1 1 0 46.9479 42.6521 56.0574 -0.305212 -0.734794 0.605742 0.490491 45 57.5 57.5 0 -2363 1 1 0 46.5857 42.3959 55.5245 -0.341435 -0.760406 0.552454 0.490491 45 57.5 57.5 0 -2364 1 1 0 46.2825 42.9289 56.015 -0.371748 -0.707107 0.601501 0.490491 45 57.5 57.5 0 -2365 1 1 0 46.6531 43.2109 56.535 -0.334691 -0.678913 0.653497 0.490491 45 57.5 57.5 0 -2366 1 1 0 46.3841 43.8081 56.9704 -0.361591 -0.619186 0.697037 0.490491 45 57.5 57.5 0 -2367 1 1 0 46.0023 43.5055 56.4684 -0.399769 -0.649448 0.64684 0.490491 45 57.5 57.5 0 -2368 1 1 0 45.7467 44.1221 56.8819 -0.425325 -0.587785 0.688191 0.490491 45 57.5 57.5 0 -2369 1 1 0 46.962 45.2377 58.2518 -0.303801 -0.476225 0.825175 0.490491 45 57.5 57.5 0 -2370 1 1 0 46.5385 44.8388 57.8345 -0.346153 -0.516122 0.783452 0.490491 45 57.5 57.5 0 -2371 1 1 0 46.3397 45.5302 58.1623 -0.366027 -0.446977 0.816233 0.490491 45 57.5 57.5 0 -2372 1 1 0 46.1327 44.4663 57.3771 -0.38673 -0.553372 0.737712 0.490491 45 57.5 57.5 0 -2373 1 1 0 45.9171 45.1376 57.7258 -0.408286 -0.48624 0.772575 0.490491 45 57.5 57.5 0 -2374 1 1 0 45.5174 44.775 57.253 -0.448259 -0.522499 0.725299 0.490491 45 57.5 57.5 0 -2375 1 1 0 45.3157 45.4601 57.5794 -0.46843 -0.45399 0.757936 0.490491 45 57.5 57.5 0 -2376 1 1 0 45.7287 45.844 58.0302 -0.427135 -0.415597 0.803016 0.490491 45 57.5 57.5 0 -2377 1 1 0 45.1429 46.1732 57.859 -0.485712 -0.382683 0.785899 0.490491 45 57.5 57.5 0 -2378 1 1 0 47.4482 43.8907 57.4944 -0.25518 -0.610926 0.749435 0.490491 45 57.5 57.5 0 -2379 1 1 0 46.7786 44.1631 57.4534 -0.322141 -0.583692 0.745339 0.490491 45 57.5 57.5 0 -2380 1 1 0 47.1968 44.5489 57.9011 -0.280319 -0.545109 0.790112 0.490491 45 57.5 57.5 0 -2381 1 1 0 46.1732 42.141 54.8571 -0.382683 -0.785899 0.485712 0.490491 45 57.5 57.5 0 -2382 1 1 0 45.844 41.9698 54.2713 -0.415597 -0.803016 0.427135 0.490491 45 57.5 57.5 0 -2383 1 1 0 45.4601 42.4206 54.6843 -0.45399 -0.757936 0.46843 0.490491 45 57.5 57.5 0 -2384 1 1 0 45.5302 41.8377 53.6603 -0.446977 -0.816233 0.366027 0.490491 45 57.5 57.5 0 -2385 1 1 0 45.2377 41.7482 53.038 -0.476225 -0.825175 0.303801 0.490491 45 57.5 57.5 0 -2386 1 1 0 44.8388 42.1655 53.4615 -0.516122 -0.783452 0.346153 0.490491 45 57.5 57.5 0 -2387 1 1 0 45.1376 42.2742 54.0829 -0.48624 -0.772575 0.408286 0.490491 45 57.5 57.5 0 -2388 1 1 0 44.775 42.747 54.4826 -0.522499 -0.725299 0.448259 0.490491 45 57.5 57.5 0 -2389 1 1 0 44.4663 42.6229 53.8673 -0.553372 -0.737712 0.38673 0.490491 45 57.5 57.5 0 -2390 1 1 0 44.1221 43.1181 54.2533 -0.587785 -0.688191 0.425325 0.490491 45 57.5 57.5 0 -2391 1 1 0 44.9579 41.6964 52.3723 -0.504209 -0.830359 0.237228 0.490491 45 57.5 57.5 0 -2392 1 1 0 44.7087 41.6919 51.7253 -0.529135 -0.830812 0.172532 0.490491 45 57.5 57.5 0 -2393 1 1 0 44.2875 42.0735 52.1302 -0.571251 -0.79265 0.213023 0.490491 45 57.5 57.5 0 -2394 1 1 0 44.4814 41.7289 51.0649 -0.551859 -0.82711 0.106494 0.490491 45 57.5 57.5 0 -2395 1 1 0 44.051 42.0983 51.4741 -0.594895 -0.79017 0.147413 0.490491 45 57.5 57.5 0 -2396 1 1 0 43.6542 42.5021 51.8743 -0.634579 -0.749786 0.187432 0.490491 45 57.5 57.5 0 -2397 1 1 0 43.8081 43.0296 53.6159 -0.619186 -0.697037 0.361591 0.490491 45 57.5 57.5 0 -2398 1 1 0 43.5055 43.5316 53.9977 -0.649448 -0.64684 0.399769 0.490491 45 57.5 57.5 0 -2399 1 1 0 43.5259 42.9769 52.96 -0.647412 -0.70231 0.296004 0.490491 45 57.5 57.5 0 -2400 1 1 0 43.2109 43.465 53.3469 -0.678913 -0.653497 0.334691 0.490491 45 57.5 57.5 0 -2401 1 1 0 42.9289 43.985 53.7175 -0.707107 -0.601501 0.371748 0.490491 45 57.5 57.5 0 -2402 1 1 0 43.2768 42.9602 52.289 -0.672319 -0.703983 0.228899 0.490491 45 57.5 57.5 0 -2403 1 1 0 42.9476 43.4338 52.6738 -0.705236 -0.65662 0.267381 0.490491 45 57.5 57.5 0 -2404 1 1 0 42.6521 43.9426 53.0521 -0.734794 -0.605742 0.305212 0.490491 45 57.5 57.5 0 -2405 1 1 0 42.3959 44.4755 53.4143 -0.760406 -0.552454 0.341435 0.490491 45 57.5 57.5 0 -2406 1 1 0 44.5489 42.0989 52.8032 -0.545109 -0.790112 0.280319 0.490491 45 57.5 57.5 0 -2407 1 1 0 43.8907 42.5056 52.5518 -0.610926 -0.749435 0.25518 0.490491 45 57.5 57.5 0 -2408 1 1 0 44.1631 42.5466 53.2214 -0.583692 -0.745339 0.322141 0.490491 45 57.5 57.5 0 -2409 1 1 0 44.4755 46.5857 57.6041 -0.552454 -0.341435 0.760406 0.490491 45 57.5 57.5 0 -2410 1 1 0 43.985 46.2825 57.0711 -0.601501 -0.371748 0.707107 0.490491 45 57.5 57.5 0 -2411 1 1 0 43.9426 46.9479 57.3479 -0.605742 -0.305212 0.734794 0.490491 45 57.5 57.5 0 -2412 1 1 0 43.5316 46.0023 56.4945 -0.64684 -0.399769 0.649448 0.490491 45 57.5 57.5 0 -2413 1 1 0 43.465 46.6531 56.7891 -0.653497 -0.334691 0.678913 0.490491 45 57.5 57.5 0 -2414 1 1 0 43.1181 45.7467 55.8779 -0.688191 -0.425325 0.587785 0.490491 45 57.5 57.5 0 -2415 1 1 0 43.0296 46.3841 56.1919 -0.697037 -0.361591 0.619186 0.490491 45 57.5 57.5 0 -2416 1 1 0 42.9769 47.04 56.4741 -0.70231 -0.296004 0.647412 0.490491 45 57.5 57.5 0 -2417 1 1 0 43.4338 47.3262 57.0524 -0.65662 -0.267381 0.705236 0.490491 45 57.5 57.5 0 -2418 1 1 0 42.9602 47.711 56.7232 -0.703983 -0.228899 0.672319 0.490491 45 57.5 57.5 0 -2419 1 1 0 42.747 45.5174 55.225 -0.725299 -0.448259 0.522499 0.490491 45 57.5 57.5 0 -2420 1 1 0 42.6229 46.1327 55.5337 -0.737712 -0.38673 0.553372 0.490491 45 57.5 57.5 0 -2421 1 1 0 42.4206 45.3157 54.5399 -0.757936 -0.46843 0.45399 0.490491 45 57.5 57.5 0 -2422 1 1 0 42.2742 45.9171 54.8624 -0.772575 -0.408286 0.48624 0.490491 45 57.5 57.5 0 -2423 1 1 0 42.1655 46.5385 55.1612 -0.783452 -0.346153 0.516122 0.490491 45 57.5 57.5 0 -2424 1 1 0 42.141 45.1429 53.8268 -0.785899 -0.485712 0.382683 0.490491 45 57.5 57.5 0 -2425 1 1 0 41.9698 45.7287 54.156 -0.803016 -0.427135 0.415597 0.490491 45 57.5 57.5 0 -2426 1 1 0 41.8377 46.3397 54.4698 -0.816233 -0.366027 0.446977 0.490491 45 57.5 57.5 0 -2427 1 1 0 41.7482 46.962 54.7623 -0.825175 -0.303801 0.476225 0.490491 45 57.5 57.5 0 -2428 1 1 0 42.5021 48.1257 56.3458 -0.749786 -0.187432 0.634579 0.490491 45 57.5 57.5 0 -2429 1 1 0 42.0735 47.8698 55.7125 -0.79265 -0.213023 0.571251 0.490491 45 57.5 57.5 0 -2430 1 1 0 42.0983 48.5259 55.949 -0.79017 -0.147413 0.594895 0.490491 45 57.5 57.5 0 -2431 1 1 0 41.6964 47.6277 55.0421 -0.830359 -0.237228 0.504209 0.490491 45 57.5 57.5 0 -2432 1 1 0 41.6919 48.2747 55.2913 -0.830812 -0.172532 0.529135 0.490491 45 57.5 57.5 0 -2433 1 1 0 41.7289 48.9351 55.5186 -0.82711 -0.106494 0.551859 0.490491 45 57.5 57.5 0 -2434 1 1 0 42.5466 46.7786 55.8369 -0.745339 -0.322141 0.583692 0.490491 45 57.5 57.5 0 -2435 1 1 0 42.0989 47.1968 55.4511 -0.790112 -0.280319 0.545109 0.490491 45 57.5 57.5 0 -2436 1 1 0 42.5056 47.4482 56.1093 -0.749435 -0.25518 0.610926 0.490491 45 57.5 57.5 0 -2437 1 1 0 45.8573 42.6499 55.3678 -0.414272 -0.735011 0.536784 0.490491 45 57.5 57.5 0 -2438 1 1 0 45.1479 42.9553 55.1797 -0.485208 -0.704471 0.51797 0.490491 45 57.5 57.5 0 -2439 1 1 0 44.4758 43.3039 54.9644 -0.552418 -0.669612 0.496441 0.490491 45 57.5 57.5 0 -2440 1 1 0 44.8662 43.5342 55.6425 -0.513375 -0.646578 0.564254 0.490491 45 57.5 57.5 0 -2441 1 1 0 45.5604 43.2102 55.8472 -0.443957 -0.678977 0.584716 0.490491 45 57.5 57.5 0 -2442 1 1 0 45.2908 43.8076 56.2831 -0.470917 -0.619242 0.628313 0.490491 45 57.5 57.5 0 -2443 1 1 0 43.8076 43.7169 54.7092 -0.619242 -0.628313 0.470917 0.490491 45 57.5 57.5 0 -2444 1 1 0 43.2102 44.1528 54.4396 -0.678977 -0.584716 0.443957 0.490491 45 57.5 57.5 0 -2445 1 1 0 43.5342 44.3575 55.1338 -0.646578 -0.564254 0.513375 0.490491 45 57.5 57.5 0 -2446 1 1 0 42.6499 44.6322 54.1427 -0.735011 -0.536784 0.414272 0.490491 45 57.5 57.5 0 -2447 1 1 0 42.9553 44.8203 54.8521 -0.704471 -0.51797 0.485208 0.490491 45 57.5 57.5 0 -2448 1 1 0 43.3039 45.0356 55.5242 -0.669612 -0.496441 0.552418 0.490491 45 57.5 57.5 0 -2449 1 1 0 45.0356 44.4758 56.6961 -0.496441 -0.552418 0.669612 0.490491 45 57.5 57.5 0 -2450 1 1 0 44.3575 44.8662 56.4658 -0.564254 -0.513375 0.646578 0.490491 45 57.5 57.5 0 -2451 1 1 0 44.8203 45.1479 57.0447 -0.51797 -0.485208 0.704471 0.490491 45 57.5 57.5 0 -2452 1 1 0 43.7169 45.2908 56.1924 -0.628313 -0.470917 0.619242 0.490491 45 57.5 57.5 0 -2453 1 1 0 44.1528 45.5604 56.7898 -0.584716 -0.443957 0.678977 0.490491 45 57.5 57.5 0 -2454 1 1 0 44.6322 45.8573 57.3501 -0.536784 -0.414272 0.735011 0.490491 45 57.5 57.5 0 -2455 1 1 0 44.1805 43.9252 55.4065 -0.581952 -0.607478 0.54065 0.490491 45 57.5 57.5 0 -2456 1 1 0 43.9252 44.5935 55.8195 -0.607478 -0.54065 0.581952 0.490491 45 57.5 57.5 0 -2457 1 1 0 44.5935 44.1805 56.0748 -0.54065 -0.581952 0.607478 0.490491 45 57.5 57.5 0 -2458 1 1 0 51.0649 44.4814 58.2711 0.106494 -0.551859 0.82711 0.490491 45 57.5 57.5 0 -2459 1 1 0 51.7253 44.7087 58.3081 0.172532 -0.529135 0.830812 0.490491 45 57.5 57.5 0 -2460 1 1 0 52.3723 44.9579 58.3036 0.237228 -0.504209 0.830359 0.490491 45 57.5 57.5 0 -2461 1 1 0 52.1302 44.2875 57.9265 0.213023 -0.571251 0.79265 0.490491 45 57.5 57.5 0 -2462 1 1 0 51.4741 44.051 57.9017 0.147413 -0.594895 0.79017 0.490491 45 57.5 57.5 0 -2463 1 1 0 51.8743 43.6542 57.4979 0.187432 -0.634579 0.749786 0.490491 45 57.5 57.5 0 -2464 1 1 0 53.038 45.2377 58.2518 0.303801 -0.476225 0.825175 0.490491 45 57.5 57.5 0 -2465 1 1 0 53.6603 45.5302 58.1623 0.366027 -0.446977 0.816233 0.490491 45 57.5 57.5 0 -2466 1 1 0 53.4615 44.8388 57.8345 0.346153 -0.516122 0.783452 0.490491 45 57.5 57.5 0 -2467 1 1 0 54.2713 45.844 58.0302 0.427135 -0.415597 0.803016 0.490491 45 57.5 57.5 0 -2468 1 1 0 54.8571 46.1732 57.859 0.485712 -0.382683 0.785899 0.490491 45 57.5 57.5 0 -2469 1 1 0 54.6843 45.4601 57.5794 0.46843 -0.45399 0.757936 0.490491 45 57.5 57.5 0 -2470 1 1 0 54.0829 45.1376 57.7258 0.408286 -0.48624 0.772575 0.490491 45 57.5 57.5 0 -2471 1 1 0 53.8673 44.4663 57.3771 0.38673 -0.553372 0.737712 0.490491 45 57.5 57.5 0 -2472 1 1 0 54.4826 44.775 57.253 0.448259 -0.522499 0.725299 0.490491 45 57.5 57.5 0 -2473 1 1 0 54.2533 44.1221 56.8819 0.425325 -0.587785 0.688191 0.490491 45 57.5 57.5 0 -2474 1 1 0 52.289 43.2768 57.0398 0.228899 -0.672319 0.703983 0.490491 45 57.5 57.5 0 -2475 1 1 0 52.96 43.5259 57.0231 0.296004 -0.647412 0.70231 0.490491 45 57.5 57.5 0 -2476 1 1 0 52.6738 42.9476 56.5662 0.267381 -0.705236 0.65662 0.490491 45 57.5 57.5 0 -2477 1 1 0 53.6159 43.8081 56.9704 0.361591 -0.619186 0.697037 0.490491 45 57.5 57.5 0 -2478 1 1 0 53.3469 43.2109 56.535 0.334691 -0.678913 0.653497 0.490491 45 57.5 57.5 0 -2479 1 1 0 53.9977 43.5055 56.4684 0.399769 -0.649448 0.64684 0.490491 45 57.5 57.5 0 -2480 1 1 0 53.7175 42.9289 56.015 0.371748 -0.707107 0.601501 0.490491 45 57.5 57.5 0 -2481 1 1 0 53.0521 42.6521 56.0574 0.305212 -0.734794 0.605742 0.490491 45 57.5 57.5 0 -2482 1 1 0 53.4143 42.3959 55.5245 0.341435 -0.760406 0.552454 0.490491 45 57.5 57.5 0 -2483 1 1 0 52.8032 44.5489 57.9011 0.280319 -0.545109 0.790112 0.490491 45 57.5 57.5 0 -2484 1 1 0 53.2214 44.1631 57.4534 0.322141 -0.583692 0.745339 0.490491 45 57.5 57.5 0 -2485 1 1 0 52.5518 43.8907 57.4944 0.25518 -0.610926 0.749435 0.490491 45 57.5 57.5 0 -2486 1 1 0 55.5245 46.5857 57.6041 0.552454 -0.341435 0.760406 0.490491 45 57.5 57.5 0 -2487 1 1 0 56.0574 46.9479 57.3479 0.605742 -0.305212 0.734794 0.490491 45 57.5 57.5 0 -2488 1 1 0 56.015 46.2825 57.0711 0.601501 -0.371748 0.707107 0.490491 45 57.5 57.5 0 -2489 1 1 0 56.5662 47.3262 57.0524 0.65662 -0.267381 0.705236 0.490491 45 57.5 57.5 0 -2490 1 1 0 57.0398 47.711 56.7232 0.703983 -0.228899 0.672319 0.490491 45 57.5 57.5 0 -2491 1 1 0 57.0231 47.04 56.4741 0.70231 -0.296004 0.647412 0.490491 45 57.5 57.5 0 -2492 1 1 0 56.535 46.6531 56.7891 0.653497 -0.334691 0.678913 0.490491 45 57.5 57.5 0 -2493 1 1 0 56.4684 46.0023 56.4945 0.64684 -0.399769 0.649448 0.490491 45 57.5 57.5 0 -2494 1 1 0 56.9704 46.3841 56.1919 0.697037 -0.361591 0.619186 0.490491 45 57.5 57.5 0 -2495 1 1 0 56.8819 45.7467 55.8779 0.688191 -0.425325 0.587785 0.490491 45 57.5 57.5 0 -2496 1 1 0 57.4979 48.1257 56.3458 0.749786 -0.187432 0.634579 0.490491 45 57.5 57.5 0 -2497 1 1 0 57.9017 48.5259 55.949 0.79017 -0.147413 0.594895 0.490491 45 57.5 57.5 0 -2498 1 1 0 57.9265 47.8698 55.7125 0.79265 -0.213023 0.571251 0.490491 45 57.5 57.5 0 -2499 1 1 0 58.2711 48.9351 55.5186 0.82711 -0.106494 0.551859 0.490491 45 57.5 57.5 0 -2500 1 1 0 58.3081 48.2747 55.2913 0.830812 -0.172532 0.529135 0.490491 45 57.5 57.5 0 -2501 1 1 0 58.3036 47.6277 55.0421 0.830359 -0.237228 0.504209 0.490491 45 57.5 57.5 0 -2502 1 1 0 57.3771 46.1327 55.5337 0.737712 -0.38673 0.553372 0.490491 45 57.5 57.5 0 -2503 1 1 0 57.253 45.5174 55.225 0.725299 -0.448259 0.522499 0.490491 45 57.5 57.5 0 -2504 1 1 0 57.8345 46.5385 55.1612 0.783452 -0.346153 0.516122 0.490491 45 57.5 57.5 0 -2505 1 1 0 57.7258 45.9171 54.8624 0.772575 -0.408286 0.48624 0.490491 45 57.5 57.5 0 -2506 1 1 0 57.5794 45.3157 54.5399 0.757936 -0.46843 0.45399 0.490491 45 57.5 57.5 0 -2507 1 1 0 58.2518 46.962 54.7623 0.825175 -0.303801 0.476225 0.490491 45 57.5 57.5 0 -2508 1 1 0 58.1623 46.3397 54.4698 0.816233 -0.366027 0.446977 0.490491 45 57.5 57.5 0 -2509 1 1 0 58.0302 45.7287 54.156 0.803016 -0.427135 0.415597 0.490491 45 57.5 57.5 0 -2510 1 1 0 57.859 45.1429 53.8268 0.785899 -0.485712 0.382683 0.490491 45 57.5 57.5 0 -2511 1 1 0 57.4944 47.4482 56.1093 0.749435 -0.25518 0.610926 0.490491 45 57.5 57.5 0 -2512 1 1 0 57.9011 47.1968 55.4511 0.790112 -0.280319 0.545109 0.490491 45 57.5 57.5 0 -2513 1 1 0 57.4534 46.7786 55.8369 0.745339 -0.322141 0.583692 0.490491 45 57.5 57.5 0 -2514 1 1 0 53.8268 42.141 54.8571 0.382683 -0.785899 0.485712 0.490491 45 57.5 57.5 0 -2515 1 1 0 54.5399 42.4206 54.6843 0.45399 -0.757936 0.46843 0.490491 45 57.5 57.5 0 -2516 1 1 0 54.156 41.9698 54.2713 0.415597 -0.803016 0.427135 0.490491 45 57.5 57.5 0 -2517 1 1 0 55.225 42.747 54.4826 0.522499 -0.725299 0.448259 0.490491 45 57.5 57.5 0 -2518 1 1 0 54.8624 42.2742 54.0829 0.48624 -0.772575 0.408286 0.490491 45 57.5 57.5 0 -2519 1 1 0 55.8779 43.1181 54.2533 0.587785 -0.688191 0.425325 0.490491 45 57.5 57.5 0 -2520 1 1 0 55.5337 42.6229 53.8673 0.553372 -0.737712 0.38673 0.490491 45 57.5 57.5 0 -2521 1 1 0 55.1612 42.1655 53.4615 0.516122 -0.783452 0.346153 0.490491 45 57.5 57.5 0 -2522 1 1 0 54.4698 41.8377 53.6603 0.446977 -0.816233 0.366027 0.490491 45 57.5 57.5 0 -2523 1 1 0 54.7623 41.7482 53.038 0.476225 -0.825175 0.303801 0.490491 45 57.5 57.5 0 -2524 1 1 0 56.4945 43.5316 53.9977 0.649448 -0.64684 0.399769 0.490491 45 57.5 57.5 0 -2525 1 1 0 56.1919 43.0296 53.6159 0.619186 -0.697037 0.361591 0.490491 45 57.5 57.5 0 -2526 1 1 0 57.0711 43.985 53.7175 0.707107 -0.601501 0.371748 0.490491 45 57.5 57.5 0 -2527 1 1 0 56.7891 43.465 53.3469 0.678913 -0.653497 0.334691 0.490491 45 57.5 57.5 0 -2528 1 1 0 56.4741 42.9769 52.96 0.647412 -0.70231 0.296004 0.490491 45 57.5 57.5 0 -2529 1 1 0 57.6041 44.4755 53.4143 0.760406 -0.552454 0.341435 0.490491 45 57.5 57.5 0 -2530 1 1 0 57.3479 43.9426 53.0521 0.734794 -0.605742 0.305212 0.490491 45 57.5 57.5 0 -2531 1 1 0 57.0524 43.4338 52.6738 0.705236 -0.65662 0.267381 0.490491 45 57.5 57.5 0 -2532 1 1 0 56.7232 42.9602 52.289 0.672319 -0.703983 0.228899 0.490491 45 57.5 57.5 0 -2533 1 1 0 55.0421 41.6964 52.3723 0.504209 -0.830359 0.237228 0.490491 45 57.5 57.5 0 -2534 1 1 0 55.7125 42.0735 52.1302 0.571251 -0.79265 0.213023 0.490491 45 57.5 57.5 0 -2535 1 1 0 55.2913 41.6919 51.7253 0.529135 -0.830812 0.172532 0.490491 45 57.5 57.5 0 -2536 1 1 0 56.3458 42.5021 51.8743 0.634579 -0.749786 0.187432 0.490491 45 57.5 57.5 0 -2537 1 1 0 55.949 42.0983 51.4741 0.594895 -0.79017 0.147413 0.490491 45 57.5 57.5 0 -2538 1 1 0 55.5186 41.7289 51.0649 0.551859 -0.82711 0.106494 0.490491 45 57.5 57.5 0 -2539 1 1 0 55.8369 42.5466 53.2214 0.583692 -0.745339 0.322141 0.490491 45 57.5 57.5 0 -2540 1 1 0 56.1093 42.5056 52.5518 0.610926 -0.749435 0.25518 0.490491 45 57.5 57.5 0 -2541 1 1 0 55.4511 42.0989 52.8032 0.545109 -0.790112 0.280319 0.490491 45 57.5 57.5 0 -2542 1 1 0 55.3678 45.8573 57.3501 0.536784 -0.414272 0.735011 0.490491 45 57.5 57.5 0 -2543 1 1 0 55.8472 45.5604 56.7898 0.584716 -0.443957 0.678977 0.490491 45 57.5 57.5 0 -2544 1 1 0 56.2831 45.2908 56.1924 0.628313 -0.470917 0.619242 0.490491 45 57.5 57.5 0 -2545 1 1 0 55.6425 44.8662 56.4658 0.564254 -0.513375 0.646578 0.490491 45 57.5 57.5 0 -2546 1 1 0 55.1797 45.1479 57.0447 0.51797 -0.485208 0.704471 0.490491 45 57.5 57.5 0 -2547 1 1 0 54.9644 44.4758 56.6961 0.496441 -0.552418 0.669612 0.490491 45 57.5 57.5 0 -2548 1 1 0 56.6961 45.0356 55.5242 0.669612 -0.496441 0.552418 0.490491 45 57.5 57.5 0 -2549 1 1 0 57.0447 44.8203 54.8521 0.704471 -0.51797 0.485208 0.490491 45 57.5 57.5 0 -2550 1 1 0 56.4658 44.3575 55.1338 0.646578 -0.564254 0.513375 0.490491 45 57.5 57.5 0 -2551 1 1 0 57.3501 44.6322 54.1427 0.735011 -0.536784 0.414272 0.490491 45 57.5 57.5 0 -2552 1 1 0 56.7898 44.1528 54.4396 0.678977 -0.584716 0.443957 0.490491 45 57.5 57.5 0 -2553 1 1 0 56.1924 43.7169 54.7092 0.619242 -0.628313 0.470917 0.490491 45 57.5 57.5 0 -2554 1 1 0 54.7092 43.8076 56.2831 0.470917 -0.619242 0.628313 0.490491 45 57.5 57.5 0 -2555 1 1 0 55.1338 43.5342 55.6425 0.513375 -0.646578 0.564254 0.490491 45 57.5 57.5 0 -2556 1 1 0 54.4396 43.2102 55.8472 0.443957 -0.678977 0.584716 0.490491 45 57.5 57.5 0 -2557 1 1 0 55.5242 43.3039 54.9644 0.552418 -0.669612 0.496441 0.490491 45 57.5 57.5 0 -2558 1 1 0 54.8521 42.9553 55.1797 0.485208 -0.704471 0.51797 0.490491 45 57.5 57.5 0 -2559 1 1 0 54.1427 42.6499 55.3678 0.414272 -0.735011 0.536784 0.490491 45 57.5 57.5 0 -2560 1 1 0 56.0748 44.5935 55.8195 0.607478 -0.54065 0.581952 0.490491 45 57.5 57.5 0 -2561 1 1 0 55.8195 43.9252 55.4065 0.581952 -0.607478 0.54065 0.490491 45 57.5 57.5 0 -2562 1 1 0 55.4065 44.1805 56.0748 0.54065 -0.581952 0.607478 0.490491 45 57.5 57.5 0 -2563 2 2 1 50 50 62 0 0 1 0.490491 45 57.5 80 0 -2564 3 3 -1 50 50 38 0 0 1 0.490491 45 57.5 80 0 +1 1 1 -1 50 52.6287 45.7467 0 0.525731 -0.850651 0.489345 45 57.5 1 0.2 +2 1 1 1 50.4054 53.0782 46.0808 0.0810867 0.615642 -0.783843 0.489345 45 57.5 1 0.2 +3 1 1 -1 49.5946 53.0782 46.0808 -0.0810867 0.615642 -0.783843 0.489345 45 57.5 1 0.2 +4 1 1 1 50.8031 53.4689 46.4898 0.160622 0.693781 -0.702046 0.489345 45 57.5 1 0.2 +5 1 1 -1 50 53.5145 46.4436 0 0.702907 -0.711282 0.489345 45 57.5 1 0.2 +6 1 1 1 49.1969 53.4689 46.4898 -0.160622 0.693781 -0.702046 0.489345 45 57.5 1 0.2 +7 1 1 -1 51.1854 53.7933 46.9659 0.237086 0.758653 -0.606824 0.489345 45 57.5 1 0.2 +8 1 1 1 50.4057 53.901 46.8988 0.0811424 0.780205 -0.620239 0.489345 45 57.5 1 0.2 +9 1 1 -1 51.5451 54.0451 47.5 0.309017 0.809017 -0.499999 0.489345 45 57.5 1 0.2 +10 1 1 1 50.7822 54.2009 47.4037 0.156435 0.840178 -0.519258 0.489345 45 57.5 1 0.2 +11 1 1 -1 50 54.2533 47.3713 0 0.850651 -0.52573 0.489345 45 57.5 1 0.2 +12 1 1 1 49.5943 53.901 46.8988 -0.0811424 0.780205 -0.620239 0.489345 45 57.5 1 0.2 +13 1 1 -1 48.8146 53.7933 46.9659 -0.237086 0.758653 -0.606824 0.489345 45 57.5 1 0.2 +14 1 1 1 49.2178 54.2009 47.4037 -0.156435 0.840178 -0.519258 0.489345 45 57.5 1 0.2 +15 1 1 -1 48.4549 54.0451 47.5 -0.309017 0.809017 -0.499999 0.489345 45 57.5 1 0.2 +16 1 1 1 51.8752 54.2196 48.0819 0.375038 0.843912 -0.383614 0.489345 45 57.5 1 0.2 +17 1 1 -1 51.1934 54.455 48.0691 0.238678 0.891006 -0.386187 0.489345 45 57.5 1 0.2 +18 1 1 1 52.1694 54.3133 48.7005 0.433888 0.862669 -0.259892 0.489345 45 57.5 1 0.2 +19 1 1 -1 51.5063 54.5812 48.6796 0.301259 0.916244 -0.264082 0.489345 45 57.5 1 0.2 +20 1 1 1 50.8123 54.7553 48.6857 0.16246 0.951056 -0.262865 0.489345 45 57.5 1 0.2 +21 1 1 -1 52.4222 54.3246 49.344 0.484441 0.864929 -0.1312 0.489345 45 57.5 1 0.2 +22 1 1 1 51.7911 54.6215 49.3417 0.358229 0.924304 -0.131656 0.489345 45 57.5 1 0.2 +23 1 1 -1 52.6287 54.2533 50 0.525731 0.850651 0 0.489345 45 57.5 1 0.2 +24 1 1 1 52.0168 54.5752 50 0.403355 0.915043 0 0.489345 45 57.5 1 0.2 +25 1 1 -1 51.3663 54.8097 50 0.273267 0.961938 0 0.489345 45 57.5 1 0.2 +26 1 1 1 51.1006 54.832 49.336 0.220117 0.966393 -0.132793 0.489345 45 57.5 1 0.2 +27 1 1 -1 50.4112 54.9384 49.3346 0.0822426 0.987688 -0.133071 0.489345 45 57.5 1 0.2 +28 1 1 1 50.6898 54.9522 50 0.137952 0.990439 0 0.489345 45 57.5 1 0.2 +29 1 1 -1 50 55 50 0 1 0 0.489345 45 57.5 1 0.2 +30 1 1 1 48.8066 54.455 48.0691 -0.238678 0.891006 -0.386187 0.489345 45 57.5 1 0.2 +31 1 1 -1 48.1248 54.2196 48.0819 -0.375038 0.843912 -0.383614 0.489345 45 57.5 1 0.2 +32 1 1 1 49.1877 54.7553 48.6857 -0.16246 0.951056 -0.262865 0.489345 45 57.5 1 0.2 +33 1 1 -1 48.4937 54.5812 48.6796 -0.301259 0.916244 -0.264082 0.489345 45 57.5 1 0.2 +34 1 1 1 47.8306 54.3133 48.7005 -0.433888 0.862669 -0.259892 0.489345 45 57.5 1 0.2 +35 1 1 -1 49.5888 54.9384 49.3346 -0.0822426 0.987688 -0.133071 0.489345 45 57.5 1 0.2 +36 1 1 1 48.8994 54.832 49.336 -0.220117 0.966393 -0.132793 0.489345 45 57.5 1 0.2 +37 1 1 -1 49.3102 54.9522 50 -0.137952 0.990439 0 0.489345 45 57.5 1 0.2 +38 1 1 1 48.6337 54.8097 50 -0.273267 0.961938 0 0.489345 45 57.5 1 0.2 +39 1 1 -1 48.2089 54.6215 49.3417 -0.358229 0.924304 -0.131656 0.489345 45 57.5 1 0.2 +40 1 1 1 47.5778 54.3246 49.344 -0.484441 0.864929 -0.1312 0.489345 45 57.5 1 0.2 +41 1 1 -1 47.9832 54.5752 50 -0.403355 0.915043 0 0.489345 45 57.5 1 0.2 +42 1 1 1 47.3713 54.2533 50 -0.525731 0.850651 0 0.489345 45 57.5 1 0.2 +43 1 1 -1 50.4116 54.5649 48.002 0.0823234 0.912983 -0.399606 0.489345 45 57.5 1 0.2 +44 1 1 1 50 54.8193 48.668 0 0.963861 -0.266405 0.489345 45 57.5 1 0.2 +45 1 1 -1 49.5884 54.5649 48.002 -0.0823234 0.912983 -0.399606 0.489345 45 57.5 1 0.2 +46 1 1 1 50 52.6287 54.2533 0 0.525731 0.850651 0.489345 45 57.5 1 0.2 +47 1 1 -1 49.5946 53.0782 53.9192 -0.0810867 0.615642 0.783843 0.489345 45 57.5 1 0.2 +48 1 1 1 50.4054 53.0782 53.9192 0.0810867 0.615642 0.783843 0.489345 45 57.5 1 0.2 +49 1 1 -1 49.1969 53.4689 53.5102 -0.160622 0.693781 0.702046 0.489345 45 57.5 1 0.2 +50 1 1 1 50 53.5145 53.5564 0 0.702907 0.711282 0.489345 45 57.5 1 0.2 +51 1 1 -1 50.8031 53.4689 53.5102 0.160622 0.693781 0.702046 0.489345 45 57.5 1 0.2 +52 1 1 1 48.8146 53.7933 53.0341 -0.237086 0.758653 0.606824 0.489345 45 57.5 1 0.2 +53 1 1 -1 49.5943 53.901 53.1012 -0.0811424 0.780205 0.620239 0.489345 45 57.5 1 0.2 +54 1 1 1 48.4549 54.0451 52.5 -0.309017 0.809017 0.499999 0.489345 45 57.5 1 0.2 +55 1 1 -1 49.2178 54.2009 52.5963 -0.156435 0.840178 0.519258 0.489345 45 57.5 1 0.2 +56 1 1 1 50 54.2533 52.6287 0 0.850651 0.52573 0.489345 45 57.5 1 0.2 +57 1 1 -1 50.4057 53.901 53.1012 0.0811424 0.780205 0.620239 0.489345 45 57.5 1 0.2 +58 1 1 1 51.1854 53.7933 53.0341 0.237086 0.758653 0.606824 0.489345 45 57.5 1 0.2 +59 1 1 -1 50.7822 54.2009 52.5963 0.156435 0.840178 0.519258 0.489345 45 57.5 1 0.2 +60 1 1 1 51.5451 54.0451 52.5 0.309017 0.809017 0.499999 0.489345 45 57.5 1 0.2 +61 1 1 -1 48.1248 54.2196 51.9181 -0.375038 0.843912 0.383614 0.489345 45 57.5 1 0.2 +62 1 1 1 48.8066 54.455 51.9309 -0.238678 0.891006 0.386187 0.489345 45 57.5 1 0.2 +63 1 1 -1 47.8306 54.3133 51.2995 -0.433888 0.862669 0.259892 0.489345 45 57.5 1 0.2 +64 1 1 1 48.4937 54.5812 51.3204 -0.301259 0.916244 0.264082 0.489345 45 57.5 1 0.2 +65 1 1 -1 49.1877 54.7553 51.3143 -0.16246 0.951056 0.262865 0.489345 45 57.5 1 0.2 +66 1 1 1 47.5778 54.3246 50.656 -0.484441 0.864929 0.1312 0.489345 45 57.5 1 0.2 +67 1 1 -1 48.2089 54.6215 50.6583 -0.358229 0.924304 0.131656 0.489345 45 57.5 1 0.2 +68 1 1 1 48.8994 54.832 50.664 -0.220117 0.966393 0.132793 0.489345 45 57.5 1 0.2 +69 1 1 -1 49.5888 54.9384 50.6654 -0.0822426 0.987688 0.133071 0.489345 45 57.5 1 0.2 +70 1 1 1 51.1934 54.455 51.9309 0.238678 0.891006 0.386187 0.489345 45 57.5 1 0.2 +71 1 1 -1 51.8752 54.2196 51.9181 0.375038 0.843912 0.383614 0.489345 45 57.5 1 0.2 +72 1 1 1 50.8123 54.7553 51.3143 0.16246 0.951056 0.262865 0.489345 45 57.5 1 0.2 +73 1 1 -1 51.5063 54.5812 51.3204 0.301259 0.916244 0.264082 0.489345 45 57.5 1 0.2 +74 1 1 1 52.1694 54.3133 51.2995 0.433888 0.862669 0.259892 0.489345 45 57.5 1 0.2 +75 1 1 -1 50.4112 54.9384 50.6654 0.0822426 0.987688 0.133071 0.489345 45 57.5 1 0.2 +76 1 1 1 51.1006 54.832 50.664 0.220117 0.966393 0.132793 0.489345 45 57.5 1 0.2 +77 1 1 -1 51.7911 54.6215 50.6583 0.358229 0.924304 0.131656 0.489345 45 57.5 1 0.2 +78 1 1 1 52.4222 54.3246 50.656 0.484441 0.864929 0.1312 0.489345 45 57.5 1 0.2 +79 1 1 -1 49.5884 54.5649 51.998 -0.0823234 0.912983 0.399606 0.489345 45 57.5 1 0.2 +80 1 1 1 50 54.8193 51.332 0 0.963861 0.266405 0.489345 45 57.5 1 0.2 +81 1 1 -1 50.4116 54.5649 51.998 0.0823234 0.912983 0.399606 0.489345 45 57.5 1 0.2 +82 1 1 1 50 52.0168 54.5752 0 0.403355 0.915043 0.489345 45 57.5 1 0.2 +83 1 1 -1 49.344 52.4222 54.3246 -0.1312 0.484441 0.864929 0.489345 45 57.5 1 0.2 +84 1 1 1 50 51.3663 54.8097 0 0.273267 0.961938 0.489345 45 57.5 1 0.2 +85 1 1 -1 49.3417 51.7911 54.6215 -0.131656 0.358229 0.924304 0.489345 45 57.5 1 0.2 +86 1 1 1 48.7005 52.1694 54.3133 -0.259892 0.433888 0.862669 0.489345 45 57.5 1 0.2 +87 1 1 -1 50 50.6898 54.9522 0 0.137952 0.990439 0.489345 45 57.5 1 0.2 +88 1 1 1 49.336 51.1006 54.832 -0.132793 0.220117 0.966393 0.489345 45 57.5 1 0.2 +89 1 1 -1 50 50 55 0 0 1 0.489345 45 57.5 1 0.2 +90 1 1 1 49.3346 50.4112 54.9384 -0.133071 0.0822426 0.987688 0.489345 45 57.5 1 0.2 +91 1 1 -1 48.6857 50.8123 54.7553 -0.262865 0.16246 0.951056 0.489345 45 57.5 1 0.2 +92 1 1 1 48.6796 51.5063 54.5812 -0.264082 0.301259 0.916244 0.489345 45 57.5 1 0.2 +93 1 1 -1 48.0819 51.8752 54.2196 -0.383614 0.375038 0.843912 0.489345 45 57.5 1 0.2 +94 1 1 1 48.0691 51.1934 54.455 -0.386187 0.238678 0.891006 0.489345 45 57.5 1 0.2 +95 1 1 -1 47.5 51.5451 54.0451 -0.499999 0.309017 0.809017 0.489345 45 57.5 1 0.2 +96 1 1 1 50 49.3102 54.9522 0 -0.137952 0.990439 0.489345 45 57.5 1 0.2 +97 1 1 -1 49.3346 49.5888 54.9384 -0.133071 -0.0822426 0.987688 0.489345 45 57.5 1 0.2 +98 1 1 1 50 48.6337 54.8097 0 -0.273267 0.961938 0.489345 45 57.5 1 0.2 +99 1 1 -1 49.336 48.8994 54.832 -0.132793 -0.220117 0.966393 0.489345 45 57.5 1 0.2 +100 1 1 1 48.6857 49.1877 54.7553 -0.262865 -0.16246 0.951056 0.489345 45 57.5 1 0.2 +101 1 1 -1 50 47.9832 54.5752 0 -0.403355 0.915043 0.489345 45 57.5 1 0.2 +102 1 1 1 49.3417 48.2089 54.6215 -0.131656 -0.358229 0.924304 0.489345 45 57.5 1 0.2 +103 1 1 -1 50 47.3713 54.2533 0 -0.525731 0.850651 0.489345 45 57.5 1 0.2 +104 1 1 1 49.344 47.5778 54.3246 -0.1312 -0.484441 0.864929 0.489345 45 57.5 1 0.2 +105 1 1 -1 48.7005 47.8306 54.3133 -0.259892 -0.433888 0.862669 0.489345 45 57.5 1 0.2 +106 1 1 1 48.6796 48.4937 54.5812 -0.264082 -0.301259 0.916244 0.489345 45 57.5 1 0.2 +107 1 1 -1 48.0691 48.8066 54.455 -0.386187 -0.238678 0.891006 0.489345 45 57.5 1 0.2 +108 1 1 1 48.0819 48.1248 54.2196 -0.383614 -0.375038 0.843912 0.489345 45 57.5 1 0.2 +109 1 1 -1 47.5 48.4549 54.0451 -0.499999 -0.309017 0.809017 0.489345 45 57.5 1 0.2 +110 1 1 1 47.4037 50.7822 54.2009 -0.519258 0.156435 0.840178 0.489345 45 57.5 1 0.2 +111 1 1 -1 46.9659 51.1854 53.7933 -0.606824 0.237086 0.758653 0.489345 45 57.5 1 0.2 +112 1 1 1 47.3713 50 54.2533 -0.52573 0 0.850651 0.489345 45 57.5 1 0.2 +113 1 1 -1 46.8988 50.4057 53.901 -0.620239 0.0811424 0.780205 0.489345 45 57.5 1 0.2 +114 1 1 1 46.4898 50.8031 53.4689 -0.702046 0.160622 0.693781 0.489345 45 57.5 1 0.2 +115 1 1 -1 47.4037 49.2178 54.2009 -0.519258 -0.156435 0.840178 0.489345 45 57.5 1 0.2 +116 1 1 1 46.8988 49.5943 53.901 -0.620239 -0.0811424 0.780205 0.489345 45 57.5 1 0.2 +117 1 1 -1 46.9659 48.8146 53.7933 -0.606824 -0.237086 0.758653 0.489345 45 57.5 1 0.2 +118 1 1 1 46.4898 49.1969 53.4689 -0.702046 -0.160622 0.693781 0.489345 45 57.5 1 0.2 +119 1 1 -1 46.4436 50 53.5145 -0.711282 0 0.702907 0.489345 45 57.5 1 0.2 +120 1 1 1 46.0808 50.4054 53.0782 -0.783843 0.0810867 0.615642 0.489345 45 57.5 1 0.2 +121 1 1 -1 46.0808 49.5946 53.0782 -0.783843 -0.0810867 0.615642 0.489345 45 57.5 1 0.2 +122 1 1 1 45.7467 50 52.6287 -0.850651 0 0.525731 0.489345 45 57.5 1 0.2 +123 1 1 -1 48.668 50 54.8193 -0.266405 0 0.963861 0.489345 45 57.5 1 0.2 +124 1 1 1 48.002 49.5884 54.5649 -0.399606 -0.0823234 0.912983 0.489345 45 57.5 1 0.2 +125 1 1 -1 48.002 50.4116 54.5649 -0.399606 0.0823234 0.912983 0.489345 45 57.5 1 0.2 +126 1 1 1 50.656 52.4222 54.3246 0.1312 0.484441 0.864929 0.489345 45 57.5 1 0.2 +127 1 1 -1 51.2995 52.1694 54.3133 0.259892 0.433888 0.862669 0.489345 45 57.5 1 0.2 +128 1 1 1 50.6583 51.7911 54.6215 0.131656 0.358229 0.924304 0.489345 45 57.5 1 0.2 +129 1 1 -1 51.9181 51.8752 54.2196 0.383614 0.375038 0.843912 0.489345 45 57.5 1 0.2 +130 1 1 1 51.3204 51.5063 54.5812 0.264082 0.301259 0.916244 0.489345 45 57.5 1 0.2 +131 1 1 -1 52.5 51.5451 54.0451 0.499999 0.309017 0.809017 0.489345 45 57.5 1 0.2 +132 1 1 1 51.9309 51.1934 54.455 0.386187 0.238678 0.891006 0.489345 45 57.5 1 0.2 +133 1 1 -1 51.3143 50.8123 54.7553 0.262865 0.16246 0.951056 0.489345 45 57.5 1 0.2 +134 1 1 1 50.664 51.1006 54.832 0.132793 0.220117 0.966393 0.489345 45 57.5 1 0.2 +135 1 1 -1 50.6654 50.4112 54.9384 0.133071 0.0822426 0.987688 0.489345 45 57.5 1 0.2 +136 1 1 1 53.0341 51.1854 53.7933 0.606824 0.237086 0.758653 0.489345 45 57.5 1 0.2 +137 1 1 -1 52.5963 50.7822 54.2009 0.519258 0.156435 0.840178 0.489345 45 57.5 1 0.2 +138 1 1 1 53.5102 50.8031 53.4689 0.702046 0.160622 0.693781 0.489345 45 57.5 1 0.2 +139 1 1 -1 53.1012 50.4057 53.901 0.620239 0.0811424 0.780205 0.489345 45 57.5 1 0.2 +140 1 1 1 52.6287 50 54.2533 0.52573 0 0.850651 0.489345 45 57.5 1 0.2 +141 1 1 -1 53.9192 50.4054 53.0782 0.783843 0.0810867 0.615642 0.489345 45 57.5 1 0.2 +142 1 1 1 53.5564 50 53.5145 0.711282 0 0.702907 0.489345 45 57.5 1 0.2 +143 1 1 -1 54.2533 50 52.6287 0.850651 0 0.525731 0.489345 45 57.5 1 0.2 +144 1 1 1 53.9192 49.5946 53.0782 0.783843 -0.0810867 0.615642 0.489345 45 57.5 1 0.2 +145 1 1 -1 53.5102 49.1969 53.4689 0.702046 -0.160622 0.693781 0.489345 45 57.5 1 0.2 +146 1 1 1 53.1012 49.5943 53.901 0.620239 -0.0811424 0.780205 0.489345 45 57.5 1 0.2 +147 1 1 -1 52.5963 49.2178 54.2009 0.519258 -0.156435 0.840178 0.489345 45 57.5 1 0.2 +148 1 1 1 53.0341 48.8146 53.7933 0.606824 -0.237086 0.758653 0.489345 45 57.5 1 0.2 +149 1 1 -1 52.5 48.4549 54.0451 0.499999 -0.309017 0.809017 0.489345 45 57.5 1 0.2 +150 1 1 1 50.6654 49.5888 54.9384 0.133071 -0.0822426 0.987688 0.489345 45 57.5 1 0.2 +151 1 1 -1 51.3143 49.1877 54.7553 0.262865 -0.16246 0.951056 0.489345 45 57.5 1 0.2 +152 1 1 1 50.664 48.8994 54.832 0.132793 -0.220117 0.966393 0.489345 45 57.5 1 0.2 +153 1 1 -1 51.9309 48.8066 54.455 0.386187 -0.238678 0.891006 0.489345 45 57.5 1 0.2 +154 1 1 1 51.3204 48.4937 54.5812 0.264082 -0.301259 0.916244 0.489345 45 57.5 1 0.2 +155 1 1 -1 51.9181 48.1248 54.2196 0.383614 -0.375038 0.843912 0.489345 45 57.5 1 0.2 +156 1 1 1 51.2995 47.8306 54.3133 0.259892 -0.433888 0.862669 0.489345 45 57.5 1 0.2 +157 1 1 -1 50.6583 48.2089 54.6215 0.131656 -0.358229 0.924304 0.489345 45 57.5 1 0.2 +158 1 1 1 50.656 47.5778 54.3246 0.1312 -0.484441 0.864929 0.489345 45 57.5 1 0.2 +159 1 1 -1 51.998 50.4116 54.5649 0.399606 0.0823234 0.912983 0.489345 45 57.5 1 0.2 +160 1 1 1 51.998 49.5884 54.5649 0.399606 -0.0823234 0.912983 0.489345 45 57.5 1 0.2 +161 1 1 -1 51.332 50 54.8193 0.266405 0 0.963861 0.489345 45 57.5 1 0.2 +162 1 1 1 50 52.0168 45.4248 0 0.403355 -0.915043 0.489345 45 57.5 1 0.2 +163 1 1 -1 50.656 52.4222 45.6754 0.1312 0.484441 -0.864929 0.489345 45 57.5 1 0.2 +164 1 1 1 50 51.3663 45.1903 0 0.273267 -0.961938 0.489345 45 57.5 1 0.2 +165 1 1 -1 50.6583 51.7911 45.3785 0.131656 0.358229 -0.924304 0.489345 45 57.5 1 0.2 +166 1 1 1 51.2995 52.1694 45.6867 0.259892 0.433888 -0.862669 0.489345 45 57.5 1 0.2 +167 1 1 -1 50 50.6898 45.0478 0 0.137952 -0.990439 0.489345 45 57.5 1 0.2 +168 1 1 1 50.664 51.1006 45.168 0.132793 0.220117 -0.966393 0.489345 45 57.5 1 0.2 +169 1 1 -1 50 50 45 0 0 -1 0.489345 45 57.5 1 0.2 +170 1 1 1 50.6654 50.4112 45.0616 0.133071 0.0822426 -0.987688 0.489345 45 57.5 1 0.2 +171 1 1 -1 51.3143 50.8123 45.2447 0.262865 0.16246 -0.951056 0.489345 45 57.5 1 0.2 +172 1 1 1 51.3204 51.5063 45.4188 0.264082 0.301259 -0.916244 0.489345 45 57.5 1 0.2 +173 1 1 -1 51.9181 51.8752 45.7804 0.383614 0.375038 -0.843912 0.489345 45 57.5 1 0.2 +174 1 1 1 51.9309 51.1934 45.545 0.386187 0.238678 -0.891006 0.489345 45 57.5 1 0.2 +175 1 1 -1 52.5 51.5451 45.9549 0.499999 0.309017 -0.809017 0.489345 45 57.5 1 0.2 +176 1 1 1 50 49.3102 45.0478 0 -0.137952 -0.990439 0.489345 45 57.5 1 0.2 +177 1 1 -1 50.6654 49.5888 45.0616 0.133071 -0.0822426 -0.987688 0.489345 45 57.5 1 0.2 +178 1 1 1 50 48.6337 45.1903 0 -0.273267 -0.961938 0.489345 45 57.5 1 0.2 +179 1 1 -1 50.664 48.8994 45.168 0.132793 -0.220117 -0.966393 0.489345 45 57.5 1 0.2 +180 1 1 1 51.3143 49.1877 45.2447 0.262865 -0.16246 -0.951056 0.489345 45 57.5 1 0.2 +181 1 1 -1 50 47.9832 45.4248 0 -0.403355 -0.915043 0.489345 45 57.5 1 0.2 +182 1 1 1 50.6583 48.2089 45.3785 0.131656 -0.358229 -0.924304 0.489345 45 57.5 1 0.2 +183 1 1 -1 50 47.3713 45.7467 0 -0.525731 -0.850651 0.489345 45 57.5 1 0.2 +184 1 1 1 50.656 47.5778 45.6754 0.1312 -0.484441 -0.864929 0.489345 45 57.5 1 0.2 +185 1 1 -1 51.2995 47.8306 45.6867 0.259892 -0.433888 -0.862669 0.489345 45 57.5 1 0.2 +186 1 1 1 51.3204 48.4937 45.4188 0.264082 -0.301259 -0.916244 0.489345 45 57.5 1 0.2 +187 1 1 -1 51.9309 48.8066 45.545 0.386187 -0.238678 -0.891006 0.489345 45 57.5 1 0.2 +188 1 1 1 51.9181 48.1248 45.7804 0.383614 -0.375038 -0.843912 0.489345 45 57.5 1 0.2 +189 1 1 -1 52.5 48.4549 45.9549 0.499999 -0.309017 -0.809017 0.489345 45 57.5 1 0.2 +190 1 1 1 52.5963 50.7822 45.7991 0.519258 0.156435 -0.840178 0.489345 45 57.5 1 0.2 +191 1 1 -1 53.0341 51.1854 46.2067 0.606824 0.237086 -0.758653 0.489345 45 57.5 1 0.2 +192 1 1 1 52.6287 50 45.7467 0.52573 0 -0.850651 0.489345 45 57.5 1 0.2 +193 1 1 -1 53.1012 50.4057 46.099 0.620239 0.0811424 -0.780205 0.489345 45 57.5 1 0.2 +194 1 1 1 53.5102 50.8031 46.5311 0.702046 0.160622 -0.693781 0.489345 45 57.5 1 0.2 +195 1 1 -1 52.5963 49.2178 45.7991 0.519258 -0.156435 -0.840178 0.489345 45 57.5 1 0.2 +196 1 1 1 53.1012 49.5943 46.099 0.620239 -0.0811424 -0.780205 0.489345 45 57.5 1 0.2 +197 1 1 -1 53.0341 48.8146 46.2067 0.606824 -0.237086 -0.758653 0.489345 45 57.5 1 0.2 +198 1 1 1 53.5102 49.1969 46.5311 0.702046 -0.160622 -0.693781 0.489345 45 57.5 1 0.2 +199 1 1 -1 53.5564 50 46.4855 0.711282 0 -0.702907 0.489345 45 57.5 1 0.2 +200 1 1 1 53.9192 50.4054 46.9218 0.783843 0.0810867 -0.615642 0.489345 45 57.5 1 0.2 +201 1 1 -1 53.9192 49.5946 46.9218 0.783843 -0.0810867 -0.615642 0.489345 45 57.5 1 0.2 +202 1 1 1 54.2533 50 47.3713 0.850651 0 -0.525731 0.489345 45 57.5 1 0.2 +203 1 1 -1 51.332 50 45.1807 0.266405 0 -0.963861 0.489345 45 57.5 1 0.2 +204 1 1 1 51.998 49.5884 45.4351 0.399606 -0.0823234 -0.912983 0.489345 45 57.5 1 0.2 +205 1 1 -1 51.998 50.4116 45.4351 0.399606 0.0823234 -0.912983 0.489345 45 57.5 1 0.2 +206 1 1 1 49.344 52.4222 45.6754 -0.1312 0.484441 -0.864929 0.489345 45 57.5 1 0.2 +207 1 1 -1 48.7005 52.1694 45.6867 -0.259892 0.433888 -0.862669 0.489345 45 57.5 1 0.2 +208 1 1 1 49.3417 51.7911 45.3785 -0.131656 0.358229 -0.924304 0.489345 45 57.5 1 0.2 +209 1 1 -1 48.0819 51.8752 45.7804 -0.383614 0.375038 -0.843912 0.489345 45 57.5 1 0.2 +210 1 1 1 48.6796 51.5063 45.4188 -0.264082 0.301259 -0.916244 0.489345 45 57.5 1 0.2 +211 1 1 -1 47.5 51.5451 45.9549 -0.499999 0.309017 -0.809017 0.489345 45 57.5 1 0.2 +212 1 1 1 48.0691 51.1934 45.545 -0.386187 0.238678 -0.891006 0.489345 45 57.5 1 0.2 +213 1 1 -1 48.6857 50.8123 45.2447 -0.262865 0.16246 -0.951056 0.489345 45 57.5 1 0.2 +214 1 1 1 49.336 51.1006 45.168 -0.132793 0.220117 -0.966393 0.489345 45 57.5 1 0.2 +215 1 1 -1 49.3346 50.4112 45.0616 -0.133071 0.0822426 -0.987688 0.489345 45 57.5 1 0.2 +216 1 1 1 46.9659 51.1854 46.2067 -0.606824 0.237086 -0.758653 0.489345 45 57.5 1 0.2 +217 1 1 -1 47.4037 50.7822 45.7991 -0.519258 0.156435 -0.840178 0.489345 45 57.5 1 0.2 +218 1 1 1 46.4898 50.8031 46.5311 -0.702046 0.160622 -0.693781 0.489345 45 57.5 1 0.2 +219 1 1 -1 46.8988 50.4057 46.099 -0.620239 0.0811424 -0.780205 0.489345 45 57.5 1 0.2 +220 1 1 1 47.3713 50 45.7467 -0.52573 0 -0.850651 0.489345 45 57.5 1 0.2 +221 1 1 -1 46.0808 50.4054 46.9218 -0.783843 0.0810867 -0.615642 0.489345 45 57.5 1 0.2 +222 1 1 1 46.4436 50 46.4855 -0.711282 0 -0.702907 0.489345 45 57.5 1 0.2 +223 1 1 -1 45.7467 50 47.3713 -0.850651 0 -0.525731 0.489345 45 57.5 1 0.2 +224 1 1 1 46.0808 49.5946 46.9218 -0.783843 -0.0810867 -0.615642 0.489345 45 57.5 1 0.2 +225 1 1 -1 46.4898 49.1969 46.5311 -0.702046 -0.160622 -0.693781 0.489345 45 57.5 1 0.2 +226 1 1 1 46.8988 49.5943 46.099 -0.620239 -0.0811424 -0.780205 0.489345 45 57.5 1 0.2 +227 1 1 -1 47.4037 49.2178 45.7991 -0.519258 -0.156435 -0.840178 0.489345 45 57.5 1 0.2 +228 1 1 1 46.9659 48.8146 46.2067 -0.606824 -0.237086 -0.758653 0.489345 45 57.5 1 0.2 +229 1 1 -1 47.5 48.4549 45.9549 -0.499999 -0.309017 -0.809017 0.489345 45 57.5 1 0.2 +230 1 1 1 49.3346 49.5888 45.0616 -0.133071 -0.0822426 -0.987688 0.489345 45 57.5 1 0.2 +231 1 1 -1 48.6857 49.1877 45.2447 -0.262865 -0.16246 -0.951056 0.489345 45 57.5 1 0.2 +232 1 1 1 49.336 48.8994 45.168 -0.132793 -0.220117 -0.966393 0.489345 45 57.5 1 0.2 +233 1 1 -1 48.0691 48.8066 45.545 -0.386187 -0.238678 -0.891006 0.489345 45 57.5 1 0.2 +234 1 1 1 48.6796 48.4937 45.4188 -0.264082 -0.301259 -0.916244 0.489345 45 57.5 1 0.2 +235 1 1 -1 48.0819 48.1248 45.7804 -0.383614 -0.375038 -0.843912 0.489345 45 57.5 1 0.2 +236 1 1 1 48.7005 47.8306 45.6867 -0.259892 -0.433888 -0.862669 0.489345 45 57.5 1 0.2 +237 1 1 -1 49.3417 48.2089 45.3785 -0.131656 -0.358229 -0.924304 0.489345 45 57.5 1 0.2 +238 1 1 1 49.344 47.5778 45.6754 -0.1312 -0.484441 -0.864929 0.489345 45 57.5 1 0.2 +239 1 1 -1 48.002 50.4116 45.4351 -0.399606 0.0823234 -0.912983 0.489345 45 57.5 1 0.2 +240 1 1 1 48.002 49.5884 45.4351 -0.399606 -0.0823234 -0.912983 0.489345 45 57.5 1 0.2 +241 1 1 -1 48.668 50 45.1807 -0.266405 0 -0.963861 0.489345 45 57.5 1 0.2 +242 1 1 1 50.4054 46.9218 53.9192 0.0810867 -0.615642 0.783843 0.489345 45 57.5 1 0.2 +243 1 1 -1 49.5946 46.9218 53.9192 -0.0810867 -0.615642 0.783843 0.489345 45 57.5 1 0.2 +244 1 1 1 50.8031 46.5311 53.5102 0.160622 -0.693781 0.702046 0.489345 45 57.5 1 0.2 +245 1 1 -1 50 46.4855 53.5564 0 -0.702907 0.711282 0.489345 45 57.5 1 0.2 +246 1 1 1 49.1969 46.5311 53.5102 -0.160622 -0.693781 0.702046 0.489345 45 57.5 1 0.2 +247 1 1 -1 51.1854 46.2067 53.0341 0.237086 -0.758653 0.606824 0.489345 45 57.5 1 0.2 +248 1 1 1 50.4057 46.099 53.1012 0.0811424 -0.780205 0.620239 0.489345 45 57.5 1 0.2 +249 1 1 -1 51.5451 45.9549 52.5 0.309017 -0.809017 0.499999 0.489345 45 57.5 1 0.2 +250 1 1 1 50.7822 45.7991 52.5963 0.156435 -0.840178 0.519258 0.489345 45 57.5 1 0.2 +251 1 1 -1 50 45.7467 52.6287 0 -0.850651 0.52573 0.489345 45 57.5 1 0.2 +252 1 1 1 49.5943 46.099 53.1012 -0.0811424 -0.780205 0.620239 0.489345 45 57.5 1 0.2 +253 1 1 -1 48.8146 46.2067 53.0341 -0.237086 -0.758653 0.606824 0.489345 45 57.5 1 0.2 +254 1 1 1 49.2178 45.7991 52.5963 -0.156435 -0.840178 0.519258 0.489345 45 57.5 1 0.2 +255 1 1 -1 48.4549 45.9549 52.5 -0.309017 -0.809017 0.499999 0.489345 45 57.5 1 0.2 +256 1 1 1 51.8752 45.7804 51.9181 0.375038 -0.843912 0.383614 0.489345 45 57.5 1 0.2 +257 1 1 -1 51.1934 45.545 51.9309 0.238678 -0.891006 0.386187 0.489345 45 57.5 1 0.2 +258 1 1 1 52.1694 45.6867 51.2995 0.433888 -0.862669 0.259892 0.489345 45 57.5 1 0.2 +259 1 1 -1 51.5063 45.4188 51.3204 0.301259 -0.916244 0.264082 0.489345 45 57.5 1 0.2 +260 1 1 1 50.8123 45.2447 51.3143 0.16246 -0.951056 0.262865 0.489345 45 57.5 1 0.2 +261 1 1 -1 52.4222 45.6754 50.656 0.484441 -0.864929 0.1312 0.489345 45 57.5 1 0.2 +262 1 1 1 51.7911 45.3785 50.6583 0.358229 -0.924304 0.131656 0.489345 45 57.5 1 0.2 +263 1 1 -1 52.6287 45.7467 50 0.525731 -0.850651 0 0.489345 45 57.5 1 0.2 +264 1 1 1 52.0168 45.4248 50 0.403355 -0.915043 0 0.489345 45 57.5 1 0.2 +265 1 1 -1 51.3663 45.1903 50 0.273267 -0.961938 0 0.489345 45 57.5 1 0.2 +266 1 1 1 51.1006 45.168 50.664 0.220117 -0.966393 0.132793 0.489345 45 57.5 1 0.2 +267 1 1 -1 50.4112 45.0616 50.6654 0.0822426 -0.987688 0.133071 0.489345 45 57.5 1 0.2 +268 1 1 1 50.6898 45.0478 50 0.137952 -0.990439 0 0.489345 45 57.5 1 0.2 +269 1 1 -1 50 45 50 0 -1 0 0.489345 45 57.5 1 0.2 +270 1 1 1 48.8066 45.545 51.9309 -0.238678 -0.891006 0.386187 0.489345 45 57.5 1 0.2 +271 1 1 -1 48.1248 45.7804 51.9181 -0.375038 -0.843912 0.383614 0.489345 45 57.5 1 0.2 +272 1 1 1 49.1877 45.2447 51.3143 -0.16246 -0.951056 0.262865 0.489345 45 57.5 1 0.2 +273 1 1 -1 48.4937 45.4188 51.3204 -0.301259 -0.916244 0.264082 0.489345 45 57.5 1 0.2 +274 1 1 1 47.8306 45.6867 51.2995 -0.433888 -0.862669 0.259892 0.489345 45 57.5 1 0.2 +275 1 1 -1 49.5888 45.0616 50.6654 -0.0822426 -0.987688 0.133071 0.489345 45 57.5 1 0.2 +276 1 1 1 48.8994 45.168 50.664 -0.220117 -0.966393 0.132793 0.489345 45 57.5 1 0.2 +277 1 1 -1 49.3102 45.0478 50 -0.137952 -0.990439 0 0.489345 45 57.5 1 0.2 +278 1 1 1 48.6337 45.1903 50 -0.273267 -0.961938 0 0.489345 45 57.5 1 0.2 +279 1 1 -1 48.2089 45.3785 50.6583 -0.358229 -0.924304 0.131656 0.489345 45 57.5 1 0.2 +280 1 1 1 47.5778 45.6754 50.656 -0.484441 -0.864929 0.1312 0.489345 45 57.5 1 0.2 +281 1 1 -1 47.9832 45.4248 50 -0.403355 -0.915043 0 0.489345 45 57.5 1 0.2 +282 1 1 1 47.3713 45.7467 50 -0.525731 -0.850651 0 0.489345 45 57.5 1 0.2 +283 1 1 -1 50.4116 45.4351 51.998 0.0823234 -0.912983 0.399606 0.489345 45 57.5 1 0.2 +284 1 1 1 50 45.1807 51.332 0 -0.963861 0.266405 0.489345 45 57.5 1 0.2 +285 1 1 -1 49.5884 45.4351 51.998 -0.0823234 -0.912983 0.399606 0.489345 45 57.5 1 0.2 +286 1 1 1 49.5946 46.9218 46.0808 -0.0810867 -0.615642 -0.783843 0.489345 45 57.5 1 0.2 +287 1 1 -1 50.4054 46.9218 46.0808 0.0810867 -0.615642 -0.783843 0.489345 45 57.5 1 0.2 +288 1 1 1 49.1969 46.5311 46.4898 -0.160622 -0.693781 -0.702046 0.489345 45 57.5 1 0.2 +289 1 1 -1 50 46.4855 46.4436 0 -0.702907 -0.711282 0.489345 45 57.5 1 0.2 +290 1 1 1 50.8031 46.5311 46.4898 0.160622 -0.693781 -0.702046 0.489345 45 57.5 1 0.2 +291 1 1 -1 48.8146 46.2067 46.9659 -0.237086 -0.758653 -0.606824 0.489345 45 57.5 1 0.2 +292 1 1 1 49.5943 46.099 46.8988 -0.0811424 -0.780205 -0.620239 0.489345 45 57.5 1 0.2 +293 1 1 -1 48.4549 45.9549 47.5 -0.309017 -0.809017 -0.499999 0.489345 45 57.5 1 0.2 +294 1 1 1 49.2178 45.7991 47.4037 -0.156435 -0.840178 -0.519258 0.489345 45 57.5 1 0.2 +295 1 1 -1 50 45.7467 47.3713 0 -0.850651 -0.52573 0.489345 45 57.5 1 0.2 +296 1 1 1 50.4057 46.099 46.8988 0.0811424 -0.780205 -0.620239 0.489345 45 57.5 1 0.2 +297 1 1 -1 51.1854 46.2067 46.9659 0.237086 -0.758653 -0.606824 0.489345 45 57.5 1 0.2 +298 1 1 1 50.7822 45.7991 47.4037 0.156435 -0.840178 -0.519258 0.489345 45 57.5 1 0.2 +299 1 1 -1 51.5451 45.9549 47.5 0.309017 -0.809017 -0.499999 0.489345 45 57.5 1 0.2 +300 1 1 1 48.1248 45.7804 48.0819 -0.375038 -0.843912 -0.383614 0.489345 45 57.5 1 0.2 +301 1 1 -1 48.8066 45.545 48.0691 -0.238678 -0.891006 -0.386187 0.489345 45 57.5 1 0.2 +302 1 1 1 47.8306 45.6867 48.7005 -0.433888 -0.862669 -0.259892 0.489345 45 57.5 1 0.2 +303 1 1 -1 48.4937 45.4188 48.6796 -0.301259 -0.916244 -0.264082 0.489345 45 57.5 1 0.2 +304 1 1 1 49.1877 45.2447 48.6857 -0.16246 -0.951056 -0.262865 0.489345 45 57.5 1 0.2 +305 1 1 -1 47.5778 45.6754 49.344 -0.484441 -0.864929 -0.1312 0.489345 45 57.5 1 0.2 +306 1 1 1 48.2089 45.3785 49.3417 -0.358229 -0.924304 -0.131656 0.489345 45 57.5 1 0.2 +307 1 1 -1 48.8994 45.168 49.336 -0.220117 -0.966393 -0.132793 0.489345 45 57.5 1 0.2 +308 1 1 1 49.5888 45.0616 49.3346 -0.0822426 -0.987688 -0.133071 0.489345 45 57.5 1 0.2 +309 1 1 -1 51.1934 45.545 48.0691 0.238678 -0.891006 -0.386187 0.489345 45 57.5 1 0.2 +310 1 1 1 51.8752 45.7804 48.0819 0.375038 -0.843912 -0.383614 0.489345 45 57.5 1 0.2 +311 1 1 -1 50.8123 45.2447 48.6857 0.16246 -0.951056 -0.262865 0.489345 45 57.5 1 0.2 +312 1 1 1 51.5063 45.4188 48.6796 0.301259 -0.916244 -0.264082 0.489345 45 57.5 1 0.2 +313 1 1 -1 52.1694 45.6867 48.7005 0.433888 -0.862669 -0.259892 0.489345 45 57.5 1 0.2 +314 1 1 1 50.4112 45.0616 49.3346 0.0822426 -0.987688 -0.133071 0.489345 45 57.5 1 0.2 +315 1 1 -1 51.1006 45.168 49.336 0.220117 -0.966393 -0.132793 0.489345 45 57.5 1 0.2 +316 1 1 1 51.7911 45.3785 49.3417 0.358229 -0.924304 -0.131656 0.489345 45 57.5 1 0.2 +317 1 1 -1 52.4222 45.6754 49.344 0.484441 -0.864929 -0.1312 0.489345 45 57.5 1 0.2 +318 1 1 1 49.5884 45.4351 48.002 -0.0823234 -0.912983 -0.399606 0.489345 45 57.5 1 0.2 +319 1 1 -1 50 45.1807 48.668 0 -0.963861 -0.266405 0.489345 45 57.5 1 0.2 +320 1 1 1 50.4116 45.4351 48.002 0.0823234 -0.912983 -0.399606 0.489345 45 57.5 1 0.2 +321 1 1 -1 46.9218 53.9192 50.4054 -0.615642 0.783843 0.0810867 0.489345 45 57.5 1 0.2 +322 1 1 1 46.9218 53.9192 49.5946 -0.615642 0.783843 -0.0810867 0.489345 45 57.5 1 0.2 +323 1 1 -1 46.5311 53.5102 50.8031 -0.693781 0.702046 0.160622 0.489345 45 57.5 1 0.2 +324 1 1 1 46.4855 53.5564 50 -0.702907 0.711282 0 0.489345 45 57.5 1 0.2 +325 1 1 -1 46.5311 53.5102 49.1969 -0.693781 0.702046 -0.160622 0.489345 45 57.5 1 0.2 +326 1 1 1 46.2067 53.0341 51.1854 -0.758653 0.606824 0.237086 0.489345 45 57.5 1 0.2 +327 1 1 -1 46.099 53.1012 50.4057 -0.780205 0.620239 0.0811424 0.489345 45 57.5 1 0.2 +328 1 1 1 45.9549 52.5 51.5451 -0.809017 0.499999 0.309017 0.489345 45 57.5 1 0.2 +329 1 1 -1 45.7991 52.5963 50.7822 -0.840178 0.519258 0.156435 0.489345 45 57.5 1 0.2 +330 1 1 1 45.7467 52.6287 50 -0.850651 0.52573 0 0.489345 45 57.5 1 0.2 +331 1 1 -1 46.099 53.1012 49.5943 -0.780205 0.620239 -0.0811424 0.489345 45 57.5 1 0.2 +332 1 1 1 46.2067 53.0341 48.8146 -0.758653 0.606824 -0.237086 0.489345 45 57.5 1 0.2 +333 1 1 -1 45.7991 52.5963 49.2178 -0.840178 0.519258 -0.156435 0.489345 45 57.5 1 0.2 +334 1 1 1 45.9549 52.5 48.4549 -0.809017 0.499999 -0.309017 0.489345 45 57.5 1 0.2 +335 1 1 -1 45.7804 51.9181 51.8752 -0.843912 0.383614 0.375038 0.489345 45 57.5 1 0.2 +336 1 1 1 45.545 51.9309 51.1934 -0.891006 0.386187 0.238678 0.489345 45 57.5 1 0.2 +337 1 1 -1 45.6867 51.2995 52.1694 -0.862669 0.259892 0.433888 0.489345 45 57.5 1 0.2 +338 1 1 1 45.4188 51.3204 51.5063 -0.916244 0.264082 0.301259 0.489345 45 57.5 1 0.2 +339 1 1 -1 45.2447 51.3143 50.8123 -0.951056 0.262865 0.16246 0.489345 45 57.5 1 0.2 +340 1 1 1 45.6754 50.656 52.4222 -0.864929 0.1312 0.484441 0.489345 45 57.5 1 0.2 +341 1 1 -1 45.3785 50.6583 51.7911 -0.924304 0.131656 0.358229 0.489345 45 57.5 1 0.2 +342 1 1 1 45.4248 50 52.0168 -0.915043 0 0.403355 0.489345 45 57.5 1 0.2 +343 1 1 -1 45.1903 50 51.3663 -0.961938 0 0.273267 0.489345 45 57.5 1 0.2 +344 1 1 1 45.168 50.664 51.1006 -0.966393 0.132793 0.220117 0.489345 45 57.5 1 0.2 +345 1 1 -1 45.0616 50.6654 50.4112 -0.987688 0.133071 0.0822426 0.489345 45 57.5 1 0.2 +346 1 1 1 45.0478 50 50.6898 -0.990439 0 0.137952 0.489345 45 57.5 1 0.2 +347 1 1 -1 45 50 50 -1 0 0 0.489345 45 57.5 1 0.2 +348 1 1 1 45.545 51.9309 48.8066 -0.891006 0.386187 -0.238678 0.489345 45 57.5 1 0.2 +349 1 1 -1 45.7804 51.9181 48.1248 -0.843912 0.383614 -0.375038 0.489345 45 57.5 1 0.2 +350 1 1 1 45.2447 51.3143 49.1877 -0.951056 0.262865 -0.16246 0.489345 45 57.5 1 0.2 +351 1 1 -1 45.4188 51.3204 48.4937 -0.916244 0.264082 -0.301259 0.489345 45 57.5 1 0.2 +352 1 1 1 45.6867 51.2995 47.8306 -0.862669 0.259892 -0.433888 0.489345 45 57.5 1 0.2 +353 1 1 -1 45.0616 50.6654 49.5888 -0.987688 0.133071 -0.0822426 0.489345 45 57.5 1 0.2 +354 1 1 1 45.168 50.664 48.8994 -0.966393 0.132793 -0.220117 0.489345 45 57.5 1 0.2 +355 1 1 -1 45.0478 50 49.3102 -0.990439 0 -0.137952 0.489345 45 57.5 1 0.2 +356 1 1 1 45.1903 50 48.6337 -0.961938 0 -0.273267 0.489345 45 57.5 1 0.2 +357 1 1 -1 45.3785 50.6583 48.2089 -0.924304 0.131656 -0.358229 0.489345 45 57.5 1 0.2 +358 1 1 1 45.6754 50.656 47.5778 -0.864929 0.1312 -0.484441 0.489345 45 57.5 1 0.2 +359 1 1 -1 45.4248 50 47.9832 -0.915043 0 -0.403355 0.489345 45 57.5 1 0.2 +360 1 1 1 45.4351 51.998 50.4116 -0.912983 0.399606 0.0823234 0.489345 45 57.5 1 0.2 +361 1 1 -1 45.1807 51.332 50 -0.963861 0.266405 0 0.489345 45 57.5 1 0.2 +362 1 1 1 45.4351 51.998 49.5884 -0.912983 0.399606 -0.0823234 0.489345 45 57.5 1 0.2 +363 1 1 -1 46.9218 46.0808 49.5946 -0.615642 -0.783843 -0.0810867 0.489345 45 57.5 1 0.2 +364 1 1 1 46.9218 46.0808 50.4054 -0.615642 -0.783843 0.0810867 0.489345 45 57.5 1 0.2 +365 1 1 -1 46.5311 46.4898 49.1969 -0.693781 -0.702046 -0.160622 0.489345 45 57.5 1 0.2 +366 1 1 1 46.4855 46.4436 50 -0.702907 -0.711282 0 0.489345 45 57.5 1 0.2 +367 1 1 -1 46.5311 46.4898 50.8031 -0.693781 -0.702046 0.160622 0.489345 45 57.5 1 0.2 +368 1 1 1 46.2067 46.9659 48.8146 -0.758653 -0.606824 -0.237086 0.489345 45 57.5 1 0.2 +369 1 1 -1 46.099 46.8988 49.5943 -0.780205 -0.620239 -0.0811424 0.489345 45 57.5 1 0.2 +370 1 1 1 45.9549 47.5 48.4549 -0.809017 -0.499999 -0.309017 0.489345 45 57.5 1 0.2 +371 1 1 -1 45.7991 47.4037 49.2178 -0.840178 -0.519258 -0.156435 0.489345 45 57.5 1 0.2 +372 1 1 1 45.7467 47.3713 50 -0.850651 -0.52573 0 0.489345 45 57.5 1 0.2 +373 1 1 -1 46.099 46.8988 50.4057 -0.780205 -0.620239 0.0811424 0.489345 45 57.5 1 0.2 +374 1 1 1 46.2067 46.9659 51.1854 -0.758653 -0.606824 0.237086 0.489345 45 57.5 1 0.2 +375 1 1 -1 45.7991 47.4037 50.7822 -0.840178 -0.519258 0.156435 0.489345 45 57.5 1 0.2 +376 1 1 1 45.9549 47.5 51.5451 -0.809017 -0.499999 0.309017 0.489345 45 57.5 1 0.2 +377 1 1 -1 45.7804 48.0819 48.1248 -0.843912 -0.383614 -0.375038 0.489345 45 57.5 1 0.2 +378 1 1 1 45.545 48.0691 48.8066 -0.891006 -0.386187 -0.238678 0.489345 45 57.5 1 0.2 +379 1 1 -1 45.6867 48.7005 47.8306 -0.862669 -0.259892 -0.433888 0.489345 45 57.5 1 0.2 +380 1 1 1 45.4188 48.6796 48.4937 -0.916244 -0.264082 -0.301259 0.489345 45 57.5 1 0.2 +381 1 1 -1 45.2447 48.6857 49.1877 -0.951056 -0.262865 -0.16246 0.489345 45 57.5 1 0.2 +382 1 1 1 45.6754 49.344 47.5778 -0.864929 -0.1312 -0.484441 0.489345 45 57.5 1 0.2 +383 1 1 -1 45.3785 49.3417 48.2089 -0.924304 -0.131656 -0.358229 0.489345 45 57.5 1 0.2 +384 1 1 1 45.168 49.336 48.8994 -0.966393 -0.132793 -0.220117 0.489345 45 57.5 1 0.2 +385 1 1 -1 45.0616 49.3346 49.5888 -0.987688 -0.133071 -0.0822426 0.489345 45 57.5 1 0.2 +386 1 1 1 45.545 48.0691 51.1934 -0.891006 -0.386187 0.238678 0.489345 45 57.5 1 0.2 +387 1 1 -1 45.7804 48.0819 51.8752 -0.843912 -0.383614 0.375038 0.489345 45 57.5 1 0.2 +388 1 1 1 45.2447 48.6857 50.8123 -0.951056 -0.262865 0.16246 0.489345 45 57.5 1 0.2 +389 1 1 -1 45.4188 48.6796 51.5063 -0.916244 -0.264082 0.301259 0.489345 45 57.5 1 0.2 +390 1 1 1 45.6867 48.7005 52.1694 -0.862669 -0.259892 0.433888 0.489345 45 57.5 1 0.2 +391 1 1 -1 45.0616 49.3346 50.4112 -0.987688 -0.133071 0.0822426 0.489345 45 57.5 1 0.2 +392 1 1 1 45.168 49.336 51.1006 -0.966393 -0.132793 0.220117 0.489345 45 57.5 1 0.2 +393 1 1 -1 45.3785 49.3417 51.7911 -0.924304 -0.131656 0.358229 0.489345 45 57.5 1 0.2 +394 1 1 1 45.6754 49.344 52.4222 -0.864929 -0.1312 0.484441 0.489345 45 57.5 1 0.2 +395 1 1 -1 45.4351 48.002 49.5884 -0.912983 -0.399606 -0.0823234 0.489345 45 57.5 1 0.2 +396 1 1 1 45.1807 48.668 50 -0.963861 -0.266405 0 0.489345 45 57.5 1 0.2 +397 1 1 -1 45.4351 48.002 50.4116 -0.912983 -0.399606 0.0823234 0.489345 45 57.5 1 0.2 +398 1 1 1 53.0782 53.9192 49.5946 0.615642 0.783843 -0.0810867 0.489345 45 57.5 1 0.2 +399 1 1 -1 53.0782 53.9192 50.4054 0.615642 0.783843 0.0810867 0.489345 45 57.5 1 0.2 +400 1 1 1 53.4689 53.5102 49.1969 0.693781 0.702046 -0.160622 0.489345 45 57.5 1 0.2 +401 1 1 -1 53.5145 53.5564 50 0.702907 0.711282 0 0.489345 45 57.5 1 0.2 +402 1 1 1 53.4689 53.5102 50.8031 0.693781 0.702046 0.160622 0.489345 45 57.5 1 0.2 +403 1 1 -1 53.7933 53.0341 48.8146 0.758653 0.606824 -0.237086 0.489345 45 57.5 1 0.2 +404 1 1 1 53.901 53.1012 49.5943 0.780205 0.620239 -0.0811424 0.489345 45 57.5 1 0.2 +405 1 1 -1 54.0451 52.5 48.4549 0.809017 0.499999 -0.309017 0.489345 45 57.5 1 0.2 +406 1 1 1 54.2009 52.5963 49.2178 0.840178 0.519258 -0.156435 0.489345 45 57.5 1 0.2 +407 1 1 -1 54.2533 52.6287 50 0.850651 0.52573 0 0.489345 45 57.5 1 0.2 +408 1 1 1 53.901 53.1012 50.4057 0.780205 0.620239 0.0811424 0.489345 45 57.5 1 0.2 +409 1 1 -1 53.7933 53.0341 51.1854 0.758653 0.606824 0.237086 0.489345 45 57.5 1 0.2 +410 1 1 1 54.2009 52.5963 50.7822 0.840178 0.519258 0.156435 0.489345 45 57.5 1 0.2 +411 1 1 -1 54.0451 52.5 51.5451 0.809017 0.499999 0.309017 0.489345 45 57.5 1 0.2 +412 1 1 1 54.2196 51.9181 48.1248 0.843912 0.383614 -0.375038 0.489345 45 57.5 1 0.2 +413 1 1 -1 54.455 51.9309 48.8066 0.891006 0.386187 -0.238678 0.489345 45 57.5 1 0.2 +414 1 1 1 54.3133 51.2995 47.8306 0.862669 0.259892 -0.433888 0.489345 45 57.5 1 0.2 +415 1 1 -1 54.5812 51.3204 48.4937 0.916244 0.264082 -0.301259 0.489345 45 57.5 1 0.2 +416 1 1 1 54.7553 51.3143 49.1877 0.951056 0.262865 -0.16246 0.489345 45 57.5 1 0.2 +417 1 1 -1 54.3246 50.656 47.5778 0.864929 0.1312 -0.484441 0.489345 45 57.5 1 0.2 +418 1 1 1 54.6215 50.6583 48.2089 0.924304 0.131656 -0.358229 0.489345 45 57.5 1 0.2 +419 1 1 -1 54.5752 50 47.9832 0.915043 0 -0.403355 0.489345 45 57.5 1 0.2 +420 1 1 1 54.8097 50 48.6337 0.961938 0 -0.273267 0.489345 45 57.5 1 0.2 +421 1 1 -1 54.832 50.664 48.8994 0.966393 0.132793 -0.220117 0.489345 45 57.5 1 0.2 +422 1 1 1 54.9384 50.6654 49.5888 0.987688 0.133071 -0.0822426 0.489345 45 57.5 1 0.2 +423 1 1 -1 54.9522 50 49.3102 0.990439 0 -0.137952 0.489345 45 57.5 1 0.2 +424 1 1 1 55 50 50 1 0 0 0.489345 45 57.5 1 0.2 +425 1 1 -1 54.455 51.9309 51.1934 0.891006 0.386187 0.238678 0.489345 45 57.5 1 0.2 +426 1 1 1 54.2196 51.9181 51.8752 0.843912 0.383614 0.375038 0.489345 45 57.5 1 0.2 +427 1 1 -1 54.7553 51.3143 50.8123 0.951056 0.262865 0.16246 0.489345 45 57.5 1 0.2 +428 1 1 1 54.5812 51.3204 51.5063 0.916244 0.264082 0.301259 0.489345 45 57.5 1 0.2 +429 1 1 -1 54.3133 51.2995 52.1694 0.862669 0.259892 0.433888 0.489345 45 57.5 1 0.2 +430 1 1 1 54.9384 50.6654 50.4112 0.987688 0.133071 0.0822426 0.489345 45 57.5 1 0.2 +431 1 1 -1 54.832 50.664 51.1006 0.966393 0.132793 0.220117 0.489345 45 57.5 1 0.2 +432 1 1 1 54.9522 50 50.6898 0.990439 0 0.137952 0.489345 45 57.5 1 0.2 +433 1 1 -1 54.8097 50 51.3663 0.961938 0 0.273267 0.489345 45 57.5 1 0.2 +434 1 1 1 54.6215 50.6583 51.7911 0.924304 0.131656 0.358229 0.489345 45 57.5 1 0.2 +435 1 1 -1 54.3246 50.656 52.4222 0.864929 0.1312 0.484441 0.489345 45 57.5 1 0.2 +436 1 1 1 54.5752 50 52.0168 0.915043 0 0.403355 0.489345 45 57.5 1 0.2 +437 1 1 -1 54.5649 51.998 49.5884 0.912983 0.399606 -0.0823234 0.489345 45 57.5 1 0.2 +438 1 1 1 54.8193 51.332 50 0.963861 0.266405 0 0.489345 45 57.5 1 0.2 +439 1 1 -1 54.5649 51.998 50.4116 0.912983 0.399606 0.0823234 0.489345 45 57.5 1 0.2 +440 1 1 1 53.0782 46.0808 50.4054 0.615642 -0.783843 0.0810867 0.489345 45 57.5 1 0.2 +441 1 1 -1 53.0782 46.0808 49.5946 0.615642 -0.783843 -0.0810867 0.489345 45 57.5 1 0.2 +442 1 1 1 53.4689 46.4898 50.8031 0.693781 -0.702046 0.160622 0.489345 45 57.5 1 0.2 +443 1 1 -1 53.5145 46.4436 50 0.702907 -0.711282 0 0.489345 45 57.5 1 0.2 +444 1 1 1 53.4689 46.4898 49.1969 0.693781 -0.702046 -0.160622 0.489345 45 57.5 1 0.2 +445 1 1 -1 53.7933 46.9659 51.1854 0.758653 -0.606824 0.237086 0.489345 45 57.5 1 0.2 +446 1 1 1 53.901 46.8988 50.4057 0.780205 -0.620239 0.0811424 0.489345 45 57.5 1 0.2 +447 1 1 -1 54.0451 47.5 51.5451 0.809017 -0.499999 0.309017 0.489345 45 57.5 1 0.2 +448 1 1 1 54.2009 47.4037 50.7822 0.840178 -0.519258 0.156435 0.489345 45 57.5 1 0.2 +449 1 1 -1 54.2533 47.3713 50 0.850651 -0.52573 0 0.489345 45 57.5 1 0.2 +450 1 1 1 53.901 46.8988 49.5943 0.780205 -0.620239 -0.0811424 0.489345 45 57.5 1 0.2 +451 1 1 -1 53.7933 46.9659 48.8146 0.758653 -0.606824 -0.237086 0.489345 45 57.5 1 0.2 +452 1 1 1 54.2009 47.4037 49.2178 0.840178 -0.519258 -0.156435 0.489345 45 57.5 1 0.2 +453 1 1 -1 54.0451 47.5 48.4549 0.809017 -0.499999 -0.309017 0.489345 45 57.5 1 0.2 +454 1 1 1 54.2196 48.0819 51.8752 0.843912 -0.383614 0.375038 0.489345 45 57.5 1 0.2 +455 1 1 -1 54.455 48.0691 51.1934 0.891006 -0.386187 0.238678 0.489345 45 57.5 1 0.2 +456 1 1 1 54.3133 48.7005 52.1694 0.862669 -0.259892 0.433888 0.489345 45 57.5 1 0.2 +457 1 1 -1 54.5812 48.6796 51.5063 0.916244 -0.264082 0.301259 0.489345 45 57.5 1 0.2 +458 1 1 1 54.7553 48.6857 50.8123 0.951056 -0.262865 0.16246 0.489345 45 57.5 1 0.2 +459 1 1 -1 54.3246 49.344 52.4222 0.864929 -0.1312 0.484441 0.489345 45 57.5 1 0.2 +460 1 1 1 54.6215 49.3417 51.7911 0.924304 -0.131656 0.358229 0.489345 45 57.5 1 0.2 +461 1 1 -1 54.832 49.336 51.1006 0.966393 -0.132793 0.220117 0.489345 45 57.5 1 0.2 +462 1 1 1 54.9384 49.3346 50.4112 0.987688 -0.133071 0.0822426 0.489345 45 57.5 1 0.2 +463 1 1 -1 54.455 48.0691 48.8066 0.891006 -0.386187 -0.238678 0.489345 45 57.5 1 0.2 +464 1 1 1 54.2196 48.0819 48.1248 0.843912 -0.383614 -0.375038 0.489345 45 57.5 1 0.2 +465 1 1 -1 54.7553 48.6857 49.1877 0.951056 -0.262865 -0.16246 0.489345 45 57.5 1 0.2 +466 1 1 1 54.5812 48.6796 48.4937 0.916244 -0.264082 -0.301259 0.489345 45 57.5 1 0.2 +467 1 1 -1 54.3133 48.7005 47.8306 0.862669 -0.259892 -0.433888 0.489345 45 57.5 1 0.2 +468 1 1 1 54.9384 49.3346 49.5888 0.987688 -0.133071 -0.0822426 0.489345 45 57.5 1 0.2 +469 1 1 -1 54.832 49.336 48.8994 0.966393 -0.132793 -0.220117 0.489345 45 57.5 1 0.2 +470 1 1 1 54.6215 49.3417 48.2089 0.924304 -0.131656 -0.358229 0.489345 45 57.5 1 0.2 +471 1 1 -1 54.3246 49.344 47.5778 0.864929 -0.1312 -0.484441 0.489345 45 57.5 1 0.2 +472 1 1 1 54.5649 48.002 50.4116 0.912983 -0.399606 0.0823234 0.489345 45 57.5 1 0.2 +473 1 1 -1 54.8193 48.668 50 0.963861 -0.266405 0 0.489345 45 57.5 1 0.2 +474 1 1 1 54.5649 48.002 49.5884 0.912983 -0.399606 -0.0823234 0.489345 45 57.5 1 0.2 +475 1 1 -1 48.9349 52.8563 53.9632 -0.213023 0.571252 0.792649 0.489345 45 57.5 1 0.2 +476 1 1 1 48.2692 52.5806 53.9173 -0.346153 0.516121 0.783452 0.489345 45 57.5 1 0.2 +477 1 1 -1 47.6579 52.27 53.7897 -0.468429 0.45399 0.757936 0.489345 45 57.5 1 0.2 +478 1 1 1 47.8734 52.9389 53.441 -0.425325 0.587785 0.688191 0.489345 45 57.5 1 0.2 +479 1 1 -1 48.52 53.2371 53.5116 -0.296004 0.647412 0.70231 0.489345 45 57.5 1 0.2 +480 1 1 1 48.1413 53.5355 53.0075 -0.371748 0.707107 0.601501 0.489345 45 57.5 1 0.2 +481 1 1 -1 46.9925 51.8587 53.5355 -0.601501 0.371748 0.707107 0.489345 45 57.5 1 0.2 +482 1 1 1 46.4884 51.48 53.2371 -0.70231 0.296004 0.647412 0.489345 45 57.5 1 0.2 +483 1 1 -1 46.559 52.1266 52.9389 -0.688191 0.425325 0.587785 0.489345 45 57.5 1 0.2 +484 1 1 1 46.0368 51.0651 52.8563 -0.792649 0.213023 0.571252 0.489345 45 57.5 1 0.2 +485 1 1 -1 46.0827 51.7308 52.5806 -0.783452 0.346153 0.516121 0.489345 45 57.5 1 0.2 +486 1 1 1 46.2103 52.3421 52.27 -0.757936 0.468429 0.45399 0.489345 45 57.5 1 0.2 +487 1 1 -1 47.73 53.7897 52.3421 -0.45399 0.757936 0.468429 0.489345 45 57.5 1 0.2 +488 1 1 1 47.0611 53.441 52.1266 -0.587785 0.688191 0.425325 0.489345 45 57.5 1 0.2 +489 1 1 -1 47.4194 53.9173 51.7308 -0.516121 0.783452 0.346153 0.489345 45 57.5 1 0.2 +490 1 1 1 46.4645 53.0075 51.8587 -0.707107 0.601501 0.371748 0.489345 45 57.5 1 0.2 +491 1 1 -1 46.7629 53.5116 51.48 -0.647412 0.70231 0.296004 0.489345 45 57.5 1 0.2 +492 1 1 1 47.1437 53.9632 51.0651 -0.571252 0.792649 0.213023 0.489345 45 57.5 1 0.2 +493 1 1 -1 47.1787 52.5669 53.2329 -0.564254 0.513375 0.646578 0.489345 45 57.5 1 0.2 +494 1 1 1 46.7671 52.8213 52.5669 -0.646578 0.564254 0.513375 0.489345 45 57.5 1 0.2 +495 1 1 -1 47.4331 53.2329 52.8213 -0.513375 0.646578 0.564254 0.489345 45 57.5 1 0.2 +496 1 1 1 51.0651 52.8563 53.9632 0.213023 0.571252 0.792649 0.489345 45 57.5 1 0.2 +497 1 1 -1 51.48 53.2371 53.5116 0.296004 0.647412 0.70231 0.489345 45 57.5 1 0.2 +498 1 1 1 51.8587 53.5355 53.0075 0.371748 0.707107 0.601501 0.489345 45 57.5 1 0.2 +499 1 1 -1 52.1266 52.9389 53.441 0.425325 0.587785 0.688191 0.489345 45 57.5 1 0.2 +500 1 1 1 51.7308 52.5806 53.9173 0.346153 0.516121 0.783452 0.489345 45 57.5 1 0.2 +501 1 1 -1 52.3421 52.27 53.7897 0.468429 0.45399 0.757936 0.489345 45 57.5 1 0.2 +502 1 1 1 52.27 53.7897 52.3421 0.45399 0.757936 0.468429 0.489345 45 57.5 1 0.2 +503 1 1 -1 52.5806 53.9173 51.7308 0.516121 0.783452 0.346153 0.489345 45 57.5 1 0.2 +504 1 1 1 52.9389 53.441 52.1266 0.587785 0.688191 0.425325 0.489345 45 57.5 1 0.2 +505 1 1 -1 52.8563 53.9632 51.0651 0.571252 0.792649 0.213023 0.489345 45 57.5 1 0.2 +506 1 1 1 53.2371 53.5116 51.48 0.647412 0.70231 0.296004 0.489345 45 57.5 1 0.2 +507 1 1 -1 53.5355 53.0075 51.8587 0.707107 0.601501 0.371748 0.489345 45 57.5 1 0.2 +508 1 1 1 53.0075 51.8587 53.5355 0.601501 0.371748 0.707107 0.489345 45 57.5 1 0.2 +509 1 1 -1 53.441 52.1266 52.9389 0.688191 0.425325 0.587785 0.489345 45 57.5 1 0.2 +510 1 1 1 53.5116 51.48 53.2371 0.70231 0.296004 0.647412 0.489345 45 57.5 1 0.2 +511 1 1 -1 53.7897 52.3421 52.27 0.757936 0.468429 0.45399 0.489345 45 57.5 1 0.2 +512 1 1 1 53.9173 51.7308 52.5806 0.783452 0.346153 0.516121 0.489345 45 57.5 1 0.2 +513 1 1 -1 53.9632 51.0651 52.8563 0.792649 0.213023 0.571252 0.489345 45 57.5 1 0.2 +514 1 1 1 52.5669 53.2329 52.8213 0.513375 0.646578 0.564254 0.489345 45 57.5 1 0.2 +515 1 1 -1 53.2329 52.8213 52.5669 0.646578 0.564254 0.513375 0.489345 45 57.5 1 0.2 +516 1 1 1 52.8213 52.5669 53.2329 0.564254 0.513375 0.646578 0.489345 45 57.5 1 0.2 +517 1 1 -1 48.9349 52.8563 46.0368 -0.213023 0.571252 -0.792649 0.489345 45 57.5 1 0.2 +518 1 1 1 48.52 53.2371 46.4884 -0.296004 0.647412 -0.70231 0.489345 45 57.5 1 0.2 +519 1 1 -1 48.1413 53.5355 46.9925 -0.371748 0.707107 -0.601501 0.489345 45 57.5 1 0.2 +520 1 1 1 47.8734 52.9389 46.559 -0.425325 0.587785 -0.688191 0.489345 45 57.5 1 0.2 +521 1 1 -1 48.2692 52.5806 46.0827 -0.346153 0.516121 -0.783452 0.489345 45 57.5 1 0.2 +522 1 1 1 47.6579 52.27 46.2103 -0.468429 0.45399 -0.757936 0.489345 45 57.5 1 0.2 +523 1 1 -1 47.73 53.7897 47.6579 -0.45399 0.757936 -0.468429 0.489345 45 57.5 1 0.2 +524 1 1 1 47.4194 53.9173 48.2692 -0.516121 0.783452 -0.346153 0.489345 45 57.5 1 0.2 +525 1 1 -1 47.0611 53.441 47.8734 -0.587785 0.688191 -0.425325 0.489345 45 57.5 1 0.2 +526 1 1 1 47.1437 53.9632 48.9349 -0.571252 0.792649 -0.213023 0.489345 45 57.5 1 0.2 +527 1 1 -1 46.7629 53.5116 48.52 -0.647412 0.70231 -0.296004 0.489345 45 57.5 1 0.2 +528 1 1 1 46.4645 53.0075 48.1413 -0.707107 0.601501 -0.371748 0.489345 45 57.5 1 0.2 +529 1 1 -1 46.9925 51.8587 46.4645 -0.601501 0.371748 -0.707107 0.489345 45 57.5 1 0.2 +530 1 1 1 46.559 52.1266 47.0611 -0.688191 0.425325 -0.587785 0.489345 45 57.5 1 0.2 +531 1 1 -1 46.4884 51.48 46.7629 -0.70231 0.296004 -0.647412 0.489345 45 57.5 1 0.2 +532 1 1 1 46.2103 52.3421 47.73 -0.757936 0.468429 -0.45399 0.489345 45 57.5 1 0.2 +533 1 1 -1 46.0827 51.7308 47.4194 -0.783452 0.346153 -0.516121 0.489345 45 57.5 1 0.2 +534 1 1 1 46.0368 51.0651 47.1437 -0.792649 0.213023 -0.571252 0.489345 45 57.5 1 0.2 +535 1 1 -1 47.4331 53.2329 47.1787 -0.513375 0.646578 -0.564254 0.489345 45 57.5 1 0.2 +536 1 1 1 46.7671 52.8213 47.4331 -0.646578 0.564254 -0.513375 0.489345 45 57.5 1 0.2 +537 1 1 -1 47.1787 52.5669 46.7671 -0.564254 0.513375 -0.646578 0.489345 45 57.5 1 0.2 +538 1 1 1 51.0651 52.8563 46.0368 0.213023 0.571252 -0.792649 0.489345 45 57.5 1 0.2 +539 1 1 -1 51.7308 52.5806 46.0827 0.346153 0.516121 -0.783452 0.489345 45 57.5 1 0.2 +540 1 1 1 52.3421 52.27 46.2103 0.468429 0.45399 -0.757936 0.489345 45 57.5 1 0.2 +541 1 1 -1 52.1266 52.9389 46.559 0.425325 0.587785 -0.688191 0.489345 45 57.5 1 0.2 +542 1 1 1 51.48 53.2371 46.4884 0.296004 0.647412 -0.70231 0.489345 45 57.5 1 0.2 +543 1 1 -1 51.8587 53.5355 46.9925 0.371748 0.707107 -0.601501 0.489345 45 57.5 1 0.2 +544 1 1 1 53.0075 51.8587 46.4645 0.601501 0.371748 -0.707107 0.489345 45 57.5 1 0.2 +545 1 1 -1 53.5116 51.48 46.7629 0.70231 0.296004 -0.647412 0.489345 45 57.5 1 0.2 +546 1 1 1 53.441 52.1266 47.0611 0.688191 0.425325 -0.587785 0.489345 45 57.5 1 0.2 +547 1 1 -1 53.9632 51.0651 47.1437 0.792649 0.213023 -0.571252 0.489345 45 57.5 1 0.2 +548 1 1 1 53.9173 51.7308 47.4194 0.783452 0.346153 -0.516121 0.489345 45 57.5 1 0.2 +549 1 1 -1 53.7897 52.3421 47.73 0.757936 0.468429 -0.45399 0.489345 45 57.5 1 0.2 +550 1 1 1 52.27 53.7897 47.6579 0.45399 0.757936 -0.468429 0.489345 45 57.5 1 0.2 +551 1 1 -1 52.9389 53.441 47.8734 0.587785 0.688191 -0.425325 0.489345 45 57.5 1 0.2 +552 1 1 1 52.5806 53.9173 48.2692 0.516121 0.783452 -0.346153 0.489345 45 57.5 1 0.2 +553 1 1 -1 53.5355 53.0075 48.1413 0.707107 0.601501 -0.371748 0.489345 45 57.5 1 0.2 +554 1 1 1 53.2371 53.5116 48.52 0.647412 0.70231 -0.296004 0.489345 45 57.5 1 0.2 +555 1 1 -1 52.8563 53.9632 48.9349 0.571252 0.792649 -0.213023 0.489345 45 57.5 1 0.2 +556 1 1 1 52.8213 52.5669 46.7671 0.564254 0.513375 -0.646578 0.489345 45 57.5 1 0.2 +557 1 1 -1 53.2329 52.8213 47.4331 0.646578 0.564254 -0.513375 0.489345 45 57.5 1 0.2 +558 1 1 1 52.5669 53.2329 47.1787 0.513375 0.646578 -0.564254 0.489345 45 57.5 1 0.2 +559 1 1 -1 48.9349 47.1437 46.0368 -0.213023 -0.571252 -0.792649 0.489345 45 57.5 1 0.2 +560 1 1 1 48.2692 47.4194 46.0827 -0.346153 -0.516121 -0.783452 0.489345 45 57.5 1 0.2 +561 1 1 -1 47.6579 47.73 46.2103 -0.468429 -0.45399 -0.757936 0.489345 45 57.5 1 0.2 +562 1 1 1 47.8734 47.0611 46.559 -0.425325 -0.587785 -0.688191 0.489345 45 57.5 1 0.2 +563 1 1 -1 48.52 46.7629 46.4884 -0.296004 -0.647412 -0.70231 0.489345 45 57.5 1 0.2 +564 1 1 1 48.1413 46.4645 46.9925 -0.371748 -0.707107 -0.601501 0.489345 45 57.5 1 0.2 +565 1 1 -1 46.9925 48.1413 46.4645 -0.601501 -0.371748 -0.707107 0.489345 45 57.5 1 0.2 +566 1 1 1 46.4884 48.52 46.7629 -0.70231 -0.296004 -0.647412 0.489345 45 57.5 1 0.2 +567 1 1 -1 46.559 47.8734 47.0611 -0.688191 -0.425325 -0.587785 0.489345 45 57.5 1 0.2 +568 1 1 1 46.0368 48.9349 47.1437 -0.792649 -0.213023 -0.571252 0.489345 45 57.5 1 0.2 +569 1 1 -1 46.0827 48.2692 47.4194 -0.783452 -0.346153 -0.516121 0.489345 45 57.5 1 0.2 +570 1 1 1 46.2103 47.6579 47.73 -0.757936 -0.468429 -0.45399 0.489345 45 57.5 1 0.2 +571 1 1 -1 47.73 46.2103 47.6579 -0.45399 -0.757936 -0.468429 0.489345 45 57.5 1 0.2 +572 1 1 1 47.0611 46.559 47.8734 -0.587785 -0.688191 -0.425325 0.489345 45 57.5 1 0.2 +573 1 1 -1 47.4194 46.0827 48.2692 -0.516121 -0.783452 -0.346153 0.489345 45 57.5 1 0.2 +574 1 1 1 46.4645 46.9925 48.1413 -0.707107 -0.601501 -0.371748 0.489345 45 57.5 1 0.2 +575 1 1 -1 46.7629 46.4884 48.52 -0.647412 -0.70231 -0.296004 0.489345 45 57.5 1 0.2 +576 1 1 1 47.1437 46.0368 48.9349 -0.571252 -0.792649 -0.213023 0.489345 45 57.5 1 0.2 +577 1 1 -1 47.1787 47.4331 46.7671 -0.564254 -0.513375 -0.646578 0.489345 45 57.5 1 0.2 +578 1 1 1 46.7671 47.1787 47.4331 -0.646578 -0.564254 -0.513375 0.489345 45 57.5 1 0.2 +579 1 1 -1 47.4331 46.7671 47.1787 -0.513375 -0.646578 -0.564254 0.489345 45 57.5 1 0.2 +580 1 1 1 51.0651 47.1437 46.0368 0.213023 -0.571252 -0.792649 0.489345 45 57.5 1 0.2 +581 1 1 -1 51.48 46.7629 46.4884 0.296004 -0.647412 -0.70231 0.489345 45 57.5 1 0.2 +582 1 1 1 51.8587 46.4645 46.9925 0.371748 -0.707107 -0.601501 0.489345 45 57.5 1 0.2 +583 1 1 -1 52.1266 47.0611 46.559 0.425325 -0.587785 -0.688191 0.489345 45 57.5 1 0.2 +584 1 1 1 51.7308 47.4194 46.0827 0.346153 -0.516121 -0.783452 0.489345 45 57.5 1 0.2 +585 1 1 -1 52.3421 47.73 46.2103 0.468429 -0.45399 -0.757936 0.489345 45 57.5 1 0.2 +586 1 1 1 52.27 46.2103 47.6579 0.45399 -0.757936 -0.468429 0.489345 45 57.5 1 0.2 +587 1 1 -1 52.5806 46.0827 48.2692 0.516121 -0.783452 -0.346153 0.489345 45 57.5 1 0.2 +588 1 1 1 52.9389 46.559 47.8734 0.587785 -0.688191 -0.425325 0.489345 45 57.5 1 0.2 +589 1 1 -1 52.8563 46.0368 48.9349 0.571252 -0.792649 -0.213023 0.489345 45 57.5 1 0.2 +590 1 1 1 53.2371 46.4884 48.52 0.647412 -0.70231 -0.296004 0.489345 45 57.5 1 0.2 +591 1 1 -1 53.5355 46.9925 48.1413 0.707107 -0.601501 -0.371748 0.489345 45 57.5 1 0.2 +592 1 1 1 53.0075 48.1413 46.4645 0.601501 -0.371748 -0.707107 0.489345 45 57.5 1 0.2 +593 1 1 -1 53.441 47.8734 47.0611 0.688191 -0.425325 -0.587785 0.489345 45 57.5 1 0.2 +594 1 1 1 53.5116 48.52 46.7629 0.70231 -0.296004 -0.647412 0.489345 45 57.5 1 0.2 +595 1 1 -1 53.7897 47.6579 47.73 0.757936 -0.468429 -0.45399 0.489345 45 57.5 1 0.2 +596 1 1 1 53.9173 48.2692 47.4194 0.783452 -0.346153 -0.516121 0.489345 45 57.5 1 0.2 +597 1 1 -1 53.9632 48.9349 47.1437 0.792649 -0.213023 -0.571252 0.489345 45 57.5 1 0.2 +598 1 1 1 52.5669 46.7671 47.1787 0.513375 -0.646578 -0.564254 0.489345 45 57.5 1 0.2 +599 1 1 -1 53.2329 47.1787 47.4331 0.646578 -0.564254 -0.513375 0.489345 45 57.5 1 0.2 +600 1 1 1 52.8213 47.4331 46.7671 0.564254 -0.513375 -0.646578 0.489345 45 57.5 1 0.2 +601 1 1 -1 48.9349 47.1437 53.9632 -0.213023 -0.571252 0.792649 0.489345 45 57.5 1 0.2 +602 1 1 1 48.52 46.7629 53.5116 -0.296004 -0.647412 0.70231 0.489345 45 57.5 1 0.2 +603 1 1 -1 48.1413 46.4645 53.0075 -0.371748 -0.707107 0.601501 0.489345 45 57.5 1 0.2 +604 1 1 1 47.8734 47.0611 53.441 -0.425325 -0.587785 0.688191 0.489345 45 57.5 1 0.2 +605 1 1 -1 48.2692 47.4194 53.9173 -0.346153 -0.516121 0.783452 0.489345 45 57.5 1 0.2 +606 1 1 1 47.6579 47.73 53.7897 -0.468429 -0.45399 0.757936 0.489345 45 57.5 1 0.2 +607 1 1 -1 47.73 46.2103 52.3421 -0.45399 -0.757936 0.468429 0.489345 45 57.5 1 0.2 +608 1 1 1 47.4194 46.0827 51.7308 -0.516121 -0.783452 0.346153 0.489345 45 57.5 1 0.2 +609 1 1 -1 47.0611 46.559 52.1266 -0.587785 -0.688191 0.425325 0.489345 45 57.5 1 0.2 +610 1 1 1 47.1437 46.0368 51.0651 -0.571252 -0.792649 0.213023 0.489345 45 57.5 1 0.2 +611 1 1 -1 46.7629 46.4884 51.48 -0.647412 -0.70231 0.296004 0.489345 45 57.5 1 0.2 +612 1 1 1 46.4645 46.9925 51.8587 -0.707107 -0.601501 0.371748 0.489345 45 57.5 1 0.2 +613 1 1 -1 46.9925 48.1413 53.5355 -0.601501 -0.371748 0.707107 0.489345 45 57.5 1 0.2 +614 1 1 1 46.559 47.8734 52.9389 -0.688191 -0.425325 0.587785 0.489345 45 57.5 1 0.2 +615 1 1 -1 46.4884 48.52 53.2371 -0.70231 -0.296004 0.647412 0.489345 45 57.5 1 0.2 +616 1 1 1 46.2103 47.6579 52.27 -0.757936 -0.468429 0.45399 0.489345 45 57.5 1 0.2 +617 1 1 -1 46.0827 48.2692 52.5806 -0.783452 -0.346153 0.516121 0.489345 45 57.5 1 0.2 +618 1 1 1 46.0368 48.9349 52.8563 -0.792649 -0.213023 0.571252 0.489345 45 57.5 1 0.2 +619 1 1 -1 47.4331 46.7671 52.8213 -0.513375 -0.646578 0.564254 0.489345 45 57.5 1 0.2 +620 1 1 1 46.7671 47.1787 52.5669 -0.646578 -0.564254 0.513375 0.489345 45 57.5 1 0.2 +621 1 1 -1 47.1787 47.4331 53.2329 -0.564254 -0.513375 0.646578 0.489345 45 57.5 1 0.2 +622 1 1 1 51.0651 47.1437 53.9632 0.213023 -0.571252 0.792649 0.489345 45 57.5 1 0.2 +623 1 1 -1 51.7308 47.4194 53.9173 0.346153 -0.516121 0.783452 0.489345 45 57.5 1 0.2 +624 1 1 1 52.3421 47.73 53.7897 0.468429 -0.45399 0.757936 0.489345 45 57.5 1 0.2 +625 1 1 -1 52.1266 47.0611 53.441 0.425325 -0.587785 0.688191 0.489345 45 57.5 1 0.2 +626 1 1 1 51.48 46.7629 53.5116 0.296004 -0.647412 0.70231 0.489345 45 57.5 1 0.2 +627 1 1 -1 51.8587 46.4645 53.0075 0.371748 -0.707107 0.601501 0.489345 45 57.5 1 0.2 +628 1 1 1 53.0075 48.1413 53.5355 0.601501 -0.371748 0.707107 0.489345 45 57.5 1 0.2 +629 1 1 -1 53.5116 48.52 53.2371 0.70231 -0.296004 0.647412 0.489345 45 57.5 1 0.2 +630 1 1 1 53.441 47.8734 52.9389 0.688191 -0.425325 0.587785 0.489345 45 57.5 1 0.2 +631 1 1 -1 53.9632 48.9349 52.8563 0.792649 -0.213023 0.571252 0.489345 45 57.5 1 0.2 +632 1 1 1 53.9173 48.2692 52.5806 0.783452 -0.346153 0.516121 0.489345 45 57.5 1 0.2 +633 1 1 -1 53.7897 47.6579 52.27 0.757936 -0.468429 0.45399 0.489345 45 57.5 1 0.2 +634 1 1 1 52.27 46.2103 52.3421 0.45399 -0.757936 0.468429 0.489345 45 57.5 1 0.2 +635 1 1 -1 52.9389 46.559 52.1266 0.587785 -0.688191 0.425325 0.489345 45 57.5 1 0.2 +636 1 1 1 52.5806 46.0827 51.7308 0.516121 -0.783452 0.346153 0.489345 45 57.5 1 0.2 +637 1 1 -1 53.5355 46.9925 51.8587 0.707107 -0.601501 0.371748 0.489345 45 57.5 1 0.2 +638 1 1 1 53.2371 46.4884 51.48 0.647412 -0.70231 0.296004 0.489345 45 57.5 1 0.2 +639 1 1 -1 52.8563 46.0368 51.0651 0.571252 -0.792649 0.213023 0.489345 45 57.5 1 0.2 +640 1 1 1 52.8213 47.4331 53.2329 0.564254 -0.513375 0.646578 0.489345 45 57.5 1 0.2 +641 1 1 -1 53.2329 47.1787 52.5669 0.646578 -0.564254 0.513375 0.489345 45 57.5 1 0.2 +642 1 1 1 52.5669 46.7671 52.8213 0.513375 -0.646578 0.564254 0.489345 45 57.5 1 0.2 +643 2 2 1 50 50 57 0 0 1 0.489345 45 57.5 80 0 diff --git a/examples/PACKAGES/dielectric/in.nopbc b/examples/PACKAGES/dielectric/in.nopbc index cbb0d45377..724ad8456a 100644 --- a/examples/PACKAGES/dielectric/in.nopbc +++ b/examples/PACKAGES/dielectric/in.nopbc @@ -18,7 +18,7 @@ read_data ${data} group interface type 1 group ions type 2 3 -pair_style lj/cut/coul/cut/dielectric 1.122 20.0 +pair_style lj/cut/coul/cut/dielectric 1.122 12.0 pair_coeff * * 1.0 1.0 pair_coeff 1 1 0.0 1.0 @@ -27,7 +27,7 @@ neigh_modify one 5000 #compute ef all efield/atom #dump 1 all custom 100 all.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] # -#dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] #dump_modify 1 sort id fix 1 ions nve diff --git a/src/DIELECTRIC/fix_polarize_functional.cpp b/src/DIELECTRIC/fix_polarize_functional.cpp index d751bcd6ce..a0dc034818 100644 --- a/src/DIELECTRIC/fix_polarize_functional.cpp +++ b/src/DIELECTRIC/fix_polarize_functional.cpp @@ -502,11 +502,11 @@ int FixPolarizeFunctional::modify_param(int narg, char **arg) int set_charge = 0; double ediff = utils::numeric(FLERR, arg[iarg + 1], false, lmp); double emean = utils::numeric(FLERR, arg[iarg + 2], false, lmp); - if (strcmp(arg[iarg + 3], "nullptr") != 0) + if (strcmp(arg[iarg + 3], "NULL") != 0) epsiloni = utils::numeric(FLERR, arg[iarg + 3], false, lmp); - if (strcmp(arg[iarg + 4], "nullptr") != 0) + if (strcmp(arg[iarg + 4], "NULL") != 0) areai = utils::numeric(FLERR, arg[iarg + 4], false, lmp); - if (strcmp(arg[iarg + 5], "nullptr") != 0) { + if (strcmp(arg[iarg + 5], "NULL") != 0) { q_unscaled = utils::numeric(FLERR, arg[iarg + 5], false, lmp); set_charge = 1; } From b65623ef1fa281c15d13cb40dfa7eac945216eec Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Tue, 7 Mar 2023 11:57:49 -0600 Subject: [PATCH 368/445] Added back comments to data.sphere --- examples/PACKAGES/dielectric/data.sphere | 1288 +++++++++++----------- 1 file changed, 644 insertions(+), 644 deletions(-) diff --git a/examples/PACKAGES/dielectric/data.sphere b/examples/PACKAGES/dielectric/data.sphere index ede3849635..0c22c2d560 100644 --- a/examples/PACKAGES/dielectric/data.sphere +++ b/examples/PACKAGES/dielectric/data.sphere @@ -1,4 +1,4 @@ -LAMMPS data file: sphere radius = 5; ion distance to center = 7, epsilon inside = 35 outside = 80 +LAMMPS data file: a single ion near a dielectric sphere (radius = 5); ion distance to sphere center = 7; epsilon inside sphere = 35 outside = 80 643 atoms 3 atom types @@ -14,648 +14,648 @@ Masses 2 1 3 1 -Atoms # dielectric +Atoms # dielectric: id mol type q x y z normx normy normz area_per_patch ed em epsilon mean_curvature -1 1 1 -1 50 52.6287 45.7467 0 0.525731 -0.850651 0.489345 45 57.5 1 0.2 -2 1 1 1 50.4054 53.0782 46.0808 0.0810867 0.615642 -0.783843 0.489345 45 57.5 1 0.2 -3 1 1 -1 49.5946 53.0782 46.0808 -0.0810867 0.615642 -0.783843 0.489345 45 57.5 1 0.2 -4 1 1 1 50.8031 53.4689 46.4898 0.160622 0.693781 -0.702046 0.489345 45 57.5 1 0.2 -5 1 1 -1 50 53.5145 46.4436 0 0.702907 -0.711282 0.489345 45 57.5 1 0.2 -6 1 1 1 49.1969 53.4689 46.4898 -0.160622 0.693781 -0.702046 0.489345 45 57.5 1 0.2 -7 1 1 -1 51.1854 53.7933 46.9659 0.237086 0.758653 -0.606824 0.489345 45 57.5 1 0.2 -8 1 1 1 50.4057 53.901 46.8988 0.0811424 0.780205 -0.620239 0.489345 45 57.5 1 0.2 -9 1 1 -1 51.5451 54.0451 47.5 0.309017 0.809017 -0.499999 0.489345 45 57.5 1 0.2 -10 1 1 1 50.7822 54.2009 47.4037 0.156435 0.840178 -0.519258 0.489345 45 57.5 1 0.2 -11 1 1 -1 50 54.2533 47.3713 0 0.850651 -0.52573 0.489345 45 57.5 1 0.2 -12 1 1 1 49.5943 53.901 46.8988 -0.0811424 0.780205 -0.620239 0.489345 45 57.5 1 0.2 -13 1 1 -1 48.8146 53.7933 46.9659 -0.237086 0.758653 -0.606824 0.489345 45 57.5 1 0.2 -14 1 1 1 49.2178 54.2009 47.4037 -0.156435 0.840178 -0.519258 0.489345 45 57.5 1 0.2 -15 1 1 -1 48.4549 54.0451 47.5 -0.309017 0.809017 -0.499999 0.489345 45 57.5 1 0.2 -16 1 1 1 51.8752 54.2196 48.0819 0.375038 0.843912 -0.383614 0.489345 45 57.5 1 0.2 -17 1 1 -1 51.1934 54.455 48.0691 0.238678 0.891006 -0.386187 0.489345 45 57.5 1 0.2 -18 1 1 1 52.1694 54.3133 48.7005 0.433888 0.862669 -0.259892 0.489345 45 57.5 1 0.2 -19 1 1 -1 51.5063 54.5812 48.6796 0.301259 0.916244 -0.264082 0.489345 45 57.5 1 0.2 -20 1 1 1 50.8123 54.7553 48.6857 0.16246 0.951056 -0.262865 0.489345 45 57.5 1 0.2 -21 1 1 -1 52.4222 54.3246 49.344 0.484441 0.864929 -0.1312 0.489345 45 57.5 1 0.2 -22 1 1 1 51.7911 54.6215 49.3417 0.358229 0.924304 -0.131656 0.489345 45 57.5 1 0.2 -23 1 1 -1 52.6287 54.2533 50 0.525731 0.850651 0 0.489345 45 57.5 1 0.2 -24 1 1 1 52.0168 54.5752 50 0.403355 0.915043 0 0.489345 45 57.5 1 0.2 -25 1 1 -1 51.3663 54.8097 50 0.273267 0.961938 0 0.489345 45 57.5 1 0.2 -26 1 1 1 51.1006 54.832 49.336 0.220117 0.966393 -0.132793 0.489345 45 57.5 1 0.2 -27 1 1 -1 50.4112 54.9384 49.3346 0.0822426 0.987688 -0.133071 0.489345 45 57.5 1 0.2 -28 1 1 1 50.6898 54.9522 50 0.137952 0.990439 0 0.489345 45 57.5 1 0.2 -29 1 1 -1 50 55 50 0 1 0 0.489345 45 57.5 1 0.2 -30 1 1 1 48.8066 54.455 48.0691 -0.238678 0.891006 -0.386187 0.489345 45 57.5 1 0.2 -31 1 1 -1 48.1248 54.2196 48.0819 -0.375038 0.843912 -0.383614 0.489345 45 57.5 1 0.2 -32 1 1 1 49.1877 54.7553 48.6857 -0.16246 0.951056 -0.262865 0.489345 45 57.5 1 0.2 -33 1 1 -1 48.4937 54.5812 48.6796 -0.301259 0.916244 -0.264082 0.489345 45 57.5 1 0.2 -34 1 1 1 47.8306 54.3133 48.7005 -0.433888 0.862669 -0.259892 0.489345 45 57.5 1 0.2 -35 1 1 -1 49.5888 54.9384 49.3346 -0.0822426 0.987688 -0.133071 0.489345 45 57.5 1 0.2 -36 1 1 1 48.8994 54.832 49.336 -0.220117 0.966393 -0.132793 0.489345 45 57.5 1 0.2 -37 1 1 -1 49.3102 54.9522 50 -0.137952 0.990439 0 0.489345 45 57.5 1 0.2 -38 1 1 1 48.6337 54.8097 50 -0.273267 0.961938 0 0.489345 45 57.5 1 0.2 -39 1 1 -1 48.2089 54.6215 49.3417 -0.358229 0.924304 -0.131656 0.489345 45 57.5 1 0.2 -40 1 1 1 47.5778 54.3246 49.344 -0.484441 0.864929 -0.1312 0.489345 45 57.5 1 0.2 -41 1 1 -1 47.9832 54.5752 50 -0.403355 0.915043 0 0.489345 45 57.5 1 0.2 -42 1 1 1 47.3713 54.2533 50 -0.525731 0.850651 0 0.489345 45 57.5 1 0.2 -43 1 1 -1 50.4116 54.5649 48.002 0.0823234 0.912983 -0.399606 0.489345 45 57.5 1 0.2 -44 1 1 1 50 54.8193 48.668 0 0.963861 -0.266405 0.489345 45 57.5 1 0.2 -45 1 1 -1 49.5884 54.5649 48.002 -0.0823234 0.912983 -0.399606 0.489345 45 57.5 1 0.2 -46 1 1 1 50 52.6287 54.2533 0 0.525731 0.850651 0.489345 45 57.5 1 0.2 -47 1 1 -1 49.5946 53.0782 53.9192 -0.0810867 0.615642 0.783843 0.489345 45 57.5 1 0.2 -48 1 1 1 50.4054 53.0782 53.9192 0.0810867 0.615642 0.783843 0.489345 45 57.5 1 0.2 -49 1 1 -1 49.1969 53.4689 53.5102 -0.160622 0.693781 0.702046 0.489345 45 57.5 1 0.2 -50 1 1 1 50 53.5145 53.5564 0 0.702907 0.711282 0.489345 45 57.5 1 0.2 -51 1 1 -1 50.8031 53.4689 53.5102 0.160622 0.693781 0.702046 0.489345 45 57.5 1 0.2 -52 1 1 1 48.8146 53.7933 53.0341 -0.237086 0.758653 0.606824 0.489345 45 57.5 1 0.2 -53 1 1 -1 49.5943 53.901 53.1012 -0.0811424 0.780205 0.620239 0.489345 45 57.5 1 0.2 -54 1 1 1 48.4549 54.0451 52.5 -0.309017 0.809017 0.499999 0.489345 45 57.5 1 0.2 -55 1 1 -1 49.2178 54.2009 52.5963 -0.156435 0.840178 0.519258 0.489345 45 57.5 1 0.2 -56 1 1 1 50 54.2533 52.6287 0 0.850651 0.52573 0.489345 45 57.5 1 0.2 -57 1 1 -1 50.4057 53.901 53.1012 0.0811424 0.780205 0.620239 0.489345 45 57.5 1 0.2 -58 1 1 1 51.1854 53.7933 53.0341 0.237086 0.758653 0.606824 0.489345 45 57.5 1 0.2 -59 1 1 -1 50.7822 54.2009 52.5963 0.156435 0.840178 0.519258 0.489345 45 57.5 1 0.2 -60 1 1 1 51.5451 54.0451 52.5 0.309017 0.809017 0.499999 0.489345 45 57.5 1 0.2 -61 1 1 -1 48.1248 54.2196 51.9181 -0.375038 0.843912 0.383614 0.489345 45 57.5 1 0.2 -62 1 1 1 48.8066 54.455 51.9309 -0.238678 0.891006 0.386187 0.489345 45 57.5 1 0.2 -63 1 1 -1 47.8306 54.3133 51.2995 -0.433888 0.862669 0.259892 0.489345 45 57.5 1 0.2 -64 1 1 1 48.4937 54.5812 51.3204 -0.301259 0.916244 0.264082 0.489345 45 57.5 1 0.2 -65 1 1 -1 49.1877 54.7553 51.3143 -0.16246 0.951056 0.262865 0.489345 45 57.5 1 0.2 -66 1 1 1 47.5778 54.3246 50.656 -0.484441 0.864929 0.1312 0.489345 45 57.5 1 0.2 -67 1 1 -1 48.2089 54.6215 50.6583 -0.358229 0.924304 0.131656 0.489345 45 57.5 1 0.2 -68 1 1 1 48.8994 54.832 50.664 -0.220117 0.966393 0.132793 0.489345 45 57.5 1 0.2 -69 1 1 -1 49.5888 54.9384 50.6654 -0.0822426 0.987688 0.133071 0.489345 45 57.5 1 0.2 -70 1 1 1 51.1934 54.455 51.9309 0.238678 0.891006 0.386187 0.489345 45 57.5 1 0.2 -71 1 1 -1 51.8752 54.2196 51.9181 0.375038 0.843912 0.383614 0.489345 45 57.5 1 0.2 -72 1 1 1 50.8123 54.7553 51.3143 0.16246 0.951056 0.262865 0.489345 45 57.5 1 0.2 -73 1 1 -1 51.5063 54.5812 51.3204 0.301259 0.916244 0.264082 0.489345 45 57.5 1 0.2 -74 1 1 1 52.1694 54.3133 51.2995 0.433888 0.862669 0.259892 0.489345 45 57.5 1 0.2 -75 1 1 -1 50.4112 54.9384 50.6654 0.0822426 0.987688 0.133071 0.489345 45 57.5 1 0.2 -76 1 1 1 51.1006 54.832 50.664 0.220117 0.966393 0.132793 0.489345 45 57.5 1 0.2 -77 1 1 -1 51.7911 54.6215 50.6583 0.358229 0.924304 0.131656 0.489345 45 57.5 1 0.2 -78 1 1 1 52.4222 54.3246 50.656 0.484441 0.864929 0.1312 0.489345 45 57.5 1 0.2 -79 1 1 -1 49.5884 54.5649 51.998 -0.0823234 0.912983 0.399606 0.489345 45 57.5 1 0.2 -80 1 1 1 50 54.8193 51.332 0 0.963861 0.266405 0.489345 45 57.5 1 0.2 -81 1 1 -1 50.4116 54.5649 51.998 0.0823234 0.912983 0.399606 0.489345 45 57.5 1 0.2 -82 1 1 1 50 52.0168 54.5752 0 0.403355 0.915043 0.489345 45 57.5 1 0.2 -83 1 1 -1 49.344 52.4222 54.3246 -0.1312 0.484441 0.864929 0.489345 45 57.5 1 0.2 -84 1 1 1 50 51.3663 54.8097 0 0.273267 0.961938 0.489345 45 57.5 1 0.2 -85 1 1 -1 49.3417 51.7911 54.6215 -0.131656 0.358229 0.924304 0.489345 45 57.5 1 0.2 -86 1 1 1 48.7005 52.1694 54.3133 -0.259892 0.433888 0.862669 0.489345 45 57.5 1 0.2 -87 1 1 -1 50 50.6898 54.9522 0 0.137952 0.990439 0.489345 45 57.5 1 0.2 -88 1 1 1 49.336 51.1006 54.832 -0.132793 0.220117 0.966393 0.489345 45 57.5 1 0.2 -89 1 1 -1 50 50 55 0 0 1 0.489345 45 57.5 1 0.2 -90 1 1 1 49.3346 50.4112 54.9384 -0.133071 0.0822426 0.987688 0.489345 45 57.5 1 0.2 -91 1 1 -1 48.6857 50.8123 54.7553 -0.262865 0.16246 0.951056 0.489345 45 57.5 1 0.2 -92 1 1 1 48.6796 51.5063 54.5812 -0.264082 0.301259 0.916244 0.489345 45 57.5 1 0.2 -93 1 1 -1 48.0819 51.8752 54.2196 -0.383614 0.375038 0.843912 0.489345 45 57.5 1 0.2 -94 1 1 1 48.0691 51.1934 54.455 -0.386187 0.238678 0.891006 0.489345 45 57.5 1 0.2 -95 1 1 -1 47.5 51.5451 54.0451 -0.499999 0.309017 0.809017 0.489345 45 57.5 1 0.2 -96 1 1 1 50 49.3102 54.9522 0 -0.137952 0.990439 0.489345 45 57.5 1 0.2 -97 1 1 -1 49.3346 49.5888 54.9384 -0.133071 -0.0822426 0.987688 0.489345 45 57.5 1 0.2 -98 1 1 1 50 48.6337 54.8097 0 -0.273267 0.961938 0.489345 45 57.5 1 0.2 -99 1 1 -1 49.336 48.8994 54.832 -0.132793 -0.220117 0.966393 0.489345 45 57.5 1 0.2 -100 1 1 1 48.6857 49.1877 54.7553 -0.262865 -0.16246 0.951056 0.489345 45 57.5 1 0.2 -101 1 1 -1 50 47.9832 54.5752 0 -0.403355 0.915043 0.489345 45 57.5 1 0.2 -102 1 1 1 49.3417 48.2089 54.6215 -0.131656 -0.358229 0.924304 0.489345 45 57.5 1 0.2 -103 1 1 -1 50 47.3713 54.2533 0 -0.525731 0.850651 0.489345 45 57.5 1 0.2 -104 1 1 1 49.344 47.5778 54.3246 -0.1312 -0.484441 0.864929 0.489345 45 57.5 1 0.2 -105 1 1 -1 48.7005 47.8306 54.3133 -0.259892 -0.433888 0.862669 0.489345 45 57.5 1 0.2 -106 1 1 1 48.6796 48.4937 54.5812 -0.264082 -0.301259 0.916244 0.489345 45 57.5 1 0.2 -107 1 1 -1 48.0691 48.8066 54.455 -0.386187 -0.238678 0.891006 0.489345 45 57.5 1 0.2 -108 1 1 1 48.0819 48.1248 54.2196 -0.383614 -0.375038 0.843912 0.489345 45 57.5 1 0.2 -109 1 1 -1 47.5 48.4549 54.0451 -0.499999 -0.309017 0.809017 0.489345 45 57.5 1 0.2 -110 1 1 1 47.4037 50.7822 54.2009 -0.519258 0.156435 0.840178 0.489345 45 57.5 1 0.2 -111 1 1 -1 46.9659 51.1854 53.7933 -0.606824 0.237086 0.758653 0.489345 45 57.5 1 0.2 -112 1 1 1 47.3713 50 54.2533 -0.52573 0 0.850651 0.489345 45 57.5 1 0.2 -113 1 1 -1 46.8988 50.4057 53.901 -0.620239 0.0811424 0.780205 0.489345 45 57.5 1 0.2 -114 1 1 1 46.4898 50.8031 53.4689 -0.702046 0.160622 0.693781 0.489345 45 57.5 1 0.2 -115 1 1 -1 47.4037 49.2178 54.2009 -0.519258 -0.156435 0.840178 0.489345 45 57.5 1 0.2 -116 1 1 1 46.8988 49.5943 53.901 -0.620239 -0.0811424 0.780205 0.489345 45 57.5 1 0.2 -117 1 1 -1 46.9659 48.8146 53.7933 -0.606824 -0.237086 0.758653 0.489345 45 57.5 1 0.2 -118 1 1 1 46.4898 49.1969 53.4689 -0.702046 -0.160622 0.693781 0.489345 45 57.5 1 0.2 -119 1 1 -1 46.4436 50 53.5145 -0.711282 0 0.702907 0.489345 45 57.5 1 0.2 -120 1 1 1 46.0808 50.4054 53.0782 -0.783843 0.0810867 0.615642 0.489345 45 57.5 1 0.2 -121 1 1 -1 46.0808 49.5946 53.0782 -0.783843 -0.0810867 0.615642 0.489345 45 57.5 1 0.2 -122 1 1 1 45.7467 50 52.6287 -0.850651 0 0.525731 0.489345 45 57.5 1 0.2 -123 1 1 -1 48.668 50 54.8193 -0.266405 0 0.963861 0.489345 45 57.5 1 0.2 -124 1 1 1 48.002 49.5884 54.5649 -0.399606 -0.0823234 0.912983 0.489345 45 57.5 1 0.2 -125 1 1 -1 48.002 50.4116 54.5649 -0.399606 0.0823234 0.912983 0.489345 45 57.5 1 0.2 -126 1 1 1 50.656 52.4222 54.3246 0.1312 0.484441 0.864929 0.489345 45 57.5 1 0.2 -127 1 1 -1 51.2995 52.1694 54.3133 0.259892 0.433888 0.862669 0.489345 45 57.5 1 0.2 -128 1 1 1 50.6583 51.7911 54.6215 0.131656 0.358229 0.924304 0.489345 45 57.5 1 0.2 -129 1 1 -1 51.9181 51.8752 54.2196 0.383614 0.375038 0.843912 0.489345 45 57.5 1 0.2 -130 1 1 1 51.3204 51.5063 54.5812 0.264082 0.301259 0.916244 0.489345 45 57.5 1 0.2 -131 1 1 -1 52.5 51.5451 54.0451 0.499999 0.309017 0.809017 0.489345 45 57.5 1 0.2 -132 1 1 1 51.9309 51.1934 54.455 0.386187 0.238678 0.891006 0.489345 45 57.5 1 0.2 -133 1 1 -1 51.3143 50.8123 54.7553 0.262865 0.16246 0.951056 0.489345 45 57.5 1 0.2 -134 1 1 1 50.664 51.1006 54.832 0.132793 0.220117 0.966393 0.489345 45 57.5 1 0.2 -135 1 1 -1 50.6654 50.4112 54.9384 0.133071 0.0822426 0.987688 0.489345 45 57.5 1 0.2 -136 1 1 1 53.0341 51.1854 53.7933 0.606824 0.237086 0.758653 0.489345 45 57.5 1 0.2 -137 1 1 -1 52.5963 50.7822 54.2009 0.519258 0.156435 0.840178 0.489345 45 57.5 1 0.2 -138 1 1 1 53.5102 50.8031 53.4689 0.702046 0.160622 0.693781 0.489345 45 57.5 1 0.2 -139 1 1 -1 53.1012 50.4057 53.901 0.620239 0.0811424 0.780205 0.489345 45 57.5 1 0.2 -140 1 1 1 52.6287 50 54.2533 0.52573 0 0.850651 0.489345 45 57.5 1 0.2 -141 1 1 -1 53.9192 50.4054 53.0782 0.783843 0.0810867 0.615642 0.489345 45 57.5 1 0.2 -142 1 1 1 53.5564 50 53.5145 0.711282 0 0.702907 0.489345 45 57.5 1 0.2 -143 1 1 -1 54.2533 50 52.6287 0.850651 0 0.525731 0.489345 45 57.5 1 0.2 -144 1 1 1 53.9192 49.5946 53.0782 0.783843 -0.0810867 0.615642 0.489345 45 57.5 1 0.2 -145 1 1 -1 53.5102 49.1969 53.4689 0.702046 -0.160622 0.693781 0.489345 45 57.5 1 0.2 -146 1 1 1 53.1012 49.5943 53.901 0.620239 -0.0811424 0.780205 0.489345 45 57.5 1 0.2 -147 1 1 -1 52.5963 49.2178 54.2009 0.519258 -0.156435 0.840178 0.489345 45 57.5 1 0.2 -148 1 1 1 53.0341 48.8146 53.7933 0.606824 -0.237086 0.758653 0.489345 45 57.5 1 0.2 -149 1 1 -1 52.5 48.4549 54.0451 0.499999 -0.309017 0.809017 0.489345 45 57.5 1 0.2 -150 1 1 1 50.6654 49.5888 54.9384 0.133071 -0.0822426 0.987688 0.489345 45 57.5 1 0.2 -151 1 1 -1 51.3143 49.1877 54.7553 0.262865 -0.16246 0.951056 0.489345 45 57.5 1 0.2 -152 1 1 1 50.664 48.8994 54.832 0.132793 -0.220117 0.966393 0.489345 45 57.5 1 0.2 -153 1 1 -1 51.9309 48.8066 54.455 0.386187 -0.238678 0.891006 0.489345 45 57.5 1 0.2 -154 1 1 1 51.3204 48.4937 54.5812 0.264082 -0.301259 0.916244 0.489345 45 57.5 1 0.2 -155 1 1 -1 51.9181 48.1248 54.2196 0.383614 -0.375038 0.843912 0.489345 45 57.5 1 0.2 -156 1 1 1 51.2995 47.8306 54.3133 0.259892 -0.433888 0.862669 0.489345 45 57.5 1 0.2 -157 1 1 -1 50.6583 48.2089 54.6215 0.131656 -0.358229 0.924304 0.489345 45 57.5 1 0.2 -158 1 1 1 50.656 47.5778 54.3246 0.1312 -0.484441 0.864929 0.489345 45 57.5 1 0.2 -159 1 1 -1 51.998 50.4116 54.5649 0.399606 0.0823234 0.912983 0.489345 45 57.5 1 0.2 -160 1 1 1 51.998 49.5884 54.5649 0.399606 -0.0823234 0.912983 0.489345 45 57.5 1 0.2 -161 1 1 -1 51.332 50 54.8193 0.266405 0 0.963861 0.489345 45 57.5 1 0.2 -162 1 1 1 50 52.0168 45.4248 0 0.403355 -0.915043 0.489345 45 57.5 1 0.2 -163 1 1 -1 50.656 52.4222 45.6754 0.1312 0.484441 -0.864929 0.489345 45 57.5 1 0.2 -164 1 1 1 50 51.3663 45.1903 0 0.273267 -0.961938 0.489345 45 57.5 1 0.2 -165 1 1 -1 50.6583 51.7911 45.3785 0.131656 0.358229 -0.924304 0.489345 45 57.5 1 0.2 -166 1 1 1 51.2995 52.1694 45.6867 0.259892 0.433888 -0.862669 0.489345 45 57.5 1 0.2 -167 1 1 -1 50 50.6898 45.0478 0 0.137952 -0.990439 0.489345 45 57.5 1 0.2 -168 1 1 1 50.664 51.1006 45.168 0.132793 0.220117 -0.966393 0.489345 45 57.5 1 0.2 -169 1 1 -1 50 50 45 0 0 -1 0.489345 45 57.5 1 0.2 -170 1 1 1 50.6654 50.4112 45.0616 0.133071 0.0822426 -0.987688 0.489345 45 57.5 1 0.2 -171 1 1 -1 51.3143 50.8123 45.2447 0.262865 0.16246 -0.951056 0.489345 45 57.5 1 0.2 -172 1 1 1 51.3204 51.5063 45.4188 0.264082 0.301259 -0.916244 0.489345 45 57.5 1 0.2 -173 1 1 -1 51.9181 51.8752 45.7804 0.383614 0.375038 -0.843912 0.489345 45 57.5 1 0.2 -174 1 1 1 51.9309 51.1934 45.545 0.386187 0.238678 -0.891006 0.489345 45 57.5 1 0.2 -175 1 1 -1 52.5 51.5451 45.9549 0.499999 0.309017 -0.809017 0.489345 45 57.5 1 0.2 -176 1 1 1 50 49.3102 45.0478 0 -0.137952 -0.990439 0.489345 45 57.5 1 0.2 -177 1 1 -1 50.6654 49.5888 45.0616 0.133071 -0.0822426 -0.987688 0.489345 45 57.5 1 0.2 -178 1 1 1 50 48.6337 45.1903 0 -0.273267 -0.961938 0.489345 45 57.5 1 0.2 -179 1 1 -1 50.664 48.8994 45.168 0.132793 -0.220117 -0.966393 0.489345 45 57.5 1 0.2 -180 1 1 1 51.3143 49.1877 45.2447 0.262865 -0.16246 -0.951056 0.489345 45 57.5 1 0.2 -181 1 1 -1 50 47.9832 45.4248 0 -0.403355 -0.915043 0.489345 45 57.5 1 0.2 -182 1 1 1 50.6583 48.2089 45.3785 0.131656 -0.358229 -0.924304 0.489345 45 57.5 1 0.2 -183 1 1 -1 50 47.3713 45.7467 0 -0.525731 -0.850651 0.489345 45 57.5 1 0.2 -184 1 1 1 50.656 47.5778 45.6754 0.1312 -0.484441 -0.864929 0.489345 45 57.5 1 0.2 -185 1 1 -1 51.2995 47.8306 45.6867 0.259892 -0.433888 -0.862669 0.489345 45 57.5 1 0.2 -186 1 1 1 51.3204 48.4937 45.4188 0.264082 -0.301259 -0.916244 0.489345 45 57.5 1 0.2 -187 1 1 -1 51.9309 48.8066 45.545 0.386187 -0.238678 -0.891006 0.489345 45 57.5 1 0.2 -188 1 1 1 51.9181 48.1248 45.7804 0.383614 -0.375038 -0.843912 0.489345 45 57.5 1 0.2 -189 1 1 -1 52.5 48.4549 45.9549 0.499999 -0.309017 -0.809017 0.489345 45 57.5 1 0.2 -190 1 1 1 52.5963 50.7822 45.7991 0.519258 0.156435 -0.840178 0.489345 45 57.5 1 0.2 -191 1 1 -1 53.0341 51.1854 46.2067 0.606824 0.237086 -0.758653 0.489345 45 57.5 1 0.2 -192 1 1 1 52.6287 50 45.7467 0.52573 0 -0.850651 0.489345 45 57.5 1 0.2 -193 1 1 -1 53.1012 50.4057 46.099 0.620239 0.0811424 -0.780205 0.489345 45 57.5 1 0.2 -194 1 1 1 53.5102 50.8031 46.5311 0.702046 0.160622 -0.693781 0.489345 45 57.5 1 0.2 -195 1 1 -1 52.5963 49.2178 45.7991 0.519258 -0.156435 -0.840178 0.489345 45 57.5 1 0.2 -196 1 1 1 53.1012 49.5943 46.099 0.620239 -0.0811424 -0.780205 0.489345 45 57.5 1 0.2 -197 1 1 -1 53.0341 48.8146 46.2067 0.606824 -0.237086 -0.758653 0.489345 45 57.5 1 0.2 -198 1 1 1 53.5102 49.1969 46.5311 0.702046 -0.160622 -0.693781 0.489345 45 57.5 1 0.2 -199 1 1 -1 53.5564 50 46.4855 0.711282 0 -0.702907 0.489345 45 57.5 1 0.2 -200 1 1 1 53.9192 50.4054 46.9218 0.783843 0.0810867 -0.615642 0.489345 45 57.5 1 0.2 -201 1 1 -1 53.9192 49.5946 46.9218 0.783843 -0.0810867 -0.615642 0.489345 45 57.5 1 0.2 -202 1 1 1 54.2533 50 47.3713 0.850651 0 -0.525731 0.489345 45 57.5 1 0.2 -203 1 1 -1 51.332 50 45.1807 0.266405 0 -0.963861 0.489345 45 57.5 1 0.2 -204 1 1 1 51.998 49.5884 45.4351 0.399606 -0.0823234 -0.912983 0.489345 45 57.5 1 0.2 -205 1 1 -1 51.998 50.4116 45.4351 0.399606 0.0823234 -0.912983 0.489345 45 57.5 1 0.2 -206 1 1 1 49.344 52.4222 45.6754 -0.1312 0.484441 -0.864929 0.489345 45 57.5 1 0.2 -207 1 1 -1 48.7005 52.1694 45.6867 -0.259892 0.433888 -0.862669 0.489345 45 57.5 1 0.2 -208 1 1 1 49.3417 51.7911 45.3785 -0.131656 0.358229 -0.924304 0.489345 45 57.5 1 0.2 -209 1 1 -1 48.0819 51.8752 45.7804 -0.383614 0.375038 -0.843912 0.489345 45 57.5 1 0.2 -210 1 1 1 48.6796 51.5063 45.4188 -0.264082 0.301259 -0.916244 0.489345 45 57.5 1 0.2 -211 1 1 -1 47.5 51.5451 45.9549 -0.499999 0.309017 -0.809017 0.489345 45 57.5 1 0.2 -212 1 1 1 48.0691 51.1934 45.545 -0.386187 0.238678 -0.891006 0.489345 45 57.5 1 0.2 -213 1 1 -1 48.6857 50.8123 45.2447 -0.262865 0.16246 -0.951056 0.489345 45 57.5 1 0.2 -214 1 1 1 49.336 51.1006 45.168 -0.132793 0.220117 -0.966393 0.489345 45 57.5 1 0.2 -215 1 1 -1 49.3346 50.4112 45.0616 -0.133071 0.0822426 -0.987688 0.489345 45 57.5 1 0.2 -216 1 1 1 46.9659 51.1854 46.2067 -0.606824 0.237086 -0.758653 0.489345 45 57.5 1 0.2 -217 1 1 -1 47.4037 50.7822 45.7991 -0.519258 0.156435 -0.840178 0.489345 45 57.5 1 0.2 -218 1 1 1 46.4898 50.8031 46.5311 -0.702046 0.160622 -0.693781 0.489345 45 57.5 1 0.2 -219 1 1 -1 46.8988 50.4057 46.099 -0.620239 0.0811424 -0.780205 0.489345 45 57.5 1 0.2 -220 1 1 1 47.3713 50 45.7467 -0.52573 0 -0.850651 0.489345 45 57.5 1 0.2 -221 1 1 -1 46.0808 50.4054 46.9218 -0.783843 0.0810867 -0.615642 0.489345 45 57.5 1 0.2 -222 1 1 1 46.4436 50 46.4855 -0.711282 0 -0.702907 0.489345 45 57.5 1 0.2 -223 1 1 -1 45.7467 50 47.3713 -0.850651 0 -0.525731 0.489345 45 57.5 1 0.2 -224 1 1 1 46.0808 49.5946 46.9218 -0.783843 -0.0810867 -0.615642 0.489345 45 57.5 1 0.2 -225 1 1 -1 46.4898 49.1969 46.5311 -0.702046 -0.160622 -0.693781 0.489345 45 57.5 1 0.2 -226 1 1 1 46.8988 49.5943 46.099 -0.620239 -0.0811424 -0.780205 0.489345 45 57.5 1 0.2 -227 1 1 -1 47.4037 49.2178 45.7991 -0.519258 -0.156435 -0.840178 0.489345 45 57.5 1 0.2 -228 1 1 1 46.9659 48.8146 46.2067 -0.606824 -0.237086 -0.758653 0.489345 45 57.5 1 0.2 -229 1 1 -1 47.5 48.4549 45.9549 -0.499999 -0.309017 -0.809017 0.489345 45 57.5 1 0.2 -230 1 1 1 49.3346 49.5888 45.0616 -0.133071 -0.0822426 -0.987688 0.489345 45 57.5 1 0.2 -231 1 1 -1 48.6857 49.1877 45.2447 -0.262865 -0.16246 -0.951056 0.489345 45 57.5 1 0.2 -232 1 1 1 49.336 48.8994 45.168 -0.132793 -0.220117 -0.966393 0.489345 45 57.5 1 0.2 -233 1 1 -1 48.0691 48.8066 45.545 -0.386187 -0.238678 -0.891006 0.489345 45 57.5 1 0.2 -234 1 1 1 48.6796 48.4937 45.4188 -0.264082 -0.301259 -0.916244 0.489345 45 57.5 1 0.2 -235 1 1 -1 48.0819 48.1248 45.7804 -0.383614 -0.375038 -0.843912 0.489345 45 57.5 1 0.2 -236 1 1 1 48.7005 47.8306 45.6867 -0.259892 -0.433888 -0.862669 0.489345 45 57.5 1 0.2 -237 1 1 -1 49.3417 48.2089 45.3785 -0.131656 -0.358229 -0.924304 0.489345 45 57.5 1 0.2 -238 1 1 1 49.344 47.5778 45.6754 -0.1312 -0.484441 -0.864929 0.489345 45 57.5 1 0.2 -239 1 1 -1 48.002 50.4116 45.4351 -0.399606 0.0823234 -0.912983 0.489345 45 57.5 1 0.2 -240 1 1 1 48.002 49.5884 45.4351 -0.399606 -0.0823234 -0.912983 0.489345 45 57.5 1 0.2 -241 1 1 -1 48.668 50 45.1807 -0.266405 0 -0.963861 0.489345 45 57.5 1 0.2 -242 1 1 1 50.4054 46.9218 53.9192 0.0810867 -0.615642 0.783843 0.489345 45 57.5 1 0.2 -243 1 1 -1 49.5946 46.9218 53.9192 -0.0810867 -0.615642 0.783843 0.489345 45 57.5 1 0.2 -244 1 1 1 50.8031 46.5311 53.5102 0.160622 -0.693781 0.702046 0.489345 45 57.5 1 0.2 -245 1 1 -1 50 46.4855 53.5564 0 -0.702907 0.711282 0.489345 45 57.5 1 0.2 -246 1 1 1 49.1969 46.5311 53.5102 -0.160622 -0.693781 0.702046 0.489345 45 57.5 1 0.2 -247 1 1 -1 51.1854 46.2067 53.0341 0.237086 -0.758653 0.606824 0.489345 45 57.5 1 0.2 -248 1 1 1 50.4057 46.099 53.1012 0.0811424 -0.780205 0.620239 0.489345 45 57.5 1 0.2 -249 1 1 -1 51.5451 45.9549 52.5 0.309017 -0.809017 0.499999 0.489345 45 57.5 1 0.2 -250 1 1 1 50.7822 45.7991 52.5963 0.156435 -0.840178 0.519258 0.489345 45 57.5 1 0.2 -251 1 1 -1 50 45.7467 52.6287 0 -0.850651 0.52573 0.489345 45 57.5 1 0.2 -252 1 1 1 49.5943 46.099 53.1012 -0.0811424 -0.780205 0.620239 0.489345 45 57.5 1 0.2 -253 1 1 -1 48.8146 46.2067 53.0341 -0.237086 -0.758653 0.606824 0.489345 45 57.5 1 0.2 -254 1 1 1 49.2178 45.7991 52.5963 -0.156435 -0.840178 0.519258 0.489345 45 57.5 1 0.2 -255 1 1 -1 48.4549 45.9549 52.5 -0.309017 -0.809017 0.499999 0.489345 45 57.5 1 0.2 -256 1 1 1 51.8752 45.7804 51.9181 0.375038 -0.843912 0.383614 0.489345 45 57.5 1 0.2 -257 1 1 -1 51.1934 45.545 51.9309 0.238678 -0.891006 0.386187 0.489345 45 57.5 1 0.2 -258 1 1 1 52.1694 45.6867 51.2995 0.433888 -0.862669 0.259892 0.489345 45 57.5 1 0.2 -259 1 1 -1 51.5063 45.4188 51.3204 0.301259 -0.916244 0.264082 0.489345 45 57.5 1 0.2 -260 1 1 1 50.8123 45.2447 51.3143 0.16246 -0.951056 0.262865 0.489345 45 57.5 1 0.2 -261 1 1 -1 52.4222 45.6754 50.656 0.484441 -0.864929 0.1312 0.489345 45 57.5 1 0.2 -262 1 1 1 51.7911 45.3785 50.6583 0.358229 -0.924304 0.131656 0.489345 45 57.5 1 0.2 -263 1 1 -1 52.6287 45.7467 50 0.525731 -0.850651 0 0.489345 45 57.5 1 0.2 -264 1 1 1 52.0168 45.4248 50 0.403355 -0.915043 0 0.489345 45 57.5 1 0.2 -265 1 1 -1 51.3663 45.1903 50 0.273267 -0.961938 0 0.489345 45 57.5 1 0.2 -266 1 1 1 51.1006 45.168 50.664 0.220117 -0.966393 0.132793 0.489345 45 57.5 1 0.2 -267 1 1 -1 50.4112 45.0616 50.6654 0.0822426 -0.987688 0.133071 0.489345 45 57.5 1 0.2 -268 1 1 1 50.6898 45.0478 50 0.137952 -0.990439 0 0.489345 45 57.5 1 0.2 -269 1 1 -1 50 45 50 0 -1 0 0.489345 45 57.5 1 0.2 -270 1 1 1 48.8066 45.545 51.9309 -0.238678 -0.891006 0.386187 0.489345 45 57.5 1 0.2 -271 1 1 -1 48.1248 45.7804 51.9181 -0.375038 -0.843912 0.383614 0.489345 45 57.5 1 0.2 -272 1 1 1 49.1877 45.2447 51.3143 -0.16246 -0.951056 0.262865 0.489345 45 57.5 1 0.2 -273 1 1 -1 48.4937 45.4188 51.3204 -0.301259 -0.916244 0.264082 0.489345 45 57.5 1 0.2 -274 1 1 1 47.8306 45.6867 51.2995 -0.433888 -0.862669 0.259892 0.489345 45 57.5 1 0.2 -275 1 1 -1 49.5888 45.0616 50.6654 -0.0822426 -0.987688 0.133071 0.489345 45 57.5 1 0.2 -276 1 1 1 48.8994 45.168 50.664 -0.220117 -0.966393 0.132793 0.489345 45 57.5 1 0.2 -277 1 1 -1 49.3102 45.0478 50 -0.137952 -0.990439 0 0.489345 45 57.5 1 0.2 -278 1 1 1 48.6337 45.1903 50 -0.273267 -0.961938 0 0.489345 45 57.5 1 0.2 -279 1 1 -1 48.2089 45.3785 50.6583 -0.358229 -0.924304 0.131656 0.489345 45 57.5 1 0.2 -280 1 1 1 47.5778 45.6754 50.656 -0.484441 -0.864929 0.1312 0.489345 45 57.5 1 0.2 -281 1 1 -1 47.9832 45.4248 50 -0.403355 -0.915043 0 0.489345 45 57.5 1 0.2 -282 1 1 1 47.3713 45.7467 50 -0.525731 -0.850651 0 0.489345 45 57.5 1 0.2 -283 1 1 -1 50.4116 45.4351 51.998 0.0823234 -0.912983 0.399606 0.489345 45 57.5 1 0.2 -284 1 1 1 50 45.1807 51.332 0 -0.963861 0.266405 0.489345 45 57.5 1 0.2 -285 1 1 -1 49.5884 45.4351 51.998 -0.0823234 -0.912983 0.399606 0.489345 45 57.5 1 0.2 -286 1 1 1 49.5946 46.9218 46.0808 -0.0810867 -0.615642 -0.783843 0.489345 45 57.5 1 0.2 -287 1 1 -1 50.4054 46.9218 46.0808 0.0810867 -0.615642 -0.783843 0.489345 45 57.5 1 0.2 -288 1 1 1 49.1969 46.5311 46.4898 -0.160622 -0.693781 -0.702046 0.489345 45 57.5 1 0.2 -289 1 1 -1 50 46.4855 46.4436 0 -0.702907 -0.711282 0.489345 45 57.5 1 0.2 -290 1 1 1 50.8031 46.5311 46.4898 0.160622 -0.693781 -0.702046 0.489345 45 57.5 1 0.2 -291 1 1 -1 48.8146 46.2067 46.9659 -0.237086 -0.758653 -0.606824 0.489345 45 57.5 1 0.2 -292 1 1 1 49.5943 46.099 46.8988 -0.0811424 -0.780205 -0.620239 0.489345 45 57.5 1 0.2 -293 1 1 -1 48.4549 45.9549 47.5 -0.309017 -0.809017 -0.499999 0.489345 45 57.5 1 0.2 -294 1 1 1 49.2178 45.7991 47.4037 -0.156435 -0.840178 -0.519258 0.489345 45 57.5 1 0.2 -295 1 1 -1 50 45.7467 47.3713 0 -0.850651 -0.52573 0.489345 45 57.5 1 0.2 -296 1 1 1 50.4057 46.099 46.8988 0.0811424 -0.780205 -0.620239 0.489345 45 57.5 1 0.2 -297 1 1 -1 51.1854 46.2067 46.9659 0.237086 -0.758653 -0.606824 0.489345 45 57.5 1 0.2 -298 1 1 1 50.7822 45.7991 47.4037 0.156435 -0.840178 -0.519258 0.489345 45 57.5 1 0.2 -299 1 1 -1 51.5451 45.9549 47.5 0.309017 -0.809017 -0.499999 0.489345 45 57.5 1 0.2 -300 1 1 1 48.1248 45.7804 48.0819 -0.375038 -0.843912 -0.383614 0.489345 45 57.5 1 0.2 -301 1 1 -1 48.8066 45.545 48.0691 -0.238678 -0.891006 -0.386187 0.489345 45 57.5 1 0.2 -302 1 1 1 47.8306 45.6867 48.7005 -0.433888 -0.862669 -0.259892 0.489345 45 57.5 1 0.2 -303 1 1 -1 48.4937 45.4188 48.6796 -0.301259 -0.916244 -0.264082 0.489345 45 57.5 1 0.2 -304 1 1 1 49.1877 45.2447 48.6857 -0.16246 -0.951056 -0.262865 0.489345 45 57.5 1 0.2 -305 1 1 -1 47.5778 45.6754 49.344 -0.484441 -0.864929 -0.1312 0.489345 45 57.5 1 0.2 -306 1 1 1 48.2089 45.3785 49.3417 -0.358229 -0.924304 -0.131656 0.489345 45 57.5 1 0.2 -307 1 1 -1 48.8994 45.168 49.336 -0.220117 -0.966393 -0.132793 0.489345 45 57.5 1 0.2 -308 1 1 1 49.5888 45.0616 49.3346 -0.0822426 -0.987688 -0.133071 0.489345 45 57.5 1 0.2 -309 1 1 -1 51.1934 45.545 48.0691 0.238678 -0.891006 -0.386187 0.489345 45 57.5 1 0.2 -310 1 1 1 51.8752 45.7804 48.0819 0.375038 -0.843912 -0.383614 0.489345 45 57.5 1 0.2 -311 1 1 -1 50.8123 45.2447 48.6857 0.16246 -0.951056 -0.262865 0.489345 45 57.5 1 0.2 -312 1 1 1 51.5063 45.4188 48.6796 0.301259 -0.916244 -0.264082 0.489345 45 57.5 1 0.2 -313 1 1 -1 52.1694 45.6867 48.7005 0.433888 -0.862669 -0.259892 0.489345 45 57.5 1 0.2 -314 1 1 1 50.4112 45.0616 49.3346 0.0822426 -0.987688 -0.133071 0.489345 45 57.5 1 0.2 -315 1 1 -1 51.1006 45.168 49.336 0.220117 -0.966393 -0.132793 0.489345 45 57.5 1 0.2 -316 1 1 1 51.7911 45.3785 49.3417 0.358229 -0.924304 -0.131656 0.489345 45 57.5 1 0.2 -317 1 1 -1 52.4222 45.6754 49.344 0.484441 -0.864929 -0.1312 0.489345 45 57.5 1 0.2 -318 1 1 1 49.5884 45.4351 48.002 -0.0823234 -0.912983 -0.399606 0.489345 45 57.5 1 0.2 -319 1 1 -1 50 45.1807 48.668 0 -0.963861 -0.266405 0.489345 45 57.5 1 0.2 -320 1 1 1 50.4116 45.4351 48.002 0.0823234 -0.912983 -0.399606 0.489345 45 57.5 1 0.2 -321 1 1 -1 46.9218 53.9192 50.4054 -0.615642 0.783843 0.0810867 0.489345 45 57.5 1 0.2 -322 1 1 1 46.9218 53.9192 49.5946 -0.615642 0.783843 -0.0810867 0.489345 45 57.5 1 0.2 -323 1 1 -1 46.5311 53.5102 50.8031 -0.693781 0.702046 0.160622 0.489345 45 57.5 1 0.2 -324 1 1 1 46.4855 53.5564 50 -0.702907 0.711282 0 0.489345 45 57.5 1 0.2 -325 1 1 -1 46.5311 53.5102 49.1969 -0.693781 0.702046 -0.160622 0.489345 45 57.5 1 0.2 -326 1 1 1 46.2067 53.0341 51.1854 -0.758653 0.606824 0.237086 0.489345 45 57.5 1 0.2 -327 1 1 -1 46.099 53.1012 50.4057 -0.780205 0.620239 0.0811424 0.489345 45 57.5 1 0.2 -328 1 1 1 45.9549 52.5 51.5451 -0.809017 0.499999 0.309017 0.489345 45 57.5 1 0.2 -329 1 1 -1 45.7991 52.5963 50.7822 -0.840178 0.519258 0.156435 0.489345 45 57.5 1 0.2 -330 1 1 1 45.7467 52.6287 50 -0.850651 0.52573 0 0.489345 45 57.5 1 0.2 -331 1 1 -1 46.099 53.1012 49.5943 -0.780205 0.620239 -0.0811424 0.489345 45 57.5 1 0.2 -332 1 1 1 46.2067 53.0341 48.8146 -0.758653 0.606824 -0.237086 0.489345 45 57.5 1 0.2 -333 1 1 -1 45.7991 52.5963 49.2178 -0.840178 0.519258 -0.156435 0.489345 45 57.5 1 0.2 -334 1 1 1 45.9549 52.5 48.4549 -0.809017 0.499999 -0.309017 0.489345 45 57.5 1 0.2 -335 1 1 -1 45.7804 51.9181 51.8752 -0.843912 0.383614 0.375038 0.489345 45 57.5 1 0.2 -336 1 1 1 45.545 51.9309 51.1934 -0.891006 0.386187 0.238678 0.489345 45 57.5 1 0.2 -337 1 1 -1 45.6867 51.2995 52.1694 -0.862669 0.259892 0.433888 0.489345 45 57.5 1 0.2 -338 1 1 1 45.4188 51.3204 51.5063 -0.916244 0.264082 0.301259 0.489345 45 57.5 1 0.2 -339 1 1 -1 45.2447 51.3143 50.8123 -0.951056 0.262865 0.16246 0.489345 45 57.5 1 0.2 -340 1 1 1 45.6754 50.656 52.4222 -0.864929 0.1312 0.484441 0.489345 45 57.5 1 0.2 -341 1 1 -1 45.3785 50.6583 51.7911 -0.924304 0.131656 0.358229 0.489345 45 57.5 1 0.2 -342 1 1 1 45.4248 50 52.0168 -0.915043 0 0.403355 0.489345 45 57.5 1 0.2 -343 1 1 -1 45.1903 50 51.3663 -0.961938 0 0.273267 0.489345 45 57.5 1 0.2 -344 1 1 1 45.168 50.664 51.1006 -0.966393 0.132793 0.220117 0.489345 45 57.5 1 0.2 -345 1 1 -1 45.0616 50.6654 50.4112 -0.987688 0.133071 0.0822426 0.489345 45 57.5 1 0.2 -346 1 1 1 45.0478 50 50.6898 -0.990439 0 0.137952 0.489345 45 57.5 1 0.2 -347 1 1 -1 45 50 50 -1 0 0 0.489345 45 57.5 1 0.2 -348 1 1 1 45.545 51.9309 48.8066 -0.891006 0.386187 -0.238678 0.489345 45 57.5 1 0.2 -349 1 1 -1 45.7804 51.9181 48.1248 -0.843912 0.383614 -0.375038 0.489345 45 57.5 1 0.2 -350 1 1 1 45.2447 51.3143 49.1877 -0.951056 0.262865 -0.16246 0.489345 45 57.5 1 0.2 -351 1 1 -1 45.4188 51.3204 48.4937 -0.916244 0.264082 -0.301259 0.489345 45 57.5 1 0.2 -352 1 1 1 45.6867 51.2995 47.8306 -0.862669 0.259892 -0.433888 0.489345 45 57.5 1 0.2 -353 1 1 -1 45.0616 50.6654 49.5888 -0.987688 0.133071 -0.0822426 0.489345 45 57.5 1 0.2 -354 1 1 1 45.168 50.664 48.8994 -0.966393 0.132793 -0.220117 0.489345 45 57.5 1 0.2 -355 1 1 -1 45.0478 50 49.3102 -0.990439 0 -0.137952 0.489345 45 57.5 1 0.2 -356 1 1 1 45.1903 50 48.6337 -0.961938 0 -0.273267 0.489345 45 57.5 1 0.2 -357 1 1 -1 45.3785 50.6583 48.2089 -0.924304 0.131656 -0.358229 0.489345 45 57.5 1 0.2 -358 1 1 1 45.6754 50.656 47.5778 -0.864929 0.1312 -0.484441 0.489345 45 57.5 1 0.2 -359 1 1 -1 45.4248 50 47.9832 -0.915043 0 -0.403355 0.489345 45 57.5 1 0.2 -360 1 1 1 45.4351 51.998 50.4116 -0.912983 0.399606 0.0823234 0.489345 45 57.5 1 0.2 -361 1 1 -1 45.1807 51.332 50 -0.963861 0.266405 0 0.489345 45 57.5 1 0.2 -362 1 1 1 45.4351 51.998 49.5884 -0.912983 0.399606 -0.0823234 0.489345 45 57.5 1 0.2 -363 1 1 -1 46.9218 46.0808 49.5946 -0.615642 -0.783843 -0.0810867 0.489345 45 57.5 1 0.2 -364 1 1 1 46.9218 46.0808 50.4054 -0.615642 -0.783843 0.0810867 0.489345 45 57.5 1 0.2 -365 1 1 -1 46.5311 46.4898 49.1969 -0.693781 -0.702046 -0.160622 0.489345 45 57.5 1 0.2 -366 1 1 1 46.4855 46.4436 50 -0.702907 -0.711282 0 0.489345 45 57.5 1 0.2 -367 1 1 -1 46.5311 46.4898 50.8031 -0.693781 -0.702046 0.160622 0.489345 45 57.5 1 0.2 -368 1 1 1 46.2067 46.9659 48.8146 -0.758653 -0.606824 -0.237086 0.489345 45 57.5 1 0.2 -369 1 1 -1 46.099 46.8988 49.5943 -0.780205 -0.620239 -0.0811424 0.489345 45 57.5 1 0.2 -370 1 1 1 45.9549 47.5 48.4549 -0.809017 -0.499999 -0.309017 0.489345 45 57.5 1 0.2 -371 1 1 -1 45.7991 47.4037 49.2178 -0.840178 -0.519258 -0.156435 0.489345 45 57.5 1 0.2 -372 1 1 1 45.7467 47.3713 50 -0.850651 -0.52573 0 0.489345 45 57.5 1 0.2 -373 1 1 -1 46.099 46.8988 50.4057 -0.780205 -0.620239 0.0811424 0.489345 45 57.5 1 0.2 -374 1 1 1 46.2067 46.9659 51.1854 -0.758653 -0.606824 0.237086 0.489345 45 57.5 1 0.2 -375 1 1 -1 45.7991 47.4037 50.7822 -0.840178 -0.519258 0.156435 0.489345 45 57.5 1 0.2 -376 1 1 1 45.9549 47.5 51.5451 -0.809017 -0.499999 0.309017 0.489345 45 57.5 1 0.2 -377 1 1 -1 45.7804 48.0819 48.1248 -0.843912 -0.383614 -0.375038 0.489345 45 57.5 1 0.2 -378 1 1 1 45.545 48.0691 48.8066 -0.891006 -0.386187 -0.238678 0.489345 45 57.5 1 0.2 -379 1 1 -1 45.6867 48.7005 47.8306 -0.862669 -0.259892 -0.433888 0.489345 45 57.5 1 0.2 -380 1 1 1 45.4188 48.6796 48.4937 -0.916244 -0.264082 -0.301259 0.489345 45 57.5 1 0.2 -381 1 1 -1 45.2447 48.6857 49.1877 -0.951056 -0.262865 -0.16246 0.489345 45 57.5 1 0.2 -382 1 1 1 45.6754 49.344 47.5778 -0.864929 -0.1312 -0.484441 0.489345 45 57.5 1 0.2 -383 1 1 -1 45.3785 49.3417 48.2089 -0.924304 -0.131656 -0.358229 0.489345 45 57.5 1 0.2 -384 1 1 1 45.168 49.336 48.8994 -0.966393 -0.132793 -0.220117 0.489345 45 57.5 1 0.2 -385 1 1 -1 45.0616 49.3346 49.5888 -0.987688 -0.133071 -0.0822426 0.489345 45 57.5 1 0.2 -386 1 1 1 45.545 48.0691 51.1934 -0.891006 -0.386187 0.238678 0.489345 45 57.5 1 0.2 -387 1 1 -1 45.7804 48.0819 51.8752 -0.843912 -0.383614 0.375038 0.489345 45 57.5 1 0.2 -388 1 1 1 45.2447 48.6857 50.8123 -0.951056 -0.262865 0.16246 0.489345 45 57.5 1 0.2 -389 1 1 -1 45.4188 48.6796 51.5063 -0.916244 -0.264082 0.301259 0.489345 45 57.5 1 0.2 -390 1 1 1 45.6867 48.7005 52.1694 -0.862669 -0.259892 0.433888 0.489345 45 57.5 1 0.2 -391 1 1 -1 45.0616 49.3346 50.4112 -0.987688 -0.133071 0.0822426 0.489345 45 57.5 1 0.2 -392 1 1 1 45.168 49.336 51.1006 -0.966393 -0.132793 0.220117 0.489345 45 57.5 1 0.2 -393 1 1 -1 45.3785 49.3417 51.7911 -0.924304 -0.131656 0.358229 0.489345 45 57.5 1 0.2 -394 1 1 1 45.6754 49.344 52.4222 -0.864929 -0.1312 0.484441 0.489345 45 57.5 1 0.2 -395 1 1 -1 45.4351 48.002 49.5884 -0.912983 -0.399606 -0.0823234 0.489345 45 57.5 1 0.2 -396 1 1 1 45.1807 48.668 50 -0.963861 -0.266405 0 0.489345 45 57.5 1 0.2 -397 1 1 -1 45.4351 48.002 50.4116 -0.912983 -0.399606 0.0823234 0.489345 45 57.5 1 0.2 -398 1 1 1 53.0782 53.9192 49.5946 0.615642 0.783843 -0.0810867 0.489345 45 57.5 1 0.2 -399 1 1 -1 53.0782 53.9192 50.4054 0.615642 0.783843 0.0810867 0.489345 45 57.5 1 0.2 -400 1 1 1 53.4689 53.5102 49.1969 0.693781 0.702046 -0.160622 0.489345 45 57.5 1 0.2 -401 1 1 -1 53.5145 53.5564 50 0.702907 0.711282 0 0.489345 45 57.5 1 0.2 -402 1 1 1 53.4689 53.5102 50.8031 0.693781 0.702046 0.160622 0.489345 45 57.5 1 0.2 -403 1 1 -1 53.7933 53.0341 48.8146 0.758653 0.606824 -0.237086 0.489345 45 57.5 1 0.2 -404 1 1 1 53.901 53.1012 49.5943 0.780205 0.620239 -0.0811424 0.489345 45 57.5 1 0.2 -405 1 1 -1 54.0451 52.5 48.4549 0.809017 0.499999 -0.309017 0.489345 45 57.5 1 0.2 -406 1 1 1 54.2009 52.5963 49.2178 0.840178 0.519258 -0.156435 0.489345 45 57.5 1 0.2 -407 1 1 -1 54.2533 52.6287 50 0.850651 0.52573 0 0.489345 45 57.5 1 0.2 -408 1 1 1 53.901 53.1012 50.4057 0.780205 0.620239 0.0811424 0.489345 45 57.5 1 0.2 -409 1 1 -1 53.7933 53.0341 51.1854 0.758653 0.606824 0.237086 0.489345 45 57.5 1 0.2 -410 1 1 1 54.2009 52.5963 50.7822 0.840178 0.519258 0.156435 0.489345 45 57.5 1 0.2 -411 1 1 -1 54.0451 52.5 51.5451 0.809017 0.499999 0.309017 0.489345 45 57.5 1 0.2 -412 1 1 1 54.2196 51.9181 48.1248 0.843912 0.383614 -0.375038 0.489345 45 57.5 1 0.2 -413 1 1 -1 54.455 51.9309 48.8066 0.891006 0.386187 -0.238678 0.489345 45 57.5 1 0.2 -414 1 1 1 54.3133 51.2995 47.8306 0.862669 0.259892 -0.433888 0.489345 45 57.5 1 0.2 -415 1 1 -1 54.5812 51.3204 48.4937 0.916244 0.264082 -0.301259 0.489345 45 57.5 1 0.2 -416 1 1 1 54.7553 51.3143 49.1877 0.951056 0.262865 -0.16246 0.489345 45 57.5 1 0.2 -417 1 1 -1 54.3246 50.656 47.5778 0.864929 0.1312 -0.484441 0.489345 45 57.5 1 0.2 -418 1 1 1 54.6215 50.6583 48.2089 0.924304 0.131656 -0.358229 0.489345 45 57.5 1 0.2 -419 1 1 -1 54.5752 50 47.9832 0.915043 0 -0.403355 0.489345 45 57.5 1 0.2 -420 1 1 1 54.8097 50 48.6337 0.961938 0 -0.273267 0.489345 45 57.5 1 0.2 -421 1 1 -1 54.832 50.664 48.8994 0.966393 0.132793 -0.220117 0.489345 45 57.5 1 0.2 -422 1 1 1 54.9384 50.6654 49.5888 0.987688 0.133071 -0.0822426 0.489345 45 57.5 1 0.2 -423 1 1 -1 54.9522 50 49.3102 0.990439 0 -0.137952 0.489345 45 57.5 1 0.2 -424 1 1 1 55 50 50 1 0 0 0.489345 45 57.5 1 0.2 -425 1 1 -1 54.455 51.9309 51.1934 0.891006 0.386187 0.238678 0.489345 45 57.5 1 0.2 -426 1 1 1 54.2196 51.9181 51.8752 0.843912 0.383614 0.375038 0.489345 45 57.5 1 0.2 -427 1 1 -1 54.7553 51.3143 50.8123 0.951056 0.262865 0.16246 0.489345 45 57.5 1 0.2 -428 1 1 1 54.5812 51.3204 51.5063 0.916244 0.264082 0.301259 0.489345 45 57.5 1 0.2 -429 1 1 -1 54.3133 51.2995 52.1694 0.862669 0.259892 0.433888 0.489345 45 57.5 1 0.2 -430 1 1 1 54.9384 50.6654 50.4112 0.987688 0.133071 0.0822426 0.489345 45 57.5 1 0.2 -431 1 1 -1 54.832 50.664 51.1006 0.966393 0.132793 0.220117 0.489345 45 57.5 1 0.2 -432 1 1 1 54.9522 50 50.6898 0.990439 0 0.137952 0.489345 45 57.5 1 0.2 -433 1 1 -1 54.8097 50 51.3663 0.961938 0 0.273267 0.489345 45 57.5 1 0.2 -434 1 1 1 54.6215 50.6583 51.7911 0.924304 0.131656 0.358229 0.489345 45 57.5 1 0.2 -435 1 1 -1 54.3246 50.656 52.4222 0.864929 0.1312 0.484441 0.489345 45 57.5 1 0.2 -436 1 1 1 54.5752 50 52.0168 0.915043 0 0.403355 0.489345 45 57.5 1 0.2 -437 1 1 -1 54.5649 51.998 49.5884 0.912983 0.399606 -0.0823234 0.489345 45 57.5 1 0.2 -438 1 1 1 54.8193 51.332 50 0.963861 0.266405 0 0.489345 45 57.5 1 0.2 -439 1 1 -1 54.5649 51.998 50.4116 0.912983 0.399606 0.0823234 0.489345 45 57.5 1 0.2 -440 1 1 1 53.0782 46.0808 50.4054 0.615642 -0.783843 0.0810867 0.489345 45 57.5 1 0.2 -441 1 1 -1 53.0782 46.0808 49.5946 0.615642 -0.783843 -0.0810867 0.489345 45 57.5 1 0.2 -442 1 1 1 53.4689 46.4898 50.8031 0.693781 -0.702046 0.160622 0.489345 45 57.5 1 0.2 -443 1 1 -1 53.5145 46.4436 50 0.702907 -0.711282 0 0.489345 45 57.5 1 0.2 -444 1 1 1 53.4689 46.4898 49.1969 0.693781 -0.702046 -0.160622 0.489345 45 57.5 1 0.2 -445 1 1 -1 53.7933 46.9659 51.1854 0.758653 -0.606824 0.237086 0.489345 45 57.5 1 0.2 -446 1 1 1 53.901 46.8988 50.4057 0.780205 -0.620239 0.0811424 0.489345 45 57.5 1 0.2 -447 1 1 -1 54.0451 47.5 51.5451 0.809017 -0.499999 0.309017 0.489345 45 57.5 1 0.2 -448 1 1 1 54.2009 47.4037 50.7822 0.840178 -0.519258 0.156435 0.489345 45 57.5 1 0.2 -449 1 1 -1 54.2533 47.3713 50 0.850651 -0.52573 0 0.489345 45 57.5 1 0.2 -450 1 1 1 53.901 46.8988 49.5943 0.780205 -0.620239 -0.0811424 0.489345 45 57.5 1 0.2 -451 1 1 -1 53.7933 46.9659 48.8146 0.758653 -0.606824 -0.237086 0.489345 45 57.5 1 0.2 -452 1 1 1 54.2009 47.4037 49.2178 0.840178 -0.519258 -0.156435 0.489345 45 57.5 1 0.2 -453 1 1 -1 54.0451 47.5 48.4549 0.809017 -0.499999 -0.309017 0.489345 45 57.5 1 0.2 -454 1 1 1 54.2196 48.0819 51.8752 0.843912 -0.383614 0.375038 0.489345 45 57.5 1 0.2 -455 1 1 -1 54.455 48.0691 51.1934 0.891006 -0.386187 0.238678 0.489345 45 57.5 1 0.2 -456 1 1 1 54.3133 48.7005 52.1694 0.862669 -0.259892 0.433888 0.489345 45 57.5 1 0.2 -457 1 1 -1 54.5812 48.6796 51.5063 0.916244 -0.264082 0.301259 0.489345 45 57.5 1 0.2 -458 1 1 1 54.7553 48.6857 50.8123 0.951056 -0.262865 0.16246 0.489345 45 57.5 1 0.2 -459 1 1 -1 54.3246 49.344 52.4222 0.864929 -0.1312 0.484441 0.489345 45 57.5 1 0.2 -460 1 1 1 54.6215 49.3417 51.7911 0.924304 -0.131656 0.358229 0.489345 45 57.5 1 0.2 -461 1 1 -1 54.832 49.336 51.1006 0.966393 -0.132793 0.220117 0.489345 45 57.5 1 0.2 -462 1 1 1 54.9384 49.3346 50.4112 0.987688 -0.133071 0.0822426 0.489345 45 57.5 1 0.2 -463 1 1 -1 54.455 48.0691 48.8066 0.891006 -0.386187 -0.238678 0.489345 45 57.5 1 0.2 -464 1 1 1 54.2196 48.0819 48.1248 0.843912 -0.383614 -0.375038 0.489345 45 57.5 1 0.2 -465 1 1 -1 54.7553 48.6857 49.1877 0.951056 -0.262865 -0.16246 0.489345 45 57.5 1 0.2 -466 1 1 1 54.5812 48.6796 48.4937 0.916244 -0.264082 -0.301259 0.489345 45 57.5 1 0.2 -467 1 1 -1 54.3133 48.7005 47.8306 0.862669 -0.259892 -0.433888 0.489345 45 57.5 1 0.2 -468 1 1 1 54.9384 49.3346 49.5888 0.987688 -0.133071 -0.0822426 0.489345 45 57.5 1 0.2 -469 1 1 -1 54.832 49.336 48.8994 0.966393 -0.132793 -0.220117 0.489345 45 57.5 1 0.2 -470 1 1 1 54.6215 49.3417 48.2089 0.924304 -0.131656 -0.358229 0.489345 45 57.5 1 0.2 -471 1 1 -1 54.3246 49.344 47.5778 0.864929 -0.1312 -0.484441 0.489345 45 57.5 1 0.2 -472 1 1 1 54.5649 48.002 50.4116 0.912983 -0.399606 0.0823234 0.489345 45 57.5 1 0.2 -473 1 1 -1 54.8193 48.668 50 0.963861 -0.266405 0 0.489345 45 57.5 1 0.2 -474 1 1 1 54.5649 48.002 49.5884 0.912983 -0.399606 -0.0823234 0.489345 45 57.5 1 0.2 -475 1 1 -1 48.9349 52.8563 53.9632 -0.213023 0.571252 0.792649 0.489345 45 57.5 1 0.2 -476 1 1 1 48.2692 52.5806 53.9173 -0.346153 0.516121 0.783452 0.489345 45 57.5 1 0.2 -477 1 1 -1 47.6579 52.27 53.7897 -0.468429 0.45399 0.757936 0.489345 45 57.5 1 0.2 -478 1 1 1 47.8734 52.9389 53.441 -0.425325 0.587785 0.688191 0.489345 45 57.5 1 0.2 -479 1 1 -1 48.52 53.2371 53.5116 -0.296004 0.647412 0.70231 0.489345 45 57.5 1 0.2 -480 1 1 1 48.1413 53.5355 53.0075 -0.371748 0.707107 0.601501 0.489345 45 57.5 1 0.2 -481 1 1 -1 46.9925 51.8587 53.5355 -0.601501 0.371748 0.707107 0.489345 45 57.5 1 0.2 -482 1 1 1 46.4884 51.48 53.2371 -0.70231 0.296004 0.647412 0.489345 45 57.5 1 0.2 -483 1 1 -1 46.559 52.1266 52.9389 -0.688191 0.425325 0.587785 0.489345 45 57.5 1 0.2 -484 1 1 1 46.0368 51.0651 52.8563 -0.792649 0.213023 0.571252 0.489345 45 57.5 1 0.2 -485 1 1 -1 46.0827 51.7308 52.5806 -0.783452 0.346153 0.516121 0.489345 45 57.5 1 0.2 -486 1 1 1 46.2103 52.3421 52.27 -0.757936 0.468429 0.45399 0.489345 45 57.5 1 0.2 -487 1 1 -1 47.73 53.7897 52.3421 -0.45399 0.757936 0.468429 0.489345 45 57.5 1 0.2 -488 1 1 1 47.0611 53.441 52.1266 -0.587785 0.688191 0.425325 0.489345 45 57.5 1 0.2 -489 1 1 -1 47.4194 53.9173 51.7308 -0.516121 0.783452 0.346153 0.489345 45 57.5 1 0.2 -490 1 1 1 46.4645 53.0075 51.8587 -0.707107 0.601501 0.371748 0.489345 45 57.5 1 0.2 -491 1 1 -1 46.7629 53.5116 51.48 -0.647412 0.70231 0.296004 0.489345 45 57.5 1 0.2 -492 1 1 1 47.1437 53.9632 51.0651 -0.571252 0.792649 0.213023 0.489345 45 57.5 1 0.2 -493 1 1 -1 47.1787 52.5669 53.2329 -0.564254 0.513375 0.646578 0.489345 45 57.5 1 0.2 -494 1 1 1 46.7671 52.8213 52.5669 -0.646578 0.564254 0.513375 0.489345 45 57.5 1 0.2 -495 1 1 -1 47.4331 53.2329 52.8213 -0.513375 0.646578 0.564254 0.489345 45 57.5 1 0.2 -496 1 1 1 51.0651 52.8563 53.9632 0.213023 0.571252 0.792649 0.489345 45 57.5 1 0.2 -497 1 1 -1 51.48 53.2371 53.5116 0.296004 0.647412 0.70231 0.489345 45 57.5 1 0.2 -498 1 1 1 51.8587 53.5355 53.0075 0.371748 0.707107 0.601501 0.489345 45 57.5 1 0.2 -499 1 1 -1 52.1266 52.9389 53.441 0.425325 0.587785 0.688191 0.489345 45 57.5 1 0.2 -500 1 1 1 51.7308 52.5806 53.9173 0.346153 0.516121 0.783452 0.489345 45 57.5 1 0.2 -501 1 1 -1 52.3421 52.27 53.7897 0.468429 0.45399 0.757936 0.489345 45 57.5 1 0.2 -502 1 1 1 52.27 53.7897 52.3421 0.45399 0.757936 0.468429 0.489345 45 57.5 1 0.2 -503 1 1 -1 52.5806 53.9173 51.7308 0.516121 0.783452 0.346153 0.489345 45 57.5 1 0.2 -504 1 1 1 52.9389 53.441 52.1266 0.587785 0.688191 0.425325 0.489345 45 57.5 1 0.2 -505 1 1 -1 52.8563 53.9632 51.0651 0.571252 0.792649 0.213023 0.489345 45 57.5 1 0.2 -506 1 1 1 53.2371 53.5116 51.48 0.647412 0.70231 0.296004 0.489345 45 57.5 1 0.2 -507 1 1 -1 53.5355 53.0075 51.8587 0.707107 0.601501 0.371748 0.489345 45 57.5 1 0.2 -508 1 1 1 53.0075 51.8587 53.5355 0.601501 0.371748 0.707107 0.489345 45 57.5 1 0.2 -509 1 1 -1 53.441 52.1266 52.9389 0.688191 0.425325 0.587785 0.489345 45 57.5 1 0.2 -510 1 1 1 53.5116 51.48 53.2371 0.70231 0.296004 0.647412 0.489345 45 57.5 1 0.2 -511 1 1 -1 53.7897 52.3421 52.27 0.757936 0.468429 0.45399 0.489345 45 57.5 1 0.2 -512 1 1 1 53.9173 51.7308 52.5806 0.783452 0.346153 0.516121 0.489345 45 57.5 1 0.2 -513 1 1 -1 53.9632 51.0651 52.8563 0.792649 0.213023 0.571252 0.489345 45 57.5 1 0.2 -514 1 1 1 52.5669 53.2329 52.8213 0.513375 0.646578 0.564254 0.489345 45 57.5 1 0.2 -515 1 1 -1 53.2329 52.8213 52.5669 0.646578 0.564254 0.513375 0.489345 45 57.5 1 0.2 -516 1 1 1 52.8213 52.5669 53.2329 0.564254 0.513375 0.646578 0.489345 45 57.5 1 0.2 -517 1 1 -1 48.9349 52.8563 46.0368 -0.213023 0.571252 -0.792649 0.489345 45 57.5 1 0.2 -518 1 1 1 48.52 53.2371 46.4884 -0.296004 0.647412 -0.70231 0.489345 45 57.5 1 0.2 -519 1 1 -1 48.1413 53.5355 46.9925 -0.371748 0.707107 -0.601501 0.489345 45 57.5 1 0.2 -520 1 1 1 47.8734 52.9389 46.559 -0.425325 0.587785 -0.688191 0.489345 45 57.5 1 0.2 -521 1 1 -1 48.2692 52.5806 46.0827 -0.346153 0.516121 -0.783452 0.489345 45 57.5 1 0.2 -522 1 1 1 47.6579 52.27 46.2103 -0.468429 0.45399 -0.757936 0.489345 45 57.5 1 0.2 -523 1 1 -1 47.73 53.7897 47.6579 -0.45399 0.757936 -0.468429 0.489345 45 57.5 1 0.2 -524 1 1 1 47.4194 53.9173 48.2692 -0.516121 0.783452 -0.346153 0.489345 45 57.5 1 0.2 -525 1 1 -1 47.0611 53.441 47.8734 -0.587785 0.688191 -0.425325 0.489345 45 57.5 1 0.2 -526 1 1 1 47.1437 53.9632 48.9349 -0.571252 0.792649 -0.213023 0.489345 45 57.5 1 0.2 -527 1 1 -1 46.7629 53.5116 48.52 -0.647412 0.70231 -0.296004 0.489345 45 57.5 1 0.2 -528 1 1 1 46.4645 53.0075 48.1413 -0.707107 0.601501 -0.371748 0.489345 45 57.5 1 0.2 -529 1 1 -1 46.9925 51.8587 46.4645 -0.601501 0.371748 -0.707107 0.489345 45 57.5 1 0.2 -530 1 1 1 46.559 52.1266 47.0611 -0.688191 0.425325 -0.587785 0.489345 45 57.5 1 0.2 -531 1 1 -1 46.4884 51.48 46.7629 -0.70231 0.296004 -0.647412 0.489345 45 57.5 1 0.2 -532 1 1 1 46.2103 52.3421 47.73 -0.757936 0.468429 -0.45399 0.489345 45 57.5 1 0.2 -533 1 1 -1 46.0827 51.7308 47.4194 -0.783452 0.346153 -0.516121 0.489345 45 57.5 1 0.2 -534 1 1 1 46.0368 51.0651 47.1437 -0.792649 0.213023 -0.571252 0.489345 45 57.5 1 0.2 -535 1 1 -1 47.4331 53.2329 47.1787 -0.513375 0.646578 -0.564254 0.489345 45 57.5 1 0.2 -536 1 1 1 46.7671 52.8213 47.4331 -0.646578 0.564254 -0.513375 0.489345 45 57.5 1 0.2 -537 1 1 -1 47.1787 52.5669 46.7671 -0.564254 0.513375 -0.646578 0.489345 45 57.5 1 0.2 -538 1 1 1 51.0651 52.8563 46.0368 0.213023 0.571252 -0.792649 0.489345 45 57.5 1 0.2 -539 1 1 -1 51.7308 52.5806 46.0827 0.346153 0.516121 -0.783452 0.489345 45 57.5 1 0.2 -540 1 1 1 52.3421 52.27 46.2103 0.468429 0.45399 -0.757936 0.489345 45 57.5 1 0.2 -541 1 1 -1 52.1266 52.9389 46.559 0.425325 0.587785 -0.688191 0.489345 45 57.5 1 0.2 -542 1 1 1 51.48 53.2371 46.4884 0.296004 0.647412 -0.70231 0.489345 45 57.5 1 0.2 -543 1 1 -1 51.8587 53.5355 46.9925 0.371748 0.707107 -0.601501 0.489345 45 57.5 1 0.2 -544 1 1 1 53.0075 51.8587 46.4645 0.601501 0.371748 -0.707107 0.489345 45 57.5 1 0.2 -545 1 1 -1 53.5116 51.48 46.7629 0.70231 0.296004 -0.647412 0.489345 45 57.5 1 0.2 -546 1 1 1 53.441 52.1266 47.0611 0.688191 0.425325 -0.587785 0.489345 45 57.5 1 0.2 -547 1 1 -1 53.9632 51.0651 47.1437 0.792649 0.213023 -0.571252 0.489345 45 57.5 1 0.2 -548 1 1 1 53.9173 51.7308 47.4194 0.783452 0.346153 -0.516121 0.489345 45 57.5 1 0.2 -549 1 1 -1 53.7897 52.3421 47.73 0.757936 0.468429 -0.45399 0.489345 45 57.5 1 0.2 -550 1 1 1 52.27 53.7897 47.6579 0.45399 0.757936 -0.468429 0.489345 45 57.5 1 0.2 -551 1 1 -1 52.9389 53.441 47.8734 0.587785 0.688191 -0.425325 0.489345 45 57.5 1 0.2 -552 1 1 1 52.5806 53.9173 48.2692 0.516121 0.783452 -0.346153 0.489345 45 57.5 1 0.2 -553 1 1 -1 53.5355 53.0075 48.1413 0.707107 0.601501 -0.371748 0.489345 45 57.5 1 0.2 -554 1 1 1 53.2371 53.5116 48.52 0.647412 0.70231 -0.296004 0.489345 45 57.5 1 0.2 -555 1 1 -1 52.8563 53.9632 48.9349 0.571252 0.792649 -0.213023 0.489345 45 57.5 1 0.2 -556 1 1 1 52.8213 52.5669 46.7671 0.564254 0.513375 -0.646578 0.489345 45 57.5 1 0.2 -557 1 1 -1 53.2329 52.8213 47.4331 0.646578 0.564254 -0.513375 0.489345 45 57.5 1 0.2 -558 1 1 1 52.5669 53.2329 47.1787 0.513375 0.646578 -0.564254 0.489345 45 57.5 1 0.2 -559 1 1 -1 48.9349 47.1437 46.0368 -0.213023 -0.571252 -0.792649 0.489345 45 57.5 1 0.2 -560 1 1 1 48.2692 47.4194 46.0827 -0.346153 -0.516121 -0.783452 0.489345 45 57.5 1 0.2 -561 1 1 -1 47.6579 47.73 46.2103 -0.468429 -0.45399 -0.757936 0.489345 45 57.5 1 0.2 -562 1 1 1 47.8734 47.0611 46.559 -0.425325 -0.587785 -0.688191 0.489345 45 57.5 1 0.2 -563 1 1 -1 48.52 46.7629 46.4884 -0.296004 -0.647412 -0.70231 0.489345 45 57.5 1 0.2 -564 1 1 1 48.1413 46.4645 46.9925 -0.371748 -0.707107 -0.601501 0.489345 45 57.5 1 0.2 -565 1 1 -1 46.9925 48.1413 46.4645 -0.601501 -0.371748 -0.707107 0.489345 45 57.5 1 0.2 -566 1 1 1 46.4884 48.52 46.7629 -0.70231 -0.296004 -0.647412 0.489345 45 57.5 1 0.2 -567 1 1 -1 46.559 47.8734 47.0611 -0.688191 -0.425325 -0.587785 0.489345 45 57.5 1 0.2 -568 1 1 1 46.0368 48.9349 47.1437 -0.792649 -0.213023 -0.571252 0.489345 45 57.5 1 0.2 -569 1 1 -1 46.0827 48.2692 47.4194 -0.783452 -0.346153 -0.516121 0.489345 45 57.5 1 0.2 -570 1 1 1 46.2103 47.6579 47.73 -0.757936 -0.468429 -0.45399 0.489345 45 57.5 1 0.2 -571 1 1 -1 47.73 46.2103 47.6579 -0.45399 -0.757936 -0.468429 0.489345 45 57.5 1 0.2 -572 1 1 1 47.0611 46.559 47.8734 -0.587785 -0.688191 -0.425325 0.489345 45 57.5 1 0.2 -573 1 1 -1 47.4194 46.0827 48.2692 -0.516121 -0.783452 -0.346153 0.489345 45 57.5 1 0.2 -574 1 1 1 46.4645 46.9925 48.1413 -0.707107 -0.601501 -0.371748 0.489345 45 57.5 1 0.2 -575 1 1 -1 46.7629 46.4884 48.52 -0.647412 -0.70231 -0.296004 0.489345 45 57.5 1 0.2 -576 1 1 1 47.1437 46.0368 48.9349 -0.571252 -0.792649 -0.213023 0.489345 45 57.5 1 0.2 -577 1 1 -1 47.1787 47.4331 46.7671 -0.564254 -0.513375 -0.646578 0.489345 45 57.5 1 0.2 -578 1 1 1 46.7671 47.1787 47.4331 -0.646578 -0.564254 -0.513375 0.489345 45 57.5 1 0.2 -579 1 1 -1 47.4331 46.7671 47.1787 -0.513375 -0.646578 -0.564254 0.489345 45 57.5 1 0.2 -580 1 1 1 51.0651 47.1437 46.0368 0.213023 -0.571252 -0.792649 0.489345 45 57.5 1 0.2 -581 1 1 -1 51.48 46.7629 46.4884 0.296004 -0.647412 -0.70231 0.489345 45 57.5 1 0.2 -582 1 1 1 51.8587 46.4645 46.9925 0.371748 -0.707107 -0.601501 0.489345 45 57.5 1 0.2 -583 1 1 -1 52.1266 47.0611 46.559 0.425325 -0.587785 -0.688191 0.489345 45 57.5 1 0.2 -584 1 1 1 51.7308 47.4194 46.0827 0.346153 -0.516121 -0.783452 0.489345 45 57.5 1 0.2 -585 1 1 -1 52.3421 47.73 46.2103 0.468429 -0.45399 -0.757936 0.489345 45 57.5 1 0.2 -586 1 1 1 52.27 46.2103 47.6579 0.45399 -0.757936 -0.468429 0.489345 45 57.5 1 0.2 -587 1 1 -1 52.5806 46.0827 48.2692 0.516121 -0.783452 -0.346153 0.489345 45 57.5 1 0.2 -588 1 1 1 52.9389 46.559 47.8734 0.587785 -0.688191 -0.425325 0.489345 45 57.5 1 0.2 -589 1 1 -1 52.8563 46.0368 48.9349 0.571252 -0.792649 -0.213023 0.489345 45 57.5 1 0.2 -590 1 1 1 53.2371 46.4884 48.52 0.647412 -0.70231 -0.296004 0.489345 45 57.5 1 0.2 -591 1 1 -1 53.5355 46.9925 48.1413 0.707107 -0.601501 -0.371748 0.489345 45 57.5 1 0.2 -592 1 1 1 53.0075 48.1413 46.4645 0.601501 -0.371748 -0.707107 0.489345 45 57.5 1 0.2 -593 1 1 -1 53.441 47.8734 47.0611 0.688191 -0.425325 -0.587785 0.489345 45 57.5 1 0.2 -594 1 1 1 53.5116 48.52 46.7629 0.70231 -0.296004 -0.647412 0.489345 45 57.5 1 0.2 -595 1 1 -1 53.7897 47.6579 47.73 0.757936 -0.468429 -0.45399 0.489345 45 57.5 1 0.2 -596 1 1 1 53.9173 48.2692 47.4194 0.783452 -0.346153 -0.516121 0.489345 45 57.5 1 0.2 -597 1 1 -1 53.9632 48.9349 47.1437 0.792649 -0.213023 -0.571252 0.489345 45 57.5 1 0.2 -598 1 1 1 52.5669 46.7671 47.1787 0.513375 -0.646578 -0.564254 0.489345 45 57.5 1 0.2 -599 1 1 -1 53.2329 47.1787 47.4331 0.646578 -0.564254 -0.513375 0.489345 45 57.5 1 0.2 -600 1 1 1 52.8213 47.4331 46.7671 0.564254 -0.513375 -0.646578 0.489345 45 57.5 1 0.2 -601 1 1 -1 48.9349 47.1437 53.9632 -0.213023 -0.571252 0.792649 0.489345 45 57.5 1 0.2 -602 1 1 1 48.52 46.7629 53.5116 -0.296004 -0.647412 0.70231 0.489345 45 57.5 1 0.2 -603 1 1 -1 48.1413 46.4645 53.0075 -0.371748 -0.707107 0.601501 0.489345 45 57.5 1 0.2 -604 1 1 1 47.8734 47.0611 53.441 -0.425325 -0.587785 0.688191 0.489345 45 57.5 1 0.2 -605 1 1 -1 48.2692 47.4194 53.9173 -0.346153 -0.516121 0.783452 0.489345 45 57.5 1 0.2 -606 1 1 1 47.6579 47.73 53.7897 -0.468429 -0.45399 0.757936 0.489345 45 57.5 1 0.2 -607 1 1 -1 47.73 46.2103 52.3421 -0.45399 -0.757936 0.468429 0.489345 45 57.5 1 0.2 -608 1 1 1 47.4194 46.0827 51.7308 -0.516121 -0.783452 0.346153 0.489345 45 57.5 1 0.2 -609 1 1 -1 47.0611 46.559 52.1266 -0.587785 -0.688191 0.425325 0.489345 45 57.5 1 0.2 -610 1 1 1 47.1437 46.0368 51.0651 -0.571252 -0.792649 0.213023 0.489345 45 57.5 1 0.2 -611 1 1 -1 46.7629 46.4884 51.48 -0.647412 -0.70231 0.296004 0.489345 45 57.5 1 0.2 -612 1 1 1 46.4645 46.9925 51.8587 -0.707107 -0.601501 0.371748 0.489345 45 57.5 1 0.2 -613 1 1 -1 46.9925 48.1413 53.5355 -0.601501 -0.371748 0.707107 0.489345 45 57.5 1 0.2 -614 1 1 1 46.559 47.8734 52.9389 -0.688191 -0.425325 0.587785 0.489345 45 57.5 1 0.2 -615 1 1 -1 46.4884 48.52 53.2371 -0.70231 -0.296004 0.647412 0.489345 45 57.5 1 0.2 -616 1 1 1 46.2103 47.6579 52.27 -0.757936 -0.468429 0.45399 0.489345 45 57.5 1 0.2 -617 1 1 -1 46.0827 48.2692 52.5806 -0.783452 -0.346153 0.516121 0.489345 45 57.5 1 0.2 -618 1 1 1 46.0368 48.9349 52.8563 -0.792649 -0.213023 0.571252 0.489345 45 57.5 1 0.2 -619 1 1 -1 47.4331 46.7671 52.8213 -0.513375 -0.646578 0.564254 0.489345 45 57.5 1 0.2 -620 1 1 1 46.7671 47.1787 52.5669 -0.646578 -0.564254 0.513375 0.489345 45 57.5 1 0.2 -621 1 1 -1 47.1787 47.4331 53.2329 -0.564254 -0.513375 0.646578 0.489345 45 57.5 1 0.2 -622 1 1 1 51.0651 47.1437 53.9632 0.213023 -0.571252 0.792649 0.489345 45 57.5 1 0.2 -623 1 1 -1 51.7308 47.4194 53.9173 0.346153 -0.516121 0.783452 0.489345 45 57.5 1 0.2 -624 1 1 1 52.3421 47.73 53.7897 0.468429 -0.45399 0.757936 0.489345 45 57.5 1 0.2 -625 1 1 -1 52.1266 47.0611 53.441 0.425325 -0.587785 0.688191 0.489345 45 57.5 1 0.2 -626 1 1 1 51.48 46.7629 53.5116 0.296004 -0.647412 0.70231 0.489345 45 57.5 1 0.2 -627 1 1 -1 51.8587 46.4645 53.0075 0.371748 -0.707107 0.601501 0.489345 45 57.5 1 0.2 -628 1 1 1 53.0075 48.1413 53.5355 0.601501 -0.371748 0.707107 0.489345 45 57.5 1 0.2 -629 1 1 -1 53.5116 48.52 53.2371 0.70231 -0.296004 0.647412 0.489345 45 57.5 1 0.2 -630 1 1 1 53.441 47.8734 52.9389 0.688191 -0.425325 0.587785 0.489345 45 57.5 1 0.2 -631 1 1 -1 53.9632 48.9349 52.8563 0.792649 -0.213023 0.571252 0.489345 45 57.5 1 0.2 -632 1 1 1 53.9173 48.2692 52.5806 0.783452 -0.346153 0.516121 0.489345 45 57.5 1 0.2 -633 1 1 -1 53.7897 47.6579 52.27 0.757936 -0.468429 0.45399 0.489345 45 57.5 1 0.2 -634 1 1 1 52.27 46.2103 52.3421 0.45399 -0.757936 0.468429 0.489345 45 57.5 1 0.2 -635 1 1 -1 52.9389 46.559 52.1266 0.587785 -0.688191 0.425325 0.489345 45 57.5 1 0.2 -636 1 1 1 52.5806 46.0827 51.7308 0.516121 -0.783452 0.346153 0.489345 45 57.5 1 0.2 -637 1 1 -1 53.5355 46.9925 51.8587 0.707107 -0.601501 0.371748 0.489345 45 57.5 1 0.2 -638 1 1 1 53.2371 46.4884 51.48 0.647412 -0.70231 0.296004 0.489345 45 57.5 1 0.2 -639 1 1 -1 52.8563 46.0368 51.0651 0.571252 -0.792649 0.213023 0.489345 45 57.5 1 0.2 -640 1 1 1 52.8213 47.4331 53.2329 0.564254 -0.513375 0.646578 0.489345 45 57.5 1 0.2 -641 1 1 -1 53.2329 47.1787 52.5669 0.646578 -0.564254 0.513375 0.489345 45 57.5 1 0.2 -642 1 1 1 52.5669 46.7671 52.8213 0.513375 -0.646578 0.564254 0.489345 45 57.5 1 0.2 +1 1 1 -1 50 52.6287 45.7467 0 0.525731 -0.850651 0.489345 45 57.5 57.5 0.2 +2 1 1 1 50.4054 53.0782 46.0808 0.0810867 0.615642 -0.783843 0.489345 45 57.5 57.5 0.2 +3 1 1 -1 49.5946 53.0782 46.0808 -0.0810867 0.615642 -0.783843 0.489345 45 57.5 57.5 0.2 +4 1 1 1 50.8031 53.4689 46.4898 0.160622 0.693781 -0.702046 0.489345 45 57.5 57.5 0.2 +5 1 1 -1 50 53.5145 46.4436 0 0.702907 -0.711282 0.489345 45 57.5 57.5 0.2 +6 1 1 1 49.1969 53.4689 46.4898 -0.160622 0.693781 -0.702046 0.489345 45 57.5 57.5 0.2 +7 1 1 -1 51.1854 53.7933 46.9659 0.237086 0.758653 -0.606824 0.489345 45 57.5 57.5 0.2 +8 1 1 1 50.4057 53.901 46.8988 0.0811424 0.780205 -0.620239 0.489345 45 57.5 57.5 0.2 +9 1 1 -1 51.5451 54.0451 47.5 0.309017 0.809017 -0.499999 0.489345 45 57.5 57.5 0.2 +10 1 1 1 50.7822 54.2009 47.4037 0.156435 0.840178 -0.519258 0.489345 45 57.5 57.5 0.2 +11 1 1 -1 50 54.2533 47.3713 0 0.850651 -0.52573 0.489345 45 57.5 57.5 0.2 +12 1 1 1 49.5943 53.901 46.8988 -0.0811424 0.780205 -0.620239 0.489345 45 57.5 57.5 0.2 +13 1 1 -1 48.8146 53.7933 46.9659 -0.237086 0.758653 -0.606824 0.489345 45 57.5 57.5 0.2 +14 1 1 1 49.2178 54.2009 47.4037 -0.156435 0.840178 -0.519258 0.489345 45 57.5 57.5 0.2 +15 1 1 -1 48.4549 54.0451 47.5 -0.309017 0.809017 -0.499999 0.489345 45 57.5 57.5 0.2 +16 1 1 1 51.8752 54.2196 48.0819 0.375038 0.843912 -0.383614 0.489345 45 57.5 57.5 0.2 +17 1 1 -1 51.1934 54.455 48.0691 0.238678 0.891006 -0.386187 0.489345 45 57.5 57.5 0.2 +18 1 1 1 52.1694 54.3133 48.7005 0.433888 0.862669 -0.259892 0.489345 45 57.5 57.5 0.2 +19 1 1 -1 51.5063 54.5812 48.6796 0.301259 0.916244 -0.264082 0.489345 45 57.5 57.5 0.2 +20 1 1 1 50.8123 54.7553 48.6857 0.16246 0.951056 -0.262865 0.489345 45 57.5 57.5 0.2 +21 1 1 -1 52.4222 54.3246 49.344 0.484441 0.864929 -0.1312 0.489345 45 57.5 57.5 0.2 +22 1 1 1 51.7911 54.6215 49.3417 0.358229 0.924304 -0.131656 0.489345 45 57.5 57.5 0.2 +23 1 1 -1 52.6287 54.2533 50 0.525731 0.850651 0 0.489345 45 57.5 57.5 0.2 +24 1 1 1 52.0168 54.5752 50 0.403355 0.915043 0 0.489345 45 57.5 57.5 0.2 +25 1 1 -1 51.3663 54.8097 50 0.273267 0.961938 0 0.489345 45 57.5 57.5 0.2 +26 1 1 1 51.1006 54.832 49.336 0.220117 0.966393 -0.132793 0.489345 45 57.5 57.5 0.2 +27 1 1 -1 50.4112 54.9384 49.3346 0.0822426 0.987688 -0.133071 0.489345 45 57.5 57.5 0.2 +28 1 1 1 50.6898 54.9522 50 0.137952 0.990439 0 0.489345 45 57.5 57.5 0.2 +29 1 1 -1 50 55 50 0 1 0 0.489345 45 57.5 57.5 0.2 +30 1 1 1 48.8066 54.455 48.0691 -0.238678 0.891006 -0.386187 0.489345 45 57.5 57.5 0.2 +31 1 1 -1 48.1248 54.2196 48.0819 -0.375038 0.843912 -0.383614 0.489345 45 57.5 57.5 0.2 +32 1 1 1 49.1877 54.7553 48.6857 -0.16246 0.951056 -0.262865 0.489345 45 57.5 57.5 0.2 +33 1 1 -1 48.4937 54.5812 48.6796 -0.301259 0.916244 -0.264082 0.489345 45 57.5 57.5 0.2 +34 1 1 1 47.8306 54.3133 48.7005 -0.433888 0.862669 -0.259892 0.489345 45 57.5 57.5 0.2 +35 1 1 -1 49.5888 54.9384 49.3346 -0.0822426 0.987688 -0.133071 0.489345 45 57.5 57.5 0.2 +36 1 1 1 48.8994 54.832 49.336 -0.220117 0.966393 -0.132793 0.489345 45 57.5 57.5 0.2 +37 1 1 -1 49.3102 54.9522 50 -0.137952 0.990439 0 0.489345 45 57.5 57.5 0.2 +38 1 1 1 48.6337 54.8097 50 -0.273267 0.961938 0 0.489345 45 57.5 57.5 0.2 +39 1 1 -1 48.2089 54.6215 49.3417 -0.358229 0.924304 -0.131656 0.489345 45 57.5 57.5 0.2 +40 1 1 1 47.5778 54.3246 49.344 -0.484441 0.864929 -0.1312 0.489345 45 57.5 57.5 0.2 +41 1 1 -1 47.9832 54.5752 50 -0.403355 0.915043 0 0.489345 45 57.5 57.5 0.2 +42 1 1 1 47.3713 54.2533 50 -0.525731 0.850651 0 0.489345 45 57.5 57.5 0.2 +43 1 1 -1 50.4116 54.5649 48.002 0.0823234 0.912983 -0.399606 0.489345 45 57.5 57.5 0.2 +44 1 1 1 50 54.8193 48.668 0 0.963861 -0.266405 0.489345 45 57.5 57.5 0.2 +45 1 1 -1 49.5884 54.5649 48.002 -0.0823234 0.912983 -0.399606 0.489345 45 57.5 57.5 0.2 +46 1 1 1 50 52.6287 54.2533 0 0.525731 0.850651 0.489345 45 57.5 57.5 0.2 +47 1 1 -1 49.5946 53.0782 53.9192 -0.0810867 0.615642 0.783843 0.489345 45 57.5 57.5 0.2 +48 1 1 1 50.4054 53.0782 53.9192 0.0810867 0.615642 0.783843 0.489345 45 57.5 57.5 0.2 +49 1 1 -1 49.1969 53.4689 53.5102 -0.160622 0.693781 0.702046 0.489345 45 57.5 57.5 0.2 +50 1 1 1 50 53.5145 53.5564 0 0.702907 0.711282 0.489345 45 57.5 57.5 0.2 +51 1 1 -1 50.8031 53.4689 53.5102 0.160622 0.693781 0.702046 0.489345 45 57.5 57.5 0.2 +52 1 1 1 48.8146 53.7933 53.0341 -0.237086 0.758653 0.606824 0.489345 45 57.5 57.5 0.2 +53 1 1 -1 49.5943 53.901 53.1012 -0.0811424 0.780205 0.620239 0.489345 45 57.5 57.5 0.2 +54 1 1 1 48.4549 54.0451 52.5 -0.309017 0.809017 0.499999 0.489345 45 57.5 57.5 0.2 +55 1 1 -1 49.2178 54.2009 52.5963 -0.156435 0.840178 0.519258 0.489345 45 57.5 57.5 0.2 +56 1 1 1 50 54.2533 52.6287 0 0.850651 0.52573 0.489345 45 57.5 57.5 0.2 +57 1 1 -1 50.4057 53.901 53.1012 0.0811424 0.780205 0.620239 0.489345 45 57.5 57.5 0.2 +58 1 1 1 51.1854 53.7933 53.0341 0.237086 0.758653 0.606824 0.489345 45 57.5 57.5 0.2 +59 1 1 -1 50.7822 54.2009 52.5963 0.156435 0.840178 0.519258 0.489345 45 57.5 57.5 0.2 +60 1 1 1 51.5451 54.0451 52.5 0.309017 0.809017 0.499999 0.489345 45 57.5 57.5 0.2 +61 1 1 -1 48.1248 54.2196 51.9181 -0.375038 0.843912 0.383614 0.489345 45 57.5 57.5 0.2 +62 1 1 1 48.8066 54.455 51.9309 -0.238678 0.891006 0.386187 0.489345 45 57.5 57.5 0.2 +63 1 1 -1 47.8306 54.3133 51.2995 -0.433888 0.862669 0.259892 0.489345 45 57.5 57.5 0.2 +64 1 1 1 48.4937 54.5812 51.3204 -0.301259 0.916244 0.264082 0.489345 45 57.5 57.5 0.2 +65 1 1 -1 49.1877 54.7553 51.3143 -0.16246 0.951056 0.262865 0.489345 45 57.5 57.5 0.2 +66 1 1 1 47.5778 54.3246 50.656 -0.484441 0.864929 0.1312 0.489345 45 57.5 57.5 0.2 +67 1 1 -1 48.2089 54.6215 50.6583 -0.358229 0.924304 0.131656 0.489345 45 57.5 57.5 0.2 +68 1 1 1 48.8994 54.832 50.664 -0.220117 0.966393 0.132793 0.489345 45 57.5 57.5 0.2 +69 1 1 -1 49.5888 54.9384 50.6654 -0.0822426 0.987688 0.133071 0.489345 45 57.5 57.5 0.2 +70 1 1 1 51.1934 54.455 51.9309 0.238678 0.891006 0.386187 0.489345 45 57.5 57.5 0.2 +71 1 1 -1 51.8752 54.2196 51.9181 0.375038 0.843912 0.383614 0.489345 45 57.5 57.5 0.2 +72 1 1 1 50.8123 54.7553 51.3143 0.16246 0.951056 0.262865 0.489345 45 57.5 57.5 0.2 +73 1 1 -1 51.5063 54.5812 51.3204 0.301259 0.916244 0.264082 0.489345 45 57.5 57.5 0.2 +74 1 1 1 52.1694 54.3133 51.2995 0.433888 0.862669 0.259892 0.489345 45 57.5 57.5 0.2 +75 1 1 -1 50.4112 54.9384 50.6654 0.0822426 0.987688 0.133071 0.489345 45 57.5 57.5 0.2 +76 1 1 1 51.1006 54.832 50.664 0.220117 0.966393 0.132793 0.489345 45 57.5 57.5 0.2 +77 1 1 -1 51.7911 54.6215 50.6583 0.358229 0.924304 0.131656 0.489345 45 57.5 57.5 0.2 +78 1 1 1 52.4222 54.3246 50.656 0.484441 0.864929 0.1312 0.489345 45 57.5 57.5 0.2 +79 1 1 -1 49.5884 54.5649 51.998 -0.0823234 0.912983 0.399606 0.489345 45 57.5 57.5 0.2 +80 1 1 1 50 54.8193 51.332 0 0.963861 0.266405 0.489345 45 57.5 57.5 0.2 +81 1 1 -1 50.4116 54.5649 51.998 0.0823234 0.912983 0.399606 0.489345 45 57.5 57.5 0.2 +82 1 1 1 50 52.0168 54.5752 0 0.403355 0.915043 0.489345 45 57.5 57.5 0.2 +83 1 1 -1 49.344 52.4222 54.3246 -0.1312 0.484441 0.864929 0.489345 45 57.5 57.5 0.2 +84 1 1 1 50 51.3663 54.8097 0 0.273267 0.961938 0.489345 45 57.5 57.5 0.2 +85 1 1 -1 49.3417 51.7911 54.6215 -0.131656 0.358229 0.924304 0.489345 45 57.5 57.5 0.2 +86 1 1 1 48.7005 52.1694 54.3133 -0.259892 0.433888 0.862669 0.489345 45 57.5 57.5 0.2 +87 1 1 -1 50 50.6898 54.9522 0 0.137952 0.990439 0.489345 45 57.5 57.5 0.2 +88 1 1 1 49.336 51.1006 54.832 -0.132793 0.220117 0.966393 0.489345 45 57.5 57.5 0.2 +89 1 1 -1 50 50 55 0 0 1 0.489345 45 57.5 57.5 0.2 +90 1 1 1 49.3346 50.4112 54.9384 -0.133071 0.0822426 0.987688 0.489345 45 57.5 57.5 0.2 +91 1 1 -1 48.6857 50.8123 54.7553 -0.262865 0.16246 0.951056 0.489345 45 57.5 57.5 0.2 +92 1 1 1 48.6796 51.5063 54.5812 -0.264082 0.301259 0.916244 0.489345 45 57.5 57.5 0.2 +93 1 1 -1 48.0819 51.8752 54.2196 -0.383614 0.375038 0.843912 0.489345 45 57.5 57.5 0.2 +94 1 1 1 48.0691 51.1934 54.455 -0.386187 0.238678 0.891006 0.489345 45 57.5 57.5 0.2 +95 1 1 -1 47.5 51.5451 54.0451 -0.499999 0.309017 0.809017 0.489345 45 57.5 57.5 0.2 +96 1 1 1 50 49.3102 54.9522 0 -0.137952 0.990439 0.489345 45 57.5 57.5 0.2 +97 1 1 -1 49.3346 49.5888 54.9384 -0.133071 -0.0822426 0.987688 0.489345 45 57.5 57.5 0.2 +98 1 1 1 50 48.6337 54.8097 0 -0.273267 0.961938 0.489345 45 57.5 57.5 0.2 +99 1 1 -1 49.336 48.8994 54.832 -0.132793 -0.220117 0.966393 0.489345 45 57.5 57.5 0.2 +100 1 1 1 48.6857 49.1877 54.7553 -0.262865 -0.16246 0.951056 0.489345 45 57.5 57.5 0.2 +101 1 1 -1 50 47.9832 54.5752 0 -0.403355 0.915043 0.489345 45 57.5 57.5 0.2 +102 1 1 1 49.3417 48.2089 54.6215 -0.131656 -0.358229 0.924304 0.489345 45 57.5 57.5 0.2 +103 1 1 -1 50 47.3713 54.2533 0 -0.525731 0.850651 0.489345 45 57.5 57.5 0.2 +104 1 1 1 49.344 47.5778 54.3246 -0.1312 -0.484441 0.864929 0.489345 45 57.5 57.5 0.2 +105 1 1 -1 48.7005 47.8306 54.3133 -0.259892 -0.433888 0.862669 0.489345 45 57.5 57.5 0.2 +106 1 1 1 48.6796 48.4937 54.5812 -0.264082 -0.301259 0.916244 0.489345 45 57.5 57.5 0.2 +107 1 1 -1 48.0691 48.8066 54.455 -0.386187 -0.238678 0.891006 0.489345 45 57.5 57.5 0.2 +108 1 1 1 48.0819 48.1248 54.2196 -0.383614 -0.375038 0.843912 0.489345 45 57.5 57.5 0.2 +109 1 1 -1 47.5 48.4549 54.0451 -0.499999 -0.309017 0.809017 0.489345 45 57.5 57.5 0.2 +110 1 1 1 47.4037 50.7822 54.2009 -0.519258 0.156435 0.840178 0.489345 45 57.5 57.5 0.2 +111 1 1 -1 46.9659 51.1854 53.7933 -0.606824 0.237086 0.758653 0.489345 45 57.5 57.5 0.2 +112 1 1 1 47.3713 50 54.2533 -0.52573 0 0.850651 0.489345 45 57.5 57.5 0.2 +113 1 1 -1 46.8988 50.4057 53.901 -0.620239 0.0811424 0.780205 0.489345 45 57.5 57.5 0.2 +114 1 1 1 46.4898 50.8031 53.4689 -0.702046 0.160622 0.693781 0.489345 45 57.5 57.5 0.2 +115 1 1 -1 47.4037 49.2178 54.2009 -0.519258 -0.156435 0.840178 0.489345 45 57.5 57.5 0.2 +116 1 1 1 46.8988 49.5943 53.901 -0.620239 -0.0811424 0.780205 0.489345 45 57.5 57.5 0.2 +117 1 1 -1 46.9659 48.8146 53.7933 -0.606824 -0.237086 0.758653 0.489345 45 57.5 57.5 0.2 +118 1 1 1 46.4898 49.1969 53.4689 -0.702046 -0.160622 0.693781 0.489345 45 57.5 57.5 0.2 +119 1 1 -1 46.4436 50 53.5145 -0.711282 0 0.702907 0.489345 45 57.5 57.5 0.2 +120 1 1 1 46.0808 50.4054 53.0782 -0.783843 0.0810867 0.615642 0.489345 45 57.5 57.5 0.2 +121 1 1 -1 46.0808 49.5946 53.0782 -0.783843 -0.0810867 0.615642 0.489345 45 57.5 57.5 0.2 +122 1 1 1 45.7467 50 52.6287 -0.850651 0 0.525731 0.489345 45 57.5 57.5 0.2 +123 1 1 -1 48.668 50 54.8193 -0.266405 0 0.963861 0.489345 45 57.5 57.5 0.2 +124 1 1 1 48.002 49.5884 54.5649 -0.399606 -0.0823234 0.912983 0.489345 45 57.5 57.5 0.2 +125 1 1 -1 48.002 50.4116 54.5649 -0.399606 0.0823234 0.912983 0.489345 45 57.5 57.5 0.2 +126 1 1 1 50.656 52.4222 54.3246 0.1312 0.484441 0.864929 0.489345 45 57.5 57.5 0.2 +127 1 1 -1 51.2995 52.1694 54.3133 0.259892 0.433888 0.862669 0.489345 45 57.5 57.5 0.2 +128 1 1 1 50.6583 51.7911 54.6215 0.131656 0.358229 0.924304 0.489345 45 57.5 57.5 0.2 +129 1 1 -1 51.9181 51.8752 54.2196 0.383614 0.375038 0.843912 0.489345 45 57.5 57.5 0.2 +130 1 1 1 51.3204 51.5063 54.5812 0.264082 0.301259 0.916244 0.489345 45 57.5 57.5 0.2 +131 1 1 -1 52.5 51.5451 54.0451 0.499999 0.309017 0.809017 0.489345 45 57.5 57.5 0.2 +132 1 1 1 51.9309 51.1934 54.455 0.386187 0.238678 0.891006 0.489345 45 57.5 57.5 0.2 +133 1 1 -1 51.3143 50.8123 54.7553 0.262865 0.16246 0.951056 0.489345 45 57.5 57.5 0.2 +134 1 1 1 50.664 51.1006 54.832 0.132793 0.220117 0.966393 0.489345 45 57.5 57.5 0.2 +135 1 1 -1 50.6654 50.4112 54.9384 0.133071 0.0822426 0.987688 0.489345 45 57.5 57.5 0.2 +136 1 1 1 53.0341 51.1854 53.7933 0.606824 0.237086 0.758653 0.489345 45 57.5 57.5 0.2 +137 1 1 -1 52.5963 50.7822 54.2009 0.519258 0.156435 0.840178 0.489345 45 57.5 57.5 0.2 +138 1 1 1 53.5102 50.8031 53.4689 0.702046 0.160622 0.693781 0.489345 45 57.5 57.5 0.2 +139 1 1 -1 53.1012 50.4057 53.901 0.620239 0.0811424 0.780205 0.489345 45 57.5 57.5 0.2 +140 1 1 1 52.6287 50 54.2533 0.52573 0 0.850651 0.489345 45 57.5 57.5 0.2 +141 1 1 -1 53.9192 50.4054 53.0782 0.783843 0.0810867 0.615642 0.489345 45 57.5 57.5 0.2 +142 1 1 1 53.5564 50 53.5145 0.711282 0 0.702907 0.489345 45 57.5 57.5 0.2 +143 1 1 -1 54.2533 50 52.6287 0.850651 0 0.525731 0.489345 45 57.5 57.5 0.2 +144 1 1 1 53.9192 49.5946 53.0782 0.783843 -0.0810867 0.615642 0.489345 45 57.5 57.5 0.2 +145 1 1 -1 53.5102 49.1969 53.4689 0.702046 -0.160622 0.693781 0.489345 45 57.5 57.5 0.2 +146 1 1 1 53.1012 49.5943 53.901 0.620239 -0.0811424 0.780205 0.489345 45 57.5 57.5 0.2 +147 1 1 -1 52.5963 49.2178 54.2009 0.519258 -0.156435 0.840178 0.489345 45 57.5 57.5 0.2 +148 1 1 1 53.0341 48.8146 53.7933 0.606824 -0.237086 0.758653 0.489345 45 57.5 57.5 0.2 +149 1 1 -1 52.5 48.4549 54.0451 0.499999 -0.309017 0.809017 0.489345 45 57.5 57.5 0.2 +150 1 1 1 50.6654 49.5888 54.9384 0.133071 -0.0822426 0.987688 0.489345 45 57.5 57.5 0.2 +151 1 1 -1 51.3143 49.1877 54.7553 0.262865 -0.16246 0.951056 0.489345 45 57.5 57.5 0.2 +152 1 1 1 50.664 48.8994 54.832 0.132793 -0.220117 0.966393 0.489345 45 57.5 57.5 0.2 +153 1 1 -1 51.9309 48.8066 54.455 0.386187 -0.238678 0.891006 0.489345 45 57.5 57.5 0.2 +154 1 1 1 51.3204 48.4937 54.5812 0.264082 -0.301259 0.916244 0.489345 45 57.5 57.5 0.2 +155 1 1 -1 51.9181 48.1248 54.2196 0.383614 -0.375038 0.843912 0.489345 45 57.5 57.5 0.2 +156 1 1 1 51.2995 47.8306 54.3133 0.259892 -0.433888 0.862669 0.489345 45 57.5 57.5 0.2 +157 1 1 -1 50.6583 48.2089 54.6215 0.131656 -0.358229 0.924304 0.489345 45 57.5 57.5 0.2 +158 1 1 1 50.656 47.5778 54.3246 0.1312 -0.484441 0.864929 0.489345 45 57.5 57.5 0.2 +159 1 1 -1 51.998 50.4116 54.5649 0.399606 0.0823234 0.912983 0.489345 45 57.5 57.5 0.2 +160 1 1 1 51.998 49.5884 54.5649 0.399606 -0.0823234 0.912983 0.489345 45 57.5 57.5 0.2 +161 1 1 -1 51.332 50 54.8193 0.266405 0 0.963861 0.489345 45 57.5 57.5 0.2 +162 1 1 1 50 52.0168 45.4248 0 0.403355 -0.915043 0.489345 45 57.5 57.5 0.2 +163 1 1 -1 50.656 52.4222 45.6754 0.1312 0.484441 -0.864929 0.489345 45 57.5 57.5 0.2 +164 1 1 1 50 51.3663 45.1903 0 0.273267 -0.961938 0.489345 45 57.5 57.5 0.2 +165 1 1 -1 50.6583 51.7911 45.3785 0.131656 0.358229 -0.924304 0.489345 45 57.5 57.5 0.2 +166 1 1 1 51.2995 52.1694 45.6867 0.259892 0.433888 -0.862669 0.489345 45 57.5 57.5 0.2 +167 1 1 -1 50 50.6898 45.0478 0 0.137952 -0.990439 0.489345 45 57.5 57.5 0.2 +168 1 1 1 50.664 51.1006 45.168 0.132793 0.220117 -0.966393 0.489345 45 57.5 57.5 0.2 +169 1 1 -1 50 50 45 0 0 -1 0.489345 45 57.5 57.5 0.2 +170 1 1 1 50.6654 50.4112 45.0616 0.133071 0.0822426 -0.987688 0.489345 45 57.5 57.5 0.2 +171 1 1 -1 51.3143 50.8123 45.2447 0.262865 0.16246 -0.951056 0.489345 45 57.5 57.5 0.2 +172 1 1 1 51.3204 51.5063 45.4188 0.264082 0.301259 -0.916244 0.489345 45 57.5 57.5 0.2 +173 1 1 -1 51.9181 51.8752 45.7804 0.383614 0.375038 -0.843912 0.489345 45 57.5 57.5 0.2 +174 1 1 1 51.9309 51.1934 45.545 0.386187 0.238678 -0.891006 0.489345 45 57.5 57.5 0.2 +175 1 1 -1 52.5 51.5451 45.9549 0.499999 0.309017 -0.809017 0.489345 45 57.5 57.5 0.2 +176 1 1 1 50 49.3102 45.0478 0 -0.137952 -0.990439 0.489345 45 57.5 57.5 0.2 +177 1 1 -1 50.6654 49.5888 45.0616 0.133071 -0.0822426 -0.987688 0.489345 45 57.5 57.5 0.2 +178 1 1 1 50 48.6337 45.1903 0 -0.273267 -0.961938 0.489345 45 57.5 57.5 0.2 +179 1 1 -1 50.664 48.8994 45.168 0.132793 -0.220117 -0.966393 0.489345 45 57.5 57.5 0.2 +180 1 1 1 51.3143 49.1877 45.2447 0.262865 -0.16246 -0.951056 0.489345 45 57.5 57.5 0.2 +181 1 1 -1 50 47.9832 45.4248 0 -0.403355 -0.915043 0.489345 45 57.5 57.5 0.2 +182 1 1 1 50.6583 48.2089 45.3785 0.131656 -0.358229 -0.924304 0.489345 45 57.5 57.5 0.2 +183 1 1 -1 50 47.3713 45.7467 0 -0.525731 -0.850651 0.489345 45 57.5 57.5 0.2 +184 1 1 1 50.656 47.5778 45.6754 0.1312 -0.484441 -0.864929 0.489345 45 57.5 57.5 0.2 +185 1 1 -1 51.2995 47.8306 45.6867 0.259892 -0.433888 -0.862669 0.489345 45 57.5 57.5 0.2 +186 1 1 1 51.3204 48.4937 45.4188 0.264082 -0.301259 -0.916244 0.489345 45 57.5 57.5 0.2 +187 1 1 -1 51.9309 48.8066 45.545 0.386187 -0.238678 -0.891006 0.489345 45 57.5 57.5 0.2 +188 1 1 1 51.9181 48.1248 45.7804 0.383614 -0.375038 -0.843912 0.489345 45 57.5 57.5 0.2 +189 1 1 -1 52.5 48.4549 45.9549 0.499999 -0.309017 -0.809017 0.489345 45 57.5 57.5 0.2 +190 1 1 1 52.5963 50.7822 45.7991 0.519258 0.156435 -0.840178 0.489345 45 57.5 57.5 0.2 +191 1 1 -1 53.0341 51.1854 46.2067 0.606824 0.237086 -0.758653 0.489345 45 57.5 57.5 0.2 +192 1 1 1 52.6287 50 45.7467 0.52573 0 -0.850651 0.489345 45 57.5 57.5 0.2 +193 1 1 -1 53.1012 50.4057 46.099 0.620239 0.0811424 -0.780205 0.489345 45 57.5 57.5 0.2 +194 1 1 1 53.5102 50.8031 46.5311 0.702046 0.160622 -0.693781 0.489345 45 57.5 57.5 0.2 +195 1 1 -1 52.5963 49.2178 45.7991 0.519258 -0.156435 -0.840178 0.489345 45 57.5 57.5 0.2 +196 1 1 1 53.1012 49.5943 46.099 0.620239 -0.0811424 -0.780205 0.489345 45 57.5 57.5 0.2 +197 1 1 -1 53.0341 48.8146 46.2067 0.606824 -0.237086 -0.758653 0.489345 45 57.5 57.5 0.2 +198 1 1 1 53.5102 49.1969 46.5311 0.702046 -0.160622 -0.693781 0.489345 45 57.5 57.5 0.2 +199 1 1 -1 53.5564 50 46.4855 0.711282 0 -0.702907 0.489345 45 57.5 57.5 0.2 +200 1 1 1 53.9192 50.4054 46.9218 0.783843 0.0810867 -0.615642 0.489345 45 57.5 57.5 0.2 +201 1 1 -1 53.9192 49.5946 46.9218 0.783843 -0.0810867 -0.615642 0.489345 45 57.5 57.5 0.2 +202 1 1 1 54.2533 50 47.3713 0.850651 0 -0.525731 0.489345 45 57.5 57.5 0.2 +203 1 1 -1 51.332 50 45.1807 0.266405 0 -0.963861 0.489345 45 57.5 57.5 0.2 +204 1 1 1 51.998 49.5884 45.4351 0.399606 -0.0823234 -0.912983 0.489345 45 57.5 57.5 0.2 +205 1 1 -1 51.998 50.4116 45.4351 0.399606 0.0823234 -0.912983 0.489345 45 57.5 57.5 0.2 +206 1 1 1 49.344 52.4222 45.6754 -0.1312 0.484441 -0.864929 0.489345 45 57.5 57.5 0.2 +207 1 1 -1 48.7005 52.1694 45.6867 -0.259892 0.433888 -0.862669 0.489345 45 57.5 57.5 0.2 +208 1 1 1 49.3417 51.7911 45.3785 -0.131656 0.358229 -0.924304 0.489345 45 57.5 57.5 0.2 +209 1 1 -1 48.0819 51.8752 45.7804 -0.383614 0.375038 -0.843912 0.489345 45 57.5 57.5 0.2 +210 1 1 1 48.6796 51.5063 45.4188 -0.264082 0.301259 -0.916244 0.489345 45 57.5 57.5 0.2 +211 1 1 -1 47.5 51.5451 45.9549 -0.499999 0.309017 -0.809017 0.489345 45 57.5 57.5 0.2 +212 1 1 1 48.0691 51.1934 45.545 -0.386187 0.238678 -0.891006 0.489345 45 57.5 57.5 0.2 +213 1 1 -1 48.6857 50.8123 45.2447 -0.262865 0.16246 -0.951056 0.489345 45 57.5 57.5 0.2 +214 1 1 1 49.336 51.1006 45.168 -0.132793 0.220117 -0.966393 0.489345 45 57.5 57.5 0.2 +215 1 1 -1 49.3346 50.4112 45.0616 -0.133071 0.0822426 -0.987688 0.489345 45 57.5 57.5 0.2 +216 1 1 1 46.9659 51.1854 46.2067 -0.606824 0.237086 -0.758653 0.489345 45 57.5 57.5 0.2 +217 1 1 -1 47.4037 50.7822 45.7991 -0.519258 0.156435 -0.840178 0.489345 45 57.5 57.5 0.2 +218 1 1 1 46.4898 50.8031 46.5311 -0.702046 0.160622 -0.693781 0.489345 45 57.5 57.5 0.2 +219 1 1 -1 46.8988 50.4057 46.099 -0.620239 0.0811424 -0.780205 0.489345 45 57.5 57.5 0.2 +220 1 1 1 47.3713 50 45.7467 -0.52573 0 -0.850651 0.489345 45 57.5 57.5 0.2 +221 1 1 -1 46.0808 50.4054 46.9218 -0.783843 0.0810867 -0.615642 0.489345 45 57.5 57.5 0.2 +222 1 1 1 46.4436 50 46.4855 -0.711282 0 -0.702907 0.489345 45 57.5 57.5 0.2 +223 1 1 -1 45.7467 50 47.3713 -0.850651 0 -0.525731 0.489345 45 57.5 57.5 0.2 +224 1 1 1 46.0808 49.5946 46.9218 -0.783843 -0.0810867 -0.615642 0.489345 45 57.5 57.5 0.2 +225 1 1 -1 46.4898 49.1969 46.5311 -0.702046 -0.160622 -0.693781 0.489345 45 57.5 57.5 0.2 +226 1 1 1 46.8988 49.5943 46.099 -0.620239 -0.0811424 -0.780205 0.489345 45 57.5 57.5 0.2 +227 1 1 -1 47.4037 49.2178 45.7991 -0.519258 -0.156435 -0.840178 0.489345 45 57.5 57.5 0.2 +228 1 1 1 46.9659 48.8146 46.2067 -0.606824 -0.237086 -0.758653 0.489345 45 57.5 57.5 0.2 +229 1 1 -1 47.5 48.4549 45.9549 -0.499999 -0.309017 -0.809017 0.489345 45 57.5 57.5 0.2 +230 1 1 1 49.3346 49.5888 45.0616 -0.133071 -0.0822426 -0.987688 0.489345 45 57.5 57.5 0.2 +231 1 1 -1 48.6857 49.1877 45.2447 -0.262865 -0.16246 -0.951056 0.489345 45 57.5 57.5 0.2 +232 1 1 1 49.336 48.8994 45.168 -0.132793 -0.220117 -0.966393 0.489345 45 57.5 57.5 0.2 +233 1 1 -1 48.0691 48.8066 45.545 -0.386187 -0.238678 -0.891006 0.489345 45 57.5 57.5 0.2 +234 1 1 1 48.6796 48.4937 45.4188 -0.264082 -0.301259 -0.916244 0.489345 45 57.5 57.5 0.2 +235 1 1 -1 48.0819 48.1248 45.7804 -0.383614 -0.375038 -0.843912 0.489345 45 57.5 57.5 0.2 +236 1 1 1 48.7005 47.8306 45.6867 -0.259892 -0.433888 -0.862669 0.489345 45 57.5 57.5 0.2 +237 1 1 -1 49.3417 48.2089 45.3785 -0.131656 -0.358229 -0.924304 0.489345 45 57.5 57.5 0.2 +238 1 1 1 49.344 47.5778 45.6754 -0.1312 -0.484441 -0.864929 0.489345 45 57.5 57.5 0.2 +239 1 1 -1 48.002 50.4116 45.4351 -0.399606 0.0823234 -0.912983 0.489345 45 57.5 57.5 0.2 +240 1 1 1 48.002 49.5884 45.4351 -0.399606 -0.0823234 -0.912983 0.489345 45 57.5 57.5 0.2 +241 1 1 -1 48.668 50 45.1807 -0.266405 0 -0.963861 0.489345 45 57.5 57.5 0.2 +242 1 1 1 50.4054 46.9218 53.9192 0.0810867 -0.615642 0.783843 0.489345 45 57.5 57.5 0.2 +243 1 1 -1 49.5946 46.9218 53.9192 -0.0810867 -0.615642 0.783843 0.489345 45 57.5 57.5 0.2 +244 1 1 1 50.8031 46.5311 53.5102 0.160622 -0.693781 0.702046 0.489345 45 57.5 57.5 0.2 +245 1 1 -1 50 46.4855 53.5564 0 -0.702907 0.711282 0.489345 45 57.5 57.5 0.2 +246 1 1 1 49.1969 46.5311 53.5102 -0.160622 -0.693781 0.702046 0.489345 45 57.5 57.5 0.2 +247 1 1 -1 51.1854 46.2067 53.0341 0.237086 -0.758653 0.606824 0.489345 45 57.5 57.5 0.2 +248 1 1 1 50.4057 46.099 53.1012 0.0811424 -0.780205 0.620239 0.489345 45 57.5 57.5 0.2 +249 1 1 -1 51.5451 45.9549 52.5 0.309017 -0.809017 0.499999 0.489345 45 57.5 57.5 0.2 +250 1 1 1 50.7822 45.7991 52.5963 0.156435 -0.840178 0.519258 0.489345 45 57.5 57.5 0.2 +251 1 1 -1 50 45.7467 52.6287 0 -0.850651 0.52573 0.489345 45 57.5 57.5 0.2 +252 1 1 1 49.5943 46.099 53.1012 -0.0811424 -0.780205 0.620239 0.489345 45 57.5 57.5 0.2 +253 1 1 -1 48.8146 46.2067 53.0341 -0.237086 -0.758653 0.606824 0.489345 45 57.5 57.5 0.2 +254 1 1 1 49.2178 45.7991 52.5963 -0.156435 -0.840178 0.519258 0.489345 45 57.5 57.5 0.2 +255 1 1 -1 48.4549 45.9549 52.5 -0.309017 -0.809017 0.499999 0.489345 45 57.5 57.5 0.2 +256 1 1 1 51.8752 45.7804 51.9181 0.375038 -0.843912 0.383614 0.489345 45 57.5 57.5 0.2 +257 1 1 -1 51.1934 45.545 51.9309 0.238678 -0.891006 0.386187 0.489345 45 57.5 57.5 0.2 +258 1 1 1 52.1694 45.6867 51.2995 0.433888 -0.862669 0.259892 0.489345 45 57.5 57.5 0.2 +259 1 1 -1 51.5063 45.4188 51.3204 0.301259 -0.916244 0.264082 0.489345 45 57.5 57.5 0.2 +260 1 1 1 50.8123 45.2447 51.3143 0.16246 -0.951056 0.262865 0.489345 45 57.5 57.5 0.2 +261 1 1 -1 52.4222 45.6754 50.656 0.484441 -0.864929 0.1312 0.489345 45 57.5 57.5 0.2 +262 1 1 1 51.7911 45.3785 50.6583 0.358229 -0.924304 0.131656 0.489345 45 57.5 57.5 0.2 +263 1 1 -1 52.6287 45.7467 50 0.525731 -0.850651 0 0.489345 45 57.5 57.5 0.2 +264 1 1 1 52.0168 45.4248 50 0.403355 -0.915043 0 0.489345 45 57.5 57.5 0.2 +265 1 1 -1 51.3663 45.1903 50 0.273267 -0.961938 0 0.489345 45 57.5 57.5 0.2 +266 1 1 1 51.1006 45.168 50.664 0.220117 -0.966393 0.132793 0.489345 45 57.5 57.5 0.2 +267 1 1 -1 50.4112 45.0616 50.6654 0.0822426 -0.987688 0.133071 0.489345 45 57.5 57.5 0.2 +268 1 1 1 50.6898 45.0478 50 0.137952 -0.990439 0 0.489345 45 57.5 57.5 0.2 +269 1 1 -1 50 45 50 0 -1 0 0.489345 45 57.5 57.5 0.2 +270 1 1 1 48.8066 45.545 51.9309 -0.238678 -0.891006 0.386187 0.489345 45 57.5 57.5 0.2 +271 1 1 -1 48.1248 45.7804 51.9181 -0.375038 -0.843912 0.383614 0.489345 45 57.5 57.5 0.2 +272 1 1 1 49.1877 45.2447 51.3143 -0.16246 -0.951056 0.262865 0.489345 45 57.5 57.5 0.2 +273 1 1 -1 48.4937 45.4188 51.3204 -0.301259 -0.916244 0.264082 0.489345 45 57.5 57.5 0.2 +274 1 1 1 47.8306 45.6867 51.2995 -0.433888 -0.862669 0.259892 0.489345 45 57.5 57.5 0.2 +275 1 1 -1 49.5888 45.0616 50.6654 -0.0822426 -0.987688 0.133071 0.489345 45 57.5 57.5 0.2 +276 1 1 1 48.8994 45.168 50.664 -0.220117 -0.966393 0.132793 0.489345 45 57.5 57.5 0.2 +277 1 1 -1 49.3102 45.0478 50 -0.137952 -0.990439 0 0.489345 45 57.5 57.5 0.2 +278 1 1 1 48.6337 45.1903 50 -0.273267 -0.961938 0 0.489345 45 57.5 57.5 0.2 +279 1 1 -1 48.2089 45.3785 50.6583 -0.358229 -0.924304 0.131656 0.489345 45 57.5 57.5 0.2 +280 1 1 1 47.5778 45.6754 50.656 -0.484441 -0.864929 0.1312 0.489345 45 57.5 57.5 0.2 +281 1 1 -1 47.9832 45.4248 50 -0.403355 -0.915043 0 0.489345 45 57.5 57.5 0.2 +282 1 1 1 47.3713 45.7467 50 -0.525731 -0.850651 0 0.489345 45 57.5 57.5 0.2 +283 1 1 -1 50.4116 45.4351 51.998 0.0823234 -0.912983 0.399606 0.489345 45 57.5 57.5 0.2 +284 1 1 1 50 45.1807 51.332 0 -0.963861 0.266405 0.489345 45 57.5 57.5 0.2 +285 1 1 -1 49.5884 45.4351 51.998 -0.0823234 -0.912983 0.399606 0.489345 45 57.5 57.5 0.2 +286 1 1 1 49.5946 46.9218 46.0808 -0.0810867 -0.615642 -0.783843 0.489345 45 57.5 57.5 0.2 +287 1 1 -1 50.4054 46.9218 46.0808 0.0810867 -0.615642 -0.783843 0.489345 45 57.5 57.5 0.2 +288 1 1 1 49.1969 46.5311 46.4898 -0.160622 -0.693781 -0.702046 0.489345 45 57.5 57.5 0.2 +289 1 1 -1 50 46.4855 46.4436 0 -0.702907 -0.711282 0.489345 45 57.5 57.5 0.2 +290 1 1 1 50.8031 46.5311 46.4898 0.160622 -0.693781 -0.702046 0.489345 45 57.5 57.5 0.2 +291 1 1 -1 48.8146 46.2067 46.9659 -0.237086 -0.758653 -0.606824 0.489345 45 57.5 57.5 0.2 +292 1 1 1 49.5943 46.099 46.8988 -0.0811424 -0.780205 -0.620239 0.489345 45 57.5 57.5 0.2 +293 1 1 -1 48.4549 45.9549 47.5 -0.309017 -0.809017 -0.499999 0.489345 45 57.5 57.5 0.2 +294 1 1 1 49.2178 45.7991 47.4037 -0.156435 -0.840178 -0.519258 0.489345 45 57.5 57.5 0.2 +295 1 1 -1 50 45.7467 47.3713 0 -0.850651 -0.52573 0.489345 45 57.5 57.5 0.2 +296 1 1 1 50.4057 46.099 46.8988 0.0811424 -0.780205 -0.620239 0.489345 45 57.5 57.5 0.2 +297 1 1 -1 51.1854 46.2067 46.9659 0.237086 -0.758653 -0.606824 0.489345 45 57.5 57.5 0.2 +298 1 1 1 50.7822 45.7991 47.4037 0.156435 -0.840178 -0.519258 0.489345 45 57.5 57.5 0.2 +299 1 1 -1 51.5451 45.9549 47.5 0.309017 -0.809017 -0.499999 0.489345 45 57.5 57.5 0.2 +300 1 1 1 48.1248 45.7804 48.0819 -0.375038 -0.843912 -0.383614 0.489345 45 57.5 57.5 0.2 +301 1 1 -1 48.8066 45.545 48.0691 -0.238678 -0.891006 -0.386187 0.489345 45 57.5 57.5 0.2 +302 1 1 1 47.8306 45.6867 48.7005 -0.433888 -0.862669 -0.259892 0.489345 45 57.5 57.5 0.2 +303 1 1 -1 48.4937 45.4188 48.6796 -0.301259 -0.916244 -0.264082 0.489345 45 57.5 57.5 0.2 +304 1 1 1 49.1877 45.2447 48.6857 -0.16246 -0.951056 -0.262865 0.489345 45 57.5 57.5 0.2 +305 1 1 -1 47.5778 45.6754 49.344 -0.484441 -0.864929 -0.1312 0.489345 45 57.5 57.5 0.2 +306 1 1 1 48.2089 45.3785 49.3417 -0.358229 -0.924304 -0.131656 0.489345 45 57.5 57.5 0.2 +307 1 1 -1 48.8994 45.168 49.336 -0.220117 -0.966393 -0.132793 0.489345 45 57.5 57.5 0.2 +308 1 1 1 49.5888 45.0616 49.3346 -0.0822426 -0.987688 -0.133071 0.489345 45 57.5 57.5 0.2 +309 1 1 -1 51.1934 45.545 48.0691 0.238678 -0.891006 -0.386187 0.489345 45 57.5 57.5 0.2 +310 1 1 1 51.8752 45.7804 48.0819 0.375038 -0.843912 -0.383614 0.489345 45 57.5 57.5 0.2 +311 1 1 -1 50.8123 45.2447 48.6857 0.16246 -0.951056 -0.262865 0.489345 45 57.5 57.5 0.2 +312 1 1 1 51.5063 45.4188 48.6796 0.301259 -0.916244 -0.264082 0.489345 45 57.5 57.5 0.2 +313 1 1 -1 52.1694 45.6867 48.7005 0.433888 -0.862669 -0.259892 0.489345 45 57.5 57.5 0.2 +314 1 1 1 50.4112 45.0616 49.3346 0.0822426 -0.987688 -0.133071 0.489345 45 57.5 57.5 0.2 +315 1 1 -1 51.1006 45.168 49.336 0.220117 -0.966393 -0.132793 0.489345 45 57.5 57.5 0.2 +316 1 1 1 51.7911 45.3785 49.3417 0.358229 -0.924304 -0.131656 0.489345 45 57.5 57.5 0.2 +317 1 1 -1 52.4222 45.6754 49.344 0.484441 -0.864929 -0.1312 0.489345 45 57.5 57.5 0.2 +318 1 1 1 49.5884 45.4351 48.002 -0.0823234 -0.912983 -0.399606 0.489345 45 57.5 57.5 0.2 +319 1 1 -1 50 45.1807 48.668 0 -0.963861 -0.266405 0.489345 45 57.5 57.5 0.2 +320 1 1 1 50.4116 45.4351 48.002 0.0823234 -0.912983 -0.399606 0.489345 45 57.5 57.5 0.2 +321 1 1 -1 46.9218 53.9192 50.4054 -0.615642 0.783843 0.0810867 0.489345 45 57.5 57.5 0.2 +322 1 1 1 46.9218 53.9192 49.5946 -0.615642 0.783843 -0.0810867 0.489345 45 57.5 57.5 0.2 +323 1 1 -1 46.5311 53.5102 50.8031 -0.693781 0.702046 0.160622 0.489345 45 57.5 57.5 0.2 +324 1 1 1 46.4855 53.5564 50 -0.702907 0.711282 0 0.489345 45 57.5 57.5 0.2 +325 1 1 -1 46.5311 53.5102 49.1969 -0.693781 0.702046 -0.160622 0.489345 45 57.5 57.5 0.2 +326 1 1 1 46.2067 53.0341 51.1854 -0.758653 0.606824 0.237086 0.489345 45 57.5 57.5 0.2 +327 1 1 -1 46.099 53.1012 50.4057 -0.780205 0.620239 0.0811424 0.489345 45 57.5 57.5 0.2 +328 1 1 1 45.9549 52.5 51.5451 -0.809017 0.499999 0.309017 0.489345 45 57.5 57.5 0.2 +329 1 1 -1 45.7991 52.5963 50.7822 -0.840178 0.519258 0.156435 0.489345 45 57.5 57.5 0.2 +330 1 1 1 45.7467 52.6287 50 -0.850651 0.52573 0 0.489345 45 57.5 57.5 0.2 +331 1 1 -1 46.099 53.1012 49.5943 -0.780205 0.620239 -0.0811424 0.489345 45 57.5 57.5 0.2 +332 1 1 1 46.2067 53.0341 48.8146 -0.758653 0.606824 -0.237086 0.489345 45 57.5 57.5 0.2 +333 1 1 -1 45.7991 52.5963 49.2178 -0.840178 0.519258 -0.156435 0.489345 45 57.5 57.5 0.2 +334 1 1 1 45.9549 52.5 48.4549 -0.809017 0.499999 -0.309017 0.489345 45 57.5 57.5 0.2 +335 1 1 -1 45.7804 51.9181 51.8752 -0.843912 0.383614 0.375038 0.489345 45 57.5 57.5 0.2 +336 1 1 1 45.545 51.9309 51.1934 -0.891006 0.386187 0.238678 0.489345 45 57.5 57.5 0.2 +337 1 1 -1 45.6867 51.2995 52.1694 -0.862669 0.259892 0.433888 0.489345 45 57.5 57.5 0.2 +338 1 1 1 45.4188 51.3204 51.5063 -0.916244 0.264082 0.301259 0.489345 45 57.5 57.5 0.2 +339 1 1 -1 45.2447 51.3143 50.8123 -0.951056 0.262865 0.16246 0.489345 45 57.5 57.5 0.2 +340 1 1 1 45.6754 50.656 52.4222 -0.864929 0.1312 0.484441 0.489345 45 57.5 57.5 0.2 +341 1 1 -1 45.3785 50.6583 51.7911 -0.924304 0.131656 0.358229 0.489345 45 57.5 57.5 0.2 +342 1 1 1 45.4248 50 52.0168 -0.915043 0 0.403355 0.489345 45 57.5 57.5 0.2 +343 1 1 -1 45.1903 50 51.3663 -0.961938 0 0.273267 0.489345 45 57.5 57.5 0.2 +344 1 1 1 45.168 50.664 51.1006 -0.966393 0.132793 0.220117 0.489345 45 57.5 57.5 0.2 +345 1 1 -1 45.0616 50.6654 50.4112 -0.987688 0.133071 0.0822426 0.489345 45 57.5 57.5 0.2 +346 1 1 1 45.0478 50 50.6898 -0.990439 0 0.137952 0.489345 45 57.5 57.5 0.2 +347 1 1 -1 45 50 50 -1 0 0 0.489345 45 57.5 57.5 0.2 +348 1 1 1 45.545 51.9309 48.8066 -0.891006 0.386187 -0.238678 0.489345 45 57.5 57.5 0.2 +349 1 1 -1 45.7804 51.9181 48.1248 -0.843912 0.383614 -0.375038 0.489345 45 57.5 57.5 0.2 +350 1 1 1 45.2447 51.3143 49.1877 -0.951056 0.262865 -0.16246 0.489345 45 57.5 57.5 0.2 +351 1 1 -1 45.4188 51.3204 48.4937 -0.916244 0.264082 -0.301259 0.489345 45 57.5 57.5 0.2 +352 1 1 1 45.6867 51.2995 47.8306 -0.862669 0.259892 -0.433888 0.489345 45 57.5 57.5 0.2 +353 1 1 -1 45.0616 50.6654 49.5888 -0.987688 0.133071 -0.0822426 0.489345 45 57.5 57.5 0.2 +354 1 1 1 45.168 50.664 48.8994 -0.966393 0.132793 -0.220117 0.489345 45 57.5 57.5 0.2 +355 1 1 -1 45.0478 50 49.3102 -0.990439 0 -0.137952 0.489345 45 57.5 57.5 0.2 +356 1 1 1 45.1903 50 48.6337 -0.961938 0 -0.273267 0.489345 45 57.5 57.5 0.2 +357 1 1 -1 45.3785 50.6583 48.2089 -0.924304 0.131656 -0.358229 0.489345 45 57.5 57.5 0.2 +358 1 1 1 45.6754 50.656 47.5778 -0.864929 0.1312 -0.484441 0.489345 45 57.5 57.5 0.2 +359 1 1 -1 45.4248 50 47.9832 -0.915043 0 -0.403355 0.489345 45 57.5 57.5 0.2 +360 1 1 1 45.4351 51.998 50.4116 -0.912983 0.399606 0.0823234 0.489345 45 57.5 57.5 0.2 +361 1 1 -1 45.1807 51.332 50 -0.963861 0.266405 0 0.489345 45 57.5 57.5 0.2 +362 1 1 1 45.4351 51.998 49.5884 -0.912983 0.399606 -0.0823234 0.489345 45 57.5 57.5 0.2 +363 1 1 -1 46.9218 46.0808 49.5946 -0.615642 -0.783843 -0.0810867 0.489345 45 57.5 57.5 0.2 +364 1 1 1 46.9218 46.0808 50.4054 -0.615642 -0.783843 0.0810867 0.489345 45 57.5 57.5 0.2 +365 1 1 -1 46.5311 46.4898 49.1969 -0.693781 -0.702046 -0.160622 0.489345 45 57.5 57.5 0.2 +366 1 1 1 46.4855 46.4436 50 -0.702907 -0.711282 0 0.489345 45 57.5 57.5 0.2 +367 1 1 -1 46.5311 46.4898 50.8031 -0.693781 -0.702046 0.160622 0.489345 45 57.5 57.5 0.2 +368 1 1 1 46.2067 46.9659 48.8146 -0.758653 -0.606824 -0.237086 0.489345 45 57.5 57.5 0.2 +369 1 1 -1 46.099 46.8988 49.5943 -0.780205 -0.620239 -0.0811424 0.489345 45 57.5 57.5 0.2 +370 1 1 1 45.9549 47.5 48.4549 -0.809017 -0.499999 -0.309017 0.489345 45 57.5 57.5 0.2 +371 1 1 -1 45.7991 47.4037 49.2178 -0.840178 -0.519258 -0.156435 0.489345 45 57.5 57.5 0.2 +372 1 1 1 45.7467 47.3713 50 -0.850651 -0.52573 0 0.489345 45 57.5 57.5 0.2 +373 1 1 -1 46.099 46.8988 50.4057 -0.780205 -0.620239 0.0811424 0.489345 45 57.5 57.5 0.2 +374 1 1 1 46.2067 46.9659 51.1854 -0.758653 -0.606824 0.237086 0.489345 45 57.5 57.5 0.2 +375 1 1 -1 45.7991 47.4037 50.7822 -0.840178 -0.519258 0.156435 0.489345 45 57.5 57.5 0.2 +376 1 1 1 45.9549 47.5 51.5451 -0.809017 -0.499999 0.309017 0.489345 45 57.5 57.5 0.2 +377 1 1 -1 45.7804 48.0819 48.1248 -0.843912 -0.383614 -0.375038 0.489345 45 57.5 57.5 0.2 +378 1 1 1 45.545 48.0691 48.8066 -0.891006 -0.386187 -0.238678 0.489345 45 57.5 57.5 0.2 +379 1 1 -1 45.6867 48.7005 47.8306 -0.862669 -0.259892 -0.433888 0.489345 45 57.5 57.5 0.2 +380 1 1 1 45.4188 48.6796 48.4937 -0.916244 -0.264082 -0.301259 0.489345 45 57.5 57.5 0.2 +381 1 1 -1 45.2447 48.6857 49.1877 -0.951056 -0.262865 -0.16246 0.489345 45 57.5 57.5 0.2 +382 1 1 1 45.6754 49.344 47.5778 -0.864929 -0.1312 -0.484441 0.489345 45 57.5 57.5 0.2 +383 1 1 -1 45.3785 49.3417 48.2089 -0.924304 -0.131656 -0.358229 0.489345 45 57.5 57.5 0.2 +384 1 1 1 45.168 49.336 48.8994 -0.966393 -0.132793 -0.220117 0.489345 45 57.5 57.5 0.2 +385 1 1 -1 45.0616 49.3346 49.5888 -0.987688 -0.133071 -0.0822426 0.489345 45 57.5 57.5 0.2 +386 1 1 1 45.545 48.0691 51.1934 -0.891006 -0.386187 0.238678 0.489345 45 57.5 57.5 0.2 +387 1 1 -1 45.7804 48.0819 51.8752 -0.843912 -0.383614 0.375038 0.489345 45 57.5 57.5 0.2 +388 1 1 1 45.2447 48.6857 50.8123 -0.951056 -0.262865 0.16246 0.489345 45 57.5 57.5 0.2 +389 1 1 -1 45.4188 48.6796 51.5063 -0.916244 -0.264082 0.301259 0.489345 45 57.5 57.5 0.2 +390 1 1 1 45.6867 48.7005 52.1694 -0.862669 -0.259892 0.433888 0.489345 45 57.5 57.5 0.2 +391 1 1 -1 45.0616 49.3346 50.4112 -0.987688 -0.133071 0.0822426 0.489345 45 57.5 57.5 0.2 +392 1 1 1 45.168 49.336 51.1006 -0.966393 -0.132793 0.220117 0.489345 45 57.5 57.5 0.2 +393 1 1 -1 45.3785 49.3417 51.7911 -0.924304 -0.131656 0.358229 0.489345 45 57.5 57.5 0.2 +394 1 1 1 45.6754 49.344 52.4222 -0.864929 -0.1312 0.484441 0.489345 45 57.5 57.5 0.2 +395 1 1 -1 45.4351 48.002 49.5884 -0.912983 -0.399606 -0.0823234 0.489345 45 57.5 57.5 0.2 +396 1 1 1 45.1807 48.668 50 -0.963861 -0.266405 0 0.489345 45 57.5 57.5 0.2 +397 1 1 -1 45.4351 48.002 50.4116 -0.912983 -0.399606 0.0823234 0.489345 45 57.5 57.5 0.2 +398 1 1 1 53.0782 53.9192 49.5946 0.615642 0.783843 -0.0810867 0.489345 45 57.5 57.5 0.2 +399 1 1 -1 53.0782 53.9192 50.4054 0.615642 0.783843 0.0810867 0.489345 45 57.5 57.5 0.2 +400 1 1 1 53.4689 53.5102 49.1969 0.693781 0.702046 -0.160622 0.489345 45 57.5 57.5 0.2 +401 1 1 -1 53.5145 53.5564 50 0.702907 0.711282 0 0.489345 45 57.5 57.5 0.2 +402 1 1 1 53.4689 53.5102 50.8031 0.693781 0.702046 0.160622 0.489345 45 57.5 57.5 0.2 +403 1 1 -1 53.7933 53.0341 48.8146 0.758653 0.606824 -0.237086 0.489345 45 57.5 57.5 0.2 +404 1 1 1 53.901 53.1012 49.5943 0.780205 0.620239 -0.0811424 0.489345 45 57.5 57.5 0.2 +405 1 1 -1 54.0451 52.5 48.4549 0.809017 0.499999 -0.309017 0.489345 45 57.5 57.5 0.2 +406 1 1 1 54.2009 52.5963 49.2178 0.840178 0.519258 -0.156435 0.489345 45 57.5 57.5 0.2 +407 1 1 -1 54.2533 52.6287 50 0.850651 0.52573 0 0.489345 45 57.5 57.5 0.2 +408 1 1 1 53.901 53.1012 50.4057 0.780205 0.620239 0.0811424 0.489345 45 57.5 57.5 0.2 +409 1 1 -1 53.7933 53.0341 51.1854 0.758653 0.606824 0.237086 0.489345 45 57.5 57.5 0.2 +410 1 1 1 54.2009 52.5963 50.7822 0.840178 0.519258 0.156435 0.489345 45 57.5 57.5 0.2 +411 1 1 -1 54.0451 52.5 51.5451 0.809017 0.499999 0.309017 0.489345 45 57.5 57.5 0.2 +412 1 1 1 54.2196 51.9181 48.1248 0.843912 0.383614 -0.375038 0.489345 45 57.5 57.5 0.2 +413 1 1 -1 54.455 51.9309 48.8066 0.891006 0.386187 -0.238678 0.489345 45 57.5 57.5 0.2 +414 1 1 1 54.3133 51.2995 47.8306 0.862669 0.259892 -0.433888 0.489345 45 57.5 57.5 0.2 +415 1 1 -1 54.5812 51.3204 48.4937 0.916244 0.264082 -0.301259 0.489345 45 57.5 57.5 0.2 +416 1 1 1 54.7553 51.3143 49.1877 0.951056 0.262865 -0.16246 0.489345 45 57.5 57.5 0.2 +417 1 1 -1 54.3246 50.656 47.5778 0.864929 0.1312 -0.484441 0.489345 45 57.5 57.5 0.2 +418 1 1 1 54.6215 50.6583 48.2089 0.924304 0.131656 -0.358229 0.489345 45 57.5 57.5 0.2 +419 1 1 -1 54.5752 50 47.9832 0.915043 0 -0.403355 0.489345 45 57.5 57.5 0.2 +420 1 1 1 54.8097 50 48.6337 0.961938 0 -0.273267 0.489345 45 57.5 57.5 0.2 +421 1 1 -1 54.832 50.664 48.8994 0.966393 0.132793 -0.220117 0.489345 45 57.5 57.5 0.2 +422 1 1 1 54.9384 50.6654 49.5888 0.987688 0.133071 -0.0822426 0.489345 45 57.5 57.5 0.2 +423 1 1 -1 54.9522 50 49.3102 0.990439 0 -0.137952 0.489345 45 57.5 57.5 0.2 +424 1 1 1 55 50 50 1 0 0 0.489345 45 57.5 57.5 0.2 +425 1 1 -1 54.455 51.9309 51.1934 0.891006 0.386187 0.238678 0.489345 45 57.5 57.5 0.2 +426 1 1 1 54.2196 51.9181 51.8752 0.843912 0.383614 0.375038 0.489345 45 57.5 57.5 0.2 +427 1 1 -1 54.7553 51.3143 50.8123 0.951056 0.262865 0.16246 0.489345 45 57.5 57.5 0.2 +428 1 1 1 54.5812 51.3204 51.5063 0.916244 0.264082 0.301259 0.489345 45 57.5 57.5 0.2 +429 1 1 -1 54.3133 51.2995 52.1694 0.862669 0.259892 0.433888 0.489345 45 57.5 57.5 0.2 +430 1 1 1 54.9384 50.6654 50.4112 0.987688 0.133071 0.0822426 0.489345 45 57.5 57.5 0.2 +431 1 1 -1 54.832 50.664 51.1006 0.966393 0.132793 0.220117 0.489345 45 57.5 57.5 0.2 +432 1 1 1 54.9522 50 50.6898 0.990439 0 0.137952 0.489345 45 57.5 57.5 0.2 +433 1 1 -1 54.8097 50 51.3663 0.961938 0 0.273267 0.489345 45 57.5 57.5 0.2 +434 1 1 1 54.6215 50.6583 51.7911 0.924304 0.131656 0.358229 0.489345 45 57.5 57.5 0.2 +435 1 1 -1 54.3246 50.656 52.4222 0.864929 0.1312 0.484441 0.489345 45 57.5 57.5 0.2 +436 1 1 1 54.5752 50 52.0168 0.915043 0 0.403355 0.489345 45 57.5 57.5 0.2 +437 1 1 -1 54.5649 51.998 49.5884 0.912983 0.399606 -0.0823234 0.489345 45 57.5 57.5 0.2 +438 1 1 1 54.8193 51.332 50 0.963861 0.266405 0 0.489345 45 57.5 57.5 0.2 +439 1 1 -1 54.5649 51.998 50.4116 0.912983 0.399606 0.0823234 0.489345 45 57.5 57.5 0.2 +440 1 1 1 53.0782 46.0808 50.4054 0.615642 -0.783843 0.0810867 0.489345 45 57.5 57.5 0.2 +441 1 1 -1 53.0782 46.0808 49.5946 0.615642 -0.783843 -0.0810867 0.489345 45 57.5 57.5 0.2 +442 1 1 1 53.4689 46.4898 50.8031 0.693781 -0.702046 0.160622 0.489345 45 57.5 57.5 0.2 +443 1 1 -1 53.5145 46.4436 50 0.702907 -0.711282 0 0.489345 45 57.5 57.5 0.2 +444 1 1 1 53.4689 46.4898 49.1969 0.693781 -0.702046 -0.160622 0.489345 45 57.5 57.5 0.2 +445 1 1 -1 53.7933 46.9659 51.1854 0.758653 -0.606824 0.237086 0.489345 45 57.5 57.5 0.2 +446 1 1 1 53.901 46.8988 50.4057 0.780205 -0.620239 0.0811424 0.489345 45 57.5 57.5 0.2 +447 1 1 -1 54.0451 47.5 51.5451 0.809017 -0.499999 0.309017 0.489345 45 57.5 57.5 0.2 +448 1 1 1 54.2009 47.4037 50.7822 0.840178 -0.519258 0.156435 0.489345 45 57.5 57.5 0.2 +449 1 1 -1 54.2533 47.3713 50 0.850651 -0.52573 0 0.489345 45 57.5 57.5 0.2 +450 1 1 1 53.901 46.8988 49.5943 0.780205 -0.620239 -0.0811424 0.489345 45 57.5 57.5 0.2 +451 1 1 -1 53.7933 46.9659 48.8146 0.758653 -0.606824 -0.237086 0.489345 45 57.5 57.5 0.2 +452 1 1 1 54.2009 47.4037 49.2178 0.840178 -0.519258 -0.156435 0.489345 45 57.5 57.5 0.2 +453 1 1 -1 54.0451 47.5 48.4549 0.809017 -0.499999 -0.309017 0.489345 45 57.5 57.5 0.2 +454 1 1 1 54.2196 48.0819 51.8752 0.843912 -0.383614 0.375038 0.489345 45 57.5 57.5 0.2 +455 1 1 -1 54.455 48.0691 51.1934 0.891006 -0.386187 0.238678 0.489345 45 57.5 57.5 0.2 +456 1 1 1 54.3133 48.7005 52.1694 0.862669 -0.259892 0.433888 0.489345 45 57.5 57.5 0.2 +457 1 1 -1 54.5812 48.6796 51.5063 0.916244 -0.264082 0.301259 0.489345 45 57.5 57.5 0.2 +458 1 1 1 54.7553 48.6857 50.8123 0.951056 -0.262865 0.16246 0.489345 45 57.5 57.5 0.2 +459 1 1 -1 54.3246 49.344 52.4222 0.864929 -0.1312 0.484441 0.489345 45 57.5 57.5 0.2 +460 1 1 1 54.6215 49.3417 51.7911 0.924304 -0.131656 0.358229 0.489345 45 57.5 57.5 0.2 +461 1 1 -1 54.832 49.336 51.1006 0.966393 -0.132793 0.220117 0.489345 45 57.5 57.5 0.2 +462 1 1 1 54.9384 49.3346 50.4112 0.987688 -0.133071 0.0822426 0.489345 45 57.5 57.5 0.2 +463 1 1 -1 54.455 48.0691 48.8066 0.891006 -0.386187 -0.238678 0.489345 45 57.5 57.5 0.2 +464 1 1 1 54.2196 48.0819 48.1248 0.843912 -0.383614 -0.375038 0.489345 45 57.5 57.5 0.2 +465 1 1 -1 54.7553 48.6857 49.1877 0.951056 -0.262865 -0.16246 0.489345 45 57.5 57.5 0.2 +466 1 1 1 54.5812 48.6796 48.4937 0.916244 -0.264082 -0.301259 0.489345 45 57.5 57.5 0.2 +467 1 1 -1 54.3133 48.7005 47.8306 0.862669 -0.259892 -0.433888 0.489345 45 57.5 57.5 0.2 +468 1 1 1 54.9384 49.3346 49.5888 0.987688 -0.133071 -0.0822426 0.489345 45 57.5 57.5 0.2 +469 1 1 -1 54.832 49.336 48.8994 0.966393 -0.132793 -0.220117 0.489345 45 57.5 57.5 0.2 +470 1 1 1 54.6215 49.3417 48.2089 0.924304 -0.131656 -0.358229 0.489345 45 57.5 57.5 0.2 +471 1 1 -1 54.3246 49.344 47.5778 0.864929 -0.1312 -0.484441 0.489345 45 57.5 57.5 0.2 +472 1 1 1 54.5649 48.002 50.4116 0.912983 -0.399606 0.0823234 0.489345 45 57.5 57.5 0.2 +473 1 1 -1 54.8193 48.668 50 0.963861 -0.266405 0 0.489345 45 57.5 57.5 0.2 +474 1 1 1 54.5649 48.002 49.5884 0.912983 -0.399606 -0.0823234 0.489345 45 57.5 57.5 0.2 +475 1 1 -1 48.9349 52.8563 53.9632 -0.213023 0.571252 0.792649 0.489345 45 57.5 57.5 0.2 +476 1 1 1 48.2692 52.5806 53.9173 -0.346153 0.516121 0.783452 0.489345 45 57.5 57.5 0.2 +477 1 1 -1 47.6579 52.27 53.7897 -0.468429 0.45399 0.757936 0.489345 45 57.5 57.5 0.2 +478 1 1 1 47.8734 52.9389 53.441 -0.425325 0.587785 0.688191 0.489345 45 57.5 57.5 0.2 +479 1 1 -1 48.52 53.2371 53.5116 -0.296004 0.647412 0.70231 0.489345 45 57.5 57.5 0.2 +480 1 1 1 48.1413 53.5355 53.0075 -0.371748 0.707107 0.601501 0.489345 45 57.5 57.5 0.2 +481 1 1 -1 46.9925 51.8587 53.5355 -0.601501 0.371748 0.707107 0.489345 45 57.5 57.5 0.2 +482 1 1 1 46.4884 51.48 53.2371 -0.70231 0.296004 0.647412 0.489345 45 57.5 57.5 0.2 +483 1 1 -1 46.559 52.1266 52.9389 -0.688191 0.425325 0.587785 0.489345 45 57.5 57.5 0.2 +484 1 1 1 46.0368 51.0651 52.8563 -0.792649 0.213023 0.571252 0.489345 45 57.5 57.5 0.2 +485 1 1 -1 46.0827 51.7308 52.5806 -0.783452 0.346153 0.516121 0.489345 45 57.5 57.5 0.2 +486 1 1 1 46.2103 52.3421 52.27 -0.757936 0.468429 0.45399 0.489345 45 57.5 57.5 0.2 +487 1 1 -1 47.73 53.7897 52.3421 -0.45399 0.757936 0.468429 0.489345 45 57.5 57.5 0.2 +488 1 1 1 47.0611 53.441 52.1266 -0.587785 0.688191 0.425325 0.489345 45 57.5 57.5 0.2 +489 1 1 -1 47.4194 53.9173 51.7308 -0.516121 0.783452 0.346153 0.489345 45 57.5 57.5 0.2 +490 1 1 1 46.4645 53.0075 51.8587 -0.707107 0.601501 0.371748 0.489345 45 57.5 57.5 0.2 +491 1 1 -1 46.7629 53.5116 51.48 -0.647412 0.70231 0.296004 0.489345 45 57.5 57.5 0.2 +492 1 1 1 47.1437 53.9632 51.0651 -0.571252 0.792649 0.213023 0.489345 45 57.5 57.5 0.2 +493 1 1 -1 47.1787 52.5669 53.2329 -0.564254 0.513375 0.646578 0.489345 45 57.5 57.5 0.2 +494 1 1 1 46.7671 52.8213 52.5669 -0.646578 0.564254 0.513375 0.489345 45 57.5 57.5 0.2 +495 1 1 -1 47.4331 53.2329 52.8213 -0.513375 0.646578 0.564254 0.489345 45 57.5 57.5 0.2 +496 1 1 1 51.0651 52.8563 53.9632 0.213023 0.571252 0.792649 0.489345 45 57.5 57.5 0.2 +497 1 1 -1 51.48 53.2371 53.5116 0.296004 0.647412 0.70231 0.489345 45 57.5 57.5 0.2 +498 1 1 1 51.8587 53.5355 53.0075 0.371748 0.707107 0.601501 0.489345 45 57.5 57.5 0.2 +499 1 1 -1 52.1266 52.9389 53.441 0.425325 0.587785 0.688191 0.489345 45 57.5 57.5 0.2 +500 1 1 1 51.7308 52.5806 53.9173 0.346153 0.516121 0.783452 0.489345 45 57.5 57.5 0.2 +501 1 1 -1 52.3421 52.27 53.7897 0.468429 0.45399 0.757936 0.489345 45 57.5 57.5 0.2 +502 1 1 1 52.27 53.7897 52.3421 0.45399 0.757936 0.468429 0.489345 45 57.5 57.5 0.2 +503 1 1 -1 52.5806 53.9173 51.7308 0.516121 0.783452 0.346153 0.489345 45 57.5 57.5 0.2 +504 1 1 1 52.9389 53.441 52.1266 0.587785 0.688191 0.425325 0.489345 45 57.5 57.5 0.2 +505 1 1 -1 52.8563 53.9632 51.0651 0.571252 0.792649 0.213023 0.489345 45 57.5 57.5 0.2 +506 1 1 1 53.2371 53.5116 51.48 0.647412 0.70231 0.296004 0.489345 45 57.5 57.5 0.2 +507 1 1 -1 53.5355 53.0075 51.8587 0.707107 0.601501 0.371748 0.489345 45 57.5 57.5 0.2 +508 1 1 1 53.0075 51.8587 53.5355 0.601501 0.371748 0.707107 0.489345 45 57.5 57.5 0.2 +509 1 1 -1 53.441 52.1266 52.9389 0.688191 0.425325 0.587785 0.489345 45 57.5 57.5 0.2 +510 1 1 1 53.5116 51.48 53.2371 0.70231 0.296004 0.647412 0.489345 45 57.5 57.5 0.2 +511 1 1 -1 53.7897 52.3421 52.27 0.757936 0.468429 0.45399 0.489345 45 57.5 57.5 0.2 +512 1 1 1 53.9173 51.7308 52.5806 0.783452 0.346153 0.516121 0.489345 45 57.5 57.5 0.2 +513 1 1 -1 53.9632 51.0651 52.8563 0.792649 0.213023 0.571252 0.489345 45 57.5 57.5 0.2 +514 1 1 1 52.5669 53.2329 52.8213 0.513375 0.646578 0.564254 0.489345 45 57.5 57.5 0.2 +515 1 1 -1 53.2329 52.8213 52.5669 0.646578 0.564254 0.513375 0.489345 45 57.5 57.5 0.2 +516 1 1 1 52.8213 52.5669 53.2329 0.564254 0.513375 0.646578 0.489345 45 57.5 57.5 0.2 +517 1 1 -1 48.9349 52.8563 46.0368 -0.213023 0.571252 -0.792649 0.489345 45 57.5 57.5 0.2 +518 1 1 1 48.52 53.2371 46.4884 -0.296004 0.647412 -0.70231 0.489345 45 57.5 57.5 0.2 +519 1 1 -1 48.1413 53.5355 46.9925 -0.371748 0.707107 -0.601501 0.489345 45 57.5 57.5 0.2 +520 1 1 1 47.8734 52.9389 46.559 -0.425325 0.587785 -0.688191 0.489345 45 57.5 57.5 0.2 +521 1 1 -1 48.2692 52.5806 46.0827 -0.346153 0.516121 -0.783452 0.489345 45 57.5 57.5 0.2 +522 1 1 1 47.6579 52.27 46.2103 -0.468429 0.45399 -0.757936 0.489345 45 57.5 57.5 0.2 +523 1 1 -1 47.73 53.7897 47.6579 -0.45399 0.757936 -0.468429 0.489345 45 57.5 57.5 0.2 +524 1 1 1 47.4194 53.9173 48.2692 -0.516121 0.783452 -0.346153 0.489345 45 57.5 57.5 0.2 +525 1 1 -1 47.0611 53.441 47.8734 -0.587785 0.688191 -0.425325 0.489345 45 57.5 57.5 0.2 +526 1 1 1 47.1437 53.9632 48.9349 -0.571252 0.792649 -0.213023 0.489345 45 57.5 57.5 0.2 +527 1 1 -1 46.7629 53.5116 48.52 -0.647412 0.70231 -0.296004 0.489345 45 57.5 57.5 0.2 +528 1 1 1 46.4645 53.0075 48.1413 -0.707107 0.601501 -0.371748 0.489345 45 57.5 57.5 0.2 +529 1 1 -1 46.9925 51.8587 46.4645 -0.601501 0.371748 -0.707107 0.489345 45 57.5 57.5 0.2 +530 1 1 1 46.559 52.1266 47.0611 -0.688191 0.425325 -0.587785 0.489345 45 57.5 57.5 0.2 +531 1 1 -1 46.4884 51.48 46.7629 -0.70231 0.296004 -0.647412 0.489345 45 57.5 57.5 0.2 +532 1 1 1 46.2103 52.3421 47.73 -0.757936 0.468429 -0.45399 0.489345 45 57.5 57.5 0.2 +533 1 1 -1 46.0827 51.7308 47.4194 -0.783452 0.346153 -0.516121 0.489345 45 57.5 57.5 0.2 +534 1 1 1 46.0368 51.0651 47.1437 -0.792649 0.213023 -0.571252 0.489345 45 57.5 57.5 0.2 +535 1 1 -1 47.4331 53.2329 47.1787 -0.513375 0.646578 -0.564254 0.489345 45 57.5 57.5 0.2 +536 1 1 1 46.7671 52.8213 47.4331 -0.646578 0.564254 -0.513375 0.489345 45 57.5 57.5 0.2 +537 1 1 -1 47.1787 52.5669 46.7671 -0.564254 0.513375 -0.646578 0.489345 45 57.5 57.5 0.2 +538 1 1 1 51.0651 52.8563 46.0368 0.213023 0.571252 -0.792649 0.489345 45 57.5 57.5 0.2 +539 1 1 -1 51.7308 52.5806 46.0827 0.346153 0.516121 -0.783452 0.489345 45 57.5 57.5 0.2 +540 1 1 1 52.3421 52.27 46.2103 0.468429 0.45399 -0.757936 0.489345 45 57.5 57.5 0.2 +541 1 1 -1 52.1266 52.9389 46.559 0.425325 0.587785 -0.688191 0.489345 45 57.5 57.5 0.2 +542 1 1 1 51.48 53.2371 46.4884 0.296004 0.647412 -0.70231 0.489345 45 57.5 57.5 0.2 +543 1 1 -1 51.8587 53.5355 46.9925 0.371748 0.707107 -0.601501 0.489345 45 57.5 57.5 0.2 +544 1 1 1 53.0075 51.8587 46.4645 0.601501 0.371748 -0.707107 0.489345 45 57.5 57.5 0.2 +545 1 1 -1 53.5116 51.48 46.7629 0.70231 0.296004 -0.647412 0.489345 45 57.5 57.5 0.2 +546 1 1 1 53.441 52.1266 47.0611 0.688191 0.425325 -0.587785 0.489345 45 57.5 57.5 0.2 +547 1 1 -1 53.9632 51.0651 47.1437 0.792649 0.213023 -0.571252 0.489345 45 57.5 57.5 0.2 +548 1 1 1 53.9173 51.7308 47.4194 0.783452 0.346153 -0.516121 0.489345 45 57.5 57.5 0.2 +549 1 1 -1 53.7897 52.3421 47.73 0.757936 0.468429 -0.45399 0.489345 45 57.5 57.5 0.2 +550 1 1 1 52.27 53.7897 47.6579 0.45399 0.757936 -0.468429 0.489345 45 57.5 57.5 0.2 +551 1 1 -1 52.9389 53.441 47.8734 0.587785 0.688191 -0.425325 0.489345 45 57.5 57.5 0.2 +552 1 1 1 52.5806 53.9173 48.2692 0.516121 0.783452 -0.346153 0.489345 45 57.5 57.5 0.2 +553 1 1 -1 53.5355 53.0075 48.1413 0.707107 0.601501 -0.371748 0.489345 45 57.5 57.5 0.2 +554 1 1 1 53.2371 53.5116 48.52 0.647412 0.70231 -0.296004 0.489345 45 57.5 57.5 0.2 +555 1 1 -1 52.8563 53.9632 48.9349 0.571252 0.792649 -0.213023 0.489345 45 57.5 57.5 0.2 +556 1 1 1 52.8213 52.5669 46.7671 0.564254 0.513375 -0.646578 0.489345 45 57.5 57.5 0.2 +557 1 1 -1 53.2329 52.8213 47.4331 0.646578 0.564254 -0.513375 0.489345 45 57.5 57.5 0.2 +558 1 1 1 52.5669 53.2329 47.1787 0.513375 0.646578 -0.564254 0.489345 45 57.5 57.5 0.2 +559 1 1 -1 48.9349 47.1437 46.0368 -0.213023 -0.571252 -0.792649 0.489345 45 57.5 57.5 0.2 +560 1 1 1 48.2692 47.4194 46.0827 -0.346153 -0.516121 -0.783452 0.489345 45 57.5 57.5 0.2 +561 1 1 -1 47.6579 47.73 46.2103 -0.468429 -0.45399 -0.757936 0.489345 45 57.5 57.5 0.2 +562 1 1 1 47.8734 47.0611 46.559 -0.425325 -0.587785 -0.688191 0.489345 45 57.5 57.5 0.2 +563 1 1 -1 48.52 46.7629 46.4884 -0.296004 -0.647412 -0.70231 0.489345 45 57.5 57.5 0.2 +564 1 1 1 48.1413 46.4645 46.9925 -0.371748 -0.707107 -0.601501 0.489345 45 57.5 57.5 0.2 +565 1 1 -1 46.9925 48.1413 46.4645 -0.601501 -0.371748 -0.707107 0.489345 45 57.5 57.5 0.2 +566 1 1 1 46.4884 48.52 46.7629 -0.70231 -0.296004 -0.647412 0.489345 45 57.5 57.5 0.2 +567 1 1 -1 46.559 47.8734 47.0611 -0.688191 -0.425325 -0.587785 0.489345 45 57.5 57.5 0.2 +568 1 1 1 46.0368 48.9349 47.1437 -0.792649 -0.213023 -0.571252 0.489345 45 57.5 57.5 0.2 +569 1 1 -1 46.0827 48.2692 47.4194 -0.783452 -0.346153 -0.516121 0.489345 45 57.5 57.5 0.2 +570 1 1 1 46.2103 47.6579 47.73 -0.757936 -0.468429 -0.45399 0.489345 45 57.5 57.5 0.2 +571 1 1 -1 47.73 46.2103 47.6579 -0.45399 -0.757936 -0.468429 0.489345 45 57.5 57.5 0.2 +572 1 1 1 47.0611 46.559 47.8734 -0.587785 -0.688191 -0.425325 0.489345 45 57.5 57.5 0.2 +573 1 1 -1 47.4194 46.0827 48.2692 -0.516121 -0.783452 -0.346153 0.489345 45 57.5 57.5 0.2 +574 1 1 1 46.4645 46.9925 48.1413 -0.707107 -0.601501 -0.371748 0.489345 45 57.5 57.5 0.2 +575 1 1 -1 46.7629 46.4884 48.52 -0.647412 -0.70231 -0.296004 0.489345 45 57.5 57.5 0.2 +576 1 1 1 47.1437 46.0368 48.9349 -0.571252 -0.792649 -0.213023 0.489345 45 57.5 57.5 0.2 +577 1 1 -1 47.1787 47.4331 46.7671 -0.564254 -0.513375 -0.646578 0.489345 45 57.5 57.5 0.2 +578 1 1 1 46.7671 47.1787 47.4331 -0.646578 -0.564254 -0.513375 0.489345 45 57.5 57.5 0.2 +579 1 1 -1 47.4331 46.7671 47.1787 -0.513375 -0.646578 -0.564254 0.489345 45 57.5 57.5 0.2 +580 1 1 1 51.0651 47.1437 46.0368 0.213023 -0.571252 -0.792649 0.489345 45 57.5 57.5 0.2 +581 1 1 -1 51.48 46.7629 46.4884 0.296004 -0.647412 -0.70231 0.489345 45 57.5 57.5 0.2 +582 1 1 1 51.8587 46.4645 46.9925 0.371748 -0.707107 -0.601501 0.489345 45 57.5 57.5 0.2 +583 1 1 -1 52.1266 47.0611 46.559 0.425325 -0.587785 -0.688191 0.489345 45 57.5 57.5 0.2 +584 1 1 1 51.7308 47.4194 46.0827 0.346153 -0.516121 -0.783452 0.489345 45 57.5 57.5 0.2 +585 1 1 -1 52.3421 47.73 46.2103 0.468429 -0.45399 -0.757936 0.489345 45 57.5 57.5 0.2 +586 1 1 1 52.27 46.2103 47.6579 0.45399 -0.757936 -0.468429 0.489345 45 57.5 57.5 0.2 +587 1 1 -1 52.5806 46.0827 48.2692 0.516121 -0.783452 -0.346153 0.489345 45 57.5 57.5 0.2 +588 1 1 1 52.9389 46.559 47.8734 0.587785 -0.688191 -0.425325 0.489345 45 57.5 57.5 0.2 +589 1 1 -1 52.8563 46.0368 48.9349 0.571252 -0.792649 -0.213023 0.489345 45 57.5 57.5 0.2 +590 1 1 1 53.2371 46.4884 48.52 0.647412 -0.70231 -0.296004 0.489345 45 57.5 57.5 0.2 +591 1 1 -1 53.5355 46.9925 48.1413 0.707107 -0.601501 -0.371748 0.489345 45 57.5 57.5 0.2 +592 1 1 1 53.0075 48.1413 46.4645 0.601501 -0.371748 -0.707107 0.489345 45 57.5 57.5 0.2 +593 1 1 -1 53.441 47.8734 47.0611 0.688191 -0.425325 -0.587785 0.489345 45 57.5 57.5 0.2 +594 1 1 1 53.5116 48.52 46.7629 0.70231 -0.296004 -0.647412 0.489345 45 57.5 57.5 0.2 +595 1 1 -1 53.7897 47.6579 47.73 0.757936 -0.468429 -0.45399 0.489345 45 57.5 57.5 0.2 +596 1 1 1 53.9173 48.2692 47.4194 0.783452 -0.346153 -0.516121 0.489345 45 57.5 57.5 0.2 +597 1 1 -1 53.9632 48.9349 47.1437 0.792649 -0.213023 -0.571252 0.489345 45 57.5 57.5 0.2 +598 1 1 1 52.5669 46.7671 47.1787 0.513375 -0.646578 -0.564254 0.489345 45 57.5 57.5 0.2 +599 1 1 -1 53.2329 47.1787 47.4331 0.646578 -0.564254 -0.513375 0.489345 45 57.5 57.5 0.2 +600 1 1 1 52.8213 47.4331 46.7671 0.564254 -0.513375 -0.646578 0.489345 45 57.5 57.5 0.2 +601 1 1 -1 48.9349 47.1437 53.9632 -0.213023 -0.571252 0.792649 0.489345 45 57.5 57.5 0.2 +602 1 1 1 48.52 46.7629 53.5116 -0.296004 -0.647412 0.70231 0.489345 45 57.5 57.5 0.2 +603 1 1 -1 48.1413 46.4645 53.0075 -0.371748 -0.707107 0.601501 0.489345 45 57.5 57.5 0.2 +604 1 1 1 47.8734 47.0611 53.441 -0.425325 -0.587785 0.688191 0.489345 45 57.5 57.5 0.2 +605 1 1 -1 48.2692 47.4194 53.9173 -0.346153 -0.516121 0.783452 0.489345 45 57.5 57.5 0.2 +606 1 1 1 47.6579 47.73 53.7897 -0.468429 -0.45399 0.757936 0.489345 45 57.5 57.5 0.2 +607 1 1 -1 47.73 46.2103 52.3421 -0.45399 -0.757936 0.468429 0.489345 45 57.5 57.5 0.2 +608 1 1 1 47.4194 46.0827 51.7308 -0.516121 -0.783452 0.346153 0.489345 45 57.5 57.5 0.2 +609 1 1 -1 47.0611 46.559 52.1266 -0.587785 -0.688191 0.425325 0.489345 45 57.5 57.5 0.2 +610 1 1 1 47.1437 46.0368 51.0651 -0.571252 -0.792649 0.213023 0.489345 45 57.5 57.5 0.2 +611 1 1 -1 46.7629 46.4884 51.48 -0.647412 -0.70231 0.296004 0.489345 45 57.5 57.5 0.2 +612 1 1 1 46.4645 46.9925 51.8587 -0.707107 -0.601501 0.371748 0.489345 45 57.5 57.5 0.2 +613 1 1 -1 46.9925 48.1413 53.5355 -0.601501 -0.371748 0.707107 0.489345 45 57.5 57.5 0.2 +614 1 1 1 46.559 47.8734 52.9389 -0.688191 -0.425325 0.587785 0.489345 45 57.5 57.5 0.2 +615 1 1 -1 46.4884 48.52 53.2371 -0.70231 -0.296004 0.647412 0.489345 45 57.5 57.5 0.2 +616 1 1 1 46.2103 47.6579 52.27 -0.757936 -0.468429 0.45399 0.489345 45 57.5 57.5 0.2 +617 1 1 -1 46.0827 48.2692 52.5806 -0.783452 -0.346153 0.516121 0.489345 45 57.5 57.5 0.2 +618 1 1 1 46.0368 48.9349 52.8563 -0.792649 -0.213023 0.571252 0.489345 45 57.5 57.5 0.2 +619 1 1 -1 47.4331 46.7671 52.8213 -0.513375 -0.646578 0.564254 0.489345 45 57.5 57.5 0.2 +620 1 1 1 46.7671 47.1787 52.5669 -0.646578 -0.564254 0.513375 0.489345 45 57.5 57.5 0.2 +621 1 1 -1 47.1787 47.4331 53.2329 -0.564254 -0.513375 0.646578 0.489345 45 57.5 57.5 0.2 +622 1 1 1 51.0651 47.1437 53.9632 0.213023 -0.571252 0.792649 0.489345 45 57.5 57.5 0.2 +623 1 1 -1 51.7308 47.4194 53.9173 0.346153 -0.516121 0.783452 0.489345 45 57.5 57.5 0.2 +624 1 1 1 52.3421 47.73 53.7897 0.468429 -0.45399 0.757936 0.489345 45 57.5 57.5 0.2 +625 1 1 -1 52.1266 47.0611 53.441 0.425325 -0.587785 0.688191 0.489345 45 57.5 57.5 0.2 +626 1 1 1 51.48 46.7629 53.5116 0.296004 -0.647412 0.70231 0.489345 45 57.5 57.5 0.2 +627 1 1 -1 51.8587 46.4645 53.0075 0.371748 -0.707107 0.601501 0.489345 45 57.5 57.5 0.2 +628 1 1 1 53.0075 48.1413 53.5355 0.601501 -0.371748 0.707107 0.489345 45 57.5 57.5 0.2 +629 1 1 -1 53.5116 48.52 53.2371 0.70231 -0.296004 0.647412 0.489345 45 57.5 57.5 0.2 +630 1 1 1 53.441 47.8734 52.9389 0.688191 -0.425325 0.587785 0.489345 45 57.5 57.5 0.2 +631 1 1 -1 53.9632 48.9349 52.8563 0.792649 -0.213023 0.571252 0.489345 45 57.5 57.5 0.2 +632 1 1 1 53.9173 48.2692 52.5806 0.783452 -0.346153 0.516121 0.489345 45 57.5 57.5 0.2 +633 1 1 -1 53.7897 47.6579 52.27 0.757936 -0.468429 0.45399 0.489345 45 57.5 57.5 0.2 +634 1 1 1 52.27 46.2103 52.3421 0.45399 -0.757936 0.468429 0.489345 45 57.5 57.5 0.2 +635 1 1 -1 52.9389 46.559 52.1266 0.587785 -0.688191 0.425325 0.489345 45 57.5 57.5 0.2 +636 1 1 1 52.5806 46.0827 51.7308 0.516121 -0.783452 0.346153 0.489345 45 57.5 57.5 0.2 +637 1 1 -1 53.5355 46.9925 51.8587 0.707107 -0.601501 0.371748 0.489345 45 57.5 57.5 0.2 +638 1 1 1 53.2371 46.4884 51.48 0.647412 -0.70231 0.296004 0.489345 45 57.5 57.5 0.2 +639 1 1 -1 52.8563 46.0368 51.0651 0.571252 -0.792649 0.213023 0.489345 45 57.5 57.5 0.2 +640 1 1 1 52.8213 47.4331 53.2329 0.564254 -0.513375 0.646578 0.489345 45 57.5 57.5 0.2 +641 1 1 -1 53.2329 47.1787 52.5669 0.646578 -0.564254 0.513375 0.489345 45 57.5 57.5 0.2 +642 1 1 1 52.5669 46.7671 52.8213 0.513375 -0.646578 0.564254 0.489345 45 57.5 57.5 0.2 643 2 2 1 50 50 57 0 0 1 0.489345 45 57.5 80 0 From a3c90296648f56c698f42b2caf3157a5513ba1c6 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Tue, 7 Mar 2023 12:02:56 -0600 Subject: [PATCH 369/445] Reverted the cutoff to 20.0 for in.nopbc --- examples/PACKAGES/dielectric/in.nopbc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/PACKAGES/dielectric/in.nopbc b/examples/PACKAGES/dielectric/in.nopbc index 724ad8456a..e6f63f3444 100644 --- a/examples/PACKAGES/dielectric/in.nopbc +++ b/examples/PACKAGES/dielectric/in.nopbc @@ -18,7 +18,7 @@ read_data ${data} group interface type 1 group ions type 2 3 -pair_style lj/cut/coul/cut/dielectric 1.122 12.0 +pair_style lj/cut/coul/cut/dielectric 1.122 20.0 pair_coeff * * 1.0 1.0 pair_coeff 1 1 0.0 1.0 From ce1956e60b198063b519cdfe53ec90f55aad7976 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 13:43:27 -0500 Subject: [PATCH 370/445] avoid linking errors due to nvcc wrapper warning silencing. --- cmake/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index a6956f5f5d..41229e9cd6 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -538,7 +538,10 @@ set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler and machine separate_arguments(CMAKE_TUNE_FLAGS) foreach(_FLAG ${CMAKE_TUNE_FLAGS}) target_compile_options(lammps PRIVATE ${_FLAG}) - target_compile_options(lmp PRIVATE ${_FLAG}) + # skip these flags when linking the main executable + if(NOT (("${_FLAG}" STREQUAL "-Xcudafe") OR (("${_FLAG}" STREQUAL "--diag_suppress=unrecognized_pragma")))) + target_compile_options(lmp PRIVATE ${_FLAG}) + endif() endforeach() ######################################################################## # Basic system tests (standard libraries, headers, functions, types) # From 4ed49d2f21ffe6a65d022d46906ff9c82ec1ec7a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 13:44:34 -0500 Subject: [PATCH 371/445] make Input::file(const char *) function safe for passing a null pointer --- src/input.cpp | 23 ++++++++++++----------- src/library.cpp | 3 +-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index e653704ae3..ef0433dc99 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -327,15 +327,14 @@ void Input::file(const char *filename) // call to file() will close filename and decrement nfile if (me == 0) { - if (nfile == maxfile) - error->one(FLERR,"Too many nested levels of input scripts"); + if (nfile == maxfile) error->one(FLERR,"Too many nested levels of input scripts"); - infile = fopen(filename,"r"); - if (infile == nullptr) - error->one(FLERR,"Cannot open input script {}: {}", - filename, utils::getsyserror()); - - infiles[nfile++] = infile; + if (filename) { + infile = fopen(filename,"r"); + if (infile == nullptr) + error->one(FLERR,"Cannot open input script {}: {}", filename, utils::getsyserror()); + infiles[nfile++] = infile; + } } // process contents of file @@ -343,9 +342,11 @@ void Input::file(const char *filename) file(); if (me == 0) { - fclose(infile); - nfile--; - infile = infiles[nfile-1]; + if (filename) { + fclose(infile); + nfile--; + infile = infiles[nfile-1]; + } } } diff --git a/src/library.cpp b/src/library.cpp index 7fcc22ef17..9f817a1199 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -532,8 +532,7 @@ void lammps_file(void *handle, const char *filename) BEGIN_CAPTURE { if (lmp->update->whichflag != 0) - lmp->error->all(FLERR,"Library error: issuing LAMMPS commands " - "during a run is not allowed."); + lmp->error->all(FLERR, "Library error: issuing LAMMPS commands during a run is not allowed"); else lmp->input->file(filename); } From 19a3e2f6b3229f84a8ade829e56eeed477dec904 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 13:47:09 -0500 Subject: [PATCH 372/445] CUDA 12 is now tested --- cmake/Modules/Packages/GPU.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index 8ac1decc86..22b0bec798 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -98,9 +98,11 @@ if(GPU_API STREQUAL "CUDA") # comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported if(CUDA_VERSION VERSION_LESS 8.0) message(FATAL_ERROR "CUDA Toolkit version 8.0 or later is required") - elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.0") + elseif(CUDA_VERSION VERSION_GREATER_EQUAL "13.0") message(WARNING "Untested CUDA Toolkit version ${CUDA_VERSION}. Use at your own risk") set(GPU_CUDA_GENCODE "-arch=all") + elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.0") + set(GPU_CUDA_GENCODE "-arch=all") else() # Kepler (GPU Arch 3.0) is supported by CUDA 5 to CUDA 10.2 if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "11.0")) From 2a3d0458d5e0465f6bb5a127f265c56d1b88dc0c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 13:47:39 -0500 Subject: [PATCH 373/445] simplify --- src/main.cpp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 746ccc41e9..e3e304a0d4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,6 +34,13 @@ using namespace LAMMPS_NS; +// for convenience +static void finalize() +{ + lammps_kokkos_finalize(); + lammps_python_finalize(); +} + /* ---------------------------------------------------------------------- main program to drive LAMMPS ------------------------------------------------------------------------- */ @@ -41,7 +48,6 @@ using namespace LAMMPS_NS; int main(int argc, char **argv) { MPI_Init(&argc, &argv); - MPI_Comm lammps_comm = MPI_COMM_WORLD; #if defined(LMP_MDI) @@ -75,19 +81,21 @@ int main(int argc, char **argv) lammps->input->file(); delete lammps; } catch (LAMMPSAbortException &ae) { - lammps_kokkos_finalize(); - lammps_python_finalize(); + finalize(); MPI_Abort(ae.universe, 1); } catch (LAMMPSException &) { - lammps_kokkos_finalize(); - lammps_python_finalize(); + finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); exit(1); } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - lammps_kokkos_finalize(); - lammps_python_finalize(); + finalize(); + MPI_Abort(MPI_COMM_WORLD, 1); + exit(1); + } catch (std::exception &e) { + fprintf(stderr, "Exception: %s\n", e.what()); + finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); } @@ -98,14 +106,12 @@ int main(int argc, char **argv) delete lammps; } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - lammps_kokkos_finalize(); - lammps_python_finalize(); + finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); } #endif - lammps_kokkos_finalize(); - lammps_python_finalize(); + finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); } From 2aa0e76ad97409759cace54a604fb8450579e760 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 13:43:27 -0500 Subject: [PATCH 374/445] avoid linking errors due to nvcc wrapper warning silencing. --- cmake/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index a6956f5f5d..41229e9cd6 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -538,7 +538,10 @@ set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler and machine separate_arguments(CMAKE_TUNE_FLAGS) foreach(_FLAG ${CMAKE_TUNE_FLAGS}) target_compile_options(lammps PRIVATE ${_FLAG}) - target_compile_options(lmp PRIVATE ${_FLAG}) + # skip these flags when linking the main executable + if(NOT (("${_FLAG}" STREQUAL "-Xcudafe") OR (("${_FLAG}" STREQUAL "--diag_suppress=unrecognized_pragma")))) + target_compile_options(lmp PRIVATE ${_FLAG}) + endif() endforeach() ######################################################################## # Basic system tests (standard libraries, headers, functions, types) # From b21d915a7ce5e1b55008383f3d38ec174c0abc0d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 13:47:39 -0500 Subject: [PATCH 375/445] simplify --- src/main.cpp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 746ccc41e9..e3e304a0d4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,6 +34,13 @@ using namespace LAMMPS_NS; +// for convenience +static void finalize() +{ + lammps_kokkos_finalize(); + lammps_python_finalize(); +} + /* ---------------------------------------------------------------------- main program to drive LAMMPS ------------------------------------------------------------------------- */ @@ -41,7 +48,6 @@ using namespace LAMMPS_NS; int main(int argc, char **argv) { MPI_Init(&argc, &argv); - MPI_Comm lammps_comm = MPI_COMM_WORLD; #if defined(LMP_MDI) @@ -75,19 +81,21 @@ int main(int argc, char **argv) lammps->input->file(); delete lammps; } catch (LAMMPSAbortException &ae) { - lammps_kokkos_finalize(); - lammps_python_finalize(); + finalize(); MPI_Abort(ae.universe, 1); } catch (LAMMPSException &) { - lammps_kokkos_finalize(); - lammps_python_finalize(); + finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); exit(1); } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - lammps_kokkos_finalize(); - lammps_python_finalize(); + finalize(); + MPI_Abort(MPI_COMM_WORLD, 1); + exit(1); + } catch (std::exception &e) { + fprintf(stderr, "Exception: %s\n", e.what()); + finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); } @@ -98,14 +106,12 @@ int main(int argc, char **argv) delete lammps; } catch (fmt::format_error &fe) { fprintf(stderr, "fmt::format_error: %s\n", fe.what()); - lammps_kokkos_finalize(); - lammps_python_finalize(); + finalize(); MPI_Abort(MPI_COMM_WORLD, 1); exit(1); } #endif - lammps_kokkos_finalize(); - lammps_python_finalize(); + finalize(); MPI_Barrier(lammps_comm); MPI_Finalize(); } From c2d0734bc46439852fe5615d585d2aae3fd0f5ce Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 14:36:56 -0500 Subject: [PATCH 376/445] rerun updated examples and record log files --- examples/PACKAGES/dielectric/in.nopbc | 2 +- .../dielectric/log.07Mar23.confined.dof.g++.1 | 192 ++++++++++++++++++ .../dielectric/log.07Mar23.confined.dof.g++.4 | 192 ++++++++++++++++++ .../log.07Mar23.confined.gmres.g++.1 | 8 +- .../log.07Mar23.confined.gmres.g++.4 | 8 +- .../dielectric/log.07Mar23.confined.icc.g++.1 | 6 +- .../dielectric/log.07Mar23.confined.icc.g++.4 | 8 +- .../dielectric/log.07Mar23.nopbc.dof.g++.1 | 136 +++++++++++++ .../dielectric/log.07Mar23.nopbc.dof.g++.4 | 136 +++++++++++++ .../dielectric/log.07Mar23.nopbc.gmres.g++.1 | 26 +-- .../dielectric/log.07Mar23.nopbc.gmres.g++.4 | 30 +-- .../dielectric/log.07Mar23.nopbc.icc.g++.1 | 28 +-- .../dielectric/log.07Mar23.nopbc.icc.g++.4 | 30 +-- 13 files changed, 729 insertions(+), 73 deletions(-) create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.confined.dof.g++.1 create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.confined.dof.g++.4 create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.nopbc.dof.g++.1 create mode 100644 examples/PACKAGES/dielectric/log.07Mar23.nopbc.dof.g++.4 diff --git a/examples/PACKAGES/dielectric/in.nopbc b/examples/PACKAGES/dielectric/in.nopbc index e6f63f3444..cbb0d45377 100644 --- a/examples/PACKAGES/dielectric/in.nopbc +++ b/examples/PACKAGES/dielectric/in.nopbc @@ -27,7 +27,7 @@ neigh_modify one 5000 #compute ef all efield/atom #dump 1 all custom 100 all.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] # -dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +#dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] #dump_modify 1 sort id fix 1 ions nve diff --git a/examples/PACKAGES/dielectric/log.07Mar23.confined.dof.g++.1 b/examples/PACKAGES/dielectric/log.07Mar23.confined.dof.g++.1 new file mode 100644 index 0000000000..2634bf3232 --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.confined.dof.g++.1 @@ -0,0 +1,192 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Two ions, a cation and an anion, confined between two interfaces: epsilon1 | epsilon2 | epsilon1 +# The interface normal vectors should be consistent with ed, pointing from region with epsilon1 to that with epsilon2 +# bottom interface: n = (0, 0, 1) +# top interface: n = (0, 0, -1) +# so that ed's are the same for both interfaces + +# Dielectric constants can be set to be different from the input data file + +variable epsilon1 index 20 +variable epsilon2 index 10 + +variable data index data.confined + +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary p p f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +# compute the relevant values for the interface particles + +variable ed equal "v_epsilon2 - v_epsilon1" +variable em equal "(v_epsilon2 + v_epsilon1)/2" +variable epsilon equal 1.0 # epsilon at the patch, not used for now +variable area equal 0.866 # patch area, same as in the data file + +read_data ${data} +read_data data.confined +Reading data file ... + orthogonal box = (0 0 0) to (40.000006 43.301277 40) + 1 by 1 by 1 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 4002 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.013 seconds + +group interface type 1 +4000 atoms in group interface +group ions type 2 3 +2 atoms in group ions + +group cations type 2 +1 atoms in group cations +group anions type 3 +1 atoms in group anions + +# set the dielectric constant of the medium where the ions reside + +set group cations epsilon ${epsilon2} +set group cations epsilon 10 +Setting atom values ... + 1 settings made for epsilon +set group anions epsilon ${epsilon2} +set group anions epsilon 10 +Setting atom values ... + 1 settings made for epsilon + +pair_style lj/cut/coul/long/dielectric 1.122 10.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +kspace_style pppm/dielectric 0.0001 +kspace_modify slab 3.0 + +neigh_modify every 1 delay 0 check yes one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump 2 interface custom 100 interface.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +#dump 3 ions custom 100 ions.dump id mol type q x y z fx fy fz #c_ef[1] c_ef[2] c_ef[3] + +fix 1 ions nve + +# fix modify is used to set the properties of the interface particle group + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == dof" "fix 3 interface polarize/functional 1 0.0001" "fix_modify 3 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" else "print 'Unsupported polarization solver' " +fix 3 interface polarize/functional 1 0.0001 +fix_modify 3 dielectrics ${ed} ${em} ${epsilon} ${area} NULL +fix_modify 3 dielectrics -10 ${em} ${epsilon} ${area} NULL +fix_modify 3 dielectrics -10 15 ${epsilon} ${area} NULL +fix_modify 3 dielectrics -10 15 1 ${area} NULL +fix_modify 3 dielectrics -10 15 1 0.866 NULL + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair #f_3 +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.24260797 + grid = 12 12 36 + stencil order = 5 + estimated absolute RMS force accuracy = 2.5219574e-07 + estimated relative force accuracy = 2.5219574e-07 + using double precision KISS FFT + 3d grid and FFT values/proc = 10982 5184 +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +Direct solver using a variational approach for 4000 induced charges +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 10.3 + ghost atom cutoff = 10.3 + binsize = 5.15, bins = 8 9 8 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair lj/cut/coul/long/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard + (2) fix polarize/functional, perpetual, copy from (1) + attributes: full, newton off + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 753.9 | 753.9 | 753.9 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 0 -1.8534698e-05 -1.8534698e-05 +Loop time of 1.622e-06 on 1 procs for 0 steps with 4002 atoms + +185.0% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Kspace | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 1.622e-06 | | |100.00 + +Nlocal: 4002 ave 4002 max 4002 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 4832 ave 4832 max 4832 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 1.51316e+06 ave 1.51316e+06 max 1.51316e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1513160 +Ave neighs/atom = 378.10095 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + + + +Total wall time: 0:00:05 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.confined.dof.g++.4 b/examples/PACKAGES/dielectric/log.07Mar23.confined.dof.g++.4 new file mode 100644 index 0000000000..7ece331863 --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.confined.dof.g++.4 @@ -0,0 +1,192 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Two ions, a cation and an anion, confined between two interfaces: epsilon1 | epsilon2 | epsilon1 +# The interface normal vectors should be consistent with ed, pointing from region with epsilon1 to that with epsilon2 +# bottom interface: n = (0, 0, 1) +# top interface: n = (0, 0, -1) +# so that ed's are the same for both interfaces + +# Dielectric constants can be set to be different from the input data file + +variable epsilon1 index 20 +variable epsilon2 index 10 + +variable data index data.confined + +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary p p f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +# compute the relevant values for the interface particles + +variable ed equal "v_epsilon2 - v_epsilon1" +variable em equal "(v_epsilon2 + v_epsilon1)/2" +variable epsilon equal 1.0 # epsilon at the patch, not used for now +variable area equal 0.866 # patch area, same as in the data file + +read_data ${data} +read_data data.confined +Reading data file ... + orthogonal box = (0 0 0) to (40.000006 43.301277 40) + 2 by 2 by 1 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 4002 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.013 seconds + +group interface type 1 +4000 atoms in group interface +group ions type 2 3 +2 atoms in group ions + +group cations type 2 +1 atoms in group cations +group anions type 3 +1 atoms in group anions + +# set the dielectric constant of the medium where the ions reside + +set group cations epsilon ${epsilon2} +set group cations epsilon 10 +Setting atom values ... + 1 settings made for epsilon +set group anions epsilon ${epsilon2} +set group anions epsilon 10 +Setting atom values ... + 1 settings made for epsilon + +pair_style lj/cut/coul/long/dielectric 1.122 10.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +kspace_style pppm/dielectric 0.0001 +kspace_modify slab 3.0 + +neigh_modify every 1 delay 0 check yes one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump 2 interface custom 100 interface.dump id mol type q x y z #fx fy fz c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +#dump 3 ions custom 100 ions.dump id mol type q x y z fx fy fz #c_ef[1] c_ef[2] c_ef[3] + +fix 1 ions nve + +# fix modify is used to set the properties of the interface particle group + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" "fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" elif "${method} == dof" "fix 3 interface polarize/functional 1 0.0001" "fix_modify 3 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" else "print 'Unsupported polarization solver' " +fix 3 interface polarize/functional 1 0.0001 +fix_modify 3 dielectrics ${ed} ${em} ${epsilon} ${area} NULL +fix_modify 3 dielectrics -10 ${em} ${epsilon} ${area} NULL +fix_modify 3 dielectrics -10 15 ${epsilon} ${area} NULL +fix_modify 3 dielectrics -10 15 1 ${area} NULL +fix_modify 3 dielectrics -10 15 1 0.866 NULL + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair #f_3 +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.24260797 + grid = 12 12 36 + stencil order = 5 + estimated absolute RMS force accuracy = 2.5219574e-07 + estimated relative force accuracy = 2.5219574e-07 + using double precision KISS FFT + 3d grid and FFT values/proc = 4598 1296 +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +Direct solver using a variational approach for 4000 induced charges +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 10.3 + ghost atom cutoff = 10.3 + binsize = 5.15, bins = 8 9 8 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair lj/cut/coul/long/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard + (2) fix polarize/functional, perpetual, copy from (1) + attributes: full, newton off + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 744 | 744 | 744 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 0 -1.8534698e-05 -1.8534698e-05 +Loop time of 2.36225e-06 on 4 procs for 0 steps with 4002 atoms + +148.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Kspace | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 2.362e-06 | | |100.00 + +Nlocal: 1000.5 ave 1001 max 1000 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 2889.5 ave 2890 max 2889 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 378290 ave 378465 max 378117 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 1513160 +Ave neighs/atom = 378.10095 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + + + +Total wall time: 0:00:02 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.1 b/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.1 index ca0c22e5d3..5b6461dcdb 100644 --- a/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.1 +++ b/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.1 @@ -47,7 +47,7 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-3 neighbors 0 = max # of 1-4 neighbors 1 = max # of special neighbors - special bonds CPU = 0.001 seconds + special bonds CPU = 0.000 seconds read_data CPU = 0.013 seconds group interface type 1 @@ -149,9 +149,9 @@ Neighbor list info ... Per MPI rank memory allocation (min/avg/max) = 381.6 | 381.6 | 381.6 Mbytes Step E_vdwl E_coul E_long E_pair 0 0 -1.7228107e-08 -1.8534756e-05 -1.8551984e-05 -Loop time of 1.872e-06 on 1 procs for 0 steps with 4002 atoms +Loop time of 1.939e-06 on 1 procs for 0 steps with 4002 atoms -160.3% CPU use with 1 MPI tasks x 1 OpenMP threads +103.1% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total @@ -163,7 +163,7 @@ Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0 | 0 | 0 | 0.0 | 0.00 Output | 0 | 0 | 0 | 0.0 | 0.00 Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.872e-06 | | |100.00 +Other | | 1.939e-06 | | |100.00 Nlocal: 4002 ave 4002 max 4002 min Histogram: 1 0 0 0 0 0 0 0 0 0 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.4 b/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.4 index f4e855ad42..fa59c736d4 100644 --- a/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.4 +++ b/examples/PACKAGES/dielectric/log.07Mar23.confined.gmres.g++.4 @@ -48,7 +48,7 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-4 neighbors 1 = max # of special neighbors special bonds CPU = 0.001 seconds - read_data CPU = 0.011 seconds + read_data CPU = 0.012 seconds group interface type 1 4000 atoms in group interface @@ -149,9 +149,9 @@ Neighbor list info ... Per MPI rank memory allocation (min/avg/max) = 376.2 | 376.2 | 376.2 Mbytes Step E_vdwl E_coul E_long E_pair 0 0 -1.7228107e-08 -1.8534756e-05 -1.8551984e-05 -Loop time of 1.49983e-05 on 4 procs for 0 steps with 4002 atoms +Loop time of 1.6531e-05 on 4 procs for 0 steps with 4002 atoms -85.0% CPU use with 4 MPI tasks x 1 OpenMP threads +102.8% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total @@ -163,7 +163,7 @@ Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0 | 0 | 0 | 0.0 | 0.00 Output | 0 | 0 | 0 | 0.0 | 0.00 Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.5e-05 | | |100.00 +Other | | 1.653e-05 | | |100.00 Nlocal: 1000.5 ave 1001 max 1000 min Histogram: 2 0 0 0 0 0 0 0 0 2 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.1 b/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.1 index 9c1ab22f90..d63235cff1 100644 --- a/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.1 +++ b/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.1 @@ -151,9 +151,9 @@ Neighbor list info ... Per MPI rank memory allocation (min/avg/max) = 14.99 | 14.99 | 14.99 Mbytes Step E_vdwl E_coul E_long E_pair 0 0 -1.7228514e-08 -1.8534756e-05 -1.8551985e-05 -Loop time of 1.573e-06 on 1 procs for 0 steps with 4002 atoms +Loop time of 1.823e-06 on 1 procs for 0 steps with 4002 atoms -190.7% CPU use with 1 MPI tasks x 1 OpenMP threads +109.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total @@ -165,7 +165,7 @@ Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0 | 0 | 0 | 0.0 | 0.00 Output | 0 | 0 | 0 | 0.0 | 0.00 Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.573e-06 | | |100.00 +Other | | 1.823e-06 | | |100.00 Nlocal: 4002 ave 4002 max 4002 min Histogram: 1 0 0 0 0 0 0 0 0 0 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.4 b/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.4 index c60b803cd1..e908ce82f9 100644 --- a/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.4 +++ b/examples/PACKAGES/dielectric/log.07Mar23.confined.icc.g++.4 @@ -47,7 +47,7 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-3 neighbors 0 = max # of 1-4 neighbors 1 = max # of special neighbors - special bonds CPU = 0.001 seconds + special bonds CPU = 0.000 seconds read_data CPU = 0.012 seconds group interface type 1 @@ -151,9 +151,9 @@ Neighbor list info ... Per MPI rank memory allocation (min/avg/max) = 9.647 | 9.647 | 9.647 Mbytes Step E_vdwl E_coul E_long E_pair 0 0 -1.7228514e-08 -1.8534756e-05 -1.8551985e-05 -Loop time of 1.23127e-05 on 4 procs for 0 steps with 4002 atoms +Loop time of 2.29425e-06 on 4 procs for 0 steps with 4002 atoms -103.6% CPU use with 4 MPI tasks x 1 OpenMP threads +141.7% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total @@ -165,7 +165,7 @@ Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0 | 0 | 0 | 0.0 | 0.00 Output | 0 | 0 | 0 | 0.0 | 0.00 Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.231e-05 | | |100.00 +Other | | 2.294e-06 | | |100.00 Nlocal: 1000.5 ave 1001 max 1000 min Histogram: 2 0 0 0 0 0 0 0 0 2 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.dof.g++.1 b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.dof.g++.1 new file mode 100644 index 0000000000..f964d4d8f4 --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.dof.g++.1 @@ -0,0 +1,136 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Interface +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary f f f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +variable data index data.sphere + +read_data ${data} +read_data data.sphere +Reading data file ... + orthogonal box = (0 0 0) to (100 100 100) + 1 by 1 by 1 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 643 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.004 seconds + +group interface type 1 +642 atoms in group interface +group ions type 2 3 +1 atoms in group ions + +pair_style lj/cut/coul/cut/dielectric 1.122 20.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +neigh_modify one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +# +#dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +fix 1 ions nve + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" elif "${method} == dof" "fix 3 interface polarize/functional 1 1.0e-4" else "print 'Unsupported method for polarization' " +fix 3 interface polarize/functional 1 1.0e-4 + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +Direct solver using a variational approach for 642 induced charges +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 20.3 + ghost atom cutoff = 20.3 + binsize = 10.15, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair lj/cut/coul/cut/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard + (2) fix polarize/functional, perpetual, copy from (1) + attributes: full, newton off + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 29.83 | 29.83 | 29.83 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 -0.011053355 0 -0.011053355 +Loop time of 1.691e-06 on 1 procs for 0 steps with 643 atoms + +177.4% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 1.691e-06 | | |100.00 + +Nlocal: 643 ave 643 max 643 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 412806 ave 412806 max 412806 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 412806 +Ave neighs/atom = 642 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + +Total wall time: 0:00:02 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.dof.g++.4 b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.dof.g++.4 new file mode 100644 index 0000000000..f1848bd130 --- /dev/null +++ b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.dof.g++.4 @@ -0,0 +1,136 @@ +LAMMPS (8 Feb 2023) + using 1 OpenMP thread(s) per MPI task +# Interface +newton off +units lj +atom_style dielectric +atom_modify map array +dimension 3 +boundary f f f + +variable method index gmres # gmres = BEM/GMRES + # icc = BEM/ICC* + # dof = Direct optimization of the functional + # none + +variable data index data.sphere + +read_data ${data} +read_data data.sphere +Reading data file ... + orthogonal box = (0 0 0) to (100 100 100) + 1 by 2 by 2 MPI processor grid +WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) + reading atoms ... + 643 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.004 seconds + +group interface type 1 +642 atoms in group interface +group ions type 2 3 +1 atoms in group ions + +pair_style lj/cut/coul/cut/dielectric 1.122 20.0 +pair_coeff * * 1.0 1.0 +pair_coeff 1 1 0.0 1.0 + +neigh_modify one 5000 + +#compute ef all efield/atom +#dump 1 all custom 100 all.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +# +#dump 2 interface custom 100 interface.dump id mol type q x y z #c_ef[1] c_ef[2] c_ef[3] +#dump_modify 1 sort id + +fix 1 ions nve + +if "${method} == gmres" then "fix 3 interface polarize/bem/gmres 1 1.0e-4" elif "${method} == icc" "fix 3 interface polarize/bem/icc 1 1.0e-4" elif "${method} == dof" "fix 3 interface polarize/functional 1 1.0e-4" else "print 'Unsupported method for polarization' " +fix 3 interface polarize/functional 1 1.0e-4 + +thermo 1000 +thermo_style custom step evdwl ecoul elong epair +thermo_modify flush yes + +run 0 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- DIELECTRIC package: doi:10.1016/j.cpc.2019.03.006 + +@Article{TrungCPC19, + author = {Trung Dac Nguyen and Honghao Li and Debarshee Bagchi and Francisco J. Solis and Olvera de la Cruz, Monica} + title = {Incorporating Surface Polarization Effects Into Large-Scale + Coarse-Grained Molecular Dynamics Simulation}, + journal = {Comput.\ Phys.\ Commun.}, + year = 2019, + volume = 241, + pages = {80--91} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule +Direct solver using a variational approach for 642 induced charges +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 5000, page size: 100000 + master list distance cutoff = 20.3 + ghost atom cutoff = 20.3 + binsize = 10.15, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair lj/cut/coul/cut/dielectric, perpetual + attributes: full, newton off + pair build: full/bin + stencil: full/bin/3d + bin: standard + (2) fix polarize/functional, perpetual, copy from (1) + attributes: full, newton off + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 26.9 | 27.48 | 27.67 Mbytes + Step E_vdwl E_coul E_long E_pair + 0 0 -0.011053355 0 -0.011053355 +Loop time of 2.96225e-06 on 4 procs for 0 steps with 643 atoms + +143.5% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Bond | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 2.962e-06 | | |100.00 + +Nlocal: 160.75 ave 178 max 145 min +Histogram: 1 0 0 0 2 0 0 0 0 1 +Nghost: 482.25 ave 498 max 465 min +Histogram: 1 0 0 0 0 2 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 103202 ave 114276 max 93090 min +Histogram: 1 0 0 0 2 0 0 0 0 1 + +Total # of neighbors = 412806 +Ave neighs/atom = 642 +Ave special neighs/atom = 0 +Neighbor list builds = 0 +Dangerous builds = 0 + + + +Total wall time: 0:00:01 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.1 b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.1 index 08cbbb2b7d..77e448b807 100644 --- a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.1 +++ b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.1 @@ -22,7 +22,7 @@ Reading data file ... 1 by 1 by 1 MPI processor grid WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) reading atoms ... - 2563 atoms + 643 atoms Finding 1-2 1-3 1-4 neighbors ... special bond factors lj: 0 0 0 special bond factors coul: 0 0 0 @@ -31,10 +31,10 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-4 neighbors 1 = max # of special neighbors special bonds CPU = 0.000 seconds - read_data CPU = 0.011 seconds + read_data CPU = 0.004 seconds group interface type 1 -2562 atoms in group interface +642 atoms in group interface group ions type 2 3 1 atoms in group ions @@ -80,7 +80,7 @@ Your simulation uses code contributions which should be cited: CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule -BEM/GMRES solver for 2562 induced charges using maximum 2561 q-vectors +BEM/GMRES solver for 642 induced charges using maximum 641 q-vectors Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes max neighbors/atom: 5000, page size: 100000 @@ -93,12 +93,12 @@ Neighbor list info ... pair build: full/bin stencil: full/bin/3d bin: standard -Per MPI rank memory allocation (min/avg/max) = 183.5 | 183.5 | 183.5 Mbytes +Per MPI rank memory allocation (min/avg/max) = 18.6 | 18.6 | 18.6 Mbytes Step E_vdwl E_coul E_long E_pair - 0 0 2.1870454e-07 0 2.1870454e-07 -Loop time of 1.538e-06 on 1 procs for 0 steps with 2563 atoms + 0 0 -0.011226675 0 -0.011226675 +Loop time of 1.659e-06 on 1 procs for 0 steps with 643 atoms -195.1% CPU use with 1 MPI tasks x 1 OpenMP threads +120.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total @@ -109,19 +109,19 @@ Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0 | 0 | 0 | 0.0 | 0.00 Output | 0 | 0 | 0 | 0.0 | 0.00 Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.538e-06 | | |100.00 +Other | | 1.659e-06 | | |100.00 -Nlocal: 2563 ave 2563 max 2563 min +Nlocal: 643 ave 643 max 643 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 -FullNghs: 6.56561e+06 ave 6.56561e+06 max 6.56561e+06 min +FullNghs: 412806 ave 412806 max 412806 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 6565612 -Ave neighs/atom = 2561.6902 +Total # of neighbors = 412806 +Ave neighs/atom = 642 Ave special neighs/atom = 0 Neighbor list builds = 0 Dangerous builds = 0 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.4 b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.4 index 060c00a9be..2a7c703e1a 100644 --- a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.4 +++ b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.gmres.g++.4 @@ -22,7 +22,7 @@ Reading data file ... 1 by 2 by 2 MPI processor grid WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) reading atoms ... - 2563 atoms + 643 atoms Finding 1-2 1-3 1-4 neighbors ... special bond factors lj: 0 0 0 special bond factors coul: 0 0 0 @@ -30,11 +30,11 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-3 neighbors 0 = max # of 1-4 neighbors 1 = max # of special neighbors - special bonds CPU = 0.001 seconds - read_data CPU = 0.009 seconds + special bonds CPU = 0.000 seconds + read_data CPU = 0.003 seconds group interface type 1 -2562 atoms in group interface +642 atoms in group interface group ions type 2 3 1 atoms in group ions @@ -80,7 +80,7 @@ Your simulation uses code contributions which should be cited: CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule -BEM/GMRES solver for 2562 induced charges using maximum 2561 q-vectors +BEM/GMRES solver for 642 induced charges using maximum 641 q-vectors Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes max neighbors/atom: 5000, page size: 100000 @@ -93,12 +93,12 @@ Neighbor list info ... pair build: full/bin stencil: full/bin/3d bin: standard -Per MPI rank memory allocation (min/avg/max) = 164.6 | 164.7 | 165 Mbytes +Per MPI rank memory allocation (min/avg/max) = 17.2 | 17.49 | 17.58 Mbytes Step E_vdwl E_coul E_long E_pair - 0 0 2.1870454e-07 0 2.1870454e-07 -Loop time of 2.4415e-06 on 4 procs for 0 steps with 2563 atoms + 0 0 -0.011226675 0 -0.011226675 +Loop time of 6.7975e-06 on 4 procs for 0 steps with 643 atoms -133.1% CPU use with 4 MPI tasks x 1 OpenMP threads +80.9% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total @@ -109,19 +109,19 @@ Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0 | 0 | 0 | 0.0 | 0.00 Output | 0 | 0 | 0 | 0.0 | 0.00 Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 2.442e-06 | | |100.00 +Other | | 6.797e-06 | | |100.00 -Nlocal: 640.75 ave 674 max 609 min +Nlocal: 160.75 ave 178 max 145 min Histogram: 1 0 0 0 2 0 0 0 0 1 -Nghost: 1922.25 ave 1954 max 1889 min +Nghost: 482.25 ave 498 max 465 min Histogram: 1 0 0 0 0 2 0 0 0 1 Neighs: 0 ave 0 max 0 min Histogram: 4 0 0 0 0 0 0 0 0 0 -FullNghs: 1.6414e+06 ave 1.72639e+06 max 1.56007e+06 min +FullNghs: 103202 ave 114276 max 93090 min Histogram: 1 0 0 0 2 0 0 0 0 1 -Total # of neighbors = 6565612 -Ave neighs/atom = 2561.6902 +Total # of neighbors = 412806 +Ave neighs/atom = 642 Ave special neighs/atom = 0 Neighbor list builds = 0 Dangerous builds = 0 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.1 b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.1 index cdde6a228a..91e9ba130b 100644 --- a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.1 +++ b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.1 @@ -22,7 +22,7 @@ Reading data file ... 1 by 1 by 1 MPI processor grid WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) reading atoms ... - 2563 atoms + 643 atoms Finding 1-2 1-3 1-4 neighbors ... special bond factors lj: 0 0 0 special bond factors coul: 0 0 0 @@ -31,10 +31,10 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-4 neighbors 1 = max # of special neighbors special bonds CPU = 0.000 seconds - read_data CPU = 0.011 seconds + read_data CPU = 0.004 seconds group interface type 1 -2562 atoms in group interface +642 atoms in group interface group ions type 2 3 1 atoms in group ions @@ -80,7 +80,7 @@ Your simulation uses code contributions which should be cited: CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule -BEM/ICC solver for 2562 induced charges +BEM/ICC solver for 642 induced charges using pair style lj/cut/coul/cut/dielectric Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes @@ -94,12 +94,12 @@ Neighbor list info ... pair build: full/bin stencil: full/bin/3d bin: standard -Per MPI rank memory allocation (min/avg/max) = 32.96 | 32.96 | 32.96 Mbytes +Per MPI rank memory allocation (min/avg/max) = 8.898 | 8.898 | 8.898 Mbytes Step E_vdwl E_coul E_long E_pair - 0 0 2.1870503e-07 0 2.1870503e-07 -Loop time of 1.536e-06 on 1 procs for 0 steps with 2563 atoms + 0 0 -0.011226707 0 -0.011226707 +Loop time of 1.532e-06 on 1 procs for 0 steps with 643 atoms -195.3% CPU use with 1 MPI tasks x 1 OpenMP threads +130.5% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total @@ -110,23 +110,23 @@ Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0 | 0 | 0 | 0.0 | 0.00 Output | 0 | 0 | 0 | 0.0 | 0.00 Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.536e-06 | | |100.00 +Other | | 1.532e-06 | | |100.00 -Nlocal: 2563 ave 2563 max 2563 min +Nlocal: 643 ave 643 max 643 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 -FullNghs: 6.56561e+06 ave 6.56561e+06 max 6.56561e+06 min +FullNghs: 412806 ave 412806 max 412806 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 6565612 -Ave neighs/atom = 2561.6902 +Total # of neighbors = 412806 +Ave neighs/atom = 642 Ave special neighs/atom = 0 Neighbor list builds = 0 Dangerous builds = 0 -Total wall time: 0:00:01 +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.4 b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.4 index e329d5c958..0d4eaf79ff 100644 --- a/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.4 +++ b/examples/PACKAGES/dielectric/log.07Mar23.nopbc.icc.g++.4 @@ -22,7 +22,7 @@ Reading data file ... 1 by 2 by 2 MPI processor grid WARNING: Atom style in data file differs from currently defined atom style (src/read_data.cpp:620) reading atoms ... - 2563 atoms + 643 atoms Finding 1-2 1-3 1-4 neighbors ... special bond factors lj: 0 0 0 special bond factors coul: 0 0 0 @@ -30,11 +30,11 @@ Finding 1-2 1-3 1-4 neighbors ... 0 = max # of 1-3 neighbors 0 = max # of 1-4 neighbors 1 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.008 seconds + special bonds CPU = 0.001 seconds + read_data CPU = 0.004 seconds group interface type 1 -2562 atoms in group interface +642 atoms in group interface group ions type 2 3 1 atoms in group ions @@ -80,7 +80,7 @@ Your simulation uses code contributions which should be cited: CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Generated 0 of 3 mixed pair_coeff terms from geometric mixing rule -BEM/ICC solver for 2562 induced charges +BEM/ICC solver for 642 induced charges using pair style lj/cut/coul/cut/dielectric Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes @@ -94,12 +94,12 @@ Neighbor list info ... pair build: full/bin stencil: full/bin/3d bin: standard -Per MPI rank memory allocation (min/avg/max) = 14.03 | 14.12 | 14.41 Mbytes +Per MPI rank memory allocation (min/avg/max) = 7.496 | 7.783 | 7.878 Mbytes Step E_vdwl E_coul E_long E_pair - 0 0 2.1870503e-07 0 2.1870503e-07 -Loop time of 2.408e-06 on 4 procs for 0 steps with 2563 atoms + 0 0 -0.011226707 0 -0.011226707 +Loop time of 6.43925e-06 on 4 procs for 0 steps with 643 atoms -135.0% CPU use with 4 MPI tasks x 1 OpenMP threads +93.2% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total @@ -110,19 +110,19 @@ Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0 | 0 | 0 | 0.0 | 0.00 Output | 0 | 0 | 0 | 0.0 | 0.00 Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 2.408e-06 | | |100.00 +Other | | 6.439e-06 | | |100.00 -Nlocal: 640.75 ave 674 max 609 min +Nlocal: 160.75 ave 178 max 145 min Histogram: 1 0 0 0 2 0 0 0 0 1 -Nghost: 1922.25 ave 1954 max 1889 min +Nghost: 482.25 ave 498 max 465 min Histogram: 1 0 0 0 0 2 0 0 0 1 Neighs: 0 ave 0 max 0 min Histogram: 4 0 0 0 0 0 0 0 0 0 -FullNghs: 1.6414e+06 ave 1.72639e+06 max 1.56007e+06 min +FullNghs: 103202 ave 114276 max 93090 min Histogram: 1 0 0 0 2 0 0 0 0 1 -Total # of neighbors = 6565612 -Ave neighs/atom = 2561.6902 +Total # of neighbors = 412806 +Ave neighs/atom = 642 Ave special neighs/atom = 0 Neighbor list builds = 0 Dangerous builds = 0 From 01c03bddf62ea0064b0df3ddce3fab9d43472cb9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 15:22:54 -0500 Subject: [PATCH 377/445] improve style mismatch warning messages in read_data --- src/read_data.cpp | 67 +++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/src/read_data.cpp b/src/read_data.cpp index 6785e51ecc..bf96fa362a 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -336,8 +336,8 @@ void ReadData::command(int narg, char **arg) error->all(FLERR, "Cannot run 2d simulation with nonperiodic Z dimension"); if ((domain->nonperiodic == 2) && utils::strmatch(force->kspace_style, "^msm")) error->all(FLERR, - "Reading a data file with shrinkwrap boundaries is " - "not compatible with a MSM KSpace style"); + "Reading a data file with shrinkwrap boundaries is not " + "compatible with a MSM KSpace style"); if (domain->box_exist && !addflag) error->all(FLERR, "Cannot use read_data without add keyword after simulation box is defined"); if (!domain->box_exist && addflag) @@ -561,8 +561,8 @@ void ReadData::command(int narg, char **arg) // only done if firstpass and not first data file if (firstpass && addflag != NONE) { - double oldboxlo[3] = { domain->boxlo[0], domain->boxlo[1] , domain->boxlo[2]}; - double oldboxhi[3] = { domain->boxhi[0], domain->boxhi[1] , domain->boxhi[2]}; + double oldboxlo[3] = {domain->boxlo[0], domain->boxlo[1], domain->boxlo[2]}; + double oldboxhi[3] = {domain->boxhi[0], domain->boxhi[1], domain->boxhi[2]}; domain->boxlo[0] = MIN(domain->boxlo[0], boxlo[0] + shift[0]); domain->boxhi[0] = MAX(domain->boxhi[0], boxhi[0] + shift[0]); domain->boxlo[1] = MIN(domain->boxlo[1], boxlo[1] + shift[1]); @@ -575,7 +575,7 @@ void ReadData::command(int narg, char **arg) (oldboxlo[2] != domain->boxlo[2]) || (oldboxhi[0] != domain->boxhi[0]) || (oldboxhi[1] != domain->boxhi[1]) || (oldboxhi[2] != domain->boxhi[2])) { int iflag = 1; - for (int i=0; i < atom->nlocal; ++i) { + for (int i = 0; i < atom->nlocal; ++i) { int xbox = (atom->image[i] & IMGMASK) - IMGMAX; int ybox = (atom->image[i] >> IMGBITS & IMGMASK) - IMGMAX; int zbox = (atom->image[i] >> IMG2BITS) - IMGMAX; @@ -584,9 +584,9 @@ void ReadData::command(int narg, char **arg) if (zbox != 0) iflag = 1; } int flag_all; - MPI_Allreduce(&iflag,&flag_all, 1, MPI_INT, MPI_SUM, world); + MPI_Allreduce(&iflag, &flag_all, 1, MPI_INT, MPI_SUM, world); if ((flag_all > 0) && (comm->me == 0)) - error->warning(FLERR,"Non-zero image flags with growing box leads to bad coordinates"); + error->warning(FLERR, "Non-zero image flags with growing box leads to bad coordinates"); } // NOTE: not sure what to do about tilt value in subsequent data files @@ -617,8 +617,9 @@ void ReadData::command(int narg, char **arg) atomflag = 1; if (firstpass) { if (me == 0 && !style_match(style, atom->atom_style)) - error->warning(FLERR, - "Atom style in data file differs from currently defined atom style"); + error->warning( + FLERR, "Atom style in data file {} differs from currently defined atom style {}", + style, atom->atom_style); atoms(); } else skip_lines(natoms); @@ -696,8 +697,9 @@ void ReadData::command(int narg, char **arg) if (force->pair == nullptr) error->all(FLERR, "Must define pair_style before Pair Coeffs"); if (firstpass) { if (me == 0 && !style_match(style, force->pair_style)) - error->warning(FLERR, - "Pair style in data file differs from currently defined pair style"); + error->warning( + FLERR, "Pair style {} in data file differs from currently defined pair style {}", + style, force->pair_style); paircoeffs(); } else skip_lines(ntypes); @@ -706,9 +708,9 @@ void ReadData::command(int narg, char **arg) error->all(FLERR, "Must define pair_style before PairIJ Coeffs"); if (firstpass) { if (me == 0 && !style_match(style, force->pair_style)) - error->warning(FLERR, - "Pair style in data file differs " - "from currently defined pair style"); + error->warning( + FLERR, "Pair style {} in data file differs from currently defined pair style {}", + style, force->pair_style); pairIJcoeffs(); } else skip_lines(ntypes * (ntypes + 1) / 2); @@ -718,8 +720,9 @@ void ReadData::command(int narg, char **arg) if (force->bond == nullptr) error->all(FLERR, "Must define bond_style before Bond Coeffs"); if (firstpass) { if (me == 0 && !style_match(style, force->bond_style)) - error->warning(FLERR, - "Bond style in data file differs from currently defined bond style"); + error->warning( + FLERR, "Bond style {} in data file differs from currently defined bond style {}", + style, force->bond_style); bondcoeffs(); } else skip_lines(nbondtypes); @@ -730,8 +733,9 @@ void ReadData::command(int narg, char **arg) error->all(FLERR, "Must define angle_style before Angle Coeffs"); if (firstpass) { if (me == 0 && !style_match(style, force->angle_style)) - error->warning(FLERR, - "Angle style in data file differs from currently defined angle style"); + error->warning( + FLERR, "Angle style {} in data file differs from currently defined angle style {}", + style, force->angle_style); anglecoeffs(0); } else skip_lines(nangletypes); @@ -742,9 +746,10 @@ void ReadData::command(int narg, char **arg) error->all(FLERR, "Must define dihedral_style before Dihedral Coeffs"); if (firstpass) { if (me == 0 && !style_match(style, force->dihedral_style)) - error->warning(FLERR, - "Dihedral style in data file differs " - "from currently defined dihedral style"); + error->warning( + FLERR, + "Dihedral style {} in data file differs from currently defined dihedral style {}", + style, force->dihedral_style); dihedralcoeffs(0); } else skip_lines(ndihedraltypes); @@ -755,9 +760,10 @@ void ReadData::command(int narg, char **arg) error->all(FLERR, "Must define improper_style before Improper Coeffs"); if (firstpass) { if (me == 0 && !style_match(style, force->improper_style)) - error->warning(FLERR, - "Improper style in data file differs " - "from currently defined improper style"); + error->warning( + FLERR, + "Improper style {} in data file differs from currently defined improper style {}", + style, force->improper_style); impropercoeffs(0); } else skip_lines(nimpropertypes); @@ -2018,8 +2024,10 @@ void ReadData::pairIJcoeffs() *next = '\0'; parse_coeffs(buf, nullptr, 0, 2, toffset, tlabelflag, lmap->lmap2lmap.atom); if (ncoeffarg == 0) - error->all(FLERR, "Unexpected empty line in PairIJCoeffs section. " - "Expected {} lines.", (ntypes-1)*ntypes); + error->all(FLERR, + "Unexpected empty line in PairIJCoeffs section. " + "Expected {} lines.", + (ntypes - 1) * ntypes); force->pair->coeff(ncoeffarg, coeffarg); buf = next + 1; } @@ -2049,7 +2057,8 @@ void ReadData::bondcoeffs() *next = '\0'; parse_coeffs(buf, nullptr, 0, 1, boffset, blabelflag, lmap->lmap2lmap.bond); if (ncoeffarg == 0) - error->all(FLERR, "Unexpected empty line in BondCoeffs section. Expected {} lines.", nbondtypes); + error->all(FLERR, "Unexpected empty line in BondCoeffs section. Expected {} lines.", + nbondtypes); force->bond->coeff(ncoeffarg, coeffarg); buf = next + 1; } @@ -2442,12 +2451,12 @@ void ReadData::parse_coeffs(char *line, const char *addstr, int dupflag, int nof int value = utils::inumeric(FLERR, coeffarg[0], false, lmp); if (labelmode) value = ilabel[value - 1]; argoffset1 = std::to_string(value + offset); - coeffarg[0] = (char *)argoffset1.c_str(); + coeffarg[0] = (char *) argoffset1.c_str(); if (noffset == 2) { value = utils::inumeric(FLERR, coeffarg[1], false, lmp); if (labelmode) value = ilabel[value - 1]; argoffset2 = std::to_string(value + offset); - coeffarg[1] = (char *)argoffset2.c_str(); + coeffarg[1] = (char *) argoffset2.c_str(); } } } From d32411f61a37f671afdc610316982a51f66e9c3d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 16:37:14 -0500 Subject: [PATCH 378/445] recover restart ability and avoid memory leak --- src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp index 413d00226d..76e7347ada 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp @@ -15,6 +15,7 @@ #include "atom.h" #include "comm.h" +#include "domain.h" #include "error.h" #include "fix_property_atom.h" #include "force.h" @@ -73,6 +74,7 @@ void BondHarmonicRestrain::compute(int eflag, int vflag) delx = x0[i1][0] - x0[i2][0]; dely = x0[i1][1] - x0[i2][1]; delz = x0[i1][2] - x0[i2][2]; + domain->minimum_image(delx, dely, delz); rsq = delx * delx + dely * dely + delz * delz; r0 = sqrt(rsq); @@ -155,19 +157,32 @@ void BondHarmonicRestrain::coeff(int narg, char **arg) void BondHarmonicRestrain::init_style() { - // create internal fix to store initial positions - initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN all property/atom d2_x0 3 ghost yes")); - if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); - // store initial positions + if (natoms < 0) { + + // create internal fix to store initial positions + initial = dynamic_cast( + modify->add_fix("BOND_RESTRAIN all property/atom d2_x0 3 ghost yes")); + if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); + natoms = atom->natoms; double *const *const x0 = (double **) atom->extract("d2_x0"); const double *const *const x = atom->x; for (int i = 0; i < atom->nlocal; ++i) for (int j = 0; j < 3; ++j) x0[i][j] = x[i][j]; - } + + } else { + + // after a restart, natoms is set but initial is a null pointer. + // we add the fix, but do not initialize it. It will pull the data from the restart. + + if (!initial) { + initial = dynamic_cast( + modify->add_fix("BOND_RESTRAIN all property/atom d2_x0 3 ghost yes")); + if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); + } + } // must not add atoms if (natoms < atom->natoms) From 010b030b567d9c057b92f227a3ad6f38190fe777 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 19:38:34 -0500 Subject: [PATCH 379/445] update docs and mention alternatives and describe differences --- doc/src/bond_harmonic_restrain.rst | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/doc/src/bond_harmonic_restrain.rst b/doc/src/bond_harmonic_restrain.rst index 5ffbfb424c..d4c34ae622 100644 --- a/doc/src/bond_harmonic_restrain.rst +++ b/doc/src/bond_harmonic_restrain.rst @@ -29,11 +29,13 @@ The *harmonic/restrain* bond style uses the potential E = K (r - r_{t=0})^2 -where :math:`r_{t=0}` is the distance between the bond atoms at the +where :math:`r_{t=0}` is the distance between the bonded atoms at the beginning of the first :doc:`run ` or :doc:`minimize ` command after the bond style has been defined (*t=0*). Note that the usual 1/2 factor is included in :math:`K`. This will effectively -restrain bonds to their initial length, whatever that is. +restrain bonds to their initial length, whatever that is. This is where +this bond style differs from :doc:`bond style harmonic ` +where the bond length is set through the per bond type coefficients. The following coefficient must be defined for each bond type via the :doc:`bond_coeff ` command as in the example above, or in @@ -42,12 +44,19 @@ or :doc:`read_restart ` commands * :math:`K` (energy/distance\^2) +This bond style differs from other options to add harmonic restraints +like :doc:`fix restrain ` or :doc:`pair style list +` or :doc:`fix colvars ` in that it requires a +bond topology, and thus the defined bonds will trigger exclusion of +special neighbors from the neighbor list according to the +:doc:`special_bonds ` settings. + Restart info """""""""""" This bond style supports the :doc:`write_restart ` and :doc:`read_restart ` commands. The state of the initial -bond lengths is stored with the restart files and read back. +bond lengths is stored with restart files and read back. Restrictions """""""""""" @@ -56,24 +65,24 @@ This bond style can only be used if LAMMPS was built with the EXTRA-MOLECULE package. See the :doc:`Build package ` page for more info. -This bond style does not write its coefficients to a data file since the +This bond style does NOT write its coefficients to a data file since the :math:`r_{t=0}` values are for individual bonds and not bond types. + Since it uses :doc:`fix property/atom ` internally, you should use the "nofix" argument to the :doc:`write_data command -` to avoid writing a section to the data file can cannot be -read back in by the bond style. +` to avoid writing a section to the data file that cannot be +read back by the bond style. This bond style cannot be used with :doc:`fix shake or fix rattle `, with :doc:`fix filter/corotate `, or any :doc:`tip4p pair style ` since there is no specific equilibrium distance for a given bond type. - Related commands """""""""""""""" -:doc:`bond_coeff `, :doc:`delete_bonds `, -:doc:`bond_harmonic ` +:doc:`bond_coeff `, :doc:`bond_harmonic `, +:doc:`fix restrain `, :doc:`pair style list ` Default """"""" From 381d0445ed6835aa8d9109c954cc358bfd658463 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 19:41:50 -0500 Subject: [PATCH 380/445] fix spelling issues --- doc/src/Install_windows.rst | 2 +- doc/src/balance.rst | 2 +- doc/src/fix_balance.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/Install_windows.rst b/doc/src/Install_windows.rst index f23092941a..fdfd406c8b 100644 --- a/doc/src/Install_windows.rst +++ b/doc/src/Install_windows.rst @@ -20,7 +20,7 @@ The LAMMPS binaries contain *all* :doc:`optional packages ` included in the source distribution except: ADIOS, H5MD, KIM, ML-PACE, ML-QUIP, MSCG, NETCDF, PLUMED, QMMM, SCAFACOS, and VTK. The serial version also does not include the MPIIO and LATBOLTZ packages. The -PYTHON package is only available in the Python installaers that bundle a +PYTHON package is only available in the Python installers that bundle a Python runtime. The GPU package is compiled for OpenCL with mixed precision kernels. diff --git a/doc/src/balance.rst b/doc/src/balance.rst index c30c133a8b..4eaa00ea84 100644 --- a/doc/src/balance.rst +++ b/doc/src/balance.rst @@ -498,7 +498,7 @@ data to other processors during load-balancing will be random or deterministic. Random is generally faster; deterministic will ensure the new ordering of atoms on each processor is the same each time the same simulation is run. This can be useful for debugging purposes. -Since the balance commmand is a one-time operation, the default is +Since the balance command is a one-time operation, the default is *yes* to perform sorting. The *out* keyword writes a text file to the specified *filename* with diff --git a/doc/src/fix_balance.rst b/doc/src/fix_balance.rst index 8c65e8341d..0672a05470 100644 --- a/doc/src/fix_balance.rst +++ b/doc/src/fix_balance.rst @@ -314,7 +314,7 @@ data to other processors during load-balancing will be random or deterministic. Random is generally faster; deterministic will ensure the new ordering of atoms on each processor is the same each time the same simulation is run. This can be useful for debugging purposes. -Since the fix balance commmand is performed during timestepping, the +Since the fix balance command is performed during timestepping, the default is *no* so that sorting is not performed. The *out* keyword writes text to the specified *filename* with the From fd2cda66bbb22ccfcb2db522a6e4866834074e77 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 20:18:41 -0500 Subject: [PATCH 381/445] handle the case when the bond style is recreated after a restart --- src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp index 76e7347ada..32e1226347 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp @@ -40,7 +40,7 @@ BondHarmonicRestrain::BondHarmonicRestrain(LAMMPS *_lmp) : Bond(_lmp), initial(n BondHarmonicRestrain::~BondHarmonicRestrain() { - modify->delete_fix("BOND_RESTRAIN"); + if (initial) modify->delete_fix("BOND_RESTRAIN"); if (allocated) { memory->destroy(setflag); memory->destroy(k); From 9a8b5ebae0e1d93136fb1b833a250252ddf917af Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 20:36:28 -0500 Subject: [PATCH 382/445] use more unusual name for per-atom property --- src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp index 32e1226347..2054884e3e 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp @@ -40,7 +40,7 @@ BondHarmonicRestrain::BondHarmonicRestrain(LAMMPS *_lmp) : Bond(_lmp), initial(n BondHarmonicRestrain::~BondHarmonicRestrain() { - if (initial) modify->delete_fix("BOND_RESTRAIN"); + if (initial) modify->delete_fix("BOND_RESTRAIN_X0"); if (allocated) { memory->destroy(setflag); memory->destroy(k); @@ -59,7 +59,7 @@ void BondHarmonicRestrain::compute(int eflag, int vflag) ev_init(eflag, vflag); double **x = atom->x; - double **x0 = (double **) atom->extract("d2_x0"); + double **x0 = (double **) atom->extract("d2_BOND_RESTRAIN_X0"); double **f = atom->f; int **bondlist = neighbor->bondlist; int nbondlist = neighbor->nbondlist; @@ -163,11 +163,11 @@ void BondHarmonicRestrain::init_style() // create internal fix to store initial positions initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN all property/atom d2_x0 3 ghost yes")); + modify->add_fix("BOND_RESTRAIN_X0 all property/atom d2_BOND_RESTRAIN_X0 3 ghost yes")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); natoms = atom->natoms; - double *const *const x0 = (double **) atom->extract("d2_x0"); + double *const *const x0 = (double **) atom->extract("d2_BOND_RESTRAIN_X0"); const double *const *const x = atom->x; for (int i = 0; i < atom->nlocal; ++i) for (int j = 0; j < 3; ++j) x0[i][j] = x[i][j]; @@ -179,7 +179,7 @@ void BondHarmonicRestrain::init_style() if (!initial) { initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN all property/atom d2_x0 3 ghost yes")); + modify->add_fix("BOND_RESTRAIN_X0 all property/atom d2_BOND_RESTRAIN_X0 3 ghost yes")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); } } @@ -230,11 +230,12 @@ void BondHarmonicRestrain::write_data(FILE *fp) double BondHarmonicRestrain::single(int type, double rsq, int i, int j, double &fforce) { - double **x0 = (double **) atom->extract("d2_x0"); + double **x0 = (double **) atom->extract("d2_BOND_RESTRAIN_X0"); double delx = x0[i][0] - x0[j][0]; double dely = x0[i][1] - x0[j][1]; double delz = x0[i][2] - x0[j][2]; + domain->minimum_image(delx, dely, delz); double r0 = sqrt(delx * delx + dely * dely + delz * delz); double r = sqrt(rsq); From fc8a048662107dc9185331264e59edb1cd07caa2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 Mar 2023 21:22:57 -0500 Subject: [PATCH 383/445] add unit test --- src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp | 4 +- unittest/force-styles/test_bond_style.cpp | 2 +- .../tests/bond-harmonic_restrain.yaml | 90 +++++++++++++++++++ 3 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 unittest/force-styles/tests/bond-harmonic_restrain.yaml diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp index 2054884e3e..a15642f90b 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp @@ -163,7 +163,7 @@ void BondHarmonicRestrain::init_style() // create internal fix to store initial positions initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN_X0 all property/atom d2_BOND_RESTRAIN_X0 3 ghost yes")); + modify->add_fix("BOND_RESTRAIN_X0 all property/atom d2_BOND_RESTRAIN_X0 3 ghost yes")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); natoms = atom->natoms; @@ -182,7 +182,7 @@ void BondHarmonicRestrain::init_style() modify->add_fix("BOND_RESTRAIN_X0 all property/atom d2_BOND_RESTRAIN_X0 3 ghost yes")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); } - } + } // must not add atoms if (natoms < atom->natoms) diff --git a/unittest/force-styles/test_bond_style.cpp b/unittest/force-styles/test_bond_style.cpp index d056fdc876..c723541366 100644 --- a/unittest/force-styles/test_bond_style.cpp +++ b/unittest/force-styles/test_bond_style.cpp @@ -123,7 +123,7 @@ LAMMPS *init_lammps(int argc, char **argv, const TestConfig &cfg, const bool new command("run 0 post no"); command("write_restart " + cfg.basename + ".restart"); - command("write_data " + cfg.basename + ".data"); + command("write_data " + cfg.basename + ".data nofix"); command("write_coeff " + cfg.basename + "-coeffs.in"); return lmp; diff --git a/unittest/force-styles/tests/bond-harmonic_restrain.yaml b/unittest/force-styles/tests/bond-harmonic_restrain.yaml new file mode 100644 index 0000000000..1fd04b818e --- /dev/null +++ b/unittest/force-styles/tests/bond-harmonic_restrain.yaml @@ -0,0 +1,90 @@ +--- +lammps_version: 8 Feb 2023 +tags: generated +date_generated: Tue Mar 7 21:07:27 2023 +epsilon: 2.5e-13 +skip_tests: extract +prerequisites: ! | + atom full + bond harmonic/restrain +pre_commands: ! "" +post_commands: ! "" +input_file: in.fourmol +bond_style: harmonic/restrain +bond_coeff: ! | + 1 250.0 + 2 300.0 + 3 350.0 + 4 650.0 + 5 450.0 +equilibrium: 5 -1 -1 -1 -1 -1 +extract: ! | + k 1 +natoms: 29 +init_energy: 0 +init_stress: ! |2- + 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +init_forces: ! |2 + 1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +run_energy: 0.009384424442608962 +run_stress: ! |2- + 1.3334287184173488e+00 3.1110677999939773e-01 -1.4064657849540130e+00 2.6546279385354110e-01 1.5492956756466219e+00 7.2358876924785698e-01 +run_forces: ! |2 + 1 1.1485941046856593e-01 1.4088049450172524e-01 -8.5852076971833030e-02 + 2 -9.3217481807658653e-02 -7.6867386712704044e-02 1.0932532178570745e-01 + 3 -2.3741413942894266e-01 -8.5667734110971339e-02 -8.2143831089792743e-02 + 4 2.3324188168788909e-01 -6.5094431822773302e-02 1.6591701889629748e-01 + 5 2.6793200848186677e-02 4.1227376782380774e-02 -1.3685685314886964e-01 + 6 2.4862628338772436e-01 -3.6125357500552457e-01 -7.8230634578348013e-01 + 7 -3.8706943762359766e-02 1.9888379369193138e-01 9.8933719851963053e-01 + 8 -3.5267248957722913e-01 4.2911503092501313e-01 1.0190469073820968e-01 + 9 -5.1632048293607458e-02 -5.5343430872859360e-02 -2.2821606693951479e-01 + 10 1.2860877826855494e-01 -7.5971599169706849e-01 -5.5343112593256227e-01 + 11 1.6956002318038377e-01 4.2001247662003161e-01 6.8896503378985918e-01 + 12 3.4231534762621078e-02 -2.4857235824638585e-01 -6.3964642589377518e-01 + 13 -2.7815178906130594e-01 1.0946454990993748e-01 5.1669158882660616e-03 + 14 2.2738751895410908e-01 -4.5437525741145839e-02 5.8956676893113813e-01 + 15 -4.6207378210972273e-03 1.6438094307388113e-01 5.8917445017986604e-02 + 16 -1.1399994473799732e-02 1.1329499720204761e-01 -5.0720152745025260e-01 + 17 -1.1549300733203431e-01 8.0692771502484495e-02 3.0655385964298520e-01 + 18 1.9145703373728828e+00 1.8373130373081787e+00 -3.9519344330792983e-01 + 19 -4.7317441908503255e-01 -3.0353033418925196e-01 -5.7175303978447201e-01 + 20 -1.4413959182878502e+00 -1.5337827031189268e+00 9.6694648309240183e-01 + 21 -3.3244533656237202e-01 -3.0309080808086836e-01 6.5775553694406208e-01 + 22 -2.9549353211149859e-01 -7.2150425050573716e-02 -4.6194669575592789e-01 + 23 6.2793886867387061e-01 3.7524123313144209e-01 -1.9580884118813421e-01 + 24 8.2698432709098157e-01 -1.4448474780063469e+00 1.2133188519739595e+00 + 25 -1.5417378702379472e+00 2.4470962384652978e-01 -1.2964818258023694e+00 + 26 7.1475354314696560e-01 1.2001378541598171e+00 8.3162973828409884e-02 + 27 2.1885007758012770e-01 -5.7423924185981945e-01 2.7745249319135684e-01 + 28 -5.2036258696458004e-01 2.2330647386191435e-01 -3.5136945845348061e-01 + 29 3.0151250938445234e-01 3.5093276799790507e-01 7.3916965262123782e-02 +... From 4220944ace092cb3cf02236745a84ce2e776bf8f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Mar 2023 00:25:08 -0500 Subject: [PATCH 384/445] cosmetic --- unittest/force-styles/test_angle_style.cpp | 4 ++-- unittest/force-styles/tests/bond-harmonic_restrain.yaml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/unittest/force-styles/test_angle_style.cpp b/unittest/force-styles/test_angle_style.cpp index d9f541df96..e9f4a3f7fc 100644 --- a/unittest/force-styles/test_angle_style.cpp +++ b/unittest/force-styles/test_angle_style.cpp @@ -691,8 +691,8 @@ TEST(AngleStyle, extract) } auto angle = lmp->force->angle; - void *ptr = nullptr; - int dim = 0; + void *ptr = nullptr; + int dim = 0; for (auto extract : test_config.extract) { ptr = angle->extract(extract.first.c_str(), dim); EXPECT_NE(ptr, nullptr); diff --git a/unittest/force-styles/tests/bond-harmonic_restrain.yaml b/unittest/force-styles/tests/bond-harmonic_restrain.yaml index 1fd04b818e..07546775ab 100644 --- a/unittest/force-styles/tests/bond-harmonic_restrain.yaml +++ b/unittest/force-styles/tests/bond-harmonic_restrain.yaml @@ -1,6 +1,5 @@ --- lammps_version: 8 Feb 2023 -tags: generated date_generated: Tue Mar 7 21:07:27 2023 epsilon: 2.5e-13 skip_tests: extract From 451f3f71b81867ca841d7e27765bc0cd64992f48 Mon Sep 17 00:00:00 2001 From: alanhsieh4444 <110726422+alanhsieh4444@users.noreply.github.com> Date: Wed, 8 Mar 2023 13:37:46 +0800 Subject: [PATCH 385/445] Update molecule.rst --- doc/src/molecule.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/src/molecule.rst b/doc/src/molecule.rst index 5dcd30f508..c3c578f5ec 100644 --- a/doc/src/molecule.rst +++ b/doc/src/molecule.rst @@ -121,6 +121,11 @@ molecule (header keyword = inertia). ensure space is allocated for storing topology info for molecules that are added later. +---------- + +Format of a molecule file +""""""""""""""""""""" + The format of an individual molecule file is similar but (not identical) to the data file read by the :doc:`read_data ` commands, and is as follows. From c96ac858bfef6f92554c0b906617919a6c05641e Mon Sep 17 00:00:00 2001 From: "W. Michael Brown" Date: Tue, 7 Mar 2023 21:43:19 -0800 Subject: [PATCH 386/445] GPU Package: Adding JIT test for OpenCL prefetch support. --- lib/gpu/geryon/ocl_kernel.h | 5 ++++- lib/gpu/lal_device.cpp | 42 +++++++++++++++++++++++++++++++++++++ lib/gpu/lal_device.h | 1 + 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/lib/gpu/geryon/ocl_kernel.h b/lib/gpu/geryon/ocl_kernel.h index 14a319f391..7b7fca9dfc 100644 --- a/lib/gpu/geryon/ocl_kernel.h +++ b/lib/gpu/geryon/ocl_kernel.h @@ -95,7 +95,8 @@ class UCL_Program { /// Load a program from a string and compile with flags inline int load_string(const void *program, const char *flags="", - std::string *log=nullptr, FILE* foutput=nullptr) { + std::string *log=nullptr, FILE* foutput=nullptr, + const int compile_test=0) { cl_int error_flag; const char *prog=(const char *)program; _program=clCreateProgramWithSource(_context,1,&prog,nullptr,&error_flag); @@ -131,6 +132,8 @@ class UCL_Program { } #endif + if (build_status != CL_SUCCESS && compile_test) return UCL_COMPILE_ERROR; + if (build_status != CL_SUCCESS || log!=NULL) { size_t ms; CL_SAFE_CALL(clGetProgramBuildInfo(_program,_device,CL_PROGRAM_BUILD_LOG, diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index af53572590..cbf3f5f885 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -26,6 +26,22 @@ #if defined(USE_OPENCL) #include "device_cl.h" +const char *ocl_prefetch_test = +" #if (NBOR_PREFETCH == 1) \n"\ +" inline void ucl_prefetch(const __global int *p) { prefetch(p, 1); } \n"\ +" #else \n"\ +" enum LSC_LDCC {LSC_LDCC_DEFAULT, LSC_LDCC_L1UC_L3UC, LSC_LDCC_L1UC_L3C, \n"\ +" LSC_LDCC_L1C_L3UC, LSC_LDCC_L1C_L3C, LSC_LDCC_L1S_L3UC, \n"\ +" LSC_LDCC_L1S_L3C, LSC_LDCC_L1IAR_L3C, }; \n"\ +" void __builtin_IB_lsc_prefetch_global_uint(const __global uint *, int, \n"\ +" enum LSC_LDCC); \n"\ +" inline void ucl_prefetch(const __global int *p) { \n"\ +" __builtin_IB_lsc_prefetch_global_uint((const __global uint *)p, 0, \n"\ +" LSC_LDCC_L1C_L3UC); \n"\ +" } \n"\ +" #endif \n"\ +" __kernel void ptest(__global int *i) { ucl_prefetch(i); i[0]++; } \n"; + #ifdef LAL_OCL_EXTRA_ARGS #define LAL_DM_STRINGIFY(x) #x #define LAL_PRE_STRINGIFY(x) LAL_DM_STRINGIFY(x) @@ -396,9 +412,31 @@ int DeviceT::set_ocl_params(std::string s_config, const std::string &extra_args) params[4]="0"; #endif } + + // Test OCL JIT to make sure any prefetch options are supported #ifdef LAL_DISABLE_PREFETCH params[18]="0"; #endif + _nbor_prefetch=-1; + if (params[18]=="2") { + _nbor_prefetch=2; + UCL_Program ptest(*gpu); + std::string ptest_args=_ocl_compile_string+" -DNBOR_PREFETCH="+params[18]; + int success=ptest.load_string(ocl_prefetch_test,ptest_args.c_str(), + nullptr,nullptr,1); + if (success!=UCL_SUCCESS) params[18]="1"; + } + if (params[18]=="1") { + _nbor_prefetch=1; + UCL_Program ptest(*gpu); + std::string ptest_args=_ocl_compile_string+" -DNBOR_PREFETCH="+params[18]; + int success=ptest.load_string(ocl_prefetch_test,ptest_args.c_str(), + nullptr,nullptr,1); + if (success!=UCL_SUCCESS) params[18]="0"; + } + if (_nbor_prefetch<0) params[18]="0"; + if (params[18]=="0") _nbor_prefetch=0; + if (params[4]!="0") _ocl_compile_string+="-cl-fast-relaxed-math "; _ocl_compile_string+=std::string(OCL_INT_TYPE)+" "+ std::string(OCL_PRECISION_COMPILE); @@ -844,6 +882,10 @@ void DeviceT::output_times(UCL_Timer &time_pair, Answer &ans, fprintf(screen,"Average split: %.4f.\n",avg_split); fprintf(screen,"Lanes / atom: %d.\n",threads_per_atom); fprintf(screen,"Vector width: %d.\n", simd_size()); + fprintf(screen,"Prefetch mode: "); + if (_nbor_prefetch==2) fprintf(screen,"Intrinsics.\n"); + else if (_nbor_prefetch==1) fprintf(screen,"API.\n"); + else fprintf(screen,"None.\n"); fprintf(screen,"Max Mem / Proc: %.2f MB.\n",max_mb); if (nbor.gpu_nbor()==2) fprintf(screen,"CPU Neighbor: %.4f s.\n",times[8]/_replica_size); diff --git a/lib/gpu/lal_device.h b/lib/gpu/lal_device.h index 3b27223007..ba693e551a 100644 --- a/lib/gpu/lal_device.h +++ b/lib/gpu/lal_device.h @@ -346,6 +346,7 @@ class Device { int _block_pair, _block_bio_pair, _block_ellipse; int _pppm_block, _block_nbor_build, _block_cell_2d, _block_cell_id; int _max_shared_types, _max_bio_shared_types, _pppm_max_spline; + int _nbor_prefetch; UCL_Program *dev_program; UCL_Kernel k_zero, k_info; From c3c99b701cb7b1087af2ff90fb528eaf1a85c036 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Mar 2023 07:21:21 -0500 Subject: [PATCH 387/445] correct underline --- doc/src/molecule.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/molecule.rst b/doc/src/molecule.rst index c3c578f5ec..b42bece327 100644 --- a/doc/src/molecule.rst +++ b/doc/src/molecule.rst @@ -124,7 +124,7 @@ molecule (header keyword = inertia). ---------- Format of a molecule file -""""""""""""""""""""" +""""""""""""""""""""""""" The format of an individual molecule file is similar but (not identical) to the data file read by the :doc:`read_data ` From 189be4625e63c99b82160e8a28620d2a4701d29c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Mar 2023 18:25:58 -0500 Subject: [PATCH 388/445] improve/correct error messages for fix efield --- src/fix_efield.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fix_efield.cpp b/src/fix_efield.cpp index e1d70e832f..3514ad1c34 100644 --- a/src/fix_efield.cpp +++ b/src/fix_efield.cpp @@ -42,7 +42,7 @@ FixEfield::FixEfield(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), xstr(nullptr), ystr(nullptr), zstr(nullptr), estr(nullptr), idregion(nullptr), region(nullptr), efield(nullptr) { - if (narg < 6) error->all(FLERR, "Illegal fix efield command"); + if (narg < 6) utils::missing_cmd_args(FLERR, "fix efield", error); dynamic_group_allow = 1; vector_flag = 1; @@ -85,20 +85,20 @@ FixEfield::FixEfield(LAMMPS *lmp, int narg, char **arg) : int iarg = 6; while (iarg < narg) { if (strcmp(arg[iarg], "region") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal fix efield command"); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "fix efield region", error); region = domain->get_region_by_id(arg[iarg + 1]); if (!region) error->all(FLERR, "Region {} for fix efield does not exist", arg[iarg + 1]); idregion = utils::strdup(arg[iarg + 1]); iarg += 2; } else if (strcmp(arg[iarg], "energy") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal fix efield command"); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "fix efield energy", error); if (utils::strmatch(arg[iarg + 1], "^v_")) { estr = utils::strdup(arg[iarg + 1] + 2); } else - error->all(FLERR, "Illegal fix efield command"); + error->all(FLERR, "Illegal fix efield energy value argument"); iarg += 2; } else - error->all(FLERR, "Illegal fix efield command"); + error->all(FLERR, "Unknown fix efield keyword: {}", arg[iarg]); } force_flag = 0; @@ -188,7 +188,7 @@ void FixEfield::init() if (idregion) { region = domain->get_region_by_id(idregion); - if (!region) error->all(FLERR, "Region {} for fix aveforce does not exist", idregion); + if (!region) error->all(FLERR, "Region {} for fix efield does not exist", idregion); } if (xstyle == ATOM || ystyle == ATOM || zstyle == ATOM) From 4b434c9a03fad0f7b5ac7112796cfe43694f4c0b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Mar 2023 18:40:29 -0500 Subject: [PATCH 389/445] remove ifdefs --- src/neighbor.cpp | 20 +++++++------------- src/neighbor.h | 7 +++---- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 90e0a81fd0..3228f29fd9 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -216,6 +216,10 @@ pairclass(nullptr), pairnames(nullptr), pairmasks(nullptr) // Kokkos setting copymode = 0; + + // GPU setting + + overlap_topo = 0; } /* ---------------------------------------------------------------------- */ @@ -291,12 +295,9 @@ Neighbor::~Neighbor() void Neighbor::init() { - #ifdef LMP_GPU - overlap_topo = 0; - #endif - int i,j,n; + overlap_topo = 0; ncalls = ndanger = 0; dimension = domain->dimension; triclinic = domain->triclinic; @@ -2437,14 +2438,9 @@ void Neighbor::build(int topoflag) } // build topology lists for bonds/angles/etc + // skip if GPU package styles will call it explicitly to overlap with GPU computation. - #ifdef LMP_GPU - if (overlap_topo == 0) { - if ((atom->molecular != Atom::ATOMIC) && topoflag) build_topology(); - } - #else - if ((atom->molecular != Atom::ATOMIC) && topoflag) build_topology(); - #endif + if ((atom->molecular != Atom::ATOMIC) && topoflag && !overlap_topo) build_topology(); } /* ---------------------------------------------------------------------- @@ -2831,12 +2827,10 @@ int Neighbor::exclude_setting() If nonzero, call build_topology from GPU styles instead to overlap comp ------------------------------------------------------------------------- */ -#ifdef LMP_GPU void Neighbor::set_overlap_topo(int s) { overlap_topo = s; } -#endif /* ---------------------------------------------------------------------- check if any of the old requested neighbor lists are full diff --git a/src/neighbor.h b/src/neighbor.h index dd638880c7..9c51361aa8 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -155,11 +155,10 @@ class Neighbor : protected Pointers { void exclusion_group_group_delete(int, int); // rm a group-group exclusion int exclude_setting(); // return exclude value to accelerator pkg - // Option to call build_topology from gpu styles instead for overlapped comp - #ifdef LMP_GPU + // Option to call build_topology (e.g. from gpu styles instead for overlapped computation) + + int overlap_topo; // 0 for default/old non-overlap mode void set_overlap_topo(int); - int overlap_topo; // 0 for default/old non-overlap mode - #endif // find a neighbor list based on requestor NeighList *find_list(void *, const int id = 0) const; From 0088607bc71dc140374c77282b15d4d97d730f4c Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 9 Mar 2023 08:31:44 +0200 Subject: [PATCH 390/445] Include method declaration in pair_nm_cut_coul_cut.h --- src/EXTRA-PAIR/pair_nm_cut_coul_cut.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EXTRA-PAIR/pair_nm_cut_coul_cut.h b/src/EXTRA-PAIR/pair_nm_cut_coul_cut.h index ff51920c63..f2254f7fd3 100644 --- a/src/EXTRA-PAIR/pair_nm_cut_coul_cut.h +++ b/src/EXTRA-PAIR/pair_nm_cut_coul_cut.h @@ -41,6 +41,7 @@ class PairNMCutCoulCut : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void *extract(const char *, int &) override; protected: From 7da2f62bf6b3285bd0acfe04999b1bcf0fdc11f2 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 9 Mar 2023 08:33:57 +0200 Subject: [PATCH 391/445] Implement born_matrix in pair_nm_cut_coul_cut.cpp --- src/EXTRA-PAIR/pair_nm_cut_coul_cut.cpp | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/EXTRA-PAIR/pair_nm_cut_coul_cut.cpp b/src/EXTRA-PAIR/pair_nm_cut_coul_cut.cpp index adc6d5a058..531f0e615f 100644 --- a/src/EXTRA-PAIR/pair_nm_cut_coul_cut.cpp +++ b/src/EXTRA-PAIR/pair_nm_cut_coul_cut.cpp @@ -37,6 +37,7 @@ using namespace MathConst; PairNMCutCoulCut::PairNMCutCoulCut(LAMMPS *lmp) : Pair(lmp) { + born_matrix_enable = 1; writedata = 1; } @@ -481,6 +482,38 @@ double PairNMCutCoulCut::single(int i, int j, int itype, int jtype, /* ---------------------------------------------------------------------- */ +void PairNMCutCoulCut::born_matrix(int i, int j, int itype, int jtype, double rsq, + double factor_coul, double factor_lj, double &dupair, + double &du2pair) +{ + double r, rinv, r2inv, r3inv; + double du_lj, du2_lj, du_coul, du2_coul; + + double *q = atom->q; + double qqrd2e = force->qqrd2e; + + r2inv = 1.0 / rsq; + rinv = sqrt(r2inv); + r3inv = r2inv * rinv; + r = sqrt(rsq); + + double prefactor = e0nm[itype][jtype]*nm[itype][jtype]; + + du_lj = prefactor * + (r0m[itype][jtype]/pow(r,mm[itype][jtype]) - r0n[itype][jtype]/pow(r,nn[itype][jtype])) / r; + du2_lj = prefactor * + (r0n[itype][jtype]*(nn[itype][jtype] + 1.0) / pow(r,nn[itype][jtype]) - + r0m[itype][jtype]*(mm[itype][jtype] + 1.0) / pow(r,mm[itype][jtype])) / rsq; + + du_coul = -qqrd2e * q[i] * q[j] * r2inv; + du2_coul = 2.0 * qqrd2e * q[i] * q[j] * r3inv; + + dupair = factor_lj * du_lj + factor_coul * du_coul; + du2pair = factor_lj * du2_lj + factor_coul * du2_coul; +} + +/* ---------------------------------------------------------------------- */ + void *PairNMCutCoulCut::extract(const char *str, int &dim) { dim = 2; From 544a4e3d7f2582b4a44020657bbfb686d06db71b Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 9 Mar 2023 10:03:57 +0200 Subject: [PATCH 392/445] Include method declaration in pair_lj_cut_coul_cut.h --- src/pair_lj_cut_coul_cut.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pair_lj_cut_coul_cut.h b/src/pair_lj_cut_coul_cut.h index b4e1bfb5c9..fdf54d9340 100644 --- a/src/pair_lj_cut_coul_cut.h +++ b/src/pair_lj_cut_coul_cut.h @@ -40,6 +40,7 @@ class PairLJCutCoulCut : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; double single(int, int, int, int, double, double, double, double &) override; + void born_matrix(int, int, int, int, double, double, double, double &, double &) override; void *extract(const char *, int &) override; protected: From d5f6c7e0be742ad19d34cf4e0e8754d029e5197c Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 9 Mar 2023 10:06:04 +0200 Subject: [PATCH 393/445] Implement born_matrix in pair_lj_cut_coul_cut.cpp --- src/pair_lj_cut_coul_cut.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/pair_lj_cut_coul_cut.cpp b/src/pair_lj_cut_coul_cut.cpp index bc5f5ed93e..5438e82377 100644 --- a/src/pair_lj_cut_coul_cut.cpp +++ b/src/pair_lj_cut_coul_cut.cpp @@ -32,6 +32,7 @@ using namespace MathConst; PairLJCutCoulCut::PairLJCutCoulCut(LAMMPS *lmp) : Pair(lmp) { + born_matrix_enable = 1; writedata = 1; } @@ -460,6 +461,35 @@ double PairLJCutCoulCut::single(int i, int j, int itype, int jtype, double rsq, /* ---------------------------------------------------------------------- */ +void PairLJCutCoulCut::born_matrix(int i, int j, int itype, int jtype, double rsq, + double factor_coul, double factor_lj, double &dupair, + double &du2pair) +{ + double rinv, r2inv, r3inv, r6inv, du, du2; + double du_lj, du2_lj, du_coul, du2_coul; + + double *q = atom->q; + double qqrd2e = force->qqrd2e; + + r2inv = 1.0 / rsq; + rinv = sqrt(r2inv); + r3inv = r2inv * rinv; + r6inv = r2inv * r2inv * r2inv; + + // Reminder: lj1 = 48*e*s^12, lj2 = 24*e*s^6 + + du_lj = r6inv * rinv * (lj2[itype][jtype] - lj1[itype][jtype] * r6inv); + du2_lj = r6inv * r2inv * (13 * lj1[itype][jtype] * r6inv - 7 * lj2[itype][jtype]); + + du_coul = -qqrd2e * q[i] * q[j] * r2inv; + du2_coul = 2.0 * qqrd2e * q[i] * q[j] * r3inv; + + dupair = factor_lj * du_lj + factor_coul * du_coul; + du2pair = factor_lj * du2_lj + factor_coul * du2_coul; +} + +/* ---------------------------------------------------------------------- */ + void *PairLJCutCoulCut::extract(const char *str, int &dim) { dim = 2; From b6756c03194fbe26781f46bedc448a5d618825ca Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 9 Mar 2023 13:00:59 -0500 Subject: [PATCH 394/445] update docs about using data files --- doc/src/bond_harmonic_restrain.rst | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/src/bond_harmonic_restrain.rst b/doc/src/bond_harmonic_restrain.rst index d4c34ae622..c48e68917c 100644 --- a/doc/src/bond_harmonic_restrain.rst +++ b/doc/src/bond_harmonic_restrain.rst @@ -65,13 +65,18 @@ This bond style can only be used if LAMMPS was built with the EXTRA-MOLECULE package. See the :doc:`Build package ` page for more info. -This bond style does NOT write its coefficients to a data file since the -:math:`r_{t=0}` values are for individual bonds and not bond types. - -Since it uses :doc:`fix property/atom ` internally, -you should use the "nofix" argument to the :doc:`write_data command -` to avoid writing a section to the data file that cannot be -read back by the bond style. +This bond style uses :doc:`fix property/atom ` +internally to be able to determine the original bond lengths. This fix +will write its state to :doc:`data files `, but it is +currently not possible to read that stored data back with +:doc:`read_data ` for such an internally defined fix. You +are thus advised to use the "nofix" argument to the :doc:`write_data +command ` in order to avoid writing that section to the data +file that would cause an error when reading the data file. When +continuing from such a "nofix" data file, the reference bond lengths +will not be the original lengths but those of the current geometry. +Thus restarting is currently *only* possible with :doc:`binary restart +files `. This bond style cannot be used with :doc:`fix shake or fix rattle `, with :doc:`fix filter/corotate `, or From 53056f47edf5c0be533af5f771b8212d074edb82 Mon Sep 17 00:00:00 2001 From: jrgissing Date: Thu, 9 Mar 2023 22:04:08 -0500 Subject: [PATCH 395/445] encode improper symmetries --- src/AMOEBA/improper_amoeba.cpp | 4 ++++ src/CLASS2/improper_class2.cpp | 4 ++++ src/EXTRA-MOLECULE/improper_cossq.cpp | 7 ++++++- src/EXTRA-MOLECULE/improper_distance.cpp | 7 ++++++- src/EXTRA-MOLECULE/improper_fourier.cpp | 8 +++++++- src/EXTRA-MOLECULE/improper_ring.cpp | 7 ++++++- src/MOFFF/improper_inversion_harmonic.cpp | 4 ++++ src/MOLECULE/improper_cvff.cpp | 4 ++++ src/MOLECULE/improper_harmonic.cpp | 4 ++++ src/MOLECULE/improper_umbrella.cpp | 5 +++++ src/YAFF/improper_distharm.cpp | 5 +++++ src/YAFF/improper_sqdistharm.cpp | 7 ++++++- src/improper.cpp | 1 + src/improper.h | 1 + 14 files changed, 63 insertions(+), 5 deletions(-) diff --git a/src/AMOEBA/improper_amoeba.cpp b/src/AMOEBA/improper_amoeba.cpp index cb9db01b59..32c31b0af9 100644 --- a/src/AMOEBA/improper_amoeba.cpp +++ b/src/AMOEBA/improper_amoeba.cpp @@ -36,6 +36,10 @@ using namespace MathConst; ImproperAmoeba::ImproperAmoeba(LAMMPS *lmp) : Improper(lmp) { writedata = 1; + + // the second atom in the quadruplet is the atom of symmetry + + symmatoms[1] = 1; } /* ---------------------------------------------------------------------- */ diff --git a/src/CLASS2/improper_class2.cpp b/src/CLASS2/improper_class2.cpp index 6e6541919a..1e172757b0 100644 --- a/src/CLASS2/improper_class2.cpp +++ b/src/CLASS2/improper_class2.cpp @@ -39,6 +39,10 @@ using namespace MathConst; ImproperClass2::ImproperClass2(LAMMPS *lmp) : Improper(lmp) { writedata = 1; + + // the second atom in the quadruplet is the atom of symmetry + + symmatoms[1] = 1; } /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-MOLECULE/improper_cossq.cpp b/src/EXTRA-MOLECULE/improper_cossq.cpp index d08c2afebe..bd21fa12e7 100644 --- a/src/EXTRA-MOLECULE/improper_cossq.cpp +++ b/src/EXTRA-MOLECULE/improper_cossq.cpp @@ -37,7 +37,12 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -ImproperCossq::ImproperCossq(LAMMPS *lmp) : Improper(lmp) {} +ImproperCossq::ImproperCossq(LAMMPS *lmp) : Improper(lmp) +{ + // the first atom in the quadruplet is the atom of symmetry + + symmatoms[0] = 1; +} /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-MOLECULE/improper_distance.cpp b/src/EXTRA-MOLECULE/improper_distance.cpp index b16e2cc674..18f6dd9a3f 100644 --- a/src/EXTRA-MOLECULE/improper_distance.cpp +++ b/src/EXTRA-MOLECULE/improper_distance.cpp @@ -35,7 +35,12 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -ImproperDistance::ImproperDistance(LAMMPS *lmp) : Improper(lmp) {} +ImproperDistance::ImproperDistance(LAMMPS *lmp) : Improper(lmp) +{ + // the first atom in the quadruplet is the atom of symmetry + + symmatoms[0] = 1; +} /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-MOLECULE/improper_fourier.cpp b/src/EXTRA-MOLECULE/improper_fourier.cpp index 58f8677fd6..3eef060204 100644 --- a/src/EXTRA-MOLECULE/improper_fourier.cpp +++ b/src/EXTRA-MOLECULE/improper_fourier.cpp @@ -35,7 +35,13 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -ImproperFourier::ImproperFourier(LAMMPS *lmp) : Improper(lmp) {} +ImproperFourier::ImproperFourier(LAMMPS *lmp) : Improper(lmp) +{ + // the first and fourth atoms in the quadruplet are the atoms of symmetry + + symmatoms[0] = 1; + symmatoms[3] = 1; +} /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-MOLECULE/improper_ring.cpp b/src/EXTRA-MOLECULE/improper_ring.cpp index ce3f16a696..36d6277e46 100644 --- a/src/EXTRA-MOLECULE/improper_ring.cpp +++ b/src/EXTRA-MOLECULE/improper_ring.cpp @@ -59,7 +59,12 @@ using namespace MathSpecial; /* ---------------------------------------------------------------------- */ -ImproperRing::ImproperRing(LAMMPS *lmp) : Improper(lmp) {} +ImproperRing::ImproperRing(LAMMPS *lmp) : Improper(lmp) +{ + // the second atom in the quadruplet is the atom of symmetry + + symmatoms[1] = 1; +} /* ---------------------------------------------------------------------- */ diff --git a/src/MOFFF/improper_inversion_harmonic.cpp b/src/MOFFF/improper_inversion_harmonic.cpp index 50ec3b0737..817b35332a 100644 --- a/src/MOFFF/improper_inversion_harmonic.cpp +++ b/src/MOFFF/improper_inversion_harmonic.cpp @@ -43,6 +43,10 @@ using namespace MathConst; ImproperInversionHarmonic::ImproperInversionHarmonic(LAMMPS *lmp) : Improper(lmp) { writedata = 1; + + // the first atom in the quadruplet is the atom of symmetry + + symmatoms[0] = 1; } /* ---------------------------------------------------------------------- */ diff --git a/src/MOLECULE/improper_cvff.cpp b/src/MOLECULE/improper_cvff.cpp index afe3bd9d73..ad8f709541 100644 --- a/src/MOLECULE/improper_cvff.cpp +++ b/src/MOLECULE/improper_cvff.cpp @@ -32,6 +32,10 @@ static constexpr double SMALL = 0.001; ImproperCvff::ImproperCvff(LAMMPS *_lmp) : Improper(_lmp) { writedata = 1; + + // the first atom in the quadruplet is the atom of symmetry + + symmatoms[0] = 1; } /* ---------------------------------------------------------------------- */ diff --git a/src/MOLECULE/improper_harmonic.cpp b/src/MOLECULE/improper_harmonic.cpp index d2cd505e68..06647fb93b 100644 --- a/src/MOLECULE/improper_harmonic.cpp +++ b/src/MOLECULE/improper_harmonic.cpp @@ -35,6 +35,10 @@ static constexpr double SMALL = 0.001; ImproperHarmonic::ImproperHarmonic(LAMMPS *_lmp) : Improper(_lmp) { writedata = 1; + + // the first atom in the quadruplet is the atom of symmetry + + symmatoms[0] = 1; } /* ---------------------------------------------------------------------- */ diff --git a/src/MOLECULE/improper_umbrella.cpp b/src/MOLECULE/improper_umbrella.cpp index fdf9870083..52bc692670 100644 --- a/src/MOLECULE/improper_umbrella.cpp +++ b/src/MOLECULE/improper_umbrella.cpp @@ -39,6 +39,11 @@ static constexpr double SMALL = 0.001; ImproperUmbrella::ImproperUmbrella(LAMMPS *_lmp) : Improper(_lmp) { writedata = 1; + + // the first and fourth atoms in the quadruplet are the atoms of symmetry + + symmatoms[0] = 1; + symmatoms[3] = 1; } /* ---------------------------------------------------------------------- */ diff --git a/src/YAFF/improper_distharm.cpp b/src/YAFF/improper_distharm.cpp index 3e67b6a436..92327bb996 100644 --- a/src/YAFF/improper_distharm.cpp +++ b/src/YAFF/improper_distharm.cpp @@ -37,6 +37,11 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ ImproperDistHarm::ImproperDistHarm(LAMMPS *lmp) : Improper(lmp) {} +{ + // the fourth atom in the quadruplet is the atom of symmetry + + symmatoms[3] = 1; +} /* ---------------------------------------------------------------------- */ diff --git a/src/YAFF/improper_sqdistharm.cpp b/src/YAFF/improper_sqdistharm.cpp index 1b366c058f..1cd8515d9a 100644 --- a/src/YAFF/improper_sqdistharm.cpp +++ b/src/YAFF/improper_sqdistharm.cpp @@ -36,7 +36,12 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -ImproperSQDistHarm::ImproperSQDistHarm(LAMMPS *lmp) : Improper(lmp) {} +ImproperSQDistHarm::ImproperSQDistHarm(LAMMPS *lmp) : Improper(lmp) +{ + // the fourth atom in the quadruplet is the atom of symmetry + + symmatoms[3] = 1; +} /* ---------------------------------------------------------------------- */ diff --git a/src/improper.cpp b/src/improper.cpp index b135dfbac8..dd4b1b2b25 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -30,6 +30,7 @@ Improper::Improper(LAMMPS *_lmp) : Pointers(_lmp) { energy = 0.0; writedata = 0; + for (int i = 0; i < 4; i++) symmatoms[i] = 0; allocated = 0; suffix_flag = Suffix::NONE; diff --git a/src/improper.h b/src/improper.h index 59302485e2..dfdfabae21 100644 --- a/src/improper.h +++ b/src/improper.h @@ -27,6 +27,7 @@ class Improper : protected Pointers { int *setflag; int writedata; // 1 if writes coeffs to data file int born_matrix_enable; + int symmatoms[4]; // symmetry atom(s) of improper style double energy; // accumulated energies double virial[6]; // accumulated virial: xx,yy,zz,xy,xz,yz double *eatom, **vatom; // accumulated per-atom energy/virial From 882df6ad237736df80d4da9759c7056ecc667bab Mon Sep 17 00:00:00 2001 From: jrgissing Date: Thu, 9 Mar 2023 22:08:03 -0500 Subject: [PATCH 396/445] typo --- src/YAFF/improper_distharm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/YAFF/improper_distharm.cpp b/src/YAFF/improper_distharm.cpp index 92327bb996..27516fa416 100644 --- a/src/YAFF/improper_distharm.cpp +++ b/src/YAFF/improper_distharm.cpp @@ -36,7 +36,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -ImproperDistHarm::ImproperDistHarm(LAMMPS *lmp) : Improper(lmp) {} +ImproperDistHarm::ImproperDistHarm(LAMMPS *lmp) : Improper(lmp) { // the fourth atom in the quadruplet is the atom of symmetry From e8871d990ac87f3bb8d59763286268af40d2c42e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Mar 2023 09:16:00 -0500 Subject: [PATCH 397/445] clarify --- doc/src/fix_shake.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/fix_shake.rst b/doc/src/fix_shake.rst index 4688fcbf2a..2483b9431a 100644 --- a/doc/src/fix_shake.rst +++ b/doc/src/fix_shake.rst @@ -63,7 +63,7 @@ however, can *only* be applied during molecular dynamics runs. .. versionchanged:: 15Sep2022 -These fixes may still be used during minimization. In that case the +These fixes may now also be used during minimization. In that case the constraints are *approximated* by strong harmonic restraints. **SHAKE vs RATTLE:** From 233c55337c0a2a6f959bf3ae2665566d84a461e1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Mar 2023 12:35:17 -0500 Subject: [PATCH 398/445] fix typo --- doc/src/Howto_tip4p.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/Howto_tip4p.rst b/doc/src/Howto_tip4p.rst index 7912557e61..0a263499cc 100644 --- a/doc/src/Howto_tip4p.rst +++ b/doc/src/Howto_tip4p.rst @@ -239,7 +239,7 @@ rigid/nvt/small can identify rigid bodies by their molecule ID: 1 0.00000 -0.06556 0.00000 2 0.75695 0.52032 0.00000 - 2 -0.75695 0.52032 0.00000 + 3 -0.75695 0.52032 0.00000 4 0.00000 0.08444 0.00000 Types From 2dad2586f149b1b2972bc8991f8adc5a1a501a75 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Mar 2023 20:16:39 -0500 Subject: [PATCH 399/445] update help message --- tools/msi2lmp/src/msi2lmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/msi2lmp/src/msi2lmp.c b/tools/msi2lmp/src/msi2lmp.c index 3136678023..0d9623e322 100644 --- a/tools/msi2lmp/src/msi2lmp.c +++ b/tools/msi2lmp/src/msi2lmp.c @@ -239,7 +239,7 @@ int main (int argc, char *argv[]) frc_dir_name = getenv("MSI2LMP_LIBRARY"); if (argc < 2) { - printf("usage: %s [-class ] [-frc ] [-print #] [-ignore] [-nocenter] [-oldstyle]\n",argv[0]); + printf("usage: %s [-class ] [-frc ] [-print #] [-ignore] [-nocenter] [-oldstyle]\n",argv[0]); return 1; } else { /* rootname was supplied as first argument, copy to rootname */ int len = strlen(argv[1]) + 1; From 80233f353f7966bf6eda1c4c8c335a024abf0651 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Mar 2023 20:56:55 -0500 Subject: [PATCH 400/445] port UTF-8 to ASCII substitution to msi2lmp and apply to reading .frc files --- tools/msi2lmp/src/SearchAndFill.c | 11 +++- tools/msi2lmp/src/msi2lmp.c | 98 +++++++++++++++++++++++++++++++ tools/msi2lmp/src/msi2lmp.h | 3 + 3 files changed, 110 insertions(+), 2 deletions(-) diff --git a/tools/msi2lmp/src/SearchAndFill.c b/tools/msi2lmp/src/SearchAndFill.c index ff05ff13d0..f195e739c9 100644 --- a/tools/msi2lmp/src/SearchAndFill.c +++ b/tools/msi2lmp/src/SearchAndFill.c @@ -48,6 +48,7 @@ const char *SearchAndCheck(const char *keyword) fprintf(stderr," Exiting....\n"); exit(1); } + if (has_utf8(line)) utf8_subst(line); if (line[0] == '@') { if (string_match(strtok(line+1," '\t\n\r\f("),keyword)) { got_it = 1; @@ -82,6 +83,7 @@ void SearchAndFill(struct FrcFieldItem *item) fprintf(stderr," Exiting....\n"); exit(1); } + if (has_utf8(line)) utf8_subst(line); if (line[0] == '#') { if (string_match(strtok(line," '\t\r\n("),item->keyword)) got_it = 1; } @@ -116,13 +118,16 @@ void SearchAndFill(struct FrcFieldItem *item) ctr = 0; while ( strncmp(line,"!---", 4) != 0 ) { fgets(line, MAX_LINE_LENGTH, FrcF); + if (has_utf8(line)) utf8_subst(line); } /* Get first line of data that isn't commented out */ fgets(line, MAX_LINE_LENGTH, FrcF); + if (has_utf8(line)) utf8_subst(line); while (strncmp(line,"!",1) == 0) { fgets( line, MAX_LINE_LENGTH, FrcF); + if (has_utf8(line)) utf8_subst(line); } /* Read data into structure */ @@ -225,11 +230,13 @@ void SearchAndFill(struct FrcFieldItem *item) ctr++; } fgets( line, MAX_LINE_LENGTH, FrcF); + if (has_utf8(line)) utf8_subst(line); + /*if blank line encountered, get next */ - while((blank_line(line)) || - (strncmp(line,"!",1) == 0)) { + while((blank_line(line)) || (strncmp(line,"!",1) == 0)) { status = fgets( line, MAX_LINE_LENGTH, FrcF); if (status == NULL) break; + if (has_utf8(line)) utf8_subst(line); } } item->entries = ctr; diff --git a/tools/msi2lmp/src/msi2lmp.c b/tools/msi2lmp/src/msi2lmp.c index 0d9623e322..2eb05fd5c5 100644 --- a/tools/msi2lmp/src/msi2lmp.c +++ b/tools/msi2lmp/src/msi2lmp.c @@ -444,3 +444,101 @@ int main (int argc, char *argv[]) printf("\nNormal program termination\n"); return 0; } + +/* detect if a line has UTF-8 characters */ + +int has_utf8(const char *line) +{ + const unsigned char *c = (const unsigned char *)line; + + while (*c != '\0') { + if (*c & 0x80U) return 1; + ++c; + } + return 0; +} + +/* replace UTF-8 characters with ASCII counterparts where known and possible */ + +void utf8_subst(char *line) +{ + unsigned char *buf, *in, *out; + int i, len; + + in = (unsigned char *)line; + len = strlen(line); + buf = (unsigned char *)malloc(len+1); + out = buf; + + for (i = 0; i < len; ++i) { + + /* UTF-8 2-byte character */ + if ((in[i] & 0xe0U) == 0xc0U) { + if ((i + 1) < len) { + /* NON-BREAKING SPACE (U+00A0) */ + if ((in[i] == 0xc2U) && (in[i + 1] == 0xa0U)) *out++ = ' ', ++i; + /* MODIFIER LETTER PLUS SIGN (U+02D6) */ + if ((in[i] == 0xcbU) && (in[i + 1] == 0x96U)) *out++ = '+', ++i; + /* MODIFIER LETTER MINUS SIGN (U+02D7) */ + if ((in[i] == 0xcbU) && (in[i + 1] == 0x97U)) *out++ = '-', ++i; + } + /* UTF-8 3-byte character */ + } else if ((in[i] & 0xf0U) == 0xe0U) { + if ((i + 2) < len) { + /* EN QUAD (U+2000) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x80U)) *out++ = ' ', i += 2; + /* EM QUAD (U+2001) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x81U)) *out++ = ' ', i += 2; + /* EN SPACE (U+2002) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x82U)) *out++ = ' ', i += 2; + /* EM SPACE (U+2003) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x83U)) *out++ = ' ', i += 2; + /* THREE-PER-EM SPACE (U+2004) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x84U)) *out++ = ' ', i += 2; + /* FOUR-PER-EM SPACE (U+2005) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x85U)) *out++ = ' ', i += 2; + /* SIX-PER-EM SPACE (U+2006) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x86U)) *out++ = ' ', i += 2; + /* FIGURE SPACE (U+2007) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x87U)) *out++ = ' ', i += 2; + /* PUNCTUATION SPACE (U+2008) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x88U)) *out++ = ' ', i += 2; + /* THIN SPACE (U+2009) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x89U)) *out++ = ' ', i += 2; + /* HAIR SPACE (U+200A) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x8aU)) *out++ = ' ', i += 2; + /* ZERO WIDTH SPACE (U+200B) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x8bU)) *out++ = ' ', i += 2; + /* LEFT SINGLE QUOTATION MARK (U+2018) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x98U)) *out++ = '\'', i += 2; + /* RIGHT SINGLE QUOTATION MARK (U+2019) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x99U)) *out++ = '\'', i += 2; + /* LEFT DOUBLE QUOTATION MARK (U+201C) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x9cU)) *out++ = '"', i += 2; + /* RIGHT DOUBLE QUOTATION MARK (U+201D) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0x9dU)) *out++ = '"', i += 2; + /* NARROW NO-BREAK SPACE (U+202F) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x80U) && (in[i + 2] == 0xafU)) *out++ = ' ', i += 2; + /* WORD JOINER (U+2060) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x81U) && (in[i + 2] == 0xa0U)) *out++ = ' ', i += 2; + /* INVISIBLE SEPARATOR (U+2063) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x81U) && (in[i + 2] == 0xa3U)) *out++ = ' ', i += 2; + /* INVISIBLE PLUS (U+2064) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x81U) && (in[i + 2] == 0xa4U)) *out++ = '+', i += 2; + /* MINUS SIGN (U+2212) */ + if ((in[i] == 0xe2U) && (in[i + 1] == 0x88U) && (in[i + 2] == 0x92U)) *out++ = '-', i += 2; + /* ZERO WIDTH NO-BREAK SPACE (U+FEFF) */ + if ((in[i] == 0xefU) && (in[i + 1] == 0xbbU) && (in[i + 2] == 0xbfU)) *out++ = ' ', i += 2; + } + /* UTF-8 4-byte character */ + } else if ((in[i] & 0xf8U) == 0xf0U) { + if ((i + 3) < len) { ; } + } else { + *out++ = in[i]; + } + } + + *out = '\0'; + strncpy(line, (char *)buf, len); + free(buf); +} diff --git a/tools/msi2lmp/src/msi2lmp.h b/tools/msi2lmp/src/msi2lmp.h index af7978d181..b64c6fd834 100644 --- a/tools/msi2lmp/src/msi2lmp.h +++ b/tools/msi2lmp/src/msi2lmp.h @@ -226,3 +226,6 @@ extern void lamda2x(double *lamda, double *x, double *h, double *boxlo); extern void x2lamda(double *x, double *lamda, double *h_inv, double *boxlo); extern void condexit(int); + +extern int has_utf8(const char *line); +extern void utf8_subst(char *line); From 2b6c2e07a4ece5619711b53f732d491b64a1e805 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Mar 2023 21:26:40 -0500 Subject: [PATCH 401/445] add -help flag and help message output. step version number. update docs. --- doc/msi2lmp.1 | 7 ++- tools/msi2lmp/README | 19 ++++++-- tools/msi2lmp/src/msi2lmp.c | 93 +++++++++++++++++++++++++++++++------ tools/msi2lmp/src/msi2lmp.h | 2 +- 4 files changed, 101 insertions(+), 20 deletions(-) diff --git a/doc/msi2lmp.1 b/doc/msi2lmp.1 index f088603483..5cb0754e4f 100644 --- a/doc/msi2lmp.1 +++ b/doc/msi2lmp.1 @@ -1,11 +1,11 @@ -.TH MSI2LMP "1" "v3.9.9" "2018-11-05" +.TH MSI2LMP "1" "v3.9.10" "2023-03-10" .SH NAME .B MSI2LMP \- Converter for Materials Studio files to LAMMPS .SH SYNOPSIS .B msi2lmp - [-class ] [-frc ] [-print #] [-ignore] [-nocenter] [-oldstyle] [-shift ] +[-help] [-class ] [-frc ] [-print #] [-ignore] [-nocenter] [-oldstyle] [-shift ] .SH DESCRIPTION .PP @@ -22,6 +22,9 @@ needed between .frc and .car/.mdf files are the atom types. .SH OPTIONS .TP +\fB\-h\fR, \fB\-help\fR, +Print detailed help message to the screen and stop. +.TP \fB\\fR This has to be the first argument and is a .B mandatory diff --git a/tools/msi2lmp/README b/tools/msi2lmp/README index 401ec536fd..9c9706fc97 100644 --- a/tools/msi2lmp/README +++ b/tools/msi2lmp/README @@ -76,10 +76,14 @@ This program uses the .car and .mdf files from MSI/Biosyms's INSIGHT The program is started by supplying information at the command prompt according to the usage described below. - USAGE: msi2lmp.exe {-print #} {-class #} {-frc FRC_FILE} - {-ignore} {-nocenter} {-shift # # #} + USAGE: msi2lmp.exe [-help] [-print #] [-class #] [-frc FRC_FILE] + [-ignore] [-nocenter] [-shift # # #] -- msi2lmp.exe is the name of the executable + + -- -help (or -h) + Print detailed this help message and exit. + -- is the base name of the .car and .mdf files -- -print (or -p) @@ -148,6 +152,15 @@ msi2lmp has the following known limitations: CHANGELOG +10 Mar 2023 Axel Kohlmeyer + +Substitute UTF-8 characters in .frc files with known ASCII equivalents +and add help message output + +05 Nov 2018 Axel Kohlmeyer + +Teach msi2lmp to not generate dihedrals with identical 1-4 atoms + 06 Oct 2016 Axel Kohlmeyer Improved whitespace handling in parsing topology and force field @@ -239,5 +252,5 @@ for number_of_dihedrals, etc. could be unpredictable in these systems. ----------------------------- - msi2lmp v3.9.8 6/10/2016 + msi2lmp v3.9.10 3/10/2023 diff --git a/tools/msi2lmp/src/msi2lmp.c b/tools/msi2lmp/src/msi2lmp.c index 2eb05fd5c5..68aaf566b2 100644 --- a/tools/msi2lmp/src/msi2lmp.c +++ b/tools/msi2lmp/src/msi2lmp.c @@ -2,26 +2,29 @@ * * msi2lmp.exe * -* v3.9.9 AK- Teach msi2lmp to not generate dihedrals with identical 1-4 atoms +* v3.9.10 AK - Substitute UTF-8 characters in .frc files with known ASCII equivalents +* - add help message output * -* v3.9.8 AK- Improved whitespace handling in parsing topology and force -* field files to avoid bogus warnings about type name truncation +* v3.9.9 AK - Teach msi2lmp to not generate dihedrals with identical 1-4 atoms * -* v3.9.7 AK- Add check to enforce that Class1/OPLS-AA use A-B parameter -* conventions in force field file and Class2 us r-eps conventions +* v3.9.8 AK - Improved whitespace handling in parsing topology and force +* field files to avoid bogus warnings about type name truncation * -* v3.9.6 AK- Refactoring of MDF file parser with more consistent -* handling of compile time constants MAX_NAME and MAX_STRING +* v3.9.7 AK - Add check to enforce that Class1/OPLS-AA use A-B parameter +* conventions in force field file and Class2 us r-eps conventions * -* v3.9.5 AK- Add TopoTools style force field parameter type hints +* v3.9.6 AK - Refactoring of MDF file parser with more consistent +* handling of compile time constants MAX_NAME and MAX_STRING * -* v3.9.4 AK- Make force field style hints optional with a flag +* v3.9.5 AK - Add TopoTools style force field parameter type hints * -* v3.9.3 AK- Bugfix for triclinic cells. +* v3.9.4 AK - Make force field style hints optional with a flag * -* v3.9.2 AK- Support for writing out force field style hints +* v3.9.3 AK - Bugfix for triclinic cells. * -* v3.9.1 AK- Bugfix for Class2. Free allocated memory. Print version number. +* v3.9.2 AK - Support for writing out force field style hints +* +* v3.9.1 AK - Bugfix for Class2. Free allocated memory. Print version number. * * v3.9 AK - Rudimentary support for OPLS-AA * @@ -156,6 +159,59 @@ #include #endif +const char helpmesg[] = + " USAGE: msi2lmp [-help] ROOTNAME [-print #] [-class #] [-frc FRC_FILE] [-ignore] [-nocenter] [-oldstyle]\n" + "\n" + " -- msi2lmp is the name of the executable\n" + "\n" + " -- -help or -h triggers printing this message and exits\n" + "\n" + " -- ROOTNAME is the base name of the .car and .mdf files\n" + " -- all opther flags are optional and can be abbreviated (e.g. -p instead of -print)\n" + "\n" + " -- -print\n" + " # is the print level: 0 - silent except for errors\n" + " 1 - minimal (default)\n" + " 2 - more verbose\n" + " 3 - even more verbose\n" + " -- -class\n" + " # is the class of forcefield to use (I or 1 = Class I e.g., CVFF, clayff)\n" + " (II or 2 = Class II e.g., CFFx, COMPASS)\n" + " (O or 0 = OPLS-AA)\n" + " default is -class I\n" + "\n" + " -- -ignore - tells msi2lmp to ignore warnings and errors and keep going\n" + "\n" + " -- -nocenter - tells msi2lmp to not center the box around the (geometrical)\n" + " center of the atoms, but around the origin\n" + "\n" + " -- -oldstyle - tells msi2lmp to write out a data file without style hints\n" + " (to be compatible with older LAMMPS versions)\n" + "\n" + " -- -shift - tells msi2lmp to shift the entire system (box and coordinates)\n" + " by a vector (default: 0.0 0.0 0.0)\n" + "\n" + " -- -frc - specifies name of the forcefield file (e.g., cff91)\n" + "\n" + " If the name includes a hard wired directory (i.e., if the name\n" + " starts with . or /), then the name is used alone. Otherwise,\n" + " the program looks for the forcefield file in $MSI2LMP_LIBRARY.\n" + " If $MSI2LMP_LIBRARY is not set, then the current directory is\n" + " used.\n" + "\n" + " If the file name does not include a dot after the first\n" + " character, then .frc is appended to the name.\n" + "\n" + " For example, -frc cvff (assumes cvff.frc is in $MSI2LMP_LIBRARY or .)\n" + "\n" + " -frc cff/cff91 (assumes cff91.frc is in $MSI2LMP_LIBRARY/cff or ./cff)\n" + "\n" + " -frc /usr/local/forcefields/cff95 (absolute location)\n" + "\n" + " By default, the program uses $MSI2LMP_LIBRARY/cvff.frc\n" + "\n" + " -- output is written to a file called ROOTNAME.data\n"; + /* global variables */ char *rootname; @@ -239,9 +295,14 @@ int main (int argc, char *argv[]) frc_dir_name = getenv("MSI2LMP_LIBRARY"); if (argc < 2) { - printf("usage: %s [-class ] [-frc ] [-print #] [-ignore] [-nocenter] [-oldstyle]\n",argv[0]); + printf("usage: %s [-help|-h] [-class ] [-frc ] [-print #] [-ignore] [-nocenter] [-oldstyle]\n",argv[0]); return 1; - } else { /* rootname was supplied as first argument, copy to rootname */ + } else { + if ((strcmp(argv[1],"-help") == 0) || (strcmp(argv[1],"-h") == 0)) { + puts(helpmesg); + return 1; + } + /* rootname was supplied as first argument, copy to rootname */ int len = strlen(argv[1]) + 1; rootname = (char *)malloc(len); strcpy(rootname,argv[1]); @@ -249,6 +310,10 @@ int main (int argc, char *argv[]) n = 2; while (n < argc) { + if ((strcmp(argv[n],"-help") == 0) || (strcmp(argv[1],"-h") == 0)) { + puts(helpmesg); + return 1; + } if (strncmp(argv[n],"-c",2) == 0) { n++; if (check_arg(argv,"-class",n,argc)) diff --git a/tools/msi2lmp/src/msi2lmp.h b/tools/msi2lmp/src/msi2lmp.h index b64c6fd834..3e1de85cbe 100644 --- a/tools/msi2lmp/src/msi2lmp.h +++ b/tools/msi2lmp/src/msi2lmp.h @@ -36,7 +36,7 @@ #include /* IWYU pragma: export */ -#define MSI2LMP_VERSION "v3.9.9 / 05 Nov 2018" +#define MSI2LMP_VERSION "v3.9.10 / 10 Mar 2023" #define PI_180 0.01745329251994329576 From 416df96c1b132c1a6042b501e719020280e7f438 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 9 Mar 2023 17:53:03 -0500 Subject: [PATCH 402/445] add extract support for TIP4P parameters to cutoff versions --- src/MOLECULE/pair_lj_cut_tip4p_cut.cpp | 22 ++++++++++++------- src/MOLECULE/pair_tip4p_cut.cpp | 14 ++++++++++++ src/MOLECULE/pair_tip4p_cut.h | 1 + .../tests/mol-pair-lj_cut_tip4p_cut.yaml | 5 +++++ .../tests/mol-pair-tip4p_cut.yaml | 8 ++++++- 5 files changed, 41 insertions(+), 9 deletions(-) diff --git a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp index 19b4d6585f..5be1de82a9 100644 --- a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp +++ b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp @@ -18,20 +18,20 @@ #include "pair_lj_cut_tip4p_cut.h" -#include -#include -#include "atom.h" -#include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "domain.h" #include "angle.h" +#include "atom.h" #include "bond.h" #include "comm.h" +#include "domain.h" +#include "error.h" +#include "force.h" #include "math_const.h" #include "memory.h" -#include "error.h" +#include "neigh_list.h" +#include "neighbor.h" +#include +#include using namespace LAMMPS_NS; using namespace MathConst; @@ -743,12 +743,18 @@ void PairLJCutTIP4PCut::compute_newsite(double *xO, double *xH1, void *PairLJCutTIP4PCut::extract(const char *str, int &dim) { dim = 0; + if (strcmp(str,"qdist") == 0) return (void *) &qdist; + if (strcmp(str,"typeO") == 0) return (void *) &typeO; + if (strcmp(str,"typeH") == 0) return (void *) &typeH; + if (strcmp(str,"typeA") == 0) return (void *) &typeA; + if (strcmp(str,"typeB") == 0) return (void *) &typeB; if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul; dim = 2; if (strcmp(str,"epsilon") == 0) return (void *) epsilon; if (strcmp(str,"sigma") == 0) return (void *) sigma; return nullptr; } + /* ---------------------------------------------------------------------- memory usage of hneigh ------------------------------------------------------------------------- */ diff --git a/src/MOLECULE/pair_tip4p_cut.cpp b/src/MOLECULE/pair_tip4p_cut.cpp index 25c9b82468..6d27c1a164 100644 --- a/src/MOLECULE/pair_tip4p_cut.cpp +++ b/src/MOLECULE/pair_tip4p_cut.cpp @@ -562,3 +562,17 @@ double PairTIP4PCut::memory_usage() bytes += (double)2 * nmax * sizeof(double); return bytes; } + +/* ---------------------------------------------------------------------- */ + +void *PairTIP4PCut::extract(const char *str, int &dim) +{ + dim = 0; + if (strcmp(str,"qdist") == 0) return (void *) &qdist; + if (strcmp(str,"typeO") == 0) return (void *) &typeO; + if (strcmp(str,"typeH") == 0) return (void *) &typeH; + if (strcmp(str,"typeA") == 0) return (void *) &typeA; + if (strcmp(str,"typeB") == 0) return (void *) &typeB; + if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul; + return nullptr; +} diff --git a/src/MOLECULE/pair_tip4p_cut.h b/src/MOLECULE/pair_tip4p_cut.h index 85f9e4a72b..73dced7432 100644 --- a/src/MOLECULE/pair_tip4p_cut.h +++ b/src/MOLECULE/pair_tip4p_cut.h @@ -38,6 +38,7 @@ class PairTIP4PCut : public Pair { void write_restart(FILE *) override; void read_restart(FILE *) override; double memory_usage() override; + void *extract(const char *, int &) override; protected: double cut_coul_global; diff --git a/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_cut.yaml b/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_cut.yaml index 36607e3a22..141d61f8ae 100644 --- a/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_cut.yaml +++ b/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_cut.yaml @@ -21,6 +21,11 @@ pair_coeff: ! | 4 4 0.015 3.1 5 5 0.015 3.1 extract: ! | + qdist 0 + typeO 0 + typeH 0 + typeA 0 + typeB 0 epsilon 2 sigma 2 cut_coul 0 diff --git a/unittest/force-styles/tests/mol-pair-tip4p_cut.yaml b/unittest/force-styles/tests/mol-pair-tip4p_cut.yaml index bcd16233b8..52fea193d5 100644 --- a/unittest/force-styles/tests/mol-pair-tip4p_cut.yaml +++ b/unittest/force-styles/tests/mol-pair-tip4p_cut.yaml @@ -15,7 +15,13 @@ input_file: in.fourmol pair_style: tip4p/cut 5 2 5 1 0.15 10.0 pair_coeff: ! | * * -extract: ! "" +extract: ! | + qdist 0 + typeO 0 + typeH 0 + typeA 0 + typeB 0 + cut_coul 0 natoms: 29 init_vdwl: 0 init_coul: -128.97793216803515 From 02854c1d5c09bfbd44c50890b97fae8fa2a61b35 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 9 Mar 2023 19:04:28 -0500 Subject: [PATCH 403/445] add compute dipole/tip4p and compute dipole/tip4p/chunk --- doc/src/Commands_compute.rst | 2 + doc/src/compute.rst | 2 + doc/src/compute_dipole.rst | 45 ++- doc/src/compute_dipole_chunk.rst | 47 ++- src/.gitignore | 4 + src/EXTRA-COMPUTE/compute_dipole_tip4p.cpp | 219 +++++++++++ src/EXTRA-COMPUTE/compute_dipole_tip4p.h | 46 +++ .../compute_dipole_tip4p_chunk.cpp | 364 ++++++++++++++++++ .../compute_dipole_tip4p_chunk.h | 64 +++ 9 files changed, 764 insertions(+), 29 deletions(-) create mode 100644 src/EXTRA-COMPUTE/compute_dipole_tip4p.cpp create mode 100644 src/EXTRA-COMPUTE/compute_dipole_tip4p.h create mode 100644 src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.cpp create mode 100644 src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.h diff --git a/doc/src/Commands_compute.rst b/doc/src/Commands_compute.rst index c2753b2afc..f073212524 100644 --- a/doc/src/Commands_compute.rst +++ b/doc/src/Commands_compute.rst @@ -52,6 +52,8 @@ KOKKOS, o = OPENMP, t = OPT. * :doc:`dilatation/atom ` * :doc:`dipole ` * :doc:`dipole/chunk ` + * :doc:`dipole/tip4p ` + * :doc:`dipole/tip4p/chunk ` * :doc:`displace/atom ` * :doc:`dpd ` * :doc:`dpd/atom ` diff --git a/doc/src/compute.rst b/doc/src/compute.rst index 3d74b3884e..880f60a8a6 100644 --- a/doc/src/compute.rst +++ b/doc/src/compute.rst @@ -206,6 +206,8 @@ The individual style names on the :doc:`Commands compute ` pag * :doc:`dilatation/atom ` - Peridynamic dilatation for each atom * :doc:`dipole ` - dipole vector and total dipole * :doc:`dipole/chunk ` - dipole vector and total dipole for each chunk +* :doc:`dipole/tip4p ` - dipole vector and total dipole with TIP4P pair style +* :doc:`dipole/tip4p/chunk ` - dipole vector and total dipole for each chunk with TIP4P pair style * :doc:`displace/atom ` - displacement of each atom * :doc:`dpd ` - total values of internal conductive energy, internal mechanical energy, chemical energy, and harmonic average of internal temperature * :doc:`dpd/atom ` - per-particle values of internal conductive energy, internal mechanical energy, chemical energy, and internal temperature diff --git a/doc/src/compute_dipole.rst b/doc/src/compute_dipole.rst index 95c5e216f0..fa1ca4ce0b 100644 --- a/doc/src/compute_dipole.rst +++ b/doc/src/compute_dipole.rst @@ -1,6 +1,10 @@ .. index:: compute dipole +.. index:: compute dipole/tip4p compute dipole command +====================== + +compute dipole/tip4p command ============================ Syntax @@ -8,10 +12,10 @@ Syntax .. code-block:: LAMMPS - compute ID group-ID dipole arg + compute ID group-ID style arg * ID, group-ID are documented in :doc:`compute ` command -* dipole = style name of this compute command +* style = *dipole* or *dipole/tip4p* * arg = *mass* or *geometry* = use COM or geometric center for charged chunk correction (optional) Examples @@ -21,6 +25,7 @@ Examples compute 1 fluid dipole compute dw water dipole geometry + compute dw water dipole/tip4p Description """"""""""" @@ -28,13 +33,20 @@ Description Define a computation that calculates the dipole vector and total dipole for a group of atoms. -This compute calculates the x,y,z coordinates of the dipole vector -and the total dipole moment for the atoms in the compute group. -This includes all effects due to atoms passing through periodic boundaries. -For a group 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. Both per-atom charges -and per-atom dipole moments, if present, contribute to the computed dipole. +These computes calculate the x,y,z coordinates of the dipole vector and +the total dipole moment for the atoms in the compute group. This +includes all effects due to atoms passing through periodic boundaries. +For a group 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. Both per-atom charges and per-atom dipole moments, if present, +contribute to the computed dipole. + +.. versionadded:: TBD + +Compute *dipole/tip4p* includes adjustments for the charge carrying +point M in molecules with TIP4P water geometry. The corresponding +parameters are extracted from the pair style. .. note:: @@ -49,10 +61,10 @@ and per-atom dipole moments, if present, contribute to the computed dipole. Output info """"""""""" -This compute calculations a global scalar containing the magnitude of -the computed dipole moment and a global vector of length 3 with the -dipole vector. See the :doc:`Howto output ` page for -an overview of LAMMPS output options. +These computes calculate a global scalar containing the magnitude of the +computed dipole moment and a global vector of length 3 with the dipole +vector. See the :doc:`Howto output ` page for an overview +of LAMMPS output options. The computed values are "intensive". The array values will be in dipole units (i.e., charge :doc:`units ` times distance @@ -60,7 +72,12 @@ dipole units (i.e., charge :doc:`units ` times distance Restrictions """""""""""" - none + +Compute style *dipole/tip4p* is part of the EXTRA-COMPUTE package. It is +only enabled if LAMMPS was built with that package. See the :doc:`Build +package ` page for more info. + +Compute style *dipole/tip4p* can only be used with tip4p pair styles. Related commands """""""""""""""" diff --git a/doc/src/compute_dipole_chunk.rst b/doc/src/compute_dipole_chunk.rst index 504e6f20d0..4e89bb748a 100644 --- a/doc/src/compute_dipole_chunk.rst +++ b/doc/src/compute_dipole_chunk.rst @@ -1,17 +1,21 @@ .. index:: compute dipole/chunk +.. index:: compute dipole/tip4p/chunk compute dipole/chunk command ============================ +compute dipole/tip4p/chunk command +================================== + Syntax """""" .. code-block:: LAMMPS - compute ID group-ID dipole/chunk chunkID arg + compute ID group-ID style chunkID arg * ID, group-ID are documented in :doc:`compute ` command -* dipole/chunk = style name of this compute command +* style = *dipole/chunk* or *dipole/tip4p/chunk* * chunkID = ID of :doc:`compute chunk/atom ` command * arg = *mass* or *geometry* = use COM or geometric center for charged chunk correction (optional) @@ -38,13 +42,20 @@ or atoms in a spatial bin. See the :doc:`compute chunk/atom 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 :math:`(x,y,z)` coordinates of the dipole vector -and the total dipole moment for each chunk, which includes all effects 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. Both per-atom charges and -per-atom dipole moments, if present, contribute to the computed dipole. +These computes calculate the :math:`(x,y,z)` coordinates of the dipole +vector and the total dipole moment for each chunk, which includes all +effects 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. Both +per-atom charges and per-atom dipole moments, if present, contribute to +the computed dipole. + +.. versionadded:: TBD + +Compute *dipole/tip4p/chunk* includes adjustments for the charge +carrying point M in molecules with TIP4P water geometry. The +corresponding parameters are extracted from the pair style. Note that only atoms in the specified group contribute to the calculation. The :doc:`compute chunk/atom ` command @@ -78,12 +89,12 @@ command, for example: Output info """"""""""" -This compute calculates a global array where the number of rows = the +These computes calculate a global array where the number of rows = the number of chunks *Nchunk* as calculated by the specified :doc:`compute -chunk/atom ` command. The number of columns is 4 for -the :math:`(x,y,z)` dipole vector components and the total dipole of each -chunk. These values can be accessed by any command that uses global -array values from a compute as input. See the :doc:`Howto output +chunk/atom ` command. The number of columns is 4 +for the :math:`(x,y,z)` dipole vector components and the total dipole of +each chunk. These values can be accessed by any command that uses +global array values from a compute as input. See the :doc:`Howto output ` page for an overview of LAMMPS output options. The array values are "intensive". The array values will be in @@ -92,7 +103,13 @@ dipole units (i.e., charge :doc:`units ` times distance Restrictions """""""""""" - none + +Compute style *dipole/tip4p/chunk* is part of the EXTRA-COMPUTE +package. It is only enabled if LAMMPS was built with that package. See +the :doc:`Build package ` page for more info. + +Compute style *dipole/tip4p/chunk* can only be used with tip4p pair +styles. Related commands """""""""""""""" diff --git a/src/.gitignore b/src/.gitignore index df02ab3397..0e3a69bdc7 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -534,6 +534,10 @@ /compute_damage_atom.h /compute_dilatation_atom.cpp /compute_dilatation_atom.h +/compute_dipole_tip4p.cpp +/compute_dipole_tip4p.h +/compute_dipole_tip4p_chunk.cpp +/compute_dipole_tip4p_chunk.h /compute_dpd.cpp /compute_dpd.h /compute_dpd_atom.cpp diff --git a/src/EXTRA-COMPUTE/compute_dipole_tip4p.cpp b/src/EXTRA-COMPUTE/compute_dipole_tip4p.cpp new file mode 100644 index 0000000000..c81cd3787c --- /dev/null +++ b/src/EXTRA-COMPUTE/compute_dipole_tip4p.cpp @@ -0,0 +1,219 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "compute_dipole_tip4p.h" + +#include "angle.h" +#include "atom.h" +#include "bond.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "pair.h" +#include "update.h" + +#include +#include + +using namespace LAMMPS_NS; + +enum { MASSCENTER, GEOMCENTER }; + +/* ---------------------------------------------------------------------- */ + +ComputeDipoleTIP4P::ComputeDipoleTIP4P(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg) +{ + if ((narg < 3) || (narg > 4)) error->all(FLERR, "Illegal compute dipole command"); + + scalar_flag = 1; + vector_flag = 1; + size_vector = 3; + extscalar = 0; + extvector = 0; + + vector = new double[size_vector]; + vector[0] = vector[1] = vector[2] = 0.0; + usecenter = MASSCENTER; + + if (narg == 4) { + if (utils::strmatch(arg[3], "^geom")) + usecenter = GEOMCENTER; + else if (strcmp(arg[3], "mass") == 0) + usecenter = MASSCENTER; + else + error->all(FLERR, "Illegal compute dipole command"); + } +} + +/* ---------------------------------------------------------------------- */ + +ComputeDipoleTIP4P::~ComputeDipoleTIP4P() +{ + delete[] vector; +} + +/* ---------------------------------------------------------------------- */ + +void ComputeDipoleTIP4P::init() +{ + int itmp; + double *p_qdist = (double *) force->pair->extract("qdist", itmp); + int *p_typeO = (int *) force->pair->extract("typeO", itmp); + int *p_typeH = (int *) force->pair->extract("typeH", itmp); + int *p_typeA = (int *) force->pair->extract("typeA", itmp); + int *p_typeB = (int *) force->pair->extract("typeB", itmp); + if (!p_qdist || !p_typeO || !p_typeH || !p_typeA || !p_typeB) + error->all(FLERR, "Pair style is incompatible with compute {}", style); + typeO = *p_typeO; + typeH = *p_typeH; + int typeA = *p_typeA; + int typeB = *p_typeB; + + if (force->angle == nullptr || force->bond == nullptr || force->angle->setflag == nullptr || + force->bond->setflag == nullptr) + error->all(FLERR, "Bond and angle potentials must be defined for compute {}", style); + if ((typeA < 1) || (typeA > atom->nangletypes) || (force->angle->setflag[typeA] == 0)) + error->all(FLERR, "Bad TIP4P angle type for compute {}", style); + if ((typeB < 1) || (typeB > atom->nbondtypes) || (force->bond->setflag[typeB] == 0)) + error->all(FLERR, "Bad TIP4P bond type for PPPM/TIP4P"); + double theta = force->angle->equilibrium_angle(typeA); + double blen = force->bond->equilibrium_distance(typeB); + alpha = *p_qdist / (cos(0.5 * theta) * blen); +} + +/* ---------------------------------------------------------------------- */ + +void ComputeDipoleTIP4P::compute_vector() +{ + invoked_vector = update->ntimestep; + + const auto x = atom->x; + const auto mask = atom->mask; + const auto type = atom->type; + const auto image = atom->image; + const auto mass = atom->mass; + const auto rmass = atom->rmass; + const auto q = atom->q; + const auto mu = atom->mu; + const auto nlocal = atom->nlocal; + + double dipole[3] = {0.0, 0.0, 0.0}; + double comproc[3] = {0.0, 0.0, 0.0}; + double com[3] = {0.0, 0.0, 0.0}; + double masstotal = 0.0; + double chrgtotal = 0.0; + double massproc = 0.0; + double chrgproc = 0.0; + double unwrap[3], xM[3]; + double *xi; + + for (int i = 0; i < nlocal; ++i) { + if (mask[i] & groupbit) { + double massone = 1.0; // for usecenter == GEOMCENTER + if (usecenter == MASSCENTER) { + if (rmass) + massone = rmass[i]; + else + massone = mass[type[i]]; + } + massproc += massone; + if (atom->q_flag) chrgproc += q[i]; + domain->unmap(x[i], image[i], unwrap); + comproc[0] += unwrap[0] * massone; + comproc[1] += unwrap[1] * massone; + comproc[2] += unwrap[2] * massone; + } + } + MPI_Allreduce(&massproc, &masstotal, 1, MPI_DOUBLE, MPI_SUM, world); + MPI_Allreduce(&chrgproc, &chrgtotal, 1, MPI_DOUBLE, MPI_SUM, world); + MPI_Allreduce(comproc, com, 3, MPI_DOUBLE, MPI_SUM, world); + + if (masstotal > 0.0) { + com[0] /= masstotal; + com[1] /= masstotal; + com[2] /= masstotal; + } + + // compute dipole moment + + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + if (type[i] == typeO) { + find_M(i,xM); + xi = xM; + } else { + xi = x[i]; + } + domain->unmap(xi, image[i], unwrap); + if (atom->q_flag) { + dipole[0] += q[i] * unwrap[0]; + dipole[1] += q[i] * unwrap[1]; + dipole[2] += q[i] * unwrap[2]; + } + if (atom->mu_flag) { + dipole[0] += mu[i][0]; + dipole[1] += mu[i][1]; + dipole[2] += mu[i][2]; + } + } + } + + MPI_Allreduce(dipole, vector, 3, MPI_DOUBLE, MPI_SUM, world); + + // correct for position dependence with a net charged group + vector[0] -= chrgtotal * com[0]; + vector[1] -= chrgtotal * com[1]; + vector[2] -= chrgtotal * com[2]; +} + +/* ---------------------------------------------------------------------- */ + +double ComputeDipoleTIP4P::compute_scalar() +{ + if (invoked_vector != update->ntimestep) compute_vector(); + + invoked_scalar = update->ntimestep; + scalar = sqrt(vector[0] * vector[0] + vector[1] * vector[1] + vector[2] * vector[2]); + return scalar; +} + +/* ---------------------------------------------------------------------- */ + +void ComputeDipoleTIP4P::find_M(int i, double *xM) +{ + double **x = atom->x; + + int iH1 = atom->map(atom->tag[i] + 1); + int iH2 = atom->map(atom->tag[i] + 2); + + if ((iH1 == -1) || (iH2 == -1)) error->one(FLERR,"TIP4P hydrogen is missing"); + if ((atom->type[iH1] != typeH) || (atom->type[iH2] != typeH)) + error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + + // set iH1,iH2 to index of closest image to O + + iH1 = domain->closest_image(i,iH1); + iH2 = domain->closest_image(i,iH2); + + double delx1 = x[iH1][0] - x[i][0]; + double dely1 = x[iH1][1] - x[i][1]; + double delz1 = x[iH1][2] - x[i][2]; + + double delx2 = x[iH2][0] - x[i][0]; + double dely2 = x[iH2][1] - x[i][1]; + double delz2 = x[iH2][2] - x[i][2]; + + xM[0] = x[i][0] + alpha * 0.5 * (delx1 + delx2); + xM[1] = x[i][1] + alpha * 0.5 * (dely1 + dely2); + xM[2] = x[i][2] + alpha * 0.5 * (delz1 + delz2); +} diff --git a/src/EXTRA-COMPUTE/compute_dipole_tip4p.h b/src/EXTRA-COMPUTE/compute_dipole_tip4p.h new file mode 100644 index 0000000000..75784b83ec --- /dev/null +++ b/src/EXTRA-COMPUTE/compute_dipole_tip4p.h @@ -0,0 +1,46 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef COMPUTE_CLASS +// clang-format off +ComputeStyle(dipole/tip4p,ComputeDipoleTIP4P); +// clang-format on +#else + +#ifndef LMP_COMPUTE_DIPOLE_TIP4P_H +#define LMP_COMPUTE_DIPOLE_TIP4P_H + +#include "compute.h" + +namespace LAMMPS_NS { + +class ComputeDipoleTIP4P : public Compute { + public: + ComputeDipoleTIP4P(class LAMMPS *, int, char **); + ~ComputeDipoleTIP4P() override; + void init() override; + void compute_vector() override; + double compute_scalar() override; + + private: + int usecenter; + + int typeO, typeH; + double alpha; + void find_M(int i, double *xM); +}; + +} // namespace LAMMPS_NS + +#endif +#endif diff --git a/src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.cpp b/src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.cpp new file mode 100644 index 0000000000..92e0d6fab2 --- /dev/null +++ b/src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.cpp @@ -0,0 +1,364 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "compute_dipole_tip4p_chunk.h" + +#include "angle.h" +#include "atom.h" +#include "bond.h" +#include "comm.h" +#include "compute_chunk_atom.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "pair.h" +#include "math_special.h" +#include "memory.h" +#include "modify.h" +#include "update.h" + +#include +#include + +using namespace LAMMPS_NS; +using namespace MathSpecial; + +enum { MASSCENTER, GEOMCENTER }; + +/* ---------------------------------------------------------------------- */ + +ComputeDipoleTIP4PChunk::ComputeDipoleTIP4PChunk(LAMMPS *lmp, int narg, char **arg) : + Compute(lmp, narg, arg), + idchunk(nullptr), massproc(nullptr), masstotal(nullptr), chrgproc(nullptr), + chrgtotal(nullptr), com(nullptr), + comall(nullptr), dipole(nullptr), dipoleall(nullptr) +{ + if ((narg != 4) && (narg != 5)) + error->all(FLERR,"Illegal compute dipole/chunk command"); + + array_flag = 1; + size_array_cols = 4; + size_array_rows = 0; + size_array_rows_variable = 1; + extarray = 0; + + // ID of compute chunk/atom + + idchunk = utils::strdup(arg[3]); + + usecenter = MASSCENTER; + + if (narg == 5) { + if (strncmp(arg[4],"geom",4) == 0) usecenter = GEOMCENTER; + else if (strcmp(arg[4],"mass") == 0) usecenter = MASSCENTER; + else error->all(FLERR,"Illegal compute dipole/chunk command"); + } + + ComputeDipoleTIP4PChunk::init(); + + // chunk-based data + + nchunk = 1; + maxchunk = 0; + allocate(); +} + +/* ---------------------------------------------------------------------- */ + +ComputeDipoleTIP4PChunk::~ComputeDipoleTIP4PChunk() +{ + delete[] idchunk; + memory->destroy(massproc); + memory->destroy(masstotal); + memory->destroy(chrgproc); + memory->destroy(chrgtotal); + memory->destroy(com); + memory->destroy(comall); + memory->destroy(dipole); + memory->destroy(dipoleall); +} + +/* ---------------------------------------------------------------------- */ + +void ComputeDipoleTIP4PChunk::init() +{ + int icompute = modify->find_compute(idchunk); + if (icompute < 0) + error->all(FLERR,"Chunk/atom compute does not exist for compute dipole/chunk"); + cchunk = dynamic_cast(modify->compute[icompute]); + if (strcmp(cchunk->style,"chunk/atom") != 0) + error->all(FLERR,"Compute dipole/chunk does not use chunk/atom compute"); + + int itmp; + double *p_qdist = (double *) force->pair->extract("qdist", itmp); + int *p_typeO = (int *) force->pair->extract("typeO", itmp); + int *p_typeH = (int *) force->pair->extract("typeH", itmp); + int *p_typeA = (int *) force->pair->extract("typeA", itmp); + int *p_typeB = (int *) force->pair->extract("typeB", itmp); + if (!p_qdist || !p_typeO || !p_typeH || !p_typeA || !p_typeB) + error->all(FLERR, "Pair style is incompatible with compute {}", style); + typeO = *p_typeO; + typeH = *p_typeH; + int typeA = *p_typeA; + int typeB = *p_typeB; + + if (force->angle == nullptr || force->bond == nullptr || force->angle->setflag == nullptr || + force->bond->setflag == nullptr) + error->all(FLERR, "Bond and angle potentials must be defined for compute {}", style); + if ((typeA < 1) || (typeA > atom->nangletypes) || (force->angle->setflag[typeA] == 0)) + error->all(FLERR, "Bad TIP4P angle type for compute {}", style); + if ((typeB < 1) || (typeB > atom->nbondtypes) || (force->bond->setflag[typeB] == 0)) + error->all(FLERR, "Bad TIP4P bond type for PPPM/TIP4P"); + double theta = force->angle->equilibrium_angle(typeA); + double blen = force->bond->equilibrium_distance(typeB); + alpha = *p_qdist / (cos(0.5 * theta) * blen); +} + +/* ---------------------------------------------------------------------- */ + +void ComputeDipoleTIP4PChunk::compute_array() +{ + int i,index; + double massone; + double unwrap[3]; + + invoked_array = update->ntimestep; + + // compute chunk/atom assigns atoms to chunk IDs + // extract ichunk index vector from compute + // ichunk = 1 to Nchunk for included atoms, 0 for excluded atoms + + nchunk = cchunk->setup_chunks(); + cchunk->compute_ichunk(); + int *ichunk = cchunk->ichunk; + + if (nchunk > maxchunk) allocate(); + size_array_rows = nchunk; + + // zero local per-chunk values + + for (i = 0; i < nchunk; i++) { + massproc[i] = chrgproc[i] = 0.0; + com[i][0] = com[i][1] = com[i][2] = 0.0; + dipole[i][0] = dipole[i][1] = dipole[i][2] = dipole[i][3] = 0.0; + } + + // compute COM for each chunk + + double **x = atom->x; + int *mask = atom->mask; + int *type = atom->type; + imageint *image = atom->image; + double *mass = atom->mass; + double *rmass = atom->rmass; + double *q = atom->q; + double **mu = atom->mu; + double xM[3]; + double *xi; + + int nlocal = atom->nlocal; + + for (i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + index = ichunk[i]-1; + if (index < 0) continue; + if (usecenter == MASSCENTER) { + if (rmass) massone = rmass[i]; + else massone = mass[type[i]]; + } else massone = 1.0; // usecenter == GEOMCENTER + domain->unmap(x[i],image[i],unwrap); + massproc[index] += massone; + if (atom->q_flag) chrgproc[index] += q[i]; + com[index][0] += unwrap[0] * massone; + com[index][1] += unwrap[1] * massone; + com[index][2] += unwrap[2] * massone; + } + + MPI_Allreduce(massproc,masstotal,nchunk,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(chrgproc,chrgtotal,nchunk,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(&com[0][0],&comall[0][0],3*nchunk,MPI_DOUBLE,MPI_SUM,world); + + for (i = 0; i < nchunk; i++) { + if (masstotal[i] > 0.0) { + comall[i][0] /= masstotal[i]; + comall[i][1] /= masstotal[i]; + comall[i][2] /= masstotal[i]; + } + } + + // compute dipole for each chunk + + for (i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + index = ichunk[i]-1; + if (index < 0) continue; + + if (type[i] == typeO) { + find_M(i,xM); + xi = xM; + } else { + xi = x[i]; + } + domain->unmap(xi,image[i],unwrap); + if (atom->q_flag) { + dipole[index][0] += q[i]*unwrap[0]; + dipole[index][1] += q[i]*unwrap[1]; + dipole[index][2] += q[i]*unwrap[2]; + } + if (atom->mu_flag) { + dipole[index][0] += mu[i][0]; + dipole[index][1] += mu[i][1]; + dipole[index][2] += mu[i][2]; + } + } + } + + MPI_Allreduce(&dipole[0][0],&dipoleall[0][0],4*nchunk,MPI_DOUBLE,MPI_SUM,world); + + for (i = 0; i < nchunk; i++) { + // correct for position dependence with charged chunks + dipoleall[i][0] -= chrgtotal[i]*comall[i][0]; + dipoleall[i][1] -= chrgtotal[i]*comall[i][1]; + dipoleall[i][2] -= chrgtotal[i]*comall[i][2]; + // compute total dipole moment + dipoleall[i][3] = sqrt(square(dipoleall[i][0]) + + square(dipoleall[i][1]) + + square(dipoleall[i][2])); + } +} + +/* ---------------------------------------------------------------------- + lock methods: called by fix ave/time + these methods ensure vector/array size is locked for Nfreq epoch + by passing lock info along to compute chunk/atom +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + increment lock counter +------------------------------------------------------------------------- */ + +void ComputeDipoleTIP4PChunk::lock_enable() +{ + cchunk->lockcount++; +} + +/* ---------------------------------------------------------------------- + decrement lock counter in compute chunk/atom, it if still exists +------------------------------------------------------------------------- */ + +void ComputeDipoleTIP4PChunk::lock_disable() +{ + int icompute = modify->find_compute(idchunk); + if (icompute >= 0) { + cchunk = dynamic_cast(modify->compute[icompute]); + cchunk->lockcount--; + } +} + +/* ---------------------------------------------------------------------- + calculate and return # of chunks = length of vector/array +------------------------------------------------------------------------- */ + +int ComputeDipoleTIP4PChunk::lock_length() +{ + nchunk = cchunk->setup_chunks(); + return nchunk; +} + +/* ---------------------------------------------------------------------- + set the lock from startstep to stopstep +------------------------------------------------------------------------- */ + +void ComputeDipoleTIP4PChunk::lock(Fix *fixptr, bigint startstep, bigint stopstep) +{ + cchunk->lock(fixptr,startstep,stopstep); +} + +/* ---------------------------------------------------------------------- + unset the lock +------------------------------------------------------------------------- */ + +void ComputeDipoleTIP4PChunk::unlock(Fix *fixptr) +{ + cchunk->unlock(fixptr); +} + +/* ---------------------------------------------------------------------- + free and reallocate per-chunk arrays +------------------------------------------------------------------------- */ + +void ComputeDipoleTIP4PChunk::allocate() +{ + memory->destroy(massproc); + memory->destroy(masstotal); + memory->destroy(chrgproc); + memory->destroy(chrgtotal); + memory->destroy(com); + memory->destroy(comall); + memory->destroy(dipole); + memory->destroy(dipoleall); + maxchunk = nchunk; + memory->create(massproc,maxchunk,"dipole/chunk:massproc"); + memory->create(masstotal,maxchunk,"dipole/chunk:masstotal"); + memory->create(chrgproc,maxchunk,"dipole/chunk:chrgproc"); + memory->create(chrgtotal,maxchunk,"dipole/chunk:chrgtotal"); + memory->create(com,maxchunk,3,"dipole/chunk:com"); + memory->create(comall,maxchunk,3,"dipole/chunk:comall"); + memory->create(dipole,maxchunk,4,"dipole/chunk:dipole"); + memory->create(dipoleall,maxchunk,4,"dipole/chunk:dipoleall"); + array = dipoleall; +} + +/* ---------------------------------------------------------------------- + memory usage of local data +------------------------------------------------------------------------- */ + +double ComputeDipoleTIP4PChunk::memory_usage() +{ + double bytes = (bigint) maxchunk * 2 * sizeof(double); + bytes += (double)maxchunk * 2*3 * sizeof(double); + bytes += (double)maxchunk * 2*4 * sizeof(double); + return bytes; +} + +/* ---------------------------------------------------------------------- */ + +void ComputeDipoleTIP4PChunk::find_M(int i, double *xM) +{ + double **x = atom->x; + + int iH1 = atom->map(atom->tag[i] + 1); + int iH2 = atom->map(atom->tag[i] + 2); + + if ((iH1 == -1) || (iH2 == -1)) error->one(FLERR,"TIP4P hydrogen is missing"); + if ((atom->type[iH1] != typeH) || (atom->type[iH2] != typeH)) + error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + + // set iH1,iH2 to index of closest image to O + + iH1 = domain->closest_image(i,iH1); + iH2 = domain->closest_image(i,iH2); + + double delx1 = x[iH1][0] - x[i][0]; + double dely1 = x[iH1][1] - x[i][1]; + double delz1 = x[iH1][2] - x[i][2]; + + double delx2 = x[iH2][0] - x[i][0]; + double dely2 = x[iH2][1] - x[i][1]; + double delz2 = x[iH2][2] - x[i][2]; + + xM[0] = x[i][0] + alpha * 0.5 * (delx1 + delx2); + xM[1] = x[i][1] + alpha * 0.5 * (dely1 + dely2); + xM[2] = x[i][2] + alpha * 0.5 * (delz1 + delz2); +} diff --git a/src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.h b/src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.h new file mode 100644 index 0000000000..63d6e8401e --- /dev/null +++ b/src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.h @@ -0,0 +1,64 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef COMPUTE_CLASS +// clang-format off +ComputeStyle(dipole/tip4p/chunk,ComputeDipoleTIP4PChunk); +// clang-format on +#else + +#ifndef LMP_COMPUTE_DIPOLE_TIP4P_CHUNK_H +#define LMP_COMPUTE_DIPOLE_TIP4P_CHUNK_H + +#include "compute.h" + +namespace LAMMPS_NS { +class Fix; + +class ComputeDipoleTIP4PChunk : public Compute { + public: + ComputeDipoleTIP4PChunk(class LAMMPS *, int, char **); + ~ComputeDipoleTIP4PChunk() override; + void init() override; + void compute_array() override; + + void lock_enable() override; + void lock_disable() override; + int lock_length() override; + void lock(Fix *, bigint, bigint) override; + void unlock(Fix *) override; + + double memory_usage() override; + + private: + int nchunk, maxchunk; + char *idchunk; + class ComputeChunkAtom *cchunk; + + double *massproc, *masstotal; + double *chrgproc, *chrgtotal; + double **com, **comall; + double **dipole, **dipoleall; + int usecenter; + + int typeO, typeH; + double alpha; + void find_M(int i, double *xM); + + void allocate(); +}; + +} // namespace LAMMPS_NS + +#endif +#endif From 2a6515f765acdcebefe7ce96a9a3acd255354a1d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 9 Mar 2023 21:38:13 -0500 Subject: [PATCH 404/445] use consistent names in error messages --- src/EXTRA-COMPUTE/compute_dipole_tip4p.cpp | 27 +++++++------- .../compute_dipole_tip4p_chunk.cpp | 37 ++++++++++--------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/src/EXTRA-COMPUTE/compute_dipole_tip4p.cpp b/src/EXTRA-COMPUTE/compute_dipole_tip4p.cpp index c81cd3787c..f57fe6a9fb 100644 --- a/src/EXTRA-COMPUTE/compute_dipole_tip4p.cpp +++ b/src/EXTRA-COMPUTE/compute_dipole_tip4p.cpp @@ -33,7 +33,7 @@ enum { MASSCENTER, GEOMCENTER }; ComputeDipoleTIP4P::ComputeDipoleTIP4P(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg) { - if ((narg < 3) || (narg > 4)) error->all(FLERR, "Illegal compute dipole command"); + if ((narg < 3) || (narg > 4)) error->all(FLERR, "Illegal compute dipole/tip4p command"); scalar_flag = 1; vector_flag = 1; @@ -51,7 +51,7 @@ ComputeDipoleTIP4P::ComputeDipoleTIP4P(LAMMPS *lmp, int narg, char **arg) : Comp else if (strcmp(arg[3], "mass") == 0) usecenter = MASSCENTER; else - error->all(FLERR, "Illegal compute dipole command"); + error->all(FLERR, "Illegal compute dipole/tip4p command"); } } @@ -66,6 +66,8 @@ ComputeDipoleTIP4P::~ComputeDipoleTIP4P() void ComputeDipoleTIP4P::init() { + if (!force->pair) error->all(FLERR, "Pair style must be defined for compute dipole/ti4p"); + int itmp; double *p_qdist = (double *) force->pair->extract("qdist", itmp); int *p_typeO = (int *) force->pair->extract("typeO", itmp); @@ -73,19 +75,18 @@ void ComputeDipoleTIP4P::init() int *p_typeA = (int *) force->pair->extract("typeA", itmp); int *p_typeB = (int *) force->pair->extract("typeB", itmp); if (!p_qdist || !p_typeO || !p_typeH || !p_typeA || !p_typeB) - error->all(FLERR, "Pair style is incompatible with compute {}", style); + error->all(FLERR, "Pair style is incompatible with compute dipole/tip4p"); typeO = *p_typeO; typeH = *p_typeH; int typeA = *p_typeA; int typeB = *p_typeB; - if (force->angle == nullptr || force->bond == nullptr || force->angle->setflag == nullptr || - force->bond->setflag == nullptr) - error->all(FLERR, "Bond and angle potentials must be defined for compute {}", style); + if (!force->angle || !force->bond || !force->angle->setflag || !force->bond->setflag) + error->all(FLERR, "Bond and angle potentials must be defined for compute dipole/tip4p"); if ((typeA < 1) || (typeA > atom->nangletypes) || (force->angle->setflag[typeA] == 0)) - error->all(FLERR, "Bad TIP4P angle type for compute {}", style); + error->all(FLERR, "Bad TIP4P angle type for compute dipole/tip4p"); if ((typeB < 1) || (typeB > atom->nbondtypes) || (force->bond->setflag[typeB] == 0)) - error->all(FLERR, "Bad TIP4P bond type for PPPM/TIP4P"); + error->all(FLERR, "Bad TIP4P bond type for compute dipole/tip4p"); double theta = force->angle->equilibrium_angle(typeA); double blen = force->bond->equilibrium_distance(typeB); alpha = *p_qdist / (cos(0.5 * theta) * blen); @@ -149,7 +150,7 @@ void ComputeDipoleTIP4P::compute_vector() for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { if (type[i] == typeO) { - find_M(i,xM); + find_M(i, xM); xi = xM; } else { xi = x[i]; @@ -196,14 +197,14 @@ void ComputeDipoleTIP4P::find_M(int i, double *xM) int iH1 = atom->map(atom->tag[i] + 1); int iH2 = atom->map(atom->tag[i] + 2); - if ((iH1 == -1) || (iH2 == -1)) error->one(FLERR,"TIP4P hydrogen is missing"); + if ((iH1 == -1) || (iH2 == -1)) error->one(FLERR, "TIP4P hydrogen is missing"); if ((atom->type[iH1] != typeH) || (atom->type[iH2] != typeH)) - error->one(FLERR,"TIP4P hydrogen has incorrect atom type"); + error->one(FLERR, "TIP4P hydrogen has incorrect atom type"); // set iH1,iH2 to index of closest image to O - iH1 = domain->closest_image(i,iH1); - iH2 = domain->closest_image(i,iH2); + iH1 = domain->closest_image(i, iH1); + iH2 = domain->closest_image(i, iH2); double delx1 = x[iH1][0] - x[i][0]; double dely1 = x[iH1][1] - x[i][1]; diff --git a/src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.cpp b/src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.cpp index 92e0d6fab2..651811bba5 100644 --- a/src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.cpp +++ b/src/EXTRA-COMPUTE/compute_dipole_tip4p_chunk.cpp @@ -45,7 +45,7 @@ ComputeDipoleTIP4PChunk::ComputeDipoleTIP4PChunk(LAMMPS *lmp, int narg, char **a comall(nullptr), dipole(nullptr), dipoleall(nullptr) { if ((narg != 4) && (narg != 5)) - error->all(FLERR,"Illegal compute dipole/chunk command"); + error->all(FLERR,"Illegal compute dipole/tip4p/chunk command"); array_flag = 1; size_array_cols = 4; @@ -62,7 +62,7 @@ ComputeDipoleTIP4PChunk::ComputeDipoleTIP4PChunk(LAMMPS *lmp, int narg, char **a if (narg == 5) { if (strncmp(arg[4],"geom",4) == 0) usecenter = GEOMCENTER; else if (strcmp(arg[4],"mass") == 0) usecenter = MASSCENTER; - else error->all(FLERR,"Illegal compute dipole/chunk command"); + else error->all(FLERR,"Illegal compute dipole/tip4p/chunk command"); } ComputeDipoleTIP4PChunk::init(); @@ -95,10 +95,12 @@ void ComputeDipoleTIP4PChunk::init() { int icompute = modify->find_compute(idchunk); if (icompute < 0) - error->all(FLERR,"Chunk/atom compute does not exist for compute dipole/chunk"); + error->all(FLERR,"Chunk/atom compute does not exist for compute dipole/tip4p/chunk"); cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) - error->all(FLERR,"Compute dipole/chunk does not use chunk/atom compute"); + error->all(FLERR,"Compute dipole/tip4p/chunk does not use chunk/atom compute"); + + if (!force->pair) error->all(FLERR, "Pair style must be defined for compute dipole/tip4p/chunk"); int itmp; double *p_qdist = (double *) force->pair->extract("qdist", itmp); @@ -107,19 +109,18 @@ void ComputeDipoleTIP4PChunk::init() int *p_typeA = (int *) force->pair->extract("typeA", itmp); int *p_typeB = (int *) force->pair->extract("typeB", itmp); if (!p_qdist || !p_typeO || !p_typeH || !p_typeA || !p_typeB) - error->all(FLERR, "Pair style is incompatible with compute {}", style); + error->all(FLERR, "Pair style is incompatible with compute dipole/tip4p/chunk"); typeO = *p_typeO; typeH = *p_typeH; int typeA = *p_typeA; int typeB = *p_typeB; - if (force->angle == nullptr || force->bond == nullptr || force->angle->setflag == nullptr || - force->bond->setflag == nullptr) - error->all(FLERR, "Bond and angle potentials must be defined for compute {}", style); + if (!force->angle || !force->bond || !force->angle->setflag || !force->bond->setflag) + error->all(FLERR, "Bond and angle potentials must be defined for compute dipole/tip4p/chunk"); if ((typeA < 1) || (typeA > atom->nangletypes) || (force->angle->setflag[typeA] == 0)) - error->all(FLERR, "Bad TIP4P angle type for compute {}", style); + error->all(FLERR, "Bad TIP4P angle type for compute dipole/tip4p/chunk"); if ((typeB < 1) || (typeB > atom->nbondtypes) || (force->bond->setflag[typeB] == 0)) - error->all(FLERR, "Bad TIP4P bond type for PPPM/TIP4P"); + error->all(FLERR, "Bad TIP4P bond type for compute dipole/tip4p/chunk"); double theta = force->angle->equilibrium_angle(typeA); double blen = force->bond->equilibrium_distance(typeB); alpha = *p_qdist / (cos(0.5 * theta) * blen); @@ -309,14 +310,14 @@ void ComputeDipoleTIP4PChunk::allocate() memory->destroy(dipole); memory->destroy(dipoleall); maxchunk = nchunk; - memory->create(massproc,maxchunk,"dipole/chunk:massproc"); - memory->create(masstotal,maxchunk,"dipole/chunk:masstotal"); - memory->create(chrgproc,maxchunk,"dipole/chunk:chrgproc"); - memory->create(chrgtotal,maxchunk,"dipole/chunk:chrgtotal"); - memory->create(com,maxchunk,3,"dipole/chunk:com"); - memory->create(comall,maxchunk,3,"dipole/chunk:comall"); - memory->create(dipole,maxchunk,4,"dipole/chunk:dipole"); - memory->create(dipoleall,maxchunk,4,"dipole/chunk:dipoleall"); + memory->create(massproc,maxchunk,"dipole/tip4p/chunk:massproc"); + memory->create(masstotal,maxchunk,"dipole/tip4p/chunk:masstotal"); + memory->create(chrgproc,maxchunk,"dipole/tip4p/chunk:chrgproc"); + memory->create(chrgtotal,maxchunk,"dipole/tip4p/chunk:chrgtotal"); + memory->create(com,maxchunk,3,"dipole/tip4p/chunk:com"); + memory->create(comall,maxchunk,3,"dipole/tip4p/chunk:comall"); + memory->create(dipole,maxchunk,4,"dipole/tip4p/chunk:dipole"); + memory->create(dipoleall,maxchunk,4,"dipole/tip4p/chunk:dipoleall"); array = dipoleall; } From b5804b320c202a5fa71302235c69b55888219a0f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Mar 2023 11:13:01 -0500 Subject: [PATCH 405/445] update/improve/correct error messages in fix efield and make compatible with derived class --- src/fix_efield.cpp | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/src/fix_efield.cpp b/src/fix_efield.cpp index 3514ad1c34..99482f8459 100644 --- a/src/fix_efield.cpp +++ b/src/fix_efield.cpp @@ -42,7 +42,7 @@ FixEfield::FixEfield(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), xstr(nullptr), ystr(nullptr), zstr(nullptr), estr(nullptr), idregion(nullptr), region(nullptr), efield(nullptr) { - if (narg < 6) utils::missing_cmd_args(FLERR, "fix efield", error); + if (narg < 6) utils::missing_cmd_args(FLERR, std::string("fix ")+style, error); dynamic_group_allow = 1; vector_flag = 1; @@ -85,20 +85,21 @@ FixEfield::FixEfield(LAMMPS *lmp, int narg, char **arg) : int iarg = 6; while (iarg < narg) { if (strcmp(arg[iarg], "region") == 0) { - if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "fix efield region", error); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, std::string("fix ") + style + " region", error); region = domain->get_region_by_id(arg[iarg + 1]); if (!region) error->all(FLERR, "Region {} for fix efield does not exist", arg[iarg + 1]); idregion = utils::strdup(arg[iarg + 1]); iarg += 2; } else if (strcmp(arg[iarg], "energy") == 0) { - if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "fix efield energy", error); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, std::string("fix ") + style + "energy", error); if (utils::strmatch(arg[iarg + 1], "^v_")) { estr = utils::strdup(arg[iarg + 1] + 2); } else - error->all(FLERR, "Illegal fix efield energy value argument"); + error->all(FLERR, "Unsupported argument for fix {} energy command: {}", style, arg[iarg]); iarg += 2; - } else - error->all(FLERR, "Unknown fix efield keyword: {}", arg[iarg]); + } else { + error->all(FLERR, "Unknown keyword for fix {} command: {}", style, arg[iarg]); + } } force_flag = 0; @@ -140,47 +141,47 @@ void FixEfield::init() qflag = muflag = 0; if (atom->q_flag) qflag = 1; if (atom->mu_flag && atom->torque_flag) muflag = 1; - if (!qflag && !muflag) error->all(FLERR, "Fix efield requires atom attribute q or mu"); + if (!qflag && !muflag) error->all(FLERR, "Fix {} requires atom attribute q or mu", style); // check variables if (xstr) { xvar = input->variable->find(xstr); - if (xvar < 0) error->all(FLERR, "Variable {} for fix efield does not exist", xstr); + if (xvar < 0) error->all(FLERR, "Variable {} for fix {} does not exist", xstr, style); if (input->variable->equalstyle(xvar)) xstyle = EQUAL; else if (input->variable->atomstyle(xvar)) xstyle = ATOM; else - error->all(FLERR, "Variable {} for fix efield is invalid style", xstr); + error->all(FLERR, "Variable {} for fix {} is invalid style", xstr, style); } if (ystr) { yvar = input->variable->find(ystr); - if (yvar < 0) error->all(FLERR, "Variable {} for fix efield does not exist", ystr); + if (yvar < 0) error->all(FLERR, "Variable {} for fix {} does not exist", ystr, style); if (input->variable->equalstyle(yvar)) ystyle = EQUAL; else if (input->variable->atomstyle(yvar)) ystyle = ATOM; else - error->all(FLERR, "Variable {} for fix efield is invalid style", ystr); + error->all(FLERR, "Variable {} for fix {} is invalid style", ystr, style); } if (zstr) { zvar = input->variable->find(zstr); - if (zvar < 0) error->all(FLERR, "Variable {} for fix efield does not exist", zstr); + if (zvar < 0) error->all(FLERR, "Variable {} for fix {} does not exist", zstr, style); if (input->variable->equalstyle(zvar)) zstyle = EQUAL; else if (input->variable->atomstyle(zvar)) zstyle = ATOM; else - error->all(FLERR, "Variable {} for fix efield is invalid style", zstr); + error->all(FLERR, "Variable {} for fix {} is invalid style", zstr, style); } if (estr) { evar = input->variable->find(estr); - if (evar < 0) error->all(FLERR, "Variable {} for fix efield does not exist", estr); + if (evar < 0) error->all(FLERR, "Variable {} for fix {} does not exist", estr, style); if (input->variable->atomstyle(evar)) estyle = ATOM; else - error->all(FLERR, "Variable {} for fix efield is invalid style", estr); + error->all(FLERR, "Variable {} for fix {} is invalid style", estr, style); } else estyle = NONE; @@ -188,7 +189,7 @@ void FixEfield::init() if (idregion) { region = domain->get_region_by_id(idregion); - if (!region) error->all(FLERR, "Region {} for fix efield does not exist", idregion); + if (!region) error->all(FLERR, "Region {} for fix {} does not exist", idregion, style); } if (xstyle == ATOM || ystyle == ATOM || zstyle == ATOM) @@ -199,15 +200,15 @@ void FixEfield::init() varflag = CONSTANT; if (muflag && varflag == ATOM) - error->all(FLERR, "Fix efield with dipoles cannot use atom-style variables"); + error->all(FLERR, "Fix {} with dipoles cannot use atom-style variables", style); if (muflag && update->whichflag == 2 && comm->me == 0) - error->warning(FLERR, "The minimizer does not re-orient dipoles when using fix efield"); + error->warning(FLERR, "The minimizer does not re-orient dipoles when using fix {}", style); if (varflag == CONSTANT && estyle != NONE) - error->all(FLERR, "Cannot use variable energy with constant efield in fix efield"); + error->all(FLERR, "Cannot use variable energy with constant efield in fix {}", style); if ((varflag == EQUAL || varflag == ATOM) && update->whichflag == 2 && estyle == NONE) - error->all(FLERR, "Must use variable energy with fix efield"); + error->all(FLERR, "Must use variable energy with fix {}", style); if (utils::strmatch(update->integrate_style, "^respa")) { ilevel_respa = (dynamic_cast(update->integrate))->nlevels - 1; @@ -254,7 +255,7 @@ void FixEfield::post_force(int vflag) // reallocate efield array if necessary - if (varflag == ATOM && atom->nmax > maxatom) { + if ((varflag == ATOM) && (atom->nmax > maxatom)) { maxatom = atom->nmax; memory->destroy(efield); memory->create(efield, maxatom, 4, "efield:efield"); From 2de3f4d261e162df6afe66388a22d9fcd1e5de08 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Mar 2023 12:32:26 -0500 Subject: [PATCH 406/445] implementation for fix efield/tip4p for static field (untested) --- src/EXTRA-FIX/fix_efield_tip4p.cpp | 342 +++++++++++++++++++++++++++++ src/EXTRA-FIX/fix_efield_tip4p.h | 43 ++++ src/fix_efield.h | 2 - 3 files changed, 385 insertions(+), 2 deletions(-) create mode 100644 src/EXTRA-FIX/fix_efield_tip4p.cpp create mode 100644 src/EXTRA-FIX/fix_efield_tip4p.h diff --git a/src/EXTRA-FIX/fix_efield_tip4p.cpp b/src/EXTRA-FIX/fix_efield_tip4p.cpp new file mode 100644 index 0000000000..c5ecc313ec --- /dev/null +++ b/src/EXTRA-FIX/fix_efield_tip4p.cpp @@ -0,0 +1,342 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "fix_efield_tip4p.h" + +#include "angle.h" +#include "atom.h" +#include "bond.h" +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "input.h" +#include "memory.h" +#include "modify.h" +#include "pair.h" +#include "region.h" +#include "respa.h" +#include "update.h" +#include "variable.h" + +#include + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +FixEfieldTIP4P::FixEfieldTIP4P(LAMMPS *_lmp, int narg, char **arg) : FixEfield(_lmp, narg, arg) {} + +/* ---------------------------------------------------------------------- */ + +void FixEfieldTIP4P::init() +{ + FixEfield::init(); + + if (atom->tag_enable == 0) error->all(FLERR, "Fix efield/tip4p requires atom IDs"); + if (!atom->q_flag) error->all(FLERR, "Fix efield/tip4p requires atom attribute q"); + + int itmp; + double *p_qdist = (double *) force->pair->extract("qdist", itmp); + int *p_typeO = (int *) force->pair->extract("typeO", itmp); + int *p_typeH = (int *) force->pair->extract("typeH", itmp); + int *p_typeA = (int *) force->pair->extract("typeA", itmp); + int *p_typeB = (int *) force->pair->extract("typeB", itmp); + if (!p_qdist || !p_typeO || !p_typeH || !p_typeA || !p_typeB) + error->all(FLERR, "Pair style is incompatible with compute {}", style); + typeO = *p_typeO; + typeH = *p_typeH; + int typeA = *p_typeA; + int typeB = *p_typeB; + + if (force->angle == nullptr || force->bond == nullptr || force->angle->setflag == nullptr || + force->bond->setflag == nullptr) + error->all(FLERR, "Bond and angle potentials must be defined for compute {}", style); + if ((typeA < 1) || (typeA > atom->nangletypes) || (force->angle->setflag[typeA] == 0)) + error->all(FLERR, "Bad TIP4P angle type for compute {}", style); + if ((typeB < 1) || (typeB > atom->nbondtypes) || (force->bond->setflag[typeB] == 0)) + error->all(FLERR, "Bad TIP4P bond type for PPPM/TIP4P"); + + // determine alpha parameter + + const double theta = force->angle->equilibrium_angle(typeA); + const double blen = force->bond->equilibrium_distance(typeB); + alpha = *p_qdist / (cos(0.5 * theta) * blen); +} + +/* ---------------------------------------------------------------------- + apply F = qE +------------------------------------------------------------------------- */ + +void FixEfieldTIP4P::post_force(int vflag) +{ + double **f = atom->f; + double *q = atom->q; + tagint *tag = atom->tag; + int *type = atom->type; + int *mask = atom->mask; + imageint *image = atom->image; + int nlocal = atom->nlocal; + + // virial setup + + v_init(vflag); + + // reallocate efield array if necessary + + if ((varflag == ATOM) && (atom->nmax > maxatom)) { + maxatom = atom->nmax; + memory->destroy(efield); + memory->create(efield, maxatom, 4, "efield:efield"); + } + + // update region if necessary + + if (region) region->prematch(); + + // fsum[0] = "potential energy" for added force + // fsum[123] = extra force added to atoms + + fsum[0] = fsum[1] = fsum[2] = fsum[3] = 0.0; + force_flag = 0; + + double **x = atom->x; + double fx, fy, fz, xM[3]; + double v[6]; + int iO, iH1, iH2; + + // constant efield + + if (varflag == CONSTANT) { + double unwrap[3]; + + // charge interactions + // force = qE, potential energy = F dot x in unwrapped coords + + if (qflag) { + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + + // this is an atom belonging to a TIP4P molecule + + if ((type[i] == typeO) || (type[i] == typeH)) { + + if (type[i] == typeO) { + iO = i; + iH1 = atom->map(tag[i] + 1); + iH2 = atom->map(tag[i] + 2); + } else { + // set indices for first or second hydrogen + iO = atom->map(tag[i] - 1); + if ((iO != -1) && (type[iO] == typeO)) { + iH1 = i; + iH2 = atom->map(tag[i] + 1); + } else { + iO = atom->map(tag[i] - 2); + iH1 = atom->map(tag[i] - 1); + iH2 = i; + } + } + if ((iH1 == -1) || (iH2 == -1)) error->one(FLERR, "TIP4P hydrogen is missing"); + if (iO == -1) error->one(FLERR, "TIP4P oxygen is missing"); + if ((atom->type[iH1] != typeH) || (atom->type[iH2] != typeH)) + error->one(FLERR, "TIP4P hydrogen has incorrect atom type"); + if (atom->type[iO] != typeO) error->one(FLERR, "TIP4P oxygen has incorrect atom type"); + + find_M(x[iO], x[iH1], x[iH2], xM); + if (region && !region->match(xM[0], xM[1], xM[2])) continue; + + fx = q[iO] * ex; + fy = q[iO] * ey; + fz = q[iO] * ez; + + // distribute and apply forces, but only to local atoms + if (iO < nlocal) { + f[iO][0] += fx * (1.0 - alpha); + f[iO][1] += fy * (1.0 - alpha); + f[iO][2] += fz * (1.0 - alpha); + } + if (iH1 < nlocal) { + f[iH1][0] += 0.5 * alpha * fx; + f[iH1][1] += 0.5 * alpha * fy; + f[iH1][2] += 0.5 * alpha * fz; + } + if (iH2 < nlocal) { + f[iH2][0] += 0.5 * alpha * fx; + f[iH2][1] += 0.5 * alpha * fy; + f[iH2][2] += 0.5 * alpha * fz; + } + + domain->unmap(xM, image[i], unwrap); + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; + + // tally virial contribution with Oxygen + if (evflag && (iO < nlocal)) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iO, v); + } + + } else { + + if (region && !region->match(x[i][0], x[i][1], x[i][2])) continue; + fx = q[i] * ex; + fy = q[i] * ey; + fz = q[i] * ez; + f[i][0] += fx; + f[i][1] += fy; + f[i][2] += fz; + + domain->unmap(x[i], image[i], unwrap); + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; + if (evflag) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(i, v); + } + } + } + } + } + + // dipole interactions + // no force, torque = mu cross E, potential energy = -mu dot E + + if (muflag) { + double **mu = atom->mu; + double **t = atom->torque; + double tx, ty, tz; + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + if (region && !region->match(x[i][0], x[i][1], x[i][2])) continue; + tx = ez * mu[i][1] - ey * mu[i][2]; + ty = ex * mu[i][2] - ez * mu[i][0]; + tz = ey * mu[i][0] - ex * mu[i][1]; + t[i][0] += tx; + t[i][1] += ty; + t[i][2] += tz; + fsum[0] -= mu[i][0] * ex + mu[i][1] * ey + mu[i][2] * ez; + } + } + + // variable efield, wrap with clear/add + // potential energy = evar if defined, else 0.0 + + } else { + + modify->clearstep_compute(); + + if (xstyle == EQUAL) { + ex = qe2f * input->variable->compute_equal(xvar); + } else if (xstyle == ATOM) { + input->variable->compute_atom(xvar, igroup, &efield[0][0], 4, 0); + } + if (ystyle == EQUAL) { + ey = qe2f * input->variable->compute_equal(yvar); + } else if (ystyle == ATOM) { + input->variable->compute_atom(yvar, igroup, &efield[0][1], 4, 0); + } + if (zstyle == EQUAL) { + ez = qe2f * input->variable->compute_equal(zvar); + } else if (zstyle == ATOM) { + input->variable->compute_atom(zvar, igroup, &efield[0][2], 4, 0); + } + if (estyle == ATOM) input->variable->compute_atom(evar, igroup, &efield[0][3], 4, 0); + + modify->addstep_compute(update->ntimestep + 1); + + // charge interactions + // force = qE + + if (qflag) { + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + if (region && !region->match(x[i][0], x[i][1], x[i][2])) continue; + if (xstyle == ATOM) { + fx = qe2f * q[i] * efield[i][0]; + } else { + fx = q[i] * ex; + } + f[i][0] += fx; + fsum[1] += fx; + if (ystyle == ATOM) { + fy = qe2f * q[i] * efield[i][1]; + } else { + fy = q[i] * ey; + } + f[i][1] += fy; + fsum[2] += fy; + if (zstyle == ATOM) { + fz = qe2f * q[i] * efield[i][2]; + } else { + fz = q[i] * ez; + } + f[i][2] += fz; + fsum[3] += fz; + if (estyle == ATOM) fsum[0] += efield[0][3]; + } + } + } + + // dipole interactions + // no force, torque = mu cross E + + if (muflag) { + double **mu = atom->mu; + double **t = atom->torque; + double tx, ty, tz; + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + if (region && !region->match(x[i][0], x[i][1], x[i][2])) continue; + tx = ez * mu[i][1] - ey * mu[i][2]; + ty = ex * mu[i][2] - ez * mu[i][0]; + tz = ey * mu[i][0] - ex * mu[i][1]; + t[i][0] += tx; + t[i][1] += ty; + t[i][2] += tz; + } + } + } +} + +/* ---------------------------------------------------------------------- */ + +void FixEfieldTIP4P::find_M(double *xO, double *xH1, double *xH2, double *xM) +{ + double delx1 = xH1[0] - xO[0]; + double dely1 = xH1[1] - xO[1]; + double delz1 = xH1[2] - xO[2]; + + double delx2 = xH2[0] - xO[0]; + double dely2 = xH2[1] - xO[1]; + double delz2 = xH2[2] - xO[2]; + + xM[0] = xO[0] + alpha * 0.5 * (delx1 + delx2); + xM[1] = xO[1] + alpha * 0.5 * (dely1 + dely2); + xM[2] = xO[2] + alpha * 0.5 * (delz1 + delz2); +} diff --git a/src/EXTRA-FIX/fix_efield_tip4p.h b/src/EXTRA-FIX/fix_efield_tip4p.h new file mode 100644 index 0000000000..7970e67b3b --- /dev/null +++ b/src/EXTRA-FIX/fix_efield_tip4p.h @@ -0,0 +1,43 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS +// clang-format off +FixStyle(efield/tip4p,FixEfieldTIP4P); +// clang-format on +#else + +#ifndef LMP_FIX_EFIELD_TIP4P_H +#define LMP_FIX_EFIELD_TIP4P_H + +#include "fix_efield.h" + +namespace LAMMPS_NS { + +class FixEfieldTIP4P : public FixEfield { + + public: + FixEfieldTIP4P(class LAMMPS *, int, char **); + + void init() override; + void post_force(int) override; + + protected: + double alpha; + int typeO, typeH; // atom types for TIP4P molecule + void find_M(double *, double *, double *, double *); +}; +} // namespace LAMMPS_NS + +#endif +#endif diff --git a/src/fix_efield.h b/src/fix_efield.h index 2ebdcbfaed..52c827bb50 100644 --- a/src/fix_efield.h +++ b/src/fix_efield.h @@ -60,8 +60,6 @@ class FixEfield : public Fix { int force_flag; double fsum[4], fsum_all[4]; }; - } // namespace LAMMPS_NS - #endif #endif From 37b7ba7cae5358e71782af82df25bd783a7aca17 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Mar 2023 13:58:20 -0500 Subject: [PATCH 407/445] all functionality of fix efield/tip4p present (untested) --- src/EXTRA-FIX/fix_efield_tip4p.cpp | 412 ++++++++++++++++++++++++----- 1 file changed, 352 insertions(+), 60 deletions(-) diff --git a/src/EXTRA-FIX/fix_efield_tip4p.cpp b/src/EXTRA-FIX/fix_efield_tip4p.cpp index c5ecc313ec..0862c8a310 100644 --- a/src/EXTRA-FIX/fix_efield_tip4p.cpp +++ b/src/EXTRA-FIX/fix_efield_tip4p.cpp @@ -113,13 +113,12 @@ void FixEfieldTIP4P::post_force(int vflag) double **x = atom->x; double fx, fy, fz, xM[3]; - double v[6]; + double v[6], unwrap[3]; int iO, iH1, iH2; // constant efield if (varflag == CONSTANT) { - double unwrap[3]; // charge interactions // force = qE, potential energy = F dot x in unwrapped coords @@ -128,7 +127,8 @@ void FixEfieldTIP4P::post_force(int vflag) for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { - // this is an atom belonging to a TIP4P molecule + // process *all* atoms belonging to a TIP4P molecule which means we compute all + // contributions 3 times but only add a third and only when the atom is local if ((type[i] == typeO) || (type[i] == typeH)) { @@ -155,46 +155,129 @@ void FixEfieldTIP4P::post_force(int vflag) if (atom->type[iO] != typeO) error->one(FLERR, "TIP4P oxygen has incorrect atom type"); find_M(x[iO], x[iH1], x[iH2], xM); - if (region && !region->match(xM[0], xM[1], xM[2])) continue; - fx = q[iO] * ex; - fy = q[iO] * ey; - fz = q[iO] * ez; + // M site contributions - // distribute and apply forces, but only to local atoms - if (iO < nlocal) { - f[iO][0] += fx * (1.0 - alpha); - f[iO][1] += fy * (1.0 - alpha); - f[iO][2] += fz * (1.0 - alpha); - } - if (iH1 < nlocal) { - f[iH1][0] += 0.5 * alpha * fx; - f[iH1][1] += 0.5 * alpha * fy; - f[iH1][2] += 0.5 * alpha * fz; - } - if (iH2 < nlocal) { - f[iH2][0] += 0.5 * alpha * fx; - f[iH2][1] += 0.5 * alpha * fy; - f[iH2][2] += 0.5 * alpha * fz; + if (!region || region->match(xM[0], xM[1], xM[2])) { + + // we match a TIP4P molecule 3 times, so divide force contributions by 3. + + fx = q[iO] * ex / 3.0; + fy = q[iO] * ey / 3.0; + fz = q[iO] * ez / 3.0; + + // distribute and apply forces, but only to local atoms + + if (iO < nlocal) { + f[iO][0] += fx * (1.0 - alpha); + f[iO][1] += fy * (1.0 - alpha); + f[iO][2] += fz * (1.0 - alpha); + } + if (iH1 < nlocal) { + f[iH1][0] += 0.5 * alpha * fx; + f[iH1][1] += 0.5 * alpha * fy; + f[iH1][2] += 0.5 * alpha * fz; + } + if (iH2 < nlocal) { + f[iH2][0] += 0.5 * alpha * fx; + f[iH2][1] += 0.5 * alpha * fy; + f[iH2][2] += 0.5 * alpha * fz; + } + + domain->unmap(xM, image[iO], unwrap); + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; + + // tally virial contribution with Oxygen + if (evflag && (iO < nlocal)) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iO, v); + } } - domain->unmap(xM, image[i], unwrap); - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; - fsum[1] += fx; - fsum[2] += fy; - fsum[3] += fz; + // H1 site contributions - // tally virial contribution with Oxygen - if (evflag && (iO < nlocal)) { - v[0] = fx * unwrap[0]; - v[1] = fy * unwrap[1]; - v[2] = fz * unwrap[2]; - v[3] = fx * unwrap[1]; - v[4] = fx * unwrap[2]; - v[5] = fy * unwrap[2]; - v_tally(iO, v); + if (!region || region->match(x[iH1][0], x[iH1][1], x[iH1][2])) { + + // we match a TIP4P molecule 3 times, so divide force contributions by 3. + + fx = q[iH1] * ex / 3.0; + fy = q[iH1] * ey / 3.0; + fz = q[iH1] * ez / 3.0; + + if (iH1 < nlocal) { + f[iH1][0] += fx; + f[iH1][1] += fy; + f[iH1][2] += fz; + } + + // tally global force + + domain->unmap(x[iH1], image[iH1], unwrap); + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; + + // tally virial contributions + + if (evflag && (iH1 < nlocal)) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iH1, v); + } } + // H2 site contributions + + if (!region || region->match(x[iH2][0], x[iH2][1], x[iH2][2])) { + + // we match 3 atoms per molecule, so divide force contributions by 3. + + fx = q[iH2] * ex / 3.0; + fy = q[iH2] * ey / 3.0; + fz = q[iH2] * ez / 3.0; + + if (iH2 < nlocal) { + f[iH2][0] += fx; + f[iH2][1] += fy; + f[iH2][2] += fz; + } + + // tally global force + + domain->unmap(x[iH2], image[iH2], unwrap); + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; + + // tally virial contributions + + if (evflag && (iH2 < nlocal)) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iH2, v); + } + } + + // non-TIP4P atoms + } else { if (region && !region->match(x[i][0], x[i][1], x[i][2])) continue; @@ -224,7 +307,7 @@ void FixEfieldTIP4P::post_force(int vflag) } } - // dipole interactions + // dipole interactions, no special TIP4P treatment needed // no force, torque = mu cross E, potential energy = -mu dot E if (muflag) { @@ -244,11 +327,11 @@ void FixEfieldTIP4P::post_force(int vflag) } } + } else { + // variable efield, wrap with clear/add // potential energy = evar if defined, else 0.0 - } else { - modify->clearstep_compute(); if (xstyle == EQUAL) { @@ -276,29 +359,238 @@ void FixEfieldTIP4P::post_force(int vflag) if (qflag) { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { - if (region && !region->match(x[i][0], x[i][1], x[i][2])) continue; - if (xstyle == ATOM) { - fx = qe2f * q[i] * efield[i][0]; + + // process *all* atoms belonging to a TIP4P molecule which means we compute all + // contributions 3 times but only add a third and only when the atom is local + + if ((type[i] == typeO) || (type[i] == typeH)) { + + if (type[i] == typeO) { + iO = i; + iH1 = atom->map(tag[i] + 1); + iH2 = atom->map(tag[i] + 2); + } else { + // set indices for first or second hydrogen + iO = atom->map(tag[i] - 1); + if ((iO != -1) && (type[iO] == typeO)) { + iH1 = i; + iH2 = atom->map(tag[i] + 1); + } else { + iO = atom->map(tag[i] - 2); + iH1 = atom->map(tag[i] - 1); + iH2 = i; + } + } + if ((iH1 == -1) || (iH2 == -1)) error->one(FLERR, "TIP4P hydrogen is missing"); + if (iO == -1) error->one(FLERR, "TIP4P oxygen is missing"); + if ((atom->type[iH1] != typeH) || (atom->type[iH2] != typeH)) + error->one(FLERR, "TIP4P hydrogen has incorrect atom type"); + if (atom->type[iO] != typeO) error->one(FLERR, "TIP4P oxygen has incorrect atom type"); + + find_M(x[iO], x[iH1], x[iH2], xM); + + // M site contributions + + if (!region || region->match(xM[0], xM[1], xM[2])) { + + // we match a TIP3P molecule 3 times, so divide force contributions by 3. + + if (xstyle == ATOM) { + fx = qe2f * q[iO] * efield[iO][0] / 3.0; + } else { + fx = q[iO] * ex / 3.0; + } + if (ystyle == ATOM) { + fy = qe2f * q[iO] * efield[iO][1] / 3.0; + } else { + fy = q[iO] * ey / 3.0; + } + if (zstyle == ATOM) { + fz = qe2f * q[iO] * efield[iO][2] / 3.0; + } else { + fz = q[iO] * ez / 3.0; + } + + // distribute and apply forces, but only to local atoms + + if (iO < nlocal) { + f[iO][0] += fx * (1.0 - alpha); + f[iO][1] += fy * (1.0 - alpha); + f[iO][2] += fz * (1.0 - alpha); + } + if (iH1 < nlocal) { + f[iH1][0] += 0.5 * alpha * fx; + f[iH1][1] += 0.5 * alpha * fy; + f[iH1][2] += 0.5 * alpha * fz; + } + if (iH2 < nlocal) { + f[iH2][0] += 0.5 * alpha * fx; + f[iH2][1] += 0.5 * alpha * fy; + f[iH2][2] += 0.5 * alpha * fz; + } + + domain->unmap(xM, image[iO], unwrap); + if (estyle == ATOM) + fsum[0] += efield[0][3]; + else + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; + + // tally virial contribution for point M with Oxygen + + if (evflag && (iO < nlocal)) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iO, v); + } + } + + // H1 site contributions + + if (!region || region->match(x[iH1][0], x[iH1][1], x[iH1][2])) { + + // we match a TIP4P molecule 3 times, so divide force contributions by 3. + + if (xstyle == ATOM) { + fx = qe2f * q[iH1] * efield[iH1][0] / 3.0; + } else { + fx = q[iH1] * ex / 3.0; + } + if (ystyle == ATOM) { + fy = qe2f * q[iH1] * efield[iH1][1] / 3.0; + } else { + fy = q[iH1] * ey / 3.0; + } + if (zstyle == ATOM) { + fz = qe2f * q[iH1] * efield[iH1][2] / 3.0; + } else { + fz = q[iH1] * ez / 3.0; + } + + if (iH1 < nlocal) { + f[iH1][0] += fx; + f[iH1][1] += fy; + f[iH1][2] += fz; + } + + // tally global force + + domain->unmap(x[iH1], image[iH1], unwrap); + if (estyle == ATOM) + fsum[0] += efield[0][3]; + else + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; + + // tally virial contribution + + if (evflag && (iH1 < nlocal)) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iH1, v); + } + } + + // H2 site contributions + + if (!region || region->match(x[iH2][0], x[iH2][1], x[iH2][2])) { + + // we match a TIP4P molecule 3 times, so divide force contributions by 3. + + if (xstyle == ATOM) { + fx = qe2f * q[iH2] * efield[iH2][0] / 3.0; + } else { + fx = q[iH2] * ex / 3.0; + } + if (ystyle == ATOM) { + fy = qe2f * q[iH2] * efield[iH2][1] / 3.0; + } else { + fy = q[iH2] * ey / 3.0; + } + if (zstyle == ATOM) { + fz = qe2f * q[iH2] * efield[iH2][2] / 3.0; + } else { + fz = q[iH2] * ez / 3.0; + } + + if (iH2 < nlocal) { + f[iH2][0] += fx; + f[iH2][1] += fy; + f[iH2][2] += fz; + } + + // tally global force + + domain->unmap(x[iH2], image[iH2], unwrap); + if (estyle == ATOM) + fsum[0] += efield[0][3]; + else + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; + + // tally virial contribution + + if (evflag && (iH2 < nlocal)) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iH2, v); + } + } + } else { - fx = q[i] * ex; + + // non-TIP4P charge interactions + // force = qE + + if (region && !region->match(x[i][0], x[i][1], x[i][2])) continue; + + if (xstyle == ATOM) { + fx = qe2f * q[i] * efield[i][0]; + } else { + fx = q[i] * ex; + } + f[i][0] += fx; + fsum[1] += fx; + if (ystyle == ATOM) { + fy = qe2f * q[i] * efield[i][1]; + } else { + fy = q[i] * ey; + } + f[i][1] += fy; + fsum[2] += fy; + if (zstyle == ATOM) { + fz = qe2f * q[i] * efield[i][2]; + } else { + fz = q[i] * ez; + } + f[i][2] += fz; + fsum[3] += fz; + + if (estyle == ATOM) { + fsum[0] += efield[0][3]; + } else { + domain->unmap(x[i], image[i], unwrap); + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + } } - f[i][0] += fx; - fsum[1] += fx; - if (ystyle == ATOM) { - fy = qe2f * q[i] * efield[i][1]; - } else { - fy = q[i] * ey; - } - f[i][1] += fy; - fsum[2] += fy; - if (zstyle == ATOM) { - fz = qe2f * q[i] * efield[i][2]; - } else { - fz = q[i] * ez; - } - f[i][2] += fz; - fsum[3] += fz; - if (estyle == ATOM) fsum[0] += efield[0][3]; } } } From 6b6f8087d3deaa7bcd3e8019d107d27cd90a885b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Mar 2023 17:45:38 -0500 Subject: [PATCH 408/445] output potential energy with fix efield with equal style variables --- src/fix_efield.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/fix_efield.cpp b/src/fix_efield.cpp index 99482f8459..9d54ccb848 100644 --- a/src/fix_efield.cpp +++ b/src/fix_efield.cpp @@ -273,12 +273,12 @@ void FixEfield::post_force(int vflag) double **x = atom->x; double fx, fy, fz; - double v[6]; + double v[6], unwrap[3]; + ; // constant efield if (varflag == CONSTANT) { - double unwrap[3]; // charge interactions // force = qE, potential energy = F dot x in unwrapped coords @@ -385,7 +385,12 @@ void FixEfield::post_force(int vflag) } f[i][2] += fz; fsum[3] += fz; - if (estyle == ATOM) fsum[0] += efield[0][3]; + if (estyle == ATOM) { + fsum[0] += efield[0][3]; + } else { + domain->unmap(x[i], image[i], unwrap); + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + } } } From cf6f6829ae03e85e16552ca87fd8e108dabdac78 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Mar 2023 17:45:48 -0500 Subject: [PATCH 409/445] cosmetic --- src/fix_efield.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fix_efield.cpp b/src/fix_efield.cpp index 9d54ccb848..f8ff377518 100644 --- a/src/fix_efield.cpp +++ b/src/fix_efield.cpp @@ -42,7 +42,7 @@ FixEfield::FixEfield(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), xstr(nullptr), ystr(nullptr), zstr(nullptr), estr(nullptr), idregion(nullptr), region(nullptr), efield(nullptr) { - if (narg < 6) utils::missing_cmd_args(FLERR, std::string("fix ")+style, error); + if (narg < 6) utils::missing_cmd_args(FLERR, std::string("fix ") + style, error); dynamic_group_allow = 1; vector_flag = 1; @@ -85,13 +85,15 @@ FixEfield::FixEfield(LAMMPS *lmp, int narg, char **arg) : int iarg = 6; while (iarg < narg) { if (strcmp(arg[iarg], "region") == 0) { - if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, std::string("fix ") + style + " region", error); + if (iarg + 2 > narg) + utils::missing_cmd_args(FLERR, std::string("fix ") + style + " region", error); region = domain->get_region_by_id(arg[iarg + 1]); if (!region) error->all(FLERR, "Region {} for fix efield does not exist", arg[iarg + 1]); idregion = utils::strdup(arg[iarg + 1]); iarg += 2; } else if (strcmp(arg[iarg], "energy") == 0) { - if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, std::string("fix ") + style + "energy", error); + if (iarg + 2 > narg) + utils::missing_cmd_args(FLERR, std::string("fix ") + style + "energy", error); if (utils::strmatch(arg[iarg + 1], "^v_")) { estr = utils::strdup(arg[iarg + 1] + 2); } else From da9559d92ce15be59a249b5c3c1cf6d574fafbb6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Mar 2023 17:47:13 -0500 Subject: [PATCH 410/445] rewrite TIP4P molecule handling to process each force contribution only once --- src/EXTRA-FIX/fix_efield_tip4p.cpp | 371 ++++++++++++++++------------- 1 file changed, 199 insertions(+), 172 deletions(-) diff --git a/src/EXTRA-FIX/fix_efield_tip4p.cpp b/src/EXTRA-FIX/fix_efield_tip4p.cpp index 0862c8a310..4bd35882f9 100644 --- a/src/EXTRA-FIX/fix_efield_tip4p.cpp +++ b/src/EXTRA-FIX/fix_efield_tip4p.cpp @@ -127,8 +127,8 @@ void FixEfieldTIP4P::post_force(int vflag) for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { - // process *all* atoms belonging to a TIP4P molecule which means we compute all - // contributions 3 times but only add a third and only when the atom is local + // process *all* atoms belonging to a TIP4P molecule since we need + // to consider molecules where parts of the molecule are ghost atoms if ((type[i] == typeO) || (type[i] == typeH)) { @@ -137,7 +137,9 @@ void FixEfieldTIP4P::post_force(int vflag) iH1 = atom->map(tag[i] + 1); iH2 = atom->map(tag[i] + 2); } else { + // set indices for first or second hydrogen + iO = atom->map(tag[i] - 1); if ((iO != -1) && (type[iO] == typeO)) { iH1 = i; @@ -153,6 +155,8 @@ void FixEfieldTIP4P::post_force(int vflag) if ((atom->type[iH1] != typeH) || (atom->type[iH2] != typeH)) error->one(FLERR, "TIP4P hydrogen has incorrect atom type"); if (atom->type[iO] != typeO) error->one(FLERR, "TIP4P oxygen has incorrect atom type"); + iH1 = domain->closest_image(i, iH1); + iH2 = domain->closest_image(i, iH2); find_M(x[iO], x[iH1], x[iH2], xM); @@ -160,45 +164,59 @@ void FixEfieldTIP4P::post_force(int vflag) if (!region || region->match(xM[0], xM[1], xM[2])) { - // we match a TIP4P molecule 3 times, so divide force contributions by 3. + fx = q[iO] * ex; + fy = q[iO] * ey; + fz = q[iO] * ez; - fx = q[iO] * ex / 3.0; - fy = q[iO] * ey / 3.0; - fz = q[iO] * ez / 3.0; + // distribute and apply forces - // distribute and apply forces, but only to local atoms - - if (iO < nlocal) { + if (i == iO) { f[iO][0] += fx * (1.0 - alpha); f[iO][1] += fy * (1.0 - alpha); f[iO][2] += fz * (1.0 - alpha); - } - if (iH1 < nlocal) { - f[iH1][0] += 0.5 * alpha * fx; - f[iH1][1] += 0.5 * alpha * fy; - f[iH1][2] += 0.5 * alpha * fz; - } - if (iH2 < nlocal) { - f[iH2][0] += 0.5 * alpha * fx; - f[iH2][1] += 0.5 * alpha * fy; - f[iH2][2] += 0.5 * alpha * fz; + if (iH1 < nlocal) { + f[iH1][0] += 0.5 * alpha * fx; + f[iH1][1] += 0.5 * alpha * fy; + f[iH1][2] += 0.5 * alpha * fz; + } + if (iH2 < nlocal) { + f[iH2][0] += 0.5 * alpha * fx; + f[iH2][1] += 0.5 * alpha * fy; + f[iH2][2] += 0.5 * alpha * fz; + } + } else { + if (iO >= nlocal) { + if (i == iH1) { + f[iH1][0] += 0.5 * alpha * fx; + f[iH1][1] += 0.5 * alpha * fy; + f[iH1][2] += 0.5 * alpha * fz; + } + if (i == iH2) { + f[iH2][0] += 0.5 * alpha * fx; + f[iH2][1] += 0.5 * alpha * fy; + f[iH2][2] += 0.5 * alpha * fz; + } + } } - domain->unmap(xM, image[iO], unwrap); - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; - fsum[1] += fx; - fsum[2] += fy; - fsum[3] += fz; + if (i == iO) { + domain->unmap(xM, image[iO], unwrap); + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; - // tally virial contribution with Oxygen - if (evflag && (iO < nlocal)) { - v[0] = fx * unwrap[0]; - v[1] = fy * unwrap[1]; - v[2] = fz * unwrap[2]; - v[3] = fx * unwrap[1]; - v[4] = fx * unwrap[2]; - v[5] = fy * unwrap[2]; - v_tally(iO, v); + // tally virial contribution with Oxygen + + if (evflag) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iO, v); + } } } @@ -206,36 +224,34 @@ void FixEfieldTIP4P::post_force(int vflag) if (!region || region->match(x[iH1][0], x[iH1][1], x[iH1][2])) { - // we match a TIP4P molecule 3 times, so divide force contributions by 3. + fx = q[iH1] * ex; + fy = q[iH1] * ey; + fz = q[iH1] * ez; - fx = q[iH1] * ex / 3.0; - fy = q[iH1] * ey / 3.0; - fz = q[iH1] * ez / 3.0; - - if (iH1 < nlocal) { + if (i == iH1) { f[iH1][0] += fx; f[iH1][1] += fy; f[iH1][2] += fz; - } - // tally global force + // tally global force - domain->unmap(x[iH1], image[iH1], unwrap); - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; - fsum[1] += fx; - fsum[2] += fy; - fsum[3] += fz; + domain->unmap(x[iH1], image[iH1], unwrap); + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; - // tally virial contributions + // tally virial contributions - if (evflag && (iH1 < nlocal)) { - v[0] = fx * unwrap[0]; - v[1] = fy * unwrap[1]; - v[2] = fz * unwrap[2]; - v[3] = fx * unwrap[1]; - v[4] = fx * unwrap[2]; - v[5] = fy * unwrap[2]; - v_tally(iH1, v); + if (evflag) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iH1, v); + } } } @@ -243,36 +259,34 @@ void FixEfieldTIP4P::post_force(int vflag) if (!region || region->match(x[iH2][0], x[iH2][1], x[iH2][2])) { - // we match 3 atoms per molecule, so divide force contributions by 3. + fx = q[iH2] * ex; + fy = q[iH2] * ey; + fz = q[iH2] * ez; - fx = q[iH2] * ex / 3.0; - fy = q[iH2] * ey / 3.0; - fz = q[iH2] * ez / 3.0; - - if (iH2 < nlocal) { + if (i == iH2) { f[iH2][0] += fx; f[iH2][1] += fy; f[iH2][2] += fz; - } - // tally global force + // tally global force - domain->unmap(x[iH2], image[iH2], unwrap); - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; - fsum[1] += fx; - fsum[2] += fy; - fsum[3] += fz; + domain->unmap(x[iH2], image[iH2], unwrap); + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; - // tally virial contributions + // tally virial contributions - if (evflag && (iH2 < nlocal)) { - v[0] = fx * unwrap[0]; - v[1] = fy * unwrap[1]; - v[2] = fz * unwrap[2]; - v[3] = fx * unwrap[1]; - v[4] = fx * unwrap[2]; - v[5] = fy * unwrap[2]; - v_tally(iH2, v); + if (evflag) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iH2, v); + } } } @@ -360,8 +374,8 @@ void FixEfieldTIP4P::post_force(int vflag) for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { - // process *all* atoms belonging to a TIP4P molecule which means we compute all - // contributions 3 times but only add a third and only when the atom is local + // process *all* atoms belonging to a TIP4P molecule since we need + // to consider molecules where parts of the molecule are ghost atoms if ((type[i] == typeO) || (type[i] == typeH)) { @@ -370,7 +384,9 @@ void FixEfieldTIP4P::post_force(int vflag) iH1 = atom->map(tag[i] + 1); iH2 = atom->map(tag[i] + 2); } else { + // set indices for first or second hydrogen + iO = atom->map(tag[i] - 1); if ((iO != -1) && (type[iO] == typeO)) { iH1 = i; @@ -386,6 +402,8 @@ void FixEfieldTIP4P::post_force(int vflag) if ((atom->type[iH1] != typeH) || (atom->type[iH2] != typeH)) error->one(FLERR, "TIP4P hydrogen has incorrect atom type"); if (atom->type[iO] != typeO) error->one(FLERR, "TIP4P oxygen has incorrect atom type"); + iH1 = domain->closest_image(i, iH1); + iH2 = domain->closest_image(i, iH2); find_M(x[iO], x[iH1], x[iH2], xM); @@ -393,61 +411,74 @@ void FixEfieldTIP4P::post_force(int vflag) if (!region || region->match(xM[0], xM[1], xM[2])) { - // we match a TIP3P molecule 3 times, so divide force contributions by 3. - if (xstyle == ATOM) { - fx = qe2f * q[iO] * efield[iO][0] / 3.0; + fx = qe2f * q[iO] * efield[iO][0]; } else { - fx = q[iO] * ex / 3.0; + fx = q[iO] * ex; } if (ystyle == ATOM) { - fy = qe2f * q[iO] * efield[iO][1] / 3.0; + fy = qe2f * q[iO] * efield[iO][1]; } else { - fy = q[iO] * ey / 3.0; + fy = q[iO] * ey; } if (zstyle == ATOM) { - fz = qe2f * q[iO] * efield[iO][2] / 3.0; + fz = qe2f * q[iO] * efield[iO][2]; } else { - fz = q[iO] * ez / 3.0; + fz = q[iO] * ez; } // distribute and apply forces, but only to local atoms - if (iO < nlocal) { + if (i == iO) { f[iO][0] += fx * (1.0 - alpha); f[iO][1] += fy * (1.0 - alpha); f[iO][2] += fz * (1.0 - alpha); - } - if (iH1 < nlocal) { - f[iH1][0] += 0.5 * alpha * fx; - f[iH1][1] += 0.5 * alpha * fy; - f[iH1][2] += 0.5 * alpha * fz; - } - if (iH2 < nlocal) { - f[iH2][0] += 0.5 * alpha * fx; - f[iH2][1] += 0.5 * alpha * fy; - f[iH2][2] += 0.5 * alpha * fz; + if (iH1 < nlocal) { + f[iH1][0] += 0.5 * alpha * fx; + f[iH1][1] += 0.5 * alpha * fy; + f[iH1][2] += 0.5 * alpha * fz; + } + if (iH2 < nlocal) { + f[iH2][0] += 0.5 * alpha * fx; + f[iH2][1] += 0.5 * alpha * fy; + f[iH2][2] += 0.5 * alpha * fz; + } + } else { + if (iO >= nlocal) { + if (i == iH1) { + f[iH1][0] += 0.5 * alpha * fx; + f[iH1][1] += 0.5 * alpha * fy; + f[iH1][2] += 0.5 * alpha * fz; + } + if (i == iH2) { + f[iH2][0] += 0.5 * alpha * fx; + f[iH2][1] += 0.5 * alpha * fy; + f[iH2][2] += 0.5 * alpha * fz; + } + } } - domain->unmap(xM, image[iO], unwrap); - if (estyle == ATOM) - fsum[0] += efield[0][3]; - else - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; - fsum[1] += fx; - fsum[2] += fy; - fsum[3] += fz; + if (i == iO) { + domain->unmap(xM, image[iO], unwrap); + if (estyle == ATOM) + fsum[0] += efield[0][3]; + else + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; - // tally virial contribution for point M with Oxygen + // tally virial contribution for point M with Oxygen - if (evflag && (iO < nlocal)) { - v[0] = fx * unwrap[0]; - v[1] = fy * unwrap[1]; - v[2] = fz * unwrap[2]; - v[3] = fx * unwrap[1]; - v[4] = fx * unwrap[2]; - v[5] = fy * unwrap[2]; - v_tally(iO, v); + if (evflag) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iO, v); + } } } @@ -455,51 +486,49 @@ void FixEfieldTIP4P::post_force(int vflag) if (!region || region->match(x[iH1][0], x[iH1][1], x[iH1][2])) { - // we match a TIP4P molecule 3 times, so divide force contributions by 3. - if (xstyle == ATOM) { - fx = qe2f * q[iH1] * efield[iH1][0] / 3.0; + fx = qe2f * q[iH1] * efield[iH1][0]; } else { - fx = q[iH1] * ex / 3.0; + fx = q[iH1] * ex; } if (ystyle == ATOM) { - fy = qe2f * q[iH1] * efield[iH1][1] / 3.0; + fy = qe2f * q[iH1] * efield[iH1][1]; } else { - fy = q[iH1] * ey / 3.0; + fy = q[iH1] * ey; } if (zstyle == ATOM) { - fz = qe2f * q[iH1] * efield[iH1][2] / 3.0; + fz = qe2f * q[iH1] * efield[iH1][2]; } else { - fz = q[iH1] * ez / 3.0; + fz = q[iH1] * ez; } - if (iH1 < nlocal) { + if (i == iH1) { f[iH1][0] += fx; f[iH1][1] += fy; f[iH1][2] += fz; - } - // tally global force + // tally global force - domain->unmap(x[iH1], image[iH1], unwrap); - if (estyle == ATOM) - fsum[0] += efield[0][3]; - else - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; - fsum[1] += fx; - fsum[2] += fy; - fsum[3] += fz; + domain->unmap(x[iH1], image[iH1], unwrap); + if (estyle == ATOM) + fsum[0] += efield[0][3]; + else + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; - // tally virial contribution + // tally virial contribution - if (evflag && (iH1 < nlocal)) { - v[0] = fx * unwrap[0]; - v[1] = fy * unwrap[1]; - v[2] = fz * unwrap[2]; - v[3] = fx * unwrap[1]; - v[4] = fx * unwrap[2]; - v[5] = fy * unwrap[2]; - v_tally(iH1, v); + if (evflag) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iH1, v); + } } } @@ -507,54 +536,52 @@ void FixEfieldTIP4P::post_force(int vflag) if (!region || region->match(x[iH2][0], x[iH2][1], x[iH2][2])) { - // we match a TIP4P molecule 3 times, so divide force contributions by 3. - if (xstyle == ATOM) { - fx = qe2f * q[iH2] * efield[iH2][0] / 3.0; + fx = qe2f * q[iH2] * efield[iH2][0]; } else { - fx = q[iH2] * ex / 3.0; + fx = q[iH2] * ex; } if (ystyle == ATOM) { - fy = qe2f * q[iH2] * efield[iH2][1] / 3.0; + fy = qe2f * q[iH2] * efield[iH2][1]; } else { - fy = q[iH2] * ey / 3.0; + fy = q[iH2] * ey; } if (zstyle == ATOM) { - fz = qe2f * q[iH2] * efield[iH2][2] / 3.0; + fz = qe2f * q[iH2] * efield[iH2][2]; } else { - fz = q[iH2] * ez / 3.0; + fz = q[iH2] * ez; } - if (iH2 < nlocal) { + if (i == iH2) { f[iH2][0] += fx; f[iH2][1] += fy; f[iH2][2] += fz; - } - // tally global force + // tally global force - domain->unmap(x[iH2], image[iH2], unwrap); - if (estyle == ATOM) - fsum[0] += efield[0][3]; - else - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; - fsum[1] += fx; - fsum[2] += fy; - fsum[3] += fz; + domain->unmap(x[iH2], image[iH2], unwrap); + if (estyle == ATOM) + fsum[0] += efield[0][3]; + else + fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + fsum[1] += fx; + fsum[2] += fy; + fsum[3] += fz; - // tally virial contribution + // tally virial contribution - if (evflag && (iH2 < nlocal)) { - v[0] = fx * unwrap[0]; - v[1] = fy * unwrap[1]; - v[2] = fz * unwrap[2]; - v[3] = fx * unwrap[1]; - v[4] = fx * unwrap[2]; - v[5] = fy * unwrap[2]; - v_tally(iH2, v); + if (evflag) { + v[0] = fx * unwrap[0]; + v[1] = fy * unwrap[1]; + v[2] = fz * unwrap[2]; + v[3] = fx * unwrap[1]; + v[4] = fx * unwrap[2]; + v[5] = fy * unwrap[2]; + v_tally(iH2, v); + } } } - + } else { // non-TIP4P charge interactions From 91aae79fdca235ed87a06e36be94ce939719625a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Mar 2023 18:11:57 -0500 Subject: [PATCH 411/445] add docs for fix efield/tip4p --- doc/src/Commands_fix.rst | 1 + doc/src/fix.rst | 1 + doc/src/fix_efield.rst | 96 +++++++++++++++++++++++++--------------- src/.gitignore | 2 + 4 files changed, 64 insertions(+), 36 deletions(-) diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index 89cf3e880a..13bdc34137 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -70,6 +70,7 @@ OPT. * :doc:`dt/reset (k) ` * :doc:`edpd/source ` * :doc:`efield ` + * :doc:`efield/tip4p ` * :doc:`ehex ` * :doc:`electrode/conp (i) ` * :doc:`electrode/conq (i) ` diff --git a/doc/src/fix.rst b/doc/src/fix.rst index 7d505fec63..9b7ada9369 100644 --- a/doc/src/fix.rst +++ b/doc/src/fix.rst @@ -222,6 +222,7 @@ accelerated styles exist. * :doc:`dt/reset ` - reset the timestep based on velocity, forces * :doc:`edpd/source ` - add heat source to eDPD simulations * :doc:`efield ` - impose electric field on system +* :doc:`efield/tip4p ` - impose electric field on system with TIP4P molecules * :doc:`ehex ` - enhanced heat exchange algorithm * :doc:`electrode/conp ` - impose electric potential * :doc:`electrode/conq ` - impose total electric charge diff --git a/doc/src/fix_efield.rst b/doc/src/fix_efield.rst index a44f8ddb9d..eebfaba8c6 100644 --- a/doc/src/fix_efield.rst +++ b/doc/src/fix_efield.rst @@ -1,17 +1,21 @@ .. index:: fix efield +.. index:: fix efield/tip4p fix efield command ================== +fix efield/tip4p command +======================== + Syntax """""" .. parsed-literal:: - fix ID group-ID efield ex ey ez keyword value ... + fix ID group-ID style ex ey ez keyword value ... * ID, group-ID are documented in :doc:`fix ` command -* efield = style name of this fix command +* style = *efield* or *efield/tip4p* * ex,ey,ez = E-field component values (electric field units) * any of ex,ey,ez can be a variable (see below) * zero or more keyword/value pairs may be appended to args @@ -31,27 +35,36 @@ Examples fix kick external-field efield 1.0 0.0 0.0 fix kick external-field efield 0.0 0.0 v_oscillate + fix kick external-field efield/tip4p 1.0 0.0 0.0 Description """"""""""" -Add a force F = qE to each charged atom in the group due to an +Add a force :math:`\vec{F} = q\vec{E}` to each charged atom in the group due to an external electric field being applied to the system. If the system contains point-dipoles, also add a torque on the dipoles due to the external electric field. -For charges, any of the 3 quantities defining the E-field components -can be specified as an equal-style or atom-style -:doc:`variable `, namely *ex*, *ey*, *ez*\ . If the value is a -variable, it should be specified as v_name, where name is the variable -name. In this case, the variable will be evaluated each timestep, and -its value used to determine the E-field component. +.. versionadded:: TBD + +When the *efield/tip4p* style is used, the E-field will be applied to +the position of the virtual charge site M of a TIP4P molecule instead of +the oxygen position as it is defined by a corresponding :doc:`TIP4P pair +style `. The forces on the M site due to the +external field are projected on the oxygen and hydrogen atoms of the +TIP4P molecules. + +For charges, any of the 3 quantities defining the E-field components can +be specified as an equal-style or atom-style :doc:`variable `, +namely *ex*, *ey*, *ez*\ . If the value is a variable, it should be +specified as v_name, where name is the variable name. In this case, the +variable will be evaluated each timestep, and its value used to +determine the E-field component. For point-dipoles, equal-style variables can be used, but atom-style variables are not currently supported, since they imply a spatial gradient in the electric field which means additional terms with -gradients of the field are required for the force and torque on -dipoles. +gradients of the field are required for the force and torque on dipoles. Equal-style variables can specify formulas with various mathematical functions, and include :doc:`thermo_style ` command @@ -81,10 +94,18 @@ self-consistent minimization problem (see below). The *energy* keyword is not allowed if the added field is a constant vector (ex,ey,ez), with all components defined as numeric constants and not as variables. This is because LAMMPS can compute the energy -for each charged particle directly as E = -x dot qE = -q (x\*ex + y\*ey -+ z\*ez), so that -Grad(E) = F. Similarly for point-dipole particles -the energy can be computed as E = -mu dot E = -(mux\*ex + muy\*ey + -muz\*ez). +for each charged particle directly as + +.. math:: + + U_{efield} = -\vec{x} \cdot q\vec{E} = -q (x\cdot E_x + y\cdot E_y + z\cdot Ez), + +so that :math:`-\nabla U_{efield} = \vec{F}`. Similarly for point-dipole particles +the energy can be computed as + +.. math:: + + U_{efield} = -\vec{\mu} \cdot \vec{E} = -\mu_x\cdot E_x + \mu_y\cdot E_y + \mu_z\cdot E_z The *energy* keyword is optional if the added force is defined with one or more variables, and if you are performing dynamics via the @@ -120,29 +141,28 @@ Restart, fix_modify, output, run start/stop, minimize info No information about this fix is written to :doc:`binary restart files `. -The :doc:`fix_modify ` *energy* option is supported by -this fix to add the potential energy inferred by the added force due -to the electric field to the global potential energy of the system as -part of :doc:`thermodynamic output `. The default -setting for this fix is :doc:`fix_modify energy no `. -Note that this energy is a fictitious quantity but is needed so that -the :doc:`minimize ` command can include the forces added by -this fix in a consistent manner. I.e. there is a decrease in -potential energy when atoms move in the direction of the added force -due to the electric field. +The :doc:`fix_modify ` *energy* option is supported by this +fix to add the potential energy inferred by the added force due to the +electric field to the global potential energy of the system as part of +:doc:`thermodynamic output `. The default setting for +this fix is :doc:`fix_modify energy no `. Note that this +energy is a fictitious quantity but is needed so that the :doc:`minimize +` command can include the forces added by this fix in a +consistent manner. I.e. there is a decrease in potential energy when +atoms move in the direction of the added force due to the electric +field. -The :doc:`fix_modify ` *virial* option is supported by -this fix to add the contribution due to the added forces on atoms to -both the global pressure and per-atom stress of the system via the -:doc:`compute pressure ` and :doc:`compute -stress/atom ` commands. The former can be -accessed by :doc:`thermodynamic output `. The default -setting for this fix is :doc:`fix_modify virial no `. +The :doc:`fix_modify ` *virial* option is supported by this +fix to add the contribution due to the added forces on atoms to both the +global pressure and per-atom stress of the system via the :doc:`compute +pressure ` and :doc:`compute stress/atom +` commands. The former can be accessed by +:doc:`thermodynamic output `. The default setting for +this fix is :doc:`fix_modify virial no `. The :doc:`fix_modify ` *respa* option is supported by this -fix. This allows to set at which level of the :doc:`r-RESPA -` integrator the fix adding its forces. Default is the -outermost level. +fix. This allows to set at which level of the :doc:`r-RESPA ` +integrator the fix adding its forces. Default is the outermost level. This fix computes a global scalar and a global 3-vector of forces, which can be accessed by various :doc:`output commands @@ -169,7 +189,11 @@ the iteration count during the minimization. Restrictions """""""""""" -None +Fix style *efield/tip4p* is part of the EXTRA-FIX package. It is only +enabled if LAMMPS was built with that package. See the :doc:`Build +package ` page for more info. + +Fix style *efield/tip4p* can only be used with tip4p pair styles. Related commands """""""""""""""" diff --git a/src/.gitignore b/src/.gitignore index 0e3a69bdc7..cc57048294 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -756,6 +756,8 @@ /fix_damping_cundall.h /fix_dpd_energy.cpp /fix_dpd_energy.h +/fix_efield_tip4p.cpp +/fix_efield_tip4p.h /fix_electron_stopping.cpp /fix_electron_stopping.h /fix_electron_stopping_fit.cpp From 251fac2c6046a01e6b271c3686cb1bd293688003 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Mar 2023 18:43:46 -0500 Subject: [PATCH 412/445] add unit tests for fix efield/tip4p --- .../fix-timestep-efield_tip4p_const.yaml | 85 ++++++++++++++++++ .../fix-timestep-efield_tip4p_variable.yaml | 90 +++++++++++++++++++ 2 files changed, 175 insertions(+) create mode 100644 unittest/force-styles/tests/fix-timestep-efield_tip4p_const.yaml create mode 100644 unittest/force-styles/tests/fix-timestep-efield_tip4p_variable.yaml diff --git a/unittest/force-styles/tests/fix-timestep-efield_tip4p_const.yaml b/unittest/force-styles/tests/fix-timestep-efield_tip4p_const.yaml new file mode 100644 index 0000000000..06d9ac6788 --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-efield_tip4p_const.yaml @@ -0,0 +1,85 @@ +--- +lammps_version: 8 Feb 2023 +date_generated: Sat Mar 11 18:36:57 2023 +epsilon: 2e-13 +skip_tests: +prerequisites: ! | + atom full + fix efield/tip4p + pair tip4p/cut +pre_commands: ! | + variable newton_pair delete + variable newton_pair index on +post_commands: ! | + pair_style tip4p/cut 5 2 5 1 0.15 8 + pair_coeff * * + set mol 1*3 type 1 + pair_modify compute off + fix move all nve + fix test all efield/tip4p 0.0 -0.1 0.1 +input_file: in.fourmol +natoms: 29 +global_scalar: 4.491995770754199 +global_vector: ! |- + 3 0 3.3306690738754696e-16 -3.3306690738754696e-16 +run_pos: ! |2 + 1 -2.7552415093234162e-01 2.4719487659017276e+00 -1.7659260155592149e-01 + 2 3.0667295195551686e-01 2.9595207006091298e+00 -8.4948873046248308e-01 + 3 -6.9501841828317501e-01 1.2527375852468967e+00 -6.1999248956326514e-01 + 4 -1.5797583064222933e+00 1.4872506539147059e+00 -1.2557393847172438e+00 + 5 -9.0059081341694203e-01 9.3371332191055079e-01 4.0123828894262992e-01 + 6 2.9466004201322965e-01 2.3098154203185278e-01 -1.2847818233212565e+00 + 7 3.3883194064643740e-01 -9.4939443955616154e-03 -2.4648068462973325e+00 + 8 1.1652661823392052e+00 -4.8788892293481145e-01 -6.7051084726427845e-01 + 9 1.3792181599117415e+00 -2.5785144806547511e-01 2.7127116166812570e-01 + 10 2.0205755944752375e+00 -1.4248083043774298e+00 -9.7168038781705335e-01 + 11 1.7908052895357973e+00 -1.9906451925361470e+00 -1.8892937481668459e+00 + 12 3.0048165232344948e+00 -4.9103749217400644e-01 -1.6223692885574461e+00 + 13 4.0522477613596308e+00 -8.9351481123719190e-01 -1.6399777605636197e+00 + 14 2.6043344097441490e+00 -4.1669249548232629e-01 -2.6631499467387134e+00 + 15 2.9678538772616037e+00 5.5587250140887356e-01 -1.2363630117859896e+00 + 16 2.6503290482597039e+00 -2.3948066095776737e+00 3.7940961923343369e-02 + 17 2.2332493442069845e+00 -2.1021976986931690e+00 1.1486155813700776e+00 + 18 2.1368656301495856e+00 3.0159850430539912e+00 -3.5184857372030947e+00 + 19 1.5342191259863922e+00 2.6247080014171758e+00 -4.2375259746262710e+00 + 20 2.7733620959877663e+00 3.6930851299036145e+00 -3.9339459598190301e+00 + 21 4.9045879801671548e+00 -4.0745123882892225e+00 -3.6229125886346081e+00 + 22 4.3617321654820183e+00 -4.2118993857238047e+00 -4.4557088010084982e+00 + 23 5.7381475002461277e+00 -3.5857943422556979e+00 -3.8747045101649773e+00 + 24 2.0686006913404285e+00 3.1531330464503946e+00 3.1540340249574279e+00 + 25 1.3094870938232261e+00 3.2656011662469178e+00 2.5154941909251844e+00 + 26 2.5772659745607247e+00 4.0054947408934565e+00 3.2209131657742485e+00 + 27 -1.9615465740567124e+00 -4.3544512503622474e+00 2.1090363824362317e+00 + 28 -2.7415808583638364e+00 -4.0226893662371292e+00 1.5870458306784345e+00 + 29 -1.3167312777782281e+00 -3.6011902209042037e+00 2.2737597954628499e+00 +run_vel: ! |2 + 1 3.5866086122019378e-03 -1.2154347473708673e-03 -4.2392200362722891e-03 + 2 2.0082524022385501e-03 3.3511787841678979e-03 3.7688429839581980e-03 + 3 6.2192542069958688e-04 6.9301276762936742e-03 2.5708729584915588e-03 + 4 -1.6431765497648366e-03 -2.9960364454768916e-03 -2.8741662319631094e-03 + 5 -4.3853806891633691e-03 -2.6901128825407325e-03 -1.1121197568886760e-03 + 6 8.7148031038297540e-04 2.4954313330053800e-03 -1.2309066226600864e-03 + 7 -1.2568415210119106e-03 4.0807509738615430e-04 -6.9712338524110520e-04 + 8 6.8689620421805110e-04 -3.2780884533380726e-03 5.8272396977482131e-03 + 9 2.3640248488616234e-04 -1.5224658663571485e-03 1.4175297300497880e-03 + 10 1.6082301926220160e-03 2.9963750033118689e-03 -4.0623208158007441e-03 + 11 -1.7960053899953208e-03 -1.9848960612000211e-03 -2.2845602155362049e-03 + 12 7.1704667350825442e-04 -1.1633952760482067e-03 -2.2137502152034124e-03 + 13 3.4262167231009551e-03 4.2909145176285319e-03 -7.4448972505535764e-04 + 14 1.1671343597943564e-03 -4.6984783616368505e-03 -3.7471832948834287e-03 + 15 -3.4509552609576417e-03 -4.2688014665352289e-03 4.1647084114789104e-03 + 16 -1.2920232746597238e-03 1.3898109477904978e-03 3.4080654373162835e-03 + 17 1.5549230284425913e-03 -2.4052541544723738e-04 -1.3250375236016142e-03 + 18 -8.8068025374161475e-04 -7.0649672396011162e-04 -1.9975231159692470e-03 + 19 -2.1408231218136301e-05 -3.2882182579271491e-03 5.3923401875054571e-03 + 20 4.3713031453335733e-03 4.5512662640716187e-03 2.3532301247409359e-03 + 21 -9.2462567997913224e-04 4.1213962901802100e-04 -1.0839649018049458e-03 + 22 -3.7082492847362717e-03 -3.5677336805362207e-03 5.5992552065310119e-03 + 23 5.1261812506730889e-04 -4.8292196668287962e-03 4.4061275828068932e-03 + 24 -8.5477751371944852e-06 7.2834656439669328e-04 -8.2723276308350297e-04 + 25 4.9711072680197884e-03 -5.2985686094745897e-03 3.3843456016457627e-03 + 26 -1.4738757253221410e-03 -3.2290060494108487e-03 4.0272837484112388e-03 + 27 7.3001515368261834e-05 7.6655436532142407e-04 -5.3634821214295335e-04 + 28 -7.6962825083727625e-04 -1.0470804470619696e-03 1.9904866134623045e-03 + 29 -3.3162166593954292e-03 -1.5880017630017177e-03 2.8796190980974416e-03 +... diff --git a/unittest/force-styles/tests/fix-timestep-efield_tip4p_variable.yaml b/unittest/force-styles/tests/fix-timestep-efield_tip4p_variable.yaml new file mode 100644 index 0000000000..9d3eb78b8a --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-efield_tip4p_variable.yaml @@ -0,0 +1,90 @@ +--- +lammps_version: 8 Feb 2023 +date_generated: Sat Mar 11 18:36:57 2023 +epsilon: 2e-13 +skip_tests: +prerequisites: ! | + atom full + fix efield/tip4p + pair tip4p/cut +pre_commands: ! | + variable newton_pair delete + variable newton_pair index on +post_commands: ! | + pair_style tip4p/cut 5 2 5 1 0.15 8.0 + pair_coeff * * + set mol 1*3 type 1 + pair_modify compute off + fix init all store/state 0 x y z + variable xforce delete + variable xforce atom f_init[1] + variable zforce delete + variable zforce equal 0.1*step/10.0 + fix move all nve + fix test all efield/tip4p v_xforce 0.0 v_zforce +input_file: in.fourmol +natoms: 29 +global_scalar: -108.06823025980506 +global_vector: ! |- + 3 9.596230365887404 0 -4.440892098500626e-16 +run_pos: ! |2 + 1 -2.7531286450623932e-01 2.4718738394938558e+00 -1.7653750622874620e-01 + 2 3.0682277741052061e-01 2.9595699761707506e+00 -8.4952487409977362e-01 + 3 -6.9499689283442667e-01 1.2527341715135745e+00 -6.1999076705548650e-01 + 4 -1.5799847405798819e+00 1.4872652200436742e+00 -1.2557496756887883e+00 + 5 -9.0071967709813461e-01 9.3372768633609737e-01 4.0122756859740766e-01 + 6 2.9489677035093576e-01 2.3106805370014455e-01 -1.2848415584173214e+00 + 7 3.3855383234893327e-01 -9.5765527451944828e-03 -2.4647480539199424e+00 + 8 1.1643962409868904e+00 -4.8797342487030382e-01 -6.7045108599319103e-01 + 9 1.3799023150910010e+00 -2.5780046066835277e-01 2.7123202628826903e-01 + 10 2.0207975889886196e+00 -1.4247994958278709e+00 -9.7168706713719422e-01 + 11 1.7910648474147319e+00 -1.9906312942531232e+00 -1.8893042032132690e+00 + 12 3.0035425420205333e+00 -4.9107995377108410e-01 -1.6223383760887220e+00 + 13 4.0528201523622283e+00 -8.9349969755442493e-01 -1.6399873319065361e+00 + 14 2.6047057144491697e+00 -4.1667644840131191e-01 -2.6631622713789995e+00 + 15 2.9682779280011724e+00 5.5588692229168801e-01 -1.2363744303219071e+00 + 16 2.6524868604870657e+00 -2.3947127635091343e+00 3.7898084963605735e-02 + 17 2.2314319778419343e+00 -2.1022876263990393e+00 1.1486586486933228e+00 + 18 2.1339901615202725e+00 3.0158791355914092e+00 -3.5183828730903643e+00 + 19 1.5352491765678440e+00 2.6247671297589257e+00 -4.2375921810526602e+00 + 20 2.7752225351538069e+00 3.6931319090244483e+00 -3.9339826175053725e+00 + 21 4.9009803165421442e+00 -4.0745404736656203e+00 -3.6228510538925023e+00 + 22 4.3679206782268585e+00 -4.2117777340324549e+00 -4.4559421729556803e+00 + 23 5.7469587988417672e+00 -3.5858038792020333e+00 -3.8747167803563598e+00 + 24 2.0670666352241178e+00 3.1530720129788077e+00 3.1541041395003924e+00 + 25 1.3109853135785989e+00 3.2657703855053795e+00 2.5153388842970363e+00 + 26 2.5813689868123637e+00 4.0055691627387287e+00 3.2207885803334761e+00 + 27 -1.9601054593669249e+00 -4.3545249904253041e+00 2.1090702834664450e+00 + 28 -2.7460065388962032e+00 -4.0225877485635015e+00 1.5870129241176147e+00 + 29 -1.3183210257363591e+00 -3.6009974737008963e+00 2.2736573716188233e+00 +run_vel: ! |2 + 1 3.7977419185848097e-03 -1.2897669714584856e-03 -4.1950151251349604e-03 + 2 2.1575172581734408e-03 3.3999203430656075e-03 3.7400839475233913e-03 + 3 6.4262848510624609e-04 6.9265031484497313e-03 2.5714895877023557e-03 + 4 -1.8679239811759064e-03 -2.9813578087670117e-03 -2.8820882510653990e-03 + 5 -4.5136571372885112e-03 -2.6758289003017102e-03 -1.1209155388337711e-03 + 6 1.1037671134296492e-03 2.5866105050619246e-03 -1.2789549161066559e-03 + 7 -1.5342861422661686e-03 3.2481824192138846e-04 -6.5106555914167202e-04 + 8 -1.7354144798367277e-04 -3.3718731447888424e-03 5.8810120566168342e-03 + 9 9.1842435073134841e-04 -1.4702773441316094e-03 1.3826250682568268e-03 + 10 1.8250546263153188e-03 3.0026348558799894e-03 -4.0657750868727510e-03 + 11 -1.5361372713327986e-03 -1.9715983670545788e-03 -2.2928062204248456e-03 + 12 -5.2715705670034873e-04 -1.2049239009499940e-03 -2.1898118814179450e-03 + 13 3.9856626950166771e-03 4.3066930552004591e-03 -7.5097419634071252e-04 + 14 1.5331088183544960e-03 -4.6807759413229257e-03 -3.7592753709259140e-03 + 15 -3.0333470556333213e-03 -4.2544006359050701e-03 4.1544659083419620e-03 + 16 8.5032527220227317e-04 1.4960209341250981e-03 3.3943991963756425e-03 + 17 -2.5150987291715812e-04 -3.3871968539122063e-04 -1.3110122226154578e-03 + 18 -3.7194157533833472e-03 -7.8097728820252952e-04 -1.9105012016605539e-03 + 19 9.9357069481510198e-04 -3.2384951918997540e-03 5.3187556083604745e-03 + 20 6.2100808371219670e-03 4.5760237622866403e-03 2.3397927895772242e-03 + 21 -4.4361083278321254e-03 4.3281730793372350e-04 -1.0265740062531993e-03 + 22 2.3759782136059185e-03 -3.4766457991458125e-03 5.2602144818325288e-03 + 23 9.0442546211972809e-03 -5.0028513128573702e-03 4.5160680978488929e-03 + 24 -1.5158245979151304e-03 6.8210911564513992e-04 -7.5228991658315980e-04 + 25 6.4198421777612721e-03 -5.1099391053400440e-03 3.2035258023780651e-03 + 26 2.5717204131090240e-03 -3.2330590784595391e-03 3.9089372482089858e-03 + 27 1.4748018001575585e-03 6.9455594382931529e-04 -5.3514527521761964e-04 + 28 -5.0752470104177567e-03 -9.9571139633829468e-04 2.0584364913419587e-03 + 29 -4.8690861937706323e-03 -1.3519584410798830e-03 2.8068671849969034e-03 +... From a8c1359c54ed394e8e52a347b2a94a92692c910f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Mar 2023 18:56:29 -0500 Subject: [PATCH 413/445] make energy handling consistent for variable field --- src/EXTRA-FIX/fix_efield_tip4p.cpp | 33 +++++-------------- src/EXTRA-FIX/fix_efield_tip4p.h | 2 +- src/fix_efield.cpp | 7 +--- .../fix-timestep-efield_tip4p_variable.yaml | 4 +-- 4 files changed, 12 insertions(+), 34 deletions(-) diff --git a/src/EXTRA-FIX/fix_efield_tip4p.cpp b/src/EXTRA-FIX/fix_efield_tip4p.cpp index 4bd35882f9..a204fe6f7d 100644 --- a/src/EXTRA-FIX/fix_efield_tip4p.cpp +++ b/src/EXTRA-FIX/fix_efield_tip4p.cpp @@ -152,9 +152,9 @@ void FixEfieldTIP4P::post_force(int vflag) } if ((iH1 == -1) || (iH2 == -1)) error->one(FLERR, "TIP4P hydrogen is missing"); if (iO == -1) error->one(FLERR, "TIP4P oxygen is missing"); - if ((atom->type[iH1] != typeH) || (atom->type[iH2] != typeH)) + if ((type[iH1] != typeH) || (type[iH2] != typeH)) error->one(FLERR, "TIP4P hydrogen has incorrect atom type"); - if (atom->type[iO] != typeO) error->one(FLERR, "TIP4P oxygen has incorrect atom type"); + if (type[iO] != typeO) error->one(FLERR, "TIP4P oxygen has incorrect atom type"); iH1 = domain->closest_image(i, iH1); iH2 = domain->closest_image(i, iH2); @@ -399,9 +399,9 @@ void FixEfieldTIP4P::post_force(int vflag) } if ((iH1 == -1) || (iH2 == -1)) error->one(FLERR, "TIP4P hydrogen is missing"); if (iO == -1) error->one(FLERR, "TIP4P oxygen is missing"); - if ((atom->type[iH1] != typeH) || (atom->type[iH2] != typeH)) + if ((type[iH1] != typeH) || (type[iH2] != typeH)) error->one(FLERR, "TIP4P hydrogen has incorrect atom type"); - if (atom->type[iO] != typeO) error->one(FLERR, "TIP4P oxygen has incorrect atom type"); + if (type[iO] != typeO) error->one(FLERR, "TIP4P oxygen has incorrect atom type"); iH1 = domain->closest_image(i, iH1); iH2 = domain->closest_image(i, iH2); @@ -459,11 +459,7 @@ void FixEfieldTIP4P::post_force(int vflag) } if (i == iO) { - domain->unmap(xM, image[iO], unwrap); - if (estyle == ATOM) - fsum[0] += efield[0][3]; - else - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + if (estyle == ATOM) fsum[0] += efield[0][3]; fsum[1] += fx; fsum[2] += fy; fsum[3] += fz; @@ -509,11 +505,7 @@ void FixEfieldTIP4P::post_force(int vflag) // tally global force - domain->unmap(x[iH1], image[iH1], unwrap); - if (estyle == ATOM) - fsum[0] += efield[0][3]; - else - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + if (estyle == ATOM) fsum[0] += efield[0][3]; fsum[1] += fx; fsum[2] += fy; fsum[3] += fz; @@ -559,11 +551,7 @@ void FixEfieldTIP4P::post_force(int vflag) // tally global force - domain->unmap(x[iH2], image[iH2], unwrap); - if (estyle == ATOM) - fsum[0] += efield[0][3]; - else - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; + if (estyle == ATOM) fsum[0] += efield[0][3]; fsum[1] += fx; fsum[2] += fy; fsum[3] += fz; @@ -611,12 +599,7 @@ void FixEfieldTIP4P::post_force(int vflag) f[i][2] += fz; fsum[3] += fz; - if (estyle == ATOM) { - fsum[0] += efield[0][3]; - } else { - domain->unmap(x[i], image[i], unwrap); - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; - } + if (estyle == ATOM) fsum[0] += efield[0][3]; } } } diff --git a/src/EXTRA-FIX/fix_efield_tip4p.h b/src/EXTRA-FIX/fix_efield_tip4p.h index 7970e67b3b..6c3cfa58ab 100644 --- a/src/EXTRA-FIX/fix_efield_tip4p.h +++ b/src/EXTRA-FIX/fix_efield_tip4p.h @@ -34,7 +34,7 @@ class FixEfieldTIP4P : public FixEfield { protected: double alpha; - int typeO, typeH; // atom types for TIP4P molecule + int typeO, typeH; // atom types for TIP4P molecule void find_M(double *, double *, double *, double *); }; } // namespace LAMMPS_NS diff --git a/src/fix_efield.cpp b/src/fix_efield.cpp index f8ff377518..3046f21ef3 100644 --- a/src/fix_efield.cpp +++ b/src/fix_efield.cpp @@ -387,12 +387,7 @@ void FixEfield::post_force(int vflag) } f[i][2] += fz; fsum[3] += fz; - if (estyle == ATOM) { - fsum[0] += efield[0][3]; - } else { - domain->unmap(x[i], image[i], unwrap); - fsum[0] -= fx * unwrap[0] + fy * unwrap[1] + fz * unwrap[2]; - } + if (estyle == ATOM) fsum[0] += efield[0][3]; } } diff --git a/unittest/force-styles/tests/fix-timestep-efield_tip4p_variable.yaml b/unittest/force-styles/tests/fix-timestep-efield_tip4p_variable.yaml index 9d3eb78b8a..e364de7d07 100644 --- a/unittest/force-styles/tests/fix-timestep-efield_tip4p_variable.yaml +++ b/unittest/force-styles/tests/fix-timestep-efield_tip4p_variable.yaml @@ -1,6 +1,6 @@ --- lammps_version: 8 Feb 2023 -date_generated: Sat Mar 11 18:36:57 2023 +date_generated: Sat Mar 11 18:52:03 2023 epsilon: 2e-13 skip_tests: prerequisites: ! | @@ -24,7 +24,7 @@ post_commands: ! | fix test all efield/tip4p v_xforce 0.0 v_zforce input_file: in.fourmol natoms: 29 -global_scalar: -108.06823025980506 +global_scalar: 0 global_vector: ! |- 3 9.596230365887404 0 -4.440892098500626e-16 run_pos: ! |2 From 21293f1c08a3217e8ce29a95e5d4db7de0562152 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 13 Mar 2023 12:10:14 -0400 Subject: [PATCH 414/445] update links and hashes for new plumed2 releases --- cmake/Modules/Packages/PLUMED.cmake | 4 ++-- lib/plumed/Install.py | 8 +++++--- tools/singularity/almalinux9.def | 2 +- tools/singularity/centos7.def | 2 +- tools/singularity/centos8.def | 2 +- tools/singularity/fedora35_mingw.def | 2 +- tools/singularity/fedora36_mingw.def | 2 +- tools/singularity/rocky8.def | 2 +- tools/singularity/ubuntu18.04.def | 2 +- tools/singularity/ubuntu18.04_amd_rocm.def | 2 +- tools/singularity/ubuntu18.04_gpu.def | 2 +- tools/singularity/ubuntu18.04_intel_opencl.def | 2 +- tools/singularity/ubuntu18.04_nvidia.def | 2 +- tools/singularity/ubuntu20.04.def | 2 +- tools/singularity/ubuntu20.04_amd_rocm.def | 2 +- tools/singularity/ubuntu20.04_gpu.def | 2 +- tools/singularity/ubuntu20.04_intel_opencl.def | 2 +- tools/singularity/ubuntu20.04_nvidia.def | 2 +- tools/singularity/ubuntu20.04_oneapi.def | 2 +- tools/singularity/ubuntu22.04.def | 2 +- 20 files changed, 25 insertions(+), 23 deletions(-) diff --git a/cmake/Modules/Packages/PLUMED.cmake b/cmake/Modules/Packages/PLUMED.cmake index f231d148bd..9a4a9556ee 100644 --- a/cmake/Modules/Packages/PLUMED.cmake +++ b/cmake/Modules/Packages/PLUMED.cmake @@ -54,8 +54,8 @@ if(DOWNLOAD_PLUMED) set(PLUMED_BUILD_BYPRODUCTS "/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_PREFIX}") endif() - set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.1/plumed-src-2.8.1.tgz" CACHE STRING "URL for PLUMED tarball") - set(PLUMED_MD5 "6bfe72ebdae63dc38a9ca27d9b0e08f8" CACHE STRING "MD5 checksum of PLUMED tarball") + set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.2/plumed-src-2.8.2.tgz" CACHE STRING "URL for PLUMED tarball") + set(PLUMED_MD5 "599092b6a0aa6fff992612537ad98994" CACHE STRING "MD5 checksum of PLUMED tarball") mark_as_advanced(PLUMED_URL) mark_as_advanced(PLUMED_MD5) diff --git a/lib/plumed/Install.py b/lib/plumed/Install.py index bb6f27fddb..21e8ac51ff 100644 --- a/lib/plumed/Install.py +++ b/lib/plumed/Install.py @@ -17,17 +17,17 @@ parser = ArgumentParser(prog='Install.py', # settings -version = "2.8.1" +version = "2.8.2" mode = "static" # help message HELP = """ Syntax from src dir: make lib-plumed args="-b" - or: make lib-plumed args="-b -v 2.4.3" + or: make lib-plumed args="-b -v 2.8.2" or: make lib-plumed args="-p /usr/local/plumed2 -m shared" -Syntax from lib dir: python Install.py -b -v 2.4.3 +Syntax from lib dir: python Install.py -b -v 2.8.2 or: python Install.py -b or: python Install.py -p /usr/local/plumed2 -m shared @@ -59,8 +59,10 @@ checksums = { \ '2.7.3' : 'f00cc82edfefe6bb3df934911dbe32fb', \ '2.7.4' : 'f858e0b6aed173748fc85b6bc8a9dcb3', \ '2.7.5' : '2aca1986d6c1ca3ba7e9eb51b1102792', \ + '2.7.6' : 'fb8c0ec10f97a9353eb123a5c4c35aa6', \ '2.8.0' : '489b23daba70da78cf0506cbc31689c6', \ '2.8.1' : '6bfe72ebdae63dc38a9ca27d9b0e08f8', \ + '2.8.2' : '599092b6a0aa6fff992612537ad98994', \ } # parse and process arguments diff --git a/tools/singularity/almalinux9.def b/tools/singularity/almalinux9.def index e16ebbbdb5..eacaf3b565 100644 --- a/tools/singularity/almalinux9.def +++ b/tools/singularity/almalinux9.def @@ -44,7 +44,7 @@ From: library/almalinux:9 # manually install Plumed mkdir plumed cd plumed - version=2.8.1 + version=2.8.2 curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${version}/plumed-src-${version}.tgz tar -xzf plumed.tar.gz cd plumed-${version} diff --git a/tools/singularity/centos7.def b/tools/singularity/centos7.def index c0fe278e94..fcdb2ff204 100644 --- a/tools/singularity/centos7.def +++ b/tools/singularity/centos7.def @@ -37,7 +37,7 @@ From: library/centos:7 # manually install Plumed mkdir plumed cd plumed - version=2.8.1 + version=2.8.2 curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${version}/plumed-src-${version}.tgz tar -xzf plumed.tar.gz cd plumed-${version} diff --git a/tools/singularity/centos8.def b/tools/singularity/centos8.def index 7cb0c51a9e..97f818f9eb 100644 --- a/tools/singularity/centos8.def +++ b/tools/singularity/centos8.def @@ -42,7 +42,7 @@ From: centos:8 # manually install Plumed mkdir plumed cd plumed - version=2.8.1 + version=2.8.2 curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${version}/plumed-src-${version}.tgz tar -xzf plumed.tar.gz cd plumed-${version} diff --git a/tools/singularity/fedora35_mingw.def b/tools/singularity/fedora35_mingw.def index 2661c77db4..693512bb97 100644 --- a/tools/singularity/fedora35_mingw.def +++ b/tools/singularity/fedora35_mingw.def @@ -49,7 +49,7 @@ From: fedora:35 # manually install Plumed mkdir plumed cd plumed - version=2.8.1 + version=2.8.2 curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${version}/plumed-src-${version}.tgz tar -xzf plumed.tar.gz cd plumed-${version} diff --git a/tools/singularity/fedora36_mingw.def b/tools/singularity/fedora36_mingw.def index 873b646e84..09c3a71d94 100644 --- a/tools/singularity/fedora36_mingw.def +++ b/tools/singularity/fedora36_mingw.def @@ -49,7 +49,7 @@ From: fedora:36 # manually install Plumed mkdir plumed cd plumed - version=2.8.1 + version=2.8.2 curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${version}/plumed-src-${version}.tgz tar -xzf plumed.tar.gz cd plumed-${version} diff --git a/tools/singularity/rocky8.def b/tools/singularity/rocky8.def index 0882bfd72b..bd076b5f6c 100644 --- a/tools/singularity/rocky8.def +++ b/tools/singularity/rocky8.def @@ -43,7 +43,7 @@ From: rockylinux/rockylinux:8 # manually install Plumed mkdir plumed cd plumed - version=2.8.1 + version=2.8.2 curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${version}/plumed-src-${version}.tgz tar -xzf plumed.tar.gz cd plumed-${version} diff --git a/tools/singularity/ubuntu18.04.def b/tools/singularity/ubuntu18.04.def index 02351d9ecb..142ef7ffd4 100644 --- a/tools/singularity/ubuntu18.04.def +++ b/tools/singularity/ubuntu18.04.def @@ -107,7 +107,7 @@ From: ubuntu:18.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu18.04_amd_rocm.def b/tools/singularity/ubuntu18.04_amd_rocm.def index 38eaa6e322..4b9c53f00b 100644 --- a/tools/singularity/ubuntu18.04_amd_rocm.def +++ b/tools/singularity/ubuntu18.04_amd_rocm.def @@ -136,7 +136,7 @@ From: ubuntu:18.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu18.04_gpu.def b/tools/singularity/ubuntu18.04_gpu.def index 0bfccf915b..7fa4e8ae4d 100644 --- a/tools/singularity/ubuntu18.04_gpu.def +++ b/tools/singularity/ubuntu18.04_gpu.def @@ -175,7 +175,7 @@ From: ubuntu:18.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu18.04_intel_opencl.def b/tools/singularity/ubuntu18.04_intel_opencl.def index 2d562771bb..d6c9c65690 100644 --- a/tools/singularity/ubuntu18.04_intel_opencl.def +++ b/tools/singularity/ubuntu18.04_intel_opencl.def @@ -108,7 +108,7 @@ From: ubuntu:18.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu18.04_nvidia.def b/tools/singularity/ubuntu18.04_nvidia.def index 2a3a34b1b2..91b0465a6d 100644 --- a/tools/singularity/ubuntu18.04_nvidia.def +++ b/tools/singularity/ubuntu18.04_nvidia.def @@ -107,7 +107,7 @@ From: nvidia/cuda:11.6.2-devel-ubuntu18.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu20.04.def b/tools/singularity/ubuntu20.04.def index 2a2a1dd660..d62b4c9f86 100644 --- a/tools/singularity/ubuntu20.04.def +++ b/tools/singularity/ubuntu20.04.def @@ -103,7 +103,7 @@ From: ubuntu:20.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu20.04_amd_rocm.def b/tools/singularity/ubuntu20.04_amd_rocm.def index f947de9ee9..753f215469 100644 --- a/tools/singularity/ubuntu20.04_amd_rocm.def +++ b/tools/singularity/ubuntu20.04_amd_rocm.def @@ -123,7 +123,7 @@ From: ubuntu:20.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu20.04_gpu.def b/tools/singularity/ubuntu20.04_gpu.def index 05da01ccac..115ca6eee5 100644 --- a/tools/singularity/ubuntu20.04_gpu.def +++ b/tools/singularity/ubuntu20.04_gpu.def @@ -161,7 +161,7 @@ From: ubuntu:20.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu20.04_intel_opencl.def b/tools/singularity/ubuntu20.04_intel_opencl.def index cc547fef29..c8680a16c7 100644 --- a/tools/singularity/ubuntu20.04_intel_opencl.def +++ b/tools/singularity/ubuntu20.04_intel_opencl.def @@ -101,7 +101,7 @@ From: ubuntu:20.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu20.04_nvidia.def b/tools/singularity/ubuntu20.04_nvidia.def index 8ec334ad8b..3affc30b8b 100644 --- a/tools/singularity/ubuntu20.04_nvidia.def +++ b/tools/singularity/ubuntu20.04_nvidia.def @@ -103,7 +103,7 @@ From: nvidia/cuda:11.6.2-devel-ubuntu20.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu20.04_oneapi.def b/tools/singularity/ubuntu20.04_oneapi.def index 25c913f392..70d69c7d80 100644 --- a/tools/singularity/ubuntu20.04_oneapi.def +++ b/tools/singularity/ubuntu20.04_oneapi.def @@ -140,7 +140,7 @@ From: ubuntu:20.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed diff --git a/tools/singularity/ubuntu22.04.def b/tools/singularity/ubuntu22.04.def index 8a4f262f75..ef43347982 100644 --- a/tools/singularity/ubuntu22.04.def +++ b/tools/singularity/ubuntu22.04.def @@ -103,7 +103,7 @@ From: ubuntu:22.04 # Plumed ########################################################################### - export PLUMED_PKG_VERSION=2.8.1 + export PLUMED_PKG_VERSION=2.8.2 mkdir plumed cd plumed From 3815c0ef76b100bdee330a8ed64d2de76e879dae Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Mon, 13 Mar 2023 17:00:54 -0600 Subject: [PATCH 415/445] modify fix STORE/PERATOM and callers to allow ghost comm --- src/AMOEBA/pair_amoeba.cpp | 6 +- src/CORESHELL/compute_temp_cs.cpp | 2 +- src/EXTRA-COMPUTE/compute_hma.cpp | 2 +- src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp | 18 +-- src/EXTRA-MOLECULE/bond_harmonic_restrain.h | 2 +- src/FEP/fix_adapt_fep.cpp | 4 +- src/REPLICA/tad.cpp | 2 +- src/VTK/dump_vtk.cpp | 2 +- src/balance.cpp | 2 +- src/compute_chunk_atom.cpp | 2 +- src/compute_displace_atom.cpp | 2 +- src/compute_msd.cpp | 2 +- src/compute_vacf.cpp | 2 +- src/dump_custom.cpp | 2 +- src/fix_adapt.cpp | 4 +- src/fix_store_peratom.cpp | 145 +++++++++++++----- src/fix_store_peratom.h | 8 +- src/variable.cpp | 2 +- 18 files changed, 140 insertions(+), 69 deletions(-) diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index 0812fe43f0..319bbd8925 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -861,7 +861,7 @@ void PairAmoeba::init_style() Fix *myfix; if (first_flag) { id_pole = utils::strdup("AMOEBA_pole"); - myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 13",id_pole,group->names[0])); + myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM 13 0 0 1",id_pole,group->names[0])); fixpole = dynamic_cast(myfix); } @@ -873,12 +873,12 @@ void PairAmoeba::init_style() if (first_flag && use_pred) { id_udalt = utils::strdup("AMOEBA_udalt"); - myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 {} 3", + myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM {} 3 0 1", id_udalt, group->names[0], maxualt)); fixudalt = dynamic_cast(myfix); id_upalt = utils::strdup("AMOEBA_upalt"); - myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 {} 3", + myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM {} 3 0 1", id_upalt, group->names[0], maxualt)); fixupalt = dynamic_cast(myfix); } diff --git a/src/CORESHELL/compute_temp_cs.cpp b/src/CORESHELL/compute_temp_cs.cpp index c28d52e5b2..b0ec39e542 100644 --- a/src/CORESHELL/compute_temp_cs.cpp +++ b/src/CORESHELL/compute_temp_cs.cpp @@ -68,7 +68,7 @@ ComputeTempCS::ComputeTempCS(LAMMPS *lmp, int narg, char **arg) : id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 0 1", id_fix, group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 0", id_fix, group->names[igroup]))); // set fix store values = 0 for now // fill them in via setup() once Comm::borders() has been called diff --git a/src/EXTRA-COMPUTE/compute_hma.cpp b/src/EXTRA-COMPUTE/compute_hma.cpp index 0f7279a5f5..806228faef 100644 --- a/src/EXTRA-COMPUTE/compute_hma.cpp +++ b/src/EXTRA-COMPUTE/compute_hma.cpp @@ -91,7 +91,7 @@ ComputeHMA::ComputeHMA(LAMMPS *lmp, int narg, char **arg) : id_fix = utils::strdup(std::string(id)+"_COMPUTE_STORE"); fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 3", id_fix, group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp index a15642f90b..59bab65713 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp @@ -17,7 +17,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_property_atom.h" +#include "fix_store_peratom.h" #include "force.h" #include "memory.h" #include "modify.h" @@ -59,7 +59,7 @@ void BondHarmonicRestrain::compute(int eflag, int vflag) ev_init(eflag, vflag); double **x = atom->x; - double **x0 = (double **) atom->extract("d2_BOND_RESTRAIN_X0"); + double **x0 = initial->astore; double **f = atom->f; int **bondlist = neighbor->bondlist; int nbondlist = neighbor->nbondlist; @@ -162,12 +162,12 @@ void BondHarmonicRestrain::init_style() if (natoms < 0) { // create internal fix to store initial positions - initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN_X0 all property/atom d2_BOND_RESTRAIN_X0 3 ghost yes")); + initial = dynamic_cast( + modify->add_fix("BOND_RESTRAIN_X0 all STORE/PERATOM 3 0 1 1")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); natoms = atom->natoms; - double *const *const x0 = (double **) atom->extract("d2_BOND_RESTRAIN_X0"); + double **x0 = initial->astore; const double *const *const x = atom->x; for (int i = 0; i < atom->nlocal; ++i) for (int j = 0; j < 3; ++j) x0[i][j] = x[i][j]; @@ -176,10 +176,10 @@ void BondHarmonicRestrain::init_style() // after a restart, natoms is set but initial is a null pointer. // we add the fix, but do not initialize it. It will pull the data from the restart. - + if (!initial) { - initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN_X0 all property/atom d2_BOND_RESTRAIN_X0 3 ghost yes")); + initial = dynamic_cast( + modify->add_fix("BOND_RESTRAIN_X0 all STORE/PERATOM 3 0 1 1")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); } } @@ -230,7 +230,7 @@ void BondHarmonicRestrain::write_data(FILE *fp) double BondHarmonicRestrain::single(int type, double rsq, int i, int j, double &fforce) { - double **x0 = (double **) atom->extract("d2_BOND_RESTRAIN_X0"); + double **x0 = initial->astore; double delx = x0[i][0] - x0[j][0]; double dely = x0[i][1] - x0[j][1]; diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.h b/src/EXTRA-MOLECULE/bond_harmonic_restrain.h index e17c21e125..61d01ab9b2 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.h +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.h @@ -41,7 +41,7 @@ class BondHarmonicRestrain : public Bond { protected: double *k; bigint natoms; - class FixPropertyAtom *initial; + class FixStorePeratom *initial; virtual void allocate(); }; diff --git a/src/FEP/fix_adapt_fep.cpp b/src/FEP/fix_adapt_fep.cpp index 2d2409d27f..3f3d26c4d9 100644 --- a/src/FEP/fix_adapt_fep.cpp +++ b/src/FEP/fix_adapt_fep.cpp @@ -212,7 +212,7 @@ void FixAdaptFEP::post_constructor() if (diamflag) { id_fix_diam = utils::strdup(id + std::string("_FIX_STORE_DIAM")); fix_diam = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 1", id_fix_diam,group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); if (fix_diam->restart_reset) fix_diam->restart_reset = 0; else { double *vec = fix_diam->vstore; @@ -230,7 +230,7 @@ void FixAdaptFEP::post_constructor() if (chgflag) { id_fix_chg = utils::strdup(id + std::string("_FIX_STORE_CHG")); fix_chg = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 1",id_fix_chg,group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); if (fix_chg->restart_reset) fix_chg->restart_reset = 0; else { double *vec = fix_chg->vstore; diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index d89cbe80ba..e98cd39233 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -135,7 +135,7 @@ void TAD::command(int narg, char **arg) // create FixStorePeratom object to store revert state - fix_revert = dynamic_cast(modify->add_fix("tad_revert all STORE/PERATOM 0 7")); + fix_revert = dynamic_cast(modify->add_fix("tad_revert all STORE/PERATOM 7 0 0 0")); // create Finish for timing output diff --git a/src/VTK/dump_vtk.cpp b/src/VTK/dump_vtk.cpp index a188a1f060..c4dd68bf3c 100644 --- a/src/VTK/dump_vtk.cpp +++ b/src/VTK/dump_vtk.cpp @@ -2365,7 +2365,7 @@ int DumpVTK::modify_param(int narg, char **arg) std::string threshid = fmt::format("{}{}_DUMP_STORE",id,nthreshlast); thresh_fixID[nthreshlast] = utils::strdup(threshid); - threshid += fmt::format(" {} STORE/PERATOM 1 1", group->names[igroup]); + threshid += fmt::format(" {} STORE/PERATOM 1 0 0 1", group->names[igroup]); thresh_fix[nthreshlast] = dynamic_cast(modify->add_fix(threshid)); thresh_last[nthreshlast] = nthreshlast; diff --git a/src/balance.cpp b/src/balance.cpp index 91b9d70378..8d1ba460db 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -515,7 +515,7 @@ void Balance::weight_storage(char *prefix) fixstore = dynamic_cast(modify->get_fix_by_id(cmd)); if (!fixstore) - fixstore = dynamic_cast(modify->add_fix(cmd + " all STORE/PERATOM 0 1")); + fixstore = dynamic_cast(modify->add_fix(cmd + " all STORE/PERATOM 1 0 0 0")); // do not carry weights with atoms during normal atom migration diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index f9723497b1..b59449989b 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -572,7 +572,7 @@ void ComputeChunkAtom::init() if ((idsflag == ONCE || lockcount) && !fixstore) { id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); fixstore = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 1", id_fix, group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1", id_fix, group->names[igroup]))); } if ((idsflag != ONCE && !lockcount) && fixstore) { diff --git a/src/compute_displace_atom.cpp b/src/compute_displace_atom.cpp index 0b1ffff687..6f352fa111 100644 --- a/src/compute_displace_atom.cpp +++ b/src/compute_displace_atom.cpp @@ -75,7 +75,7 @@ ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) : id_fix = utils::strdup(std::string(id) + "_COMPUTE_STORE"); fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 3", id_fix, group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file diff --git a/src/compute_msd.cpp b/src/compute_msd.cpp index 8b7043e20d..ecbb540a48 100644 --- a/src/compute_msd.cpp +++ b/src/compute_msd.cpp @@ -64,7 +64,7 @@ ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, a id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 3", id_fix, group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file diff --git a/src/compute_vacf.cpp b/src/compute_vacf.cpp index 4e209f8612..9d6018d05b 100644 --- a/src/compute_vacf.cpp +++ b/src/compute_vacf.cpp @@ -40,7 +40,7 @@ ComputeVACF::ComputeVACF(LAMMPS *lmp, int narg, char **arg) : id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 3", id_fix, group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); // store current velocities in fix store array // skip if reset from restart file diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 8d64e532a4..922fd4f6fc 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -2013,7 +2013,7 @@ int DumpCustom::modify_param(int narg, char **arg) std::string threshid = fmt::format("{}{}_DUMP_STORE",id,nthreshlast); thresh_fixID[nthreshlast] = utils::strdup(threshid); - threshid += fmt::format(" {} STORE/PERATOM 1 1", group->names[igroup]); + threshid += fmt::format(" {} STORE/PERATOM 1 0 0 1", group->names[igroup]); thresh_fix[nthreshlast] = dynamic_cast(modify->add_fix(threshid)); thresh_last[nthreshlast] = nthreshlast; diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index e0eaeb864e..98cf955485 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -279,7 +279,7 @@ void FixAdapt::post_constructor() if (diamflag && atom->radius_flag) { id_fix_diam = utils::strdup(id + std::string("_FIX_STORE_DIAM")); fix_diam = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 1", id_fix_diam,group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); if (fix_diam->restart_reset) fix_diam->restart_reset = 0; else { double *vec = fix_diam->vstore; @@ -297,7 +297,7 @@ void FixAdapt::post_constructor() if (chgflag && atom->q_flag) { id_fix_chg = utils::strdup(id + std::string("_FIX_STORE_CHG")); fix_chg = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 1",id_fix_chg,group->names[igroup]))); + modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); if (fix_chg->restart_reset) fix_chg->restart_reset = 0; else { double *vec = fix_chg->vstore; diff --git a/src/fix_store_peratom.cpp b/src/fix_store_peratom.cpp index 6f5637e3f6..f9f3b5540f 100644 --- a/src/fix_store_peratom.cpp +++ b/src/fix_store_peratom.cpp @@ -22,50 +22,57 @@ using namespace LAMMPS_NS; using namespace FixConst; +// INTERNAL fix for storing/communicating per-atom values +// syntax: id group style n1 n2 gflag rflag +// N1 = 1, N2 = 0 is per-atom vector, single value per atom +// N1 > 1, N2 = 0 is per-atom array, N1 values per atom +// N1 > 0, N2 > 0 is per-atom tensor, N1xN2 array per atom +// gflag = 0/1, no/yes communicate per-atom values with ghost atoms +// rflag = 0/1, no/yes store per-atom values in restart file + /* ---------------------------------------------------------------------- */ FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), vstore(nullptr), astore(nullptr) { - if (narg != 5 && narg != 6) + if (narg != 8) error->all(FLERR, "Illegal fix STORE/PERATOM command: number of args"); - // syntax: id group style 0/1 n1 n2 (n3), last arg optional - // 0/1 flag = not-store or store peratom values in restart file - // N2 = 1 and no n3 is vector, N2 > 1 and no n3 is array, N3 = tensor - // nvalues = # of peratom values, N = 1 is vector, N > 1 is array - disable = 0; - vecflag = arrayflag = tensorflag = 0; - restart_peratom = utils::inumeric(FLERR, arg[3], false, lmp); - n2 = utils::inumeric(FLERR, arg[4], false, lmp); - if (narg == 6) - n3 = utils::inumeric(FLERR, arg[5], false, lmp); - else - n3 = 1; - if (restart_peratom < 0 || restart_peratom > 1) - error->all(FLERR, "Illegal fix STORE/PERATOM restart flag: {}", restart_peratom); - if (n2 <= 0 || n3 <= 0) - error->all(FLERR, "Illegal fix STORE/PERATOM dimension args: must be >0: {} {}", n2, n3); - if (n2 == 1 && narg == 5) - vecflag = 1; - else if (narg == 5) - arrayflag = 1; - else - tensorflag = 1; - nvalues = n2 * n3; + n1 = utils::inumeric(FLERR, arg[4], false, lmp); + n2 = utils::inumeric(FLERR, arg[5], false, lmp); + ghostflag = utils::inumeric(FLERR, arg[6], false, lmp); + restartflag = utils::inumeric(FLERR, arg[7], false, lmp); + + vecflag = arrayflag = tensorflag = 0; + if (n1 == 1 && n2 == 0) vecflag = 1; + else if (n1 > 1 && n2 == 0) arrayflag = 1; + else if (n1 > 0 && n2 > 0) tensorflag = 1; + else error->all(FLERR, "Illegal fix STORE/PERATOM dimension args: {} {}", n1, n2); + + if (restartflag < 0 || restartflag > 1) + error->all(FLERR, "Illegal fix STORE/PERATOM restart flag: {}", restartflag); + if (ghostflag < 0 || ghostflag > 1) + error->all(FLERR, "Illegal fix STORE/PERATOM ghost flag: {}", ghostflag); + + if (vecflag || arrayflag) nvalues = n1; + else nvalues = n1 * n2; nbytes = nvalues * sizeof(double); + if (ghostflag) comm_border = nvalues; + maxexchange = nvalues; + + // allocate data structs and register with Atom class + vstore = nullptr; astore = nullptr; tstore = nullptr; - // allocate data structs and register with Atom class - FixStorePeratom::grow_arrays(atom->nmax); atom->add_callback(Atom::GROW); - if (restart_peratom) atom->add_callback(Atom::RESTART); + if (restartflag) atom->add_callback(Atom::RESTART); + if (ghostflag) atom->add_callback(Atom::BORDER); // zero the storage @@ -74,13 +81,12 @@ FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : for (int i = 0; i < nlocal; i++) vstore[i] = 0.0; } else if (arrayflag) { for (int i = 0; i < nlocal; i++) - for (int j = 0; j < n2; j++) astore[i][j] = 0.0; + for (int j = 0; j < n1; j++) astore[i][j] = 0.0; } else if (tensorflag) { for (int i = 0; i < nlocal; i++) - for (int j = 0; j < n2; j++) - for (int k = 0; k < n3; k++) tstore[i][j][k] = 0.0; + for (int j = 0; j < n1; j++) + for (int k = 0; k < n2; k++) tstore[i][j][k] = 0.0; } - maxexchange = nvalues; } /* ---------------------------------------------------------------------- */ @@ -90,7 +96,8 @@ FixStorePeratom::~FixStorePeratom() // unregister callbacks to this fix from Atom class atom->delete_callback(id, Atom::GROW); - if (restart_peratom) atom->delete_callback(id, Atom::RESTART); + if (restartflag) atom->delete_callback(id, Atom::RESTART); + if (ghostflag) atom->delete_callback(id, Atom::BORDER); memory->destroy(vstore); memory->destroy(astore); @@ -114,9 +121,9 @@ void FixStorePeratom::grow_arrays(int nmax) if (vecflag) memory->grow(vstore, nmax, "store:vstore"); else if (arrayflag) - memory->grow(astore, nmax, n2, "store:astore"); + memory->grow(astore, nmax, n1, "store:astore"); else if (tensorflag) - memory->grow(tstore, nmax, n2, n3, "store:tstore"); + memory->grow(tstore, nmax, n1, n2, "store:tstore"); } /* ---------------------------------------------------------------------- @@ -136,6 +143,62 @@ void FixStorePeratom::copy_arrays(int i, int j, int /*delflag*/) } } +/* ---------------------------------------------------------------------- + pack values for border communication at re-neighboring +------------------------------------------------------------------------- */ + +int FixStorePeratom::pack_border(int n, int *list, double *buf) +{ + int i, j, k, ncol; + + int m = 0; + if (vecflag) { + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = vstore[j]; + } + } else if (arrayflag) { + for (i = 0; i < n; i++) { + j = list[i]; + for (k = 0; k < nvalues; k++) + buf[m++] = astore[j][k]; + } + } else if (tensorflag) { + for (i = 0; i < n; i++) { + j = list[i]; + memcpy(&buf[m], &tstore[j][0][0], nbytes); + m += nvalues; + } + } + + return m; +} + +/* ---------------------------------------------------------------------- + unpack values for border communication at re-neighboring +------------------------------------------------------------------------- */ + +int FixStorePeratom::unpack_border(int n, int first, double *buf) +{ + int i, k, last, ncol; + + int m = 0; + last = first + n; + if (vecflag) { + for (i = first; i < last; i++) + vstore[i] = buf[m++]; + } else if (arrayflag) { + for (i = first; i < last; i++) + for (k = 0; k < nvalues; k++) + astore[i][k] = buf[m++]; + } else if (tensorflag) { + for (i = first; i < last; i++) { + memcpy(&tstore[i][0][0], &buf[m], nbytes); + m += nvalues; + } + } +} + /* ---------------------------------------------------------------------- pack values in local atom-based array for exchange with another proc ------------------------------------------------------------------------- */ @@ -147,7 +210,8 @@ int FixStorePeratom::pack_exchange(int i, double *buf) if (vecflag) { buf[0] = vstore[i]; } else if (arrayflag) { - for (int m = 0; m < nvalues; m++) buf[m] = astore[i][m]; + for (int m = 0; m < nvalues; m++) + buf[m] = astore[i][m]; } else if (tensorflag) { memcpy(buf, &tstore[i][0][0], nbytes); } @@ -166,7 +230,8 @@ int FixStorePeratom::unpack_exchange(int nlocal, double *buf) if (vecflag) { vstore[nlocal] = buf[0]; } else if (arrayflag) { - for (int m = 0; m < nvalues; m++) astore[nlocal][m] = buf[m]; + for (int m = 0; m < nvalues; m++) + astore[nlocal][m] = buf[m]; } else if (tensorflag) { memcpy(&tstore[nlocal][0][0], buf, nbytes); } @@ -191,7 +256,8 @@ int FixStorePeratom::pack_restart(int i, double *buf) if (vecflag) { buf[1] = vstore[i]; } else if (arrayflag) { - for (int m = 0; m < nvalues; m++) buf[m + 1] = astore[i][m]; + for (int m = 0; m < nvalues; m++) + buf[m + 1] = astore[i][m]; } else if (tensorflag) { memcpy(&buf[1], &tstore[i][0][0], nbytes); } @@ -219,7 +285,8 @@ void FixStorePeratom::unpack_restart(int nlocal, int nth) if (vecflag) { vstore[nlocal] = extra[nlocal][m]; } else if (arrayflag) { - for (int i = 0; i < nvalues; i++) astore[nlocal][i] = extra[nlocal][m++]; + for (int i = 0; i < nvalues; i++) + astore[nlocal][i] = extra[nlocal][m++]; } else if (tensorflag) { memcpy(&tstore[nlocal][0][0], &extra[nlocal][m], nbytes); } @@ -251,5 +318,5 @@ int FixStorePeratom::size_restart(int /*nlocal*/) double FixStorePeratom::memory_usage() { - return (double) atom->nmax * n2 * n3 * sizeof(double); + return (double) atom->nmax * nvalues * sizeof(double); } diff --git a/src/fix_store_peratom.h b/src/fix_store_peratom.h index d3efe4142b..dcf28be265 100644 --- a/src/fix_store_peratom.h +++ b/src/fix_store_peratom.h @@ -37,6 +37,8 @@ class FixStorePeratom : public Fix { void grow_arrays(int) override; void copy_arrays(int, int, int) override; + int pack_border(int, int *, double *) override; + int unpack_border(int, int, double *) override; int pack_exchange(int, double *) override; int unpack_exchange(int, double *) override; int pack_restart(int, double *) override; @@ -50,8 +52,10 @@ class FixStorePeratom : public Fix { int vecflag; // 1 if ncol=1 int arrayflag; // 1 if a 2d array (vector per atom) int tensorflag; // 1 if a 3d array (array per atom) - - int n2, n3; // size of 3d dims of per-atom data struct + int ghostflag; // 0/1 to communicate values with ghost atoms + int restartflag; // 0/1 to store values in restart files + + int n1, n2; // size of 3d dims of per-atom data struct int nvalues; // number of per-atom values int nbytes; // number of per-atom bytes }; diff --git a/src/variable.cpp b/src/variable.cpp index 2ac9bd0364..56a0604a7e 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -5028,7 +5028,7 @@ VarReader::VarReader(LAMMPS *lmp, char *name, char *file, int flag) : id_fix = utils::strdup(std::string(name) + "_VARIABLE_STORE"); fixstore = dynamic_cast( - modify->add_fix(std::string(id_fix) + " all STORE/PERATOM 0 1")); + modify->add_fix(std::string(id_fix) + " all STORE/PERATOM 1 0 0 0")); buffer = new char[CHUNK*MAXLINE]; } } From c369c0252f66a75b4d0036054ce6046515e477b1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 13 Mar 2023 19:43:08 -0400 Subject: [PATCH 416/445] fix issues with changes in fix STORE/PERATOM --- src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp | 2 +- src/fix_store_peratom.cpp | 66 +++++++++---------- 2 files changed, 32 insertions(+), 36 deletions(-) diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp index 59bab65713..b71e60c286 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp @@ -179,7 +179,7 @@ void BondHarmonicRestrain::init_style() if (!initial) { initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN_X0 all STORE/PERATOM 3 0 1 1")); + modify->add_fix("BOND_RESTRAIN_X0 all STORE/PERATOM 3 0 1 1")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); } } diff --git a/src/fix_store_peratom.cpp b/src/fix_store_peratom.cpp index f9f3b5540f..2a8429e42f 100644 --- a/src/fix_store_peratom.cpp +++ b/src/fix_store_peratom.cpp @@ -23,7 +23,7 @@ using namespace LAMMPS_NS; using namespace FixConst; // INTERNAL fix for storing/communicating per-atom values -// syntax: id group style n1 n2 gflag rflag +// syntax: id group style n1 n2 gflag rflag // N1 = 1, N2 = 0 is per-atom vector, single value per atom // N1 > 1, N2 = 0 is per-atom array, N1 values per atom // N1 > 0, N2 > 0 is per-atom tensor, N1xN2 array per atom @@ -35,34 +35,36 @@ using namespace FixConst; FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), vstore(nullptr), astore(nullptr) { - if (narg != 8) - error->all(FLERR, "Illegal fix STORE/PERATOM command: number of args"); + if (narg != 7) error->all(FLERR, "Illegal fix STORE/PERATOM command: number of args"); disable = 0; - n1 = utils::inumeric(FLERR, arg[4], false, lmp); - n2 = utils::inumeric(FLERR, arg[5], false, lmp); - ghostflag = utils::inumeric(FLERR, arg[6], false, lmp); - restartflag = utils::inumeric(FLERR, arg[7], false, lmp); + n1 = utils::inumeric(FLERR, arg[3], false, lmp); + n2 = utils::inumeric(FLERR, arg[4], false, lmp); + ghostflag = utils::logical(FLERR, arg[5], false, lmp); + restartflag = utils::logical(FLERR, arg[6], false, lmp); vecflag = arrayflag = tensorflag = 0; - if (n1 == 1 && n2 == 0) vecflag = 1; - else if (n1 > 1 && n2 == 0) arrayflag = 1; - else if (n1 > 0 && n2 > 0) tensorflag = 1; - else error->all(FLERR, "Illegal fix STORE/PERATOM dimension args: {} {}", n1, n2); - - if (restartflag < 0 || restartflag > 1) - error->all(FLERR, "Illegal fix STORE/PERATOM restart flag: {}", restartflag); - if (ghostflag < 0 || ghostflag > 1) - error->all(FLERR, "Illegal fix STORE/PERATOM ghost flag: {}", ghostflag); + if (n1 == 1 && n2 == 0) + vecflag = 1; + else if (n1 > 1 && n2 == 0) + arrayflag = 1; + else if (n1 > 0 && n2 > 0) + tensorflag = 1; + else + error->all(FLERR, "Illegal fix STORE/PERATOM dimension args: {} {}", n1, n2); - if (vecflag || arrayflag) nvalues = n1; - else nvalues = n1 * n2; + if (vecflag || arrayflag) + nvalues = n1; + else + nvalues = n1 * n2; nbytes = nvalues * sizeof(double); if (ghostflag) comm_border = nvalues; maxexchange = nvalues; - + + if (restartflag) restart_peratom = 1; + // allocate data structs and register with Atom class vstore = nullptr; @@ -149,7 +151,7 @@ void FixStorePeratom::copy_arrays(int i, int j, int /*delflag*/) int FixStorePeratom::pack_border(int n, int *list, double *buf) { - int i, j, k, ncol; + int i, j, k; int m = 0; if (vecflag) { @@ -160,8 +162,7 @@ int FixStorePeratom::pack_border(int n, int *list, double *buf) } else if (arrayflag) { for (i = 0; i < n; i++) { j = list[i]; - for (k = 0; k < nvalues; k++) - buf[m++] = astore[j][k]; + for (k = 0; k < nvalues; k++) buf[m++] = astore[j][k]; } } else if (tensorflag) { for (i = 0; i < n; i++) { @@ -180,23 +181,22 @@ int FixStorePeratom::pack_border(int n, int *list, double *buf) int FixStorePeratom::unpack_border(int n, int first, double *buf) { - int i, k, last, ncol; + int i, k, last; int m = 0; last = first + n; if (vecflag) { - for (i = first; i < last; i++) - vstore[i] = buf[m++]; + for (i = first; i < last; i++) vstore[i] = buf[m++]; } else if (arrayflag) { for (i = first; i < last; i++) - for (k = 0; k < nvalues; k++) - astore[i][k] = buf[m++]; + for (k = 0; k < nvalues; k++) astore[i][k] = buf[m++]; } else if (tensorflag) { for (i = first; i < last; i++) { memcpy(&tstore[i][0][0], &buf[m], nbytes); m += nvalues; } } + return m; } /* ---------------------------------------------------------------------- @@ -210,8 +210,7 @@ int FixStorePeratom::pack_exchange(int i, double *buf) if (vecflag) { buf[0] = vstore[i]; } else if (arrayflag) { - for (int m = 0; m < nvalues; m++) - buf[m] = astore[i][m]; + for (int m = 0; m < nvalues; m++) buf[m] = astore[i][m]; } else if (tensorflag) { memcpy(buf, &tstore[i][0][0], nbytes); } @@ -230,8 +229,7 @@ int FixStorePeratom::unpack_exchange(int nlocal, double *buf) if (vecflag) { vstore[nlocal] = buf[0]; } else if (arrayflag) { - for (int m = 0; m < nvalues; m++) - astore[nlocal][m] = buf[m]; + for (int m = 0; m < nvalues; m++) astore[nlocal][m] = buf[m]; } else if (tensorflag) { memcpy(&tstore[nlocal][0][0], buf, nbytes); } @@ -256,8 +254,7 @@ int FixStorePeratom::pack_restart(int i, double *buf) if (vecflag) { buf[1] = vstore[i]; } else if (arrayflag) { - for (int m = 0; m < nvalues; m++) - buf[m + 1] = astore[i][m]; + for (int m = 0; m < nvalues; m++) buf[m + 1] = astore[i][m]; } else if (tensorflag) { memcpy(&buf[1], &tstore[i][0][0], nbytes); } @@ -285,8 +282,7 @@ void FixStorePeratom::unpack_restart(int nlocal, int nth) if (vecflag) { vstore[nlocal] = extra[nlocal][m]; } else if (arrayflag) { - for (int i = 0; i < nvalues; i++) - astore[nlocal][i] = extra[nlocal][m++]; + for (int i = 0; i < nvalues; i++) astore[nlocal][i] = extra[nlocal][m++]; } else if (tensorflag) { memcpy(&tstore[nlocal][0][0], &extra[nlocal][m], nbytes); } From ef67f790a2e17b6c53edc821be0ded31a065cdaa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 13 Mar 2023 19:43:44 -0400 Subject: [PATCH 417/445] whitespace --- src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp | 2 +- src/fix_store_peratom.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp index b71e60c286..7f3a7519b6 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp @@ -176,7 +176,7 @@ void BondHarmonicRestrain::init_style() // after a restart, natoms is set but initial is a null pointer. // we add the fix, but do not initialize it. It will pull the data from the restart. - + if (!initial) { initial = dynamic_cast( modify->add_fix("BOND_RESTRAIN_X0 all STORE/PERATOM 3 0 1 1")); diff --git a/src/fix_store_peratom.h b/src/fix_store_peratom.h index dcf28be265..9434ffe799 100644 --- a/src/fix_store_peratom.h +++ b/src/fix_store_peratom.h @@ -54,7 +54,7 @@ class FixStorePeratom : public Fix { int tensorflag; // 1 if a 3d array (array per atom) int ghostflag; // 0/1 to communicate values with ghost atoms int restartflag; // 0/1 to store values in restart files - + int n1, n2; // size of 3d dims of per-atom data struct int nvalues; // number of per-atom values int nbytes; // number of per-atom bytes From 1031110d930826e6d752439fa7e428715249cbff Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 13 Mar 2023 19:55:52 -0400 Subject: [PATCH 418/445] update docs --- doc/src/bond_harmonic_restrain.rst | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/doc/src/bond_harmonic_restrain.rst b/doc/src/bond_harmonic_restrain.rst index c48e68917c..c9707f5546 100644 --- a/doc/src/bond_harmonic_restrain.rst +++ b/doc/src/bond_harmonic_restrain.rst @@ -65,18 +65,13 @@ This bond style can only be used if LAMMPS was built with the EXTRA-MOLECULE package. See the :doc:`Build package ` page for more info. -This bond style uses :doc:`fix property/atom ` -internally to be able to determine the original bond lengths. This fix -will write its state to :doc:`data files `, but it is -currently not possible to read that stored data back with -:doc:`read_data ` for such an internally defined fix. You -are thus advised to use the "nofix" argument to the :doc:`write_data -command ` in order to avoid writing that section to the data -file that would cause an error when reading the data file. When -continuing from such a "nofix" data file, the reference bond lengths -will not be the original lengths but those of the current geometry. -Thus restarting is currently *only* possible with :doc:`binary restart -files `. +This bond style maintains internal data to determine the original bond +lengths :math:`r_{t=0}`. This information will be written to +:doc:`binary restart files ` but **not** to :doc:`data +files `. Thus, continuing a simulation is *only* possible +with :doc:`read_restart `. When using the :doc:`read_data +command `, the reference bond lengths :math:`r_{t=0}` will be +re-initialized from the current geometry. This bond style cannot be used with :doc:`fix shake or fix rattle `, with :doc:`fix filter/corotate `, or From 17f39d9d2cf8e5d85ba3a9e3fe9901d0b1bae501 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 13 Mar 2023 22:28:32 -0400 Subject: [PATCH 419/445] rename fix STORE/PERATOM to STORE/ATOM --- doc/src/Developer_notes.rst | 25 ++++++++++++ doc/src/Developer_updating.rst | 29 ++++++++++++++ src/AMOEBA/amoeba_induce.cpp | 2 +- src/AMOEBA/amoeba_utils.cpp | 2 +- src/AMOEBA/pair_amoeba.cpp | 26 ++++++------- src/AMOEBA/pair_amoeba.h | 6 +-- src/CORESHELL/compute_temp_cs.cpp | 6 +-- src/CORESHELL/compute_temp_cs.h | 2 +- src/EXTRA-COMPUTE/compute_hma.cpp | 8 ++-- src/EXTRA-COMPUTE/compute_hma.h | 2 +- src/EXTRA-COMPUTE/compute_msd_nongauss.cpp | 2 +- src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp | 10 ++--- src/EXTRA-MOLECULE/bond_harmonic_restrain.h | 2 +- src/FEP/fix_adapt_fep.cpp | 14 +++---- src/FEP/fix_adapt_fep.h | 2 +- src/GPU/pair_amoeba_gpu.cpp | 2 +- src/GPU/pair_hippo_gpu.cpp | 2 +- src/REPLICA/tad.cpp | 6 +-- src/REPLICA/tad.h | 18 ++++----- src/VTK/dump_vtk.cpp | 10 ++--- src/balance.cpp | 6 +-- src/balance.h | 10 ++--- src/compute_chunk_atom.cpp | 6 +-- src/compute_chunk_atom.h | 2 +- src/compute_displace_atom.cpp | 8 ++-- src/compute_displace_atom.h | 2 +- src/compute_msd.cpp | 8 ++-- src/compute_msd.h | 2 +- src/compute_vacf.cpp | 8 ++-- src/compute_vacf.h | 2 +- src/dump_custom.cpp | 10 ++--- src/dump_custom.h | 26 ++++++------- src/fix_adapt.cpp | 14 +++---- src/fix_adapt.h | 2 +- src/fix_balance.cpp | 2 +- ...x_store_peratom.cpp => fix_store_atom.cpp} | 38 +++++++++---------- src/{fix_store_peratom.h => fix_store_atom.h} | 12 +++--- src/fix_store_global.cpp | 2 +- src/variable.cpp | 6 +-- src/variable.h | 2 +- 40 files changed, 199 insertions(+), 145 deletions(-) rename src/{fix_store_peratom.cpp => fix_store_atom.cpp} (88%) rename src/{fix_store_peratom.h => fix_store_atom.h} (89%) diff --git a/doc/src/Developer_notes.rst b/doc/src/Developer_notes.rst index 92121cca15..07b289b583 100644 --- a/doc/src/Developer_notes.rst +++ b/doc/src/Developer_notes.rst @@ -11,6 +11,7 @@ Available topics are: - `Reading and parsing of text and text files`_ - `Requesting and accessing neighbor lists`_ +- `Choosing between a custom atom style, fix property/atom, and fix STORE/ATOM`_ - `Fix contributions to instantaneous energy, virial, and cumulative energy`_ - `KSpace PPPM FFT grids`_ @@ -216,6 +217,30 @@ command: neighbor->add_request(this, "delete_atoms", NeighConst::REQ_FULL); +Choosing between a custom atom style, fix property/atom, and fix STORE/ATOM +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +There are multiple ways to manage per-atom data within LAMMPS. Often +the per-atom storage is only used locally and managed by the class that +uses it. If the data has to persist between multiple time steps and +migrate with atoms when they move from sub-domain to sub-domain or +across periodic boundaries, then using a custom atom style, or :doc:`fix +property/atom `, or the internal fix STORE/ATOM are +possible options. + +- Using the atom style is usually the most programming effort and mostly + needed when the per-atom data is an integral part of the model like a + per-atom charge or diameter and thus should be part of the Atoms + section of a :doc:`data file `. + +- Fix property/atom is useful if the data is optional or should be + entered by the user, or accessed as a (named) custom property. In this + case the fix should be entered as part of the input (and not + internally) which allows to enter and store its content with data files. + +- Fix STORE/ATOM should be used when the data should be accessed internally + only and thus the fix can be created internally. + Fix contributions to instantaneous energy, virial, and cumulative energy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/src/Developer_updating.rst b/doc/src/Developer_updating.rst index 6089969c38..28b3712ae0 100644 --- a/doc/src/Developer_updating.rst +++ b/doc/src/Developer_updating.rst @@ -24,6 +24,7 @@ Available topics in mostly chronological order are: - `Use of "override" instead of "virtual"`_ - `Simplified and more compact neighbor list requests`_ - `Split of fix STORE into fix STORE/GLOBAL and fix STORE/PERATOM`_ +- `Rename of fix STORE/PERATOM to fix STORE/ATOM and change of arguments`_ - `Use Output::get_dump_by_id() instead of Output::find_dump()`_ - `Refactored grid communication using Grid3d/Grid2d classes instead of GridComm`_ @@ -385,6 +386,34 @@ New: This change is **required** or else the code will not compile. +Rename of fix STORE/PERATOM to fix STORE/ATOM and change of arguments +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. versionchanged:: TBD + +The available functionality of the internal fix to store per-atom +properties was expanded to enable storing data with ghost atoms and to +support binary restart files. With those changes, the fix was renamed +to fix STORE/ATOM and the number and order of (required) arguments has +changed. + +Old syntax: ``ID group-ID STORE/PERATOM rflag n1 n2 [n3]`` + +- *rflag* = 0/1, *no*/*yes* store per-atom values in restart file +- :math:`n1 = 1, n2 = 1, \mathrm{no}\;n3 \to` per-atom vector, single value per atom +- :math:`n1 = 1, n2 > 1, \mathrm{no}\;n3 \to` per-atom array, *n2* values per atom +- :math:`n1 = 1, n2 > 0, n3 > 0 \to` per-atom tensor, *n2* x *n3* values per atom + +New syntax: ``ID group-ID STORE/ATOM n1 n2 gflag rflag`` + +- :math:`n1 = 1, n2 = 0 \to` per-atom vector, single value per atom +- :math:`n1 > 1, n2 = 0 \to` per-atom array, *n1* values per atom +- :math:`n1 > 0, n2 > 0 \to` per-atom tensor, *n1* x *n2* values per atom +- *gflag* = 0/1, *no*/*yes* communicate per-atom values with ghost atoms +- *rflag* = 0/1, *no*/*yes* store per-atom values in restart file + +Since this is an internal fix, there is no user visible change. + Use Output::get_dump_by_id() instead of Output::find_dump() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/AMOEBA/amoeba_induce.cpp b/src/AMOEBA/amoeba_induce.cpp index ecc20a198c..6017b775ca 100644 --- a/src/AMOEBA/amoeba_induce.cpp +++ b/src/AMOEBA/amoeba_induce.cpp @@ -19,7 +19,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "math_const.h" #include "math_special.h" #include "my_page.h" diff --git a/src/AMOEBA/amoeba_utils.cpp b/src/AMOEBA/amoeba_utils.cpp index 5a4057930c..8fb839b693 100644 --- a/src/AMOEBA/amoeba_utils.cpp +++ b/src/AMOEBA/amoeba_utils.cpp @@ -17,7 +17,7 @@ #include "atom.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "neigh_list.h" #include diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index 319bbd8925..72efa76523 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -20,7 +20,7 @@ #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "math_special.h" @@ -861,8 +861,8 @@ void PairAmoeba::init_style() Fix *myfix; if (first_flag) { id_pole = utils::strdup("AMOEBA_pole"); - myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM 13 0 0 1",id_pole,group->names[0])); - fixpole = dynamic_cast(myfix); + myfix = modify->add_fix(fmt::format("{} {} STORE/ATOM 13 0 0 1",id_pole,group->names[0])); + fixpole = dynamic_cast(myfix); } // creation of per-atom storage @@ -873,14 +873,14 @@ void PairAmoeba::init_style() if (first_flag && use_pred) { id_udalt = utils::strdup("AMOEBA_udalt"); - myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM {} 3 0 1", + myfix = modify->add_fix(fmt::format("{} {} STORE/ATOM {} 3 0 1", id_udalt, group->names[0], maxualt)); - fixudalt = dynamic_cast(myfix); + fixudalt = dynamic_cast(myfix); id_upalt = utils::strdup("AMOEBA_upalt"); - myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM {} 3 0 1", + myfix = modify->add_fix(fmt::format("{} {} STORE/ATOM {} 3 0 1", id_upalt, group->names[0], maxualt)); - fixupalt = dynamic_cast(myfix); + fixupalt = dynamic_cast(myfix); } // create pages for storing pairwise data: @@ -995,21 +995,21 @@ void PairAmoeba::init_style() if (id_pole) { myfix = modify->get_fix_by_id(id_pole); if (!myfix) - error->all(FLERR,"Could not find internal pair amoeba fix STORE/PERATOM id {}", id_pole); - fixpole = dynamic_cast(myfix); + error->all(FLERR,"Could not find internal pair amoeba fix STORE/ATOM id {}", id_pole); + fixpole = dynamic_cast(myfix); } if (id_udalt) { myfix = modify->get_fix_by_id(id_udalt); if (!myfix) - error->all(FLERR,"Could not find internal pair amoeba fix STORE/PERATOM id {}", id_udalt); - fixudalt = dynamic_cast(myfix); + error->all(FLERR,"Could not find internal pair amoeba fix STORE/ATOM id {}", id_udalt); + fixudalt = dynamic_cast(myfix); myfix = modify->get_fix_by_id(id_upalt); if (!myfix) - error->all(FLERR,"Could not find internal pair amoeba fix STORE/PERATOM id {}", id_upalt); - fixupalt = dynamic_cast(myfix); + error->all(FLERR,"Could not find internal pair amoeba fix STORE/ATOM id {}", id_upalt); + fixupalt = dynamic_cast(myfix); } // assign hydrogen neighbors (redID) to each owned atom diff --git a/src/AMOEBA/pair_amoeba.h b/src/AMOEBA/pair_amoeba.h index cdeee6c95f..1f3a4b799a 100644 --- a/src/AMOEBA/pair_amoeba.h +++ b/src/AMOEBA/pair_amoeba.h @@ -166,9 +166,9 @@ class PairAmoeba : public Pair { int *amgroup; // AMOEBA polarization group, 1 to Ngroup char *id_pole, *id_udalt, *id_upalt; - class FixStorePeratom *fixpole; // stores pole = multipole components - class FixStorePeratom *fixudalt; // stores udalt = induced dipole history - class FixStorePeratom *fixupalt; // stores upalt = induced dipole history + class FixStoreAtom *fixpole; // stores pole = multipole components + class FixStoreAtom *fixudalt; // stores udalt = induced dipole history + class FixStoreAtom *fixupalt; // stores upalt = induced dipole history // static per-type properties defined in force-field file diff --git a/src/CORESHELL/compute_temp_cs.cpp b/src/CORESHELL/compute_temp_cs.cpp index b0ec39e542..b66db30bc5 100644 --- a/src/CORESHELL/compute_temp_cs.cpp +++ b/src/CORESHELL/compute_temp_cs.cpp @@ -24,7 +24,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "memory.h" @@ -67,8 +67,8 @@ ComputeTempCS::ComputeTempCS(LAMMPS *lmp, int narg, char **arg) : // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 0", id_fix, group->names[igroup]))); + fix = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 0", id_fix, group->names[igroup]))); // set fix store values = 0 for now // fill them in via setup() once Comm::borders() has been called diff --git a/src/CORESHELL/compute_temp_cs.h b/src/CORESHELL/compute_temp_cs.h index 3fdf0f3711..1e7c537a83 100644 --- a/src/CORESHELL/compute_temp_cs.h +++ b/src/CORESHELL/compute_temp_cs.h @@ -54,7 +54,7 @@ class ComputeTempCS : public Compute { double **vint; char *id_fix; - class FixStorePeratom *fix; + class FixStoreAtom *fix; void dof_compute(); void vcm_pairs(); diff --git a/src/EXTRA-COMPUTE/compute_hma.cpp b/src/EXTRA-COMPUTE/compute_hma.cpp index 806228faef..4b949f6592 100644 --- a/src/EXTRA-COMPUTE/compute_hma.cpp +++ b/src/EXTRA-COMPUTE/compute_hma.cpp @@ -54,7 +54,7 @@ https://doi.org/10.1103/PhysRevE.92.043303 #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "improper.h" @@ -90,8 +90,8 @@ ComputeHMA::ComputeHMA(LAMMPS *lmp, int narg, char **arg) : // our new fix's group = same as compute group id_fix = utils::strdup(std::string(id)+"_COMPUTE_STORE"); - fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); + fix = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 3 0 0 1", id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file @@ -196,7 +196,7 @@ void ComputeHMA::setup() // set fix which stores original atom coords - fix = dynamic_cast(modify->get_fix_by_id(id_fix)); + fix = dynamic_cast(modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR,"Could not find hma per-atom store fix ID {}", id_fix); } diff --git a/src/EXTRA-COMPUTE/compute_hma.h b/src/EXTRA-COMPUTE/compute_hma.h index d8b8e55b96..8b5ea1a8dc 100644 --- a/src/EXTRA-COMPUTE/compute_hma.h +++ b/src/EXTRA-COMPUTE/compute_hma.h @@ -43,7 +43,7 @@ class ComputeHMA : public Compute { char *id_fix; char *id_temp; double finaltemp; - class FixStorePeratom *fix; + class FixStoreAtom *fix; double boltz, nktv2p, inv_volume; double deltaPcap; double virial_compute(int); diff --git a/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp b/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp index f75ab69a01..42af0f0b6e 100644 --- a/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp +++ b/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp @@ -19,7 +19,7 @@ #include "atom.h" #include "domain.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "update.h" diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp index 7f3a7519b6..87b6e5a80e 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp @@ -17,7 +17,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "memory.h" #include "modify.h" @@ -162,8 +162,8 @@ void BondHarmonicRestrain::init_style() if (natoms < 0) { // create internal fix to store initial positions - initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN_X0 all STORE/PERATOM 3 0 1 1")); + initial = dynamic_cast( + modify->add_fix("BOND_RESTRAIN_X0 all STORE/ATOM 3 0 1 1")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); natoms = atom->natoms; @@ -178,8 +178,8 @@ void BondHarmonicRestrain::init_style() // we add the fix, but do not initialize it. It will pull the data from the restart. if (!initial) { - initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN_X0 all STORE/PERATOM 3 0 1 1")); + initial = dynamic_cast( + modify->add_fix("BOND_RESTRAIN_X0 all STORE/ATOM 3 0 1 1")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); } } diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.h b/src/EXTRA-MOLECULE/bond_harmonic_restrain.h index 61d01ab9b2..66ee1300c1 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.h +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.h @@ -41,7 +41,7 @@ class BondHarmonicRestrain : public Bond { protected: double *k; bigint natoms; - class FixStorePeratom *initial; + class FixStoreAtom *initial; virtual void allocate(); }; diff --git a/src/FEP/fix_adapt_fep.cpp b/src/FEP/fix_adapt_fep.cpp index 3f3d26c4d9..6e38c90ef2 100644 --- a/src/FEP/fix_adapt_fep.cpp +++ b/src/FEP/fix_adapt_fep.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "input.h" @@ -211,8 +211,8 @@ void FixAdaptFEP::post_constructor() if (diamflag) { id_fix_diam = utils::strdup(id + std::string("_FIX_STORE_DIAM")); - fix_diam = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); + fix_diam = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); if (fix_diam->restart_reset) fix_diam->restart_reset = 0; else { double *vec = fix_diam->vstore; @@ -229,8 +229,8 @@ void FixAdaptFEP::post_constructor() if (chgflag) { id_fix_chg = utils::strdup(id + std::string("_FIX_STORE_CHG")); - fix_chg = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); + fix_chg = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); if (fix_chg->restart_reset) fix_chg->restart_reset = 0; else { double *vec = fix_chg->vstore; @@ -333,11 +333,11 @@ void FixAdaptFEP::init() // fixes that store initial per-atom values if (id_fix_diam) { - fix_diam = dynamic_cast(modify->get_fix_by_id(id_fix_diam)); + fix_diam = dynamic_cast(modify->get_fix_by_id(id_fix_diam)); if (!fix_diam) error->all(FLERR,"Could not find fix adapt/fep storage fix ID {}", id_fix_diam); } if (id_fix_chg) { - fix_chg = dynamic_cast(modify->get_fix_by_id(id_fix_chg)); + fix_chg = dynamic_cast(modify->get_fix_by_id(id_fix_chg)); if (!fix_chg) error->all(FLERR,"Could not find fix adapt/fep storage fix ID {}", id_fix_chg); } diff --git a/src/FEP/fix_adapt_fep.h b/src/FEP/fix_adapt_fep.h index a93349a780..370a34a0f3 100644 --- a/src/FEP/fix_adapt_fep.h +++ b/src/FEP/fix_adapt_fep.h @@ -46,7 +46,7 @@ class FixAdaptFEP : public Fix { int anypair; int nlevels_respa; char *id_fix_diam, *id_fix_chg; - class FixStorePeratom *fix_diam, *fix_chg; + class FixStoreAtom *fix_diam, *fix_chg; struct Adapt { int which, ivar; diff --git a/src/GPU/pair_amoeba_gpu.cpp b/src/GPU/pair_amoeba_gpu.cpp index fd423486fd..c513d32081 100644 --- a/src/GPU/pair_amoeba_gpu.cpp +++ b/src/GPU/pair_amoeba_gpu.cpp @@ -23,7 +23,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "gpu_extra.h" #include "info.h" diff --git a/src/GPU/pair_hippo_gpu.cpp b/src/GPU/pair_hippo_gpu.cpp index 9d286d5db7..aa10ad6c5f 100644 --- a/src/GPU/pair_hippo_gpu.cpp +++ b/src/GPU/pair_hippo_gpu.cpp @@ -23,7 +23,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "gpu_extra.h" #include "info.h" diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index e98cd39233..b9b04a63d5 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -24,7 +24,7 @@ #include "error.h" #include "finish.h" #include "fix_event_tad.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "integrate.h" #include "memory.h" @@ -133,9 +133,9 @@ void TAD::command(int narg, char **arg) fix_event = dynamic_cast(modify->add_fix("tad_event all EVENT/TAD")); - // create FixStorePeratom object to store revert state + // create FixStoreAtom object to store revert state - fix_revert = dynamic_cast(modify->add_fix("tad_revert all STORE/PERATOM 7 0 0 0")); + fix_revert = dynamic_cast(modify->add_fix("tad_revert all STORE/ATOM 7 0 0 0")); // create Finish for timing output diff --git a/src/REPLICA/tad.h b/src/REPLICA/tad.h index 8f51ca8c91..88379794cc 100644 --- a/src/REPLICA/tad.h +++ b/src/REPLICA/tad.h @@ -48,15 +48,15 @@ class TAD : public Command { double time_dynamics, time_quench, time_neb, time_comm, time_output; double time_start; - class NEB *neb; // NEB object - class Fix *fix_neb; // FixNEB object - class Compute *compute_event; // compute to detect event - class FixEventTAD *fix_event; // current event/state - class FixStorePeratom *fix_revert; // revert state - FixEventTAD **fix_event_list; // list of possible events - int n_event_list; // number of events - int nmax_event_list; // allocated events - int nmin_event_list; // minimum allocation + class NEB *neb; // NEB object + class Fix *fix_neb; // FixNEB object + class Compute *compute_event; // compute to detect event + class FixEventTAD *fix_event; // current event/state + class FixStoreAtom *fix_revert; // revert state + FixEventTAD **fix_event_list; // list of possible events + int n_event_list; // number of events + int nmax_event_list; // allocated events + int nmin_event_list; // minimum allocation char *neb_logfilename; // filename for ulogfile_neb FILE *uscreen_neb; // neb universe screen output diff --git a/src/VTK/dump_vtk.cpp b/src/VTK/dump_vtk.cpp index c4dd68bf3c..75033684ae 100644 --- a/src/VTK/dump_vtk.cpp +++ b/src/VTK/dump_vtk.cpp @@ -31,7 +31,7 @@ #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "input.h" @@ -2357,16 +2357,16 @@ int DumpVTK::modify_param(int narg, char **arg) thresh_value[nthresh] = utils::numeric(FLERR,arg[3],false,lmp); thresh_last[nthresh] = -1; } else { - thresh_fix = (FixStorePeratom **) - memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStorePeratom *),"dump:thresh_fix"); + thresh_fix = (FixStoreAtom **) + memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStoreAtom *),"dump:thresh_fix"); thresh_fixID = (char **) memory->srealloc(thresh_fixID,(nthreshlast+1)*sizeof(char *),"dump:thresh_fixID"); memory->grow(thresh_first,(nthreshlast+1),"dump:thresh_first"); std::string threshid = fmt::format("{}{}_DUMP_STORE",id,nthreshlast); thresh_fixID[nthreshlast] = utils::strdup(threshid); - threshid += fmt::format(" {} STORE/PERATOM 1 0 0 1", group->names[igroup]); - thresh_fix[nthreshlast] = dynamic_cast(modify->add_fix(threshid)); + threshid += fmt::format(" {} STORE/ATOM 1 0 0 1", group->names[igroup]); + thresh_fix[nthreshlast] = dynamic_cast(modify->add_fix(threshid)); thresh_last[nthreshlast] = nthreshlast; thresh_first[nthreshlast] = 1; diff --git a/src/balance.cpp b/src/balance.cpp index 8d1ba460db..3bd083e2b9 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -26,7 +26,7 @@ #include "neighbor.h" #include "comm.h" #include "domain.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "imbalance.h" #include "imbalance_group.h" @@ -513,9 +513,9 @@ void Balance::weight_storage(char *prefix) if (prefix) cmd = prefix; cmd += "IMBALANCE_WEIGHTS"; - fixstore = dynamic_cast(modify->get_fix_by_id(cmd)); + fixstore = dynamic_cast(modify->get_fix_by_id(cmd)); if (!fixstore) - fixstore = dynamic_cast(modify->add_fix(cmd + " all STORE/PERATOM 1 0 0 0")); + fixstore = dynamic_cast(modify->add_fix(cmd + " all STORE/ATOM 1 0 0 0")); // do not carry weights with atoms during normal atom migration diff --git a/src/balance.h b/src/balance.h index 3a6e8bf457..669d21e2b5 100644 --- a/src/balance.h +++ b/src/balance.h @@ -27,11 +27,11 @@ namespace LAMMPS_NS { class Balance : public Command { public: class RCB *rcb; - class FixStorePeratom *fixstore; // per-atom weights stored in FixStorePeratom - int wtflag; // 1 if particle weighting is used - int varflag; // 1 if weight style var(iable) is used - int sortflag; // 1 if sorting of comm messages is done - int outflag; // 1 for output of balance results to file + class FixStoreAtom *fixstore; // per-atom weights stored in FixStorePeratom + int wtflag; // 1 if particle weighting is used + int varflag; // 1 if weight style var(iable) is used + int sortflag; // 1 if sorting of comm messages is done + int outflag; // 1 for output of balance results to file Balance(class LAMMPS *); ~Balance() override; diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index b59449989b..f5c68c8f25 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -21,7 +21,7 @@ #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "input.h" #include "lattice.h" @@ -571,8 +571,8 @@ void ComputeChunkAtom::init() if ((idsflag == ONCE || lockcount) && !fixstore) { id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fixstore = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1", id_fix, group->names[igroup]))); + fixstore = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1", id_fix, group->names[igroup]))); } if ((idsflag != ONCE && !lockcount) && fixstore) { diff --git a/src/compute_chunk_atom.h b/src/compute_chunk_atom.h index 6850003b3e..943e36c985 100644 --- a/src/compute_chunk_atom.h +++ b/src/compute_chunk_atom.h @@ -93,7 +93,7 @@ class ComputeChunkAtom : public Compute { double *varatom; char *id_fix; - class FixStorePeratom *fixstore; + class FixStoreAtom *fixstore; class Fix *lockfix; // ptr to FixAveChunk that is locking out setups // null pointer if no lock currently in place diff --git a/src/compute_displace_atom.cpp b/src/compute_displace_atom.cpp index 6f352fa111..9f37ff2a78 100644 --- a/src/compute_displace_atom.cpp +++ b/src/compute_displace_atom.cpp @@ -17,7 +17,7 @@ #include "atom.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "input.h" #include "memory.h" @@ -74,8 +74,8 @@ ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) : // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(std::string(id) + "_COMPUTE_STORE"); - fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); + fix = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 3 0 0 1", id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file @@ -120,7 +120,7 @@ void ComputeDisplaceAtom::init() { // set fix which stores original atom coords - fix = dynamic_cast(modify->get_fix_by_id(id_fix)); + fix = dynamic_cast(modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR,"Could not find compute displace/atom fix with ID {}", id_fix); if (refreshflag) { diff --git a/src/compute_displace_atom.h b/src/compute_displace_atom.h index dc1be7434f..006928bd42 100644 --- a/src/compute_displace_atom.h +++ b/src/compute_displace_atom.h @@ -38,7 +38,7 @@ class ComputeDisplaceAtom : public Compute { int nmax; double **displace; char *id_fix; - class FixStorePeratom *fix; + class FixStoreAtom *fix; int refreshflag, ivar, nvmax; // refresh option is enabled char *rvar; // for incremental dumps diff --git a/src/compute_msd.cpp b/src/compute_msd.cpp index ecbb540a48..e73dbd3d53 100644 --- a/src/compute_msd.cpp +++ b/src/compute_msd.cpp @@ -16,7 +16,7 @@ #include "atom.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "modify.h" #include "update.h" @@ -63,8 +63,8 @@ ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, a // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); + fix = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 3 0 0 1", id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file @@ -127,7 +127,7 @@ void ComputeMSD::init() { // set fix which stores reference atom coords - fix = dynamic_cast(modify->get_fix_by_id(id_fix)); + fix = dynamic_cast(modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR, "Could not find compute msd fix with ID {}", id_fix); // nmsd = # of atoms in group diff --git a/src/compute_msd.h b/src/compute_msd.h index a273e9cf58..ffb0c18c8c 100644 --- a/src/compute_msd.h +++ b/src/compute_msd.h @@ -39,7 +39,7 @@ class ComputeMSD : public Compute { bigint nmsd; double masstotal; char *id_fix; - class FixStorePeratom *fix; + class FixStoreAtom *fix; }; } // namespace LAMMPS_NS diff --git a/src/compute_vacf.cpp b/src/compute_vacf.cpp index 9d6018d05b..acf1405092 100644 --- a/src/compute_vacf.cpp +++ b/src/compute_vacf.cpp @@ -18,7 +18,7 @@ #include "update.h" #include "group.h" #include "modify.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "error.h" using namespace LAMMPS_NS; @@ -39,8 +39,8 @@ ComputeVACF::ComputeVACF(LAMMPS *lmp, int narg, char **arg) : // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); + fix = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 3 0 0 1", id_fix, group->names[igroup]))); // store current velocities in fix store array // skip if reset from restart file @@ -84,7 +84,7 @@ void ComputeVACF::init() { // set fix which stores original atom velocities - fix = dynamic_cast(modify->get_fix_by_id(id_fix)); + fix = dynamic_cast(modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR,"Could not find compute vacf fix ID {}", id_fix); // nvacf = # of atoms in group diff --git a/src/compute_vacf.h b/src/compute_vacf.h index 42b3ed4adc..8e5e57ab65 100644 --- a/src/compute_vacf.h +++ b/src/compute_vacf.h @@ -35,7 +35,7 @@ class ComputeVACF : public Compute { protected: bigint nvacf; char *id_fix; - class FixStorePeratom *fix; + class FixStoreAtom *fix; }; } // namespace LAMMPS_NS diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 922fd4f6fc..8667c6af12 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -20,7 +20,7 @@ #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "input.h" #include "memory.h" @@ -2005,16 +2005,16 @@ int DumpCustom::modify_param(int narg, char **arg) thresh_value[nthresh] = utils::numeric(FLERR,arg[3],false,lmp); thresh_last[nthresh] = -1; } else { - thresh_fix = (FixStorePeratom **) - memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStorePeratom *),"dump:thresh_fix"); + thresh_fix = (FixStoreAtom **) + memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStoreAtom *),"dump:thresh_fix"); thresh_fixID = (char **) memory->srealloc(thresh_fixID,(nthreshlast+1)*sizeof(char *),"dump:thresh_fixID"); memory->grow(thresh_first,(nthreshlast+1),"dump:thresh_first"); std::string threshid = fmt::format("{}{}_DUMP_STORE",id,nthreshlast); thresh_fixID[nthreshlast] = utils::strdup(threshid); - threshid += fmt::format(" {} STORE/PERATOM 1 0 0 1", group->names[igroup]); - thresh_fix[nthreshlast] = dynamic_cast(modify->add_fix(threshid)); + threshid += fmt::format(" {} STORE/ATOM 1 0 0 1", group->names[igroup]); + thresh_fix[nthreshlast] = dynamic_cast(modify->add_fix(threshid)); thresh_last[nthreshlast] = nthreshlast; thresh_first[nthreshlast] = 1; diff --git a/src/dump_custom.h b/src/dump_custom.h index da49ffdc22..b600bd60b8 100644 --- a/src/dump_custom.h +++ b/src/dump_custom.h @@ -37,19 +37,19 @@ class DumpCustom : public Dump { int nevery; // dump frequency for output char *idregion; // region ID, nullptr if no region - int nthresh; // # of defined thresholds - int nthreshlast; // # of defined thresholds with value = LAST - // - int *thresh_array; // array to threshold on for each nthresh - int *thresh_op; // threshold operation for each nthresh - double *thresh_value; // threshold value for each nthresh - int *thresh_last; // for threshold value = LAST, - // index into thresh_fix - // -1 if not LAST, value is numeric - // - class FixStorePeratom **thresh_fix; // stores values for each threshold LAST - char **thresh_fixID; // IDs of thresh_fixes - int *thresh_first; // 1 the first time a FixStore values accessed + int nthresh; // # of defined thresholds + int nthreshlast; // # of defined thresholds with value = LAST + // + int *thresh_array; // array to threshold on for each nthresh + int *thresh_op; // threshold operation for each nthresh + double *thresh_value; // threshold value for each nthresh + int *thresh_last; // for threshold value = LAST, + // index into thresh_fix + // -1 if not LAST, value is numeric + // + class FixStoreAtom **thresh_fix; // stores values for each threshold LAST + char **thresh_fixID; // IDs of thresh_fixes + int *thresh_first; // 1 the first time a FixStore values accessed int expand; // flag for whether field args were expanded char **earg; // field names with wildcard expansion diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 98cf955485..8dd97250a3 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -19,7 +19,7 @@ #include "bond.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "input.h" @@ -278,8 +278,8 @@ void FixAdapt::post_constructor() if (diamflag && atom->radius_flag) { id_fix_diam = utils::strdup(id + std::string("_FIX_STORE_DIAM")); - fix_diam = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); + fix_diam = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); if (fix_diam->restart_reset) fix_diam->restart_reset = 0; else { double *vec = fix_diam->vstore; @@ -296,8 +296,8 @@ void FixAdapt::post_constructor() if (chgflag && atom->q_flag) { id_fix_chg = utils::strdup(id + std::string("_FIX_STORE_CHG")); - fix_chg = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); + fix_chg = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); if (fix_chg->restart_reset) fix_chg->restart_reset = 0; else { double *vec = fix_chg->vstore; @@ -494,11 +494,11 @@ void FixAdapt::init() // fixes that store initial per-atom values if (id_fix_diam) { - fix_diam = dynamic_cast(modify->get_fix_by_id(id_fix_diam)); + fix_diam = dynamic_cast(modify->get_fix_by_id(id_fix_diam)); if (!fix_diam) error->all(FLERR,"Could not find fix adapt storage fix ID {}", id_fix_diam); } if (id_fix_chg) { - fix_chg = dynamic_cast(modify->get_fix_by_id(id_fix_chg)); + fix_chg = dynamic_cast(modify->get_fix_by_id(id_fix_chg)); if (!fix_chg) error->all(FLERR,"Could not find fix adapt storage fix ID {}", id_fix_chg); } diff --git a/src/fix_adapt.h b/src/fix_adapt.h index 82dc739c67..f8477f7259 100644 --- a/src/fix_adapt.h +++ b/src/fix_adapt.h @@ -48,7 +48,7 @@ class FixAdapt : public Fix { int anypair, anybond, anyangle; int nlevels_respa; char *id_fix_diam, *id_fix_chg; - class FixStorePeratom *fix_diam, *fix_chg; + class FixStoreAtom *fix_diam, *fix_chg; double previous_diam_scale, previous_chg_scale; int discflag; diff --git a/src/fix_balance.cpp b/src/fix_balance.cpp index 06274eea03..844ffe474e 100644 --- a/src/fix_balance.cpp +++ b/src/fix_balance.cpp @@ -19,7 +19,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "irregular.h" #include "kspace.h" diff --git a/src/fix_store_peratom.cpp b/src/fix_store_atom.cpp similarity index 88% rename from src/fix_store_peratom.cpp rename to src/fix_store_atom.cpp index 2a8429e42f..461959d264 100644 --- a/src/fix_store_peratom.cpp +++ b/src/fix_store_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "atom.h" #include "error.h" @@ -32,10 +32,10 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ -FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : +FixStoreAtom::FixStoreAtom(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), vstore(nullptr), astore(nullptr) { - if (narg != 7) error->all(FLERR, "Illegal fix STORE/PERATOM command: number of args"); + if (narg != 7) error->all(FLERR, "Illegal fix STORE/ATOM command: number of args"); disable = 0; @@ -52,7 +52,7 @@ FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : else if (n1 > 0 && n2 > 0) tensorflag = 1; else - error->all(FLERR, "Illegal fix STORE/PERATOM dimension args: {} {}", n1, n2); + error->all(FLERR, "Illegal fix STORE/ATOM dimension args: {} {}", n1, n2); if (vecflag || arrayflag) nvalues = n1; @@ -71,7 +71,7 @@ FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : astore = nullptr; tstore = nullptr; - FixStorePeratom::grow_arrays(atom->nmax); + FixStoreAtom::grow_arrays(atom->nmax); atom->add_callback(Atom::GROW); if (restartflag) atom->add_callback(Atom::RESTART); if (ghostflag) atom->add_callback(Atom::BORDER); @@ -93,7 +93,7 @@ FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : /* ---------------------------------------------------------------------- */ -FixStorePeratom::~FixStorePeratom() +FixStoreAtom::~FixStoreAtom() { // unregister callbacks to this fix from Atom class @@ -108,7 +108,7 @@ FixStorePeratom::~FixStorePeratom() /* ---------------------------------------------------------------------- */ -int FixStorePeratom::setmask() +int FixStoreAtom::setmask() { int mask = 0; return mask; @@ -118,7 +118,7 @@ int FixStorePeratom::setmask() allocate atom-based array ------------------------------------------------------------------------- */ -void FixStorePeratom::grow_arrays(int nmax) +void FixStoreAtom::grow_arrays(int nmax) { if (vecflag) memory->grow(vstore, nmax, "store:vstore"); @@ -132,7 +132,7 @@ void FixStorePeratom::grow_arrays(int nmax) copy values within local atom-based array ------------------------------------------------------------------------- */ -void FixStorePeratom::copy_arrays(int i, int j, int /*delflag*/) +void FixStoreAtom::copy_arrays(int i, int j, int /*delflag*/) { if (disable) return; @@ -149,7 +149,7 @@ void FixStorePeratom::copy_arrays(int i, int j, int /*delflag*/) pack values for border communication at re-neighboring ------------------------------------------------------------------------- */ -int FixStorePeratom::pack_border(int n, int *list, double *buf) +int FixStoreAtom::pack_border(int n, int *list, double *buf) { int i, j, k; @@ -179,7 +179,7 @@ int FixStorePeratom::pack_border(int n, int *list, double *buf) unpack values for border communication at re-neighboring ------------------------------------------------------------------------- */ -int FixStorePeratom::unpack_border(int n, int first, double *buf) +int FixStoreAtom::unpack_border(int n, int first, double *buf) { int i, k, last; @@ -203,7 +203,7 @@ int FixStorePeratom::unpack_border(int n, int first, double *buf) pack values in local atom-based array for exchange with another proc ------------------------------------------------------------------------- */ -int FixStorePeratom::pack_exchange(int i, double *buf) +int FixStoreAtom::pack_exchange(int i, double *buf) { if (disable) return 0; @@ -222,7 +222,7 @@ int FixStorePeratom::pack_exchange(int i, double *buf) unpack values in local atom-based array from exchange with another proc ------------------------------------------------------------------------- */ -int FixStorePeratom::unpack_exchange(int nlocal, double *buf) +int FixStoreAtom::unpack_exchange(int nlocal, double *buf) { if (disable) return 0; @@ -241,7 +241,7 @@ int FixStorePeratom::unpack_exchange(int nlocal, double *buf) pack values in local atom-based arrays for restart file ------------------------------------------------------------------------- */ -int FixStorePeratom::pack_restart(int i, double *buf) +int FixStoreAtom::pack_restart(int i, double *buf) { if (disable) { buf[0] = 0; @@ -266,7 +266,7 @@ int FixStorePeratom::pack_restart(int i, double *buf) unpack values from atom->extra array to restart the fix ------------------------------------------------------------------------- */ -void FixStorePeratom::unpack_restart(int nlocal, int nth) +void FixStoreAtom::unpack_restart(int nlocal, int nth) { if (disable) return; @@ -292,7 +292,7 @@ void FixStorePeratom::unpack_restart(int nlocal, int nth) maxsize of any atom's restart data ------------------------------------------------------------------------- */ -int FixStorePeratom::maxsize_restart() +int FixStoreAtom::maxsize_restart() { if (disable) return 1; return nvalues + 1; @@ -302,17 +302,17 @@ int FixStorePeratom::maxsize_restart() size of atom nlocal's restart data ------------------------------------------------------------------------- */ -int FixStorePeratom::size_restart(int /*nlocal*/) +int FixStoreAtom::size_restart(int /*nlocal*/) { if (disable) return 1; return nvalues + 1; } /* ---------------------------------------------------------------------- - memory usage of global or peratom atom-based array + memory usage of per-atom atom-based array ------------------------------------------------------------------------- */ -double FixStorePeratom::memory_usage() +double FixStoreAtom::memory_usage() { return (double) atom->nmax * nvalues * sizeof(double); } diff --git a/src/fix_store_peratom.h b/src/fix_store_atom.h similarity index 89% rename from src/fix_store_peratom.h rename to src/fix_store_atom.h index 9434ffe799..e13b8aa37d 100644 --- a/src/fix_store_peratom.h +++ b/src/fix_store_atom.h @@ -13,26 +13,26 @@ #ifdef FIX_CLASS // clang-format off -FixStyle(STORE/PERATOM,FixStorePeratom); +FixStyle(STORE/ATOM,FixStoreAtom); // clang-format on #else -#ifndef LMP_FIX_STORE_PERATOM_H -#define LMP_FIX_STORE_PERATOM_H +#ifndef LMP_FIX_STORE_ATOM_H +#define LMP_FIX_STORE_ATOM_H #include "fix.h" namespace LAMMPS_NS { -class FixStorePeratom : public Fix { +class FixStoreAtom : public Fix { public: double *vstore; // vector storage double **astore; // array storage double ***tstore; // tensor (3d array) storage int disable; // 1 if operations (except grow) are currently disabled - FixStorePeratom(class LAMMPS *, int, char **); - ~FixStorePeratom() override; + FixStoreAtom(class LAMMPS *, int, char **); + ~FixStoreAtom() override; int setmask() override; void grow_arrays(int) override; diff --git a/src/fix_store_global.cpp b/src/fix_store_global.cpp index cebf4f7690..028d35810e 100644 --- a/src/fix_store_global.cpp +++ b/src/fix_store_global.cpp @@ -182,7 +182,7 @@ void FixStoreGlobal::restart(char *buf) } /* ---------------------------------------------------------------------- - memory usage of global or peratom atom-based array + memory usage of global data ------------------------------------------------------------------------- */ double FixStoreGlobal::memory_usage() diff --git a/src/variable.cpp b/src/variable.cpp index 56a0604a7e..19aed73734 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -20,7 +20,7 @@ #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "info.h" #include "input.h" @@ -5027,8 +5027,8 @@ VarReader::VarReader(LAMMPS *lmp, char *name, char *file, int flag) : error->all(FLERR,"Cannot use atomfile-style variable unless an atom map exists"); id_fix = utils::strdup(std::string(name) + "_VARIABLE_STORE"); - fixstore = dynamic_cast( - modify->add_fix(std::string(id_fix) + " all STORE/PERATOM 1 0 0 0")); + fixstore = dynamic_cast( + modify->add_fix(std::string(id_fix) + " all STORE/ATOM 1 0 0 0")); buffer = new char[CHUNK*MAXLINE]; } } diff --git a/src/variable.h b/src/variable.h index 6326c5cc78..825a207d78 100644 --- a/src/variable.h +++ b/src/variable.h @@ -152,7 +152,7 @@ class Variable : protected Pointers { class VarReader : protected Pointers { public: - class FixStorePeratom *fixstore; + class FixStoreAtom *fixstore; char *id_fix; VarReader(class LAMMPS *, char *, char *, int); From 03454aeefb8920662c76ffab77f154ee1889b154 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 13 Mar 2023 23:07:11 -0400 Subject: [PATCH 420/445] compile GPU library with thread support when BUILD_OMP is enabled --- cmake/Modules/Packages/GPU.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index 90645d699b..a0578394f1 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -176,6 +176,10 @@ if(GPU_API STREQUAL "CUDA") target_include_directories(gpu PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini) target_compile_definitions(gpu PRIVATE -DUSE_CUDPP) endif() + if(BUILD_OMP) + find_package(OpenMP COMPONENTS CXX REQUIRED) + target_link_libraries(gpu PRIVATE OpenMP::OpenMP_CXX) + endif() target_link_libraries(lammps PRIVATE gpu) @@ -251,12 +255,18 @@ elseif(GPU_API STREQUAL "OPENCL") else() target_compile_definitions(gpu PRIVATE -DMPI_GERYON -DGERYON_NUMA_FISSION -DUCL_NO_EXIT) endif() + if(BUILD_OMP) + find_package(OpenMP COMPONENTS CXX REQUIRED) + target_link_libraries(gpu PRIVATE OpenMP::OpenMP_CXX) + endif() + target_link_libraries(lammps PRIVATE gpu) add_executable(ocl_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp) target_compile_definitions(ocl_get_devices PRIVATE -DUCL_OPENCL) target_link_libraries(ocl_get_devices PRIVATE OpenCL::OpenCL) add_dependencies(ocl_get_devices OpenCL::OpenCL) + elseif(GPU_API STREQUAL "HIP") if(NOT DEFINED HIP_PATH) if(NOT DEFINED ENV{HIP_PATH}) @@ -407,6 +417,10 @@ elseif(GPU_API STREQUAL "HIP") target_compile_definitions(gpu PRIVATE -DMPI_GERYON -DUCL_NO_EXIT) endif() target_link_libraries(gpu PRIVATE hip::host) + if(BUILD_OMP) + find_package(OpenMP COMPONENTS CXX REQUIRED) + target_link_libraries(gpu PRIVATE OpenMP::OpenMP_CXX) + endif() if(HIP_USE_DEVICE_SORT) if(HIP_PLATFORM STREQUAL "amd") From 14180774b7e94caa3b0a9fdef4e60adc0b1d2ae7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 14 Mar 2023 07:00:34 -0400 Subject: [PATCH 421/445] mention OpenMP support in the GPU library --- doc/src/Build_extras.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 4dd8c10b3f..e6366075ff 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -181,6 +181,9 @@ way no local OpenCL development headers or library needs to be present and only OpenCL compatible drivers need to be installed to use OpenCL. If this is not desired, you can set :code:`USE_STATIC_OPENCL_LOADER` to :code:`no`. +The GPU library has some multi-thread support using OpenMP. If LAMMPS is built +with ``-D BUILD_OMP=on`` this will also be enabled. + If you are compiling with HIP, note that before running CMake you will have to set appropriate environment variables. Some variables such as :code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are necessary for :code:`hipcc` @@ -278,6 +281,9 @@ To support the CUDA multiprocessor server you can set the define the CUDA performance primitives and thus set the variable ``CUDPP_OPT`` to empty. +The GPU library has some multi-thread support using OpenMP. You need to add +the compiler flag that enables OpenMP to the ``CUDR_OPTS`` Makefile variable. + If the library build is successful, 3 files should be created: ``lib/gpu/libgpu.a``\ , ``lib/gpu/nvc_get_devices``\ , and ``lib/gpu/Makefile.lammps``\ . The latter has settings that enable LAMMPS From 88c8781396db1ec05f967648102fb4647fdebcd0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 14 Mar 2023 10:17:20 -0400 Subject: [PATCH 422/445] silence compiler warnings --- src/pair_lj_cut_coul_cut.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pair_lj_cut_coul_cut.cpp b/src/pair_lj_cut_coul_cut.cpp index 5438e82377..e62e08ea4b 100644 --- a/src/pair_lj_cut_coul_cut.cpp +++ b/src/pair_lj_cut_coul_cut.cpp @@ -465,7 +465,7 @@ void PairLJCutCoulCut::born_matrix(int i, int j, int itype, int jtype, double rs double factor_coul, double factor_lj, double &dupair, double &du2pair) { - double rinv, r2inv, r3inv, r6inv, du, du2; + double rinv, r2inv, r3inv, r6inv; double du_lj, du2_lj, du_coul, du2_coul; double *q = atom->q; From 32c695a7d40d6ff886a45bab7581d4f035bcf60a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 15 Mar 2023 11:29:52 -0400 Subject: [PATCH 423/445] tag all TIP4P related pair style tests as unstable --- unittest/force-styles/tests/mol-pair-lj_cut_tip4p_cut.yaml | 1 + unittest/force-styles/tests/mol-pair-lj_cut_tip4p_long.yaml | 1 + .../force-styles/tests/mol-pair-lj_cut_tip4p_long_soft.yaml | 1 + unittest/force-styles/tests/mol-pair-lj_cut_tip4p_table.yaml | 1 + .../force-styles/tests/mol-pair-lj_long_cut_tip4p_long.yaml | 1 + unittest/force-styles/tests/mol-pair-lj_long_tip4p_long.yaml | 2 +- unittest/force-styles/tests/mol-pair-lj_table_tip4p_long.yaml | 2 +- unittest/force-styles/tests/mol-pair-lj_table_tip4p_table.yaml | 2 +- unittest/force-styles/tests/mol-pair-tip4p_cut.yaml | 1 + unittest/force-styles/tests/mol-pair-tip4p_long.yaml | 1 + unittest/force-styles/tests/mol-pair-tip4p_long_soft.yaml | 1 + unittest/force-styles/tests/mol-pair-tip4p_table.yaml | 1 + 12 files changed, 12 insertions(+), 3 deletions(-) diff --git a/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_cut.yaml b/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_cut.yaml index 141d61f8ae..95080fcdc6 100644 --- a/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_cut.yaml +++ b/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_cut.yaml @@ -1,5 +1,6 @@ --- lammps_version: 17 Feb 2022 +tags: unstable date_generated: Fri Mar 18 22:17:32 2022 epsilon: 5e-10 skip_tests: diff --git a/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_long.yaml b/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_long.yaml index 28961cd04e..00ff7f3842 100644 --- a/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_long.yaml +++ b/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_long.yaml @@ -1,5 +1,6 @@ --- lammps_version: 17 Feb 2022 +tags: unstable date_generated: Fri Mar 18 22:17:32 2022 epsilon: 2e-11 skip_tests: diff --git a/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_long_soft.yaml b/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_long_soft.yaml index 29cd06c4a9..55331e09e9 100644 --- a/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_long_soft.yaml +++ b/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_long_soft.yaml @@ -1,5 +1,6 @@ --- lammps_version: 17 Feb 2022 +tags: unstable date_generated: Fri Mar 18 22:17:32 2022 epsilon: 1.0e-12 skip_tests: diff --git a/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_table.yaml b/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_table.yaml index 34a48e8f5f..5e6d460b65 100644 --- a/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_table.yaml +++ b/unittest/force-styles/tests/mol-pair-lj_cut_tip4p_table.yaml @@ -1,5 +1,6 @@ --- lammps_version: 17 Feb 2022 +tags: unstable date_generated: Fri Mar 18 22:17:32 2022 epsilon: 5e-13 skip_tests: gpu diff --git a/unittest/force-styles/tests/mol-pair-lj_long_cut_tip4p_long.yaml b/unittest/force-styles/tests/mol-pair-lj_long_cut_tip4p_long.yaml index ef1fb4f4cd..80b844e7c5 100644 --- a/unittest/force-styles/tests/mol-pair-lj_long_cut_tip4p_long.yaml +++ b/unittest/force-styles/tests/mol-pair-lj_long_cut_tip4p_long.yaml @@ -1,5 +1,6 @@ --- lammps_version: 17 Feb 2022 +tags: unstable date_generated: Fri Mar 18 22:17:33 2022 epsilon: 2.5e-09 skip_tests: diff --git a/unittest/force-styles/tests/mol-pair-lj_long_tip4p_long.yaml b/unittest/force-styles/tests/mol-pair-lj_long_tip4p_long.yaml index 0a4639b1c9..72fc77efa4 100644 --- a/unittest/force-styles/tests/mol-pair-lj_long_tip4p_long.yaml +++ b/unittest/force-styles/tests/mol-pair-lj_long_tip4p_long.yaml @@ -1,6 +1,6 @@ --- lammps_version: 17 Feb 2022 -tags: slow +tags: slow unstable date_generated: Fri Mar 18 22:17:33 2022 epsilon: 2.5e-09 skip_tests: diff --git a/unittest/force-styles/tests/mol-pair-lj_table_tip4p_long.yaml b/unittest/force-styles/tests/mol-pair-lj_table_tip4p_long.yaml index 817a1fcae8..6a20bf7b73 100644 --- a/unittest/force-styles/tests/mol-pair-lj_table_tip4p_long.yaml +++ b/unittest/force-styles/tests/mol-pair-lj_table_tip4p_long.yaml @@ -1,6 +1,6 @@ --- lammps_version: 17 Feb 2022 -tags: slow +tags: slow unstable date_generated: Fri Mar 18 22:17:34 2022 epsilon: 2.5e-09 skip_tests: diff --git a/unittest/force-styles/tests/mol-pair-lj_table_tip4p_table.yaml b/unittest/force-styles/tests/mol-pair-lj_table_tip4p_table.yaml index c64b01d34a..02a58d0e95 100644 --- a/unittest/force-styles/tests/mol-pair-lj_table_tip4p_table.yaml +++ b/unittest/force-styles/tests/mol-pair-lj_table_tip4p_table.yaml @@ -1,6 +1,6 @@ --- lammps_version: 17 Feb 2022 -tags: slow +tags: slow unstable date_generated: Fri Mar 18 22:17:35 2022 epsilon: 2.5e-09 skip_tests: diff --git a/unittest/force-styles/tests/mol-pair-tip4p_cut.yaml b/unittest/force-styles/tests/mol-pair-tip4p_cut.yaml index 52fea193d5..09e96c1a7f 100644 --- a/unittest/force-styles/tests/mol-pair-tip4p_cut.yaml +++ b/unittest/force-styles/tests/mol-pair-tip4p_cut.yaml @@ -1,5 +1,6 @@ --- lammps_version: 17 Feb 2022 +tags: unstable date_generated: Fri Mar 18 22:17:36 2022 epsilon: 5.0e-10 skip_tests: diff --git a/unittest/force-styles/tests/mol-pair-tip4p_long.yaml b/unittest/force-styles/tests/mol-pair-tip4p_long.yaml index e79a216951..072642c471 100644 --- a/unittest/force-styles/tests/mol-pair-tip4p_long.yaml +++ b/unittest/force-styles/tests/mol-pair-tip4p_long.yaml @@ -1,5 +1,6 @@ --- lammps_version: 17 Feb 2022 +tags: unstable date_generated: Fri Mar 18 22:17:36 2022 epsilon: 5e-13 skip_tests: diff --git a/unittest/force-styles/tests/mol-pair-tip4p_long_soft.yaml b/unittest/force-styles/tests/mol-pair-tip4p_long_soft.yaml index cf96b906c2..ec4590c0f8 100644 --- a/unittest/force-styles/tests/mol-pair-tip4p_long_soft.yaml +++ b/unittest/force-styles/tests/mol-pair-tip4p_long_soft.yaml @@ -1,5 +1,6 @@ --- lammps_version: 17 Feb 2022 +tags: unstable date_generated: Fri Mar 18 22:17:36 2022 epsilon: 1e-13 skip_tests: diff --git a/unittest/force-styles/tests/mol-pair-tip4p_table.yaml b/unittest/force-styles/tests/mol-pair-tip4p_table.yaml index eeef0d30ad..e76ecdf0f0 100644 --- a/unittest/force-styles/tests/mol-pair-tip4p_table.yaml +++ b/unittest/force-styles/tests/mol-pair-tip4p_table.yaml @@ -1,5 +1,6 @@ --- lammps_version: 17 Feb 2022 +tags: unstable date_generated: Fri Mar 18 22:17:36 2022 epsilon: 2.5e-13 skip_tests: From fa9062a87e74523048b561321c8f3859e774fd30 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 15 Mar 2023 18:39:32 -0400 Subject: [PATCH 424/445] make Force::special_lj and Force::special_coul accessible through the library interface --- python/lammps/core.py | 3 ++- src/library.cpp | 12 +++++++++++ .../c-library/test_library_properties.cpp | 21 +++++++++++++++++++ unittest/python/python-commands.py | 6 ++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/python/lammps/core.py b/python/lammps/core.py index e4f8d807b6..80961186f3 100644 --- a/python/lammps/core.py +++ b/python/lammps/core.py @@ -814,7 +814,8 @@ class lammps(object): # set length of vector for items that are not a scalar vec_dict = { 'boxlo':3, 'boxhi':3, 'sublo':3, 'subhi':3, - 'sublo_lambda':3, 'subhi_lambda':3, 'periodicity':3 } + 'sublo_lambda':3, 'subhi_lambda':3, 'periodicity':3, + 'special_lj':4, 'special_coul':4 } if name in vec_dict: veclen = vec_dict[name] elif name == 'respa_dt': diff --git a/src/library.cpp b/src/library.cpp index 9f817a1199..cc4e748f57 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -1232,6 +1232,8 @@ int lammps_extract_global_datatype(void * /*handle*/, const char *name) if (strcmp(name,"nghost") == 0) return LAMMPS_INT; if (strcmp(name,"nmax") == 0) return LAMMPS_INT; if (strcmp(name,"ntypes") == 0) return LAMMPS_INT; + if (strcmp(name,"special_lj") == 0) return LAMMPS_DOUBLE; + if (strcmp(name,"special_coul") == 0) return LAMMPS_DOUBLE; if (strcmp(name,"q_flag") == 0) return LAMMPS_INT; @@ -1470,6 +1472,14 @@ report the "native" data type. The following tables are provided: - int - 1 - maximum of nlocal+nghost across all MPI ranks (for per-atom data array size). + * - special_lj + - double + - 4 + - special :doc:`pair weighting factors ` for LJ interactions (first element is always 1.0) + * - special_coul + - double + - 4 + - special :doc:`pair weighting factors ` for Coulomb interactions (first element is always 1.0) * - q_flag - int - 1 @@ -1625,6 +1635,8 @@ void *lammps_extract_global(void *handle, const char *name) if (strcmp(name,"nlocal") == 0) return (void *) &lmp->atom->nlocal; if (strcmp(name,"nghost") == 0) return (void *) &lmp->atom->nghost; if (strcmp(name,"nmax") == 0) return (void *) &lmp->atom->nmax; + if (strcmp(name,"special_lj") == 0) return (void *) lmp->force->special_lj; + if (strcmp(name,"special_coul") == 0) return (void *) lmp->force->special_coul; if (strcmp(name,"q_flag") == 0) return (void *) &lmp->atom->q_flag; diff --git a/unittest/c-library/test_library_properties.cpp b/unittest/c-library/test_library_properties.cpp index bb0f6e2894..d6dd55f75e 100644 --- a/unittest/c-library/test_library_properties.cpp +++ b/unittest/c-library/test_library_properties.cpp @@ -297,6 +297,7 @@ TEST_F(LibraryProperties, global) std::string input = path_join(INPUT_DIR, "in.fourmol"); if (!verbose) ::testing::internal::CaptureStdout(); + lammps_command(lmp, "special_bonds lj 0.0 0.5 0.8 coul 0.1 0.5 1.0"); lammps_file(lmp, input.c_str()); lammps_command(lmp, "run 2 post no"); if (!verbose) ::testing::internal::GetCapturedStdout(); @@ -321,6 +322,26 @@ TEST_F(LibraryProperties, global) EXPECT_EQ(lammps_extract_global_datatype(lmp, "dt"), LAMMPS_DOUBLE); double *d_ptr = (double *)lammps_extract_global(lmp, "dt"); EXPECT_DOUBLE_EQ((*d_ptr), 0.1); + + EXPECT_EQ(lammps_extract_global_datatype(lmp, "special_lj"), LAMMPS_DOUBLE); + EXPECT_EQ(lammps_extract_global_datatype(lmp, "special_coul"), LAMMPS_DOUBLE); + double *special_lj = (double *)lammps_extract_global(lmp, "special_lj"); + double *special_coul= (double *)lammps_extract_global(lmp, "special_coul"); + EXPECT_DOUBLE_EQ(special_lj[0], 1.0); + EXPECT_DOUBLE_EQ(special_lj[1], 0.0); + EXPECT_DOUBLE_EQ(special_lj[2], 0.5); + EXPECT_DOUBLE_EQ(special_lj[3], 0.8); + EXPECT_DOUBLE_EQ(special_coul[0], 1.0); + EXPECT_DOUBLE_EQ(special_coul[1], 0.1); + EXPECT_DOUBLE_EQ(special_coul[2], 0.5); + EXPECT_DOUBLE_EQ(special_coul[3], 1.0); + lammps_command(lmp, "special_bonds lj/coul 1.0 1.0 1.0"); + EXPECT_DOUBLE_EQ(special_lj[1], 1.0); + EXPECT_DOUBLE_EQ(special_lj[2], 1.0); + EXPECT_DOUBLE_EQ(special_lj[3], 1.0); + EXPECT_DOUBLE_EQ(special_coul[1], 1.0); + EXPECT_DOUBLE_EQ(special_coul[2], 1.0); + EXPECT_DOUBLE_EQ(special_coul[3], 1.0); }; TEST_F(LibraryProperties, neighlist) diff --git a/unittest/python/python-commands.py b/unittest/python/python-commands.py index 13be27f067..33b19ba4f0 100644 --- a/unittest/python/python-commands.py +++ b/unittest/python/python-commands.py @@ -536,6 +536,7 @@ create_atoms 1 single & def test_extract_global(self): self.lmp.command("region box block -1 1 -2 2 -3 3") self.lmp.command("create_box 1 box") + self.lmp.command("special_bonds lj 0.0 0.5 0.8 coul 0.1 0.5 1.0") self.assertEqual(self.lmp.extract_global("units"), "lj") self.assertEqual(self.lmp.extract_global("ntimestep"), 0) self.assertEqual(self.lmp.extract_global("dt"), 0.005) @@ -552,10 +553,15 @@ create_atoms 1 single & self.assertEqual(self.lmp.extract_global("subhi"), [1.0, 2.0, 3.0]) self.assertEqual(self.lmp.extract_global("periodicity"), [1,1,1]) self.assertEqual(self.lmp.extract_global("triclinic"), 0) + self.assertEqual(self.lmp.extract_global("special_lj"), [1.0, 0.0, 0.5, 0.8]) + self.assertEqual(self.lmp.extract_global("special_coul"), [1.0, 0.1, 0.5, 1.0]) self.assertEqual(self.lmp.extract_global("sublo_lambda"), None) self.assertEqual(self.lmp.extract_global("subhi_lambda"), None) self.assertEqual(self.lmp.extract_global("respa_levels"), None) self.assertEqual(self.lmp.extract_global("respa_dt"), None) + self.lmp.command("special_bonds lj/coul 0.0 1.0 1.0") + self.assertEqual(self.lmp.extract_global("special_lj"), [1.0, 0.0, 1.0, 1.0]) + self.assertEqual(self.lmp.extract_global("special_coul"), [1.0, 0.0, 1.0, 1.0]) # set and initialize r-RESPA self.lmp.command("run_style respa 3 5 2 pair 2 kspace 3") From 56f4aaff474f3c02f731781b549f13fe91594a63 Mon Sep 17 00:00:00 2001 From: Jacob Gissinger Date: Wed, 15 Mar 2023 21:28:05 -0400 Subject: [PATCH 425/445] explicitly specify central atom --- src/EXTRA-MOLECULE/improper_fourier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EXTRA-MOLECULE/improper_fourier.cpp b/src/EXTRA-MOLECULE/improper_fourier.cpp index 3eef060204..295657b1b6 100644 --- a/src/EXTRA-MOLECULE/improper_fourier.cpp +++ b/src/EXTRA-MOLECULE/improper_fourier.cpp @@ -40,7 +40,7 @@ ImproperFourier::ImproperFourier(LAMMPS *lmp) : Improper(lmp) // the first and fourth atoms in the quadruplet are the atoms of symmetry symmatoms[0] = 1; - symmatoms[3] = 1; + symmatoms[3] = 2; } /* ---------------------------------------------------------------------- */ From 0bf0fd98cc8425fc82e49d2aa9cd7b4727626010 Mon Sep 17 00:00:00 2001 From: Jacob Gissinger Date: Wed, 15 Mar 2023 21:29:14 -0400 Subject: [PATCH 426/445] explicitly specify central atom --- src/MOLECULE/improper_umbrella.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MOLECULE/improper_umbrella.cpp b/src/MOLECULE/improper_umbrella.cpp index 52bc692670..1558adc337 100644 --- a/src/MOLECULE/improper_umbrella.cpp +++ b/src/MOLECULE/improper_umbrella.cpp @@ -43,7 +43,7 @@ ImproperUmbrella::ImproperUmbrella(LAMMPS *_lmp) : Improper(_lmp) // the first and fourth atoms in the quadruplet are the atoms of symmetry symmatoms[0] = 1; - symmatoms[3] = 1; + symmatoms[3] = 2; } /* ---------------------------------------------------------------------- */ From 4940bda15fce53ab698edeb147b02b79fa1dae2d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 15 Mar 2023 23:08:46 -0400 Subject: [PATCH 427/445] remove references to "make install" for Python package installation --- doc/src/Python_install.rst | 141 +------------------------------------ 1 file changed, 2 insertions(+), 139 deletions(-) diff --git a/doc/src/Python_install.rst b/doc/src/Python_install.rst index bc0406ee92..cc1e2cb5c9 100644 --- a/doc/src/Python_install.rst +++ b/doc/src/Python_install.rst @@ -27,124 +27,19 @@ interpreter can find it and installing the LAMMPS shared library into a folder that the dynamic loader searches or inside of the installed ``lammps`` package folder. There are multiple ways to achieve this. -#. Do a full LAMMPS installation of libraries, executables, selected - headers, documentation (if enabled), and supporting files (only - available via CMake), which can also be either system-wide or into - user specific folders. - #. Install both components into a Python ``site-packages`` folder, either system-wide or in the corresponding user-specific folder. This way no additional environment variables need to be set, but the shared library is otherwise not accessible. -#. Do an installation into a virtual environment. This can either be an - installation of the Python package only or a full installation of LAMMPS. +#. Do an installation into a virtual environment. #. Leave the files where they are in the source/development tree and adjust some environment variables. .. tabs:: - .. tab:: Full install (CMake-only) - - :ref:`Build the LAMMPS executable and library ` with - ``-DBUILD_SHARED_LIBS=on``, ``-DLAMMPS_EXCEPTIONS=on`` and - ``-DPKG_PYTHON=on`` (The first option is required, the other two - are optional by recommended). The exact file name of the shared - library depends on the platform (Unix/Linux, macOS, Windows) and - the build configuration being used. The installation base folder - is already set by default to the ``$HOME/.local`` directory, but - it can be changed to a custom location defined by the - ``CMAKE_INSTALL_PREFIX`` CMake variable. This uses a folder - called ``build`` to store files generated during compilation. - - .. code-block:: bash - - # create build folder - mkdir build - cd build - - # configure LAMMPS compilation - cmake -C ../cmake/presets/basic.cmake -D BUILD_SHARED_LIBS=on \ - -D LAMMPS_EXCEPTIONS=on -D PKG_PYTHON=on ../cmake - - # compile LAMMPS - cmake --build . - - # install LAMMPS into $HOME/.local - cmake --install . - - - This leads to an installation to the following locations: - - +------------------------+-----------------------------------------------------------------+-------------------------------------------------------------+ - | File | Location | Notes | - +========================+=================================================================+=============================================================+ - | LAMMPS Python package | * ``$HOME/.local/lib/pythonX.Y/site-packages/lammps`` (32bit) | ``X.Y`` depends on the installed Python version | - | | * ``$HOME/.local/lib64/pythonX.Y/site-packages/lammps`` (64bit) | | - +------------------------+-----------------------------------------------------------------+-------------------------------------------------------------+ - | LAMMPS shared library | * ``$HOME/.local/lib/`` (32bit) | Set shared loader environment variable to this path | - | | * ``$HOME/.local/lib64/`` (64bit) | (see below for more info on this) | - +------------------------+-----------------------------------------------------------------+-------------------------------------------------------------+ - | LAMMPS executable | * ``$HOME/.local/bin/`` | | - +------------------------+-----------------------------------------------------------------+-------------------------------------------------------------+ - | LAMMPS potential files | * ``$HOME/.local/share/lammps/potentials/`` | Set ``LAMMPS_POTENTIALS`` environment variable to this path | - +------------------------+-----------------------------------------------------------------+-------------------------------------------------------------+ - - For a system-wide installation you need to set - ``CMAKE_INSTALL_PREFIX`` to a system folder like ``/usr`` (or - ``/usr/local``); the default is ``${HOME}/.local``. The - installation step for a system folder installation (**not** the - configuration/compilation) needs to be done with superuser - privilege, e.g. by using ``sudo cmake --install .``. The - installation folders will then be changed to (assuming ``/usr`` as - prefix): - - +------------------------+---------------------------------------------------------+-------------------------------------------------------------+ - | File | Location | Notes | - +========================+=========================================================+=============================================================+ - | LAMMPS Python package | * ``/usr/lib/pythonX.Y/site-packages/lammps`` (32bit) | ``X.Y`` depends on the installed Python version | - | | * ``/usr/lib64/pythonX.Y/site-packages/lammps`` (64bit) | | - +------------------------+---------------------------------------------------------+-------------------------------------------------------------+ - | LAMMPS shared library | * ``/usr/lib/`` (32bit) | | - | | * ``/usr/lib64/`` (64bit) | | - +------------------------+---------------------------------------------------------+-------------------------------------------------------------+ - | LAMMPS executable | * ``/usr/bin/`` | | - +------------------------+---------------------------------------------------------+-------------------------------------------------------------+ - | LAMMPS potential files | * ``/usr/share/lammps/potentials/`` | | - +------------------------+---------------------------------------------------------+-------------------------------------------------------------+ - - To be able to use the "user" installation you have to ensure that - the folder containing the LAMMPS shared library is either included - in a path searched by the shared linker (e.g. like - ``/usr/lib64/``) or part of the ``LD_LIBRARY_PATH`` environment - variable (or ``DYLD_LIBRARY_PATH`` on macOS). Otherwise you will - get an error when trying to create a LAMMPS object through the - Python module. - - .. code-block:: bash - - # Unix/Linux - export LD_LIBRARY_PATH=$HOME/.local/lib:$LD_LIBRARY_PATH - - # macOS - export DYLD_LIBRARY_PATH=$HOME/.local/lib:$DYLD_LIBRARY_PATH - - If you plan to use the LAMMPS executable (e.g., ``lmp``), you may - also need to adjust the ``PATH`` environment variable (but many - newer Linux distributions already have ``$HOME/.local/bin`` - included). Example: - - .. code-block:: bash - - export PATH=$HOME/.local/bin:$PATH - - To make those changes permanent, you can add the commands to your - ``$HOME/.bashrc`` file. For a system-wide installation is is not - necessary due to files installed in system folders that are loaded - automatically when a login shell is started. - - .. tab:: Python package only + .. tab:: Python package Compile LAMMPS with either :doc:`CMake ` or the :doc:`traditional make ` procedure in :ref:`shared @@ -272,38 +167,6 @@ folder that the dynamic loader searches or inside of the installed | LAMMPS shared library | * ``$VIRTUAL_ENV/lib/pythonX.Y/site-packages/lammps`` | ``X.Y`` depends on the installed Python version | +------------------------+--------------------------------------------------------+-------------------------------------------------------------+ - If you do a full installation (CMake only) with "install", this - leads to the following installation locations: - - +------------------------+--------------------------------------------------------+-------------------------------------------------------------+ - | File | Location | Notes | - +========================+========================================================+=============================================================+ - | LAMMPS Python Module | * ``$VIRTUAL_ENV/lib/pythonX.Y/site-packages/lammps`` | ``X.Y`` depends on the installed Python version | - +------------------------+--------------------------------------------------------+-------------------------------------------------------------+ - | LAMMPS shared library | * ``$VIRTUAL_ENV/lib/`` (32bit) | Set shared loader environment variable to this path | - | | * ``$VIRTUAL_ENV/lib64/`` (64bit) | (see below for more info on this) | - +------------------------+--------------------------------------------------------+-------------------------------------------------------------+ - | LAMMPS executable | * ``$VIRTUAL_ENV/bin/`` | | - +------------------------+--------------------------------------------------------+-------------------------------------------------------------+ - | LAMMPS potential files | * ``$VIRTUAL_ENV/share/lammps/potentials/`` | Set ``LAMMPS_POTENTIALS`` environment variable to this path | - +------------------------+--------------------------------------------------------+-------------------------------------------------------------+ - - In that case you need to modify the ``$HOME/myenv/bin/activate`` - script in a similar fashion you need to update your - ``$HOME/.bashrc`` file to include the shared library and - executable locations in ``LD_LIBRARY_PATH`` (or - ``DYLD_LIBRARY_PATH`` on macOS) and ``PATH``, respectively. - - For example with: - - .. code-block:: bash - - # Unix/Linux - echo 'export LD_LIBRARY_PATH=$VIRTUAL_ENV/lib:$LD_LIBRARY_PATH' >> $HOME/myenv/bin/activate - - # macOS - echo 'export DYLD_LIBRARY_PATH=$VIRTUAL_ENV/lib:$DYLD_LIBRARY_PATH' >> $HOME/myenv/bin/activate - .. tab:: In place usage You can also :doc:`compile LAMMPS ` as usual in From a8c27a2275fedb8134119a8ab0c61f81acefb041 Mon Sep 17 00:00:00 2001 From: Jacob Gissinger Date: Wed, 15 Mar 2023 23:55:13 -0400 Subject: [PATCH 428/445] clarify symmatoms convention --- src/improper.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/improper.h b/src/improper.h index dfdfabae21..fbe86dfcd1 100644 --- a/src/improper.h +++ b/src/improper.h @@ -27,7 +27,6 @@ class Improper : protected Pointers { int *setflag; int writedata; // 1 if writes coeffs to data file int born_matrix_enable; - int symmatoms[4]; // symmetry atom(s) of improper style double energy; // accumulated energies double virial[6]; // accumulated virial: xx,yy,zz,xy,xz,yz double *eatom, **vatom; // accumulated per-atom energy/virial @@ -37,6 +36,11 @@ class Improper : protected Pointers { // CENTROID_SAME = same as two-body stress // CENTROID_AVAIL = different and implemented // CENTROID_NOTAVAIL = different, not yet implemented + + int symmatoms[4]; // symmetry atom(s) of improper style + // value of 0: interchangable atoms + // value of 1: central atom + // values >1: additional atoms of symmetry // KOKKOS host/device flag and data masks From 0e3dc6fefa09314da70a487cb03303973004e883 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 08:01:26 -0400 Subject: [PATCH 429/445] Download the latest MSCG snapshot to address bug in library. --- cmake/Modules/Packages/MSCG.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/Packages/MSCG.cmake b/cmake/Modules/Packages/MSCG.cmake index e4260e059e..2b8e8eda06 100644 --- a/cmake/Modules/Packages/MSCG.cmake +++ b/cmake/Modules/Packages/MSCG.cmake @@ -7,8 +7,8 @@ else() endif() option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT}) if(DOWNLOAD_MSCG) - set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz" CACHE STRING "URL for MSCG tarball") - set(MSCG_MD5 "8c45e269ee13f60b303edd7823866a91" CACHE STRING "MD5 checksum of MSCG tarball") + set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/491270a73539e3f6951e76f7dbe84e258b3ebb45.tar.gz" CACHE STRING "URL for MSCG tarball") + set(MSCG_MD5 "7ea50748fba5c3a372e0266bd31d2f11" CACHE STRING "MD5 checksum of MSCG tarball") mark_as_advanced(MSCG_URL) mark_as_advanced(MSCG_MD5) From 5c5e7b7e48afd28c62d07655d547b4e12eaab982 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 08:39:23 -0400 Subject: [PATCH 430/445] update fix mscg example --- examples/mscg/log.16Mar23.g++.1 | 105 +++++++++++++ examples/mscg/log.31Mar17.g++.1 | 145 ------------------ examples/mscg/output_16Mar23/1_1.dat | 71 +++++++++ examples/mscg/output_16Mar23/1_1.table | 104 +++++++++++++ examples/mscg/output_16Mar23/b-spline.out | 2 + .../{output_9Jan17 => output_16Mar23}/rmin.in | 0 .../rmin_b.in | 0 examples/mscg/output_16Mar23/sol_info.out | 17 ++ examples/mscg/output_16Mar23/x.out | 2 + examples/mscg/output_9Jan17/1_1.dat | 77 ---------- examples/mscg/output_9Jan17/1_1.table | 82 ---------- examples/mscg/output_9Jan17/b-spline.out | 2 - examples/mscg/output_9Jan17/sol_info.out | 18 --- examples/mscg/output_9Jan17/x.out | 1 - 14 files changed, 301 insertions(+), 325 deletions(-) create mode 100644 examples/mscg/log.16Mar23.g++.1 delete mode 100644 examples/mscg/log.31Mar17.g++.1 create mode 100644 examples/mscg/output_16Mar23/1_1.dat create mode 100644 examples/mscg/output_16Mar23/1_1.table create mode 100644 examples/mscg/output_16Mar23/b-spline.out rename examples/mscg/{output_9Jan17 => output_16Mar23}/rmin.in (100%) rename examples/mscg/{output_9Jan17 => output_16Mar23}/rmin_b.in (100%) create mode 100644 examples/mscg/output_16Mar23/sol_info.out create mode 100644 examples/mscg/output_16Mar23/x.out delete mode 100644 examples/mscg/output_9Jan17/1_1.dat delete mode 100644 examples/mscg/output_9Jan17/1_1.table delete mode 100644 examples/mscg/output_9Jan17/b-spline.out delete mode 100644 examples/mscg/output_9Jan17/sol_info.out delete mode 100644 examples/mscg/output_9Jan17/x.out diff --git a/examples/mscg/log.16Mar23.g++.1 b/examples/mscg/log.16Mar23.g++.1 new file mode 100644 index 0000000000..8c99fd3e15 --- /dev/null +++ b/examples/mscg/log.16Mar23.g++.1 @@ -0,0 +1,105 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +units real +atom_style full +pair_style zero 10.0 + +read_data data.meoh +Reading data file ... + orthogonal box = (-20.6917 -20.6917 -20.6917) to (20.6917 20.6917 20.6917) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 1000 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.007 seconds +pair_coeff * * + +thermo 1 +thermo_style custom step + +# Test 1a: range finder functionality +fix 1 all mscg 1 range on +rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair zero, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 6.045 | 6.045 | 6.045 Mbytes + Step + 0 + 250 + 500 + 750 + 1000 + 1250 + 1500 + 1750 + 2000 + 2250 + 2500 + 2750 + 3000 + 3250 + 3500 + 3750 + 4000 + 4250 + 4500 +Loop time of 0.245891 on 1 procs for 19 steps with 1000 atoms + +print "TEST_1a mscg range finder" +TEST_1a mscg range finder +unfix 1 + +# Test 1b: force matching functionality +fix 1 all mscg 1 +rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz +WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60) +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 6.045 | 6.045 | 6.045 Mbytes + Step + 0 + 250 + 500 + 750 + 1000 + 1250 + 1500 + 1750 + 2000 + 2250 + 2500 + 2750 + 3000 + 3250 + 3500 + 3750 + 4000 + 4250 + 4500 +Loop time of 0.433986 on 1 procs for 19 steps with 1000 atoms + +print "TEST_1b mscg force matching" +TEST_1b mscg force matching + +print TEST_DONE +TEST_DONE +Total wall time: 0:00:00 diff --git a/examples/mscg/log.31Mar17.g++.1 b/examples/mscg/log.31Mar17.g++.1 deleted file mode 100644 index c67bc483db..0000000000 --- a/examples/mscg/log.31Mar17.g++.1 +++ /dev/null @@ -1,145 +0,0 @@ -LAMMPS (13 Apr 2017) -units real -atom_style full -pair_style zero 10.0 - -read_data data.meoh - orthogonal box = (-20.6917 -20.6917 -20.6917) to (20.6917 20.6917 20.6917) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 1000 atoms - 0 = max # of 1-2 neighbors - 0 = max # of 1-3 neighbors - 0 = max # of 1-4 neighbors - 1 = max # of special neighbors -pair_coeff * * - -thermo 1 -thermo_style custom step - -# Test 1a: range finder functionality -fix 1 all mscg 1 range on -rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 12 - ghost atom cutoff = 12 - binsize = 6, bins = 7 7 7 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair zero, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d/newton - bin: standard -Per MPI rank memory allocation (min/avg/max) = 5.794 | 5.794 | 5.794 Mbytes -Step - 0 - 250 - 500 - 750 - 1000 - 1250 - 1500 - 1750 - 2000 - 2250 - 2500 - 2750 - 3000 - 3250 - 3500 - 3750 - 4000 - 4250 - 4500 -Loop time of 0.581537 on 1 procs for 19 steps with 1000 atoms - -Performance: 2.823 ns/day, 8.502 hours/ns, 32.672 timesteps/s -99.2% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Bond | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 0.5815 | | |100.00 - -Nlocal: 1000 ave 1000 max 1000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 2934 ave 2934 max 2934 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 50654 ave 50654 max 50654 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 50654 -Ave neighs/atom = 50.654 -Ave special neighs/atom = 0 -Neighbor list builds = 0 -Dangerous builds = 0 -print "TEST_1a mscg range finder" -TEST_1a mscg range finder -unfix 1 - -# Test 1b: force matching functionality -fix 1 all mscg 1 -rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz -Per MPI rank memory allocation (min/avg/max) = 5.794 | 5.794 | 5.794 Mbytes -Step - 0 - 250 - 500 - 750 - 1000 - 1250 - 1500 - 1750 - 2000 - 2250 - 2500 - 2750 - 3000 - 3250 - 3500 - 3750 - 4000 - 4250 - 4500 -Loop time of 0.841917 on 1 procs for 19 steps with 1000 atoms - -Performance: 1.950 ns/day, 12.309 hours/ns, 22.568 timesteps/s -99.8% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Bond | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 0.8419 | | |100.00 - -Nlocal: 1000 ave 1000 max 1000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 2934 ave 2934 max 2934 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 50654 ave 50654 max 50654 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 50654 -Ave neighs/atom = 50.654 -Ave special neighs/atom = 0 -Neighbor list builds = 0 -Dangerous builds = 0 -print "TEST_1b mscg force matching" -TEST_1b mscg force matching - -print TEST_DONE -TEST_DONE -Total wall time: 0:00:01 diff --git a/examples/mscg/output_16Mar23/1_1.dat b/examples/mscg/output_16Mar23/1_1.dat new file mode 100644 index 0000000000..d73cd05fe6 --- /dev/null +++ b/examples/mscg/output_16Mar23/1_1.dat @@ -0,0 +1,71 @@ +3.000000 9.109433117503674e+00 +3.100000 6.562933520937051e+00 +3.200000 3.803570347770783e+00 +3.300000 1.524835163098694e+00 +3.400000 3.680752991750511e-02 +3.500000 -6.369395346711866e-01 +3.600000 -6.624341032589213e-01 +3.700000 -2.983998819283989e-01 +3.800000 1.996942072449469e-01 +3.900000 6.507540486137935e-01 +4.000000 9.561503221901252e-01 +4.100000 1.082978861799261e+00 +4.200000 1.046366050930359e+00 +4.300000 8.917742185869113e-01 +4.400000 6.773070351372578e-01 +4.500000 4.561974686292022e-01 +4.600000 2.640422255436971e-01 +4.700000 1.180848207166380e-01 +4.800000 2.124502216672507e-02 +4.900000 -3.366915456585443e-02 +5.000000 -5.974945208074427e-02 +5.100000 -7.177537677873873e-02 +5.200000 -8.204929079011507e-02 +5.300000 -9.745573177789707e-02 +5.400000 -1.196283642109915e-01 +5.500000 -1.463411396781238e-01 +5.600000 -1.729465415853768e-01 +5.700000 -1.938138298537278e-01 +5.800000 -2.037672856165882e-01 +5.900000 -1.995060297815394e-01 +6.000000 -1.805447650094144e-01 +6.100000 -1.489384048916932e-01 +6.200000 -1.085276302304308e-01 +6.300000 -6.416601955090541e-02 +6.400000 -2.094717961426480e-02 +6.500000 1.656812406982645e-02 +6.600000 4.511482523443927e-02 +6.700000 6.322611594801032e-02 +6.800000 7.107524696431811e-02 +6.900000 7.005702917383723e-02 +7.000000 6.235932355899154e-02 +7.100000 5.053453114940768e-02 +7.200000 3.707108297716843e-02 +7.300000 2.397003518601587e-02 +7.400000 1.245439896007831e-02 +7.500000 3.015413982707119e-03 +7.600000 -4.408442264121739e-03 +7.700000 -1.024733994435217e-02 +7.800000 -1.511598231239246e-02 +7.900000 -1.962949115765983e-02 +8.000000 -2.422153184874873e-02 +8.100000 -2.902066868449916e-02 +8.200000 -3.387453677654857e-02 +8.300000 -3.843224513464188e-02 +8.400000 -4.222901944115068e-02 +8.500000 -4.477084482559266e-02 +8.600000 -4.561910863915099e-02 +8.700000 -4.447439067652353e-02 +8.800000 -4.123808661911404e-02 +8.900000 -3.601776131390161e-02 +9.000000 -2.911033476210515e-02 +9.100000 -2.098441550402311e-02 +9.200000 -1.226263400387303e-02 +9.300000 -3.703976034631109e-03 +9.400000 3.815231963949414e-03 +9.500000 9.355387087425532e-03 +9.600000 1.205664749783030e-02 +9.700000 1.131702059340882e-02 +9.800000 6.971799313021964e-03 +9.900000 -5.270015594498346e-04 +10.000000 -9.931209090702869e-03 diff --git a/examples/mscg/output_16Mar23/1_1.table b/examples/mscg/output_16Mar23/1_1.table new file mode 100644 index 0000000000..148d909ad3 --- /dev/null +++ b/examples/mscg/output_16Mar23/1_1.table @@ -0,0 +1,104 @@ +# Header information on force file + +1_1 +N 99 R 0.200000 10.000000 + +1 0.200000 127.263594 80.411422 +2 0.300000 119.349776 77.864922 +3 0.400000 111.690609 75.318423 +4 0.500000 104.286092 72.771923 +5 0.600000 97.136225 70.225423 +6 0.700000 90.241007 67.678924 +7 0.800000 83.600440 65.132424 +8 0.900000 77.214522 62.585925 +9 1.000000 71.083255 60.039425 +10 1.100000 65.206637 57.492925 +11 1.200000 59.584670 54.946426 +12 1.300000 54.217352 52.399926 +13 1.400000 49.104684 49.853427 +14 1.500000 44.246667 47.306927 +15 1.600000 39.643299 44.760427 +16 1.700000 35.294581 42.213928 +17 1.800000 31.200513 39.667428 +18 1.900000 27.361096 37.120929 +19 2.000000 23.776328 34.574429 +20 2.100000 20.446210 32.027929 +21 2.200000 17.370742 29.481430 +22 2.300000 14.549924 26.934930 +23 2.400000 11.983756 24.388431 +24 2.500000 9.672238 21.841931 +25 2.600000 7.615370 19.295432 +26 2.700000 5.813151 16.748932 +27 2.800000 4.265583 14.202432 +28 2.900000 2.972665 11.655933 +29 3.000000 1.934397 9.109433 +30 3.100000 1.150778 6.562934 +31 3.200000 0.632453 3.803570 +32 3.300000 0.366033 1.524835 +33 3.400000 0.287951 0.036808 +34 3.500000 0.317957 -0.636940 +35 3.600000 0.382926 -0.662434 +36 3.700000 0.430968 -0.298400 +37 3.800000 0.435903 0.199694 +38 3.900000 0.393381 0.650754 +39 4.000000 0.313035 0.956150 +40 4.100000 0.211079 1.082979 +41 4.200000 0.104612 1.046366 +42 4.300000 0.007705 0.891774 +43 4.400000 -0.070749 0.677307 +44 4.500000 -0.127425 0.456197 +45 4.600000 -0.163437 0.264042 +46 4.700000 -0.182543 0.118085 +47 4.800000 -0.189509 0.021245 +48 4.900000 -0.188888 -0.033669 +49 5.000000 -0.184217 -0.059749 +50 5.100000 -0.177641 -0.071775 +51 5.200000 -0.169950 -0.082049 +52 5.300000 -0.160975 -0.097456 +53 5.400000 -0.150120 -0.119628 +54 5.500000 -0.136822 -0.146341 +55 5.600000 -0.120858 -0.172947 +56 5.700000 -0.102520 -0.193814 +57 5.800000 -0.082640 -0.203767 +58 5.900000 -0.062477 -0.199506 +59 6.000000 -0.043474 -0.180545 +60 6.100000 -0.027000 -0.148938 +61 6.200000 -0.014127 -0.108528 +62 6.300000 -0.005492 -0.064166 +63 6.400000 -0.001236 -0.020947 +64 6.500000 -0.001018 0.016568 +65 6.600000 -0.004102 0.045115 +66 6.700000 -0.009519 0.063226 +67 6.800000 -0.016234 0.071075 +68 6.900000 -0.023290 0.070057 +69 7.000000 -0.029911 0.062359 +70 7.100000 -0.035556 0.050535 +71 7.200000 -0.039936 0.037071 +72 7.300000 -0.042988 0.023970 +73 7.400000 -0.044809 0.012454 +74 7.500000 -0.045583 0.003015 +75 7.600000 -0.045513 -0.004408 +76 7.700000 -0.044781 -0.010247 +77 7.800000 -0.043512 -0.015116 +78 7.900000 -0.041775 -0.019629 +79 8.000000 -0.039583 -0.024222 +80 8.100000 -0.036920 -0.029021 +81 8.200000 -0.033776 -0.033875 +82 8.300000 -0.030160 -0.038432 +83 8.400000 -0.026127 -0.042229 +84 8.500000 -0.021777 -0.044771 +85 8.600000 -0.017258 -0.045619 +86 8.700000 -0.012753 -0.044474 +87 8.800000 -0.008467 -0.041238 +88 8.900000 -0.004605 -0.036018 +89 9.000000 -0.001348 -0.029110 +90 9.100000 0.001156 -0.020984 +91 9.200000 0.002819 -0.012263 +92 9.300000 0.003617 -0.003704 +93 9.400000 0.003612 0.003815 +94 9.500000 0.002953 0.009355 +95 9.600000 0.001882 0.012057 +96 9.700000 0.000714 0.011317 +97 9.800000 -0.000201 0.006972 +98 9.900000 -0.000523 -0.000527 +99 10.000000 0.000000 -0.009931 diff --git a/examples/mscg/output_16Mar23/b-spline.out b/examples/mscg/output_16Mar23/b-spline.out new file mode 100644 index 0000000000..8571ede9b7 --- /dev/null +++ b/examples/mscg/output_16Mar23/b-spline.out @@ -0,0 +1,2 @@ +n: 1 1 6 11 3.000000000000000e+00 1.000000000000000e+01 +9.109454054135307e+00 6.178334150703818e+00 -6.242976259059743e+00 4.778144787445235e+00 -1.082885612852992e+00 4.521835893850554e-01 -6.477047196208028e-01 2.947887062333265e-01 -4.195609079009661e-02 1.111775827831465e-02 -8.823466147380592e-02 -1.696076806027540e-02 3.192205281984208e-02 3.656991607866288e-03 -9.931306149957592e-03 diff --git a/examples/mscg/output_9Jan17/rmin.in b/examples/mscg/output_16Mar23/rmin.in similarity index 100% rename from examples/mscg/output_9Jan17/rmin.in rename to examples/mscg/output_16Mar23/rmin.in diff --git a/examples/mscg/output_9Jan17/rmin_b.in b/examples/mscg/output_16Mar23/rmin_b.in similarity index 100% rename from examples/mscg/output_9Jan17/rmin_b.in rename to examples/mscg/output_16Mar23/rmin_b.in diff --git a/examples/mscg/output_16Mar23/sol_info.out b/examples/mscg/output_16Mar23/sol_info.out new file mode 100644 index 0000000000..eb4460f9ce --- /dev/null +++ b/examples/mscg/output_16Mar23/sol_info.out @@ -0,0 +1,17 @@ +fm_matrix_rows:3000; fm_matrix_columns:15; +Singular vector: +2.307693e+00 +1.998418e+00 +1.400114e+00 +1.183608e+00 +9.718949e-01 +7.471241e-01 +5.277965e-01 +5.084369e-01 +3.510398e-01 +2.997000e-01 +2.142454e-01 +1.201800e-01 +7.143923e-02 +3.077326e-02 +1.835581e-02 diff --git a/examples/mscg/output_16Mar23/x.out b/examples/mscg/output_16Mar23/x.out new file mode 100644 index 0000000000..d9ae514466 --- /dev/null +++ b/examples/mscg/output_16Mar23/x.out @@ -0,0 +1,2 @@ +ýÙ\ +8"@Ÿ!D:¶@Îv¹ÄÎøÀH…¶üÑ@H3HÝSñ¿Ô– p“ðÜ??ÿ¹ä¿€% sÑÝÒ?:yŸËD{¥¿Œz®AèĆ?#Tgù‹–¶¿l#‰à)^‘¿ÂÊÃYX ?KçpkDõm?ª ÷XÝV„¿ \ No newline at end of file diff --git a/examples/mscg/output_9Jan17/1_1.dat b/examples/mscg/output_9Jan17/1_1.dat deleted file mode 100644 index fcfbe0d7c8..0000000000 --- a/examples/mscg/output_9Jan17/1_1.dat +++ /dev/null @@ -1,77 +0,0 @@ -2.500000 5.670970817963099e+02 -2.600000 2.404059283529051e+02 -2.700000 9.157060823529977e+01 -2.800000 3.428273061369140e+01 -2.900000 1.619868149395266e+01 -3.000000 1.039607214301755e+01 -3.100000 6.830187514267188e+00 -3.200000 3.861970842349535e+00 -3.300000 1.645948643278161e+00 -3.400000 2.395428971623918e-01 -3.500000 -4.276763637833773e-01 -3.600000 -5.132022977965877e-01 -3.700000 -2.208024961234051e-01 -3.800000 2.402697744243800e-01 -3.900000 6.956064296165573e-01 -4.000000 1.034070044257954e+00 -4.100000 1.205997975111669e+00 -4.200000 1.209501102128581e+00 -4.300000 1.076304670380924e+00 -4.400000 8.575891319958883e-01 -4.500000 6.098309880892070e-01 -4.600000 3.807992942746473e-01 -4.700000 1.995994191469442e-01 -4.800000 7.699059877424269e-02 -4.900000 9.750744163981299e-03 -5.000000 -1.480308769532222e-02 -5.100000 -1.429422279228416e-02 -5.200000 -6.765899050869768e-03 -5.300000 -6.214398421078919e-03 -5.400000 -1.951586041390797e-02 -5.500000 -4.689090237947263e-02 -5.600000 -8.376292122940529e-02 -5.700000 -1.226699982917263e-01 -5.800000 -1.551768041657136e-01 -5.900000 -1.737865035767736e-01 -6.000000 -1.738272491408507e-01 -6.100000 -1.546779867768825e-01 -6.200000 -1.193171291488982e-01 -6.300000 -7.321054075616322e-02 -6.400000 -2.317411193286228e-02 -6.500000 2.376366715221714e-02 -6.600000 6.149913249600215e-02 -6.700000 8.597538938112201e-02 -6.800000 9.590170060736655e-02 -6.900000 9.245100462148878e-02 -7.000000 7.855487875847664e-02 -7.100000 5.818301960249692e-02 -7.200000 3.562272334783877e-02 -7.300000 1.475836615985744e-02 -7.400000 -1.639617536128255e-03 -7.500000 -1.237881063914745e-02 -7.600000 -1.768202571195587e-02 -7.700000 -1.877757119362295e-02 -7.800000 -1.748001968416543e-02 -7.900000 -1.577097622918088e-02 -8.000000 -1.537984660448136e-02 -8.100000 -1.737044400054951e-02 -8.200000 -2.187939410237979e-02 -8.300000 -2.823987455760605e-02 -8.400000 -3.525715284001425e-02 -8.500000 -4.148996251287761e-02 -8.600000 -4.553187949229211e-02 -8.700000 -4.629269831051163e-02 -8.800000 -4.327548798226762e-02 -8.900000 -3.674131754868225e-02 -9.000000 -2.758883541814894e-02 -9.100000 -1.712151838480657e-02 -9.200000 -6.810600249997737e-03 -9.300000 1.941999556272785e-03 -9.400000 8.040747353879739e-03 -9.500000 1.092691524686838e-02 -9.600000 1.063606620723048e-02 -9.700000 7.416550438142138e-03 -9.800000 1.175066786686231e-03 -9.900000 -9.084427187675534e-03 -10.000000 -2.582180514463068e-02 -10.100000 -5.352186189454393e-02 diff --git a/examples/mscg/output_9Jan17/1_1.table b/examples/mscg/output_9Jan17/1_1.table deleted file mode 100644 index 9d78fabc77..0000000000 --- a/examples/mscg/output_9Jan17/1_1.table +++ /dev/null @@ -1,82 +0,0 @@ -# Header information on force file - -1_1 -N 77 R 2.500000 10.100000 - -1 2.500000 69.428523 567.097082 -2 2.600000 29.053372 240.405928 -3 2.700000 12.454545 91.570608 -4 2.800000 6.161878 34.282731 -5 2.900000 3.637808 16.198681 -6 3.000000 2.308070 10.396072 -7 3.100000 1.446757 6.830188 -8 3.200000 0.912149 3.861971 -9 3.300000 0.636753 1.645949 -10 3.400000 0.542478 0.239543 -11 3.500000 0.551885 -0.427676 -12 3.600000 0.598929 -0.513202 -13 3.700000 0.635629 -0.220802 -14 3.800000 0.634656 0.240270 -15 3.900000 0.587862 0.695606 -16 4.000000 0.501378 1.034070 -17 4.100000 0.389375 1.205998 -18 4.200000 0.268600 1.209501 -19 4.300000 0.154310 1.076305 -20 4.400000 0.057615 0.857589 -21 4.500000 -0.015756 0.609831 -22 4.600000 -0.065288 0.380799 -23 4.700000 -0.094307 0.199599 -24 4.800000 -0.108137 0.076991 -25 4.900000 -0.112474 0.009751 -26 5.000000 -0.112221 -0.014803 -27 5.100000 -0.110767 -0.014294 -28 5.200000 -0.109714 -0.006766 -29 5.300000 -0.109065 -0.006214 -30 5.400000 -0.107778 -0.019516 -31 5.500000 -0.104458 -0.046891 -32 5.600000 -0.097925 -0.083763 -33 5.700000 -0.087603 -0.122670 -34 5.800000 -0.073711 -0.155177 -35 5.900000 -0.057263 -0.173787 -36 6.000000 -0.039882 -0.173827 -37 6.100000 -0.023457 -0.154678 -38 6.200000 -0.009757 -0.119317 -39 6.300000 -0.000131 -0.073211 -40 6.400000 0.004688 -0.023174 -41 6.500000 0.004659 0.023764 -42 6.600000 0.000396 0.061499 -43 6.700000 -0.006978 0.085975 -44 6.800000 -0.016072 0.095902 -45 6.900000 -0.025489 0.092451 -46 7.000000 -0.034040 0.078555 -47 7.100000 -0.040877 0.058183 -48 7.200000 -0.045567 0.035623 -49 7.300000 -0.048086 0.014758 -50 7.400000 -0.048742 -0.001640 -51 7.500000 -0.048041 -0.012379 -52 7.600000 -0.046538 -0.017682 -53 7.700000 -0.044715 -0.018778 -54 7.800000 -0.042902 -0.017480 -55 7.900000 -0.041239 -0.015771 -56 8.000000 -0.039682 -0.015380 -57 8.100000 -0.038044 -0.017370 -58 8.200000 -0.036082 -0.021879 -59 8.300000 -0.033576 -0.028240 -60 8.400000 -0.030401 -0.035257 -61 8.500000 -0.026564 -0.041490 -62 8.600000 -0.022213 -0.045532 -63 8.700000 -0.017621 -0.046293 -64 8.800000 -0.013143 -0.043275 -65 8.900000 -0.009142 -0.036741 -66 9.000000 -0.005926 -0.027589 -67 9.100000 -0.003690 -0.017122 -68 9.200000 -0.002494 -0.006811 -69 9.300000 -0.002250 0.001942 -70 9.400000 -0.002749 0.008041 -71 9.500000 -0.003698 0.010927 -72 9.600000 -0.004776 0.010636 -73 9.700000 -0.005678 0.007417 -74 9.800000 -0.006108 0.001175 -75 9.900000 -0.005712 -0.009084 -76 10.000000 -0.003967 -0.025822 -77 10.100000 0.000000 -0.053522 diff --git a/examples/mscg/output_9Jan17/b-spline.out b/examples/mscg/output_9Jan17/b-spline.out deleted file mode 100644 index c1dcd731ca..0000000000 --- a/examples/mscg/output_9Jan17/b-spline.out +++ /dev/null @@ -1,2 +0,0 @@ -n: 1 1 6 12 2.400000000000002e+00 1.010000000000000e+01 -1.200460787805587e+03 2.169623423326193e+01 2.388396964379328e+01 -1.197754948555067e+01 6.472482422420378e+00 -1.483711824891365e+00 7.768139601662113e-01 -7.869494711740244e-01 4.830820182054661e-01 -1.892989444995645e-01 1.021275453070386e-01 -1.637649039972671e-01 5.570978712841167e-02 7.637188693695119e-03 -4.109175461195019e-03 -5.352186189455146e-02 diff --git a/examples/mscg/output_9Jan17/sol_info.out b/examples/mscg/output_9Jan17/sol_info.out deleted file mode 100644 index 5f02270f51..0000000000 --- a/examples/mscg/output_9Jan17/sol_info.out +++ /dev/null @@ -1,18 +0,0 @@ -fm_matrix_rows:3000; fm_matrix_columns:16; -Singular vector: -2.442317e+00 -2.105009e+00 -1.433251e+00 -1.184602e+00 -9.739627e-01 -6.944898e-01 -5.376709e-01 -4.616070e-01 -3.257062e-01 -2.683729e-01 -1.530153e-01 -9.336288e-02 -5.042150e-02 -2.126912e-02 -1.446682e-02 -4.167763e-05 diff --git a/examples/mscg/output_9Jan17/x.out b/examples/mscg/output_9Jan17/x.out deleted file mode 100644 index 124cf8bf41..0000000000 --- a/examples/mscg/output_9Jan17/x.out +++ /dev/null @@ -1 +0,0 @@ -‘-ÂØ×Á’@47h<²5@¸¿¦ÕKâ7@ÑR½]ô'Àéë nÒã@ÝŒIœH½÷¿¯?ó¨Ûè?r€I¨°.鿚^×ÐêÞ?Wå£ò:È¿(Oã%º?ËNs•?öÄ¿:‘Cþ…¬?ËÃ:,H?à}‚cÈÔp¿£ê¬7g«¿ \ No newline at end of file From f63befc80f33819fc2ce4395e2c1d2a658396867 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 10:29:00 -0400 Subject: [PATCH 431/445] consolidate replicated commands to single location --- cmake/Modules/Packages/GPU.cmake | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index a0578394f1..034c4b3a9f 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -176,12 +176,6 @@ if(GPU_API STREQUAL "CUDA") target_include_directories(gpu PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini) target_compile_definitions(gpu PRIVATE -DUSE_CUDPP) endif() - if(BUILD_OMP) - find_package(OpenMP COMPONENTS CXX REQUIRED) - target_link_libraries(gpu PRIVATE OpenMP::OpenMP_CXX) - endif() - - target_link_libraries(lammps PRIVATE gpu) add_executable(nvc_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp) target_compile_definitions(nvc_get_devices PRIVATE -DUCL_CUDADR) @@ -255,12 +249,6 @@ elseif(GPU_API STREQUAL "OPENCL") else() target_compile_definitions(gpu PRIVATE -DMPI_GERYON -DGERYON_NUMA_FISSION -DUCL_NO_EXIT) endif() - if(BUILD_OMP) - find_package(OpenMP COMPONENTS CXX REQUIRED) - target_link_libraries(gpu PRIVATE OpenMP::OpenMP_CXX) - endif() - - target_link_libraries(lammps PRIVATE gpu) add_executable(ocl_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp) target_compile_definitions(ocl_get_devices PRIVATE -DUCL_OPENCL) @@ -417,10 +405,6 @@ elseif(GPU_API STREQUAL "HIP") target_compile_definitions(gpu PRIVATE -DMPI_GERYON -DUCL_NO_EXIT) endif() target_link_libraries(gpu PRIVATE hip::host) - if(BUILD_OMP) - find_package(OpenMP COMPONENTS CXX REQUIRED) - target_link_libraries(gpu PRIVATE OpenMP::OpenMP_CXX) - endif() if(HIP_USE_DEVICE_SORT) if(HIP_PLATFORM STREQUAL "amd") @@ -489,10 +473,14 @@ elseif(GPU_API STREQUAL "HIP") target_include_directories(hip_get_devices PRIVATE ${CUDA_INCLUDE_DIRS}) target_link_libraries(hip_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY}) endif() - - target_link_libraries(lammps PRIVATE gpu) endif() +if(BUILD_OMP) + find_package(OpenMP COMPONENTS CXX REQUIRED) + target_link_libraries(gpu PRIVATE OpenMP::OpenMP_CXX) +endif() +target_link_libraries(lammps PRIVATE gpu) + set_property(GLOBAL PROPERTY "GPU_SOURCES" "${GPU_SOURCES}") # detect styles which have a GPU version RegisterStylesExt(${GPU_SOURCES_DIR} gpu GPU_SOURCES) From d71a78449a0b66b6fa1252aea2ea73e273a15426 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 12:29:51 -0400 Subject: [PATCH 432/445] fix two bugs in the ndx2group command --- src/COLVARS/ndx_group.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/COLVARS/ndx_group.cpp b/src/COLVARS/ndx_group.cpp index 4f8a682a2a..1d24db3900 100644 --- a/src/COLVARS/ndx_group.cpp +++ b/src/COLVARS/ndx_group.cpp @@ -81,6 +81,8 @@ void Ndx2Group::command(int narg, char **arg) if (narg < 1) error->all(FLERR,"Illegal ndx2group command"); if (atom->tag_enable == 0) error->all(FLERR,"Must have atom IDs for ndx2group command"); + if (atom->map_style == Atom::MAP_NONE) + error->all(FLERR,"Must have an atom map for ndx2group command"); if (comm->me == 0) { fp = fopen(arg[0], "r"); if (fp == nullptr) @@ -153,11 +155,12 @@ void Ndx2Group::command(int narg, char **arg) MPI_Bcast((void *)name.c_str(),len,MPI_CHAR,0,world); // read tags for atoms in group and broadcast - std::vector tags = read_section(fp,name); + std::vector tags = read_section(fp,next); num = tags.size(); MPI_Bcast(&num,1,MPI_LMP_BIGINT,0,world); MPI_Bcast((void *)tags.data(),num,MPI_LMP_TAGINT,0,world); create(name,tags); + name = next; } } else { MPI_Bcast(&len,1,MPI_INT,0,world); From feb1b9e029a170a7fe4b7f7edb1b95fd1ad5e0aa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 12:55:30 -0400 Subject: [PATCH 433/445] fix whitespace --- src/improper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/improper.h b/src/improper.h index fbe86dfcd1..22a5d09926 100644 --- a/src/improper.h +++ b/src/improper.h @@ -36,11 +36,11 @@ class Improper : protected Pointers { // CENTROID_SAME = same as two-body stress // CENTROID_AVAIL = different and implemented // CENTROID_NOTAVAIL = different, not yet implemented - + int symmatoms[4]; // symmetry atom(s) of improper style // value of 0: interchangable atoms // value of 1: central atom - // values >1: additional atoms of symmetry + // values >1: additional atoms of symmetry // KOKKOS host/device flag and data masks From 4a66389bf1110e5687631121877d867a9e458dd7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 16:29:42 -0400 Subject: [PATCH 434/445] purge build folder from within install.py script --- cmake/CMakeLists.txt | 3 +-- python/install.py | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 5a30cd5aa5..14961209c8 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -841,8 +841,7 @@ if(BUILD_SHARED_LIBS) set(LIBLAMMPS_SHARED_BINARY ${MY_BUILD_DIR}/liblammps${LAMMPS_MACHINE}${CMAKE_SHARED_LIBRARY_SUFFIX}) if(Python_EXECUTABLE) add_custom_target( - install-python ${CMAKE_COMMAND} -E remove_directory build - COMMAND ${Python_EXECUTABLE} ${LAMMPS_PYTHON_DIR}/install.py -p ${LAMMPS_PYTHON_DIR}/lammps + install-python ${Python_EXECUTABLE} ${LAMMPS_PYTHON_DIR}/install.py -p ${LAMMPS_PYTHON_DIR}/lammps -l ${LIBLAMMPS_SHARED_BINARY} -w ${MY_BUILD_DIR} COMMENT "Installing LAMMPS Python module") else() diff --git a/python/install.py b/python/install.py index 591e8525dc..561e93caa9 100644 --- a/python/install.py +++ b/python/install.py @@ -59,6 +59,10 @@ olddir = os.path.abspath('.') os.chdir(os.path.dirname(args.package)) # remove any wheel files left over from previous calls +if os.path.isdir(os.path.join(olddir,"build")): + print("Cleaning old build directory") + shutil.rmtree(os.path.join(olddir,"build")) + print("Purging existing wheels...") for wheel in glob.glob('lammps-*.whl'): print("deleting " + wheel) From d3a23817f14e5b83741332f983df3c792495f894 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 17:25:11 -0400 Subject: [PATCH 435/445] disable purging old wheel files --- python/install.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/install.py b/python/install.py index 561e93caa9..6c27ebd0bd 100644 --- a/python/install.py +++ b/python/install.py @@ -63,10 +63,10 @@ if os.path.isdir(os.path.join(olddir,"build")): print("Cleaning old build directory") shutil.rmtree(os.path.join(olddir,"build")) -print("Purging existing wheels...") -for wheel in glob.glob('lammps-*.whl'): - print("deleting " + wheel) - os.remove(wheel) +#print("Purging existing wheels...") +#for wheel in glob.glob('lammps-*.whl'): +# print("deleting " + wheel) +# os.remove(wheel) # copy shared object to the current folder so that # it will show up in the installation at the expected location From f1539d0ef52f9f0644a8b8258135f5980adeb821 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 17:53:58 -0400 Subject: [PATCH 436/445] silence compiler warnings --- src/GRANULAR/fix_heat_flow.cpp | 16 +++++----------- src/GRANULAR/fix_wall_gran.cpp | 2 +- src/GRANULAR/fix_wall_gran_region.cpp | 2 +- src/GRANULAR/gran_sub_mod_tangential.cpp | 3 +-- src/GRANULAR/pair_granular.cpp | 4 +--- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/GRANULAR/fix_heat_flow.cpp b/src/GRANULAR/fix_heat_flow.cpp index f9ad309f98..a9c110a2e7 100644 --- a/src/GRANULAR/fix_heat_flow.cpp +++ b/src/GRANULAR/fix_heat_flow.cpp @@ -156,7 +156,7 @@ void FixHeatFlow::final_integrate() /* ---------------------------------------------------------------------- */ -void FixHeatFlow::final_integrate_respa(int ilevel, int /*iloop*/) +void FixHeatFlow::final_integrate_respa(int /*ilevel*/, int /*iloop*/) { dt = update->dt; final_integrate(); @@ -215,13 +215,11 @@ void FixHeatFlow::unpack_forward_comm(int n, int first, double *buf) int FixHeatFlow::pack_reverse_comm(int n, int first, double *buf) { - int i,k,last; - int m = 0; - last = first + n; + int last = first + n; double *heatflow = atom->heatflow; - for (i = first; i < last; i++) { + for (int i = first; i < last; i++) { buf[m++] = heatflow[i]; } @@ -232,13 +230,9 @@ int FixHeatFlow::pack_reverse_comm(int n, int first, double *buf) void FixHeatFlow::unpack_reverse_comm(int n, int *list, double *buf) { - int i,j,k,kk,ncount; - int m = 0; double *heatflow = atom->heatflow; - for (i = 0; i < n; i++) { - j = list[i]; - heatflow[j] += buf[m++]; - } + for (int i = 0; i < n; i++) + heatflow[list[i]] += buf[m++]; } diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 7029074fe8..8ebe2d5a4c 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -452,7 +452,7 @@ void FixWallGran::post_force(int /*vflag*/) } for (int i = 0; i < nlocal; i++) { - if (! mask[i] & groupbit) continue; + if ((!mask[i]) & groupbit) continue; dx = dy = dz = 0.0; diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 57f84e26cb..02cbd94510 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -195,7 +195,7 @@ void FixWallGranRegion::post_force(int /*vflag*/) } for (i = 0; i < nlocal; i++) { - if (! mask[i] & groupbit) continue; + if ((!mask[i]) & groupbit) continue; if (! region->match(x[i][0], x[i][1], x[i][2])) continue; nc = region->surface(x[i][0], x[i][1], x[i][2], model->pulloff_distance(radius[i], 0.0)); diff --git a/src/GRANULAR/gran_sub_mod_tangential.cpp b/src/GRANULAR/gran_sub_mod_tangential.cpp index 677ba4d363..ed7704349d 100644 --- a/src/GRANULAR/gran_sub_mod_tangential.cpp +++ b/src/GRANULAR/gran_sub_mod_tangential.cpp @@ -174,9 +174,8 @@ GranSubModTangentialLinearHistoryClassic::GranSubModTangentialLinearHistoryClass void GranSubModTangentialLinearHistoryClassic::calculate_forces() { - double magfs, magfs_inv, rsht, shrmag, prjmag, temp_dbl; + double magfs, magfs_inv, rsht, shrmag; double temp_array[3]; - int frame_update = 0; damp = xt * gm->damping_model->damp_prefactor; diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index c4711d6f59..85cee11564 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -685,7 +685,7 @@ void PairGranular::reset_dt() /* ---------------------------------------------------------------------- */ double PairGranular::single(int i, int j, int itype, int jtype, - double rsq, double /* factor_coul */, + double /*rsq*/, double /* factor_coul */, double factor_lj, double &fforce) { if (factor_lj == 0) { @@ -764,8 +764,6 @@ double PairGranular::single(int i, int j, int itype, int jtype, model->calculate_forces(); double *forces = model->forces; - double *torquesi = model->torquesi; - double *torquesj = model->torquesj; // apply forces & torques fforce = MathExtra::len3(forces); From bf944488436c48fc6c7e8d256665bed1cd7f798d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 18:32:54 -0400 Subject: [PATCH 437/445] simplify and avoid segfault without pair style --- src/EXTRA-FIX/fix_efield_tip4p.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/EXTRA-FIX/fix_efield_tip4p.cpp b/src/EXTRA-FIX/fix_efield_tip4p.cpp index a204fe6f7d..3d6a2f66b7 100644 --- a/src/EXTRA-FIX/fix_efield_tip4p.cpp +++ b/src/EXTRA-FIX/fix_efield_tip4p.cpp @@ -46,6 +46,7 @@ void FixEfieldTIP4P::init() if (atom->tag_enable == 0) error->all(FLERR, "Fix efield/tip4p requires atom IDs"); if (!atom->q_flag) error->all(FLERR, "Fix efield/tip4p requires atom attribute q"); + if (!force->pair) error->all(FLERR, "A TIP4P pair style must be defined fix efield/tip4p"); int itmp; double *p_qdist = (double *) force->pair->extract("qdist", itmp); @@ -60,13 +61,12 @@ void FixEfieldTIP4P::init() int typeA = *p_typeA; int typeB = *p_typeB; - if (force->angle == nullptr || force->bond == nullptr || force->angle->setflag == nullptr || - force->bond->setflag == nullptr) - error->all(FLERR, "Bond and angle potentials must be defined for compute {}", style); + if (!force->angle || !force->bond || !force->angle->setflag || !force->bond->setflag) + error->all(FLERR, "Bond and angle potentials must be defined for fix efield/tip4p"); if ((typeA < 1) || (typeA > atom->nangletypes) || (force->angle->setflag[typeA] == 0)) - error->all(FLERR, "Bad TIP4P angle type for compute {}", style); + error->all(FLERR, "Bad TIP4P angle type for fix efield/tip4p"); if ((typeB < 1) || (typeB > atom->nbondtypes) || (force->bond->setflag[typeB] == 0)) - error->all(FLERR, "Bad TIP4P bond type for PPPM/TIP4P"); + error->all(FLERR, "Bad TIP4P bond type for fix efield/tip4p"); // determine alpha parameter From ea20c934ea5f10d06d09035093c178e14cbb2796 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 18:33:23 -0400 Subject: [PATCH 438/445] print warning when using fix efield with a TIP4P pair style --- src/fix_efield.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fix_efield.cpp b/src/fix_efield.cpp index 3046f21ef3..d1765ed536 100644 --- a/src/fix_efield.cpp +++ b/src/fix_efield.cpp @@ -26,6 +26,7 @@ #include "input.h" #include "memory.h" #include "modify.h" +#include "pair.h" #include "region.h" #include "respa.h" #include "update.h" @@ -145,6 +146,13 @@ void FixEfield::init() if (atom->mu_flag && atom->torque_flag) muflag = 1; if (!qflag && !muflag) error->all(FLERR, "Fix {} requires atom attribute q or mu", style); + // warn if TIP4P pair style is used with plain fix efield + if ((strcmp(style, "efield") == 0) && (comm->me == 0)) { + int itmp; + if (force->pair && force->pair->extract("qdist", itmp)) + error->warning(FLERR, "Fix efield produces incorrect forces when applied to TIP4P atoms"); + } + // check variables if (xstr) { From 08153b7b4dbe4c0b430c89da68ea796f5c1d670c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 21:01:32 -0400 Subject: [PATCH 439/445] trim list of known plumed source packages. --- lib/plumed/Install.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/lib/plumed/Install.py b/lib/plumed/Install.py index 21e8ac51ff..9c42da4089 100644 --- a/lib/plumed/Install.py +++ b/lib/plumed/Install.py @@ -37,30 +37,12 @@ make lib-plumed args="-b" # download/build in lib/plumed/plumed2 make lib-plumed args="-p $HOME/plumed2 -m shared" # use existing Plumed2 installation in $HOME/plumed2 """ -# known checksums for different PLUMED versions. used to validate the download. +# known checksums for different PLUMED versions. used to validate downloads. checksums = { \ - '2.4.2' : '88188743a6e03ef076e5377d03ebb0e7', \ - '2.4.3' : 'b1be7c48971627febc11c61b70767fc5', \ '2.4.4' : '71ed465bdc7c2059e282dbda8d564e71', \ - '2.5.0' : '6224cd089493661e19ceacccd35cf911', \ - '2.5.1' : 'c2a7b519e32197a120cdf47e0f194f81', \ - '2.5.2' : 'bd2f18346c788eb54e1e52f4f6acf41a', \ - '2.5.3' : 'de30d6e7c2dcc0973298e24a6da24286', \ - '2.5.4' : 'f31b7d16a4be2e30aa7d5c19c3d37853', \ '2.5.7' : '1ca36226fdb8110b1009aa61d615d4e5', \ - '2.6.0' : '204d2edae58d9b10ba3ad460cad64191', \ - '2.6.1' : '89a9a450fc6025299fe16af235957163', \ - '2.6.3' : 'a9f8028fd74528c2024781ea1fdefeee', \ - '2.6.5' : 'b67356f027e5c2747823b0422c3b0ec2', \ '2.6.6' : '6b470dcdce04c221ea42d8500b03c49b', \ - '2.7.0' : '95f29dd0c067577f11972ff90dfc7d12', \ - '2.7.1' : '4eac6a462ec84dfe0cec96c82421b8e8', \ - '2.7.2' : 'cfa0b4dd90a81c25d3302e8d97bfeaea', \ - '2.7.3' : 'f00cc82edfefe6bb3df934911dbe32fb', \ - '2.7.4' : 'f858e0b6aed173748fc85b6bc8a9dcb3', \ - '2.7.5' : '2aca1986d6c1ca3ba7e9eb51b1102792', \ '2.7.6' : 'fb8c0ec10f97a9353eb123a5c4c35aa6', \ - '2.8.0' : '489b23daba70da78cf0506cbc31689c6', \ '2.8.1' : '6bfe72ebdae63dc38a9ca27d9b0e08f8', \ '2.8.2' : '599092b6a0aa6fff992612537ad98994', \ } From e7b7d5804e46faee3f192806d788eec970013335 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 21:23:02 -0400 Subject: [PATCH 440/445] Update URL for EPEL --- doc/src/Install_linux.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/Install_linux.rst b/doc/src/Install_linux.rst index 91e7529879..53f4965e08 100644 --- a/doc/src/Install_linux.rst +++ b/doc/src/Install_linux.rst @@ -172,7 +172,7 @@ Pre-built EPEL Linux executable ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pre-built LAMMPS (and KIM) packages for stable releases are available -in the `Extra Packages for Enterprise Linux (EPEL) repository `_ +in the `Extra Packages for Enterprise Linux (EPEL) repository `_ for use with Red Hat Enterprise Linux (RHEL) or CentOS version 7.x and compatible Linux distributions. Names of packages, executable, and content are the same as described above for Fedora Linux. From c9b383d3f0ca367f02d2996f8b712900066afafb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 22:18:35 -0400 Subject: [PATCH 441/445] grammar --- src/GRANULAR/fix_pour.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 477fc4720b..f92bca5073 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -678,7 +678,7 @@ void FixPour::pre_exchange() int ninserted_atoms = nnear - nprevious; int ninserted_mols = ninserted_atoms / natom; ninserted += ninserted_mols; - if (ninserted_mols < nnew && me == 0) error->warning(FLERR, "Less insertions than requested"); + if (ninserted_mols < nnew && me == 0) error->warning(FLERR, "Fewer insertions than requested"); // reset global natoms,nbonds,etc // increment maxtag_all and maxmol_all if necessary From 073f21c0d9eb653020716d488df5d4f5d86ef281 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 22:35:25 -0400 Subject: [PATCH 442/445] spelling --- doc/src/Modify_gran_sub_mod.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/src/Modify_gran_sub_mod.rst b/doc/src/Modify_gran_sub_mod.rst index fe8b0da275..e1d559e6bf 100644 --- a/doc/src/Modify_gran_sub_mod.rst +++ b/doc/src/Modify_gran_sub_mod.rst @@ -20,16 +20,16 @@ parent GranSubMod class, several types of sub-model classes are derived: * GranSubModTwisting: twisting friction sub-model * GranSubModHeat: heat conduction sub-model -For each type of sub-model, more classes are further derived, each describing -a specific implementation. For instance, from the GranSubModNormal class the +For each type of sub-model, more classes are further derived, each describing a +specific implementation. For instance, from the GranSubModNormal class the GranSubModNormalHooke, GranSubModNormalHertz, and GranSubModNormalJKR classes -are derived which calculate Hookean, Hertzian, or JKR normal forces, respectively. -This modular structure simplifies the addition of new granular contact models as -as one onlyneeds to create a new GranSubMod class without having to modify the more -complex PairGranular, FixGranWall, and GranularModel classes. Most GranSubMod methods -are also already defined by the parent classes so new contact models typically only -require edits to a few relevant methods (e.g. methods that define coefficients and -calculate forces). +are derived which calculate Hookean, Hertzian, or JKR normal forces, +respectively. This modular structure simplifies the addition of new granular +contact models as as one only needs to create a new GranSubMod class without +having to modify the more complex PairGranular, FixGranWall, and GranularModel +classes. Most GranSubMod methods are also already defined by the parent classes +so new contact models typically only require edits to a few relevant methods +(e.g. methods that define coefficients and calculate forces). Each GranSubMod class has a pointer to both the LAMMPS class and the GranularModel class which owns it, ``lmp`` and ``gm``, respectively. The GranularModel class From a232915e716126f317dcd332e9fcc1b8448214bd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 22:37:58 -0400 Subject: [PATCH 443/445] update example logs for changed granular pair style --- .../log.15Sep22.granregion.box.g++.1 | 493 -------------- .../log.15Sep22.granregion.box.g++.4 | 493 -------------- .../log.15Sep22.granregion.funnel.g++.1 | 633 ----------------- .../log.15Sep22.granregion.funnel.g++.4 | 633 ----------------- .../log.15Sep22.granregion.mixer.g++.1 | 632 ----------------- .../log.15Sep22.granregion.mixer.g++.4 | 632 ----------------- .../log.16Mar23.granregion.box.g++.1 | 484 +++++++++++++ .../log.16Mar23.granregion.box.g++.4 | 484 +++++++++++++ .../log.16Mar23.granregion.funnel.g++.1 | 635 ++++++++++++++++++ .../log.16Mar23.granregion.funnel.g++.4 | 635 ++++++++++++++++++ .../log.16Mar23.granregion.mixer.g++.1 | 634 +++++++++++++++++ .../log.16Mar23.granregion.mixer.g++.4 | 634 +++++++++++++++++ examples/pour/log.16Mar23.pour.2d.g++.1 | 125 ++++ examples/pour/log.16Mar23.pour.2d.g++.4 | 125 ++++ .../pour/log.16Mar23.pour.2d.molecule.g++.1 | 148 ++++ .../pour/log.16Mar23.pour.2d.molecule.g++.4 | 148 ++++ examples/pour/log.16Mar23.pour.g++.1 | 178 +++++ examples/pour/log.16Mar23.pour.g++.4 | 178 +++++ examples/pour/log.27Nov18.pour.2d.g++.1 | 121 ---- examples/pour/log.27Nov18.pour.2d.g++.4 | 121 ---- .../pour/log.27Nov18.pour.2d.molecule.g++.1 | 142 ---- .../pour/log.27Nov18.pour.2d.molecule.g++.4 | 142 ---- examples/pour/log.27Nov18.pour.g++.1 | 175 ----- examples/pour/log.27Nov18.pour.g++.4 | 175 ----- 24 files changed, 4408 insertions(+), 4392 deletions(-) delete mode 100644 examples/granregion/log.15Sep22.granregion.box.g++.1 delete mode 100644 examples/granregion/log.15Sep22.granregion.box.g++.4 delete mode 100644 examples/granregion/log.15Sep22.granregion.funnel.g++.1 delete mode 100644 examples/granregion/log.15Sep22.granregion.funnel.g++.4 delete mode 100644 examples/granregion/log.15Sep22.granregion.mixer.g++.1 delete mode 100644 examples/granregion/log.15Sep22.granregion.mixer.g++.4 create mode 100644 examples/granregion/log.16Mar23.granregion.box.g++.1 create mode 100644 examples/granregion/log.16Mar23.granregion.box.g++.4 create mode 100644 examples/granregion/log.16Mar23.granregion.funnel.g++.1 create mode 100644 examples/granregion/log.16Mar23.granregion.funnel.g++.4 create mode 100644 examples/granregion/log.16Mar23.granregion.mixer.g++.1 create mode 100644 examples/granregion/log.16Mar23.granregion.mixer.g++.4 create mode 100644 examples/pour/log.16Mar23.pour.2d.g++.1 create mode 100644 examples/pour/log.16Mar23.pour.2d.g++.4 create mode 100644 examples/pour/log.16Mar23.pour.2d.molecule.g++.1 create mode 100644 examples/pour/log.16Mar23.pour.2d.molecule.g++.4 create mode 100644 examples/pour/log.16Mar23.pour.g++.1 create mode 100644 examples/pour/log.16Mar23.pour.g++.4 delete mode 100644 examples/pour/log.27Nov18.pour.2d.g++.1 delete mode 100644 examples/pour/log.27Nov18.pour.2d.g++.4 delete mode 100644 examples/pour/log.27Nov18.pour.2d.molecule.g++.1 delete mode 100644 examples/pour/log.27Nov18.pour.2d.molecule.g++.4 delete mode 100644 examples/pour/log.27Nov18.pour.g++.1 delete mode 100644 examples/pour/log.27Nov18.pour.g++.4 diff --git a/examples/granregion/log.15Sep22.granregion.box.g++.1 b/examples/granregion/log.15Sep22.granregion.box.g++.1 deleted file mode 100644 index 0df89d49ee..0000000000 --- a/examples/granregion/log.15Sep22.granregion.box.g++.1 +++ /dev/null @@ -1,493 +0,0 @@ -LAMMPS (15 Sep 2022) -# pouring spheres into container box - -units lj -atom_style sphere -boundary f f f -dimension 3 -comm_modify vel yes - -region box block -10 10 -10 10 -10 10 units box -create_box 2 box -Created orthogonal box = (-10 -10 -10) to (10 10 10) - 1 by 1 by 1 MPI processor grid - -pair_style hybrid gran/hooke 4000.0 NULL 100.0 NULL 0.5 1 -pair_coeff * * gran/hooke - -region container block -6 6 -6 6 -6 6 units box -fix container all wall/gran/region hooke/history 4000.0 NULL 100.0 NULL 0.5 1 region container - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 2 all nve/sphere -fix 3 all gravity 1.0 vector 0 0 -1 - -region slab block -2 2 -2 2 -2 2 units box -fix ins all pour 100 2 4767548 vol 0.4 10 diam one 1.0 region slab ignore -Particle insertion: 48 every 566 steps, 100 by step 1133 - -timestep 0.005 - -compute 1 all temp -compute_modify 1 dynamic/dof yes - -compute 2 all temp/sphere -compute_modify 2 dynamic/dof yes - -thermo 100 -thermo_style custom step atoms temp c_1 c_2 press -thermo_modify lost ignore -compute_modify thermo_temp dynamic/dof yes - -#dump 2 all image 100 image.*.jpg type type # zoom 1.4 adiam 1.0 box no 0.0 axes yes 0.9 0.03 -#dump_modify 2 pad 5 - -run 5000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 31 31 31 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hooke, perpetual - attributes: half, newton on, size - pair build: half/size/bin/newton - stencil: half/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 0.5861 | 0.5861 | 0.5861 Mbytes - Step Atoms Temp c_1 c_2 Press - 0 0 0 0 0 0 -WARNING: Less insertions than requested (../fix_pour.cpp:681) - 100 30 0.803783 0.803783 0.39507978 0.0029137134 - 200 30 1.1967995 1.1967995 0.5882574 0.0043383984 - 300 30 1.2814686 1.2814686 0.62987441 0.0046453238 - 400 30 0.82331082 0.82331082 0.41173176 0.0029845017 - 500 30 0.7708462 0.7708462 0.38777784 0.0043831147 -WARNING: Less insertions than requested (../fix_pour.cpp:681) - 600 64 0.51564897 0.51564897 0.26631577 0.0040059368 - 700 64 0.57239348 0.57239348 0.29566901 0.0045075987 - 800 64 0.61837087 0.61837087 0.32195387 0.0048123564 - 900 64 0.53061888 0.53061888 0.28564763 0.0055906552 - 1000 64 0.496299 0.496299 0.26801572 0.0061169128 - 1100 64 0.46068308 0.46068308 0.24699057 0.0055717699 -WARNING: Less insertions than requested (../fix_pour.cpp:681) - 1200 99 0.39206225 0.39206225 0.21356546 0.0066294211 - 1300 99 0.38624966 0.38624966 0.21345854 0.0049051051 - 1400 99 0.35615284 0.35615284 0.19785725 0.0046170772 - 1500 99 0.31486693 0.31486693 0.17429055 0.0064903432 - 1600 99 0.26369001 0.26369001 0.15095266 0.0045226847 - 1700 100 0.1925923 0.1925923 0.11308104 0.007362313 - 1800 100 0.13724978 0.13724978 0.083276845 0.0058136373 - 1900 100 0.077212636 0.077212636 0.053159386 0.0016509598 - 2000 100 0.065294031 0.065294031 0.04372752 0.0020346467 - 2100 100 0.057431398 0.057431398 0.037977068 0.0012681098 - 2200 100 0.059093045 0.059093045 0.037435193 0.00096610799 - 2300 100 0.03422338 0.03422338 0.025491304 0.00069886052 - 2400 100 0.020558284 0.020558284 0.016163009 0.0017260663 - 2500 100 0.015339709 0.015339709 0.012329236 0.00041308031 - 2600 100 0.012891354 0.012891354 0.009766054 0.00030356722 - 2700 100 0.0092634449 0.0092634449 0.0073580108 0.00077723051 - 2800 100 0.0073925841 0.0073925841 0.0059932218 0.00016466767 - 2900 100 0.0081228267 0.0081228267 0.006281761 0.00013828388 - 3000 100 0.0041833223 0.0041833223 0.0035147096 0.00013160599 - 3100 100 0.0035930775 0.0035930775 0.0030039922 0.00060639771 - 3200 100 0.0030824465 0.0030824465 0.0026541293 0.00047391014 - 3300 100 0.0035087522 0.0035087522 0.0027664508 0.00014080317 - 3400 100 0.0018537868 0.0018537868 0.0017099705 6.3326674e-05 - 3500 100 0.0015371228 0.0015371228 0.0014155433 0.00021612522 - 3600 100 0.001708556 0.001708556 0.0014369892 8.1034202e-05 - 3700 100 0.00095948652 0.00095948652 0.0009788528 3.4694023e-05 - 3800 100 0.00091875668 0.00091875668 0.00086805146 3.9373686e-05 - 3900 100 0.001557068 0.001557068 0.001159526 2.5178607e-05 - 4000 100 0.00062012451 0.00062012451 0.00066806922 5.6680551e-06 - 4100 100 0.00060940771 0.00060940771 0.00065614741 1.0137901e-05 - 4200 100 0.00059538437 0.00059538437 0.00064501521 7.3679744e-06 - 4300 100 0.00052946048 0.00052946048 0.00059353641 5.9225081e-06 - 4400 100 0.00051202281 0.00051202281 0.00057524772 3.6198435e-05 - 4500 100 0.00049986632 0.00049986632 0.00055754521 2.2275519e-05 - 4600 100 0.00048187334 0.00048187334 0.00053988815 2.2015243e-05 - 4700 100 0.00045261491 0.00045261491 0.00050298355 8.9681339e-05 - 4800 100 0.00034965427 0.00034965427 0.0004278781 1.0983535e-05 - 4900 100 0.00033555621 0.00033555621 0.00041435167 2.9266598e-05 - 5000 100 0.00031387148 0.00031387148 0.00039605781 2.5628425e-05 -Loop time of 0.078687 on 1 procs for 5000 steps with 100 atoms - -Performance: 27450544.413 tau/day, 63542.927 timesteps/s, 6.354 Matom-step/s -80.5% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0084151 | 0.0084151 | 0.0084151 | 0.0 | 10.69 -Neigh | 0.012728 | 0.012728 | 0.012728 | 0.0 | 16.18 -Comm | 0.0056143 | 0.0056143 | 0.0056143 | 0.0 | 7.14 -Output | 0.00051411 | 0.00051411 | 0.00051411 | 0.0 | 0.65 -Modify | 0.041412 | 0.041412 | 0.041412 | 0.0 | 52.63 -Other | | 0.01 | | | 12.71 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 164 ave 164 max 164 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 164 -Ave neighs/atom = 1.64 -Neighbor list builds = 281 -Dangerous builds = 0 - -region container delete -variable theta equal (step-5000)*(4.0*PI/5000) -region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 0 0 1 -run 5000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 31 31 31 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hooke, perpetual - attributes: half, newton on, size - pair build: half/size/bin/newton - stencil: half/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes - Step Atoms Temp c_1 c_2 Press - 5000 100 0.00031387148 0.00031387148 0.00039605781 2.6174978e-05 - 5100 100 0.54537023 0.54537023 0.30042175 0.0087427352 - 5200 100 0.57210852 0.57210852 0.3192468 0.0098134067 - 5300 100 0.7168108 0.7168108 0.38577893 0.011004584 - 5400 100 0.78895524 0.78895524 0.41889428 0.013555713 - 5500 100 0.87797874 0.87797874 0.45689223 0.01565356 - 5600 100 0.95424379 0.95424379 0.48830429 0.014707858 - 5700 100 1.0046012 1.0046012 0.51054927 0.01469179 - 5800 100 1.0371453 1.0371453 0.5262568 0.015576788 - 5900 100 1.0545743 1.0545743 0.5361173 0.01589889 - 6000 100 1.0932949 1.0932949 0.55402214 0.017484573 - 6100 100 1.1148364 1.1148364 0.56241126 0.01721788 - 6200 100 1.1315267 1.1315267 0.57050887 0.017961246 - 6300 100 1.1506124 1.1506124 0.58009471 0.017159062 - 6400 100 1.1663328 1.1663328 0.5876586 0.017935311 - 6500 100 1.1821086 1.1821086 0.59595162 0.018005316 - 6600 100 1.2039397 1.2039397 0.60567524 0.021604669 - 6700 100 1.2269911 1.2269911 0.61770224 0.018907995 - 6800 100 1.2447035 1.2447035 0.6257652 0.02053766 - 6900 100 1.2625323 1.2625323 0.63486698 0.020106134 - 7000 100 1.2617127 1.2617127 0.63318163 0.019670429 - 7100 100 1.260715 1.260715 0.63311254 0.019810631 - 7200 100 1.2790404 1.2790404 0.64079001 0.020218903 - 7300 100 1.2760228 1.2760228 0.6395331 0.021749906 - 7400 100 1.2799658 1.2799658 0.64139084 0.020472922 - 7500 100 1.2846473 1.2846473 0.64343085 0.020610025 - 7600 100 1.2883965 1.2883965 0.64491873 0.02074884 - 7700 100 1.2926891 1.2926891 0.64684545 0.020599654 - 7800 100 1.3032201 1.3032201 0.65119455 0.02183405 - 7900 100 1.3025628 1.3025628 0.65068661 0.021248589 - 8000 100 1.3052302 1.3052302 0.65208602 0.021399549 - 8100 100 1.3069867 1.3069867 0.65304849 0.021254794 - 8200 100 1.3092024 1.3092024 0.6543837 0.021220909 - 8300 100 1.3101468 1.3101468 0.65519741 0.021328361 - 8400 100 1.3116005 1.3116005 0.65545253 0.021493555 - 8500 100 1.3153616 1.3153616 0.65731542 0.021433279 - 8600 100 1.3164556 1.3164556 0.65791227 0.021531213 - 8700 100 1.3187245 1.3187245 0.65915974 0.02170181 - 8800 100 1.3215981 1.3215981 0.66036644 0.022358849 - 8900 100 1.3206845 1.3206845 0.65984651 0.021901337 - 9000 100 1.3213046 1.3213046 0.66020378 0.021876353 - 9100 100 1.3225084 1.3225084 0.66088847 0.021811098 - 9200 100 1.3240309 1.3240309 0.66180646 0.021768929 - 9300 100 1.325458 1.325458 0.66280401 0.02165852 - 9400 100 1.3322968 1.3322968 0.66615126 0.022139018 - 9500 100 1.3416035 1.3416035 0.67030794 0.022243129 - 9600 100 1.3353326 1.3353326 0.66692811 0.022622122 - 9700 100 1.336265 1.336265 0.66727395 0.022171165 - 9800 100 1.3344531 1.3344531 0.66634538 0.022025131 - 9900 100 1.3337098 1.3337098 0.66601721 0.022111706 - 10000 100 1.3335539 1.3335539 0.66597627 0.022133817 -Loop time of 0.235008 on 1 procs for 5000 steps with 100 atoms - -Performance: 9191156.994 tau/day, 21275.826 timesteps/s, 2.128 Matom-step/s -94.1% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.029846 | 0.029846 | 0.029846 | 0.0 | 12.70 -Neigh | 0.030211 | 0.030211 | 0.030211 | 0.0 | 12.86 -Comm | 0.005731 | 0.005731 | 0.005731 | 0.0 | 2.44 -Output | 0.00051873 | 0.00051873 | 0.00051873 | 0.0 | 0.22 -Modify | 0.1583 | 0.1583 | 0.1583 | 0.0 | 67.36 -Other | | 0.01041 | | | 4.43 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 186 ave 186 max 186 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 186 -Ave neighs/atom = 1.86 -Neighbor list builds = 626 -Dangerous builds = 0 - -region container delete -region container block -6 6 -6 6 -6 6 units box -run 5000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes - Step Atoms Temp c_1 c_2 Press - 10000 100 1.3335539 1.3335539 0.66597627 0.022207076 - 10100 100 0.29976134 0.29976134 0.1752962 0.0091355801 - 10200 100 0.1548002 0.1548002 0.1005356 0.0062509071 - 10300 100 0.082468613 0.082468613 0.066729575 0.0017315098 - 10400 100 0.06731284 0.06731284 0.056685383 0.0011965765 - 10500 100 0.050167538 0.050167538 0.042388389 0.0010830279 - 10600 100 0.041091371 0.041091371 0.034743534 0.00092984522 - 10700 100 0.033199041 0.033199041 0.027954031 0.0018451338 - 10800 100 0.027880411 0.027880411 0.024437224 0.0013039536 - 10900 100 0.024634597 0.024634597 0.021815184 0.00030935286 - 11000 100 0.020741105 0.020741105 0.018754221 0.0006306901 - 11100 100 0.017210914 0.017210914 0.015842306 0.00075930229 - 11200 100 0.01254319 0.01254319 0.012145795 0.00047388541 - 11300 100 0.010032468 0.010032468 0.0095918697 0.0014677116 - 11400 100 0.0081538458 0.0081538458 0.0080985914 0.00032485316 - 11500 100 0.0072918155 0.0072918155 0.0070156789 0.00023642827 - 11600 100 0.0070136586 0.0070136586 0.0067263114 7.8490444e-05 - 11700 100 0.0061722946 0.0061722946 0.0058832419 0.00013450793 - 11800 100 0.0052444487 0.0052444487 0.0049294304 8.6973121e-05 - 11900 100 0.0048212279 0.0048212279 0.0045261412 0.00010458031 - 12000 100 0.0046782797 0.0046782797 0.0044011937 0.00018881094 - 12100 100 0.0042066617 0.0042066617 0.0040330976 0.00015507521 - 12200 100 0.0038529032 0.0038529032 0.003664712 1.1476621e-05 - 12300 100 0.0033203238 0.0033203238 0.0032404054 0.00027622191 - 12400 100 0.003113731 0.003113731 0.0030491123 3.8532421e-05 - 12500 100 0.0029925149 0.0029925149 0.0029415075 4.2673261e-05 - 12600 100 0.0028383323 0.0028383323 0.0027902992 9.328552e-05 - 12700 100 0.0026386104 0.0026386104 0.0026095714 7.7740986e-05 - 12800 100 0.0023509873 0.0023509873 0.0023518594 3.1944764e-05 - 12900 100 0.0022296104 0.0022296104 0.0022030693 4.5393502e-05 - 13000 100 0.0021991358 0.0021991358 0.0021560478 0.0001221212 - 13100 100 0.0021011001 0.0021011001 0.0020752855 2.4605107e-05 - 13200 100 0.002004495 0.002004495 0.0020040212 2.4805625e-05 - 13300 100 0.0018394135 0.0018394135 0.0018288384 6.2227066e-05 - 13400 100 0.0016314086 0.0016314086 0.0016058102 0.00010372886 - 13500 100 0.0015042857 0.0015042857 0.0014660263 0.00020805178 - 13600 100 0.0013584764 0.0013584764 0.0013177418 5.1603333e-05 - 13700 100 0.0012407449 0.0012407449 0.0011902637 8.87401e-05 - 13800 100 0.0011673364 0.0011673364 0.0011324247 2.3668551e-05 - 13900 100 0.0011429204 0.0011429204 0.0011072347 1.414364e-05 - 14000 100 0.001087543 0.001087543 0.0010616439 3.0874865e-05 - 14100 100 0.00098839393 0.00098839393 0.00096445684 6.5331515e-05 - 14200 100 0.00095139076 0.00095139076 0.00093658993 2.5649208e-05 - 14300 100 0.00089532494 0.00089532494 0.00082626435 2.6200482e-05 - 14400 100 0.00077973015 0.00077973015 0.00070733785 2.29298e-05 - 14500 100 0.00068559117 0.00068559117 0.00062297009 8.4841907e-06 - 14600 100 0.00059199698 0.00059199698 0.00052453148 1.2737231e-05 - 14700 100 0.00055052378 0.00055052378 0.00048459372 1.3028328e-05 - 14800 100 0.00049397913 0.00049397913 0.00044094284 6.1129918e-06 - 14900 100 0.00048082746 0.00048082746 0.00043128724 3.7301936e-06 - 15000 100 0.00046847825 0.00046847825 0.00041484245 5.7974184e-06 -Loop time of 0.0802044 on 1 procs for 5000 steps with 100 atoms - -Performance: 26931180.398 tau/day, 62340.695 timesteps/s, 6.234 Matom-step/s -82.1% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0080809 | 0.0080809 | 0.0080809 | 0.0 | 10.08 -Neigh | 0.0048815 | 0.0048815 | 0.0048815 | 0.0 | 6.09 -Comm | 0.0055605 | 0.0055605 | 0.0055605 | 0.0 | 6.93 -Output | 0.00050386 | 0.00050386 | 0.00050386 | 0.0 | 0.63 -Modify | 0.051104 | 0.051104 | 0.051104 | 0.0 | 63.72 -Other | | 0.01007 | | | 12.56 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 157 ave 157 max 157 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 157 -Ave neighs/atom = 1.57 -Neighbor list builds = 100 -Dangerous builds = 0 - -region container delete -variable theta equal (step-15000)*(4.0*PI/5000) -region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 1 1 1 -run 5000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes - Step Atoms Temp c_1 c_2 Press - 15000 100 0.00046847825 0.00046847825 0.00041484245 5.7974184e-06 - 15100 100 0.96677694 0.96677694 0.64420785 0.01431184 - 15200 100 1.0659255 1.0659255 0.69293741 0.013240486 - 15300 100 1.1647631 1.1647631 0.75191941 0.014622673 - 15400 100 1.3411593 1.3411593 0.85696383 0.02561549 - 15500 100 1.6033758 1.6033758 0.99094919 0.026221789 - 15600 100 1.7889645 1.7889645 1.075315 0.024116301 - 15700 100 1.8077023 1.8077023 1.0842652 0.031781756 - 15800 100 2.0252655 2.0252655 1.1517407 0.037201818 - 15900 100 2.1479427 2.1479427 1.2061238 0.027668435 - 16000 100 2.1788838 2.1788838 1.2205599 0.029114273 - 16100 100 2.3257431 2.3257431 1.2921157 0.035663063 - 16200 100 2.3885449 2.3885449 1.3282237 0.032255517 - 16300 100 2.3670966 2.3670966 1.3091694 0.029579008 - 16400 100 2.5097781 2.5097781 1.3712036 0.034579196 - 16500 100 2.6440883 2.6440883 1.4440043 0.03347813 - 16600 100 2.7230084 2.7230084 1.481565 0.036660339 - 16700 100 2.8246108 2.8246108 1.5298387 0.035623641 - 16800 100 3.0338694 3.0338694 1.6333504 0.038818594 - 16900 100 3.1219584 3.1219584 1.6790766 0.043444123 - 17000 100 3.4103817 3.4103817 1.8222668 0.044524654 - 17100 100 3.3869069 3.3869069 1.8170743 0.050670801 - 17200 100 3.4220314 3.4220314 1.8312364 0.045956123 - 17300 100 3.396894 3.396894 1.8158291 0.050420297 - 17400 100 3.4508224 3.4508224 1.8429996 0.049923733 - 17500 100 3.5039601 3.5039601 1.8822352 0.051047713 - 17600 100 3.3743905 3.3743905 1.8380347 0.047922214 - 17700 100 3.3729709 3.3729709 1.8224123 0.04758126 - 17800 100 3.3237798 3.3237798 1.7962316 0.045427975 - 17900 100 3.2441052 3.2441052 1.7782748 0.044651231 - 18000 100 3.1169205 3.1169205 1.704639 0.047440495 - 18100 100 3.1704608 3.1704608 1.7326375 0.045656546 - 18200 100 3.1113438 3.1113438 1.7002232 0.041619255 - 18300 100 3.2506111 3.2506111 1.7693075 0.048028527 - 18400 100 3.3840681 3.3840681 1.8370672 0.04443243 - 18500 100 3.4822823 3.4822823 1.9125273 0.043687118 - 18600 100 3.5214372 3.5214372 1.9364829 0.049798605 - 18700 100 3.5439229 3.5439229 1.9441301 0.046240266 - 18800 100 3.6046761 3.6046761 1.9791448 0.054369382 - 18900 100 3.8598403 3.8598403 2.0999449 0.049863074 - 19000 100 3.8606461 3.8606461 2.0885493 0.050269245 - 19100 100 4.076627 4.076627 2.2025766 0.058050893 - 19200 100 3.8280814 3.8280814 2.0749884 0.05730905 - 19300 100 3.8211633 3.8211633 2.0759453 0.05145071 - 19400 100 3.7726284 3.7726284 2.0466555 0.053566404 - 19500 100 3.7468403 3.7468403 2.03218 0.048422025 - 19600 100 3.6408955 3.6408955 1.9873843 0.046565134 - 19700 100 3.6454187 3.6454187 2.0042204 0.049299897 - 19800 100 3.5165071 3.5165071 1.937379 0.046319859 - 19900 100 3.4670702 3.4670702 1.9140316 0.045650114 - 20000 100 3.6114294 3.6114294 1.9798674 0.05431148 -Loop time of 0.203164 on 1 procs for 5000 steps with 100 atoms - -Performance: 10631806.993 tau/day, 24610.664 timesteps/s, 2.461 Matom-step/s -92.3% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.01242 | 0.01242 | 0.01242 | 0.0 | 6.11 -Neigh | 0.044478 | 0.044478 | 0.044478 | 0.0 | 21.89 -Comm | 0.0057766 | 0.0057766 | 0.0057766 | 0.0 | 2.84 -Output | 0.00051702 | 0.00051702 | 0.00051702 | 0.0 | 0.25 -Modify | 0.12923 | 0.12923 | 0.12923 | 0.0 | 63.61 -Other | | 0.01074 | | | 5.29 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 142 ave 142 max 142 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 142 -Ave neighs/atom = 1.42 -Neighbor list builds = 909 -Dangerous builds = 0 - -region container delete -region container block -6 6 -6 6 -6 6 units box -run 5000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes - Step Atoms Temp c_1 c_2 Press - 20000 100 3.6114294 3.6114294 1.9798674 0.053887263 - 20100 100 1.0907336 1.0907336 0.69799767 0.013925984 - 20200 100 0.92304387 0.92304387 0.59520318 0.012377709 - 20300 100 0.84004201 0.84004201 0.55081472 0.012108246 - 20400 100 0.89491209 0.89491209 0.56269969 0.01221427 - 20500 100 0.92011482 0.92011482 0.56971815 0.011353588 - 20600 100 0.95722998 0.95722998 0.58038747 0.01185569 - 20700 100 0.92635786 0.92635786 0.55373959 0.011953734 - 20800 100 0.93088162 0.93088162 0.55094813 0.012887472 - 20900 100 0.97288373 0.97288373 0.56309599 0.013731021 - 21000 100 0.63378762 0.63378762 0.3779177 0.010114787 - 21100 100 0.34618473 0.34618473 0.21652381 0.0070717708 - 21200 100 0.18660008 0.18660008 0.1302051 0.006504227 - 21300 100 0.13917709 0.13917709 0.09667499 0.0032593765 - 21400 100 0.11627047 0.11627047 0.080272858 0.0028891045 - 21500 100 0.086269781 0.086269781 0.064184981 0.0019374959 - 21600 100 0.08052393 0.08052393 0.059561101 0.001214522 - 21700 100 0.036026032 0.036026032 0.030243348 0.001199233 - 21800 100 0.02392645 0.02392645 0.022284244 0.00060060634 - 21900 100 0.016991266 0.016991266 0.017366625 0.00065672411 - 22000 100 0.016974877 0.016974877 0.016399245 0.0005903103 - 22100 100 0.015491818 0.015491818 0.014806105 0.00051181051 - 22200 100 0.011908698 0.011908698 0.011206673 0.00099478656 - 22300 100 0.010002714 0.010002714 0.0093749794 0.00028214624 - 22400 100 0.0081652616 0.0081652616 0.0079594664 0.00026841276 - 22500 100 0.0067602843 0.0067602843 0.0067498831 0.00019472612 - 22600 100 0.0061024058 0.0061024058 0.0062958451 0.00016615781 - 22700 100 0.005331422 0.005331422 0.0056152366 0.00021543475 - 22800 100 0.0040796708 0.0040796708 0.004140932 0.00024397062 - 22900 100 0.0042042089 0.0042042089 0.0040406804 0.00015880055 - 23000 100 0.0056083872 0.0056083872 0.0046056699 0.00029203396 - 23100 100 0.0035006398 0.0035006398 0.003343101 0.00010571574 - 23200 100 0.0032402473 0.0032402473 0.003122476 0.00012784403 - 23300 100 0.0030100724 0.0030100724 0.0029649423 8.5613724e-05 - 23400 100 0.002746305 0.002746305 0.0027519317 9.6521844e-05 - 23500 100 0.0028543876 0.0028543876 0.002842845 0.00012566665 - 23600 100 0.0036979234 0.0036979234 0.0032448309 8.6321879e-05 - 23700 100 0.0030503565 0.0030503565 0.0027392305 5.9716835e-05 - 23800 100 0.0021564041 0.0021564041 0.0022097768 0.00028317769 - 23900 100 0.0018905956 0.0018905956 0.0020002233 4.5205733e-05 - 24000 100 0.0015705513 0.0015705513 0.0017262538 0.00026550225 - 24100 100 0.0013341334 0.0013341334 0.0015663921 4.8307183e-05 - 24200 100 0.0012426828 0.0012426828 0.0014960127 5.5195907e-05 - 24300 100 0.0011933799 0.0011933799 0.0014508697 5.2781568e-05 - 24400 100 0.0010126015 0.0010126015 0.0012821281 0.00011096457 - 24500 100 0.00094102576 0.00094102576 0.0012265703 3.3454252e-05 - 24600 100 0.00092243997 0.00092243997 0.0011970533 3.7288789e-05 - 24700 100 0.00080565605 0.00080565605 0.0010864406 0.00015797228 - 24800 100 0.00075303124 0.00075303124 0.0010103671 5.4727635e-05 - 24900 100 0.00074808599 0.00074808599 0.0010053951 8.6607732e-05 - 25000 100 0.00071720457 0.00071720457 0.00096622937 0.00015861964 -Loop time of 0.0845534 on 1 procs for 5000 steps with 100 atoms - -Performance: 25545994.179 tau/day, 59134.246 timesteps/s, 5.913 Matom-step/s -90.2% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0091411 | 0.0091411 | 0.0091411 | 0.0 | 10.81 -Neigh | 0.013557 | 0.013557 | 0.013557 | 0.0 | 16.03 -Comm | 0.0056205 | 0.0056205 | 0.0056205 | 0.0 | 6.65 -Output | 0.0005087 | 0.0005087 | 0.0005087 | 0.0 | 0.60 -Modify | 0.045578 | 0.045578 | 0.045578 | 0.0 | 53.90 -Other | | 0.01015 | | | 12.00 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 151 ave 151 max 151 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 151 -Ave neighs/atom = 1.51 -Neighbor list builds = 286 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/granregion/log.15Sep22.granregion.box.g++.4 b/examples/granregion/log.15Sep22.granregion.box.g++.4 deleted file mode 100644 index 3e83d3bb04..0000000000 --- a/examples/granregion/log.15Sep22.granregion.box.g++.4 +++ /dev/null @@ -1,493 +0,0 @@ -LAMMPS (15 Sep 2022) -# pouring spheres into container box - -units lj -atom_style sphere -boundary f f f -dimension 3 -comm_modify vel yes - -region box block -10 10 -10 10 -10 10 units box -create_box 2 box -Created orthogonal box = (-10 -10 -10) to (10 10 10) - 1 by 2 by 2 MPI processor grid - -pair_style hybrid gran/hooke 4000.0 NULL 100.0 NULL 0.5 1 -pair_coeff * * gran/hooke - -region container block -6 6 -6 6 -6 6 units box -fix container all wall/gran/region hooke/history 4000.0 NULL 100.0 NULL 0.5 1 region container - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 2 all nve/sphere -fix 3 all gravity 1.0 vector 0 0 -1 - -region slab block -2 2 -2 2 -2 2 units box -fix ins all pour 100 2 4767548 vol 0.4 10 diam one 1.0 region slab ignore -Particle insertion: 48 every 566 steps, 100 by step 1133 - -timestep 0.005 - -compute 1 all temp -compute_modify 1 dynamic/dof yes - -compute 2 all temp/sphere -compute_modify 2 dynamic/dof yes - -thermo 100 -thermo_style custom step atoms temp c_1 c_2 press -thermo_modify lost ignore -compute_modify thermo_temp dynamic/dof yes - -#dump 2 all image 100 image.*.jpg type type # zoom 1.4 adiam 1.0 box no 0.0 axes yes 0.9 0.03 -#dump_modify 2 pad 5 - -run 5000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 31 31 31 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hooke, perpetual - attributes: half, newton on, size - pair build: half/size/bin/newton - stencil: half/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 0.4843 | 0.4843 | 0.4843 Mbytes - Step Atoms Temp c_1 c_2 Press - 0 0 0 0 0 0 -WARNING: Less insertions than requested (../fix_pour.cpp:681) - 100 30 0.803783 0.803783 0.39507978 0.0029137134 - 200 30 1.1967995 1.1967995 0.5882574 0.0043383984 - 300 30 1.2814686 1.2814686 0.62987441 0.0046453238 - 400 30 0.82331082 0.82331082 0.41173176 0.0029845017 - 500 30 0.7708462 0.7708462 0.38777784 0.0043831147 -WARNING: Less insertions than requested (../fix_pour.cpp:681) - 600 64 0.51564897 0.51564897 0.26631577 0.0040059368 - 700 64 0.57239348 0.57239348 0.29566901 0.0045075987 - 800 64 0.61837087 0.61837087 0.32195387 0.0048123564 - 900 64 0.53061888 0.53061888 0.28564763 0.0055906552 - 1000 64 0.496299 0.496299 0.26801572 0.0061169128 - 1100 64 0.46068308 0.46068308 0.24699057 0.0055717699 -WARNING: Less insertions than requested (../fix_pour.cpp:681) - 1200 99 0.39206225 0.39206225 0.21356546 0.0066294211 - 1300 99 0.38624966 0.38624966 0.21345854 0.0049051051 - 1400 99 0.35615284 0.35615284 0.19785725 0.0046170774 - 1500 99 0.31486691 0.31486691 0.17429054 0.0064903404 - 1600 99 0.26369 0.26369 0.15095263 0.0045226821 - 1700 100 0.19259352 0.19259352 0.11308184 0.0073603886 - 1800 100 0.1372448 0.1372448 0.083273652 0.0058163062 - 1900 100 0.077253038 0.077253038 0.053166156 0.0017440856 - 2000 100 0.065472093 0.065472093 0.04375349 0.0018416047 - 2100 100 0.057213469 0.057213469 0.037773954 0.001226231 - 2200 100 0.058857437 0.058857437 0.0372655 0.00090812381 - 2300 100 0.035066108 0.035066108 0.025934054 0.00072114554 - 2400 100 0.021272125 0.021272125 0.016635107 0.0018506654 - 2500 100 0.015530432 0.015530432 0.012533546 0.0013883971 - 2600 100 0.012603946 0.012603946 0.0096981459 0.00038648118 - 2700 100 0.0097347475 0.0097347475 0.0076016624 0.00057313888 - 2800 100 0.0067081771 0.0067081771 0.0056944431 0.00085080075 - 2900 100 0.0089177981 0.0089177981 0.0065036822 0.00028986539 - 3000 100 0.0057840287 0.0057840287 0.0044989265 0.00016111737 - 3100 100 0.0038909621 0.0038909621 0.0031511938 0.0001708892 - 3200 100 0.0029043214 0.0029043214 0.0025807767 9.2473673e-05 - 3300 100 0.0022769336 0.0022769336 0.0021487157 0.00022312666 - 3400 100 0.0015571397 0.0015571397 0.0016669068 0.0003381372 - 3500 100 0.0015978184 0.0015978184 0.001707772 4.9930818e-05 - 3600 100 0.0023358916 0.0023358916 0.0020709426 9.7687609e-05 - 3700 100 0.0011186736 0.0011186736 0.0012146914 9.3338234e-05 - 3800 100 0.0011657036 0.0011657036 0.0012313764 3.1931251e-05 - 3900 100 0.0014998387 0.0014998387 0.0014015491 2.4226798e-05 - 4000 100 0.0010858335 0.0010858335 0.0010623286 1.6359241e-05 - 4100 100 0.0010464314 0.0010464314 0.0010123557 1.2949588e-05 - 4200 100 0.0010022428 0.0010022428 0.00097338971 1.2402332e-05 - 4300 100 0.00080622372 0.00080622372 0.00084329652 0.00033857037 - 4400 100 0.00073613921 0.00073613921 0.00078373608 1.0103949e-05 - 4500 100 0.00071402196 0.00071402196 0.00076658004 8.8360218e-06 - 4600 100 0.00064851765 0.00064851765 0.00071533461 1.0736438e-05 - 4700 100 0.00061146699 0.00061146699 0.00068274687 4.1341755e-06 - 4800 100 0.00059511472 0.00059511472 0.0006625527 7.3645447e-06 - 4900 100 0.00057700347 0.00057700347 0.0006468562 1.5411897e-05 - 5000 100 0.00056205001 0.00056205001 0.00063592505 7.8813845e-06 -Loop time of 0.0856033 on 4 procs for 5000 steps with 100 atoms - -Performance: 25232672.400 tau/day, 58408.964 timesteps/s, 5.841 Matom-step/s -88.4% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0034695 | 0.0050634 | 0.0068805 | 2.2 | 5.91 -Neigh | 0.0016916 | 0.0024175 | 0.0032212 | 1.5 | 2.82 -Comm | 0.020003 | 0.026482 | 0.033796 | 3.5 | 30.94 -Output | 0.0010864 | 0.001327 | 0.0014374 | 0.4 | 1.55 -Modify | 0.0067352 | 0.015857 | 0.025751 | 7.2 | 18.52 -Other | | 0.03446 | | | 40.25 - -Nlocal: 25 ave 53 max 0 min -Histogram: 2 0 0 0 0 0 0 0 1 1 -Nghost: 4 ave 8 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Neighs: 40.5 ave 92 max 0 min -Histogram: 2 0 0 0 0 0 0 1 0 1 - -Total # of neighbors = 162 -Ave neighs/atom = 1.62 -Neighbor list builds = 288 -Dangerous builds = 0 - -region container delete -variable theta equal (step-5000)*(4.0*PI/5000) -region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 0 0 1 -run 5000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 31 31 31 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hooke, perpetual - attributes: half, newton on, size - pair build: half/size/bin/newton - stencil: half/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 5.609 | 5.672 | 5.734 Mbytes - Step Atoms Temp c_1 c_2 Press - 5000 100 0.00056205001 0.00056205001 0.00063592505 7.871665e-06 - 5100 100 0.59585977 0.59585977 0.32464933 0.0141718 - 5200 100 0.67306764 0.67306764 0.35872096 0.013373672 - 5300 100 0.76065187 0.76065187 0.39925025 0.011460301 - 5400 100 0.87984446 0.87984446 0.45261417 0.013937042 - 5500 100 0.95548319 0.95548319 0.48706892 0.013601658 - 5600 100 0.9993278 0.9993278 0.50830306 0.015663766 - 5700 100 1.0449415 1.0449415 0.52967249 0.016797841 - 5800 100 1.0767598 1.0767598 0.54508699 0.016128855 - 5900 100 1.118688 1.118688 0.56530849 0.016830117 - 6000 100 1.1535698 1.1535698 0.58290663 0.01715335 - 6100 100 1.1753828 1.1753828 0.59419088 0.019273207 - 6200 100 1.1994171 1.1994171 0.60433264 0.018391566 - 6300 100 1.2244707 1.2244707 0.61626199 0.018842556 - 6400 100 1.2507994 1.2507994 0.62829386 0.019538413 - 6500 100 1.2684644 1.2684644 0.63747702 0.020794729 - 6600 100 1.2704726 1.2704726 0.63929889 0.020253985 - 6700 100 1.2737302 1.2737302 0.63970688 0.020858602 - 6800 100 1.287922 1.287922 0.64460894 0.021589773 - 6900 100 1.3028782 1.3028782 0.65197802 0.02135295 - 7000 100 1.306633 1.306633 0.65371741 0.021291182 - 7100 100 1.3161393 1.3161393 0.65785404 0.022554896 - 7200 100 1.3228158 1.3228158 0.6609031 0.021811977 - 7300 100 1.3245632 1.3245632 0.66161966 0.02206776 - 7400 100 1.3266822 1.3266822 0.662738 0.022070761 - 7500 100 1.3265138 1.3265138 0.6624472 0.021944768 - 7600 100 1.3286802 1.3286802 0.66338775 0.0219393 - 7700 100 1.332829 1.332829 0.66547051 0.022142398 - 7800 100 1.3323535 1.3323535 0.66534513 0.022787777 - 7900 100 1.3372424 1.3372424 0.66777556 0.02192759 - 8000 100 1.3396201 1.3396201 0.66910123 0.022439596 - 8100 100 1.3422271 1.3422271 0.67060566 0.023784952 - 8200 100 1.3468062 1.3468062 0.6728991 0.02243345 - 8300 100 1.3439408 1.3439408 0.6717529 0.022312339 - 8400 100 1.3484134 1.3484134 0.67346027 0.022770922 - 8500 100 1.3490032 1.3490032 0.67378177 0.022427863 - 8600 100 1.349789 1.349789 0.67398897 0.022494049 - 8700 100 1.3513512 1.3513512 0.67475613 0.022413559 - 8800 100 1.3535168 1.3535168 0.67589784 0.022356566 - 8900 100 1.3505765 1.3505765 0.67442168 0.022240615 - 9000 100 1.3499918 1.3499918 0.67419831 0.02226049 - 9100 100 1.3518103 1.3518103 0.67489482 0.022399038 - 9200 100 1.3526275 1.3526275 0.67529852 0.022395079 - 9300 100 1.353741 1.353741 0.67585205 0.022471008 - 9400 100 1.3538758 1.3538758 0.67589523 0.022461734 - 9500 100 1.3537199 1.3537199 0.67586527 0.022370169 - 9600 100 1.3539788 1.3539788 0.67602899 0.022400771 - 9700 100 1.3544874 1.3544874 0.67619552 0.022648464 - 9800 100 1.3555422 1.3555422 0.67666186 0.022367319 - 9900 100 1.3560106 1.3560106 0.6768751 0.02236585 - 10000 100 1.3563578 1.3563578 0.6770434 0.022359307 -Loop time of 0.139615 on 4 procs for 5000 steps with 100 atoms - -Performance: 15471121.710 tau/day, 35812.782 timesteps/s, 3.581 Matom-step/s -89.9% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0034672 | 0.011349 | 0.019511 | 7.2 | 8.13 -Neigh | 0.0032972 | 0.0053674 | 0.0074946 | 2.8 | 3.84 -Comm | 0.011049 | 0.018572 | 0.027876 | 5.6 | 13.30 -Output | 0.0010807 | 0.0015593 | 0.0018738 | 0.8 | 1.12 -Modify | 0.013556 | 0.040435 | 0.066715 | 13.0 | 28.96 -Other | | 0.06233 | | | 44.65 - -Nlocal: 25 ave 52 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 3 ave 6 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Neighs: 48.25 ave 109 max 0 min -Histogram: 2 0 0 0 0 0 0 1 0 1 - -Total # of neighbors = 193 -Ave neighs/atom = 1.93 -Neighbor list builds = 626 -Dangerous builds = 0 - -region container delete -region container block -6 6 -6 6 -6 6 units box -run 5000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 5.609 | 5.672 | 5.735 Mbytes - Step Atoms Temp c_1 c_2 Press - 10000 100 1.3563578 1.3563578 0.6770434 0.022433108 - 10100 100 0.32881547 0.32881547 0.18968913 0.0063460187 - 10200 100 0.19880113 0.19880113 0.12812646 0.0074601538 - 10300 100 0.12614062 0.12614062 0.090121373 0.0028337336 - 10400 100 0.088358363 0.088358363 0.067236815 0.0020269846 - 10500 100 0.071199344 0.071199344 0.055567135 0.0016191769 - 10600 100 0.053909616 0.053909616 0.042301996 0.00098643468 - 10700 100 0.039560745 0.039560745 0.032482256 0.00089240864 - 10800 100 0.032130432 0.032130432 0.02705329 0.00058669881 - 10900 100 0.02462494 0.02462494 0.021121496 0.0017376127 - 11000 100 0.020941068 0.020941068 0.017866781 0.00031112553 - 11100 100 0.016775675 0.016775675 0.014620214 0.00026856842 - 11200 100 0.015005732 0.015005732 0.012803923 0.00067036626 - 11300 100 0.012099209 0.012099209 0.010308221 0.00032666902 - 11400 100 0.010559421 0.010559421 0.0090243729 0.00013645685 - 11500 100 0.0093738615 0.0093738615 0.0080176514 0.00098541099 - 11600 100 0.0081900702 0.0081900702 0.0070256953 0.00025935992 - 11700 100 0.0068100165 0.0068100165 0.0058703223 0.00014866816 - 11800 100 0.0060475708 0.0060475708 0.0052518105 0.00017895168 - 11900 100 0.0055607485 0.0055607485 0.0047184164 0.00011358846 - 12000 100 0.0053149064 0.0053149064 0.0045168418 0.00015222428 - 12100 100 0.0050909525 0.0050909525 0.0043196952 6.3000537e-05 - 12200 100 0.0041810842 0.0041810842 0.0036835522 4.6423956e-05 - 12300 100 0.0034305227 0.0034305227 0.0031222649 0.00020251115 - 12400 100 0.0031763077 0.0031763077 0.0028956456 0.00030307787 - 12500 100 0.0027440829 0.0027440829 0.0025087304 0.00010418607 - 12600 100 0.0024581964 0.0024581964 0.0022200229 3.042018e-05 - 12700 100 0.002259527 0.002259527 0.0020708869 4.192368e-05 - 12800 100 0.0019143448 0.0019143448 0.0018088032 4.6200439e-05 - 12900 100 0.0017935964 0.0017935964 0.0017028317 2.2195756e-05 - 13000 100 0.0017286429 0.0017286429 0.0016396753 2.3108871e-05 - 13100 100 0.0017055291 0.0017055291 0.0016122058 2.2444611e-05 - 13200 100 0.0016539275 0.0016539275 0.0015570166 2.0467353e-05 - 13300 100 0.0015777788 0.0015777788 0.0014852505 1.9525012e-05 - 13400 100 0.0015372199 0.0015372199 0.0014497102 2.3203566e-05 - 13500 100 0.0015066638 0.0015066638 0.0014097203 1.8644964e-05 - 13600 100 0.0012290618 0.0012290618 0.0012056216 1.3235643e-05 - 13700 100 0.0011781948 0.0011781948 0.0011685226 3.4312262e-05 - 13800 100 0.0011530136 0.0011530136 0.0011433171 2.8832126e-05 - 13900 100 0.0011085224 0.0011085224 0.0011052764 1.444139e-05 - 14000 100 0.0010656788 0.0010656788 0.0010702461 1.3187775e-05 - 14100 100 0.001029277 0.001029277 0.0010469537 1.2837267e-05 - 14200 100 0.0009750904 0.0009750904 0.0009915384 1.209089e-05 - 14300 100 0.00094893337 0.00094893337 0.00096909301 1.1743051e-05 - 14400 100 0.00087708427 0.00087708427 0.00087575318 1.9027338e-05 - 14500 100 0.00086229913 0.00086229913 0.0008643568 1.0670952e-05 - 14600 100 0.00084206808 0.00084206808 0.0008268172 3.2391722e-05 - 14700 100 0.00077682873 0.00077682873 0.00077186085 9.6132555e-06 - 14800 100 0.00074736908 0.00074736908 0.00074958372 9.2486924e-06 - 14900 100 0.00074456847 0.00074456847 0.00074779946 9.2140349e-06 - 15000 100 0.00073830282 0.00073830282 0.0007426924 9.1364974e-06 -Loop time of 0.0808149 on 4 procs for 5000 steps with 100 atoms - -Performance: 26727738.394 tau/day, 61869.765 timesteps/s, 6.187 Matom-step/s -86.6% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0034354 | 0.0050332 | 0.0069329 | 2.2 | 6.23 -Neigh | 0.00051999 | 0.00084906 | 0.0012075 | 0.0 | 1.05 -Comm | 0.0063631 | 0.014527 | 0.023754 | 6.8 | 17.98 -Output | 0.0010373 | 0.001342 | 0.001464 | 0.5 | 1.66 -Modify | 0.0051837 | 0.017338 | 0.031605 | 9.3 | 21.45 -Other | | 0.04173 | | | 51.63 - -Nlocal: 25 ave 53 max 0 min -Histogram: 2 0 0 0 0 0 0 0 1 1 -Nghost: 3.75 ave 8 max 0 min -Histogram: 2 0 0 0 0 0 0 0 1 1 -Neighs: 39.25 ave 82 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 2 - -Total # of neighbors = 157 -Ave neighs/atom = 1.57 -Neighbor list builds = 100 -Dangerous builds = 0 - -region container delete -variable theta equal (step-15000)*(4.0*PI/5000) -region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 1 1 1 -run 5000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 5.609 | 5.672 | 5.735 Mbytes - Step Atoms Temp c_1 c_2 Press - 15000 100 0.00073830282 0.00073830282 0.0007426924 9.1364974e-06 - 15100 100 1.1048281 1.1048281 0.7023727 0.018379275 - 15200 100 1.2022249 1.2022249 0.77748962 0.015662439 - 15300 100 1.2561351 1.2561351 0.82563065 0.01835048 - 15400 100 1.4372446 1.4372446 0.92907923 0.02087065 - 15500 100 1.6414713 1.6414713 1.0284489 0.025654324 - 15600 100 1.7844655 1.7844655 1.0861866 0.025170346 - 15700 100 2.034248 2.034248 1.2017171 0.040341642 - 15800 100 2.1253699 2.1253699 1.2228657 0.029297194 - 15900 100 2.1940232 2.1940232 1.2470589 0.033866758 - 16000 100 2.2624419 2.2624419 1.2828225 0.030063645 - 16100 100 2.3208536 2.3208536 1.3118956 0.0323489 - 16200 100 2.3564971 2.3564971 1.3261173 0.032882494 - 16300 100 2.3956066 2.3956066 1.3260307 0.03292972 - 16400 100 2.5025831 2.5025831 1.3817693 0.031132988 - 16500 100 2.5947914 2.5947914 1.4152657 0.036126782 - 16600 100 2.7688769 2.7688769 1.4975686 0.037497127 - 16700 100 2.812503 2.812503 1.5216659 0.039316167 - 16800 100 2.8977424 2.8977424 1.5599254 0.039996029 - 16900 100 3.045802 3.045802 1.6332888 0.041406156 - 17000 100 3.2195366 3.2195366 1.7247171 0.040023634 - 17100 100 3.2597294 3.2597294 1.7527958 0.04828292 - 17200 100 3.293587 3.293587 1.7693254 0.044001441 - 17300 100 3.1861836 3.1861836 1.7142076 0.049158822 - 17400 100 3.4593561 3.4593561 1.8426619 0.053469673 - 17500 100 3.3813767 3.3813767 1.8079958 0.058776299 - 17600 100 3.5834203 3.5834203 1.9094759 0.053256842 - 17700 100 3.2243306 3.2243306 1.7425111 0.064354789 - 17800 100 3.358228 3.358228 1.8202932 0.046798524 - 17900 100 3.2257908 3.2257908 1.7678964 0.043655204 - 18000 100 3.237732 3.237732 1.7598181 0.050850672 - 18100 100 3.2042441 3.2042441 1.751979 0.045582006 - 18200 100 3.1562775 3.1562775 1.7336068 0.042210739 - 18300 100 3.2630507 3.2630507 1.7925333 0.046412778 - 18400 100 3.4150588 3.4150588 1.8668408 0.044386435 - 18500 100 3.4913198 3.4913198 1.9125495 0.043329829 - 18600 100 3.5290036 3.5290036 1.9184098 0.048302721 - 18700 100 3.4852698 3.4852698 1.8865833 0.059566124 - 18800 100 3.7157551 3.7157551 2.0082235 0.051356305 - 18900 100 3.9504619 3.9504619 2.1377018 0.051553987 - 19000 100 3.9711274 3.9711274 2.1549121 0.051555312 - 19100 100 3.90954 3.90954 2.1135174 0.0548311 - 19200 100 4.0672819 4.0672819 2.1837089 0.064431553 - 19300 100 3.998355 3.998355 2.1572884 0.056830399 - 19400 100 3.9172127 3.9172127 2.1130164 0.051264041 - 19500 100 3.9120291 3.9120291 2.1088399 0.052545115 - 19600 100 3.8613614 3.8613614 2.0752883 0.055466569 - 19700 100 3.8428824 3.8428824 2.0787804 0.05129261 - 19800 100 3.5686751 3.5686751 1.9356553 0.059177256 - 19900 100 3.5573788 3.5573788 1.9430183 0.054618794 - 20000 100 3.5453022 3.5453022 1.9413343 0.047640543 -Loop time of 0.13841 on 4 procs for 5000 steps with 100 atoms - -Performance: 15605800.739 tau/day, 36124.539 timesteps/s, 3.612 Matom-step/s -89.0% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0047469 | 0.0062771 | 0.0080644 | 1.5 | 4.54 -Neigh | 0.0062517 | 0.0079248 | 0.0094271 | 1.3 | 5.73 -Comm | 0.047109 | 0.048595 | 0.050543 | 0.6 | 35.11 -Output | 0.0011807 | 0.0013428 | 0.0015517 | 0.4 | 0.97 -Modify | 0.022766 | 0.033256 | 0.039993 | 3.5 | 24.03 -Other | | 0.04101 | | | 29.63 - -Nlocal: 25 ave 36 max 13 min -Histogram: 1 0 0 0 1 0 1 0 0 1 -Nghost: 5 ave 9 max 2 min -Histogram: 1 0 1 0 1 0 0 0 0 1 -Neighs: 37.5 ave 53 max 15 min -Histogram: 1 0 0 0 0 1 0 1 0 1 - -Total # of neighbors = 150 -Ave neighs/atom = 1.5 -Neighbor list builds = 913 -Dangerous builds = 0 - -region container delete -region container block -6 6 -6 6 -6 6 units box -run 5000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 5.734 | 5.735 | 5.735 Mbytes - Step Atoms Temp c_1 c_2 Press - 20000 100 3.5453022 3.5453022 1.9413343 0.047178052 - 20100 100 1.0878587 1.0878587 0.68666704 0.016139979 - 20200 100 1.0230655 1.0230655 0.63593494 0.014642345 - 20300 100 0.94958824 0.94958824 0.59306601 0.011745659 - 20400 100 0.93038108 0.93038108 0.57232527 0.01154829 - 20500 100 0.92183816 0.92183816 0.55466942 0.01212559 - 20600 100 1.0175846 1.0175846 0.59940035 0.013815361 - 20700 100 1.0564615 1.0564615 0.60726745 0.013073711 - 20800 100 0.99967869 0.99967869 0.57665019 0.012450813 - 20900 100 0.97051084 0.97051084 0.5574217 0.015686955 - 21000 100 0.639185 0.639185 0.37441942 0.017594616 - 21100 100 0.24979014 0.24979014 0.17121567 0.0084027295 - 21200 100 0.15147941 0.15147941 0.11124349 0.0030435746 - 21300 100 0.13117502 0.13117502 0.091432638 0.0029110318 - 21400 100 0.11158272 0.11158272 0.076264692 0.0021951204 - 21500 100 0.056660993 0.056660993 0.043503807 0.0010993096 - 21600 100 0.028640836 0.028640836 0.026000267 0.0010440792 - 21700 100 0.025816483 0.025816483 0.021922896 0.00081674646 - 21800 100 0.023929555 0.023929555 0.019936972 0.0010383614 - 21900 100 0.022271339 0.022271339 0.017947505 0.0014630387 - 22000 100 0.019277834 0.019277834 0.015483116 0.00058751407 - 22100 100 0.019997809 0.019997809 0.015919504 0.00064176101 - 22200 100 0.015870543 0.015870543 0.01244838 0.0004205505 - 22300 100 0.011797587 0.011797587 0.0096491363 0.00034907063 - 22400 100 0.010745212 0.010745212 0.008874218 0.00035427537 - 22500 100 0.0082372399 0.0082372399 0.0071217811 0.00028179943 - 22600 100 0.007942576 0.007942576 0.0067248822 0.001507115 - 22700 100 0.0061733667 0.0061733667 0.0053092324 0.00056018554 - 22800 100 0.0058287651 0.0058287651 0.004972189 0.00023807695 - 22900 100 0.0051352339 0.0051352339 0.004324157 0.00020849263 - 23000 100 0.0040107769 0.0040107769 0.0035769703 0.00022626101 - 23100 100 0.0040288854 0.0040288854 0.0034355474 0.00019107621 - 23200 100 0.003277858 0.003277858 0.0030013165 0.00016119888 - 23300 100 0.0033633749 0.0033633749 0.0030188927 0.00014459404 - 23400 100 0.003468042 0.003468042 0.0030079205 0.00013778427 - 23500 100 0.0027616702 0.0027616702 0.0024994596 0.00011834915 - 23600 100 0.0022531303 0.0022531303 0.0021182802 0.0002279623 - 23700 100 0.002067768 0.002067768 0.0019631752 0.00014341503 - 23800 100 0.0020069255 0.0020069255 0.0019209587 0.00010673435 - 23900 100 0.0019630617 0.0019630617 0.0018748221 0.00011856923 - 24000 100 0.0018800646 0.0018800646 0.0018190347 0.00010707562 - 24100 100 0.0018028137 0.0018028137 0.0017067233 0.00010884117 - 24200 100 0.0017278932 0.0017278932 0.0016251004 0.00013664683 - 24300 100 0.0016373288 0.0016373288 0.0015529481 0.00010025414 - 24400 100 0.0019876848 0.0019876848 0.0016912033 0.00011235942 - 24500 100 0.0013677345 0.0013677345 0.0012839488 7.8669645e-05 - 24600 100 0.0012852614 0.0012852614 0.0012065052 0.00010172361 - 24700 100 0.0011145002 0.0011145002 0.0010748344 7.5021689e-05 - 24800 100 0.0012860792 0.0012860792 0.0011429675 5.7939624e-05 - 24900 100 0.00097198499 0.00097198499 0.00096175911 5.443837e-05 - 25000 100 0.00096224466 0.00096224466 0.00095159089 5.4245409e-05 -Loop time of 0.0846408 on 4 procs for 5000 steps with 100 atoms - -Performance: 25519602.289 tau/day, 59073.153 timesteps/s, 5.907 Matom-step/s -82.3% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0035473 | 0.0055294 | 0.0082454 | 2.7 | 6.53 -Neigh | 0.0016391 | 0.0022521 | 0.0028115 | 1.1 | 2.66 -Comm | 0.014697 | 0.021565 | 0.029045 | 4.1 | 25.48 -Output | 0.0010785 | 0.00132 | 0.0014171 | 0.4 | 1.56 -Modify | 0.0059648 | 0.01618 | 0.027615 | 7.9 | 19.12 -Other | | 0.03779 | | | 44.65 - -Nlocal: 25 ave 56 max 0 min -Histogram: 2 0 0 0 0 0 0 1 0 1 -Nghost: 5.5 ave 12 max 0 min -Histogram: 2 0 0 0 0 0 0 0 1 1 -Neighs: 40 ave 101 max 0 min -Histogram: 2 0 0 0 0 1 0 0 0 1 - -Total # of neighbors = 160 -Ave neighs/atom = 1.6 -Neighbor list builds = 275 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/granregion/log.15Sep22.granregion.funnel.g++.1 b/examples/granregion/log.15Sep22.granregion.funnel.g++.1 deleted file mode 100644 index fc60ca4928..0000000000 --- a/examples/granregion/log.15Sep22.granregion.funnel.g++.1 +++ /dev/null @@ -1,633 +0,0 @@ -LAMMPS (15 Sep 2022) -# pour particles into cone-shaped funnel, settle them, let them run out bottom - -variable name string funnel_pour - -thermo_modify flush yes -units si -variable PI equal 3.141592653589 -variable seed equal 14314 - -############################################### -# Geometry-related parameters -############################################### - -variable xlo equal 10 -variable xhi equal 40 -variable ylo equal 10 -variable yhi equal 40 -variable zlo equal -20 -variable zhi equal 50 - -variable xc equal 25 -variable yc equal 25 - -variable zconehi equal 50 -variable zconelo equal 10 -variable zcyllo equal 0 -variable radconelo equal 2 -variable radconehi equal 20 - -################################################ -# Particle sizes -################################################ - -variable rlo equal 0.25 -variable rhi equal 0.5 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.25 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.5 - -variable skin equal ${rhi} -variable skin equal 0.5 - -############################################### -# Granular contact parameters -############################################### - -variable coeffRes equal 0.1 -variable coeffFric equal 0.5 - -variable density equal 1.0 -variable EYoung equal 10^5 -variable Poisson equal 2.0/7.0 -variable GShear equal ${EYoung}/(2*(1+${Poisson})) -variable GShear equal 100000/(2*(1+${Poisson})) -variable GShear equal 100000/(2*(1+0.285714285714286)) - -variable gravity equal 1.0 - -variable reff equal 0.5*(${rhi}+${rlo}) -variable reff equal 0.5*(0.5+${rlo}) -variable reff equal 0.5*(0.5+0.25) -variable meff equal ${density}*4.0/3.0*${PI}*${reff}^3 -variable meff equal 1*4.0/3.0*${PI}*${reff}^3 -variable meff equal 1*4.0/3.0*3.141592653589*${reff}^3 -variable meff equal 1*4.0/3.0*3.141592653589*0.375^3 -variable min_mass equal ${density}*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*0.25 -variable max_mass equal ${density}*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*0.5 - -## Typical way to set kn, kt, etc.: -variable kn equal 4.0*${GShear}/(3*(1-${Poisson})) -variable kn equal 4.0*38888.8888888889/(3*(1-${Poisson})) -variable kn equal 4.0*38888.8888888889/(3*(1-0.285714285714286)) -variable kt equal 4.0*${GShear}/(2-${Poisson}) -variable kt equal 4.0*38888.8888888889/(2-${Poisson}) -variable kt equal 4.0*38888.8888888889/(2-0.285714285714286) - -variable a equal (-2.0*log(${coeffRes})/${PI})^2 -variable a equal (-2.0*log(0.1)/${PI})^2 -variable a equal (-2.0*log(0.1)/3.141592653589)^2 -variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*0.405284734569556)) -variable gamma_t equal ${gamma_n}*0.5 -variable gamma_t equal 903.503751814138*0.5 - -variable tcol equal ${PI}/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-903.503751814138/4.0) - -variable dt equal ${tcol}*0.05 -variable dt equal 0.00210943016014969*0.05 -timestep ${dt} -timestep 0.000105471508007485 - -############################################### -variable dumpfreq equal 1000 -variable logfreq equal 1000 - -newton off -atom_style sphere - -boundary p p f - -region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 10 ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 10 40 ${zlo} ${zhi} -region boxreg block 10 40 10 40 -20 ${zhi} -region boxreg block 10 40 10 40 -20 50 -create_box 1 boxreg -Created orthogonal box = (10 10 -20) to (40 40 50) - 1 by 1 by 1 MPI processor grid - -pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 -pair_coeff * * - -neighbor ${skin} multi -neighbor 0.5 multi -thermo ${logfreq} -thermo 1000 - -comm_style brick -comm_modify mode multi group all vel yes -balance 1.1 shift xyz 20 1.1 -Balancing ... -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 30, bins = 1 1 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton off, size, history - pair build: half/size/multi/newtoff - stencil: full/multi/3d - bin: multi -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:210) -fix bal all balance 10000 1.1 shift xyz 20 1.01 - -####################### Options specific to pouring ######################### - -# insertion region for fix/pour - -region insreg cylinder z ${xc} ${yc} 10 30 50 side in units box -region insreg cylinder z 25 ${yc} 10 30 50 side in units box -region insreg cylinder z 25 25 10 30 50 side in units box - -# define cone and cylinder regions - see lammps doc on region command -# note new open options - -region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 #Top is open -region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 0 10 side in units box open 2 - -region conereg cone z ${xc} ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 #Bottom and top are open -region conereg cone z 25 ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 10 ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 10 50 side in units box open 1 open 2 - -region hopreg union 2 conereg cylreg - -fix grav all gravity ${gravity} vector 0 0 -1 -fix grav all gravity 1 vector 0 0 -1 -fix 1 all nve/sphere - - -fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg - -fix ins all pour 2000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 ${dhi} dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 1 -Particle insertion: 3000 every 59965 steps, 2000 by step 1 - -#dump 1 all custom ${dumpfreq} ${name}.dump # id type mass diameter x y z - -#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 3.0 # box no 0.0 axes no 0.0 0.0 -#dump_modify 2 pad 6 - -thermo_style custom step cpu atoms ke -WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:896) -thermo_modify flush yes lost warn - -# Initial run to fill up the cone - -run 20000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 - -@Article{Intveld08, - author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, - title = {Accurate and Efficient Methods for Modeling Colloidal - Mixtures in an Explicit Solvent using Molecular Dynamics}, - journal = {Comput.\ Phys.\ Commut.}, - year = 2008, - volume = 179, - pages = {320--329} -} - -@article{Shire2020, - author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, - title = {{DEM} Simulations of Polydisperse Media: Efficient Contact - Detection Applied to Investigate the Quasi-Static Limit}, - journal = {Computational Particle Mechanics}, - year = {2020} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 6.648 | 6.648 | 6.648 Mbytes - Step CPU Atoms KinEng - 0 0 0 -0 - 1000 0.39961733 2000 -0 - 2000 0.61811961 2000 -0 - 3000 0.83512725 2000 -0 - 4000 1.0492881 2000 -0 - 5000 1.2650657 2000 -0 - 6000 1.479921 2000 -0 - 7000 1.6970993 2000 -0 - 8000 1.9107924 2000 -0 - 9000 2.1251713 2000 -0 - 10000 2.3403682 2000 -0 - 11000 2.549912 2000 -0 - 12000 2.7584788 2000 -0 - 13000 2.9712482 2000 -0 - 14000 3.1877015 2000 -0 - 15000 3.4017175 2000 -0 - 16000 3.6127477 2000 -0 - 17000 3.8250134 2000 -0 - 18000 4.0320643 2000 -0 - 19000 4.2371057 2000 -0 - 20000 4.4450882 2000 -0 -Loop time of 4.44512 on 1 procs for 20000 steps with 2000 atoms - -98.7% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.40438 | 0.40438 | 0.40438 | 0.0 | 9.10 -Neigh | 0.078634 | 0.078634 | 0.078634 | 0.0 | 1.77 -Comm | 0.01999 | 0.01999 | 0.01999 | 0.0 | 0.45 -Output | 0.00069031 | 0.00069031 | 0.00069031 | 0.0 | 0.02 -Modify | 3.795 | 3.795 | 3.795 | 0.0 | 85.38 -Other | | 0.1464 | | | 3.29 - -Nlocal: 2000 ave 2000 max 2000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 1607 ave 1607 max 1607 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 1607 -Ave neighs/atom = 0.8035 -Neighbor list builds = 71 -Dangerous builds = 0 -unfix ins -run 150000 -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 12.69 | 12.69 | 12.69 Mbytes - Step CPU Atoms KinEng - 20000 0 2000 6652.2957 - 21000 0.2135317 2000 6807.2201 - 22000 0.4235523 2000 6973.9359 - 23000 0.63502794 2000 7142.3648 - 24000 0.84593615 2000 7276.9717 - 25000 1.0580291 2000 7369.4191 - 26000 1.2719892 2000 7497.6526 - 27000 1.4843056 2000 7638.946 - 28000 1.9685336 2000 7780.0339 - 29000 2.1850097 2000 7881.8177 - 30000 2.4033006 2000 7967.2641 - 31000 2.6219694 2000 7994.9273 - 32000 2.8455468 2000 7937.0671 - 33000 3.0720066 2000 7774.0508 - 34000 3.3070513 2000 7591.1491 - 35000 3.5468777 2000 7357.5176 - 36000 3.7908265 2000 7147.2024 - 37000 4.0388657 2000 6979.1604 - 38000 4.2873223 2000 6813.2152 - 39000 4.5424244 2000 6660.2701 - 40000 4.8055367 2000 6502.8957 - 41000 5.0754561 2000 6324.3951 - 42000 5.3564118 2000 6132.7516 - 43000 5.6357256 2000 5913.1841 - 44000 5.9130645 2000 5732.2095 - 45000 6.1943539 2000 5508.8322 - 46000 6.4862302 2000 5306.8932 - 47000 6.7796417 2000 5152.0521 - 48000 7.0750069 2000 5028.2274 - 49000 7.3705252 2000 4896.102 - 50000 7.6693894 2000 4723.5189 - 51000 7.9685182 2000 4583.7526 - 52000 8.2774033 2000 4447.0187 - 53000 8.591482 2000 4303.2307 - 54000 8.9156439 2000 4168.5251 - 55000 9.2437364 2000 4036.9704 - 56000 9.5745684 2000 3901.1183 - 57000 9.9173689 2000 3716.7071 - 58000 10.270229 2000 3473.5422 - 59000 10.629101 2000 3245.1223 - 60000 10.989479 2000 3039.7845 - 61000 11.349843 2000 2780.0187 - 62000 11.716916 2000 2577.3345 - 63000 12.093666 2000 2346.2488 - 64000 12.474788 2000 2116.7298 - 65000 12.861438 2000 1903.7828 - 66000 13.25464 2000 1631.1676 - 67000 13.658382 2000 1431.0198 - 68000 14.067584 2000 1212.875 - 69000 14.480877 2000 995.45046 - 70000 14.894765 2000 811.54766 - 71000 15.309158 2000 624.08622 - 72000 15.732937 2000 471.00862 - 73000 16.158388 2000 358.33486 - 74000 16.583847 2000 284.39416 - 75000 17.008335 2000 234.26671 - 76000 17.429582 2000 185.61836 - 77000 17.852799 2000 152.95918 - 78000 18.276783 2000 122.49023 - 79000 18.697016 2000 102.29396 - 80000 19.12318 2000 86.284684 - 81000 19.54992 2000 73.984781 - 82000 19.986149 2000 63.042918 - 83000 20.430305 2000 53.338428 - 84000 20.876061 2000 45.89585 - 85000 21.32714 2000 40.412826 - 86000 21.781352 2000 34.183381 - 87000 22.238656 2000 29.671524 - 88000 22.698093 2000 26.90414 - 89000 23.160614 2000 24.362631 - 90000 23.630639 2000 21.887341 - 91000 24.095463 2000 19.985662 - 92000 24.570659 2000 18.728162 - 93000 25.047431 2000 16.99941 - 94000 25.549041 2000 15.71941 - 95000 26.03281 2000 14.744057 - 96000 26.513659 2000 14.214918 - 97000 26.998918 2000 13.450182 - 98000 27.486584 2000 12.79222 - 99000 27.986785 2000 12.10595 - 100000 28.48799 2000 11.281863 - 101000 28.986622 2000 10.025419 - 102000 29.491312 2000 9.9574468 - 103000 29.999421 2000 9.4078117 - 104000 30.507211 2000 8.9079161 - 105000 31.016484 2000 8.6269302 - 106000 31.527511 2000 8.5512649 - 107000 32.042612 2000 8.4703948 - 108000 32.555041 2000 8.2747542 - 109000 33.07064 2000 8.2895118 - 110000 33.593773 2000 8.1785613 - 111000 34.107129 2000 7.8443234 - 112000 34.619185 2000 7.7436124 - 113000 35.13418 2000 7.8118604 - 114000 35.653352 2000 7.3806177 - 115000 36.179577 2000 7.0857235 - 116000 36.69882 2000 7.1346752 - 117000 37.224612 2000 7.0653751 - 118000 37.756738 2000 6.6314104 - 119000 38.283151 2000 6.2169614 - 120000 38.808288 2000 5.8988829 - 121000 39.334913 2000 5.4197277 - 122000 39.862081 2000 4.6381303 - 123000 40.390252 2000 4.4949206 - 124000 40.920744 2000 4.4261118 - 125000 41.4469 2000 4.4223703 - 126000 41.977937 2000 4.4858898 - 127000 42.51483 2000 4.3312536 - 128000 43.046324 2000 3.7124973 - 129000 43.573687 2000 3.5467396 - 130000 44.103102 2000 3.5104139 - 131000 44.629869 2000 3.5725612 - 132000 45.156621 2000 3.669455 - 133000 45.69364 2000 3.6168912 - 134000 46.23133 2000 3.3598517 - 135000 46.765487 2000 3.3743407 - 136000 47.323693 2000 3.1109764 - 137000 47.881617 2000 3.0720146 - 138000 48.439179 2000 3.1303776 - 139000 49.001417 2000 3.2052806 - 140000 49.558061 2000 2.8958882 - 141000 50.097789 2000 2.9931572 - 142000 50.636089 2000 3.0967832 - 143000 51.175873 2000 3.0576365 - 144000 51.706799 2000 3.2016943 - 145000 52.239356 2000 3.3817709 - 146000 52.769944 2000 3.4527239 - 147000 53.30872 2000 3.5928733 - 148000 53.847762 2000 3.7784682 - 149000 54.387455 2000 3.6587944 - 150000 54.931594 2000 3.7945669 - 151000 55.470076 2000 3.5551557 - 152000 56.01448 2000 3.6248848 - 153000 56.552259 2000 3.7361463 - 154000 57.092655 2000 3.8534319 - 155000 57.635767 2000 4.0101408 - 156000 58.180249 2000 3.7670652 - 157000 58.724032 2000 3.1487676 - 158000 59.262015 2000 2.980076 - 159000 59.794312 2000 3.0350592 - 160000 60.331617 2000 3.125389 - 161000 60.861827 2000 2.7516115 - 162000 61.396691 2000 2.413911 - 163000 61.930145 2000 2.297713 - 164000 62.466983 2000 2.3190806 - 165000 63.00535 2000 2.2868879 - 166000 63.546881 2000 2.1658547 - 167000 64.091461 2000 1.7511071 - 168000 64.63141 2000 1.4112478 - 169000 65.17459 2000 1.3623558 - 170000 65.719571 2000 1.3701579 -Loop time of 65.7196 on 1 procs for 150000 steps with 2000 atoms - -98.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 32.424 | 32.424 | 32.424 | 0.0 | 49.34 -Neigh | 0.65326 | 0.65326 | 0.65326 | 0.0 | 0.99 -Comm | 0.14207 | 0.14207 | 0.14207 | 0.0 | 0.22 -Output | 0.26326 | 0.26326 | 0.26326 | 0.0 | 0.40 -Modify | 31.109 | 31.109 | 31.109 | 0.0 | 47.34 -Other | | 1.128 | | | 1.72 - -Nlocal: 2000 ave 2000 max 2000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 15308 ave 15308 max 15308 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 15308 -Ave neighs/atom = 7.654 -Neighbor list builds = 367 -Dangerous builds = 0 - -# remove "plug" - need to redefine cylinder region & union - -region cylreg delete -region hopreg delete -region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 #Bottom & top are open -region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 0 10 side in units box open 1 open 2 - -region hopreg union 2 cylreg conereg - -unfix hopper3 -fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg - -run 100000 -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 12.69 | 12.69 | 12.69 Mbytes - Step CPU Atoms KinEng - 170000 0 2000 1.3701579 - 171000 0.54961146 2000 2.3724823 - 172000 1.0905775 2000 3.5881441 - 173000 1.6190656 2000 5.3771633 - 174000 2.1428619 2000 7.5896471 - 175000 2.6623327 2000 10.77251 - 176000 3.1738773 2000 14.806868 - 177000 3.6751053 2000 19.607624 - 178000 4.17465 2000 25.426227 - 179000 4.6736143 2000 32.23584 - 180000 5.1769137 2000 39.930468 - 181000 5.6766809 2000 47.686304 - 182000 6.1722504 2000 56.506806 - 183000 6.6603586 2000 66.514326 - 184000 7.1473381 2000 77.554644 - 185000 7.6343824 2000 89.224002 - 186000 8.1170225 2000 102.07846 - 187000 8.598305 2000 116.08141 - 188000 9.0708108 2000 130.97964 - 189000 9.5435695 2000 146.77806 - 190000 10.015069 2000 162.79858 - 191000 10.480992 2000 179.02052 - 192000 10.941896 2000 196.26683 - 193000 11.398748 2000 214.38928 - 194000 11.856098 2000 232.32068 - 195000 12.314324 2000 251.74644 - 196000 12.765746 2000 272.25231 - 197000 13.216453 2000 294.64075 - 198000 13.663698 2000 318.32895 - 199000 14.109901 2000 342.44005 - 200000 14.560399 2000 368.35469 - 201000 15.008158 2000 395.2465 - 202000 15.460487 2000 422.63599 - 203000 15.913115 2000 450.45248 - 204000 16.363656 2000 479.60812 - 205000 16.816929 2000 510.44155 - 206000 17.265488 2000 543.25751 - 207000 17.707782 2000 577.35928 - 208000 18.151051 2000 612.29718 - 209000 18.588363 2000 647.8951 - 210000 19.027167 2000 683.79409 - 211000 19.463213 2000 720.36556 - 212000 19.901783 2000 759.27331 - 213000 20.340436 2000 798.27302 - 214000 20.775782 2000 837.93849 - 215000 21.207465 2000 877.92945 - 216000 21.641572 2000 919.62532 - 217000 22.077351 2000 962.83509 - 218000 22.517089 2000 1008.5243 - 219000 22.948683 2000 1054.5769 - 220000 23.381029 2000 1103.1843 - 221000 23.809214 2000 1153.0349 - 222000 24.246127 2000 1204.5599 - 223000 24.677676 2000 1257.1367 - 224000 25.113989 2000 1308.6735 -WARNING: Lost atoms: original 2000 current 1999 (../thermo.cpp:486) - 225000 25.549621 1999 1360.1205 - 226000 25.977155 1998 1404.8405 - 227000 26.406475 1996 1448.4869 - 228000 26.832152 1992 1491.8112 - 229000 27.25327 1985 1518.7013 - 230000 27.672907 1971 1507.6699 - 231000 28.086761 1965 1533.5096 - 232000 28.500134 1948 1489.4128 - 233000 28.912212 1933 1477.4536 - 234000 29.320197 1915 1425.8398 - 235000 29.723669 1904 1410.1451 - 236000 30.124339 1892 1401.7595 - 237000 30.523539 1880 1368.893 - 238000 30.919483 1868 1341.8885 - 239000 31.313194 1850 1286.7968 - 240000 31.711659 1833 1219.5123 - 241000 32.106468 1820 1173.3608 - 242000 32.505486 1806 1106.0727 - 243000 32.905579 1788 1035.912 - 244000 33.303155 1779 1021.6147 - 245000 33.696614 1767 969.40032 - 246000 34.083545 1757 939.12022 - 247000 34.472486 1739 840.9396 - 248000 34.858907 1730 822.06575 - 249000 35.248061 1719 762.11057 - 250000 35.639608 1707 708.50308 - 251000 36.029812 1700 692.12647 - 252000 36.428881 1697 694.5812 - 253000 36.821304 1686 652.36951 - 254000 37.203008 1682 662.95256 - 255000 37.576678 1677 637.34619 - 256000 37.952398 1672 630.71277 - 257000 38.336834 1669 641.87365 - 258000 38.719421 1665 635.862 - 259000 39.104236 1664 658.5339 - 260000 39.484223 1662 669.95468 - 261000 39.861203 1660 676.93495 - 262000 40.240183 1657 681.72646 - 263000 40.614974 1655 687.4078 - 264000 40.99447 1651 681.61352 - 265000 41.368018 1647 673.20622 - 266000 41.740288 1644 677.30073 - 267000 42.111704 1641 671.05897 - 268000 42.479868 1639 689.55776 - 269000 42.851008 1637 711.98809 - 270000 43.22438 1633 705.29974 -Loop time of 43.2244 on 1 procs for 100000 steps with 1633 atoms - -99.2% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 22.312 | 22.312 | 22.312 | 0.0 | 51.62 -Neigh | 0.47451 | 0.47451 | 0.47451 | 0.0 | 1.10 -Comm | 0.093822 | 0.093822 | 0.093822 | 0.0 | 0.22 -Output | 0.0028326 | 0.0028326 | 0.0028326 | 0.0 | 0.01 -Modify | 19.626 | 19.626 | 19.626 | 0.0 | 45.40 -Other | | 0.7152 | | | 1.65 - -Nlocal: 1633 ave 1633 max 1633 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 11358 ave 11358 max 11358 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 11358 -Ave neighs/atom = 6.955297 -Neighbor list builds = 244 -Dangerous builds = 0 -Total wall time: 0:01:53 diff --git a/examples/granregion/log.15Sep22.granregion.funnel.g++.4 b/examples/granregion/log.15Sep22.granregion.funnel.g++.4 deleted file mode 100644 index 3c18217deb..0000000000 --- a/examples/granregion/log.15Sep22.granregion.funnel.g++.4 +++ /dev/null @@ -1,633 +0,0 @@ -LAMMPS (15 Sep 2022) -# pour particles into cone-shaped funnel, settle them, let them run out bottom - -variable name string funnel_pour - -thermo_modify flush yes -units si -variable PI equal 3.141592653589 -variable seed equal 14314 - -############################################### -# Geometry-related parameters -############################################### - -variable xlo equal 10 -variable xhi equal 40 -variable ylo equal 10 -variable yhi equal 40 -variable zlo equal -20 -variable zhi equal 50 - -variable xc equal 25 -variable yc equal 25 - -variable zconehi equal 50 -variable zconelo equal 10 -variable zcyllo equal 0 -variable radconelo equal 2 -variable radconehi equal 20 - -################################################ -# Particle sizes -################################################ - -variable rlo equal 0.25 -variable rhi equal 0.5 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.25 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.5 - -variable skin equal ${rhi} -variable skin equal 0.5 - -############################################### -# Granular contact parameters -############################################### - -variable coeffRes equal 0.1 -variable coeffFric equal 0.5 - -variable density equal 1.0 -variable EYoung equal 10^5 -variable Poisson equal 2.0/7.0 -variable GShear equal ${EYoung}/(2*(1+${Poisson})) -variable GShear equal 100000/(2*(1+${Poisson})) -variable GShear equal 100000/(2*(1+0.285714285714286)) - -variable gravity equal 1.0 - -variable reff equal 0.5*(${rhi}+${rlo}) -variable reff equal 0.5*(0.5+${rlo}) -variable reff equal 0.5*(0.5+0.25) -variable meff equal ${density}*4.0/3.0*${PI}*${reff}^3 -variable meff equal 1*4.0/3.0*${PI}*${reff}^3 -variable meff equal 1*4.0/3.0*3.141592653589*${reff}^3 -variable meff equal 1*4.0/3.0*3.141592653589*0.375^3 -variable min_mass equal ${density}*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*${rlo} -variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*0.25 -variable max_mass equal ${density}*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*${rhi}*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*${rhi}*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*${rhi} -variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*0.5 - -## Typical way to set kn, kt, etc.: -variable kn equal 4.0*${GShear}/(3*(1-${Poisson})) -variable kn equal 4.0*38888.8888888889/(3*(1-${Poisson})) -variable kn equal 4.0*38888.8888888889/(3*(1-0.285714285714286)) -variable kt equal 4.0*${GShear}/(2-${Poisson}) -variable kt equal 4.0*38888.8888888889/(2-${Poisson}) -variable kt equal 4.0*38888.8888888889/(2-0.285714285714286) - -variable a equal (-2.0*log(${coeffRes})/${PI})^2 -variable a equal (-2.0*log(0.1)/${PI})^2 -variable a equal (-2.0*log(0.1)/3.141592653589)^2 -variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*0.405284734569556)) -variable gamma_t equal ${gamma_n}*0.5 -variable gamma_t equal 903.503751814138*0.5 - -variable tcol equal ${PI}/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/${min_mass}-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-${gamma_n}/4.0) -variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-903.503751814138/4.0) - -variable dt equal ${tcol}*0.05 -variable dt equal 0.00210943016014969*0.05 -timestep ${dt} -timestep 0.000105471508007485 - -############################################### -variable dumpfreq equal 1000 -variable logfreq equal 1000 - -newton off -atom_style sphere - -boundary p p f - -region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 ${ylo} ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 10 ${yhi} ${zlo} ${zhi} -region boxreg block 10 40 10 40 ${zlo} ${zhi} -region boxreg block 10 40 10 40 -20 ${zhi} -region boxreg block 10 40 10 40 -20 50 -create_box 1 boxreg -Created orthogonal box = (10 10 -20) to (40 40 50) - 1 by 1 by 4 MPI processor grid - -pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 -pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 -pair_coeff * * - -neighbor ${skin} multi -neighbor 0.5 multi -thermo ${logfreq} -thermo 1000 - -comm_style brick -comm_modify mode multi group all vel yes -balance 1.1 shift xyz 20 1.1 -Balancing ... -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 30, bins = 1 1 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton off, size, history - pair build: half/size/multi/newtoff - stencil: full/multi/3d - bin: multi -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:210) -fix bal all balance 10000 1.1 shift xyz 20 1.01 - -####################### Options specific to pouring ######################### - -# insertion region for fix/pour - -region insreg cylinder z ${xc} ${yc} 10 30 50 side in units box -region insreg cylinder z 25 ${yc} 10 30 50 side in units box -region insreg cylinder z 25 25 10 30 50 side in units box - -# define cone and cylinder regions - see lammps doc on region command -# note new open options - -region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 #Top is open -region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 2 -region cylreg cylinder z 25 25 2 0 10 side in units box open 2 - -region conereg cone z ${xc} ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 #Bottom and top are open -region conereg cone z 25 ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 ${zconelo} ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 10 ${zconehi} side in units box open 1 open 2 -region conereg cone z 25 25 2 20 10 50 side in units box open 1 open 2 - -region hopreg union 2 conereg cylreg - -fix grav all gravity ${gravity} vector 0 0 -1 -fix grav all gravity 1 vector 0 0 -1 -fix 1 all nve/sphere - - -fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg - -fix ins all pour 2000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 ${dhi} dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens ${density} ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 ${density} -fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 1 -Particle insertion: 3000 every 59965 steps, 2000 by step 1 - -#dump 1 all custom ${dumpfreq} ${name}.dump # id type mass diameter x y z - -#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 3.0 # box no 0.0 axes no 0.0 0.0 -#dump_modify 2 pad 6 - -thermo_style custom step cpu atoms ke -WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:896) -thermo_modify flush yes lost warn - -# Initial run to fill up the cone - -run 20000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 - -@Article{Intveld08, - author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, - title = {Accurate and Efficient Methods for Modeling Colloidal - Mixtures in an Explicit Solvent using Molecular Dynamics}, - journal = {Comput.\ Phys.\ Commut.}, - year = 2008, - volume = 179, - pages = {320--329} -} - -@article{Shire2020, - author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, - title = {{DEM} Simulations of Polydisperse Media: Efficient Contact - Detection Applied to Investigate the Quasi-Static Limit}, - journal = {Computational Particle Mechanics}, - year = {2020} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 6.049 | 6.049 | 6.049 Mbytes - Step CPU Atoms KinEng - 0 0 0 -0 - 1000 0.4194951 2000 -0 - 2000 0.61516729 2000 -0 - 3000 0.80702516 2000 -0 - 4000 0.99253349 2000 -0 - 5000 1.172741 2000 -0 - 6000 1.3484682 2000 -0 - 7000 1.5206253 2000 -0 - 8000 1.6875025 2000 -0 - 9000 1.8503087 2000 -0 - 10000 2.0125622 2000 -0 - 11000 2.0890872 2000 -0 - 12000 2.1663582 2000 -0 - 13000 2.2430386 2000 -0 - 14000 2.320045 2000 -0 - 15000 2.3989769 2000 -0 - 16000 2.4824747 2000 -0 - 17000 2.5693391 2000 -0 - 18000 2.6595183 2000 -0 - 19000 2.752627 2000 -0 - 20000 2.8503071 2000 -0 -Loop time of 2.85034 on 4 procs for 20000 steps with 2000 atoms - -98.0% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.04057 | 0.088166 | 0.18377 | 18.9 | 3.09 -Neigh | 0.0072649 | 0.014273 | 0.025073 | 5.5 | 0.50 -Comm | 0.097843 | 0.19506 | 0.29871 | 19.9 | 6.84 -Output | 0.00099986 | 0.0018246 | 0.0023299 | 1.2 | 0.06 -Modify | 0.68567 | 1.1174 | 1.9527 | 46.8 | 39.20 -Other | | 1.434 | | | 50.30 - -Nlocal: 500 ave 510 max 493 min -Histogram: 1 1 0 0 0 1 0 0 0 1 -Nghost: 154 ave 227 max 79 min -Histogram: 1 0 0 0 1 0 1 0 0 1 -Neighs: 415.5 ave 610 max 258 min -Histogram: 1 1 0 0 0 0 1 0 0 1 - -Total # of neighbors = 1662 -Ave neighs/atom = 0.831 -Neighbor list builds = 71 -Dangerous builds = 0 -unfix ins -run 150000 -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 12.33 | 12.5 | 12.68 Mbytes - Step CPU Atoms KinEng - 20000 0 2000 6652.2957 - 21000 0.069761009 2000 6807.2201 - 22000 0.14277925 2000 6973.9359 - 23000 0.21755553 2000 7142.3648 - 24000 0.29656838 2000 7276.9717 - 25000 0.3791331 2000 7369.4191 - 26000 0.46663378 2000 7497.6526 - 27000 0.55670237 2000 7638.946 - 28000 0.65212555 2000 7780.0339 - 29000 0.75032507 2000 7881.8177 - 30000 0.85580942 2000 7967.2641 - 31000 0.93204785 2000 7994.9273 - 32000 1.0168325 2000 7937.0672 - 33000 1.1081585 2000 7774.0508 - 34000 1.2084122 2000 7591.1511 - 35000 1.3164174 2000 7357.5032 - 36000 1.4326847 2000 7147.3776 - 37000 1.5548919 2000 6980.0719 - 38000 1.6806183 2000 6813.0872 - 39000 1.8171138 2000 6657.0693 - 40000 1.9655069 2000 6505.1155 - 41000 2.0788398 2000 6330.2864 - 42000 2.1972941 2000 6147.8022 - 43000 2.3180177 2000 5932.9244 - 44000 2.4424194 2000 5755.296 - 45000 2.5679759 2000 5511.622 - 46000 2.7042099 2000 5332.3171 - 47000 2.8436403 2000 5162.4926 - 48000 2.983017 2000 5044.5764 - 49000 3.1228322 2000 4901.1141 - 50000 3.2614172 2000 4731.1949 - 51000 3.3835559 2000 4575.418 - 52000 3.5097034 2000 4428.9425 - 53000 3.6438561 2000 4291.7282 - 54000 3.7823058 2000 4154.1885 - 55000 3.9269393 2000 3994.9402 - 56000 4.0761939 2000 3855.5977 - 57000 4.2262191 2000 3672.9504 - 58000 4.3809045 2000 3435.3395 - 59000 4.5439971 2000 3200.7379 - 60000 4.7111867 2000 2986.5411 - 61000 4.8700167 2000 2747.3628 - 62000 5.030656 2000 2542.0805 - 63000 5.1932098 2000 2336.7687 - 64000 5.3585095 2000 2151.6388 - 65000 5.5278279 2000 1933.6773 - 66000 5.7032072 2000 1699.0747 - 67000 5.8804545 2000 1467.7209 - 68000 6.0598984 2000 1227.3577 - 69000 6.2471961 2000 1016.2766 - 70000 6.4413532 2000 812.90843 - 71000 6.615215 2000 632.88108 - 72000 6.7897335 2000 470.67731 - 73000 6.964705 2000 360.47748 - 74000 7.1361808 2000 286.10584 - 75000 7.3068097 2000 229.70386 - 76000 7.4771974 2000 179.62654 - 77000 7.6485358 2000 142.40417 - 78000 7.8200771 2000 113.55745 - 79000 7.9923688 2000 93.787669 - 80000 8.164219 2000 80.646319 - 81000 8.3372059 2000 70.944319 - 82000 8.5130035 2000 59.2275 - 83000 8.6877383 2000 49.633808 - 84000 8.8675712 2000 42.882698 - 85000 9.0509682 2000 36.841824 - 86000 9.2393665 2000 31.776681 - 87000 9.4296116 2000 28.25076 - 88000 9.622196 2000 25.228966 - 89000 9.8176023 2000 22.593627 - 90000 10.01325 2000 21.15796 - 91000 10.204474 2000 19.941629 - 92000 10.399553 2000 18.375654 - 93000 10.596683 2000 17.056701 - 94000 10.796988 2000 16.192511 - 95000 10.998545 2000 15.572922 - 96000 11.200614 2000 14.827788 - 97000 11.402484 2000 13.919613 - 98000 11.606219 2000 13.19525 - 99000 11.81042 2000 11.993376 - 100000 12.018294 2000 11.258787 - 101000 12.223702 2000 10.641688 - 102000 12.432026 2000 10.430435 - 103000 12.640962 2000 9.518069 - 104000 12.849109 2000 9.1332086 - 105000 13.05872 2000 9.2151611 - 106000 13.269956 2000 9.0035132 - 107000 13.481882 2000 8.7835861 - 108000 13.693895 2000 8.5124479 - 109000 13.906381 2000 8.2975453 - 110000 14.120217 2000 8.3483043 - 111000 14.332078 2000 8.4658572 - 112000 14.54349 2000 8.4771784 - 113000 14.755719 2000 7.8937975 - 114000 14.968619 2000 7.2472953 - 115000 15.180485 2000 6.5812074 - 116000 15.394405 2000 5.5651566 - 117000 15.607523 2000 5.3015807 - 118000 15.821873 2000 5.0133941 - 119000 16.035675 2000 4.8746036 - 120000 16.24964 2000 4.9133073 - 121000 16.462102 2000 4.3337392 - 122000 16.676371 2000 4.3374836 - 123000 16.890252 2000 4.3721818 - 124000 17.106594 2000 4.3894508 - 125000 17.321433 2000 4.1811774 - 126000 17.536692 2000 4.3011002 - 127000 17.748238 2000 4.442228 - 128000 17.962609 2000 4.6170394 - 129000 18.175315 2000 4.8184318 - 130000 18.389056 2000 4.8442096 - 131000 18.600872 2000 4.9668117 - 132000 18.81412 2000 4.8364562 - 133000 19.027514 2000 4.6658645 - 134000 19.23975 2000 4.5758487 - 135000 19.451085 2000 4.7251949 - 136000 19.663874 2000 4.5846492 - 137000 19.87624 2000 4.7565986 - 138000 20.088654 2000 4.8186623 - 139000 20.29935 2000 4.6571647 - 140000 20.510911 2000 4.0730143 - 141000 20.722072 2000 4.0605542 - 142000 20.933113 2000 4.1457179 - 143000 21.143916 2000 4.3418042 - 144000 21.353873 2000 4.0323813 - 145000 21.567015 2000 3.8064958 - 146000 21.781334 2000 3.1802044 - 147000 21.996799 2000 2.7947641 - 148000 22.209808 2000 2.7384164 - 149000 22.423177 2000 2.7428829 - 150000 22.638044 2000 2.7802186 - 151000 22.851676 2000 2.6703451 - 152000 23.065354 2000 2.3357647 - 153000 23.278882 2000 1.9855305 - 154000 23.494254 2000 1.9442713 - 155000 23.708192 2000 1.7348027 - 156000 23.923005 2000 1.5699942 - 157000 24.13827 2000 1.5224944 - 158000 24.352068 2000 1.4850914 - 159000 24.565616 2000 1.4461048 - 160000 24.779118 2000 1.3759525 - 161000 24.99111 2000 0.83754463 - 162000 25.205935 2000 0.7952922 - 163000 25.420817 2000 0.69670143 - 164000 25.632672 2000 0.66253723 - 165000 25.846901 2000 0.64602969 - 166000 26.060074 2000 0.60229858 - 167000 26.273714 2000 0.5757589 - 168000 26.484855 2000 0.5996023 - 169000 26.698151 2000 0.62130448 - 170000 26.911208 2000 0.63888277 -Loop time of 26.9112 on 4 procs for 150000 steps with 2000 atoms - -95.1% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 4.5517 | 8.6135 | 10.872 | 82.7 | 32.01 -Neigh | 0.092491 | 0.15402 | 0.19598 | 9.7 | 0.57 -Comm | 2.0054 | 3.8686 | 4.6494 | 55.0 | 14.38 -Output | 0.0047033 | 0.0096766 | 0.016452 | 4.6 | 0.04 -Modify | 5.6498 | 7.9588 | 9.4012 | 49.7 | 29.57 -Other | | 6.307 | | | 23.43 - -Nlocal: 500 ave 538 max 419 min -Histogram: 1 0 0 0 0 0 0 1 0 2 -Nghost: 445.5 ave 688 max 200 min -Histogram: 1 0 0 0 1 0 1 0 0 1 -Neighs: 4500.25 ave 5610 max 3443 min -Histogram: 1 0 1 0 0 0 1 0 0 1 - -Total # of neighbors = 18001 -Ave neighs/atom = 9.0005 -Neighbor list builds = 362 -Dangerous builds = 0 - -# remove "plug" - need to redefine cylinder region & union - -region cylreg delete -region hopreg delete -region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 #Bottom & top are open -region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 1 open 2 -region cylreg cylinder z 25 25 2 0 10 side in units box open 1 open 2 - -region hopreg union 2 cylreg conereg - -unfix hopper3 -fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg -fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg - -run 100000 -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 12.34 | 12.53 | 12.68 Mbytes - Step CPU Atoms KinEng - 170000 0 2000 0.63888277 - 171000 0.21419748 2000 1.4139245 - 172000 0.42844271 2000 2.2400138 - 173000 0.64333145 2000 3.8034979 - 174000 0.85456696 2000 6.116727 - 175000 1.0672981 2000 8.9536458 - 176000 1.2790911 2000 12.74348 - 177000 1.491721 2000 17.410816 - 178000 1.7033452 2000 22.879174 - 179000 1.9168047 2000 28.966022 - 180000 2.1329071 2000 35.449239 - 181000 2.3490841 2000 42.694882 - 182000 2.565508 2000 50.913279 - 183000 2.780369 2000 60.098465 - 184000 2.9967771 2000 70.133474 - 185000 3.2116891 2000 80.950013 - 186000 3.4248923 2000 92.495525 - 187000 3.6394206 2000 104.83034 - 188000 3.8527533 2000 118.04659 - 189000 4.0650838 2000 132.7403 - 190000 4.2781031 2000 148.31955 - 191000 4.476226 2000 164.26321 - 192000 4.6750263 2000 180.6933 - 193000 4.8710737 2000 197.72012 - 194000 5.0677642 2000 215.43637 - 195000 5.2639974 2000 234.29738 - 196000 5.4599746 2000 254.03407 - 197000 5.6534894 2000 274.58626 - 198000 5.8462402 2000 296.88915 - 199000 6.0400194 2000 320.45001 - 200000 6.2329415 2000 344.75891 - 201000 6.4235068 2000 370.14016 - 202000 6.6142055 2000 395.72827 - 203000 6.8048206 2000 420.42026 - 204000 6.9987454 2000 446.08079 - 205000 7.1925778 2000 473.62963 - 206000 7.3846227 2000 501.05693 - 207000 7.5775122 2000 530.40427 - 208000 7.77052 2000 560.62015 - 209000 7.964984 2000 593.00113 - 210000 8.1601405 2000 626.36661 - 211000 8.3504978 2000 661.34861 - 212000 8.5425141 2000 697.41001 - 213000 8.736112 2000 735.12299 - 214000 8.9267615 2000 773.89126 - 215000 9.1154738 2000 813.83268 - 216000 9.3019826 2000 854.63669 - 217000 9.4878433 2000 896.59089 - 218000 9.6739682 2000 938.70251 - 219000 9.8566518 2000 982.10773 - 220000 10.042289 2000 1025.2953 - 221000 10.227275 2000 1069.8382 - 222000 10.412363 2000 1115.4449 - 223000 10.602757 2000 1161.6742 - 224000 10.789101 2000 1211.289 - 225000 10.974854 2000 1262.8074 - 226000 11.157089 2000 1316.6353 - 227000 11.337044 2000 1370.7434 -WARNING: Lost atoms: original 2000 current 1991 (../thermo.cpp:486) - 228000 11.518718 1991 1382.0924 - 229000 11.700488 1986 1407.1543 - 230000 11.883057 1975 1415.708 - 231000 12.063962 1968 1430.6498 - 232000 12.246917 1957 1421.0352 - 233000 12.429345 1939 1376.0322 - 234000 12.6113 1925 1350.1292 - 235000 12.791233 1912 1337.0529 - 236000 12.968444 1893 1273.2219 - 237000 13.146668 1879 1207.0473 - 238000 13.327542 1861 1132.0109 - 239000 13.50936 1846 1083.1042 - 240000 13.693504 1826 1004.3265 - 241000 13.863443 1819 989.36186 - 242000 14.03294 1812 983.26132 - 243000 14.20032 1805 985.79932 - 244000 14.366236 1794 936.34844 - 245000 14.532759 1784 889.17423 - 246000 14.703029 1770 846.65018 - 247000 14.873941 1753 751.16306 - 248000 15.045272 1740 709.23095 - 249000 15.217896 1732 687.61586 - 250000 15.388727 1721 638.82967 - 251000 15.558032 1714 618.71543 - 252000 15.725309 1709 611.25444 - 253000 15.888727 1705 606.6846 - 254000 16.050605 1702 601.7236 - 255000 16.212982 1697 575.97244 - 256000 16.378352 1695 577.1712 - 257000 16.547488 1691 576.93668 - 258000 16.718964 1688 586.63687 - 259000 16.892601 1686 581.52487 - 260000 17.066036 1682 566.49544 - 261000 17.22488 1681 586.18628 - 262000 17.379249 1678 582.11927 - 263000 17.534079 1675 589.96041 - 264000 17.690288 1672 577.55581 - 265000 17.847805 1669 570.45998 - 266000 18.006261 1666 574.0576 - 267000 18.1674 1662 578.07385 - 268000 18.326753 1660 587.65705 - 269000 18.488052 1657 584.43358 - 270000 18.647474 1654 591.22601 -Loop time of 18.6475 on 4 procs for 100000 steps with 1654 atoms - -94.4% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 2.7714 | 6.1879 | 8.8765 | 88.8 | 33.18 -Neigh | 0.094692 | 0.11244 | 0.13298 | 4.6 | 0.60 -Comm | 1.2471 | 2.918 | 3.5873 | 57.0 | 15.65 -Output | 0.0013438 | 0.0067176 | 0.014709 | 6.0 | 0.04 -Modify | 4.4355 | 5.0416 | 5.5692 | 21.9 | 27.04 -Other | | 4.381 | | | 23.49 - -Nlocal: 413.5 ave 429 max 408 min -Histogram: 3 0 0 0 0 0 0 0 0 1 -Nghost: 408.25 ave 653 max 182 min -Histogram: 1 0 0 1 0 1 0 0 0 1 -Neighs: 3486.25 ave 4367 max 2213 min -Histogram: 1 0 0 0 0 1 0 0 1 1 - -Total # of neighbors = 13945 -Ave neighs/atom = 8.4310762 -Neighbor list builds = 227 -Dangerous builds = 0 -Total wall time: 0:00:48 diff --git a/examples/granregion/log.15Sep22.granregion.mixer.g++.1 b/examples/granregion/log.15Sep22.granregion.mixer.g++.1 deleted file mode 100644 index 2a3402c642..0000000000 --- a/examples/granregion/log.15Sep22.granregion.mixer.g++.1 +++ /dev/null @@ -1,632 +0,0 @@ -LAMMPS (15 Sep 2022) -variable name string mixer - -thermo_modify flush yes -variable seed equal 14314 - -############################################### -# Particle parameters -################################################ - -variable rlo equal 0.3 -variable rhi equal 0.6 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.3 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.6 -variable skin equal ${rhi} -variable skin equal 0.6 - -variable coeffRes equal 0.1 -variable coeffFric equal 0.5 - -variable kn equal 10^5 -variable kt equal 0.2*${kn} -variable kt equal 0.2*100000 - -variable gravity equal 1.0 -variable density equal 1.0 - -variable min_mass equal ${density}*4.0/3.0*PI*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*0.3 -variable a equal (-2.0*log(${coeffRes})/PI)^2 -variable a equal (-2.0*log(0.1)/PI)^2 -variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*0.405284734569351)) -variable gamma_t equal ${gamma_n}*0.5 -variable gamma_t equal 806.699778405191*0.5 - -variable tcol equal PI/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/${min_mass}-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/0.113097335529233-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/0.113097335529233-806.699778405191/4.0) - -variable dt equal ${tcol}*0.02 -variable dt equal 0.00236257621510454*0.02 -timestep ${dt} -timestep 4.72515243020908e-05 - -############################################### - -variable dumpfreq equal 1000 -variable logfreq equal 1000 - -newton on -atom_style sphere - -boundary p p f - -region boxreg block 0 20 0 20 0 20 -create_box 1 boxreg -Created orthogonal box = (0 0 0) to (20 20 20) - 1 by 1 by 1 MPI processor grid - -pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 -pair_coeff * * - -neighbor ${skin} multi -neighbor 0.6 multi -thermo ${logfreq} -thermo 1000 - -comm_style brick -comm_modify mode multi group all vel yes -balance 1.1 shift xyz 20 1.1 -Balancing ... -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 20, bins = 1 1 1 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton on, size, history - pair build: half/size/multi/newton - stencil: half/multi/3d - bin: multi -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:210) -fix bal all balance 10000 1.1 shift xyz 20 1.01 - -####################### Options specific to pouring ######################### - -region insreg cylinder z 10 10 8 10 18 side in units box -region cylreg cylinder z 10 10 10 0 20 side in units box - -variable theta equal (step/400000)*2*PI - -region b1 block 2 18 9 11 0 4 side out rotate v_theta 10 10 0 0 0 1 units box -region b2 block 9 11 2 18 0 3.99999 side out rotate v_theta 10 10 0 0 0 1 units box - -region mixer intersect 3 cylreg b1 b2 side in - -fix grav all gravity ${gravity} vector 0 0 -1 -fix grav all gravity 1 vector 0 0 -1 -fix 1 all nve/sphere - -fix mixwall all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 region mixer - -fix ins all pour 1000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 ${dhi} dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 1 -Particle insertion: 444 every 84653 steps, 1000 by step 169307 - -#dump 1 all custom ${dumpfreq} ${name}_pour.dump # id type mass diameter x y z - -#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 1.5 # box no 0.0 axes no 0.0 0.0 -#dump_modify 2 pad 6 - -thermo_style custom step cpu atoms ke v_theta -WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:896) -thermo_modify flush yes lost warn - -run 200000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 - -@Article{Intveld08, - author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, - title = {Accurate and Efficient Methods for Modeling Colloidal - Mixtures in an Explicit Solvent using Molecular Dynamics}, - journal = {Comput.\ Phys.\ Commut.}, - year = 2008, - volume = 179, - pages = {320--329} -} - -@article{Shire2020, - author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, - title = {{DEM} Simulations of Polydisperse Media: Efficient Contact - Detection Applied to Investigate the Quasi-Static Limit}, - journal = {Computational Particle Mechanics}, - year = {2020} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 5.861 | 5.861 | 5.861 Mbytes - Step CPU Atoms KinEng v_theta - 0 0 0 -0 0 - 1000 0.10672296 444 -0 0.015707963 - 2000 0.2090638 444 -0 0.031415927 - 3000 0.31029663 444 -0 0.04712389 - 4000 0.41047624 444 -0 0.062831853 - 5000 0.51132361 444 -0 0.078539816 - 6000 0.61279172 444 -0 0.09424778 - 7000 0.71396622 444 -0 0.10995574 - 8000 0.81644319 444 -0 0.12566371 - 9000 0.91730959 444 -0 0.14137167 - 10000 1.0181635 444 -0 0.15707963 - 11000 1.1182214 444 -0 0.1727876 - 12000 1.2190013 444 -0 0.18849556 - 13000 1.3196138 444 -0 0.20420352 - 14000 1.4183593 444 -0 0.21991149 - 15000 1.5178458 444 -0 0.23561945 - 16000 1.6169535 444 -0 0.25132741 - 17000 1.7219188 444 -0 0.26703538 - 18000 1.8266303 444 -0 0.28274334 - 19000 1.9331589 444 -0 0.2984513 - 20000 2.0392693 444 -0 0.31415927 - 21000 2.1457521 444 -0 0.32986723 - 22000 2.2507526 444 -0 0.34557519 - 23000 2.3548243 444 -0 0.36128316 - 24000 2.4606335 444 -0 0.37699112 - 25000 2.5657643 444 -0 0.39269908 - 26000 2.6698254 444 -0 0.40840704 - 27000 2.7732221 444 -0 0.42411501 - 28000 2.8766441 444 -0 0.43982297 - 29000 2.9801547 444 -0 0.45553093 - 30000 3.0839748 444 -0 0.4712389 - 31000 3.1880063 444 -0 0.48694686 - 32000 3.2923439 444 -0 0.50265482 - 33000 3.3969501 444 -0 0.51836279 - 34000 3.5012646 444 -0 0.53407075 - 35000 3.6057831 444 -0 0.54977871 - 36000 3.7098273 444 -0 0.56548668 - 37000 3.8146061 444 -0 0.58119464 - 38000 3.9215588 444 -0 0.5969026 - 39000 4.0474026 444 -0 0.61261057 - 40000 4.1544945 444 -0 0.62831853 - 41000 4.2605761 444 -0 0.64402649 - 42000 4.3665287 444 -0 0.65973446 - 43000 4.4728216 444 -0 0.67544242 - 44000 4.5782483 444 -0 0.69115038 - 45000 4.6833043 444 -0 0.70685835 - 46000 4.7902207 444 -0 0.72256631 - 47000 4.8968527 444 -0 0.73827427 - 48000 5.0035027 444 -0 0.75398224 - 49000 5.1117191 444 -0 0.7696902 - 50000 5.2186233 444 -0 0.78539816 - 51000 5.3244005 444 -0 0.80110613 - 52000 5.4316153 444 -0 0.81681409 - 53000 5.5381785 444 -0 0.83252205 - 54000 5.6458179 444 -0 0.84823002 - 55000 5.759203 444 -0 0.86393798 - 56000 5.8779849 444 -0 0.87964594 - 57000 5.9953108 444 -0 0.89535391 - 58000 6.1115532 444 -0 0.91106187 - 59000 6.2298342 444 -0 0.92676983 - 60000 6.3474382 444 -0 0.9424778 - 61000 6.4642217 444 -0 0.95818576 - 62000 6.5815141 444 -0 0.97389372 - 63000 6.6999766 444 -0 0.98960169 - 64000 6.8181369 444 -0 1.0053096 - 65000 6.9368124 444 -0 1.0210176 - 66000 7.0560733 444 -0 1.0367256 - 67000 7.1761749 444 -0 1.0524335 - 68000 7.2942246 444 -0 1.0681415 - 69000 7.4146786 444 -0 1.0838495 - 70000 7.5364025 444 -0 1.0995574 - 71000 7.6565177 444 -0 1.1152654 - 72000 7.7776652 444 -0 1.1309734 - 73000 7.8972494 444 -0 1.1466813 - 74000 8.0183599 444 -0 1.1623893 - 75000 8.1423045 444 -0 1.1780972 - 76000 8.2667013 444 -0 1.1938052 - 77000 8.3876604 444 -0 1.2095132 - 78000 8.5095993 444 -0 1.2252211 - 79000 8.6317663 444 -0 1.2409291 - 80000 8.7562108 444 -0 1.2566371 - 81000 8.8812625 444 -0 1.272345 - 82000 9.006825 444 -0 1.288053 - 83000 9.1310939 444 -0 1.303761 - 84000 9.2540049 444 -0 1.3194689 - 85000 9.4210019 888 -0 1.3351769 - 86000 9.6509014 888 -0 1.3508848 - 87000 9.8827304 888 -0 1.3665928 - 88000 10.113857 888 -0 1.3823008 - 89000 10.34324 888 -0 1.3980087 - 90000 10.574203 888 -0 1.4137167 - 91000 10.806069 888 -0 1.4294247 - 92000 11.037044 888 -0 1.4451326 - 93000 11.262596 888 -0 1.4608406 - 94000 11.490532 888 -0 1.4765485 - 95000 11.716452 888 -0 1.4922565 - 96000 11.943883 888 -0 1.5079645 - 97000 12.171353 888 -0 1.5236724 - 98000 12.396787 888 -0 1.5393804 - 99000 12.623788 888 -0 1.5550884 - 100000 12.849633 888 -0 1.5707963 - 101000 13.082904 888 -0 1.5865043 - 102000 13.316986 888 -0 1.6022123 - 103000 13.54777 888 -0 1.6179202 - 104000 13.77928 888 -0 1.6336282 - 105000 14.014818 888 -0 1.6493361 - 106000 14.250986 888 -0 1.6650441 - 107000 14.485754 888 -0 1.6807521 - 108000 14.720106 888 -0 1.69646 - 109000 14.970869 888 -0 1.712168 - 110000 15.219203 888 -0 1.727876 - 111000 15.469876 888 -0 1.7435839 - 112000 15.721351 888 -0 1.7592919 - 113000 15.972099 888 -0 1.7749998 - 114000 16.222357 888 -0 1.7907078 - 115000 16.474863 888 -0 1.8064158 - 116000 16.725352 888 -0 1.8221237 - 117000 16.979634 888 -0 1.8378317 - 118000 17.231379 888 -0 1.8535397 - 119000 17.483691 888 -0 1.8692476 - 120000 17.737897 888 -0 1.8849556 - 121000 17.991241 888 -0 1.9006636 - 122000 18.245626 888 -0 1.9163715 - 123000 18.499984 888 -0 1.9320795 - 124000 18.754367 888 -0 1.9477874 - 125000 19.006448 888 -0 1.9634954 - 126000 19.260545 888 -0 1.9792034 - 127000 19.513633 888 -0 1.9949113 - 128000 19.769389 888 -0 2.0106193 - 129000 20.025088 888 -0 2.0263273 - 130000 20.277534 888 -0 2.0420352 - 131000 20.529284 888 -0 2.0577432 - 132000 20.785132 888 -0 2.0734512 - 133000 21.038442 888 -0 2.0891591 - 134000 21.293932 888 -0 2.1048671 - 135000 21.545354 888 -0 2.120575 - 136000 21.799547 888 -0 2.136283 - 137000 22.053639 888 -0 2.151991 - 138000 22.310106 888 -0 2.1676989 - 139000 22.569362 888 -0 2.1834069 - 140000 22.829416 888 -0 2.1991149 - 141000 23.089132 888 -0 2.2148228 - 142000 23.345737 888 -0 2.2305308 - 143000 23.60621 888 -0 2.2462387 - 144000 23.867414 888 -0 2.2619467 - 145000 24.132954 888 -0 2.2776547 - 146000 24.39395 888 -0 2.2933626 - 147000 24.657881 888 -0 2.3090706 - 148000 24.918563 888 -0 2.3247786 - 149000 25.177446 888 -0 2.3404865 - 150000 25.446598 888 -0 2.3561945 - 151000 25.715494 888 -0 2.3719025 - 152000 25.985991 888 -0 2.3876104 - 153000 26.256676 888 -0 2.4033184 - 154000 26.525639 888 -0 2.4190263 - 155000 26.82656 888 -0 2.4347343 - 156000 27.157272 888 -0 2.4504423 - 157000 27.481755 888 -0 2.4661502 - 158000 27.80198 888 -0 2.4818582 - 159000 28.123258 888 -0 2.4975662 - 160000 28.437502 888 -0 2.5132741 - 161000 28.756496 888 -0 2.5289821 - 162000 29.080609 888 -0 2.54469 - 163000 29.399252 888 -0 2.560398 - 164000 29.718986 888 -0 2.576106 - 165000 30.045206 888 -0 2.5918139 - 166000 30.365168 888 -0 2.6075219 - 167000 30.684007 888 -0 2.6232299 - 168000 31.006154 888 -0 2.6389378 - 169000 31.330336 888 -0 2.6546458 - 170000 31.681761 1000 -0 2.6703538 - 171000 32.049778 1000 -0 2.6860617 - 172000 32.421067 1000 -0 2.7017697 - 173000 32.79935 1000 -0 2.7174776 - 174000 33.178002 1000 -0 2.7331856 - 175000 33.54236 1000 -0 2.7488936 - 176000 33.904734 1000 -0 2.7646015 - 177000 34.269671 1000 -0 2.7803095 - 178000 34.633106 1000 -0 2.7960175 - 179000 35.001441 1000 -0 2.8117254 - 180000 35.374769 1000 -0 2.8274334 - 181000 35.742362 1000 -0 2.8431414 - 182000 36.115908 1000 -0 2.8588493 - 183000 36.490149 1000 -0 2.8745573 - 184000 36.866289 1000 -0 2.8902652 - 185000 37.252911 1000 -0 2.9059732 - 186000 37.644586 1000 -0 2.9216812 - 187000 38.028002 1000 -0 2.9373891 - 188000 38.40724 1000 -0 2.9530971 - 189000 38.77431 1000 -0 2.9688051 - 190000 39.14138 1000 -0 2.984513 - 191000 39.519083 1000 -0 3.000221 - 192000 39.895243 1000 -0 3.0159289 - 193000 40.237532 1000 -0 3.0316369 - 194000 40.587663 1000 -0 3.0473449 - 195000 40.939032 1000 -0 3.0630528 - 196000 41.290257 1000 -0 3.0787608 - 197000 41.643778 1000 -0 3.0944688 - 198000 41.992818 1000 -0 3.1101767 - 199000 42.335934 1000 -0 3.1258847 - 200000 42.681071 1000 -0 3.1415927 -Loop time of 42.6811 on 1 procs for 200000 steps with 1000 atoms - -Performance: 19130.397 tau/day, 4685.915 timesteps/s, 4.686 Matom-step/s -98.5% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 2.6365 | 2.6365 | 2.6365 | 0.0 | 6.18 -Neigh | 0.051681 | 0.051681 | 0.051681 | 0.0 | 0.12 -Comm | 0.52007 | 0.52007 | 0.52007 | 0.0 | 1.22 -Output | 0.02209 | 0.02209 | 0.02209 | 0.0 | 0.05 -Modify | 38.71 | 38.71 | 38.71 | 0.0 | 90.70 -Other | | 0.7407 | | | 1.74 - -Nlocal: 1000 ave 1000 max 1000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 183 ave 183 max 183 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 3757 ave 3757 max 3757 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 3757 -Ave neighs/atom = 3.757 -Neighbor list builds = 200 -Dangerous builds = 0 -unfix ins -run 200000 -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 11.89 | 11.89 | 11.89 Mbytes - Step CPU Atoms KinEng v_theta - 200000 0 1000 1.0515941 3.1415927 - 201000 0.35477257 1000 1.0348185 3.1573006 - 202000 0.71436123 1000 1.0220859 3.1730086 - 203000 1.0642832 1000 1.0225785 3.1887165 - 204000 1.4165213 1000 1.0206121 3.2044245 - 205000 1.7728133 1000 1.009961 3.2201325 - 206000 2.1279101 1000 0.9993323 3.2358404 - 207000 2.480623 1000 0.99602628 3.2515484 - 208000 2.8321106 1000 0.98341818 3.2672564 - 209000 3.2138945 1000 0.96700718 3.2829643 - 210000 3.5921146 1000 0.95226699 3.2986723 - 211000 3.9643569 1000 0.93911691 3.3143802 - 212000 4.3368151 1000 0.92920029 3.3300882 - 213000 4.7130192 1000 0.91893472 3.3457962 - 214000 5.0881313 1000 0.90873324 3.3615041 - 215000 5.4660106 1000 0.88925817 3.3772121 - 216000 5.8455926 1000 0.89108236 3.3929201 - 217000 6.2204827 1000 0.90176711 3.408628 - 218000 6.6046736 1000 0.90149435 3.424336 - 219000 6.9931145 1000 0.89629307 3.440044 - 220000 7.3771565 1000 0.90390589 3.4557519 - 221000 7.7635603 1000 0.87858148 3.4714599 - 222000 8.1502771 1000 0.88862314 3.4871678 - 223000 8.5393557 1000 0.90394098 3.5028758 - 224000 8.9327212 1000 0.91005462 3.5185838 - 225000 9.315331 1000 0.91753865 3.5342917 - 226000 9.6930994 1000 0.91741233 3.5499997 - 227000 10.077148 1000 0.9041879 3.5657077 - 228000 10.463223 1000 0.9085712 3.5814156 - 229000 10.850271 1000 0.8937854 3.5971236 - 230000 11.230235 1000 0.88740571 3.6128316 - 231000 11.61003 1000 0.88350028 3.6285395 - 232000 11.988134 1000 0.88344474 3.6442475 - 233000 12.365856 1000 0.88003311 3.6599554 - 234000 12.745397 1000 0.87416727 3.6756634 - 235000 13.120344 1000 0.86154585 3.6913714 - 236000 13.489521 1000 0.85705071 3.7070793 - 237000 13.858736 1000 0.85297378 3.7227873 - 238000 14.230242 1000 0.84879486 3.7384953 - 239000 14.609692 1000 0.86978407 3.7542032 - 240000 14.998899 1000 0.86758733 3.7699112 - 241000 15.40773 1000 0.86123097 3.7856191 - 242000 15.81537 1000 0.86088136 3.8013271 - 243000 16.221448 1000 0.85270311 3.8170351 - 244000 16.619008 1000 0.8524395 3.832743 - 245000 17.003986 1000 0.84054009 3.848451 - 246000 17.380362 1000 0.82623612 3.864159 - 247000 17.756477 1000 0.82787746 3.8798669 - 248000 18.136456 1000 0.83027177 3.8955749 - 249000 18.521277 1000 0.83307565 3.9112829 - 250000 18.906407 1000 0.82612362 3.9269908 - 251000 19.28348 1000 0.8404639 3.9426988 - 252000 19.66549 1000 0.83550946 3.9584067 - 253000 20.053842 1000 0.81516472 3.9741147 - 254000 20.451357 1000 0.79127421 3.9898227 - 255000 20.844416 1000 0.78373024 4.0055306 - 256000 21.228637 1000 0.79885661 4.0212386 - 257000 21.613641 1000 0.80322118 4.0369466 - 258000 21.99162 1000 0.79861523 4.0526545 - 259000 22.367158 1000 0.79216962 4.0683625 - 260000 22.746158 1000 0.79543097 4.0840704 - 261000 23.125626 1000 0.79394211 4.0997784 - 262000 23.504282 1000 0.79269346 4.1154864 - 263000 23.883609 1000 0.80022854 4.1311943 - 264000 24.261864 1000 0.79885184 4.1469023 - 265000 24.639269 1000 0.79595018 4.1626103 - 266000 25.016335 1000 0.78191184 4.1783182 - 267000 25.389754 1000 0.76329279 4.1940262 - 268000 25.762053 1000 0.7342663 4.2097342 - 269000 26.133966 1000 0.72303366 4.2254421 - 270000 26.511157 1000 0.70016481 4.2411501 - 271000 26.888842 1000 0.68891731 4.256858 - 272000 27.26804 1000 0.68545775 4.272566 - 273000 27.644067 1000 0.68712156 4.288274 - 274000 28.024704 1000 0.69249813 4.3039819 - 275000 28.404842 1000 0.70187847 4.3196899 - 276000 28.785799 1000 0.70679419 4.3353979 - 277000 29.165857 1000 0.70955357 4.3511058 - 278000 29.545291 1000 0.70183408 4.3668138 - 279000 29.926113 1000 0.69979273 4.3825218 - 280000 30.302095 1000 0.70822139 4.3982297 - 281000 30.684406 1000 0.71629209 4.4139377 - 282000 31.065873 1000 0.73094905 4.4296456 - 283000 31.445972 1000 0.74554115 4.4453536 - 284000 31.828184 1000 0.74390104 4.4610616 - 285000 32.207807 1000 0.74675359 4.4767695 - 286000 32.58802 1000 0.75330713 4.4924775 - 287000 32.964457 1000 0.75525926 4.5081855 - 288000 33.343222 1000 0.75174884 4.5238934 - 289000 33.717663 1000 0.74062375 4.5396014 - 290000 34.094722 1000 0.72784613 4.5553093 - 291000 34.46982 1000 0.72151574 4.5710173 - 292000 34.843777 1000 0.71712409 4.5867253 - 293000 35.208307 1000 0.71803758 4.6024332 - 294000 35.576207 1000 0.71002715 4.6181412 - 295000 35.942972 1000 0.7070911 4.6338492 - 296000 36.3107 1000 0.71082175 4.6495571 - 297000 36.682044 1000 0.70438977 4.6652651 - 298000 37.054664 1000 0.70240345 4.6809731 - 299000 37.424717 1000 0.70525357 4.696681 - 300000 37.796148 1000 0.70636846 4.712389 - 301000 38.166828 1000 0.70443346 4.7280969 - 302000 38.538428 1000 0.71187973 4.7438049 - 303000 38.907221 1000 0.71047139 4.7595129 - 304000 39.280263 1000 0.71405925 4.7752208 - 305000 39.652902 1000 0.71277063 4.7909288 - 306000 40.02752 1000 0.72005331 4.8066368 - 307000 40.402955 1000 0.72466112 4.8223447 - 308000 40.784177 1000 0.72001329 4.8380527 - 309000 41.173226 1000 0.70611982 4.8537606 - 310000 41.559195 1000 0.70810918 4.8694686 - 311000 41.946697 1000 0.70377166 4.8851766 - 312000 42.337059 1000 0.70434458 4.9008845 - 313000 42.728304 1000 0.70707385 4.9165925 - 314000 43.120803 1000 0.71412995 4.9323005 - 315000 43.510705 1000 0.72228946 4.9480084 - 316000 43.901867 1000 0.72715835 4.9637164 - 317000 44.295667 1000 0.73833476 4.9794244 - 318000 44.687503 1000 0.75953014 4.9951323 - 319000 45.077121 1000 0.76413836 5.0108403 - 320000 45.465317 1000 0.76745045 5.0265482 - 321000 45.86931 1000 0.75813288 5.0422562 - 322000 46.277029 1000 0.75324661 5.0579642 - 323000 46.680799 1000 0.75004276 5.0736721 - 324000 47.082361 1000 0.74316264 5.0893801 - 325000 47.481252 1000 0.74087383 5.1050881 - 326000 47.87511 1000 0.73244882 5.120796 - 327000 48.274582 1000 0.73096631 5.136504 - 328000 48.671718 1000 0.72955403 5.152212 - 329000 49.066335 1000 0.73464916 5.1679199 - 330000 49.459765 1000 0.73130257 5.1836279 - 331000 49.850698 1000 0.73008711 5.1993358 - 332000 50.241012 1000 0.72561074 5.2150438 - 333000 50.643245 1000 0.7214495 5.2307518 - 334000 51.039153 1000 0.71274232 5.2464597 - 335000 51.430328 1000 0.71335777 5.2621677 - 336000 51.819148 1000 0.71317423 5.2778757 - 337000 52.202763 1000 0.70965743 5.2935836 - 338000 52.585061 1000 0.69648518 5.3092916 - 339000 52.967678 1000 0.68985842 5.3249995 - 340000 53.351472 1000 0.6846783 5.3407075 - 341000 53.737731 1000 0.69031602 5.3564155 - 342000 54.131413 1000 0.69035259 5.3721234 - 343000 54.526384 1000 0.69843983 5.3878314 - 344000 54.921609 1000 0.69566088 5.4035394 - 345000 55.314258 1000 0.68309182 5.4192473 - 346000 55.701119 1000 0.68360919 5.4349553 - 347000 56.088194 1000 0.68034628 5.4506633 - 348000 56.467878 1000 0.67155093 5.4663712 - 349000 56.857709 1000 0.66504603 5.4820792 - 350000 57.250758 1000 0.66533658 5.4977871 - 351000 57.643438 1000 0.67726804 5.5134951 - 352000 58.04256 1000 0.68880987 5.5292031 - 353000 58.437369 1000 0.71377276 5.544911 - 354000 58.832421 1000 0.71715625 5.560619 - 355000 59.222221 1000 0.71729576 5.576327 - 356000 59.621431 1000 0.71088872 5.5920349 - 357000 60.013262 1000 0.70564615 5.6077429 - 358000 60.406494 1000 0.69291739 5.6234508 - 359000 60.800632 1000 0.68237469 5.6391588 - 360000 61.195364 1000 0.69105856 5.6548668 - 361000 61.588291 1000 0.69563351 5.6705747 - 362000 61.984821 1000 0.69762747 5.6862827 - 363000 62.377158 1000 0.69717346 5.7019907 - 364000 62.77604 1000 0.69413964 5.7176986 - 365000 63.165863 1000 0.68584257 5.7334066 - 366000 63.5503 1000 0.67653762 5.7491146 - 367000 63.930717 1000 0.66880284 5.7648225 - 368000 64.313698 1000 0.66024732 5.7805305 - 369000 64.708193 1000 0.65451701 5.7962384 - 370000 65.10142 1000 0.64352268 5.8119464 - 371000 65.49169 1000 0.63715296 5.8276544 - 372000 65.879115 1000 0.63840106 5.8433623 - 373000 66.268258 1000 0.64537192 5.8590703 - 374000 66.661807 1000 0.64498753 5.8747783 - 375000 67.052521 1000 0.64666103 5.8904862 - 376000 67.443168 1000 0.65957055 5.9061942 - 377000 67.835892 1000 0.65964257 5.9219022 - 378000 68.229282 1000 0.65720396 5.9376101 - 379000 68.623557 1000 0.66304265 5.9533181 - 380000 69.015967 1000 0.67465814 5.969026 - 381000 69.408981 1000 0.68582945 5.984734 - 382000 69.796561 1000 0.69516677 6.000442 - 383000 70.186403 1000 0.69835516 6.0161499 - 384000 70.5765 1000 0.70403284 6.0318579 - 385000 70.966205 1000 0.6955862 6.0475659 - 386000 71.360054 1000 0.704932 6.0632738 - 387000 71.757912 1000 0.71954173 6.0789818 - 388000 72.147544 1000 0.72347529 6.0946897 - 389000 72.535029 1000 0.72738907 6.1103977 - 390000 72.925842 1000 0.74783091 6.1261057 - 391000 73.306871 1000 0.76739039 6.1418136 - 392000 73.692746 1000 0.77184224 6.1575216 - 393000 74.053385 1000 0.76813357 6.1732296 - 394000 74.416323 1000 0.75994091 6.1889375 - 395000 74.777021 1000 0.74970188 6.2046455 - 396000 75.139847 1000 0.7523174 6.2203535 - 397000 75.502888 1000 0.74652931 6.2360614 - 398000 75.865442 1000 0.74418096 6.2517694 - 399000 76.225245 1000 0.75110038 6.2674773 - 400000 76.590032 1000 0.7609274 6.2831853 -Loop time of 76.5901 on 1 procs for 200000 steps with 1000 atoms - -Performance: 10660.735 tau/day, 2611.305 timesteps/s, 2.611 Matom-step/s -99.0% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 8.693 | 8.693 | 8.693 | 0.0 | 11.35 -Neigh | 0.082655 | 0.082655 | 0.082655 | 0.0 | 0.11 -Comm | 1.1618 | 1.1618 | 1.1618 | 0.0 | 1.52 -Output | 0.0052644 | 0.0052644 | 0.0052644 | 0.0 | 0.01 -Modify | 65.713 | 65.713 | 65.713 | 0.0 | 85.80 -Other | | 0.934 | | | 1.22 - -Nlocal: 1000 ave 1000 max 1000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 268 ave 268 max 268 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 5015 ave 5015 max 5015 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 5015 -Ave neighs/atom = 5.015 -Neighbor list builds = 163 -Dangerous builds = 0 -Total wall time: 0:01:59 diff --git a/examples/granregion/log.15Sep22.granregion.mixer.g++.4 b/examples/granregion/log.15Sep22.granregion.mixer.g++.4 deleted file mode 100644 index 57c517a063..0000000000 --- a/examples/granregion/log.15Sep22.granregion.mixer.g++.4 +++ /dev/null @@ -1,632 +0,0 @@ -LAMMPS (15 Sep 2022) -variable name string mixer - -thermo_modify flush yes -variable seed equal 14314 - -############################################### -# Particle parameters -################################################ - -variable rlo equal 0.3 -variable rhi equal 0.6 -variable dlo equal 2.0*${rlo} -variable dlo equal 2.0*0.3 -variable dhi equal 2.0*${rhi} -variable dhi equal 2.0*0.6 -variable skin equal ${rhi} -variable skin equal 0.6 - -variable coeffRes equal 0.1 -variable coeffFric equal 0.5 - -variable kn equal 10^5 -variable kt equal 0.2*${kn} -variable kt equal 0.2*100000 - -variable gravity equal 1.0 -variable density equal 1.0 - -variable min_mass equal ${density}*4.0/3.0*PI*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*${rlo}*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*${rlo}*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*${rlo} -variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*0.3 -variable a equal (-2.0*log(${coeffRes})/PI)^2 -variable a equal (-2.0*log(0.1)/PI)^2 -variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*${kn}/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/${min_mass}/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*$a)) -variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*0.405284734569351)) -variable gamma_t equal ${gamma_n}*0.5 -variable gamma_t equal 806.699778405191*0.5 - -variable tcol equal PI/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/${min_mass}-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/0.113097335529233-${gamma_n}/4.0) -variable tcol equal PI/sqrt(2*100000/0.113097335529233-806.699778405191/4.0) - -variable dt equal ${tcol}*0.02 -variable dt equal 0.00236257621510454*0.02 -timestep ${dt} -timestep 4.72515243020908e-05 - -############################################### - -variable dumpfreq equal 1000 -variable logfreq equal 1000 - -newton on -atom_style sphere - -boundary p p f - -region boxreg block 0 20 0 20 0 20 -create_box 1 boxreg -Created orthogonal box = (0 0 0) to (20 20 20) - 1 by 2 by 2 MPI processor grid - -pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 -pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 -pair_coeff * * - -neighbor ${skin} multi -neighbor 0.6 multi -thermo ${logfreq} -thermo 1000 - -comm_style brick -comm_modify mode multi group all vel yes -balance 1.1 shift xyz 20 1.1 -Balancing ... -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 20, bins = 1 1 1 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton on, size, history - pair build: half/size/multi/newton - stencil: half/multi/3d - bin: multi -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:210) -fix bal all balance 10000 1.1 shift xyz 20 1.01 - -####################### Options specific to pouring ######################### - -region insreg cylinder z 10 10 8 10 18 side in units box -region cylreg cylinder z 10 10 10 0 20 side in units box - -variable theta equal (step/400000)*2*PI - -region b1 block 2 18 9 11 0 4 side out rotate v_theta 10 10 0 0 0 1 units box -region b2 block 9 11 2 18 0 3.99999 side out rotate v_theta 10 10 0 0 0 1 units box - -region mixer intersect 3 cylreg b1 b2 side in - -fix grav all gravity ${gravity} vector 0 0 -1 -fix grav all gravity 1 vector 0 0 -1 -fix 1 all nve/sphere - -fix mixwall all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 region mixer -fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 region mixer - -fix ins all pour 1000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 ${dhi} dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens ${density} ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 ${density} -fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 1 -Particle insertion: 444 every 84653 steps, 1000 by step 169307 - -#dump 1 all custom ${dumpfreq} ${name}_pour.dump # id type mass diameter x y z - -#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 1.5 # box no 0.0 axes no 0.0 0.0 -#dump_modify 2 pad 6 - -thermo_style custom step cpu atoms ke v_theta -WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:896) -thermo_modify flush yes lost warn - -run 200000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 - -@Article{Intveld08, - author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, - title = {Accurate and Efficient Methods for Modeling Colloidal - Mixtures in an Explicit Solvent using Molecular Dynamics}, - journal = {Comput.\ Phys.\ Commut.}, - year = 2008, - volume = 179, - pages = {320--329} -} - -@article{Shire2020, - author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, - title = {{DEM} Simulations of Polydisperse Media: Efficient Contact - Detection Applied to Investigate the Quasi-Static Limit}, - journal = {Computational Particle Mechanics}, - year = {2020} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 5.816 | 5.816 | 5.816 Mbytes - Step CPU Atoms KinEng v_theta - 0 0 0 -0 0 - 1000 0.089993907 444 -0 0.015707963 - 2000 0.14885989 444 -0 0.031415927 - 3000 0.20954563 444 -0 0.04712389 - 4000 0.27002257 444 -0 0.062831853 - 5000 0.33034347 444 -0 0.078539816 - 6000 0.39049526 444 -0 0.09424778 - 7000 0.45002664 444 -0 0.10995574 - 8000 0.50911338 444 -0 0.12566371 - 9000 0.56771745 444 -0 0.14137167 - 10000 0.62699472 444 -0 0.15707963 - 11000 0.67300351 444 -0 0.1727876 - 12000 0.71981356 444 -0 0.18849556 - 13000 0.76697682 444 -0 0.20420352 - 14000 0.81412229 444 -0 0.21991149 - 15000 0.86284749 444 -0 0.23561945 - 16000 0.91199522 444 -0 0.25132741 - 17000 0.96230663 444 -0 0.26703538 - 18000 1.0118327 444 -0 0.28274334 - 19000 1.0617397 444 -0 0.2984513 - 20000 1.111586 444 -0 0.31415927 - 21000 1.1556637 444 -0 0.32986723 - 22000 1.2005913 444 -0 0.34557519 - 23000 1.2455061 444 -0 0.36128316 - 24000 1.2910181 444 -0 0.37699112 - 25000 1.3370577 444 -0 0.39269908 - 26000 1.383595 444 -0 0.40840704 - 27000 1.430922 444 -0 0.42411501 - 28000 1.478627 444 -0 0.43982297 - 29000 1.5278607 444 -0 0.45553093 - 30000 1.576597 444 -0 0.4712389 - 31000 1.6202694 444 -0 0.48694686 - 32000 1.6646667 444 -0 0.50265482 - 33000 1.7092726 444 -0 0.51836279 - 34000 1.7535573 444 -0 0.53407075 - 35000 1.7985995 444 -0 0.54977871 - 36000 1.8440346 444 -0 0.56548668 - 37000 1.8900841 444 -0 0.58119464 - 38000 1.9368772 444 -0 0.5969026 - 39000 1.9842867 444 -0 0.61261057 - 40000 2.0318482 444 -0 0.62831853 - 41000 2.0753049 444 -0 0.64402649 - 42000 2.1196274 444 -0 0.65973446 - 43000 2.1647071 444 -0 0.67544242 - 44000 2.2101195 444 -0 0.69115038 - 45000 2.2564642 444 -0 0.70685835 - 46000 2.3033573 444 -0 0.72256631 - 47000 2.3500515 444 -0 0.73827427 - 48000 2.3972268 444 -0 0.75398224 - 49000 2.4444727 444 -0 0.7696902 - 50000 2.4921003 444 -0 0.78539816 - 51000 2.535088 444 -0 0.80110613 - 52000 2.5785564 444 -0 0.81681409 - 53000 2.6221392 444 -0 0.83252205 - 54000 2.6664169 444 -0 0.84823002 - 55000 2.7108951 444 -0 0.86393798 - 56000 2.7560522 444 -0 0.87964594 - 57000 2.8010254 444 -0 0.89535391 - 58000 2.8484456 444 -0 0.91106187 - 59000 2.8951674 444 -0 0.92676983 - 60000 2.9424205 444 -0 0.9424778 - 61000 2.9885999 444 -0 0.95818576 - 62000 3.0338676 444 -0 0.97389372 - 63000 3.0793674 444 -0 0.98960169 - 64000 3.1253557 444 -0 1.0053096 - 65000 3.1723823 444 -0 1.0210176 - 66000 3.2203846 444 -0 1.0367256 - 67000 3.2690443 444 -0 1.0524335 - 68000 3.317707 444 -0 1.0681415 - 69000 3.3670196 444 -0 1.0838495 - 70000 3.4160505 444 -0 1.0995574 - 71000 3.4621197 444 -0 1.1152654 - 72000 3.5086434 444 -0 1.1309734 - 73000 3.555691 444 -0 1.1466813 - 74000 3.6032072 444 -0 1.1623893 - 75000 3.6514849 444 -0 1.1780972 - 76000 3.7002713 444 -0 1.1938052 - 77000 3.7497321 444 -0 1.2095132 - 78000 3.7997711 444 -0 1.2252211 - 79000 3.8504338 444 -0 1.2409291 - 80000 3.9020416 444 -0 1.2566371 - 81000 3.9496762 444 -0 1.272345 - 82000 3.9968215 444 -0 1.288053 - 83000 4.04496 444 -0 1.303761 - 84000 4.0936477 444 -0 1.3194689 - 85000 4.1618384 888 -0 1.3351769 - 86000 4.2472086 888 -0 1.3508848 - 87000 4.3322855 888 -0 1.3665928 - 88000 4.4169835 888 -0 1.3823008 - 89000 4.5014588 888 -0 1.3980087 - 90000 4.5861842 888 -0 1.4137167 - 91000 4.653654 888 -0 1.4294247 - 92000 4.7217642 888 -0 1.4451326 - 93000 4.791842 888 -0 1.4608406 - 94000 4.8601789 888 -0 1.4765485 - 95000 4.92849 888 -0 1.4922565 - 96000 4.9976811 888 -0 1.5079645 - 97000 5.0687073 888 -0 1.5236724 - 98000 5.1387234 888 -0 1.5393804 - 99000 5.2086037 888 -0 1.5550884 - 100000 5.2786924 888 -0 1.5707963 - 101000 5.3466895 888 -0 1.5865043 - 102000 5.417132 888 -0 1.6022123 - 103000 5.4865633 888 -0 1.6179202 - 104000 5.5565911 888 -0 1.6336282 - 105000 5.6266394 888 -0 1.6493361 - 106000 5.6975394 888 -0 1.6650441 - 107000 5.7687753 888 -0 1.6807521 - 108000 5.8408498 888 -0 1.69646 - 109000 5.9132618 888 -0 1.712168 - 110000 5.9872629 888 -0 1.727876 - 111000 6.0588115 888 -0 1.7435839 - 112000 6.1308729 888 -0 1.7592919 - 113000 6.2047311 888 -0 1.7749998 - 114000 6.2780757 888 -0 1.7907078 - 115000 6.3528542 888 -0 1.8064158 - 116000 6.4277704 888 -0 1.8221237 - 117000 6.5034683 888 -0 1.8378317 - 118000 6.5795779 888 -0 1.8535397 - 119000 6.655928 888 -0 1.8692476 - 120000 6.7335119 888 -0 1.8849556 - 121000 6.806827 888 -0 1.9006636 - 122000 6.881052 888 -0 1.9163715 - 123000 6.9559647 888 -0 1.9320795 - 124000 7.0300829 888 -0 1.9477874 - 125000 7.1047925 888 -0 1.9634954 - 126000 7.1797025 888 -0 1.9792034 - 127000 7.2556934 888 -0 1.9949113 - 128000 7.3317803 888 -0 2.0106193 - 129000 7.4088096 888 -0 2.0263273 - 130000 7.4862461 888 -0 2.0420352 - 131000 7.5633585 888 -0 2.0577432 - 132000 7.641939 888 -0 2.0734512 - 133000 7.7192741 888 -0 2.0891591 - 134000 7.7970156 888 -0 2.1048671 - 135000 7.8760712 888 -0 2.120575 - 136000 7.9563099 888 -0 2.136283 - 137000 8.0381808 888 -0 2.151991 - 138000 8.1210957 888 -0 2.1676989 - 139000 8.20401 888 -0 2.1834069 - 140000 8.2871705 888 -0 2.1991149 - 141000 8.364321 888 -0 2.2148228 - 142000 8.4426744 888 -0 2.2305308 - 143000 8.5238377 888 -0 2.2462387 - 144000 8.6050517 888 -0 2.2619467 - 145000 8.6865872 888 -0 2.2776547 - 146000 8.767621 888 -0 2.2933626 - 147000 8.8496616 888 -0 2.3090706 - 148000 8.9329599 888 -0 2.3247786 - 149000 9.0165929 888 -0 2.3404865 - 150000 9.1015214 888 -0 2.3561945 - 151000 9.1847289 888 -0 2.3719025 - 152000 9.2689185 888 -0 2.3876104 - 153000 9.3518862 888 -0 2.4033184 - 154000 9.4367057 888 -0 2.4190263 - 155000 9.5227466 888 -0 2.4347343 - 156000 9.6087196 888 -0 2.4504423 - 157000 9.6955661 888 -0 2.4661502 - 158000 9.7838227 888 -0 2.4818582 - 159000 9.8731804 888 -0 2.4975662 - 160000 9.9626648 888 -0 2.5132741 - 161000 10.050473 888 -0 2.5289821 - 162000 10.137725 888 -0 2.54469 - 163000 10.227259 888 -0 2.560398 - 164000 10.318501 888 -0 2.576106 - 165000 10.409218 888 -0 2.5918139 - 166000 10.502055 888 -0 2.6075219 - 167000 10.593786 888 -0 2.6232299 - 168000 10.688536 888 -0 2.6389378 - 169000 10.786033 888 -0 2.6546458 - 170000 10.886377 1000 -0 2.6703538 - 171000 10.987493 1000 -0 2.6860617 - 172000 11.084584 1000 -0 2.7017697 - 173000 11.181502 1000 -0 2.7174776 - 174000 11.28434 1000 -0 2.7331856 - 175000 11.387838 1000 -0 2.7488936 - 176000 11.490915 1000 -0 2.7646015 - 177000 11.595473 1000 -0 2.7803095 - 178000 11.699823 1000 -0 2.7960175 - 179000 11.803927 1000 -0 2.8117254 - 180000 11.90548 1000 -0 2.8274334 - 181000 12.00857 1000 -0 2.8431414 - 182000 12.112787 1000 -0 2.8588493 - 183000 12.217943 1000 -0 2.8745573 - 184000 12.322668 1000 -0 2.8902652 - 185000 12.428332 1000 -0 2.9059732 - 186000 12.535414 1000 -0 2.9216812 - 187000 12.642404 1000 -0 2.9373891 - 188000 12.749332 1000 -0 2.9530971 - 189000 12.856872 1000 -0 2.9688051 - 190000 12.965335 1000 -0 2.984513 - 191000 13.073275 1000 -0 3.000221 - 192000 13.180122 1000 -0 3.0159289 - 193000 13.288112 1000 -0 3.0316369 - 194000 13.394688 1000 -0 3.0473449 - 195000 13.501251 1000 -0 3.0630528 - 196000 13.607472 1000 -0 3.0787608 - 197000 13.71396 1000 -0 3.0944688 - 198000 13.821133 1000 -0 3.1101767 - 199000 13.929192 1000 -0 3.1258847 - 200000 14.036724 1000 -0 3.1415927 -Loop time of 14.0368 on 4 procs for 200000 steps with 1000 atoms - -Performance: 58169.166 tau/day, 14248.307 timesteps/s, 14.248 Matom-step/s -95.5% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.47004 | 0.75698 | 1.1 | 33.1 | 5.39 -Neigh | 0.0078501 | 0.010659 | 0.013902 | 2.7 | 0.08 -Comm | 3.9589 | 4.4102 | 4.9322 | 21.6 | 31.42 -Output | 0.0031054 | 0.0046208 | 0.0069341 | 2.1 | 0.03 -Modify | 6.1829 | 6.8363 | 7.6135 | 24.8 | 48.70 -Other | | 2.018 | | | 14.38 - -Nlocal: 250 ave 260 max 242 min -Histogram: 1 0 1 0 0 1 0 0 0 1 -Nghost: 279.25 ave 325 max 232 min -Histogram: 1 1 0 0 0 0 0 0 1 1 -Neighs: 939.75 ave 1397 max 509 min -Histogram: 2 0 0 0 0 0 0 0 0 2 - -Total # of neighbors = 3759 -Ave neighs/atom = 3.759 -Neighbor list builds = 201 -Dangerous builds = 0 -unfix ins -run 200000 -Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule -Per MPI rank memory allocation (min/avg/max) = 11.87 | 11.88 | 11.89 Mbytes - Step CPU Atoms KinEng v_theta - 200000 0 1000 1.0071568 3.1415927 - 201000 0.099357585 1000 1.0036239 3.1573006 - 202000 0.19922889 1000 0.99846844 3.1730086 - 203000 0.29896537 1000 0.98236169 3.1887165 - 204000 0.39875771 1000 0.98625572 3.2044245 - 205000 0.49759454 1000 0.9893407 3.2201325 - 206000 0.59609243 1000 1.0012123 3.2358404 - 207000 0.69408206 1000 1.0231892 3.2515484 - 208000 0.79216806 1000 1.0265912 3.2672564 - 209000 0.8902274 1000 1.0190202 3.2829643 - 210000 0.98909509 1000 1.0267754 3.2986723 - 211000 1.0882901 1000 1.0186847 3.3143802 - 212000 1.1895753 1000 1.0159848 3.3300882 - 213000 1.2891277 1000 0.99326329 3.3457962 - 214000 1.387486 1000 0.97263135 3.3615041 - 215000 1.4850078 1000 0.97246409 3.3772121 - 216000 1.58405 1000 0.96000626 3.3929201 - 217000 1.6853829 1000 0.95730432 3.408628 - 218000 1.7911163 1000 0.95605591 3.424336 - 219000 1.8974141 1000 0.94983 3.440044 - 220000 2.0029829 1000 0.95291888 3.4557519 - 221000 2.108723 1000 0.93612997 3.4714599 - 222000 2.2151561 1000 0.93414081 3.4871678 - 223000 2.3220866 1000 0.93321246 3.5028758 - 224000 2.4285504 1000 0.93026943 3.5185838 - 225000 2.5356173 1000 0.930478 3.5342917 - 226000 2.6415516 1000 0.92909096 3.5499997 - 227000 2.747634 1000 0.92308495 3.5657077 - 228000 2.8524082 1000 0.91075986 3.5814156 - 229000 2.9570172 1000 0.9006662 3.5971236 - 230000 3.0627535 1000 0.88869212 3.6128316 - 231000 3.1683919 1000 0.8877611 3.6285395 - 232000 3.2749534 1000 0.89409636 3.6442475 - 233000 3.3824185 1000 0.90866091 3.6599554 - 234000 3.4917899 1000 0.90454601 3.6756634 - 235000 3.6009156 1000 0.89408327 3.6913714 - 236000 3.7111309 1000 0.8881044 3.7070793 - 237000 3.8197619 1000 0.89322168 3.7227873 - 238000 3.9302291 1000 0.89018045 3.7384953 - 239000 4.0407242 1000 0.88771268 3.7542032 - 240000 4.1521989 1000 0.88957717 3.7699112 - 241000 4.2639861 1000 0.89362036 3.7856191 - 242000 4.3782856 1000 0.90967472 3.8013271 - 243000 4.4925107 1000 0.91366381 3.8170351 - 244000 4.6057342 1000 0.9150959 3.832743 - 245000 4.7199383 1000 0.92725789 3.848451 - 246000 4.8346784 1000 0.93024722 3.864159 - 247000 4.9515438 1000 0.93297974 3.8798669 - 248000 5.0696512 1000 0.94755869 3.8955749 - 249000 5.1838845 1000 0.94761679 3.9112829 - 250000 5.297991 1000 0.92701064 3.9269908 - 251000 5.412562 1000 0.91365252 3.9426988 - 252000 5.5274859 1000 0.90918381 3.9584067 - 253000 5.6418647 1000 0.90612685 3.9741147 - 254000 5.7593721 1000 0.90352142 3.9898227 - 255000 5.8759086 1000 0.90421567 4.0055306 - 256000 5.993588 1000 0.90024688 4.0212386 - 257000 6.1142027 1000 0.88540341 4.0369466 - 258000 6.2318882 1000 0.87890423 4.0526545 - 259000 6.3502765 1000 0.86833748 4.0683625 - 260000 6.4677878 1000 0.85465694 4.0840704 - 261000 6.5875341 1000 0.83941242 4.0997784 - 262000 6.7063481 1000 0.81790404 4.1154864 - 263000 6.8249742 1000 0.82284562 4.1311943 - 264000 6.9421188 1000 0.80961447 4.1469023 - 265000 7.0588866 1000 0.80567073 4.1626103 - 266000 7.1763855 1000 0.79577448 4.1783182 - 267000 7.295632 1000 0.78489106 4.1940262 - 268000 7.4144463 1000 0.77348757 4.2097342 - 269000 7.5333839 1000 0.76606696 4.2254421 - 270000 7.6527119 1000 0.7649744 4.2411501 - 271000 7.7704222 1000 0.76050309 4.256858 - 272000 7.8903012 1000 0.75378759 4.272566 - 273000 8.0106197 1000 0.75633811 4.288274 - 274000 8.1309707 1000 0.75703106 4.3039819 - 275000 8.2522837 1000 0.75227453 4.3196899 - 276000 8.3730898 1000 0.76003902 4.3353979 - 277000 8.4955037 1000 0.76274661 4.3511058 - 278000 8.6153206 1000 0.75888482 4.3668138 - 279000 8.7339569 1000 0.75071875 4.3825218 - 280000 8.8515447 1000 0.75454927 4.3982297 - 281000 8.9685253 1000 0.75617824 4.4139377 - 282000 9.0856168 1000 0.75230835 4.4296456 - 283000 9.2018894 1000 0.75417571 4.4453536 - 284000 9.3179777 1000 0.74559345 4.4610616 - 285000 9.4341721 1000 0.73274661 4.4767695 - 286000 9.5498722 1000 0.72385193 4.4924775 - 287000 9.6651326 1000 0.72398899 4.5081855 - 288000 9.7810274 1000 0.72009027 4.5238934 - 289000 9.8959471 1000 0.72026686 4.5396014 - 290000 10.010007 1000 0.72330145 4.5553093 - 291000 10.123304 1000 0.71630656 4.5710173 - 292000 10.238277 1000 0.71089192 4.5867253 - 293000 10.351465 1000 0.70584923 4.6024332 - 294000 10.464794 1000 0.71350398 4.6181412 - 295000 10.57818 1000 0.72781836 4.6338492 - 296000 10.692249 1000 0.72285512 4.6495571 - 297000 10.80741 1000 0.71649517 4.6652651 - 298000 10.923694 1000 0.71132209 4.6809731 - 299000 11.039173 1000 0.73602072 4.696681 - 300000 11.157002 1000 0.74400837 4.712389 - 301000 11.272462 1000 0.76618562 4.7280969 - 302000 11.386581 1000 0.77476041 4.7438049 - 303000 11.499191 1000 0.77124283 4.7595129 - 304000 11.611585 1000 0.7625748 4.7752208 - 305000 11.725012 1000 0.74979361 4.7909288 - 306000 11.838032 1000 0.74515733 4.8066368 - 307000 11.949194 1000 0.74302741 4.8223447 - 308000 12.060586 1000 0.73732959 4.8380527 - 309000 12.171445 1000 0.73368237 4.8537606 - 310000 12.283518 1000 0.72374292 4.8694686 - 311000 12.393447 1000 0.72107784 4.8851766 - 312000 12.505136 1000 0.72944426 4.9008845 - 313000 12.616959 1000 0.73958637 4.9165925 - 314000 12.730312 1000 0.75160847 4.9323005 - 315000 12.846163 1000 0.74419683 4.9480084 - 316000 12.960328 1000 0.74652593 4.9637164 - 317000 13.073994 1000 0.74933482 4.9794244 - 318000 13.186549 1000 0.74200509 4.9951323 - 319000 13.296925 1000 0.7346024 5.0108403 - 320000 13.406825 1000 0.72806145 5.0265482 - 321000 13.51703 1000 0.72147888 5.0422562 - 322000 13.628261 1000 0.71460041 5.0579642 - 323000 13.74063 1000 0.70255075 5.0736721 - 324000 13.853826 1000 0.70640327 5.0893801 - 325000 13.968533 1000 0.70643428 5.1050881 - 326000 14.081456 1000 0.69751794 5.120796 - 327000 14.195505 1000 0.69035108 5.136504 - 328000 14.310048 1000 0.68068243 5.152212 - 329000 14.426048 1000 0.69123492 5.1679199 - 330000 14.543349 1000 0.70326515 5.1836279 - 331000 14.662021 1000 0.70551726 5.1993358 - 332000 14.782194 1000 0.70514444 5.2150438 - 333000 14.901573 1000 0.71102045 5.2307518 - 334000 15.020642 1000 0.71336747 5.2464597 - 335000 15.136739 1000 0.70816388 5.2621677 - 336000 15.252554 1000 0.69502472 5.2778757 - 337000 15.368496 1000 0.69314289 5.2935836 - 338000 15.483744 1000 0.68565794 5.3092916 - 339000 15.599584 1000 0.67268053 5.3249995 - 340000 15.717342 1000 0.68313196 5.3407075 - 341000 15.835594 1000 0.68782815 5.3564155 - 342000 15.954546 1000 0.6989326 5.3721234 - 343000 16.074184 1000 0.694926 5.3878314 - 344000 16.193902 1000 0.7006474 5.4035394 - 345000 16.314878 1000 0.70783177 5.4192473 - 346000 16.434704 1000 0.71334276 5.4349553 - 347000 16.554708 1000 0.72917419 5.4506633 - 348000 16.673034 1000 0.74315705 5.4663712 - 349000 16.791269 1000 0.76731311 5.4820792 - 350000 16.912554 1000 0.79761434 5.4977871 - 351000 17.03323 1000 0.80447724 5.5134951 - 352000 17.155644 1000 0.80118728 5.5292031 - 353000 17.281134 1000 0.77990459 5.544911 - 354000 17.406672 1000 0.76453299 5.560619 - 355000 17.532346 1000 0.76538392 5.576327 - 356000 17.657256 1000 0.76310698 5.5920349 - 357000 17.782477 1000 0.75897095 5.6077429 - 358000 17.909642 1000 0.75071115 5.6234508 - 359000 18.035032 1000 0.74034801 5.6391588 - 360000 18.160696 1000 0.72671924 5.6548668 - 361000 18.285089 1000 0.72111017 5.6705747 - 362000 18.408849 1000 0.71875181 5.6862827 - 363000 18.533901 1000 0.71469706 5.7019907 - 364000 18.659326 1000 0.70470493 5.7176986 - 365000 18.784109 1000 0.70863047 5.7334066 - 366000 18.911344 1000 0.70850561 5.7491146 - 367000 19.039756 1000 0.71413452 5.7648225 - 368000 19.169907 1000 0.71314184 5.7805305 - 369000 19.299066 1000 0.71309549 5.7962384 - 370000 19.428116 1000 0.71132937 5.8119464 - 371000 19.553027 1000 0.70788039 5.8276544 - 372000 19.678121 1000 0.71780071 5.8433623 - 373000 19.804465 1000 0.72352571 5.8590703 - 374000 19.92949 1000 0.71723739 5.8747783 - 375000 20.053554 1000 0.71556941 5.8904862 - 376000 20.177991 1000 0.70935312 5.9061942 - 377000 20.301972 1000 0.71551157 5.9219022 - 378000 20.427612 1000 0.7235163 5.9376101 - 379000 20.554742 1000 0.73896421 5.9533181 - 380000 20.680899 1000 0.74906169 5.969026 - 381000 20.805515 1000 0.75303336 5.984734 - 382000 20.931483 1000 0.75359492 6.000442 - 383000 21.05731 1000 0.75579354 6.0161499 - 384000 21.184712 1000 0.75178368 6.0318579 - 385000 21.310667 1000 0.74412159 6.0475659 - 386000 21.433509 1000 0.7360955 6.0632738 - 387000 21.554251 1000 0.73461103 6.0789818 - 388000 21.674477 1000 0.72496617 6.0946897 - 389000 21.794698 1000 0.7219047 6.1103977 - 390000 21.914083 1000 0.71837013 6.1261057 - 391000 22.033188 1000 0.71495923 6.1418136 - 392000 22.152689 1000 0.71436707 6.1575216 - 393000 22.271183 1000 0.71447834 6.1732296 - 394000 22.389775 1000 0.71334298 6.1889375 - 395000 22.509106 1000 0.71510229 6.2046455 - 396000 22.628068 1000 0.7121714 6.2203535 - 397000 22.746926 1000 0.70818894 6.2360614 - 398000 22.865086 1000 0.70059455 6.2517694 - 399000 22.982394 1000 0.69960089 6.2674773 - 400000 23.100381 1000 0.70261998 6.2831853 -Loop time of 23.1004 on 4 procs for 200000 steps with 1000 atoms - -Performance: 35345.963 tau/day, 8657.854 timesteps/s, 8.658 Matom-step/s -92.9% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 1.263 | 2.1388 | 3.0295 | 58.6 | 9.26 -Neigh | 0.012633 | 0.017793 | 0.023147 | 3.7 | 0.08 -Comm | 7.8521 | 9.0474 | 10.284 | 39.6 | 39.17 -Output | 0.0029549 | 0.004916 | 0.0068506 | 2.0 | 0.02 -Modify | 8.3635 | 9.8066 | 11.142 | 41.0 | 42.45 -Other | | 2.085 | | | 9.03 - -Nlocal: 250 ave 258 max 241 min -Histogram: 1 0 0 0 1 0 0 1 0 1 -Nghost: 412 ave 492 max 332 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Neighs: 1258.5 ave 1588 max 953 min -Histogram: 2 0 0 0 0 0 0 0 1 1 - -Total # of neighbors = 5034 -Ave neighs/atom = 5.034 -Neighbor list builds = 159 -Dangerous builds = 0 -Total wall time: 0:00:37 diff --git a/examples/granregion/log.16Mar23.granregion.box.g++.1 b/examples/granregion/log.16Mar23.granregion.box.g++.1 new file mode 100644 index 0000000000..b7bdeda1d4 --- /dev/null +++ b/examples/granregion/log.16Mar23.granregion.box.g++.1 @@ -0,0 +1,484 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# pouring spheres into container box + +units lj +atom_style sphere +boundary f f f +dimension 3 +comm_modify vel yes + +region box block -10 10 -10 10 -10 10 units box +create_box 2 box +Created orthogonal box = (-10 -10 -10) to (10 10 10) + 1 by 1 by 1 MPI processor grid + +pair_style hybrid gran/hooke 4000.0 NULL 100.0 NULL 0.5 1 +pair_coeff * * gran/hooke + +region container block -6 6 -6 6 -6 6 units box +fix container all wall/gran/region hooke/history 4000.0 NULL 100.0 NULL 0.5 1 region container + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 2 all nve/sphere +fix 3 all gravity 1.0 vector 0 0 -1 + +region slab block -2 2 -2 2 -2 2 units box +fix ins all pour 100 2 4767548 vol 0.4 10 diam one 1.0 region slab ignore +Particle insertion: 48 every 566 steps, 100 by step 1133 + +timestep 0.005 + +compute 1 all temp +compute_modify 1 dynamic/dof yes + +compute 2 all temp/sphere +compute_modify 2 dynamic/dof yes + +thermo 100 +thermo_style custom step atoms temp c_1 c_2 press +thermo_modify lost ignore +compute_modify thermo_temp dynamic/dof yes + +#dump 2 all image 100 image.*.jpg type type # zoom 1.4 adiam 1.0 box no 0.0 axes yes 0.9 0.03 +#dump_modify 2 pad 5 + +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 1.3 + binsize = 0.65, bins = 31 31 31 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hooke, perpetual + attributes: half, newton on, size + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 0.5861 | 0.5861 | 0.5861 Mbytes + Step Atoms Temp c_1 c_2 Press + 0 0 0 0 0 0 +WARNING: Fewer insertions than requested (src/GRANULAR/fix_pour.cpp:681) + 100 30 0.803783 0.803783 0.39507978 0.0029137134 + 200 30 1.1967995 1.1967995 0.5882574 0.0043383984 + 300 30 1.2814686 1.2814686 0.62987441 0.0046453238 + 400 30 0.82331082 0.82331082 0.41173176 0.0029845017 + 500 30 0.7708462 0.7708462 0.38777784 0.0043831147 +WARNING: Fewer insertions than requested (src/GRANULAR/fix_pour.cpp:681) + 600 64 0.51564897 0.51564897 0.26631577 0.0040059368 + 700 64 0.57239348 0.57239348 0.29566901 0.0045075987 + 800 64 0.61837087 0.61837087 0.32195387 0.0048123564 + 900 64 0.53061888 0.53061888 0.28564763 0.0055906552 + 1000 64 0.496299 0.496299 0.26801572 0.0061169128 + 1100 64 0.46068308 0.46068308 0.24699057 0.0055717699 +WARNING: Fewer insertions than requested (src/GRANULAR/fix_pour.cpp:681) + 1200 99 0.39206225 0.39206225 0.21356546 0.0066294211 + 1300 99 0.38624966 0.38624966 0.21345854 0.0049051051 + 1400 99 0.35615284 0.35615284 0.19785725 0.0046170772 + 1500 99 0.31486693 0.31486693 0.17429055 0.0064903432 + 1600 99 0.26369001 0.26369001 0.15095266 0.0045226847 + 1700 100 0.1925923 0.1925923 0.11308104 0.007362313 + 1800 100 0.13724978 0.13724978 0.083276845 0.0058136373 + 1900 100 0.077212636 0.077212636 0.053159386 0.0016509598 + 2000 100 0.065294031 0.065294031 0.04372752 0.0020346467 + 2100 100 0.057431398 0.057431398 0.037977068 0.0012681098 + 2200 100 0.059093045 0.059093045 0.037435193 0.00096610799 + 2300 100 0.03422338 0.03422338 0.025491304 0.00069886052 + 2400 100 0.020558284 0.020558284 0.016163009 0.0017260663 + 2500 100 0.015339709 0.015339709 0.012329236 0.00041308031 + 2600 100 0.012891354 0.012891354 0.009766054 0.00030356722 + 2700 100 0.0092634449 0.0092634449 0.0073580108 0.00077723051 + 2800 100 0.0073925841 0.0073925841 0.0059932218 0.00016466767 + 2900 100 0.0081228267 0.0081228267 0.006281761 0.00013828388 + 3000 100 0.0041833223 0.0041833223 0.0035147096 0.00013160599 + 3100 100 0.0035930775 0.0035930775 0.0030039922 0.00060639771 + 3200 100 0.0030824465 0.0030824465 0.0026541293 0.00047391014 + 3300 100 0.0035087522 0.0035087522 0.0027664508 0.00014080317 + 3400 100 0.0018537868 0.0018537868 0.0017099705 6.3326674e-05 + 3500 100 0.0015371228 0.0015371228 0.0014155433 0.00021612522 + 3600 100 0.001708556 0.001708556 0.0014369892 8.1034202e-05 + 3700 100 0.00095948652 0.00095948652 0.0009788528 3.4694023e-05 + 3800 100 0.00091875668 0.00091875668 0.00086805146 3.9373686e-05 + 3900 100 0.001557068 0.001557068 0.001159526 2.5178607e-05 + 4000 100 0.00062012451 0.00062012451 0.00066806922 5.6680551e-06 + 4100 100 0.00060940771 0.00060940771 0.00065614741 1.0137901e-05 + 4200 100 0.00059538437 0.00059538437 0.00064501521 7.3679744e-06 + 4300 100 0.00052946048 0.00052946048 0.00059353641 5.9225081e-06 + 4400 100 0.00051202281 0.00051202281 0.00057524772 3.6198435e-05 + 4500 100 0.00049986632 0.00049986632 0.00055754521 2.2275519e-05 + 4600 100 0.00048187334 0.00048187334 0.00053988815 2.2015243e-05 + 4700 100 0.00045261491 0.00045261491 0.00050298355 8.9681339e-05 + 4800 100 0.00034965427 0.00034965427 0.0004278781 1.0983535e-05 + 4900 100 0.00033555621 0.00033555621 0.00041435167 2.9266598e-05 + 5000 100 0.00031387148 0.00031387148 0.00039605781 2.5628425e-05 +Loop time of 0.073938 on 1 procs for 5000 steps with 100 atoms + +Performance: 29213677.752 tau/day, 67624.254 timesteps/s, 6.762 Matom-step/s +98.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0084547 | 0.0084547 | 0.0084547 | 0.0 | 11.43 +Neigh | 0.011399 | 0.011399 | 0.011399 | 0.0 | 15.42 +Comm | 0.00077205 | 0.00077205 | 0.00077205 | 0.0 | 1.04 +Output | 0.00042663 | 0.00042663 | 0.00042663 | 0.0 | 0.58 +Modify | 0.049692 | 0.049692 | 0.049692 | 0.0 | 67.21 +Other | | 0.003194 | | | 4.32 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 164 ave 164 max 164 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 164 +Ave neighs/atom = 1.64 +Neighbor list builds = 281 +Dangerous builds = 0 + +region container delete +variable theta equal (step-5000)*(4.0*PI/5000) +region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 0 0 1 +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +WARNING: Region properties for region container changed between runs, resetting its motion (src/GRANULAR/fix_wall_gran_region.cpp:101) +Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes + Step Atoms Temp c_1 c_2 Press + 5000 100 0.00031387148 0.00031387148 0.00039605781 2.6174978e-05 + 5100 100 0.54537023 0.54537023 0.30042175 0.0087427352 + 5200 100 0.57210852 0.57210852 0.3192468 0.0098134067 + 5300 100 0.7168108 0.7168108 0.38577893 0.011004584 + 5400 100 0.78895524 0.78895524 0.41889428 0.013555713 + 5500 100 0.87797874 0.87797874 0.45689223 0.01565356 + 5600 100 0.95424379 0.95424379 0.48830429 0.014707858 + 5700 100 1.0046012 1.0046012 0.51054927 0.01469179 + 5800 100 1.0371453 1.0371453 0.5262568 0.015576788 + 5900 100 1.0545743 1.0545743 0.5361173 0.01589889 + 6000 100 1.0932949 1.0932949 0.55402214 0.017484573 + 6100 100 1.1148364 1.1148364 0.56241126 0.01721788 + 6200 100 1.1315267 1.1315267 0.57050887 0.017961246 + 6300 100 1.1506124 1.1506124 0.58009471 0.017159062 + 6400 100 1.1663328 1.1663328 0.5876586 0.017935311 + 6500 100 1.1821086 1.1821086 0.59595161 0.018005316 + 6600 100 1.2039397 1.2039397 0.60567523 0.021604661 + 6700 100 1.2269912 1.2269912 0.61770225 0.018907995 + 6800 100 1.2447034 1.2447034 0.62576519 0.020537655 + 6900 100 1.2625323 1.2625323 0.63486698 0.02010613 + 7000 100 1.2617127 1.2617127 0.63318163 0.019670429 + 7100 100 1.260715 1.260715 0.63311254 0.01981063 + 7200 100 1.2790404 1.2790404 0.64079 0.020218912 + 7300 100 1.2760228 1.2760228 0.6395331 0.021749952 + 7400 100 1.2799657 1.2799657 0.64139078 0.020472917 + 7500 100 1.2846472 1.2846472 0.64343076 0.020610029 + 7600 100 1.2883963 1.2883963 0.6449186 0.020748906 + 7700 100 1.2926891 1.2926891 0.64684538 0.020599574 + 7800 100 1.3033565 1.3033565 0.65126214 0.021822145 + 7900 100 1.3025797 1.3025797 0.65069472 0.02121384 + 8000 100 1.3052551 1.3052551 0.65209898 0.021398725 + 8100 100 1.3069868 1.3069868 0.65304899 0.021246465 + 8200 100 1.3091964 1.3091964 0.65438143 0.021222398 + 8300 100 1.3101277 1.3101277 0.65518554 0.021329556 + 8400 100 1.3117162 1.3117162 0.65551056 0.021468306 + 8500 100 1.3143892 1.3143892 0.65683087 0.021610874 + 8600 100 1.3164123 1.3164123 0.65789423 0.021564818 + 8700 100 1.3186854 1.3186854 0.65914031 0.021745193 + 8800 100 1.3216944 1.3216944 0.66041385 0.022178553 + 8900 100 1.3207558 1.3207558 0.65988071 0.021810027 + 9000 100 1.3213131 1.3213131 0.66020938 0.021890893 + 9100 100 1.3224905 1.3224905 0.66088289 0.021824994 + 9200 100 1.3240681 1.3240681 0.66183168 0.021784616 + 9300 100 1.3254174 1.3254174 0.66279883 0.021664485 + 9400 100 1.3326916 1.3326916 0.66633358 0.021979709 + 9500 100 1.3405062 1.3405062 0.66975745 0.022238702 + 9600 100 1.3363695 1.3363695 0.66742377 0.022104646 + 9700 100 1.3363391 1.3363391 0.6673032 0.022066628 + 9800 100 1.334875 1.334875 0.6665532 0.021902669 + 9900 100 1.3339805 1.3339805 0.66614358 0.022018971 + 10000 100 1.3337897 1.3337897 0.66609803 0.022184385 +Loop time of 0.213875 on 1 procs for 5000 steps with 100 atoms + +Performance: 10099379.673 tau/day, 23378.194 timesteps/s, 2.338 Matom-step/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.031863 | 0.031863 | 0.031863 | 0.0 | 14.90 +Neigh | 0.026844 | 0.026844 | 0.026844 | 0.0 | 12.55 +Comm | 0.0011059 | 0.0011059 | 0.0011059 | 0.0 | 0.52 +Output | 0.00072907 | 0.00072907 | 0.00072907 | 0.0 | 0.34 +Modify | 0.14874 | 0.14874 | 0.14874 | 0.0 | 69.54 +Other | | 0.004595 | | | 2.15 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 186 ave 186 max 186 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 186 +Ave neighs/atom = 1.86 +Neighbor list builds = 626 +Dangerous builds = 0 + +region container delete +region container block -6 6 -6 6 -6 6 units box +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes + Step Atoms Temp c_1 c_2 Press + 10000 100 1.3337897 1.3337897 0.66609803 0.022303323 + 10100 100 0.29960521 0.29960521 0.17535846 0.0099382421 + 10200 100 0.15737069 0.15737069 0.1024212 0.0045555648 + 10300 100 0.087501771 0.087501771 0.070895975 0.00093482858 + 10400 100 0.069967301 0.069967301 0.059253397 0.0008760803 + 10500 100 0.056137153 0.056137153 0.047810947 0.0009202993 + 10600 100 0.046835352 0.046835352 0.039400006 0.0011343063 + 10700 100 0.035422167 0.035422167 0.030746587 0.00081816474 + 10800 100 0.029180739 0.029180739 0.02627693 0.00039292712 + 10900 100 0.025094915 0.025094915 0.023244435 0.00044742245 + 11000 100 0.018014893 0.018014893 0.016862375 0.00017018411 + 11100 100 0.014549072 0.014549072 0.014551468 0.00020988549 + 11200 100 0.012586232 0.012586232 0.012569333 0.00019035396 + 11300 100 0.01003586 0.01003586 0.010253286 0.0004598214 + 11400 100 0.0067515743 0.0067515743 0.0069569741 0.00040592883 + 11500 100 0.0057834612 0.0057834612 0.0060790719 0.00013993531 + 11600 100 0.005496335 0.005496335 0.0056855922 0.00013419698 + 11700 100 0.0051524178 0.0051524178 0.0053354591 7.4388594e-05 + 11800 100 0.004911096 0.004911096 0.0051415984 0.00010665621 + 11900 100 0.004687138 0.004687138 0.0049520306 6.7492552e-05 + 12000 100 0.0041516495 0.0041516495 0.0044351666 4.3841199e-05 + 12100 100 0.0033948026 0.0033948026 0.0036851466 4.2010682e-05 + 12200 100 0.0029584231 0.0029584231 0.0031151054 5.1583068e-05 + 12300 100 0.0028401114 0.0028401114 0.0030094644 4.5499489e-05 + 12400 100 0.002650861 0.002650861 0.0027699066 0.00015370263 + 12500 100 0.0026018053 0.0026018053 0.0027178583 3.219734e-05 + 12600 100 0.0025788693 0.0025788693 0.0026939358 3.6615314e-05 + 12700 100 0.0024798907 0.0024798907 0.0026181033 3.0688648e-05 + 12800 100 0.0023930719 0.0023930719 0.0025491721 7.5200629e-05 + 12900 100 0.0022100795 0.0022100795 0.0024231125 2.3210159e-05 + 13000 100 0.0021267492 0.0021267492 0.0023312893 2.463758e-05 + 13100 100 0.0020732193 0.0020732193 0.0022673707 2.5656089e-05 + 13200 100 0.0020010659 0.0020010659 0.0021834293 2.4913608e-05 + 13300 100 0.0019645929 0.0019645929 0.0021311636 6.8209063e-05 + 13400 100 0.0019236711 0.0019236711 0.0020928899 2.3805429e-05 + 13500 100 0.001857137 0.001857137 0.0020387354 3.1316165e-05 + 13600 100 0.0018399111 0.0018399111 0.0020204586 2.27689e-05 + 13700 100 0.0016240252 0.0016240252 0.0017492695 0.00023180963 + 13800 100 0.0015856393 0.0015856393 0.0017164012 4.2480373e-05 + 13900 100 0.0014770352 0.0014770352 0.001571278 2.3192512e-05 + 14000 100 0.0013712974 0.0013712974 0.0014839763 4.7410142e-05 + 14100 100 0.0012396318 0.0012396318 0.0013778109 1.3867692e-05 + 14200 100 0.0011502319 0.0011502319 0.0012780584 0.00018410725 + 14300 100 0.0011020896 0.0011020896 0.0012348357 7.8122446e-05 + 14400 100 0.0010486644 0.0010486644 0.0011483239 0.00015074963 + 14500 100 0.00094167471 0.00094167471 0.0010033809 1.9550083e-05 + 14600 100 0.00080775791 0.00080775791 0.00087434944 4.6043659e-05 + 14700 100 0.00076176039 0.00076176039 0.00083462461 8.1916038e-05 + 14800 100 0.00073637901 0.00073637901 0.00081306941 9.1126903e-06 + 14900 100 0.00072682383 0.00072682383 0.00079396231 8.9944449e-06 + 15000 100 0.00070207518 0.00070207518 0.00077168127 2.2155171e-05 +Loop time of 0.0756704 on 1 procs for 5000 steps with 100 atoms + +Performance: 28544845.995 tau/day, 66076.032 timesteps/s, 6.608 Matom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0079484 | 0.0079484 | 0.0079484 | 0.0 | 10.50 +Neigh | 0.0043035 | 0.0043035 | 0.0043035 | 0.0 | 5.69 +Comm | 0.00064796 | 0.00064796 | 0.00064796 | 0.0 | 0.86 +Output | 0.00044137 | 0.00044137 | 0.00044137 | 0.0 | 0.58 +Modify | 0.059329 | 0.059329 | 0.059329 | 0.0 | 78.40 +Other | | 0.003 | | | 3.97 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 165 ave 165 max 165 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 165 +Ave neighs/atom = 1.65 +Neighbor list builds = 101 +Dangerous builds = 0 + +region container delete +variable theta equal (step-15000)*(4.0*PI/5000) +region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 1 1 1 +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes + Step Atoms Temp c_1 c_2 Press + 15000 100 0.00070207518 0.00070207518 0.00077168127 2.0192237e-05 + 15100 100 1.1160127 1.1160127 0.69939857 0.01822663 + 15200 100 1.2546016 1.2546016 0.78819474 0.017013321 + 15300 100 1.1930613 1.1930613 0.77429911 0.015607175 + 15400 100 1.3791371 1.3791371 0.87875984 0.018478669 + 15500 100 1.6063158 1.6063158 0.98587325 0.027330546 + 15600 100 1.7719925 1.7719925 1.0773314 0.025651867 + 15700 100 1.8053439 1.8053439 1.0934572 0.033790716 + 15800 100 1.959016 1.959016 1.1465659 0.033715025 + 15900 100 2.1365654 2.1365654 1.2217718 0.03009529 + 16000 100 2.2883378 2.2883378 1.2768504 0.030582689 + 16100 100 2.4384012 2.4384012 1.3513708 0.031435936 + 16200 100 2.3571308 2.3571308 1.29989 0.034824253 + 16300 100 2.4671092 2.4671092 1.3516798 0.032364282 + 16400 100 2.4411936 2.4411936 1.3385743 0.031890134 + 16500 100 2.4930545 2.4930545 1.3635435 0.032601452 + 16600 100 2.5771906 2.5771906 1.4113993 0.034547128 + 16700 100 2.723199 2.723199 1.4769168 0.036582811 + 16800 100 2.8616886 2.8616886 1.5379462 0.036224198 + 16900 100 2.9517942 2.9517942 1.5872824 0.038757052 + 17000 100 3.0150335 3.0150335 1.6337001 0.044031411 + 17100 100 3.2211536 3.2211536 1.7374532 0.041483093 + 17200 100 3.2509982 3.2509982 1.7512835 0.042718835 + 17300 100 3.262348 3.262348 1.7648674 0.049291835 + 17400 100 3.4050702 3.4050702 1.8352043 0.04435958 + 17500 100 3.5236051 3.5236051 1.9003369 0.045640904 + 17600 100 3.4005287 3.4005287 1.8404347 0.044832295 + 17700 100 3.3190992 3.3190992 1.8154147 0.046365998 + 17800 100 3.2981138 3.2981138 1.811389 0.04607132 + 17900 100 3.2839466 3.2839466 1.7863773 0.045628167 + 18000 100 3.1519747 3.1519747 1.7382103 0.041739193 + 18100 100 3.1205305 3.1205305 1.7101547 0.043511342 + 18200 100 3.2014874 3.2014874 1.746745 0.04452173 + 18300 100 3.2739622 3.2739622 1.7796276 0.041345823 + 18400 100 3.3157359 3.3157359 1.8158932 0.047414 + 18500 100 3.5592096 3.5592096 1.9307695 0.046458132 + 18600 100 3.6594352 3.6594352 1.9851626 0.046396953 + 18700 100 3.6392917 3.6392917 1.9701361 0.047272883 + 18800 100 3.8490892 3.8490892 2.0832481 0.052344106 + 18900 100 3.8465732 3.8465732 2.0790411 0.054203126 + 19000 100 4.010008 4.010008 2.1620722 0.054242542 + 19100 100 4.0417392 4.0417392 2.168506 0.066484948 + 19200 100 3.8791541 3.8791541 2.0791914 0.060788142 + 19300 100 4.1023603 4.1023603 2.1944127 0.056461298 + 19400 100 4.1294375 4.1294375 2.2009649 0.061099665 + 19500 100 3.9274112 3.9274112 2.0877398 0.066068401 + 19600 100 4.066229 4.066229 2.1678487 0.055961003 + 19700 100 3.9829257 3.9829257 2.1184329 0.061961838 + 19800 100 4.0303258 4.0303258 2.14544 0.053667616 + 19900 100 3.9385166 3.9385166 2.1074364 0.060804382 + 20000 100 3.8534401 3.8534401 2.0796496 0.057588336 +Loop time of 0.167801 on 1 procs for 5000 steps with 100 atoms + +Performance: 12872385.064 tau/day, 29797.188 timesteps/s, 2.980 Matom-step/s +99.1% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.013849 | 0.013849 | 0.013849 | 0.0 | 8.25 +Neigh | 0.038108 | 0.038108 | 0.038108 | 0.0 | 22.71 +Comm | 0.0011352 | 0.0011352 | 0.0011352 | 0.0 | 0.68 +Output | 0.00073125 | 0.00073125 | 0.00073125 | 0.0 | 0.44 +Modify | 0.10927 | 0.10927 | 0.10927 | 0.0 | 65.12 +Other | | 0.004703 | | | 2.80 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 157 ave 157 max 157 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 157 +Ave neighs/atom = 1.57 +Neighbor list builds = 914 +Dangerous builds = 0 + +region container delete +region container block -6 6 -6 6 -6 6 units box +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.837 | 5.837 | 5.837 Mbytes + Step Atoms Temp c_1 c_2 Press + 20000 100 3.8534401 3.8534401 2.0796496 0.057176513 + 20100 100 1.2993548 1.2993548 0.81360425 0.016153186 + 20200 100 1.0761427 1.0761427 0.68479926 0.014383682 + 20300 100 0.95889127 0.95889127 0.61193887 0.01314653 + 20400 100 0.89684043 0.89684043 0.57475851 0.011106613 + 20500 100 0.85901565 0.85901565 0.54372093 0.015717834 + 20600 100 0.98438384 0.98438384 0.6079212 0.013965815 + 20700 100 1.1061789 1.1061789 0.66511277 0.013698526 + 20800 100 1.0615292 1.0615292 0.6269413 0.014496973 + 20900 100 0.92980037 0.92980037 0.54727184 0.014568574 + 21000 100 0.71248123 0.71248123 0.41945517 0.01199152 + 21100 100 0.34785801 0.34785801 0.21699877 0.0062324631 + 21200 100 0.2452514 0.2452514 0.15265503 0.0041094159 + 21300 100 0.22937209 0.22937209 0.13988978 0.0034016589 + 21400 100 0.17765021 0.17765021 0.11334596 0.0024169343 + 21500 100 0.11484505 0.11484505 0.078119393 0.0020987046 + 21600 100 0.077564645 0.077564645 0.056175123 0.002107237 + 21700 100 0.049571519 0.049571519 0.039920177 0.00099127481 + 21800 100 0.0403125 0.0403125 0.032827882 0.00074671903 + 21900 100 0.02735168 0.02735168 0.023877339 0.0018186225 + 22000 100 0.02218474 0.02218474 0.01893178 0.00061438633 + 22100 100 0.021701103 0.021701103 0.0179008 0.00068071664 + 22200 100 0.01777321 0.01777321 0.014521817 0.00045296506 + 22300 100 0.016056338 0.016056338 0.01280709 0.00038192299 + 22400 100 0.013344054 0.013344054 0.010788852 0.0002617289 + 22500 100 0.011625836 0.011625836 0.0094362641 0.00045947089 + 22600 100 0.0068875777 0.0068875777 0.0058858647 0.00028566999 + 22700 100 0.0054081662 0.0054081662 0.0049545239 0.00029291503 + 22800 100 0.0045080107 0.0045080107 0.0042362636 0.00015217816 + 22900 100 0.0038090552 0.0038090552 0.0036905284 0.00049430003 + 23000 100 0.003551951 0.003551951 0.0033639677 0.00022478393 + 23100 100 0.0033854012 0.0033854012 0.00317485 0.00015179604 + 23200 100 0.0032951003 0.0032951003 0.0029760374 0.00015363208 + 23300 100 0.0022995179 0.0022995179 0.0023224311 0.00018791799 + 23400 100 0.0020834178 0.0020834178 0.0021434342 0.00020683744 + 23500 100 0.0019221303 0.0019221303 0.0020227484 0.00018960984 + 23600 100 0.0018393381 0.0018393381 0.0019560681 0.00021375486 + 23700 100 0.0019027035 0.0019027035 0.0020047598 0.00010932204 + 23800 100 0.0023612063 0.0023612063 0.0021895633 6.7671176e-05 + 23900 100 0.0019570853 0.0019570853 0.0018847178 5.6761457e-05 + 24000 100 0.0013011744 0.0013011744 0.0013899106 3.8847148e-05 + 24100 100 0.001281115 0.001281115 0.0013737259 3.7559904e-05 + 24200 100 0.0012136262 0.0012136262 0.0013002937 6.8727546e-05 + 24300 100 0.0011789934 0.0011789934 0.0012399341 3.7633632e-05 + 24400 100 0.0011601514 0.0011601514 0.0012186534 4.0077907e-05 + 24500 100 0.0010660295 0.0010660295 0.0011419405 0.00015757237 + 24600 100 0.00098862453 0.00098862453 0.0010869455 4.5714503e-05 + 24700 100 0.00087647136 0.00087647136 0.00091405278 3.3129869e-05 + 24800 100 0.00063913046 0.00063913046 0.00072298864 3.5424308e-05 + 24900 100 0.00062195456 0.00062195456 0.00070527087 2.6201396e-05 + 25000 100 0.00057599538 0.00057599538 0.00065623226 2.0096103e-05 +Loop time of 0.0771328 on 1 procs for 5000 steps with 100 atoms + +Performance: 28003659.560 tau/day, 64823.286 timesteps/s, 6.482 Matom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0090635 | 0.0090635 | 0.0090635 | 0.0 | 11.75 +Neigh | 0.012028 | 0.012028 | 0.012028 | 0.0 | 15.59 +Comm | 0.0008345 | 0.0008345 | 0.0008345 | 0.0 | 1.08 +Output | 0.00038777 | 0.00038777 | 0.00038777 | 0.0 | 0.50 +Modify | 0.051619 | 0.051619 | 0.051619 | 0.0 | 66.92 +Other | | 0.0032 | | | 4.15 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 158 ave 158 max 158 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 158 +Ave neighs/atom = 1.58 +Neighbor list builds = 310 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/granregion/log.16Mar23.granregion.box.g++.4 b/examples/granregion/log.16Mar23.granregion.box.g++.4 new file mode 100644 index 0000000000..0874981da4 --- /dev/null +++ b/examples/granregion/log.16Mar23.granregion.box.g++.4 @@ -0,0 +1,484 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# pouring spheres into container box + +units lj +atom_style sphere +boundary f f f +dimension 3 +comm_modify vel yes + +region box block -10 10 -10 10 -10 10 units box +create_box 2 box +Created orthogonal box = (-10 -10 -10) to (10 10 10) + 1 by 2 by 2 MPI processor grid + +pair_style hybrid gran/hooke 4000.0 NULL 100.0 NULL 0.5 1 +pair_coeff * * gran/hooke + +region container block -6 6 -6 6 -6 6 units box +fix container all wall/gran/region hooke/history 4000.0 NULL 100.0 NULL 0.5 1 region container + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 2 all nve/sphere +fix 3 all gravity 1.0 vector 0 0 -1 + +region slab block -2 2 -2 2 -2 2 units box +fix ins all pour 100 2 4767548 vol 0.4 10 diam one 1.0 region slab ignore +Particle insertion: 48 every 566 steps, 100 by step 1133 + +timestep 0.005 + +compute 1 all temp +compute_modify 1 dynamic/dof yes + +compute 2 all temp/sphere +compute_modify 2 dynamic/dof yes + +thermo 100 +thermo_style custom step atoms temp c_1 c_2 press +thermo_modify lost ignore +compute_modify thermo_temp dynamic/dof yes + +#dump 2 all image 100 image.*.jpg type type # zoom 1.4 adiam 1.0 box no 0.0 axes yes 0.9 0.03 +#dump_modify 2 pad 5 + +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 1.3 + binsize = 0.65, bins = 31 31 31 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hooke, perpetual + attributes: half, newton on, size + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 0.4843 | 0.4843 | 0.4843 Mbytes + Step Atoms Temp c_1 c_2 Press + 0 0 0 0 0 0 +WARNING: Fewer insertions than requested (src/GRANULAR/fix_pour.cpp:681) + 100 30 0.803783 0.803783 0.39507978 0.0029137134 + 200 30 1.1967995 1.1967995 0.5882574 0.0043383984 + 300 30 1.2814686 1.2814686 0.62987441 0.0046453238 + 400 30 0.82331082 0.82331082 0.41173176 0.0029845017 + 500 30 0.7708462 0.7708462 0.38777784 0.0043831147 +WARNING: Fewer insertions than requested (src/GRANULAR/fix_pour.cpp:681) + 600 64 0.51564897 0.51564897 0.26631577 0.0040059368 + 700 64 0.57239348 0.57239348 0.29566901 0.0045075987 + 800 64 0.61837087 0.61837087 0.32195387 0.0048123564 + 900 64 0.53061888 0.53061888 0.28564763 0.0055906552 + 1000 64 0.496299 0.496299 0.26801572 0.0061169128 + 1100 64 0.46068308 0.46068308 0.24699057 0.0055717699 +WARNING: Fewer insertions than requested (src/GRANULAR/fix_pour.cpp:681) + 1200 99 0.39206225 0.39206225 0.21356546 0.0066294211 + 1300 99 0.38624966 0.38624966 0.21345854 0.0049051051 + 1400 99 0.35615284 0.35615284 0.19785725 0.0046170772 + 1500 99 0.31486693 0.31486693 0.17429055 0.0064903432 + 1600 99 0.26369001 0.26369001 0.15095266 0.0045226847 + 1700 100 0.1925923 0.1925923 0.11308104 0.007362313 + 1800 100 0.13724978 0.13724978 0.083276845 0.0058136373 + 1900 100 0.077212636 0.077212636 0.053159386 0.0016509598 + 2000 100 0.065294031 0.065294031 0.04372752 0.0020346467 + 2100 100 0.057431398 0.057431398 0.037977068 0.0012681098 + 2200 100 0.059093046 0.059093046 0.037435194 0.00096610935 + 2300 100 0.034223376 0.034223376 0.025491303 0.00069886041 + 2400 100 0.020558283 0.020558283 0.016163008 0.0017260646 + 2500 100 0.015339698 0.015339698 0.012329233 0.00041312351 + 2600 100 0.012891357 0.012891357 0.0097660566 0.00030356702 + 2700 100 0.0092631621 0.0092631621 0.0073576327 0.00077729311 + 2800 100 0.0073866488 0.0073866488 0.0060126175 0.00018677664 + 2900 100 0.0081122362 0.0081122362 0.0062557089 0.00013749542 + 3000 100 0.0042333757 0.0042333757 0.0035407672 0.00016515787 + 3100 100 0.0035433278 0.0035433278 0.0029683167 0.00033693479 + 3200 100 0.0030692964 0.0030692964 0.0026495167 0.00043739373 + 3300 100 0.0033703684 0.0033703684 0.0026931948 0.00014857157 + 3400 100 0.0018405709 0.0018405709 0.0016990035 6.0202278e-05 + 3500 100 0.0014788087 0.0014788087 0.0013889916 0.00016730937 + 3600 100 0.0015932961 0.0015932961 0.0013807898 0.0001418157 + 3700 100 0.00096238915 0.00096238915 0.00097931829 6.7974535e-05 + 3800 100 0.00093087985 0.00093087985 0.00087659377 0.0001504142 + 3900 100 0.0015825065 0.0015825065 0.0011708936 1.9583518e-05 + 4000 100 0.00062295367 0.00062295367 0.00067129665 3.9455653e-05 + 4100 100 0.00061259406 0.00061259406 0.00065710963 1.8540759e-05 + 4200 100 0.00059619666 0.00059619666 0.00064365219 7.3779336e-06 + 4300 100 0.00051191641 0.00051191641 0.00057870947 6.3349656e-06 + 4400 100 0.00050668587 0.00050668587 0.00057057233 6.2702376e-06 + 4500 100 0.00049474942 0.00049474942 0.00055151343 1.5746831e-05 + 4600 100 0.00049309932 0.00049309932 0.00054086323 6.1021041e-06 + 4700 100 0.00049263883 0.00049263883 0.00052677244 6.0964056e-06 + 4800 100 0.00041885021 0.00041885021 0.00047389202 9.5350789e-05 + 4900 100 0.00035596444 0.00035596444 0.00042522549 5.8036712e-05 + 5000 100 0.00032946897 0.00032946897 0.00040320773 6.5350005e-06 +Loop time of 0.0763179 on 4 procs for 5000 steps with 100 atoms + +Performance: 28302682.620 tau/day, 65515.469 timesteps/s, 6.552 Matom-step/s +96.7% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0010572 | 0.0039588 | 0.0074661 | 4.6 | 5.19 +Neigh | 0.0025868 | 0.0049885 | 0.0075283 | 3.4 | 6.54 +Comm | 0.011862 | 0.014631 | 0.018383 | 2.0 | 19.17 +Output | 0.0009702 | 0.0012326 | 0.0014234 | 0.5 | 1.62 +Modify | 0.0019843 | 0.018558 | 0.036592 | 12.2 | 24.32 +Other | | 0.03295 | | | 43.17 + +Nlocal: 25 ave 54 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Nghost: 4.5 ave 10 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Neighs: 40.5 ave 94 max 0 min +Histogram: 2 0 0 0 0 0 0 1 0 1 + +Total # of neighbors = 162 +Ave neighs/atom = 1.62 +Neighbor list builds = 281 +Dangerous builds = 0 + +region container delete +variable theta equal (step-5000)*(4.0*PI/5000) +region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 0 0 1 +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +WARNING: Region properties for region container changed between runs, resetting its motion (src/GRANULAR/fix_wall_gran_region.cpp:101) +Per MPI rank memory allocation (min/avg/max) = 5.609 | 5.672 | 5.735 Mbytes + Step Atoms Temp c_1 c_2 Press + 5000 100 0.00032946897 0.00032946897 0.00040320773 6.050219e-06 + 5100 100 0.54371575 0.54371575 0.29836301 0.008148168 + 5200 100 0.60281896 0.60281896 0.33161676 0.0083772071 + 5300 100 0.70823011 0.70823011 0.38289657 0.0099694209 + 5400 100 0.78467127 0.78467127 0.4133495 0.010119104 + 5500 100 0.85741178 0.85741178 0.44761254 0.013013239 + 5600 100 0.93241573 0.93241573 0.47879351 0.017769592 + 5700 100 1.019104 1.019104 0.51644461 0.015312937 + 5800 100 1.0550014 1.0550014 0.53450507 0.017227797 + 5900 100 1.0910946 1.0910946 0.55272891 0.017469625 + 6000 100 1.1275288 1.1275288 0.56906788 0.018958103 + 6100 100 1.1545017 1.1545017 0.58324166 0.019220208 + 6200 100 1.1815817 1.1815817 0.59552677 0.019397271 + 6300 100 1.1963931 1.1963931 0.60251664 0.018382058 + 6400 100 1.2084652 1.2084652 0.60776713 0.020027986 + 6500 100 1.2217215 1.2217215 0.61406339 0.021750945 + 6600 100 1.2364016 1.2364016 0.62124174 0.021701243 + 6700 100 1.2739954 1.2739954 0.63930766 0.02025277 + 6800 100 1.3032733 1.3032733 0.65268105 0.021684843 + 6900 100 1.3226653 1.3226653 0.66168772 0.021187963 + 7000 100 1.3464995 1.3464995 0.67431153 0.022066117 + 7100 100 1.3250485 1.3250485 0.66342366 0.02109487 + 7200 100 1.3384316 1.3384316 0.67035095 0.021554113 + 7300 100 1.3280234 1.3280234 0.66553439 0.020829435 + 7400 100 1.3218971 1.3218971 0.66186263 0.020882591 + 7500 100 1.3293858 1.3293858 0.66506462 0.020897778 + 7600 100 1.3386019 1.3386019 0.66909392 0.020754479 + 7700 100 1.3465327 1.3465327 0.67316081 0.021231547 + 7800 100 1.3510586 1.3510586 0.67531764 0.021053475 + 7900 100 1.3508987 1.3508987 0.67535907 0.020769633 + 8000 100 1.3575635 1.3575635 0.67875993 0.022020776 + 8100 100 1.3655144 1.3655144 0.68258066 0.021016999 + 8200 100 1.375187 1.375187 0.68732222 0.021385146 + 8300 100 1.3799568 1.3799568 0.69000134 0.02114428 + 8400 100 1.3755871 1.3755871 0.68757909 0.022395102 + 8500 100 1.3708345 1.3708345 0.68509834 0.021603853 + 8600 100 1.3689806 1.3689806 0.68388935 0.022127839 + 8700 100 1.3697516 1.3697516 0.68411868 0.02165119 + 8800 100 1.3700522 1.3700522 0.68423671 0.021554001 + 8900 100 1.3705045 1.3705045 0.68451935 0.021470392 + 9000 100 1.3715107 1.3715107 0.68506443 0.021789844 + 9100 100 1.3707806 1.3707806 0.68467539 0.021451331 + 9200 100 1.371112 1.371112 0.68485975 0.021479203 + 9300 100 1.3716851 1.3716851 0.68516034 0.021515076 + 9400 100 1.3719031 1.3719031 0.68529221 0.021502802 + 9500 100 1.3726759 1.3726759 0.68544012 0.021585119 + 9600 100 1.3746583 1.3746583 0.68636924 0.02206073 + 9700 100 1.3761662 1.3761662 0.68716579 0.021533719 + 9800 100 1.3760157 1.3760157 0.687092 0.02163129 + 9900 100 1.3762626 1.3762626 0.68726404 0.021707045 + 10000 100 1.376303 1.376303 0.68735031 0.022306557 +Loop time of 0.128472 on 4 procs for 5000 steps with 100 atoms + +Performance: 16812995.511 tau/day, 38918.971 timesteps/s, 3.892 Matom-step/s +98.7% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0012241 | 0.0085024 | 0.016023 | 7.8 | 6.62 +Neigh | 0.0051137 | 0.0079745 | 0.011012 | 3.2 | 6.21 +Comm | 0.0050448 | 0.009504 | 0.015048 | 4.6 | 7.40 +Output | 0.00090309 | 0.0014765 | 0.0019648 | 1.2 | 1.15 +Modify | 0.0072253 | 0.041211 | 0.076226 | 16.7 | 32.08 +Other | | 0.0598 | | | 46.55 + +Nlocal: 25 ave 51 max 0 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 3.25 ave 7 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Neighs: 46 ave 101 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 + +Total # of neighbors = 184 +Ave neighs/atom = 1.84 +Neighbor list builds = 628 +Dangerous builds = 0 + +region container delete +region container block -6 6 -6 6 -6 6 units box +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.609 | 5.672 | 5.735 Mbytes + Step Atoms Temp c_1 c_2 Press + 10000 100 1.376303 1.376303 0.68735031 0.022411506 + 10100 100 0.28192752 0.28192752 0.16298909 0.0041760951 + 10200 100 0.14576408 0.14576408 0.10117889 0.0058653094 + 10300 100 0.10070361 0.10070361 0.078060938 0.0041432979 + 10400 100 0.07455595 0.07455595 0.061163197 0.0029733745 + 10500 100 0.063531027 0.063531027 0.052515707 0.0015731241 + 10600 100 0.049259626 0.049259626 0.041321284 0.00073083104 + 10700 100 0.037377957 0.037377957 0.032017729 0.0022631642 + 10800 100 0.031849901 0.031849901 0.027079116 0.0014148618 + 10900 100 0.02795233 0.02795233 0.02461403 0.00037567522 + 11000 100 0.02597858 0.02597858 0.022516094 0.00054992645 + 11100 100 0.021812043 0.021812043 0.019276946 0.00043233309 + 11200 100 0.019318956 0.019318956 0.017224213 0.00035792964 + 11300 100 0.017760494 0.017760494 0.01578407 0.00056959435 + 11400 100 0.015485043 0.015485043 0.013703 0.00061308169 + 11500 100 0.015051781 0.015051781 0.012994991 0.00040607387 + 11600 100 0.012204953 0.012204953 0.01079191 0.00059482171 + 11700 100 0.011242847 0.011242847 0.0096811013 0.00018299476 + 11800 100 0.0089605707 0.0089605707 0.0075086629 0.0012779422 + 11900 100 0.0065544011 0.0065544011 0.0056480432 0.00039599272 + 12000 100 0.0048068901 0.0048068901 0.004185961 0.00022434097 + 12100 100 0.0045272524 0.0045272524 0.0039084556 7.8443821e-05 + 12200 100 0.0038926209 0.0038926209 0.0033949999 0.00011203445 + 12300 100 0.0034653 0.0034653 0.0030246557 0.00014999893 + 12400 100 0.0034031041 0.0034031041 0.0029879474 7.9628343e-05 + 12500 100 0.0032219984 0.0032219984 0.0028369239 6.1651251e-05 + 12600 100 0.0031148659 0.0031148659 0.0027543848 5.7332789e-05 + 12700 100 0.0027407824 0.0027407824 0.0024822578 5.150993e-05 + 12800 100 0.0026205294 0.0026205294 0.0023576698 8.896122e-05 + 12900 100 0.0025633289 0.0025633289 0.0023134486 7.0525939e-05 + 13000 100 0.0025434711 0.0025434711 0.0022833007 5.5638668e-05 + 13100 100 0.0025046562 0.0025046562 0.002227265 5.2772716e-05 + 13200 100 0.0023544645 0.0023544645 0.0021086805 0.00030775943 + 13300 100 0.0022163971 0.0022163971 0.0020107508 4.9204292e-05 + 13400 100 0.0021307794 0.0021307794 0.0019334987 4.8144132e-05 + 13500 100 0.0019891796 0.0019891796 0.0018128084 4.8532374e-05 + 13600 100 0.0018591538 0.0018591538 0.0016721703 4.4781385e-05 + 13700 100 0.001768055 0.001768055 0.001597222 1.6800418e-05 + 13800 100 0.001569014 0.001569014 0.0014331265 4.2982654e-05 + 13900 100 0.0013700893 0.0013700893 0.0012782771 4.8209662e-05 + 14000 100 0.0012398662 0.0012398662 0.0011606486 5.5766702e-05 + 14100 100 0.0011707267 0.0011707267 0.0010811523 3.4913501e-05 + 14200 100 0.0010483984 0.0010483984 0.0009831881 3.4742894e-05 + 14300 100 0.0010043196 0.0010043196 0.00092474592 3.4196115e-05 + 14400 100 0.00094238924 0.00094238924 0.00087181843 8.1414071e-05 + 14500 100 0.00093341457 0.00093341457 0.00086429224 3.3276909e-05 + 14600 100 0.00086042474 0.00086042474 0.00079524877 3.2260019e-05 + 14700 100 0.00080525469 0.00080525469 0.00075380989 2.8374703e-05 + 14800 100 0.00070848512 0.00070848512 0.0006762901 2.9937591e-05 + 14900 100 0.00060414588 0.00060414588 0.00058494979 2.5684401e-05 + 15000 100 0.00054251571 0.00054251571 0.00053643753 4.5496354e-05 +Loop time of 0.0553238 on 4 procs for 5000 steps with 100 atoms + +Performance: 39042861.362 tau/day, 90376.994 timesteps/s, 9.038 Matom-step/s +98.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.00085556 | 0.0028667 | 0.0052429 | 3.6 | 5.18 +Neigh | 0.00076731 | 0.0012173 | 0.0016987 | 1.3 | 2.20 +Comm | 0.0016497 | 0.0060965 | 0.010792 | 5.7 | 11.02 +Output | 0.00072675 | 0.00099509 | 0.0011615 | 0.0 | 1.80 +Modify | 0.00064371 | 0.014719 | 0.030427 | 11.6 | 26.61 +Other | | 0.02943 | | | 53.19 + +Nlocal: 25 ave 54 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Nghost: 5 ave 11 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Neighs: 40 ave 88 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 + +Total # of neighbors = 160 +Ave neighs/atom = 1.6 +Neighbor list builds = 97 +Dangerous builds = 0 + +region container delete +variable theta equal (step-15000)*(4.0*PI/5000) +region container block -6 6 -6 6 -6 6 units box rotate v_theta 0 0 0 1 1 1 +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.609 | 5.672 | 5.735 Mbytes + Step Atoms Temp c_1 c_2 Press + 15000 100 0.00054251571 0.00054251571 0.00053643753 4.3506263e-05 + 15100 100 1.1164435 1.1164435 0.7163854 0.017358175 + 15200 100 1.0384203 1.0384203 0.66790042 0.016095459 + 15300 100 1.0829984 1.0829984 0.712381 0.015915015 + 15400 100 1.4187366 1.4187366 0.89537718 0.023771032 + 15500 100 1.5397547 1.5397547 0.97895571 0.025145916 + 15600 100 1.7993339 1.7993339 1.1003794 0.026783317 + 15700 100 1.8858073 1.8858073 1.1481696 0.030802833 + 15800 100 1.9368129 1.9368129 1.1450129 0.032144729 + 15900 100 2.0379823 2.0379823 1.1738926 0.031969116 + 16000 100 2.0655671 2.0655671 1.187038 0.032395513 + 16100 100 2.1199141 2.1199141 1.2102937 0.028830059 + 16200 100 2.1819656 2.1819656 1.245147 0.029493813 + 16300 100 2.2451204 2.2451204 1.2726968 0.029915554 + 16400 100 2.1697892 2.1697892 1.2342734 0.027495983 + 16500 100 2.2689358 2.2689358 1.2710223 0.029516621 + 16600 100 2.3901976 2.3901976 1.3328992 0.030049751 + 16700 100 2.4731258 2.4731258 1.3763126 0.032663365 + 16800 100 2.5708338 2.5708338 1.4255635 0.032731991 + 16900 100 2.7232422 2.7232422 1.5006931 0.036649645 + 17000 100 2.901986 2.901986 1.5886643 0.037333791 + 17100 100 2.8787369 2.8787369 1.5752504 0.03582313 + 17200 100 3.1137189 3.1137189 1.6974538 0.041245422 + 17300 100 3.1805823 3.1805823 1.7370013 0.040766564 + 17400 100 3.3215703 3.3215703 1.8109954 0.044269306 + 17500 100 3.3767256 3.3767256 1.813696 0.048012575 + 17600 100 3.3618731 3.3618731 1.8004834 0.06103562 + 17700 100 3.2288285 3.2288285 1.7447885 0.042875761 + 17800 100 3.2545435 3.2545435 1.7617642 0.04661949 + 17900 100 3.1162969 3.1162969 1.6850561 0.040086156 + 18000 100 3.2053719 3.2053719 1.7132296 0.040657811 + 18100 100 3.2924625 3.2924625 1.7709303 0.048407939 + 18200 100 3.1682076 3.1682076 1.7136129 0.040996326 + 18300 100 3.2244534 3.2244534 1.7401102 0.043957312 + 18400 100 3.1470903 3.1470903 1.7171698 0.043123438 + 18500 100 3.2690021 3.2690021 1.7803818 0.042693323 + 18600 100 3.2566233 3.2566233 1.7670476 0.04776305 + 18700 100 3.384347 3.384347 1.8334885 0.04441225 + 18800 100 3.6479797 3.6479797 1.9565845 0.047454733 + 18900 100 3.6894531 3.6894531 1.9767079 0.053222159 + 19000 100 3.7867788 3.7867788 2.0265223 0.055923793 + 19100 100 3.9120999 3.9120999 2.0850815 0.053591707 + 19200 100 3.8255419 3.8255419 2.0517931 0.061034295 + 19300 100 3.764721 3.764721 2.0089969 0.068118255 + 19400 100 3.8604884 3.8604884 2.0640292 0.052825172 + 19500 100 3.7763823 3.7763823 2.0223758 0.054529616 + 19600 100 3.9158781 3.9158781 2.0873723 0.053130512 + 19700 100 3.6394071 3.6394071 1.9735106 0.047466529 + 19800 100 3.5409741 3.5409741 1.9335311 0.047317029 + 19900 100 3.5961407 3.5961407 1.954696 0.048093129 + 20000 100 3.4355899 3.4355899 1.8679902 0.0486077 +Loop time of 0.107854 on 4 procs for 5000 steps with 100 atoms + +Performance: 20026986.271 tau/day, 46358.765 timesteps/s, 4.636 Matom-step/s +98.9% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0025992 | 0.0042158 | 0.0061269 | 1.9 | 3.91 +Neigh | 0.0089595 | 0.011254 | 0.012853 | 1.3 | 10.43 +Comm | 0.020408 | 0.022579 | 0.024669 | 1.4 | 20.94 +Output | 0.0010271 | 0.0011457 | 0.0012268 | 0.2 | 1.06 +Modify | 0.019454 | 0.032696 | 0.040003 | 4.4 | 30.31 +Other | | 0.03596 | | | 33.34 + +Nlocal: 25 ave 36 max 16 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +Nghost: 5.5 ave 8 max 2 min +Histogram: 1 0 0 0 0 1 0 0 1 1 +Neighs: 34.25 ave 48 max 19 min +Histogram: 1 1 0 0 0 0 0 0 0 2 + +Total # of neighbors = 137 +Ave neighs/atom = 1.37 +Neighbor list builds = 908 +Dangerous builds = 0 + +region container delete +region container block -6 6 -6 6 -6 6 units box +run 5000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.734 | 5.735 | 5.735 Mbytes + Step Atoms Temp c_1 c_2 Press + 20000 100 3.4355899 3.4355899 1.8679902 0.047866781 + 20100 100 1.1677914 1.1677914 0.70763342 0.015645481 + 20200 100 0.99137326 0.99137326 0.61064707 0.012080974 + 20300 100 0.84603548 0.84603548 0.52093267 0.012501649 + 20400 100 0.82813609 0.82813609 0.50585936 0.010248184 + 20500 100 0.86524293 0.86524293 0.5210492 0.011145216 + 20600 100 0.92229302 0.92229302 0.54567614 0.012838894 + 20700 100 0.93499886 0.93499886 0.55161401 0.011618713 + 20800 100 0.95831407 0.95831407 0.56173113 0.014502297 + 20900 100 0.88486451 0.88486451 0.51926962 0.013847246 + 21000 100 0.66876325 0.66876325 0.39313901 0.010224296 + 21100 100 0.46578708 0.46578708 0.28086455 0.0089121873 + 21200 100 0.21445902 0.21445902 0.14749113 0.0033665892 + 21300 100 0.12935011 0.12935011 0.09319765 0.002811107 + 21400 100 0.10572326 0.10572326 0.075154962 0.0034728629 + 21500 100 0.10952604 0.10952604 0.073864376 0.0017411404 + 21600 100 0.074321422 0.074321422 0.051368858 0.0037915268 + 21700 100 0.043324694 0.043324694 0.032954769 0.00092476658 + 21800 100 0.034911155 0.034911155 0.026843877 0.00061350592 + 21900 100 0.02261818 0.02261818 0.018357224 0.00049800957 + 22000 100 0.015096211 0.015096211 0.01390442 0.00059260194 + 22100 100 0.016119209 0.016119209 0.013990821 0.00038431756 + 22200 100 0.012184692 0.012184692 0.011062653 0.00030466184 + 22300 100 0.0090526001 0.0090526001 0.0080893293 0.00082507232 + 22400 100 0.007155528 0.007155528 0.0067365227 0.00094740021 + 22500 100 0.0057433117 0.0057433117 0.0057438575 0.00016706605 + 22600 100 0.0053029734 0.0053029734 0.0050429137 0.00018457156 + 22700 100 0.0041888319 0.0041888319 0.0039979907 0.00029467329 + 22800 100 0.0046486843 0.0046486843 0.0042259456 0.00019395675 + 22900 100 0.0046414295 0.0046414295 0.0040659744 0.00016025205 + 23000 100 0.0033983576 0.0033983576 0.0033431909 0.00039998961 + 23100 100 0.0031212625 0.0031212625 0.0031113361 0.00024783655 + 23200 100 0.0026724347 0.0026724347 0.0026905233 0.00026001445 + 23300 100 0.0029222876 0.0029222876 0.002946198 0.00012385327 + 23400 100 0.0023944825 0.0023944825 0.0021829995 0.00016185776 + 23500 100 0.0020384082 0.0020384082 0.0019106613 9.2139544e-05 + 23600 100 0.0019773679 0.0019773679 0.0018577006 8.9169073e-05 + 23700 100 0.0018850072 0.0018850072 0.0017715658 9.1301463e-05 + 23800 100 0.0020857322 0.0020857322 0.001864009 7.4633597e-05 + 23900 100 0.0017616498 0.0017616498 0.001680563 4.8547939e-05 + 24000 100 0.0017183254 0.0017183254 0.0016568629 6.56741e-05 + 24100 100 0.0014311732 0.0014311732 0.0013829993 6.0743962e-05 + 24200 100 0.0013434756 0.0013434756 0.001315682 0.00025727478 + 24300 100 0.0012855885 0.0012855885 0.0012558467 9.0130585e-05 + 24400 100 0.0012731213 0.0012731213 0.0012408428 8.2008231e-05 + 24500 100 0.0011333063 0.0011333063 0.001045815 8.8391061e-05 + 24600 100 0.0010560932 0.0010560932 0.00098304208 5.6725938e-05 + 24700 100 0.00097698038 0.00097698038 0.00092381967 7.1771848e-05 + 24800 100 0.00094316799 0.00094316799 0.00089343119 5.5558578e-05 + 24900 100 0.00082812377 0.00082812377 0.00076615512 5.8668812e-05 + 25000 100 0.00076097781 0.00076097781 0.00069462801 6.5742694e-05 +Loop time of 0.0523621 on 4 procs for 5000 steps with 100 atoms + +Performance: 41251226.669 tau/day, 95488.951 timesteps/s, 9.549 Matom-step/s +98.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0011166 | 0.0029573 | 0.0049613 | 3.3 | 5.65 +Neigh | 0.0026276 | 0.0033989 | 0.0041666 | 1.1 | 6.49 +Comm | 0.0054479 | 0.0084136 | 0.01182 | 2.9 | 16.07 +Output | 0.00070658 | 0.00092447 | 0.0010421 | 0.0 | 1.77 +Modify | 0.0015069 | 0.012796 | 0.025273 | 9.9 | 24.44 +Other | | 0.02387 | | | 45.59 + +Nlocal: 25 ave 55 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Nghost: 6 ave 14 max 0 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Neighs: 39.25 ave 88 max 0 min +Histogram: 2 0 0 0 0 0 0 1 0 1 + +Total # of neighbors = 157 +Ave neighs/atom = 1.57 +Neighbor list builds = 280 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/granregion/log.16Mar23.granregion.funnel.g++.1 b/examples/granregion/log.16Mar23.granregion.funnel.g++.1 new file mode 100644 index 0000000000..0ead1ddd41 --- /dev/null +++ b/examples/granregion/log.16Mar23.granregion.funnel.g++.1 @@ -0,0 +1,635 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# pour particles into cone-shaped funnel, settle them, let them run out bottom + +variable name string funnel_pour + +thermo_modify flush yes +units si +variable PI equal 3.141592653589 +variable seed equal 14314 + +############################################### +# Geometry-related parameters +############################################### + +variable xlo equal 10 +variable xhi equal 40 +variable ylo equal 10 +variable yhi equal 40 +variable zlo equal -20 +variable zhi equal 50 + +variable xc equal 25 +variable yc equal 25 + +variable zconehi equal 50 +variable zconelo equal 10 +variable zcyllo equal 0 +variable radconelo equal 2 +variable radconehi equal 20 + +################################################ +# Particle sizes +################################################ + +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.25 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.5 + +variable skin equal ${rhi} +variable skin equal 0.5 + +############################################### +# Granular contact parameters +############################################### + +variable coeffRes equal 0.1 +variable coeffFric equal 0.5 + +variable density equal 1.0 +variable EYoung equal 10^5 +variable Poisson equal 2.0/7.0 +variable GShear equal ${EYoung}/(2*(1+${Poisson})) +variable GShear equal 100000/(2*(1+${Poisson})) +variable GShear equal 100000/(2*(1+0.285714285714286)) + +variable gravity equal 1.0 + +variable reff equal 0.5*(${rhi}+${rlo}) +variable reff equal 0.5*(0.5+${rlo}) +variable reff equal 0.5*(0.5+0.25) +variable meff equal ${density}*4.0/3.0*${PI}*${reff}^3 +variable meff equal 1*4.0/3.0*${PI}*${reff}^3 +variable meff equal 1*4.0/3.0*3.141592653589*${reff}^3 +variable meff equal 1*4.0/3.0*3.141592653589*0.375^3 +variable min_mass equal ${density}*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*0.25 +variable max_mass equal ${density}*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*0.5 + +## Typical way to set kn, kt, etc.: +variable kn equal 4.0*${GShear}/(3*(1-${Poisson})) +variable kn equal 4.0*38888.8888888889/(3*(1-${Poisson})) +variable kn equal 4.0*38888.8888888889/(3*(1-0.285714285714286)) +variable kt equal 4.0*${GShear}/(2-${Poisson}) +variable kt equal 4.0*38888.8888888889/(2-${Poisson}) +variable kt equal 4.0*38888.8888888889/(2-0.285714285714286) + +variable a equal (-2.0*log(${coeffRes})/${PI})^2 +variable a equal (-2.0*log(0.1)/${PI})^2 +variable a equal (-2.0*log(0.1)/3.141592653589)^2 +variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*0.405284734569556)) +variable gamma_t equal ${gamma_n}*0.5 +variable gamma_t equal 903.503751814138*0.5 + +variable tcol equal ${PI}/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-903.503751814138/4.0) + +variable dt equal ${tcol}*0.05 +variable dt equal 0.00210943016014969*0.05 +timestep ${dt} +timestep 0.000105471508007485 + +############################################### +variable dumpfreq equal 1000 +variable logfreq equal 1000 + +newton off +atom_style sphere + +boundary p p f + +region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 10 ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 10 40 ${zlo} ${zhi} +region boxreg block 10 40 10 40 -20 ${zhi} +region boxreg block 10 40 10 40 -20 50 +create_box 1 boxreg +Created orthogonal box = (10 10 -20) to (40 40 50) + 1 by 1 by 1 MPI processor grid + +pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 +pair_coeff * * + +neighbor ${skin} multi +neighbor 0.5 multi +thermo ${logfreq} +thermo 1000 + +comm_style brick +comm_modify mode multi group all vel yes +balance 1.1 shift xyz 20 1.1 +Balancing ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0 + ghost atom cutoff = 0 + binsize = 30, bins = 1 1 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton off, size, history + pair build: half/size/multi/newtoff + stencil: full/multi/3d + bin: multi +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:210) +fix bal all balance 10000 1.1 shift xyz 20 1.01 + +####################### Options specific to pouring ######################### + +# insertion region for fix/pour + +region insreg cylinder z ${xc} ${yc} 10 30 50 side in units box +region insreg cylinder z 25 ${yc} 10 30 50 side in units box +region insreg cylinder z 25 25 10 30 50 side in units box + +# define cone and cylinder regions - see lammps doc on region command +# note new open options + +region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 #Top is open +region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 0 10 side in units box open 2 + +region conereg cone z ${xc} ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 #Bottom and top are open +region conereg cone z 25 ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 10 ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 10 50 side in units box open 1 open 2 + +region hopreg union 2 conereg cylreg + +fix grav all gravity ${gravity} vector 0 0 -1 +fix grav all gravity 1 vector 0 0 -1 +fix 1 all nve/sphere + + +fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg + +fix ins all pour 2000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 ${dhi} dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 3000 every 59965 steps, 2000 by step 1 + +#dump 1 all custom ${dumpfreq} ${name}.dump # id type mass diameter x y z + +#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 3.0 # box no 0.0 axes no 0.0 0.0 +#dump_modify 2 pad 6 + +thermo_style custom step cpu atoms ke +WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:895) +thermo_modify flush yes lost warn + +# Initial run to fill up the cone + +run 20000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 6.648 | 6.648 | 6.648 Mbytes + Step CPU Atoms KinEng + 0 0 0 -0 + 1000 0.52844331 2000 -0 + 2000 0.76085445 2000 -0 + 3000 0.99183068 2000 -0 + 4000 1.2193085 2000 -0 + 5000 1.4439617 2000 -0 + 6000 1.6703511 2000 -0 + 7000 1.9053408 2000 -0 + 8000 2.1323525 2000 -0 + 9000 2.3566342 2000 -0 + 10000 2.5829638 2000 -0 + 11000 2.8106202 2000 -0 + 12000 3.0371473 2000 -0 + 13000 3.2621782 2000 -0 + 14000 3.4860689 2000 -0 + 15000 3.7138322 2000 -0 + 16000 3.9424002 2000 -0 + 17000 4.1703584 2000 -0 + 18000 4.3973348 2000 -0 + 19000 4.6213358 2000 -0 + 20000 4.8547603 2000 -0 +Loop time of 4.85478 on 1 procs for 20000 steps with 2000 atoms + +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.52375 | 0.52375 | 0.52375 | 0.0 | 10.79 +Neigh | 0.070018 | 0.070018 | 0.070018 | 0.0 | 1.44 +Comm | 0.011077 | 0.011077 | 0.011077 | 0.0 | 0.23 +Output | 0.00071321 | 0.00071321 | 0.00071321 | 0.0 | 0.01 +Modify | 4.1233 | 4.1233 | 4.1233 | 0.0 | 84.93 +Other | | 0.126 | | | 2.59 + +Nlocal: 2000 ave 2000 max 2000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1607 ave 1607 max 1607 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1607 +Ave neighs/atom = 0.8035 +Neighbor list builds = 71 +Dangerous builds = 0 +unfix ins +run 150000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 12.69 | 12.69 | 12.69 Mbytes + Step CPU Atoms KinEng + 20000 0 2000 6652.2957 + 21000 0.22761741 2000 6807.2201 + 22000 0.45508977 2000 6973.9359 + 23000 0.68132308 2000 7142.3648 + 24000 0.91084802 2000 7276.9717 + 25000 1.1397154 2000 7369.4191 + 26000 1.3724974 2000 7497.6526 + 27000 1.6037436 2000 7638.946 + 28000 1.8381254 2000 7780.0339 + 29000 2.0763695 2000 7881.8177 + 30000 2.3169444 2000 7967.2641 + 31000 2.5544704 2000 7994.9273 + 32000 2.7981688 2000 7937.0671 + 33000 3.0486439 2000 7774.0508 + 34000 3.3065315 2000 7591.1491 + 35000 3.5712927 2000 7357.5176 + 36000 3.8415508 2000 7147.2024 + 37000 4.1137466 2000 6979.1604 + 38000 4.3946186 2000 6813.2152 + 39000 4.6737386 2000 6660.2701 + 40000 4.9654287 2000 6502.8957 + 41000 5.2606376 2000 6324.3951 + 42000 5.5633065 2000 6132.7516 + 43000 5.8692745 2000 5913.1841 + 44000 6.1757115 2000 5732.2095 + 45000 6.4896845 2000 5508.8322 + 46000 6.8170163 2000 5306.8932 + 47000 7.1514543 2000 5152.0521 + 48000 7.4863157 2000 5028.2274 + 49000 7.8214974 2000 4896.102 + 50000 8.1600826 2000 4723.5189 + 51000 8.4984004 2000 4583.7526 + 52000 8.8500924 2000 4447.0187 + 53000 9.2046999 2000 4303.2307 + 54000 9.5724785 2000 4168.5251 + 55000 9.9479954 2000 4036.9704 + 56000 10.324666 2000 3901.1183 + 57000 10.708944 2000 3716.7071 + 58000 11.108887 2000 3473.5422 + 59000 11.515057 2000 3245.1223 + 60000 11.922119 2000 3039.7845 + 61000 12.331146 2000 2780.0187 + 62000 12.745147 2000 2577.3345 + 63000 13.169644 2000 2346.2488 + 64000 13.602869 2000 2116.7298 + 65000 14.044828 2000 1903.7828 + 66000 14.49159 2000 1631.1676 + 67000 14.953127 2000 1431.0198 + 68000 15.428874 2000 1212.875 + 69000 15.981012 2000 995.45046 + 70000 16.458356 2000 811.54766 + 71000 16.936094 2000 624.08622 + 72000 17.432306 2000 471.00862 + 73000 17.949423 2000 358.33486 + 74000 18.467878 2000 284.39416 + 75000 18.970599 2000 234.26671 + 76000 19.45957 2000 185.61836 + 77000 19.959792 2000 152.95918 + 78000 20.455734 2000 122.49023 + 79000 20.93849 2000 102.29396 + 80000 21.430632 2000 86.284684 + 81000 21.925932 2000 73.984781 + 82000 22.428573 2000 63.042918 + 83000 22.945552 2000 53.338428 + 84000 23.467102 2000 45.89585 + 85000 23.992243 2000 40.412826 + 86000 24.512956 2000 34.183381 + 87000 25.037944 2000 29.671524 + 88000 25.56622 2000 26.90414 + 89000 26.102251 2000 24.362631 + 90000 26.638165 2000 21.887341 + 91000 27.17863 2000 19.985662 + 92000 27.72662 2000 18.728162 + 93000 28.276842 2000 16.99941 + 94000 28.830281 2000 15.71941 + 95000 29.389744 2000 14.744057 + 96000 29.972451 2000 14.214918 + 97000 30.575245 2000 13.450182 + 98000 31.141552 2000 12.79222 + 99000 31.711177 2000 12.10595 + 100000 32.286609 2000 11.281863 + 101000 32.879692 2000 10.025419 + 102000 33.460265 2000 9.9574468 + 103000 34.040002 2000 9.4078117 + 104000 34.619096 2000 8.9079161 + 105000 35.199384 2000 8.6269302 + 106000 35.784782 2000 8.5512649 + 107000 36.37489 2000 8.4703948 + 108000 36.963891 2000 8.2747542 + 109000 37.551549 2000 8.2895118 + 110000 38.154561 2000 8.1785613 + 111000 38.749306 2000 7.8443234 + 112000 39.344241 2000 7.7436124 + 113000 39.938878 2000 7.8118604 + 114000 40.531935 2000 7.3806177 + 115000 41.130022 2000 7.0857235 + 116000 41.726772 2000 7.1346752 + 117000 42.322611 2000 7.0653751 + 118000 42.927287 2000 6.6314104 + 119000 43.524125 2000 6.2169614 + 120000 44.127912 2000 5.8988829 + 121000 44.724988 2000 5.4197277 + 122000 45.328051 2000 4.6381303 + 123000 45.93285 2000 4.4949206 + 124000 46.54149 2000 4.4261118 + 125000 47.301723 2000 4.4223703 + 126000 48.071689 2000 4.4858898 + 127000 48.834286 2000 4.3312536 + 128000 49.448737 2000 3.7124973 + 129000 50.169622 2000 3.5467396 + 130000 50.867494 2000 3.5104139 + 131000 51.585563 2000 3.5725612 + 132000 52.240372 2000 3.669455 + 133000 52.892134 2000 3.6168912 + 134000 53.50594 2000 3.3598517 + 135000 54.114565 2000 3.3743407 + 136000 54.725082 2000 3.1109764 + 137000 55.358218 2000 3.0720146 + 138000 55.977314 2000 3.1303776 + 139000 56.589791 2000 3.2052806 + 140000 57.212518 2000 2.8958882 + 141000 57.867102 2000 2.9931572 + 142000 58.690342 2000 3.0967832 + 143000 59.418639 2000 3.0576365 + 144000 60.035852 2000 3.2016943 + 145000 60.666569 2000 3.3817709 + 146000 61.368878 2000 3.4527239 + 147000 62.159309 2000 3.5928733 + 148000 62.879677 2000 3.7784682 + 149000 63.50784 2000 3.6587944 + 150000 64.129366 2000 3.7945669 + 151000 64.74324 2000 3.5551557 + 152000 65.360802 2000 3.6248848 + 153000 65.979475 2000 3.7361463 + 154000 66.593554 2000 3.8534319 + 155000 67.30899 2000 4.0101408 + 156000 68.295637 2000 3.7670652 + 157000 69.257704 2000 3.1487676 + 158000 70.085566 2000 2.980076 + 159000 70.914218 2000 3.0350592 + 160000 71.734553 2000 3.125389 + 161000 72.423913 2000 2.7516115 + 162000 73.264994 2000 2.413911 + 163000 74.126424 2000 2.297713 + 164000 75.050891 2000 2.3190806 + 165000 75.917063 2000 2.2868879 + 166000 76.783267 2000 2.1658547 + 167000 77.516683 2000 1.7511071 + 168000 78.319102 2000 1.4112478 + 169000 78.961239 2000 1.3623558 + 170000 79.578448 2000 1.3701579 +Loop time of 79.5785 on 1 procs for 150000 steps with 2000 atoms + +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 40.78 | 40.78 | 40.78 | 0.0 | 51.25 +Neigh | 0.6504 | 0.6504 | 0.6504 | 0.0 | 0.82 +Comm | 0.090848 | 0.090848 | 0.090848 | 0.0 | 0.11 +Output | 0.0059597 | 0.0059597 | 0.0059597 | 0.0 | 0.01 +Modify | 36.939 | 36.939 | 36.939 | 0.0 | 46.42 +Other | | 1.112 | | | 1.40 + +Nlocal: 2000 ave 2000 max 2000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 15308 ave 15308 max 15308 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 15308 +Ave neighs/atom = 7.654 +Neighbor list builds = 367 +Dangerous builds = 0 + +# remove "plug" - need to redefine cylinder region & union + +region cylreg delete +region hopreg delete +region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 #Bottom & top are open +region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 0 10 side in units box open 1 open 2 + +region hopreg union 2 cylreg conereg + +unfix hopper3 +fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg + +run 100000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 12.69 | 12.69 | 12.69 Mbytes + Step CPU Atoms KinEng + 170000 0 2000 1.3701579 + 171000 0.71457906 2000 2.3724823 + 172000 1.4067557 2000 3.5881441 + 173000 2.0500352 2000 5.3771633 + 174000 2.8020081 2000 7.5896471 + 175000 3.467807 2000 10.77251 + 176000 4.064748 2000 14.806868 + 177000 4.6769962 2000 19.607624 + 178000 5.26259 2000 25.426227 + 179000 5.8424937 2000 32.23584 + 180000 6.4222206 2000 39.930468 + 181000 6.9910375 2000 47.686304 + 182000 7.5601562 2000 56.506806 + 183000 8.1243537 2000 66.514326 + 184000 8.6871123 2000 77.554644 + 185000 9.3749051 2000 89.224002 + 186000 10.008412 2000 102.07846 + 187000 10.668269 2000 116.08141 + 188000 11.26663 2000 130.97964 + 189000 11.874542 2000 146.77806 + 190000 12.436262 2000 162.79858 + 191000 12.973297 2000 179.02052 + 192000 13.532286 2000 196.26683 + 193000 14.056018 2000 214.38928 + 194000 14.593726 2000 232.32068 + 195000 15.115478 2000 251.74644 + 196000 15.637308 2000 272.25231 + 197000 16.159144 2000 294.64075 + 198000 16.676958 2000 318.32895 + 199000 17.186114 2000 342.44005 + 200000 17.706244 2000 368.35469 + 201000 18.221731 2000 395.2465 + 202000 18.739505 2000 422.63599 + 203000 19.259645 2000 450.45248 + 204000 19.769875 2000 479.60812 + 205000 20.293972 2000 510.44155 + 206000 20.806658 2000 543.25751 + 207000 21.348998 2000 577.35928 + 208000 21.888691 2000 612.29718 + 209000 22.421596 2000 647.8951 + 210000 22.922782 2000 683.79409 + 211000 23.473165 2000 720.36556 + 212000 24.008952 2000 759.27331 + 213000 24.56155 2000 798.27302 + 214000 25.062386 2000 837.93849 + 215000 25.563743 2000 877.92945 + 216000 26.066188 2000 919.62532 + 217000 26.584605 2000 962.83509 + 218000 27.15076 2000 1008.5243 + 219000 27.651387 2000 1054.5769 + 220000 28.146147 2000 1103.1843 + 221000 28.644239 2000 1153.0349 + 222000 29.141899 2000 1204.5599 + 223000 29.636644 2000 1257.1367 + 224000 30.13786 2000 1308.6735 +WARNING: Lost atoms: original 2000 current 1999 (src/thermo.cpp:487) + 225000 30.638093 1999 1360.1205 + 226000 31.127956 1998 1404.8405 + 227000 31.620394 1996 1448.4869 + 228000 32.108597 1992 1491.8112 + 229000 32.592048 1985 1518.7013 + 230000 33.067462 1971 1507.6699 + 231000 33.552874 1965 1533.5096 + 232000 34.037763 1948 1489.4128 + 233000 34.531058 1933 1477.4536 + 234000 35.01451 1915 1425.8398 + 235000 35.495081 1904 1410.1451 + 236000 35.963357 1892 1401.7595 + 237000 36.428382 1880 1368.893 + 238000 36.890459 1868 1341.8885 + 239000 37.358838 1850 1286.7968 + 240000 37.828549 1833 1219.5123 + 241000 38.29428 1820 1173.3608 + 242000 38.750021 1806 1106.0727 + 243000 39.206425 1788 1035.912 + 244000 39.690492 1779 1021.6147 + 245000 40.138287 1767 969.40032 + 246000 40.582591 1757 939.12022 + 247000 41.02378 1739 840.9396 + 248000 41.472154 1730 822.06575 + 249000 41.916625 1719 762.11057 + 250000 42.365019 1707 708.50308 + 251000 42.804617 1700 692.12647 + 252000 43.257666 1697 694.5812 + 253000 43.777656 1686 652.36951 + 254000 44.244131 1682 662.95256 + 255000 44.667759 1677 637.34619 + 256000 45.111967 1672 630.71277 + 257000 45.550194 1669 641.87365 + 258000 45.985106 1665 635.862 + 259000 46.42582 1664 658.5339 + 260000 46.860965 1662 669.95468 + 261000 47.298309 1660 676.93495 + 262000 47.748236 1657 681.72646 + 263000 48.215018 1655 687.4078 + 264000 48.657973 1651 681.61352 + 265000 49.076584 1647 673.20622 + 266000 49.497823 1644 677.30073 + 267000 49.917789 1641 671.05897 + 268000 50.347112 1639 689.55776 + 269000 50.778062 1637 711.98809 + 270000 51.226034 1633 705.29974 +Loop time of 51.2261 on 1 procs for 100000 steps with 1633 atoms + +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 27.462 | 27.462 | 27.462 | 0.0 | 53.61 +Neigh | 0.47887 | 0.47887 | 0.47887 | 0.0 | 0.93 +Comm | 0.058496 | 0.058496 | 0.058496 | 0.0 | 0.11 +Output | 0.0039167 | 0.0039167 | 0.0039167 | 0.0 | 0.01 +Modify | 22.566 | 22.566 | 22.566 | 0.0 | 44.05 +Other | | 0.6567 | | | 1.28 + +Nlocal: 1633 ave 1633 max 1633 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 11358 ave 11358 max 11358 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 11358 +Ave neighs/atom = 6.955297 +Neighbor list builds = 244 +Dangerous builds = 0 +Total wall time: 0:02:15 diff --git a/examples/granregion/log.16Mar23.granregion.funnel.g++.4 b/examples/granregion/log.16Mar23.granregion.funnel.g++.4 new file mode 100644 index 0000000000..451e508fe3 --- /dev/null +++ b/examples/granregion/log.16Mar23.granregion.funnel.g++.4 @@ -0,0 +1,635 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# pour particles into cone-shaped funnel, settle them, let them run out bottom + +variable name string funnel_pour + +thermo_modify flush yes +units si +variable PI equal 3.141592653589 +variable seed equal 14314 + +############################################### +# Geometry-related parameters +############################################### + +variable xlo equal 10 +variable xhi equal 40 +variable ylo equal 10 +variable yhi equal 40 +variable zlo equal -20 +variable zhi equal 50 + +variable xc equal 25 +variable yc equal 25 + +variable zconehi equal 50 +variable zconelo equal 10 +variable zcyllo equal 0 +variable radconelo equal 2 +variable radconehi equal 20 + +################################################ +# Particle sizes +################################################ + +variable rlo equal 0.25 +variable rhi equal 0.5 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.25 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.5 + +variable skin equal ${rhi} +variable skin equal 0.5 + +############################################### +# Granular contact parameters +############################################### + +variable coeffRes equal 0.1 +variable coeffFric equal 0.5 + +variable density equal 1.0 +variable EYoung equal 10^5 +variable Poisson equal 2.0/7.0 +variable GShear equal ${EYoung}/(2*(1+${Poisson})) +variable GShear equal 100000/(2*(1+${Poisson})) +variable GShear equal 100000/(2*(1+0.285714285714286)) + +variable gravity equal 1.0 + +variable reff equal 0.5*(${rhi}+${rlo}) +variable reff equal 0.5*(0.5+${rlo}) +variable reff equal 0.5*(0.5+0.25) +variable meff equal ${density}*4.0/3.0*${PI}*${reff}^3 +variable meff equal 1*4.0/3.0*${PI}*${reff}^3 +variable meff equal 1*4.0/3.0*3.141592653589*${reff}^3 +variable meff equal 1*4.0/3.0*3.141592653589*0.375^3 +variable min_mass equal ${density}*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*${PI}*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*${rlo} +variable min_mass equal 1*4.0/3.0*3.141592653589*0.25*0.25*0.25 +variable max_mass equal ${density}*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*${PI}*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*${rhi}*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*${rhi}*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*${rhi} +variable max_mass equal 1*4.0/3.0*3.141592653589*0.5*0.5*0.5 + +## Typical way to set kn, kt, etc.: +variable kn equal 4.0*${GShear}/(3*(1-${Poisson})) +variable kn equal 4.0*38888.8888888889/(3*(1-${Poisson})) +variable kn equal 4.0*38888.8888888889/(3*(1-0.285714285714286)) +variable kt equal 4.0*${GShear}/(2-${Poisson}) +variable kt equal 4.0*38888.8888888889/(2-${Poisson}) +variable kt equal 4.0*38888.8888888889/(2-0.285714285714286) + +variable a equal (-2.0*log(${coeffRes})/${PI})^2 +variable a equal (-2.0*log(0.1)/${PI})^2 +variable a equal (-2.0*log(0.1)/3.141592653589)^2 +variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569556*2*72592.5925925926/0.0654498469497708/(1+0.25*0.405284734569556)) +variable gamma_t equal ${gamma_n}*0.5 +variable gamma_t equal 903.503751814138*0.5 + +variable tcol equal ${PI}/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/${min_mass}-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-${gamma_n}/4.0) +variable tcol equal 3.141592653589/sqrt(2*72592.5925925926/0.0654498469497708-903.503751814138/4.0) + +variable dt equal ${tcol}*0.05 +variable dt equal 0.00210943016014969*0.05 +timestep ${dt} +timestep 0.000105471508007485 + +############################################### +variable dumpfreq equal 1000 +variable logfreq equal 1000 + +newton off +atom_style sphere + +boundary p p f + +region boxreg block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 ${ylo} ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 10 ${yhi} ${zlo} ${zhi} +region boxreg block 10 40 10 40 ${zlo} ${zhi} +region boxreg block 10 40 10 40 -20 ${zhi} +region boxreg block 10 40 10 40 -20 50 +create_box 1 boxreg +Created orthogonal box = (10 10 -20) to (40 40 50) + 1 by 1 by 4 MPI processor grid + +pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 +pair_style gran/hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 +pair_coeff * * + +neighbor ${skin} multi +neighbor 0.5 multi +thermo ${logfreq} +thermo 1000 + +comm_style brick +comm_modify mode multi group all vel yes +balance 1.1 shift xyz 20 1.1 +Balancing ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0 + ghost atom cutoff = 0 + binsize = 30, bins = 1 1 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton off, size, history + pair build: half/size/multi/newtoff + stencil: full/multi/3d + bin: multi +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:210) +fix bal all balance 10000 1.1 shift xyz 20 1.01 + +####################### Options specific to pouring ######################### + +# insertion region for fix/pour + +region insreg cylinder z ${xc} ${yc} 10 30 50 side in units box +region insreg cylinder z 25 ${yc} 10 30 50 side in units box +region insreg cylinder z 25 25 10 30 50 side in units box + +# define cone and cylinder regions - see lammps doc on region command +# note new open options + +region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 #Top is open +region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 2 +region cylreg cylinder z 25 25 2 0 10 side in units box open 2 + +region conereg cone z ${xc} ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 #Bottom and top are open +region conereg cone z 25 ${yc} ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 ${radconelo} ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 ${radconehi} ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 ${zconelo} ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 10 ${zconehi} side in units box open 1 open 2 +region conereg cone z 25 25 2 20 10 50 side in units box open 1 open 2 + +region hopreg union 2 conereg cylreg + +fix grav all gravity ${gravity} vector 0 0 -1 +fix grav all gravity 1 vector 0 0 -1 +fix 1 all nve/sphere + + +fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg + +fix ins all pour 2000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 ${dhi} dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens ${density} ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 ${density} +fix ins all pour 2000 1 42424 region insreg diam range 0.5 1 dens 1 1 +Particle insertion: 3000 every 59965 steps, 2000 by step 1 + +#dump 1 all custom ${dumpfreq} ${name}.dump # id type mass diameter x y z + +#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 3.0 # box no 0.0 axes no 0.0 0.0 +#dump_modify 2 pad 6 + +thermo_style custom step cpu atoms ke +WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:895) +thermo_modify flush yes lost warn + +# Initial run to fill up the cone + +run 20000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 6.049 | 6.049 | 6.049 Mbytes + Step CPU Atoms KinEng + 0 0 0 -0 + 1000 0.55467905 2000 -0 + 2000 0.77825615 2000 -0 + 3000 0.99338813 2000 -0 + 4000 1.2048904 2000 -0 + 5000 1.4073987 2000 -0 + 6000 1.6070452 2000 -0 + 7000 1.8056594 2000 -0 + 8000 1.9907326 2000 -0 + 9000 2.1732359 2000 -0 + 10000 2.3525506 2000 -0 + 11000 2.4202338 2000 -0 + 12000 2.4883928 2000 -0 + 13000 2.5587335 2000 -0 + 14000 2.6327822 2000 -0 + 15000 2.7095893 2000 -0 + 16000 2.7909032 2000 -0 + 17000 2.8763781 2000 -0 + 18000 2.9671807 2000 -0 + 19000 3.05783 2000 -0 + 20000 3.1546642 2000 -0 +Loop time of 3.1547 on 4 procs for 20000 steps with 2000 atoms + +98.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.045592 | 0.12271 | 0.29398 | 28.5 | 3.89 +Neigh | 0.011353 | 0.019401 | 0.032667 | 5.7 | 0.61 +Comm | 0.043342 | 0.09899 | 0.1539 | 14.6 | 3.14 +Output | 0.00097884 | 0.0019761 | 0.0024333 | 1.3 | 0.06 +Modify | 0.8096 | 1.2822 | 2.26 | 50.7 | 40.65 +Other | | 1.629 | | | 51.65 + +Nlocal: 500 ave 510 max 493 min +Histogram: 1 1 0 0 0 1 0 0 0 1 +Nghost: 154 ave 227 max 79 min +Histogram: 1 0 0 0 1 0 1 0 0 1 +Neighs: 415.5 ave 610 max 258 min +Histogram: 1 1 0 0 0 0 1 0 0 1 + +Total # of neighbors = 1662 +Ave neighs/atom = 0.831 +Neighbor list builds = 71 +Dangerous builds = 0 +unfix ins +run 150000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 12.33 | 12.5 | 12.68 Mbytes + Step CPU Atoms KinEng + 20000 0 2000 6652.2957 + 21000 0.068149031 2000 6807.2201 + 22000 0.13906682 2000 6973.9359 + 23000 0.21167896 2000 7142.3648 + 24000 0.28828482 2000 7276.9717 + 25000 0.36895294 2000 7369.4191 + 26000 0.45705665 2000 7497.6526 + 27000 0.55283141 2000 7638.946 + 28000 0.65163553 2000 7780.0339 + 29000 0.75208427 2000 7881.8177 + 30000 0.85956458 2000 7967.2641 + 31000 0.94177635 2000 7994.9273 + 32000 1.0345834 2000 7937.0672 + 33000 1.1315152 2000 7774.0508 + 34000 1.2426423 2000 7591.1511 + 35000 1.3578344 2000 7357.5032 + 36000 1.4893311 2000 7147.3776 + 37000 1.6240315 2000 6980.0719 + 38000 1.7664339 2000 6813.0872 + 39000 1.91857 2000 6657.0694 + 40000 2.0835393 2000 6505.1356 + 41000 2.2038908 2000 6330.3106 + 42000 2.330345 2000 6148.0635 + 43000 2.4596185 2000 5933.4808 + 44000 2.5912876 2000 5759.5507 + 45000 2.7316375 2000 5510.4729 + 46000 2.8777238 2000 5332.8673 + 47000 3.0357893 2000 5164.4197 + 48000 3.1931582 2000 5027.4099 + 49000 3.341993 2000 4904.6999 + 50000 3.4914327 2000 4712.0967 + 51000 3.6880787 2000 4575.8693 + 52000 3.8868278 2000 4443.4894 + 53000 4.0538325 2000 4272.1666 + 54000 4.2275386 2000 4113.2811 + 55000 4.3935565 2000 3974.5981 + 56000 4.6008319 2000 3863.5272 + 57000 4.8305792 2000 3676.8918 + 58000 5.1085757 2000 3446.5177 + 59000 5.3025239 2000 3227.8857 + 60000 5.5061134 2000 2997.8151 + 61000 5.6771065 2000 2745.5998 + 62000 5.8533046 2000 2530.2536 + 63000 6.0266287 2000 2352.9283 + 64000 6.1975348 2000 2102.4916 + 65000 6.375875 2000 1906.3034 + 66000 6.6008814 2000 1683.179 + 67000 6.8728018 2000 1440.0663 + 68000 7.1104699 2000 1220.2743 + 69000 7.3660591 2000 1012.4596 + 70000 7.6208232 2000 796.99913 + 71000 7.8459169 2000 631.28788 + 72000 8.0433916 2000 459.93641 + 73000 8.2225178 2000 359.28959 + 74000 8.3982201 2000 286.19292 + 75000 8.5769976 2000 235.53259 + 76000 8.7541865 2000 187.55737 + 77000 9.0010462 2000 144.42323 + 78000 9.2721615 2000 116.12613 + 79000 9.4992863 2000 95.625301 + 80000 9.7368141 2000 82.645629 + 81000 9.9462546 2000 72.124657 + 82000 10.15281 2000 64.266704 + 83000 10.365519 2000 56.7285 + 84000 10.55069 2000 49.44393 + 85000 10.764107 2000 42.434733 + 86000 10.993211 2000 37.816266 + 87000 11.243268 2000 33.892006 + 88000 11.487204 2000 29.898596 + 89000 11.684173 2000 26.4401 + 90000 11.880908 2000 23.329056 + 91000 12.078366 2000 21.291141 + 92000 12.347446 2000 19.494401 + 93000 12.582632 2000 18.157646 + 94000 12.833491 2000 17.176709 + 95000 13.109452 2000 16.059418 + 96000 13.34541 2000 15.524934 + 97000 13.604566 2000 13.887097 + 98000 13.816696 2000 12.98846 + 99000 14.043128 2000 12.325347 + 100000 14.35998 2000 11.567779 + 101000 14.584033 2000 11.097346 + 102000 14.793606 2000 10.981696 + 103000 15.011832 2000 10.914661 + 104000 15.223053 2000 10.183009 + 105000 15.435892 2000 9.9825606 + 106000 15.651946 2000 9.5164341 + 107000 15.870696 2000 9.4270389 + 108000 16.237826 2000 9.2752131 + 109000 16.525601 2000 8.580319 + 110000 16.74452 2000 8.3138082 + 111000 16.991527 2000 7.826454 + 112000 17.322972 2000 7.5958866 + 113000 17.649386 2000 7.2760339 + 114000 17.967676 2000 7.2879075 + 115000 18.27941 2000 6.8298855 + 116000 18.619507 2000 6.6964815 + 117000 18.979092 2000 6.490952 + 118000 19.303215 2000 6.0204595 + 119000 19.683409 2000 5.9293145 + 120000 20.034873 2000 5.7244854 + 121000 20.329374 2000 5.4221021 + 122000 20.670529 2000 4.8227757 + 123000 20.970073 2000 4.7914829 + 124000 21.297132 2000 4.6895984 + 125000 21.524346 2000 4.4951309 + 126000 21.742931 2000 4.5186107 + 127000 21.983039 2000 4.5989696 + 128000 22.203881 2000 4.5578225 + 129000 22.428553 2000 4.2667783 + 130000 22.662049 2000 4.0855202 + 131000 22.893977 2000 4.129346 + 132000 23.134398 2000 4.1720282 + 133000 23.367561 2000 4.3178701 + 134000 23.614361 2000 4.1047803 + 135000 23.840139 2000 3.856834 + 136000 24.095293 2000 4.0099605 + 137000 24.320746 2000 4.1104868 + 138000 24.555868 2000 4.1538456 + 139000 24.798604 2000 4.3079797 + 140000 25.125474 2000 4.0655486 + 141000 25.360498 2000 4.1257388 + 142000 25.597535 2000 4.1180413 + 143000 25.824173 2000 4.2764691 + 144000 26.082826 2000 4.3992832 + 145000 26.307002 2000 4.0978942 + 146000 26.532413 2000 4.1776805 + 147000 26.759469 2000 4.2261665 + 148000 26.989405 2000 4.4049886 + 149000 27.215826 2000 4.5559941 + 150000 27.443235 2000 4.7449947 + 151000 27.670397 2000 4.962558 + 152000 27.901368 2000 4.8517188 + 153000 28.148201 2000 4.9263912 + 154000 28.379071 2000 4.6200149 + 155000 28.621063 2000 4.8289752 + 156000 28.870192 2000 5.043235 + 157000 29.105614 2000 5.2399981 + 158000 29.330537 2000 5.494424 + 159000 29.558095 2000 4.9215021 + 160000 29.785841 2000 4.8938104 + 161000 30.011182 2000 5.0832139 + 162000 30.23825 2000 5.2281894 + 163000 30.464829 2000 5.4710487 + 164000 30.719854 2000 5.7311326 + 165000 31.038065 2000 5.9048483 + 166000 31.340672 2000 6.1177544 + 167000 31.649901 2000 4.0749212 + 168000 31.928746 2000 4.0087545 + 169000 32.153717 2000 2.8333927 + 170000 32.380796 2000 2.6131424 +Loop time of 32.3808 on 4 procs for 150000 steps with 2000 atoms + +98.9% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 6.997 | 12.251 | 14.992 | 89.3 | 37.83 +Neigh | 0.1358 | 0.20191 | 0.24331 | 9.0 | 0.62 +Comm | 1.2102 | 2.0432 | 2.4992 | 36.1 | 6.31 +Output | 0.0079578 | 0.012222 | 0.020149 | 4.4 | 0.04 +Modify | 7.1333 | 9.974 | 12.03 | 56.2 | 30.80 +Other | | 7.899 | | | 24.39 + +Nlocal: 500 ave 547 max 414 min +Histogram: 1 0 0 0 0 0 1 0 0 2 +Nghost: 447.5 ave 678 max 201 min +Histogram: 1 0 0 0 1 0 1 0 0 1 +Neighs: 4478.75 ave 5715 max 3358 min +Histogram: 1 0 0 1 0 0 1 0 0 1 + +Total # of neighbors = 17915 +Ave neighs/atom = 8.9575 +Neighbor list builds = 375 +Dangerous builds = 0 + +# remove "plug" - need to redefine cylinder region & union + +region cylreg delete +region hopreg delete +region cylreg cylinder z ${xc} ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 #Bottom & top are open +region cylreg cylinder z 25 ${yc} ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 ${radconelo} ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 ${zcyllo} ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 0 ${zconelo} side in units box open 1 open 2 +region cylreg cylinder z 25 25 2 0 10 side in units box open 1 open 2 + +region hopreg union 2 cylreg conereg + +unfix hopper3 +fix hopper3 all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 ${gamma_n} ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 ${gamma_t} ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 ${coeffFric} 1 region hopreg +fix hopper3 all wall/gran/region hertz/history 72592.5925925926 90740.7407407408 903.503751814138 451.751875907069 0.5 1 region hopreg + +run 100000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 12.34 | 12.53 | 12.68 Mbytes + Step CPU Atoms KinEng + 170000 0 2000 2.6131424 + 171000 0.22601136 2000 3.529459 + 172000 0.45221016 2000 4.7071494 + 173000 0.68427839 2000 6.3480095 + 174000 0.91114205 2000 8.8055429 + 175000 1.1431874 2000 12.020148 + 176000 1.3732197 2000 16.079961 + 177000 1.6051751 2000 20.911155 + 178000 1.8346523 2000 26.447901 + 179000 2.0762403 2000 32.277607 + 180000 2.3420473 2000 39.374754 + 181000 2.6328957 2000 46.824434 + 182000 2.8669203 2000 54.755937 + 183000 3.1047916 2000 63.957816 + 184000 3.3310346 2000 74.217343 + 185000 3.5685015 2000 85.472859 + 186000 3.7955114 2000 97.586962 + 187000 4.0326183 2000 110.39658 + 188000 4.267244 2000 123.54524 + 189000 4.4987867 2000 137.45798 + 190000 4.7358838 2000 151.81094 + 191000 4.9494874 2000 166.91945 + 192000 5.1552044 2000 182.93379 + 193000 5.3547002 2000 200.32195 + 194000 5.5590208 2000 218.31863 + 195000 5.7575332 2000 237.22122 + 196000 5.9520759 2000 255.12936 + 197000 6.1457469 2000 273.87347 + 198000 6.341216 2000 293.82126 + 199000 6.5397944 2000 315.13067 + 200000 6.7418645 2000 337.18517 + 201000 6.9368245 2000 359.48438 + 202000 7.1538903 2000 382.76229 + 203000 7.3864641 2000 408.60338 + 204000 7.6731476 2000 435.15421 + 205000 7.9053649 2000 462.53542 + 206000 8.1480905 2000 490.85791 + 207000 8.3856692 2000 519.80878 + 208000 8.6034715 2000 550.44978 + 209000 8.8046602 2000 581.78594 + 210000 9.0044136 2000 615.02491 + 211000 9.2216638 2000 649.34564 + 212000 9.4269046 2000 684.24357 + 213000 9.6587854 2000 720.72627 + 214000 9.8596293 2000 757.96901 + 215000 10.05877 2000 796.8493 + 216000 10.256066 2000 836.58839 + 217000 10.48718 2000 877.81823 + 218000 10.694787 2000 920.81077 + 219000 10.891455 2000 963.77552 + 220000 11.147269 2000 1007.6868 + 221000 11.400829 2000 1054.0654 + 222000 11.65238 2000 1102.4934 + 223000 11.846807 2000 1151.1348 + 224000 12.040148 2000 1200.6622 + 225000 12.229259 2000 1251.5126 +WARNING: Lost atoms: original 2000 current 1999 (src/thermo.cpp:487) + 226000 12.420863 1999 1299.6349 + 227000 12.635492 1997 1338.1126 + 228000 12.827738 1987 1354.6661 + 229000 13.016127 1980 1369.1412 + 230000 13.211511 1970 1369.1776 + 231000 13.404909 1963 1377.7863 + 232000 13.602332 1950 1362.1028 + 233000 13.796103 1938 1344.4535 + 234000 13.988442 1924 1318.1397 + 235000 14.185813 1907 1269.3181 + 236000 14.378388 1895 1242.269 + 237000 14.568867 1881 1188.0729 + 238000 14.75676 1868 1162.8778 + 239000 14.947894 1854 1111.9974 + 240000 15.160004 1840 1050.2813 + 241000 15.340495 1831 1024.5782 + 242000 15.523597 1816 980.07203 + 243000 15.725193 1807 973.84606 + 244000 15.902549 1796 936.95947 + 245000 16.081382 1790 916.53685 + 246000 16.261081 1780 893.82891 + 247000 16.451727 1770 853.09944 + 248000 16.628641 1755 804.73429 + 249000 16.804105 1749 773.19378 + 250000 16.978354 1738 734.78084 + 251000 17.152527 1725 668.92528 + 252000 17.328291 1717 651.36038 + 253000 17.512786 1706 595.48412 + 254000 17.695931 1699 564.79829 + 255000 17.874221 1695 558.19897 + 256000 18.050516 1693 568.02459 + 257000 18.228697 1692 584.97166 + 258000 18.400925 1689 574.19701 + 259000 18.576449 1687 583.36332 + 260000 18.754006 1684 577.56927 + 261000 18.946091 1681 582.0375 + 262000 19.182957 1679 583.29644 + 263000 19.394795 1676 575.09831 + 264000 19.604668 1673 575.78272 + 265000 19.81517 1672 595.66572 + 266000 20.046658 1670 610.84262 + 267000 20.332684 1665 588.36505 + 268000 20.573691 1662 593.44831 + 269000 20.800574 1660 600.31964 + 270000 21.058624 1656 588.46212 +Loop time of 21.0587 on 4 procs for 100000 steps with 1656 atoms + +99.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 3.8632 | 8.4037 | 11.541 | 97.3 | 39.91 +Neigh | 0.13431 | 0.15665 | 0.17248 | 3.8 | 0.74 +Comm | 0.70516 | 1.4552 | 1.9637 | 40.7 | 6.91 +Output | 0.0030904 | 0.0079543 | 0.016722 | 5.9 | 0.04 +Modify | 5.3661 | 6.1781 | 6.8249 | 22.0 | 29.34 +Other | | 4.857 | | | 23.06 + +Nlocal: 414 ave 426 max 385 min +Histogram: 1 0 0 0 0 0 0 0 0 3 +Nghost: 408 ave 634 max 183 min +Histogram: 1 0 0 1 0 0 1 0 0 1 +Neighs: 3463 ave 4360 max 2354 min +Histogram: 1 0 0 1 0 0 0 0 1 1 + +Total # of neighbors = 13852 +Ave neighs/atom = 8.3647343 +Neighbor list builds = 255 +Dangerous builds = 0 +Total wall time: 0:00:56 diff --git a/examples/granregion/log.16Mar23.granregion.mixer.g++.1 b/examples/granregion/log.16Mar23.granregion.mixer.g++.1 new file mode 100644 index 0000000000..3fc012d20c --- /dev/null +++ b/examples/granregion/log.16Mar23.granregion.mixer.g++.1 @@ -0,0 +1,634 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable name string mixer + +thermo_modify flush yes +variable seed equal 14314 + +############################################### +# Particle parameters +################################################ + +variable rlo equal 0.3 +variable rhi equal 0.6 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.3 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.6 +variable skin equal ${rhi} +variable skin equal 0.6 + +variable coeffRes equal 0.1 +variable coeffFric equal 0.5 + +variable kn equal 10^5 +variable kt equal 0.2*${kn} +variable kt equal 0.2*100000 + +variable gravity equal 1.0 +variable density equal 1.0 + +variable min_mass equal ${density}*4.0/3.0*PI*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*0.3 +variable a equal (-2.0*log(${coeffRes})/PI)^2 +variable a equal (-2.0*log(0.1)/PI)^2 +variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*0.405284734569351)) +variable gamma_t equal ${gamma_n}*0.5 +variable gamma_t equal 806.699778405191*0.5 + +variable tcol equal PI/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/${min_mass}-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/0.113097335529233-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/0.113097335529233-806.699778405191/4.0) + +variable dt equal ${tcol}*0.02 +variable dt equal 0.00236257621510454*0.02 +timestep ${dt} +timestep 4.72515243020908e-05 + +############################################### + +variable dumpfreq equal 1000 +variable logfreq equal 1000 + +newton on +atom_style sphere + +boundary p p f + +region boxreg block 0 20 0 20 0 20 +create_box 1 boxreg +Created orthogonal box = (0 0 0) to (20 20 20) + 1 by 1 by 1 MPI processor grid + +pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 +pair_coeff * * + +neighbor ${skin} multi +neighbor 0.6 multi +thermo ${logfreq} +thermo 1000 + +comm_style brick +comm_modify mode multi group all vel yes +balance 1.1 shift xyz 20 1.1 +Balancing ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0 + ghost atom cutoff = 0 + binsize = 20, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton on, size, history + pair build: half/size/multi/newton + stencil: half/multi/3d + bin: multi +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:210) +fix bal all balance 10000 1.1 shift xyz 20 1.01 + +####################### Options specific to pouring ######################### + +region insreg cylinder z 10 10 8 10 18 side in units box +region cylreg cylinder z 10 10 10 0 20 side in units box + +variable theta equal (step/400000)*2*PI + +region b1 block 2 18 9 11 0 4 side out rotate v_theta 10 10 0 0 0 1 units box +region b2 block 9 11 2 18 0 3.99999 side out rotate v_theta 10 10 0 0 0 1 units box + +region mixer intersect 3 cylreg b1 b2 side in + +fix grav all gravity ${gravity} vector 0 0 -1 +fix grav all gravity 1 vector 0 0 -1 +fix 1 all nve/sphere + +fix mixwall all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 region mixer + +fix ins all pour 1000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 ${dhi} dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 1 +Particle insertion: 444 every 84653 steps, 1000 by step 169307 + +#dump 1 all custom ${dumpfreq} ${name}_pour.dump # id type mass diameter x y z + +#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 1.5 # box no 0.0 axes no 0.0 0.0 +#dump_modify 2 pad 6 + +thermo_style custom step cpu atoms ke v_theta +WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:895) +thermo_modify flush yes lost warn + +run 200000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.861 | 5.861 | 5.861 Mbytes + Step CPU Atoms KinEng v_theta + 0 0 0 -0 0 + 1000 0.11477344 444 -0 0.015707963 + 2000 0.21604269 444 -0 0.031415927 + 3000 0.31421365 444 -0 0.04712389 + 4000 0.41095902 444 -0 0.062831853 + 5000 0.50703042 444 -0 0.078539816 + 6000 0.60585007 444 -0 0.09424778 + 7000 0.70232419 444 -0 0.10995574 + 8000 0.80002622 444 -0 0.12566371 + 9000 0.89464008 444 -0 0.14137167 + 10000 0.99260726 444 -0 0.15707963 + 11000 1.090675 444 -0 0.1727876 + 12000 1.1878107 444 -0 0.18849556 + 13000 1.2860401 444 -0 0.20420352 + 14000 1.3830433 444 -0 0.21991149 + 15000 1.4834023 444 -0 0.23561945 + 16000 1.5799984 444 -0 0.25132741 + 17000 1.6758091 444 -0 0.26703538 + 18000 1.7713554 444 -0 0.28274334 + 19000 1.8684734 444 -0 0.2984513 + 20000 1.9661563 444 -0 0.31415927 + 21000 2.0629748 444 -0 0.32986723 + 22000 2.1575594 444 -0 0.34557519 + 23000 2.2530422 444 -0 0.36128316 + 24000 2.3525179 444 -0 0.37699112 + 25000 2.4494323 444 -0 0.39269908 + 26000 2.5454666 444 -0 0.40840704 + 27000 2.6402269 444 -0 0.42411501 + 28000 2.7364338 444 -0 0.43982297 + 29000 2.8349 444 -0 0.45553093 + 30000 2.9327959 444 -0 0.4712389 + 31000 3.0304534 444 -0 0.48694686 + 32000 3.1315005 444 -0 0.50265482 + 33000 3.2290307 444 -0 0.51836279 + 34000 3.3243787 444 -0 0.53407075 + 35000 3.4232964 444 -0 0.54977871 + 36000 3.5235978 444 -0 0.56548668 + 37000 3.6214101 444 -0 0.58119464 + 38000 3.7179412 444 -0 0.5969026 + 39000 3.8159856 444 -0 0.61261057 + 40000 3.9121916 444 -0 0.62831853 + 41000 4.0080794 444 -0 0.64402649 + 42000 4.1087349 444 -0 0.65973446 + 43000 4.2059697 444 -0 0.67544242 + 44000 4.3043867 444 -0 0.69115038 + 45000 4.4014253 444 -0 0.70685835 + 46000 4.5000241 444 -0 0.72256631 + 47000 4.5970258 444 -0 0.73827427 + 48000 4.6929243 444 -0 0.75398224 + 49000 4.7894702 444 -0 0.7696902 + 50000 4.8858098 444 -0 0.78539816 + 51000 4.985063 444 -0 0.80110613 + 52000 5.0863877 444 -0 0.81681409 + 53000 5.181301 444 -0 0.83252205 + 54000 5.2819523 444 -0 0.84823002 + 55000 5.3895357 444 -0 0.86393798 + 56000 5.5225568 444 -0 0.87964594 + 57000 5.6473901 444 -0 0.89535391 + 58000 5.7786123 444 -0 0.91106187 + 59000 5.8932617 444 -0 0.92676983 + 60000 6.004952 444 -0 0.9424778 + 61000 6.1168028 444 -0 0.95818576 + 62000 6.2274784 444 -0 0.97389372 + 63000 6.341172 444 -0 0.98960169 + 64000 6.4565154 444 -0 1.0053096 + 65000 6.5684785 444 -0 1.0210176 + 66000 6.6836542 444 -0 1.0367256 + 67000 6.797745 444 -0 1.0524335 + 68000 6.9091592 444 -0 1.0681415 + 69000 7.0230958 444 -0 1.0838495 + 70000 7.140508 444 -0 1.0995574 + 71000 7.2547153 444 -0 1.1152654 + 72000 7.3698096 444 -0 1.1309734 + 73000 7.4846587 444 -0 1.1466813 + 74000 7.6005538 444 -0 1.1623893 + 75000 7.715498 444 -0 1.1780972 + 76000 7.8306339 444 -0 1.1938052 + 77000 7.9458861 444 -0 1.2095132 + 78000 8.0608796 444 -0 1.2252211 + 79000 8.1819612 444 -0 1.2409291 + 80000 8.3017939 444 -0 1.2566371 + 81000 8.4206794 444 -0 1.272345 + 82000 8.5396045 444 -0 1.288053 + 83000 8.6588178 444 -0 1.303761 + 84000 8.7939815 444 -0 1.3194689 + 85000 8.9999511 888 -0 1.3351769 + 86000 9.2762515 888 -0 1.3508848 + 87000 9.5497189 888 -0 1.3665928 + 88000 9.8025426 888 -0 1.3823008 + 89000 10.063005 888 -0 1.3980087 + 90000 10.343956 888 -0 1.4137167 + 91000 10.630004 888 -0 1.4294247 + 92000 10.865437 888 -0 1.4451326 + 93000 11.090302 888 -0 1.4608406 + 94000 11.306921 888 -0 1.4765485 + 95000 11.525442 888 -0 1.4922565 + 96000 11.786482 888 -0 1.5079645 + 97000 12.033336 888 -0 1.5236724 + 98000 12.258224 888 -0 1.5393804 + 99000 12.486583 888 -0 1.5550884 + 100000 12.70566 888 -0 1.5707963 + 101000 12.934051 888 -0 1.5865043 + 102000 13.194977 888 -0 1.6022123 + 103000 13.503561 888 -0 1.6179202 + 104000 13.737785 888 -0 1.6336282 + 105000 13.96388 888 -0 1.6493361 + 106000 14.190156 888 -0 1.6650441 + 107000 14.416346 888 -0 1.6807521 + 108000 14.642321 888 -0 1.69646 + 109000 14.877668 888 -0 1.712168 + 110000 15.114644 888 -0 1.727876 + 111000 15.354762 888 -0 1.7435839 + 112000 15.615795 888 -0 1.7592919 + 113000 15.854301 888 -0 1.7749998 + 114000 16.099855 888 -0 1.7907078 + 115000 16.344044 888 -0 1.8064158 + 116000 16.60829 888 -0 1.8221237 + 117000 16.847146 888 -0 1.8378317 + 118000 17.086787 888 -0 1.8535397 + 119000 17.324264 888 -0 1.8692476 + 120000 17.563913 888 -0 1.8849556 + 121000 17.798333 888 -0 1.9006636 + 122000 18.033339 888 -0 1.9163715 + 123000 18.275883 888 -0 1.9320795 + 124000 18.542879 888 -0 1.9477874 + 125000 18.790098 888 -0 1.9634954 + 126000 19.034113 888 -0 1.9792034 + 127000 19.286183 888 -0 1.9949113 + 128000 19.574764 888 -0 2.0106193 + 129000 19.832536 888 -0 2.0263273 + 130000 20.085705 888 -0 2.0420352 + 131000 20.327805 888 -0 2.0577432 + 132000 20.576476 888 -0 2.0734512 + 133000 20.82021 888 -0 2.0891591 + 134000 21.063425 888 -0 2.1048671 + 135000 21.304848 888 -0 2.120575 + 136000 21.554936 888 -0 2.136283 + 137000 21.797949 888 -0 2.151991 + 138000 22.041181 888 -0 2.1676989 + 139000 22.288509 888 -0 2.1834069 + 140000 22.539512 888 -0 2.1991149 + 141000 22.786046 888 -0 2.2148228 + 142000 23.052553 888 -0 2.2305308 + 143000 23.321282 888 -0 2.2462387 + 144000 23.619171 888 -0 2.2619467 + 145000 23.918581 888 -0 2.2776547 + 146000 24.200849 888 -0 2.2933626 + 147000 24.500127 888 -0 2.3090706 + 148000 24.756357 888 -0 2.3247786 + 149000 25.015262 888 -0 2.3404865 + 150000 25.271136 888 -0 2.3561945 + 151000 25.519846 888 -0 2.3719025 + 152000 25.780481 888 -0 2.3876104 + 153000 26.027917 888 -0 2.4033184 + 154000 26.277021 888 -0 2.4190263 + 155000 26.54158 888 -0 2.4347343 + 156000 26.828357 888 -0 2.4504423 + 157000 27.172993 888 -0 2.4661502 + 158000 27.454171 888 -0 2.4818582 + 159000 27.72964 888 -0 2.4975662 + 160000 28.007464 888 -0 2.5132741 + 161000 28.28268 888 -0 2.5289821 + 162000 28.561094 888 -0 2.54469 + 163000 28.839295 888 -0 2.560398 + 164000 29.117588 888 -0 2.576106 + 165000 29.394126 888 -0 2.5918139 + 166000 29.675102 888 -0 2.6075219 + 167000 29.951524 888 -0 2.6232299 + 168000 30.233181 888 -0 2.6389378 + 169000 30.516798 888 -0 2.6546458 + 170000 30.818897 1000 -0 2.6703538 + 171000 31.215403 1000 -0 2.6860617 + 172000 31.528362 1000 -0 2.7017697 + 173000 31.844759 1000 -0 2.7174776 + 174000 32.159787 1000 -0 2.7331856 + 175000 32.482605 1000 -0 2.7488936 + 176000 32.798004 1000 -0 2.7646015 + 177000 33.112668 1000 -0 2.7803095 + 178000 33.429501 1000 -0 2.7960175 + 179000 33.74646 1000 -0 2.8117254 + 180000 34.059172 1000 -0 2.8274334 + 181000 34.381226 1000 -0 2.8431414 + 182000 34.697465 1000 -0 2.8588493 + 183000 35.008892 1000 -0 2.8745573 + 184000 35.332856 1000 -0 2.8902652 + 185000 35.650733 1000 -0 2.9059732 + 186000 35.971328 1000 -0 2.9216812 + 187000 36.298046 1000 -0 2.9373891 + 188000 36.622634 1000 -0 2.9530971 + 189000 36.945728 1000 -0 2.9688051 + 190000 37.268801 1000 -0 2.984513 + 191000 37.592615 1000 -0 3.000221 + 192000 37.915197 1000 -0 3.0159289 + 193000 38.226138 1000 -0 3.0316369 + 194000 38.534735 1000 -0 3.0473449 + 195000 38.844711 1000 -0 3.0630528 + 196000 39.159518 1000 -0 3.0787608 + 197000 39.474235 1000 -0 3.0944688 + 198000 39.786609 1000 -0 3.1101767 + 199000 40.10213 1000 -0 3.1258847 + 200000 40.421226 1000 -0 3.1415927 +Loop time of 40.4213 on 1 procs for 200000 steps with 1000 atoms + +Performance: 20199.903 tau/day, 4947.886 timesteps/s, 4.948 Matom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 3.6681 | 3.6681 | 3.6681 | 0.0 | 9.07 +Neigh | 0.050194 | 0.050194 | 0.050194 | 0.0 | 0.12 +Comm | 0.53308 | 0.53308 | 0.53308 | 0.0 | 1.32 +Output | 0.0071363 | 0.0071363 | 0.0071363 | 0.0 | 0.02 +Modify | 35.563 | 35.563 | 35.563 | 0.0 | 87.98 +Other | | 0.5999 | | | 1.48 + +Nlocal: 1000 ave 1000 max 1000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 197 ave 197 max 197 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 3812 ave 3812 max 3812 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 3812 +Ave neighs/atom = 3.812 +Neighbor list builds = 205 +Dangerous builds = 0 +unfix ins +run 200000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 11.89 | 11.89 | 11.89 Mbytes + Step CPU Atoms KinEng v_theta + 200000 0 1000 1.0188213 3.1415927 + 201000 0.31745969 1000 1.0237918 3.1573006 + 202000 0.6315036 1000 1.0177231 3.1730086 + 203000 0.9480314 1000 1.0127096 3.1887165 + 204000 1.2572431 1000 1.0084386 3.2044245 + 205000 1.5683429 1000 0.9957528 3.2201325 + 206000 1.8801922 1000 1.0003921 3.2358404 + 207000 2.1905883 1000 0.99358387 3.2515484 + 208000 2.4948426 1000 0.99103748 3.2672564 + 209000 2.8195665 1000 0.98488628 3.2829643 + 210000 3.1420952 1000 0.98305824 3.2986723 + 211000 3.4618849 1000 0.97185818 3.3143802 + 212000 3.7910078 1000 0.96191966 3.3300882 + 213000 4.1184009 1000 0.95953159 3.3457962 + 214000 4.4491355 1000 0.95307268 3.3615041 + 215000 4.7782398 1000 0.95612155 3.3772121 + 216000 5.1088177 1000 0.96582166 3.3929201 + 217000 5.4376503 1000 0.96124408 3.408628 + 218000 5.7707229 1000 0.95705813 3.424336 + 219000 6.1055922 1000 0.9660222 3.440044 + 220000 6.4418056 1000 0.97539486 3.4557519 + 221000 6.7755181 1000 0.97919396 3.4714599 + 222000 7.104521 1000 0.97448171 3.4871678 + 223000 7.4368025 1000 0.95742917 3.5028758 + 224000 7.7623405 1000 0.94218245 3.5185838 + 225000 8.0932682 1000 0.93056484 3.5342917 + 226000 8.4217598 1000 0.92009109 3.5499997 + 227000 8.747426 1000 0.90684871 3.5657077 + 228000 9.0818038 1000 0.91719046 3.5814156 + 229000 9.4125504 1000 0.92681746 3.5971236 + 230000 9.7439963 1000 0.9195493 3.6128316 + 231000 10.075499 1000 0.93275667 3.6285395 + 232000 10.404017 1000 0.9494565 3.6442475 + 233000 10.774786 1000 0.95036607 3.6599554 + 234000 11.158713 1000 0.9596283 3.6756634 + 235000 11.566878 1000 0.98314341 3.6913714 + 236000 11.977294 1000 0.98115865 3.7070793 + 237000 12.347191 1000 0.9723466 3.7227873 + 238000 12.686388 1000 0.95267817 3.7384953 + 239000 13.031631 1000 0.92661956 3.7542032 + 240000 13.451121 1000 0.92237207 3.7699112 + 241000 13.855031 1000 0.91301732 3.7856191 + 242000 14.272001 1000 0.90488754 3.8013271 + 243000 14.632631 1000 0.90430417 3.8170351 + 244000 14.97608 1000 0.90179051 3.832743 + 245000 15.419173 1000 0.89658897 3.848451 + 246000 15.903699 1000 0.89583335 3.864159 + 247000 16.312374 1000 0.89409138 3.8798669 + 248000 16.660472 1000 0.89948364 3.8955749 + 249000 17.063147 1000 0.90196936 3.9112829 + 250000 17.423622 1000 0.89616943 3.9269908 + 251000 17.76439 1000 0.87816303 3.9426988 + 252000 18.103828 1000 0.86705341 3.9584067 + 253000 18.454644 1000 0.84494344 3.9741147 + 254000 18.876297 1000 0.81541663 3.9898227 + 255000 19.264851 1000 0.80071805 4.0055306 + 256000 19.669757 1000 0.80290754 4.0212386 + 257000 20.066097 1000 0.80000385 4.0369466 + 258000 20.481516 1000 0.80379277 4.0526545 + 259000 20.851537 1000 0.81091684 4.0683625 + 260000 21.246226 1000 0.80124855 4.0840704 + 261000 21.586832 1000 0.79581606 4.0997784 + 262000 21.968726 1000 0.78415946 4.1154864 + 263000 22.388474 1000 0.78837276 4.1311943 + 264000 22.76238 1000 0.78962435 4.1469023 + 265000 23.13787 1000 0.79388706 4.1626103 + 266000 23.470742 1000 0.80484385 4.1783182 + 267000 23.801402 1000 0.79505699 4.1940262 + 268000 24.14266 1000 0.78663829 4.2097342 + 269000 24.545281 1000 0.77557297 4.2254421 + 270000 24.886776 1000 0.76992342 4.2411501 + 271000 25.218744 1000 0.75955867 4.256858 + 272000 25.549898 1000 0.76207709 4.272566 + 273000 25.882738 1000 0.76891185 4.288274 + 274000 26.212384 1000 0.77380617 4.3039819 + 275000 26.540612 1000 0.77349795 4.3196899 + 276000 26.869636 1000 0.77559636 4.3353979 + 277000 27.200449 1000 0.76806972 4.3511058 + 278000 27.548549 1000 0.76223861 4.3668138 + 279000 27.883681 1000 0.76306533 4.3825218 + 280000 28.221552 1000 0.76369569 4.3982297 + 281000 28.558479 1000 0.75945303 4.4139377 + 282000 28.892758 1000 0.75872312 4.4296456 + 283000 29.224927 1000 0.75354345 4.4453536 + 284000 29.565477 1000 0.74433058 4.4610616 + 285000 29.914679 1000 0.7349005 4.4767695 + 286000 30.265305 1000 0.73182808 4.4924775 + 287000 30.607982 1000 0.73334122 4.5081855 + 288000 30.94168 1000 0.73308623 4.5238934 + 289000 31.276062 1000 0.73620818 4.5396014 + 290000 31.614934 1000 0.73906492 4.5553093 + 291000 31.959782 1000 0.73921306 4.5710173 + 292000 32.296279 1000 0.73919766 4.5867253 + 293000 32.615262 1000 0.75148875 4.6024332 + 294000 32.93925 1000 0.76390126 4.6181412 + 295000 33.266316 1000 0.76421084 4.6338492 + 296000 33.591115 1000 0.78124272 4.6495571 + 297000 33.924279 1000 0.78526224 4.6652651 + 298000 34.256265 1000 0.78279226 4.6809731 + 299000 34.584382 1000 0.78390001 4.696681 + 300000 34.910629 1000 0.78017239 4.712389 + 301000 35.233205 1000 0.77432653 4.7280969 + 302000 35.55956 1000 0.7627792 4.7438049 + 303000 35.885484 1000 0.75222273 4.7595129 + 304000 36.205453 1000 0.73765921 4.7752208 + 305000 36.525101 1000 0.72338298 4.7909288 + 306000 36.845236 1000 0.71944975 4.8066368 + 307000 37.168044 1000 0.71547274 4.8223447 + 308000 37.491196 1000 0.71267737 4.8380527 + 309000 37.827079 1000 0.70506173 4.8537606 + 310000 38.168049 1000 0.70685173 4.8694686 + 311000 38.504282 1000 0.70327488 4.8851766 + 312000 38.846152 1000 0.69732519 4.9008845 + 313000 39.191958 1000 0.70137823 4.9165925 + 314000 39.532177 1000 0.70613806 4.9323005 + 315000 39.876728 1000 0.70981591 4.9480084 + 316000 40.225244 1000 0.72246602 4.9637164 + 317000 40.573681 1000 0.71946499 4.9794244 + 318000 40.918134 1000 0.73275857 4.9951323 + 319000 41.261914 1000 0.74357547 5.0108403 + 320000 41.607984 1000 0.74138038 5.0265482 + 321000 41.957822 1000 0.73285846 5.0422562 + 322000 42.30176 1000 0.72990718 5.0579642 + 323000 42.644077 1000 0.72024459 5.0736721 + 324000 42.985509 1000 0.71052943 5.0893801 + 325000 43.323921 1000 0.69560261 5.1050881 + 326000 43.664945 1000 0.69939398 5.120796 + 327000 44.004741 1000 0.71331291 5.136504 + 328000 44.347204 1000 0.72181082 5.152212 + 329000 44.689866 1000 0.72534262 5.1679199 + 330000 45.055673 1000 0.73874292 5.1836279 + 331000 45.400501 1000 0.74135464 5.1993358 + 332000 45.743289 1000 0.73578005 5.2150438 + 333000 46.087061 1000 0.72662516 5.2307518 + 334000 46.427231 1000 0.72030125 5.2464597 + 335000 46.767813 1000 0.72801784 5.2621677 + 336000 47.108619 1000 0.73020974 5.2778757 + 337000 47.44666 1000 0.7344527 5.2935836 + 338000 47.784653 1000 0.73826638 5.3092916 + 339000 48.124114 1000 0.74079395 5.3249995 + 340000 48.463953 1000 0.74030413 5.3407075 + 341000 48.804616 1000 0.74815855 5.3564155 + 342000 49.143226 1000 0.75762011 5.3721234 + 343000 49.482788 1000 0.76311094 5.3878314 + 344000 49.822597 1000 0.76394459 5.4035394 + 345000 50.162186 1000 0.75550163 5.4192473 + 346000 50.496689 1000 0.7594991 5.4349553 + 347000 50.831695 1000 0.76650932 5.4506633 + 348000 51.167201 1000 0.76750437 5.4663712 + 349000 51.501847 1000 0.77084248 5.4820792 + 350000 51.841805 1000 0.76487701 5.4977871 + 351000 52.179907 1000 0.76870148 5.5134951 + 352000 52.517605 1000 0.77597853 5.5292031 + 353000 52.850047 1000 0.77929348 5.544911 + 354000 53.182408 1000 0.7744937 5.560619 + 355000 53.512931 1000 0.76114616 5.576327 + 356000 53.845782 1000 0.75392687 5.5920349 + 357000 54.178336 1000 0.74858889 5.6077429 + 358000 54.514517 1000 0.75630978 5.6234508 + 359000 54.850783 1000 0.75781107 5.6391588 + 360000 55.183323 1000 0.75613713 5.6548668 + 361000 55.518704 1000 0.75250391 5.6705747 + 362000 55.851425 1000 0.75790051 5.6862827 + 363000 56.212376 1000 0.75283475 5.7019907 + 364000 56.542027 1000 0.7431151 5.7176986 + 365000 56.874325 1000 0.73274509 5.7334066 + 366000 57.208926 1000 0.72261631 5.7491146 + 367000 57.596495 1000 0.71279773 5.7648225 + 368000 58.007863 1000 0.70452113 5.7805305 + 369000 58.346944 1000 0.69777381 5.7962384 + 370000 58.686215 1000 0.69698007 5.8119464 + 371000 59.030366 1000 0.69322062 5.8276544 + 372000 59.368607 1000 0.67728454 5.8433623 + 373000 59.704376 1000 0.67335006 5.8590703 + 374000 60.044772 1000 0.66920493 5.8747783 + 375000 60.382875 1000 0.65614401 5.8904862 + 376000 60.72002 1000 0.65874131 5.9061942 + 377000 61.058554 1000 0.67072465 5.9219022 + 378000 61.400078 1000 0.68118419 5.9376101 + 379000 61.748931 1000 0.68481865 5.9533181 + 380000 62.098203 1000 0.68840839 5.969026 + 381000 62.444961 1000 0.69447162 5.984734 + 382000 62.797286 1000 0.69881397 6.000442 + 383000 63.154921 1000 0.69610171 6.0161499 + 384000 63.508448 1000 0.70059329 6.0318579 + 385000 63.857115 1000 0.71085103 6.0475659 + 386000 64.207915 1000 0.71532684 6.0632738 + 387000 64.561127 1000 0.72968624 6.0789818 + 388000 64.939826 1000 0.74729894 6.0946897 + 389000 65.284635 1000 0.76268063 6.1103977 + 390000 65.631752 1000 0.77170089 6.1261057 + 391000 65.981566 1000 0.77212462 6.1418136 + 392000 66.328406 1000 0.773784 6.1575216 + 393000 66.655905 1000 0.7731096 6.1732296 + 394000 66.993751 1000 0.77245259 6.1889375 + 395000 67.322842 1000 0.76912533 6.2046455 + 396000 67.647532 1000 0.76397972 6.2203535 + 397000 67.977448 1000 0.75736166 6.2360614 + 398000 68.310064 1000 0.75287599 6.2517694 + 399000 68.635966 1000 0.75354368 6.2674773 + 400000 68.963492 1000 0.75582397 6.2831853 +Loop time of 68.9635 on 1 procs for 200000 steps with 1000 atoms + +Performance: 11839.683 tau/day, 2900.084 timesteps/s, 2.900 Matom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 11.238 | 11.238 | 11.238 | 0.0 | 16.30 +Neigh | 0.077817 | 0.077817 | 0.077817 | 0.0 | 0.11 +Comm | 1.5441 | 1.5441 | 1.5441 | 0.0 | 2.24 +Output | 0.0082341 | 0.0082341 | 0.0082341 | 0.0 | 0.01 +Modify | 55.304 | 55.304 | 55.304 | 0.0 | 80.19 +Other | | 0.7909 | | | 1.15 + +Nlocal: 1000 ave 1000 max 1000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 278 ave 278 max 278 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 5072 ave 5072 max 5072 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 5072 +Ave neighs/atom = 5.072 +Neighbor list builds = 166 +Dangerous builds = 0 +Total wall time: 0:01:49 diff --git a/examples/granregion/log.16Mar23.granregion.mixer.g++.4 b/examples/granregion/log.16Mar23.granregion.mixer.g++.4 new file mode 100644 index 0000000000..b601f3f13a --- /dev/null +++ b/examples/granregion/log.16Mar23.granregion.mixer.g++.4 @@ -0,0 +1,634 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +variable name string mixer + +thermo_modify flush yes +variable seed equal 14314 + +############################################### +# Particle parameters +################################################ + +variable rlo equal 0.3 +variable rhi equal 0.6 +variable dlo equal 2.0*${rlo} +variable dlo equal 2.0*0.3 +variable dhi equal 2.0*${rhi} +variable dhi equal 2.0*0.6 +variable skin equal ${rhi} +variable skin equal 0.6 + +variable coeffRes equal 0.1 +variable coeffFric equal 0.5 + +variable kn equal 10^5 +variable kt equal 0.2*${kn} +variable kt equal 0.2*100000 + +variable gravity equal 1.0 +variable density equal 1.0 + +variable min_mass equal ${density}*4.0/3.0*PI*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*${rlo}*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*${rlo}*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*${rlo} +variable min_mass equal 1*4.0/3.0*PI*0.3*0.3*0.3 +variable a equal (-2.0*log(${coeffRes})/PI)^2 +variable a equal (-2.0*log(0.1)/PI)^2 +variable gamma_n equal sqrt($a*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*${kn}/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/${min_mass}/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*$a)) +variable gamma_n equal sqrt(0.405284734569351*2*100000/0.113097335529233/(1+0.25*0.405284734569351)) +variable gamma_t equal ${gamma_n}*0.5 +variable gamma_t equal 806.699778405191*0.5 + +variable tcol equal PI/sqrt(2*${kn}/${min_mass}-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/${min_mass}-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/0.113097335529233-${gamma_n}/4.0) +variable tcol equal PI/sqrt(2*100000/0.113097335529233-806.699778405191/4.0) + +variable dt equal ${tcol}*0.02 +variable dt equal 0.00236257621510454*0.02 +timestep ${dt} +timestep 4.72515243020908e-05 + +############################################### + +variable dumpfreq equal 1000 +variable logfreq equal 1000 + +newton on +atom_style sphere + +boundary p p f + +region boxreg block 0 20 0 20 0 20 +create_box 1 boxreg +Created orthogonal box = (0 0 0) to (20 20 20) + 1 by 2 by 2 MPI processor grid + +pair_style gran/hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 +pair_style gran/hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 +pair_coeff * * + +neighbor ${skin} multi +neighbor 0.6 multi +thermo ${logfreq} +thermo 1000 + +comm_style brick +comm_modify mode multi group all vel yes +balance 1.1 shift xyz 20 1.1 +Balancing ... +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0 + ghost atom cutoff = 0 + binsize = 20, bins = 1 1 1 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton on, size, history + pair build: half/size/multi/newton + stencil: half/multi/3d + bin: multi +WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:210) +fix bal all balance 10000 1.1 shift xyz 20 1.01 + +####################### Options specific to pouring ######################### + +region insreg cylinder z 10 10 8 10 18 side in units box +region cylreg cylinder z 10 10 10 0 20 side in units box + +variable theta equal (step/400000)*2*PI + +region b1 block 2 18 9 11 0 4 side out rotate v_theta 10 10 0 0 0 1 units box +region b2 block 9 11 2 18 0 3.99999 side out rotate v_theta 10 10 0 0 0 1 units box + +region mixer intersect 3 cylreg b1 b2 side in + +fix grav all gravity ${gravity} vector 0 0 -1 +fix grav all gravity 1 vector 0 0 -1 +fix 1 all nve/sphere + +fix mixwall all wall/gran/region hertz/history ${kn} ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 ${kt} ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 ${gamma_n} ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 ${gamma_t} ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 ${coeffFric} 1 region mixer +fix mixwall all wall/gran/region hertz/history 100000 20000 806.699778405191 403.349889202595 0.5 1 region mixer + +fix ins all pour 1000 1 42424 region insreg diam range ${dlo} ${dhi} dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 ${dhi} dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens ${density} ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 ${density} +fix ins all pour 1000 1 42424 region insreg diam range 0.6 1.2 dens 1 1 +Particle insertion: 444 every 84653 steps, 1000 by step 169307 + +#dump 1 all custom ${dumpfreq} ${name}_pour.dump # id type mass diameter x y z + +#dump 2 all image 4000 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 zoom 1.5 # box no 0.0 axes no 0.0 0.0 +#dump_modify 2 pad 6 + +thermo_style custom step cpu atoms ke v_theta +WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:895) +thermo_modify flush yes lost warn + +run 200000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2 + +@Article{Intveld08, + author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest}, + title = {Accurate and Efficient Methods for Modeling Colloidal + Mixtures in an Explicit Solvent using Molecular Dynamics}, + journal = {Comput.\ Phys.\ Commut.}, + year = 2008, + volume = 179, + pages = {320--329} +} + +@article{Shire2020, + author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin}, + title = {{DEM} Simulations of Polydisperse Media: Efficient Contact + Detection Applied to Investigate the Quasi-Static Limit}, + journal = {Computational Particle Mechanics}, + year = {2020} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 5.816 | 5.816 | 5.816 Mbytes + Step CPU Atoms KinEng v_theta + 0 0 0 -0 0 + 1000 0.069039547 444 -0 0.015707963 + 2000 0.12867095 444 -0 0.031415927 + 3000 0.18791426 444 -0 0.04712389 + 4000 0.24614388 444 -0 0.062831853 + 5000 0.30404486 444 -0 0.078539816 + 6000 0.36105446 444 -0 0.09424778 + 7000 0.41713358 444 -0 0.10995574 + 8000 0.47282802 444 -0 0.12566371 + 9000 0.52742586 444 -0 0.14137167 + 10000 0.58233488 444 -0 0.15707963 + 11000 0.62155506 444 -0 0.1727876 + 12000 0.6605457 444 -0 0.18849556 + 13000 0.69971591 444 -0 0.20420352 + 14000 0.73821845 444 -0 0.21991149 + 15000 0.77860211 444 -0 0.23561945 + 16000 0.8188072 444 -0 0.25132741 + 17000 0.85992964 444 -0 0.26703538 + 18000 0.9008443 444 -0 0.28274334 + 19000 0.94216466 444 -0 0.2984513 + 20000 0.98508697 444 -0 0.31415927 + 21000 1.0241468 444 -0 0.32986723 + 22000 1.0606191 444 -0 0.34557519 + 23000 1.0972735 444 -0 0.36128316 + 24000 1.134726 444 -0 0.37699112 + 25000 1.1723693 444 -0 0.39269908 + 26000 1.211349 444 -0 0.40840704 + 27000 1.250291 444 -0 0.42411501 + 28000 1.2906408 444 -0 0.43982297 + 29000 1.3307315 444 -0 0.45553093 + 30000 1.3704867 444 -0 0.4712389 + 31000 1.4064392 444 -0 0.48694686 + 32000 1.4426955 444 -0 0.50265482 + 33000 1.4789666 444 -0 0.51836279 + 34000 1.5163037 444 -0 0.53407075 + 35000 1.5534135 444 -0 0.54977871 + 36000 1.5907054 444 -0 0.56548668 + 37000 1.6296055 444 -0 0.58119464 + 38000 1.6690167 444 -0 0.5969026 + 39000 1.7082024 444 -0 0.61261057 + 40000 1.7476796 444 -0 0.62831853 + 41000 1.7847465 444 -0 0.64402649 + 42000 1.8216975 444 -0 0.65973446 + 43000 1.8594424 444 -0 0.67544242 + 44000 1.8975401 444 -0 0.69115038 + 45000 1.9361216 444 -0 0.70685835 + 46000 1.9764821 444 -0 0.72256631 + 47000 2.0221252 444 -0 0.73827427 + 48000 2.0635337 444 -0 0.75398224 + 49000 2.104472 444 -0 0.7696902 + 50000 2.1447842 444 -0 0.78539816 + 51000 2.1808558 444 -0 0.80110613 + 52000 2.2180542 444 -0 0.81681409 + 53000 2.2547243 444 -0 0.83252205 + 54000 2.2934546 444 -0 0.84823002 + 55000 2.3321909 444 -0 0.86393798 + 56000 2.3732179 444 -0 0.87964594 + 57000 2.4141133 444 -0 0.89535391 + 58000 2.455667 444 -0 0.91106187 + 59000 2.4983196 444 -0 0.92676983 + 60000 2.5415086 444 -0 0.9424778 + 61000 2.581342 444 -0 0.95818576 + 62000 2.6215029 444 -0 0.97389372 + 63000 2.6633884 444 -0 0.98960169 + 64000 2.7048848 444 -0 1.0053096 + 65000 2.7497607 444 -0 1.0210176 + 66000 2.7952373 444 -0 1.0367256 + 67000 2.8399748 444 -0 1.0524335 + 68000 2.8851806 444 -0 1.0681415 + 69000 2.9303317 444 -0 1.0838495 + 70000 2.9815632 444 -0 1.0995574 + 71000 3.0257986 444 -0 1.1152654 + 72000 3.068788 444 -0 1.1309734 + 73000 3.1130125 444 -0 1.1466813 + 74000 3.1558178 444 -0 1.1623893 + 75000 3.1993327 444 -0 1.1780972 + 76000 3.2444469 444 -0 1.1938052 + 77000 3.2901781 444 -0 1.2095132 + 78000 3.3356302 444 -0 1.2252211 + 79000 3.3814834 444 -0 1.2409291 + 80000 3.4290631 444 -0 1.2566371 + 81000 3.4715671 444 -0 1.272345 + 82000 3.5136342 444 -0 1.288053 + 83000 3.5566281 444 -0 1.303761 + 84000 3.6001405 444 -0 1.3194689 + 85000 3.6709788 888 -0 1.3351769 + 86000 3.7652387 888 -0 1.3508848 + 87000 3.8618109 888 -0 1.3665928 + 88000 3.9546406 888 -0 1.3823008 + 89000 4.0475587 888 -0 1.3980087 + 90000 4.1424919 888 -0 1.4137167 + 91000 4.2114594 888 -0 1.4294247 + 92000 4.2842588 888 -0 1.4451326 + 93000 4.3524161 888 -0 1.4608406 + 94000 4.4204131 888 -0 1.4765485 + 95000 4.4886628 888 -0 1.4922565 + 96000 4.5588224 888 -0 1.5079645 + 97000 4.6304943 888 -0 1.5236724 + 98000 4.7018695 888 -0 1.5393804 + 99000 4.774147 888 -0 1.5550884 + 100000 4.847776 888 -0 1.5707963 + 101000 4.9173562 888 -0 1.5865043 + 102000 4.9886499 888 -0 1.6022123 + 103000 5.0618801 888 -0 1.6179202 + 104000 5.1331411 888 -0 1.6336282 + 105000 5.205209 888 -0 1.6493361 + 106000 5.2795148 888 -0 1.6650441 + 107000 5.3523346 888 -0 1.6807521 + 108000 5.4263886 888 -0 1.69646 + 109000 5.5029416 888 -0 1.712168 + 110000 5.5807033 888 -0 1.727876 + 111000 5.6574852 888 -0 1.7435839 + 112000 5.7320356 888 -0 1.7592919 + 113000 5.8097178 888 -0 1.7749998 + 114000 5.8858974 888 -0 1.7907078 + 115000 5.9636528 888 -0 1.8064158 + 116000 6.0421783 888 -0 1.8221237 + 117000 6.12052 888 -0 1.8378317 + 118000 6.2016349 888 -0 1.8535397 + 119000 6.2834058 888 -0 1.8692476 + 120000 6.3644485 888 -0 1.8849556 + 121000 6.4398727 888 -0 1.9006636 + 122000 6.5152081 888 -0 1.9163715 + 123000 6.5916482 888 -0 1.9320795 + 124000 6.6694407 888 -0 1.9477874 + 125000 6.7474201 888 -0 1.9634954 + 126000 6.8270768 888 -0 1.9792034 + 127000 6.9060885 888 -0 1.9949113 + 128000 6.9847809 888 -0 2.0106193 + 129000 7.0660497 888 -0 2.0263273 + 130000 7.1468939 888 -0 2.0420352 + 131000 7.2275386 888 -0 2.0577432 + 132000 7.3103515 888 -0 2.0734512 + 133000 7.3904073 888 -0 2.0891591 + 134000 7.4711333 888 -0 2.1048671 + 135000 7.5529594 888 -0 2.120575 + 136000 7.6399017 888 -0 2.136283 + 137000 7.7263891 888 -0 2.151991 + 138000 7.815523 888 -0 2.1676989 + 139000 7.9041642 888 -0 2.1834069 + 140000 7.9950145 888 -0 2.1991149 + 141000 8.0776291 888 -0 2.2148228 + 142000 8.1584715 888 -0 2.2305308 + 143000 8.2409653 888 -0 2.2462387 + 144000 8.326064 888 -0 2.2619467 + 145000 8.4107211 888 -0 2.2776547 + 146000 8.4946153 888 -0 2.2933626 + 147000 8.5784663 888 -0 2.3090706 + 148000 8.6648861 888 -0 2.3247786 + 149000 8.7503472 888 -0 2.3404865 + 150000 8.8378801 888 -0 2.3561945 + 151000 8.9221381 888 -0 2.3719025 + 152000 9.0101516 888 -0 2.3876104 + 153000 9.0982387 888 -0 2.4033184 + 154000 9.1851912 888 -0 2.4190263 + 155000 9.2744741 888 -0 2.4347343 + 156000 9.3697509 888 -0 2.4504423 + 157000 9.4640354 888 -0 2.4661502 + 158000 9.5594845 888 -0 2.4818582 + 159000 9.6572972 888 -0 2.4975662 + 160000 9.7543656 888 -0 2.5132741 + 161000 9.8485073 888 -0 2.5289821 + 162000 9.9446493 888 -0 2.54469 + 163000 10.040013 888 -0 2.560398 + 164000 10.137116 888 -0 2.576106 + 165000 10.23506 888 -0 2.5918139 + 166000 10.335537 888 -0 2.6075219 + 167000 10.436607 888 -0 2.6232299 + 168000 10.537429 888 -0 2.6389378 + 169000 10.642458 888 -0 2.6546458 + 170000 10.74705 1000 -0 2.6703538 + 171000 10.857156 1000 -0 2.6860617 + 172000 10.965939 1000 -0 2.7017697 + 173000 11.076233 1000 -0 2.7174776 + 174000 11.184172 1000 -0 2.7331856 + 175000 11.293846 1000 -0 2.7488936 + 176000 11.402493 1000 -0 2.7646015 + 177000 11.513895 1000 -0 2.7803095 + 178000 11.625438 1000 -0 2.7960175 + 179000 11.738308 1000 -0 2.8117254 + 180000 11.854793 1000 -0 2.8274334 + 181000 11.968344 1000 -0 2.8431414 + 182000 12.082268 1000 -0 2.8588493 + 183000 12.196356 1000 -0 2.8745573 + 184000 12.313359 1000 -0 2.8902652 + 185000 12.429559 1000 -0 2.9059732 + 186000 12.545853 1000 -0 2.9216812 + 187000 12.661447 1000 -0 2.9373891 + 188000 12.777355 1000 -0 2.9530971 + 189000 12.894856 1000 -0 2.9688051 + 190000 13.0103 1000 -0 2.984513 + 191000 13.126221 1000 -0 3.000221 + 192000 13.241507 1000 -0 3.0159289 + 193000 13.356198 1000 -0 3.0316369 + 194000 13.468168 1000 -0 3.0473449 + 195000 13.582232 1000 -0 3.0630528 + 196000 13.700446 1000 -0 3.0787608 + 197000 13.816948 1000 -0 3.0944688 + 198000 13.934106 1000 -0 3.1101767 + 199000 14.053497 1000 -0 3.1258847 + 200000 14.171799 1000 -0 3.1415927 +Loop time of 14.1719 on 4 procs for 200000 steps with 1000 atoms + +Performance: 57614.644 tau/day, 14112.479 timesteps/s, 14.112 Matom-step/s +99.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.46468 | 0.82686 | 1.2428 | 39.9 | 5.83 +Neigh | 0.010644 | 0.013047 | 0.015567 | 2.0 | 0.09 +Comm | 2.2447 | 2.716 | 3.2525 | 28.2 | 19.16 +Output | 0.0040193 | 0.0057101 | 0.0084742 | 2.2 | 0.04 +Modify | 7.9913 | 8.6193 | 9.394 | 20.9 | 60.82 +Other | | 1.991 | | | 14.05 + +Nlocal: 250 ave 266 max 237 min +Histogram: 1 0 0 1 1 0 0 0 0 1 +Nghost: 294 ave 335 max 253 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 960.25 ave 1454 max 492 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 3841 +Ave neighs/atom = 3.841 +Neighbor list builds = 201 +Dangerous builds = 0 +unfix ins +run 200000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 11.87 | 11.89 | 11.9 Mbytes + Step CPU Atoms KinEng v_theta + 200000 0 1000 1.0060272 3.1415927 + 201000 0.11023112 1000 1.0117513 3.1573006 + 202000 0.22297119 1000 1.0121624 3.1730086 + 203000 0.33090251 1000 1.0099707 3.1887165 + 204000 0.43921623 1000 1.0099624 3.2044245 + 205000 0.54813391 1000 1.009398 3.2201325 + 206000 0.6597641 1000 0.99686298 3.2358404 + 207000 0.76806828 1000 0.96520673 3.2515484 + 208000 0.88217705 1000 0.96521294 3.2672564 + 209000 0.99810181 1000 0.96501099 3.2829643 + 210000 1.1113988 1000 0.96426624 3.2986723 + 211000 1.2252752 1000 0.9564358 3.3143802 + 212000 1.3381064 1000 0.95482019 3.3300882 + 213000 1.4513852 1000 0.9446233 3.3457962 + 214000 1.5630713 1000 0.92461651 3.3615041 + 215000 1.6785702 1000 0.92106646 3.3772121 + 216000 1.7937182 1000 0.92058667 3.3929201 + 217000 1.9092992 1000 0.91797493 3.408628 + 218000 2.0251567 1000 0.91351081 3.424336 + 219000 2.1419482 1000 0.91991749 3.440044 + 220000 2.258391 1000 0.92943198 3.4557519 + 221000 2.3747328 1000 0.93176684 3.4714599 + 222000 2.4930355 1000 0.92625008 3.4871678 + 223000 2.6111794 1000 0.9216243 3.5028758 + 224000 2.729971 1000 0.92332955 3.5185838 + 225000 2.8489286 1000 0.91963985 3.5342917 + 226000 2.97003 1000 0.91913679 3.5499997 + 227000 3.0874646 1000 0.92381436 3.5657077 + 228000 3.2089543 1000 0.93085242 3.5814156 + 229000 3.3281962 1000 0.92872221 3.5971236 + 230000 3.4476271 1000 0.92536664 3.6128316 + 231000 3.5681706 1000 0.92953138 3.6285395 + 232000 3.6911427 1000 0.93937257 3.6442475 + 233000 3.8115833 1000 0.95916002 3.6599554 + 234000 3.9301977 1000 0.96652709 3.6756634 + 235000 4.0481963 1000 0.96753364 3.6913714 + 236000 4.1684171 1000 0.96096249 3.7070793 + 237000 4.2874672 1000 0.97028893 3.7227873 + 238000 4.4072896 1000 0.95323014 3.7384953 + 239000 4.5292898 1000 0.94143454 3.7542032 + 240000 4.6529563 1000 0.9334569 3.7699112 + 241000 4.7701737 1000 0.93340822 3.7856191 + 242000 4.8891772 1000 0.93517762 3.8013271 + 243000 5.0078759 1000 0.92632745 3.8170351 + 244000 5.1260291 1000 0.91858996 3.832743 + 245000 5.2472736 1000 0.90006015 3.848451 + 246000 5.363907 1000 0.8850116 3.864159 + 247000 5.4838317 1000 0.87807775 3.8798669 + 248000 5.6039445 1000 0.85981326 3.8955749 + 249000 5.7262584 1000 0.85764597 3.9112829 + 250000 5.8488174 1000 0.86748856 3.9269908 + 251000 5.9665578 1000 0.85889952 3.9426988 + 252000 6.084021 1000 0.84476495 3.9584067 + 253000 6.203987 1000 0.84094974 3.9741147 + 254000 6.3221073 1000 0.82638568 3.9898227 + 255000 6.441682 1000 0.81449512 4.0055306 + 256000 6.5625653 1000 0.80130582 4.0212386 + 257000 6.6860772 1000 0.79100139 4.0369466 + 258000 6.8117355 1000 0.78531082 4.0526545 + 259000 6.9379959 1000 0.7678277 4.0683625 + 260000 7.0606907 1000 0.74798797 4.0840704 + 261000 7.1846943 1000 0.73902576 4.0997784 + 262000 7.3084818 1000 0.73326104 4.1154864 + 263000 7.4304296 1000 0.7370234 4.1311943 + 264000 7.5536012 1000 0.73817854 4.1469023 + 265000 7.6792395 1000 0.74675482 4.1626103 + 266000 7.8061753 1000 0.7480056 4.1783182 + 267000 7.9331093 1000 0.748671 4.1940262 + 268000 8.0593048 1000 0.74430146 4.2097342 + 269000 8.1888555 1000 0.73246199 4.2254421 + 270000 8.3184687 1000 0.71666285 4.2411501 + 271000 8.4489277 1000 0.69699332 4.256858 + 272000 8.5822473 1000 0.69724726 4.272566 + 273000 8.7148666 1000 0.69752702 4.288274 + 274000 8.8426159 1000 0.69393439 4.3039819 + 275000 8.9746848 1000 0.67961922 4.3196899 + 276000 9.1020134 1000 0.67808365 4.3353979 + 277000 9.232486 1000 0.66241302 4.3511058 + 278000 9.3607588 1000 0.65559661 4.3668138 + 279000 9.4879578 1000 0.64949975 4.3825218 + 280000 9.6142148 1000 0.65351945 4.3982297 + 281000 9.7437802 1000 0.66566267 4.4139377 + 282000 9.87097 1000 0.68284419 4.4296456 + 283000 9.9975944 1000 0.68906456 4.4453536 + 284000 10.124724 1000 0.69474503 4.4610616 + 285000 10.25369 1000 0.71686298 4.4767695 + 286000 10.38212 1000 0.70966561 4.4924775 + 287000 10.513274 1000 0.70173402 4.5081855 + 288000 10.641359 1000 0.69841037 4.5238934 + 289000 10.765608 1000 0.68947449 4.5396014 + 290000 10.893738 1000 0.68391661 4.5553093 + 291000 11.018982 1000 0.69112115 4.5710173 + 292000 11.146639 1000 0.70208247 4.5867253 + 293000 11.269392 1000 0.70044553 4.6024332 + 294000 11.39243 1000 0.69973655 4.6181412 + 295000 11.517741 1000 0.70719661 4.6338492 + 296000 11.643013 1000 0.69961909 4.6495571 + 297000 11.771064 1000 0.7038606 4.6652651 + 298000 11.899855 1000 0.70651383 4.6809731 + 299000 12.024499 1000 0.72028817 4.696681 + 300000 12.151124 1000 0.72141372 4.712389 + 301000 12.278902 1000 0.73011344 4.7280969 + 302000 12.402615 1000 0.74750506 4.7438049 + 303000 12.524021 1000 0.74362139 4.7595129 + 304000 12.645914 1000 0.73643471 4.7752208 + 305000 12.766721 1000 0.73250587 4.7909288 + 306000 12.945373 1000 0.72450933 4.8066368 + 307000 13.084062 1000 0.71650682 4.8223447 + 308000 13.210593 1000 0.71012044 4.8380527 + 309000 13.339536 1000 0.7045498 4.8537606 + 310000 13.477512 1000 0.69904261 4.8694686 + 311000 13.617832 1000 0.69370407 4.8851766 + 312000 13.802532 1000 0.70012261 4.9008845 + 313000 13.9682 1000 0.69796658 4.9165925 + 314000 14.139079 1000 0.70673901 4.9323005 + 315000 14.290205 1000 0.70285296 4.9480084 + 316000 14.414474 1000 0.69917788 4.9637164 + 317000 14.541743 1000 0.69153454 4.9794244 + 318000 14.672817 1000 0.69630312 4.9951323 + 319000 14.800594 1000 0.70732059 5.0108403 + 320000 14.982014 1000 0.71069744 5.0265482 + 321000 15.126459 1000 0.70982909 5.0422562 + 322000 15.264165 1000 0.70514067 5.0579642 + 323000 15.391036 1000 0.70591206 5.0736721 + 324000 15.518096 1000 0.70992653 5.0893801 + 325000 15.644416 1000 0.70605327 5.1050881 + 326000 15.772686 1000 0.70492617 5.120796 + 327000 15.899812 1000 0.69711977 5.136504 + 328000 16.050906 1000 0.68791974 5.152212 + 329000 16.197987 1000 0.68350425 5.1679199 + 330000 16.346901 1000 0.67886559 5.1836279 + 331000 16.511885 1000 0.6838106 5.1993358 + 332000 16.666556 1000 0.68570448 5.2150438 + 333000 16.820557 1000 0.68347768 5.2307518 + 334000 16.972048 1000 0.67352858 5.2464597 + 335000 17.171176 1000 0.67154375 5.2621677 + 336000 17.380218 1000 0.67050288 5.2778757 + 337000 17.561848 1000 0.66093797 5.2935836 + 338000 17.746525 1000 0.65261747 5.3092916 + 339000 17.926411 1000 0.65084314 5.3249995 + 340000 18.105197 1000 0.65003008 5.3407075 + 341000 18.235972 1000 0.65397536 5.3564155 + 342000 18.389741 1000 0.67129271 5.3721234 + 343000 18.604032 1000 0.68934086 5.3878314 + 344000 18.788879 1000 0.71225704 5.4035394 + 345000 18.935273 1000 0.72645711 5.4192473 + 346000 19.136926 1000 0.73153889 5.4349553 + 347000 19.310095 1000 0.74047453 5.4506633 + 348000 19.476545 1000 0.74508084 5.4663712 + 349000 19.599138 1000 0.74030176 5.4820792 + 350000 19.753114 1000 0.72037009 5.4977871 + 351000 19.893497 1000 0.71009934 5.5134951 + 352000 20.020982 1000 0.69475509 5.5292031 + 353000 20.149857 1000 0.68883962 5.544911 + 354000 20.278476 1000 0.68764856 5.560619 + 355000 20.407747 1000 0.6853423 5.576327 + 356000 20.53591 1000 0.69528948 5.5920349 + 357000 20.668654 1000 0.70787069 5.6077429 + 358000 20.802835 1000 0.70110924 5.6234508 + 359000 20.950394 1000 0.69356484 5.6391588 + 360000 21.076061 1000 0.69727901 5.6548668 + 361000 21.224785 1000 0.69878093 5.6705747 + 362000 21.416947 1000 0.70063124 5.6862827 + 363000 21.632619 1000 0.68842038 5.7019907 + 364000 21.836231 1000 0.68478573 5.7176986 + 365000 21.963636 1000 0.68232032 5.7334066 + 366000 22.092926 1000 0.66971225 5.7491146 + 367000 22.219251 1000 0.67006227 5.7648225 + 368000 22.344723 1000 0.6694355 5.7805305 + 369000 22.470654 1000 0.66622377 5.7962384 + 370000 22.59941 1000 0.66501888 5.8119464 + 371000 22.732869 1000 0.66108622 5.8276544 + 372000 22.859824 1000 0.65989005 5.8433623 + 373000 22.989282 1000 0.65277032 5.8590703 + 374000 23.116089 1000 0.64599939 5.8747783 + 375000 23.243733 1000 0.64279675 5.8904862 + 376000 23.371971 1000 0.64321129 5.9061942 + 377000 23.505382 1000 0.65596736 5.9219022 + 378000 23.638755 1000 0.68055295 5.9376101 + 379000 23.770714 1000 0.71147476 5.9533181 + 380000 23.906376 1000 0.7478441 5.969026 + 381000 24.040685 1000 0.76216879 5.984734 + 382000 24.173446 1000 0.78574658 6.000442 + 383000 24.30114 1000 0.80947952 6.0161499 + 384000 24.426872 1000 0.81514681 6.0318579 + 385000 24.555905 1000 0.81469775 6.0475659 + 386000 24.684891 1000 0.80579609 6.0632738 + 387000 24.811946 1000 0.79952446 6.0789818 + 388000 24.940028 1000 0.78668384 6.0946897 + 389000 25.061479 1000 0.78375511 6.1103977 + 390000 25.18315 1000 0.78124583 6.1261057 + 391000 25.303012 1000 0.77072038 6.1418136 + 392000 25.423275 1000 0.75748297 6.1575216 + 393000 25.542996 1000 0.74703682 6.1732296 + 394000 25.661826 1000 0.74135384 6.1889375 + 395000 25.782254 1000 0.73344196 6.2046455 + 396000 25.903156 1000 0.72305463 6.2203535 + 397000 26.026207 1000 0.71221263 6.2360614 + 398000 26.145498 1000 0.70602241 6.2517694 + 399000 26.266146 1000 0.69822375 6.2674773 + 400000 26.387762 1000 0.69567985 6.2831853 +Loop time of 26.3878 on 4 procs for 200000 steps with 1000 atoms + +Performance: 30942.580 tau/day, 7579.263 timesteps/s, 7.579 Matom-step/s +99.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.6871 | 2.8172 | 3.925 | 64.8 | 10.68 +Neigh | 0.017325 | 0.021917 | 0.026669 | 3.1 | 0.08 +Comm | 4.7404 | 6.0917 | 7.4409 | 54.5 | 23.09 +Output | 0.0043138 | 0.0065642 | 0.0087622 | 1.9 | 0.02 +Modify | 13.258 | 14.716 | 16.132 | 35.6 | 55.77 +Other | | 2.735 | | | 10.36 + +Nlocal: 250 ave 257 max 241 min +Histogram: 1 0 0 0 0 1 0 1 0 1 +Nghost: 387.5 ave 477 max 299 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 1233.5 ave 1523 max 917 min +Histogram: 1 1 0 0 0 0 0 0 0 2 + +Total # of neighbors = 4934 +Ave neighs/atom = 4.934 +Neighbor list builds = 168 +Dangerous builds = 0 +Total wall time: 0:00:40 diff --git a/examples/pour/log.16Mar23.pour.2d.g++.1 b/examples/pour/log.16Mar23.pour.2d.g++.1 new file mode 100644 index 0000000000..76533e5cbf --- /dev/null +++ b/examples/pour/log.16Mar23.pour.2d.g++.1 @@ -0,0 +1,125 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Pour 2d granular particles into container + +dimension 2 +atom_style sphere +boundary f fm p +newton off +comm_modify vel yes + +region reg block 0 100 0 50 -0.5 0.5 units box +create_box 1 reg +Created orthogonal box = (0 0 -0.5) to (100 50 0.5) + 1 by 1 by 1 MPI processor grid + +neighbor 0.2 bin +neigh_modify delay 0 + +# IMPORTANT NOTE: these values of stiffness (4000) and timestep (0.001) +# are used in this example file to produce a quick simulation and movie. +# More appropriate values for realistic simulations would be +# k = 4.0e5 and dt = 0.0001, as in bench/in.chute (if it were Hertzian). + +pair_style gran/hertz/history 4000.0 NULL 100.0 NULL 0.5 0 +pair_coeff * * + +timestep 0.001 + +fix 1 all nve/sphere +fix 2 all gravity 1.0 spherical 0.0 -180.0 +fix xwalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 xplane 0 100 +fix ywalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 yplane 0 NULL + +region slab block 1.0 99.0 30 34.5 -0.5 0.5 units box +fix ins all pour 1000 1 4767548 vol 0.4 10 diam range 0.5 1.0 region slab +Particle insertion: 224 every 3000 steps, 1000 by step 12001 + +fix 3 all enforce2d + +compute 1 all erotate/sphere +thermo_style custom step atoms ke c_1 vol +thermo 1000 +thermo_modify lost ignore norm no +compute_modify thermo_temp dynamic/dof yes + +#dump id all atom 250 dump.pour + +#dump 2 all image 500 image.*.jpg type type # zoom 1.6 adiam 1.5 +#dump_modify 2 pad 5 + +#dump 3 all movie 500 movie.mpg type type # zoom 1.6 adiam 1.5 +#dump_modify 3 pad 5 + +run 25000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.2 + ghost atom cutoff = 1.2 + binsize = 0.6, bins = 167 84 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton off, size, history + pair build: half/size/bin/newtoff + stencil: full/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.805 | 5.805 | 5.805 Mbytes + Step Atoms KinEng c_1 Volume + 0 0 -0 0 5000 + 1000 224 202.80417 0 5000 + 2000 224 373.00249 0 5000 + 3000 224 599.26757 0 5000 + 4000 448 1078.4787 0 5000 + 5000 448 1589.4845 0 5000 + 6000 448 1743.8281 26.918824 5000 +WARNING: Fewer insertions than requested (src/GRANULAR/fix_pour.cpp:681) + 7000 669 1818.5075 88.370238 5000 + 8000 669 1850.1368 105.77613 5000 + 9000 669 1757.9791 107.52328 5000 +WARNING: Fewer insertions than requested (src/GRANULAR/fix_pour.cpp:681) + 10000 886 1792.8816 79.515458 5000 + 11000 886 1639.0751 64.104708 5000 + 12000 886 1541.1208 55.91813 5000 + 13000 1000 1462.8753 69.093182 5000 + 14000 1000 1277.8754 48.097953 5000 + 15000 1000 1144.6235 50.637004 5000 + 16000 1000 847.34312 43.242219 5000 + 17000 1000 574.34264 41.336666 5000 + 18000 1000 383.60272 32.744393 5000 + 19000 1000 174.44969 31.691706 5000 + 20000 1000 44.566368 14.781893 5000 + 21000 1000 22.655785 9.8501131 5000 + 22000 1000 17.403069 6.4074514 5000 + 23000 1000 13.892292 4.8987582 5000 + 24000 1000 11.699592 4.0659436 5000 + 25000 1000 9.6606627 3.6642658 5000 +Loop time of 2.84114 on 1 procs for 25000 steps with 1000 atoms + +Performance: 760257.044 tau/day, 8799.271 timesteps/s, 8.799 Matom-step/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.092 | 1.092 | 1.092 | 0.0 | 38.44 +Neigh | 0.30793 | 0.30793 | 0.30793 | 0.0 | 10.84 +Comm | 0.012168 | 0.012168 | 0.012168 | 0.0 | 0.43 +Output | 0.00076223 | 0.00076223 | 0.00076223 | 0.0 | 0.03 +Modify | 1.3179 | 1.3179 | 1.3179 | 0.0 | 46.38 +Other | | 0.1104 | | | 3.89 + +Nlocal: 1000 ave 1000 max 1000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 2344 ave 2344 max 2344 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 2344 +Ave neighs/atom = 2.344 +Neighbor list builds = 2097 +Dangerous builds = 0 +Total wall time: 0:00:02 diff --git a/examples/pour/log.16Mar23.pour.2d.g++.4 b/examples/pour/log.16Mar23.pour.2d.g++.4 new file mode 100644 index 0000000000..9ced9784dc --- /dev/null +++ b/examples/pour/log.16Mar23.pour.2d.g++.4 @@ -0,0 +1,125 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Pour 2d granular particles into container + +dimension 2 +atom_style sphere +boundary f fm p +newton off +comm_modify vel yes + +region reg block 0 100 0 50 -0.5 0.5 units box +create_box 1 reg +Created orthogonal box = (0 0 -0.5) to (100 50 0.5) + 4 by 1 by 1 MPI processor grid + +neighbor 0.2 bin +neigh_modify delay 0 + +# IMPORTANT NOTE: these values of stiffness (4000) and timestep (0.001) +# are used in this example file to produce a quick simulation and movie. +# More appropriate values for realistic simulations would be +# k = 4.0e5 and dt = 0.0001, as in bench/in.chute (if it were Hertzian). + +pair_style gran/hertz/history 4000.0 NULL 100.0 NULL 0.5 0 +pair_coeff * * + +timestep 0.001 + +fix 1 all nve/sphere +fix 2 all gravity 1.0 spherical 0.0 -180.0 +fix xwalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 xplane 0 100 +fix ywalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 yplane 0 NULL + +region slab block 1.0 99.0 30 34.5 -0.5 0.5 units box +fix ins all pour 1000 1 4767548 vol 0.4 10 diam range 0.5 1.0 region slab +Particle insertion: 224 every 3000 steps, 1000 by step 12001 + +fix 3 all enforce2d + +compute 1 all erotate/sphere +thermo_style custom step atoms ke c_1 vol +thermo 1000 +thermo_modify lost ignore norm no +compute_modify thermo_temp dynamic/dof yes + +#dump id all atom 250 dump.pour + +#dump 2 all image 500 image.*.jpg type type # zoom 1.6 adiam 1.5 +#dump_modify 2 pad 5 + +#dump 3 all movie 500 movie.mpg type type # zoom 1.6 adiam 1.5 +#dump_modify 3 pad 5 + +run 25000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.2 + ghost atom cutoff = 1.2 + binsize = 0.6, bins = 167 84 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton off, size, history + pair build: half/size/bin/newtoff + stencil: full/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.77 | 5.77 | 5.77 Mbytes + Step Atoms KinEng c_1 Volume + 0 0 -0 0 5000 + 1000 224 202.80417 0 5000 + 2000 224 373.00249 0 5000 + 3000 224 599.26757 0 5000 + 4000 448 1078.4787 0 5000 + 5000 448 1589.4845 0 5000 + 6000 448 1743.8281 26.918824 5000 +WARNING: Fewer insertions than requested (src/GRANULAR/fix_pour.cpp:681) + 7000 669 1818.5075 88.370238 5000 + 8000 669 1850.1368 105.77613 5000 + 9000 669 1757.9791 107.52328 5000 +WARNING: Fewer insertions than requested (src/GRANULAR/fix_pour.cpp:681) + 10000 886 1792.8816 79.515458 5000 + 11000 886 1639.0751 64.104716 5000 + 12000 886 1541.1046 55.902437 5000 + 13000 1000 1461.0291 68.011357 5000 + 14000 1000 1286.1144 48.551003 5000 + 15000 1000 1155.6137 55.503871 5000 + 16000 1000 833.49034 46.163926 5000 + 17000 1000 581.69308 43.140124 5000 + 18000 1000 369.375 37.675729 5000 + 19000 1000 188.74424 31.66369 5000 + 20000 1000 48.73107 23.067611 5000 + 21000 1000 27.652985 14.176945 5000 + 22000 1000 22.545416 9.6960211 5000 + 23000 1000 17.575825 6.6345699 5000 + 24000 1000 12.464163 4.9073459 5000 + 25000 1000 9.9507487 3.1967219 5000 +Loop time of 0.793403 on 4 procs for 25000 steps with 1000 atoms + +Performance: 2722450.224 tau/day, 31509.841 timesteps/s, 31.510 Matom-step/s +99.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.2392 | 0.24458 | 0.25441 | 1.2 | 30.83 +Neigh | 0.075663 | 0.07738 | 0.078869 | 0.4 | 9.75 +Comm | 0.037752 | 0.045698 | 0.049012 | 2.2 | 5.76 +Output | 0.00063359 | 0.0006788 | 0.00078796 | 0.0 | 0.09 +Modify | 0.30883 | 0.3111 | 0.31377 | 0.3 | 39.21 +Other | | 0.114 | | | 14.36 + +Nlocal: 250 ave 254 max 244 min +Histogram: 1 0 0 0 0 0 0 2 0 1 +Nghost: 19.75 ave 28 max 11 min +Histogram: 1 0 1 0 0 0 0 0 1 1 +Neighs: 600 ave 624 max 569 min +Histogram: 1 0 0 1 0 0 0 0 1 1 + +Total # of neighbors = 2400 +Ave neighs/atom = 2.4 +Neighbor list builds = 2138 +Dangerous builds = 0 +Total wall time: 0:00:00 diff --git a/examples/pour/log.16Mar23.pour.2d.molecule.g++.1 b/examples/pour/log.16Mar23.pour.2d.molecule.g++.1 new file mode 100644 index 0000000000..0c5cbd9dc3 --- /dev/null +++ b/examples/pour/log.16Mar23.pour.2d.molecule.g++.1 @@ -0,0 +1,148 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Pour 2d granular particles into container + +dimension 2 +atom_style sphere +atom_modify map array +boundary f fm p +newton off +comm_modify vel yes cutoff 2.5 + +fix prop all property/atom mol ghost yes + +region reg block 0 100 0 50 -0.5 0.5 units box +create_box 1 reg +Created orthogonal box = (0 0 -0.5) to (100 50 0.5) + 1 by 1 by 1 MPI processor grid + +neighbor 0.2 bin +neigh_modify delay 0 + +# IMPORTANT NOTE: these values of stiffness (4000) and timestep (0.001) +# are used in this example file to produce a quick simulation and movie. +# More appropriate values for realistic simulations would be +# k = 4.0e5 and dt = 0.0001, as in bench/in.chute (if it were Hertzian). + +pair_style gran/hertz/history 4000.0 NULL 100.0 NULL 0.5 0 +pair_coeff * * + +timestep 0.001 + +fix 2 all gravity 1.0 spherical 0.0 -180.0 +fix xwalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 xplane 0 100 +fix ywalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 yplane 0 NULL + +molecule object molecule.vshape +Read molecule template object: + 1 molecules + 0 fragments + 5 atoms with max type 1 + 0 bonds with max type 0 + 0 angles with max type 0 + 0 dihedrals with max type 0 + 0 impropers with max type 0 +fix 3 all rigid/small molecule mol object + create bodies CPU = 0.000 seconds + 0 rigid bodies with 0 atoms + 2.236068 = max distance from body owner to body atom + +# ensure region size + molecule size does not overlap wall + +region slab block 3.0 97.0 30 34.5 -0.5 0.5 units box +fix ins all pour 500 0 4767548 vol 0.8 10 region slab mol object rigid 3 +Particle insertion: 26 every 3000 steps, 500 by step 57001 + +fix 4 all enforce2d + +compute 1 all erotate/sphere +compute Tsphere all temp/sphere +thermo_style custom step atoms ke c_1 vol +thermo_modify lost ignore norm no temp Tsphere +compute_modify Tsphere dynamic/dof yes + +thermo 1000 + +#dump id all atom 100 tmp.dump + +#variable colors string # "red green blue yellow white # purple pink orange lime gray" +#variable mol2 atom mol%10 +#dump 2 all image 250 image.*.jpg v_mol2 type # zoom 1.6 adiam 1.5 +#dump_modify 2 pad 5 amap 0 10 sa 1 10 ${colors} + +#variable colors string # "red green blue yellow white # purple pink orange lime gray" +#variable mol3 atom mol%10 +#dump 3 all movie 250 movie.mpg v_mol3 type # zoom 1.6 adiam 1.5 +#dump_modify 3 pad 5 amap 0 10 sa 1 10 ${colors} + +run 25000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +WARNING: Gravity may not be correctly applied to rigid bodies if they consist of overlapped particles (src/RIGID/fix_rigid_small.cpp:554) +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.2 + ghost atom cutoff = 2.5 + binsize = 0.6, bins = 167 84 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton off, size, history + pair build: half/size/bin/newtoff + stencil: full/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.811 | 5.811 | 5.811 Mbytes + Step Atoms KinEng c_1 Volume + 0 0 -0 0 5000 + 1000 130 248.65568 0.002050506 5000 + 2000 130 452.01354 0.0020557556 5000 + 3000 130 720.36849 0.0021462148 5000 + 4000 260 1281.7126 0.0021462148 5000 + 5000 260 1875.9602 0.0021462148 5000 + 6000 260 1742.7747 2.0692779 5000 + 7000 390 1860.2142 1.7515066 5000 + 8000 390 1853.6219 2.3354959 5000 + 9000 390 1749.6466 5.1516327 5000 + 10000 520 1860.4314 4.2186838 5000 + 11000 520 1636.9411 4.006706 5000 + 12000 520 1454.1835 4.3341069 5000 + 13000 650 1881.6358 3.9606372 5000 + 14000 650 1648.6494 3.8239413 5000 + 15000 650 1463.0973 2.9363979 5000 + 16000 780 1571.0119 3.9061213 5000 + 17000 780 1472.941 2.0289533 5000 + 18000 780 1370.5265 3.1038747 5000 + 19000 910 1433.6728 2.7600498 5000 + 20000 910 1375.3634 2.964893 5000 + 21000 910 1184.8059 2.5050961 5000 + 22000 1040 1312.0948 1.844008 5000 + 23000 1040 1181.4208 1.7766375 5000 + 24000 1040 1263.1226 2.1430511 5000 + 25000 1170 1152.9064 2.4175531 5000 +Loop time of 3.37143 on 1 procs for 25000 steps with 1170 atoms + +Performance: 640677.536 tau/day, 7415.249 timesteps/s, 8.676 Matom-step/s +99.4% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.91106 | 0.91106 | 0.91106 | 0.0 | 27.02 +Neigh | 0.19015 | 0.19015 | 0.19015 | 0.0 | 5.64 +Comm | 0.016916 | 0.016916 | 0.016916 | 0.0 | 0.50 +Output | 0.0011065 | 0.0011065 | 0.0011065 | 0.0 | 0.03 +Modify | 2.1372 | 2.1372 | 2.1372 | 0.0 | 63.39 +Other | | 0.115 | | | 3.41 + +Nlocal: 1170 ave 1170 max 1170 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1685 ave 1685 max 1685 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1685 +Ave neighs/atom = 1.4401709 +Neighbor list builds = 1707 +Dangerous builds = 0 +Total wall time: 0:00:03 diff --git a/examples/pour/log.16Mar23.pour.2d.molecule.g++.4 b/examples/pour/log.16Mar23.pour.2d.molecule.g++.4 new file mode 100644 index 0000000000..f0d3cd2db1 --- /dev/null +++ b/examples/pour/log.16Mar23.pour.2d.molecule.g++.4 @@ -0,0 +1,148 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Pour 2d granular particles into container + +dimension 2 +atom_style sphere +atom_modify map array +boundary f fm p +newton off +comm_modify vel yes cutoff 2.5 + +fix prop all property/atom mol ghost yes + +region reg block 0 100 0 50 -0.5 0.5 units box +create_box 1 reg +Created orthogonal box = (0 0 -0.5) to (100 50 0.5) + 4 by 1 by 1 MPI processor grid + +neighbor 0.2 bin +neigh_modify delay 0 + +# IMPORTANT NOTE: these values of stiffness (4000) and timestep (0.001) +# are used in this example file to produce a quick simulation and movie. +# More appropriate values for realistic simulations would be +# k = 4.0e5 and dt = 0.0001, as in bench/in.chute (if it were Hertzian). + +pair_style gran/hertz/history 4000.0 NULL 100.0 NULL 0.5 0 +pair_coeff * * + +timestep 0.001 + +fix 2 all gravity 1.0 spherical 0.0 -180.0 +fix xwalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 xplane 0 100 +fix ywalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 yplane 0 NULL + +molecule object molecule.vshape +Read molecule template object: + 1 molecules + 0 fragments + 5 atoms with max type 1 + 0 bonds with max type 0 + 0 angles with max type 0 + 0 dihedrals with max type 0 + 0 impropers with max type 0 +fix 3 all rigid/small molecule mol object + create bodies CPU = 0.000 seconds + 0 rigid bodies with 0 atoms + 2.236068 = max distance from body owner to body atom + +# ensure region size + molecule size does not overlap wall + +region slab block 3.0 97.0 30 34.5 -0.5 0.5 units box +fix ins all pour 500 0 4767548 vol 0.8 10 region slab mol object rigid 3 +Particle insertion: 26 every 3000 steps, 500 by step 57001 + +fix 4 all enforce2d + +compute 1 all erotate/sphere +compute Tsphere all temp/sphere +thermo_style custom step atoms ke c_1 vol +thermo_modify lost ignore norm no temp Tsphere +compute_modify Tsphere dynamic/dof yes + +thermo 1000 + +#dump id all atom 100 tmp.dump + +#variable colors string # "red green blue yellow white # purple pink orange lime gray" +#variable mol2 atom mol%10 +#dump 2 all image 250 image.*.jpg v_mol2 type # zoom 1.6 adiam 1.5 +#dump_modify 2 pad 5 amap 0 10 sa 1 10 ${colors} + +#variable colors string # "red green blue yellow white # purple pink orange lime gray" +#variable mol3 atom mol%10 +#dump 3 all movie 250 movie.mpg v_mol3 type # zoom 1.6 adiam 1.5 +#dump_modify 3 pad 5 amap 0 10 sa 1 10 ${colors} + +run 25000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +WARNING: Gravity may not be correctly applied to rigid bodies if they consist of overlapped particles (src/RIGID/fix_rigid_small.cpp:554) +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.2 + ghost atom cutoff = 2.5 + binsize = 0.6, bins = 167 84 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hertz/history, perpetual + attributes: half, newton off, size, history + pair build: half/size/bin/newtoff + stencil: full/bin/2d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.773 | 5.773 | 5.773 Mbytes + Step Atoms KinEng c_1 Volume + 0 0 -0 0 5000 + 1000 130 248.65568 0.002050506 5000 + 2000 130 452.01354 0.0020557556 5000 + 3000 130 720.36849 0.0021462148 5000 + 4000 260 1281.7126 0.0021462148 5000 + 5000 260 1875.9602 0.0021462148 5000 + 6000 260 1742.7747 2.0692779 5000 + 7000 390 1860.2142 1.7515066 5000 + 8000 390 1853.6219 2.3354959 5000 + 9000 390 1749.6466 5.1516327 5000 + 10000 520 1860.4314 4.2186838 5000 + 11000 520 1636.9411 4.006706 5000 + 12000 520 1454.1835 4.3341069 5000 + 13000 650 1881.6358 3.9606372 5000 + 14000 650 1648.6494 3.8239413 5000 + 15000 650 1463.0973 2.9363979 5000 + 16000 780 1571.0119 3.9061213 5000 + 17000 780 1472.941 2.0289532 5000 + 18000 780 1370.5265 3.1038747 5000 + 19000 910 1433.6728 2.7600454 5000 + 20000 910 1375.3629 2.9649297 5000 + 21000 910 1184.8017 2.5049255 5000 + 22000 1040 1312.0653 1.8441521 5000 + 23000 1040 1181.5473 1.7693597 5000 + 24000 1040 1263.4442 2.1476891 5000 + 25000 1170 1152.2404 2.4292153 5000 +Loop time of 1.59966 on 4 procs for 25000 steps with 1170 atoms + +Performance: 1350285.365 tau/day, 15628.303 timesteps/s, 18.285 Matom-step/s +98.5% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.23769 | 0.30075 | 0.35002 | 7.5 | 18.80 +Neigh | 0.048877 | 0.062647 | 0.073072 | 3.7 | 3.92 +Comm | 0.075225 | 0.087826 | 0.096819 | 2.9 | 5.49 +Output | 0.0010015 | 0.0011427 | 0.0015053 | 0.6 | 0.07 +Modify | 0.97758 | 0.99506 | 1.0071 | 1.1 | 62.20 +Other | | 0.1522 | | | 9.52 + +Nlocal: 292.5 ave 314 max 274 min +Histogram: 1 0 0 1 0 1 0 0 0 1 +Nghost: 44.5 ave 67 max 23 min +Histogram: 1 0 1 0 0 0 0 1 0 1 +Neighs: 430 ave 452 max 393 min +Histogram: 1 0 0 0 0 0 0 2 0 1 + +Total # of neighbors = 1720 +Ave neighs/atom = 1.4700855 +Neighbor list builds = 1707 +Dangerous builds = 0 +Total wall time: 0:00:01 diff --git a/examples/pour/log.16Mar23.pour.g++.1 b/examples/pour/log.16Mar23.pour.g++.1 new file mode 100644 index 0000000000..4896a1e4e4 --- /dev/null +++ b/examples/pour/log.16Mar23.pour.g++.1 @@ -0,0 +1,178 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Pour granular particles into chute container, then induce flow + +atom_style sphere +boundary p p fm +newton off +comm_modify vel yes + +region reg block -10 10 -10 10 -0.5 16 units box +create_box 1 reg +Created orthogonal box = (-10 -10 -0.5) to (10 10 16) + 1 by 1 by 1 MPI processor grid + +neighbor 0.2 bin +neigh_modify delay 0 + +# IMPORTANT NOTE: these values of stiffness (2000) and timestep (0.001) +# are used in this example file to produce a quick simulation and movie. +# More appropriate values for realistic simulations would be +# k = 2.0e5 and dt = 0.0001, as in bench/in.chute. + +pair_style gran/hooke/history 2000.0 NULL 50.0 NULL 0.5 0 +pair_coeff * * + +timestep 0.001 + +fix 1 all nve/sphere +fix 2 all gravity 1.0 spherical 0.0 -180.0 +fix zlower all wall/gran hooke/history 2000.0 NULL 50.0 NULL 0.5 0 zplane 0.0 2000.0 + +region slab block -9.0 9.0 -9.0 9.0 10.0 15.0 units box +fix ins all pour 3000 1 300719 vol 0.13 50 region slab +Particle insertion: 402 every 3162 steps, 3000 by step 22135 + +compute 1 all erotate/sphere +thermo_style custom step atoms ke c_1 vol +thermo 1000 +thermo_modify lost ignore norm no +compute_modify thermo_temp dynamic/dof yes + +#dump id all atom 1000 dump.pour + +#dump 2 all image 1000 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 1000 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 +#dump_modify 3 pad 5 + +run 25000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.2 + ghost atom cutoff = 1.2 + binsize = 0.6, bins = 34 34 28 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hooke/history, perpetual + attributes: half, newton off, size, history + pair build: half/size/bin/newtoff + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.956 | 5.956 | 5.956 Mbytes + Step Atoms KinEng c_1 Volume + 0 0 -0 0 6600 + 1000 402 753.1301 0 6600 + 2000 402 1389.6785 0 6600 + 3000 402 1439.3007 16.360577 6600 + 4000 804 1694.9311 52.966189 6600 + 5000 804 1564.7533 67.202593 6600 + 6000 804 1303.6937 65.31424 6600 + 7000 1206 1590.3342 63.948699 6600 + 8000 1206 1489.2483 54.736993 6600 + 9000 1206 1234.442 56.141183 6600 + 10000 1608 1314.3588 49.189129 6600 + 11000 1608 1238.0609 42.558653 6600 + 12000 1608 1143.6455 41.554747 6600 + 13000 2010 1229.989 49.661038 6600 + 14000 2010 1176.3015 40.982761 6600 + 15000 2010 1011.4718 45.872673 6600 + 16000 2412 1128.8326 47.405058 6600 + 17000 2412 1035.4314 40.22595 6600 + 18000 2412 873.87039 40.07875 6600 + 19000 2814 967.91799 41.49685 6600 + 20000 2814 928.0341 39.924344 6600 + 21000 2814 820.35467 37.621246 6600 + 22000 2814 549.00702 41.541324 6600 + 23000 3000 441.94025 41.467527 6600 + 24000 3000 339.91044 25.849093 6600 + 25000 3000 243.91083 20.921917 6600 +Loop time of 8.07068 on 1 procs for 25000 steps with 3000 atoms + +Performance: 267635.587 tau/day, 3097.634 timesteps/s, 9.293 Matom-step/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 4.6682 | 4.6682 | 4.6682 | 0.0 | 57.84 +Neigh | 1.0497 | 1.0497 | 1.0497 | 0.0 | 13.01 +Comm | 0.16028 | 0.16028 | 0.16028 | 0.0 | 1.99 +Output | 0.00076244 | 0.00076244 | 0.00076244 | 0.0 | 0.01 +Modify | 2.0196 | 2.0196 | 2.0196 | 0.0 | 25.02 +Other | | 0.172 | | | 2.13 + +Nlocal: 3000 ave 3000 max 3000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 667 ave 667 max 667 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 13503 ave 13503 max 13503 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 13503 +Ave neighs/atom = 4.501 +Neighbor list builds = 1150 +Dangerous builds = 0 + +unfix ins +fix 2 all gravity 1.0 chute 26.0 +run 25000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 10.64 | 10.64 | 10.64 Mbytes + Step Atoms KinEng c_1 Volume + 25000 3000 243.91083 20.921917 6600 + 26000 3000 111.73212 19.181089 6600 + 27000 3000 175.53659 12.143401 6600 + 28000 3000 315.95861 12.721047 6600 + 29000 3000 516.24386 15.103525 6600 + 30000 3000 779.3423 19.057186 6600 + 31000 3000 1118.6219 21.320808 6600 + 32000 3000 1512.8878 25.012099 6600 + 33000 3000 1969.247 30.402739 6600 + 34000 3000 2499.318 37.297539 6600 + 35000 3000 3074.9401 45.925996 6600 + 36000 3000 3768.2108 39.734162 6600 + 37000 3000 4400.6971 44.337674 6600 + 38000 3000 5178.4457 63.168989 6600 + 39000 3000 6028.928 56.570416 6600 + 40000 3000 6947.424 67.360376 6600 + 41000 3000 7896.0016 69.368604 6600 + 42000 3000 8977.9347 66.242546 6600 + 43000 3000 10026.618 55.776273 6600 + 44000 3000 11106.873 69.943396 6600 + 45000 3000 12264.363 79.440158 6600 + 46000 3000 13562.635 67.026549 6600 + 47000 3000 14796.806 70.121289 6600 + 48000 3000 16254.182 70.690438 6600 + 49000 3000 17711.386 63.668043 6600 + 50000 3000 19144.269 66.708659 6600 +Loop time of 17.582 on 1 procs for 25000 steps with 3000 atoms + +Performance: 122853.050 tau/day, 1421.910 timesteps/s, 4.266 Matom-step/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 11.641 | 11.641 | 11.641 | 0.0 | 66.21 +Neigh | 1.7715 | 1.7715 | 1.7715 | 0.0 | 10.08 +Comm | 0.38219 | 0.38219 | 0.38219 | 0.0 | 2.17 +Output | 0.0010728 | 0.0010728 | 0.0010728 | 0.0 | 0.01 +Modify | 3.4549 | 3.4549 | 3.4549 | 0.0 | 19.65 +Other | | 0.3309 | | | 1.88 + +Nlocal: 3000 ave 3000 max 3000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 748 ave 748 max 748 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 14117 ave 14117 max 14117 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 14117 +Ave neighs/atom = 4.7056667 +Neighbor list builds = 848 +Dangerous builds = 0 +Total wall time: 0:00:25 diff --git a/examples/pour/log.16Mar23.pour.g++.4 b/examples/pour/log.16Mar23.pour.g++.4 new file mode 100644 index 0000000000..f0ffbd8001 --- /dev/null +++ b/examples/pour/log.16Mar23.pour.g++.4 @@ -0,0 +1,178 @@ +LAMMPS (8 Feb 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Pour granular particles into chute container, then induce flow + +atom_style sphere +boundary p p fm +newton off +comm_modify vel yes + +region reg block -10 10 -10 10 -0.5 16 units box +create_box 1 reg +Created orthogonal box = (-10 -10 -0.5) to (10 10 16) + 2 by 2 by 1 MPI processor grid + +neighbor 0.2 bin +neigh_modify delay 0 + +# IMPORTANT NOTE: these values of stiffness (2000) and timestep (0.001) +# are used in this example file to produce a quick simulation and movie. +# More appropriate values for realistic simulations would be +# k = 2.0e5 and dt = 0.0001, as in bench/in.chute. + +pair_style gran/hooke/history 2000.0 NULL 50.0 NULL 0.5 0 +pair_coeff * * + +timestep 0.001 + +fix 1 all nve/sphere +fix 2 all gravity 1.0 spherical 0.0 -180.0 +fix zlower all wall/gran hooke/history 2000.0 NULL 50.0 NULL 0.5 0 zplane 0.0 2000.0 + +region slab block -9.0 9.0 -9.0 9.0 10.0 15.0 units box +fix ins all pour 3000 1 300719 vol 0.13 50 region slab +Particle insertion: 402 every 3162 steps, 3000 by step 22135 + +compute 1 all erotate/sphere +thermo_style custom step atoms ke c_1 vol +thermo 1000 +thermo_modify lost ignore norm no +compute_modify thermo_temp dynamic/dof yes + +#dump id all atom 1000 dump.pour + +#dump 2 all image 1000 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 1000 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 +#dump_modify 3 pad 5 + +run 25000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.2 + ghost atom cutoff = 1.2 + binsize = 0.6, bins = 34 34 28 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hooke/history, perpetual + attributes: half, newton off, size, history + pair build: half/size/bin/newtoff + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.831 | 5.831 | 5.831 Mbytes + Step Atoms KinEng c_1 Volume + 0 0 -0 0 6600 + 1000 402 753.1301 0 6600 + 2000 402 1389.6785 0 6600 + 3000 402 1439.3007 16.360577 6600 + 4000 804 1694.9311 52.966189 6600 + 5000 804 1564.7533 67.202593 6600 + 6000 804 1303.6937 65.31424 6600 + 7000 1206 1590.3342 63.948699 6600 + 8000 1206 1489.2483 54.736993 6600 + 9000 1206 1234.442 56.141183 6600 + 10000 1608 1314.3588 49.189127 6600 + 11000 1608 1237.9823 42.555046 6600 + 12000 1608 1142.8729 41.96142 6600 + 13000 2010 1230.1948 49.194135 6600 + 14000 2010 1178.1648 39.43872 6600 + 15000 2010 1031.6441 46.416609 6600 + 16000 2412 1109.7641 45.866965 6600 + 17000 2412 1047.232 38.618366 6600 + 18000 2412 888.02373 41.307438 6600 + 19000 2814 965.06339 40.889834 6600 + 20000 2814 922.71203 40.04001 6600 + 21000 2814 815.9575 38.366756 6600 + 22000 2814 570.89153 37.83039 6600 + 23000 3000 428.71007 37.62527 6600 + 24000 3000 341.87262 24.030639 6600 + 25000 3000 243.78921 22.003596 6600 +Loop time of 2.70972 on 4 procs for 25000 steps with 3000 atoms + +Performance: 797131.262 tau/day, 9226.056 timesteps/s, 27.678 Matom-step/s +99.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.2559 | 1.2759 | 1.2886 | 1.2 | 47.09 +Neigh | 0.29364 | 0.29822 | 0.30487 | 0.8 | 11.01 +Comm | 0.24161 | 0.25182 | 0.26235 | 1.5 | 9.29 +Output | 0.00076819 | 0.00084565 | 0.00098501 | 0.0 | 0.03 +Modify | 0.59267 | 0.61574 | 0.63388 | 2.3 | 22.72 +Other | | 0.2672 | | | 9.86 + +Nlocal: 750 ave 759 max 734 min +Histogram: 1 0 0 0 0 0 0 1 1 1 +Nghost: 381.75 ave 392 max 367 min +Histogram: 1 0 0 0 0 0 1 1 0 1 +Neighs: 3569.75 ave 3651 max 3448 min +Histogram: 1 0 0 0 0 0 1 1 0 1 + +Total # of neighbors = 14279 +Ave neighs/atom = 4.7596667 +Neighbor list builds = 1151 +Dangerous builds = 0 + +unfix ins +fix 2 all gravity 1.0 chute 26.0 +run 25000 +Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 10.43 | 10.43 | 10.43 Mbytes + Step Atoms KinEng c_1 Volume + 25000 3000 243.78921 22.003596 6600 + 26000 3000 119.4338 18.414134 6600 + 27000 3000 172.50337 12.019175 6600 + 28000 3000 316.78411 12.871972 6600 + 29000 3000 524.47221 16.004598 6600 + 30000 3000 812.57656 20.096736 6600 + 31000 3000 1181.7814 28.226314 6600 + 32000 3000 1612.855 28.279192 6600 + 33000 3000 2075.6364 29.358829 6600 + 34000 3000 2634.5344 36.312508 6600 + 35000 3000 3213.2814 43.992962 6600 + 36000 3000 3900.499 38.674908 6600 + 37000 3000 4594.329 46.025242 6600 + 38000 3000 5367.8353 46.404081 6600 + 39000 3000 6180.9788 56.484589 6600 + 40000 3000 7111.5267 51.165038 6600 + 41000 3000 7998.6331 65.039037 6600 + 42000 3000 9037.3716 69.653749 6600 + 43000 3000 10148.985 65.082635 6600 + 44000 3000 11242.901 62.787818 6600 + 45000 3000 12445.247 64.68269 6600 + 46000 3000 13773.582 59.313484 6600 + 47000 3000 15000.566 54.417728 6600 + 48000 3000 16312.814 60.23943 6600 + 49000 3000 17730.721 60.028021 6600 + 50000 3000 19221.273 62.659312 6600 +Loop time of 5.52345 on 4 procs for 25000 steps with 3000 atoms + +Performance: 391059.670 tau/day, 4526.154 timesteps/s, 13.578 Matom-step/s +99.3% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 3.1235 | 3.1506 | 3.1758 | 1.1 | 57.04 +Neigh | 0.47171 | 0.47561 | 0.48174 | 0.5 | 8.61 +Comm | 0.39363 | 0.39957 | 0.4049 | 0.6 | 7.23 +Output | 0.0010759 | 0.0011654 | 0.0012802 | 0.2 | 0.02 +Modify | 0.93409 | 0.95091 | 0.96521 | 1.2 | 17.22 +Other | | 0.5456 | | | 9.88 + +Nlocal: 750 ave 759 max 744 min +Histogram: 1 0 1 1 0 0 0 0 0 1 +Nghost: 404.75 ave 411 max 402 min +Histogram: 1 2 0 0 0 0 0 0 0 1 +Neighs: 3694.75 ave 3722 max 3672 min +Histogram: 1 0 0 1 1 0 0 0 0 1 + +Total # of neighbors = 14779 +Ave neighs/atom = 4.9263333 +Neighbor list builds = 856 +Dangerous builds = 0 +Total wall time: 0:00:08 diff --git a/examples/pour/log.27Nov18.pour.2d.g++.1 b/examples/pour/log.27Nov18.pour.2d.g++.1 deleted file mode 100644 index d8b615816f..0000000000 --- a/examples/pour/log.27Nov18.pour.2d.g++.1 +++ /dev/null @@ -1,121 +0,0 @@ -LAMMPS (27 Nov 2018) - using 1 OpenMP thread(s) per MPI task -# Pour 2d granular particles into container - -dimension 2 -atom_style sphere -boundary f fm p -newton off -comm_modify vel yes - -region reg block 0 100 0 50 -0.5 0.5 units box -create_box 1 reg -Created orthogonal box = (0 0 -0.5) to (100 50 0.5) - 1 by 1 by 1 MPI processor grid - -neighbor 0.2 bin -neigh_modify delay 0 - -# IMPORTANT NOTE: these values of stiffness (4000) and timestep (0.001) -# are used in this example file to produce a quick simulation and movie. -# More appropriate values for realistic simulations would be -# k = 4.0e5 and dt = 0.0001, as in bench/in.chute (if it were Hertzian). - -pair_style gran/hertz/history 4000.0 NULL 100.0 NULL 0.5 0 -pair_coeff * * - -timestep 0.001 - -fix 1 all nve/sphere -fix 2 all gravity 1.0 spherical 0.0 -180.0 -fix xwalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 xplane 0 100 -fix ywalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 yplane 0 NULL - -region slab block 1.0 99.0 30 34.5 -0.5 0.5 units box -fix ins all pour 1000 1 4767548 vol 0.4 10 diam range 0.5 1.0 region slab -Particle insertion: 224 every 3000 steps, 1000 by step 12001 - -fix 3 all enforce2d - -compute 1 all erotate/sphere -thermo_style custom step atoms ke c_1 vol -thermo 1000 -thermo_modify lost ignore norm no -compute_modify thermo_temp dynamic/dof yes - -#dump id all atom 250 dump.pour - -#dump 2 all image 500 image.*.jpg type type # zoom 1.6 adiam 1.5 -#dump_modify 2 pad 5 - -#dump 3 all movie 500 movie.mpg type type # zoom 1.6 adiam 1.5 -#dump_modify 3 pad 5 - -run 25000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.2 - ghost atom cutoff = 1.2 - binsize = 0.6, bins = 167 84 2 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton off, size, history - pair build: half/size/bin/newtoff - stencil: half/bin/2d/newtoff - bin: standard -Per MPI rank memory allocation (min/avg/max) = 5.804 | 5.804 | 5.804 Mbytes -Step Atoms KinEng c_1 Volume - 0 0 -0 0 5000 - 1000 224 201.77464 0 5000 - 2000 224 372.42868 0 5000 - 3000 224 599.60221 0 5000 - 4000 448 1084.3752 0 5000 - 5000 448 1592.4543 0 5000 - 6000 448 1763.3153 37.274939 5000 - 7000 672 1805.206 89.331853 5000 - 8000 672 1778.0015 111.58381 5000 - 9000 672 1592.6805 97.550311 5000 - 10000 896 1631.962 76.905078 5000 - 11000 896 1590.1527 68.644552 5000 - 12000 896 1564.4707 60.119562 5000 - 13000 1000 1490.072 56.982972 5000 - 14000 1000 1266.4669 57.579371 5000 - 15000 1000 1034.1055 46.079374 5000 - 16000 1000 748.70283 43.933154 5000 - 17000 1000 462.65166 37.522016 5000 - 18000 1000 327.40481 29.450285 5000 - 19000 1000 223.24319 31.981144 5000 - 20000 1000 54.792042 23.449101 5000 - 21000 1000 25.805484 16.352528 5000 - 22000 1000 20.617765 11.756965 5000 - 23000 1000 16.115382 7.9435503 5000 - 24000 1000 11.971003 5.9411126 5000 - 25000 1000 10.404117 4.3811155 5000 -Loop time of 2.72875 on 1 procs for 25000 steps with 1000 atoms - -Performance: 791570.958 tau/day, 9161.701 timesteps/s -98.8% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.95597 | 0.95597 | 0.95597 | 0.0 | 35.03 -Neigh | 0.38475 | 0.38475 | 0.38475 | 0.0 | 14.10 -Comm | 0.010862 | 0.010862 | 0.010862 | 0.0 | 0.40 -Output | 0.00054383 | 0.00054383 | 0.00054383 | 0.0 | 0.02 -Modify | 1.2364 | 1.2364 | 1.2364 | 0.0 | 45.31 -Other | | 0.1402 | | | 5.14 - -Nlocal: 1000 ave 1000 max 1000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 2374 ave 2374 max 2374 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 2374 -Ave neighs/atom = 2.374 -Neighbor list builds = 2089 -Dangerous builds = 0 -Total wall time: 0:00:02 diff --git a/examples/pour/log.27Nov18.pour.2d.g++.4 b/examples/pour/log.27Nov18.pour.2d.g++.4 deleted file mode 100644 index a491cf4866..0000000000 --- a/examples/pour/log.27Nov18.pour.2d.g++.4 +++ /dev/null @@ -1,121 +0,0 @@ -LAMMPS (27 Nov 2018) - using 1 OpenMP thread(s) per MPI task -# Pour 2d granular particles into container - -dimension 2 -atom_style sphere -boundary f fm p -newton off -comm_modify vel yes - -region reg block 0 100 0 50 -0.5 0.5 units box -create_box 1 reg -Created orthogonal box = (0 0 -0.5) to (100 50 0.5) - 4 by 1 by 1 MPI processor grid - -neighbor 0.2 bin -neigh_modify delay 0 - -# IMPORTANT NOTE: these values of stiffness (4000) and timestep (0.001) -# are used in this example file to produce a quick simulation and movie. -# More appropriate values for realistic simulations would be -# k = 4.0e5 and dt = 0.0001, as in bench/in.chute (if it were Hertzian). - -pair_style gran/hertz/history 4000.0 NULL 100.0 NULL 0.5 0 -pair_coeff * * - -timestep 0.001 - -fix 1 all nve/sphere -fix 2 all gravity 1.0 spherical 0.0 -180.0 -fix xwalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 xplane 0 100 -fix ywalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 yplane 0 NULL - -region slab block 1.0 99.0 30 34.5 -0.5 0.5 units box -fix ins all pour 1000 1 4767548 vol 0.4 10 diam range 0.5 1.0 region slab -Particle insertion: 224 every 3000 steps, 1000 by step 12001 - -fix 3 all enforce2d - -compute 1 all erotate/sphere -thermo_style custom step atoms ke c_1 vol -thermo 1000 -thermo_modify lost ignore norm no -compute_modify thermo_temp dynamic/dof yes - -#dump id all atom 250 dump.pour - -#dump 2 all image 500 image.*.jpg type type # zoom 1.6 adiam 1.5 -#dump_modify 2 pad 5 - -#dump 3 all movie 500 movie.mpg type type # zoom 1.6 adiam 1.5 -#dump_modify 3 pad 5 - -run 25000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.2 - ghost atom cutoff = 1.2 - binsize = 0.6, bins = 167 84 2 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton off, size, history - pair build: half/size/bin/newtoff - stencil: half/bin/2d/newtoff - bin: standard -Per MPI rank memory allocation (min/avg/max) = 5.77 | 5.77 | 5.77 Mbytes -Step Atoms KinEng c_1 Volume - 0 0 -0 0 5000 - 1000 224 201.77464 0 5000 - 2000 224 372.42868 0 5000 - 3000 224 599.60221 0 5000 - 4000 448 1084.3752 0 5000 - 5000 448 1592.4543 0 5000 - 6000 448 1763.3153 37.274939 5000 - 7000 672 1805.206 89.331853 5000 - 8000 672 1778.0015 111.58381 5000 - 9000 672 1592.6805 97.550311 5000 - 10000 896 1630.8521 79.742572 5000 - 11000 896 1593.1588 67.633788 5000 - 12000 896 1562.2084 65.097236 5000 - 13000 1000 1504.1203 63.468934 5000 - 14000 1000 1266.5724 55.837334 5000 - 15000 1000 1041.8665 48.938774 5000 - 16000 1000 766.27305 43.846151 5000 - 17000 1000 466.30103 43.206188 5000 - 18000 1000 320.50154 26.84775 5000 - 19000 1000 207.91453 29.183522 5000 - 20000 1000 52.447982 19.30378 5000 - 21000 1000 22.027641 10.395933 5000 - 22000 1000 15.395099 6.7003289 5000 - 23000 1000 11.97674 5.2548063 5000 - 24000 1000 7.8974699 3.7396899 5000 - 25000 1000 6.1288038 2.2056805 5000 -Loop time of 0.901039 on 4 procs for 25000 steps with 1000 atoms - -Performance: 2397232.992 tau/day, 27745.752 timesteps/s -96.8% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.21557 | 0.22754 | 0.23651 | 1.9 | 25.25 -Neigh | 0.098304 | 0.10178 | 0.10595 | 1.0 | 11.30 -Comm | 0.051792 | 0.066485 | 0.079589 | 3.8 | 7.38 -Output | 0.00052619 | 0.00061941 | 0.00082016 | 0.0 | 0.07 -Modify | 0.31782 | 0.32767 | 0.33815 | 1.5 | 36.37 -Other | | 0.1769 | | | 19.64 - -Nlocal: 250 ave 267 max 232 min -Histogram: 1 0 0 0 1 1 0 0 0 1 -Nghost: 18 ave 23 max 14 min -Histogram: 2 0 0 0 0 0 0 1 0 1 -Neighs: 606 ave 664 max 559 min -Histogram: 1 0 1 0 0 1 0 0 0 1 - -Total # of neighbors = 2424 -Ave neighs/atom = 2.424 -Neighbor list builds = 2060 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/pour/log.27Nov18.pour.2d.molecule.g++.1 b/examples/pour/log.27Nov18.pour.2d.molecule.g++.1 deleted file mode 100644 index 38d3778b01..0000000000 --- a/examples/pour/log.27Nov18.pour.2d.molecule.g++.1 +++ /dev/null @@ -1,142 +0,0 @@ -LAMMPS (27 Nov 2018) - using 1 OpenMP thread(s) per MPI task -# Pour 2d granular particles into container - -dimension 2 -atom_style sphere -atom_modify map array -boundary f fm p -newton off -comm_modify vel yes cutoff 2.5 - -fix prop all property/atom mol ghost yes - -region reg block 0 100 0 50 -0.5 0.5 units box -create_box 1 reg -Created orthogonal box = (0 0 -0.5) to (100 50 0.5) - 1 by 1 by 1 MPI processor grid - -neighbor 0.2 bin -neigh_modify delay 0 - -# IMPORTANT NOTE: these values of stiffness (4000) and timestep (0.001) -# are used in this example file to produce a quick simulation and movie. -# More appropriate values for realistic simulations would be -# k = 4.0e5 and dt = 0.0001, as in bench/in.chute (if it were Hertzian). - -pair_style gran/hertz/history 4000.0 NULL 100.0 NULL 0.5 0 -pair_coeff * * - -timestep 0.001 - -fix 2 all gravity 1.0 spherical 0.0 -180.0 -fix xwalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 xplane 0 100 -fix ywalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 yplane 0 NULL - -molecule object molecule.vshape -Read molecule object: - 5 atoms with max type 1 - 0 bonds with max type 0 - 0 angles with max type 0 - 0 dihedrals with max type 0 - 0 impropers with max type 0 -fix 3 all rigid/small molecule mol object -0 rigid bodies with 0 atoms - 2.23607 = max distance from body owner to body atom - -# ensure region size + molecule size does not overlap wall - -region slab block 3.0 97.0 30 34.5 -0.5 0.5 units box -fix ins all pour 500 0 4767548 vol 0.8 10 region slab mol object rigid 3 -Particle insertion: 26 every 3000 steps, 500 by step 57001 - -fix 4 all enforce2d - -compute 1 all erotate/sphere -compute Tsphere all temp/sphere -thermo_style custom step atoms ke c_1 vol -thermo_modify lost ignore norm no temp Tsphere -compute_modify Tsphere dynamic/dof yes - -thermo 1000 - -#dump id all atom 100 tmp.dump - -#variable colors string # "red green blue yellow white # purple pink orange lime gray" -#variable mol2 atom mol%10 -#dump 2 all image 250 image.*.jpg v_mol2 type # zoom 1.6 adiam 1.5 -#dump_modify 2 pad 5 amap 0 10 sa 1 10 ${colors} - -#variable colors string # "red green blue yellow white # purple pink orange lime gray" -#variable mol3 atom mol%10 -#dump 3 all movie 250 movie.mpg v_mol3 type # zoom 1.6 adiam 1.5 -#dump_modify 3 pad 5 amap 0 10 sa 1 10 ${colors} - -run 25000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.2 - ghost atom cutoff = 2.5 - binsize = 0.6, bins = 167 84 2 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton off, size, history - pair build: half/size/bin/newtoff - stencil: half/bin/2d/newtoff - bin: standard -Per MPI rank memory allocation (min/avg/max) = 5.81 | 5.81 | 5.81 Mbytes -Step Atoms KinEng c_1 Volume - 0 0 -0 0 5000 - 1000 130 259.24123 2.3772821e-30 5000 - 2000 130 465.39775 9.5010246e-30 5000 - 3000 130 736.55426 2.1365791e-29 5000 - 4000 260 1274.295 6.045774e-05 5000 - 5000 260 1855.4991 0.0021687846 5000 - 6000 260 1743.415 1.9678991 5000 - 7000 390 1675.8228 2.0085353 5000 - 8000 390 1845.2936 2.678293 5000 - 9000 390 1747.0301 2.5461774 5000 - 10000 520 2204.3744 1.3847146 5000 - 11000 520 1872.5943 6.5018283 5000 - 12000 520 1448.8705 3.2789997 5000 - 13000 650 1687.7845 2.4723994 5000 - 14000 650 1534.5832 1.7381523 5000 - 15000 650 1517.5812 2.4425352 5000 - 16000 780 1681.4276 3.5245463 5000 - 17000 780 1660.4845 3.5652485 5000 - 18000 780 1400.1788 4.1717202 5000 - 19000 910 1525.4386 3.2537276 5000 - 20000 910 1326.4257 3.5226044 5000 - 21000 910 1125.4321 3.1564949 5000 - 22000 1040 1262.0253 1.6097601 5000 - 23000 1040 1042.7 3.1078701 5000 - 24000 1040 1167.4717 1.4954047 5000 - 25000 1170 1214.9087 2.4525535 5000 -Loop time of 3.36515 on 1 procs for 25000 steps with 1170 atoms - -Performance: 641872.369 tau/day, 7429.078 timesteps/s -99.8% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.73922 | 0.73922 | 0.73922 | 0.0 | 21.97 -Neigh | 0.22808 | 0.22808 | 0.22808 | 0.0 | 6.78 -Comm | 0.013331 | 0.013331 | 0.013331 | 0.0 | 0.40 -Output | 0.00082207 | 0.00082207 | 0.00082207 | 0.0 | 0.02 -Modify | 2.2694 | 2.2694 | 2.2694 | 0.0 | 67.44 -Other | | 0.1143 | | | 3.40 - -Nlocal: 1170 ave 1170 max 1170 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 1699 ave 1699 max 1699 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 1699 -Ave neighs/atom = 1.45214 -Neighbor list builds = 1715 -Dangerous builds = 0 -Total wall time: 0:00:03 diff --git a/examples/pour/log.27Nov18.pour.2d.molecule.g++.4 b/examples/pour/log.27Nov18.pour.2d.molecule.g++.4 deleted file mode 100644 index 397149fb6a..0000000000 --- a/examples/pour/log.27Nov18.pour.2d.molecule.g++.4 +++ /dev/null @@ -1,142 +0,0 @@ -LAMMPS (27 Nov 2018) - using 1 OpenMP thread(s) per MPI task -# Pour 2d granular particles into container - -dimension 2 -atom_style sphere -atom_modify map array -boundary f fm p -newton off -comm_modify vel yes cutoff 2.5 - -fix prop all property/atom mol ghost yes - -region reg block 0 100 0 50 -0.5 0.5 units box -create_box 1 reg -Created orthogonal box = (0 0 -0.5) to (100 50 0.5) - 4 by 1 by 1 MPI processor grid - -neighbor 0.2 bin -neigh_modify delay 0 - -# IMPORTANT NOTE: these values of stiffness (4000) and timestep (0.001) -# are used in this example file to produce a quick simulation and movie. -# More appropriate values for realistic simulations would be -# k = 4.0e5 and dt = 0.0001, as in bench/in.chute (if it were Hertzian). - -pair_style gran/hertz/history 4000.0 NULL 100.0 NULL 0.5 0 -pair_coeff * * - -timestep 0.001 - -fix 2 all gravity 1.0 spherical 0.0 -180.0 -fix xwalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 xplane 0 100 -fix ywalls all wall/gran hertz/history 4000.0 NULL 100.0 NULL 0 1 yplane 0 NULL - -molecule object molecule.vshape -Read molecule object: - 5 atoms with max type 1 - 0 bonds with max type 0 - 0 angles with max type 0 - 0 dihedrals with max type 0 - 0 impropers with max type 0 -fix 3 all rigid/small molecule mol object -0 rigid bodies with 0 atoms - 2.23607 = max distance from body owner to body atom - -# ensure region size + molecule size does not overlap wall - -region slab block 3.0 97.0 30 34.5 -0.5 0.5 units box -fix ins all pour 500 0 4767548 vol 0.8 10 region slab mol object rigid 3 -Particle insertion: 26 every 3000 steps, 500 by step 57001 - -fix 4 all enforce2d - -compute 1 all erotate/sphere -compute Tsphere all temp/sphere -thermo_style custom step atoms ke c_1 vol -thermo_modify lost ignore norm no temp Tsphere -compute_modify Tsphere dynamic/dof yes - -thermo 1000 - -#dump id all atom 100 tmp.dump - -#variable colors string # "red green blue yellow white # purple pink orange lime gray" -#variable mol2 atom mol%10 -#dump 2 all image 250 image.*.jpg v_mol2 type # zoom 1.6 adiam 1.5 -#dump_modify 2 pad 5 amap 0 10 sa 1 10 ${colors} - -#variable colors string # "red green blue yellow white # purple pink orange lime gray" -#variable mol3 atom mol%10 -#dump 3 all movie 250 movie.mpg v_mol3 type # zoom 1.6 adiam 1.5 -#dump_modify 3 pad 5 amap 0 10 sa 1 10 ${colors} - -run 25000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.2 - ghost atom cutoff = 2.5 - binsize = 0.6, bins = 167 84 2 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hertz/history, perpetual - attributes: half, newton off, size, history - pair build: half/size/bin/newtoff - stencil: half/bin/2d/newtoff - bin: standard -Per MPI rank memory allocation (min/avg/max) = 5.773 | 5.773 | 5.773 Mbytes -Step Atoms KinEng c_1 Volume - 0 0 -0 0 5000 - 1000 130 259.24123 2.3773387e-30 5000 - 2000 130 465.39775 9.5010816e-30 5000 - 3000 130 736.55426 2.1365846e-29 5000 - 4000 260 1274.295 6.045774e-05 5000 - 5000 260 1855.4991 0.0021687846 5000 - 6000 260 1743.415 1.9678991 5000 - 7000 390 1675.8228 2.0085353 5000 - 8000 390 1845.2936 2.678293 5000 - 9000 390 1747.0301 2.5461774 5000 - 10000 520 2204.3744 1.3847146 5000 - 11000 520 1872.5943 6.5018283 5000 - 12000 520 1448.8705 3.2789997 5000 - 13000 650 1687.7845 2.4723994 5000 - 14000 650 1534.5832 1.7381523 5000 - 15000 650 1517.5812 2.4425352 5000 - 16000 780 1680.8761 3.5506853 5000 - 17000 780 1661.6046 3.6673972 5000 - 18000 780 1391.3201 4.1075002 5000 - 19000 910 1526.6687 3.410537 5000 - 20000 910 1387.6908 2.7370047 5000 - 21000 910 1056.6723 2.5690119 5000 - 22000 1040 1226.7461 1.2299974 5000 - 23000 1040 1106.7165 3.1057108 5000 - 24000 1040 1161.9203 2.0994962 5000 - 25000 1170 1187.5093 2.9596172 5000 -Loop time of 1.4211 on 4 procs for 25000 steps with 1170 atoms - -Performance: 1519946.444 tau/day, 17591.973 timesteps/s -94.0% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.19053 | 0.21869 | 0.23582 | 3.7 | 15.39 -Neigh | 0.06394 | 0.066575 | 0.070017 | 0.9 | 4.68 -Comm | 0.055579 | 0.070079 | 0.080658 | 3.4 | 4.93 -Output | 0.0012593 | 0.0031545 | 0.0088205 | 5.8 | 0.22 -Modify | 0.89034 | 0.9006 | 0.91315 | 0.9 | 63.37 -Other | | 0.162 | | | 11.40 - -Nlocal: 292.5 ave 296 max 285 min -Histogram: 1 0 0 0 0 0 0 0 1 2 -Nghost: 44 ave 60 max 21 min -Histogram: 1 0 0 1 0 0 0 0 0 2 -Neighs: 433.25 ave 449 max 418 min -Histogram: 1 0 1 0 0 0 1 0 0 1 - -Total # of neighbors = 1733 -Ave neighs/atom = 1.4812 -Neighbor list builds = 1708 -Dangerous builds = 0 -Total wall time: 0:00:01 diff --git a/examples/pour/log.27Nov18.pour.g++.1 b/examples/pour/log.27Nov18.pour.g++.1 deleted file mode 100644 index a1ebc335cd..0000000000 --- a/examples/pour/log.27Nov18.pour.g++.1 +++ /dev/null @@ -1,175 +0,0 @@ -LAMMPS (27 Nov 2018) - using 1 OpenMP thread(s) per MPI task -# Pour granular particles into chute container, then induce flow - -atom_style sphere -boundary p p fm -newton off -comm_modify vel yes - -region reg block -10 10 -10 10 -0.5 16 units box -create_box 1 reg -Created orthogonal box = (-10 -10 -0.5) to (10 10 16) - 1 by 1 by 1 MPI processor grid - -neighbor 0.2 bin -neigh_modify delay 0 - -# IMPORTANT NOTE: these values of stiffness (2000) and timestep (0.001) -# are used in this example file to produce a quick simulation and movie. -# More appropriate values for realistic simulations would be -# k = 2.0e5 and dt = 0.0001, as in bench/in.chute. - -pair_style gran/hooke/history 2000.0 NULL 50.0 NULL 0.5 0 -pair_coeff * * - -timestep 0.001 - -fix 1 all nve/sphere -fix 2 all gravity 1.0 spherical 0.0 -180.0 -fix zlower all wall/gran hooke/history 2000.0 NULL 50.0 NULL 0.5 0 zplane 0.0 2000.0 - -region slab block -9.0 9.0 -9.0 9.0 10.0 15.0 units box -fix ins all pour 3000 1 300719 vol 0.13 50 region slab -Particle insertion: 402 every 3162 steps, 3000 by step 22135 - -compute 1 all erotate/sphere -thermo_style custom step atoms ke c_1 vol -thermo 1000 -thermo_modify lost ignore norm no -compute_modify thermo_temp dynamic/dof yes - -#dump id all atom 1000 dump.pour - -#dump 2 all image 1000 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 -#dump_modify 2 pad 5 - -#dump 3 all movie 1000 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 -#dump_modify 3 pad 5 - -run 25000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.2 - ghost atom cutoff = 1.2 - binsize = 0.6, bins = 34 34 28 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hooke/history, perpetual - attributes: half, newton off, size, history - pair build: half/size/bin/newtoff - stencil: half/bin/3d/newtoff - bin: standard -Per MPI rank memory allocation (min/avg/max) = 5.955 | 5.955 | 5.955 Mbytes -Step Atoms KinEng c_1 Volume - 0 0 -0 0 6600 - 1000 402 768.04606 0 6600 - 2000 402 1407.1714 0 6600 - 3000 402 1373.819 15.59952 6600 - 4000 804 1737.1399 39.311164 6600 - 5000 804 1571.3184 67.501382 6600 - 6000 804 1318.6439 77.636174 6600 - 7000 1206 1522.1986 68.863683 6600 - 8000 1206 1387.2223 64.067846 6600 - 9000 1206 1265.9044 51.726525 6600 - 10000 1608 1460.3212 48.844763 6600 - 11000 1608 1310.2001 53.532609 6600 - 12000 1608 1134.4592 48.567743 6600 - 13000 2010 1182.5037 45.620614 6600 - 14000 2010 1192.4303 39.066935 6600 - 15000 2010 967.05968 42.363789 6600 - 16000 2412 1119.8304 39.217157 6600 - 17000 2412 1063.7921 45.71714 6600 - 18000 2412 855.28326 42.745948 6600 - 19000 2814 970.7019 40.155896 6600 - 20000 2814 923.94347 34.590568 6600 - 21000 2814 793.75092 36.707509 6600 - 22000 2814 543.4546 37.669131 6600 - 23000 3000 446.47658 39.719019 6600 - 24000 3000 331.57201 24.034747 6600 - 25000 3000 239.90493 18.457205 6600 -Loop time of 8.66761 on 1 procs for 25000 steps with 3000 atoms - -Performance: 249203.592 tau/day, 2884.301 timesteps/s -99.7% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 4.5311 | 4.5311 | 4.5311 | 0.0 | 52.28 -Neigh | 1.4556 | 1.4556 | 1.4556 | 0.0 | 16.79 -Comm | 0.2322 | 0.2322 | 0.2322 | 0.0 | 2.68 -Output | 0.00084257 | 0.00084257 | 0.00084257 | 0.0 | 0.01 -Modify | 2.1642 | 2.1642 | 2.1642 | 0.0 | 24.97 -Other | | 0.2837 | | | 3.27 - -Nlocal: 3000 ave 3000 max 3000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 658 ave 658 max 658 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 13479 ave 13479 max 13479 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 13479 -Ave neighs/atom = 4.493 -Neighbor list builds = 1149 -Dangerous builds = 0 - -unfix ins -fix 2 all gravity 1.0 chute 26.0 -run 25000 -Per MPI rank memory allocation (min/avg/max) = 13.24 | 13.24 | 13.24 Mbytes -Step Atoms KinEng c_1 Volume - 25000 3000 239.90493 18.457205 6600 - 26000 3000 86.453151 19.990229 6600 - 27000 3000 104.03763 12.243926 6600 - 28000 3000 187.74939 11.703132 6600 - 29000 3000 316.59921 14.610301 6600 - 30000 3000 520.76149 18.82089 6600 - 31000 3000 821.71283 25.266473 6600 - 32000 3000 1153.8578 30.714985 6600 - 33000 3000 1520.1476 38.247011 6600 - 34000 3000 2006.3144 44.480026 6600 - 35000 3000 2556.4751 55.768118 6600 - 36000 3000 3160.9914 63.728696 6600 - 37000 3000 3877.5537 71.484742 6600 - 38000 3000 4675.4987 79.37485 6600 - 39000 3000 5479.8489 94.281786 6600 - 40000 3000 6350.6439 106.39353 6600 - 41000 3000 7245.0837 113.40306 6600 - 42000 3000 8227.1726 129.62268 6600 - 43000 3000 9422.0189 144.63991 6600 - 44000 3000 10616.036 149.84326 6600 - 45000 3000 11908.182 169.96204 6600 - 46000 3000 13257.313 184.73533 6600 - 47000 3000 14765.4 201.20237 6600 - 48000 3000 16184.643 202.00907 6600 - 49000 3000 17573.204 215.30429 6600 - 50000 3000 19117.749 232.28939 6600 -Loop time of 16.4345 on 1 procs for 25000 steps with 3000 atoms - -Performance: 131430.508 tau/day, 1521.186 timesteps/s -99.8% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 9.893 | 9.893 | 9.893 | 0.0 | 60.20 -Neigh | 2.1448 | 2.1448 | 2.1448 | 0.0 | 13.05 -Comm | 0.47991 | 0.47991 | 0.47991 | 0.0 | 2.92 -Output | 0.0011523 | 0.0011523 | 0.0011523 | 0.0 | 0.01 -Modify | 3.4635 | 3.4635 | 3.4635 | 0.0 | 21.07 -Other | | 0.4522 | | | 2.75 - -Nlocal: 3000 ave 3000 max 3000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 742 ave 742 max 742 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 13997 ave 13997 max 13997 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 13997 -Ave neighs/atom = 4.66567 -Neighbor list builds = 836 -Dangerous builds = 0 -Total wall time: 0:00:25 diff --git a/examples/pour/log.27Nov18.pour.g++.4 b/examples/pour/log.27Nov18.pour.g++.4 deleted file mode 100644 index 004bf92608..0000000000 --- a/examples/pour/log.27Nov18.pour.g++.4 +++ /dev/null @@ -1,175 +0,0 @@ -LAMMPS (27 Nov 2018) - using 1 OpenMP thread(s) per MPI task -# Pour granular particles into chute container, then induce flow - -atom_style sphere -boundary p p fm -newton off -comm_modify vel yes - -region reg block -10 10 -10 10 -0.5 16 units box -create_box 1 reg -Created orthogonal box = (-10 -10 -0.5) to (10 10 16) - 2 by 2 by 1 MPI processor grid - -neighbor 0.2 bin -neigh_modify delay 0 - -# IMPORTANT NOTE: these values of stiffness (2000) and timestep (0.001) -# are used in this example file to produce a quick simulation and movie. -# More appropriate values for realistic simulations would be -# k = 2.0e5 and dt = 0.0001, as in bench/in.chute. - -pair_style gran/hooke/history 2000.0 NULL 50.0 NULL 0.5 0 -pair_coeff * * - -timestep 0.001 - -fix 1 all nve/sphere -fix 2 all gravity 1.0 spherical 0.0 -180.0 -fix zlower all wall/gran hooke/history 2000.0 NULL 50.0 NULL 0.5 0 zplane 0.0 2000.0 - -region slab block -9.0 9.0 -9.0 9.0 10.0 15.0 units box -fix ins all pour 3000 1 300719 vol 0.13 50 region slab -Particle insertion: 402 every 3162 steps, 3000 by step 22135 - -compute 1 all erotate/sphere -thermo_style custom step atoms ke c_1 vol -thermo 1000 -thermo_modify lost ignore norm no -compute_modify thermo_temp dynamic/dof yes - -#dump id all atom 1000 dump.pour - -#dump 2 all image 1000 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30 -#dump_modify 2 pad 5 - -#dump 3 all movie 1000 movie.mpg type type # axes yes 0.8 0.02 view 80 -30 -#dump_modify 3 pad 5 - -run 25000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.2 - ghost atom cutoff = 1.2 - binsize = 0.6, bins = 34 34 28 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hooke/history, perpetual - attributes: half, newton off, size, history - pair build: half/size/bin/newtoff - stencil: half/bin/3d/newtoff - bin: standard -Per MPI rank memory allocation (min/avg/max) = 5.83 | 5.83 | 5.83 Mbytes -Step Atoms KinEng c_1 Volume - 0 0 -0 0 6600 - 1000 402 768.04606 0 6600 - 2000 402 1407.1714 0 6600 - 3000 402 1373.819 15.59952 6600 - 4000 804 1737.1399 39.311164 6600 - 5000 804 1571.3184 67.501382 6600 - 6000 804 1318.6439 77.636174 6600 - 7000 1206 1521.8348 69.010381 6600 - 8000 1206 1391.0761 64.407583 6600 - 9000 1206 1264.98 50.32567 6600 - 10000 1608 1462.7175 49.903609 6600 - 11000 1608 1317.5878 52.401196 6600 - 12000 1608 1120.9416 46.067058 6600 - 13000 2010 1200.1517 49.662302 6600 - 14000 2010 1180.2805 38.850379 6600 - 15000 2010 970.23519 39.121533 6600 - 16000 2412 1101.3888 44.051087 6600 - 17000 2412 1054.4967 43.489619 6600 - 18000 2412 850.25959 42.296696 6600 - 19000 2814 959.68841 42.757546 6600 - 20000 2814 933.72206 42.668586 6600 - 21000 2814 779.2842 42.116934 6600 - 22000 2814 537.68477 35.113909 6600 - 23000 3000 456.26221 36.394458 6600 - 24000 3000 334.38331 26.256087 6600 - 25000 3000 233.7217 18.768345 6600 -Loop time of 2.79912 on 4 procs for 25000 steps with 3000 atoms - -Performance: 771671.423 tau/day, 8931.382 timesteps/s -97.1% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 1.0916 | 1.1431 | 1.1982 | 4.0 | 40.84 -Neigh | 0.37439 | 0.39186 | 0.41149 | 2.6 | 14.00 -Comm | 0.32241 | 0.32795 | 0.33831 | 1.1 | 11.72 -Output | 0.00068283 | 0.0029467 | 0.0094671 | 6.9 | 0.11 -Modify | 0.5813 | 0.5952 | 0.60947 | 1.5 | 21.26 -Other | | 0.3381 | | | 12.08 - -Nlocal: 750 ave 765 max 730 min -Histogram: 1 0 0 0 1 0 0 0 1 1 -Nghost: 390.75 ave 393 max 385 min -Histogram: 1 0 0 0 0 0 0 0 1 2 -Neighs: 3548 ave 3643 max 3454 min -Histogram: 1 0 1 0 0 0 0 1 0 1 - -Total # of neighbors = 14192 -Ave neighs/atom = 4.73067 -Neighbor list builds = 1152 -Dangerous builds = 0 - -unfix ins -fix 2 all gravity 1.0 chute 26.0 -run 25000 -Per MPI rank memory allocation (min/avg/max) = 12.16 | 12.39 | 13.06 Mbytes -Step Atoms KinEng c_1 Volume - 25000 3000 233.7217 18.768345 6600 - 26000 3000 80.58756 21.114703 6600 - 27000 3000 112.90794 11.760837 6600 - 28000 3000 211.68857 11.667711 6600 - 29000 3000 368.27114 15.483397 6600 - 30000 3000 611.33941 21.023859 6600 - 31000 3000 902.04662 29.663904 6600 - 32000 3000 1188.6213 31.996848 6600 - 33000 3000 1626.3144 38.244424 6600 - 34000 3000 2068.1939 45.793779 6600 - 35000 3000 2654.4292 55.900641 6600 - 36000 3000 3212.0662 64.492942 6600 - 37000 3000 3942.9079 73.557353 6600 - 38000 3000 4710.2169 84.24051 6600 - 39000 3000 5513.597 93.737814 6600 - 40000 3000 6367.338 112.43633 6600 - 41000 3000 7417.7889 130.70338 6600 - 42000 3000 8428.2678 124.66302 6600 - 43000 3000 9498.0121 136.37107 6600 - 44000 3000 10680.269 149.21074 6600 - 45000 3000 11852.03 154.67802 6600 - 46000 3000 12896.699 167.10324 6600 - 47000 3000 14218.465 196.70386 6600 - 48000 3000 15555.796 204.40316 6600 - 49000 3000 16694.338 208.98934 6600 - 50000 3000 17936.665 192.19442 6600 -Loop time of 5.65089 on 4 procs for 25000 steps with 3000 atoms - -Performance: 382240.368 tau/day, 4424.078 timesteps/s -94.3% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 2.5656 | 2.5853 | 2.6068 | 0.9 | 45.75 -Neigh | 0.57736 | 0.59939 | 0.61824 | 1.9 | 10.61 -Comm | 0.58146 | 0.63908 | 0.70461 | 5.5 | 11.31 -Output | 0.00081015 | 0.002184 | 0.0061922 | 5.0 | 0.04 -Modify | 0.91975 | 0.93371 | 0.95875 | 1.5 | 16.52 -Other | | 0.8912 | | | 15.77 - -Nlocal: 750 ave 758 max 741 min -Histogram: 1 0 0 0 0 2 0 0 0 1 -Nghost: 404 ave 417 max 395 min -Histogram: 1 0 1 0 1 0 0 0 0 1 -Neighs: 3603.75 ave 3695 max 3528 min -Histogram: 1 0 0 1 1 0 0 0 0 1 - -Total # of neighbors = 14415 -Ave neighs/atom = 4.805 -Neighbor list builds = 827 -Dangerous builds = 0 -Total wall time: 0:00:08 From 4a7ab34568a4413cafe888b84c4ff4e690e2c207 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 22:57:56 -0400 Subject: [PATCH 444/445] lift restriction to Sphinx version < 6.0, enable jquery extension --- doc/utils/requirements.txt | 3 ++- doc/utils/sphinx-config/conf.py.in | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/utils/requirements.txt b/doc/utils/requirements.txt index 8bec6d4148..a7a03e6e41 100644 --- a/doc/utils/requirements.txt +++ b/doc/utils/requirements.txt @@ -1,5 +1,6 @@ -Sphinx<6.0.0 +Sphinx < 7.0.0 sphinxcontrib-spelling +sphinxcontrib-jquery >=3.0.0 git+https://github.com/akohlmey/sphinx-fortran@parallel-read sphinx_tabs breathe diff --git a/doc/utils/sphinx-config/conf.py.in b/doc/utils/sphinx-config/conf.py.in index e8a67cc4f6..0da553d755 100644 --- a/doc/utils/sphinx-config/conf.py.in +++ b/doc/utils/sphinx-config/conf.py.in @@ -47,6 +47,7 @@ extensions = [ 'sphinx.ext.mathjax', 'sphinx.ext.imgmath', 'sphinx.ext.autodoc', + 'sphinxcontrib.jquery', 'sphinxfortran.fortran_domain', 'sphinx_tabs.tabs', 'table_from_list', From 21c71bf35d72875202e2d2b615db84eec7437fb2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Mar 2023 23:36:13 -0400 Subject: [PATCH 445/445] mention project boards. remove reference to milestones. --- doc/github-development-workflow.md | 32 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/doc/github-development-workflow.md b/doc/github-development-workflow.md index 830ce85f48..fccd75d29a 100644 --- a/doc/github-development-workflow.md +++ b/doc/github-development-workflow.md @@ -123,7 +123,7 @@ request is merged. The template for pull requests includes a header where connections between pull requests and issues can be listed, and thus where this comment should be placed. -## Milestones and Release Planning +## Release Planning LAMMPS uses a continuous release development model with incremental changes, i.e. significant effort is made -- including automated pre-merge @@ -132,24 +132,28 @@ broken. These tests are run after every update to a pull request. More extensive and time-consuming tests (including regression testing) are performed after code is merged to the "develop" branch. There are feature releases of LAMMPS made about every 4-6 weeks at a point, when the LAMMPS -developers feel, that a sufficient number of changes has been included +developers feel, that a sufficient number of changes have been included and all post-merge testing has been successful. These feature releases are marked with a `patch_` tag and the "release" branch follows only these versions with fast-forward merges. While "develop" may be temporarily broken through issues only detected by the post-merge tests, The "release" branch is always supposed to be of production quality. -About once each year, there is a "stable" release of LAMMPS. -These have seen additional, manual testing and review of -results from testing with instrumented code and static code analysis. -Also, the last few feature releases before a stable release are "release -candidate" versions which only contain bug fixes, feature additions to -peripheral functionality, and documentation updates. In between stable -releases, bug fixes and infrastructure updates are back-ported from the -"develop" branch to the "maintenance" branch and occasionally merged -into "stable" and published as update releases. +About once each year, there is a "stable" release of LAMMPS. These have +seen additional, manual testing and review of results from testing with +instrumented code and static code analysis. Also, the last few feature +releases before a stable release are "release candidate" versions which +only contain bug fixes, feature additions to peripheral functionality, +and documentation updates. In between stable releases, bug fixes and +infrastructure updates are back-ported from the "develop" branch to the +"maintenance" branch and occasionally merged into "stable" and published +as update releases. + +## Project Management For release planning and the information of code contributors, issues -and pull requests being actively worked on are assigned a "milestone", -which corresponds to the next stable release or the stable release after -that, with a tentative release date. +and pull requests are being managed with GitHub Project Boards. There +are currently three boards: LAMMPS Feature Requests, LAMMPS Bug Reports, +and LAMMPS Pull Requests. Each board is organized in columns where +submissions are categorized. Within each column the entries are +(manually) sorted according their priority.