NIST-10 (Interior Line Singularity)

Git reference: Benchmark nist-10.

This example is an extension of Boundary Line Singularity (NIST-07) with an anisotropic solution to allow for a sloped line so that the singularity does not necessarily coincide with element edges.

Model problem

Equation solved: Poisson equation

(1)-\Delta u = f.

Domain of interest: (-1, 1)^2.

Boundary conditions: Dirichlet, given by exact solution.

Exact solution

u(x,y) = \cos(Ky)\ \ \ \mbox{for}\ x \le 0,\\ u(x,y) = \cos(Ky) + x^{\alpha}\ \ \ \mbox{for}\ x > 0,

where K and \alpha are real constants.

Right-hand side: Obtained by inserting the exact solution into the equation. The corresponding code snippet is shown below:

{
public:
  CustomRightHandSide(double k, double alpha)
    : DefaultNonConstRightHandSide(), k(k), alpha(alpha) {
    cef = new CustomExactFunction(k, alpha);
};

virtual double value(double x, double y) const {
  if (x < 0) return cef->fn(x, y) * k * k;
  else return cef->fn(x, y) * k * k
              - alpha *(alpha - 1) * pow(x, alpha - 2.)
              - k * k * pow(x, alpha);
}

Sample solution

Solution for K = \pi/2 and \alpha = 2.01:

Solution.

Comparison of h-FEM (p=1), h-FEM (p=2) and hp-FEM with anisotropic refinements

Final mesh (h-FEM, p=1, anisotropic refinements):

Final mesh.

Final mesh (h-FEM, p=2, anisotropic refinements):

Final mesh.

Final mesh (hp-FEM, h-anisotropic refinements):

Final mesh.

DOF convergence graphs:

DOF convergence graph.

CPU convergence graphs:

CPU convergence graph.

hp-FEM with iso, h-aniso and hp-aniso refinements

Final mesh (hp-FEM, isotropic refinements):

Final mesh.

Final mesh (hp-FEM, h-anisotropic refinements):

Final mesh.

Final mesh (hp-FEM, hp-anisotropic refinements):

Final mesh.

DOF convergence graphs:

DOF convergence graph.

CPU convergence graphs:

CPU convergence graph.