Repository containing the codes used in preprint.
Authors : Michel Duprez, Vanessa Lleras, Alexei Lozinski and Killian Vuillemot.
Implementations of
-
Folder
circle
: solve the heat equation on a circle, using the manufactured solution$u = \cos\left(\frac{1}{2} \pi (x^2+y^2)\right) \exp(x) \sin(t)$ .-
convergence.py
: code to compare the errors of$\phi$ -FEM and a standard FEM on the given problem; -
sigma_values.py
: code to emphasize the influence of$\sigma$ on the error; -
degree_phi.py
: code to emphasize the influence of$l$ , the degree of interpolation of the level-set function, on the error; -
plot_meshes.py
: code to plot the domain, an example of mesh used for$\phi$ -FEM and an example of conforming mesh used for standard FEM.
-
-
Folder
popcorn
: solve the heat equation on a popcorn with$f=\exp(-\frac{(x-0.2)^2 + (y-0.3)^2 + (z+0.1)^2}{2\times 0.3^2})$ ,$u = 0$ on$\Gamma \times (0,T)$ and$u^0 = 0$ in$\Omega$ .-
main.py
: code to compare the errors of$\phi$ -FEM and a standard FEM on the given problem. -
plot_meshes
: code to plot the popcorn domain, an example of mesh used for$\phi$ -FEM and an example of conforming mesh used for standard FEM.
-
Required packages : FEniCS, matplotlib, numpy, sympy, vedo and pygalmesh. You can run FEniCS using a Docker container with the command
docker run -ti -p 127.0.0.1:8000:8000 -v $(pwd):/home/fenics/shared -w /home/fenics/shared quay.io/fenicsproject/stable:current
or by installing (on ubuntu) with
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install fenics
Then, just install the other packages (and dependencies) with
pip install matplotlib sympy
pip install numpy==1.23.5
pip install vedo==2022.4.2
sudo apt install libcgal-dev libeigen3-dev
pip install pygalmesh