You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/software/cae/fenics.md
+25-87Lines changed: 25 additions & 87 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,36 +2,36 @@
2
2
3
3
<!-- Intro start -->
4
4
5
-
[FEniCS](https://fenicsproject.org/) is a popular open-source computing platform for solving partial differential equations (PDEs) using the finite element method ([FEM](https://en.wikipedia.org/wiki/Finite_element_method)). Originally developed in 2003, the earlier version is now known as legacy FEniCS. In 2020, the next-generation framework [FEniCSx](https://docs.fenicsproject.org/) was introduced, with the latest stable [release v0.9.0](https://fenicsproject.org/blog/v0.9.0/) in October 2024. Though it builds on the legacy FEniCS but introduces significant improvements over the legacy libraries. FEniCSx is comprised of the libraries [UFL](https://github.com/FEniCS/ufl), [Basix](https://github.com/FEniCS/basix), [FFCx](https://github.com/FEniCS/ffcx), and [DOLFINx](https://github.com/FEniCS/dolfinx) which are the build blocks of it. And new users are encouraged to adopt [FEniCSx](https://docs.fenicsproject.org/) for its modern features and active development support.
5
+
[FEniCS](https://fenicsproject.org/) is a popular open-source computing platform for solving partial differential equations (PDEs) using the finite element method ([FEM](https://en.wikipedia.org/wiki/Finite_element_method)). Originally developed in 2003, the earlier version is now known as legacy FEniCS. In 2020, the next-generation framework [FEniCSx](https://docs.fenicsproject.org/) was introduced, with the latest stable [release v0.9.0](https://fenicsproject.org/blog/v0.9.0/) in October 2024. Though it builds on the legacy FEniCS but introduces significant improvements over the legacy libraries. FEniCSx is comprised of the libraries [UFL](https://github.com/FEniCS/ufl), [Basix](https://github.com/FEniCS/basix), [FFCx](https://github.com/FEniCS/ffcx), and [DOLFINx](https://github.com/FEniCS/dolfinx) which are the build blocks of it. And new users are encouraged to adopt [FEniCSx](https://fenicsproject.org/documentation/) for its modern features and active development support.
(Maybe add a short intro into the stack the software depends on, and further more the internal dependencies UFL->FFCx ...)Like: the internal workflow typically follows [UFL](https://github.com/FEniCS/ufl) → [FFCx](https://github.com/FEniCS/ffcx) → [Basix](https://github.com/FEniCS/basix) → [DOLFINx](https://github.com/FEniCS/dolfinx), transforming mathematical PDE descriptions into efficient numerical solvers.
9
9
10
10
11
-
<!-- Intro end -->
12
11
13
-
## Installation of FEniCSx
14
12
15
13
FEniCSx can be installed on [ULHPC](https://www.uni.lu/research-en/core-facilities/hpc/) systems using [Easybuild](https://docs.easybuild.io) or [Spack](https://spack.io/), Below are detailed instructions for each method,
16
14
17
-
15
+
<!-- Intro end -->
18
16
19
17
### Building FEniCS With Spack
20
18
21
19
22
-
Building FEniCSx with Spack requires that Spack is already installed, configured, and its environment sourced on the [ULHPC] system. If Spack is not yet configured, follow the [spack documentation](../../environment/spack.md) for installation and configuration.
20
+
Building FEniCSx with Spack on the [ULHPC](https://www.uni.lu/research-en/core-facilities/hpc/) system requires that Users already installed Spack and sourced its enviroment on the cluster. If Spack is not yet configured, follow the [spack documentation](../../environment/spack.md) for installation and configuration.
21
+
23
22
24
23
!!! note
25
-
Spack can a good choice to build FEniCSx with its many complex dependencies, leveraging the system-provided packages defined in ~/.spack/packages.yaml for optimal performance.
24
+
25
+
Spack would be a good choice for building FEniCSx because it automatically manages complex dependencies, isolates all installations in a dedicated environment, leverages system-provided packages in ~/.`spack/packages.yaml` for optimal performance, and simplifies reproducibility and maintenance across different systems.
26
26
27
27
Create and Activate a Spack Environment:
28
28
29
29
To maintain an isolated installation, create a dedicated Spack environment in a chosen directory.
30
30
The following example builds FEniCSx in the `home` directory:
31
31
32
32
cd ~
33
-
spack env create -d fenicsx-main-20230126/
34
-
spack env activate fenicsx-main-20230126/
33
+
spack env create -d fenicsx-0.9.0/
34
+
spack env activate fenicsx-0.9.0/
35
35
36
36
37
37
Add the core FEniCSx components and common dependencies:
@@ -43,13 +43,13 @@ Add the core FEniCSx components and common dependencies:
43
43
spack install -j16
44
44
45
45
46
-
!!! note
46
+
!!! question " why concretize and -j16 ? "
47
47
48
-
`spack concretize` resolves all dependencies and selects compatible versions for the specified packages. `-j16` sets the number of parallel build jobs. Using a higher number can speed up the build but should be chosen based on available CPU cores and cluster policies.
48
+
`spack concretize` resolves all dependencies and selects compatible versions for the specified packages. `-j16` sets the number cores to use for building. Using a higher number can speed up the build but should be chosen based on available CPU cores and cluster policies.
49
49
50
50
51
51
52
-
or the same directly in `spack.yaml` in `$SPACK_ENV`
52
+
or its also possible to define build packages in `$SPACK_ENV` in a `spack.yaml` file.
53
53
54
54
spack:
55
55
# add package specs to the `specs` list
@@ -63,7 +63,13 @@ or the same directly in `spack.yaml` in `$SPACK_ENV`
63
63
concretizer:
64
64
unify: true
65
65
66
-
The following are also commonly used in FEniCS scripts and may be useful
66
+
!!! question " why unify : true ? "
67
+
68
+
`unify: true` ensures all packages share the same dependency versions, preventing multiple builds of the same library. Without it, each `spec` could resolve dependencies independently, leading to potential conflicts and redundant installations.
69
+
70
+
71
+
72
+
The following are also common dependencies used in FEniCS scripts:
See the uni.lu documentation for full details - using the environment should be as
116
-
simple as adding the following where `...` is the name/folder of your environment.
120
+
After installation, the [FEniCSx](https://fenicsproject.org/documentation/) build can be tried explicitly by running the demo problems corresponding to the installed release version, as provided in the [FEniCSx documentation](https://docs.fenicsproject.org/).
121
+
For [DOLFINx](https://docs.fenicsproject.org/dolfinx/main/python/) Python bindings, see for example the demos in the [stable release v0.9.0](https://docs.fenicsproject.org/dolfinx/v0.9.0/python/demos.html).
117
122
118
-
#!/bin/bash -l
119
-
source $HOME/spack/share/spack/setup-env.sh
120
-
spack env activate ...
121
123
122
124
#### Known issues
123
125
@@ -133,71 +135,7 @@ Workaround for inability to find adios2 Python package:
0 commit comments