libMesh/libmesh — pull request #108 by pbauman (2013-06-21 04:15:18+00:00)
Title: Privatize FEMContext

This pull request contains the (I believe...) final changes needed to move some of the data structures to protected/private status and provide accessors for them. The original impetus for this was dealing with vector-valued finite elements. Accordingly, the cached Elem* is now accessible through get_element_fe (get_side_fe, get_edge_fe, respectively). Other major changes include quadrature accessors return a reference instead of a pointer (adhering to the rule-of-thumb if one needs to check for nullness, use a pointer; otherwise use a reference), and provide per-variable access to dof_indices, residuals, and Jacobians. I left the side and edge objects public because, it seems, they're used as iterators in places and it just seemed easier to leave them public.

As I got farther along with this, I decided I don't really like the get_* API naming; seems kind of sophomoric. I left it, but I'd be open to going through and sed'ing out a lot of those. I'm open to suggestion.

The other thing I found annoying was have to provide non-const references to some of the objects to either set values or pass along to other functions. I'm open to suggestion there.

@roystgnr, please have a careful look. I'm happy to make any changes. @dknez, I tried to keep the reduced basis changes localized into a couple of commits. Please let me know if I FUBAR'ed anything.