SimulationGrating
The SimulationGrating class can be initiated in python script by
from MESH import SimulationGrating s = SimulationGrating()
SetNumOfG(nG)
-
Arguments:
- nG: [int], the number of total Fourier components in both directions. Note this nG might not be the true nG used in the simulation.
-
Output: None
GetNumOfG()
-
Arguments: None
-
Output: number of G. If function
InitSimulation
has been called, then this function returns the true nG used in the simulation, otherwise return the user input nG.
Note
The following functions are added and specific to SimulationGrating
object.
SetLattice(p1)
-
Arguments:
- p1: [double], the periodicity in direction in SI unit
-
Output: None
SetLayerPatternGrating(layer name, material name, center, width)
-
Arguments:
- layer name: [string], the layer that this grating will be embedded. Such layer should already exist in the simulation, otherwise an error message will be printed out.
- material name: [string], the material used as the grating. Such material should already exist in the simulation, otherwise an error message will be printed out.
- center: [double], the center of the grating in SI unit.
- width: [double], the width of the grating in SI unit.
-
Output: None