# Introduction

Introduction — MC Grating documentation for Modal Crossed. The Fourier Modal Method1-3 (FMM) software for crossed Gratings is designed to run on any…

Canonical: https://mcgrating.com/docs/modal-crossed/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 Fourier Modal Method1-3 (FMM) software for crossed Gratings is designed to run on any Windows® OS. The code 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 versions of the code. All things being equal a 64 bit code is 30% faster.
 For 32-bit version the highest number of modes 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 modes. Memory usage is restricted only by hardware capabilities.

The software is intended to calculate gratings with a binary profile and the “Normal Vector Field” idea4-6 with automatic generation of NV-Field is implemented. This provides the fastest known convergence for dielectric gratings of a binary profile.

The code calculates 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. Code is based on a complex permittivity of layers for the electromagnetic wave. Incident wave has a unity amplitude of vector ***E*** and zero phase at position *x = 0 , y = 0* and *z = 0*. Incident wave power flow always equals to unity.

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](https://mcgrating.com/docs/modal-crossed/settings.html)***[ ***Dialog***](https://mcgrating.com/docs/modal-crossed/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.

Code also includes:

- A waveguide resonances search. ***[Go](https://mcgrating.com/docs/common-crossed/resonance.html)***
- Analysis of a finite Gauss beam reflection and transmission8. ***[Go](https://mcgrating.com/docs/common-crossed/analysis.html)***
- Automatic generation of Normal Vector field4-6 ***[Go](https://mcgrating.com/docs/modal-crossed/nv-field.html)***.
- An optimization possibility in multidimensional space9 for sophisticated criterion function. ***[Go](https://mcgrating.com/docs/common-crossed/optimization-dialog.html)***
- General and 3D graphics for results presentation of one or two parameters scanning. ***[Go](https://mcgrating.com/docs/common-crossed/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. Lifeng Li, “A modal analysis of lamella diffraction gratings in conical mountings”, Journal of Modern Optics, **40**, 553-573 (1993);
2. P. Lalanne and G. M. Morris, “Highly improved convergence of the coupled-wave method for TM polarization”, J. Opt. Soc. Am. A **13**, No. 4, p. 779 (1996).
3. L. Li, “Use of Fourier series in the analysis of discontinuous periodic structures”, J. Opt. Soc. Am. A **13**, No. 9, p. 1870 (1996).
4. Evgeni Popov, Michel Nevière, “Grating theory: new equations in Fourier space leading to fast converging results for TM polarization”, J. Opt. Soc. Am. A **17**, No. 10, p. 1773 (2000).
5. Evgeni Popov, Michel Nevière, “Maxwell equations in Fourier space: fast-converging formulation for diffraction by arbitrary shaped, periodic, anisotropic media”, J. Opt. Soc. Am. A **18**, No. 11, p. 2886 (2001).
6. Thomas Schuster, Johannes Ruoff, Norbert Kerwien, Stephan Rafler, and Wolfgang Osten1, “Normal vector method for convergence improvement using the RCWA for crossed gratings”, J. Opt. Soc. Am. A **24**, No. 9, p. 2880 (2007).
7. N. Lyndin, O. Parriaux and A.V. Tishchenko, “Modal analysis and suppression of the FMM instabilities in highly conductive gratings”, J. Opt. Soc. Am. A, Vol. **24**, No. 12, p. 3781 (2007).
8. 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).
9. 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 Modal Crossed, documented through 2018. If you publish results computed with MC Grating, see [how to cite it](https://mcgrating.com/references.html#cite).
