-
Notifications
You must be signed in to change notification settings - Fork 7
/
clawpack5.html
384 lines (371 loc) · 20.7 KB
/
clawpack5.html
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Changes in Clawpack 5.0 — Clawpack 5.11.x documentation</title>
<link rel="stylesheet" href="_static/base.css" type="text/css" />
<link rel="stylesheet" href="_static/layout.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/flasky.css" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="shortcut icon" href="_static/clawicon.ico"/>
<link rel="author" title="About these documents" href="about.html" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head><body>
<div id="main-wrapper" class="sphinx">
<div id="header-wrapper">
<section id="header">
<!-- <h1><a href="http://clawpack.org/">Clawpack</a></h1> -->
<h1><a href="http://clawpack.org/">Clawpack-5</a></h1>
<nav>
<ul>
<li>
<a href="contents.html">Docs</a>
</li>
<li>
<a href="installing.html">Install</a>
</li>
<li>
<a class="" href="http://clawpack.org/gallery/index.html">Gallery</a>
</li>
<li>
<a href="about.html">Citation</a>
</li>
<li>
<a class="active" href="http://github.com/clawpack">GitHub</a>
</li>
<li>
<a class="" href="community.html">Community</a>
</li>
<li>
<a class="" href="developers.html">Contribute</a>
</li>
</ul>
</nav>
</section>
<div class="decoration"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="contents.html">Clawpack 5.11.x documentation</a> »</li>
<li class="nav-item nav-item-this"><a href="">Changes in Clawpack 5.0</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="changes-in-clawpack-5-0">
<span id="clawpack5"></span><h1>Changes in Clawpack 5.0<a class="headerlink" href="#changes-in-clawpack-5-0" title="Permalink to this heading">¶</a></h1>
<p>Clawpack 5.0 is a major reorganization of the Clawpack code base that has
been going on for several years.</p>
<section id="pyclaw-in-5-0">
<h2>PyClaw in 5.0<a class="headerlink" href="#pyclaw-in-5-0" title="Permalink to this heading">¶</a></h2>
<p>The extensive PyClaw code base is now incorporated into Clawpack. See
<a class="reference internal" href="packages.html#clawpack-packages"><span class="std std-ref">Which Clawpack solver should I use?</span></a> for more about how PyClaw relates to the other
<a class="reference internal" href="clawpack_components.html#clawpack-components"><span class="std std-ref">Clawpack components</span></a>. For recent changes in PyClaw, see the
<a class="reference external" href="https://github.com/clawpack/pyclaw/blob/master/CHANGES.md">PyClaw changelog</a>.</p>
</section>
<section id="fortran-package-changes">
<h2>Fortran package changes<a class="headerlink" href="#fortran-package-changes" title="Permalink to this heading">¶</a></h2>
<p>The rest of this page concerns the Fortran components of Clawpack.</p>
<p>There is no complete list of changes since it has evolved to be very
different from the 4.x version of Clawpack in organization, but some of
major changes that affect users are listed below.</p>
<p>Some tools are available to assist users in converting code from earlier
versions. To go from Clawpack 4.6 to 5.0, see
<a class="reference internal" href="claw46to50.html#claw46to50"><span class="std std-ref">Converting from Clawpack 4.6 to 5.0</span></a>. Some older Clawpack 4.3 code can be first converted
to 4.6 form using <a class="reference internal" href="claw43to46.html#claw43to46"><span class="std std-ref">Converting from Clawpack 4.3 to 4.6</span></a>.</p>
<p>If you wish to view recent changes on GitHub,
note that Clawpack is an <em>organization</em>, meaning that it is
comprised of several repositories. Go to the
<a class="reference external" href="https://github.com/clawpack">Clawpack GitHub</a>
webpage to view all the repositories. Major changes that are specific
to PyClaw since its initial release in 2012 are listed in the
<a class="reference external" href="https://github.com/clawpack/pyclaw/blob/master/CHANGES.md">PyClaw changelog</a>.</p>
<p>You might also view the
<a class="reference external" href="https://github.com/orgs/clawpack/dashboard/issues">issues</a>
associated with each Clawpack repository on
GitHub to see what bugs and features we are working on.</p>
<p><strong>Some of the major changes:</strong></p>
<ul>
<li><p>In all of the Clawpack codes, indices of the primary arrays <cite>q</cite> (for
the solution) and <cite>aux</cite> (for auxiliary variables) have been reordered for
better cache performance and to interface better with the PETSc code (used
in as an option in PyClaw). For example, in the two-dimensional Clawpack
4.x code, <cite>q(i,j,m)</cite> denoted the m’th component of the solution vector in
the <cite>(i,j)</cite> grid cell. With this convention the various components of the
solution in a single grid cell are scattered in memory with a stride of
<cite>mx*my</cite>.
In Clawpack 5.0, the indexing for the same value is <cite>q(m,i,j)</cite> so that
the components of <cite>q</cite> in a single grid cell are continguous in memory.</p>
<p>Note that this means user routines such as <cite>qinit.f</cite>, <cite>setaux.f</cite>,
and Riemann solvers must be modified.</p>
</li>
<li><p>The calling sequence of Riemann solvers has been modified by adding
<cite>maux</cite> (the number of auxiliary variables) as another parameter.
This is required because of the reordering of indices so that
<cite>aux(ma,i,j)</cite> is now the <cite>ma</cite> element of the <cite>aux</cite> vector in the <cite>(i,j)</cite>
cell. The leading dimension of <cite>aux</cite> is assumed to be <cite>maux</cite> and is
required in declaring this variable.</p></li>
<li><p>Calling sequences of many subroutines have changed, so users converting
code from Clawpack 4.x should carefully compare the calling sequences in
any custom Fortran code to those in relevant examples, or to the default
versions in the libraries.</p></li>
<li><p>Many Riemann solvers for different applications are now found in the
<a class="reference external" href="https://github.com/clawpack/riemann">riemann repository</a>.
In the future major changes may be made to the form of the Riemann solvers
to allow more flexibility.</p></li>
<li><p>The names of many input variables in <cite>setrun.py</cite> have been changed to
clean things up and be more systematic. Several options that used to be
specified by obscure means have been clarified, and some new options have been
added. For details and documentation on the new parameters, see:</p>
<blockquote>
<div><ul class="simple">
<li><p><a class="reference internal" href="#setrun-changes"><span class="std std-ref">Changes to input parameters in setrun.py from 4.x to 5.0</span></a></p></li>
<li><p><a class="reference internal" href="setrun.html#setrun"><span class="std std-ref">Specifying classic run-time parameters in setrun.py</span></a></p></li>
<li><p><a class="reference internal" href="setrun_amrclaw.html#setrun-amrclaw"><span class="std std-ref">Specifying AMRClaw run-time parameters in setrun.py</span></a></p></li>
<li><p><a class="reference internal" href="setrun_geoclaw.html#setrun-geoclaw"><span class="std std-ref">Specifying GeoClaw parameters in setrun.py</span></a></p></li>
</ul>
</div></blockquote>
</li>
<li><p>The directory structure has been reorganized. See
<a class="reference internal" href="clawpack_components.html#clawpack-components"><span class="std std-ref">Clawpack components</span></a>.</p></li>
<li><p>Some regression tests have been added to the <cite>classic</cite>, <cite>amrclaw</cite>,
and <cite>geoclaw</cite> directories in subdirectories named <cite>tests</cite>.
<a class="reference external" href="https://travis-ci.org/">Travis</a> is now used for continuous integration
testing during development.</p></li>
<li><p>The 3d single-grid and AMRClaw code, missing since Version 4.3,
has been updated to conform with 1d and 2d style. In particular,
the inputs can now be specified using <cite>setrun.py</cite>.</p></li>
<li><p>Three-dimensional plotting routines in Python are still under
construction, so currently there is no capability to use <cite>setplot.py</cite>
to specify the desired plots or <cite>make plots</cite> to produce them. However,
the Matlab plotting routines have been updated and are now found in
Visclaw. See <a class="reference internal" href="matlab_plotting.html#matlabplots"><span class="std std-ref">Plotting using Matlab</span></a>. It is also possible to render 3d
plots using the VisIt GUI, see <a class="reference internal" href="visit_plotting.html#visit-plotting"><span class="std std-ref">Plotting with VisIt</span></a>.</p></li>
<li><p>The classic single-grid Clawpack code (without AMR) is now in the
<cite>classic</cite> directory and the <a class="reference external" href="https://github.com/clawpack/classic">classic repository</a> on GitHub. Some new
capabilities have been added, e.g.:</p>
<ul class="simple">
<li><p>OpenMP parallelization has been added to the 3d codes.
See <a class="reference internal" href="openmp.html#openmp"><span class="std std-ref">Using OpenMP</span></a>.</p></li>
</ul>
</li>
<li><p>The AMRClaw code is now in the
<a class="reference external" href="https://github.com/clawpack/amrclaw">amrclaw repository</a>.
Some new capabilities have been added, e.g.:</p>
<ul class="simple">
<li><p>It is now possible to specify refinement <em>regions</em>, previously only
supported in GeoClaw. For a description, see <a class="reference internal" href="refinement.html#refinement-regions"><span class="std std-ref">Specifying AMR regions</span></a>.</p></li>
</ul>
</li>
<li><p>The GeoClaw code is now in the
<a class="reference external" href="https://github.com/clawpack/geoclaw">geoclaw repository</a>.
Some new capabilities have been added, e.g.:</p>
<ul class="simple">
<li><p>There is an improved set of tools for monitoring the maximum depth or
surface elevation seen over a fixed grid, and the first arrival times.
See <a class="reference internal" href="fgmax.html#fgmax"><span class="std std-ref">Fixed grid monitoring (fgmax)</span></a>.</p></li>
</ul>
</li>
</ul>
</section>
<section id="changes-to-input-parameters-in-setrun-py-from-4-x-to-5-0">
<span id="setrun-changes"></span><h2>Changes to input parameters in setrun.py from 4.x to 5.0<a class="headerlink" href="#changes-to-input-parameters-in-setrun-py-from-4-x-to-5-0" title="Permalink to this heading">¶</a></h2>
<section id="changes-to-general-parameters">
<h3>Changes to general parameters<a class="headerlink" href="#changes-to-general-parameters" title="Permalink to this heading">¶</a></h3>
<ul>
<li><p>Many names have been changed, e.g.</p>
<ul class="simple">
<li><p><cite>ndim</cite> to <cite>num_dim</cite></p></li>
<li><p><cite>xlower</cite>, <cite>ylower</cite>, <cite>zlower</cite> are now <cite>lower[0], lower[1], lower[2]</cite>.</p></li>
<li><p><cite>xupper</cite>, <cite>yupper</cite>, <cite>zupper</cite> are now <cite>upper[0], upper[1], upper[2]</cite>.</p></li>
<li><p><cite>mx, my, mz</cite> are now <cite>num_cells[0:3]</cite>.</p></li>
</ul>
<p>There are many other such changes. It is best to take a look at the
<cite>setrun.py</cite> for an example in <cite>$CLAW/classic/examples</cite>.</p>
</li>
</ul>
<p>See also:</p>
<blockquote>
<div><ul class="simple">
<li><p><a class="reference internal" href="setrun.html#setrun"><span class="std std-ref">Specifying classic run-time parameters in setrun.py</span></a></p></li>
<li><p><a class="reference internal" href="claw46to50.html#claw46to50"><span class="std std-ref">Converting from Clawpack 4.6 to 5.0</span></a></p></li>
</ul>
</div></blockquote>
</section>
<section id="changes-to-amr-parameters">
<h3>Changes to AMR parameters<a class="headerlink" href="#changes-to-amr-parameters" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p>The <cite>rundata</cite> object generally defined in <cite>setrun.py</cite> now has an
attribute <cite>rundata.amrdata</cite> and AMR parameters are attributes of this
object. Most names of attributes have changed from those used in 4.x.</p></li>
<li><p>Setting <cite>mxnest</cite> negative to indicate that anisotropic refinement
in different directions might be used has been eliminated.
Now this is always assumed and one must always specify
refinement ratios in each direction and in time.</p></li>
<li><p>New attributes have been added to indicate whether Richardson
extrapolation and/or the routine ins <cite>flag2refine</cite> should be used
to flag cells for refinement. See <a class="reference internal" href="refinement.html#refinement"><span class="std std-ref">AMR refinement criteria</span></a>.</p></li>
<li><p>The capability of using “regions” to specify areas where refinement is
forced or prohibited has been extended from GeoClaw to AMRClaw.
See <a class="reference internal" href="refinement.html#refinement-regions"><span class="std std-ref">Specifying AMR regions</span></a>.</p></li>
</ul>
<p>See also:</p>
<blockquote>
<div><ul class="simple">
<li><p><a class="reference internal" href="setrun_amrclaw.html#setrun-amrclaw"><span class="std std-ref">Specifying AMRClaw run-time parameters in setrun.py</span></a></p></li>
<li><p><a class="reference internal" href="claw46to50.html#claw46to50"><span class="std std-ref">Converting from Clawpack 4.6 to 5.0</span></a></p></li>
</ul>
</div></blockquote>
</section>
<section id="changes-to-geoclaw-parameters">
<h3>Changes to GeoClaw parameters<a class="headerlink" href="#changes-to-geoclaw-parameters" title="Permalink to this heading">¶</a></h3>
<p>A number of changes have been made to parameter names and also functionality
in some cases.</p>
<p>See also:</p>
<blockquote>
<div><ul class="simple">
<li><p><a class="reference internal" href="setrun_geoclaw.html#setrun-geoclaw"><span class="std std-ref">Specifying GeoClaw parameters in setrun.py</span></a></p></li>
<li><p><a class="reference internal" href="claw46to50.html#claw46to50"><span class="std std-ref">Converting from Clawpack 4.6 to 5.0</span></a></p></li>
</ul>
</div></blockquote>
</section>
</section>
<section id="changes-to-plotting-routines">
<h2>Changes to plotting routines<a class="headerlink" href="#changes-to-plotting-routines" title="Permalink to this heading">¶</a></h2>
<p>The plotting routines are now in Visclaw, see <a class="reference internal" href="plotting.html#plotting"><span class="std std-ref">Plotting with Visclaw</span></a>.</p>
<p>The Matlab tools from version 4.x have been updated a bit and many examples
once again include <cite>.m</cite> files for users who wish to plot using Matlab.</p>
<p>The Python routines have also been updated. For the most part older
versions of <cite>setplot.py</cite> should still work, with a few exceptions:</p>
<blockquote>
<div><ul>
<li><p>In AMR the individual grids are now called “patches” rather than “grids”.
This caused a few changes in attribute names in <a class="reference internal" href="ClawPlotItem.html#clawplotitem"><span class="std std-ref">ClawPlotItem</span></a>:</p>
<blockquote>
<div><ul class="simple">
<li><p>The old <cite>plot_type</cite> named <cite>2d_grid</cite> has been renamed <cite>2d_patch</cite></p></li>
<li><p>The old attirbute <cite>gridlines_show</cite> has been renamed <cite>celledges_show</cite></p></li>
<li><p>The old attirbute <cite>grideges_show</cite> has been renamed <cite>patchedges_show</cite></p></li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
<p>To use the interactive plotting tool <cite>Iplotclaw</cite>, you now need to import
this via:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">clawpack.visclaw.Iplotclaw</span> <span class="kn">import</span> <span class="n">Iplotclaw</span>
</pre></div>
</div>
<p>See <a class="reference internal" href="plotting_python.html#plotting-python"><span class="std std-ref">Plotting options in Python</span></a> for more information.</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p><a href="http://clawpack.org/">
<img class="logo" src= "_static/clawlogo.jpg" alt="Logo"/>
</a>
<h2>Version 5.11.x</h2>
</p>
<div>
<h3><a href="contents.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Changes in Clawpack 5.0</a><ul>
<li><a class="reference internal" href="#pyclaw-in-5-0">PyClaw in 5.0</a></li>
<li><a class="reference internal" href="#fortran-package-changes">Fortran package changes</a></li>
<li><a class="reference internal" href="#changes-to-input-parameters-in-setrun-py-from-4-x-to-5-0">Changes to input parameters in setrun.py from 4.x to 5.0</a><ul>
<li><a class="reference internal" href="#changes-to-general-parameters">Changes to general parameters</a></li>
<li><a class="reference internal" href="#changes-to-amr-parameters">Changes to AMR parameters</a></li>
<li><a class="reference internal" href="#changes-to-geoclaw-parameters">Changes to GeoClaw parameters</a></li>
</ul>
</li>
<li><a class="reference internal" href="#changes-to-plotting-routines">Changes to plotting routines</a></li>
</ul>
</li>
</ul>
</div><h3>Related Topics</h3>
<ul>
<li><a href="contents.html">Documentation overview</a><ul>
</ul></li>
</ul>
<div class="widget navlinks">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/clawpack5.rst.txt"
rel="nofollow"
target="_blank">Source .rst</a></li>
<li><a href="https://github.com/clawpack/doc/blob/dev/doc/clawpack5.rst"
rel="nofollow"
target="_blank">Source on GitHub</a></li>
<li><a href="https://github.com/clawpack/doc/commits/dev/doc/clawpack5.rst"
rel="nofollow"
target="_blank">History</a></li>
<li><a href="https://github.com/clawpack/doc/edit/dev/doc/clawpack5.rst"
rel="nofollow"
target="_blank">Suggest Edits</a></li>
<li><a href="https://github.com/clawpack/doc/issues/new/choose"
rel="nofollow"
target="_blank">Raise an Issue</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<h4>Latest Version</h4>
<ul>
<li><a href="./dev/clawpack5.html">dev</a></li>
<li><a href="clawpack5.html">v5.11.x</a></li>
</ul>
<h4>Older Versions</h4>
<ul>
<li><a href="./v5.10.x/clawpack5.html">v5.10.x</a></li>
<li><a href="./v5.7.x/clawpack5.html">v5.7.x</a></li>
<li><a href="./v5.8.x/clawpack5.html">v5.8.x</a></li>
<li><a href="./v5.9.x/clawpack5.html">v5.9.x</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
© Copyright CC-BY 2024, The Clawpack Development Team.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44811544-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>