Table of Contents

Class RigorousSimulationResultBase

Namespace
VirtualLabAPI.Core.FieldRepresentations
Assembly
VirtualLabAPI.dll

Base class for storing the results of rigorous calculations, i. e. efficiencies and Rayleigh coefficients per order.

public abstract class RigorousSimulationResultBase : FieldRepresentationObject, ISerializable, IDeserializationCallback, IDocument, IEquatable<IObjectBase>, ICloneable, IDisposable, IProvidesPositioningReferences
Inheritance
ObjectBase
SerializableObjectBase
ManualSerialization
RigorousSimulationResultBase
Implements
IEquatable<IObjectBase>
Derived
Inherited Members
Extension Methods

Constructors

RigorousSimulationResultBase()

Empty constructor to allow some special constructors in the derived classes.

protected RigorousSimulationResultBase()

RigorousSimulationResultBase(List<OrderInfoIncomplete>, double, Vector3D, VectorD, HomogeneousMedium, HomogeneousMedium, bool)

Initializes a new instance of the RigorousSimulationResultBase class.

public RigorousSimulationResultBase(List<OrderInfoIncomplete> orderInfo, double wavelength, Vector3D waveVectorIncidentWave, VectorD periods, HomogeneousMedium mediumBefore, HomogeneousMedium mediumAfter, bool useForTransmission)

Parameters

orderInfo List<OrderInfoIncomplete>

The order information.

wavelength double

The wavelength.

waveVectorIncidentWave Vector3D

The wave vector of the incident wave.

periods VectorD

The periods of the grating structure for which results were obtained (in x- and y-direction).

mediumBefore HomogeneousMedium

The medium before the grating structure for which results were obtained. This is the medium from which the incident wave comes.

mediumAfter HomogeneousMedium

The medium after the grating structure for which results were obtained.

useForTransmission bool

if set to true the created rigorous simulation results stores transmission results.

RigorousSimulationResultBase(RigorousSimulationResultBase)

Copy Constructor.

public RigorousSimulationResultBase(RigorousSimulationResultBase objectToCopy)

Parameters

objectToCopy RigorousSimulationResultBase

The object to copy.

Properties

FieldRepresentation

Gets the type of the field representation.

public override FieldRepresentation FieldRepresentation { get; }

Property Value

FieldRepresentation

FileExtension

Gets the file extension.

public override string FileExtension { get; }

Property Value

string

KSpaceSampling

Gets and sets the sampling in the k-space. Usually derived from the period of the analyzed structure.

public virtual VectorD KSpaceSampling { get; set; }

Property Value

VectorD

LFO_CoordinateSystem

public method to set and get the coordinate system of the RigorousSimulationResult

public CartesianCoordinateSystem LFO_CoordinateSystem { get; set; }

Property Value

CartesianCoordinateSystem

MaximumOrderNumber

Gets the maximum absolute value of all order numbers.

protected Vector MaximumOrderNumber { get; }

Property Value

Vector

Orders

Gets and sets the actual results (Rayleigh coefficients and efficiencies per diffraction order).

public OrderInfoWithDirection[] Orders { get; set; }

Property Value

OrderInfoWithDirection[]

TypeOfDocument

Gets an enum entry specifying the type of the document.

public override DocumentType TypeOfDocument { get; }

Property Value

DocumentType

WaveVectorZerothOrder

Gets and sets the wave vector of the zeroth order.

public WaveVector WaveVectorZerothOrder { get; set; }

Property Value

WaveVector

Wavelength

Gets and sets vacuum wavelength for which the results were obtained.

public double Wavelength { get; set; }

Property Value

double

Methods

CalculateEfficiencies(VectorC, Vector3D)

Calculates the efficiencies of all orders (anew).

public void CalculateEfficiencies(VectorC electricalFieldExEy, Vector3D directionOfIncidentPlaneWave)

Parameters

electricalFieldExEy VectorC

transverse E-field components i.e. (Ex, Ey) of the incident plane wave.

directionOfIncidentPlaneWave Vector3D

The direction of the incident plane wave.

Clone()

Create deep copy of field representation. \static{}

public override object Clone()

Returns

object

The cloned object.

ConvertComplexAmplitudeToRigorousSimulationResult(ComplexAmplitude, HomogeneousMedium, HomogeneousMedium, VectorC, Vector3D, bool)

Converts a ComplexAmplitude into a RigorousSimulationResultBase, assuming that the ComplexAmplitude represents the transmitted field.

public static RigorousSimulationResultBase ConvertComplexAmplitudeToRigorousSimulationResult(ComplexAmplitude ca, HomogeneousMedium superstrate, HomogeneousMedium substrate, VectorC electricalFieldExEy, Vector3D directionOfIncidentPlaneWave, bool useForTransmission)

Parameters

ca ComplexAmplitude

The complex amplitude to be casted.

superstrate HomogeneousMedium

The medium of the incident and the reflected field.

substrate HomogeneousMedium

The medium of the transmitted field. This should be identical to the Embedding Medium of the given complex amplitude.

electricalFieldExEy VectorC

transverse E-field components i.e. (Ex, Ey) of the incident plane wave.

