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

This commit is contained in:
sjplimp 2007-10-10 00:11:12 +00:00
parent 4fdb3616b0
commit d914548318
4 changed files with 26 additions and 1 deletions

View File

@ -153,6 +153,12 @@ FixDeform::FixDeform(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
options(narg-iarg,&arg[iarg]);
// setup dimflags used by other classes to check for volume-change conflicts
for (int i = 0; i < 6; i++)
if (set[i].style == NONE) dimflag[i] = 0;
else dimflag[i] = 1;
// check periodicity
if ((set[0].style && domain->xperiodic == 0) ||

View File

@ -20,7 +20,8 @@ namespace LAMMPS_NS {
class FixDeform : public Fix {
public:
int remapflag;
int remapflag; // whether x,v are remapped across PBC
int dimflag[6]; // which dims are deformed
FixDeform(class LAMMPS *, int, char **);
~FixDeform();

View File

@ -24,6 +24,7 @@
#include "comm.h"
#include "domain.h"
#include "modify.h"
#include "fix_deform.h"
#include "compute.h"
#include "kspace.h"
#include "update.h"
@ -232,6 +233,14 @@ void FixNPH::init()
if (atom->mass == NULL)
error->all("Cannot use fix nph without per-type mass defined");
for (int i = 0; i < modify->nfix; i++)
if (strcmp(modify->fix[i]->style,"deform") == 0) {
int *dimflag = ((FixDeform *) modify->fix[i])->dimflag;
if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) ||
(p_flag[2] && dimflag[2]))
error->all("Cannot use fix npt and fix deform on same dimension");
}
// set temperature and pressure ptrs
// set ptemperature only if pressure's id_pre[0] is not id_temp

View File

@ -23,6 +23,7 @@
#include "force.h"
#include "comm.h"
#include "modify.h"
#include "fix_deform.h"
#include "compute.h"
#include "kspace.h"
#include "update.h"
@ -242,6 +243,14 @@ void FixNPT::init()
if (atom->mass == NULL)
error->all("Cannot use fix npt without per-type mass defined");
for (int i = 0; i < modify->nfix; i++)
if (strcmp(modify->fix[i]->style,"deform") == 0) {
int *dimflag = ((FixDeform *) modify->fix[i])->dimflag;
if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) ||
(p_flag[2] && dimflag[2]))
error->all("Cannot use fix npt and fix deform on same dimension");
}
// set temperature and pressure ptrs
// set ptemperature only if pressure's id_pre[0] is not id_temp