rename cundamp to damping/cundall
This commit is contained in:
@ -55,7 +55,7 @@ OPT.
|
||||
* :doc:`cmap <fix_cmap>`
|
||||
* :doc:`colvars <fix_colvars>`
|
||||
* :doc:`controller <fix_controller>`
|
||||
* :doc:`cundamp <fix_cundamp>`
|
||||
* :doc:`damping/cundall <fix_damping_cundall>`
|
||||
* :doc:`deform (k) <fix_deform>`
|
||||
* :doc:`deposit <fix_deposit>`
|
||||
* :doc:`dpd/energy (k) <fix_dpd_energy>`
|
||||
|
||||
@ -198,7 +198,7 @@ accelerated styles exist.
|
||||
* :doc:`cmap <fix_cmap>` - enables CMAP cross-terms of the CHARMM force field
|
||||
* :doc:`colvars <fix_colvars>` - interface to the collective variables "Colvars" library
|
||||
* :doc:`controller <fix_controller>` - apply control loop feedback mechanism
|
||||
* :doc:`cundamp <fix_cundamp>` - Cundall non-viscous damping for granular simulations
|
||||
* :doc:`damping/cundall <fix_damping_cundall>` - Cundall non-viscous damping for granular simulations
|
||||
* :doc:`deform <fix_deform>` - change the simulation box size/shape
|
||||
* :doc:`deposit <fix_deposit>` - add new atoms above a surface
|
||||
* :doc:`dpd/energy <fix_dpd_energy>` - constant energy dissipative particle dynamics
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
.. index:: fix cundamp
|
||||
.. index:: fix damping/cundall
|
||||
|
||||
fix cundamp command
|
||||
===================
|
||||
fix damping/cundall command
|
||||
===========================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
fix ID group-ID cundamp gamma_l gamma_a keyword values ...
|
||||
fix ID group-ID damping/cundall gamma_l gamma_a keyword values ...
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* cundamp = style name of this fix command
|
||||
* damping/cundall = style name of this fix command
|
||||
* gamma_l = linear damping coefficient (dimensionless)
|
||||
* gamma_a = angular damping coefficient (dimensionless)
|
||||
* zero or more keyword/value pairs may be appended
|
||||
@ -28,8 +28,8 @@ Examples
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all cundamp 0.8 0.8
|
||||
fix 1 all cundamp 0.8 0.5 scale 3 2.5
|
||||
fix 1 all damping/cundall 0.8 0.8
|
||||
fix 1 all damping/cundall 0.8 0.5 scale 3 2.5
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
@ -115,6 +115,8 @@ Default
|
||||
|
||||
none
|
||||
|
||||
References
|
||||
""""""""""
|
||||
|
||||
.. _Cundall1987:
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_cundamp.h"
|
||||
#include "fix_damping_cundall.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "error.h"
|
||||
@ -26,16 +26,16 @@ using namespace FixConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixCundamp::FixCundamp(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixDampingCundall::FixDampingCundall(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg),
|
||||
gamma_lin(nullptr),gamma_ang(nullptr)
|
||||
{
|
||||
dynamic_group_allow = 1;
|
||||
|
||||
if (!atom->sphere_flag)
|
||||
error->all(FLERR,"Fix cundamp requires atom style sphere");
|
||||
error->all(FLERR,"Fix damping/cundall requires atom style sphere");
|
||||
|
||||
if (narg < 5) error->all(FLERR,"Illegal fix cundamp command");
|
||||
if (narg < 5) error->all(FLERR,"Illegal fix damping/cundall command");
|
||||
|
||||
double gamma_lin_one = utils::numeric(FLERR,arg[3],false,lmp);
|
||||
double gamma_ang_one = utils::numeric(FLERR,arg[4],false,lmp);
|
||||
@ -51,15 +51,15 @@ FixCundamp::FixCundamp(LAMMPS *lmp, int narg, char **arg) :
|
||||
int iarg = 5;
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"scale") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix cundamp command");
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix damping/cundall command");
|
||||
int itype = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||
double scale = utils::numeric(FLERR,arg[iarg+2],false,lmp);
|
||||
if (itype <= 0 || itype > atom->ntypes)
|
||||
error->all(FLERR,"Illegal fix cundamp command");
|
||||
error->all(FLERR,"Illegal fix damping/cundall command");
|
||||
gamma_lin[itype] = gamma_lin_one * scale;
|
||||
gamma_ang[itype] = gamma_ang_one * scale;
|
||||
iarg += 3;
|
||||
} else error->all(FLERR,"Illegal fix cundamp command");
|
||||
} else error->all(FLERR,"Illegal fix damping/cundall command");
|
||||
}
|
||||
|
||||
respa_level_support = 1;
|
||||
@ -68,7 +68,7 @@ FixCundamp::FixCundamp(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixCundamp::~FixCundamp()
|
||||
FixDampingCundall::~FixDampingCundall()
|
||||
{
|
||||
delete [] gamma_lin;
|
||||
delete [] gamma_ang;
|
||||
@ -76,7 +76,7 @@ FixCundamp::~FixCundamp()
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int FixCundamp::setmask()
|
||||
int FixDampingCundall::setmask()
|
||||
{
|
||||
int mask = 0;
|
||||
mask |= POST_FORCE;
|
||||
@ -87,7 +87,7 @@ int FixCundamp::setmask()
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixCundamp::init()
|
||||
void FixDampingCundall::init()
|
||||
{
|
||||
int max_respa = 0;
|
||||
|
||||
@ -99,7 +99,7 @@ void FixCundamp::init()
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixCundamp::setup(int vflag)
|
||||
void FixDampingCundall::setup(int vflag)
|
||||
{
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
@ -112,14 +112,14 @@ void FixCundamp::setup(int vflag)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixCundamp::min_setup(int vflag)
|
||||
void FixDampingCundall::min_setup(int vflag)
|
||||
{
|
||||
post_force(vflag);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixCundamp::post_force(int /*vflag*/)
|
||||
void FixDampingCundall::post_force(int /*vflag*/)
|
||||
{
|
||||
// apply damping force/torque to finite-size atoms in group
|
||||
// add a fraction of the current force/torque if work is negative
|
||||
@ -165,14 +165,14 @@ void FixCundamp::post_force(int /*vflag*/)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixCundamp::post_force_respa(int vflag, int ilevel, int /*iloop*/)
|
||||
void FixDampingCundall::post_force_respa(int vflag, int ilevel, int /*iloop*/)
|
||||
{
|
||||
if (ilevel == ilevel_respa) post_force(vflag);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixCundamp::min_post_force(int vflag)
|
||||
void FixDampingCundall::min_post_force(int vflag)
|
||||
{
|
||||
post_force(vflag);
|
||||
}
|
||||
@ -13,21 +13,21 @@
|
||||
|
||||
#ifdef FIX_CLASS
|
||||
|
||||
FixStyle(cundamp,FixCundamp)
|
||||
FixStyle(damping/cundall,FixDampingCundall)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_FIX_CUNDAMP_H
|
||||
#define LMP_FIX_CUNDAMP_H
|
||||
#ifndef LMP_FIX_DAMPING_CUNDALL_H
|
||||
#define LMP_FIX_DAMPING_CUNDALL_H
|
||||
|
||||
#include "fix.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class FixCundamp : public Fix {
|
||||
class FixDampingCundall : public Fix {
|
||||
public:
|
||||
FixCundamp(class LAMMPS *, int, char **);
|
||||
virtual ~FixCundamp();
|
||||
FixDampingCundall(class LAMMPS *, int, char **);
|
||||
virtual ~FixDampingCundall();
|
||||
int setmask();
|
||||
void init();
|
||||
void setup(int);
|
||||
Reference in New Issue
Block a user