- Thank you received: 0
Unexpected behaviour of FESpace defined on interface
4 years 11 months ago #2238
by salim
Unexpected behaviour of FESpace defined on interface was created by salim
Dear colleagues,
I am trying to solve an interface problem in mixed form with a Lagrange multiplier on the internal boundary. Using the finite element space
L = L2(mesh, order = order, definedon="", definedonbound="interface")
for the Lagrange multiplier I obtain the error (please see the attached file)
netgen(7069,0x7000061f6000) malloc: *** error for object 0x12b0e4140: pointer being freed was not allocated
netgen(7069,0x7000061f6000) malloc: *** set a breakpoint in malloc_error_break to debug
Caught SIGABRT: usually caused by abort() or assert()
However, with the choice
L = H1(mesh, order = order, definedon="", definedonbound="interface")
everything works fine.
Best regards,
Salim
I am trying to solve an interface problem in mixed form with a Lagrange multiplier on the internal boundary. Using the finite element space
L = L2(mesh, order = order, definedon="", definedonbound="interface")
for the Lagrange multiplier I obtain the error (please see the attached file)
netgen(7069,0x7000061f6000) malloc: *** error for object 0x12b0e4140: pointer being freed was not allocated
netgen(7069,0x7000061f6000) malloc: *** set a breakpoint in malloc_error_break to debug
Caught SIGABRT: usually caused by abort() or assert()
However, with the choice
L = H1(mesh, order = order, definedon="", definedonbound="interface")
everything works fine.
Best regards,
Salim
Attachments:
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
4 years 11 months ago #2239
by christopher
Replied by christopher on topic Unexpected behaviour of FESpace defined on interface
The standard L2 space does not have degrees of freedom at BND elements. You need to use the SurfaceL2 space for this:
note that you can compute the error against the coefficientfunction itself and you do not need to interpolate it:
if you want to compare it to the interpolation an easier way would be:
Best
Christopher
Code:
L = SurfaceL2(mesh, order=order, definedon="", definedonbound="interface")
Code:
upe = CoefficientFunction([p_top if mat == "top" else p_bottom for mat in mesh.GetMaterials()])
# L2 error
err = sqrt(Integrate((upe-glob)*(upe-glob),mesh))
if you want to compare it to the interpolation an easier way would be:
Code:
upe = GridFunction(Vpost, name="exact")
upe.Set(CoefficientFunction([p_top if mat == "top" else p_bottom for mat in mesh.GetMaterials()]))
Best
Christopher
4 years 11 months ago #2240
by salim
Replied by salim on topic Unexpected behaviour of FESpace defined on interface
Dear Christopher,
Thank you very much for your help and for the trick that simplifies the calculation of the error.
I take this opportunity to congratulate the entire NGsolve team for the formidable tool they have created. Thank you for making it available to the community.
Best,
Salim
Thank you very much for your help and for the trick that simplifies the calculation of the error.
I take this opportunity to congratulate the entire NGsolve team for the formidable tool they have created. Thank you for making it available to the community.
Best,
Salim
Time to create page: 0.098 seconds