All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
DofHandler
now supports fields on subdomains and mixed grids. (#667)- Support for embedded elements in
CellValues
. (#651) - Support for vectorized interpolations with dimension different from the spatial
dimension in
CellValues
. (#651) - All keyword arguments supported by
WriteVTK.jl
can be given tovtk_grid
(onlycompress
earlier) (#687)
- BREAKING:
MixedDofHandler
has been renamed toDofHandler
. Update by replacingMixedDofHandler
toDofHandler
. (#667)
- BREAKING: All
CellValues
have a finer granularity on the different types of dimensions used. CustomCellValues
and dispatches on their type parameters must be updated to respect the new type. (#651)
0.3.14 - 2023-04-03
- Support reordering dofs of a
MixedDofHandler
by the built-in orderingsFieldWise
andComponentWise
. This includes support for reordering dofs of fields on subdomains. (#645) - Support specifying the coupling between fields in a
MixedDofHandler
when creating the sparsity pattern. (#650) - Support Metis dof reordering with coupling information for
MixedDofHandler
. (#650) - Pretty printing for
MixedDofHandler
andL2Projector
. (#465)
- The
MixedDofHandler
have gone through a performance review (see #629) and now performs the same asDofHandler
. This was part of the push to merge the two DoF handlers. SinceMixedDofHandler
is strictly more flexible, and now equally performant, it will replaceDofHandler
in the next breaking release. (#637, #639, #642, #643, #656, #660)
Changes listed here should not affect regular usage, but listed here in case you have been poking into Ferrite internals:
Ferrite.ndim(dh, fieldname)
has been removed, useFerrite.getfielddim(dh, fieldname)
instead. (#658)Ferrite.nfields(dh)
has been removed, uselength(Ferrite.getfieldnames(dh))
instead. (#444, #653)getfielddims(::FieldHandler)
andgetfieldinterpolations(::FieldHandler)
have been removed (#647, #659)
0.3.13 - 2023-03-23
- Support for classical trilinear and triquadratic wedge elements. (#581)
- Symmetric quadrature rules up to order 10 for prismatic elements. (#581)
- Finer granulation of dof distribution, allowing to distribute different amounts of dofs per entity. (#581)
- Dof distribution for embedded elements. (#581)
- Improve numerical accuracy in shape function evaluation for the
Lagrange{2,Tetrahedron,(3|4|5)}
interpolations. (#582, #633)
- Documentation:
- Performance:
- To clarify the dof management
vertices(ip)
,edges(ip)
andfaces(ip)
has been deprecated in favor ofvertexdof_indices(ip)
,edgedof_indices(ip)
andfacedof_indices(ip)
. (#581) - Duplicate grid representation has been removed from the
MixedDofHandler
. (#577)
0.3.12 - 2023-02-28
- Added a basic
show
method for assemblers. (#598)
- Fix an issue in constraint application of
Symmetric
-wrapped sparse matrices (i.e. obtained fromcreate_symmatric_sparsity_pattern
). In particular,apply!(K::Symmetric, f, ch)
would incorrectly modifyf
if any of the constraints were inhomogeneous. (#592) - Properly disable the Metis extension on Julia 1.9 instead of causing precompilation errors. (#588)
- Fix adding Dirichlet boundary conditions on nodes when using MixedDofHandler. (#593, #594)
- Fix accidentally slow implementation of
show
forGrid
s. (#599) - Fixes to topology functionality. (#453, #518, #455)
- Fix grid coloring for cell sets with 0 or 1 cells. (#600)
- Documentation improvements:
0.3.11 - 2023-01-17
- Metis.jl extension for fill-reducing DoF
permutation. This uses Julias new package extension mechanism (requires Julia 1.10) to
support a new DoF renumbering order
DofOrder.Ext{Metis}()
that can be passed torenumber!
to renumber DoFs using the Metis.jl library. (#393, #549) - BlockArrays.jl extension for creating a
globally blocked system matrix.
create_sparsity_pattern(BlockMatrix, dh, ch; kwargs...)
return a matrix that is blocked by field (requires DoFs to be (re)numbered by field, i.e.renumber!(dh, DofOrder.FieldWise())
). For custom blocking it is possible to pass an uninitializedBlockMatrix
with the correct block sizes (seeBlockArrays.jl
docs). This functionality is useful for e.g. special solvers where individual blocks need to be extracted. Requires Julia version 1.9 or above. (#567) - New function
apply_analytical!
for setting the values of the degrees of freedom for a specific field according to a spatial functionf(x)
. (#532) - New cache struct
CellCache
to be used when iterating over the cells in a grid or DoF handler.CellCache
caches nodes, coordinates, and DoFs, for the cell. The cachecc
can be re-initialized for a new cell indexci
by callingreinit!(cc, ci)
. This can be used as an alternative toCellIterator
when more control over which element to loop over is needed. See documentation forCellCache
for more information. (#546) - It is now possible to create the sparsity pattern without constrained entries (they will
be zeroed out later anyway) by passing
keep_constrained=false
tocreate_sparsity_pattern
. This naturally only works together with local condensation of constraints since there won't be space allocated in the global matrix for the full (i.e. "non-condensed") element matrix. Creating the matrix without constrained entries reduces the memory footprint, but unless a significant amount of DoFs are constrained (e.g. high mesh resolution at a boundary) the savings are negligible. (#539)
ConstraintHandler
:update!
is now called implicitly inclose!
. This was easy to miss, and somewhat of a strange requirement when solving problems without time stepping. (#459)- The function for computing the inhomogeneity in a
Dirichlet
constraint can now be specified as eitherf(x)
orf(x, t)
, wherex
is the spatial coordinate andt
the time. (#459) - The elements of a
CellIterator
are nowCellCache
instead of the iterator itself, which was confusing in some cases. This change does not affect typical user code. (#546)
- Adding fields to a DoF handler with
push!(dh, ...)
has been deprecated in favor ofadd!(dh, ...)
. This is to make it consistent with how constraints are added to a constraint handler. (#578)
- Fix
shape_value
for the linear, discontinuous Lagrange interpolation. (#553) - Fix
reference_coordinate
dispatch for discontinuous Lagrange interpolations. (#559) - Fix
show(::Grid)
for custom cell types. (#570) - Fix
apply_zero!(Δa, ch)
when using inhomogeneous affine constraints (#575)
- Internal changes defining a new global matrix/vector "interface". These changes make it
easy to enable more array types (e.g.
BlockMatrix
support added in this release) and solvers in the future. (#562, #571) - Performance improvements:
- Reduced time and memory allocations for global sparse matrix creation (Julia >= 1.10). (#563)
- Documentation improvements:
0.3.10 - 2022-12-11
- New functions
apply_local!
andapply_assemble!
for applying constraints locally on the element level before assembling to the global system. (#528) - New functionality to renumber DoFs by fields or by components. This is useful when you need the global matrix to be blocked. (#378, #545)
- Functionality to renumber DoFs in DofHandler and ConstraintHandler simultaneously:
renumber!(dh::DofHandler, ch::ConstraintHandler, order)
. Previously renumbering had to be done before creating the ConstraintHandler since otherwise DoF numbers would be inconsistent. However, this was inconvenient in cases where the constraints impact the new DoF order permutation. (#542) - The coupling between fields can now be specified when creating the global matrix with
create_sparsity_pattern
by passing aMatrix{Bool}
. For example, in a problem with unknowns(u, p)
and corresponding test functions(v, q)
, if there is no coupling betweenp
andq
it is unnecessary to allocate entries in the global matrix corresponding to these DoFs. This can now be communicated tocreate_sparsity_pattern
by passing the coupling matrix[true true; true false]
in the keyword argumentcoupling
. (#544)
- Runtime and allocations for application of boundary conditions in
apply!
andapply_zero!
have been improved. As a result, thestrategy
keyword argument is obsolete and thus ignored. (#489) - The internal representation of
Dirichlet
boundary conditions andAffineConstraint
s in theConstraintHandler
have been unified. As a result, conflicting constraints on DoFs are handled more consistently: the constraint added last to theConstraintHandler
now always override any previous constraints. Conflicting constraints could previously cause problems when a DoF where prescribed by bothDirichlet
andAffineConstraint
. (#529) - Entries in local matrix/vector are now ignored in the assembly procedure. This allows,
for example, using a dense local matrix
[a b; c d]
even if no entries exist in the global matrix for thed
block, i.e. in[A B; C D]
theD
block is zero, and these global entries might not exist in the sparse matrix. (Such sparsity patterns can now be created bycreate_sparsity_pattern
, see #544.) (#543)
- Fix affine constraints with prescribed DoFs in the right-hand-side. In particular, DoFs that are prescribed by just an inhomogeneity are now handled correctly, and nested affine constraints now give an error instead of silently giving the wrong result. (#530, #535)
- Fixed internal inconsistency in edge ordering for 2nd order RefTetrahedron and RefCube. (#520, #523)
- Performance improvements:
- Documentation improvements:
- Unification of
create_sparsity_pattern
methods to remove code duplication betweenDofHandler
andMixedDofHandler
. (#538, #540)
0.3.9 - 2022-10-19
- New higher order function interpolations for triangles (
Lagrange{2,RefTetrahedron,3}
,Lagrange{2,RefTetrahedron,4}
, andLagrange{2,RefTetrahedron,5}
). (#482, #512) - New Gaussian quadrature formula for triangles up to order 15. (#514)
- Add debug mode for working with Ferrite internals. (#524)
- The default components to constrain in
Dirichlet
andPeriodicDirichlet
have changed from component 1 to all components of the field. For scalar problems this has no effect. (#506, #509)
0.3.8 - 2022-10-05
- Ferrite.jl now has a logo! (#464)
- New keyword argument
search_nneighbors::Int
inPointEvalHandler
for specifying how many neighboring elements to consider in the kNN search. The default is still 3 (usually sufficient). (#466) - The IJV-assembler now support assembling non-square matrices. (#471)
- Periodic boundary conditions have been reworked and generalized. It now supports arbitrary relations between the mirror and image boundaries (e.g. not only translations in x/y/z direction). (#478, #481, #496, #501)
- Fix
PointEvalHandler
when the first point is missing. (#466) - Fix the ordering of nodes on the face for
(Quadratic)Tetrahedron
cells. (#475)
- Many improvements to the documentation. (#467, #473, #487, #494, #500)
- Improved error messages in
reinit!
when number of geometric base functions and number of element coordinates mismatch. (#469) - Remove some unnecessary function parametrizations. (#503)
- Remove some unnecessary allocations in grid coloring. (#505)
- More efficient way of creating the sparsity pattern when using
AffineConstraints
and/orPeriodicDirichlet
. (#436)
0.3.7 - 2022-07-05
- Fix tests for newer version of WriteVTK (no functional change). (#462)
- Various improvements to the heat equation example and the hyperelasticity example in the documentation. (#460, #461)
0.3.6 - 2022-06-30
- Fix a bug with
L2Projection
of mixed grid. (#456)
- Expanded manual section of Dirichlet BCs. (#458)
0.3.5 - 2022-05-30
- Functionality for querying information about the grid topology (e.g. neighboring cells, boundaries, ...). (#363)
- Fix application of boundary conditions when combining RHSData and affine constraints. (#431)
0.3.4 - 2022-02-25
- Affine (linear) constraints between degrees-of-freedom. (#401)
- Periodic Dirichlet boundary conditions. (#418)
- Evaluation of arbitrary quantities in FE space. (#425)
- Interpolation(s) and the quadrature rule are now stored as part of the
CellValues
structs (cv.func_interp
,cv.geo_interp
, andcv.qr
). (#428)
0.3.3 - 2022-02-04
0.3.2 - 2022-01-18
- Support for new interpolation types:
DiscontinuousLagrange
,BubbleEnrichedLagrange
, andCrouzeixRaviart
. (#352, #392)
- Julia version 1.0 is no longer supported for Ferrite versions >= 0.3.2. Use Julia version
= 1.6. (#385)
- Quadrature data for L2 projection can now be given as a matrix of size "number of elements" x "number of quadrature points per element". (#386)
- Projected values from L2 projection can now be exported directly to VTK. (#390)
- Grid coloring can now act on a subset of cells. (#402)
- Various functions related to cell values now use traits to make it easier to extend and reuse functionality in external code. (#404)
- Exporting tensors to VTK now use correct names for the components. (#406)