all functions - h
h_array
name_array = h_array(f, ublk, name) or pname_arrays = h_array(f, ublk, [name1,name2,...,nameN]) eq_nocopy, name_array1, *pname_arrays(1) ... eq_nocopy, name_arrayN, *pname_arrays(N) reads variable array NAME for user block UBLK from the hydra file F. If NAME=="matlist", you get the "Materials_matlist" array. Coordinates can be obtained using the names x, y or z. Ublk numbering starts at 0. You can omit the UBLK argument and it will default to zero, which is useful for problems with only a single user block. Note that here zone centered arrays are given using the hydra convention so that i=imax, j=jmax, k=kmax are missing. Thus in order to use the Yorick plc and plf functions correctly you should index the plotted variable i.e. for a 2D array. plf, den(1:-1,1:-1), y, x Interpreted function, defined at i/hydra.i line 879SEE ALSO: hydra_xyz, h_data, h_mix, h_show, h_collect
h_blocks
gnblk = h_blocks(f, mdims, mlens) returns number of blocks GNBLK, block dimensions MDIMS, and block lengths MLENS for the hydra mesh in file F. MDIMS is 3-by-NBLK, MLENS is GNBLK elements. Interpreted function, defined at i/hydra.i line 1191SEE ALSO: hydra_xyz, h_iparm
h_close
h_close, f close a file F opened with h_openb. Interpreted function, defined at i/hydra.i line 178SEE ALSO: h_openb
h_collect
vart = h_collect(f, ublk, name) returns an array of the variable NAME (a string) from user block UBLK of hydra file family F. The return value has the leading dimensions of h_array(f,ublk,name), with a trailing dimension representing all the times in the family. Interpreted function, defined at i/hydra.i line 962SEE ALSO: h_array, h_show
h_data
name_array = h_data(f, name) or pname_arrays = h_data(f, [name1,name2,...,nameN]) eq_nocopy, name_array1, *pname_arrays(1) ... eq_nocopy, name_arrayN, *pname_arrays(N) reads variable NAME from the hydra file F. If F is a multiblock file, NAME_ARRAY will be 1-D; for single block problems it will be 3-D. If NAME=="matlist", you get the "Materials_matlist" array. Coordinates can be obtained using the names x, y or z. In the second form, NAME1, ..., NAMEN are retrieved simultaneously, which is useful when F is a large family of files. Note that zone centered arrays are adjusted to the hex convention that cells with i=1, j=1, k=1 are missing, rather than the hydra convention that i=imax, j=jmax, k=kmax are missing. Interpreted function, defined at i/hydra.i line 626SEE ALSO: hydra_xyz, h_mix, h_array, h_show, hydra_aux_data
h_fparm
value = h_fparm(f, name) or names = h_fparm(f) returns value of hydra parameter NAME from file F, or a list of all names in F if NAME is not supplied. If NAME is not a string, returns that parameter or parameters (NAME is index in the returned list of names), for example h_fparm(f,1:0) returns all parameters. Interpreted function, defined at i/hydra.i line 1003SEE ALSO: hydra_xyz, h_iparm, h_parm
h_gblk
gblk = h_gblk(f) return global block information from the hydra file F (see h_openb). Each hblk in the mesh corresponds to a particular imin:imax, jmin:jmax, kmin:kmax in a particular gblk. The return value is a 2D long array 7-by-numberof(h blocks): gblk(1,) = user block number for this hblk gblk(2:3,) = gblk [imin,imax] of this hblk gblk(4:5,) = gblk [jmin,jmax] of this hblk gblk(6:7,) = gblk [kmin,kmax] of this hblk Interpreted function, defined at i/hydra.i line 1102SEE ALSO: hydra_xyz, h_data, h_openb
h_get_times
times = h_get_times(f) return array of times in hydra history file family F. Interpreted function, defined at i/hydra.i line 193SEE ALSO: h_data, h_openb, h_jt, h_jr
h_global
value = h_global(f, name) returns value of hydra Global variable NAME from file F. Interpreted function, defined at i/hydra.i line 1090SEE ALSO: hydra_xyz, h_iparm
h_iparm
value = h_iparm(f, name) or names = h_iparm(f) returns value of hydra parameter NAME from file F, or a list of all names in F if NAME is not supplied. If NAME is not a string, returns that parameter or parameters (NAME is index in the returned list of names), for example h_iparm(f,1:0) returns all parameters. Interpreted function, defined at i/hydra.i line 986SEE ALSO: hydra_xyz, h_fparm, h_parm
h_jr
h_jr, f, irec or nrecs = h_jr(f) jump to record IREC in hydra history file family F. In second form, return total number of records in family. Interpreted function, defined at i/hydra.i line 224SEE ALSO: h_data, h_openb, h_get_times, h_jt, h_collect
h_jt
h_jt, f, time jump to time TIME in hydra history file family F. Interpreted function, defined at i/hydra.i line 204SEE ALSO: h_data, h_openb, h_get_times, h_jr, h_collect
h_mix
mixdat = h_mix(f, matlist) eq_nocopy, mixn, *mixdat(1) eq_nocopy, mixcell, *mixdat(2) eq_nocopy, mixnmat, *mixdat(3) eq_nocopy, mixhist, *mixdat(4) or mix_array = h_mix(f, mixdat, name) or pmix_array = h_mix(f, matlist, [name1,...,nameN], mixdat) eq_nocopy, mix_array1, *pmix_array(1) ... eq_nocopy, mix_arrayN, *pmix_array(N) In first form, returns MIXDAT and MATLIST for the hydra file F. MIXDAT consists of two arrays: MIXN is a list of the number of mixed cells for each block, and MIXCELL is an index array into any hex global cell array (as returned by h_data), MIXNMAT is the number of mix "zones" within each cell, and MIXHIST is the list required in order to use the histogram function on a mix array. In the second form, reads the mix data for the variable NAME in the hydra file F; the MIXDAT argument must have been returned by a previous call to h_mix using the first form. In the third form, MATLIST and MIXDAT are both returned along with the set of variables NAME1, ..., NAMEN, so that a number of variables can be retrieved in one call (useful when F is a large family of files). For example, to compute the temperature in each cell, using a mass weighted average in mixed zones, you would do this: den = h_data(f,"den"); tmat = h_data(f,"tmat"); mixdat = h_mix(f, matlist); local mixcell, mixhist; eq_nocopy, mixcell, *mixdat(2); eq_nocopy, mixhist, *mixdat(4); denx = h_mix(f, mixdat, "den"); tmatx = h_mix(f, mixdat, "tmat"); vf = h_mix(f, mixdat, "vf"); tavg = tmat; tavg(mixcell) = histogram(mixhist, tmatx*denx*vf)/den(mixcell); Interpreted function, defined at i/hydra.i line 698SEE ALSO: hydra_xyz, h_data, h_array, h_show
h_openb
f = h_openb(filename) open a hydra dump file, including 2D families of distributed history files. The return value is a list (see _lst function) containing the currently opened file and the non-PDB data required to navigate through each file and the entire family. With one=1 keyword, only one file of a history family is opened. Interpreted function, defined at i/hydra.i line 42SEE ALSO: h_close, hydra_xyz, h_data, h_jt, h_jr, h_get_times
h_parm
value = h_parm(f, name) or names = h_parm(f) returns value of hydra parameter NAME from file F, or a list of all names in NAME is not supplied. Interpreted function, defined at i/hydra.i line 1020SEE ALSO: hydra_xyz, h_fparm, h_iparm
h_show
h_show, f or varnames = h_show(f) prints names of variables available for h_data, h_mix, h_array. Interpreted function, defined at i/hydra.i line 251SEE ALSO: h_data, h_openb
h_ublk
ublk = h_ublk(f) or ublk = h_ublk(f, unew) return user block information from the hydra file F (see h_openb). Each ublk in the mesh has a particular size. The return value is a 2D long array 7-by-numberof(u blocks): ublk(1,) = user block number for this ublk ublk(2:3,) = ublk [imin,imax] of this ublk ublk(4:5,) = ublk [jmin,jmax] of this ublk ublk(6:7,) = ublk [kmin,kmax] of this ublk Normally, imin=jmin=kmin=1, and the only information in the return value is imax, jmax, kmax. In the second form, sets the ublk to UNEW, which is useful for resetting imin, jmin, and kmin for each block so that it describes a packing of the user blocks into an overall global block structure. Interpreted function, defined at i/hydra.i line 1124SEE ALSO: hydra_xyz, h_data, h_openb
hardbc
hardbc Interpreted function, defined at i/demo1.i line 98
has_records
has_records(file) returns 1 if FILE has history records, 0 if it does not. Interpreted function, defined at i0/std.i line 3296
hcp
hcp hcpon hcpoff The hcp command sends the picture displayed in the current graphics window to the hardcopy file. (The name of the default hardcopy file can be specified using hcp_file; each individual graphics window may have its own hardcopy file as specified by the window command.) The hcpon command causes every fma (frame advance) command to do and implicit hcp, so that every frame is sent to the hardcopy file. The hcpoff command reverts to the default "demand only" mode. Builtin function, documented at i0/graph.i line 318SEE ALSO: window, fma, plg, pdf, eps, hcps
hcp_file
hcp_file, filename, dump=0/1, ps=0/1 sets the default hardcopy file to FILENAME. If FILENAME ends with ".cgm", the file will be a binary CGM, otherwise it will be a Postscript file. By default, the hardcopy file name will be "Aa00.ps", or "Ab00.ps" if that exists, or "Ac00.ps" if both exist, and so on. The default hardcopy file gets hardcopy from all graphics windows which do not have their own specific hardcopy file (see the window command). If the dump keyword is present and non-zero, the current palette will be dumped at the beginning of each frame of the default hardcopy file (default behavior). With dump=0, all colors are converted to a gray scale, and the output files are smaller because no palette information is included. Use ps=0 to make "Aa00.cgm", "Ab00.cgm", etc by default instead of Postscript. The dump= and ps= settings persist until explicitly changed by a second call to hcp_file; the dump=1 setting becomes the default for the window command as well. Builtin function, documented at i0/graph.i line 111SEE ALSO: window, fma, hcp, plg
hcp_finish
filename= hcp_finish() or filename= hcp_finish(n) closes the current hardcopy file and returns the filename. If N is specified, closes the hcp file associated with window N and returns its name; use hcp_finish(-1) to close the default hardcopy file. Builtin function, documented at i0/graph.i line 132SEE ALSO: window, fma, hcp, hcp_out, plg
hcp_out
hcp_out or hcp_out, n finishes the current hardcopy file and sends it to the printer. If N is specified, prints the hcp file associated with window N; use hcp_out,-1 to print the default hardcopy file. Unless the KEEP keyword is supplied and non-zero, the file will be deleted after it is processed by gist and sent to lpr. Interpreted function, defined at i0/graph.i line 142SEE ALSO: window, fma, hcp, hcp_finish, plg
hcpoff
hcpoff Builtin function, documented at i0/graph.i line 318SEE hcp
hcpon
hcpon Builtin function, documented at i0/graph.i line 318SEE hcp
hcps
hcps, name writes the picture in the current graphics window to the PostScript file NAME+".ps" (i.e.- the suffix .ps is added to NAME). Legends are not written, but the palette is always dumped. Interpreted function, defined at i0/graph.i line 163SEE ALSO: hcps, window, fma, hcp, hcp_finish, plg
help
help, topic or help Prints DOCUMENT comment from include file in which the variable TOPIC was defined, followed by the line number and filename. By opening the file with a text editor, you may be able to find out more, especially if no DOCUMENT comment was found. Examples: help, set_path prints the documentation for the set_path function. help prints the DOCUMENT comment you are reading. This copy of Yorick was launched from the directory: **** Y_LAUNCH (computed at runtime) **** Yorick's "site directory" at this site is: **** Y_SITE (computed at runtime) **** You can find out a great deal more about Yorick by browsing through these directories. Begin with the site directory, and pay careful attention to the subdirectories doc/ (which contains documentation relating to Yorick), and i/ and contrib/ (which contain many examples of Yorick programs). Look for files called README (or something similar) in any of these directories -- they are intended to assist browsers. The site directory itself contains std.i and graph.i, which are worth reading. Type: help, dbexit for help on debug mode. If your prompt is "dbug>" instead of ">", dbexit will return you to normal mode. Type: quit to quit Yorick. Builtin function, documented at i0/std.i line 33SEE ALSO: quit, info, print, copyright, warranty, legal
help_worker
help_worker Interpreted function, defined at i0/std.i line 99
hex24b_track
hex24b_track Builtin function, documented at i0/hex.i line 40SEE hex5_track
hex24f_track
hex24f_track Builtin function, documented at i0/hex.i line 40SEE hex5_track
hex5_track
c= hex5_track(mesh, rays, s) c= hex24f_track(mesh, rays, s) c= hex24b_track(mesh, rays, s) track 3 x Nrays x 2 RAYS through the 3D MESH. RAYS(,,1) are points on the rays, while RAYS(,,2) are normalized ray directions. The c return value and the S parameter are a long and double array respectively, with number of elements equal to the total number of intersections of all the RAYS with faces of the MESH, plus one for any RAY which misses MESH entirely. The values of c are: [#hits,cell1,cell2,cell3,..., #hits,cell1,cell2,cell3,..., ...] where each #hits is followed by the list of cell indices (assuming i=1, j=1, and k=1 are present but meaningless in cell arrays -- that is, assuming zone centered arrays have the same dimensions as XYZ rather than one less in each direction). Rays which miss the mesh entirely have #hits=1, all others have #hits>=2 since they must exit. #hits<0 means a ray reentered the mesh for abs(#hits) more face crossings, but this currently cannot happen. The values of S correspond to c: [s0,s1,s2,s3,..., s0,s1,s2,s3,..., ...] which are the distances along the ray measured from RAYS(,,1) in the direction of RAYS(,,2) where the ray pierces a cell face. For rays which miss the mesh, the value of s0 is a diagnostic telling why they missed (see compiled code). Function hex5_track uses the 5-tet decomposition for hexes, which is not unique when the quad faces are non-planar. You may be able to get an idea of this effect by setting hex_triang the opposite way and redoing the trace. Functions hex24f_track and hex24b_track use the face and body centered 24-tet decompositions for hexes. These are unique; however, hex_triang may in rare cases change the trace slightly, since the entry search algorithm still involves triangulating the surface quads. Builtin function, documented at i0/hex.i line 40SEE ALSO: hydra_mesh, hex_triang, reg_track, track_reduce, c_adjust, pic3_rays,
conv3_rays
hex_mesh
mesh= hex_mesh(xyz, bound, nbnds, &mbnds, nblk, &blks, start) create a 3D mesh object from the multiblock mesh parameters XYZ is NBLK 3 x Ni x Nj x Nk coordinate arrays packed together BOUND is NBLK 3 x Ni x Nj x Nk face boundary markers packed NBNDS is length of MBNDS MBNDS is HX_blkbnd describing each internal block boundary face NBLK is number of blocks BLKS is NBLK HX_block objects describing the block structure START is 0-origin 6*cell+face index of first boundary face/cell or -1-cell to trace from centroid of that cell to point p on ray to begin tracking Builtin function, documented at i0/hex.i line 12SEE ALSO: hex5_track, hydra_mesh, hex_startflag
hex_mesh2
mesh= hex_mesh2(xyz, bounds) old interface for hex_mesh create a 3D mesh object from the 3 x Ni x Nj x Nk coordinate array XYZ and the list of 6 BOUNDS: BOUNDS(1), BOUNDS(2) for the i=1,Ni boundaries BOUNDS(3), BOUNDS(4) for the j=1,Nj boundaries BOUNDS(5), BOUNDS(6) for the k=1,Nk boundaries The BOUNDS values are: 1 if this is a problem boundary 2 if this is a reflecting boundary 3 if this is a periodic boundary Interpreted function, defined at i0/hex.i line 692SEE ALSO: hydra_mesh
hex_query
start= hex_query(mesh, xyz, bound, mbnds, blks) query a mesh created by hex_mesh, returning the arrays passed to that function (these are not copies -- be careful not to clobber them) function return value is the start index Builtin function, documented at i0/hex.i line 29SEE ALSO: hex5_track, hydra_mesh
hex_startflag
old_flag= hex_startflag(new_flag) possibly set flag to NEW_FLAG, always return OLD_FLAG, where flag value is 0 (default) to begin search for new entry point at previous entry point, 1 to begin search for new entry point from mesh start face for every ray. Any other value of NEW_FLAG returns OLD_FLAG without changing it. Builtin function, documented at i0/hex.i line 596SEE ALSO: hex_mesh
hex_triang
old_flag= hex_triang(new_flag) possibly set flag to NEW_FLAG, always return OLD_FLAG, where flag value is 0 for default mesh triangulation, 1 for opposite triangulation, and 2 on input to signal not to change the current value. The triangulation value can affect the result of hex5_track if the quad faces of the mesh are not planar. Builtin function, documented at i0/hex.i line 581SEE ALSO: hex5_track
histeq_scale
histeq_scale(z, top=top_value, cmin=cmin, cmax=cmax) returns a byte-scaled version of the array Z having the property that each byte occurs with equal frequency (Z is histogram equalized). The result bytes range from 0 to TOP_VALUE, which defaults to one less than the size of the current palette (or 255 if no pli, plf, or palette command has yet been issued). If non-nil CMIN and/or CMAX is supplied, values of Z beyond these cutoffs are not included in the frequency counts. Interpreted function, defined at i0/graph.i line 1466SEE ALSO: bytscl, plf, pli
histinv
list = histinv(hist) returns a list whose histogram is HIST, hist = histogram(list), that is, hist(1) 1's followed by hist(2) 2's, followed by hist(3) 3's, and so on. The total number of elements in the returned list is sum(hist). All values in HIST must be non-negative; if sum(hist)==0, histinv returns []. The input HIST array may have any number of dimensions; the result will always be either nil or a 1D array. Interpreted function, defined at i0/std.i line 1160SEE ALSO: histogram
histogram
histogram(list) or histogram(list, weight) returns an array hist which counts the number of occurrences of each element of the input index LIST, which must consist of positive integers (1-origin index values into the result array): histogram(list)(i) = number of occurrences of i in LIST A second argument WEIGHT must have the same shape as LIST; the result will be the sum of WEIGHT: histogram(list)(i) = sum of all WEIGHT(j) where LIST(j)==i The result of the single argument call will be of type long; the result of the two argument call will be of type double (WEIGHT is promoted to that type). The input argument(s) may have any number of dimensions; the result is always 1-D. KEYWORD: top=max_list_value By default, the length of the result is max(LIST). You may specify that the result have a larger length by means of the TOP keyword. (Elements beyond max(LIST) will be 0, of course.) Builtin function, documented at i0/std.i line 1135SEE ALSO: digitize, sort, histinv
hydra_adj
hydra_adj Builtin function, documented at i0/hex.i line 630
hydra_blks
hydra_blks Builtin function, documented at i0/hex.i line 611
hydra_bnd
hydra_bnd Builtin function, documented at i0/hex.i line 616
hydra_mesh
mesh= hydra_mesh(f) or mesh= hydra_mesh(f, ublk, i0, j0, k0, face) or mesh= hydra_mesh(f, ublk, i0, j0, k0) read a 3D mesh object from the hydra PDB/Silo file F. Note that the boundary arrays are adjusted to the hex convention that cells with i=1, j=1, k=1 are missing, rather than the hydra convention that i=imax, j=jmax, k=kmax are missing. In the first form, the ray entry search will start on the first open boundary face in the mesh. If the actual problem boundary is not convex, you need to identify a surface of constant i, j, or k in the problem which is convex, and which all the rays you intend to trace intersect. UBLK is the user block number (starting from 0), I0, J0, K0 are the (1-origin) logical coordinates of a hydra *cell*. Note that unlike hex cells, the hydra cell bounded by nodes (1,1,1) and (2,2,2) is numbered (1,1,1). (Hex numbers it (2,2,2).) FACE is the face number on cell (I0,J0,K0) which you want a ray to enter. 0 means the -I face, 1 the +I face, 2 the -J face, 3 the +J face, 4 the -K face, and 5 the +K face. As you step from this cell to its neighbors, then to their neighbors, and so on, this face must trace out a convex surface for the ray entry search. Rays not intersecting this surface will not enter the problem; the ray trace will begin at this surface, not at -infinity. If FACE==-1 or is omitted (as in the third form), then the given points on the rays are assumed to lie inside the mesh, and a pseudo ray from the centroid of cell (I0, J0, K0) will be tracked to the given point on each ray; the ray will be launched into the cell containing that point. Interpreted function, defined at i0/hex.i line 638SEE ALSO: hex_query, hex5_track, h_data, h_openb
hydra_mrk
hydra_mrk Builtin function, documented at i0/hex.i line 624
hydra_start
hydra_start, mesh, start change the starting cell of the hydra MESH (returned by hydra_mesh) to START. If called as a function, returns old start value. Interpreted function, defined at i0/hex.i line 784SEE ALSO: hydra_mesh, h_data
hydra_xyz
mesh = hydra_xyz(f) or mesh = hydra_xyz(f, ublk, i0, j0, k0, face) or mesh = hydra_xyz(f, ublk, i0, j0, k0) read a 3D mesh object from the hydra PDB/Silo file F. The returned mesh is _lst(xyz, bound, mbnds, blks, start). Note that the boundary arrays are adjusted to the hex convention that cells with i=1, j=1, k=1 are missing, rather than the hydra convention that i=imax, j=jmax, k=kmax are missing. In the first form, the ray entry search will start on the first open boundary face in the mesh. If the actual problem boundary is not convex, you need to identify a surface of constant i, j, or k in the problem which is convex, and which all the rays you intend to trace intersect. UBLK is the user block number (starting from 0), I0, J0, K0 are the (1-origin) logical coordinates of a hydra *cell*. Note that unlike hex cells, the hydra cell bounded by nodes (1,1,1) and (2,2,2) is numbered (1,1,1). (Hex numbers it (2,2,2).) FACE is the face number on cell (I0,J0,K0) which you want a ray to enter. 0 means the -I face, 1 the +I face, 2 the -J face, 3 the +J face, 4 the -K face, and 5 the +K face. As you step from this cell to its neighbors, then to their neighbors, and so on, this face must trace out a convex surface for the ray entry search. Rays not intersecting this surface will not enter the problem; the ray trace will begin at this surface, not at -infinity. If FACE==-1 or is omitted (as in the third form), then the given points on the rays are assumed to lie inside the mesh, and a pseudo ray from the centroid of cell (I0, J0, K0) will be tracked to the given point on each ray; the ray will be launched into the cell containing that point. You can set a hydra_bnd_hook function before calling hydra_xyz if the boundary conditions for hex need to be different than for hydra. Interpreted function, defined at i/hydra.i line 285SEE ALSO: hydra_bnd_hook, h_data, h_openb, hydra_aux_data, hydra_mix_data