{"action":"created","comment":{"url":"https://api.github.com/repos/flow123d/flow123d/pulls/comments/165923611","pull_request_review_id":92139018,"id":165923611,"diff_hunk":"@@ -38,37 +43,101 @@ const double TimeGovernor::time_step_precision = 16*numeric_limits<double>::epsi\n using namespace Input::Type;\n \n \n+const Tuple & TimeGovernor::get_input_time_type(double lower_bound, double upper_bound)\n+{\n+    return Tuple(\"TimeValue\", \"Value of Field for independent variable.\")\n+        .declare_key(\"time\", Double(lower_bound, upper_bound), Default::obligatory(),\n+                                    \"Numeric value of time.\" )\n+\t\t.declare_key(\"unit\", String(), Default::optional(),\n+\t\t\t\t\t\t\t\t\t\"Specify unit of an input time value. This value overrides default unit \"\n+\t\t\t\t\t\t\t\t\t\"of equation specified by 'common_time_unit' key of Time Governor.\")\n+\t\t.close();\n+}\n+\n+\n const Record & TimeGovernor::get_input_type() {\n \treturn Record(\"TimeGovernor\",\n             \"Setting of the simulation time. (can be specific to one equation)\")\n \t\t.allow_auto_conversion(\"max_dt\")\n-\t\t.declare_key(\"start_time\", Double(), Default(\"0.0\"),\n+\t\t.declare_key(\"start_time\", TimeGovernor::get_input_time_type(), Default(\"0.0\"),\n \t\t\t\t\t\"Start time of the simulation.\")\n-\t\t.declare_key(\"end_time\", Double(), Default(MAX_END_TIME_STR),\n+\t\t.declare_key(\"end_time\", TimeGovernor::get_input_time_type(), Default(MAX_END_TIME_STR),\n \t\t\t\t\t\"End time of the simulation. Default value is more then age of universe in seconds.\")\n-\t\t.declare_key(\"init_dt\", Double(0.0), Default(\"0.0\"),\n+\t\t.declare_key(\"init_dt\", TimeGovernor::get_input_time_type(0.0), Default(\"0.0\"),\n \t\t\t\t\"Initial guess for the time step.\\n\"\n \t\t\t\t\"Only useful for equations that use adaptive time stepping.\"\n \t\t\t\t\"If set to 0.0, the time step is determined in fully autonomous\"\n \t\t\t\t\" way if the equation supports it.\")\n-\t\t.declare_key(\"min_dt\", Double(0.0),\n+\t\t.declare_key(\"min_dt\", TimeGovernor::get_input_time_type(0.0),\n \t\t\t\tDefault::read_time(\"Machine precision.\"),\n \t\t\t\t\"Soft lower limit for the time step. Equation using adaptive time stepping can not\"\n \t\t\t\t\"suggest smaller time step, but actual time step could be smaller in order to match \"\n \t\t\t\t\"prescribed input or output times.\")\n-\t\t.declare_key(\"max_dt\", Double(0.0),\n+\t\t.declare_key(\"max_dt\", TimeGovernor::get_input_time_type(0.0),\n \t\t\t\tDefault::read_time(\"Whole time of the simulation if specified, infinity else.\"),\n \t\t\t\t\"Hard upper limit for the time step. Actual length of the time step is also limited\"\n \t\t\t\t\"by input and output times.\")\n+\t\t.declare_key(\"common_time_unit\", String(), Default(\"\\\"s\\\"\"),\n+\t\t\t\t\"Common time unit of equation. This unit will be used for all time inputs and outputs \"","path":"src/tools/time_governor.cc","position":56,"original_position":56,"commit_id":"933da24dcb8ae6ad89c6c1c05fdc41a2e93fb24c","original_commit_id":"933da24dcb8ae6ad89c6c1c05fdc41a2e93fb24c","user":{"login":"jbrezmorf","id":326204,"avatar_url":"https://avatars0.githubusercontent.com/u/326204?v=4","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":"Add explicit list of time influenced time units:\r\nIn particular:\r\n1. time units of TimeValue keys in: TimeGovernor, EquationTimeSet, ... \r\n2. time units in input fields: FieldElementwise, FieldTimeFunction, ...\r\n3. time units in output files: Observe times, balance times, frame times of VTK and GMSH field output","created_at":"2018-02-05T09:53:02Z","updated_at":"2018-02-05T09:56:58Z","html_url":"https://github.com/flow123d/flow123d/pull/913#discussion_r165923611","pull_request_url":"https://api.github.com/repos/flow123d/flow123d/pulls/913","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/comments/165923611"},"html":{"href":"https://github.com/flow123d/flow123d/pull/913#discussion_r165923611"},"pull_request":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/913"}}},"pull_request":{"url":"https://api.github.com/repos/flow123d/flow123d/pulls/913","id":164184719,"html_url":"https://github.com/flow123d/flow123d/pull/913","diff_url":"https://github.com/flow123d/flow123d/pull/913.diff","patch_url":"https://github.com/flow123d/flow123d/pull/913.patch","issue_url":"https://api.github.com/repos/flow123d/flow123d/issues/913","number":913,"state":"open","locked":false,"title":"Df time units","user":{"login":"dflanderka","id":5627762,"avatar_url":"https://avatars2.githubusercontent.com/u/5627762?v=4","gravatar_id":"","url":"https://api.github.com/users/dflanderka","html_url":"https://github.com/dflanderka","followers_url":"https://api.github.com/users/dflanderka/followers","following_url":"https://api.github.com/users/dflanderka/following{/other_user}","gists_url":"https://api.github.com/users/dflanderka/gists{/gist_id}","starred_url":"https://api.github.com/users/dflanderka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dflanderka/subscriptions","organizations_url":"https://api.github.com/users/dflanderka/orgs","repos_url":"https://api.github.com/users/dflanderka/repos","events_url":"https://api.github.com/users/dflanderka/events{/privacy}","received_events_url":"https://api.github.com/users/dflanderka/received_events","type":"User","site_admin":false},"body":"- add common time unit set to TimeGovernor\r\n- create a specific tuple for a time value. (time, unit)","created_at":"2018-01-21T17:12:23Z","updated_at":"2018-02-05T09:56:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2acf0eb3546b235efe2c52f63c0ae02997e3e425","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/flow123d/flow123d/pulls/913/commits","review_comments_url":"https://api.github.com/repos/flow123d/flow123d/pulls/913/comments","review_comment_url":"https://api.github.com/repos/flow123d/flow123d/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flow123d/flow123d/issues/913/comments","statuses_url":"https://api.github.com/repos/flow123d/flow123d/statuses/933da24dcb8ae6ad89c6c1c05fdc41a2e93fb24c","head":{"label":"flow123d:DF_time_units","ref":"DF_time_units","sha":"933da24dcb8ae6ad89c6c1c05fdc41a2e93fb24c","user":{"login":"flow123d","id":5418109,"avatar_url":"https://avatars0.githubusercontent.com/u/5418109?v=4","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://avatars0.githubusercontent.com/u/5418109?v=4","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}","deployments_url":"https://api.github.com/repos/flow123d/flow123d/deployments","created_at":"2013-10-16T18:56:28Z","updated_at":"2017-02-27T16:28:33Z","pushed_at":"2018-02-05T06:43:17Z","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":177402,"stargazers_count":11,"watchers_count":11,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":191,"license":null,"forks":4,"open_issues":191,"watchers":11,"default_branch":"master"}},"base":{"label":"flow123d:3.0.0_dev","ref":"3.0.0_dev","sha":"0e839b5d348ff79621ccfb07b5a8daa7787d92f2","user":{"login":"flow123d","id":5418109,"avatar_url":"https://avatars0.githubusercontent.com/u/5418109?v=4","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://avatars0.githubusercontent.com/u/5418109?v=4","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}","deployments_url":"https://api.github.com/repos/flow123d/flow123d/deployments","created_at":"2013-10-16T18:56:28Z","updated_at":"2017-02-27T16:28:33Z","pushed_at":"2018-02-05T06:43:17Z","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":177402,"stargazers_count":11,"watchers_count":11,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":191,"license":null,"forks":4,"open_issues":191,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/913"},"html":{"href":"https://github.com/flow123d/flow123d/pull/913"},"issue":{"href":"https://api.github.com/repos/flow123d/flow123d/issues/913"},"comments":{"href":"https://api.github.com/repos/flow123d/flow123d/issues/913/comments"},"review_comments":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/913/comments"},"review_comment":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/913/commits"},"statuses":{"href":"https://api.github.com/repos/flow123d/flow123d/statuses/933da24dcb8ae6ad89c6c1c05fdc41a2e93fb24c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jbrezmorf"}}