Gallery: Poisson equation

This example shows how to solve the Poisson equation with a generic source term using the CT_MultiLevel elliptic solver. Documentation for CT_MultiLevel is available. To assess the performance of the algorithm, we start by prescribing a solution phi0 (in this case, a superposition of Gaussian functions), and construct the source term by taking the Laplacian of phi0. The plots show the final solution phi (color plot), the source term (white contour surfaces) and the solution error phi-phi0 as a function of the iteration number.

Parameter file poisson.par
Thornlist ET Cannon release (ET_2024_11)
approx. memory 32 GB
approx. runtime 10 min using 8 CPUs (1 node, 8 mpi tasks, and 1 cpu per task)
Results (683MB) poisson_20241114.tar.gz

This example was last tested on Nov-14-2024.

Solution and sources

Solution psi and sources

This file was generated using the VisIt session file psi2.session.

To use the session file, follow these steps:

  1. Open VisIt and go to File > Restore session with sources
  2. On the new dialogue,select the psi2.session file. Note that the dialogue has two panels: Directories and Files. First navigate to the folder containing psi2.session by using the panel on the left (Directories), then click on the file itself will appear on the panel on the right (Files). Once the session file is selected and marked blue, click the OK button.
  3. A new dialogue will pop up asking for the location of the source files.
    1. Select SOURCE00 on the Source identifiers panel (left)
    2. On the Source panel (right), click on the ... button.
    3. On the new pop up, using the Directories panel navigate to the directory where the output files of the example are stored.
    4. Using the Files panel, select ct_analytic-ct_test0.h5 and click the OK button.
    5. Back on the Source identifiers panel, click on SOURCE01.
    6. On the Source panel (right), click on the ... button.
    7. On the new dialogue, select the ct_multilevel-psi.h5 file as in steps 3.3 and 3.4
  4. Click the OK button in the Update Sources dialogue

It may take a few moments for VisIt to complete its processing of the data. If the entries in the Plots section of VisIt's main window are yellow, it means that VisIt is still processing the operation.

Solution Error

Solution Error

The above image is created with ploterr.py

The script works with a variable number of arguments and can plot the comparison of multiple different runs, while also labeling them by date.

To compare two runs generated in different days, rename the terr_norm_eqn0.asc files that will be compared to the patternYYYYMMDD and run the script passing the files as command line arguments.