diff --git a/python/lammps.py b/python/lammps.py index 84ce22e9f0..484c30d9ac 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -510,6 +510,10 @@ class lammps(object): result = ptr[0] self.lib.lammps_free(ptr) return result + elif (style == 2) and (type == 0): + self.lib.lammps_extract_fix.restype = POINTER(c_int) + ptr = self.lib.lammps_extract_fix(self.lmp,id,style,type,i,j) + return ptr[0] elif (style == 1) or (style == 2): if type == 1: self.lib.lammps_extract_fix.restype = POINTER(c_double) diff --git a/src/library.cpp b/src/library.cpp index 60b75b968c..72fcbba833 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -621,6 +621,7 @@ void *lammps_extract_fix(void *ptr, char *id, int style, int type, if (style == 2) { if (!fix->local_flag) return NULL; + if (type == 0) return (void *) &fix->size_local_rows; if (type == 1) return (void *) fix->vector_local; if (type == 2) return (void *) fix->array_local; }