changes for next patch, 2d disc options for spheres, fix external upgrade, bug fixes for fix ave/chunk for density calcs, Aidan doc page citation deconvolution

This commit is contained in:
Steve Plimpton
2017-03-21 08:56:37 -06:00
parent 145e682ad3
commit dcede304df
112 changed files with 912 additions and 534 deletions

View File

@ -22,6 +22,7 @@
#include "group.h"
#include "error.h"
#include "force.h"
#include "domain.h"
#include "math_vector.h"
#include "math_extra.h"
@ -29,8 +30,6 @@ using namespace LAMMPS_NS;
using namespace FixConst;
using namespace MathExtra;
#define INERTIA 0.4 // moment of inertia prefactor for sphere
/* ---------------------------------------------------------------------- */
FixNHSphere::FixNHSphere(LAMMPS *lmp, int narg, char **arg) :
@ -38,6 +37,21 @@ FixNHSphere::FixNHSphere(LAMMPS *lmp, int narg, char **arg) :
{
if (!atom->sphere_flag)
error->all(FLERR,"Fix nvt/nph/npt sphere requires atom style sphere");
// inertia = moment of inertia prefactor for sphere or disc
inertia = 0.4;
int iarg = 3;
while (iarg < narg) {
if (strcmp(arg[iarg],"disc") == 0){
inertia = 0.5;
if (domain->dimension != 2)
error->all(FLERR,
"Fix nvt/nph/npt sphere disc option requires 2d simulation");
}
iarg++;
}
}
/* ---------------------------------------------------------------------- */
@ -55,7 +69,7 @@ void FixNHSphere::init()
if (mask[i] & groupbit)
if (radius[i] == 0.0)
error->one(FLERR,"Fix nvt/npt/nph/sphere require extended particles");
FixNH::init();
}
@ -79,7 +93,7 @@ void FixNHSphere::nve_v()
// set timestep here since dt may have changed or come via rRESPA
double dtfrotate = dtf / INERTIA;
double dtfrotate = dtf / inertia;
double dtirotate;
// update omega for all particles