{"action":"created","issue":{"url":"https://api.github.com/repos/idaholab/moose/issues/4769","labels_url":"https://api.github.com/repos/idaholab/moose/issues/4769/labels{/name}","comments_url":"https://api.github.com/repos/idaholab/moose/issues/4769/comments","events_url":"https://api.github.com/repos/idaholab/moose/issues/4769/events","html_url":"https://github.com/idaholab/moose/issues/4769","id":59830202,"number":4769,"title":"Time derivative method for functions","user":{"login":"bwspenc","id":6609012,"avatar_url":"https://avatars.githubusercontent.com/u/6609012?v=3","gravatar_id":"","url":"https://api.github.com/users/bwspenc","html_url":"https://github.com/bwspenc","followers_url":"https://api.github.com/users/bwspenc/followers","following_url":"https://api.github.com/users/bwspenc/following{/other_user}","gists_url":"https://api.github.com/users/bwspenc/gists{/gist_id}","starred_url":"https://api.github.com/users/bwspenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwspenc/subscriptions","organizations_url":"https://api.github.com/users/bwspenc/orgs","repos_url":"https://api.github.com/users/bwspenc/repos","events_url":"https://api.github.com/users/bwspenc/events{/privacy}","received_events_url":"https://api.github.com/users/bwspenc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/idaholab/moose/labels/C:%20MOOSE","name":"C: MOOSE","color":"0052cc"},{"url":"https://api.github.com/repos/idaholab/moose/labels/P:%20normal","name":"P: normal","color":"ededed"},{"url":"https://api.github.com/repos/idaholab/moose/labels/T:%20task","name":"T: task","color":"cccccc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-03-04T17:18:52Z","updated_at":"2015-03-04T23:16:12Z","closed_at":null,"body":"I'd like to be able to get time derivatives of MOOSE functions.  Currently, the Piecewise functions have a timeDerivative() method.  @dschwen tells me that we could easily expose an interface to the MooseParsedFunction to do the same thing as well.\r\n\r\nIt seems like the right thing to do is to add a method to the base class.  The problem is that not every function would implement it.  There's a similar issue for the gradient.  The base class defines a gradient() method, but not every derived class defines it.  Rather than just getting a zero, sometimes you really need to know whether these things have been implemented.\r\n\r\nI propose that we add the timeDerivative() method to the Function base class, and also add methods like hasTimeDerivative() and hasGradient() that you could call to see whether they're implemented.  The base class would have a version of timeDerivative() that returns zero, just like the gradient() method.  I'm open to suggestions if anyone has a better plan."},"comment":{"url":"https://api.github.com/repos/idaholab/moose/issues/comments/77271996","html_url":"https://github.com/idaholab/moose/issues/4769#issuecomment-77271996","issue_url":"https://api.github.com/repos/idaholab/moose/issues/4769","id":77271996,"user":{"login":"friedmud","id":870705,"avatar_url":"https://avatars.githubusercontent.com/u/870705?v=3","gravatar_id":"","url":"https://api.github.com/users/friedmud","html_url":"https://github.com/friedmud","followers_url":"https://api.github.com/users/friedmud/followers","following_url":"https://api.github.com/users/friedmud/following{/other_user}","gists_url":"https://api.github.com/users/friedmud/gists{/gist_id}","starred_url":"https://api.github.com/users/friedmud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/friedmud/subscriptions","organizations_url":"https://api.github.com/users/friedmud/orgs","repos_url":"https://api.github.com/users/friedmud/repos","events_url":"https://api.github.com/users/friedmud/events{/privacy}","received_events_url":"https://api.github.com/users/friedmud/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T23:16:12Z","updated_at":"2015-03-04T23:16:12Z","body":"What are we trying to optimize here?  The only reason to have a `hasTimeDerivitive()` is for optimization.  Someone needs to produce a profiling run that shows that simply returning `0` from a base class implementation of `timeDerivative()` is taking up a significant chunk of application time before we decide to add something like `hasTimeDerivative()` "}}