A quick look at bitpit
Nowadays, every scientific field needs software applications that uses computing capabilities to understand and solve complex problems. Even if the main objectives of all these applications may be very different from each other, there are some functionalities that are common across a wide variety of scientific programs. For example, applications that deal with finite volume or finite element methods always use some kind of spatial discretization of the physical domain and thus require code to handle computational meshes. Although essential, developing code to addresses these common tasks is time consuming and subtracts time to the development of the main functionalities of the application.
Each module of the bitpit library is developed to address a specific aspect of real-life application development. Modules can be used as building blocks to quickly develop a high-performance scientific application. The library consist of several modules ranging from low level functionalities like algebraic operators to high level capabilities like the evaluation of a distance functions on computational meshes.
bitpit is an open source C++ library developed by Optimad Engineering Srl and distributed under the GNU Lesser General Public License v3.
Mesh modules
All bitpit mesh modules are build upon the abstract mesh interface provided by the PatchKernel module. In the same module, basic objects (like vertices, cells and interfaces) necessary for implementing high level mesh capabilities are also defined. The common functionalities provided by PatchKernel are then extended and optimized by specialized mesh modules.
VolOctree
VolOctree is the module that handles octree (three-dimensional) and quadtree (two-dimensional) meshes. It supports non-conformal elements (i.e., hanging nodes), adaptive mesh refinement and dynamic load-balance among parallel partitions.
VolCartesian
VolCartesian allows to define simple serial Cartesian meshes.
VolUnstructured
Unstructured three-dimensional and two-dimensional meshes can be generated using the module VolUnstructured. Both standard elements (e.g., hexaedra, tetrahedra, pyramids, ...) and polyhedral elements are supported.
SurfUnstructured
SurfUnstructured is the container for surface segmentations and has methods to read, write and modify surface triangulations.
Levelset
The Levelset module provides methods for evaluating signed and unsigned distance functions from generic objects immersed in a computational mesh.
Radial Basis Functions manipulator (RBF)
The RBF module allows to efficiently handle Radial Basis Function interpolation and parametrization even with a large set of nodes.
Tree data structures
PABLO - PArallel Balanced Linear Octree
PABLO implements a parallel linear octree/quadtree capable of generating non-conformal grids with hanging nodes. It's the main building block of VolOctree patch. Adaptive mesh refinement, dynamic load-balance among partitions and 2:1 balancing between octants are some of the main features of PABLO. Communication of data defined on the octants is transparent to the user since the necessary low level MPI calls are completely handled by the module.
Computational Geometry
The CG module provides methods for computational geometry.
Linear Algebra
The LA module provides methods for handling small dense matrices stored as STL vectors or as STL arrays. It provides the following capabilities:
- creation of basic matrices, like identity and diagonal matrices;
- basic matrix operations like transpose and matrix multiplication;
- solution of linear systems.
Sort algorithms
The SA module defines some data structures useful for sorting purposes:
- a data structure for the insertion and the extraction of elements according to the last-in first-out accounting;
- a Kd-tree structure for sorting points of a d-dimensional Euclidean space;
- a binary tree which ensures that the root element always contains the smallest/largest value of the tree.
Input Output
The IO module provides methods for reading and writing common data files like DGF (Dune Grid Format), STL (STereo Litography) and VTK (Visualization ToolKit). It also provides methods for handling console output and log files.
Basic modules
Containers
This module provides containers not present in the STL C++ library and specifically designed for scientific applications:
- an associative container based on the STL vector which allows fast insertion and deletion of elements and guarantees that the elements are stored in a contiguous chunk of memory;
- a two-dimensional linearized vector that avoids the overhead of nesting to STL vectors;
- binary buffers optimized for parallel data exchange.
Communications
The communications module provides high level methods for handling MPI parallel communications.
Operators
The STL C++ library is extended to support basic operations on arrays and vectors. In particular the module Operators provides the following capabilities:
- basic algebraic operators (sum, difference, multiplication, division) for STL vector and STL array containers;
- basic mathematical functions (dot product, cross product, norm, absolute value, ...) for STL vector and STL array containers;
- stream operators and display functions for STL vector and STL array containers.