{"action":"created","issue":{"url":"https://api.github.com/repos/pymor/pymor/issues/80","labels_url":"https://api.github.com/repos/pymor/pymor/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/pymor/pymor/issues/80/comments","events_url":"https://api.github.com/repos/pymor/pymor/issues/80/events","html_url":"https://github.com/pymor/pymor/pull/80","id":48438601,"number":80,"title":"[operators.basic] add sanity check to apply_inverse of NumpyMatrixOperator","user":{"login":"ftalbrecht","id":263053,"avatar_url":"https://avatars.githubusercontent.com/u/263053?v=3","gravatar_id":"","url":"https://api.github.com/users/ftalbrecht","html_url":"https://github.com/ftalbrecht","followers_url":"https://api.github.com/users/ftalbrecht/followers","following_url":"https://api.github.com/users/ftalbrecht/following{/other_user}","gists_url":"https://api.github.com/users/ftalbrecht/gists{/gist_id}","starred_url":"https://api.github.com/users/ftalbrecht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ftalbrecht/subscriptions","organizations_url":"https://api.github.com/users/ftalbrecht/orgs","repos_url":"https://api.github.com/users/ftalbrecht/repos","events_url":"https://api.github.com/users/ftalbrecht/events{/privacy}","received_events_url":"https://api.github.com/users/ftalbrecht/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-11-11T21:37:01Z","updated_at":"2015-11-25T11:58:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pymor/pymor/pulls/80","html_url":"https://github.com/pymor/pymor/pull/80","diff_url":"https://github.com/pymor/pymor/pull/80.diff","patch_url":"https://github.com/pymor/pymor/pull/80.patch"},"body":"I ran across a problem where the reduced system matrix contained NaNs and thus the reduced solution contained NaNs. The cause for this was some memory corruprion in an external library and since the reduced matrices were projections of external matrices (that were not available, just applyable) this resulted in hard to trace back NaNs in the reduced matrices. The attached commit checks the solution of a call to `numpysolvers` for NaNs and infs using an assert. Do we want to have something like this?\r\n\r\n* this could lead to slow code when asserts are enabled (as they are most of the time)\r\n* if we want this, should it be moved to `numpysolvers`?\r\n* if we want this, do we want to have this in all solvers?"},"comment":{"url":"https://api.github.com/repos/pymor/pymor/issues/comments/159588050","html_url":"https://github.com/pymor/pymor/pull/80#issuecomment-159588050","issue_url":"https://api.github.com/repos/pymor/pymor/issues/80","id":159588050,"user":{"login":"ftalbrecht","id":263053,"avatar_url":"https://avatars.githubusercontent.com/u/263053?v=3","gravatar_id":"","url":"https://api.github.com/users/ftalbrecht","html_url":"https://github.com/ftalbrecht","followers_url":"https://api.github.com/users/ftalbrecht/followers","following_url":"https://api.github.com/users/ftalbrecht/following{/other_user}","gists_url":"https://api.github.com/users/ftalbrecht/gists{/gist_id}","starred_url":"https://api.github.com/users/ftalbrecht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ftalbrecht/subscriptions","organizations_url":"https://api.github.com/users/ftalbrecht/orgs","repos_url":"https://api.github.com/users/ftalbrecht/repos","events_url":"https://api.github.com/users/ftalbrecht/events{/privacy}","received_events_url":"https://api.github.com/users/ftalbrecht/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T11:58:20Z","updated_at":"2015-11-25T11:58:20Z","body":"I have also had iterative (sparse) solvers produce inf or nan without warning/failing, I would thus add this to all numpy solvers.\n\nJust a thought: on the dune side we shifted the problem towards the container, which are required to implement a `valid()` method, which checks for inf/nan entries.\nThus the solver would just call\n```\nassert U.valid()\n```\nprobably also on the right hand side...\n"}}