Skip to content

Commit

Permalink
Change 'gauge constraints' to 'gauge conditions' in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kburns committed Feb 15, 2022
1 parent 3b791c3 commit f220b84
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions docs/pages/changes_from_v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ A best-of-both-worlds approach is to pass your scripts entire local namespace to
This is achieved by passing the keyword ``namespace=locals()`` when instantiating problem objects.
See the built in examples for illustrations of this approach to equation construction.

Gauge constraints
-----------------
Gauge conditions
----------------

In Dedalus v2, gauge constraints (like the pressure gauge in incompressible hydrodynamics) were usually set by changing the equations for certain modes with the ``condition`` keyword when entering equations.
In Dedalus v3, it's recommended to instead add spatially-constant gauge variables to the equations to introduce degrees of freedom that allow the gauge constraints to be directly imposed alongside the other equations.
In Dedalus v2, gauge conditions (like the pressure gauge in incompressible hydrodynamics) were usually set by changing the equations for certain modes with the ``condition`` keyword when entering equations.
In Dedalus v3, it's recommended to instead add spatially-constant gauge variables to the equations to introduce degrees of freedom that allow the gauge conditions to be directly imposed alongside the other equations.
In most cases, the ``condition`` keyword can still be used if desired, but for technical/performance reasons it is no longer available in fully-Fourier problems.
In any event, we find that the new approach (with gauge variables instead of conditions) makes for more readable equations.
See the :doc:`gauge_constraints` page and the examples for more details.
In any event, we find that the new approach (with gauge variables instead of equation conditions) makes for more readable equations.
See the :doc:`gauge_conditions` page and the examples for more details.

Tau terms
---------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Gauge Constraints
*****************
Gauge Conditions
****************

When you enter a system of PDEs in Dedalus, the left-hand side (LHS) of the equations is parsed into a sparse linear system.
For the solver to succeed, this LHS matrix must be square and nonsingular.
Expand Down Expand Up @@ -56,4 +56,4 @@ If the prescribed net inflow is nonzero, then the tau variable will acquire a co
From the modified equation, we can see that the velocity will then have a spatially uniform convergence equal to this tau value.
Of course, for properly specified boundary conditions with no net inflow, the tau variable will be zero and the velocity will be divergence free.

See the included :doc:`example scripts <tutorials>` for more examples of gauge modifications in various domains.
See the included :doc:`example scripts <tutorials>` for more examples of gauge conditions in various domains.
4 changes: 2 additions & 2 deletions docs/pages/tau_method.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ since
\nabla \cdot G = \nabla^2 \vec{u} - \vec{\tau}_1(x) \partial_y P(y)
Let's walk through setting up such a problem in Dedalus v3, assuming we're discretizing :math:`x` and :math:`y` with Fourier and Chebyshev bases, respectively.
First, we need to create the necessary problem variable fields, including fields for the tau variables and a constant scalar tau for imposing the pressure gauge (see the :doc:`gauge_constraints` page):
First, we need to create the necessary problem variable fields, including fields for the tau variables and a constant scalar tau for imposing the pressure gauge (see the :doc:`gauge_conditions` page):

.. code-block:: python
Expand All @@ -137,7 +137,7 @@ Here we'll take :math:`P(y)` to be the highest mode in the Chebyshev-U basis, in
grad_u = d3.grad(u) - ey*lift(tau_u1) # Operator representing G
We can then create a problem and enter the tau-modified PDEs, boundary condtions, and pressure gauge in vectorial form using these substitutions.
Note that we will need to add the contant tau variable to the divergence equation as described in the :doc:`gauge_constraints` page.
Note that we will need to add the contant tau variable to the divergence equation as described in the :doc:`gauge_conditions` page.
This allows us to impose the pressure gauge and removes the redundancy between the integral of the divergence equation and the integral of the inflow boundary conditions.

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Singular matrix errors
If you come across an error in the linear solver stating that a matrix/factor is singular, that means that the linear LHS portion of the PDE system is not uniquely solvable.
This error indicates that some degrees of freedom of the solution are unconstrained and some of the specified equations are redundant (these are equivalent since the LHS matrices must be square).
These errors are often due to imposing boundary conditions that are redundant for some set of modes and/or failing to constrain a gauge freedom in the solution.
See the :doc:`gauge_constraints` and :doc:`tau_method` pages for more information on fixing these issues.
See the :doc:`gauge_conditions` and :doc:`tau_method` pages for more information on fixing these issues.

Out of memory errors
====================
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Specific how-to's:
.. toctree::
:maxdepth: 1

gauge_constraints
gauge_conditions
tau_method

0 comments on commit f220b84

Please sign in to comment.