Search arXiv⌕ Search

arXiv · 2612.01262

pyLSET: an open-source Python package for level set simulations

Abstract

pyLSET is an open-source Python package for level set simulations of evolving interface networks in 2D and 3D, with grain boundaries in polycrystals as the primary application. Each grain, or other region, is represented by a signed distance function on a fixed Cartesian grid. The package is built on PyTorch, which means that the same code runs on CPUs and GPUs, in single or double floating point precision. pyLSET provides the main components of multi-level set modeling of microstructure evolution. These comprise signed distance construction from voxelized label maps, such as grain maps from diffraction contrast tomography, several reinitialization methods, graph coloring with dynamic recoloring to limit the memory use and interaction corrections that restore a partition of space at junctions. Interface mobility and energy can be local and anisotropic, and stored energy and prescribed velocity fields can be added as driving forces. Immobile regions can represent free surfaces, particles or inclusions. A scalar field, such as a temperature, can be solved on the same grid, with the interface properties depending on it. Simulation data can be written to various formats suitable for further processing in dedicated visualization codes. The underlying level set formulation and its implementation are detailed, and examples are provided to verify the code against analytical solutions and to illustrate its performance, including a 3D grain growth simulation with more than 30\,000 grains on a single GPU.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Håkan Hallberg. 2026-12-01. pyLSET: an open-source Python package for level set simulations. https://searcharxiv.org/abs/2612.01262

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

Uniaxial strain in TaAs: Valley-selective shifts of Weyl points, merging of Weyl pairs, and mirror-protected nodal rings

A Weyl semimetal is a topological phase of matter, in which Weyl fermions arise as low-energy quasiparticles in its bulk band structure. Despite being central to the control of this phase, the response of the Weyl points of the archetypal Weyl semimetal TaAs to uniaxial strain has never been resolved by symmetry. Here, we directly determine this response by calculating the electronic structure of TaAs from first principles in response to homogeneous strain along $[100]$. We observe that the energy of the Weyl points relative to the Fermi level rises with tension for the family near the strained axis, falls for the family near the perpendicular in-plane axis, at rates of 15--25 meV per percent of strain, and crosses the Fermi level for each family at a strain magnitude below 0.6%. We also observe pairs of Weyl points with opposite chirality which converge on the same point of a mirror plane at a compression of $\varepsilon_{xx}\approx-3.0\%$, giving rise to a nodal line in that plane, while all other Weyl points survive up to $\pm4\%$. Here we show the existence of mirror-protected nodal rings, a second kind of band degeneracy, that emerge at the inversion of a valence and a conduction band of opposite mirror eigenvalue in strained TaAs. The resulting rings are determined by both the sign and the magnitude of the strain. We observe that the unstrained crystal lies only 6.2 meV from the inversion, that the rings form on the mirror plane normal to the strain axis for compression beyond $-1.0\%$, and on the plane containing it for tension beyond $+2.0\%$. We find that the rings determined by Wannier interpolation, which carry a Berry phase of $π$, agree with those obtained from direct density-functional calculations. Our results pave the way for realizing strain control of Weyl points and nodal lines in the archetypal Weyl semimetal by mechanical means.

cond-mat.mtrl-sci↗

Hartree-Fock Limit for Energies in Solids

This study establishes a route to the Hartree--Fock (HF) limit for molecules and solids within the linearized augmented plane wave (LAPW) framework. We remove current limitations of the standard LAPW approach to nonlocal exchange by constructing radial basis functions and core orbitals consistently with the HF Hamiltonian. The presented method yields total energies of molecules and solids with a precision of a few $μ$Ha, and we use it to provide reference data for 14 semiconductors and insulators. For the systems considered in this study, the standard approach based on (semi)local potentials for constructing radial basis functions and core orbitals remains highly precise for practical relative energies, including molecular and solid-state formation energies and Si self-interstitial defect formation energies. More broadly, the results provide stringent all-electron benchmarks for basis-set and pseudopotential assessment, improve error control in hybrid-functional calculations within LAPW, and open the way to X-ray spectroscopy simulations within LAPW based directly on hybrid-functional core orbitals.

cond-mat.mtrl-sci↗

topas-editor and TopasAiD: tools for AI-driven analysis of diffraction and total scattering data

This paper describes topas-editor and TopasAId, which provide a powerful interface to the TOPAS software suite and allow generative AI-driven automation of complex crystallographic tasks. topas-editor is a TOPAS-aware VS Code extension designed for the rapid creation and editing of TOPAS input files and for interacting with the software. It knows TOPAS syntax, has crystallographic-aware editing features and provides in-line user guidance via hover tips and automated links to reference manuals. TopasAId is a collection of Python routines and machine-accessible reference documents that allow AI-driven automated analysis in TOPAS. It uses a transferable topas-inp-writer skill that can be applied in all TOPAS application areas. We demonstrate the power and reliability of the approach using examples including: a complex Rietveld refinement with sample- and data-related complications; automatic analysis of multiple data sets; a pipeline from indexing through structure solution to refinement; automatic identification of the phases present in a sample; single crystal and powder diffraction analysis of incommensurate structures; and fitting PDF data. TopasAId can be used directly alongside topas-editor, via a stand-alone topasaid-wizard, or via command line interfaces or desktop apps from major AI providers. TopasAId was developed and tested using Claude large language models, but can be configured to use other cloud or local models. topas-editor and TopasAId are freely available.

cond-mat.mtrl-sci↗