The C method (Chandezon)
A rigorous method for smooth profiles: a change of coordinates makes the corrugated interface a coordinate plane, and Maxwell's equations are solved in the new coordinates, with no staircase approximation of the profile.
What it is
Instead of describing the grating as a corrugated boundary between flat media, the C method changes coordinates so that the profile is a coordinate surface. In the curvilinear system, Maxwell's equations keep constant coefficients across the interface and the field in each medium becomes an eigenvalue problem solved once per profile; the interface conditions are then applied on a plane. The method was introduced by Chandezon, Maystre and Raoult [1] on the basis of Maxwell's equations in covariant form [25], extended to multicoated gratings [2] by Chandezon, Dupuis, Cornet and Maystre, made stable for thick stacks and faster in conical mounts by Li [3], and extended to layers with different profiles by Li, Granet, Plumey and Chandezon [4].
The method does not handle vertical walls; those are the modal method's territory.
Classic and Extended
Each Chandezon code offers two methods. In the words of the documentation: the Classic method implies identical corrugation at all interfaces, while the Extended method implies independent corrugation of all interfaces under the restriction that the period is the same and interfaces do not intersect. The Extended method adds an Interface field to the Grating page so that each interface's profile can be edited on its own.
The three Chandezon codes
- Chandezon Collinear: incidence in the plane normal to the grooves, with resonance search, finite-beam analysis, fields and optimization.
- Chandezon Conical: any incidence angle and polarization, reading the collinear code's files, at about eight times the computing cost.
- Chandezon Crossed: gratings periodic in two directions, by Granet's formulation [20] in which the field is split into TE and TM parts and one polarization-independent operator gives the whole solution.
The Stochastic C-method (2026)
The 2026-05-25 release refactored the C-method code and added an option for the Stochastic C-method, following a 2024 paper by J. Chandezon and G. Granet in J. Opt. Soc. Am. A [26] (doi:10.1364/JOSAA.530262), with thanks to Dr. J. Chandezon. In the changelog's words: adding a small random Brownian noise to the grating profile can sometimes improve the convergence of the C-method for large grating depths; however, the results with it applied are not exactly repeatable. More on the stochastic option →
The documentation of the Chandezon codes starts at the introduction for the 1D codes and the introduction for Chandezon Crossed; sections 1 to 3 of the step-by-step examples are C-method examples, including a metal sinusoidal grating in Littrow condition and hexagonal crossed gratings.