From 7b0cb07757a92c075057482cca0548bc45e16916 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 30 Apr 2014 16:33:01 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11851 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/USER-REAXC/reaxc_basic_comm.cpp | 2 +- src/USER-REAXC/reaxc_io_tools.cpp | 8 ++++---- src/USER-REAXC/reaxc_nonbonded.cpp | 4 ++-- src/USER-REAXC/reaxc_types.h | 21 ++++++++++++++------- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/USER-REAXC/reaxc_basic_comm.cpp b/src/USER-REAXC/reaxc_basic_comm.cpp index 243bdfd8ef..70d9d070d9 100644 --- a/src/USER-REAXC/reaxc_basic_comm.cpp +++ b/src/USER-REAXC/reaxc_basic_comm.cpp @@ -276,7 +276,7 @@ void Coll_ids_at_Master( reax_system *system, storage *workspace, mpi_datatypes *mpi_data ) { int i; - rctagint *id_list; + rc_tagint *id_list; MPI_Gather( &system->n, 1, MPI_INT, workspace->rcounts, 1, MPI_INT, MASTER_NODE, mpi_data->world ); diff --git a/src/USER-REAXC/reaxc_io_tools.cpp b/src/USER-REAXC/reaxc_io_tools.cpp index 579bd77f0d..841a779254 100644 --- a/src/USER-REAXC/reaxc_io_tools.cpp +++ b/src/USER-REAXC/reaxc_io_tools.cpp @@ -792,7 +792,7 @@ void Print_Far_Neighbors( reax_system *system, reax_list **lists, { char fname[100]; int i, j, nbr, natoms; - rctagint id_i, id_j; + rc_tagint id_i, id_j; FILE *fout; reax_list *far_nbrs; @@ -994,7 +994,7 @@ int fn_qsort_intcmp( const void *a, const void *b ) void Print_Bond_List2( reax_system *system, reax_list *bonds, char *fname ) { int i,j, nbr, pj; - rctagint id_i, id_j; + rc_tagint id_i, id_j; FILE *f = fopen( fname, "w" ); int temp[500]; int num=0; @@ -1360,7 +1360,7 @@ void Print_Far_Neighbors_List( reax_system *system, reax_list **lists, output_controls *out_control ) { int i, j, nbr, natoms; - rctagint id_i, id_j; + rc_tagint id_i, id_j; int num=0; int temp[500]; reax_list *far_nbrs; @@ -1394,7 +1394,7 @@ void Print_Bond_List( reax_system *system, control_params *control, output_controls *out_control) { int i,j, nbr, pj; - rctagint id_i, id_j; + rc_tagint id_i, id_j; reax_list *bonds = (*lists) + BONDS; int temp[500]; diff --git a/src/USER-REAXC/reaxc_nonbonded.cpp b/src/USER-REAXC/reaxc_nonbonded.cpp index b4ff999364..e38c4e2247 100644 --- a/src/USER-REAXC/reaxc_nonbonded.cpp +++ b/src/USER-REAXC/reaxc_nonbonded.cpp @@ -44,7 +44,7 @@ void vdW_Coulomb_Energy( reax_system *system, control_params *control, { int i, j, pj, natoms; int start_i, end_i, flag; - rctagint orig_i, orig_j; + rc_tagint orig_i, orig_j; real p_vdW1, p_vdW1i; real powr_vdW1, powgi_vdW1; real tmp, r_ij, fn13, exp1, exp2; @@ -266,7 +266,7 @@ void Tabulated_vdW_Coulomb_Energy( reax_system *system,control_params *control, int i, j, pj, r, natoms; int type_i, type_j, tmin, tmax; int start_i, end_i, flag; - rctagint orig_i, orig_j; + rc_tagint orig_i, orig_j; real r_ij, base, dif; real e_vdW, e_ele; real CEvd, CEclmb, SMALL = 0.0001; diff --git a/src/USER-REAXC/reaxc_types.h b/src/USER-REAXC/reaxc_types.h index 28ba8c540b..4b48584708 100644 --- a/src/USER-REAXC/reaxc_types.h +++ b/src/USER-REAXC/reaxc_types.h @@ -67,16 +67,23 @@ typedef real rtensor[3][3]; typedef real rvec2[2]; typedef real rvec4[4]; +// NOTE: this is needed for REAX/C to repsect LAMMPS +// choice of 32-bit vs 64-bit atom IDs +// cannot just typedef to tagint, +// or get conflicts when compiling force.cpp +// better way to do this would be in include lmptype.h, +// but that requires USER-REAXC to live in LAMMPS_NS + #ifdef LAMMPS_SMALLSMALL -typedef int rctagint; +typedef int rc_tagint; #endif #ifdef LAMMPS_SMALLBIG -typedef int rctagint; +typedef int rc_tagint; #endif #ifdef LAMMPS_BIGBIG -typedef int64_t rctagint; +typedef int64_t rc_tagint; #endif typedef struct { @@ -86,14 +93,14 @@ typedef struct { } restart_header; typedef struct { - rctagint orig_id, type; + rc_tagint orig_id, type; char name[8]; rvec x, v; } restart_atom; typedef struct { - rctagint orig_id; + rc_tagint orig_id; int imprt_id; int type; int num_bonds; @@ -109,7 +116,7 @@ typedef struct typedef struct { - rctagint orig_id; + rc_tagint orig_id; int imprt_id; int type; int num_bonds; @@ -359,7 +366,7 @@ typedef struct struct _reax_atom { - rctagint orig_id; + rc_tagint orig_id; int imprt_id; int type; char name[8];