Skip to content

Commit

Permalink
preparing release
Browse files Browse the repository at this point in the history
  • Loading branch information
fnrizzi committed Jun 15, 2022
1 parent c9dc6b4 commit 4306389
Show file tree
Hide file tree
Showing 58 changed files with 737 additions and 162 deletions.
Binary file added docs/.doctrees/burgers_2d_dirichlet.doctree
Binary file not shown.
Binary file added docs/.doctrees/burgers_2d_periodic.doctree
Binary file not shown.
Binary file modified docs/.doctrees/diffusion_reaction_1d.doctree
Binary file not shown.
Binary file modified docs/.doctrees/diffusion_reaction_2d.doctree
Binary file not shown.
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/euler_2d_normal_shock.doctree
Binary file not shown.
Binary file modified docs/.doctrees/problems_2d.doctree
Binary file not shown.
Binary file modified docs/.doctrees/swe_2d.doctree
Binary file not shown.
117 changes: 117 additions & 0 deletions docs/_sources/burgers_2d_dirichlet.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
2D Burgers (Dirichlet BCs)
==========================

This problem solves the 2D nonlinear viscous Burgers equations

.. math::
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y} &= D \left( \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} \right)
\frac{\partial v}{\partial t} + u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y} &= D \left( \frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2} \right)
* Domain is :math:`[-1,1]^2` with homogeneous Dirichlet BC

* Initial conditions are: :math:`u = v = \alpha \exp( - \frac{(x-x_0)^2+(y-y_0)^2}{\delta} )`

* Default settings: :math:`\alpha = 0.5`, :math:`\delta = 0.15`, :math:`x_0=0, y_0=-0.2`, :math:`D = 0.00001`

Mesh
----

.. code-block:: shell
python3 pressio-demoapps/meshing_scripts/create_full_mesh_for.py \
--problem burgers2d_dirichlet_s<stencilSize> -n Nx Ny --outDir <destination-path>
where

- ``Nx, Ny`` is the number of cells you want along :math:`x` and :math:`y` respectively

- ``<stencilSize> = 3 or 5 or 7``: defines the neighboring connectivity of each cell

- ``<destination-path>`` is where you want the mesh files to be generated.
The script creates the directory if it does not exist.


.. Important::

When you set the ``<stencilSize>``, keep in mind the following constraints (more on this below):

- ``InviscidFluxReconstruction::FirstOrder`` requires ``<stencilSize> >= 3``

- ``InviscidFluxReconstruction::Weno3`` requires ``<stencilSize> >= 5``

- ``InviscidFluxReconstruction::Weno5`` requires ``<stencilSize> >= 7``

.. Currently, the viscous reconstruction uses a three-point stencil, so it is always supported.
C++ synopsis
------------

.. code-block:: c++

#include "pressiodemoapps/advection_diffusion2d.hpp"
// ...
namespace pda = pressiodemoapps;

const auto meshObj = pda::load_cellcentered_uniform_mesh_eigen("path-to-mesh");

const auto inviscidScheme = pda::InviscidFluxReconstruction::FirstOrder; // or Weno3, Weno5
const auto viscousScheme = pda::ViscousFluxReconstruction::FirstOrder; // must be FirstOrder

// A. constructor for problem using default values
{
const auto probId = pda::AdvectionDiffusion2d::BurgersDirichlet;
auto problem = pda::create_problem_eigen(meshObj, probId, inviscidScheme, viscousScheme);
}

// B. setting custom coefficients
{
using scalar_type = typename decltype(meshObj)::scalar_t;
const auto alpha = /* something */;
const auto delta = /* something */;
const auto D = /* something */;
const auto x0 = /* something */;
const auto y0 = /* something */;
auto problem = pda::create_dirichlet_burgers_2d_problem_eigen(meshObj, inviscidScheme,
viscousScheme, alpha,
delta, D, x0, y0)
}
Python synopsis
---------------

.. code-block:: py
import pressiodemoapps as pda
meshObj = pda.load_cellcentered_uniform_mesh("path-to-mesh")
inviscidScheme = pda.InviscidFluxReconstruction.FirstOrder; # or Weno3, Weno5
viscousScheme = pda.ViscousFluxReconstruction.FirstOrder; # must be FirstOrder
# A. constructor for problem using default values
probId = pda.AdvectionDiffusion2d.BurgersPeriodic
problem = pda.create_problem(meshObj, probId, inviscidScheme, viscousScheme)
# B. setting custom coefficients
alpha = # something
delta = # something
D = # something
x0 = # something
y0 = # something
problem = pda.create_dirichlet_burgers_2d_problem(meshObj, inviscidScheme,
viscousScheme, alpha,
delta, D, x0, y0)
Notes:
------

.. important::

Note that we currently support only first order *viscous*
flux reconstruction, which leads to a second-order scheme.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
2D Burgers
==========
TODO: Add Initial conditions and parameters. Fix code blocks.
2D Burgers (Periodic BCs)
=========================

