Fields Panel

The Fields Panel allows the user to select the fields which should be saved and restored.

The field matrices which are saved/restored to a file are:

Matrix | Name Description

  • Ext | Transmitted X field
  • Eyt | Transmitted Y field
  • Ezt | Transmitted Z field
  • Exr | Reflected X field
  • Eyr | Reflected Y field
  • Ezr | Reflected Z field

Additionally, there are two coordinate vectors:

Vector Name | Description

  • sysxvec | coordinate vector for the columns.
  • sysyvec | coordinate vector for the rows.

The Rule: Each field matrix must have the same matrix dimensions. The Exception: A field matrix may be a scalar, such as 0. By using a scalar 0, when appropriate, (instead of a n x m matrix of zeros) memory is saved and the simulation’s calculation time is reduced.


Specifying which fields to Save/Restore:

The “Use Which Fields” portion of the Fields Panel allows the user to specify which fields are saved or restored.

If fields are being restored, the file must contain the sysxvec and sysyvec coordinate vectors. If fields are being saved, then the simulator will save its sysxvec and sysyvec coordinate vectors along with the specified fields.

fields_panel.use_which_fieldsi


Specifying which files to Save/Restore:

The “Use Which File” portion of the Fields Panel allows the user to specify which fields are saved or restored.

fields_panel.use_which_file

Path – Specifies which path the data should be written/read from.

The Save and Restore objects support two special tokens:<project>  and <userdata>. During the simulation,<project> is replaced with the project’s root directory and <userdata> is replaced with the name of the userdata folder in the project’s root directory.

Optiscan asks the user to specify the <userdata>  folder just before the simulation begins. At this time, Optiscan will create that folder before it starts the simulation.

The user may set the Path to any desired Path as long as that Path exists. Otherwise, the data files cannot be saved or restored. Hence, an error message concerning this will be presented to the user.

FileCoherent Field Files:

Specifies which file contains the specified field matrices (for Restoring) or which file will contain the specified field matrices (for Saving).

The Save and Restore Fields objects support automatic filename enumeration. For example, the filename:

flds.%v.mat 

will be replaced with:

flds1.mat, flds2.mat, flds3.mat,…

The “%v” is replaced with the visit count. The visit count, in this case, is the number of times that the field matrices have been saved or restored by the Save or Restore Fields objects. The “%v” may lie anywhere within the filename specification.

See: Base Index.

File – Incoherent Field Files:

Specifies which file contains the specified incoherent field matrices (for Restoring) or which file will contain the specified field matrices (for Saving).

The Save and Restore Fields objects support automatic incoherent filename enumeration. For example, the filename:

source_point.%i.mat

will be replaced with:

source_point.0.mat, source_point.1.mat, source_point.3.mat,…

The “%i” is replaced with:

%i = (PointNumber) + ( IncoherentBaseIndex)

In this formula, PointIndex = 1:(N-1). N is the number of source points. Hence, if N = 50, then the Save Fields object will save 50 source point files and the Restore Fields object will load 50 source point files. The “%i” may lie anywhere within the filename specification.

See: Incoherent Base Index.

Base Index – Coherent Field Files :

Specifies the base index for the filename enumeration

If Base Index = 1000, then

flds%v.mat

will be replaced with:

flds1001.mat, flds1002.mat, flds1003.mat,…

Hence, the value of “%v” is the visit count plus the base index. This makes working with parallel data sets easy.

Base Index – Incoherent Field Files :

The Save Fields object uses the Incoherent Base Index that was specified for either the Source object or the Restore Fields object.

See: File.