Development of a mesh creation tool
It’s been a while since I started working on my project here in the IT4Innovations National Supercomputing Center (IT4I), so I figured this would be a good time to give you an update on what I’ve been doing.
My project is BEM for Wi-Fi, and is basically about the development of a workflow for parallel modelling of the Wi-Fi signal propagation in buildings. This means that my job is to create tools to ease the use of the software people at IT4I have developed for the simulation of Wi-Fi propagation. This software is named BEM4I and is capable of applying the Boundary Element Method (BEM) to solve engineering problems modeled by Laplace, Helmholtz, or Lamé equations, as it is the case for Wi-Fi propagation.
My mentors thought it would be beneficial to be able to create 3D triangular meshes of buildings by just specifying the 2D coordinates of its corners, the height of the walls and the size of the triangles, so that the time required to create meshes of buildings for BEM4I would be shortened considerably. This is the tool I have been working on since I started some weeks ago.
The part of the program that takes the 2D points, along with the height of the walls and the size of the triangles, and creates a 3D mesh took me only a handful of days to develop, but some of its functionalities presented a challenge, like creating the floor and ceiling sub-meshes and merging them with the sub-meshes that represent the walls of the building without repeating any points, whilst keeping the program efficient. In the end I was able to implement the creation of each wall and the ceiling in parallel by using OpenMP, and by cleverly organizing the points of the walls’ sub-meshes I avoided the need for making linear searches over the whole set of points in order to find duplicates.
Having a command-line utility that takes a file containing a set of coordinates, a wall height and a triangle size which outputs 3D meshes in a specific BEM4I-compatible format is better than nothing, but we wanted something even easier to use that would avoid the need of writing these files by hand. Also, the ability to output .vtu files which can be read by Paraview doesn’t hurt either. The decision taken was the development of a Graphical User Interface which lets you easily create and work with 2D buildings plans and makes use of the previously described library in order to export 3D meshes which can be used for visualisation and simulation purposes.
So here you have a demo of the almost finished prototype of the GUI application with a sample 2D plan loaded:
And here you have the generated 3D mesh by the program for the same sample, rendered in Paraview: