This project is read-only.

globe information

Aug 26, 2014 at 8:02 PM
Is there a way to output globe cell and vertex information? For example, I want to create a mesh for the channel and another coarse meshes for the floodplains. They will share some of the edges. How do I combine all the information together? Thanks.

Victor
Aug 26, 2014 at 9:21 PM
Edited Aug 26, 2014 at 9:40 PM
So you basically have two finite element meshes, geometrically disjoint, except for a part of the boundary?

Triangle.NET won't help you joining them into one mesh, but it shouldn't be too hard to do. You will have to write your own mesh class storing the merged mesh information. The only tricky part is to keep track of the shared boundary. Just assign a unique boundary mark. Then it's just a matter of matching the right vertices.

As an alternative, you could assign new id's to the mesh elements (this is currently not possible since the ID properties are not writable) and then do something like:
public void Join(Mesh mesh1, Mesh mesh2)
{
    mesh1.Renumber();

    int nv = mesh1.Vertices.Count;
    int ne = mesh1.Triangles.Count;

    foreach (var v in mesh2.Vertices)
    {
        if ("v not on shared boundary")
        {
            v.ID = nv++;
        }
        else
        {
            v.ID = "id of matching vertex in mesh1";
        }
    }

    foreach (var e in mesh2.Triangles)
    {
        e.ID = ne++;
    }
}
This way, assembling the system could be done as usual (just a matter of setting up the right DoFs for the meshes).

Let me know if this sounds interesting to you. Making the ID properties writable is planned for beta4 anyway ...
Aug 26, 2014 at 11:42 PM
That is great. If you can make the ID properties writable, it should very straight forward for me to calculate the globe IDs as you suggested. Victor