Dear,
I’ve been working with NGSolve solving time harmonic elastic wave problem, with Robin boundary condition.
I am solving this problem using classical Galerkin and Hybrid Discontinuous Galerkin.
For the Galerkin method, it is working fine and the error in L2 norm is around 10^(-5).
For the HDG method, the solution seems correct (visually similar to the Galerkin method) but the L2 norm is not convergent.
For the HDG method, I choose the following spaces
V = VectorH1(mesh, order=order, complex=True)
F = VectorH1(mesh, order=order, complex=True)
fes = FESpace([V,F])
To compute the L2 norm, I am using the following code
u = CoefficientFunction(gfu.components[0])
#Error analysis
print ("Displacement L2-error:", sqrt (Integrate ( (u-uexact)*Conj(u-uexact), mesh)))
If I try to compute the norm using the following code, I get an error (“NgException: CompoundFESpace does not have an evaluator for VOL!”)
gmesh = GridFunction(fes)
gmesh.Set(uexact)
u_exact = CoefficientFunction(gmesh)
u = CoefficientFunction(gfu.components[0])
print ("Displacement L2-error:", sqrt (Integrate ( (u-u_exact)*Conj(u-u_exact), mesh)))
How to compute the error in L^2 norm in fes = FESpace([V,F]) space?