Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Dec 3, 2023
1 parent c717bb3 commit cee26d5
Show file tree
Hide file tree
Showing 31 changed files with 184 additions and 169 deletions.
4 changes: 0 additions & 4 deletions doc/arkode/guide/source/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,6 @@ Users now need to link to ``sundials_core`` in addition to the libraries already
This will be picked up automatically in projects that use the SUNDIALS CMake target. The library ``sundials_generic`` has been superceded by ``sundials_core`` and is no longer available.
This fixes some duplicate symbol errors on Windows when linking to multiple SUNDIALS libraries.

**Breaking change**
Users now need to link to ``sundials_core`` in addition to the libraries already linked to.
This will be picked up automatically in projects that use the SUNDIALS CMake target. The library ``sundials_generic`` has been superceded by ``sundials_core`` and is no longer available.


Changes in v5.6.2
-----------------
Expand Down
30 changes: 20 additions & 10 deletions doc/arkode/guide/source/Usage/General.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ modules, vectors and algebraic solvers, are found in

.. code-block::
<libdir>/libsundials_nvec*.<so|a>
<libdir>/libsundials_sunmat*.<so|a>
<libdir>/libsundials_sunlinsol*.<so|a>
<libdir>/libsundials_sunnonlinsol*.<so|a>
<libdir>/libsundials_sunmem.<so|a>
<libdir>/libsundials_nvec*.lib
<libdir>/libsundials_sunmat*.lib
<libdir>/libsundials_sunlinsol*.lib
<libdir>/libsundials_sunnonlinsol*.lib
<libdir>/libsundials_sunmem*.lib
The file extension ``.lib`` is typically ``.so`` for shared libraries
and ``.a`` for static libraries.
Expand All @@ -63,24 +63,34 @@ prototypes, and include the shared ``arkode/arkode.h`` and
included, but there are optional ones that can be included as necessary.
Information on optional headers is given in the relevant documentation section.

The calling program must also include an :c:type:`N_Vector` implementation header file,
of the form ``nvector/nvector_*.h``. See :numref:`NVectors` for the appropriate name.

If the user includes a non-trivial implicit component to their ODE system in
ARKStep, or if the slow time scale for MRIStep should be treated implicitly,
then each implicit stage will require a nonlinear solver for the resulting
system of algebraic equations -- the default for this is a modified or inexact
Newton iteration, depending on the user's choice of linear solver. If choosing
to set which nonlinear solver module, or when interacting with a
:numref:`SUNNonlinSol` module directly, the calling program must also include a
:numref:`SUNNonlinSol` header file, of the form ``sunnonlinsol/sunnonlinsol_***.h``
:c:type:`SUNNonlinearSolver` module directly, the calling program must also include a
:c:type:`SUNNonlinearSolver` header file, of the form ``sunnonlinsol/sunnonlinsol_***.h``
where ``***`` is the name of the nonlinear solver module
(see :numref:`SUNNonlinSol` for more information).


If using a nonlinear solver that requires the solution of a linear system of the
form :math:`\mathcal{A}x=b` (e.g., the default Newton iteration), then a linear
solver module header file will also be required. Similarly, if the ODE system
in ARKStep involves a non-identity mass matrix :math:`M \ne I`, then each time
step will require a linear solver for systems of the form :math:`Mx=b`.
In this case it will be necessary to include the header file for a SUNDIALS linear
solver, which is of the form ``sunlinsol/sunlinsol_***.h``.
step will require a linear solver for systems of the form :math:`Mx=b`. In this
case it will be necessary to include the header file for a
:c:type:`SUNLinearSolver` solver, which is of the form
``sunlinsol/sunlinsol_***.h`` (see :numref:`SUNLinSol` for more information).

If the linear solver is matrix-based, the linear solver header will also include a
header file of the from ``sunmatrix/sunmatrix_*.h`` where ``*`` is the name of the
matrix implementation compatible with the linear solver (see :numref:`SUNMatrix` for
more information).

