{xrst_comment
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
SPDX-FileCopyrightText: Bradley M. Bell <bradbell@seanet.com>
SPDX-FileContributor: 2024 Bradley M. Bell

This file is intended to help document multiple direction forward Taylor
computation for all operators.

It has the following xrst template comments:
   headers: n_dir, cap_order, order_up, taylor

It does not have any xrst template replacements:
}

n_dir
*****
number of directions that we are computing the Taylor coefficient for.

cap_order
*********
is the maximum number of orders that can fit in *taylor* .

order_up
********
is the order of the Taylor coefficients that are computed by this call.

taylor
******

per_variable
============
For each variable there is one Taylor coefficient of order zero
and *n_dir* coefficients for orders greater than zero.
The taylor coefficients capacity per variable is::

   per_variable = (cap_order - 1) * n_dir + 1

(j, k, ell)
===========
For variable index j, order k, and direction index ell::

   if k == 0
      (j, k, ell) = j * per_variable
   else
      (j, k, ell) = j * per_variable + (k-1) * n_dir + 1 + ell

The value taylor[ (j, k, ell) ] is the
Taylor coefficient corresponding to
the variable with index j, the order k, and the direction with index ell.

n_dir = 1
=========
If *n_dir* is equal to one then *ell* is zero and::

   (j, k, ell) = j * cap_order + k

n_res
=====
is the number of results (that are variables) for this operator.

Input
=====
::

   for j = 0, ..., i_z - n_res,
      for k = 0 , ... , order_up
         for ell = 0 , ... , n_dir - 1
            taylor [ (j, k, ell) ] is an input

   for j = i_z - n_res + 1, ..., i_z
      for k = 0 , ... , order_up - 1
         for ell = 0 , ... , n_dir - 1
            taylor [ (j, k, ell) ] is an input

Output
======
::

   for j = i_z - n_res + 1, ..., i_z
      for ell = 0 , ... , n_dir - 1
         taylor [ (j, order_up, ell) ] is an output
