{"action":"created","comment":{"url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments/191037449","pull_request_review_id":123544745,"id":191037449,"diff_hunk":"@@ -321,6 +324,118 @@ const Matrix& linear_filter_matrix(const size_t num_points) noexcept {\n       LinearFilterMatrixGenerator<BasisType, QuadratureType>>(num_points);\n }\n \n+// Synthesize the corresponding functions that take a `Mesh` instead of template\n+// parameters.\n+\n+namespace {\n+\n+template <typename F>\n+decltype(auto) get_spectral_quantity_for_mesh(F&& f,\n+                                              const Mesh<1>& mesh) noexcept {\n+  const auto num_points = mesh.extents(0);\n+  // Switch on runtime values of basis and quadrature to select corresponding\n+  // template specialization. We do the switch here because with basis","path":"src/NumericalAlgorithms/Spectral/Spectral.cpp","position":29,"original_position":29,"commit_id":"85b50002a5d51274af3cb987d20ffb180af0f010","original_commit_id":"411e6e102901d481b73b4a579150542c65c84275","user":{"login":"nilsdeppe","id":13531030,"avatar_url":"https://avatars3.githubusercontent.com/u/13531030?v=4","gravatar_id":"","url":"https://api.github.com/users/nilsdeppe","html_url":"https://github.com/nilsdeppe","followers_url":"https://api.github.com/users/nilsdeppe/followers","following_url":"https://api.github.com/users/nilsdeppe/following{/other_user}","gists_url":"https://api.github.com/users/nilsdeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/nilsdeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilsdeppe/subscriptions","organizations_url":"https://api.github.com/users/nilsdeppe/orgs","repos_url":"https://api.github.com/users/nilsdeppe/repos","events_url":"https://api.github.com/users/nilsdeppe/events{/privacy}","received_events_url":"https://api.github.com/users/nilsdeppe/received_events","type":"User","site_admin":false},"body":"\"we do this here\" + ` as opposed to...`","created_at":"2018-05-26T02:33:25Z","updated_at":"2018-05-26T03:04:41Z","html_url":"https://github.com/sxs-collaboration/spectre/pull/711#discussion_r191037449","pull_request_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/711","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments/191037449"},"html":{"href":"https://github.com/sxs-collaboration/spectre/pull/711#discussion_r191037449"},"pull_request":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/711"}}},"pull_request":{"url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/711","id":189019960,"html_url":"https://github.com/sxs-collaboration/spectre/pull/711","diff_url":"https://github.com/sxs-collaboration/spectre/pull/711.diff","patch_url":"https://github.com/sxs-collaboration/spectre/pull/711.patch","issue_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/711","number":711,"state":"open","locked":false,"title":"Add Spectral functions using Mesh","user":{"login":"nilsleiffischer","id":746230,"avatar_url":"https://avatars2.githubusercontent.com/u/746230?v=4","gravatar_id":"","url":"https://api.github.com/users/nilsleiffischer","html_url":"https://github.com/nilsleiffischer","followers_url":"https://api.github.com/users/nilsleiffischer/followers","following_url":"https://api.github.com/users/nilsleiffischer/following{/other_user}","gists_url":"https://api.github.com/users/nilsleiffischer/gists{/gist_id}","starred_url":"https://api.github.com/users/nilsleiffischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilsleiffischer/subscriptions","organizations_url":"https://api.github.com/users/nilsleiffischer/orgs","repos_url":"https://api.github.com/users/nilsleiffischer/repos","events_url":"https://api.github.com/users/nilsleiffischer/events{/privacy}","received_events_url":"https://api.github.com/users/nilsleiffischer/received_events","type":"User","site_admin":false},"body":"## Proposed changes\r\n\r\nThis PR adds functions to the `Spectral` functions that take a `Mesh` and return the spectral quantity in a particular dimension. These complement the existing functions that are templated on the `Basis` and `Quadrature` with ones that use the runtime information carried by the `Mesh`. They will be the preferred way to retrieve the spectral quantities for instance in `PartialDerivatives.tpp`, `DefiniteIntegral.cpp` and other linear operators.\r\n\r\n### Types of changes:\r\n\r\n- [ ] Bugfix\r\n- [x] New feature\r\n\r\n### Component:\r\n\r\n- [x] Code\r\n- [ ] Documentation\r\n- [ ] Build system\r\n- [ ] Continuous integration\r\n\r\n### Code review checklist\r\n\r\n- Follows [code review guidelines](https://sxs-collaboration.github.io/spectre/code_review_guide.html)\r\n- Code has documentation and unit tests\r\n- Private member variables have a trailing underscore\r\n- Do not use [Hungarian notation](https://en.wikipedia.org/wiki/Hungarian_notation), e.g. `double* pd_blah` is bad\r\n- Header order:\r\n  1. hpp corresponding to cpp (only in cpp files) or `tests/Unit/TestingFramework.hpp` (only in tests)\r\n  2. Blank line (only in cpp files and tests)\r\n  3. STL and externals (in alphabetical order)\r\n  4. Blank line\r\n  5. SpECTRE includes (in alphabetical order)\r\n- File lists in CMake are alphabetical\r\n- Correct `noexcept` specification for functions (if unsure, mark `noexcept`)\r\n- Mark objects `const` whenever possible\r\n- Almost always `auto`, except with expression templates, i.e. `DataVector`\r\n- All commits for performance changes provide quantitative evidence and the tests used to obtain said evidence.\r\n- Make sure error messages are helpful, e.g. \"The number of grid points in the matrix 'F' is not the same as the number of grid points in the determinant.\"\r\n- Prefix commits addressing PR requests with `fixup`. These commits are flagged\r\n  by Travis so we do not accidentally merge them.\r\n- Include what you use, prefer forward declarations in hpp files.\r\n- Explicitly make numbers floating point, e.g. `2.` or `2.0` over `2`\r\n- Use `Tensor`'s non-member get if the indices are constant expressions, e.g.\r\n  `get<1>(tensor)`\r\n\r\n### Further comments\r\n","created_at":"2018-05-18T13:04:57Z","updated_at":"2018-05-26T03:04:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5bf3ab9c67d370e4ebda88d9c4d9b7614688e771","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/711/commits","review_comments_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/711/comments","review_comment_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/711/comments","statuses_url":"https://api.github.com/repos/sxs-collaboration/spectre/statuses/85b50002a5d51274af3cb987d20ffb180af0f010","head":{"label":"nilsleiffischer:spectralmesh","ref":"spectralmesh","sha":"85b50002a5d51274af3cb987d20ffb180af0f010","user":{"login":"nilsleiffischer","id":746230,"avatar_url":"https://avatars2.githubusercontent.com/u/746230?v=4","gravatar_id":"","url":"https://api.github.com/users/nilsleiffischer","html_url":"https://github.com/nilsleiffischer","followers_url":"https://api.github.com/users/nilsleiffischer/followers","following_url":"https://api.github.com/users/nilsleiffischer/following{/other_user}","gists_url":"https://api.github.com/users/nilsleiffischer/gists{/gist_id}","starred_url":"https://api.github.com/users/nilsleiffischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilsleiffischer/subscriptions","organizations_url":"https://api.github.com/users/nilsleiffischer/orgs","repos_url":"https://api.github.com/users/nilsleiffischer/repos","events_url":"https://api.github.com/users/nilsleiffischer/events{/privacy}","received_events_url":"https://api.github.com/users/nilsleiffischer/received_events","type":"User","site_admin":false},"repo":{"id":119436274,"name":"spectre","full_name":"nilsleiffischer/spectre","owner":{"login":"nilsleiffischer","id":746230,"avatar_url":"https://avatars2.githubusercontent.com/u/746230?v=4","gravatar_id":"","url":"https://api.github.com/users/nilsleiffischer","html_url":"https://github.com/nilsleiffischer","followers_url":"https://api.github.com/users/nilsleiffischer/followers","following_url":"https://api.github.com/users/nilsleiffischer/following{/other_user}","gists_url":"https://api.github.com/users/nilsleiffischer/gists{/gist_id}","starred_url":"https://api.github.com/users/nilsleiffischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilsleiffischer/subscriptions","organizations_url":"https://api.github.com/users/nilsleiffischer/orgs","repos_url":"https://api.github.com/users/nilsleiffischer/repos","events_url":"https://api.github.com/users/nilsleiffischer/events{/privacy}","received_events_url":"https://api.github.com/users/nilsleiffischer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nilsleiffischer/spectre","description":"SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.","fork":true,"url":"https://api.github.com/repos/nilsleiffischer/spectre","forks_url":"https://api.github.com/repos/nilsleiffischer/spectre/forks","keys_url":"https://api.github.com/repos/nilsleiffischer/spectre/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nilsleiffischer/spectre/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nilsleiffischer/spectre/teams","hooks_url":"https://api.github.com/repos/nilsleiffischer/spectre/hooks","issue_events_url":"https://api.github.com/repos/nilsleiffischer/spectre/issues/events{/number}","events_url":"https://api.github.com/repos/nilsleiffischer/spectre/events","assignees_url":"https://api.github.com/repos/nilsleiffischer/spectre/assignees{/user}","branches_url":"https://api.github.com/repos/nilsleiffischer/spectre/branches{/branch}","tags_url":"https://api.github.com/repos/nilsleiffischer/spectre/tags","blobs_url":"https://api.github.com/repos/nilsleiffischer/spectre/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nilsleiffischer/spectre/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nilsleiffischer/spectre/git/refs{/sha}","trees_url":"https://api.github.com/repos/nilsleiffischer/spectre/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nilsleiffischer/spectre/statuses/{sha}","languages_url":"https://api.github.com/repos/nilsleiffischer/spectre/languages","stargazers_url":"https://api.github.com/repos/nilsleiffischer/spectre/stargazers","contributors_url":"https://api.github.com/repos/nilsleiffischer/spectre/contributors","subscribers_url":"https://api.github.com/repos/nilsleiffischer/spectre/subscribers","subscription_url":"https://api.github.com/repos/nilsleiffischer/spectre/subscription","commits_url":"https://api.github.com/repos/nilsleiffischer/spectre/commits{/sha}","git_commits_url":"https://api.github.com/repos/nilsleiffischer/spectre/git/commits{/sha}","comments_url":"https://api.github.com/repos/nilsleiffischer/spectre/comments{/number}","issue_comment_url":"https://api.github.com/repos/nilsleiffischer/spectre/issues/comments{/number}","contents_url":"https://api.github.com/repos/nilsleiffischer/spectre/contents/{+path}","compare_url":"https://api.github.com/repos/nilsleiffischer/spectre/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nilsleiffischer/spectre/merges","archive_url":"https://api.github.com/repos/nilsleiffischer/spectre/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nilsleiffischer/spectre/downloads","issues_url":"https://api.github.com/repos/nilsleiffischer/spectre/issues{/number}","pulls_url":"https://api.github.com/repos/nilsleiffischer/spectre/pulls{/number}","milestones_url":"https://api.github.com/repos/nilsleiffischer/spectre/milestones{/number}","notifications_url":"https://api.github.com/repos/nilsleiffischer/spectre/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nilsleiffischer/spectre/labels{/name}","releases_url":"https://api.github.com/repos/nilsleiffischer/spectre/releases{/id}","deployments_url":"https://api.github.com/repos/nilsleiffischer/spectre/deployments","created_at":"2018-01-29T20:19:38Z","updated_at":"2018-05-18T09:26:16Z","pushed_at":"2018-05-25T15:41:06Z","git_url":"git://github.com/nilsleiffischer/spectre.git","ssh_url":"git@github.com:nilsleiffischer/spectre.git","clone_url":"https://github.com/nilsleiffischer/spectre.git","svn_url":"https://github.com/nilsleiffischer/spectre","homepage":"","size":8962,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"sxs-collaboration:develop","ref":"develop","sha":"67ca8129f96c5853225328d977d94cd12909dff5","user":{"login":"sxs-collaboration","id":26882595,"avatar_url":"https://avatars2.githubusercontent.com/u/26882595?v=4","gravatar_id":"","url":"https://api.github.com/users/sxs-collaboration","html_url":"https://github.com/sxs-collaboration","followers_url":"https://api.github.com/users/sxs-collaboration/followers","following_url":"https://api.github.com/users/sxs-collaboration/following{/other_user}","gists_url":"https://api.github.com/users/sxs-collaboration/gists{/gist_id}","starred_url":"https://api.github.com/users/sxs-collaboration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sxs-collaboration/subscriptions","organizations_url":"https://api.github.com/users/sxs-collaboration/orgs","repos_url":"https://api.github.com/users/sxs-collaboration/repos","events_url":"https://api.github.com/users/sxs-collaboration/events{/privacy}","received_events_url":"https://api.github.com/users/sxs-collaboration/received_events","type":"Organization","site_admin":false},"repo":{"id":87570510,"name":"spectre","full_name":"sxs-collaboration/spectre","owner":{"login":"sxs-collaboration","id":26882595,"avatar_url":"https://avatars2.githubusercontent.com/u/26882595?v=4","gravatar_id":"","url":"https://api.github.com/users/sxs-collaboration","html_url":"https://github.com/sxs-collaboration","followers_url":"https://api.github.com/users/sxs-collaboration/followers","following_url":"https://api.github.com/users/sxs-collaboration/following{/other_user}","gists_url":"https://api.github.com/users/sxs-collaboration/gists{/gist_id}","starred_url":"https://api.github.com/users/sxs-collaboration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sxs-collaboration/subscriptions","organizations_url":"https://api.github.com/users/sxs-collaboration/orgs","repos_url":"https://api.github.com/users/sxs-collaboration/repos","events_url":"https://api.github.com/users/sxs-collaboration/events{/privacy}","received_events_url":"https://api.github.com/users/sxs-collaboration/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sxs-collaboration/spectre","description":"SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.","fork":false,"url":"https://api.github.com/repos/sxs-collaboration/spectre","forks_url":"https://api.github.com/repos/sxs-collaboration/spectre/forks","keys_url":"https://api.github.com/repos/sxs-collaboration/spectre/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sxs-collaboration/spectre/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sxs-collaboration/spectre/teams","hooks_url":"https://api.github.com/repos/sxs-collaboration/spectre/hooks","issue_events_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/events{/number}","events_url":"https://api.github.com/repos/sxs-collaboration/spectre/events","assignees_url":"https://api.github.com/repos/sxs-collaboration/spectre/assignees{/user}","branches_url":"https://api.github.com/repos/sxs-collaboration/spectre/branches{/branch}","tags_url":"https://api.github.com/repos/sxs-collaboration/spectre/tags","blobs_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/refs{/sha}","trees_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sxs-collaboration/spectre/statuses/{sha}","languages_url":"https://api.github.com/repos/sxs-collaboration/spectre/languages","stargazers_url":"https://api.github.com/repos/sxs-collaboration/spectre/stargazers","contributors_url":"https://api.github.com/repos/sxs-collaboration/spectre/contributors","subscribers_url":"https://api.github.com/repos/sxs-collaboration/spectre/subscribers","subscription_url":"https://api.github.com/repos/sxs-collaboration/spectre/subscription","commits_url":"https://api.github.com/repos/sxs-collaboration/spectre/commits{/sha}","git_commits_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/commits{/sha}","comments_url":"https://api.github.com/repos/sxs-collaboration/spectre/comments{/number}","issue_comment_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/comments{/number}","contents_url":"https://api.github.com/repos/sxs-collaboration/spectre/contents/{+path}","compare_url":"https://api.github.com/repos/sxs-collaboration/spectre/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sxs-collaboration/spectre/merges","archive_url":"https://api.github.com/repos/sxs-collaboration/spectre/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sxs-collaboration/spectre/downloads","issues_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues{/number}","pulls_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls{/number}","milestones_url":"https://api.github.com/repos/sxs-collaboration/spectre/milestones{/number}","notifications_url":"https://api.github.com/repos/sxs-collaboration/spectre/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sxs-collaboration/spectre/labels{/name}","releases_url":"https://api.github.com/repos/sxs-collaboration/spectre/releases{/id}","deployments_url":"https://api.github.com/repos/sxs-collaboration/spectre/deployments","created_at":"2017-04-07T17:28:20Z","updated_at":"2018-05-26T02:01:53Z","pushed_at":"2018-05-26T02:42:52Z","git_url":"git://github.com/sxs-collaboration/spectre.git","ssh_url":"git@github.com:sxs-collaboration/spectre.git","clone_url":"https://github.com/sxs-collaboration/spectre.git","svn_url":"https://github.com/sxs-collaboration/spectre","homepage":"","size":10139,"stargazers_count":26,"watchers_count":26,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":77,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":21,"open_issues":77,"watchers":26,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/711"},"html":{"href":"https://github.com/sxs-collaboration/spectre/pull/711"},"issue":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/issues/711"},"comments":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/issues/711/comments"},"review_comments":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/711/comments"},"review_comment":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/711/commits"},"statuses":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/statuses/85b50002a5d51274af3cb987d20ffb180af0f010"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nilsdeppe"}}