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

This commit is contained in:
sjplimp 2009-08-28 20:28:23 +00:00
parent 877eb8283b
commit 5e18b620f3
10 changed files with 35 additions and 17 deletions

View File

@ -16,7 +16,7 @@ LINK = g++
LINKFORT = -L/opt/intel/fce/10.0.023/lib
#LINKGPU = -L/usr/local/cuda/lib64
LINKFLAGS = -g -O $(PKGPATH) $(LINKFORT) $(LINKGPU)
USRLIB = -lfftw -lmpich $(PKGLIB)
USRLIB = -lfftw -lmpich -llapack $(PKGLIB)
FORTLIB = -lifcore -lsvml -lompstub -limf
#GPULIB = -lcudart
SYSLIB = -lpthread $(FORTLIB) $(GPULIB)

View File

@ -16,7 +16,7 @@ LINK = icc
LINKFORT = -L/opt/intel/fce/10.0.023/lib
#LINKGPU = -L/usr/local/cuda/lib64//
LINKFLAGS = -O $(PKGPATH) $(LINKFORT) $(LINKGPU)
USRLIB = -lfftw -lmpich $(PKGLIB)
USRLIB = -lfftw -lmpich -llapack $(PKGLIB)
FORTLIB = -lifcore -lsvml -lompstub -limf
#GPULIB = -lcudart
SYSLIB = -lpthread -lstdc++ $(FORTLIB) $(GPULIB)

View File

@ -1,6 +1,6 @@
# Settings for libraries used by specific LAMMPS packages
# this file is auto-edited when those packages are included/excluded
PKGINC = -I../../lib/reax -I../../lib/poems -I../../lib/meam
PKGPATH = -L../../lib/reax -L../../lib/poems -L../../lib/meam
PKGLIB = -lreax -lpoems -lmeam
PKGINC = -I../../lib/reax -I../../lib/meam -I../../lib/poems
PKGPATH = -L../../lib/reax -L../../lib/meam -L../../lib/poems
PKGLIB = -lreax -lmeam -lpoems

View File

@ -80,8 +80,9 @@ Fix::Fix(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
PRE_FORCE_RESPA = 2048;
POST_FORCE_RESPA = 4096;
FINAL_INTEGRATE_RESPA = 8192;
MIN_POST_FORCE = 16384;
MIN_ENERGY = 32768;
MIN_PRE_EXCHANGE = 16384;
MIN_POST_FORCE = 32768;
MIN_ENERGY = 65536;
}
/* ---------------------------------------------------------------------- */

View File

@ -65,7 +65,7 @@ class Fix : protected Pointers {
int PRE_FORCE,POST_FORCE,FINAL_INTEGRATE,END_OF_STEP,THERMO_ENERGY;
int INITIAL_INTEGRATE_RESPA,POST_INTEGRATE_RESPA;
int PRE_FORCE_RESPA,POST_FORCE_RESPA,FINAL_INTEGRATE_RESPA;
int MIN_POST_FORCE,MIN_ENERGY;
int MIN_PRE_EXCHANGE,MIN_POST_FORCE,MIN_ENERGY;
Fix(class LAMMPS *, int, char **);
virtual ~Fix();
@ -104,6 +104,7 @@ class Fix : protected Pointers {
virtual void post_force_respa(int, int, int) {}
virtual void final_integrate_respa(int) {}
virtual void min_pre_exchange() {}
virtual void min_post_force(int) {}
virtual double min_energy(double *) {return 0.0;}

View File

@ -21,8 +21,10 @@ namespace LAMMPS_NS {
class Group : protected Pointers {
public:
int ngroup; // # of defined groups
char **names; // name of each group
int *bitmask; // one-bit mask for each group
int *inversemask; // inverse mask for each group
Group(class LAMMPS *);
~Group();
@ -56,8 +58,6 @@ class Group : protected Pointers {
private:
int me;
int ngroup; // # of defined groups
int *inversemask; // inverse mask for each group
int find_unused();
};

View File

@ -328,7 +328,7 @@ void Min::run(int nsteps)
// account for early exit from iterate loop due to convergence
// set niter/nsteps for Finish stats to print
// set output->next values to this timestep
// call eng_force to insure vflag is set when forces computed
// call engergy_force() to insure vflag is set when forces computed
// output->write does final output for thermo, dump, restart files
// add ntimestep to all computes that store invocation times
// since are hardwireing call to thermo/dumps and computes may not be ready
@ -392,6 +392,7 @@ double Min::energy_force(int resetflag)
comm->communicate();
timer->stamp(TIME_COMM);
} else {
if (modify->n_min_pre_exchange) modify->min_pre_exchange();
if (triclinic) domain->x2lamda(atom->nlocal);
domain->pbc();
if (domain->box_change) {

View File

@ -50,8 +50,9 @@ using namespace LAMMPS_NS;
#define PRE_FORCE_RESPA 2048
#define POST_FORCE_RESPA 4096
#define FINAL_INTEGRATE_RESPA 8192
#define MIN_POST_FORCE 16384
#define MIN_ENERGY 32768
#define MIN_PRE_EXCHANGE 16384
#define MIN_POST_FORCE 32768
#define MIN_ENERGY 65536
#define MIN(A,B) ((A) < (B)) ? (A) : (B)
#define MAX(A,B) ((A) > (B)) ? (A) : (B)
@ -69,7 +70,7 @@ Modify::Modify(LAMMPS *lmp) : Pointers(lmp)
n_final_integrate = n_end_of_step = n_thermo_energy = 0;
n_initial_integrate_respa = n_post_integrate_respa = 0;
n_pre_force_respa = n_post_force_respa = n_final_integrate_respa = 0;
n_min_post_force = n_min_energy = 0;
n_min_pre_exchange = n_min_post_force = n_min_energy = 0;
fix = NULL;
fmask = NULL;
@ -81,7 +82,7 @@ Modify::Modify(LAMMPS *lmp) : Pointers(lmp)
list_initial_integrate_respa = list_post_integrate_respa = NULL;
list_pre_force_respa = list_post_force_respa = NULL;
list_final_integrate_respa = NULL;
list_min_post_force = list_min_energy = NULL;
list_min_pre_exchange = list_min_post_force = list_min_energy = NULL;
end_of_step_every = NULL;
@ -127,6 +128,7 @@ Modify::~Modify()
delete [] list_pre_force_respa;
delete [] list_post_force_respa;
delete [] list_final_integrate_respa;
delete [] list_min_pre_exchange;
delete [] list_min_post_force;
delete [] list_min_energy;
@ -171,6 +173,7 @@ void Modify::init()
list_init(FINAL_INTEGRATE_RESPA,
n_final_integrate_respa,list_final_integrate_respa);
list_init(MIN_PRE_EXCHANGE,n_min_pre_exchange,list_min_pre_exchange);
list_init(MIN_POST_FORCE,n_min_post_force,list_min_post_force);
list_init(MIN_ENERGY,n_min_energy,list_min_energy);
@ -388,6 +391,16 @@ void Modify::final_integrate_respa(int ilevel)
fix[list_final_integrate_respa[i]]->final_integrate_respa(ilevel);
}
/* ----------------------------------------------------------------------
minimizer pre-exchange call, only for relevant fixes
------------------------------------------------------------------------- */
void Modify::min_pre_exchange()
{
for (int i = 0; i < n_min_pre_exchange; i++)
fix[list_min_pre_exchange[i]]->min_pre_exchange();
}
/* ----------------------------------------------------------------------
minimizer force adjustment call, only for relevant fixes
------------------------------------------------------------------------- */

View File

@ -27,7 +27,7 @@ class Modify : protected Pointers {
int n_final_integrate,n_end_of_step,n_thermo_energy;
int n_initial_integrate_respa,n_post_integrate_respa;
int n_pre_force_respa,n_post_force_respa,n_final_integrate_respa;
int n_min_post_force,n_min_energy;
int n_min_pre_exchange,n_min_post_force,n_min_energy;
int nfix_restart_peratom;
int restart_pbc_any; // 1 if any fix sets restart_pbc
@ -59,6 +59,7 @@ class Modify : protected Pointers {
void post_force_respa(int,int,int);
void final_integrate_respa(int);
void min_pre_exchange();
void min_post_force(int);
double min_energy(double *);
@ -99,7 +100,7 @@ class Modify : protected Pointers {
int *list_initial_integrate_respa,*list_post_integrate_respa;
int *list_pre_force_respa,*list_post_force_respa;
int *list_final_integrate_respa;
int *list_min_post_force,*list_min_energy;
int *list_min_pre_exchange,*list_min_post_force,*list_min_energy;
int *end_of_step_every;

View File

@ -15,6 +15,7 @@
// see the README files in individual user-package directories for details
#include "style_user_ackland.h"
//#include "style_user_atc.h"
#include "style_user_cg_cmm.h"
#include "style_user_ewaldn.h"
#include "style_user_smd.h"