git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9523 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2013-02-18 16:01:10 +00:00
parent 338414b474
commit be4a5a8e54
9 changed files with 37 additions and 39 deletions

View File

@ -185,8 +185,6 @@ static inline void loop_setup_thr(int &ifrom, int &ito, int &tid,
#endif
}
}
// helpful definitions to help compilers optimizing code better
typedef struct { double x,y,z; } dbl3_t;
@ -195,6 +193,12 @@ typedef struct { int a,b,t; } int3_t;
typedef struct { int a,b,c,t; } int4_t;
typedef struct { int a,b,c,d,t; } int5_t;
}
#ifdef _noalias
#undef _noalias
#endif
#if defined(__GNUC__)
#define _noalias __restrict
#else

View File

@ -22,6 +22,10 @@
#include "memory.h"
#include "error.h"
#include "reaxc_defs.h"
#include "reaxc_types.h"
#include "pair_reax_c.h"
using namespace LAMMPS_NS;
enum{KEYWORD,COMPUTE,FIX,VARIABLE};

View File

@ -21,9 +21,6 @@ ComputeStyle(spec/atom,ComputeSpecAtom)
#define LMP_COMPUTE_SPEC_ATOM_H
#include "compute.h"
#include "pair_reax_c.h"
#include "reaxc_types.h"
#include "reaxc_defs.h"
#include "pointers.h"
namespace LAMMPS_NS {
@ -82,8 +79,8 @@ class ComputeSpecAtom : public Compute {
void pack_abo12(int);
class PairReaxC *reaxc;
reax_system *system;
reax_atom *my_atoms;
struct _reax_system *system;
struct _reax_atom *my_atoms;
};
}

View File

@ -35,6 +35,8 @@
#include "memory.h"
#include "error.h"
#include "reaxc_list.h"
#include "reaxc_types.h"
#include "reaxc_defs.h"
using namespace LAMMPS_NS;
using namespace FixConst;
@ -205,7 +207,7 @@ void FixReaxCBonds::Output_ReaxC_Bonds(bigint ntimestep, FILE *fp)
/* ---------------------------------------------------------------------- */
void FixReaxCBonds::GatherBond( reax_system *system, reax_list *lists)
void FixReaxCBonds::GatherBond( struct _reax_system *system, struct _reax_list *lists)
{
int *ilist, i, ii, inum;
int j, pj, nj, jtag, jtype;
@ -247,7 +249,7 @@ void FixReaxCBonds::GatherBond( reax_system *system, reax_list *lists)
}
/* ---------------------------------------------------------------------- */
void FixReaxCBonds::FindBond( reax_system *system, reax_list *lists,
void FixReaxCBonds::FindBond( struct _reax_system *system, struct _reax_list *lists,
int &numbonds)
{
int *ilist, i, ii, inum;
@ -289,7 +291,7 @@ void FixReaxCBonds::FindBond( reax_system *system, reax_list *lists,
/* ---------------------------------------------------------------------- */
void FixReaxCBonds::PassBuffer( reax_system *system, double *buf,
void FixReaxCBonds::PassBuffer( struct _reax_system *system, double *buf,
int &nbuf_local)
{
int i, j, k, jtag, numbonds;
@ -325,7 +327,7 @@ void FixReaxCBonds::PassBuffer( reax_system *system, double *buf,
/* ---------------------------------------------------------------------- */
void FixReaxCBonds::RecvBuffer( reax_system *system, double *buf,
void FixReaxCBonds::RecvBuffer( struct _reax_system *system, double *buf,
int nbuf, int nbuf_local, int natoms, int maxnum)
{
int i, j, k, l, itype, jtype, itag, jtag;

View File

@ -22,13 +22,8 @@ FixStyle(reax/c/bonds,FixReaxCBonds)
#include "stdio.h"
#include "fix.h"
#include "pair_reax_c.h"
#include "reaxc_types.h"
#include "reaxc_defs.h"
#include "pointers.h"
#define MAXBOND 24
namespace LAMMPS_NS {
class FixReaxCBonds : public Fix {
@ -50,19 +45,18 @@ class FixReaxCBonds : public Fix {
void allocate();
void destroy();
void Output_ReaxC_Bonds(bigint, FILE *);
void GatherBond(reax_system*, reax_list*);
void FindBond(reax_system*, reax_list*, int &);
void PassBuffer(reax_system*, double *, int &);
void RecvBuffer(reax_system*, double *, int, int, int, int);
void GatherBond(struct _reax_system*, struct _reax_list*);
void FindBond(struct _reax_system*, struct _reax_list*, int &);
void PassBuffer(struct _reax_system*, double *, int &);
void RecvBuffer(struct _reax_system*, double *, int, int, int, int);
int nint(const double &);
double memory_usage();
bigint nvalid, nextvalid();
reax_system *system;
reax_list *lists;
struct _reax_system *system;
struct _reax_list *lists;
class PairReaxC *reaxc;
class NeighList *list;
};
}

View File

@ -37,6 +37,7 @@
#include "memory.h"
#include "error.h"
#include "reaxc_list.h"
#include "reaxc_defs.h"
using namespace LAMMPS_NS;
using namespace FixConst;

View File

@ -21,15 +21,7 @@ FixStyle(species,FixSpecies)
#define LMP_FIX_SPECIES_H
#include "fix.h"
#include "pointers.h"
#include "pair_reax_c.h"
#include "reaxc_types.h"
#include "reaxc_defs.h"
// #include "pair_foo.h"
#define MAXSPECBOND 12
#define BUFLEN 1000
#include "pointers.h" /* universal defines inside namespace */
namespace LAMMPS_NS {
@ -76,7 +68,6 @@ class FixSpecies : public Fix {
class NeighList *list;
class FixAveAtom *f_SPECBOND;
class PairReaxC *reaxc;
// class PairFoo *foo;
};
}

View File

@ -116,6 +116,8 @@
#define MAX_BOND 20
#define MAXBOND 24 /* used in fix_reaxc_bonds.cpp and pair_reax_c.cpp */
#define MAXSPECBOND 12 /* used in fix_species.cpp and pair_reax_c.cpp */
/******************* ENUMERATIONS *************************/
enum geo_formats { CUSTOM, PDB, ASCII_RESTART, BINARY_RESTART, GF_N };

View File

@ -346,7 +346,7 @@ typedef struct
typedef struct
struct _reax_atom
{
int orig_id;
int imprt_id;
@ -371,7 +371,8 @@ typedef struct
int nbr_id[MAX_BOND]; // ids of neighbors around atoms
double nbr_bo[MAX_BOND]; // BO values of bond between i and nbr
double sum_bo, no_lp; // sum of BO values and no. of lone pairs
} reax_atom;
};
typedef _reax_atom reax_atom;
@ -470,7 +471,7 @@ typedef struct
using LAMMPS_NS::Pair;
typedef struct
struct _reax_system
{
reax_interaction reax_param;
@ -491,7 +492,8 @@ typedef struct
int mincap;
real safezone, saferzone;
} reax_system;
};
typedef _reax_system reax_system;
@ -855,7 +857,7 @@ typedef union
} list_type;
typedef struct
struct _reax_list
{
int allocated;
@ -867,7 +869,8 @@ typedef struct
int type;
list_type select;
} reax_list;
};
typedef _reax_list reax_list;
typedef struct