output ninserted for fixes: deposit+pour
This commit is contained in:
@ -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()
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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,11 @@ void FixDeposit::options(int narg, char **arg)
|
||||
}
|
||||
}
|
||||
|
||||
double FixDeposit::compute_scalar()
|
||||
{
|
||||
return ninserted;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
pack entire state of Fix into one write
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user