git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7267 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -509,14 +509,7 @@ void Input::clear()
|
|||||||
if (narg > 0) error->all(FLERR,"Illegal clear command");
|
if (narg > 0) error->all(FLERR,"Illegal clear command");
|
||||||
lmp->destroy();
|
lmp->destroy();
|
||||||
lmp->create();
|
lmp->create();
|
||||||
|
lmp->post_create();
|
||||||
// use of "omp" suffix implies using "package omp"
|
|
||||||
// re-create the effect of that package command which creates a fix
|
|
||||||
|
|
||||||
if (lmp->suffix && lmp->suffix_enable) {
|
|
||||||
if (strcmp(lmp->suffix,"omp") == 0)
|
|
||||||
lmp->input->one("package omp *");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -394,6 +394,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
|
|||||||
// allocate top-level classes
|
// allocate top-level classes
|
||||||
|
|
||||||
create();
|
create();
|
||||||
|
post_create();
|
||||||
|
|
||||||
// if helpflag set, print help and exit
|
// if helpflag set, print help and exit
|
||||||
|
|
||||||
@ -465,6 +466,19 @@ void LAMMPS::create()
|
|||||||
timer = new Timer(this);
|
timer = new Timer(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
invoke package-specific commands
|
||||||
|
called from LAMMPS instance constructor and after clear() command
|
||||||
|
only invoke if suffix is set and enabled
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void LAMMPS::post_create()
|
||||||
|
{
|
||||||
|
if (suffix && suffix_enable) {
|
||||||
|
if (strcmp(suffix,"omp") == 0) input->one("package omp *");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
initialize top-level classes
|
initialize top-level classes
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -49,6 +49,7 @@ class LAMMPS {
|
|||||||
LAMMPS(int, char **, MPI_Comm);
|
LAMMPS(int, char **, MPI_Comm);
|
||||||
~LAMMPS();
|
~LAMMPS();
|
||||||
void create();
|
void create();
|
||||||
|
void post_create();
|
||||||
void init();
|
void init();
|
||||||
void destroy();
|
void destroy();
|
||||||
|
|
||||||
|
|||||||
@ -27,14 +27,6 @@ int main(int argc, char **argv)
|
|||||||
MPI_Init(&argc,&argv);
|
MPI_Init(&argc,&argv);
|
||||||
|
|
||||||
LAMMPS *lammps = new LAMMPS(argc,argv,MPI_COMM_WORLD);
|
LAMMPS *lammps = new LAMMPS(argc,argv,MPI_COMM_WORLD);
|
||||||
|
|
||||||
// using /omp suffix implies running the "package omp"
|
|
||||||
// command with default settings.
|
|
||||||
if (lammps->suffix && lammps->suffix_enable) {
|
|
||||||
if (strcmp(lammps->suffix,"omp") == 0)
|
|
||||||
lammps->input->one("package omp *");
|
|
||||||
}
|
|
||||||
|
|
||||||
lammps->input->file();
|
lammps->input->file();
|
||||||
delete lammps;
|
delete lammps;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user