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