Merge remote-tracking branch 'github/develop' into collected-small-fixes

This commit is contained in:
Axel Kohlmeyer
2023-10-30 12:25:18 -04:00
6 changed files with 30 additions and 6 deletions

View File

@ -289,10 +289,11 @@ operation of the fix continues in an uninterrupted fashion.
The fix will try to detect it and stop with an error.
None of the :doc:`fix_modify <fix_modify>` options are relevant to this
fix. No global or per-atom quantities are stored by this fix for
access by various :doc:`output commands <Howto_output>`. No parameter
of this fix can be used with the *start/stop* keywords of the
:doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.
fix. This fix computes a global scalar, which can be accessed by various
output commands. The scalar is the cumulative number of insertions. The
scalar value calculated by this fix is “intensive”. No parameter of this
fix can be used with the *start/stop* keywords of the :doc:`run <run>`
command. This fix is not invoked during :doc:`energy minimization <minimize>`.
Restrictions
""""""""""""

View File

@ -245,8 +245,9 @@ produce the same behavior if you adjust the fix pour parameters
appropriately.
None of the :doc:`fix_modify <fix_modify>` options are relevant to this
fix. No global or per-atom quantities are stored by this fix for
access by various :doc:`output commands <Howto_output>`. No parameter
fix. This fix computes a global scalar, which can be accessed by various
output commands. The scalar is the cumulative number of insertions. The
scalar value calculated by this fix is “intensive”. No parameter
of this fix can be used with the *start/stop* keywords of the
:doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.

View File

@ -58,6 +58,7 @@ FixPour::FixPour(LAMMPS *lmp, int narg, char **arg) :
if (lmp->kokkos) error->all(FLERR, "Cannot yet use fix pour with the KOKKOS package");
scalar_flag = 1;
time_depend = 1;
if (!atom->radius_flag || !atom->rmass_flag)
@ -1030,6 +1031,15 @@ void FixPour::options(int narg, char **arg)
}
}
/* ----------------------------------------------------------------------
output number of successful insertions
------------------------------------------------------------------------- */
double FixPour::compute_scalar()
{
return ninserted;
}
/* ---------------------------------------------------------------------- */
void FixPour::reset_dt()

View File

@ -32,6 +32,7 @@ class FixPour : public Fix {
void init() override;
void setup_pre_exchange() override;
void pre_exchange() override;
double compute_scalar() override;
void reset_dt() override;
void *extract(const char *, int &) override;

View File

@ -51,6 +51,7 @@ FixDeposit::FixDeposit(LAMMPS *lmp, int narg, char **arg) :
{
if (narg < 7) error->all(FLERR,"Illegal fix deposit command");
scalar_flag = 1;
restart_global = 1;
time_depend = 1;
@ -816,6 +817,15 @@ void FixDeposit::options(int narg, char **arg)
}
}
/* ----------------------------------------------------------------------
output number of successful insertions
------------------------------------------------------------------------- */
double FixDeposit::compute_scalar()
{
return ninserted;
}
/* ----------------------------------------------------------------------
pack entire state of Fix into one write
------------------------------------------------------------------------- */

View File

@ -32,6 +32,7 @@ class FixDeposit : public Fix {
void init() override;
void setup_pre_exchange() override;
void pre_exchange() override;
double compute_scalar() override;
void write_restart(FILE *) override;
void restart(char *) override;
void *extract(const char *, int &) override;