{"action":"created","comment":{"url":"https://api.github.com/repos/libMesh/libmesh/pulls/comments/31823363","id":31823363,"diff_hunk":"@@ -119,6 +119,13 @@ class UnsteadySolver : public TimeSolver\n   virtual Real error_order () const = 0;\n \n   /**\n+   * Returns the maximum order of time derivatives for which the\n+   * UnsteadySolver subclass is capable of handling. E.g. EulerSolver\n+   * will have time_order = 1 and NewmarkSolver will have time_order = 2\n+   */\n+  virtual Real time_order () const = 0;","path":"include/solvers/unsteady_solver.h","position":8,"original_position":8,"commit_id":"53b38bdf43a23d29f5140b01519b4f7af548fd34","original_commit_id":"53b38bdf43a23d29f5140b01519b4f7af548fd34","user":{"login":"roystgnr","id":2367346,"avatar_url":"https://avatars.githubusercontent.com/u/2367346?v=3","gravatar_id":"","url":"https://api.github.com/users/roystgnr","html_url":"https://github.com/roystgnr","followers_url":"https://api.github.com/users/roystgnr/followers","following_url":"https://api.github.com/users/roystgnr/following{/other_user}","gists_url":"https://api.github.com/users/roystgnr/gists{/gist_id}","starred_url":"https://api.github.com/users/roystgnr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roystgnr/subscriptions","organizations_url":"https://api.github.com/users/roystgnr/orgs","repos_url":"https://api.github.com/users/roystgnr/repos","events_url":"https://api.github.com/users/roystgnr/events{/privacy}","received_events_url":"https://api.github.com/users/roystgnr/received_events","type":"User","site_admin":false},"body":"Shouldn't this be returning unsigned int?","created_at":"2015-06-05T15:37:15Z","updated_at":"2015-06-05T15:37:15Z","html_url":"https://github.com/libMesh/libmesh/pull/592#discussion_r31823363","pull_request_url":"https://api.github.com/repos/libMesh/libmesh/pulls/592","_links":{"self":{"href":"https://api.github.com/repos/libMesh/libmesh/pulls/comments/31823363"},"html":{"href":"https://github.com/libMesh/libmesh/pull/592#discussion_r31823363"},"pull_request":{"href":"https://api.github.com/repos/libMesh/libmesh/pulls/592"}}},"pull_request":{"url":"https://api.github.com/repos/libMesh/libmesh/pulls/592","id":37033649,"html_url":"https://github.com/libMesh/libmesh/pull/592","diff_url":"https://github.com/libMesh/libmesh/pull/592.diff","patch_url":"https://github.com/libMesh/libmesh/pull/592.patch","issue_url":"https://api.github.com/repos/libMesh/libmesh/issues/592","number":592,"state":"open","locked":false,"title":"Guards in NewmarkSolver","user":{"login":"pbauman","id":3051555,"avatar_url":"https://avatars.githubusercontent.com/u/3051555?v=3","gravatar_id":"","url":"https://api.github.com/users/pbauman","html_url":"https://github.com/pbauman","followers_url":"https://api.github.com/users/pbauman/followers","following_url":"https://api.github.com/users/pbauman/following{/other_user}","gists_url":"https://api.github.com/users/pbauman/gists{/gist_id}","starred_url":"https://api.github.com/users/pbauman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbauman/subscriptions","organizations_url":"https://api.github.com/users/pbauman/orgs","repos_url":"https://api.github.com/users/pbauman/repos","events_url":"https://api.github.com/users/pbauman/events{/privacy}","received_events_url":"https://api.github.com/users/pbauman/received_events","type":"User","site_admin":false},"body":"The primary purpose of this PR is to add two guards in NewmarkSolver that were discussed in #582, namely only build the elem_solution_rate/accel (in DiffContext) if we need it and to force the user to set the initial acceleration either by directly projecting it or computing it using the helper method.\r\n\r\nThe changes for the latter guard are straight forward and are in 53b38bd.\r\n\r\nChanges for the former ended up being a bit more involved because I can't help myself. The underlying idea is to add a `time_order()` method that we can query to figure out if we need rates and, possibly, acceleration. It occurred to me that I could've made the second order solver stuff more extensible. So, I ended up making intermediate classes for first order and second order (in time) solvers. The first order one just holds the `time_order()`. I could see the argument for just having `UnsteadySolver` default to 1 and override in the `SecondOrderUnsteadySolver`, but I think have the intermediate is more self-documenting. I moved common functionality out of `NewmarkSolver` into `SecondOrderUnsteadySolver`. After that preliminary work, `time_order()` was made pure virtual in `UnsteadySolver` and we can query it from there (see log for f2bb932 on why I chose this). All that was the first 7 commits in this PR. \r\n\r\nAfter that is the only-build-rate-structures-if-they're-needed (dd287bb). I welcome suggestions - those (a little) lengthy checks were repeated 3 times for different operations on those data structures in 3 different places; felt dirty and wrong.","created_at":"2015-06-05T13:59:11Z","updated_at":"2015-06-05T15:37:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7b148e77b573be238be57cc9c95d3924f38e952","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/libMesh/libmesh/pulls/592/commits","review_comments_url":"https://api.github.com/repos/libMesh/libmesh/pulls/592/comments","review_comment_url":"https://api.github.com/repos/libMesh/libmesh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libMesh/libmesh/issues/592/comments","statuses_url":"https://api.github.com/repos/libMesh/libmesh/statuses/53b38bdf43a23d29f5140b01519b4f7af548fd34","head":{"label":"pbauman:rate-accel-resize","ref":"rate-accel-resize","sha":"53b38bdf43a23d29f5140b01519b4f7af548fd34","user":{"login":"pbauman","id":3051555,"avatar_url":"https://avatars.githubusercontent.com/u/3051555?v=3","gravatar_id":"","url":"https://api.github.com/users/pbauman","html_url":"https://github.com/pbauman","followers_url":"https://api.github.com/users/pbauman/followers","following_url":"https://api.github.com/users/pbauman/following{/other_user}","gists_url":"https://api.github.com/users/pbauman/gists{/gist_id}","starred_url":"https://api.github.com/users/pbauman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbauman/subscriptions","organizations_url":"https://api.github.com/users/pbauman/orgs","repos_url":"https://api.github.com/users/pbauman/repos","events_url":"https://api.github.com/users/pbauman/events{/privacy}","received_events_url":"https://api.github.com/users/pbauman/received_events","type":"User","site_admin":false},"repo":{"id":7212716,"name":"libmesh","full_name":"pbauman/libmesh","owner":{"login":"pbauman","id":3051555,"avatar_url":"https://avatars.githubusercontent.com/u/3051555?v=3","gravatar_id":"","url":"https://api.github.com/users/pbauman","html_url":"https://github.com/pbauman","followers_url":"https://api.github.com/users/pbauman/followers","following_url":"https://api.github.com/users/pbauman/following{/other_user}","gists_url":"https://api.github.com/users/pbauman/gists{/gist_id}","starred_url":"https://api.github.com/users/pbauman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbauman/subscriptions","organizations_url":"https://api.github.com/users/pbauman/orgs","repos_url":"https://api.github.com/users/pbauman/repos","events_url":"https://api.github.com/users/pbauman/events{/privacy}","received_events_url":"https://api.github.com/users/pbauman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pbauman/libmesh","description":"libMesh github repository","fork":true,"url":"https://api.github.com/repos/pbauman/libmesh","forks_url":"https://api.github.com/repos/pbauman/libmesh/forks","keys_url":"https://api.github.com/repos/pbauman/libmesh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pbauman/libmesh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pbauman/libmesh/teams","hooks_url":"https://api.github.com/repos/pbauman/libmesh/hooks","issue_events_url":"https://api.github.com/repos/pbauman/libmesh/issues/events{/number}","events_url":"https://api.github.com/repos/pbauman/libmesh/events","assignees_url":"https://api.github.com/repos/pbauman/libmesh/assignees{/user}","branches_url":"https://api.github.com/repos/pbauman/libmesh/branches{/branch}","tags_url":"https://api.github.com/repos/pbauman/libmesh/tags","blobs_url":"https://api.github.com/repos/pbauman/libmesh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pbauman/libmesh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pbauman/libmesh/git/refs{/sha}","trees_url":"https://api.github.com/repos/pbauman/libmesh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pbauman/libmesh/statuses/{sha}","languages_url":"https://api.github.com/repos/pbauman/libmesh/languages","stargazers_url":"https://api.github.com/repos/pbauman/libmesh/stargazers","contributors_url":"https://api.github.com/repos/pbauman/libmesh/contributors","subscribers_url":"https://api.github.com/repos/pbauman/libmesh/subscribers","subscription_url":"https://api.github.com/repos/pbauman/libmesh/subscription","commits_url":"https://api.github.com/repos/pbauman/libmesh/commits{/sha}","git_commits_url":"https://api.github.com/repos/pbauman/libmesh/git/commits{/sha}","comments_url":"https://api.github.com/repos/pbauman/libmesh/comments{/number}","issue_comment_url":"https://api.github.com/repos/pbauman/libmesh/issues/comments{/number}","contents_url":"https://api.github.com/repos/pbauman/libmesh/contents/{+path}","compare_url":"https://api.github.com/repos/pbauman/libmesh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pbauman/libmesh/merges","archive_url":"https://api.github.com/repos/pbauman/libmesh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pbauman/libmesh/downloads","issues_url":"https://api.github.com/repos/pbauman/libmesh/issues{/number}","pulls_url":"https://api.github.com/repos/pbauman/libmesh/pulls{/number}","milestones_url":"https://api.github.com/repos/pbauman/libmesh/milestones{/number}","notifications_url":"https://api.github.com/repos/pbauman/libmesh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pbauman/libmesh/labels{/name}","releases_url":"https://api.github.com/repos/pbauman/libmesh/releases{/id}","created_at":"2012-12-17T21:37:49Z","updated_at":"2015-04-07T13:45:54Z","pushed_at":"2015-06-05T13:36:47Z","git_url":"git://github.com/pbauman/libmesh.git","ssh_url":"git@github.com:pbauman/libmesh.git","clone_url":"https://github.com/pbauman/libmesh.git","svn_url":"https://github.com/pbauman/libmesh","homepage":"http://libmesh.sourceforge.net","size":72799,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"libMesh:master","ref":"master","sha":"ff6e61828fddf7dfa3fff59fe1061d1ac0dc1882","user":{"login":"libMesh","id":2366757,"avatar_url":"https://avatars.githubusercontent.com/u/2366757?v=3","gravatar_id":"","url":"https://api.github.com/users/libMesh","html_url":"https://github.com/libMesh","followers_url":"https://api.github.com/users/libMesh/followers","following_url":"https://api.github.com/users/libMesh/following{/other_user}","gists_url":"https://api.github.com/users/libMesh/gists{/gist_id}","starred_url":"https://api.github.com/users/libMesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libMesh/subscriptions","organizations_url":"https://api.github.com/users/libMesh/orgs","repos_url":"https://api.github.com/users/libMesh/repos","events_url":"https://api.github.com/users/libMesh/events{/privacy}","received_events_url":"https://api.github.com/users/libMesh/received_events","type":"Organization","site_admin":false},"repo":{"id":5850234,"name":"libmesh","full_name":"libMesh/libmesh","owner":{"login":"libMesh","id":2366757,"avatar_url":"https://avatars.githubusercontent.com/u/2366757?v=3","gravatar_id":"","url":"https://api.github.com/users/libMesh","html_url":"https://github.com/libMesh","followers_url":"https://api.github.com/users/libMesh/followers","following_url":"https://api.github.com/users/libMesh/following{/other_user}","gists_url":"https://api.github.com/users/libMesh/gists{/gist_id}","starred_url":"https://api.github.com/users/libMesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libMesh/subscriptions","organizations_url":"https://api.github.com/users/libMesh/orgs","repos_url":"https://api.github.com/users/libMesh/repos","events_url":"https://api.github.com/users/libMesh/events{/privacy}","received_events_url":"https://api.github.com/users/libMesh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libMesh/libmesh","description":"libMesh github repository","fork":false,"url":"https://api.github.com/repos/libMesh/libmesh","forks_url":"https://api.github.com/repos/libMesh/libmesh/forks","keys_url":"https://api.github.com/repos/libMesh/libmesh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libMesh/libmesh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libMesh/libmesh/teams","hooks_url":"https://api.github.com/repos/libMesh/libmesh/hooks","issue_events_url":"https://api.github.com/repos/libMesh/libmesh/issues/events{/number}","events_url":"https://api.github.com/repos/libMesh/libmesh/events","assignees_url":"https://api.github.com/repos/libMesh/libmesh/assignees{/user}","branches_url":"https://api.github.com/repos/libMesh/libmesh/branches{/branch}","tags_url":"https://api.github.com/repos/libMesh/libmesh/tags","blobs_url":"https://api.github.com/repos/libMesh/libmesh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libMesh/libmesh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libMesh/libmesh/git/refs{/sha}","trees_url":"https://api.github.com/repos/libMesh/libmesh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libMesh/libmesh/statuses/{sha}","languages_url":"https://api.github.com/repos/libMesh/libmesh/languages","stargazers_url":"https://api.github.com/repos/libMesh/libmesh/stargazers","contributors_url":"https://api.github.com/repos/libMesh/libmesh/contributors","subscribers_url":"https://api.github.com/repos/libMesh/libmesh/subscribers","subscription_url":"https://api.github.com/repos/libMesh/libmesh/subscription","commits_url":"https://api.github.com/repos/libMesh/libmesh/commits{/sha}","git_commits_url":"https://api.github.com/repos/libMesh/libmesh/git/commits{/sha}","comments_url":"https://api.github.com/repos/libMesh/libmesh/comments{/number}","issue_comment_url":"https://api.github.com/repos/libMesh/libmesh/issues/comments{/number}","contents_url":"https://api.github.com/repos/libMesh/libmesh/contents/{+path}","compare_url":"https://api.github.com/repos/libMesh/libmesh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libMesh/libmesh/merges","archive_url":"https://api.github.com/repos/libMesh/libmesh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libMesh/libmesh/downloads","issues_url":"https://api.github.com/repos/libMesh/libmesh/issues{/number}","pulls_url":"https://api.github.com/repos/libMesh/libmesh/pulls{/number}","milestones_url":"https://api.github.com/repos/libMesh/libmesh/milestones{/number}","notifications_url":"https://api.github.com/repos/libMesh/libmesh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libMesh/libmesh/labels{/name}","releases_url":"https://api.github.com/repos/libMesh/libmesh/releases{/id}","created_at":"2012-09-18T02:12:18Z","updated_at":"2015-05-18T15:46:12Z","pushed_at":"2015-06-05T15:29:08Z","git_url":"git://github.com/libMesh/libmesh.git","ssh_url":"git@github.com:libMesh/libmesh.git","clone_url":"https://github.com/libMesh/libmesh.git","svn_url":"https://github.com/libMesh/libmesh","homepage":"http://libmesh.github.io","size":146173,"stargazers_count":75,"watchers_count":75,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"open_issues_count":27,"forks":69,"open_issues":27,"watchers":75,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libMesh/libmesh/pulls/592"},"html":{"href":"https://github.com/libMesh/libmesh/pull/592"},"issue":{"href":"https://api.github.com/repos/libMesh/libmesh/issues/592"},"comments":{"href":"https://api.github.com/repos/libMesh/libmesh/issues/592/comments"},"review_comments":{"href":"https://api.github.com/repos/libMesh/libmesh/pulls/592/comments"},"review_comment":{"href":"https://api.github.com/repos/libMesh/libmesh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libMesh/libmesh/pulls/592/commits"},"statuses":{"href":"https://api.github.com/repos/libMesh/libmesh/statuses/53b38bdf43a23d29f5140b01519b4f7af548fd34"}}}}