Other headers may be needed, according to the choice of preconditioner, etc.
For example, if preconditioning for an iterative linear solver were performed
Expand Down
37 changes: 23 additions & 14 deletions doc/cvode/guide/source/Usage/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ modules, vectors and algebraic solvers, are found in

.. code-block::
<libdir>/libsundials_nvec*.<so|a>
<libdir>/libsundials_sunmat*.<so|a>
<libdir>/libsundials_sunlinsol*.<so|a>
<libdir>/libsundials_sunnonlinsol*.<so|a>
<libdir>/libsundials_sunmem.<so|a>
<libdir>/libsundials_nvec*.lib
<libdir>/libsundials_sunmat*.lib
<libdir>/libsundials_sunlinsol*.lib
<libdir>/libsundials_sunnonlinsol*.lib
<libdir>/libsundials_sunmem*.lib
The file extension ``.lib`` is typically ``.so`` for shared libraries
and ``.a`` for static libraries.
Expand All @@ -88,23 +88,32 @@ the header file for CVODE in addition to the SUNDIALS core header file:
#include <sundials/sundials_core.h> // Provides core SUNDIALS types
#include <cvode/cvode.h> // CVODE provides linear multistep methods
The calling program must also include an ``N_Vector`` implementation header file, of the form
The calling program must also include an :c:type:`N_Vector` implementation header file, of the form
``nvector/nvector_*.h``. See :numref:`NVectors` for the appropriate name.

If using a non-default nonlinear solver module, or when interacting with a ``SUNNonlinearSolver``
module directly, the calling program must also include a ``SUNNonlinearSolver`` implementation
header file, of the form ``sunnonlinsol/sunnonlinsol_*.h`` where is the name of the nonlinear solver
module (see :numref:`SUNNonlinSol` for more information). This file in turn includes the header file
which defines the abstract data type.
If using a non-default nonlinear solver module, or when interacting with a
:c:type:`SUNNonlinearSolver` module directly, the calling program must
also include a :c:type:`SUNNonlinearSolver` implementation header file,
of the form ``sunnonlinsol/sunnonlinsol_*.h`` where ``*`` is the name of
the nonlinear solver module (see :numref:`SUNNonlinSol` for more
information).

If using a nonlinear solver that requires the solution of a linear system of the form
:eq:`CVODE_Newton` (e.g., the default Newton iteration), then a linear solver module header file
will be required.
will be required. In this case it will be necessary to include the header file for a
:c:type:`SUNLinearSolver` solver, which is of the form ``sunlinsol/sunlinsol_***.h``
(see :numref:`SUNLinSol` for more information).

If the linear solver is matrix-based, the linear solver header will also include a
header file of the from ``sunmatrix/sunmatrix_*.h`` where ``*`` is the name of the
matrix implementation compatible with the linear solver (see :numref:`SUNMatrix` for
more information).

Other headers may be needed, according to the choice of preconditioner, etc. For example, in the
example (see :cite:p:`cvode_ex`), preconditioning is done with a block-diagonal matrix. For this,
even though the ``SUNLINSOL_SPGMR`` linear solver is used, the header is included for access to the
underlying generic dense matrix arithmetic routines.
even though the ``SUNLINSOL_SPGMR`` linear solver is used, the header
``sundials dense.h`` is included for access to the underlying generic dense matrix
arithmetic routines.

.. _CVODE.Usage.CC.skeleton_sim:

Expand Down
38 changes: 23 additions & 15 deletions doc/cvodes/guide/source/Usage/SIM.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ modules, vectors and algebraic solvers, are found in

