From 9d39587d37bc9faaed25ecc0547ccb41fb2fc8bb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 27 Sep 2020 19:05:40 -0400 Subject: [PATCH] expand c-library properties example --- doc/src/Library_properties.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/src/Library_properties.rst b/doc/src/Library_properties.rst index bf36dcb8b1..037e6ffb5a 100644 --- a/doc/src/Library_properties.rst +++ b/doc/src/Library_properties.rst @@ -26,9 +26,18 @@ event as atoms are migrating between sub-domains. handle = lammps_open_no_mpi(0, NULL, NULL); lammps_file(handle,"in.sysinit"); - printf("running simulation with %g atoms\n", + printf("Running a simulation with %g atoms.\n", lammps_get_natoms(handle)); + printf(" %d local and %d ghost atoms. %d atom types\n", + lammps_extract_setting(handle,"nlocal"), + lammps_extract_setting(handle,"nghost"), + lammps_extract_setting(handle,"ntypes")); + + double *dt = (double *)lammps_extract_global(handle,"dt"); + printf("Changing timestep from %g to 0.5\n", *dt); + *dt = 0.5; + lammps_command(handle,"run 1000 post no"); for (i=0; i < 10; ++i) {