Skip to content

arieder/ngbem

Repository files navigation

This addition to ngsolve allows to couple it with the boundary element library BEM++ ( www.bempp.org ).

It is a pure python addon, which closely mimics the API of the FENics coupling provided by BEM++.

The coupling works for H1 spaces allowing for arbitrary order and for lowest order Nedelec spaces.


Examples of how to use the module can be found in example.py and simple_helmholtz_fem_bem_coupling.py.
An example for coupling for Maxwells equation can be found in maxwell_johnson_nedelec.py



The subdirectory legacy provides an older way of coupling NGSolve and BEM++ based on a C++
core. Unless the coupling using C++ is needed, the pure python version should be preferred.

Building the C++ part:
To build the module you can do the usual

mkdir build
cd build 
cmake ..
make

sequence of commands. This will generate the c++ library as libngbem.so and the python module can be found in
build/python_package. Make sure the latter  directoriy is in your PYTHONPATH when attempting to use it.

In order to direct cmake to the correct version of BEM++, you can use the -DBempp_DIR="dir" flag.

If you encounter errors regarding mpi,  make sure you have compiled NGsolve with MPI support enabled.
This is required as all recent versions of BEM++ link to MPI, whith may cause problems.


An example of how to solve the laplace equation on R^d using a Johnson-Nedelec type FEM-BEM coupling
can be found in example.py

About

Coupling NGsolve to BEM++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •