aboutsummaryrefslogtreecommitdiff
path: root/doc/html/AMRucdReader.html
blob: 6bad5289ce61ecfc1138e6b306f3cff2364949d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
  <head>
    <title>AMR-UCD Reader</title>
  </head>

  <body bgcolor="#F0F0F0">
    <h1>AMR-UCD Reader</h1>

    Most visualization systems have no provisions for handling AMR
    data.  One solution is to resample all of the grids into a single
    uniform sized grid.  However for even a 7 level hierarchy, the
    unigrid becomes far too large to be manageable and still retain
    the fidelity of the original data.  A second solution is use
    unigrid visualization algorithms on each grid in the hierarchy and 
    then superimpose them on one-another.  In this case geometries
    from the coarser resolution datasets occlude the finer-resolution
    geometry. An alternative solution is to convert the data into
    hexahedral cells with the overlaps between parent levels and the
    children are eliminated.  This provides multi-resolution fidelity which
    matches the nature of the original data but allows it to be
    visualized using standard off-the-shelf visualizaton tools.<p>
      
      The <code>AmrUcdFileReader</code> inherits directly from the
      <code><a href="AMRfileReader.html">AmrFileReader</a></code> and
      all methods from its base class are public.  They will be
      listed again here for convenience.  The only method (aside from
      the constructor/destructor) that is contributed by this class is 
      the <a name="#GETUCD">getUcd()</a> method.<p>
      
       <hr>
       <font face="arial,helvetica" color="#555588"><h2>The API</h2></font>
    <UL>
      <LI><a href="#CPP">C++ Interface</a>
      <LI><a href="#C">C Interface</a>
      <LI><a href="#F77">F77/F90 Interface</a>
    </UL>
    <hr>
    <u><h3><a name="CPP">C++ Interface</a></h3></u>
    <DL>
      <DT><font color="#888888"><b>Constructors/Destructors</b></font>
    <DL>
      <DT><b>AmrUcdFileReader::AmrUcdFileReader(IObase
	  &filehandle)</b> <i>constructor</i>
      <DD>The <i>filehandle</i> is an already
	<a href="UsingC++.html#Opening">open IEEEIO or HDFIO
	  file</a>.  This initializes the reader and attaches it to that
	datafile.
      <DT><b>AmrUcdFileReader::~AmrUcdFileReader()</b> <i>destructor</i>
      <DD>This flushes all of the necessary file buffers.
	The filehandle that the reader was bound to must be
	closed separately though.
    </DL>
    <DT><font color="#888888"><b>Queries about File Contents</b></font>
    <DL>
      <DT><b>int AmrUcdFileReader::nLevels()</b>
      <DD>Returns the number of levels in the AMR hierarchy.  This is
	the deepest the hierarchy gets in this particular datafile as
	opposed to the number of levels present at this time in the
	evolution (this distinction is important for adaptive depth
	schemes where the number of levels will change depending on
	the demands of the solver).
      <DT><b>AmrUcdFileReader::getTimeRange(int &mintime,int &maxtime)</b>
      <DD>Gets the range of integer timesteps stored in the file.
	The nonzero mintime exists to support schemes where the
	evolution is broken up among several files.
    </DL>
    <DT><font color="#888888"><b>Filters</b></font>
      <DT>The <i><b>filter</b></i> methods listed below select grids based on 
	the criteria of time and level number.  Grids selected by the
	filter are referred to as <i><b>active grids</b></i>.<p>
    <DL>
      <DT><b>AmrUcdFileReader::setTime(int time)</b>
      <DD>Sets the current timestep to select the data hierarchy for.
	The timestep is defined with respect to the rate at which
	grids change at the deepest level of the AMR hierarchy stored
	in the file.  Selecting a particular timestep selects a
	snapshot of the hieararchy at a particular time in the
	evolution.
	<DT><b>AmrUcdFileReader::hideLevel(int level)</b>
	<DD>By default all levels are visible and are read in when the 
	<code>getGrids()</code> method is called.  You can hide
	individual levels using this method.  This is useful when
	loading the entire hierarchy is either too confusing, too slow, or too
	large for the workstation to handle.
	<DT><b>AmrUcdFileReader::showLevel(int level)</b>
	<DD>Shows a level that has otherwise been hidden.
	<DT><b>AmrUcdFileReader::showAllLevels()</b>
	<DD>A convenience method for making all of the levels visible.
    </DL>
     <DT><font color="#888888"><b>Getting the UCD Data</b></font>
      <DL>	
      <DT><b>int AmrUcdFileReader::getUcd(FlexArray&ltAmrNode*&gt
	  &nodes, FlexArray&ltint&gt &cells)</b>
      <DD>Gets all currently active grids and converts them into a
	finite element form composed of hexahedral cells.  The node
	list contains the coordinates of the vertices of the cells and 
	the cell list contains the connectivity of the hexahedral
	cells (indexed into the nodes list where the first element is
	an index of <i>0</i> and the last is <i>NumNodes-1</i>).
    </DL>
    <DT><font color="#888888"><b>Utility and Debugging Methods</b></font>
      <DT><DL>
      <DT><b>AmrUcdFileReader::setDataLoadingOff()</b>   
      <DD>This causes the <code>getGrids()</code> methods
	to read in the informational part of 
	the AmrGrid datastructures, but not load any data.  This is
	useful for just aquiring bounding box information or
	estimating the memory/computational requirements for loading
	the entire hierarchy.
      <DT><b>AmrUcdFileReader::setDataLoadingOn()</b>   
      <DD>This causes the <code>getGrids()</code> methods
	to read both the informational and data part of 
	the AmrGrid datastructures.  This is the default state for
	this API.
      <DT><b>printGridInfo()</b>
      <DD>Prints information about all grids in file to STDERR.  Used
	only for debugging.
      <DT><b>printActiveGrids()</b>
      <DD>Prints information about all <b>active</b> grids to STDERR.
	Used only for debugging.
	<DT><b>int debug</b>
	This is a public variable that can be set to a nonzero value
	in order to print additional debugging information for each
	method call.  This printing is turned off when it is set to zero.
    </DL>
  </DL>
    <hr>
    <h3><u><a name="C">C Interface</a></u></h3>
    Not ready yet.
    <hr>
    <h3><u><a name="F77">F77/F90 Interface</a></u></h3>
    Not ready yet.
      
    <hr>
    <address><a href="mailto:jshalf@ariel.ncsa.uiuc.edu"></a></address>
<!-- Created: Thu Feb  4 20:37:32 CST 1999 -->
<!-- hhmts start -->
Last modified: Thu Feb  4 21:31:06 CST 1999
<!-- hhmts end -->
  </body>
</html>