{"action":"created","comment":{"url":"https://api.github.com/repos/flow123d/flow123d/pulls/comments/41715097","id":41715097,"diff_hunk":"@@ -466,87 +480,156 @@ void ConvectionTransport::zero_time_step()\n }\n \n \n-\n-void ConvectionTransport::update_solution() {\n-\n-    START_TIMER(\"convection-one step\");\n-\n-\n-    START_TIMER(\"data reinit\");\n-    data_.set_time(time_->step()); // set to the last computed time\n-\n+bool ConvectionTransport::assess_time_constraint(double& time_constraint)\n+{\n     ASSERT(mh_dh, \"Null MH object.\\n\" );\n-    // update matrix and sources if neccessary\n-\n-\n-    if (mh_dh->time_changed() > transport_matrix_time  || data_.porosity.changed()) {\n+    data_.set_time(time_->step()); // set to the last computed time\n+    \n+    START_TIMER(\"data reinit\");\n+    \n+    bool cfl_changed = false;\n+    \n+    // if FLOW or DATA changed ---------------------> recompute transport matrix\n+    if (mh_dh->time_changed() > transport_matrix_time  || data_.porosity.changed())\n+    {\n         create_transport_matrix_mpi();","path":"src/transport/transport.cc","position":360,"original_position":360,"commit_id":"e95b2ff5eeba05264c8895e7c2bf0f2255b46b17","original_commit_id":"e95b2ff5eeba05264c8895e7c2bf0f2255b46b17","user":{"login":"jbrezmorf","id":326204,"avatar_url":"https://avatars.githubusercontent.com/u/326204?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrezmorf","html_url":"https://github.com/jbrezmorf","followers_url":"https://api.github.com/users/jbrezmorf/followers","following_url":"https://api.github.com/users/jbrezmorf/following{/other_user}","gists_url":"https://api.github.com/users/jbrezmorf/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrezmorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrezmorf/subscriptions","organizations_url":"https://api.github.com/users/jbrezmorf/orgs","repos_url":"https://api.github.com/users/jbrezmorf/repos","events_url":"https://api.github.com/users/jbrezmorf/events{/privacy}","received_events_url":"https://api.github.com/users/jbrezmorf/received_events","type":"User","site_admin":false},"body":"This means that we do matrix assembly two times. \r\nWhat about splitting create_transport matrix_mpi into smaller functions (possibly inlined) for different tasks on single element. Then use only necessary parts to get CFL condition (matrix diagonal).","created_at":"2015-10-11T20:39:58Z","updated_at":"2015-10-11T20:39:58Z","html_url":"https://github.com/flow123d/flow123d/pull/438#discussion_r41715097","pull_request_url":"https://api.github.com/repos/flow123d/flow123d/pulls/438","_links":{"self":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/comments/41715097"},"html":{"href":"https://github.com/flow123d/flow123d/pull/438#discussion_r41715097"},"pull_request":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/438"}}},"pull_request":{"url":"https://api.github.com/repos/flow123d/flow123d/pulls/438","id":46417880,"html_url":"https://github.com/flow123d/flow123d/pull/438","diff_url":"https://github.com/flow123d/flow123d/pull/438.diff","patch_url":"https://github.com/flow123d/flow123d/pull/438.patch","issue_url":"https://api.github.com/repos/flow123d/flow123d/issues/438","number":438,"state":"open","locked":false,"title":"Pe cfl","user":{"login":"Paulie14","id":5623808,"avatar_url":"https://avatars.githubusercontent.com/u/5623808?v=3","gravatar_id":"","url":"https://api.github.com/users/Paulie14","html_url":"https://github.com/Paulie14","followers_url":"https://api.github.com/users/Paulie14/followers","following_url":"https://api.github.com/users/Paulie14/following{/other_user}","gists_url":"https://api.github.com/users/Paulie14/gists{/gist_id}","starred_url":"https://api.github.com/users/Paulie14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Paulie14/subscriptions","organizations_url":"https://api.github.com/users/Paulie14/orgs","repos_url":"https://api.github.com/users/Paulie14/repos","events_url":"https://api.github.com/users/Paulie14/events{/privacy}","received_events_url":"https://api.github.com/users/Paulie14/received_events","type":"User","site_admin":false},"body":"- implement sources correctly by the explicit scheme - addition into transport matrix diagonal\r\n- divide assembly and update solution in convection transport\r\n- cfl condition is now limited by sources\r\n- move next_time() at the beginning of update_solution in convection\r\n- add test in test16 for sources cfl condition\r\n- correct test20 with sources, where sources cfl condition was not satisfied\r\n\r\n- partially solves #338 and #339","created_at":"2015-09-30T15:35:18Z","updated_at":"2015-10-11T20:39:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dda49479b0dcdfae67dc589ccb4978d5d80cba4e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flow123d/flow123d/pulls/438/commits","review_comments_url":"https://api.github.com/repos/flow123d/flow123d/pulls/438/comments","review_comment_url":"https://api.github.com/repos/flow123d/flow123d/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flow123d/flow123d/issues/438/comments","statuses_url":"https://api.github.com/repos/flow123d/flow123d/statuses/e95b2ff5eeba05264c8895e7c2bf0f2255b46b17","head":{"label":"flow123d:PE_cfl","ref":"PE_cfl","sha":"e95b2ff5eeba05264c8895e7c2bf0f2255b46b17","user":{"login":"flow123d","id":5418109,"avatar_url":"https://avatars.githubusercontent.com/u/5418109?v=3","gravatar_id":"","url":"https://api.github.com/users/flow123d","html_url":"https://github.com/flow123d","followers_url":"https://api.github.com/users/flow123d/followers","following_url":"https://api.github.com/users/flow123d/following{/other_user}","gists_url":"https://api.github.com/users/flow123d/gists{/gist_id}","starred_url":"https://api.github.com/users/flow123d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flow123d/subscriptions","organizations_url":"https://api.github.com/users/flow123d/orgs","repos_url":"https://api.github.com/users/flow123d/repos","events_url":"https://api.github.com/users/flow123d/events{/privacy}","received_events_url":"https://api.github.com/users/flow123d/received_events","type":"Organization","site_admin":false},"repo":{"id":13628170,"name":"flow123d","full_name":"flow123d/flow123d","owner":{"login":"flow123d","id":5418109,"avatar_url":"https://avatars.githubusercontent.com/u/5418109?v=3","gravatar_id":"","url":"https://api.github.com/users/flow123d","html_url":"https://github.com/flow123d","followers_url":"https://api.github.com/users/flow123d/followers","following_url":"https://api.github.com/users/flow123d/following{/other_user}","gists_url":"https://api.github.com/users/flow123d/gists{/gist_id}","starred_url":"https://api.github.com/users/flow123d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flow123d/subscriptions","organizations_url":"https://api.github.com/users/flow123d/orgs","repos_url":"https://api.github.com/users/flow123d/repos","events_url":"https://api.github.com/users/flow123d/events{/privacy}","received_events_url":"https://api.github.com/users/flow123d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flow123d/flow123d","description":"Main repository of the Flow123d project.","fork":false,"url":"https://api.github.com/repos/flow123d/flow123d","forks_url":"https://api.github.com/repos/flow123d/flow123d/forks","keys_url":"https://api.github.com/repos/flow123d/flow123d/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flow123d/flow123d/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flow123d/flow123d/teams","hooks_url":"https://api.github.com/repos/flow123d/flow123d/hooks","issue_events_url":"https://api.github.com/repos/flow123d/flow123d/issues/events{/number}","events_url":"https://api.github.com/repos/flow123d/flow123d/events","assignees_url":"https://api.github.com/repos/flow123d/flow123d/assignees{/user}","branches_url":"https://api.github.com/repos/flow123d/flow123d/branches{/branch}","tags_url":"https://api.github.com/repos/flow123d/flow123d/tags","blobs_url":"https://api.github.com/repos/flow123d/flow123d/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flow123d/flow123d/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flow123d/flow123d/git/refs{/sha}","trees_url":"https://api.github.com/repos/flow123d/flow123d/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flow123d/flow123d/statuses/{sha}","languages_url":"https://api.github.com/repos/flow123d/flow123d/languages","stargazers_url":"https://api.github.com/repos/flow123d/flow123d/stargazers","contributors_url":"https://api.github.com/repos/flow123d/flow123d/contributors","subscribers_url":"https://api.github.com/repos/flow123d/flow123d/subscribers","subscription_url":"https://api.github.com/repos/flow123d/flow123d/subscription","commits_url":"https://api.github.com/repos/flow123d/flow123d/commits{/sha}","git_commits_url":"https://api.github.com/repos/flow123d/flow123d/git/commits{/sha}","comments_url":"https://api.github.com/repos/flow123d/flow123d/comments{/number}","issue_comment_url":"https://api.github.com/repos/flow123d/flow123d/issues/comments{/number}","contents_url":"https://api.github.com/repos/flow123d/flow123d/contents/{+path}","compare_url":"https://api.github.com/repos/flow123d/flow123d/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flow123d/flow123d/merges","archive_url":"https://api.github.com/repos/flow123d/flow123d/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flow123d/flow123d/downloads","issues_url":"https://api.github.com/repos/flow123d/flow123d/issues{/number}","pulls_url":"https://api.github.com/repos/flow123d/flow123d/pulls{/number}","milestones_url":"https://api.github.com/repos/flow123d/flow123d/milestones{/number}","notifications_url":"https://api.github.com/repos/flow123d/flow123d/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flow123d/flow123d/labels{/name}","releases_url":"https://api.github.com/repos/flow123d/flow123d/releases{/id}","created_at":"2013-10-16T18:56:28Z","updated_at":"2015-08-06T06:10:55Z","pushed_at":"2015-10-11T16:38:37Z","git_url":"git://github.com/flow123d/flow123d.git","ssh_url":"git@github.com:flow123d/flow123d.git","clone_url":"https://github.com/flow123d/flow123d.git","svn_url":"https://github.com/flow123d/flow123d","homepage":"<img> http://dev.nti.tul.cz:8080/job/Flow123d/badge/icon </img>","size":95941,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":118,"forks":3,"open_issues":118,"watchers":3,"default_branch":"master"}},"base":{"label":"flow123d:master","ref":"master","sha":"c1364b9992358a8a01faed305a6a9db42e7d10d6","user":{"login":"flow123d","id":5418109,"avatar_url":"https://avatars.githubusercontent.com/u/5418109?v=3","gravatar_id":"","url":"https://api.github.com/users/flow123d","html_url":"https://github.com/flow123d","followers_url":"https://api.github.com/users/flow123d/followers","following_url":"https://api.github.com/users/flow123d/following{/other_user}","gists_url":"https://api.github.com/users/flow123d/gists{/gist_id}","starred_url":"https://api.github.com/users/flow123d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flow123d/subscriptions","organizations_url":"https://api.github.com/users/flow123d/orgs","repos_url":"https://api.github.com/users/flow123d/repos","events_url":"https://api.github.com/users/flow123d/events{/privacy}","received_events_url":"https://api.github.com/users/flow123d/received_events","type":"Organization","site_admin":false},"repo":{"id":13628170,"name":"flow123d","full_name":"flow123d/flow123d","owner":{"login":"flow123d","id":5418109,"avatar_url":"https://avatars.githubusercontent.com/u/5418109?v=3","gravatar_id":"","url":"https://api.github.com/users/flow123d","html_url":"https://github.com/flow123d","followers_url":"https://api.github.com/users/flow123d/followers","following_url":"https://api.github.com/users/flow123d/following{/other_user}","gists_url":"https://api.github.com/users/flow123d/gists{/gist_id}","starred_url":"https://api.github.com/users/flow123d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flow123d/subscriptions","organizations_url":"https://api.github.com/users/flow123d/orgs","repos_url":"https://api.github.com/users/flow123d/repos","events_url":"https://api.github.com/users/flow123d/events{/privacy}","received_events_url":"https://api.github.com/users/flow123d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flow123d/flow123d","description":"Main repository of the Flow123d project.","fork":false,"url":"https://api.github.com/repos/flow123d/flow123d","forks_url":"https://api.github.com/repos/flow123d/flow123d/forks","keys_url":"https://api.github.com/repos/flow123d/flow123d/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flow123d/flow123d/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flow123d/flow123d/teams","hooks_url":"https://api.github.com/repos/flow123d/flow123d/hooks","issue_events_url":"https://api.github.com/repos/flow123d/flow123d/issues/events{/number}","events_url":"https://api.github.com/repos/flow123d/flow123d/events","assignees_url":"https://api.github.com/repos/flow123d/flow123d/assignees{/user}","branches_url":"https://api.github.com/repos/flow123d/flow123d/branches{/branch}","tags_url":"https://api.github.com/repos/flow123d/flow123d/tags","blobs_url":"https://api.github.com/repos/flow123d/flow123d/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flow123d/flow123d/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flow123d/flow123d/git/refs{/sha}","trees_url":"https://api.github.com/repos/flow123d/flow123d/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flow123d/flow123d/statuses/{sha}","languages_url":"https://api.github.com/repos/flow123d/flow123d/languages","stargazers_url":"https://api.github.com/repos/flow123d/flow123d/stargazers","contributors_url":"https://api.github.com/repos/flow123d/flow123d/contributors","subscribers_url":"https://api.github.com/repos/flow123d/flow123d/subscribers","subscription_url":"https://api.github.com/repos/flow123d/flow123d/subscription","commits_url":"https://api.github.com/repos/flow123d/flow123d/commits{/sha}","git_commits_url":"https://api.github.com/repos/flow123d/flow123d/git/commits{/sha}","comments_url":"https://api.github.com/repos/flow123d/flow123d/comments{/number}","issue_comment_url":"https://api.github.com/repos/flow123d/flow123d/issues/comments{/number}","contents_url":"https://api.github.com/repos/flow123d/flow123d/contents/{+path}","compare_url":"https://api.github.com/repos/flow123d/flow123d/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flow123d/flow123d/merges","archive_url":"https://api.github.com/repos/flow123d/flow123d/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flow123d/flow123d/downloads","issues_url":"https://api.github.com/repos/flow123d/flow123d/issues{/number}","pulls_url":"https://api.github.com/repos/flow123d/flow123d/pulls{/number}","milestones_url":"https://api.github.com/repos/flow123d/flow123d/milestones{/number}","notifications_url":"https://api.github.com/repos/flow123d/flow123d/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flow123d/flow123d/labels{/name}","releases_url":"https://api.github.com/repos/flow123d/flow123d/releases{/id}","created_at":"2013-10-16T18:56:28Z","updated_at":"2015-08-06T06:10:55Z","pushed_at":"2015-10-11T16:38:37Z","git_url":"git://github.com/flow123d/flow123d.git","ssh_url":"git@github.com:flow123d/flow123d.git","clone_url":"https://github.com/flow123d/flow123d.git","svn_url":"https://github.com/flow123d/flow123d","homepage":"<img> http://dev.nti.tul.cz:8080/job/Flow123d/badge/icon </img>","size":95941,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":118,"forks":3,"open_issues":118,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/438"},"html":{"href":"https://github.com/flow123d/flow123d/pull/438"},"issue":{"href":"https://api.github.com/repos/flow123d/flow123d/issues/438"},"comments":{"href":"https://api.github.com/repos/flow123d/flow123d/issues/438/comments"},"review_comments":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/438/comments"},"review_comment":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/438/commits"},"statuses":{"href":"https://api.github.com/repos/flow123d/flow123d/statuses/e95b2ff5eeba05264c8895e7c2bf0f2255b46b17"}}}}