git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11263 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -520,12 +520,11 @@ void FixQEqReax::compute_H()
|
||||
{
|
||||
int inum, jnum, *ilist, *jlist, *numneigh, **firstneigh;
|
||||
int i, j, ii, jj, temp, newnbr, flag;
|
||||
int *type, *tag;
|
||||
double **x, SMALL = 0.0001;
|
||||
double dx, dy, dz, r_sqr;
|
||||
|
||||
type = atom->type;
|
||||
tag = atom->tag;
|
||||
int *type = atom->type;
|
||||
tagint *tag = atom->tag;
|
||||
x = atom->x;
|
||||
|
||||
inum = list->inum;
|
||||
@ -534,6 +533,7 @@ void FixQEqReax::compute_H()
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// fill in the H matrix
|
||||
|
||||
m_fill = 0;
|
||||
r_sqr = 0;
|
||||
for( ii = 0; ii < inum; ii++ ) {
|
||||
|
||||
@ -75,7 +75,6 @@ FixReaxCBonds::FixReaxCBonds(LAMMPS *lmp, int narg, char **arg) :
|
||||
numneigh = NULL;
|
||||
|
||||
allocate();
|
||||
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -130,7 +129,7 @@ void FixReaxCBonds::end_of_step()
|
||||
void FixReaxCBonds::Output_ReaxC_Bonds(bigint ntimestep, FILE *fp)
|
||||
|
||||
{
|
||||
int i, j, k, itype, jtype, iatom, itag, jtag;
|
||||
int i, j, k, itype, jtype, iatom;
|
||||
int b, nbuf, nbuf_local, inode;
|
||||
int nlocal_max, numbonds, numbonds_max;
|
||||
double *buf;
|
||||
@ -178,7 +177,8 @@ void FixReaxCBonds::Output_ReaxC_Bonds(bigint ntimestep, FILE *fp)
|
||||
void FixReaxCBonds::FindBond(struct _reax_list *lists, int &numbonds)
|
||||
{
|
||||
int *ilist, i, ii, inum;
|
||||
int j, pj, nj, jtag, jtype;
|
||||
int j, pj, nj, jtype;
|
||||
tagint jtag;
|
||||
double bo_tmp,bo_cut;
|
||||
|
||||
inum = reaxc->list->inum;
|
||||
@ -186,6 +186,8 @@ void FixReaxCBonds::FindBond(struct _reax_list *lists, int &numbonds)
|
||||
bond_data *bo_ij;
|
||||
bo_cut = reaxc->control->bg_cut;
|
||||
|
||||
tagint *tag = atom->tag;
|
||||
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
nj = 0;
|
||||
@ -193,7 +195,7 @@ void FixReaxCBonds::FindBond(struct _reax_list *lists, int &numbonds)
|
||||
for( pj = Start_Index(i, reaxc->lists); pj < End_Index(i, reaxc->lists); ++pj ) {
|
||||
bo_ij = &( reaxc->lists->select.bond_list[pj] );
|
||||
j = bo_ij->nbr;
|
||||
jtag = atom->tag[j];
|
||||
jtag = tag[j];
|
||||
bo_tmp = bo_ij->bo_data.BO;
|
||||
|
||||
if (bo_tmp > bo_cut) {
|
||||
@ -211,7 +213,7 @@ void FixReaxCBonds::FindBond(struct _reax_list *lists, int &numbonds)
|
||||
|
||||
void FixReaxCBonds::PassBuffer(double *buf, int &nbuf_local)
|
||||
{
|
||||
int i, j, k, jtag, numbonds;
|
||||
int i, j, k, numbonds;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
j = 2;
|
||||
@ -245,10 +247,11 @@ void FixReaxCBonds::PassBuffer(double *buf, int &nbuf_local)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixReaxCBonds::RecvBuffer(double *buf, int nbuf, int nbuf_local,
|
||||
int natoms, int maxnum)
|
||||
int natoms, int maxnum)
|
||||
{
|
||||
int i, j, k, l, itype, jtype, itag, jtag;
|
||||
int i, j, k, l, itype, jtype;
|
||||
int inode, nlocal_tmp, numbonds, molid;
|
||||
tagint itag,jtag;
|
||||
int nlocal = atom->nlocal;
|
||||
bigint ntimestep = update->ntimestep;
|
||||
double sbotmp, nlptmp, avqtmp, abotmp;
|
||||
@ -280,7 +283,7 @@ void FixReaxCBonds::RecvBuffer(double *buf, int nbuf, int nbuf_local,
|
||||
}
|
||||
j = 2;
|
||||
for (i = 0; i < nlocal_tmp; i ++) {
|
||||
itag = nint(buf[j-1]);
|
||||
itag = static_cast<tagint> (buf[j-1]);
|
||||
itype = nint(buf[j+0]);
|
||||
sbotmp = buf[j+1];
|
||||
nlptmp = buf[j+2];
|
||||
@ -290,7 +293,7 @@ void FixReaxCBonds::RecvBuffer(double *buf, int nbuf, int nbuf_local,
|
||||
fprintf(fp," %d %d %d",itag,itype,numbonds);
|
||||
|
||||
for (k = 5; k < 5+numbonds; k++) {
|
||||
jtag = nint(buf[j+k]);
|
||||
jtag = static_cast<tagint> (buf[j+k]);
|
||||
fprintf(fp," %d",jtag);
|
||||
}
|
||||
j += (5+numbonds);
|
||||
|
||||
@ -37,7 +37,8 @@ class FixReaxCBonds : public Fix {
|
||||
|
||||
private:
|
||||
int me, nprocs, nmax, ntypes, maxsize;
|
||||
int *numneigh, **neighid;
|
||||
int *numneigh;
|
||||
tagint **neighid;
|
||||
double **abo;
|
||||
FILE *fp;
|
||||
|
||||
|
||||
@ -573,7 +573,7 @@ void PairReaxC::write_reax_atoms()
|
||||
error->all(FLERR,"Too many ghost atoms");
|
||||
|
||||
for( int i = 0; i < system->N; ++i ){
|
||||
system->my_atoms[i].orig_id = atom->tag[i];
|
||||
system->my_atoms[i].orig_id = static_cast<int> (atom->tag[i]);
|
||||
system->my_atoms[i].type = map[atom->type[i]];
|
||||
system->my_atoms[i].x[0] = atom->x[i][0];
|
||||
system->my_atoms[i].x[1] = atom->x[i][1];
|
||||
@ -668,7 +668,7 @@ int PairReaxC::write_reax_lists()
|
||||
{
|
||||
int itr_i, itr_j, itr_g, i, j, g, flag;
|
||||
int nlocal, nghost, num_nbrs;
|
||||
int *ilist, *jlist, *numneigh, **firstneigh, *marked, *tag;
|
||||
int *ilist, *jlist, *numneigh, **firstneigh, *marked;
|
||||
double d_sqr, g_d, g_d_sqr;
|
||||
rvec dvec, g_dvec;
|
||||
double *dist, **x, SMALL = 0.0001;
|
||||
@ -676,7 +676,6 @@ int PairReaxC::write_reax_lists()
|
||||
far_neighbor_data *far_list;
|
||||
|
||||
x = atom->x;
|
||||
tag = atom->tag;
|
||||
nlocal = atom->nlocal;
|
||||
nghost = atom->nghost;
|
||||
ilist = list->ilist;
|
||||
@ -797,7 +796,7 @@ double PairReaxC::memory_usage()
|
||||
|
||||
void PairReaxC::FindBond()
|
||||
{
|
||||
int i, ii, j, pj, jtag, nj, jtmp, jj;
|
||||
int i, ii, j, pj, nj, jtmp, jj;
|
||||
double bo_tmp, bo_cut, rij, rsq, r_tmp;
|
||||
|
||||
bond_data *bo_ij;
|
||||
|
||||
@ -75,7 +75,8 @@ typedef struct {
|
||||
} restart_header;
|
||||
|
||||
typedef struct {
|
||||
int orig_id, type;
|
||||
int orig_id;
|
||||
int type;
|
||||
char name[8];
|
||||
rvec x, v;
|
||||
} restart_atom;
|
||||
|
||||
Reference in New Issue
Block a user