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
extrafeathersalready 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_flowanddemo.boussinesq.main01_solvefor usage examples. - Add
quad_to_trito 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
trimeshto triangulate the unit square using equilateral triangles (halves of them at two opposite edges). - Add
minmaxto extract theminandmaxof 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 theextrafeathersinternal format (cellslist andnodesdict, as produced byall_cells). This is sometimes needed; if curious, see the source code of themeshmagicandplotmagicmodules 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
extrafeatherswith 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.
mpiplotandmpiplot_meshnow support also piecewise constant spaces (DP0andDQ0).mpiplotnow 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
mpiplotandmpiplot_meshcan take theprepargument.- Both
mpiplot_prepareandas_mpl_triangulationgenerate aprep. These have slightly different options and different use cases. mpiplottakes the output ofmpiplot_prepare, andmpiplot_meshthat ofas_mpl_triangulation.
- Both
- Rename
midpoint_refinetorefine_for_export, since that's the use, and it handles both degree-2 and degree-3 spaces. - Rename
map_refined_P1tomap_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.