forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@318 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
3f99475925
commit
7c5b79781f
|
@ -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;
|
||||
|
|
|
@ -22,6 +22,7 @@ class FixWallReflect : public Fix {
|
|||
public:
|
||||
FixWallReflect(class LAMMPS *, int, char **);
|
||||
int setmask();
|
||||
void init();
|
||||
void initial_integrate();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue