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

This commit is contained in:
sjplimp 2007-02-19 18:02:36 +00:00
parent 3f99475925
commit 7c5b79781f
2 changed files with 19 additions and 0 deletions

View File

@ -14,7 +14,9 @@
#include "string.h"
#include "fix_wall_reflect.h"
#include "atom.h"
#include "modify.h"
#include "domain.h"
#include "comm.h"
#include "error.h"
using namespace LAMMPS_NS;
@ -49,6 +51,22 @@ int FixWallReflect::setmask()
/* ---------------------------------------------------------------------- */
void FixWallReflect::init()
{
// warn if any integrate fix comes after this one
int after = 0;
int flag = 0;
for (int i = 0; i < modify->nfix; i++) {
if (strcmp(id,modify->fix[i]->id) == 0) after = 1;
else if ((modify->fmask[i] & INITIAL_INTEGRATE) && after) flag = 1;
}
if (flag && comm->me == 0)
error->warning("Fix wall/reflect should come after all other integration fixes");
}
/* ---------------------------------------------------------------------- */
void FixWallReflect::initial_integrate()
{
double xlo = domain->boxxlo;

View File

@ -22,6 +22,7 @@ class FixWallReflect : public Fix {
public:
FixWallReflect(class LAMMPS *, int, char **);
int setmask();
void init();
void initial_integrate();
private: