[petsc-dev] code duplication in snes ex12.c

Geoffrey Irving irving at naml.us
Thu Nov 14 14:01:33 CST 2013

The SetupElement, SetupMaterialElement, and SetupBdElement functions
are almost entirely duplicates of each other:


This makes it a bit difficult to understand what's going on: I'm new
the code, so I had to run a diff to confirm that the boundary spaces
are allocated identically to the interior spaces (I naively expected a
difference, but it's apparently elsewhere in the code).

Are there any objections to me refactoring the code a bit to avoid the


More information about the petsc-dev mailing list