Gauss's Divergence Theorem

This tutorial demonstrates surface and volume integration by numerically verifying Gauss's divergence theorem on a solid torus. The flux of a three-dimensional vector field through the closed boundary is compared with the volume integral of its divergence.

The example also illustrates the use of surface-normal fields, differential operators, integration of constants to obtain surface area and volume, and visualization of the resulting fields in the Gmsh post-processor.

Example

gauss.ipynb