Code
Open-source packages for computational electromagnetics, numerical methods and scientific computing.
Activity
Commits, issues and reviews across my public repositories over the past year.
- Contributions
- 808
- Active days
- 111
- Longest streak
- 10
Packages
Solvers and tools I develop, most of them behind the papers.
- gsimGDSFactory plugin for electromagnetic simulation. Takes a layout from GDS to S-parameters with the Palace (FEM), Meep and GDSFactory FDTD solvers.github.com/gdsfactory/gsim
- gyptisComputational photonics with the finite element method. Solves Maxwell's equations with FEniCS, with ready-made models for scattering, gratings and modal analysis.Live notebookgitlab.com/gyptis/gyptis
- nannosFourier modal method for multilayer metamaterials. Several FMM formulations, automatic differentiation and GPU acceleration.Live notebookgitlab.com/nannos/nannos
- protisPlane wave expansion method for photonic crystals, with automatic differentiation and GPU acceleration.Live notebookgitlab.com/protis/protis
- pytmodSolver for materials with time-modulated properties. Computes scattering and eigenmodes of time-modulated slabs.github.com/benvial/pytmod
- pylattNumerical models of mechanical lattices (truss and frame structures). Computes phononic band diagrams and supports automatic differentiation for metamaterial optimization.gitlab.com/benvial/pylatt
- kloveWaves on thin elastic plates (Kirchhoff-Love theory). Multiple scattering by pins, masses and resonators, gratings, quasi-normal modes and band diagrams, all differentiable.gitlab.com/benvial/klove
- ashxHelpers for FEniCSx finite element simulations. Converts gmsh meshes to DOLFINx and provides geometry definition and integration helpers.gitlab.com/benvial/ashx
- geoliaGeometry and mesh helpers built on the Gmsh Python API. Reads meshes with their physical domains (meshio) and interpolates from unstructured to structured grids.gitlab.com/benvial/geolia
- refidxRetrieves the refractive index of a material at a given wavelength from the refractiveindex.info database.gitlab.com/benvial/refidx
- coaxtractPermittivity extraction for multilayer stacks using an open-ended coaxial probe.gitlab.com/benvial/coaxtract
- cpwxtractExtracts material properties from coplanar waveguide measurements.gitlab.com/benvial/cpwxtract
- tdsxtractExtracts permittivity from terahertz time-domain spectroscopy measurements.github.com/tdsxtract/tdsxtract
- prismoFree-form doping design of silicon PN phase shifters. Gradient-based optimization of the full doping field, coupling carrier transport and optical mode solvers. Grand Prize at the Tesseract Hackathon 2026.github.com/benvial/prismo
- tetrachotomyFinds the poles and zeros of a function of a complex variable, with their residues.github.com/benvial/tetrachotomy
- pygetdpPython frontend for the GetDP finite element solver.gitlab.com/benvial/pygetdp
Notebooks
Worked examples you can edit and re-run in the browser, on a live kernel.
- anisotropic waveguideGuided modes and effective index of a square waveguide with a uniaxial core, for four orientations of the optic axis, with gyptis and checked against a classic benchmarkJupyter
- gyptisA hands-on introduction to finite element scattering simulations: a silicon rod, computed live with gyptis and checked against the exact solutionJupyter
- nannosGuided resonances of a photonic crystal slab with the Fourier modal method: a transmission spectrum, the fields of a resonance in 3D, and a convergence studyJupyter
- protisPhotonic band gaps of a square lattice of dielectric rods with the plane wave expansion method: band diagram, band surfaces in 3D, gap map and gradients by automatic differentiationJupyter
Solver wheels
Pip-installable builds of established simulation codes, with every native dependency inside the wheel.
- palace-solverThe Palace 3D finite element electromagnetics solver as a binary wheel for Linux (x86-64, arm64) and Apple Silicon macOS. One pip install, no conda, Docker, compiler or MPI setup.github.com/benvial/palace-solver
- dolfinx-solverDOLFINx (FEniCSx) as a Linux binary wheel, with complex-scalar PETSc and SLEPc built in.github.com/benvial/dolfinx-solver
conda-forge
Feedstocks I maintain on conda-forge.
- gyptis-feedstockconda-forge recipe for the gyptis finite element photonics package.github.com/conda-forge/gyptis-feedstock
- nannos-feedstockconda-forge recipe for the nannos Fourier modal method package.github.com/conda-forge/nannos-feedstock
- protis-feedstockconda-forge recipe for the protis plane wave expansion package.github.com/conda-forge/protis-feedstock
- tmm-feedstockconda-forge recipe for tmm, the transfer matrix method for multilayer optics.github.com/conda-forge/tmm-feedstock
- autograd-feedstockconda-forge recipe for autograd, automatic differentiation of native Python and NumPy code.github.com/conda-forge/autograd-feedstock