Which function do I need?#
Find what your code does in the first column. The last column says which DOLFINx versions behave differently, which is when the function matters. “None” means the native call is the same from 0.10 on, and the function is only a convenience. For things that need no function at all, see Already the same on every version.
Meshes#
If your code needs to |
Use |
Differs between |
|---|---|---|
Create a mesh from arrays with a ghost mode |
0.10, 0.11 / main |
|
Create a mesh from a gmsh model with a ghost mode |
0.10, 0.11 / main |
|
Pass a ghosted partitioner to an API that takes no ghost mode |
0.10, 0.11 only; raises on main |
|
Change the degree of the coordinate element |
0.10 / 0.11, main |
|
Get the coordinate element |
0.10 / 0.11, main |
|
Get the nodes of each cell |
0.10 / 0.11, main |
|
Get the topology of a |
0.10, 0.11 / main |
|
Get the cell permutation info |
0.10, 0.11 / main |
|
Get the orientation of each facet as seen from each cell |
0.10, 0.11 / main |
|
Create a Raviart-Thomas space on a manifold |
0.10, 0.11 / main |
|
Move tags from a mesh to a submesh |
0.10 / 0.11 / main |
Index maps and vectors#
If your code needs to |
Use |
Differs between |
|---|---|---|
Create an index map |
0.10, 0.11 / main |
|
Pass an index map to a |
0.10, 0.11 / main |
|
Create an index map for a subset of indices |
0.10, 0.11 / main |
|
Find the other ranks that hold each index |
0.10, 0.11 / main |
|
Split |
0.10, 0.11 / main |
|
Create a |
None, if |
Function spaces, elements and interpolation#
If your code needs to |
Use |
Differs between |
|---|---|---|
Create a real (global constant) function space |
0.10 / 0.11, main |
|
Create a C++ finite element |
0.10, 0.11 / main |
|
Interpolate values already evaluated at the interpolation points |
0.10 / 0.11, main |
|
Evaluate an expression on cells or facets |
None |
|
Create an expression that uses coefficients from a parent mesh |
0.10 / 0.11, main |
|
Evaluate on facets at points seen from the cell |
0.10 / 0.11, main |
|
Reorder facet values to the facet’s own orientation |
0.10 / 0.11, main |
Forms and PETSc#
If your code needs to |
Use |
Differs between |
|---|---|---|
Get the index map and block size of a linear form |
0.10 / 0.11, main |
|
Sort boundary conditions by block |
0.10, 0.11 / main, when spaces are mixed |
|
Set Dirichlet values in a PETSc vector |
None |
|
Apply lifting and set Dirichlet values in one call |
None |
|
Zero a PETSc vector, or update its ghosts |
None |
UFL#
If your code needs to |
Use |
Differs between |
|---|---|---|
Get the domain of an expression |
None |
|
Map an expression back to the reference cell |
0.10, 0.11 / main |
Output and other packages#
If your code needs to |
Use |
Differs between |
|---|---|---|
Get the VTK cell type of a mesh cell |
0.10, 0.11 / main |
|
Get ADIOS2’s low-level bindings |
ADIOS2 2.9 / 2.10 and newer |
|
Let PyVista use VTK’s snake_case names |
PyVista 0.45, 0.46 / 0.47 and newer |
|
Branch on the DOLFINx version |
None |
|
Import an optional module with a helpful error |
None |