{"action":"created","comment":{"url":"https://api.github.com/repos/idaholab/moose/pulls/comments/89857383","pull_request_review_id":10389083,"id":89857383,"diff_hunk":"@@ -0,0 +1,226 @@\n+/****************************************************************/\n+/*               DO NOT MODIFY THIS HEADER                      */\n+/* MOOSE - Multiphysics Object Oriented Simulation Environment  */\n+/*                                                              */\n+/*           (c) 2010 Battelle Energy Alliance, LLC             */\n+/*                   ALL RIGHTS RESERVED                        */\n+/*                                                              */\n+/*          Prepared by Battelle Energy Alliance, LLC           */\n+/*            Under Contract No. DE-AC07-05ID14517              */\n+/*            With the U. S. Department of Energy               */\n+/*                                                              */\n+/*            See COPYRIGHT for full restrictions               */\n+/****************************************************************/\n+\n+#include \"BicubicSplineInterpolation.h\"\n+#include \"MooseError.h\"\n+\n+int BicubicSplineInterpolation::_file_number = 0;\n+\n+BicubicSplineInterpolation::BicubicSplineInterpolation()\n+{\n+}\n+\n+BicubicSplineInterpolation::BicubicSplineInterpolation(const std::vector<Real> & x1, const std::vector<Real> & x2, const std::vector<std::vector<Real> > & y, const std::vector<Real> & yx11, const std::vector<Real> & yx1n, const std::vector<Real> & yx21, const std::vector<Real> & yx2n) :\n+    SplineInterpolationBase(),\n+    _x1(x1),\n+    _x2(x2),\n+    _y(y),\n+    _yx11(yx11),\n+    _yx1n(yx1n),\n+    _yx21(yx21),\n+    _yx2n(yx2n)\n+{\n+  errorCheck();\n+  solve();\n+}\n+\n+void\n+BicubicSplineInterpolation::setData(const std::vector<Real> & x1, const std::vector<Real> & x2, const std::vector<std::vector<Real> > & y, const std::vector<Real> & yx11, const std::vector<Real> & yx1n, const std::vector<Real> & yx21, const std::vector<Real> & yx2n)\n+{\n+  _x1 = x1;\n+  _x2 = x2;\n+  _y = y;\n+  _yx11 = yx11;\n+  _yx1n = yx1n;\n+  _yx21 = yx21;\n+  _yx2n = yx2n;\n+  errorCheck();\n+  solve();\n+}\n+\n+void\n+BicubicSplineInterpolation::errorCheck()\n+{\n+  unsigned int m = _x1.size(), n = _x2.size();\n+\n+  if (_y.size() != m)\n+    mooseError(\"y row dimension does not match the size of x1.\");\n+  else\n+    for (int i = 0; i < _y.size(); ++i)\n+      if (_y[i].size() != n)\n+        mooseError(\"y column dimension does not match the size of x2.\");\n+\n+  if (_yx11.empty())\n+    _yx11.resize(n, 1e30);","path":"framework/src/utils/BicubicSplineInterpolation.C","position":65,"original_position":65,"commit_id":"efa1548ed6070501e4082869258d2d4ebec5608b","original_commit_id":"efa1548ed6070501e4082869258d2d4ebec5608b","user":{"login":"lindsayad","id":10248304,"avatar_url":"https://avatars.githubusercontent.com/u/10248304?v=3","gravatar_id":"","url":"https://api.github.com/users/lindsayad","html_url":"https://github.com/lindsayad","followers_url":"https://api.github.com/users/lindsayad/followers","following_url":"https://api.github.com/users/lindsayad/following{/other_user}","gists_url":"https://api.github.com/users/lindsayad/gists{/gist_id}","starred_url":"https://api.github.com/users/lindsayad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindsayad/subscriptions","organizations_url":"https://api.github.com/users/lindsayad/orgs","repos_url":"https://api.github.com/users/lindsayad/repos","events_url":"https://api.github.com/users/lindsayad/events{/privacy}","received_events_url":"https://api.github.com/users/lindsayad/received_events","type":"User","site_admin":false},"body":"Yea, it seemed like the most natural place to put it though and I didn't want to change the method name. If you have a preferred way to do it though, I can definitely do it that way","created_at":"2016-11-28T19:15:02Z","updated_at":"2016-11-28T19:15:02Z","html_url":"https://github.com/idaholab/moose/pull/8126#discussion_r89857383","pull_request_url":"https://api.github.com/repos/idaholab/moose/pulls/8126","_links":{"self":{"href":"https://api.github.com/repos/idaholab/moose/pulls/comments/89857383"},"html":{"href":"https://github.com/idaholab/moose/pull/8126#discussion_r89857383"},"pull_request":{"href":"https://api.github.com/repos/idaholab/moose/pulls/8126"}}},"pull_request":{"url":"https://api.github.com/repos/idaholab/moose/pulls/8126","id":95344268,"html_url":"https://github.com/idaholab/moose/pull/8126","diff_url":"https://github.com/idaholab/moose/pull/8126.diff","patch_url":"https://github.com/idaholab/moose/pull/8126.patch","issue_url":"https://api.github.com/repos/idaholab/moose/issues/8126","number":8126,"state":"open","locked":false,"title":"Implement bicubic spline interpolator","user":{"login":"lindsayad","id":10248304,"avatar_url":"https://avatars.githubusercontent.com/u/10248304?v=3","gravatar_id":"","url":"https://api.github.com/users/lindsayad","html_url":"https://github.com/lindsayad","followers_url":"https://api.github.com/users/lindsayad/followers","following_url":"https://api.github.com/users/lindsayad/following{/other_user}","gists_url":"https://api.github.com/users/lindsayad/gists{/gist_id}","starred_url":"https://api.github.com/users/lindsayad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindsayad/subscriptions","organizations_url":"https://api.github.com/users/lindsayad/orgs","repos_url":"https://api.github.com/users/lindsayad/repos","events_url":"https://api.github.com/users/lindsayad/events{/privacy}","received_events_url":"https://api.github.com/users/lindsayad/received_events","type":"User","site_admin":false},"body":"- Added new class SplineInterpolationBase from which both SplineInterpolation and BicubicSplineInterpolation inherit\r\n- Added BicubicSplineFunction which takes x1, x2, and y arguments. Also optionally takes arguments which can supply first derivatives at the bounds of the spline interpolation grid\r\n- Added test which shows a bicubic spline exactly reproducing an analytical bicubic function.\r\n    - Can remove the supplied first derivative arguments which will remove the agreement between the spline and analytic functions (this is the desired behavior)\r\n\r\nAddresses #8109 \r\n\r\n### Relevant figures:\r\n\r\n- Nodal values are the solution values (corresponding to function x^3 + 2*y^3)\r\n\r\n![bicubic-spline-test-u](https://cloud.githubusercontent.com/assets/10248304/20634554/4f59f294-b307-11e6-81fb-54ab8f4acfff.png)\r\n\r\n- Nodal values are the values of the bicubic spline function (matches the solution values)\r\n\r\n![bicubic-spline-test-spline-func-value](https://cloud.githubusercontent.com/assets/10248304/20634553/4f593b6a-b307-11e6-8145-aaf2f7e8e3ce.png)\r\n\r\n- Nodal values are the values of the bicubic spline function when the first derivatives are not supplied at the boundaries of the spline interpolation. Interpolated values don't agree exactly with solution (and they shouldn't since now we are assuming natural splines)\r\n\r\n![bicubic-spline-test-spline-func-value-no-first-derivs](https://cloud.githubusercontent.com/assets/10248304/20634552/4f587c02-b307-11e6-80ec-724aef5a71db.png)\r\n\r\n\r\n","created_at":"2016-11-25T20:04:54Z","updated_at":"2016-11-28T19:15:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"680e1fad553309b63e0502bbd0371c8e6c2b1f05","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/idaholab/moose/pulls/8126/commits","review_comments_url":"https://api.github.com/repos/idaholab/moose/pulls/8126/comments","review_comment_url":"https://api.github.com/repos/idaholab/moose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/idaholab/moose/issues/8126/comments","statuses_url":"https://api.github.com/repos/idaholab/moose/statuses/efa1548ed6070501e4082869258d2d4ebec5608b","head":{"label":"lindsayad:bicubic_spline","ref":"bicubic_spline","sha":"efa1548ed6070501e4082869258d2d4ebec5608b","user":{"login":"lindsayad","id":10248304,"avatar_url":"https://avatars.githubusercontent.com/u/10248304?v=3","gravatar_id":"","url":"https://api.github.com/users/lindsayad","html_url":"https://github.com/lindsayad","followers_url":"https://api.github.com/users/lindsayad/followers","following_url":"https://api.github.com/users/lindsayad/following{/other_user}","gists_url":"https://api.github.com/users/lindsayad/gists{/gist_id}","starred_url":"https://api.github.com/users/lindsayad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindsayad/subscriptions","organizations_url":"https://api.github.com/users/lindsayad/orgs","repos_url":"https://api.github.com/users/lindsayad/repos","events_url":"https://api.github.com/users/lindsayad/events{/privacy}","received_events_url":"https://api.github.com/users/lindsayad/received_events","type":"User","site_admin":false},"repo":{"id":45877148,"name":"moose","full_name":"lindsayad/moose","owner":{"login":"lindsayad","id":10248304,"avatar_url":"https://avatars.githubusercontent.com/u/10248304?v=3","gravatar_id":"","url":"https://api.github.com/users/lindsayad","html_url":"https://github.com/lindsayad","followers_url":"https://api.github.com/users/lindsayad/followers","following_url":"https://api.github.com/users/lindsayad/following{/other_user}","gists_url":"https://api.github.com/users/lindsayad/gists{/gist_id}","starred_url":"https://api.github.com/users/lindsayad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindsayad/subscriptions","organizations_url":"https://api.github.com/users/lindsayad/orgs","repos_url":"https://api.github.com/users/lindsayad/repos","events_url":"https://api.github.com/users/lindsayad/events{/privacy}","received_events_url":"https://api.github.com/users/lindsayad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lindsayad/moose","description":"Multiphysics Object Oriented Simulation Environment","fork":true,"url":"https://api.github.com/repos/lindsayad/moose","forks_url":"https://api.github.com/repos/lindsayad/moose/forks","keys_url":"https://api.github.com/repos/lindsayad/moose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lindsayad/moose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lindsayad/moose/teams","hooks_url":"https://api.github.com/repos/lindsayad/moose/hooks","issue_events_url":"https://api.github.com/repos/lindsayad/moose/issues/events{/number}","events_url":"https://api.github.com/repos/lindsayad/moose/events","assignees_url":"https://api.github.com/repos/lindsayad/moose/assignees{/user}","branches_url":"https://api.github.com/repos/lindsayad/moose/branches{/branch}","tags_url":"https://api.github.com/repos/lindsayad/moose/tags","blobs_url":"https://api.github.com/repos/lindsayad/moose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lindsayad/moose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lindsayad/moose/git/refs{/sha}","trees_url":"https://api.github.com/repos/lindsayad/moose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lindsayad/moose/statuses/{sha}","languages_url":"https://api.github.com/repos/lindsayad/moose/languages","stargazers_url":"https://api.github.com/repos/lindsayad/moose/stargazers","contributors_url":"https://api.github.com/repos/lindsayad/moose/contributors","subscribers_url":"https://api.github.com/repos/lindsayad/moose/subscribers","subscription_url":"https://api.github.com/repos/lindsayad/moose/subscription","commits_url":"https://api.github.com/repos/lindsayad/moose/commits{/sha}","git_commits_url":"https://api.github.com/repos/lindsayad/moose/git/commits{/sha}","comments_url":"https://api.github.com/repos/lindsayad/moose/comments{/number}","issue_comment_url":"https://api.github.com/repos/lindsayad/moose/issues/comments{/number}","contents_url":"https://api.github.com/repos/lindsayad/moose/contents/{+path}","compare_url":"https://api.github.com/repos/lindsayad/moose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lindsayad/moose/merges","archive_url":"https://api.github.com/repos/lindsayad/moose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lindsayad/moose/downloads","issues_url":"https://api.github.com/repos/lindsayad/moose/issues{/number}","pulls_url":"https://api.github.com/repos/lindsayad/moose/pulls{/number}","milestones_url":"https://api.github.com/repos/lindsayad/moose/milestones{/number}","notifications_url":"https://api.github.com/repos/lindsayad/moose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lindsayad/moose/labels{/name}","releases_url":"https://api.github.com/repos/lindsayad/moose/releases{/id}","deployments_url":"https://api.github.com/repos/lindsayad/moose/deployments","created_at":"2015-11-10T00:44:16Z","updated_at":"2016-01-11T17:39:32Z","pushed_at":"2016-11-26T00:35:28Z","git_url":"git://github.com/lindsayad/moose.git","ssh_url":"git@github.com:lindsayad/moose.git","clone_url":"https://github.com/lindsayad/moose.git","svn_url":"https://github.com/lindsayad/moose","homepage":"http://www.mooseframework.org","size":150809,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"idaholab:devel","ref":"devel","sha":"b51ef5d8f5d1fff565828938c8da0e1c1e945c69","user":{"login":"idaholab","id":3855370,"avatar_url":"https://avatars.githubusercontent.com/u/3855370?v=3","gravatar_id":"","url":"https://api.github.com/users/idaholab","html_url":"https://github.com/idaholab","followers_url":"https://api.github.com/users/idaholab/followers","following_url":"https://api.github.com/users/idaholab/following{/other_user}","gists_url":"https://api.github.com/users/idaholab/gists{/gist_id}","starred_url":"https://api.github.com/users/idaholab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idaholab/subscriptions","organizations_url":"https://api.github.com/users/idaholab/orgs","repos_url":"https://api.github.com/users/idaholab/repos","events_url":"https://api.github.com/users/idaholab/events{/privacy}","received_events_url":"https://api.github.com/users/idaholab/received_events","type":"Organization","site_admin":false},"repo":{"id":16851223,"name":"moose","full_name":"idaholab/moose","owner":{"login":"idaholab","id":3855370,"avatar_url":"https://avatars.githubusercontent.com/u/3855370?v=3","gravatar_id":"","url":"https://api.github.com/users/idaholab","html_url":"https://github.com/idaholab","followers_url":"https://api.github.com/users/idaholab/followers","following_url":"https://api.github.com/users/idaholab/following{/other_user}","gists_url":"https://api.github.com/users/idaholab/gists{/gist_id}","starred_url":"https://api.github.com/users/idaholab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idaholab/subscriptions","organizations_url":"https://api.github.com/users/idaholab/orgs","repos_url":"https://api.github.com/users/idaholab/repos","events_url":"https://api.github.com/users/idaholab/events{/privacy}","received_events_url":"https://api.github.com/users/idaholab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/idaholab/moose","description":"Multiphysics Object Oriented Simulation Environment","fork":false,"url":"https://api.github.com/repos/idaholab/moose","forks_url":"https://api.github.com/repos/idaholab/moose/forks","keys_url":"https://api.github.com/repos/idaholab/moose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/idaholab/moose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/idaholab/moose/teams","hooks_url":"https://api.github.com/repos/idaholab/moose/hooks","issue_events_url":"https://api.github.com/repos/idaholab/moose/issues/events{/number}","events_url":"https://api.github.com/repos/idaholab/moose/events","assignees_url":"https://api.github.com/repos/idaholab/moose/assignees{/user}","branches_url":"https://api.github.com/repos/idaholab/moose/branches{/branch}","tags_url":"https://api.github.com/repos/idaholab/moose/tags","blobs_url":"https://api.github.com/repos/idaholab/moose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/idaholab/moose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/idaholab/moose/git/refs{/sha}","trees_url":"https://api.github.com/repos/idaholab/moose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/idaholab/moose/statuses/{sha}","languages_url":"https://api.github.com/repos/idaholab/moose/languages","stargazers_url":"https://api.github.com/repos/idaholab/moose/stargazers","contributors_url":"https://api.github.com/repos/idaholab/moose/contributors","subscribers_url":"https://api.github.com/repos/idaholab/moose/subscribers","subscription_url":"https://api.github.com/repos/idaholab/moose/subscription","commits_url":"https://api.github.com/repos/idaholab/moose/commits{/sha}","git_commits_url":"https://api.github.com/repos/idaholab/moose/git/commits{/sha}","comments_url":"https://api.github.com/repos/idaholab/moose/comments{/number}","issue_comment_url":"https://api.github.com/repos/idaholab/moose/issues/comments{/number}","contents_url":"https://api.github.com/repos/idaholab/moose/contents/{+path}","compare_url":"https://api.github.com/repos/idaholab/moose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/idaholab/moose/merges","archive_url":"https://api.github.com/repos/idaholab/moose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/idaholab/moose/downloads","issues_url":"https://api.github.com/repos/idaholab/moose/issues{/number}","pulls_url":"https://api.github.com/repos/idaholab/moose/pulls{/number}","milestones_url":"https://api.github.com/repos/idaholab/moose/milestones{/number}","notifications_url":"https://api.github.com/repos/idaholab/moose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/idaholab/moose/labels{/name}","releases_url":"https://api.github.com/repos/idaholab/moose/releases{/id}","deployments_url":"https://api.github.com/repos/idaholab/moose/deployments","created_at":"2014-02-14T22:26:15Z","updated_at":"2016-11-16T10:44:16Z","pushed_at":"2016-11-28T19:05:24Z","git_url":"git://github.com/idaholab/moose.git","ssh_url":"git@github.com:idaholab/moose.git","clone_url":"https://github.com/idaholab/moose.git","svn_url":"https://github.com/idaholab/moose","homepage":"http://www.mooseframework.org","size":168328,"stargazers_count":179,"watchers_count":179,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":303,"mirror_url":null,"open_issues_count":714,"forks":303,"open_issues":714,"watchers":179,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/idaholab/moose/pulls/8126"},"html":{"href":"https://github.com/idaholab/moose/pull/8126"},"issue":{"href":"https://api.github.com/repos/idaholab/moose/issues/8126"},"comments":{"href":"https://api.github.com/repos/idaholab/moose/issues/8126/comments"},"review_comments":{"href":"https://api.github.com/repos/idaholab/moose/pulls/8126/comments"},"review_comment":{"href":"https://api.github.com/repos/idaholab/moose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/idaholab/moose/pulls/8126/commits"},"statuses":{"href":"https://api.github.com/repos/idaholab/moose/statuses/efa1548ed6070501e4082869258d2d4ebec5608b"}}}}
{"actor":{"display_login":"lindsayad"}}