DOI: 10.5281/zenodo.15909871
title: Reproducibility Data for: The Beauty of Adaptive Mesh Refinement: Omnitrees for Efficient Dyadic Discretizations

description: # Reproducing the Results of "The Beauty of Anisotropic Mesh Refinement: Omnitrees for Efficient Dyadic Discretizations"

## Three Repositories

To reproduce the results, you are going to need two github repositories:

The first repo, DyAda, implements the Omnitree data structure and the refinement algorithm.It can be installed either by

```bashgit clone https://github.com/freifrauvonbleifrei/DyAda.gitpip install -e DyAda```

or with

```bashpip install "dyada==0.05"```

The repo containing the experiment and postprocessing scripts, thingies_with_omnitrees,can be accessed with

```bashgit clone https://github.com/freifrauvonbleifrei/thingies_with_omnitrees.gitcd thingies_with_omnitrees```

The third repository contains the results we obtained and is [hosted on Zenodo](https://zenodo.org/records/15909872).

## Reproducing Figures 6-7

```bashmkdir thingies_all_experimentcd thingies_all_experimentpython3 ../threadpool.py```

Attention: this launches a beefy parallelized script and you probably don't want to spend the compute required to run it to the end.To run only a small part, replace the `range(num_slices)` in the `threadpool.py` script by something lower, like `range(2)`.Feel free to adjust the resolutions and the number of samples in this script as well.

This should produce files with the following filename structure:- starting with the thingi file ID- either octree or omnitree_1- the resolution level N (default 16 to 8192)- the number of sobol samples (default `s512`)- ending in `_3d.bin` for the omnitree data- ending in `occupancy.bin` for the binary function data

Also, there should be an `l1_errors_s512.csv` file in the folder now.To get the aggregate results used in figures 6-7, execute

```bashpython3 ../aggregate_l1_by_tree.py --sobol_samples 512```

The latex/pgfplots files used to generate the pictures can be found in the arxiv publication.

## Reproducing Figures 8a,9-10

For the focused 3d experiments, execute

```bashmkdir thingies_special_3dcd thingies_special_3dpython3 ../special_thingies.py 16-32768```

If you do not want to wait for resolution N=32768 to be reached, you can lower the value.

To obtain results about variability, execute this in five different folders and merge the resulting csv files into one.

In any case, this script will format the results for figure 8a:

```bashpython3 ../aggregate_l1_by_tree.py --sobol_samples 512 --by_id```

The image files for the animations can be generated with the plot script:

```bashfor i in *occupancy.bin ; do xvfb-run -a python3 ../thingies_with_omnitrees_plot.py $i --backend opengl ; donepython3 ../thingies_merge_svgs.py --img_extension=png```

(without `xvfb-run`, opengl will open a lot of empty windows, which you may want to avoid on desktop systems and can crash remote command-line interfaces.)

The last call merges the original, octree, and omnitree files into single pictures.The latex animate code in arxiv composes them into animations.

## Reproducing Figures 8b,11-12

This works almost the same way, except for changing a flag:

```bashmkdir thingies_special_4dcd thingies_special_4dpython3 ../special_thingies.py --temporal 16-32768python3 ../aggregate_l1_by_tree.py --sobol_samples 512 --by_idfor i in *32768*occupancy.bin ; do xvfb-run -a python3 ../thingies_with_omnitrees_plot.py $i --backend opengl ; done```

In addition to the png files, this will create timeline files for the pdf animation with the latex animate package.

## Reproducing Figure 13

The plane model can be downloaded from Zenodo (`f25_no_wheels.stl`) and placed in the base folder.

Then:

```bashmkdir thingi_planecd thingi_planepython3 ../special_thingies.py --plane 16-262144python3 ../aggregate_l1_by_tree.py --sobol_samples 512 --by_idfor i in *32768*occupancy.bin ; do xvfb-run -a python3 ../thingies_with_omnitrees_plot.py $i --backend obj ; done```

For further processing towards the final view with Paraview, see the `compare.pvd` file in the Zenodo repository.

 

## Short description of Zenodo repository contents

Here are the intermediate files produced to generate figures 6 to 15 in the paper.



thingies_all: generated with https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/threadpool.py ; postprocessed with https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/aggregate_l1_by_tree.py ; providing data for figures 6-7.

thingies_spatial: generated with https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/special_thingies.py ; postprocessed with https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/aggregate_l1_by_tree.py , https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/thingies_with_omnitrees_plot.py (see the --backend=opengl flag), https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/thingies_merge_svgs.py ; providing data for figures 8a,9-10.

thingies_temporal: generated with https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/special_thingies.py (see the --temporal flag) ; postprocessed with https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/aggregate_l1_by_tree.py , https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/thingies_with_omnitrees_plot.py (see the --backend=opengl flag); providing data for figures 8b,11-12.

f25: input (f25_no_wheels.stl) generated from original mesh with Blender (removing wheels and making the mesh watertight) ; raw outputs generated with https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/special_thingies.py (see the --plane flag) ; postprocessed with https://github.com/freifrauvonbleifrei/thingies_with_omnitrees/blob/main/thingies_with_omnitrees_plot.py (see the --backend=obj flag) , edited in Blender to remove the surrounding wireframe , visualized with paraview ; providing data for figure 13.


The F25 mesh was used with permisison from DLR; this original source must be attributed when re-using the f25 results.