Examine a field, and write brief information about it to a string.
module Examine_Field_Prim < libdeps = "FLD", hdr_dirs = "../utils_xp", src_file = "examfld.cxx", cxx_hdr_files = "fld/Xfld.h array_fn.h field_fn.h om_fn.h", cxx_src_files = "../utils_xp/array_fn.cxx ../utils_xp/field_fn.cxx ../utils_xp/om_fn.cxx" > { int text_rows <NEportLevels={2,1}>; string text_string <NEportLevels={2,1}>; group &data < NEportLevels={2,0},NEx=429.,NEy=286. > { int nnodes; int nspace; Data_Array coordinates { nvals => <-.nnodes; veclen => <-.nspace; float values[.nvals][.veclen]; float min => cache(min_array(magnitude(.values),0,0)); float max => cache(max_array(magnitude(.values),0,0)); float min_vec[.veclen] => cache(min_array(.values,0,0)); float max_vec[.veclen] => cache(max_array(.values,0,0)); }; int+opt ndim; int+opt dims[.ndim]; int+opt npoints; float+opt points[.npoints][.nspace]; int+opt grid_type; int+opt ncell_sets; Cell_Set+opt cell_set[.ncell_sets] { int ncell_data; Data_Array cell_data[.ncell_data] { nvals => <-.ncells; }; }; DefaultXform+opt xform; int+opt nnode_data; Data_Array+opt node_data[.nnode_data] { nvals => <-.nnodes; }; }; cxxmethod+req update (data+notify+req, data.nnodes+req); };
Examines arrays within an AVS/Express field, and writes information about the arrays into a string object.
A summary of the number of arrays is produced, and has the form :
n arrays
(n1 gr, n2 nd, n3 cd, n4 co)
where n
is the total number of arrays in the field, n1
the number of grid arrays (may be 1 or 0 if the grid is a connection to a function), n2
is the number of node data arrays, n3
is the number of cell data arrays and n4
is the number of connectivity arrays.
A connectivity array is defined as being the poly_connect_list in a Cell_Set, if it exists, otherwise it is the node_connect_list.
Next, information about each array is written in the form :
no - name
type [length], size
where, no
is the array's number (see next paragraph), name
is as given in its label subobject (or `?' if unset), type
is the data type, length
is the number of entries in the array, and size
is the size of the array (in bytes if less than 1kb big, else in kb).
Arrays are numbered starting from 1, and in the following order : grid, node data, cell data and connectivity. Ordering of arrays within each of these categories is as in the input field.
Example output is :
2 arrays
(1 gr, 1 nd, 0 cd, 0 co).
1 - ?
float [122880], 480kb
2 - density
float [40960], 160kb
&data
A reference to the input field.
text_string
String object containing information about the field.
text_rows
Number of lines in the string.
The low-level Examine_Field_Prim module is used in the functional-macro Examine_Field, and in the user-macro examine_field. Additionally, these macros also use the Examine_Field_Param parameter block group object, as does the Examine_Field_UI macro.
An example application Examine_Field_Eg is provided, which uses the AVS/Express sample data file bluntfin.fld. This data file contains six arrays (one grid plus five node data). Information about the arrays is shown in a SingleWindowApp main window by selecting the examine_field option from the editors, modules menu.
iac_proj/examfld/efldmods.v
contains the V definitions for the Examine_Field_Param group and the Examine_Field_Prim module.
iac_proj/examfld/examfld.cxx
contains the source code for the primitive module.
iac_proj/examfld/INSTALL
contains instructions on how to add Examine_Field project modules and macros to the IAC library structure.
iac_proj/examfield/README
contains instructions on how to compile and install Examine_Field project modules and macros.
Additional files are required for AVS/Express utility functions (see below).
The module also requires the util_xp AVS/Express utility code files. These may be obtained from http://www.iavsc.org/, and need to be installed in the iac_proj directory according to the instructions given with the package.
If both the Examine_Field project and the Compress project are required, then the cxx_src_files
line in either the examine_field_mods.v file or the compress_mods.v file should be removed or commented out (these cxx_src_files are common to both projects, which causes errors/warnings when linking if they are specified twice).
See the README and INSTALL files for full information about compiling and installing the Examine_Field project modules and macros.
Amardeep S Bhattal. Manchester Visualisation Centre, Manchester Computing, University of Manchester, Oxford Road, Manchester, M13 9PL, UK.
examine_field, utils_xp.
This software/documentation was produced as part of the INDEX project (Intelligent Data Extraction) which is funded under contract ESPRIT EP22745 of the European Community. For further details see http://www.man.ac.uk/MVC/research/INDEX/Public/. Copyright (c) June 1998, Manchester Visualisation Centre, UK. All Rights Reserved. Permission to use, copy, modify and distribute this software and its documentation is hereby granted without fee, provided that the above copyright notice and this permission notice appear in all copies of this software / documentation. This software/documentation is provided with no warranty, express or implied, including, without limitation, warrant of merchantability or fitness for a particular purpose.