{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaGeometry/meta/issues/3","labels_url":"https://api.github.com/repos/JuliaGeometry/meta/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/JuliaGeometry/meta/issues/3/comments","events_url":"https://api.github.com/repos/JuliaGeometry/meta/issues/3/events","html_url":"https://github.com/JuliaGeometry/meta/issues/3","id":62115293,"number":3,"title":"Some comments about my mesh situation/implementation.","user":{"login":"KristofferC","id":1282691,"avatar_url":"https://avatars.githubusercontent.com/u/1282691?v=3","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-16T15:27:51Z","updated_at":"2015-03-17T12:15:09Z","closed_at":null,"body":"I wrote on the mailing list and was asked to post here for some discussion regarding a unified mesh representation.\r\n\r\nI will write my use case and my implementation and maybe it can create some discussion / comments.\r\n\r\nCurrently, I am writing some code for Finite element analysis in Julia and obviously the concept of a mesh comes up. In my code I have two types of meshes, `GeoMesh` and `FEMesh`.\r\n\r\n`GeoMesh` is a mesh in the geometrical sense. It contains nodes, elements and currently two types of sets, element sets and node sets. Later, I later also want to include edge and surface sets. At this moment I am not sure that having the sets a part of the actual mesh type is the best way.\r\n\r\nMy current implementation can be found here:\r\nhttps://gist.github.com/KristofferC/a1a884a0af1818653c3d\r\n\r\nBy the way, I noticed today that I seem to have duplicted some stuff there that exists in GeometricalPredicates.jl\r\n\r\nOne problem with this implementation is that `GeoMesh.elements` is type unstable. The reason for this is that *a priori* I do not know what type of elements will be used. However, for my purpose that is ok since I just don't do any computations with `GeoMesh`, I just use it to hold some information. I realize for other use cases this is unacceptable.\r\n\r\n`FEMesh` has a similar structure to `GeoMesh` except the type of nodes and elements are different. Here the elements are actual finite elements. These includes much more information than the simple geometrical elements. For example, a finite element include what type of interpolator is used to interpolate fields inside the element and what type of degrees of freedom exist in the nodes etc.\r\n\r\nThe `FEMesh` is created from the `GeoMesh` by a function that also takes a mapping of what finite element each geometric element should become.\r\n\r\nTo visualize the mesh and the results I currently use Python's VTK bindings and call them with PyCall similarly to this (except I also give the values of the strain/stress tensors at the nodes): https://gist.github.com/KristofferC/9a989a2c0518bb70009c\r\n\r\nIt would be nice if I could just use some of the stuff under the JuliaGeometry organization instead of rolling my own so if you have any idea how to do that, feel free to share.\r\n\r\nBest regards, Kristoffer Carlsson."},"comment":{"url":"https://api.github.com/repos/JuliaGeometry/meta/issues/comments/82315071","html_url":"https://github.com/JuliaGeometry/meta/issues/3#issuecomment-82315071","issue_url":"https://api.github.com/repos/JuliaGeometry/meta/issues/3","id":82315071,"user":{"login":"KristofferC","id":1282691,"avatar_url":"https://avatars.githubusercontent.com/u/1282691?v=3","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T12:15:09Z","updated_at":"2015-03-17T12:15:09Z","body":"One thing to think about is if the performance hit is that bad actually from the type instability. Right now I am running a linear elastic material with linear triangles which mean that neither the constitutive stiffness nor the shape functions take any time at all to calculate.\r\n\r\nFor more complicated materials that has plasticity for example the time to lookup the concrete type might be insignificant."}}