Skip to content

Commit b14a00b

Browse files
committed
improved tutorial, small edits to reference manual
1 parent 4c876b0 commit b14a00b

File tree

2 files changed

+45
-23
lines changed

2 files changed

+45
-23
lines changed

src/doc/source/refman.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Reference Manual
88
****************
99

1010
The code is written in the following languages:
11-
Ada, C, C++ (NVIDIA CUDA), and Python.
11+
Ada, C, C++, NVIDIA CUDA, Python, and most recently Julia.
1212
The following description documents the organization and
1313
design decisions which led to the current state of the code.
1414

@@ -17,7 +17,7 @@ and Windows computers. Shared memory parallelism works
1717
on all three operating systems.
1818
The message passing with MPI has not been tested on Windows.
1919
The development of the accelerator code with NVIDIA CUDA
20-
was done on Linux computers.
20+
was done on Linux computers and gaming laptops running Windows.
2121

2222
The Python code was developed and tested on Linux and MacOS X,
2323
not on Windows.

src/doc/source/tutorial.rst

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mainly for use at the command line.
77
Interfaces for Maple, MATLAB (Octave), SageMath, and Python
88
provide a scripting environment.
99

10-
Input formats
10+
Input Formats
1111
=============
1212

1313
A lot of examples are contained in the database of Demo systems,
@@ -106,21 +106,34 @@ of the antidiagonal require only the executable version phc.
106106
The other interfaces PHClib, PHCmpi, and phcpy are tied
107107
to the source code.
108108

109-
The phc.py is an optional package, available in the distribution
109+
The ``phc.py`` (observe the dot between ``phc`` and ``py``)
110+
is an optional package, available in the distribution
110111
of SageMath. Another, perhaps more natural interface to SageMath,
111112
is to extend the Python interpreter of SageMath with phcpy.
112113

113-
Calling the blackbox solver
114-
===========================
114+
Runs in a Jupyter notebook work with a Python or SageMath kernel,
115+
using the interpreter with phcpy installed.
116+
For Julia, use PHCpack.jl, either as standalone or in a Jupyter
117+
notebook with a Julia kernel.
115118

116-
The blackbox solver works reasonably well to approximate all isolated
117-
solutions of a polynomial system. On the system we saved earlier in
119+
The Blackbox Solvers
120+
====================
121+
122+
Depending on whether the polynomial system has only isolated solutions,
123+
or whether also positive dimensional solution sets, select one of those
124+
two blackbox options:
125+
126+
1. ``phc -b`` to approximate all isolated solutions; or
127+
128+
2. ``phc -B`` for a numerical irreducible decomposition.
129+
130+
To use ``phc -b`` on the system we saved earlier in
118131
the file multilin, we invoke the blackbox solver typing
119132
at the command prompt
120133

121134
::
122135

123-
/tmp/phc -b multilin multilin.phc
136+
phc -b multilin multilin.phc
124137

125138
The output of the solver will be sent to the file multilin.phc.
126139
In case the input file did not yet contain any solutions,
@@ -147,12 +160,13 @@ solution in the list occurs in the following format:
147160

148161
This is the actual output of the root refiner. As the residual
149162
at the end of the solution path and at the start of the root refinement
150-
is already 1.887E-14, one iteration of
163+
is already ``1.887E-14``, one iteration of
151164
Newton's method suffices to confirm the quality of the root.
152165

153166
The next line in the output indicates that we reached the end of
154-
the path, at t=1, properly. The multiplicity of the root is one,
155-
as indicated by m = 1. Then we see the values for the five variables,
167+
the path, at ``t : 1.00000000000000E+00 0.00000000000000E+00``
168+
properly. The multiplicity of the root is one,
169+
as indicated by ``m : 1``. Then we see the values for the five variables,
156170
as pairs of two floating-point numbers: the real and imaginary part of
157171
each value. The last line summarizes the numerical quality of the root.
158172
The value for err is the magnitude of the last correction term
@@ -187,7 +201,7 @@ with the option ``-B``, typing at the command prompt
187201

188202
::
189203

190-
/tmp/phc -B adjmin4 adjmin4.phc
204+
phc -B adjmin4 adjmin4.phc
191205

192206
The user is then prompted to enter the top dimension of the solution set,
193207
which by default equals the number of variables minus one.
@@ -201,10 +215,10 @@ in the numerical irreducible decomposition.
201215
To run in quad double precision on 16 threads,
202216
type ``phc -B4 -t16`` at the command prompt.
203217

204-
Running the program in full mode
218+
Running the Program in Full Mode
205219
================================
206220

207-
If we just type in ``/tmp/phc`` without any option, we run the program
221+
If we just type in ``phc`` without any option, we run the program
208222
in full mode and will pass through all the main menus.
209223
A nice application is the verification of the counterexample of Bertrand
210224
Haas. We type in haas when the program asks us for the name of
@@ -233,8 +247,16 @@ m-homogeneous start systems. We can save the start system in the file
233247
multilin\_start (only used for backup).
234248
Now we continue just as before.
235249

236-
Running the program in toolbox mode
237-
===================================
250+
Running Toolbox Mode
251+
====================
252+
253+
The blackbox mode makes a selection of algorithms
254+
and runs them with default settings of the tolerances and parameters.
255+
In toolbox mode, defaults can be alterned and the stages in the solver
256+
are separated.
257+
258+
For Isolated Solutions Only
259+
---------------------------
238260

239261
Skipping the preconditioning stage (scaling and reduction),
240262
we can compute root counts and construct start systems via the option ``-r``,
@@ -247,12 +269,12 @@ is useful if we have to solve a slightly modified problem.
247269
For instance,
248270
suppose we change the coefficients of the system in multilin,
249271
then we can still use multilin_start to solve the system with
250-
modified coefficients, using the ``-p`` option. In this way we use
251-
a cheater's homotopy, performing a kind of coefficient-parameter
252-
polynomial continuation.
272+
modified coefficients, using the ``-p`` option.
273+
In this way we use a :index:`cheater's homotopy`, alternatively called
274+
:index:`coefficient-parameter polynomial continuation`.
253275

254-
Dealing with components of solutions
255-
====================================
276+
Computing Components of Solutions
277+
---------------------------------
256278

257279
Consider the system of adjacent minors, we previously saved
258280
as ``adjmin4``. We first must construct a suitable embedding
@@ -263,4 +285,4 @@ solver has no difficulty to solve this problem and appends the
263285
witness points to the file ``adjmin4e5``. To compute the
264286
irreducible decomposition, we may use the monodromy breakup
265287
algorithm, selecting 2 from the menu that comes up when we
266-
can the program with the option ``-f``.
288+
run with the option ``-f``.

0 commit comments

Comments
 (0)