add deprecation warning for cuboid and sphere keywords
This commit is contained in:
@ -61,6 +61,11 @@ heat conduction with a source term (see Fig.12 in :ref:`(Li2014) <Li2014b>`)
|
||||
or diffusion with a source term (see Fig.1 in :ref:`(Li2015) <Li2015b>`), as
|
||||
an analog of a periodic Poiseuille flow problem.
|
||||
|
||||
.. deprecated:: TBD
|
||||
|
||||
The *sphere* and *cuboid* keywords will be removed in a future version
|
||||
of LAMMPS. The same functionality and more can be achieved with a region.
|
||||
|
||||
If the *sphere* keyword is used, the *cx, cy, cz, radius* values define
|
||||
a spherical domain to apply the source flux to.
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#include "fix_edpd_source.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "region.h"
|
||||
@ -43,6 +44,9 @@ FixEDPDSource::FixEDPDSource(LAMMPS *lmp, int narg, char **arg) :
|
||||
center[2] = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
radius = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
value = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "The sphere keyword is deprecated and will be removed in the future.");
|
||||
|
||||
} else if (strcmp(arg[iarg], "cuboid") == 0) {
|
||||
option = CUBOID;
|
||||
if (narg != 11) error->all(FLERR, "Illegal fix edpd/source command (6 args for cuboid)");
|
||||
@ -54,6 +58,9 @@ FixEDPDSource::FixEDPDSource(LAMMPS *lmp, int narg, char **arg) :
|
||||
dLy = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
dLz = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
value = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "The cuboid keyword is deprecated and will be removed in the future.");
|
||||
|
||||
} else if (strcmp(arg[iarg], "region") == 0) {
|
||||
option = REGION;
|
||||
if (narg != 6) error->all(FLERR, "Illegal fix edpd/source command (2 args for region)");
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#include "fix_tdpd_source.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "region.h"
|
||||
@ -45,6 +46,9 @@ FixTDPDSource::FixTDPDSource(LAMMPS *lmp, int narg, char **arg) :
|
||||
center[2] = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
radius = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
value = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "The sphere keyword is deprecated and will be removed in the future.");
|
||||
|
||||
} else if (strcmp(arg[iarg], "cuboid") == 0) {
|
||||
option = CUBOID;
|
||||
if (narg != 12) error->all(FLERR, "Illegal fix tdpd/source command (7 args for cuboid)");
|
||||
@ -56,6 +60,9 @@ FixTDPDSource::FixTDPDSource(LAMMPS *lmp, int narg, char **arg) :
|
||||
dLy = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
dLz = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
value = utils::numeric(FLERR, arg[iarg++], false, lmp);
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR, "The cuboid keyword is deprecated and will be removed in the future.");
|
||||
|
||||
} else if (strcmp(arg[iarg], "region") == 0) {
|
||||
option = REGION;
|
||||
if (narg != 7) error->all(FLERR, "Illegal fix tdpd/source command (2 args for region)");
|
||||
|
||||
Reference in New Issue
Block a user