README.md

changeset 12
a0d61ac3719e
parent 9
a5e6fac08015
child 15
7c63af7c9acd
--- a/README.md	Mon Jun 29 00:20:42 2026 +0300
+++ b/README.md	Sun Oct 04 13:02:26 2026 -0500
@@ -1,5 +1,4 @@
-
-# Nuerical implementation of “Leak localisation with a measure source convection–diffusion model”
+# Numerical implementation of “Leak localisation with a measure source convection–diffusion model”
 
 These are the codes for the numerical demonstrations of the manuscript
 _“Leak localisation with a measure source convection--diffusion model”_
@@ -13,7 +12,7 @@
 
 (We admit it, we made a mistake by going with the crowd and using Fenicsx. In the end it would have been less effort to write low-level PDE code in Rust.)
 
-###  Phase 1: Python and Fenics
+### Phase 1: Python and Fenics
 
 #### Option 1.A that avoids Conda hell, but is more work (macOS and Linux)
 
@@ -28,18 +27,18 @@
 
 There's no guarantee that this will install compatible versions of these packages. Homebrew, while better than most Linux distributions, is also obsolete in its philosophy: it does not allow easily installing specific versions of packages. Versions known to work are:
 
-package | version
----------|--------
-boost    | 1.90.0
-cmake    | 4.2.1
-fmt      | 12.1.0
-hdf5-mpi | 1.14.6
-kahip    | 3.22
-petsc    | 3.24.3
-pugixml  | 1.15
-slepc    | 3.24.2
-spdlog   | 1.17.0
-gsl      | 2.8
+| package  | version |
+| -------- | ------- |
+| boost    | 1.90.0  |
+| cmake    | 4.2.1   |
+| fmt      | 12.1.0  |
+| hdf5-mpi | 1.14.6  |
+| kahip    | 3.22    |
+| petsc    | 3.24.3  |
+| pugixml  | 1.15    |
+| slepc    | 3.24.2  |
+| spdlog   | 1.17.0  |
+| gsl      | 2.8     |
 
 You can get the list of installed versions with:
 
@@ -65,7 +64,7 @@
 For changes `.envrc` to take effect, you should use
 
     direnv allow
-  
+
 ##### Phase 1.A.3: Fenicx-basix
 
 Install basix from <https://github.com/FEniCS/basix/releases/tag/v0.10.0.post0> according to
@@ -111,16 +110,15 @@
     export PYTHONPATH=$(echo .venv/lib/python*/site-packages)
     export PYO3_PYTHON="$(which python)"
 
-
 #### Option 1.B: Conda
 
-You can *try to* install Fenicsx in Conda according to instructions on the Fenics website. Additionally you need to install `scipy`:
+You can _try to_ install Fenicsx in Conda according to instructions on the Fenics website. Additionally you need to install `scipy`:
 
     conda create -n fenicsx-env
     conda activate fenicsx-env
     conda install -c conda-forge fenics-dolfinx=0.10.0 scipy=1.17.1 mpich
 
-This is, however, unlikely to not work, as Conda, despite its sandboxing separation attempts, conflicts with system packages, or Conda packages have weird ideas. You're likely to run into runtime problems with the FFCX form compiler (*bad* *bad* *bad* idea, running a C compiler runtime) failing due to something, somewhere, in the extremely fragile Conda setup, trying to load system libraries wrongly, etc.
+This is, however, unlikely to not work, as Conda, despite its sandboxing separation attempts, conflicts with system packages, or Conda packages have weird ideas. You're likely to run into runtime problems with the FFCX form compiler (_bad_ _bad_ _bad_ idea, running a C compiler runtime) failing due to something, somewhere, in the extremely fragile Conda setup, trying to load system libraries wrongly, etc.
 
 #### Option 1.C: Debian/Ubuntu
 
@@ -135,37 +133,37 @@
 1.  Install the [Rust] infrastructure (including Cargo) with [rustup].
 2.  Install a “nightly” release of the Rust compiler. With rustup, installed in
     the previous step, this can be done with
-    
+
         rustup toolchain install nightly
 
-3. Download [alg_tools], [pointsource_algs], and [measures] and unpack them under
-   the same directory as this package.
+3.  Download [alg_tools], [pointsource_algs], and [measures] and unpack them under
+    the same directory as this package.
 