This problem solves the 2D Burgers equations. We consider a two-dimensional nonlinear viscous Burgers equations
This problem solves the 2D nonlinear viscous Burgers equations

.. math::
\frac{\partial u}{\partial t} + u \nabla u = D \nabla^2 u
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y} &= D \left( \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} \right)
with:
\frac{\partial v}{\partial t} + u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y} &= D \left( \frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2} \right)
* Domain is :math:`[0,1]^2` with periodic BC
* initial condition is: :math:`u = \alpha \exp( - \frac{(x-x_0)^2+(y-y_0)^2}{\delta} )`
* Domain is :math:`[-1,1]^2` with periodic BC

* Initial conditions are: :math:`u = v = \alpha \exp( - \frac{(x-x_0)^2+(y-y_0)^2}{\delta} )`

* Default settings: :math:`\alpha = 0.5`, :math:`\delta = 0.15`, :math:`x_0=0, y_0=-0.2`, :math:`D = 0.00001`

Expand All @@ -22,7 +22,7 @@ Mesh
.. code-block:: shell
python3 pressio-demoapps/meshing_scripts/create_full_mesh_for.py \
--problem burgers2d_s<stencilSize> -n Nx Ny --outDir <destination-path>
--problem burgers2d_periodic_s<stencilSize> -n Nx Ny --outDir <destination-path>
where

Expand Down Expand Up @@ -63,7 +63,7 @@ C++ synopsis

// A. constructor for problem using default values
{
const auto probId = pda::AdvectionDiffusion2d::Burgers;
const auto probId = pda::AdvectionDiffusion2d::BurgersPeriodic;
auto problem = pda::create_problem_eigen(meshObj, probId, inviscidScheme, viscousScheme);
}

Expand All @@ -75,8 +75,9 @@ C++ synopsis
const auto D = /* something */;
const auto x0 = /* something */;
const auto y0 = /* something */;
auto problem = pda::create_burgers_2d_problem_eigen(meshObj, inviscidScheme, viscousScheme,
alpha, delta, D, x0, y0)
auto problem = pda::create_periodic_burgers_2d_problem_eigen(meshObj, inviscidScheme,
viscousScheme, alpha,
delta, D, x0, y0)
}
Python synopsis
Expand All @@ -92,17 +93,18 @@ Python synopsis
viscousScheme = pda.ViscousFluxReconstruction.FirstOrder; # must be FirstOrder
# A. constructor for problem using default values
probId = pda.AdvectionDiffusion2d::Burgers
problem = pda.create_problem(meshObj, probId, scheme)
probId = pda.AdvectionDiffusion2d.BurgersPeriodic
problem = pda.create_problem(meshObj, probId, inviscidScheme, viscousScheme)
# B. setting custom coefficients
alpha = /* something */
delta = /* something */
D = /* something */
x0 = /* something */
y0 = /* something */
problem = pda.create_burgers_2d_problem(meshObj, inviscidScheme, viscousScheme,
alpha, delta, D, x0, y0)
alpha = # something
delta = # something
D = # something
x0 = # something
y0 = # something
problem = pda.create_periodic_burgers_2d_problem(meshObj, inviscidScheme,
viscousScheme, alpha,
delta, D, x0, y0)
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/diffusion_reaction_1d.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This problem focuses on the following 1D diffusion reaction PDE:

- :math:`u(x, t) = 4 x^2\sin(\pi x) \cos(4 \pi x)`

* Domain is :math:`[0,1]` with homogenous Dirichlet BC
* Domain is :math:`[0,1]` with homogeneous Dirichlet BC


Mesh
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/diffusion_reaction_2d.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This problem focuses on the following 2D reaction diffusion PDE:

- :math:`u(x, y, t) = 4 \sin(4 \pi x y) \sin(\pi x (y-2/10))`

* Domain is unit square :math:`[0,1]^2` with homogenous Dirichlet BC
* Domain is unit square :math:`[0,1]^2` with homogeneous Dirichlet BC


Mesh
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/euler_2d_normal_shock.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ where the pressure :math:`p` is related to the conserved quantities through the

- Domain is :math:`[0, 2]\times[0, 1]`

- BC are homogenous Neumann at left (:math:`x=0`) and right (:math:`x=2`) boundaries,
- BC are homogeneous Neumann at left (:math:`x=0`) and right (:math:`x=2`) boundaries,
and reflective at top (:math:`y=1`) and bottom (:math:`y=0`) boundaries


Expand Down
3 changes: 2 additions & 1 deletion docs/_sources/problems_2d.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
:maxdepth: 2

