.. _PeriodicNewton: Periodic Newton Algorithm ************************* .. tabs:: .. tab:: Tcl .. function:: algorithm PeriodicNewton <-iterate $tangIter> <-increment $tangIncr> <-maxDim $maxDim> <-factorOnce> .. tab:: Python .. code-block:: python ops.algorithm('PeriodicNewton', '-iterate', tangIter, '-increment', tangIncr, '-maxDim', maxDim, '-factorOnce') .. csv-table:: :header: "Argument", "Type", "Description" :widths: 10, 10, 40 $tangIter, |string|, "tangent formed every **maxDim** iterations: **current**, **initial** or **noTangent** (optional: default = current)" $tangIncr, |string|, "tangent formed at the start of each step: **current**, **initial** or **noTangent** (optional: default = current)" $maxDim, |integer|, "number of iterations after which a new tangent is formed (optional: default = 3)" -factorOnce, |string|, "assemble and factor the increment tangent in the first step, and keep it for all later steps, until the domain changes (optional). Also accepted as ``-factorIncrementOnce``" .. rubric:: Discussion This command is used to construct a PeriodicNewton algorithm. It is a :ref:`ModifiedNewton` method in which the tangent is formed again every **maxDim** iterations, instead of being kept for the whole step. It is a compromise between the :ref:`Newton` method, which forms the tangent at every iteration, and the modified Newton method, which forms it once per step. .. note:: The ``-factorOnce`` option behaves as for the :ref:`KrylovNewton` algorithm. .. admonition:: Example: The following example creates a PeriodicNewton algorithm that forms a new tangent every **5** iterations. .. tabs:: .. tab:: Tcl .. code-block:: tcl algorithm PeriodicNewton -maxDim 5 .. tab:: Python .. code-block:: python ops.algorithm('PeriodicNewton', '-maxDim', 5) Code Developed by: |mhs|