Commit bdd6ae2c authored by Nicolas Docquier's avatar Nicolas Docquier
Browse files

Merge branch 'MBsysPy_hotfix' into 'dev'

Fix last modification

See merge request robotran/mbsysc!413
parents bfd184f9 66574127
......@@ -248,6 +248,9 @@ class MbsDirdyn(object):
self.results.t = self.results.q[:, 0]
if self.results.t[0] != self.get_options("t0"):
results_loaded = False
# Clear loaded data
self.results.q = []
self.results.t = []
# Results have to be loaded from file, extract files names.
results_filename = bytes_to_str(ctypes.string_at(self.mbs_dirdyn_ptr.contents.buffers[0].contents.filename))
# Check if user vector output have been defined
......@@ -317,12 +320,12 @@ class MbsDirdyn(object):
if (error >= 0):
libmodules.mbs_dirdyn_finish(self.mbs_dirdyn_ptr, self.mbs.mbs_data_ptr)
if not results_loaded:
mbs_msg("The beginning of the integration is not available in the buffer.\n"
"The complete results are loaded from files.\n")
self.results.load_results_from_file(results_filename, module=6,
user_output=user_output_filenames,
user_vector=user_output_vector_filenames)
if self.get_options("save2file") and not results_loaded:
mbs_msg("The beginning of the integration is not available in the buffer.\n"
"The complete results are loaded from files.\n")
self.results.load_results_from_file(results_filename, module=6,
user_output=user_output_filenames,
user_vector=user_output_vector_filenames)
# Unassign user functions
if self.mbs.opt_load_c < 2:
......
Markdown is supported
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