added error messages for special_lj and comm vel
This commit is contained in:
@ -756,6 +756,8 @@ void PairMesoCNT::init_style()
|
||||
{
|
||||
if (atom->tag_enable == 0) error->all(FLERR, "Pair style mesocnt requires atom IDs");
|
||||
if (force->newton_pair == 0) error->all(FLERR, "Pair style mesocnt requires newton pair on");
|
||||
if (force->special_lj[1] == 0.0 || force->special_lj[2] == 0.0 || force->special_lj[3] == 0.0)
|
||||
error->all(FLERR,"Pair mesocnt requires special_bond lj x y z to have non-zero x, y and z");
|
||||
|
||||
// need a full neighbor list
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include "pair_mesocnt_viscous.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "math_const.h"
|
||||
@ -747,6 +748,24 @@ void PairMesoCNTViscous::coeff(int narg, char **arg)
|
||||
for (int j = i; j <= ntypes; j++) setflag[i][j] = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init specific to this pair style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairMesoCNTViscous::init_style()
|
||||
{
|
||||
if (atom->tag_enable == 0) error->all(FLERR, "Pair style mesocnt/viscous requires atom IDs");
|
||||
if (force->newton_pair == 0) error->all(FLERR, "Pair style mesocnt/viscous requires newton pair on");
|
||||
if (force->special_lj[1] == 0.0 || force->special_lj[2] == 0.0 || force->special_lj[3] == 0.0)
|
||||
error->all(FLERR,"Pair mesocnt/viscous requires special_bond lj x y z to have non-zero x, y and z");
|
||||
if (comm->ghost_velocity == 0)
|
||||
error->all(FLERR,"Pair mesocnt/viscous requires ghost atoms store velocity");
|
||||
|
||||
// need a full neighbor list
|
||||
|
||||
neighbor->add_request(this, NeighConst::REQ_FULL);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
weight for averaged friction from CNT chain
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
@ -27,6 +27,7 @@ class PairMesoCNTViscous : public PairMesoCNT {
|
||||
|
||||
void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
|
||||
protected:
|
||||
double a1, a2, b2, vswitch;
|
||||
|
||||
Reference in New Issue
Block a user