Cody - can you get miller to test this against our stuff? Derek
Sent from my iPhone On Feb 3, 2012, at 12:04 PM, Roy Stogner <royst...@ices.utexas.edu> wrote: > > This patch (at http://users.ices.utexas.edu/~roystgnr/functors.diff in > case the attachment gets caught up in mailing list or inbox filters) > templates FunctionBase around output type, adds a WrappedFunction > subclass that creates a functor from a project_vector-style function > pointer, adds System::project_vector implementations which use > vector-valued FunctionBase functors, and makes the function-pointer > based implementations a wrapper around that. > > The patch also adds a couple utility functions to Variable and System > classes to handle the case of vector-valued finite element types... > because although I thought we'd been postponing (and postponing and > postponing...) the addition of vector-valued FE types to libMesh, it > turns out we already have one vector-valued type: SCALAR. (I *love* > the irony here). > > Even my reckless ego doesn't want to commit such a major change to svn > without giving more people than myself a chance to test first. Anyone > using project_vector or project_solution would be wise to make sure > I'm not about to break their code. Seriously: I've been writing and > debugging this code while deep under a sinus-infected mental fog, so > please at least double-check that it compiles for you. > > The patch is not perfectly backwards-API-compatible: any user code > referring to FunctionBase will need to be changed to reference > FunctionBase<> or FunctionBase<Number>. If anyone strongly objects, I > could make the API backwards-compatible instead but at the cost of a > little less internal simplicity. > > Design criticism and/or suggestions would also be welcome. > > Assuming this works well for everybody, I'll be doing the same thing > to ExactSolution, etc. that I did to System::project_*. That should > be relatively trivial, though, now that the underlying machinery is > all there. > > Thanks, > --- > Roy > <functors.diff> > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Libmesh-devel mailing list > Libmesh-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libmesh-devel ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel