whitespace fixes
This commit is contained in:
@ -72,6 +72,6 @@ void AtomVecDipole::grow_pointers()
|
|||||||
void AtomVecDipole::data_atom_post(int ilocal)
|
void AtomVecDipole::data_atom_post(int ilocal)
|
||||||
{
|
{
|
||||||
double *mu_one = mu[ilocal];
|
double *mu_one = mu[ilocal];
|
||||||
mu_one[3] =
|
mu_one[3] =
|
||||||
sqrt(mu_one[0]*mu_one[0] + mu_one[1]*mu_one[1] + mu_one[2]*mu_one[2]);
|
sqrt(mu_one[0]*mu_one[0] + mu_one[1]*mu_one[1] + mu_one[2]*mu_one[2]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -320,7 +320,7 @@ void FixPour::init()
|
|||||||
error->all(FLERR,"No fix gravity defined for fix pour");
|
error->all(FLERR,"No fix gravity defined for fix pour");
|
||||||
|
|
||||||
int varflag = ((FixGravity *) modify->fix[ifix])->varflag;
|
int varflag = ((FixGravity *) modify->fix[ifix])->varflag;
|
||||||
if (varflag != CONSTANT)
|
if (varflag != CONSTANT)
|
||||||
error->all(FLERR,"Fix gravity for fix pour must be constant");
|
error->all(FLERR,"Fix gravity for fix pour must be constant");
|
||||||
|
|
||||||
double xgrav = ((FixGravity *) modify->fix[ifix])->xgrav;
|
double xgrav = ((FixGravity *) modify->fix[ifix])->xgrav;
|
||||||
|
|||||||
@ -31,7 +31,7 @@ AtomVecAngle::AtomVecAngle(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
// order of fields in a string does not matter
|
// order of fields in a string does not matter
|
||||||
// except: fields_data_atom & fields_data_vel must match data file
|
// except: fields_data_atom & fields_data_vel must match data file
|
||||||
|
|
||||||
fields_grow = (char *)
|
fields_grow = (char *)
|
||||||
"molecule num_bond bond_type bond_atom "
|
"molecule num_bond bond_type bond_atom "
|
||||||
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 nspecial special";
|
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 nspecial special";
|
||||||
fields_copy = (char *)
|
fields_copy = (char *)
|
||||||
@ -45,7 +45,7 @@ AtomVecAngle::AtomVecAngle(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
fields_exchange = (char *)
|
fields_exchange = (char *)
|
||||||
"molecule num_bond bond_type bond_atom "
|
"molecule num_bond bond_type bond_atom "
|
||||||
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 nspecial special";
|
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 nspecial special";
|
||||||
fields_restart = (char *)
|
fields_restart = (char *)
|
||||||
"molecule num_bond bond_type bond_atom "
|
"molecule num_bond bond_type bond_atom "
|
||||||
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3";
|
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3";
|
||||||
fields_create = (char *) "molecule num_bond num_angle nspecial";
|
fields_create = (char *) "molecule num_bond num_angle nspecial";
|
||||||
|
|||||||
@ -31,7 +31,7 @@ AtomVecBond::AtomVecBond(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
// order of fields in a string does not matter
|
// order of fields in a string does not matter
|
||||||
// except: fields_data_atom & fields_data_vel must match data file
|
// except: fields_data_atom & fields_data_vel must match data file
|
||||||
|
|
||||||
fields_grow = (char *)
|
fields_grow = (char *)
|
||||||
"molecule num_bond bond_type bond_atom nspecial special";
|
"molecule num_bond bond_type bond_atom nspecial special";
|
||||||
fields_copy = (char *)
|
fields_copy = (char *)
|
||||||
"molecule num_bond bond_type bond_atom nspecial special";
|
"molecule num_bond bond_type bond_atom nspecial special";
|
||||||
|
|||||||
@ -36,7 +36,7 @@ class AtomVecBond : public AtomVec {
|
|||||||
void data_atom_post(int);
|
void data_atom_post(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int *num_bond;
|
int *num_bond;
|
||||||
int **bond_type;
|
int **bond_type;
|
||||||
int **nspecial;
|
int **nspecial;
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ AtomVecFull::AtomVecFull(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
// order of fields in a string does not matter
|
// order of fields in a string does not matter
|
||||||
// except: fields_data_atom & fields_data_vel must match data file
|
// except: fields_data_atom & fields_data_vel must match data file
|
||||||
|
|
||||||
fields_grow = (char *)
|
fields_grow = (char *)
|
||||||
"q molecule num_bond bond_type bond_atom "
|
"q molecule num_bond bond_type bond_atom "
|
||||||
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 "
|
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 "
|
||||||
"num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 "
|
"num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 "
|
||||||
@ -60,14 +60,14 @@ AtomVecFull::AtomVecFull(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
"num_improper improper_type improper_atom1 improper_atom2 "
|
"num_improper improper_type improper_atom1 improper_atom2 "
|
||||||
"improper_atom3 improper_atom4 "
|
"improper_atom3 improper_atom4 "
|
||||||
"nspecial special";
|
"nspecial special";
|
||||||
fields_restart = (char *)
|
fields_restart = (char *)
|
||||||
"q molecule num_bond bond_type bond_atom "
|
"q molecule num_bond bond_type bond_atom "
|
||||||
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 "
|
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 "
|
||||||
"num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 "
|
"num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 "
|
||||||
"dihedral_atom3 dihedral_atom4 "
|
"dihedral_atom3 dihedral_atom4 "
|
||||||
"num_improper improper_type improper_atom1 improper_atom2 "
|
"num_improper improper_type improper_atom1 improper_atom2 "
|
||||||
"improper_atom3 improper_atom4";
|
"improper_atom3 improper_atom4";
|
||||||
fields_create = (char *)
|
fields_create = (char *)
|
||||||
"q molecule num_bond num_angle num_dihedral num_improper nspecial";
|
"q molecule num_bond num_angle num_dihedral num_improper nspecial";
|
||||||
fields_data_atom = (char *) "id molecule type q x";
|
fields_data_atom = (char *) "id molecule type q x";
|
||||||
fields_data_vel = (char *) "id v";
|
fields_data_vel = (char *) "id v";
|
||||||
@ -194,13 +194,13 @@ void AtomVecFull::pack_restart_post(int ilocal)
|
|||||||
|
|
||||||
if (any_dihedral_negative) {
|
if (any_dihedral_negative) {
|
||||||
for (int m = 0; m < num_dihedral[ilocal]; m++)
|
for (int m = 0; m < num_dihedral[ilocal]; m++)
|
||||||
if (dihedral_negative[m])
|
if (dihedral_negative[m])
|
||||||
dihedral_type[ilocal][m] = -dihedral_type[ilocal][m];
|
dihedral_type[ilocal][m] = -dihedral_type[ilocal][m];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (any_improper_negative) {
|
if (any_improper_negative) {
|
||||||
for (int m = 0; m < num_improper[ilocal]; m++)
|
for (int m = 0; m < num_improper[ilocal]; m++)
|
||||||
if (improper_negative[m])
|
if (improper_negative[m])
|
||||||
improper_type[ilocal][m] = -improper_type[ilocal][m];
|
improper_type[ilocal][m] = -improper_type[ilocal][m];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,7 @@ AtomVecMolecular::AtomVecMolecular(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
// order of fields in a string does not matter
|
// order of fields in a string does not matter
|
||||||
// except: fields_data_atom & fields_data_vel must match data file
|
// except: fields_data_atom & fields_data_vel must match data file
|
||||||
|
|
||||||
fields_grow = (char *)
|
fields_grow = (char *)
|
||||||
"molecule num_bond bond_type bond_atom "
|
"molecule num_bond bond_type bond_atom "
|
||||||
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 "
|
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 "
|
||||||
"num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 "
|
"num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 "
|
||||||
@ -60,14 +60,14 @@ AtomVecMolecular::AtomVecMolecular(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
"num_improper improper_type improper_atom1 improper_atom2 "
|
"num_improper improper_type improper_atom1 improper_atom2 "
|
||||||
"improper_atom3 improper_atom4 "
|
"improper_atom3 improper_atom4 "
|
||||||
"nspecial special";
|
"nspecial special";
|
||||||
fields_restart = (char *)
|
fields_restart = (char *)
|
||||||
"molecule num_bond bond_type bond_atom "
|
"molecule num_bond bond_type bond_atom "
|
||||||
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 "
|
"num_angle angle_type angle_atom1 angle_atom2 angle_atom3 "
|
||||||
"num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 "
|
"num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 "
|
||||||
"dihedral_atom3 dihedral_atom4 "
|
"dihedral_atom3 dihedral_atom4 "
|
||||||
"num_improper improper_type improper_atom1 improper_atom2 "
|
"num_improper improper_type improper_atom1 improper_atom2 "
|
||||||
"improper_atom3 improper_atom4";
|
"improper_atom3 improper_atom4";
|
||||||
fields_create = (char *)
|
fields_create = (char *)
|
||||||
"molecule num_bond num_angle num_dihedral num_improper nspecial";
|
"molecule num_bond num_angle num_dihedral num_improper nspecial";
|
||||||
fields_data_atom = (char *) "id molecule type x";
|
fields_data_atom = (char *) "id molecule type x";
|
||||||
fields_data_vel = (char *) "id v";
|
fields_data_vel = (char *) "id v";
|
||||||
@ -194,13 +194,13 @@ void AtomVecMolecular::pack_restart_post(int ilocal)
|
|||||||
|
|
||||||
if (any_dihedral_negative) {
|
if (any_dihedral_negative) {
|
||||||
for (int m = 0; m < num_dihedral[ilocal]; m++)
|
for (int m = 0; m < num_dihedral[ilocal]; m++)
|
||||||
if (dihedral_negative[m])
|
if (dihedral_negative[m])
|
||||||
dihedral_type[ilocal][m] = -dihedral_type[ilocal][m];
|
dihedral_type[ilocal][m] = -dihedral_type[ilocal][m];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (any_improper_negative) {
|
if (any_improper_negative) {
|
||||||
for (int m = 0; m < num_improper[ilocal]; m++)
|
for (int m = 0; m < num_improper[ilocal]; m++)
|
||||||
if (improper_negative[m])
|
if (improper_negative[m])
|
||||||
improper_type[ilocal][m] = -improper_type[ilocal][m];
|
improper_type[ilocal][m] = -improper_type[ilocal][m];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,7 +108,7 @@ void AtomVecPeri::data_atom_post(int ilocal)
|
|||||||
x0[ilocal][1] = x[ilocal][1];
|
x0[ilocal][1] = x[ilocal][1];
|
||||||
x0[ilocal][2] = x[ilocal][2];
|
x0[ilocal][2] = x[ilocal][2];
|
||||||
|
|
||||||
if (rmass[ilocal] <= 0.0)
|
if (rmass[ilocal] <= 0.0)
|
||||||
error->one(FLERR,"Invalid mass in Atoms section of data file");
|
error->one(FLERR,"Invalid mass in Atoms section of data file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -94,7 +94,7 @@ void AtomVecSpin::force_clear(int n, size_t nbytes)
|
|||||||
void AtomVecSpin::data_atom_post(int ilocal)
|
void AtomVecSpin::data_atom_post(int ilocal)
|
||||||
{
|
{
|
||||||
double *sp_one = sp[ilocal];
|
double *sp_one = sp[ilocal];
|
||||||
double norm =
|
double norm =
|
||||||
1.0/sqrt(sp_one[0]*sp_one[0] + sp_one[1]*sp_one[1] + sp_one[2]*sp_one[2]);
|
1.0/sqrt(sp_one[0]*sp_one[0] + sp_one[1]*sp_one[1] + sp_one[2]*sp_one[2]);
|
||||||
sp_one[0] *= norm;
|
sp_one[0] *= norm;
|
||||||
sp_one[1] *= norm;
|
sp_one[1] *= norm;
|
||||||
|
|||||||
@ -35,7 +35,7 @@ AtomVecWavepacket::AtomVecWavepacket(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
atom->electron_flag = 1; // compatible with eff
|
atom->electron_flag = 1; // compatible with eff
|
||||||
atom->q_flag = atom->spin_flag = atom->eradius_flag =
|
atom->q_flag = atom->spin_flag = atom->eradius_flag =
|
||||||
atom->ervel_flag = atom->erforce_flag = 1;
|
atom->ervel_flag = atom->erforce_flag = 1;
|
||||||
atom->cs_flag = atom->csforce_flag =
|
atom->cs_flag = atom->csforce_flag =
|
||||||
atom->vforce_flag = atom->ervelforce_flag = atom->etag_flag = 1;
|
atom->vforce_flag = atom->ervelforce_flag = atom->etag_flag = 1;
|
||||||
|
|
||||||
// strings with peratom variables to include in each AtomVec method
|
// strings with peratom variables to include in each AtomVec method
|
||||||
@ -43,7 +43,7 @@ AtomVecWavepacket::AtomVecWavepacket(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
// order of fields in a string does not matter
|
// order of fields in a string does not matter
|
||||||
// except: fields_data_atom & fields_data_vel must match data file
|
// except: fields_data_atom & fields_data_vel must match data file
|
||||||
|
|
||||||
fields_grow = (char *)
|
fields_grow = (char *)
|
||||||
"q spin eradius ervel erforce cs csforce "
|
"q spin eradius ervel erforce cs csforce "
|
||||||
"vforce ervelforce etag";
|
"vforce ervelforce etag";
|
||||||
fields_copy = (char *) "q spin eradius ervel cs etag";
|
fields_copy = (char *) "q spin eradius ervel cs etag";
|
||||||
|
|||||||
@ -34,7 +34,7 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp)
|
AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp)
|
||||||
{
|
{
|
||||||
molecular = 0;
|
molecular = 0;
|
||||||
mass_type = 1;
|
mass_type = 1;
|
||||||
@ -61,35 +61,35 @@ AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
// order of fields in a string does not matter
|
// order of fields in a string does not matter
|
||||||
// except: fields_data_atom & fields_data_vel must match data file
|
// except: fields_data_atom & fields_data_vel must match data file
|
||||||
|
|
||||||
fields_grow = (char *)
|
fields_grow = (char *)
|
||||||
"esph desph vfrac rmass x0 radius contact_radius molecule "
|
"esph desph vfrac rmass x0 radius contact_radius molecule "
|
||||||
"smd_data_9 vest smd_stress "
|
"smd_data_9 vest smd_stress "
|
||||||
"eff_plastic_strain eff_plastic_strain_rate damage";
|
"eff_plastic_strain eff_plastic_strain_rate damage";
|
||||||
fields_copy = (char *)
|
fields_copy = (char *)
|
||||||
"esph vfrac rmass x0 radius contact_radius molecule "
|
"esph vfrac rmass x0 radius contact_radius molecule "
|
||||||
"eff_plastic_strain eff_plastic_strain_rate vest "
|
"eff_plastic_strain eff_plastic_strain_rate vest "
|
||||||
"smd_data_9 smd_stress damage";
|
"smd_data_9 smd_stress damage";
|
||||||
fields_comm = (char *) "radius vfrac vest esph";
|
fields_comm = (char *) "radius vfrac vest esph";
|
||||||
fields_comm_vel = (char *) "radius vfrac vest esph";
|
fields_comm_vel = (char *) "radius vfrac vest esph";
|
||||||
fields_reverse = (char *) "desph";
|
fields_reverse = (char *) "desph";
|
||||||
fields_border = (char *)
|
fields_border = (char *)
|
||||||
"x0 molecule radius rmass vfrac contact_radius esph "
|
"x0 molecule radius rmass vfrac contact_radius esph "
|
||||||
"eff_plastic_strain smd_data_9 smd_stress";
|
"eff_plastic_strain smd_data_9 smd_stress";
|
||||||
fields_border_vel = (char *)
|
fields_border_vel = (char *)
|
||||||
"x0 molecule radius rmass vfrac contact_radius esph "
|
"x0 molecule radius rmass vfrac contact_radius esph "
|
||||||
"eff_plastic_strain smd_data_9 smd_stress vest";
|
"eff_plastic_strain smd_data_9 smd_stress vest";
|
||||||
fields_exchange = (char *)
|
fields_exchange = (char *)
|
||||||
"x0 molecule radius rmass vfrac contact_radius esph "
|
"x0 molecule radius rmass vfrac contact_radius esph "
|
||||||
"eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress "
|
"eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress "
|
||||||
"vest damage";
|
"vest damage";
|
||||||
fields_restart = (char *)
|
fields_restart = (char *)
|
||||||
"x0 molecule radius rmass vfrac contact_radius esph "
|
"x0 molecule radius rmass vfrac contact_radius esph "
|
||||||
"eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress "
|
"eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress "
|
||||||
"vest damage";
|
"vest damage";
|
||||||
fields_create = (char *)
|
fields_create = (char *)
|
||||||
"x0 vest vfrac rmass radius contact_radius molecule esph "
|
"x0 vest vfrac rmass radius contact_radius molecule esph "
|
||||||
"eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress damage";
|
"eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress damage";
|
||||||
fields_data_atom = (char *)
|
fields_data_atom = (char *)
|
||||||
"id type molecule vfrac rmass radius contact_radius x0 x";
|
"id type molecule vfrac rmass radius contact_radius x0 x";
|
||||||
fields_data_vel = (char *) "id v";
|
fields_data_vel = (char *) "id v";
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ void AtomVecSMD::grow_pointers()
|
|||||||
NOTE: does f need to be re-cleared?
|
NOTE: does f need to be re-cleared?
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecSMD::force_clear(int n, size_t nbytes)
|
void AtomVecSMD::force_clear(int n, size_t nbytes)
|
||||||
{
|
{
|
||||||
memset(&desph[n],0,nbytes);
|
memset(&desph[n],0,nbytes);
|
||||||
memset(&f[n][0],0,3*nbytes);
|
memset(&f[n][0],0,3*nbytes);
|
||||||
@ -151,7 +151,7 @@ void AtomVecSMD::create_atom_post(int ilocal)
|
|||||||
radius[ilocal] = 0.5;
|
radius[ilocal] = 0.5;
|
||||||
contact_radius[ilocal] = 0.5;
|
contact_radius[ilocal] = 0.5;
|
||||||
molecule[ilocal] = 1;
|
molecule[ilocal] = 1;
|
||||||
|
|
||||||
smd_data_9[ilocal][0] = 1.0; // xx
|
smd_data_9[ilocal][0] = 1.0; // xx
|
||||||
smd_data_9[ilocal][4] = 1.0; // yy
|
smd_data_9[ilocal][4] = 1.0; // yy
|
||||||
smd_data_9[ilocal][8] = 1.0; // zz
|
smd_data_9[ilocal][8] = 1.0; // zz
|
||||||
|
|||||||
18
src/atom.cpp
18
src/atom.cpp
@ -139,7 +139,7 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp)
|
|||||||
etag = NULL;
|
etag = NULL;
|
||||||
|
|
||||||
// USER-DPD package
|
// USER-DPD package
|
||||||
|
|
||||||
uCond = uMech = uChem = uCG = uCGnew = NULL;
|
uCond = uMech = uChem = uCG = uCGnew = NULL;
|
||||||
duChem = dpdTheta = NULL;
|
duChem = dpdTheta = NULL;
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp)
|
|||||||
damage = NULL;
|
damage = NULL;
|
||||||
|
|
||||||
// USER-SPH package
|
// USER-SPH package
|
||||||
|
|
||||||
rho = drho = esph = desph = cv = NULL;
|
rho = drho = esph = desph = cv = NULL;
|
||||||
vest = NULL;
|
vest = NULL;
|
||||||
|
|
||||||
@ -569,17 +569,17 @@ void Atom::peratom_create()
|
|||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
add info for a single per-atom vector/array to PerAtom data struct
|
add info for a single per-atom vector/array to PerAtom data struct
|
||||||
cols = 0: per-atom vector
|
cols = 0: per-atom vector
|
||||||
cols = N: static per-atom array with N columns
|
cols = N: static per-atom array with N columns
|
||||||
use add_peratom_vary() when column count varies per atom
|
use add_peratom_vary() when column count varies per atom
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void Atom::add_peratom(const char *name, void *address,
|
void Atom::add_peratom(const char *name, void *address,
|
||||||
int datatype, int cols, int threadflag)
|
int datatype, int cols, int threadflag)
|
||||||
{
|
{
|
||||||
if (nperatom == maxperatom) {
|
if (nperatom == maxperatom) {
|
||||||
maxperatom += DELTA_PERATOM;
|
maxperatom += DELTA_PERATOM;
|
||||||
peratom = (PerAtom *)
|
peratom = (PerAtom *)
|
||||||
memory->srealloc(peratom,maxperatom*sizeof(PerAtom),"atom:peratom");
|
memory->srealloc(peratom,maxperatom*sizeof(PerAtom),"atom:peratom");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -606,7 +606,7 @@ void Atom::add_peratom_change_columns(const char *name, int cols)
|
|||||||
int i;
|
int i;
|
||||||
for (int i = 0; i < nperatom; i++)
|
for (int i = 0; i < nperatom; i++)
|
||||||
if (strcmp(name,peratom[i].name) == 0) peratom[i].cols = cols;
|
if (strcmp(name,peratom[i].name) == 0) peratom[i].cols = cols;
|
||||||
if (i == nperatom)
|
if (i == nperatom)
|
||||||
error->all(FLERR,"Could not find name of peratom array for column change");
|
error->all(FLERR,"Could not find name of peratom array for column change");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -616,18 +616,18 @@ void Atom::add_peratom_change_columns(const char *name, int cols)
|
|||||||
for collength = 0:
|
for collength = 0:
|
||||||
length = address of peratom vector with column count per atom
|
length = address of peratom vector with column count per atom
|
||||||
e.g. num_bond
|
e.g. num_bond
|
||||||
for collength = N:
|
for collength = N:
|
||||||
length = address of peratom array with column count per atom
|
length = address of peratom array with column count per atom
|
||||||
collength = index of column (1 to N) in peratom array with count
|
collength = index of column (1 to N) in peratom array with count
|
||||||
e.g. nspecial
|
e.g. nspecial
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void Atom::add_peratom_vary(const char *name, void *address,
|
void Atom::add_peratom_vary(const char *name, void *address,
|
||||||
int datatype, int *cols, void *length, int collength)
|
int datatype, int *cols, void *length, int collength)
|
||||||
{
|
{
|
||||||
if (nperatom == maxperatom) {
|
if (nperatom == maxperatom) {
|
||||||
maxperatom += DELTA_PERATOM;
|
maxperatom += DELTA_PERATOM;
|
||||||
peratom = (PerAtom *)
|
peratom = (PerAtom *)
|
||||||
memory->srealloc(peratom,maxperatom*sizeof(PerAtom),"atom:peratom");
|
memory->srealloc(peratom,maxperatom*sizeof(PerAtom),"atom:peratom");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class Atom : protected Pointers {
|
|||||||
bigint nlines; // number of lines
|
bigint nlines; // number of lines
|
||||||
bigint ntris; // number of triangles
|
bigint ntris; // number of triangles
|
||||||
bigint nbodies; // number of bodies
|
bigint nbodies; // number of bodies
|
||||||
|
|
||||||
// system properties
|
// system properties
|
||||||
|
|
||||||
bigint nbonds,nangles,ndihedrals,nimpropers;
|
bigint nbonds,nangles,ndihedrals,nimpropers;
|
||||||
@ -260,7 +260,7 @@ class Atom : protected Pointers {
|
|||||||
void peratom_create();
|
void peratom_create();
|
||||||
void add_peratom(const char *, void *, int, int, int threadflag=0);
|
void add_peratom(const char *, void *, int, int, int threadflag=0);
|
||||||
void add_peratom_change_columns(const char *, int);
|
void add_peratom_change_columns(const char *, int);
|
||||||
void add_peratom_vary(const char *, void *, int, int *,
|
void add_peratom_vary(const char *, void *, int, int *,
|
||||||
void *, int collength=0);
|
void *, int collength=0);
|
||||||
void create_avec(const char *, int, char **, int);
|
void create_avec(const char *, int, char **, int);
|
||||||
virtual class AtomVec *new_avec(const char *, int, int &);
|
virtual class AtomVec *new_avec(const char *, int, int &);
|
||||||
|
|||||||
@ -280,7 +280,7 @@ void AtomVec::copy(int i, int j, int delflag)
|
|||||||
double **array = *((double ***) pdata);
|
double **array = *((double ***) pdata);
|
||||||
for (m = 0; m < cols; m++)
|
for (m = 0; m < cols; m++)
|
||||||
array[j][m] = array[i][m];
|
array[j][m] = array[i][m];
|
||||||
} else {
|
} else {
|
||||||
double **array = *((double ***) pdata);
|
double **array = *((double ***) pdata);
|
||||||
collength = mcopy.collength[n];
|
collength = mcopy.collength[n];
|
||||||
plength = mcopy.plength[n];
|
plength = mcopy.plength[n];
|
||||||
@ -913,7 +913,7 @@ int AtomVec::pack_border(int n, int *list, double *buf, int pbc_flag, int *pbc)
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
int AtomVec::pack_border_vel(int n, int *list, double *buf,
|
int AtomVec::pack_border_vel(int n, int *list, double *buf,
|
||||||
int pbc_flag, int *pbc)
|
int pbc_flag, int *pbc)
|
||||||
{
|
{
|
||||||
int i,j,m,mm,nn,datatype,cols;
|
int i,j,m,mm,nn,datatype,cols;
|
||||||
@ -1207,7 +1207,7 @@ int AtomVec::pack_exchange(int i, double *buf)
|
|||||||
buf[m++] = ubuf(type[i]).d;
|
buf[m++] = ubuf(type[i]).d;
|
||||||
buf[m++] = ubuf(mask[i]).d;
|
buf[m++] = ubuf(mask[i]).d;
|
||||||
buf[m++] = ubuf(image[i]).d;
|
buf[m++] = ubuf(image[i]).d;
|
||||||
|
|
||||||
if (nexchange) {
|
if (nexchange) {
|
||||||
for (nn = 0; nn < nexchange; nn++) {
|
for (nn = 0; nn < nexchange; nn++) {
|
||||||
pdata = mexchange.pdata[nn];
|
pdata = mexchange.pdata[nn];
|
||||||
@ -1252,7 +1252,7 @@ int AtomVec::pack_exchange(int i, double *buf)
|
|||||||
bigint *vec = *((bigint **) pdata);
|
bigint *vec = *((bigint **) pdata);
|
||||||
buf[m++] = ubuf(vec[i]).d;
|
buf[m++] = ubuf(vec[i]).d;
|
||||||
} else if (cols > 0) {
|
} else if (cols > 0) {
|
||||||
bigint **array = *((bigint ***) pdata);
|
bigint **array = *((bigint ***) pdata);
|
||||||
for (mm = 0; mm < cols; mm++)
|
for (mm = 0; mm < cols; mm++)
|
||||||
buf[m++] = ubuf(array[i][mm]).d;
|
buf[m++] = ubuf(array[i][mm]).d;
|
||||||
} else {
|
} else {
|
||||||
@ -2438,7 +2438,7 @@ void AtomVec::setup_fields()
|
|||||||
size_data_atom = 0;
|
size_data_atom = 0;
|
||||||
for (n = 0; n < ndata_atom; n++) {
|
for (n = 0; n < ndata_atom; n++) {
|
||||||
cols = mdata_atom.cols[n];
|
cols = mdata_atom.cols[n];
|
||||||
if (strcmp(atom->peratom[mdata_atom.index[n]].name,"x") == 0)
|
if (strcmp(atom->peratom[mdata_atom.index[n]].name,"x") == 0)
|
||||||
xcol_data = size_data_atom + 1;
|
xcol_data = size_data_atom + 1;
|
||||||
if (cols == 0) size_data_atom++;
|
if (cols == 0) size_data_atom++;
|
||||||
else size_data_atom += cols;
|
else size_data_atom += cols;
|
||||||
@ -2471,7 +2471,7 @@ int AtomVec::process_fields(char *str, const char *default_str, Method *method)
|
|||||||
int ndef = tokenize((char *) default_str,defwords,copy2);
|
int ndef = tokenize((char *) default_str,defwords,copy2);
|
||||||
|
|
||||||
// process fields one by one, add to index vector
|
// process fields one by one, add to index vector
|
||||||
|
|
||||||
Atom::PerAtom *peratom = atom->peratom;
|
Atom::PerAtom *peratom = atom->peratom;
|
||||||
int nperatom = atom->nperatom;
|
int nperatom = atom->nperatom;
|
||||||
|
|
||||||
@ -2479,7 +2479,7 @@ int AtomVec::process_fields(char *str, const char *default_str, Method *method)
|
|||||||
int match;
|
int match;
|
||||||
|
|
||||||
for (int i = 0; i < nfield; i++) {
|
for (int i = 0; i < nfield; i++) {
|
||||||
|
|
||||||
// find field in master Atom::peratom list
|
// find field in master Atom::peratom list
|
||||||
|
|
||||||
for (match = 0; match < nperatom; match++)
|
for (match = 0; match < nperatom; match++)
|
||||||
@ -2495,18 +2495,18 @@ int AtomVec::process_fields(char *str, const char *default_str, Method *method)
|
|||||||
|
|
||||||
for (match = 0; match < i; match++)
|
for (match = 0; match < i; match++)
|
||||||
if (index[i] == index[match]) {
|
if (index[i] == index[match]) {
|
||||||
char str[128];
|
char str[128];
|
||||||
sprintf(str,"Peratom field %s is repeated",words[i]);
|
sprintf(str,"Peratom field %s is repeated",words[i]);
|
||||||
error->all(FLERR,str);
|
error->all(FLERR,str);
|
||||||
}
|
}
|
||||||
|
|
||||||
// error if field is in default str
|
// error if field is in default str
|
||||||
|
|
||||||
for (match = 0; match < ndef; match++)
|
for (match = 0; match < ndef; match++)
|
||||||
if (strcmp(words[i],defwords[match]) == 0) {
|
if (strcmp(words[i],defwords[match]) == 0) {
|
||||||
char str[128];
|
char str[128];
|
||||||
sprintf(str,"Peratom field %s is a default",words[i]);
|
sprintf(str,"Peratom field %s is a default",words[i]);
|
||||||
error->all(FLERR,str);
|
error->all(FLERR,str);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class AtomVec : protected Pointers {
|
|||||||
|
|
||||||
virtual void force_clear(int, size_t) {}
|
virtual void force_clear(int, size_t) {}
|
||||||
virtual bigint roundup(bigint);
|
virtual bigint roundup(bigint);
|
||||||
|
|
||||||
virtual void grow(int);
|
virtual void grow(int);
|
||||||
virtual void grow_pointers() {}
|
virtual void grow_pointers() {}
|
||||||
virtual void copy(int, int, int);
|
virtual void copy(int, int, int);
|
||||||
|
|||||||
@ -282,7 +282,7 @@ int AtomVecBody::pack_border_bonus(int n, int *list, double *buf)
|
|||||||
buf[m++] = ubuf(bonus[body[j]].ndouble).d;
|
buf[m++] = ubuf(bonus[body[j]].ndouble).d;
|
||||||
m += bptr->pack_border_body(&bonus[body[j]],&buf[m]);
|
m += bptr->pack_border_body(&bonus[body[j]],&buf[m]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
@ -540,7 +540,7 @@ void AtomVecBody::data_atom_post(int ilocal)
|
|||||||
void AtomVecBody::data_body(int m, int ninteger, int ndouble,
|
void AtomVecBody::data_body(int m, int ninteger, int ndouble,
|
||||||
int *ivalues, double *dvalues)
|
int *ivalues, double *dvalues)
|
||||||
{
|
{
|
||||||
if (body[m])
|
if (body[m])
|
||||||
error->one(FLERR,"Assigning body parameters to non-body atom");
|
error->one(FLERR,"Assigning body parameters to non-body atom");
|
||||||
if (nlocal_bonus == nmax_bonus) grow_bonus();
|
if (nlocal_bonus == nmax_bonus) grow_bonus();
|
||||||
bonus[nlocal_bonus].ilocal = m;
|
bonus[nlocal_bonus].ilocal = m;
|
||||||
@ -572,7 +572,7 @@ bigint AtomVecBody::memory_usage_bonus()
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecBody::pack_data_pre(int ilocal)
|
void AtomVecBody::pack_data_pre(int ilocal)
|
||||||
{
|
{
|
||||||
body_flag = body[ilocal];
|
body_flag = body[ilocal];
|
||||||
|
|
||||||
if (body_flag < 0) body[ilocal] = 0;
|
if (body_flag < 0) body[ilocal] = 0;
|
||||||
@ -584,7 +584,7 @@ void AtomVecBody::pack_data_pre(int ilocal)
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecBody::pack_data_post(int ilocal)
|
void AtomVecBody::pack_data_post(int ilocal)
|
||||||
{
|
{
|
||||||
body[ilocal] = body_flag;
|
body[ilocal] = body_flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -452,7 +452,7 @@ void AtomVecEllipsoid::data_atom_post(int ilocal)
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecEllipsoid::pack_data_pre(int ilocal)
|
void AtomVecEllipsoid::pack_data_pre(int ilocal)
|
||||||
{
|
{
|
||||||
double *shape;
|
double *shape;
|
||||||
|
|
||||||
ellipsoid_flag = atom->ellipsoid[ilocal];
|
ellipsoid_flag = atom->ellipsoid[ilocal];
|
||||||
@ -472,7 +472,7 @@ void AtomVecEllipsoid::pack_data_pre(int ilocal)
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecEllipsoid::pack_data_post(int ilocal)
|
void AtomVecEllipsoid::pack_data_post(int ilocal)
|
||||||
{
|
{
|
||||||
ellipsoid[ilocal] = ellipsoid_flag;
|
ellipsoid[ilocal] = ellipsoid_flag;
|
||||||
rmass[ilocal] = rmass_one;
|
rmass[ilocal] = rmass_one;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
AtomVecHybrid::AtomVecHybrid(LAMMPS *lmp) : AtomVec(lmp)
|
AtomVecHybrid::AtomVecHybrid(LAMMPS *lmp) : AtomVec(lmp)
|
||||||
{
|
{
|
||||||
nstyles = 0;
|
nstyles = 0;
|
||||||
styles = NULL;
|
styles = NULL;
|
||||||
@ -325,7 +325,7 @@ void AtomVecHybrid::data_atom_post(int ilocal)
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecHybrid::pack_data_pre(int ilocal)
|
void AtomVecHybrid::pack_data_pre(int ilocal)
|
||||||
{
|
{
|
||||||
for (int k = 0; k < nstyles; k++)
|
for (int k = 0; k < nstyles; k++)
|
||||||
styles[k]->pack_data_pre(ilocal);
|
styles[k]->pack_data_pre(ilocal);
|
||||||
}
|
}
|
||||||
@ -335,7 +335,7 @@ void AtomVecHybrid::pack_data_pre(int ilocal)
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecHybrid::pack_data_post(int ilocal)
|
void AtomVecHybrid::pack_data_post(int ilocal)
|
||||||
{
|
{
|
||||||
for (int k = 0; k < nstyles; k++)
|
for (int k = 0; k < nstyles; k++)
|
||||||
styles[k]->pack_data_post(ilocal);
|
styles[k]->pack_data_post(ilocal);
|
||||||
}
|
}
|
||||||
@ -494,7 +494,7 @@ void AtomVecHybrid::pack_property_atom(int multiindex, double *buf,
|
|||||||
so caller can check for problematic fields, call will free it
|
so caller can check for problematic fields, call will free it
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
char *AtomVecHybrid::merge_fields(int inum, char *root,
|
char *AtomVecHybrid::merge_fields(int inum, char *root,
|
||||||
int concat_flag, char *&concat_str)
|
int concat_flag, char *&concat_str)
|
||||||
{
|
{
|
||||||
// create concatenated string of length size from root + all substyles
|
// create concatenated string of length size from root + all substyles
|
||||||
@ -517,7 +517,7 @@ char *AtomVecHybrid::merge_fields(int inum, char *root,
|
|||||||
char **words;
|
char **words;
|
||||||
int nwords = tokenize(concat,words,copystr);
|
int nwords = tokenize(concat,words,copystr);
|
||||||
int *unique = new int[nwords];
|
int *unique = new int[nwords];
|
||||||
|
|
||||||
for (int i = 0; i < nwords; i++) {
|
for (int i = 0; i < nwords; i++) {
|
||||||
unique[i] = 1;
|
unique[i] = 1;
|
||||||
for (int j = 0; j < i; j++)
|
for (int j = 0; j < i; j++)
|
||||||
@ -528,7 +528,7 @@ char *AtomVecHybrid::merge_fields(int inum, char *root,
|
|||||||
|
|
||||||
char *dedup = new char[size];
|
char *dedup = new char[size];
|
||||||
dedup[0] = '\0';
|
dedup[0] = '\0';
|
||||||
|
|
||||||
for (int i = 0; i < nwords; i++) {
|
for (int i = 0; i < nwords; i++) {
|
||||||
if (!unique[i]) continue;
|
if (!unique[i]) continue;
|
||||||
strcat(dedup,words[i]);
|
strcat(dedup,words[i]);
|
||||||
@ -541,7 +541,7 @@ char *AtomVecHybrid::merge_fields(int inum, char *root,
|
|||||||
else delete [] concat;
|
else delete [] concat;
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
|
|
||||||
delete [] copystr;
|
delete [] copystr;
|
||||||
delete [] words;
|
delete [] words;
|
||||||
delete [] unique;
|
delete [] unique;
|
||||||
|
|||||||
@ -431,7 +431,7 @@ void AtomVecLine::data_atom_post(int ilocal)
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecLine::pack_data_pre(int ilocal)
|
void AtomVecLine::pack_data_pre(int ilocal)
|
||||||
{
|
{
|
||||||
line_flag = line[ilocal];
|
line_flag = line[ilocal];
|
||||||
rmass_one = rmass[ilocal];
|
rmass_one = rmass[ilocal];
|
||||||
|
|
||||||
@ -449,7 +449,7 @@ void AtomVecLine::pack_data_pre(int ilocal)
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecLine::pack_data_post(int ilocal)
|
void AtomVecLine::pack_data_post(int ilocal)
|
||||||
{
|
{
|
||||||
line[ilocal] = line_flag;
|
line[ilocal] = line_flag;
|
||||||
rmass[ilocal] = rmass_one;
|
rmass[ilocal] = rmass_one;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,7 +61,7 @@ AtomVecSphere::AtomVecSphere(LAMMPS *lmp) : AtomVec(lmp)
|
|||||||
|
|
||||||
void AtomVecSphere::process_args(int narg, char **arg)
|
void AtomVecSphere::process_args(int narg, char **arg)
|
||||||
{
|
{
|
||||||
if (narg != 0 && narg != 1)
|
if (narg != 0 && narg != 1)
|
||||||
error->all(FLERR,"Illegal atom_style sphere command");
|
error->all(FLERR,"Illegal atom_style sphere command");
|
||||||
|
|
||||||
radvary = 0;
|
radvary = 0;
|
||||||
@ -130,10 +130,10 @@ void AtomVecSphere::data_atom_post(int ilocal)
|
|||||||
{
|
{
|
||||||
radius_one = 0.5 * atom->radius[ilocal];
|
radius_one = 0.5 * atom->radius[ilocal];
|
||||||
radius[ilocal] = radius_one;
|
radius[ilocal] = radius_one;
|
||||||
if (radius_one > 0.0)
|
if (radius_one > 0.0)
|
||||||
rmass[ilocal] *= 4.0*MY_PI/3.0 * radius_one*radius_one*radius_one;
|
rmass[ilocal] *= 4.0*MY_PI/3.0 * radius_one*radius_one*radius_one;
|
||||||
|
|
||||||
if (rmass[ilocal] <= 0.0)
|
if (rmass[ilocal] <= 0.0)
|
||||||
error->one(FLERR,"Invalid density in Atoms section of data file");
|
error->one(FLERR,"Invalid density in Atoms section of data file");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,8 +147,8 @@ void AtomVecSphere::pack_data_pre(int ilocal)
|
|||||||
rmass_one = rmass[ilocal];
|
rmass_one = rmass[ilocal];
|
||||||
|
|
||||||
radius[ilocal] *= 2.0;
|
radius[ilocal] *= 2.0;
|
||||||
if (radius_one!= 0.0)
|
if (radius_one!= 0.0)
|
||||||
rmass[ilocal] =
|
rmass[ilocal] =
|
||||||
rmass_one / (4.0*MY_PI/3.0 * radius_one*radius_one*radius_one);
|
rmass_one / (4.0*MY_PI/3.0 * radius_one*radius_one*radius_one);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -655,7 +655,7 @@ void AtomVecTri::data_atom_post(int ilocal)
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecTri::pack_data_pre(int ilocal)
|
void AtomVecTri::pack_data_pre(int ilocal)
|
||||||
{
|
{
|
||||||
tri_flag = tri[ilocal];
|
tri_flag = tri[ilocal];
|
||||||
rmass_one = rmass[ilocal];
|
rmass_one = rmass[ilocal];
|
||||||
|
|
||||||
@ -680,7 +680,7 @@ void AtomVecTri::pack_data_pre(int ilocal)
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void AtomVecTri::pack_data_post(int ilocal)
|
void AtomVecTri::pack_data_post(int ilocal)
|
||||||
{
|
{
|
||||||
tri[ilocal] = tri_flag;
|
tri[ilocal] = tri_flag;
|
||||||
rmass[ilocal] = rmass_one;
|
rmass[ilocal] = rmass_one;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -355,7 +355,7 @@ void Replicate::command(int narg, char **arg)
|
|||||||
int *disp_buf_rnk;
|
int *disp_buf_rnk;
|
||||||
memory->create(disp_buf_rnk, nprocs, "replicate:disp_buf_rnk");
|
memory->create(disp_buf_rnk, nprocs, "replicate:disp_buf_rnk");
|
||||||
disp_buf_rnk[0] = 0;
|
disp_buf_rnk[0] = 0;
|
||||||
for (i = 1; i < nprocs; i++)
|
for (i = 1; i < nprocs; i++)
|
||||||
disp_buf_rnk[i] = disp_buf_rnk[i-1] + size_buf_rnk[i-1];
|
disp_buf_rnk[i] = disp_buf_rnk[i-1] + size_buf_rnk[i-1];
|
||||||
|
|
||||||
// allgather buf_all
|
// allgather buf_all
|
||||||
@ -370,16 +370,16 @@ void Replicate::command(int narg, char **arg)
|
|||||||
|
|
||||||
double _orig_lo[3], _orig_hi[3];
|
double _orig_lo[3], _orig_hi[3];
|
||||||
if (triclinic) {
|
if (triclinic) {
|
||||||
_orig_lo[0] = domain->boxlo[0] +
|
_orig_lo[0] = domain->boxlo[0] +
|
||||||
_imagelo[0] * old_xprd + _imagelo[1] * old_xy + _imagelo[2] * old_xz;
|
_imagelo[0] * old_xprd + _imagelo[1] * old_xy + _imagelo[2] * old_xz;
|
||||||
_orig_lo[1] = domain->boxlo[1] +
|
_orig_lo[1] = domain->boxlo[1] +
|
||||||
_imagelo[1] * old_yprd + _imagelo[2] * old_yz;
|
_imagelo[1] * old_yprd + _imagelo[2] * old_yz;
|
||||||
_orig_lo[2] = domain->boxlo[2] + _imagelo[2] * old_zprd;
|
_orig_lo[2] = domain->boxlo[2] + _imagelo[2] * old_zprd;
|
||||||
|
|
||||||
_orig_hi[0] = domain->boxlo[0] +
|
_orig_hi[0] = domain->boxlo[0] +
|
||||||
(_imagehi[0]+1) * old_xprd +
|
(_imagehi[0]+1) * old_xprd +
|
||||||
(_imagehi[1]+1) * old_xy + (_imagehi[2]+1) * old_xz;
|
(_imagehi[1]+1) * old_xy + (_imagehi[2]+1) * old_xz;
|
||||||
_orig_hi[1] = domain->boxlo[1] +
|
_orig_hi[1] = domain->boxlo[1] +
|
||||||
(_imagehi[1]+1) * old_yprd + (_imagehi[2]+1) * old_yz;
|
(_imagehi[1]+1) * old_yprd + (_imagehi[2]+1) * old_yz;
|
||||||
_orig_hi[2] = domain->boxlo[2] + (_imagehi[2]+1) * old_zprd;
|
_orig_hi[2] = domain->boxlo[2] + (_imagehi[2]+1) * old_zprd;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -109,7 +109,7 @@ void Verlet::setup(int flag)
|
|||||||
domain->pbc();
|
domain->pbc();
|
||||||
domain->reset_box();
|
domain->reset_box();
|
||||||
comm->setup();
|
comm->setup();
|
||||||
if (neighbor->style) neighbor->setup_bins();
|
if (neighbor->style) neighbor->setup_bins();
|
||||||
comm->exchange();
|
comm->exchange();
|
||||||
if (atom->sortfreq > 0) atom->sort();
|
if (atom->sortfreq > 0) atom->sort();
|
||||||
comm->borders();
|
comm->borders();
|
||||||
|
|||||||
Reference in New Issue
Block a user