Skip to content

Commit 30a7cdd

Browse files
authored
Chiao/enhance_doc (#40)
* Fixed title cap * Added proper prefix * Added parameter doc * Updated the installation doc * Added logo * Updated the install doc
1 parent 63c25c9 commit 30a7cdd

File tree

6 files changed

+149
-11
lines changed

6 files changed

+149
-11
lines changed

docs/doxygen/Doxyfile.cfg

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ PROJECT_NUMBER = 0.1.0
4444
# for a project that appears at the top of each page and should give viewer a
4545
# quick idea about the purpose of the project. Keep the description short.
4646

47-
PROJECT_BRIEF = "Hybrid Incomplete Factorization with Iterative Refinements"
47+
PROJECT_BRIEF =
4848

4949
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
5050
# in the documentation. The maximum height of the logo should not exceed 55
5151
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
5252
# the logo to the output directory.
5353

54-
PROJECT_LOGO =
54+
PROJECT_LOGO = ./static/logo.png
5555

5656
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
5757
# into which the generated documentation will be written. If a relative path is
@@ -623,7 +623,7 @@ STRICT_PROTO_MATCHING = NO
623623
# list. This list is created by putting \todo commands in the documentation.
624624
# The default value is: YES.
625625

626-
GENERATE_TODOLIST = YES
626+
GENERATE_TODOLIST = NO
627627

628628
# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
629629
# list. This list is created by putting \test commands in the documentation.
@@ -795,6 +795,7 @@ INPUT = \
795795
../../src \
796796
./contents/main.doc \
797797
./contents/install.doc \
798+
./contents/params.doc \
798799
./contents/examples.doc \
799800
./defgroups.doc \
800801
../../examples/demo_utils.hpp

docs/doxygen/contents/examples.doc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//----------------------------------------------------------------------------
66
//@HEADER
77

8-
/*! \page _examples Collection of examples
8+
/*! \page _examples Collection of Examples
99
1010
\addindex examples
1111
\tableofcontents

docs/doxygen/contents/install.doc

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,33 @@
1212
1313
\section _install_cpp Installation of the C++ interface
1414
15-
Installing the C++ interface can be easily done by copying \a hifir.hpp
16-
and folder \a hif to the destination. Thanks to the head-only design, one just
17-
needs to include \a hifir.hpp in his/her projects.
15+
The *HIFIR* package is written in C++, and it uses template-based and
16+
header-only programming. Hence, the installation of C++ interface is pretty
17+
straightforward.
1818
19-
\section _install_c Installation of the C library (libhif)
19+
To download the latest version of the code, use the command
20+
21+
\code{.sh}
22+
git clone -–depth 1 https://github.com/hifirworks/hifir.git hifir
23+
cd hifir
24+
\endcode
25+
26+
To install the code, you can simply do the following on a UNIX system
27+
28+
\code{.sh}
29+
sudo cp -r src/* /usr/local/include
30+
\endcode
31+
32+
or copy the source files to any user-level directories, e.g.,
33+
34+
\code{.sh}
35+
cp -r src/* $HOME/.local/include
36+
\endcode
37+
38+
and then add `-I$HOME/.local/include` to the command line of your C++ compiler.
39+
40+
\section _install_c Installation of the C library (libhifir)
41+
42+
Finish me...
2043
2144
*/

docs/doxygen/contents/main.doc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ Contacts
1919
2020
The package development is led
2121
by <a href="http://www.ams.sunysb.edu/~jiao/">Prof. Xiangmin (Jim) Jiao</a> with
22-
main developer(s) Qiao Chen.
22+
main developer(s) Dr. Qiao Chen.
2323
24-
24+
2525
\li Prof. Xiangmin (Jim) Jiao, [email protected]
2626
2727
Active maintainer(s):
2828
29-
\li Qiao Chen
29+
\li Dr. Qiao Chen
3030
\li Prof. Xiangmin (Jim) Jiao
3131
3232
Citations and Publications

docs/doxygen/contents/params.doc

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
// -*-C++-*-
2+
//@HEADER
3+
//----------------------------------------------------------------------------
4+
// Copyright (C) 2021 NumGeom Group at Stony Brook University
5+
//----------------------------------------------------------------------------
6+
//@HEADER
7+
8+
/*! \page _params Control Parameters
9+
10+
\addindex parameters
11+
\tableofcontents
12+
13+
In this section, we discuss control parameters in HIFIR package. To create an
14+
instance of parameter structure, use the following
15+
16+
\code{.cpp}
17+
auto params = hif::get_default_params();
18+
\endcode
19+
20+
or equivalently
21+
22+
\code{.cpp}
23+
auto params = hif::DEFAULT_PARAMS;
24+
\endcode
25+
26+
The instance \a params is a C++ structure whose fields are different control
27+
parameters for computing HIF preconditioners. In the following, we will address
28+
commonly-used parameters categorized in different groups.
29+
30+
\section _params_basic Essential Parameters
31+
32+
We summary several essential control parameters used in HIF.
33+
34+
- \ref hif::Params::tau_L and \ref hif::Params::tau_U are *drop tolerance* (or
35+
\a droptol or \f$\tau\f$in short) for L and U factors during fan-in (aka
36+
Crout-version) ILUs, respectively. The default values are 1e-4 for robustness.
37+
For most PDE-based systems (i.e., nearly (pattern) symmetric systems), then
38+
can be increased to 1e-2. In general, we recommend
39+
\f$\tau\in [10^{-4},10^{-2}]\f$.
40+
- \ref hif::Params::alpha_L and \ref hif::Params::alpha_U are *fill-in factors*
41+
for *scalability-oriented dropping* for L and U, respectively. The default
42+
values are 10 for robustness. For 3D PDE systems, \f$\alpha=3\f$ usually works
43+
very well. For 2D PDE systems, \f$\alpha=5\f$ works well. In general, we
44+
recommend \f$\alpha\in [2,20]\f$.
45+
- \ref hif::Params::kappa_d and \ref hif::Params::kappa are
46+
\a conditioning \a thresholds for D and L/U factors, respectively. Their
47+
default values are 3, which can be enlarged to 5 for efficiency for most
48+
PDE-based systems, i.e., \f$\kappa\in [3,5]\f$.
49+
- \ref hif::Params::dense_thres controls the final Schur complement size, which
50+
by default is 2000. Note that the final Schur complement may be larger than
51+
this threshold, but it plays the most important role in determing the final
52+
Schur complement sizes. The default value 2000 is for robustness, especially
53+
for highly assymetric ill-conditioned systems. In general, 500 is sufficient
54+
for most PDE-based systems.
55+
56+
In summary, for relatively well-posed PDE-based systems, we recommend the
57+
following settings
58+
59+
\code{.cpp}
60+
auto params = hif::DEFAULT_PARAMS;
61+
params.tau_L = params.tau_U = 1e-2; // droptol
62+
params.alpha_L = params.alpha_U = 3; // fill-in factor
63+
params.kappa_d = params.kappa = 5; // conditioning
64+
params.dense_thres = 500;
65+
\endcode
66+
67+
\section _params_system System Parameters
68+
69+
- \ref hif::Params::verbose controls the verbose levels during factorizations.
70+
By default, \ref hif::VERBOSE_INFO is enabled. A new level can be enabled via
71+
bit-wise add options, e.g., `params.verbose |= hif::VERBOSE_PRE` also enables
72+
verbose information for preprocessing steps. To disbale verbose printing, set
73+
the verbose level to \ref hif::VERBOSE_NONE.
74+
- \ref hif::Params::threads controls the parallel threads for computing Schur
75+
complements. The default value is 0, which inherits the setting from the
76+
system via envrionment variable `OMP_NUM_THREADS` or function
77+
`omp_get_max_threads`.
78+
79+
\section _params_adv Advanced Parameters
80+
81+
In this section, we address some advanced parameters, which may become useful.
82+
83+
- \ref hif::Params::rrqr_cond controls the condition number threshold for
84+
truncating QRCP for the final Schur complement. The default value is
85+
\f$\epsilon_{\textrm{mach}}^{-2/3}\f$. For some extremely
86+
ill-conditioned but not singular systems, we may need to enlarge it.
87+
- \ref hif::Params::beta is the safeguard for preventing abnormally large or
88+
small scaling factors from equilibration. The default value is 1000.
89+
- \ref hif::Params::pivot controls the dynamic pivoting strategies. By default,
90+
it is set to be \ref hif::PIVOTING_AUTO, which automatically switches to use
91+
inverse-based rook pivoting in fan-in ILUs for the coarse levels if necessary.
92+
To enforce using or disable rook pivoting, use \ref hif::PIVOTING_ON and
93+
\ref hif::PIVOTING_OFF, respectively.
94+
95+
\section _params_pre Preprocessing Parameters
96+
97+
- \ref hif::Params::reorder is for choosing different fill-reduction reordering
98+
schemes, and we use AMD (\ref hif::REORDER_AMD) by default for its robustness.
99+
Other options \ref hif::REORDER_RCM and \ref hif::REORDER_AUTO are available.
100+
- \ref hif::Params::symm_pre_lvls controls number of levels for performing
101+
symmetric preprocessing. Let \f$ T=\textrm{symm\_pre\_lvls}\f$. If \f$ T\ge 0\f$,
102+
then we always perform exactly \f$ T\f$ levels of symmetric preprocessing.
103+
If \f$ T<0\f$, then we perform **at most** \f$\vert T\vert\f$ levels of
104+
symmetric preprocessing. For the latter, in particular, if the inputs of all
105+
levels are nearly pattern symmetric, then symmetric preprocessing is used for
106+
these levels. As far as "near pattern symmetry," the following parameter is
107+
used to control it. By default, \f$ T=-2\f$.
108+
- \ref hif::Params::nzp_thres controls the nonzero pattern (nzp) symmetry
109+
threshold, which is then used to determine near pattern symmetry. By default,
110+
it is 0.65, i.e., if 65% entries are pattern symmetric, then a symmetric
111+
preprocessing is used. Note that this parameter is only used if symm_pre_lvls
112+
is negative.
113+
114+
*/

docs/doxygen/static/logo.png

6.91 KB
Loading

0 commit comments

Comments
 (0)