forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14911 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
00f38fdaf0
commit
997099253b
|
@ -104,7 +104,6 @@ void FixNHBody::nve_x()
|
|||
AtomVecBody::Bonus *bonus = avec->bonus;
|
||||
int *body = atom->body;
|
||||
double **angmom = atom->angmom;
|
||||
double *rmass = atom->rmass;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
|
||||
|
|
|
@ -3184,12 +3184,11 @@ double PairAIREBO::piRCSpline(double Nij, double Nji, double Nijconj,
|
|||
|
||||
if (done==0) {
|
||||
for (i=0; i<piCCdom[0][1]; i++)
|
||||
if (Nij>=(double) i && Nij<=(double) i+1 || Nij==(double) i) x=i;
|
||||
if (Nij>=(double) i && Nij<=(double) i+1) x=i;
|
||||
for (i=0; i<piCCdom[1][1]; i++)
|
||||
if (Nji>=(double) i && Nji<=(double) i+1 || Nji==(double) i) y=i;
|
||||
if (Nji>=(double) i && Nji<=(double) i+1) y=i;
|
||||
for (i=0; i<piCCdom[2][1]; i++)
|
||||
if (Nijconj>=(double) i && Nijconj<=(double) i+1 ||
|
||||
Nijconj==(double) i) z=i;
|
||||
if (Nijconj>=(double) i && Nijconj<=(double) i+1) z=i;
|
||||
|
||||
for (i=0; i<64; i++) coeffs[i]=piCC[x][y][z][i];
|
||||
piRC=Sptricubic(Nij,Nji,Nijconj,coeffs,dN3);
|
||||
|
@ -3199,7 +3198,7 @@ double PairAIREBO::piRCSpline(double Nij, double Nji, double Nijconj,
|
|||
|
||||
// CH interaction
|
||||
|
||||
if (typei==0 && typej==1 || typei==1 && typej==0) {
|
||||
if ((typei==0 && typej==1) || (typei==1 && typej==0)) {
|
||||
// if the inputs are out of bounds set them back to a point in bounds
|
||||
|
||||
if (Nij<piCHdom[0][0] || Nij>piCHdom[0][1] ||
|
||||
|
|
|
@ -54,7 +54,7 @@ int Tokenize( char* s, char*** tok )
|
|||
}
|
||||
|
||||
/* safe malloc */
|
||||
void *smalloc( long n, const char *name, MPI_Comm comm )
|
||||
void *smalloc( rc_bigint n, const char *name, MPI_Comm comm )
|
||||
{
|
||||
void *ptr;
|
||||
|
||||
|
@ -77,19 +77,19 @@ void *smalloc( long n, const char *name, MPI_Comm comm )
|
|||
|
||||
|
||||
/* safe calloc */
|
||||
void *scalloc( int n, int size, const char *name, MPI_Comm comm )
|
||||
void *scalloc( rc_bigint n, rc_bigint size, const char *name, MPI_Comm comm )
|
||||
{
|
||||
void *ptr;
|
||||
|
||||
if( n <= 0 ) {
|
||||
fprintf( stderr, "WARNING: trying to allocate %d elements for array %s. ",
|
||||
fprintf( stderr, "WARNING: trying to allocate %ld elements for array %s. ",
|
||||
n, name );
|
||||
fprintf( stderr, "returning NULL.\n" );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if( size <= 0 ) {
|
||||
fprintf( stderr, "WARNING: elements size for array %s is %d. ",
|
||||
fprintf( stderr, "WARNING: elements size for array %s is %ld. ",
|
||||
name, size );
|
||||
fprintf( stderr, "returning NULL.\n" );
|
||||
return NULL;
|
||||
|
@ -97,7 +97,7 @@ void *scalloc( int n, int size, const char *name, MPI_Comm comm )
|
|||
|
||||
ptr = calloc( n, size );
|
||||
if( ptr == NULL ) {
|
||||
fprintf( stderr, "ERROR: failed to allocate %d bytes for array %s",
|
||||
fprintf( stderr, "ERROR: failed to allocate %ld bytes for array %s",
|
||||
n*size, name );
|
||||
MPI_Abort( comm, INSUFFICIENT_MEMORY );
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ double Get_Time( );
|
|||
int Tokenize( char*, char*** );
|
||||
|
||||
/* from lammps */
|
||||
void *smalloc( long, const char*, MPI_Comm );
|
||||
void *scalloc( int, int, const char*, MPI_Comm );
|
||||
void *smalloc( rc_bigint, const char*, MPI_Comm );
|
||||
void *scalloc( rc_bigint, rc_bigint, const char*, MPI_Comm );
|
||||
void sfree( void*, const char* );
|
||||
#endif
|
||||
|
|
|
@ -101,7 +101,7 @@ int Write_Header( reax_system *system, control_params *control,
|
|||
out_control->traj_title );
|
||||
strncat( out_control->buffer, out_control->line, HEADER_LINE_LEN+1 );
|
||||
|
||||
sprintf( out_control->line, INT_LINE, "number_of_atoms:", system->bigN );
|
||||
sprintf( out_control->line, BIGINT_LINE, "number_of_atoms:", system->bigN );
|
||||
strncat( out_control->buffer, out_control->line, HEADER_LINE_LEN+1 );
|
||||
|
||||
sprintf( out_control->line, STR_LINE, "ensemble_type:",
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#define HEADER_LINE_LEN 62
|
||||
#define STR_LINE "%-37s%-24s\n"
|
||||
#define INT_LINE "%-37s%-24d\n"
|
||||
#define BIGINT_LINE "%-37s%-24ld\n"
|
||||
#define INT2_LINE "%-36s%-12d,%-12d\n"
|
||||
#define REAL_LINE "%-37s%-24.3f\n"
|
||||
#define SCI_LINE "%-37s%-24g\n"
|
||||
|
|
|
@ -68,8 +68,9 @@ typedef double rvec2[2];
|
|||
typedef double rvec4[4];
|
||||
|
||||
|
||||
// import LAMMPS' definition of tagint
|
||||
// import LAMMPS' definition of tagint and bigint
|
||||
typedef LAMMPS_NS::tagint rc_tagint;
|
||||
typedef LAMMPS_NS::bigint rc_bigint;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -383,7 +384,8 @@ struct _reax_system
|
|||
{
|
||||
reax_interaction reax_param;
|
||||
|
||||
int n, N, bigN, numH;
|
||||
rc_bigint bigN;
|
||||
int n, N, numH;
|
||||
int local_cap, total_cap, gcell_cap, Hcap;
|
||||
int est_recv, est_trans, max_recved;
|
||||
int wsize, my_rank, num_nbrs;
|
||||
|
|
Loading…
Reference in New Issue