libMesh/libmesh — pull request #21 by pbauman (2012-12-20 05:28:22+00:00)
Title: Add System::project_solution/System::project_vector methods utilizing FEMFunctionBase functors

This adds the capability for the user to projection_solution using a FEMFunctionBase object. This required updating FEMFunctionBase to behave similarly to FunctionBase objects, including adding some pure virtual methods that will need to be implemented in any user codes (Vikram is the only other user of these that I'm currently aware of). The key difference in the FEMFunctionBase is the operator() methods will have access to a FEMContext object. The implementation of project_vector is very similar to the other methods, with a fair bit of copy/pasted code, but I use the FEMContext object that gets constructed to setup shape functions etc.

In short, the use case for this was for me to be able to create an output system and use a FEMFunctionBase object to project auxiliary quantities computed from my main multiphysics system; this is accomplished by caching a FEMContext from the multiphysics system in the FEMFunctionBase object.

I've updated adjoints_ex3 to implement pure virtual methods that were added, but there's no explicit use of these methods in the library yet - just my successful test in my application code. Any suggestions for adding to an existing example that would be quick? Otherwise, this tested cleanly with --enable-everything, MPI, TBB, and MPI+TBB. Did not try complex.