GitHub PullRequestReviewCommentEvent at 2014-11-03 18:39:30
Repository: PFASST
Actor: memmett
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/comments/19753665","id":19753665,"diff_hunk":"@@ -18,49 +18,130 @@ namespace pfasst\n {\n   namespace encap\n   {\n+    using namespace pfasst::quadrature;\n+\n     template<typename time = time_precision>\n     class EncapSweeper\n       : public ISweeper<time>\n     {\n       protected:\n         //! @{\n-        quadrature::IQuadrature<time>* quad;\n+        shared_ptr<IQuadrature<time>> quadrature;\n         shared_ptr<EncapFactory<time>> factory;\n         shared_ptr<Encapsulation<time>> start_state;\n         shared_ptr<Encapsulation<time>> end_state;\n         //! @}\n \n+        //! @{\n+        /**\n+         * Solution values \\\\( U \\\\) at all time nodes of the current iteration.\n+         */\n+        vector<shared_ptr<Encapsulation<time>>> state;\n+\n+        /**\n+         * Solution values \\\\( U \\\\) at all time nodes of the previous iteration.\n+         */\n+        vector<shared_ptr<Encapsulation<time>>> saved_state;\n+\n+        /**\n+         * FAS corrections \\\\( \\\\tau \\\\) at all time nodes of the current iteration.\n+         */\n+        vector<shared_ptr<Encapsulation<time>>> fas_corrections;\n+        //! @}\n+\n       public:\n+\n         //! @{\n-        EncapSweeper()\n-          : quad(nullptr)\n-        {}\n+        /**\n+         * Retrieve solution values of current iteration at time node index `m`.\n+         *\n+         * @param[in] m 0-based index of time node\n+         */\n+        virtual shared_ptr<Encapsulation<time>> get_state(size_t m) const\n+        {\n+          return this->state[m];\n+        }\n \n-        virtual ~EncapSweeper()\n+        /**\n+         * Retrieve FAS correction of current iteration at time node index `m`.\n+         *\n+         * @param[in] m 0-based index of time node\n+         */\n+        virtual shared_ptr<Encapsulation<time>> get_tau(size_t m) const\n+        {\n+          return this->fas_corrections[m];\n+        }\n+\n+        /**\n+         * Retrieve solution values of previous iteration at time node index `m`.\n+         *\n+         * @param[in] m 0-based index of time node\n+         */\n+        virtual shared_ptr<Encapsulation<time>> get_saved_state(size_t m) const\n         {\n-          if (this->quad) delete this->quad;\n+          return this->saved_state[m];\n         }\n         //! @}\n \n+        virtual void setup(bool coarse) override\n+        {\n+          auto const nodes = this->get_quadrature()->get_nodes();\n+          auto const num_nodes = this->get_quadrature()->get_num_nodes();\n+\n+          this->start_state = this->get_factory()->create(pfasst::encap::solution);\n+          this->end_state = this->get_factory()->create(pfasst::encap::solution);\n+\n+          for (size_t m = 0; m < num_nodes; m++) {\n+            this->state.push_back(this->get_factory()->create(pfasst::encap::solution));\n+            if (coarse) {\n+              this->saved_state.push_back(this->get_factory()->create(pfasst::encap::solution));\n+            }\n+          }\n+\n+          if (coarse) {\n+            size_t num_fas = this->get_quadrature()->left_is_node() ? num_nodes -1 : num_nodes;\n+            for (size_t m = 0; m < num_fas; m++) {\n+              this->fas_corrections.push_back(this->get_factory()->create(pfasst::encap::solution));\n+            }\n+          }\n+\n+        }\n+\n         //! @{\n         virtual void spread() override\n         {\n-          for (size_t m = 1; m < this->quad->get_num_nodes(); m++) {\n+          for (size_t m = 1; m < this->get_quadrature()->get_num_nodes(); m++) {\n             //            this->get_state(m)->copy(this->start_state);\n-            this->get_state(m)->copy(this->get_state(0));\n+            this->get_state(m)->copy(this->state[0]);","path":"include/pfasst/encap/encap_sweeper.hpp","position":106,"original_position":106,"commit_id":"aa4c9d5a52273ee0d40b89b2fab506941b99c82c","original_commit_id":"aa4c9d5a52273ee0d40b89b2fab506941b99c82c","user":{"login":"memmett","id":135065,"avatar_url":"https://avatars.githubusercontent.com/u/135065?v=2","gravatar_id":"","url":"https://api.github.com/users/memmett","html_url":"https://github.com/memmett","followers_url":"https://api.github.com/users/memmett/followers","following_url":"https://api.github.com/users/memmett/following{/other_user}","gists_url":"https://api.github.com/users/memmett/gists{/gist_id}","starred_url":"https://api.github.com/users/memmett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memmett/subscriptions","organizations_url":"https://api.github.com/users/memmett/orgs","repos_url":"https://api.github.com/users/memmett/repos","events_url":"https://api.github.com/users/memmett/events{/privacy}","received_events_url":"https://api.github.com/users/memmett/received_events","type":"User","site_admin":false},"body":"Nope -- no good reason!  I'll try to be more consistent.  More news at 11 (http://www.youtube.com/watch?v=M9jtQ3rdLrE)","created_at":"2014-11-03T18:39:30Z","updated_at":"2014-11-03T18:39:30Z","html_url":"https://github.com/Parallel-in-Time/PFASST/pull/110#discussion_r19753665","pull_request_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/comments/19753665"},"html":{"href":"https://github.com/Parallel-in-Time/PFASST/pull/110#discussion_r19753665"},"pull_request":{"href":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/110","id":23742614,"html_url":"https://github.com/Parallel-in-Time/PFASST/pull/110","diff_url":"https://github.com/Parallel-in-Time/PFASST/pull/110.diff","patch_url":"https://github.com/Parallel-in-Time/PFASST/pull/110.patch","issue_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/issues/110","number":110,"state":"open","locked":false,"title":"Use `shared_ptr` for quadrature, move `state` etc to `encap_sweeper`.","user":{"login":"memmett","id":135065,"avatar_url":"https://avatars.githubusercontent.com/u/135065?v=2","gravatar_id":"","url":"https://api.github.com/users/memmett","html_url":"https://github.com/memmett","followers_url":"https://api.github.com/users/memmett/followers","following_url":"https://api.github.com/users/memmett/following{/other_user}","gists_url":"https://api.github.com/users/memmett/gists{/gist_id}","starred_url":"https://api.github.com/users/memmett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memmett/subscriptions","organizations_url":"https://api.github.com/users/memmett/orgs","repos_url":"https://api.github.com/users/memmett/repos","events_url":"https://api.github.com/users/memmett/events{/privacy}","received_events_url":"https://api.github.com/users/memmett/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-11-03T04:23:53Z","updated_at":"2014-11-03T18:39:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"426ab02f3c2e5d71a1b64bcb5066cb2dffef4ed2","assignee":null,"milestone":{"url":"https://api.github.com/repos/Parallel-in-Time/PFASST/milestones/3","labels_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/milestones/3/labels","id":732317,"number":3,"title":"Release 0.3.0","description":"","creator":{"login":"memmett","id":135065,"avatar_url":"https://avatars.githubusercontent.com/u/135065?v=2","gravatar_id":"","url":"https://api.github.com/users/memmett","html_url":"https://github.com/memmett","followers_url":"https://api.github.com/users/memmett/followers","following_url":"https://api.github.com/users/memmett/following{/other_user}","gists_url":"https://api.github.com/users/memmett/gists{/gist_id}","starred_url":"https://api.github.com/users/memmett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memmett/subscriptions","organizations_url":"https://api.github.com/users/memmett/orgs","repos_url":"https://api.github.com/users/memmett/repos","events_url":"https://api.github.com/users/memmett/events{/privacy}","received_events_url":"https://api.github.com/users/memmett/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":25,"state":"open","created_at":"2014-07-25T16:50:03Z","updated_at":"2014-11-03T14:34:47Z","due_on":null},"commits_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/110/commits","review_comments_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/110/comments","review_comment_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/issues/110/comments","statuses_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/statuses/aa4c9d5a52273ee0d40b89b2fab506941b99c82c","head":{"label":"memmett:feature/movestate","ref":"feature/movestate","sha":"aa4c9d5a52273ee0d40b89b2fab506941b99c82c","user":{"login":"memmett","id":135065,"avatar_url":"https://avatars.githubusercontent.com/u/135065?v=2","gravatar_id":"","url":"https://api.github.com/users/memmett","html_url":"https://github.com/memmett","followers_url":"https://api.github.com/users/memmett/followers","following_url":"https://api.github.com/users/memmett/following{/other_user}","gists_url":"https://api.github.com/users/memmett/gists{/gist_id}","starred_url":"https://api.github.com/users/memmett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memmett/subscriptions","organizations_url":"https://api.github.com/users/memmett/orgs","repos_url":"https://api.github.com/users/memmett/repos","events_url":"https://api.github.com/users/memmett/events{/privacy}","received_events_url":"https://api.github.com/users/memmett/received_events","type":"User","site_admin":false},"repo":{"id":21139564,"name":"PFASST","full_name":"memmett/PFASST","owner":{"login":"memmett","id":135065,"avatar_url":"https://avatars.githubusercontent.com/u/135065?v=2","gravatar_id":"","url":"https://api.github.com/users/memmett","html_url":"https://github.com/memmett","followers_url":"https://api.github.com/users/memmett/followers","following_url":"https://api.github.com/users/memmett/following{/other_user}","gists_url":"https://api.github.com/users/memmett/gists{/gist_id}","starred_url":"https://api.github.com/users/memmett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memmett/subscriptions","organizations_url":"https://api.github.com/users/memmett/orgs","repos_url":"https://api.github.com/users/memmett/repos","events_url":"https://api.github.com/users/memmett/events{/privacy}","received_events_url":"https://api.github.com/users/memmett/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/memmett/PFASST","description":"C++ PFASST","fork":true,"url":"https://api.github.com/repos/memmett/PFASST","forks_url":"https://api.github.com/repos/memmett/PFASST/forks","keys_url":"https://api.github.com/repos/memmett/PFASST/keys{/key_id}","collaborators_url":"https://api.github.com/repos/memmett/PFASST/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/memmett/PFASST/teams","hooks_url":"https://api.github.com/repos/memmett/PFASST/hooks","issue_events_url":"https://api.github.com/repos/memmett/PFASST/issues/events{/number}","events_url":"https://api.github.com/repos/memmett/PFASST/events","assignees_url":"https://api.github.com/repos/memmett/PFASST/assignees{/user}","branches_url":"https://api.github.com/repos/memmett/PFASST/branches{/branch}","tags_url":"https://api.github.com/repos/memmett/PFASST/tags","blobs_url":"https://api.github.com/repos/memmett/PFASST/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/memmett/PFASST/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/memmett/PFASST/git/refs{/sha}","trees_url":"https://api.github.com/repos/memmett/PFASST/git/trees{/sha}","statuses_url":"https://api.github.com/repos/memmett/PFASST/statuses/{sha}","languages_url":"https://api.github.com/repos/memmett/PFASST/languages","stargazers_url":"https://api.github.com/repos/memmett/PFASST/stargazers","contributors_url":"https://api.github.com/repos/memmett/PFASST/contributors","subscribers_url":"https://api.github.com/repos/memmett/PFASST/subscribers","subscription_url":"https://api.github.com/repos/memmett/PFASST/subscription","commits_url":"https://api.github.com/repos/memmett/PFASST/commits{/sha}","git_commits_url":"https://api.github.com/repos/memmett/PFASST/git/commits{/sha}","comments_url":"https://api.github.com/repos/memmett/PFASST/comments{/number}","issue_comment_url":"https://api.github.com/repos/memmett/PFASST/issues/comments/{number}","contents_url":"https://api.github.com/repos/memmett/PFASST/contents/{+path}","compare_url":"https://api.github.com/repos/memmett/PFASST/compare/{base}...{head}","merges_url":"https://api.github.com/repos/memmett/PFASST/merges","archive_url":"https://api.github.com/repos/memmett/PFASST/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/memmett/PFASST/downloads","issues_url":"https://api.github.com/repos/memmett/PFASST/issues{/number}","pulls_url":"https://api.github.com/repos/memmett/PFASST/pulls{/number}","milestones_url":"https://api.github.com/repos/memmett/PFASST/milestones{/number}","notifications_url":"https://api.github.com/repos/memmett/PFASST/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/memmett/PFASST/labels{/name}","releases_url":"https://api.github.com/repos/memmett/PFASST/releases{/id}","created_at":"2014-06-23T19:36:28Z","updated_at":"2014-09-16T08:45:16Z","pushed_at":"2014-11-03T04:23:09Z","git_url":"git://github.com/memmett/PFASST.git","ssh_url":"git@github.com:memmett/PFASST.git","clone_url":"https://github.com/memmett/PFASST.git","svn_url":"https://github.com/memmett/PFASST","homepage":null,"size":1660,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"Parallel-in-Time:development","ref":"development","sha":"8f88555ab250a38f6ae1e800c2b46f436949235a","user":{"login":"Parallel-in-Time","id":7485951,"avatar_url":"https://avatars.githubusercontent.com/u/7485951?v=2","gravatar_id":"","url":"https://api.github.com/users/Parallel-in-Time","html_url":"https://github.com/Parallel-in-Time","followers_url":"https://api.github.com/users/Parallel-in-Time/followers","following_url":"https://api.github.com/users/Parallel-in-Time/following{/other_user}","gists_url":"https://api.github.com/users/Parallel-in-Time/gists{/gist_id}","starred_url":"https://api.github.com/users/Parallel-in-Time/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parallel-in-Time/subscriptions","organizations_url":"https://api.github.com/users/Parallel-in-Time/orgs","repos_url":"https://api.github.com/users/Parallel-in-Time/repos","events_url":"https://api.github.com/users/Parallel-in-Time/events{/privacy}","received_events_url":"https://api.github.com/users/Parallel-in-Time/received_events","type":"Organization","site_admin":false},"repo":{"id":20095204,"name":"PFASST","full_name":"Parallel-in-Time/PFASST","owner":{"login":"Parallel-in-Time","id":7485951,"avatar_url":"https://avatars.githubusercontent.com/u/7485951?v=2","gravatar_id":"","url":"https://api.github.com/users/Parallel-in-Time","html_url":"https://github.com/Parallel-in-Time","followers_url":"https://api.github.com/users/Parallel-in-Time/followers","following_url":"https://api.github.com/users/Parallel-in-Time/following{/other_user}","gists_url":"https://api.github.com/users/Parallel-in-Time/gists{/gist_id}","starred_url":"https://api.github.com/users/Parallel-in-Time/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parallel-in-Time/subscriptions","organizations_url":"https://api.github.com/users/Parallel-in-Time/orgs","repos_url":"https://api.github.com/users/Parallel-in-Time/repos","events_url":"https://api.github.com/users/Parallel-in-Time/events{/privacy}","received_events_url":"https://api.github.com/users/Parallel-in-Time/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Parallel-in-Time/PFASST","description":"PFASST++ is a C++ implementation of the \"parallel full approximation scheme in space and time\" (PFASST) algorithm","fork":false,"url":"https://api.github.com/repos/Parallel-in-Time/PFASST","forks_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/forks","keys_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/teams","hooks_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/hooks","issue_events_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/issues/events{/number}","events_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/events","assignees_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/assignees{/user}","branches_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/branches{/branch}","tags_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/tags","blobs_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/git/refs{/sha}","trees_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/statuses/{sha}","languages_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/languages","stargazers_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/stargazers","contributors_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/contributors","subscribers_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/subscribers","subscription_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/subscription","commits_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/commits{/sha}","git_commits_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/git/commits{/sha}","comments_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/comments{/number}","issue_comment_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/issues/comments/{number}","contents_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/contents/{+path}","compare_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/merges","archive_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/downloads","issues_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/issues{/number}","pulls_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls{/number}","milestones_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/milestones{/number}","notifications_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/labels{/name}","releases_url":"https://api.github.com/repos/Parallel-in-Time/PFASST/releases{/id}","created_at":"2014-05-23T10:08:41Z","updated_at":"2014-10-30T05:59:49Z","pushed_at":"2014-11-03T14:34:47Z","git_url":"git://github.com/Parallel-in-Time/PFASST.git","ssh_url":"git@github.com:Parallel-in-Time/PFASST.git","clone_url":"https://github.com/Parallel-in-Time/PFASST.git","svn_url":"https://github.com/Parallel-in-Time/PFASST","homepage":"","size":2862,"stargazers_count":5,"watchers_count":5,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":11,"forks":7,"open_issues":11,"watchers":5,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/110"},"html":{"href":"https://github.com/Parallel-in-Time/PFASST/pull/110"},"issue":{"href":"https://api.github.com/repos/Parallel-in-Time/PFASST/issues/110"},"comments":{"href":"https://api.github.com/repos/Parallel-in-Time/PFASST/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Parallel-in-Time/PFASST/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/Parallel-in-Time/PFASST/statuses/aa4c9d5a52273ee0d40b89b2fab506941b99c82c"}}}}