DVgen_fld


Synopsis

create an AVS/Express Field object of any type


group DVgen_fld {
int+Iparam fld_type;
int+Iparam ndim;
int+Iparam dims[ndim];
int+Iparam nspace;
float+Iparam extents[2][nspace];
string cell_type;
int+Iparam ndata_veclen;
int+Iparam ndata_type;
float+Iparam ndata_coeff[10];
int null_flag;
float null_value;
Field+Oparam &out; /* output field */
method+notify_val+notify_inst upd_gen_fld = "gen_fld";
};

Description

DVgen_fld generates a Field of any type as specified by its input parameters. Its primary purpose is to create different kinds of Fields against which to test modules or macros that you are developing. The fields include dummy data that is the sum of a polynomial.

Input

fld_type

An integer that specifies the field type:

0 Field
1 Field_Struct
2 Field_Unif
3 Field_Rect

ndim

An integer that specifies the ndim of a structured, uniform, or rectilinear coordinate Grid_Struct.

dims[ndim]

An integer pointer to the beginning of the dims array for a structured, uniform, or rectilinear Grid_Struct. The user does not have to specify this value.

nspace

An integer that specifies the nspace of a Grid.

extents

A set of float parameters to set the field's points array (uniform and rectilinear fields).

cell_type

A string that specifies the cell type of unstructured meshes. Allowed values are: "Point", "Line", "Polyline", "Tri", "Quad", "Tet", "Hex", or "Prism".

ndata_veclen

An integer that specifies the nnode_data value in the Node_Data object of the field (the number of Node_Data components).

ndata_type

An integer that specifies the primitive data type of the Node_Data's Data_Array values array. The allowed values are (from avs/dtype.h):

DTYPE_CHAR 0
DTYPE_BYTE 1
DTYPE_SHORT 2
DTYPE_INT 3
DTYPE_FLOAT 4
DTYPE_DOUBLE 5

ndata_coeff

A floating-point "seed" value for the polynomial function that will generate the fictitious data in the Node_Data's Data_Array values array.

null_flag

An integer. If not zero, then set the null_flag in the output field's Data_Array to "has null data."

null_value

A float. If null_flag is not zero, then set the null_value in the output field's Data_Array to this value.

Output

&out

Reference to the output field.

Example

Not available.

Files

v/dv.v
modules/gen_fld.c

See also

Not applicable.