- No changes
- No major API changes, only following DOLFINx API changes
- API
- Various shared pointers in C++ interface is changed to const references
- Multipoint-constraint now accept
std::span
instead of vectors - Now using nanobind for Python bindings
- Switch to
pyproject.toml
, see installation notes for updated instructions
- DOLFINx API-changes
dolfinx.fem.FunctionSpaceBase
replaced bydolfinx.fem.FunctionSpace
ufl.FiniteElement
andufl.VectorElement
is replaced bybasix.ufl.element
- New feature: Add support for "scalar" inelastic contact conditions. This is a special case where you want to create a periodic constraint between two sets of facets, which might or might not align.
- Patch for Python 3.8
- Fix import order of
mpi4py
,petsc4py
,dolfinx
anddolfinx_mpc
- API:
- Change input of
dolfinx_mpc.MultiPointConstraint.homogenize
anddolfinx_mpc.backsubstitution
todolfinx.fem.Function
instead ofPETSc.Vec
. - New feature: Add support for more floating types (float32, float64, complex64, complex128). The floating type of a MPC is related to the mesh geometry.
- This resulted in a minor refactoring of the pybindings, meaning that the class
dolfinx_mpc.cpp.mpc.MultiPointConstraint
is replaced bydolfinx_mpc.cpp.mpc.MultiPointConstraint_{dtype}
- This resulted in a minor refactoring of the pybindings, meaning that the class
- Casting scalar-type with
dolfinx.default_scalar_type
instead ofPETSc.ScalarType
- Remove usage of
VectorFunctionSpace
. Use blocked basix element instead.
- Change input of
- DOLFINX API-changes:
- Use
dolfinx.fem.functionspace(mesh, ("Lagrange", 1, (mesh.geometry.dim, )))
instead ofdolfinx.fem.VectorFunctionSpace(mesh, ("Lagrange", 1))
as the latter is being deprecated. - Use
basix.ufl.element
in favor ofufl.FiniteElement
as the latter is deprecated in DOLFINx.
- Use
- Fixes for CI
- Add auto-publishing CI
- Fixes for
h5py
installation
- Remove
dolfinx::common::impl::copy_N
in favor ofstd::copy_n
by @jorgensd in #24 - Improving and fixing
demo_periodic_gep.py
by @fmonteghetti in #22 and @conpierce8 in #30 - Remove xtensor by @jorgensd in #25
- Complex valued periodic constraint (scale) by @jorgensd in #34
- Implement Hermitian pre-multiplication by @conpierce8 in #38
- Fixes for packaging by @mirk in #41, #42, #4
- Various updates to dependencies
- Minimal C++ standard is now C++20
- Deprecating GMSH IO functions from
dolfinx_mpc.utils
, see: DOLFINx PR: 2261 for details. - Various API changes in DOLFINx relating to
dolfinx.common.IndexMap
. - Made code mypy-compatible (tests added to CI).
- Made code PEP-561 compatible.
-
API:
- New feature: Support for nonlinear problems (by @nate-sime) for mpc, see
test_nonlinear_assembly.py
for usage - Updated user interface for
dolfinx_mpc.create_slip_constraint
. See documentation for details. - New feature: Support for periodic constraints on sub-spaces. See
dolfinx_mpc.create_periodic_constraint
for details. - New feature:
assemble_matrix_nest
andassemble_vector_nest
by @nate-sime allows for block assembly of rectangular matrices, with different MPCs applied for rows and columns. This is highlighed indemo_stokes_nest.py
assemble_matrix
andassemble_vector
now only accepts compiled DOLFINx forms as opposed toufl
-forms.LinearProblem
still acceptsufl
-formsdolfinx_mpc.utils.create_normal_approximation
now takes in the meshtag and the marker, instead of the marked entities- No longer direct access to dofmap and indexmap of MPC, now collected through the
dolfinx_mpc.MultiPointConstraint.function_space
. - Introducing custom lifting operator:
dolfinx_mpc.apply_lifting
. Resolves a bug that woul occur if one had a non-zero Dirichlet BC on the same cell as a slave degree of freedom. However, one can still not use Dirichlet dofs as slaves or masters in a multi point constraint. - Move
dolfinx_mpc.cpp.mpc.create_*_contact_condition
todolfinx_mpc.MultiPointConstraint.create_*_contact_condition
. - New default assembler: The default for
assemble_matrix
andassemble_vector
is now C++ implementations. The numba implementations can be accessed through the submoduledolfinx_mpc.numba
. - New submodule:
dolfinx_mpc.numba
. This module contains theassemble_matrix
andassemble_vector
that uses numba. - The
mpc_data
is fully rewritten, now the data is accessible as propertiesslaves
,masters
,owners
,coeffs
andoffsets
. - The
MultiPointConstraint
class has been rewritten, with the following functions changing- The
add_constraint
function now only accept single arrays of data, instead of tuples of (owned, ghost) data. slave_cells
does now longer exist as it can be gotten implicitly fromcell_to_slaves
.
- The
- New feature: Support for nonlinear problems (by @nate-sime) for mpc, see
-
Performance:
- Major rewrite of periodic boundary conditions. On average at least a 5 x performance speed-up.
- The C++ assembler has been fully rewritten.
- Various improvements to
ContactConstraint
.
-
Bugs
- Resolved issue where
create_facet_normal_approximation
would give you a 0 normal for a surface dof it was not owned by any of the cells with facets on the surface.
- Resolved issue where
-
DOLFINX API-changes:
dolfinx.fem.DirichletBC
->dolfinx.fem.dirichletbc
dolfinx.fem.Form
->dolfinx.fem.form
- Updates to use latest import schemes from dolfinx, including
UnitSquareMesh
->create_unit_square
. - Updates to match dolfinx implementation of exterior facet integrals
- Updated user-interface of
dolfinx.Constant
, explicitly casting scalar-type withPETSc.ScalarType
. - Various internal changes to handle new
dolfinx.DirichletBC
without class inheritance - Various internal changes to handle new way of JIT-compliation of
dolfinx::fem::Form_{scalar_type}
- Minor internal changes
-
Add new MPC constraint: Periodic boundary condition constrained geometrically. See
demo_periodic_geometrical.py
for use-case. -
New:
demo_periodic_gep.py
proposed and initally implemented by fmonteghetti using SLEPc for eigen-value problems. This demo illustrates the usage of the newdiagval
keyword argument in theassemble_matrix
class. -
API:
- Renaming and clean-up of
assemble_matrix
in C++ - Renaming of Periodic constraint due to additional geometrical constraint,
mpc.create_periodic_constraint
->mpc.create_periodic_constraint_geometrical/topological
. - Introduce new class
dolfinx_mpc.LinearProblem
mimicking the DOLFINx class (Usage illustrated indemo_periodic_geometrical.py
) - Additional
kwarg
b: PETSc.Vec
forassemble_vector
to be able to re-use Vector. - Additional
kwargs
:form_compiler_parameters
andjit_parameters
toassemble_matrix
,assemble_vector
, to allow usage of fast math etc.
- Renaming and clean-up of
-
Performance:
- Slip condition constructor moved to C++ (Speedup for large problems)
- Use scipy sparse matrices for verification
-
Misc:
- Update GMSH code in demos to be compatible with GMSH 4.8.4.
-
DOLFINX API-changes:
dolfinx.cpp.la.scatter_forward(x)
is replaced byx.scatter_forward()
- Various interal updates to match DOLFINx API (including dof transformations moved outside of ffcx kernel)
- First tagged release of dolfinx_mpc, compatible with DOLFINx 0.1.0.