From 8a731ce9b652847c078e4894b297f2a3afa490f1 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Sat, 14 Sep 2024 10:28:10 -0400 Subject: [PATCH] rename viscous_burgers -> burgers_viscous (#267) this is consistent with incompressible and also allows it to appear next to burgers in a listing (alphabetically) --- README.md | 2 +- docs/source/burgers_basics.rst | 17 ++- docs/source/pyro.advection.rst | 8 ++ docs/source/pyro.advection_fv4.problems.rst | 16 +++ docs/source/pyro.burgers.problems.rst | 23 ++-- docs/source/pyro.burgers.rst | 6 +- docs/source/pyro.burgers_viscous.problems.rst | 34 ++++++ docs/source/pyro.burgers_viscous.rst | 34 ++++++ docs/source/pyro.compressible.rst | 8 ++ docs/source/pyro.multigrid.examples.rst | 106 ++++++++++++++++++ docs/source/pyro.multigrid.rst | 8 ++ docs/source/pyro.rst | 26 ++++- docs/source/pyro.viscous_burgers.problems.rst | 26 ----- docs/source/pyro.viscous_burgers.rst | 34 ------ .../__init__.py | 0 .../_defaults | 0 .../interface.py | 0 .../problems/__init__.py | 0 .../problems/converge.py | 0 .../problems/inputs.converge.128 | 0 .../problems/inputs.converge.256 | 0 .../problems/inputs.converge.32 | 0 .../problems/inputs.converge.64 | 0 .../problems/inputs.smooth | 0 .../problems/inputs.test | 0 .../problems/inputs.tophat | 0 .../problems/test.py | 0 .../problems/tophat.py | 0 .../simulation.py | 2 +- pyro/pyro_sim.py | 2 +- 30 files changed, 273 insertions(+), 79 deletions(-) create mode 100644 docs/source/pyro.burgers_viscous.problems.rst create mode 100644 docs/source/pyro.burgers_viscous.rst create mode 100644 docs/source/pyro.multigrid.examples.rst delete mode 100644 docs/source/pyro.viscous_burgers.problems.rst delete mode 100644 docs/source/pyro.viscous_burgers.rst rename pyro/{viscous_burgers => burgers_viscous}/__init__.py (100%) rename pyro/{viscous_burgers => burgers_viscous}/_defaults (100%) rename pyro/{viscous_burgers => burgers_viscous}/interface.py (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/__init__.py (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/converge.py (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/inputs.converge.128 (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/inputs.converge.256 (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/inputs.converge.32 (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/inputs.converge.64 (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/inputs.smooth (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/inputs.test (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/inputs.tophat (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/test.py (100%) rename pyro/{viscous_burgers => burgers_viscous}/problems/tophat.py (100%) rename pyro/{viscous_burgers => burgers_viscous}/simulation.py (99%) diff --git a/README.md b/README.md index ee5b04ddc..8ed3c62e6 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ pyro provides the following solvers (all in 2-d): - `burgers`: a second-order unsplit solver for invsicid Burgers' equation. - - `viscous_burgers`: a second-order unsplit solver for viscous + - `burgers_viscous`: a second-order unsplit solver for viscous Burgers' equation with constant-coefficient diffusion. It uses Crank-Nicolson time-discretized solver for solving diffusion. diff --git a/docs/source/burgers_basics.rst b/docs/source/burgers_basics.rst index 51162edbe..9f299d1ea 100644 --- a/docs/source/burgers_basics.rst +++ b/docs/source/burgers_basics.rst @@ -45,19 +45,28 @@ A 2D viscous Burgers' Equation has the following form: u_t + u u_x + v u_y = \epsilon \left( u_{xx} + u_{yy}\right) \\ v_t + u v_x + v v_y = \epsilon \left( v_{xx} + v_{yy}\right) -The viscous Burgers' equation has an additional velocity diffusion term on the RHS compared to the inviscid Burgers' equation. Here :math:`\epsilon` represents the constant viscosity. +The viscous Burgers' equation has an additional velocity diffusion +term on the RHS compared to the inviscid Burgers' equation. Here +:math:`\epsilon` represents the constant viscosity. -:py:mod:`pyro.viscous_burgers` is inherited from :py:mod:`pyro.burgers`, where we added an additional diffusion term when constructing the interface states. We then solve for diffusion along with the extra advective source to the Helmholtz equation by using the Crank-Nicolson discretization and multigrid solvers. +:py:mod:`pyro.burgers_viscous` is inherited from +:py:mod:`pyro.burgers`, where we added an additional diffusion term +when constructing the interface states. We then solve for diffusion +along with the extra advective source to the Helmholtz equation by +using the Crank-Nicolson discretization and multigrid solvers. The parameters for this solver are: -.. include:: viscous_burgers_defaults.inc +.. include:: burgers_viscous_defaults.inc .. image:: viscous_burgers.png :align: center -The figure above is generated using ``viscous_burgers/problems/test.py``, which has the identical setup as in ``burgers/problems/test.py``. With diffusion added to the system, we see the shock (discontinuity) is smeared out as system evolves. +The figure above is generated using +``burgers_viscous/problems/test.py``, which has the identical setup as +in ``burgers/problems/test.py``. With diffusion added to the system, +we see the shock (discontinuity) is smeared out as system evolves. diff --git a/docs/source/pyro.advection.rst b/docs/source/pyro.advection.rst index 3788a6704..d209eea65 100644 --- a/docs/source/pyro.advection.rst +++ b/docs/source/pyro.advection.rst @@ -25,6 +25,14 @@ pyro.advection.advective\_fluxes module :undoc-members: :show-inheritance: +pyro.advection.interface module +------------------------------- + +.. automodule:: pyro.advection.interface + :members: + :undoc-members: + :show-inheritance: + pyro.advection.simulation module -------------------------------- diff --git a/docs/source/pyro.advection_fv4.problems.rst b/docs/source/pyro.advection_fv4.problems.rst index 9e776cca8..f5a1b0027 100644 --- a/docs/source/pyro.advection_fv4.problems.rst +++ b/docs/source/pyro.advection_fv4.problems.rst @@ -16,3 +16,19 @@ pyro.advection\_fv4.problems.smooth module :members: :undoc-members: :show-inheritance: + +pyro.advection\_fv4.problems.test module +---------------------------------------- + +.. automodule:: pyro.advection_fv4.problems.test + :members: + :undoc-members: + :show-inheritance: + +pyro.advection\_fv4.problems.tophat module +------------------------------------------ + +.. automodule:: pyro.advection_fv4.problems.tophat + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/pyro.burgers.problems.rst b/docs/source/pyro.burgers.problems.rst index 41e06250a..8eeed30be 100644 --- a/docs/source/pyro.burgers.problems.rst +++ b/docs/source/pyro.burgers.problems.rst @@ -1,5 +1,5 @@ pyro.burgers.problems package -=============================== +============================= .. automodule:: pyro.burgers.problems :members: @@ -9,27 +9,34 @@ pyro.burgers.problems package Submodules ---------- -pyro.burgers.problems.test module +pyro.burgers.problems.converge module ------------------------------------- -.. automodule:: pyro.burgers.problems.test +.. automodule:: pyro.burgers.problems.converge :members: :undoc-members: :show-inheritance: +pyro.burgers.problems.test module +--------------------------------- -pyro.burgers.problems.converge module -------------------------------------- - -.. automodule:: pyro.burgers.problems.converge +.. automodule:: pyro.burgers.problems.test :members: :undoc-members: :show-inheritance: pyro.burgers.problems.tophat module -------------------------------------- +----------------------------------- .. automodule:: pyro.burgers.problems.tophat :members: :undoc-members: :show-inheritance: + +pyro.burgers.problems.verify module +----------------------------------- + +.. automodule:: pyro.burgers.problems.verify + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/pyro.burgers.rst b/docs/source/pyro.burgers.rst index 1a5b35d54..433d28052 100644 --- a/docs/source/pyro.burgers.rst +++ b/docs/source/pyro.burgers.rst @@ -1,5 +1,5 @@ pyro.burgers package -====================== +==================== .. automodule:: pyro.burgers :members: @@ -18,7 +18,7 @@ Submodules ---------- pyro.burgers.burgers\_interface module ---------------------------------------- +-------------------------------------- .. automodule:: pyro.burgers.burgers_interface :members: @@ -26,7 +26,7 @@ pyro.burgers.burgers\_interface module :show-inheritance: pyro.burgers.simulation module --------------------------------- +------------------------------ .. automodule:: pyro.burgers.simulation :members: diff --git a/docs/source/pyro.burgers_viscous.problems.rst b/docs/source/pyro.burgers_viscous.problems.rst new file mode 100644 index 000000000..b40029d59 --- /dev/null +++ b/docs/source/pyro.burgers_viscous.problems.rst @@ -0,0 +1,34 @@ +pyro.burgers\_viscous.problems package +====================================== + +.. automodule:: pyro.burgers_viscous.problems + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +pyro.burgers\_viscous.problems.converge module +---------------------------------------------- + +.. automodule:: pyro.burgers_viscous.problems.converge + :members: + :undoc-members: + :show-inheritance: + +pyro.burgers\_viscous.problems.test module +------------------------------------------ + +.. automodule:: pyro.burgers_viscous.problems.test + :members: + :undoc-members: + :show-inheritance: + +pyro.burgers\_viscous.problems.tophat module +-------------------------------------------- + +.. automodule:: pyro.burgers_viscous.problems.tophat + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/pyro.burgers_viscous.rst b/docs/source/pyro.burgers_viscous.rst new file mode 100644 index 000000000..0816a9af0 --- /dev/null +++ b/docs/source/pyro.burgers_viscous.rst @@ -0,0 +1,34 @@ +pyro.burgers\_viscous package +============================= + +.. automodule:: pyro.burgers_viscous + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + pyro.burgers_viscous.problems + +Submodules +---------- + +pyro.burgers\_viscous.interface module +-------------------------------------- + +.. automodule:: pyro.burgers_viscous.interface + :members: + :undoc-members: + :show-inheritance: + +pyro.burgers\_viscous.simulation module +--------------------------------------- + +.. automodule:: pyro.burgers_viscous.simulation + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/pyro.compressible.rst b/docs/source/pyro.compressible.rst index 871b7070f..8b74c572b 100644 --- a/docs/source/pyro.compressible.rst +++ b/docs/source/pyro.compressible.rst @@ -49,6 +49,14 @@ pyro.compressible.interface module :undoc-members: :show-inheritance: +pyro.compressible.riemann module +-------------------------------- + +.. automodule:: pyro.compressible.riemann + :members: + :undoc-members: + :show-inheritance: + pyro.compressible.simulation module ----------------------------------- diff --git a/docs/source/pyro.multigrid.examples.rst b/docs/source/pyro.multigrid.examples.rst new file mode 100644 index 000000000..d1a1c849f --- /dev/null +++ b/docs/source/pyro.multigrid.examples.rst @@ -0,0 +1,106 @@ +pyro.multigrid.examples package +=============================== + +.. automodule:: pyro.multigrid.examples + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +pyro.multigrid.examples.mg\_test\_general\_alphabeta\_only module +----------------------------------------------------------------- + +.. automodule:: pyro.multigrid.examples.mg_test_general_alphabeta_only + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.mg\_test\_general\_beta\_only module +------------------------------------------------------------ + +.. automodule:: pyro.multigrid.examples.mg_test_general_beta_only + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.mg\_test\_general\_constant module +---------------------------------------------------------- + +.. automodule:: pyro.multigrid.examples.mg_test_general_constant + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.mg\_test\_general\_dirichlet module +----------------------------------------------------------- + +.. automodule:: pyro.multigrid.examples.mg_test_general_dirichlet + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.mg\_test\_general\_inhomogeneous module +--------------------------------------------------------------- + +.. automodule:: pyro.multigrid.examples.mg_test_general_inhomogeneous + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.mg\_test\_simple module +----------------------------------------------- + +.. automodule:: pyro.multigrid.examples.mg_test_simple + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.mg\_test\_vc\_constant module +----------------------------------------------------- + +.. automodule:: pyro.multigrid.examples.mg_test_vc_constant + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.mg\_test\_vc\_dirichlet module +------------------------------------------------------ + +.. automodule:: pyro.multigrid.examples.mg_test_vc_dirichlet + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.mg\_test\_vc\_periodic module +----------------------------------------------------- + +.. automodule:: pyro.multigrid.examples.mg_test_vc_periodic + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.mg\_vis module +-------------------------------------- + +.. automodule:: pyro.multigrid.examples.mg_vis + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.project\_periodic module +------------------------------------------------ + +.. automodule:: pyro.multigrid.examples.project_periodic + :members: + :undoc-members: + :show-inheritance: + +pyro.multigrid.examples.prolong\_restrict\_demo module +------------------------------------------------------ + +.. automodule:: pyro.multigrid.examples.prolong_restrict_demo + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/pyro.multigrid.rst b/docs/source/pyro.multigrid.rst index bf4e733be..368290989 100644 --- a/docs/source/pyro.multigrid.rst +++ b/docs/source/pyro.multigrid.rst @@ -6,6 +6,14 @@ pyro.multigrid package :undoc-members: :show-inheritance: +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + pyro.multigrid.examples + Submodules ---------- diff --git a/docs/source/pyro.rst b/docs/source/pyro.rst index 8eb6a8872..c0c275c31 100644 --- a/docs/source/pyro.rst +++ b/docs/source/pyro.rst @@ -18,7 +18,7 @@ Subpackages pyro.advection_rk pyro.advection_weno pyro.burgers - pyro.viscous_burgers + pyro.burgers_viscous pyro.compressible pyro.compressible_fv4 pyro.compressible_react @@ -37,6 +37,22 @@ Subpackages Submodules ---------- +pyro.compare module +------------------- + +.. automodule:: pyro.compare + :members: + :undoc-members: + :show-inheritance: + +pyro.mg\_test\_simple module +---------------------------- + +.. automodule:: pyro.mg_test_simple + :members: + :undoc-members: + :show-inheritance: + pyro.plot module ---------------- @@ -45,6 +61,14 @@ pyro.plot module :undoc-members: :show-inheritance: +pyro.plotvar module +------------------- + +.. automodule:: pyro.plotvar + :members: + :undoc-members: + :show-inheritance: + pyro.pyro\_sim module --------------------- diff --git a/docs/source/pyro.viscous_burgers.problems.rst b/docs/source/pyro.viscous_burgers.problems.rst deleted file mode 100644 index 12c3ecb41..000000000 --- a/docs/source/pyro.viscous_burgers.problems.rst +++ /dev/null @@ -1,26 +0,0 @@ -pyro.viscous\_burgers.problems package -======================================= - -.. automodule:: pyro.viscous_burgers.problems - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -pyro.viscous\_burgers.problems.converge module ------------------------------------------------ - -.. automodule:: pyro.viscous_burgers.problems.converge - :members: - :undoc-members: - :show-inheritance: - -pyro.viscous\_burgers.problems.tophat module --------------------------------------------- - -.. automodule:: pyro.viscous_burgers.problems.tophat - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/pyro.viscous_burgers.rst b/docs/source/pyro.viscous_burgers.rst deleted file mode 100644 index 4df56a120..000000000 --- a/docs/source/pyro.viscous_burgers.rst +++ /dev/null @@ -1,34 +0,0 @@ -pyro.viscous\_burgers package -============================== - -.. automodule:: pyro.viscous_burgers - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - pyro.viscous_burgers.problems - -Submodules ----------- - -pyro.viscous\_burgers.interface module ---------------------------------------- - -.. automodule:: pyro.viscous_burgers.interface - :members: - :undoc-members: - :show-inheritance: - -pyro.viscous_burgers.simulation module ---------------------------------------- - -.. automodule:: pyro.viscous_burgers.simulation - :members: - :undoc-members: - :show-inheritance: diff --git a/pyro/viscous_burgers/__init__.py b/pyro/burgers_viscous/__init__.py similarity index 100% rename from pyro/viscous_burgers/__init__.py rename to pyro/burgers_viscous/__init__.py diff --git a/pyro/viscous_burgers/_defaults b/pyro/burgers_viscous/_defaults similarity index 100% rename from pyro/viscous_burgers/_defaults rename to pyro/burgers_viscous/_defaults diff --git a/pyro/viscous_burgers/interface.py b/pyro/burgers_viscous/interface.py similarity index 100% rename from pyro/viscous_burgers/interface.py rename to pyro/burgers_viscous/interface.py diff --git a/pyro/viscous_burgers/problems/__init__.py b/pyro/burgers_viscous/problems/__init__.py similarity index 100% rename from pyro/viscous_burgers/problems/__init__.py rename to pyro/burgers_viscous/problems/__init__.py diff --git a/pyro/viscous_burgers/problems/converge.py b/pyro/burgers_viscous/problems/converge.py similarity index 100% rename from pyro/viscous_burgers/problems/converge.py rename to pyro/burgers_viscous/problems/converge.py diff --git a/pyro/viscous_burgers/problems/inputs.converge.128 b/pyro/burgers_viscous/problems/inputs.converge.128 similarity index 100% rename from pyro/viscous_burgers/problems/inputs.converge.128 rename to pyro/burgers_viscous/problems/inputs.converge.128 diff --git a/pyro/viscous_burgers/problems/inputs.converge.256 b/pyro/burgers_viscous/problems/inputs.converge.256 similarity index 100% rename from pyro/viscous_burgers/problems/inputs.converge.256 rename to pyro/burgers_viscous/problems/inputs.converge.256 diff --git a/pyro/viscous_burgers/problems/inputs.converge.32 b/pyro/burgers_viscous/problems/inputs.converge.32 similarity index 100% rename from pyro/viscous_burgers/problems/inputs.converge.32 rename to pyro/burgers_viscous/problems/inputs.converge.32 diff --git a/pyro/viscous_burgers/problems/inputs.converge.64 b/pyro/burgers_viscous/problems/inputs.converge.64 similarity index 100% rename from pyro/viscous_burgers/problems/inputs.converge.64 rename to pyro/burgers_viscous/problems/inputs.converge.64 diff --git a/pyro/viscous_burgers/problems/inputs.smooth b/pyro/burgers_viscous/problems/inputs.smooth similarity index 100% rename from pyro/viscous_burgers/problems/inputs.smooth rename to pyro/burgers_viscous/problems/inputs.smooth diff --git a/pyro/viscous_burgers/problems/inputs.test b/pyro/burgers_viscous/problems/inputs.test similarity index 100% rename from pyro/viscous_burgers/problems/inputs.test rename to pyro/burgers_viscous/problems/inputs.test diff --git a/pyro/viscous_burgers/problems/inputs.tophat b/pyro/burgers_viscous/problems/inputs.tophat similarity index 100% rename from pyro/viscous_burgers/problems/inputs.tophat rename to pyro/burgers_viscous/problems/inputs.tophat diff --git a/pyro/viscous_burgers/problems/test.py b/pyro/burgers_viscous/problems/test.py similarity index 100% rename from pyro/viscous_burgers/problems/test.py rename to pyro/burgers_viscous/problems/test.py diff --git a/pyro/viscous_burgers/problems/tophat.py b/pyro/burgers_viscous/problems/tophat.py similarity index 100% rename from pyro/viscous_burgers/problems/tophat.py rename to pyro/burgers_viscous/problems/tophat.py diff --git a/pyro/viscous_burgers/simulation.py b/pyro/burgers_viscous/simulation.py similarity index 99% rename from pyro/viscous_burgers/simulation.py rename to pyro/burgers_viscous/simulation.py index bfbc7bfc4..8e27b98d6 100644 --- a/pyro/viscous_burgers/simulation.py +++ b/pyro/burgers_viscous/simulation.py @@ -1,7 +1,7 @@ from pyro.burgers import Simulation as burgers_sim from pyro.burgers import burgers_interface +from pyro.burgers_viscous import interface from pyro.mesh import reconstruction -from pyro.viscous_burgers import interface class Simulation(burgers_sim): diff --git a/pyro/pyro_sim.py b/pyro/pyro_sim.py index b6cb28327..c29c9163a 100755 --- a/pyro/pyro_sim.py +++ b/pyro/pyro_sim.py @@ -18,7 +18,7 @@ "advection_fv4", "advection_weno", "burgers", - "viscous_burgers", + "burgers_viscous", "compressible", "compressible_rk", "compressible_fv4",