You need to install the Eigen3 library, see Eigen's Documentation for help. We do not rely on any other external libraries, except for the standard template library. Thus, having installed Eigen, Bembel should run out of the box. If you want to use Bembel as part of your application, simply add the Bembel/
directory to your includes.
If you want to run the provided examples and tests, you can utilize the provided CMakeLists.txt
.
$ cmake -B build .
$ cmake --build build --config release
There also exist a debug
config.
The procedure is as follows. Let \(\Omega\in\mathbb{R}^3\) be a bounded domain with Lipschitz boundary \(\Gamma = \partial\Omega\). Bembel provides examples to the Laplace equation
\begin{eqnarray*} -\Delta u &=& 0,\quad \textrm{in}\,\Omega, \\ u &=& g,\quad\textrm{on}\,\Gamma. \end{eqnarray*}
The solution \(u\) can be computed by a single layer potential ansatz
\begin{eqnarray*} u(\mathbf{x}) &=& \tilde{\mathcal{V}}(\rho) = \int_\Gamma \frac{\rho(\mathbf{y})}{4\pi\|\mathbf{x} - \mathbf{y}\|}\,\mathrm{d}\sigma(\mathbf{y}),\quad\mathbf{x}\in\Omega. \end{eqnarray*}
Applying the appropriate trace operator yields the integral equation
\begin{eqnarray*} \mathcal{V}(\rho) &=& f(g) \end{eqnarray*}
where \(f\) is a linear form incorporating the boundary data \(g\). This equation is solved by a Galerkin method to compute the unknown density \(\rho\). See [3] for details.
The three components LinearOperator \(\mathcal{V}\), LinearForm \(f\) and Potential \(\tilde{\mathcal{V}}\) utilized in this procedure are classes in the Bembel library which follow the same design principle. Main idea is to define traits which fundamentally define the behavior of the class. Whilst the Base class provides a framework, the Operator classes provide contrete implementations of computing the integrals. Details on the three classes are given in Section Curiously Recurring Template Pattern.
If you now write a new problem class as an extension for Bembel, you only have to define the traits. In addition, you have to implement a concrete implementation for computing the integrals.