.. code-block::
<libdir>/libsundials_nvec*.<so|a>
<libdir>/libsundials_sunmat*.<so|a>
<libdir>/libsundials_sunlinsol*.<so|a>
<libdir>/libsundials_sunnonlinsol*.<so|a>
<libdir>/libsundials_sunmem.<so|a>
<libdir>/libsundials_nvec*.lib
<libdir>/libsundials_sunmat*.lib
<libdir>/libsundials_sunlinsol*.lib
<libdir>/libsundials_sunnonlinsol*.lib
<libdir>/libsundials_sunmem*.lib
The file extension ``.lib`` is typically ``.so`` for shared libraries
and ``.a`` for static libraries.
Expand All @@ -87,24 +87,32 @@ the header file for CVODES in addition to the SUNDIALS core header file:
#include <sundials/sundials_core.h> // Provides core SUNDIALS types
#include <cvodes/cvodes.h> // CVODES provides linear multistep methods with sensitivity analysis
The calling program must also include an ``N_Vector`` implementation header file, of the form
The calling program must also include an :c:type`N_Vector` implementation header file, of the form
``nvector/nvector_*.h``. See :numref:`NVectors` for the appropriate name.

If using a non-default nonlinear solver module, or when interacting with a ``SUNNonlinearSolver``
module directly, the calling program must also include a ``SUNNonlinearSolver`` implementation
header file, of the form ``sunnonlinsol/sunnonlinsol_*.h`` where is the name of the nonlinear solver
module (see :numref:`SUNNonlinSol` for more information). This file in turn includes the header file
which defines the abstract data type.
If using a non-default nonlinear solver module, or when interacting with a
:c:type:`SUNNonlinearSolver` module directly, the calling program must
also include a :c:type:`SUNNonlinearSolver` implementation header file,
of the form ``sunnonlinsol/sunnonlinsol_*.h`` where ``*`` is the name of
the nonlinear solver module (see :numref:`SUNNonlinSol` for more
information).

If using a nonlinear solver that requires the solution of a linear system of the form
:eq:`CVODES_Newton` (e.g., the default Newton iteration), then a linear solver module header file
will be required.
will be required. In this case it will be necessary to include the header file for a
:c:type:`SUNLinearSolver` solver, which is of the form ``sunlinsol/sunlinsol_***.h``
(see :numref:`SUNLinSol` for more information).

If the linear solver is matrix-based, the linear solver header will also include a
header file of the from ``sunmatrix/sunmatrix_*.h`` where ``*`` is the name of the
matrix implementation compatible with the linear solver (see :numref:`SUNMatrix` for
more information).

Other headers may be needed, according to the choice of preconditioner, etc. For example, in the
example (see :cite:p:`cvodes_ex`), preconditioning is done with a block-diagonal matrix. For this,
even though the ``SUNLINSOL_SPGMR`` linear solver is used, the header is included for access to the
underlying generic dense matrix arithmetic routines.

even though the ``SUNLINSOL_SPGMR`` linear solver is used, the header
``sundials dense.h`` is included for access to the underlying generic dense matrix
arithmetic routines.

.. warning::

Expand Down
24 changes: 11 additions & 13 deletions doc/ida/guide/source/Usage/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ modules, vectors and algebraic solvers, are found in

.. code-block::
<libdir>/libsundials_nvec*.<so|a>
<libdir>/libsundials_sunmat*.<so|a>
<libdir>/libsundials_sunlinsol*.<so|a>
<libdir>/libsundials_sunnonlinsol*.<so|a>
<libdir>/libsundials_sunmem.<so|a>
<libdir>/libsundials_nvec*.lib
<libdir>/libsundials_sunmat*.lib
<libdir>/libsundials_sunlinsol*.lib
<libdir>/libsundials_sunnonlinsol*.lib
<libdir>/libsundials_sunmem*.lib
The file extension ``.lib`` is typically ``.so`` for shared libraries
and ``.a`` for static libraries.
Expand All @@ -81,27 +81,25 @@ the header file for IDA in addition to the SUNDIALS core header file:
#include <sundials/sundials_core.h> // Provides core SUNDIALS types
#include <ida/ida.h> // IDA provides methods for DAEs
The calling program must also include an ``N_Vector`` implementation header file, of the form
The calling program must also include an :c:type:`N_Vector` implementation header file, of the form
``nvector/nvector_*.h``. See :numref:`NVectors` for the appropriate name.
The calling program must also include an ``N_Vector`` implementation
header file, of the form ``nvector/nvector_*.h`` (see Chapter :numref:`NVectors`
for more information).

