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

This commit is contained in:
sjplimp 2015-01-15 22:11:46 +00:00
parent a630194311
commit dd36721943
4 changed files with 46 additions and 0 deletions

View File

@ -30,6 +30,7 @@
#include "fix_store.h"
#include "input.h"
#include "variable.h"
#include "respa.h"
#include "math_const.h"
#include "memory.h"
#include "error.h"
@ -383,6 +384,9 @@ void FixAdaptFEP::init()
if (ifix < 0) error->all(FLERR,"Could not find fix adapt storage fix ID");
fix_chg = (FixStore *) modify->fix[ifix];
}
if (strstr(update->integrate_style,"respa"))
nlevels_respa = ((Respa *) update->integrate)->nlevels;
}
/* ---------------------------------------------------------------------- */
@ -394,6 +398,14 @@ void FixAdaptFEP::setup_pre_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixAdaptFEP::setup_pre_force_respa(int vflag, int ilevel)
{
if (ilevel < nlevels_respa-1) return;
setup_pre_force(vflag);
}
/* ---------------------------------------------------------------------- */
void FixAdaptFEP::pre_force(int vflag)
{
if (nevery == 0) return;
@ -412,6 +424,14 @@ void FixAdaptFEP::pre_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixAdaptFEP::pre_force_respa(int vflag, int ilevel)
{
if (ilevel < nlevels_respa-1) return;
setup_pre_force(vflag);
}
/* ---------------------------------------------------------------------- */
void FixAdaptFEP::post_run()
{
if (resetflag) restore_settings();

View File

@ -37,10 +37,13 @@ class FixAdaptFEP : public Fix {
void setup_pre_force(int);
void pre_force(int);
void post_run();
void setup_pre_force_respa(int,int);
void pre_force_respa(int,int);
private:
int nadapt,resetflag,scaleflag,afterflag;
int anypair;
int nlevels_respa;
char *id_fix_diam,*id_fix_chg;
class FixStore *fix_diam,*fix_chg;

View File

@ -26,6 +26,7 @@
#include "fix_store.h"
#include "input.h"
#include "variable.h"
#include "respa.h"
#include "math_const.h"
#include "memory.h"
#include "error.h"
@ -368,6 +369,9 @@ void FixAdapt::init()
if (ifix < 0) error->all(FLERR,"Could not find fix adapt storage fix ID");
fix_chg = (FixStore *) modify->fix[ifix];
}
if (strstr(update->integrate_style,"respa"))
nlevels_respa = ((Respa *) update->integrate)->nlevels;
}
/* ---------------------------------------------------------------------- */
@ -379,6 +383,14 @@ void FixAdapt::setup_pre_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixAdapt::setup_pre_force_respa(int vflag, int ilevel)
{
if (ilevel < nlevels_respa-1) return;
setup_pre_force(vflag);
}
/* ---------------------------------------------------------------------- */
void FixAdapt::pre_force(int vflag)
{
if (nevery == 0) return;
@ -388,6 +400,14 @@ void FixAdapt::pre_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixAdapt::pre_force_respa(int vflag, int ilevel)
{
if (ilevel < nlevels_respa-1) return;
setup_pre_force(vflag);
}
/* ---------------------------------------------------------------------- */
void FixAdapt::post_run()
{
if (resetflag) restore_settings();

View File

@ -37,10 +37,13 @@ class FixAdapt : public Fix {
void setup_pre_force(int);
void pre_force(int);
void post_run();
void setup_pre_force_respa(int,int);
void pre_force_respa(int,int);
private:
int nadapt,resetflag,scaleflag;
int anypair;
int nlevels_respa;
char *id_fix_diam,*id_fix_chg;
class FixStore *fix_diam,*fix_chg;