Structure of .mast file#

The .mast file is a plain ASCII data file that records operations performed using the Zmaster GUI. The data is stored in a structured format, making it easy to read and modify. While it can be edited manually for simpler tasks, using the Zmaster GUI is the preferred method for handling more complex operations.

The Zmaster interface can be used to create and mesh geometry. The .mast file used for this purpose follows this structure:

****master
 ***geometry
  **point point0_label
   *position x0 y0 z0
  **point point1_label
   *position x1 y1 z1
    ...
  **point pointN_label
   *position xN yN zN

  **line line0_label
   *p1 pointi
   *p2 pointj
   *cuts n_cuts
    ...
  **arc arc0_label
    *p1 pointi
    *p2 pointj
    *cuts n_cuts
    *center pointk
    *data   radius theta1 theta2       % theta1, theta2 in radians
    ...

  **curve quad curve_label
    *cuts n_cuts
    *points p1 p2 ... pN
  ...

  **domain domain1 domain_label
   *name domain_name
   *element type
   *method num
   *b1 edge0                % an edge could be a line, arc or a curve
   *b2 edge1
   *b3 edge2
   *b4 edge3

  **domain bset bset_label
   *name bset_name
   *order order                % 1: linear, 2: quadratic, 3: single point
   *b line1 ... lineN        % lines
   [*p]  point1 ... pointN   % points
   [*sp]  point1 ... pointN  % single points

   **domain domain_spr domain_label
    *name    domain_name
    *element element_type                        % spring elements e.g l3d2, l2d2, ...
    *b line_i line_j ... line_k

   ... % other types of domains

 ***mesher
    <MESHERS>    % see user manual, meshers section.
****return

For simulation and optimization (SimOpt), the structure of the .mast is given as:

****master
 ***sim_opt
  **template template1.tmpl [... templateN.tmpl]
  **variables
    *name param_name   % material parameters: young, poisson, ...
    *val value
    *min min_val
    *max max_val
    *optimized   % to be optimized
    *attached_to templateI.tmpl [... templateJ.tmpl]

     ...   % other variables

  **var_history
   *name hist_label
   *var_names var1 [... varN]
   *var_values val1 [... valN]
   *var_optimized bool1 [... boolN] % bool=true or false

   ... % other variables' history

  **simulation
   *name sim_label
   *plot plot_label  keep_history var1 var2
     % keep_history is the number of previous plots to keep for comparison

   ... % other variables' history

  **experiment
    *type <type>
    *name exp_label
    *from file
    *X _Ci   % i-th column, it can also be a function, e.g. ln(_C1)
    *Y _Cj   % j-th column, it can also be a function, e.g. ln(_C2)
    [*selection <FUNCTION>] % a function to select x or y range e.g. (_C1>0)*(_C2>1.)
    [*plot plot_label [plot_options] file1(_Ci) file2(_Cj)]

   ...

  **optimization
   *name opt_label
   *method <optimization_algorithm>              % e.g. levenberg_marquardt
   *comparison comparison_label [method] simulation experiment var1 var2 weight
   [*comparison ... ]

   ...

   **parametric_var
     *name p_v_label
     *value var_value1 param_value1
       ...
      [*value var_valueN param_vlueN]
     *expression <FUNCTION>          % e.g. a*x^2+b*x+c
     *coefficient coeff min min_value max max_value
      [*coefficient]
      *precision number_of_points

   ...

   **parametric_func
     *name p_f_label
     *expression <FUNCTION>
     *min min_value
     *max max_value
     *precision number_of_points

****return