SOPTX: A High-Performance Multi-Backend Framework for Topology Optimization
Liang He, Huayi Wei, Tian Tian
TL;DR
SOPTX addresses the high computational barrier of topology optimization by delivering a modular, high-performance framework built on FEALPy that decouples analysis from optimization and supports multiple backends with automatic differentiation. It introduces a four-module architecture (material, solver, filter, optimizer) with fast matrix assembly and backend switching, enabling efficient 2D and 3D TO across CPUs and GPUs. The framework demonstrates robustness across meshes and algorithms (OC and MMA), shows substantial speedups from fast assembly and GPU acceleration, and validates AD's accuracy and efficiency for sensitivity analysis. Its open-source nature and extensible design promise broad applicability in education, research, and industry, accelerating exploration of complex TO and multidisciplinary optimization problems.
Abstract
In recent years, topology optimization (TO) has gained widespread attention as a powerful structural design method. However, its application remains challenging due to the deep expertise and extensive development effort required. Traditional TO methods, tightly coupled with computational mechanics like finite element method (FEM), result in intrusive algorithms demanding a comprehensive system understanding. This paper presents SOPTX, a TO package based on FEALPy, which implements a modular architecture that decouples analysis from optimization, supports multiple computational backends (NumPy, PyTorch, JAX), and achieves a non-intrusive design paradigm. Core innovations include: (1) cross-platform design that supports multiple computational backends, enabling efficient algorithm execution on central processing units (CPUs) and flexible acceleration using graphics processing units (GPUs), while leveraging automatic differentiation (AD) technology for efficient sensitivity computation of objective and constraint functions; (2) fast matrix assembly techniques that overcome the performance bottlenecks of traditional numerical integration methods, significantly accelerating finite element computations and enhancing overall efficiency; (3) a modular framework supporting TO problems for arbitrary dimensions and meshes, allowing flexible configuration and extensibility of optimization workflows through a rich library of composable components. Using the density-based method for the classic compliance minimization problem with volume constraints as an example, numerical experiments demonstrate SOPTX's high efficiency in computational speed and memory usage, while showcasing its strong potential for research and engineering applications.
