Added:
- Quadrilateral elements are now supported.
- The support for quad elements in the legacy FEniCS itself is incomplete and buggy. It has been fixed in DOLFINx, but we do not support the next-gen FEniCS yet. So although
extrafeathers
already supports arbitrary quad meshes, this functionality is currently practically useful mostly for quad meshes on the unit square. - Like in FEniCS itself, mixed meshes (having both quads and triangles) are not supported.
- The support for quad elements in the legacy FEniCS itself is incomplete and buggy. It has been fixed in DOLFINx, but we do not support the next-gen FEniCS yet. So although
- Add
prepare_linear_export
. Seedemo.coupled.main01_flow
anddemo.boussinesq.main01_solve
for usage examples. - Add
quad_to_tri
to convert a quad mesh to a triangle mesh in a crossed-diagonal format, by adding a node at each cell center and then replacing each quad by four triangles.- Note that emulating quad interpolation this way does not actually interpolate bilinearly; the interpolation remains linear on triangles. This produces minor visual artifacts when compared to actual bilinear interpolation. Still, the result looks ok-ish, and lets
mpiplot
(ab)use Matplotlib to plot FEM functions on quadrilaterals.
- Note that emulating quad interpolation this way does not actually interpolate bilinearly; the interpolation remains linear on triangles. This produces minor visual artifacts when compared to actual bilinear interpolation. Still, the result looks ok-ish, and lets
- Add
trimesh
to triangulate the unit square using equilateral triangles (halves of them at two opposite edges). - Add
minmax
to extract themin
andmax
of a FEM field on nodal elements. Modes available for raw, abs, l2 (euclidean length). When running in MPI mode, automatically gathers data from all processes. The data may live on an arbitrary subspace (e.g. a component of a vector field that itself lives on aMixedElement
). - Add
renumber_nodes_by_distance
. Can set the origin point. - Add
collapse_node_numbering
. Likedolfin.FunctionSpace.collapse
, but for theextrafeathers
internal format (cells
list andnodes
dict, as produced byall_cells
). This is sometimes needed; if curious, see the source code of themeshmagic
andplotmagic
modules for use cases. - Add interptest demo, to show interpolation of a bilinear function on the unit square on different element types.
- Add smoothing demo, to show the effects of P1->DP0->P1 (and Q1->DQ0->Q1) projection smoothing. This is a technique to eliminate a symmetric numerical checkerboard oscillation with only minor damage to the actual signal.
- Add Eulerian solid mechanics demo: axially moving Kelvin-Voigt sheet using an Eulerian description, with both dynamic and steady-state solvers.
- This is actually a small open-source research code into the mechanics of axially moving materials, with applications in the analysis of industrial processes. Placing the code here facilitates co-evolving
extrafeathers
with features our research team currently actually needs. - Quadrilateral elements look nice for this.
- This is actually a small open-source research code into the mechanics of axially moving materials, with applications in the analysis of industrial processes. Placing the code here facilitates co-evolving
Changed:
- Improved support for discontinuous spaces (DP1, DP2, DP3, DQ1, DQ2, and DQ3) in various library functions.
mpiplot
andmpiplot_mesh
now support also piecewise constant spaces (DP0
andDQ0
).mpiplot
now rejects input if the function space is not supported, instead of trying to project.- This is to ensure a faithful representation.
- Plotting preparation changed; now both
mpiplot
andmpiplot_mesh
can take theprep
argument.- Both
mpiplot_prepare
andas_mpl_triangulation
generate aprep
. These have slightly different options and different use cases. mpiplot
takes the output ofmpiplot_prepare
, andmpiplot_mesh
that ofas_mpl_triangulation
.
- Both
- Rename
midpoint_refine
torefine_for_export
, since that's the use, and it handles both degree-2 and degree-3 spaces. - Rename
map_refined_P1
tomap_coincident
, and generalize it.- Now works at least with P1, P2, P3, Q1, Q2, Q3, DP0, DP1, DP2, DP3, DQ0, DQ1, DQ2, and DQ3 spaces.
- Also, add a squared-distance tolerance option for detecting coincident nodes.