On Tue, 21 Feb 2012, Cody Permann wrote:

I've modified the ParsedFunction interface to support additional user defined 
arbitrary variables.  We've been using this for
awhile so that users could define more generic functions to the parser like 
this:
"alpha*sin(beta*x)"

Then later you can define the values for alpha and beta.  Actually you could 
potentially provide a different value for these
variables each time you evaluated the function if you wanted to but that would 
require making a few more setters/getters to
return references to the user where they could provide those values.

For now, I've just added additional default arguments to the constructor in 
this patch which may or may not be the right way to
go.  Also, I've changed the local "variables" array into a class variable since 
we'll need to keep those additional variable
values around in between normal space/time evaluation calls.  These changes are 
all compatible with the current API.  Please let
me know if you have any comments.

I could argue for this going into another, more complex/featureful
subclass...  but on the other hand the patch looks pretty slick as it
is and it isn't very complicated.  I'd say feel free to commit as-is.
---
Roy
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
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-d2d
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to