Example 15

This code solves a 3D electromagnetic diffusion (definite curl-curl) problem using the lowest order Nedelec, or "edge" finite element discretization on a uniform hexahedral meshing of the unit cube. The right-side corresponds to a unit force and we use uniform zero Dirichlet boundary conditions. The overall problem reads: curl alpha curl E + beta E = 1, with E x n = 0 on the boundary, where alpha and beta are piecewise-constant material coefficients.

The linear system is split in parallel using the SStruct interface with a n x n x n grid on each processors. Note that, the number of processors should therefore be a perfect cube!

This code is mainly meant as an illustration of using the Auxiliary-space Maxwell Solver (AMS) through the SStruct interface. It uses two grids -- one for the nodal and one for the edge variables, and we show how to constructs the rectangular "discrete gradient" matrix that connects them. Finally, this is also an example of setting up a finite element discretization in the SStruct interface, and we recommend viewing Example 13 and Example 14 before viewing this example.