{"action":"created","comment":{"url":"https://api.github.com/repos/dealii/dealii/pulls/comments/78836359","id":78836359,"diff_hunk":"@@ -1898,6 +1898,80 @@ SparseMatrix<number>::get_sparsity_pattern () const\n }\n \n \n+namespace internal\n+{\n+  namespace SparseMatrix\n+  {\n+    template <class StreamType, typename realType>\n+    inline\n+    void print_value(StreamType &out, const realType&val)\n+    {\n+      out << val;\n+    }\n+\n+    template<class StreamType, typename realType>\n+    inline\n+    void print_value(StreamType &out, const std::complex<realType> &val)\n+    {\n+      // the following format is what is required by the matrix market format.\n+      out << val.real << ' ' << val.imag;\n+    }\n+\n+    template<class StreamType, class numberType>\n+    void\n+    print_header(StreamType &out,const numberType & dummy)\n+    {\n+      out << \"%%MatrixMarket matrix coordinate real general\\n\";\n+    }\n+\n+    //template<typename realType>\n+    template<class StreamType, class realType>\n+    void\n+    print_header(StreamType &out, const std::complex<realType> & dummy )\n+    {\n+      out << \"%%MatrixMarket matrix coordinate complex general\\n\";\n+    }  \n+  } // namespace SparseMatrix\n+} // namespace internal\n+\n+template <typename number>\n+template <class StreamType>\n+void SparseMatrix<number>::print_matrix_market(StreamType &out,\n+\t\t\t\t\t       const double threshold) const\n+{\n+  Assert(cols != 0, ExcNotInitialized());\n+  Assert(val != 0, ExcNotInitialized());\n+  Assert(threshold >= 0, ExcMessage(\"Negative threshold!\") );  \n+\n+  //Print the header.\n+  {\n+    const number dummy = (number) 1.0; \n+    print_header(out,dummy);","path":"include/deal.II/lac/sparse_matrix.templates.h","position":52,"original_position":52,"commit_id":"76f374efa9e647fb5899dcd5bc530a65f1f417e9","original_commit_id":"76f374efa9e647fb5899dcd5bc530a65f1f417e9","user":{"login":"davydden","id":8023934,"avatar_url":"https://avatars.githubusercontent.com/u/8023934?v=3","gravatar_id":"","url":"https://api.github.com/users/davydden","html_url":"https://github.com/davydden","followers_url":"https://api.github.com/users/davydden/followers","following_url":"https://api.github.com/users/davydden/following{/other_user}","gists_url":"https://api.github.com/users/davydden/gists{/gist_id}","starred_url":"https://api.github.com/users/davydden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davydden/subscriptions","organizations_url":"https://api.github.com/users/davydden/orgs","repos_url":"https://api.github.com/users/davydden/repos","events_url":"https://api.github.com/users/davydden/events{/privacy}","received_events_url":"https://api.github.com/users/davydden/received_events","type":"User","site_admin":false},"body":"you probably don't need a dummy, just call it as `print_header<StreamType,number>(out)`. Then you won't need extra brackets here.","created_at":"2016-09-14T20:44:47Z","updated_at":"2016-09-14T20:44:47Z","html_url":"https://github.com/dealii/dealii/pull/3106#discussion_r78836359","pull_request_url":"https://api.github.com/repos/dealii/dealii/pulls/3106","_links":{"self":{"href":"https://api.github.com/repos/dealii/dealii/pulls/comments/78836359"},"html":{"href":"https://github.com/dealii/dealii/pull/3106#discussion_r78836359"},"pull_request":{"href":"https://api.github.com/repos/dealii/dealii/pulls/3106"}}},"pull_request":{"url":"https://api.github.com/repos/dealii/dealii/pulls/3106","id":84971923,"html_url":"https://github.com/dealii/dealii/pull/3106","diff_url":"https://github.com/dealii/dealii/pull/3106.diff","patch_url":"https://github.com/dealii/dealii/pull/3106.patch","issue_url":"https://api.github.com/repos/dealii/dealii/issues/3106","number":3106,"state":"open","locked":false,"title":"Added print_matrix_market to the sparse_matrix class","user":{"login":"inkstink","id":19362976,"avatar_url":"https://avatars.githubusercontent.com/u/19362976?v=3","gravatar_id":"","url":"https://api.github.com/users/inkstink","html_url":"https://github.com/inkstink","followers_url":"https://api.github.com/users/inkstink/followers","following_url":"https://api.github.com/users/inkstink/following{/other_user}","gists_url":"https://api.github.com/users/inkstink/gists{/gist_id}","starred_url":"https://api.github.com/users/inkstink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inkstink/subscriptions","organizations_url":"https://api.github.com/users/inkstink/orgs","repos_url":"https://api.github.com/users/inkstink/repos","events_url":"https://api.github.com/users/inkstink/events{/privacy}","received_events_url":"https://api.github.com/users/inkstink/received_events","type":"User","site_admin":false},"body":"I added functionality to the sparse_matrix_class to allow printing to the matrix market format.  It seems like I need to add test cases but I don't know how to do that.  I would appreciate some hand holding on that.  I am pretty sure I am using the correct brace style but would appreciate it if that could be checked.  Thanks.","created_at":"2016-09-13T01:28:29Z","updated_at":"2016-09-14T20:44:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e00af7b32bc3ad6d2d376e1191a7dd645de5853a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dealii/dealii/pulls/3106/commits","review_comments_url":"https://api.github.com/repos/dealii/dealii/pulls/3106/comments","review_comment_url":"https://api.github.com/repos/dealii/dealii/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dealii/dealii/issues/3106/comments","statuses_url":"https://api.github.com/repos/dealii/dealii/statuses/76f374efa9e647fb5899dcd5bc530a65f1f417e9","head":{"label":"inkstink:master","ref":"master","sha":"76f374efa9e647fb5899dcd5bc530a65f1f417e9","user":{"login":"inkstink","id":19362976,"avatar_url":"https://avatars.githubusercontent.com/u/19362976?v=3","gravatar_id":"","url":"https://api.github.com/users/inkstink","html_url":"https://github.com/inkstink","followers_url":"https://api.github.com/users/inkstink/followers","following_url":"https://api.github.com/users/inkstink/following{/other_user}","gists_url":"https://api.github.com/users/inkstink/gists{/gist_id}","starred_url":"https://api.github.com/users/inkstink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inkstink/subscriptions","organizations_url":"https://api.github.com/users/inkstink/orgs","repos_url":"https://api.github.com/users/inkstink/repos","events_url":"https://api.github.com/users/inkstink/events{/privacy}","received_events_url":"https://api.github.com/users/inkstink/received_events","type":"User","site_admin":false},"repo":{"id":58816218,"name":"dealii","full_name":"inkstink/dealii","owner":{"login":"inkstink","id":19362976,"avatar_url":"https://avatars.githubusercontent.com/u/19362976?v=3","gravatar_id":"","url":"https://api.github.com/users/inkstink","html_url":"https://github.com/inkstink","followers_url":"https://api.github.com/users/inkstink/followers","following_url":"https://api.github.com/users/inkstink/following{/other_user}","gists_url":"https://api.github.com/users/inkstink/gists{/gist_id}","starred_url":"https://api.github.com/users/inkstink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inkstink/subscriptions","organizations_url":"https://api.github.com/users/inkstink/orgs","repos_url":"https://api.github.com/users/inkstink/repos","events_url":"https://api.github.com/users/inkstink/events{/privacy}","received_events_url":"https://api.github.com/users/inkstink/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/inkstink/dealii","description":"The development repository for the deal.II finite element library.","fork":true,"url":"https://api.github.com/repos/inkstink/dealii","forks_url":"https://api.github.com/repos/inkstink/dealii/forks","keys_url":"https://api.github.com/repos/inkstink/dealii/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inkstink/dealii/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inkstink/dealii/teams","hooks_url":"https://api.github.com/repos/inkstink/dealii/hooks","issue_events_url":"https://api.github.com/repos/inkstink/dealii/issues/events{/number}","events_url":"https://api.github.com/repos/inkstink/dealii/events","assignees_url":"https://api.github.com/repos/inkstink/dealii/assignees{/user}","branches_url":"https://api.github.com/repos/inkstink/dealii/branches{/branch}","tags_url":"https://api.github.com/repos/inkstink/dealii/tags","blobs_url":"https://api.github.com/repos/inkstink/dealii/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inkstink/dealii/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inkstink/dealii/git/refs{/sha}","trees_url":"https://api.github.com/repos/inkstink/dealii/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inkstink/dealii/statuses/{sha}","languages_url":"https://api.github.com/repos/inkstink/dealii/languages","stargazers_url":"https://api.github.com/repos/inkstink/dealii/stargazers","contributors_url":"https://api.github.com/repos/inkstink/dealii/contributors","subscribers_url":"https://api.github.com/repos/inkstink/dealii/subscribers","subscription_url":"https://api.github.com/repos/inkstink/dealii/subscription","commits_url":"https://api.github.com/repos/inkstink/dealii/commits{/sha}","git_commits_url":"https://api.github.com/repos/inkstink/dealii/git/commits{/sha}","comments_url":"https://api.github.com/repos/inkstink/dealii/comments{/number}","issue_comment_url":"https://api.github.com/repos/inkstink/dealii/issues/comments{/number}","contents_url":"https://api.github.com/repos/inkstink/dealii/contents/{+path}","compare_url":"https://api.github.com/repos/inkstink/dealii/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inkstink/dealii/merges","archive_url":"https://api.github.com/repos/inkstink/dealii/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inkstink/dealii/downloads","issues_url":"https://api.github.com/repos/inkstink/dealii/issues{/number}","pulls_url":"https://api.github.com/repos/inkstink/dealii/pulls{/number}","milestones_url":"https://api.github.com/repos/inkstink/dealii/milestones{/number}","notifications_url":"https://api.github.com/repos/inkstink/dealii/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inkstink/dealii/labels{/name}","releases_url":"https://api.github.com/repos/inkstink/dealii/releases{/id}","deployments_url":"https://api.github.com/repos/inkstink/dealii/deployments","created_at":"2016-05-14T15:50:39Z","updated_at":"2016-05-14T15:51:36Z","pushed_at":"2016-09-14T20:32:51Z","git_url":"git://github.com/inkstink/dealii.git","ssh_url":"git@github.com:inkstink/dealii.git","clone_url":"https://github.com/inkstink/dealii.git","svn_url":"https://github.com/inkstink/dealii","homepage":"http://www.dealii.org/","size":146411,"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":"dealii:master","ref":"master","sha":"a402b23a96bd8a09876598d8461697d2a965951f","user":{"login":"dealii","id":7506070,"avatar_url":"https://avatars.githubusercontent.com/u/7506070?v=3","gravatar_id":"","url":"https://api.github.com/users/dealii","html_url":"https://github.com/dealii","followers_url":"https://api.github.com/users/dealii/followers","following_url":"https://api.github.com/users/dealii/following{/other_user}","gists_url":"https://api.github.com/users/dealii/gists{/gist_id}","starred_url":"https://api.github.com/users/dealii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dealii/subscriptions","organizations_url":"https://api.github.com/users/dealii/orgs","repos_url":"https://api.github.com/users/dealii/repos","events_url":"https://api.github.com/users/dealii/events{/privacy}","received_events_url":"https://api.github.com/users/dealii/received_events","type":"Organization","site_admin":false},"repo":{"id":21943980,"name":"dealii","full_name":"dealii/dealii","owner":{"login":"dealii","id":7506070,"avatar_url":"https://avatars.githubusercontent.com/u/7506070?v=3","gravatar_id":"","url":"https://api.github.com/users/dealii","html_url":"https://github.com/dealii","followers_url":"https://api.github.com/users/dealii/followers","following_url":"https://api.github.com/users/dealii/following{/other_user}","gists_url":"https://api.github.com/users/dealii/gists{/gist_id}","starred_url":"https://api.github.com/users/dealii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dealii/subscriptions","organizations_url":"https://api.github.com/users/dealii/orgs","repos_url":"https://api.github.com/users/dealii/repos","events_url":"https://api.github.com/users/dealii/events{/privacy}","received_events_url":"https://api.github.com/users/dealii/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dealii/dealii","description":"The development repository for the deal.II finite element library.","fork":false,"url":"https://api.github.com/repos/dealii/dealii","forks_url":"https://api.github.com/repos/dealii/dealii/forks","keys_url":"https://api.github.com/repos/dealii/dealii/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dealii/dealii/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dealii/dealii/teams","hooks_url":"https://api.github.com/repos/dealii/dealii/hooks","issue_events_url":"https://api.github.com/repos/dealii/dealii/issues/events{/number}","events_url":"https://api.github.com/repos/dealii/dealii/events","assignees_url":"https://api.github.com/repos/dealii/dealii/assignees{/user}","branches_url":"https://api.github.com/repos/dealii/dealii/branches{/branch}","tags_url":"https://api.github.com/repos/dealii/dealii/tags","blobs_url":"https://api.github.com/repos/dealii/dealii/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dealii/dealii/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dealii/dealii/git/refs{/sha}","trees_url":"https://api.github.com/repos/dealii/dealii/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dealii/dealii/statuses/{sha}","languages_url":"https://api.github.com/repos/dealii/dealii/languages","stargazers_url":"https://api.github.com/repos/dealii/dealii/stargazers","contributors_url":"https://api.github.com/repos/dealii/dealii/contributors","subscribers_url":"https://api.github.com/repos/dealii/dealii/subscribers","subscription_url":"https://api.github.com/repos/dealii/dealii/subscription","commits_url":"https://api.github.com/repos/dealii/dealii/commits{/sha}","git_commits_url":"https://api.github.com/repos/dealii/dealii/git/commits{/sha}","comments_url":"https://api.github.com/repos/dealii/dealii/comments{/number}","issue_comment_url":"https://api.github.com/repos/dealii/dealii/issues/comments{/number}","contents_url":"https://api.github.com/repos/dealii/dealii/contents/{+path}","compare_url":"https://api.github.com/repos/dealii/dealii/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dealii/dealii/merges","archive_url":"https://api.github.com/repos/dealii/dealii/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dealii/dealii/downloads","issues_url":"https://api.github.com/repos/dealii/dealii/issues{/number}","pulls_url":"https://api.github.com/repos/dealii/dealii/pulls{/number}","milestones_url":"https://api.github.com/repos/dealii/dealii/milestones{/number}","notifications_url":"https://api.github.com/repos/dealii/dealii/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dealii/dealii/labels{/name}","releases_url":"https://api.github.com/repos/dealii/dealii/releases{/id}","deployments_url":"https://api.github.com/repos/dealii/dealii/deployments","created_at":"2014-07-17T14:00:26Z","updated_at":"2016-09-13T23:27:18Z","pushed_at":"2016-09-14T20:38:36Z","git_url":"git://github.com/dealii/dealii.git","ssh_url":"git@github.com:dealii/dealii.git","clone_url":"https://github.com/dealii/dealii.git","svn_url":"https://github.com/dealii/dealii","homepage":"http://www.dealii.org/","size":167666,"stargazers_count":171,"watchers_count":171,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":184,"mirror_url":null,"open_issues_count":187,"forks":184,"open_issues":187,"watchers":171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dealii/dealii/pulls/3106"},"html":{"href":"https://github.com/dealii/dealii/pull/3106"},"issue":{"href":"https://api.github.com/repos/dealii/dealii/issues/3106"},"comments":{"href":"https://api.github.com/repos/dealii/dealii/issues/3106/comments"},"review_comments":{"href":"https://api.github.com/repos/dealii/dealii/pulls/3106/comments"},"review_comment":{"href":"https://api.github.com/repos/dealii/dealii/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dealii/dealii/pulls/3106/commits"},"statuses":{"href":"https://api.github.com/repos/dealii/dealii/statuses/76f374efa9e647fb5899dcd5bc530a65f1f417e9"}}}}
{"actor":{"display_login":"davydden"}}