MADNESS 0.10.1
embedded_dirichlet.cc File Reference

Provides test problems for examining the convergence of embedded (Dirichlet) boundary conditions. More...

#include <madness/mra/mra.h>
#include <madness/tensor/gmres.h>
#include <madness/external/muParser/muParser.h>
#include "test_problems.h"
Include dependency graph for embedded_dirichlet.cc:

Functions

int main (int argc, char **argv)

Detailed Description

Provides test problems for examining the convergence of embedded (Dirichlet) boundary conditions.

Note
Full details of the mathematics of this routine can be found in M.G. Reuter et al., Comput. Phys. Commun. 183, pp. 1-7 (2012). This code can generate the data in Figures 1, 2, and 4 of that article.

The auxiliary PDE being solved is

\‍[ \nabla^2 u - p(\varepsilon) S (u-g) = \varphi f, \‍]

where

  • $u$ is the solution function
  • $\varepsilon$ is the thickness of the boundary layer
  • $p(\varepsilon)$ is the penalty prefactor, $2/\varepsilon$ seems to work well.
  • $S$ is the surface function
  • $g$ is the Dirichlet condition to be enforced on the surface
  • $\varphi$ is the domain mask (1 inside, 0 outside, blurry on the border)
  • $f$ is the inhomogeneity.

The available test problems are

  1. A sphere of radius $R$ with $g = Y_0^0$, homogeneous (ConstantSphere)
  2. A sphere of radius $R$ with $g = Y_1^0$, homogeneous (CosineSphere)
  3. A sphere of radius $R$ with $g = Y_2^0$, homogeneous (Y20Sphere)
  4. A sphere of radius $R$ with $g = Y_0^0$, inhomogeneous $ f = 1 $ (InhomoConstantSphere)

This program allows testing of various parameters,

  1. The surface thickness
  2. The penalty prefactor
  3. The type of domain masking (LLRV or Gaussian)
  4. The curvature / shape of the domain

for their effect on convergence of the solution.

Function Documentation

◆ main()