Google

section h of routines in hydra.i

yorick banner

Home

Manual

Packages

Global Index

Keywords

Quick Reference

functions in hydra.i - h

 
 
 
hydra


             hydra.i  
 
   defines several functions useful for examining and extracting  
   data from hydra-generated Silo/PDB dump files:  
   openh       -- use instead of openb for hydra files  
   hydra_xyz   -- extracts xyz and boundary arrays  
   hydra_data  -- extracts data nodal or zonal arrays  
   hydra_mix   -- extracts zonal data for mixed zones  
   hydra_iparm -- extracts integer parameter values  
   hydra_gblk  -- extracts information relating hblks to  
                  user blocks  
   The function hydra_old sets the variable naming as it was for  
   dump files generated with codes built before about December 1998.  
   You may also set _hy_auto_enable to autodetect file version.  

keyword,  defined at i/hydra.i   line 6  
SEE ALSO: openh,   hydra_xyz,   hydra_data,   hydra_mix,  
hydra_iparm,   hydra_gblk,   hydra_old  
 
 
 
hydra_array


             name_array = hydra_array(f, ublk, name)  

          or pname_arrays = hydra_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 868  
SEE ALSO: hydra_xyz,   hydra_mix  
 
 
 
hydra_blocks


             gnblk= hydra_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 690  
SEE ALSO: hydra_xyz,   hydra_iparm  
 
 
 
hydra_data


             name_array = hydra_data(f, name)  
          or pname_arrays = hydra_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 348  
SEE ALSO: hydra_xyz,   hydra_mix,   hydra_array  
 
 
 
hydra_fparm


             value= hydra_fparm(f, name)  
          or names= hydra_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 hydra_fparm(f,1:0) returns all parameters.  

interpreted function, defined at i/hydra.i   line 650  
SEE ALSO: hydra_xyz,   hydra_iparm  
 
 
 
hydra_gblk


             gblk= hydra_gblk(f)  
 
     return global block information from the hydra PDB/Silo file F.  
     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 781  
SEE ALSO: hydra_xyz,   hydra_data,   openh  
 
 
 
hydra_iparm


             value= hydra_iparm(f, name)  
          or names= hydra_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 hydra_iparm(f,1:0) returns all parameters.  

interpreted function, defined at i/hydra.i   line 610  
SEE ALSO: hydra_xyz,   hydra_fparm  
 
 
 
hydra_mix


             mixdat = hydra_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 = hydra_mix(f, mixdat, name)  

          or pmix_array = hydra_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 hydra_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 hydra_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 = hydra_data(f,"den");  
       tmat = hydra_data(f,"tmat");  
       mixdat = hydra_mix(f, matlist);  
       local mixcell, mixhist;  
       eq_nocopy, mixcell, *mixdat(2);  
       eq_nocopy, mixhist, *mixdat(4);  
       denx = hydra_mix(f, mixdat, "den");  
       tmatx = hydra_mix(f, mixdat, "tmat");  
       vf = hydra_mix(f, mixdat, "vf");  
       tavg = tmat;  
       tavg(mixcell) = histogram(mixhist, tmatx*denx*vf)/den(mixcell);  

interpreted function, defined at i/hydra.i   line 423  
SEE ALSO: hydra_xyz,   hydra_data  
 
 
 
hydra_old


             hydra_old, 1  
             hydra_old, 0  
 
     use old (1) or new (0) hydra dump file variable names.  

interpreted function, defined at i/hydra.i   line 27  
SEE ALSO: hydra  
 
 
 
hydra_rootfile


 hydra_rootfile  
 
  

interpreted function, defined at i/hydra.i   line 825  
 
 
 
hydra_ublk


             ublk= hydra_ublk(f)  
 
     return user block information from the hydra PDB/Silo file F.  
     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 741  
SEE ALSO: hydra_xyz,   hydra_data,   openh  
 
 
 
hydra_varname


 hydra_varname  
 
  

interpreted function, defined at i/hydra.i   line 409  
 
 
 
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 104  
SEE ALSO: hydra_bnd_hook,   hydra_data,   openh  
 
 
 
hydrap_getblk


 hydrap_getblk  
 
  

interpreted function, defined at i/hydra.i   line 853  
 
 
 
hydrap_root


 hydrap_root  
 
  

interpreted function, defined at i/hydra.i   line 830