WIT Press


Object-oriented C++ Boundary Element Solution Of The Vector Laplace Equation

Price

Free (open access)

Paper DOI

10.2495/BE100261

Volume

50

Pages

9

Page Range

295 - 303

Published

2010

Size

227 kb

Author(s)

J. A. Ingber

Abstract

The Boundary Element Method (BEM) lends itself well to an object-oriented implementation. Well-defined class hierarchies can reduce the size of a problem solution while improving the readability and maintainability of the solution. The BEMuses geometric elements, defined as collections of nodes, to model a surface. Boundary conditions, specified by the problem, are defined at each node. This suggests an object oriented solution that defines a base Element class that can be extended to define triangular elements and quadrilateral elements, and a base Node class that can be extended to define more specialized nodes, such as edge and corner nodes. Historically, BEM codes have been written in FORTRAN 90 and object oriented codes have been deemed too slow for such computationally intensive solutions. In this paper I will discuss the development and optimization of an object-oriented BEM code, written in C++, for solving the vector Laplace equation for the magnetic vector potential in three dimensions. The solution to the 3-D magnetic field problem was first written and tested in FORTRAN 90. Due to the complexity and size of the problem solution, the translation to C++ went through several stages. At each stage the code was tested for accuracy and speed. After optimization of the C++ code, which included optimization of memory allocation, optimization of class structures, optimization of functions required to build the discretized linear system of equations and optimization of the solver, the C++ code executed faster than the FORTRAN 90 code for all test problems. Keywords: boundary element method, object-oriented, C++, vector Laplace equation, magnetic vector potential, class hierarchies, node, element, off functional collocation nodes.

Keywords

boundary element method, object-oriented, C++, vector Laplace equation, magnetic vector potential, class hierarchies, node, element, off functional collocation nodes