meshadaptation / pragmatic

Anisotropic mesh adaptation library
Other
54 stars 18 forks source link

Support for region IDs #15

Open KristianE86 opened 9 years ago

KristianE86 commented 9 years ago

Input should consist of a surface mesh and a list of region IDs for the elements.

croci commented 6 years ago

Just double checking whether I understand what this issue is for. Say that I have one joint_mesh which is made of two nested meshes, mesh1 and mesh2 and that I have element IDs that tell me which element of the joint_mesh belong to mesh1 and which to mesh2. Say that I feed joint_mesh into pragmatic together with the element IDs. Would pragmatic preserve the nestedness of mesh1 and mesh2 while refining or coarsening joint_mesh if this issue was fixed?

KristianE86 commented 6 years ago

I am not sure what you "nestedness" means, but it would make sense to generate an internal boundary mesh (between the two meshes). In 2D: nodes on the internal boundary mesh can only move on the boundary (as always) coarsening gives rise to two cavities which have to be triangulated swapping of edges on the boundary mesh is (as always) prohibited 3D is more complicated, because you can have internal edges where internal boundary meshes connect. As a first step one could detect such situations and throw an error. Otherwise coarsening gives rises to an arbitrary number of cavities to be tetrahedralised. In any case edge swapping gives rise to two polygons, which have to be triangulated.

croci commented 6 years ago

Sorry, maybe nested was a confusing term. By nested I meant that one portion of the boundary mesh of mesh1 is also a portion of the boundary mesh of mesh2.

For example, take mesh1 to be a spherical mesh and take mesh2 to be a cube mesh with an inner spherical cavity of the same size of mesh1. If the inner boundary mesh of mesh2 is the same as the outer boundary mesh of mesh1, then mesh1 and mesh2 can be joined. Call the shared portion of the boundary mesh shared_bndry_mesh. If you join mesh1 and mesh2 into a joint_mesh and you feed joint_mesh into pragmatic for, say, coarsening, then I would like the output to be a coarsened_joint_mesh, that is made up of two meshes, coarsened_mesh1 and coarsened_mesh2, that still share a coarsened_shared_bndry_mesh.

My questions are: 1- is this what this issue is about? 2- Is this doable or too complicated? Again, me and @taupalosaurus had a chat about this in Oxford.

I hope what I mean is clearer now. I am sorry, I do not understand what you mean by cavity.

KristianE86 commented 6 years ago

By cavity I mean the polygon/polyhedron that has to be filled with simplices in the coarsening code, but one can also consider 3D edge swapping as the triangulation of a polygon.

1: Yes this is what the issue is about. 2: Nothing is too difficult or complicated, if you carry the will of God in your heart. That being said, it should be simple in 2D and in 3D it is also very doable, if you detect and ban the users who want internal edges. It is mostly just about allowing for an internal boundary mesh and applying the same rules to this as the external boundary mesh, but in 3D you will have to do some coding, because the swap is only accepted, if neither region introduces worse quality elements.

knepley commented 6 years ago

On Mon, Nov 6, 2017 at 9:36 AM, Kristian Ejlebjærg Jensen < notifications@github.com> wrote:

By cavity I mean the polygon/polyhedron that has to be filled with simplices in the coarsening code, but one can also consider 3D edge swapping as the triangulation of a polygon.

1: Yes this is what the issue is about. 2: Nothing is too difficult or complicated, if you carry the will of God in your heart. That being said, it should be simple in 2D and in 3D it is also very doable, if you detect and ban the users who want internal edges. It is mostly just about allowing for an internal boundary mesh and applying the same rules to this as the external boundary mesh, but in 3D you will have to do some coding, because the swap is only accepted, if neither region introduces worse quality elements.

I also need this since I want to produce adapted meshes which incorporate a fault (the kind that makes earthquakes).

Thanks,

Matt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/meshadaptation/pragmatic/issues/15#issuecomment-342166897, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjoiQxptf2AA7bJFG1_3bG44tg4oPYwks5szxlsgaJpZM4CxsLA .

-- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ http://www.caam.rice.edu/~mk51/

taupalosaurus commented 6 years ago

@croci yes, what we discussed in Oxford was that. I can make it work easily, (put tags on the elements, reject optimizations that would go across regions), that would freeze these internal boundaries. it is probably not optimal when coarsening, and in the longer term I think it needs to be integrated to the surface description/remeshing plans. (That is also what I understand from Matt's reply, you want to be able to remesh these surfaces, not only freeze them - but then you need a good description of them, or good geometric approximation)

@knepley Do you need tags on tets or on inner facets ? and do you need just the tags, or the inner boundary remeshing ? (I'm afraid I guess the answer to the second question)

knepley commented 6 years ago

On Mon, Nov 6, 2017 at 2:01 PM, Nicolas Barral notifications@github.com wrote:

@croci https://github.com/croci yes, what we discussed in Oxford was that. I can make it work easily, (put tags on the elements, reject optimizations that would go across regions), that would freeze these internal boundaries. it is probably not optimal when coarsening, and in the longer term I think it needs to be integrated to the surface description/remeshing plans. (That is also what I understand from Matt's reply, you want to be able to remesh these surfaces, not only freeze them - but then you need a good description of them, or good geometric approximation)

https://github.com/knepley

Yes, you have it exactly Nicolas. However, I would accept a compromise which might make it attainable in the short term. I am willing to accept only regular refinement and no coarsening of the separating internal interface. I think this should make it easier to deal with.

Matt

@knepley https://github.com/knepley Do you need tags on tets or on inner facets ? and do you need just the tags, or the inner boundary remeshing ? (I'm afraid I guess the answer to the second question)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/meshadaptation/pragmatic/issues/15#issuecomment-342250653, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjoiUWXMhSX4b_CuFDBY5Dmj7nWvnsQks5sz1ekgaJpZM4CxsLA .

-- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ http://www.caam.rice.edu/~mk51/

taupalosaurus commented 6 years ago

Your faults are planar, right ?

knepley commented 6 years ago

No, non-planar.

Matt

On Mon, Nov 6, 2017 at 2:15 PM, Nicolas Barral notifications@github.com wrote:

Your faults are planar, right ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/meshadaptation/pragmatic/issues/15#issuecomment-342254764, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjoiZR9jxnG4xh2zNJcVHC0agSBVjILks5sz1rvgaJpZM4CxsLA .

-- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ http://www.caam.rice.edu/~mk51/

taupalosaurus commented 6 years ago

Argh. Can "straight" refinement do the job for now (1 triangle is split into two coplanar triangles) ?

-- Nicolas

knepley commented 6 years ago

On Mon, Nov 6, 2017 at 2:34 PM, Nicolas Barral notifications@github.com wrote:

Argh. Can "straight" refinement do the job for now (1 triangle is split into two coplanar triangles) ?

Definitely. That is what we do right now.

Matt

-- Nicolas

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/meshadaptation/pragmatic/issues/15#issuecomment-342260686, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjoiWYpRKIYj3GNAaQaucjU07psvl6mks5sz19AgaJpZM4CxsLA .

-- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ http://www.caam.rice.edu/~mk51/

taupalosaurus commented 6 years ago

Ok, then that's doable - I think.