Changelog#
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.
Unreleased#
Added#
mesh_TriangularMesh()— meshes amagnet.TriangularMeshinto conforming tetrahedral cells using TetGen. Quality and cell count are controlled viatarget_elems,minratio, andmindihedral. TetGen is an optional dependency:pip install magpylib-material-response[tetgen].trimesh_from_model3d()helper inmeshing_utils— builds a closedmagnet.TriangularMeshfrom a magpylibmodel3dshape trace (cuboid, cylinder_segment, ellipsoid, prism, pyramid, tetrahedron).mesh_all()now supportsmagnet.CylinderSegmentandmagnet.TriangularMeshin addition tomagnet.Cuboidandmagnet.Cylinder.Optional dependency group
tetgen(tetgen>=0.8.3). (#41).
0.4.0 - 2026-05-01#
Added#
Serialization API for magpylib objects:
to_json,from_json. Supportsmagnet.Cuboid,magnet.Cylinder,magnet.CylinderSegment,current.Polyline,current.Circle,Sensor, and nestedCollection. Uses namespaced type discriminators ("magnet.Cuboid","current.Polyline", …) and is fully JSON round-trippable (#38).Added serialization example to docs (#39).
Changed#
Breaking: logging is now silent by default. Call
magpylib_material_response.configure_logging()(orloguru.logger.enable("magpylib_material_response")) to opt in to log output (#30).Refactored logging to follow the loguru library recipe: the package no longer calls
logger.remove()and never overrides sinks configured by the host application.Replaced f-string log calls with structured logging (
logger.info("msg {x}", x=...)).Added
MAGPYLIB_LOG_LEVEL,MAGPYLIB_LOG_COLORS,MAGPYLIB_LOG_TIME,MAGPYLIB_LOG_MIN_TIMEenvironment variables.Added a
min_log_timeargument toconfigure_logging()that sets the default duration threshold used bytimelog(and by the demag functions when their ownmin_log_timeargument is left at its default).Added
docs/logging.md.
Fixed#
timelogno longer raisesTypeErroron the failure path when the wrapped block raises an exception.
0.3.1 - 2025-10-30#
Fixed#
Changed#
Improved clarity and error handling in
get_susceptibilitiesfunctionEnhanced logging configuration
Refactored demag.py for better organization
Improved documentation theme and layout (#29)
Switched from Furo to PyData Sphinx theme
Added custom CSS for full-width content and smaller sidebar
Enhanced navigation and branding with Magpylib logo
Reorganized examples section structure
Maintenance#
0.3.0 - 2024-10-16#
Added#
Support for anisotropic susceptibilities
FE tests for anisotropic and negative susceptibility values
Comprehensive tests for interface and computation validation
Susceptibility input to parent collections
Support for both scalar (isotropic) and 3-vector (anisotropic) susceptibility inputs
Changed#
Improved interface for susceptibility (chi) input
Enhanced susceptibility input possibilities:
Scalar input now assumes isotropic susceptibility
3-vector input enables anisotropic susceptibility
Improved internal architecture and code organization
Fixed#
Various computation fixes confirmed by isotropic and anisotropic tests