OpenMaXwell Reference Manual

Home  General  Menues  Dialogs  Movie Directives  Formula Interpreter  File Structures

Available directives

ADApt ADD BLOw CLEar CONvert COPy DELete DRAw END EXChange EXIt GENerate GET GOTo IF> IF< IF= INCrease ITEterate LABel LOOp MMP MOVe MULtiply PROcess REAd REFlect REName ROTate RUN SET SORt SUBtract WRIte

WRIte: write information on one of the following files

AVI(movie) BASis(PET)    BITmap    BMP(file)    BOUndary    CFIeld    DIRectives    DOMain    EXPansion    FIEld    FITness    FLF(field-formula)    FUNction    GMSh    GRF(grid-formula)    GRT(grid-transform)    INTegral    MATrix    MMP    OBJect    OGL(openGL)    PFD(predefined FD)    PROject    RFIeld    WINdow

 

AVI

Argument: Name

Meaning: Write the pixel information of the current window on the AVI movie file Name. Special cases of Names:

Notes:

 

BASis

Argument: Name

Meaning: Write the basis functions on the file Name. Note: if the current problem is of the eigenvalue type, the EET basis will be saved. Otherwise, the PET basis is saved. Special cases of Names:

BITmap or BMP

Argument: Name

Meaning: Save the bitmap information of the current graphics window to the file Name. Special cases of Names:

 

BOUndary

Arguments: Name (n Name2)

Meaning: Save the boundaries to the file Name. When the arguments n Name2 are present, the locations of all matching points in the xy plane are written on an extra ASCII text file with the extension MAT. Special cases of Names (also for Name2):

CFIeld

Arguments: x y z a b na nb io id ii Name

Meaning: Compute the complex E and H field values on a regular grid with na by nb lines over a rectangular area of side lengths a and b and save the values to the file Name. The lower left corner with global coordinates x y z may be anywhere in space. the rectangle is parallel to the yz plane when io is equal to 1, parallel to the xz plane when io is equal to 2, parallel to the xy plane when io is equal to 3. The rectangle is assumed to be in domain id when id is positive. If the rectangle contains points in several domains, set a negative value for id. Then the domain numbers for all points will be evaluated from the boundary information of the model. You may specify an interpolation type ii when the field is already known on a grid that includes the rectangle. Sett ii=0 to suppress interpolation (recommended). The file header will have a header with the values x y z on the first line and a b na nb io on the second line. After the header, there will be a list of lines containing

id

Real(Ex) Imag(Ex) Real(Ey) Imag(Ey) Real(Ez) Imag(Ez)

Real(Hx) Imag(Hx) Real(Hy) Imag(Hy) Real(Hz) Imag(Hz)

...

for the na by nb points.

DIRective

Argument: Name

Meaning: Save the directives to the file Name. Special cases of Names:

 

DOMain

Argument: Name

Meaning: Save the domains to the file Name. Special cases of Names:

 

EXPansion

Argument: Name

Meaning: Save the expansions to the file Name. Special cases of Names:

 

FIEld

Arguments: Name (WHAt)

Meaning: Save the original field or the representation data to the file Name. When WHAt is missing, the representation data and the field values are saved. When WHAt is REPresentation, only the representation data is saved. When WHAt is VALue, only the original field values are saved. When WHAt is DERived, only the derived field values (scalar + vector components) are saved. When WHAt is VECtor, only the vector components of the derived field are saved. When WHAt is SCAlar, only the scalar part of the derived field is saved. When WHAt is any string starting with characters different form REP, VAL, DER, VEC, SCA, it is considered as an input filename. The corresponding input file must have the following structure. First line: N - number of points given in the following list (N lines); lines 2...N+1: iD x y z (domain number, x, y, z coordinates of the point in 3D space). OpenMaXwell will compute the field (complex E and H vectors) in all N field points using the current MMP expansions. It will write the corresponding data on the output file Name. When the domain number iD is negative, it will compute the domain number for each point using the boundary data available. Otherwise, it will compute the field in each point assuming that iD is the correct domain number. The output file will have N on the first line followed by 2N lines containing Re(Ex) Im(Ex) Re(Ey) Im(Ey) Re(Ez) Im(Ez) and Re(Hx) Im(Hx) Re(Hy) Im(Hy) Re(Hz) Im(Hz).

Special Names (only for output):

 

FITness