If using a non-default nonlinear solver object, or when interacting with a
``SUNNonlinearSolver`` object directly, the calling program must also include a
``SUNNonlinearSolver`` implementation header file, of the form
:c:type:`SUNNonlinearSolver` object directly, the calling program must also include a
:c:type:`SUNNonlinearSolver` implementation header file, of the form
``sunnonlinsol/sunnonlinsol_*.h`` where ``*`` is the name of the nonlinear
solver (see Chapter :numref:`SUNNonlinSol` for more information).

If using a nonlinear solver that requires the solution of a linear system of the
form :eq:`IDA_DAE_nls` (e.g., the default Newton iteration), the calling program
must also include a ``SUNLinearSolver`` implementation header file, of the from
must also include a :c:type:`SUNLinearSolver` implementation header file, of the from
``sunlinsol/sunlinsol_*.h`` where ``*`` is the name of the linear solver
(see Chapter :numref:`SUNLinSol` for more information).

If the linear solver is matrix-based, the linear solver header will also include
a header file of the from ``sunmatrix/sunmatrix_*.h`` where ``*`` is the name of
the matrix implementation compatible with the linear solver.
the matrix implementation compatible with the linear solver (see Chapter
:numref:`SUNMatrix` for more information).

Other headers may be needed, according to the choice of preconditioner, etc. For
example, in the example ``idaFoodWeb_kry_p`` (see :cite:p:`ida_ex`),
Expand Down
26 changes: 12 additions & 14 deletions doc/idas/guide/source/Usage/SIM.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ where ``instdir`` is the directory where SUNDIALS was installed.
Regardless of where the user's application program resides, its
associated compilation and load commands must make reference to the
appropriate locations for the library and header files required by
IDAS. IDAS symbols are found in ``libdir/libsundials_ida.lib``.
IDAS. IDAS symbols are found in ``libdir/libsundials_idas.lib``.
Thus, in addition to linking to ``libdir/libsundials_core.lib``, IDAS
users need to link to the IDAS library. Symbols for additional SUNDIALS
modules, vectors and algebraic solvers, are found in

.. code-block::
<libdir>/libsundials_nvec*.<so|a>
<libdir>/libsundials_sunmat*.<so|a>
<libdir>/libsundials_sunlinsol*.<so|a>
<libdir>/libsundials_sunnonlinsol*.<so|a>
<libdir>/libsundials_sunmem.<so|a>
<libdir>/libsundials_nvec*.lib
<libdir>/libsundials_sunmat*.lib
<libdir>/libsundials_sunlinsol*.lib
<libdir>/libsundials_sunnonlinsol*.lib
<libdir>/libsundials_sunmem*.lib
The file extension ``.lib`` is typically ``.so`` for shared libraries
and ``.a`` for static libraries.
Expand All @@ -80,27 +80,25 @@ the header file for IDAS in addition to the SUNDIALS core header file:
#include <sundials/sundials_core.h> // Provides core SUNDIALS types
#include <idas/idas.h> // IDAS provides methods for DAEs with sensitivity analysis
The calling program must also include an ``N_Vector`` implementation header file, of the form
The calling program must also include an :c:type:`N_Vector` implementation header file, of the form
``nvector/nvector_*.h``. See :numref:`NVectors` for the appropriate name.
The calling program must also include an ``N_Vector`` implementation
header file, of the form ``nvector/nvector_*.h`` (see Chapter :numref:`NVectors`
for more information).

If using a non-default nonlinear solver object, or when interacting with a
``SUNNonlinearSolver`` object directly, the calling program must also include a
``SUNNonlinearSolver`` implementation header file, of the form
:c:type:`SUNNonlinearSolver` object directly, the calling program must also include a
:c:type:`SUNNonlinearSolver` implementation header file, of the form
``sunnonlinsol/sunnonlinsol_*.h`` where ``*`` is the name of the nonlinear
solver (see Chapter :numref:`SUNNonlinSol` for more information).

