I've got a compiling version of a vector Lagrange finite element; the vector part is entirely untested at this point. Patch can be found at: http://users.ices.utexas.edu/~pbauman/fe_lagrange/lagrange_vec.patch and new fe_lagrange_vec.C (to be dropped in src/fe) can be found at: http://users.ices.utexas.edu/~pbauman/fe_lagrange/fe_lagrange_vec.C This builds for me in dbg and opt and all the examples run successfully (caveat I didn't run in complex mode).
The patch is against r5709 of trunk.
A few things I wanted to point out and open up for criticism before I committed.
1. I had to add some void FEInterface::shape methods to handle the Real vs. RealGradient shape functions. I kept the old Real FEInterface::shape method there for backward compatibility (at Roy's suggestion).
2. FEInterface::n_vec_dim returns the number components (defaulting to 1 for a scalar type). The way this is done is by looking at the mesh dimension. Thus, we are implicitly assuming the vector dimension is tied to the mesh dimension. This, of course, will break for mixed-dimension meshes, which are currently not supported anyway.
3. Constraints aren't done yet - once we have compute_proj_contraints going for the vector case, we'll enable it. Thus, adaptivity won't work, for the moment.
4. The main thing I wanted to make sure didn't ruffle feathers: vis formats don't seem to understand vector-valued quantities, so we have to write them out component wise. I've updated build_solution_names and build_solution_vector to detect vector finite element types and write out component wise, naming each component as the original name plus "_x", "_y", and "_z" for each relevant component. In particular, all components are being packed in nodal_soln and indexing is used to pull out the right values. I haven't tested yet on the vector element, but it as least seems to be working for the scalar elements (I check gmv and ExodusII outputs in the examples).