Home
Manual
Packages
Global Index
Keywords
Quick Reference
|
functions in hex.i - h
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 38
|
SEE 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 10
|
SEE 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 585
|
SEE 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 27
|
SEE 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 489
|
SEE 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 474
|
SEE ALSO:
|
hex5_track
|
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 531
|
SEE ALSO:
|
hex_query,
hex5_track,
hydra_data,
openh
|
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 677
|
SEE ALSO:
|
hydra_mesh,
hydra_data
|
|