If using a nonlinear solver that requires the solution of a linear system of the
form :eq:`IDAS_DAE_nls` (e.g., the default Newton iteration), the calling program
must also include a ``SUNLinearSolver`` implementation header file, of the from
must also include a :c:type:`SUNLinearSolver` implementation header file, of the from
``sunlinsol/sunlinsol_*.h`` where ``*`` is the name of the linear solver
(see Chapter :numref:`SUNLinSol` for more information).

If the linear solver is matrix-based, the linear solver header will also include
a header file of the from ``sunmatrix/sunmatrix_*.h`` where ``*`` is the name of
the matrix implementation compatible with the linear solver.
the matrix implementation compatible with the linear solver. (see Chapter
:numref:`SUNMatrix` for more information).

Other headers may be needed, according to the choice of preconditioner, etc. For
example, in the example ``idasFoodWeb_kry_p`` (see :cite:p:`ida_ex`),
Expand Down
33 changes: 16 additions & 17 deletions doc/kinsol/guide/source/Usage/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ where ``instdir`` is the directory where SUNDIALS was installed.
Regardless of where the user's application program resides, its
associated compilation and load commands must make reference to the
appropriate locations for the library and header files required by
KINSOL. KINSOL symbols are found in ``libdir/libsundials_ida.lib``.
KINSOL. KINSOL symbols are found in ``libdir/libsundials_kinsol.lib``.
Thus, in addition to linking to ``libdir/libsundials_core.lib``, KINSOL
users need to link to the KINSOL library. Symbols for additional SUNDIALS
modules, vectors and algebraic solvers, are found in

.. code-block::
<libdir>/libsundials_nvec*.<so|a>
<libdir>/libsundials_sunmat*.<so|a>
<libdir>/libsundials_sunlinsol*.<so|a>
<libdir>/libsundials_sunnonlinsol*.<so|a>
<libdir>/libsundials_sunmem.<so|a>
<libdir>/libsundials_nvec*.lib
<libdir>/libsundials_sunmat*.lib
<libdir>/libsundials_sunlinsol*.lib
<libdir>/libsundials_sunnonlinsol*.lib
<libdir>/libsundials_sunmem*.lib
The file extension ``.lib`` is typically ``.so`` for shared libraries
and ``.a`` for static libraries.
Expand All @@ -82,20 +82,19 @@ the header file for KINSOL in addition to the SUNDIALS core header file:
#include <sundials/sundials_core.h> // Provides core SUNDIALS types
#include <kinsol/kinsol.h> // KINSOL provides methods for solving nonlinear systems
The calling program must also include an ``N_Vector`` implementation header file, of the form
The calling program must also include an :c:type:`N_Vector` implementation header file, of the form
``nvector/nvector_*.h``. See :numref:`NVectors` for the appropriate name.
The calling program must also include an ``N_Vector`` implementation
header file, of the form ``nvector/nvector_*.h`` (see Chapter :numref:`NVectors`
for more information).

If using a Newton or Picard nonlinear solver that requires the solution of a
linear system, then a linear solver module header file will be required. If the
linear solver is matrix-based, the linear solver header will also include a
header file of the from ``sunmatrix/sunmatrix_*.h`` where ``*`` is the name of
the matrix implementation compatible with the linear solver. The matrix header
file provides access to the relevant matrix functions/macros and in turn
includes the header file ``sundials_matrix.h`` which defines the abstract matrix
data type.
linear system, the calling program must also include a ``SUNLinearSolver``
implementation header file, of the from ``sunlinsol/sunlinsol_*.h`` where ``*``
is the name of the linear solver (see Chapter :numref:`SUNLinSol` for more
information).

If the linear solver is matrix-based, the linear solver header will also include
a header file of the from ``sunmatrix/sunmatrix_*.h`` where ``*`` is the name of
the matrix implementation compatible with the linear solver. (see Chapter
:numref:`SUNMatrix` for more information).

Other headers may be needed, according to the choice of preconditioner, etc. For
example, in the example ``kinFoodWeb_kry_p`` (see :cite:p:`kinsol_ex`),
Expand Down
Loading

0 comments on commit cee26d5

Please sign in to comment.