Fixes bug in extract_compute() python method

This commit is contained in:
Aidan Thompson 2019-10-24 16:17:32 -06:00
parent 8f431b0fb8
commit 8f8bcf5f7b
1 changed files with 3 additions and 8 deletions

View File

@ -399,14 +399,9 @@ class lammps(object):
ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type)
return ptr
if type == 2:
if style == 0:
self.lib.lammps_extract_compute.restype = POINTER(c_int)
ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type)
return ptr[0]
else:
self.lib.lammps_extract_compute.restype = POINTER(POINTER(c_double))
ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type)
return ptr
self.lib.lammps_extract_compute.restype = POINTER(POINTER(c_double))
ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type)
return ptr
return None
# extract fix info