{"action":"created","issue":{"url":"https://api.github.com/repos/dealii/dealii/issues/1182","labels_url":"https://api.github.com/repos/dealii/dealii/issues/1182/labels{/name}","comments_url":"https://api.github.com/repos/dealii/dealii/issues/1182/comments","events_url":"https://api.github.com/repos/dealii/dealii/issues/1182/events","html_url":"https://github.com/dealii/dealii/pull/1182","id":96911742,"number":1182,"title":"Make mapping internal data const","user":{"login":"bangerth","id":7504421,"avatar_url":"https://avatars.githubusercontent.com/u/7504421?v=3","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-07-23T21:43:55Z","updated_at":"2015-07-26T18:19:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dealii/dealii/pulls/1182","html_url":"https://github.com/dealii/dealii/pull/1182","diff_url":"https://github.com/dealii/dealii/pull/1182.diff","patch_url":"https://github.com/dealii/dealii/pull/1182.patch"},"body":"This is meant for discussion for now. I would need to update the documentation and clean up a couple of corners.\r\n\r\nThe idea here is that in the interface between FEValues and Mappings, I conceptually think of the `InternalData` object in the following way:\r\n\r\n* It is created by `Mapping::get_data()` to store information that is computed once but used many times.\r\n* `FEValues` passes this object back to the mapping in `FEValues::do_reinit` when calling `Mapping::fill_fe_values`.\r\n* `Mapping::fill_fe_values` uses this to compute mapping-related information using the once-computed data in `InternalData` and stores the output in the `FEValuesData` object.\r\n\r\nIn this view, the `InternalData` object passed to `Mapping::fill_fe_values` can be `const`, and this patch implements this: It simply makes the `InternalData` argument of `Mapping::fill_fe_*_values` `const`.\r\n\r\n\r\nNow, here is the problem: some of the mappings also use the `InternalData` object for two other purposes:\r\n\r\n* Scratch space for computations inside `Mapping*::fill_fe_values`.\r\n* To store information that is computed in `Mapping*::fill_fe_values` and that is later used in `Mapping*::transform`.\r\n\r\nTo make this possible, I have marked all those member variable of the various `Mapping*::InternalData` class that are used in this way, as `mutable`. This allows this kind of use. If we decide to go down this road, I will clearly document in each case where this is done what the intent of the `mutable` marking is, and document essentially the whole discussion above in the documentation of the `Mapping::InternalDataBase` class and the affected derived classes.\r\n\r\nWhat do you all think?"},"comment":{"url":"https://api.github.com/repos/dealii/dealii/issues/comments/125024600","html_url":"https://github.com/dealii/dealii/pull/1182#issuecomment-125024600","issue_url":"https://api.github.com/repos/dealii/dealii/issues/1182","id":125024600,"user":{"login":"bangerth","id":7504421,"avatar_url":"https://avatars.githubusercontent.com/u/7504421?v=3","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false},"created_at":"2015-07-26T18:19:01Z","updated_at":"2015-07-26T18:19:01Z","body":"> Nice cleanup. :+1:\n\nThanks, more to come :-)\n\nI've updated the small issues you pointed out.\n\n"}}