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?
How to check if the analyze is completed?
Moderators: silvia, selimgunay, Moderators
-
- Posts: 916
- Joined: Mon Sep 09, 2013 8:50 pm
- Location: University of California, Berkeley
Re: How to check if the analyze is completed?
Best way is to save the data using recorders. You don't have the problem that you described with recorders
Re: How to check if the analyze is completed?
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.
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.
Re: How to check if the analyze is completed?
set ok [analyze 1]
puts $ok
will output 0 if it worked, other number if did not.
puts $ok
will output 0 if it worked, other number if did not.