directionOfIncidentPlaneWave Vector3D

The direction of the incident plane wave.

useForTransmission bool

If set to true the created rigorous simulation results stores transmission results.

Returns

RigorousSimulationResultBase

A RigorousSimulationResultBase object.

ConvertRigorousSimulationResultToNearField(RigorousSimulationResultBase, double, int, bool, bool, bool, double)

Propagate function for the near field operator for FMM. For details see the internal technical note about the Grating Toolbox and eqs. (2.102) ff. in "Microphotonics" by J. Turunen (lecture notes).

public static ComplexAmplitude ConvertRigorousSimulationResultToNearField(RigorousSimulationResultBase rigorousSimulationResults, double oversamplingFactor, int numberOfPeriods, bool returnOnedimensionalField, bool sampleLinearPhase, bool applyEvanescentFieldFilter = false, double distance = 0)

Parameters

rigorousSimulationResults RigorousSimulationResultBase

The rigorous simulation results.

oversamplingFactor double

Oversampling Factor for finer sampling.

numberOfPeriods int

How many periods shall be visible?

returnOnedimensionalField bool

Shall a one-dimensional or a two-dimensional field be returned?

sampleLinearPhase bool

Shall the linear phase resulting from the principal direction be visible in the output field?

applyEvanescentFieldFilter bool

If this optional parameter is set to true evanescent orders are filtered out.

distance double

If this parameter is specified, an additional propagation of the near field by the specified distance is done.

Returns

ComplexAmplitude

A ComplexAmplitude object storing the near field.

Exceptions

ArgumentException

A near field cannot be calculated if the zeroth order is evanescent.

Equals(object, EqualityIntent)

Determines whether the specified object is equal to this instance.

public override bool Equals(object otherObject, EqualityIntent equalityIntent)

Parameters

otherObject object

The object to compare with this instance.

equalityIntent EqualityIntent

Defines what kind of equality you want to check when comparing two objects, for example all values or just physical equality.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

GetDirectionOfOrder(int, int)

Gets the direction of a certain order. We are in the field's coorinate system, i.e. the sign of the real part of the z-component of the resulting wave number vector is greater than or equal to zero for transmitted light (zero indicates evanescent waves).

public WaveVector GetDirectionOfOrder(int orderNumberX, int orderNumberY = 0)

Parameters

orderNumberX int

The number of the order in x-direction.

orderNumberY int

The number of the order in y-direction. Can be omitted if the results have been calculated for a system having no modulation in y-direction.

Returns

WaveVector

The direction of the specified order.

GetDirectionOfOrder(Vector)

Gets the direction of a certain order. We are in the field's CS, i.e. the sign of the real part of the z-component of the resulting wave number vector is greater than or equal to zero for transmitted light (zero indicates evanescent waves).

public WaveVector GetDirectionOfOrder(Vector orderNumber)

Parameters

orderNumber Vector

The order numbers for x- and y-direction for which the direction shall be calculated.

Returns

WaveVector

The direction of the specified order.

GetOrder(int, int)

Gets the order with specified order number(s).

public OrderInfoWithDirection GetOrder(int orderNumberX, int orderNumberY = 0)

Parameters

orderNumberX int

The number of the order in x-direction.

orderNumberY int

The number of the order in y-direction. Can be omitted if the results have been calculated for a system having no modulation in y-direction.

Returns

OrderInfoWithDirection

The order with specified order number(s). Null if no orders are present or if no matching order could be found.

GetSummedEfficiencies()

Gets the sum of the efficiencies of all orders.

public double GetSummedEfficiencies()

Returns

double

The sum of the efficiencies.

OrderInfoFromComplexFields(ComplexField[], ComplexField, Vector?)

Creates a list of OrderInfo objects from the given Rayleigh coefficients and efficiencies. It is assumed that all ComplexField objects passed as parameter have the same (odd) number of sampling points and that the values of the zeroth order are in the center of the field, respectively.

public static List<OrderInfoIncomplete> OrderInfoFromComplexFields(ComplexField[] rayleighCoefficients, ComplexField efficiencies, Vector? startOrder = null)

Parameters

rayleighCoefficients ComplexField[]

Three ComplexField objects storing the Rayleigh coefficients for Ex, Ey, and Ez.

efficiencies ComplexField

A ComplexField storing the diffraction efficiencies of the orders.

startOrder Vector?

The order number of the first order (with index (0; 0)) in the complex fields. If this optional parameter is not specified or if it is null it is assumed that the zeroth order is in the center of the fields.

Returns

List<OrderInfoIncomplete>

A list of OrderInfo objects.

Save(string)

Implementation of the IDocument Save function.

public override void Save(string filename)

Parameters

filename string

Path and file name.

ShiftByHalfAPeriod()

Shifts the Rayleigh coefficients by half a period. This can be necessary as the Fourier Modal Method perform its calculations for transition points shifted by half a period. Thus the linear phase functions generated out of the Rayleigh coefficients bear that shift. To correct this we have to multiply a phase factor so that afterwards the phase at the position (0m; 0m) is equal to the original phase at the location (period.X / 2; period.Y /2).

public void ShiftByHalfAPeriod()