Skip to content

Bug in mortar construction #401

Description

@cmdoug

This is a continuation from #319. There, an issue with a false flag overlapping edges error was fixed, but there remains a bug with mortar construction. This bug commonly appears when using adaptmesh() on complex geometries with sharp corners. The MWE below triggers the bug (at least on FF v4.16).

real n0 = 128;
real n1 = 32;
real h = 1.0e-4;

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

/*
fespace Vh(Th, P2);
Vh u;
func f = 1;
varf dot(u, v) = int2d(Th)(dx(u)*dx(v) + dy(u)*dy(v)) + int2d(Th)(f*v) + on(5, u = 0);

matrix A = dot(Vh, Vh);
real[int] b = dot(0, Vh);

u[] = A^-1*b;
plot(u);
*/

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