Skip to content

Commit 3df667d

Browse files
authored
[Examples] Update the advanced timer scene following changes made in the Static ODE solve (#147)
See SOFA PR #2050 Signed-off-by: Jean-Nicolas Brunet <[email protected]>
1 parent c9670d5 commit 3df667d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/advanced_timer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def onAnimateEndEvent(self, event):
3030

3131
nb_iterations = records['AnimateVisitor']['Mechanical (meca)']['StaticSolver::Solve']['nb_iterations']
3232
for i in range(int(nb_iterations)):
33-
total_time = records['AnimateVisitor']['Mechanical (meca)']['StaticSolver::Solve']['step_'+str(i)]['total_time']
34-
CG_iterations = records['AnimateVisitor']['Mechanical (meca)']['StaticSolver::Solve']['step_'+str(i)]['CG iterations']
33+
total_time = records['AnimateVisitor']['Mechanical (meca)']['StaticSolver::Solve']['NewtonStep'][i]['total_time']
34+
CG_iterations = records['AnimateVisitor']['Mechanical (meca)']['StaticSolver::Solve']['NewtonStep'][i]['MBKSolve']['CG iterations']
3535
print(f" Newton iteration #{i} took {total_time:.2f} ms using {int(CG_iterations)} CG iterations")
3636

3737
if not self.use_sofa_profiler_timer:

0 commit comments

Comments
 (0)