# Introduction

Introduction — MC Grating documentation for Chandezon Collinear and Chandezon Conical. The C-method1-4 Grating package is designed to run on any Windows®…

Canonical: https://mcgrating.com/docs/chandezon/introduction.html


Written by Nikolay M. LyndinLast revised 2018-01-09

This documentation was written for releases up to 2018 and is being revised. Some dialogs have changed since. If something does not match what you see, write to [mc@mcgrating.com](mailto:mc@mcgrating.com).

The C-method1-4 Grating package is designed to run on any Windows® OS. The codes interface is written in Delphi. The most critical matrix routines (LAPACK) are taken from Intel® MKL 2018 version. The routines in MKL are hand optimized by exploiting today’s multicore and many core processors, wider vector units and other processor architectural features.
 There are 32 and 64 bit version of the codes. All things being equal a 64 bit code is 30% faster.
 For 32-bit version the highest number of orders is restricted by 2 Giga Byte of memory for single application.
 For 64 bit version practically there isn’t limitation on the highest number of orders. Memory usage is restricted only by hardware capabilities.

The C-method based package is intended to calculate gratings with a smooth profile and includes two independent codes.

- The ***Collinear*** ***version*** deals with a multilayer grating structure when incidence wave vector belongs to the *XZ* plane normal to the structure and grating grooves.
- The ***Conical version*** extends the possibilities of the *Collinear* *version* to a conical mount, i.e. for any incident angles and any polarization. This version accepts files saved by the *Collinear** version* but it is about eight times slowly.

Both code versions include ***Classic*** and ***Extended*** methods. 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 codes calculate the interaction of a plane electromagnetic wave with the multilayer corrugated structure providing the efficiencies (complex amplitude and power) of all reflected and transmitted diffraction waves and also calculate the complex field distribution and power flow in the multilayer structure and ambient media. Codes are based on a complex permittivity of layers for the electromagnetic wave. Incident wave has a unity amplitude of vector ***E***, (***s*** –polarization) or of vector ***H***, (***p*** –polarization) for the non-conical mount versions and of modulus **|*E*| **(for conical mount versions) and zero phase at position *x = 0* and *z = 0*. Incident wave power flow always equals to unity.

All codes have almost the same interface adapted for particular code possibilities. The main form is a container for independent project editor windows. The project editor window may display a text with a structure parameters or a text table with results of calculation. The graphic tools take data from the results text table. This seems to be reasonable because the user has an opportunity to edit the data before displaying and to display in a graphic form a saved data files. The user can change the results precision and diffraction orders of interest to display in the text table without repeating calculation because a complete result data is kept in a PC memory. The user is provided with the possibility of insertion any comment before the structure parameters text. The comment should not contain the structure first line text specification. The structure parameters can be edited as from the text window or from the ***[Settings Dialog](https://mcgrating.com/docs/chandezon/settings.html)*** window. Lines of more than 2500 characters length are displayed by editor in truncated form and it is safely to edit them only as a whole (delete, copy, paste). The software will use full length lines. Dialog windows are also used to access any other tool options.

All codes also include:

- A waveguide resonances search. ***[Go](https://mcgrating.com/docs/common/resonance.html)***
- Analysis of a finite Gauss beam reflection and transmission5. ***[Go](https://mcgrating.com/docs/common/analysis.html)***
- An optimization possibility in multidimensional space6 for sophisticated criterion function. ***[Go](https://mcgrating.com/docs/common/optimization-dialog.html)***
- General and 3D graphics for results presentation of one or two parameters scanning. ***[Go](https://mcgrating.com/docs/common/graph.html)***
- A refractive index materials catalog. ***[Go](https://mcgrating.com/docs/common/material.html)***

In the designing of the codes the following publications were used:

1. J. Chandezon, D. Maystre, G. Raoult, “A new theoretical method for diffraction gratings and its numerical application”, J. Optics (Paris), Vol. 11, No. 4, p.235 (1980).
2. J. Chandezon, M. T. Dupuis, and G. Cornet, “Multicoated gratings: a differential formalism applicable in the entire optical region”, J. Opt. Soc. Am. **72**, 839-846 (1982).
3. Lifeng Li, “Multilayer-coated diffraction gratings: differential method of Chandezon et al. revisited”, J. Opt. Soc. Am. **11**, 2816-2828 (1994).
4. Lifeng Li, G. Granet, J. P. Plumey, and J. Chandezon, “Some topics in extending the C method to multilayer gratings of different profiles”, Pure Appl. Opt. **5**, 141-156 (1996).
5. S. M. Loktev, N. M. Lyndin, O. Parriaux, V. A. Sychugov, A. V. Tishchenko, “Reflection of a finite light beam from a finite waveguide grating”, Sov. J. Quantum Electron. **27** 445-449 (1997).
6. R. Fletcher, M.J.D. Powell, “A rapidly convergent descent method for minimization”, The Computer Journal, 6 163-168 (1963).

From the in-application help of Chandezon Collinear and Chandezon Conical, documented through 2018. If you publish results computed with MC Grating, see [how to cite it](https://mcgrating.com/references.html#cite).
