Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
569603 | Advances in Engineering Software | 2014 | 12 Pages |
•We have developed a generic C++ library (called NiHu) for boundary elements.•NiHu generates optimised code for a large variety of BEM formulations.•Template metaprogramming is extensively exploited for adaptive and optimal code.•We demonstrate NiHu’s versatility, flexibility, and performance by examples.
This paper introduces NiHu, a C++ template library for boundary element methods (BEM). The library is capable of computing the coefficients of discretised boundary integral operators in a generic way with arbitrarily defined kernels and function spaces. NiHu’s template core defines the workflow of a general BEM algorithm independent of the specific application. The core provides expressive syntax, based on the operator notation of the BEM, reflecting the mathematics behind boundary elements in the C++ source code. The customisable Component library contains elements specific to particular applications such as different numerical integration techniques and regularisation methods. The library can be used for creating a standalone C++ application using external open source libraries, or compiling a Matlab toolbox through the MEX interface. By massively exploiting C++ template metaprogramming, NiHu generates optimised codes for specific applications, including heterogeneous problems. The paper introduces the main concepts of the novel development, demonstrates its versatility and flexibility and compares the implementation’s performance to that of other open source projects.