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

This commit is contained in:
sjplimp
2008-05-16 21:58:06 +00:00
parent 07ed5774a3
commit e520a220a3
3 changed files with 22 additions and 2 deletions

View File

@ -28,6 +28,7 @@
#include "pair.h"
#include "min.h"
#include "modify.h"
#include "compute.h"
#include "bond.h"
#include "angle.h"
#include "dihedral.h"
@ -802,6 +803,14 @@ void Input::dimension()
if (domain->box_exist)
error->all("Dimension command after simulation box is defined");
domain->dimension = atoi(arg[0]);
if (domain->dimension != 2 && domain->dimension != 3)
error->all("Illegal dimension command");
// must reset default extra_dof of all computes
// since some were created before dimension command is encountered
for (int i = 0; i < modify->ncompute; i++)
modify->compute[i]->reset_extra_dof();
}
/* ---------------------------------------------------------------------- */