|
| 1 | +# Release notes |
| 2 | + |
| 3 | +## v0.10.0 |
| 4 | + |
| 5 | +Since the 0.9.0 release, there has been 311 merged pull requests from 25 contributors. |
| 6 | +Below follows a summary of the biggest changes to the Python-API from these pull requests. |
| 7 | +In addition to the changes below, the ever-lasting quest of improving performance and squasing bugs continues. |
| 8 | + |
| 9 | +### PETSc API |
| 10 | + |
| 11 | +**Authors**: [Jørgen S. Dokken](https://github.com/jorgensd), [Francesco Ballarin](https://github.com/francesco-ballarin), |
| 12 | +[Jack Hale](https://github.com/jhale) and [Garth N. Wells](https://github.com/garth-wells) |
| 13 | + |
| 14 | +Mapping data between {py:class}`PETSc.Vec<petsc4py.PETSc.Vec` and {py:class}`dolfinx.fem.Function`s is now |
| 15 | +trivial for blocked problems by using {py:func}`dolfinx.fem.petsc.assign`. |
| 16 | + |
| 17 | +Both solvers and assembly routines interfacing with PETSc has recieved a drastic make-over to |
| 18 | +improve useability and maintenance, both for developers and end-users |
| 19 | + |
| 20 | +#### Improved non-linear (Newton) solver |
| 21 | + |
| 22 | +The FEniCS project has for the last 15 years had its own implementation of a Netwon solver. |
| 23 | +We no longer see the need of providing this solver, as the {py:class}`PETSc SNES<petsc4py.PETSc.SNES>` solver, |
| 24 | +and equivalent solver for C++ provides more features than our own implementation. |
| 25 | + |
| 26 | +The previously shipped {py:class}`dolfinx.nls.petsc.NewtonSolver` is deprecated, in favor of |
| 27 | +{py:class}`dolfinx.fem.petsc.NonlinearProblem`, which now integrates directly with {py:class}`petsc4py.PETSc.SNES`. |
| 28 | + |
| 29 | +The non-linear problem object that was sent into {py:class}`dolfinx.nls.petsc.NewtonSolver` has been renamed |
| 30 | +to {py:class}`NewtonSolverNonlinearProblem<dolfinx.fem.petsc.NewtonSolverNonlinearProblem>` and is also deprecated. |
| 31 | + |
| 32 | +The new {py:class}`NonlinearProblem<dolfinx.fem.petsc.NonlinearProblem>` has additional support for blocked systems, |
| 33 | +such as {py:attr}`NEST<petsc4py.PETSc.Mat.Type.NEST>` by supplying `kind="nest"` to its intializer. See the documentation for further |
| 34 | +information. |
| 35 | + |
| 36 | +#### Improved {py:class}`dolfinx.fem.petsc.LinearProblem` |
| 37 | + |
| 38 | +- The {py:class}`dolfinx.fem.petsc.LinearProblem` now support blocked problems, either specified manually or by using |
| 39 | + {py:func}`ufl.extract_blocks`. By changing the input-argument `kind`, the user can now decide if they want to use |
| 40 | + the DOLFINx blocked PETSc implementation (`kind="mpi"`) or the `kind=`{py:attr}`"nest"<petsc4py.PETSc.Mat.Type.NEST>`. |
| 41 | +- The default behavior for non-blocked systems remains the same as before. |
| 42 | +- The users can now also specify a (blocked) form for preconditioning through the `P` keyword argument in the constructor. |
| 43 | + |
| 44 | +#### Assembly routines |
| 45 | + |
| 46 | +In earlier versions of DOLFINx, there were three assembly routines for {py:class}`PETSc.Vec<petsc4py.PETSc.Vec>` and {py:class}`PETSc.Mat<petsc4py.PETSc.Mat>`: |
| 47 | +- `assemble_*` |
| 48 | +- `assemble_*_block` |
| 49 | +- `assemble_*_nest` |
| 50 | + |
| 51 | +This caused alot of duplicate logic in codes. |
| 52 | +Therefore, we have unified all these assembly routines under {py:func}`dolfinx.fem.petsc.assemble_vector` and {py:func}`dolfinx.fem.petsc.assemble_matrix`. |
| 53 | +The input keyword argument `kind` selects the relevant assembler routine. |
| 54 | +See for instance the [Stokes demo](./demos/demo_stokes) for a detailed introduction. |
| 55 | +Similar changes has been done to {py:func}`dolfinx.fem.petsc.apply_lifting`. |
| 56 | + |
| 57 | +#### Linear algebra submodule |
| 58 | + |
| 59 | +There is now a sub-module ({py:mod}`dolfinx.la.petsc`) containing PETSc LA operations. |
| 60 | + |
| 61 | +#### Interpolation |
| 62 | + |
| 63 | +The {py:func}`dolfinx.fem.discrete_curl` operator has been added to DOLFINx, to cater to |
| 64 | +[Hypre Auxiliary-space Divergence Solver](https://hypre.readthedocs.io/en/latest/solvers-ads.html) |
| 65 | +- A {py:class}`petsc4py.PETSc.Mat` equivalent can be found under {py:func}`dolfinx.fem.petsc.discrete_curl`. |
| 66 | + |
| 67 | +### Simplified demos |
| 68 | + |
| 69 | +#### Usage of {py:class}`ufl.MixedFunctionSpace` and {py:func}`ufl.extract_blocks` |
| 70 | + |
| 71 | +**Authors**: [Jørgen S. Dokken](https://github.com/jorgensd) and [Joe Dean](https://github.com/jpdean/) |
| 72 | + |
| 73 | +Initially introduced as part of the [v0.9.0-release](https://fenicsproject.org/blog/v0.9.0/#extract-blocks), |
| 74 | +usage of these two UFL-abstractions hasve been propagated into the demos, to make it even easier for users to |
| 75 | +see examples of how to work with blocked problems. |
| 76 | + |
| 77 | +*TODO*: Add profiling of blocked/mixed-element vs mixedfunction-space. |
| 78 | + |
| 79 | +#### Usage of {py:class}`ufl.ZeroBaseForm` |
| 80 | + |
| 81 | +**Author**: [Garth N. Wells](https://github.com/garth-wells) |
| 82 | +For a long time, it has not been possible to specify the right hand side of a linear PDE as empty. |
| 83 | +This means that users often have had to resolve to adding `dolfinx.fem.Constant(mesh, 0.0)*v*ufl.dx` |
| 84 | +to ensure that one can use the dolfinx form compilation functions. |
| 85 | +With the introduction of {py:class}`ufl.ZeroBaseForm` this is no longer required. |
| 86 | +The aforementioned workaround can now be reduced to `ufl.ZeroBaseForm((v, ))`, which avoid extra |
| 87 | +assembly calls within DOLFINx. |
| 88 | + |
| 89 | +### Form compiler and integral types |
| 90 | +**Author**: [Susanne Claus](https://github.com/sclaus2), [Paul T. Kühner](https://github.com/schnellerhase), |
| 91 | +and [Jørgen S. Dokken](https://github.com/jorgensd) |
| 92 | +- The tabulation kernels now have an extra input, a `void*`, to make it possible to pass custom data for custom kernels. |
| 93 | +- New {py:class}`dolfinx.fem.IntegralType` support |
| 94 | + - Vertex integrals: {py:obj}`ufl.dP` |
| 95 | + - Ridge integrals (codim=2); {py:obj}`uf.dr` |
| 96 | +- One can now assemble the diagonal of a bilinear form into a vector by adding `form_compiler_options={"part":"diagonal"}` |
| 97 | + when calling {py:func}`dolfinx.fem.form`. Instead of calling {py:func}`dolfinx.fem.petsc.assemble_matrix` one should now call |
| 98 | + {py:func}`dolfinx.fem.petsc.assemble_vector`. This is useful for matrix-free solvers with Jacobi smoothing. |
| 99 | + |
| 100 | +### Mesh |
| 101 | + |
| 102 | +**Authors**: [Paul T. Kühner](https://github.com/schnellerhase), [Joe Dean](https://github.com/jpdean/), |
| 103 | +[Garth N. Wells](https://github.com/garth-wells), [Jørgen S. Dokken](https://github.com/jorgensd) and [Chris Richardson](https://github.com/chrisrichardson) |
| 104 | + |
| 105 | +- Uniform mesh refinement of all {py:class}`CellTypes<dolfinx.mesh.CellType>` is available through |
| 106 | +{py:func}`dolfinx.mesh.uniform_refine`. |
| 107 | +- Branching meshes (a mesh where a single facet is connected to more than two cells), such as T-joints (3 cells connected to a single facet) are now supported as input meshes to DOLFINx. To ensure proper |
| 108 | + partitioning in parallel, one should change the default option `max_facet_to_cell_links` to how many cells a facet |
| 109 | + can be attached to in {py:meth}`dolfinx.io.XDMFFile.read_mesh`, {py:func}`dolfinx.io.vtkhd.read_mesh` and |
| 110 | + {py:func}`dolfinx.mesh.create_mesh`. |
| 111 | +- One can no longer use `set_connectivity` or `set_index_map` to modify {py:class}`dolfinx.mesh.Topology` |
| 112 | + objects. Any connectivity that is not `(tdim, 0)`, (`tdim`, `tdim`) or `(0, 0)` should be created with |
| 113 | + {py:meth}`dolfinx.mesh.Topology.create_connectivity`. The aforementioned connections should be attached |
| 114 | + to the topology when calling {py:func}`dolfinx.cpp.mesh.create_topology`. |
| 115 | +- Mixed-dimensional support has been vastly improved by creating {py:class}`dolfinx.mesh.EntityMap`, |
| 116 | + which replaces the numpy arrays used as `entity_maps` in {py:func}`dolfinx.fem.form` in the previous release. |
| 117 | + This is a two-way map, meaning that the user no longer has to take care of creating the correct mapping. |
| 118 | + The two-way map from a sub-mesh to a parent mesh is returned as part of {py:func}`dolfinx.mesh.create_submesh`. |
| 119 | + |
| 120 | + |
| 121 | +### Linear Algebra |
| 122 | + |
| 123 | +**Authors**: [Chris Richardson](https://github.com/chrisrichardson) |
| 124 | + |
| 125 | +The native {py:class}`matrix-format<dolfinx.la.MatrixCSR>` now has a sparse matrix-vector multiplication |
| 126 | +{py:meth}`dolfinx.la.MatrixCSR.mult`. Note that the {py:class}`dolfinx.la.Vector` that you multiply with should use the |
| 127 | +{py:attr}`dolfinx.la.MatrixCSR.index_map(1)<dolfinx.la.MatrixCSR.index_map>` rather than the one stemming from the |
| 128 | +{py:meth}`dolfinx.fem.FunctionSpace.dofmap.index_map<dolfinx.fem.DofMap.index_map>`. |
| 129 | + |
| 130 | + |
| 131 | +### Collision detection |
| 132 | +**Author**: [Chris Richardson](https://github.com/chrisrichardson) |
| 133 | +The collision detection algorithm {py:func}`dolfinx.geometry.compute_distance_gjk` now used multiprecision to ensure |
| 134 | +proper collision detection. The algorithm has also been improve to work on co-planar convex hulls. |
| 135 | + |
| 136 | +### Documentation |
| 137 | +**Authors**: [Paul T. Kühner](https://github.com/schnellerhase), [Garth N. Wells](https://github.com/garth-wells), |
| 138 | + [Mehdi Slimani](https://github.com/ordinary-slim) and [Jørgen S. Dokken](https://github.com/jorgensd) |
| 139 | +- Several classes that have only been exposed through the {ref}`dolfinx_cpp_interface` have gotten proper |
| 140 | + Python classes and functions. This includes: |
| 141 | + - {py:class}`dolfinx.graph.AdjacencyList` |
| 142 | + - {py:class}`dolfinx.fem.FiniteElement` |
| 143 | + - {py:func}`dolfinx.geometry.determine_point_ownership` |
| 144 | +- Tons of typos, formatting fixes and improvements have been made. |
| 145 | +- Usage of [intersphinx](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html) and |
| 146 | + [sphinx-codeautolink](https://sphinx-codeautolink.readthedocs.io) to make the documentation more interactive. |
| 147 | + Most classes, functions and methods in any demo on the webpage can now redirect you to the relevant package API. |
| 148 | + |
| 149 | + |
| 150 | +### Revised timer logic |
| 151 | + |
| 152 | +**Authors**: [Garth N. Wells](https://github.com/garth-wells) and [Paul T. Kühner](https://github.com/schnellerhase) |
| 153 | + |
| 154 | +Instead of using the [Boost timer library](https://www.boost.org/doc/libs/1_89_0/libs/timer/doc/index.html), |
| 155 | +we have opted for the standard timing library [std::chrono](https://en.cppreference.com/w/cpp/header/chrono.html). |
| 156 | +The switch is mainly due to some observed unaccuracies in timings with Boost. |
| 157 | +This removes the notion of wall, system and user time. |
| 158 | +See or {py:class}`Timer<dolfinx.common.Timer>` for examples of usage. |
| 159 | + |
| 160 | + |
| 161 | +### IO |
| 162 | + |
| 163 | +#### GMSH |
| 164 | + |
| 165 | +**Authors**: [Paul T. Kühner](https://github.com/schnellerhase), [Jørgen S. Dokken](https://github.com/jorgensd), |
| 166 | +[Henrik N.T. Finsberg](https://github.com/finsberg) and [Pierric Mora](https://github.com/pierricmora) |
| 167 | + |
| 168 | +The GMSH interface to DOLFINx has received a major upgrade. |
| 169 | +- An **API**-breaking change is that the module `dolfinx.io.gmshio` has been renamed to {py:mod}`dolfinx.io.gmsh`. |
| 170 | +- Another API-breaking change is the return type of {py:func}`dolfinx.io.gmshio.model_to_mesh` and |
| 171 | + {py:func}`dolfinx.io.read_from_msh`. Instead of returning the {py:class}`dolfinx.mesh.Mesh`, cell and facet |
| 172 | + {py:class}`dolfinx.mesh.MeshTags`, it now returns a {py:class}`dolfinx.io.gmsh.MeshData` data-class, |
| 173 | + that can contain {py:class}`dolfinx.mesh.MeshTags` of an sub-entity: |
| 174 | + - Cell (codim 0) |
| 175 | + - Facet (codim 1) |
| 176 | + - Ridge (codim 2) |
| 177 | + - Peak (codim 3) |
| 178 | +- Additional checks and error handing for `Physical` tags from GMSH has been added to improve the user experience. |
| 179 | + |
| 180 | +#### VTKHDF5 |
| 181 | + |
| 182 | +**Authors**: [Chris Richardson](https://github.com/chrisrichardson) and [Jørgen S. Dokken](https://github.com/jorgensd) |
| 183 | + |
| 184 | +As Kitware has stated that [VTKHDF](https://www.kitware.com/vtk-hdf-reader/) is the future format they want to support, |
| 185 | +we have started the transistion to this format. |
| 186 | +Currently, the following features have been implemented: |
| 187 | +- Reading meshes: {py:func}`dolfinx.io.vtkhdf.read_mesh`. Supports mixed topology. |
| 188 | +- Writing meshes: {py:func}`dolfinx.io.vtkhdf.write_mesh`. Supports mixed topology. |
| 189 | +- Writing point data {py:func}`dolfinx.io.vtkhdf.write_point_data`. |
| 190 | + The point data should have the same ordering as the geometry nodes of the mesh. |
| 191 | +- Writing cell data {py:func}`dolfinx.io.vtkhdf.write_cell_data`. |
| 192 | + |
| 193 | +#### VTXWriter |
| 194 | + |
| 195 | +**Authors**: [Mehdi Slimani](https://github.com/ordinary-slim) and [Jørgen S. Dokken](https://github.com/jorgensd) |
| 196 | + |
| 197 | +The writer does now support time-dependent DG-0 data, which can be written in the same file as a set of functions |
| 198 | +from another (unique) function space. |
| 199 | + |
| 200 | +#### XDMF |
| 201 | + |
| 202 | +**Author**: [Massimilliano Leoni](https://github.com/mleoni-pf) and [Paul T. Kühner](https://github.com/schnellerhase) |
| 203 | +- When using {py:meth}`dolfinx.io.XDMFFIle.read_meshtags` one can now specify the attribute name, if the grid has |
| 204 | +multiple tags assigned to it. |
| 205 | +- Flushing data to file is now possible with {py:meth}`dolfinx.io.XDMFFile.flush`. This is useful when wanting to visualize |
| 206 | + long-running jobs in Paraview. |
| 207 | + |
| 208 | +#### Remove Fides backend |
| 209 | +As we unfortunately haven't seen an expanding set of features for the |
| 210 | +[Fides Reader](https://fides.readthedocs.io/en/latest/paraview/paraview.html) |
| 211 | +in Paraview, we have decided to remove it from DOLFINx. |
| 212 | + |
| 213 | +#### Pyvista |
| 214 | + |
| 215 | +Pyvista no longer requires {py:func}`pyvista.start_xvfb` if one has installed `vtk` with OSMesa support. |
| 216 | + |
0 commit comments