{"action":"created","issue":{"url":"https://api.github.com/repos/nutofem/nuto/issues/15","repository_url":"https://api.github.com/repos/nutofem/nuto","labels_url":"https://api.github.com/repos/nutofem/nuto/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/nutofem/nuto/issues/15/comments","events_url":"https://api.github.com/repos/nutofem/nuto/issues/15/events","html_url":"https://github.com/nutofem/nuto/issues/15","id":185062396,"number":15,"title":"Remove Stucture* from Elements","user":{"login":"TTitscher","id":12712945,"avatar_url":"https://avatars.githubusercontent.com/u/12712945?v=3","gravatar_id":"","url":"https://api.github.com/users/TTitscher","html_url":"https://github.com/TTitscher","followers_url":"https://api.github.com/users/TTitscher/followers","following_url":"https://api.github.com/users/TTitscher/following{/other_user}","gists_url":"https://api.github.com/users/TTitscher/gists{/gist_id}","starred_url":"https://api.github.com/users/TTitscher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TTitscher/subscriptions","organizations_url":"https://api.github.com/users/TTitscher/orgs","repos_url":"https://api.github.com/users/TTitscher/repos","events_url":"https://api.github.com/users/TTitscher/events{/privacy}","received_events_url":"https://api.github.com/users/TTitscher/received_events","type":"User","site_admin":false},"labels":[{"id":407493045,"url":"https://api.github.com/repos/nutofem/nuto/labels/design","name":"design","color":"128A0C","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-25T09:19:50Z","updated_at":"2016-10-28T07:44:37Z","closed_at":null,"body":"## Problem:\r\n- Structure is a god class. We decided to use it for a common interface to the whole NuToMechanics lib. OK. But it should only be the interface, not a way for each class to obtain arbitrary information. \r\n- Dependencies --> compile time \r\n- ...\r\n\r\n## Current usage in the elements:\r\n\r\n### Stucture->GetId()\r\n- mainly (only?) used in Exceptions\r\n- examples:\r\n   - Structure->ElementGetId(*this) \r\n   - Structure->ConstitutiveLawGetId() \r\n- Possible Solution1: Storing the ID at the object \r\n   - this->GetId()\r\n   - law->GetId()\r\n- Possible Solution2: Use other properties to identify the element\r\n   - eElementType GetType()?\r\n   - print this->Info() before throwing \r\n\r\n### Structure->GetLogger()\r\n- only used in Element.Info() = Debug\r\n- Solution: write to std::cout/std::cerr instead of Logger\r\n\r\n### Structure->GetNumTimeDerivatives()\r\n- Solution: Add it to the input map...\r\n\r\n### Structure->GroupStuff\r\n- used in ContinuumContactElement, that gets a NodeGroupIp and an ElementGroupId and extracts node vectors and element vectors via the strucutre\r\n- Solution: Pass the node vector and element vector directly\r\n\r\n### Structure->GetDofStatus()\r\n- only used by ContinuumElement\r\n- Solution: Pass and store the DofStatus(), not the structure\r\n\r\n## ToDo:\r\nDiscuss the first ->GetId() problem. The rest should be fine, right?\r\n"},"comment":{"url":"https://api.github.com/repos/nutofem/nuto/issues/comments/256857538","html_url":"https://github.com/nutofem/nuto/issues/15#issuecomment-256857538","issue_url":"https://api.github.com/repos/nutofem/nuto/issues/15","id":256857538,"user":{"login":"Psirus","id":1187292,"avatar_url":"https://avatars.githubusercontent.com/u/1187292?v=3","gravatar_id":"","url":"https://api.github.com/users/Psirus","html_url":"https://github.com/Psirus","followers_url":"https://api.github.com/users/Psirus/followers","following_url":"https://api.github.com/users/Psirus/following{/other_user}","gists_url":"https://api.github.com/users/Psirus/gists{/gist_id}","starred_url":"https://api.github.com/users/Psirus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Psirus/subscriptions","organizations_url":"https://api.github.com/users/Psirus/orgs","repos_url":"https://api.github.com/users/Psirus/repos","events_url":"https://api.github.com/users/Psirus/events{/privacy}","received_events_url":"https://api.github.com/users/Psirus/received_events","type":"User","site_admin":false},"created_at":"2016-10-28T07:44:37Z","updated_at":"2016-10-28T07:44:37Z","body":"I know this can't be applied immediately to the current implementation, but I'd probably do something like this:\r\n\r\n     Structure::Visualize()\r\n     {\r\n          for(auto element : mElementMap)\r\n              element.first()->VisualizeElement(it.second())\r\n     }\r\n\r\ni.e., giving these Ids by parameter to the visualize function of the element.\r\n"}}
{"actor":{"display_login":"Psirus"}}