Increase communication cutoff for TIP4P pair styles, if needed
This avoids error of H atom not found when the O atom is a ghost.
This commit is contained in:
@ -20,8 +20,6 @@
|
||||
|
||||
#include "pair_lj_cut_tip4p_long_soft.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include "angle.h"
|
||||
#include "atom.h"
|
||||
#include "bond.h"
|
||||
@ -33,6 +31,8 @@
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -460,9 +460,17 @@ void PairLJCutTIP4PLongSoft::init_style()
|
||||
|
||||
// set alpha parameter
|
||||
|
||||
double theta = force->angle->equilibrium_angle(typeA);
|
||||
double blen = force->bond->equilibrium_distance(typeB);
|
||||
const double theta = force->angle->equilibrium_angle(typeA);
|
||||
const double blen = force->bond->equilibrium_distance(typeB);
|
||||
alpha = qdist / (cos(0.5*theta) * blen);
|
||||
|
||||
const double mincut = cut_coul + qdist + blen + neighbor->skin;
|
||||
if (comm->get_comm_cutoff() < mincut) {
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "Increasing communication cutoff to {:.8} for TIP4P pair style",
|
||||
mincut);
|
||||
comm->cutghostuser = mincut;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -20,8 +20,6 @@
|
||||
|
||||
#include "pair_tip4p_long_soft.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include "angle.h"
|
||||
#include "atom.h"
|
||||
#include "bond.h"
|
||||
@ -33,6 +31,8 @@
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -417,9 +417,17 @@ void PairTIP4PLongSoft::init_style()
|
||||
|
||||
// set alpha parameter
|
||||
|
||||
double theta = force->angle->equilibrium_angle(typeA);
|
||||
double blen = force->bond->equilibrium_distance(typeB);
|
||||
const double theta = force->angle->equilibrium_angle(typeA);
|
||||
const double blen = force->bond->equilibrium_distance(typeB);
|
||||
alpha = qdist / (cos(0.5*theta) * blen);
|
||||
|
||||
const double mincut = cut_coul + qdist + blen + neighbor->skin;
|
||||
if (comm->get_comm_cutoff() < mincut) {
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "Increasing communication cutoff to {:.8} for TIP4P pair style",
|
||||
mincut);
|
||||
comm->cutghostuser = mincut;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -186,12 +186,11 @@ void PairLJCutTIP4PLongGPU::init_style()
|
||||
cut_coulsq = cut_coul * cut_coul;
|
||||
double cut_coulplus = cut_coul + qdist + blen;
|
||||
double cut_coulsqplus = cut_coulplus * cut_coulplus;
|
||||
if (maxcut < cut_coulsqplus) { cell_size = cut_coulplus + neighbor->skin; }
|
||||
if (comm->cutghostuser < cell_size) {
|
||||
if (maxcut < cut_coulsqplus) cell_size = cut_coulplus + neighbor->skin;
|
||||
if (comm->get_comm_cutoff() < cell_size) {
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR,
|
||||
"Increasing communication cutoff from {:.8} to {:.8} for TIP4P GPU style",
|
||||
comm->cutghostuser, cell_size);
|
||||
error->warning(FLERR, "Increasing communication cutoff to {:.8} for TIP4P GPU style",
|
||||
cell_size);
|
||||
comm->cutghostuser = cell_size;
|
||||
}
|
||||
|
||||
|
||||
@ -19,8 +19,6 @@
|
||||
|
||||
#include "pair_lj_cut_tip4p_long.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include "angle.h"
|
||||
#include "atom.h"
|
||||
#include "bond.h"
|
||||
@ -32,6 +30,8 @@
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -474,9 +474,17 @@ void PairLJCutTIP4PLong::init_style()
|
||||
|
||||
// set alpha parameter
|
||||
|
||||
double theta = force->angle->equilibrium_angle(typeA);
|
||||
double blen = force->bond->equilibrium_distance(typeB);
|
||||
const double theta = force->angle->equilibrium_angle(typeA);
|
||||
const double blen = force->bond->equilibrium_distance(typeB);
|
||||
alpha = qdist / (cos(0.5*theta) * blen);
|
||||
|
||||
const double mincut = cut_coul + qdist + blen + neighbor->skin;
|
||||
if (comm->get_comm_cutoff() < mincut) {
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "Increasing communication cutoff to {:.8} for TIP4P pair style",
|
||||
mincut);
|
||||
comm->cutghostuser = mincut;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -19,8 +19,6 @@
|
||||
|
||||
#include "pair_lj_long_tip4p_long.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include "angle.h"
|
||||
#include "atom.h"
|
||||
#include "bond.h"
|
||||
@ -32,6 +30,8 @@
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -1489,9 +1489,17 @@ void PairLJLongTIP4PLong::init_style()
|
||||
|
||||
// set alpha parameter
|
||||
|
||||
double theta = force->angle->equilibrium_angle(typeA);
|
||||
double blen = force->bond->equilibrium_distance(typeB);
|
||||
const double theta = force->angle->equilibrium_angle(typeA);
|
||||
const double blen = force->bond->equilibrium_distance(typeB);
|
||||
alpha = qdist / (cos(0.5*theta) * blen);
|
||||
|
||||
const double mincut = cut_coul + qdist + blen + neighbor->skin;
|
||||
if (comm->get_comm_cutoff() < mincut) {
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "Increasing communication cutoff to {:.8} for TIP4P pair style",
|
||||
mincut);
|
||||
comm->cutghostuser = mincut;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -431,9 +431,17 @@ void PairTIP4PLong::init_style()
|
||||
|
||||
// set alpha parameter
|
||||
|
||||
double theta = force->angle->equilibrium_angle(typeA);
|
||||
double blen = force->bond->equilibrium_distance(typeB);
|
||||
const double theta = force->angle->equilibrium_angle(typeA);
|
||||
const double blen = force->bond->equilibrium_distance(typeB);
|
||||
alpha = qdist / (cos(0.5*theta) * blen);
|
||||
|
||||
const double mincut = cut_coul + qdist + blen + neighbor->skin;
|
||||
if (comm->get_comm_cutoff() < mincut) {
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "Increasing communication cutoff to {:.8} for TIP4P pair style",
|
||||
mincut);
|
||||
comm->cutghostuser = mincut;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -502,9 +502,17 @@ void PairLJCutTIP4PCut::init_style()
|
||||
|
||||
// set alpha parameter
|
||||
|
||||
double theta = force->angle->equilibrium_angle(typeA);
|
||||
double blen = force->bond->equilibrium_distance(typeB);
|
||||
const double theta = force->angle->equilibrium_angle(typeA);
|
||||
const double blen = force->bond->equilibrium_distance(typeB);
|
||||
alpha = qdist / (cos(0.5*theta) * blen);
|
||||
|
||||
const double mincut = cut_coul + qdist + blen + neighbor->skin;
|
||||
if (comm->get_comm_cutoff() < mincut) {
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "Increasing communication cutoff to {:.8} for TIP4P pair style",
|
||||
mincut);
|
||||
comm->cutghostuser = mincut;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -431,9 +431,17 @@ void PairTIP4PCut::init_style()
|
||||
|
||||
// set alpha parameter
|
||||
|
||||
double theta = force->angle->equilibrium_angle(typeA);
|
||||
double blen = force->bond->equilibrium_distance(typeB);
|
||||
const double theta = force->angle->equilibrium_angle(typeA);
|
||||
const double blen = force->bond->equilibrium_distance(typeB);
|
||||
alpha = qdist / (cos(0.5*theta) * blen);
|
||||
|
||||
const double mincut = cut_coul + qdist + blen + neighbor->skin;
|
||||
if (comm->get_comm_cutoff() < mincut) {
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "Increasing communication cutoff to {:.8} for TIP4P pair style",
|
||||
mincut);
|
||||
comm->cutghostuser = mincut;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user