Home
Manual
Packages
Global Index
Keywords
Quick Reference
|
functions in hydra.i - 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.
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 767
|
SEE 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 1031
|
SEE 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 176
|
SEE 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 848
|
SEE 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 522
|
SEE ALSO:
|
hydra_xyz,
h_mix,
h_array,
h_show
|
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 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 911
|
SEE ALSO:
|
hydra_xyz,
h_iparm
|
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 983
|
SEE ALSO:
|
hydra_xyz,
h_data,
h_openb
|
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 971
|
SEE 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 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 872
|
SEE ALSO:
|
hydra_xyz,
h_fparm
|
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 221
|
SEE ALSO:
|
h_data,
h_openb,
h_get_times,
h_jt,
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 588
|
SEE 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 40
|
SEE ALSO:
|
h_close,
hydra_xyz,
h_data,
h_jt,
h_jr,
h_get_times
|
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 247
|
SEE ALSO:
|
h_data,
h_openb
|
h_ublk
|
ublk = h_ublk(f)
return user 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 ublk. The return value is
a 2D long array 7-by-numberof(h blocks):
ublk(1,) = user block number for this hblk
ublk(2:3,) = ublk [imin,imax] of this hblk
ublk(4:5,) = ublk [jmin,jmax] of this hblk
ublk(6:7,) = ublk [kmin,kmax] of this hblk
interpreted function, defined at i/hydra.i line 1005
|
SEE ALSO:
|
hydra_xyz,
h_data,
h_openb
|
hydra
|
hydra.i
defines several functions useful for examining and extracting
data from hydra-generated Silo/PDB dump files:
h_openb -- use instead of openb for hydra files
hydra_xyz -- extracts xyz and boundary arrays
h_data -- extracts data nodal or zonal arrays
h_array -- extracts data nodal or zonal arrays for one ublk
h_mix -- extracts zonal data for mixed zones
h_iparm -- extracts integer parameter values
h_gblk -- extracts information relating hblks to
user blocks
h_collect -- loops on h_array over all times
keyword, defined at i/hydra.i line 6
|
SEE ALSO:
|
h_openb,
hydra_xyz,
h_data,
h_array,
h_mix,
h_iparm,
h_fparm,
h_gblk
|
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 281
|
SEE ALSO:
|
hydra_bnd_hook,
h_data,
h_openb
|
|