-  [rustup]: https://rustup.rs
-  [alg_tools]: https://tuomov.iki.fi/software/alg_tools/
-  [pointsource_algs]: https://tuomov.iki.fi/software/pointsource_algs/
-  [measures]: https://tuomov.iki.fi/repos/measures/
-  [Rust]: https://www.rust-lang.org/
-  [GNU Scientific Library]: https://www.gnu.org/software/gsl/
-  [rust-GSL]: https://docs.rs/GSL/6.0.0/rgsl/
-  [Homebrew]: https://brew.sh
-  [arXiv:2212.02991]: https://arxiv.org/abs/2212.02991
-  [arXiv:2502.12417]: https://arxiv.org/abs/2502.12417
-  [doi:10.46298/jnsao-2023-10433]: http://doi.org/10.46298/jnsao-2023-10433
+[rustup]: https://rustup.rs
+[alg_tools]: https://tuomov.iki.fi/software/alg_tools/
+[pointsource_algs]: https://tuomov.iki.fi/software/pointsource_algs/
+[measures]: https://tuomov.iki.fi/repos/measures/
+[Rust]: https://www.rust-lang.org/
+[GNU Scientific Library]: https://www.gnu.org/software/gsl/
+[rust-GSL]: https://docs.rs/GSL/6.0.0/rgsl/
+[Homebrew]: https://brew.sh
+[arXiv:2212.02991]: https://arxiv.org/abs/2212.02991
+[arXiv:2502.12417]: https://arxiv.org/abs/2502.12417
+[doi:10.46298/jnsao-2023-10433]: http://doi.org/10.46298/jnsao-2023-10433
 
 ### Linux / further patching
 
 Due to both Fenics and typical Linux system being completely broken, you may need to do further patching to get things to compile:
 
-  1. I had to set (in my [direnv](https://direnv.net) `.envrc`)
-  
-          export PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/lib/pkgconfig:/usr/local/lib/pkgconfig/:/usr/lib/aarch64-linux-gnu/pkgconfig/
-          export LD_LIBRARY_PATH=/home/linuxbrew/.linuxbrew/lib
-    
-  2. Some libraries, in particular `libfmt` and `libspdlog` installed in Homebrew, may conflict with system versions, that must be removed.
-  Lack of proper sandboxing in legacy Linux distributions, effectively prohibits multiple versions of the same library.
-  2. I had to add `Libs` in `/usr/local/lib/pkgconfig/dolfinx.pc` the bit `-L/home/linuxbrew/.linuxbrew/lib/ -lopenblas`. Nothing in the fenics stack seems to explicitly require it. Basix, that depends on openblas, is entirely missing a `pkg-config` file.
-  3. Also `export export OMP_NUM_THREADS=1` (in `.envrc`). We don't do MPI. We cannot do MPI in Fenics' lame “it's all just parallel solution of PDEs, with no other computation, ever” aka “single-program multiple-data, with no controller at all” way. If you don't do this, you may have multiple threads wasting CPU just being there. We try to control the thread count in our code, but OpenMPI on Linux doesn't seem to respect it.
+1. I had to set (in my [direnv](https://direnv.net) `.envrc`)
+
+        export PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/lib/pkgconfig:/usr/local/lib/pkgconfig/:/usr/lib/aarch64-linux-gnu/pkgconfig/
+        export LD_LIBRARY_PATH=/home/linuxbrew/.linuxbrew/lib
+
+2. Some libraries, in particular `libfmt` and `libspdlog` installed in Homebrew, may conflict with system versions, that must be removed.
+   Lack of proper sandboxing in legacy Linux distributions, effectively prohibits multiple versions of the same library.
+3. I had to add `Libs` in `/usr/local/lib/pkgconfig/dolfinx.pc` the bit `-L/home/linuxbrew/.linuxbrew/lib/ -lopenblas`. Nothing in the fenics stack seems to explicitly require it. Basix, that depends on openblas, is entirely missing a `pkg-config` file.
+4. Also `export export OMP_NUM_THREADS=1` (in `.envrc`). We don't do MPI. We cannot do MPI in Fenics' lame “it's all just parallel solution of PDEs, with no other computation, ever” aka “single-program multiple-data, with no controller at all” way. If you don't do this, you may have multiple threads wasting CPU just being there. We try to control the thread count in our code, but OpenMPI on Linux doesn't seem to respect it.
 
 ## Building and running the experiments
 
@@ -187,7 +185,7 @@
 
 ### Visualising the results
 
-The results may be plotted with 
+The results may be plotted with
 
     python3 ./plot.py results/laser_and_mirrors_aux/radon_sliding_fb
 

mercurial