Skip to content

Commit

Permalink
Deploying to gh-pages from @ b483c23 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren committed Apr 17, 2023
1 parent 5f758ae commit 95c9cfa
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
12 changes: 6 additions & 6 deletions docs_html/_sources/getting_started/amrex_basics.rst.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _developers-amrex-basics:

AMReX basics (excessively basic)
AMReX basics
================================

Nyx is built on the Adaptive Mesh Refinement (AMR) library `AMReX <https://github.com/AMReX-Codes/amrex>`__. This section provides a very sporadic description of the main AMReX classes and concepts relevant for Nyx.
Expand All @@ -20,12 +20,12 @@ Particles in a ``ParticleContainer`` are organized per ``Box``. Particles in a `
(this feature is off when running on GPU).
Particles within a tile are stored in several structures, each being contiguous in memory: (i) an Array-Of-Struct (AoS) (often called `data`, they are the 3D position, the particle ID and the index of the CPU owning the particle), where the Struct is an ``amrex::Particle`` and (ii) Struct-Of-Arrays (SoA) for extra variables (often called ``attribs``).

AMReX uses an ``owner computes`` rule.
The simulation domain is typically decomposed into multiple ``Box``es, and each MPI rank owns, and performs operations on,
the fields and particles defined on the ``Box``es assigned to that rank, but has the metadata of all of them.
For convenience, AMReX provides iterators, to easily iterate over all the ``FArrayBox``es (or even tile-by-tile, optionally)
The simulation domain is typically decomposed into multiple boxes, and each MPI rank owns, and performs operations on,
the fields and particles defined on the boxes assigned to that rank. However, every rank does have the full metadata, i.e
the list of all boxes and which ranks the data on those boxes is assigned to (the ``DistributionMapping``).
For convenience, AMReX provides iterators, to easily iterate over all the ``FArrayBox`` (with optional logical tiling)
in a ``MultiFab`` that are owned by that MPI rank (``MFIter``), or over all particles in a ``ParticleContainer`` on a per-box basis (``ParIter``).
These are respectively done in loops like:
These are respectively done in loops such as:

.. code-block:: cpp
Expand Down
4 changes: 2 additions & 2 deletions docs_html/getting_started/BuildingGMake.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Building Nyx with CMake" href="BuildingCMake.html" />
<link rel="prev" title="AMReX basics (excessively basic)" href="amrex_basics.html" />
<link rel="prev" title="AMReX basics" href="amrex_basics.html" />
</head>

<body class="wy-body-for-nav">
Expand Down Expand Up @@ -187,7 +187,7 @@ <h1>Building Nyx with GNU Make<a class="headerlink" href="#building-nyx-with-gnu
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="amrex_basics.html" class="btn btn-neutral float-left" title="AMReX basics (excessively basic)" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="amrex_basics.html" class="btn btn-neutral float-left" title="AMReX basics" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="BuildingCMake.html" class="btn btn-neutral float-right" title="Building Nyx with CMake" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

Expand Down
4 changes: 2 additions & 2 deletions docs_html/getting_started/Structure.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="AMReX basics (excessively basic)" href="amrex_basics.html" />
<link rel="next" title="AMReX basics" href="amrex_basics.html" />
<link rel="prev" title="Getting Started" href="../NyxGettingStarted.html" />
</head>

Expand Down Expand Up @@ -136,7 +136,7 @@
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../NyxGettingStarted.html" class="btn btn-neutral float-left" title="Getting Started" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="amrex_basics.html" class="btn btn-neutral float-right" title="AMReX basics (excessively basic)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="amrex_basics.html" class="btn btn-neutral float-right" title="AMReX basics" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>
Expand Down
20 changes: 10 additions & 10 deletions docs_html/getting_started/amrex_basics.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AMReX basics (excessively basic) &mdash; Nyx documentation</title><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<title>AMReX basics &mdash; Nyx documentation</title><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/graphviz.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down Expand Up @@ -89,7 +89,7 @@
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../NyxGettingStarted.html">Getting Started</a></li>
<li class="breadcrumb-item active">AMReX basics (excessively basic)</li>
<li class="breadcrumb-item active">AMReX basics</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/getting_started/amrex_basics.rst.txt" rel="nofollow"> View page source</a>
</li>
Expand All @@ -99,8 +99,8 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<div class="section" id="amrex-basics-excessively-basic">
<span id="developers-amrex-basics"></span><h1>AMReX basics (excessively basic)<a class="headerlink" href="#amrex-basics-excessively-basic" title="Permalink to this headline"></a></h1>
<div class="section" id="amrex-basics">
<span id="developers-amrex-basics"></span><h1>AMReX basics<a class="headerlink" href="#amrex-basics" title="Permalink to this headline"></a></h1>
<p>Nyx is built on the Adaptive Mesh Refinement (AMR) library <a class="reference external" href="https://github.com/AMReX-Codes/amrex">AMReX</a>. This section provides a very sporadic description of the main AMReX classes and concepts relevant for Nyx.
For more details, please visit
the AMReX basics <a class="reference external" href="https://amrex-codes.github.io/amrex/docs_html/Basics.html">doc page</a>, and the rest of the AMReX documentation.</p>
Expand All @@ -114,12 +114,12 @@
<p>Particles in a <code class="docutils literal notranslate"><span class="pre">ParticleContainer</span></code> are organized per <code class="docutils literal notranslate"><span class="pre">Box</span></code>. Particles in a <code class="docutils literal notranslate"><span class="pre">Box</span></code> are organized per tile
(this feature is off when running on GPU).
Particles within a tile are stored in several structures, each being contiguous in memory: (i) an Array-Of-Struct (AoS) (often called <cite>data</cite>, they are the 3D position, the particle ID and the index of the CPU owning the particle), where the Struct is an <code class="docutils literal notranslate"><span class="pre">amrex::Particle</span></code> and (ii) Struct-Of-Arrays (SoA) for extra variables (often called <code class="docutils literal notranslate"><span class="pre">attribs</span></code>).</p>
<p>AMReX uses an <code class="docutils literal notranslate"><span class="pre">owner</span> <span class="pre">computes</span></code> rule.
The simulation domain is typically decomposed into multiple <code class="docutils literal notranslate"><span class="pre">Box``es,</span> <span class="pre">and</span> <span class="pre">each</span> <span class="pre">MPI</span> <span class="pre">rank</span> <span class="pre">owns,</span> <span class="pre">and</span> <span class="pre">performs</span> <span class="pre">operations</span> <span class="pre">on,</span>
<span class="pre">the</span> <span class="pre">fields</span> <span class="pre">and</span> <span class="pre">particles</span> <span class="pre">defined</span> <span class="pre">on</span> <span class="pre">the</span> <span class="pre">``Box``es</span> <span class="pre">assigned</span> <span class="pre">to</span> <span class="pre">that</span> <span class="pre">rank,</span> <span class="pre">but</span> <span class="pre">has</span> <span class="pre">the</span> <span class="pre">metadata</span> <span class="pre">of</span> <span class="pre">all</span> <span class="pre">of</span> <span class="pre">them.</span>
<span class="pre">For</span> <span class="pre">convenience,</span> <span class="pre">AMReX</span> <span class="pre">provides</span> <span class="pre">iterators,</span> <span class="pre">to</span> <span class="pre">easily</span> <span class="pre">iterate</span> <span class="pre">over</span> <span class="pre">all</span> <span class="pre">the</span> <span class="pre">``FArrayBox``es</span> <span class="pre">(or</span> <span class="pre">even</span> <span class="pre">tile-by-tile,</span> <span class="pre">optionally)</span>
<span class="pre">in</span> <span class="pre">a</span> <span class="pre">``MultiFab</span></code> that are owned by that MPI rank (<code class="docutils literal notranslate"><span class="pre">MFIter</span></code>), or over all particles in a <code class="docutils literal notranslate"><span class="pre">ParticleContainer</span></code> on a per-box basis (<code class="docutils literal notranslate"><span class="pre">ParIter</span></code>).
These are respectively done in loops like:</p>
<p>The simulation domain is typically decomposed into multiple boxes, and each MPI rank owns, and performs operations on,
the fields and particles defined on the boxes assigned to that rank. However, every rank does have the full metadata, i.e
the list of all boxes and which ranks the data on those boxes is assigned to (the <code class="docutils literal notranslate"><span class="pre">DistributionMapping</span></code>).
For convenience, AMReX provides iterators, to easily iterate over all the <code class="docutils literal notranslate"><span class="pre">FArrayBox</span></code> (with optional logical tiling)
in a <code class="docutils literal notranslate"><span class="pre">MultiFab</span></code> that are owned by that MPI rank (<code class="docutils literal notranslate"><span class="pre">MFIter</span></code>), or over all particles in a <code class="docutils literal notranslate"><span class="pre">ParticleContainer</span></code> on a per-box basis (<code class="docutils literal notranslate"><span class="pre">ParIter</span></code>).
These are respectively done in loops such as:</p>
<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="c1">// mf is a MultiFab</span>
<span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">amrex</span><span class="o">::</span><span class="n">MFIter</span><span class="w"> </span><span class="n">mfi</span><span class="p">(</span><span class="n">mf</span><span class="p">,</span><span class="w"> </span><span class="n">TilingIfNotGpu</span><span class="p">());</span><span class="w"> </span><span class="n">mfi</span><span class="p">.</span><span class="n">isValid</span><span class="p">();</span><span class="w"> </span><span class="o">++</span><span class="n">mfi</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="p">}</span>
</pre></div>
Expand Down
Binary file modified docs_html/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs_html/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 95c9cfa

Please sign in to comment.