Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 68 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,72 @@ This repository contains the scripts to regenerate the figures in the paper:
}
```

This branch contains updated scripts. For the original check the [original](https://github.com/polyfem/Decoupling-Simulation-Accuracy-from-Mesh-Quality/tree/original) branch.
### Python teaser

We created a simple [jupyter notebook](https://raw.githubusercontent.com/polyfem/Decoupling-Simulation-Accuracy-from-Mesh-Quality/master/Decoupling-Simulation-Accuracy-from-Mesh-Quality.ipynb) with an example to run the teaser image.

This notebook can be interactively run with binder!
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/polyfem/Decoupling-Simulation-Accuracy-from-Mesh-Quality.git/master?filepath=Decoupling-Simulation-Accuracy-from-Mesh-Quality.ipynb)

### Dependencies

##### PolyFEM

A specific version of [PolyFEM](https://github.com/polyfem/polyfem) is included as a submodule. To retrieve and compile it, run the following commands:

```
git submodule update --init --recursive
cd polyfem
mkdir build
cd build
cmake ..
make -j 8
```

Make sure that [PARDISO](https://www.pardiso-project.org/) is found and enabled, otherwise you might not be able to generate certain figures (see below). In PolyFEM, `FindPardiso.cmake` will look for the PARDISO library in `~/.local` or `~/.pardiso`. If you installed PARDISO in a different location, you may need to update this file accordingly.

##### Conda Environment

Install [Miniconda](https://docs.conda.io/en/latest/miniconda.html) for Python 3, and create the environment for this paper from the `conda.yml` file:

```
conda env create -f conda.yml
```

##### PyRenderer (via Singularity/Docker)

[PyRenderer](https://github.com/qnzhou/PyRenderer) is used to render the images in the paper. PyRenderer is a wrapper around [Mitsuba](https://github.com/mitsuba-renderer/mitsuba), and as such is a bit complicated to setup.
There is a [Docker image](https://hub.docker.com/r/qnzhou/pyrender) available on Docker-Hub.
We also provide a pre-built Singularity [Singularity](https://www.sylabs.io) image (>=v3.0.0) of PyRenderer. Singularity is similar to Docker, but does not require root privilege in order to run images. Please read the [documentation](https://sylabs.io/guides/3.3/user-guide/) to install it on your machine.

- <details><summary>Our Singularity image can be downloaded programmatically from our Google Drive using `gdown` (click to expand).</summary><p>
```
pip3 install --user gdown
gdown "https://drive.google.com/uc?id=1zfqiThhSRZkmNDeaXj2nGC1kf00kRIsK"
md5sum pyrenderer.sif
# 557ce7496b29fd11d0808f5ec918a995
```
</p></details>

- For docker users, make sure to:
1. [Install Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/) following official instructions.
2. [Allow](https://docs.docker.com/install/linux/linux-postinstall/) to run docker as a non-root user.

### Solver

As stated in the paper, we use [PARDISO](https://www.pardiso-project.org/) for the following figures:
- Figure 7
- Figure 8
- Figure 11
- Figure 21
- Table 1

And [HYPRE](https://computing.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods) for the following figures:
- Figure 9
- Figure 10
- Figure 16
- Figure 17
- Figure 20


If you try to generate the first figures with an iterative solver, running times may be exceedingly long, so it is not recommended.
19 changes: 19 additions & 0 deletions bridge/large_angle_strip_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.019251172364018153,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
19 changes: 19 additions & 0 deletions bridge/large_angle_strip_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.023046469357049414,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
19 changes: 19 additions & 0 deletions bridge/large_angle_strip_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.018236384619905614,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
19 changes: 19 additions & 0 deletions bridge/large_angle_strip_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.018232285249566823,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
19 changes: 19 additions & 0 deletions bridge/large_angle_strip_4.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.018231336446474202,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
19 changes: 19 additions & 0 deletions bridge/large_angle_strip_5.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.01823195894247403,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
19 changes: 19 additions & 0 deletions bridge/large_angle_strip_6.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.018231258884821137,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
19 changes: 19 additions & 0 deletions bridge/large_angle_strip_7.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.018230633203504775,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
19 changes: 19 additions & 0 deletions bridge/large_angle_strip_8.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.018230024632425103,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
19 changes: 19 additions & 0 deletions bridge/large_angle_strip_8_no.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.4788283491724556,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
7 changes: 7 additions & 0 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
"solver": {
"linear": {
"solver": "Eigen::SimplicialLDLT"
},
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean"
}
},
"output": {
Expand Down
19 changes: 19 additions & 0 deletions main/conditioning_44000_bad.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.4715054370582474,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
19 changes: 19 additions & 0 deletions main/conditioning_44000_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
"err_lp": 0.47378407647641807,
"margin": 1e-05,
"time_steps": "static"
},
"solver": {
"advanced": {
"characteristic_force_density": 1,
"characteristic_length": 1
},
"nonlinear": {
"norm_type": "Euclidean",
"first_grad_norm_tol": 1e-10,
"grad_norm_tol": 1e-08,
"x_delta_tol": 0,
"advanced": {
"f_delta_tol": 0,
"derivative_along_delta_x_tol": 0
},
"line_search": {
"use_grad_norm_tol": 1e-06
}
}
}
}
Loading