From de3dc7c234e1207e4dd706a6d8eb844fb3daa8a4 Mon Sep 17 00:00:00 2001 From: Taylor Howell Date: Tue, 27 May 2025 04:25:03 -0700 Subject: [PATCH] Update documentation from `mjData.solver_iter` to `mjData.solver_niter`. PiperOrigin-RevId: 763729137 Change-Id: I1266539ead38e083d427614d50b2aa79a68aa09c --- doc/APIreference/APIglobals.rst | 2 +- doc/APIreference/APItypes.rst | 2 +- doc/programming/simulation.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/APIreference/APIglobals.rst b/doc/APIreference/APIglobals.rst index 09c01f6c..11077782 100644 --- a/doc/APIreference/APIglobals.rst +++ b/doc/APIreference/APIglobals.rst @@ -448,7 +448,7 @@ shown in the table below. Their names are in the format ``mjKEY_XXX``. They corr - 200 - The number of iterations where solver statistics can be stored in ``mjData.solver``. This array is used to store diagnostic information about each iteration of the constraint solver. - The actual number of iterations is given by ``mjData.solver_iter``. + The actual number of iterations is given by ``mjData.solver_niter``. * - ``mjNISLAND`` - 20 - The number of islands for which solver statistics can be stored in ``mjData.solver``. This array is diff --git a/doc/APIreference/APItypes.rst b/doc/APIreference/APItypes.rst index f2ecf868..f1df0615 100644 --- a/doc/APIreference/APItypes.rst +++ b/doc/APIreference/APItypes.rst @@ -914,7 +914,7 @@ mjSolverStat This is the data structure holding information about one solver iteration. ``mjData.solver`` is a preallocated array of mjSolverStat data structures, one for each iteration of the solver, up to a maximum of mjNSOLVER. The actual number -of solver iterations is given by ``mjData.solver_iter``. +of solver iterations is given by ``mjData.solver_niter``. .. mujoco-include:: mjSolverStat diff --git a/doc/programming/simulation.rst b/doc/programming/simulation.rst index d0cf5029..26bf3fe7 100644 --- a/doc/programming/simulation.rst +++ b/doc/programming/simulation.rst @@ -807,7 +807,7 @@ to implement high-resolution timers in C without bringing in additional dependen does not need timing, and in that case there is no reason to call timing functions. One part of the simulation pipeline that needs to be monitored closely is the iterative constraint solver. The -simplest diagnostic here is ``mjData.solver_iter`` which shows how many iterations the solver took on the last call to +simplest diagnostic here is ``mjData.solver_niter`` which shows how many iterations the solver took on the last call to mj_step or ``mj_forward``. Note that the solver has tolerance parameters for early termination, so this number is usually smaller than the maximum number of iterations allowed. The array ``mjData.solver`` contains one :ref:`mjSolverStat` data structure per iteration of the constraint solver, with information about the constraint state