Skip to content

Meshing bug: misidentification of overlapping edges  #319

@cmdoug

Description

@cmdoug

I believe there is a bug somewhere in the BAMG code used to identify overlapping edges (and also in the mortar construction). Below is a simple reproducer that is pretty contrived, but I have found this issue on other meshes with small clearances, especially when using adaptmesh(). I have looked into the bamg source code to find the issue, but the code and comments are difficult to understand... Does anyone with more familiarity with bamg have ideas for a fix?

real n0 = 64;
real n1 = 16;
real R = 1.0;
real L = 2*R;
real H = 2*R;
real h = 1.0e-4;

// Define borders
//  o-------4-------o
//  5               |
//  o--6--o         |
//         7        3
//  o---8---o       |
//  1               |
//  o-------2-------o
border C01(t=0, 1){x=-R; y=R*(1-t); label=1;}
border C02(t=0, 1){x=-R+L*t; y=0; label=2;}
border C03(t=0, 1){x=L-R; y=H*t; label=3;}
border C04(t=0, 1){x=L*(1-t)-R; y=H; label=4;}
border C05(t=0, 1){x=-R; y=H-(H-R-h)*t; label=5;}
border C06(t=0, 1){x=-R+(R-0.05)*t; y=R+h; label=6;}
border C07(t=0, 1){x=-0.05*(1-t); y=R+h*(1-t); label=7;}
border C08(t=0, 1){x=-R*t; y=R; label=8;}
// Assemble mesh
mesh Thg = buildmesh(C01(n0*R) + C02(n1*L) + C03(n1*H) + C04(n1*L) + C05(n1*(H-R-h)) + C06(n1*(R-0.05)) + C07(n0*sqrt(0.05^2+h^2)) + C08(n0*R));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions