This code solves the 2D Laplace equation using bilinear finite element discretization on a mesh with an "enhanced connectivity" point. Specifically, we solve -Delta u = 1 with zero boundary conditions on a star-shaped domain consisting of identical rhombic parts each meshed with a uniform n x n grid. Every part is assigned to a different processor and all parts meet at the origin, equally subdividing the 2*pi angle there. The case of six processors (parts) looks as follows:
+ / \ / \ / \ +--------+ 1 +---------+ \ \ / / \ 2 \ / 0 / \ \ / / +--------+---------+ / / \ \ / 3 / \ 5 \ / / \ \ +--------+ 4 +---------+ \ / \ / \ / +
Note that in this problem we use nodal variables, which will be shared between the different parts, so the node at the origin, for example, will belong to all parts.
We recommend viewing the Struct examples before viewing this and the other SStruct examples. The primary role of this particular SStruct example is to demonstrate how to set up non-cell-centered problems, and specifically problems with an "enhanced connectivity" point.