git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12943 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -30,6 +30,7 @@
|
|||||||
#include "fix_store.h"
|
#include "fix_store.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
|
#include "respa.h"
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.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");
|
if (ifix < 0) error->all(FLERR,"Could not find fix adapt storage fix ID");
|
||||||
fix_chg = (FixStore *) modify->fix[ifix];
|
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)
|
void FixAdaptFEP::pre_force(int vflag)
|
||||||
{
|
{
|
||||||
if (nevery == 0) return;
|
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()
|
void FixAdaptFEP::post_run()
|
||||||
{
|
{
|
||||||
if (resetflag) restore_settings();
|
if (resetflag) restore_settings();
|
||||||
|
|||||||
@ -37,10 +37,13 @@ class FixAdaptFEP : public Fix {
|
|||||||
void setup_pre_force(int);
|
void setup_pre_force(int);
|
||||||
void pre_force(int);
|
void pre_force(int);
|
||||||
void post_run();
|
void post_run();
|
||||||
|
void setup_pre_force_respa(int,int);
|
||||||
|
void pre_force_respa(int,int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int nadapt,resetflag,scaleflag,afterflag;
|
int nadapt,resetflag,scaleflag,afterflag;
|
||||||
int anypair;
|
int anypair;
|
||||||
|
int nlevels_respa;
|
||||||
char *id_fix_diam,*id_fix_chg;
|
char *id_fix_diam,*id_fix_chg;
|
||||||
class FixStore *fix_diam,*fix_chg;
|
class FixStore *fix_diam,*fix_chg;
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
#include "fix_store.h"
|
#include "fix_store.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
|
#include "respa.h"
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.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");
|
if (ifix < 0) error->all(FLERR,"Could not find fix adapt storage fix ID");
|
||||||
fix_chg = (FixStore *) modify->fix[ifix];
|
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)
|
void FixAdapt::pre_force(int vflag)
|
||||||
{
|
{
|
||||||
if (nevery == 0) return;
|
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()
|
void FixAdapt::post_run()
|
||||||
{
|
{
|
||||||
if (resetflag) restore_settings();
|
if (resetflag) restore_settings();
|
||||||
|
|||||||
@ -37,10 +37,13 @@ class FixAdapt : public Fix {
|
|||||||
void setup_pre_force(int);
|
void setup_pre_force(int);
|
||||||
void pre_force(int);
|
void pre_force(int);
|
||||||
void post_run();
|
void post_run();
|
||||||
|
void setup_pre_force_respa(int,int);
|
||||||
|
void pre_force_respa(int,int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int nadapt,resetflag,scaleflag;
|
int nadapt,resetflag,scaleflag;
|
||||||
int anypair;
|
int anypair;
|
||||||
|
int nlevels_respa;
|
||||||
char *id_fix_diam,*id_fix_chg;
|
char *id_fix_diam,*id_fix_chg;
|
||||||
class FixStore *fix_diam,*fix_chg;
|
class FixStore *fix_diam,*fix_chg;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user