Arguments: WHAt (...)

Meaning: Write fitness values to the data exchange file OPT.xxx, where xxx is the process number. OPT.xxx is used by some optimizer software, e.g., OptPES. OPT.xxx contains the following data: number of fitness values, number of parameters, array of parameters, array of fitness values. It is simultatneously opened by OpenMaXwell and the optimizer. For this purpose, OpenMaXwell must run in the slave mode, i.e., must be called with the command "OpenMaXwell.exe yyy.PRO inf", where yyy.PRO ist the project file to be opened. Its directive file should contain the following directives:

WRIte FITness BEGin nnn - nnn is the number of fitness values to be written on nnn following directives of the form:

WRIte FITness ... - ... describes which value should be written as fitness value, e.g., PARameter n-1 1 SQUare

WRIte FITness END - this command writes all date to OPT.xxx. It should directly follow the nnn-th "WRIte FITness ..." directive. After "WRIte FITness END", all essential movie directives should have been finished, i.e., either the final "END" directive or an "EXIt" directive should follow.

Notes:

 

FLF

Argument: Name

Meaning: Save the field definition formula to the file Name. Special cases of Names:

 

FUNction

Arguments: Name (WHAt (...))

Meaning: Save current function values or the function representation data on the file Name. When WHAt is missing, the representation data and all current  function values are saved - except when Name is equal to ! (see below).  Special Names:

What (…) can be one of the following:

 

GMSh

Argument(s): Name (iB1 iB2 iD iC)

Meaning: Create 2D boundary data for the finite element mesher GMSH and write it to a *.GEO file Name. Only boundaries with numbers iB1 up to iB2, domain numbers iD (either on the left or on the right side) and color iC are used. Default values are iB1 = 1, iB2 = number of boundaries, iD = 0 (all domains), iC = 0 (all color numbers - color number 0 (white) cannot be used)

 

GRF

Argument: Name

Meaning: Save the grid definition formula to the file Name. Special cases of Names:

 

GRT

Argument: Name

Meaning: Save the grid transformation formula to the file Name. Special cases of Names:

 

INTegral

Arguments: Name (Type (….))

Meaning: Write the integral data to the integral file Name when Type is missing. Otherwise, compute the current integral of the type Type (….) and write the values of the integration to the Function file Name.

Note: any existing file data is overwritten. Special cases of Names:

Type (….) can be one of the following:

MATrix

Arguments: Name (What)

Meaning: Save the MMP matrix to the field file Name. What can be one of the following:

When What is missing, the triangular matrix is saved.

Special cases of Names:

 

MMP

Arguments: Name (What)

Meaning: Save the MMP data to the file NameWhat can be one of the following:

When What is missing, only the header is saved.

Special cases of Names:

 

OBJect

Argument: Name

Meaning: Save the 3D object data to the file Name. Special cases of Names:

 

OGL

Argument: Name

Meaning: Save the OpenGL window data to the file Name. Special cases of Names:

PFD

Argument: Name

Meaning: Save the PFD data to the file Name. Special cases of Names:

 

PROject

Argument: Name

Meaning: Save the project data to the file Name. Note: All associated data files (same file name but different file extension) will also be saved. Special cases of Names:

RFIeld

Arguments: x y z a b na nb io id ii Name

Meaning: Compute the derived field (Specified in the Field dialog) on a regular grid with na by nb lines over a rectangular area of side lengths a and b and save the values to the file Name. The lower left corner with global coordinates x y z may be anywhere in space. the rectangle is parallel to the yz plane when io is equal to 1, parallel to the xz plane when io is equal to 2, parallel to the xy plane when io is equal to 3. The rectangle is assumed to be in domain id when id is positive. If the rectangle contains points in several domains, set a negative value for id. Then the domain numbers for all points will be evaluated from the boundary information of the model. You may specify an interpolation type ii when the field is already known on a grid that includes the rectangle. Sett ii=0 to suppress interpolation (recommended). The file header will have a header with the values x y z on the first line and a b na nb io on the second line. After the header, there will be a list of lines containing

id

Fx Fy Fz

...

for the na by nb points, where F is the derived field.

 

WINdow

Argument: Name

Meaning: Save the window data to the file Name. Special cases of Names:

 

Responsible for this web page:  Ch. Hafner, Computational Optics Group, IEF, ETH, 8092 Zurich, Switzerland

Last update 27.10.2015