[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:

    ./src/snes/examples/tutorials/ex12.c

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
duplication?

Geoffrey



More information about the petsc-dev mailing list