{"action":"opened","issue":{"url":"https://api.github.com/repos/MakisH/CFDLab/issues/13","labels_url":"https://api.github.com/repos/MakisH/CFDLab/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/MakisH/CFDLab/issues/13/comments","events_url":"https://api.github.com/repos/MakisH/CFDLab/issues/13/events","html_url":"https://github.com/MakisH/CFDLab/issues/13","id":78077733,"number":13,"title":"Visualization after optimiziation","user":{"login":"IgorTo","id":9537602,"avatar_url":"https://avatars.githubusercontent.com/u/9537602?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorTo","html_url":"https://github.com/IgorTo","followers_url":"https://api.github.com/users/IgorTo/followers","following_url":"https://api.github.com/users/IgorTo/following{/other_user}","gists_url":"https://api.github.com/users/IgorTo/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorTo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorTo/subscriptions","organizations_url":"https://api.github.com/users/IgorTo/orgs","repos_url":"https://api.github.com/users/IgorTo/repos","events_url":"https://api.github.com/users/IgorTo/events{/privacy}","received_events_url":"https://api.github.com/users/IgorTo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-19T13:01:58Z","updated_at":"2015-05-19T13:01:58Z","closed_at":null,"body":"visualLB.c does not produce a good .vtk file anymore. Paraview returns an error.\r\n\r\n+\t// \" smart indexing ... 10% faster for 20 points(3sec), 3% for 100(10sec)\r\n+\tfor (z = 0; z <= 1; z+=dz){\r\n+\t\tfor (y = 0; y <= 1; y+=dy){\r\n+\t\t\tfor (x = 0; x <= 1; x+=dx){\r\n+\t\t\t\tfprintf(fp, \"%f %f %f\\n\", x, y, z);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n }\r\n\r\nBy this approach, we loose 1 point per set, so we have (xlength-1)^3 points. The problem is with boundaries of for loop and incrementing the step by itself, since you can encounter a situation where the last calculated point is 1.000000001, although it should be 1.0. So I think this problem is a manner of precision.\r\n\r\nI was thinking about how to solve this:\r\n- We can do a really small eps area and use it like for(x=0; x<=1+eps; x+=dx). But, is that safe for all situations?\r\n- We can stick with the old unoptimized implementation."}}