Skip to content

Commit

Permalink
some fixes to the true-SDC documentation (#2587)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Sep 28, 2023
1 parent 7561a65 commit b4030be
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions Docs/source/FlowChart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -662,12 +662,13 @@ The overall evolution appears as:

#. *Initialization* (``initialize_advance``)

Here we create the ``MultiFab`` s that store the needed information
We first do a ``clean_state`` on the old data (``S_old``).

We next create the ``MultiFab`` s that store the needed information
at the different time nodes. Each of the quantities below is a
vector of size ``SDC_NODES``, whose components are the ``MultiFab``
for that time node:


* ``k_new`` : the current solution at this time node.

Note that
Expand Down Expand Up @@ -700,14 +701,15 @@ SDC Single Iteration Flowchart

.. index:: do_advance_sdc

The update through all time nodes for a single iteration is done by
``do_advance_sdc``. The basic update appears as:

Throughout this driver we use the ``State_Type`` ``StateData`` as
storage for the current node. In particular, we use the new time slot
in the ``StateData`` (which we refer to as ``S_new``) to allow us to
do ``FillPatch`` operations.

The update through all time nodes for a single iteration is done by
``do_advance_sdc``. The basic update appears as:


#. *Initialize*

We allocate ``Sborder``. Just like with the Strang CTU driver, we
Expand Down Expand Up @@ -756,18 +758,18 @@ do ``FillPatch`` operations.

Then fill all other time nodes as: ``R_old[n]`` = ``R_old[0]``

* Do the SDC update from node ``m`` to ``m+1``.
* Do the SDC update from node ``m`` to ``m+1``.

We call ``do_sdc_update()`` to do the update in time to the next
node. This solves the nonlinear system (when we have reactions)
and stores the solution in ``k_new[m+1]``.
We call ``do_sdc_update()`` to do the update in time to the next
node. This solves the nonlinear system (when we have reactions)
and stores the solution in ``k_new[m+1]``.

#. Store the advective terms for the next iteration.

Since we are done with this iteration, we do: ``A_old[n]``
:math:`\leftarrow` ``A_new[n]``.

We also store ``R_old`` for the next iteration. We do this by
#. Store ``R_old`` for the next iteration. We do this by
calling the reaction source one last time using the data for each
time node.

Expand All @@ -777,6 +779,10 @@ do ``FillPatch`` operations.

``S_new`` :math:`\leftarrow` ``k_new[SDC_NODES-1]``

#. Store the old and new sources in the State Data.

#. Store the reaction information for the plotfiles.

#. Call ``finalize_do_advance`` to clean up the memory.


Expand Down

0 comments on commit b4030be

Please sign in to comment.