forked from lijiext/lammps
Merge pull request #1562 from athomps/langevin-rm-notemplate
Removed TEMPLATED_FIX_LANGEVIN ifdef and untemplated version of fix langevin
This commit is contained in:
commit
61220f9b6c
|
@ -304,7 +304,6 @@ void FixLangevin::post_force(int /*vflag*/)
|
||||||
// this avoids testing them inside inner loop:
|
// this avoids testing them inside inner loop:
|
||||||
// TSTYLEATOM, GJF, TALLY, BIAS, RMASS, ZERO
|
// TSTYLEATOM, GJF, TALLY, BIAS, RMASS, ZERO
|
||||||
|
|
||||||
#ifdef TEMPLATED_FIX_LANGEVIN
|
|
||||||
if (tstyle == ATOM)
|
if (tstyle == ATOM)
|
||||||
if (gjfflag)
|
if (gjfflag)
|
||||||
if (tallyflag)
|
if (tallyflag)
|
||||||
|
@ -431,10 +430,6 @@ void FixLangevin::post_force(int /*vflag*/)
|
||||||
else
|
else
|
||||||
if (zeroflag) post_force_templated<0,0,0,0,0,1>();
|
if (zeroflag) post_force_templated<0,0,0,0,0,1>();
|
||||||
else post_force_templated<0,0,0,0,0,0>();
|
else post_force_templated<0,0,0,0,0,0>();
|
||||||
#else
|
|
||||||
post_force_untemplated(int(tstyle==ATOM), gjfflag, tallyflag,
|
|
||||||
int(tbiasflag==BIAS), int(rmass!=NULL), zeroflag);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -448,15 +443,9 @@ void FixLangevin::post_force_respa(int vflag, int ilevel, int /*iloop*/)
|
||||||
modify forces using one of the many Langevin styles
|
modify forces using one of the many Langevin styles
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#ifdef TEMPLATED_FIX_LANGEVIN
|
|
||||||
template < int Tp_TSTYLEATOM, int Tp_GJF, int Tp_TALLY,
|
template < int Tp_TSTYLEATOM, int Tp_GJF, int Tp_TALLY,
|
||||||
int Tp_BIAS, int Tp_RMASS, int Tp_ZERO >
|
int Tp_BIAS, int Tp_RMASS, int Tp_ZERO >
|
||||||
void FixLangevin::post_force_templated()
|
void FixLangevin::post_force_templated()
|
||||||
#else
|
|
||||||
void FixLangevin::post_force_untemplated
|
|
||||||
(int Tp_TSTYLEATOM, int Tp_GJF, int Tp_TALLY,
|
|
||||||
int Tp_BIAS, int Tp_RMASS, int Tp_ZERO)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
double gamma1,gamma2;
|
double gamma1,gamma2;
|
||||||
|
|
||||||
|
|
|
@ -72,16 +72,10 @@ class FixLangevin : public Fix {
|
||||||
class RanMars *random;
|
class RanMars *random;
|
||||||
int seed;
|
int seed;
|
||||||
|
|
||||||
// comment next line to turn off templating
|
|
||||||
#define TEMPLATED_FIX_LANGEVIN
|
|
||||||
#ifdef TEMPLATED_FIX_LANGEVIN
|
|
||||||
template < int Tp_TSTYLEATOM, int Tp_GJF, int Tp_TALLY,
|
template < int Tp_TSTYLEATOM, int Tp_GJF, int Tp_TALLY,
|
||||||
int Tp_BIAS, int Tp_RMASS, int Tp_ZERO >
|
int Tp_BIAS, int Tp_RMASS, int Tp_ZERO >
|
||||||
void post_force_templated();
|
void post_force_templated();
|
||||||
#else
|
|
||||||
void post_force_untemplated(int, int, int,
|
|
||||||
int, int, int);
|
|
||||||
#endif
|
|
||||||
void omega_thermostat();
|
void omega_thermostat();
|
||||||
void angmom_thermostat();
|
void angmom_thermostat();
|
||||||
void compute_target();
|
void compute_target();
|
||||||
|
|
Loading…
Reference in New Issue