diffusion_reaction_2d
burgers_2d
burgers_2d_dirichlet
burgers_2d_periodic
grayscott_2d
swe_2d
euler_2d_smooth
Expand Down
8 changes: 4 additions & 4 deletions docs/_sources/swe_2d.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ Python synopsis
meshObj = pda.load_cellcentered_uniform_mesh_eigen("path-to-mesh")
probId = pda.Swe2d::SlipWall;
probId = pda.Swe2d.SlipWall;
scheme = pda.InviscidFluxReconstruction.FirstOrder # or Weno3, Weno5
# A. constructor for problem using default values
problem = pda.create_problem(meshObj, probId, scheme)
# B. constructor for problem specifying all coefficients
gravity = ...
coriolis = ...
alpha = ...
gravity = # some value
coriolis = # some value
alpha = # some value
problem = pda.create_slip_wall_swe_2d_problem(meshObj, scheme, gravity, coriolis, alpha)
Expand Down
5 changes: 3 additions & 2 deletions docs/advection_1d.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="problems_2d.html">2d Problems</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle child pages in navigation</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="diffusion_reaction_2d.html">2D single-species reaction diffusion</a></li>
<li class="toctree-l2"><a class="reference internal" href="burgers_2d.html">2D Burgers</a></li>
<li class="toctree-l2"><a class="reference internal" href="burgers_2d_dirichlet.html">2D Burgers Dirichlet</a></li>
<li class="toctree-l2"><a class="reference internal" href="burgers_2d_periodic.html">2D Burgers Periodic</a></li>
<li class="toctree-l2"><a class="reference internal" href="grayscott_2d.html">2D Gray Scott reaction-diffusion</a></li>
<li class="toctree-l2"><a class="reference internal" href="swe_2d.html">2D Shallow water equations</a></li>
<li class="toctree-l2"><a class="reference internal" href="euler_2d_smooth.html">2D Euler Smooth</a></li>
Expand Down Expand Up @@ -334,7 +335,7 @@ <h2>Sample Solution<a class="headerlink" href="#sample-solution" title="Permalin

<div class="related-information">
Copyright &#169; 2021, National Technology &amp; Engineering Solutions of Sandia, LLC (NTESS) |
Last updated on Mar 30, 2022. |
Last updated on Jun 15, 2022. |
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
<a href="https://github.com/pradyunsg/furo">Furo theme</a>.
| <a class="muted-link" href="_sources/advection_1d.rst.txt"
Expand Down
5 changes: 3 additions & 2 deletions docs/apicpp.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="problems_2d.html">2d Problems</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle child pages in navigation</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="diffusion_reaction_2d.html">2D single-species reaction diffusion</a></li>
<li class="toctree-l2"><a class="reference internal" href="burgers_2d.html">2D Burgers</a></li>
<li class="toctree-l2"><a class="reference internal" href="burgers_2d_dirichlet.html">2D Burgers Dirichlet</a></li>
<li class="toctree-l2"><a class="reference internal" href="burgers_2d_periodic.html">2D Burgers Periodic</a></li>
<li class="toctree-l2"><a class="reference internal" href="grayscott_2d.html">2D Gray Scott reaction-diffusion</a></li>
<li class="toctree-l2"><a class="reference internal" href="swe_2d.html">2D Shallow water equations</a></li>
<li class="toctree-l2"><a class="reference internal" href="euler_2d_smooth.html">2D Euler Smooth</a></li>
Expand Down Expand Up @@ -441,7 +442,7 @@ <h1>C++ API<a class="headerlink" href="#c-api" title="Permalink to this headline

<div class="related-information">
Copyright &#169; 2021, National Technology &amp; Engineering Solutions of Sandia, LLC (NTESS) |
Last updated on Mar 30, 2022. |
Last updated on Jun 15, 2022. |
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
<a href="https://github.com/pradyunsg/furo">Furo theme</a>.
| <a class="muted-link" href="_sources/apicpp.rst.txt"
Expand Down
5 changes: 3 additions & 2 deletions docs/apipy.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="problems_2d.html">2d Problems</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle child pages in navigation</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="diffusion_reaction_2d.html">2D single-species reaction diffusion</a></li>
<li class="toctree-l2"><a class="reference internal" href="burgers_2d.html">2D Burgers</a></li>
<li class="toctree-l2"><a class="reference internal" href="burgers_2d_dirichlet.html">2D Burgers Dirichlet</a></li>
<li class="toctree-l2"><a class="reference internal" href="burgers_2d_periodic.html">2D Burgers Periodic</a></li>
<li class="toctree-l2"><a class="reference internal" href="grayscott_2d.html">2D Gray Scott reaction-diffusion</a></li>
<li class="toctree-l2"><a class="reference internal" href="swe_2d.html">2D Shallow water equations</a></li>
<li class="toctree-l2"><a class="reference internal" href="euler_2d_smooth.html">2D Euler Smooth</a></li>
Expand Down Expand Up @@ -479,7 +480,7 @@ <h1>Python API<a class="headerlink" href="#python-api" title="Permalink to this

<div class="related-information">
Copyright &#169; 2021, National Technology &amp; Engineering Solutions of Sandia, LLC (NTESS) |
Last updated on Mar 30, 2022. |
Last updated on Jun 15, 2022. |
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
<a href="https://github.com/pradyunsg/furo">Furo theme</a>.
| <a class="muted-link" href="_sources/apipy.rst.txt"
Expand Down
Loading

0 comments on commit 4306389

Please sign in to comment.