The post_force callback should also be called during "setup"
This commit is contained in:
@ -105,6 +105,13 @@ void FixPythonInvoke::end_of_step()
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void FixPythonInvoke::setup(int vflag)
|
||||||
|
{
|
||||||
|
post_force(vflag);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void FixPythonInvoke::post_force(int vflag)
|
void FixPythonInvoke::post_force(int vflag)
|
||||||
{
|
{
|
||||||
if (update->ntimestep % nevery != 0) return;
|
if (update->ntimestep % nevery != 0) return;
|
||||||
|
|||||||
@ -30,6 +30,7 @@ class FixPythonInvoke : public Fix {
|
|||||||
FixPythonInvoke(class LAMMPS *, int, char **);
|
FixPythonInvoke(class LAMMPS *, int, char **);
|
||||||
~FixPythonInvoke() override;
|
~FixPythonInvoke() override;
|
||||||
int setmask() override;
|
int setmask() override;
|
||||||
|
void setup(int) override;
|
||||||
void end_of_step() override;
|
void end_of_step() override;
|
||||||
void post_force(int) override;
|
void post_force(int) override;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user