Commit 370eda7f authored by Olivier Lantsoght's avatar Olivier Lantsoght
Browse files

[Ctypes] Issue #177, (12)User buffer, solved for dirdyn.

parent b25d1e05
......@@ -470,13 +470,13 @@ class MbsDirdyn(object):
if self.mbs_dirdyn_ptr.contents.user_buffer.contents.nx:
size = self.mbs_dirdyn_ptr.contents.user_buffer.contents.index
nbOutput = self.mbs_dirdyn_ptr.contents.user_buffer.contents.nx
user_out = np.copy(np.ctypeslib.as_array(self.mbs_dirdyn_ptr.contents.user_buffer.contents.X[0],(nbOutput, size)))
for i in range(nbOutput):
user_out = np.copy(np.ctypeslib.as_array(self.mbs_dirdyn_ptr.contents.user_buffer.contents.X[i],(1, size)))
name = self.mbs_dirdyn_ptr.contents.user_buffer.contents.names[i]
name = name.decode('utf-8')
self.results.outputs[name] = user_out[i,:]
self.results.outputs[name] = user_out[0]
libmodules.mbs_dirdyn_finish(self.mbs_dirdyn_ptr, self.mbs.mbs_data_ptr)
#libmodules.mbs_dirdyn_finish(self.mbs_dirdyn_ptr, self.mbs.mbs_data_ptr)
# Anassign user functions
if self.mbs.opt_load_c < 2:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment