How to check if the analyze is completed?

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
XiaoxuD
Posts: 8
Joined: Wed Feb 15, 2017 1:22 am
Location: csu

How to check if the analyze is completed?

Post by XiaoxuD » Sat Apr 28, 2018 2:14 am

Here is a simple code of the question.

...
analyze 1 0.01;
puts [nodeDisp 5 1]

Do I need to check whether the analyze has been completed before the nodeDisp and nodeReaction are used?
That's to say, if "analyze" and "nodeDisp" are asynchronous and the "analyze" is not completed before the execution of "nodeDisp" command, wrong or old value may be obtained.
If it's not guaranteed that the execution of "nodeDisp" will wait until the "analyze" is completed, how to check whether the "analyze" is completed?

selimgunay
Posts: 913
Joined: Mon Sep 09, 2013 8:50 pm
Location: University of California, Berkeley

Re: How to check if the analyze is completed?

Post by selimgunay » Sat Apr 28, 2018 5:47 pm

Best way is to save the data using recorders. You don't have the problem that you described with recorders

XiaoxuD
Posts: 8
Joined: Wed Feb 15, 2017 1:22 am
Location: csu

Re: How to check if the analyze is completed?

Post by XiaoxuD » Sat Apr 28, 2018 9:18 pm

If using recorders, I will have to parse the file to get data, which will make the program more trivial.
I wonder whether there is a method/command to get the running state of the "analyze", i.e. running, stopped ....
If the real time running state of the "analyze" can be obtained, the program will be more simple.
Thank you.

fmk
Site Admin
Posts: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: How to check if the analyze is completed?

Post by fmk » Wed May 02, 2018 8:36 pm

set ok [analyze 1]
puts $ok

will output 0 if it worked, other number if did not.

Post Reply