BsaLib
, a Modern Fortran Library for the Bispectral Stochastic Analysis
of structures under non-Gaussian stationary random actions.
NOTE: currently, only wind action is included in the library, but other phenomena (waves for instance) can be easily integrated. See further developments.
BsaLib
uses CMake as a build system generator.
BsaLib
documentation
is generated using FORD.
BsaLib
is release under the GNU Lesser General Public License v3.0.
Visit the GPL official website for more information.
There are two parts in this repository:
BsaLib
, the core library;BSA
, the built-in executable program.
BsaLib
is the main core of this repository.
It consists of the main library and its API to which anyone could link to and interact with.
To use BsaLib
, simply import the main BsaLib
API module:
program test
use, non_intrinsic :: BsaLib
implicit none (type, external)
! your declarations here
! your logic here
! initialise BsaLib
call bsa_Init()
! set BsaLib internal state through its API procedures
! once done, run BsaLib
call bsa_Run( ... args ... )
! finally, release BsaLib memory
call bsa_Finalise()
end program
Being designed as a plug-in library, it needs the hosting program/library
to provide some data needed by BsaLib
in order to function properly.
For more details on the public API, visit the main documentation page.
As a side project package, a single-source executable file is provided under ./app/
.
It emulates what one would normally do when using BsaLib
as a plug-in for its own
library/program.
On the other hand, this program is thought and provided for all those interested in using
BsaLib
but not having any hosting library/program.
Nonetheless, even if this program is provided, the user would yet need to provide the data
for BsaLib
to function properly. If any of this data is not provided, the BsaLib
runtime check
would detect it and abort correct logic flow.
For that, the provided executable program relies on reading two input files:
BsaLib
related settings (formatted file, namedbsa.bsadata
). For details, read the dedicated section.- External data file (named
bsa.extdata
), in binary format, containing 8-byte floating point records (real64
of theiso_fortran_env
compiler intrinsic module). For full details, read the external data section.
BsaLib
strives to be as cross-platform as possible, so that any user can use it regardless of
the tooling availability.
Currently, the code has been compiled and tested under three different OS-compiler configurations:
Windows OS Build 10.0.19045
- Intel Fortran Compilers (ifort 2021.7.1-20221019_000000
,ifx 2022.2.1-20221101
)MacOS
- GFortran 13.2Linux Centos Fedora 8.7
- Intel Fortran Compilers (ifort 2021.10.0-20230609
,ifx 2023.2.0-20230721
)
For the Proper Orthogonal Decomposition (POD) problem, two approaches have been tested, for configurations 1 and 3:
- Linkage to proprietary
Intel MKL
(Math Kernel Libraries) - Linkage to LAPACK native implementation (NOTE: from direct source build in configuration 1)
Mathematical:
- Integrate models for other non-Gaussian actions (waves, for instance)
- Extend to non-diagonal modal Frequency Response Function (FRF) models
- Extend to frequency-dependent modal matrices (e.g. aeroelastic phenomena in Wind Engineering)
- Add library core to generate spectra (PSDs and Bispectra) from time series
Numerical:
- Adapt Classic approach to dump BFM info as in Mesher (easy)
- Improve internal policy mechanism and integration (WIP)
- Provide a general API for user defined models integration
- Complete full support for spatial (in-plane) symmetries of a real-valued bispectrum
- Compute nodal correlation internally (don't require it as user data)
- Add support for Mesher zones' interest modes
- Add a local caching system
- Add
MPI
support (for runningBsaLib
on multi-node clusters) - Improve and extend GPU offloading capabilities
- Provide automation service to convert user-level model function into GPU-kernel code
- Enhance the mechanism that lets the user provide its own desired exporting function,
so that
BsaLib
is not tight to any specific exporting format. - Integrate a built-in bispectrum post-processing Visualiser (using Vulkan, for optimal performances)
There is one main known issue in the current version.
Using
OpenMP
parallelisation in the second Post-meshing phase, execution time is higher compared to serialised version. This is due to the necessary synchronisation between threads when accessing shared file I/O when reading each zone's dumped data, causing thecritical
section to be the main bottleneck in this part. For a proper use ofOpenMP
parallelisation in Post-meshing phase, a fundamental rethinking of the algorithmic structure needs to be done. A first, temporary, possible solution, could be the usage of thread-level private I/O with dedicated units, avoiding the need to synchronise when reading back information in post-meshing phase. However, this might soon become inelegant solution when the number of threads would start increasing considerably. For this, as a temporary solution, a conditional compilation flag (BSA_USE_POST_MESH_OMP
) can be used to control effective use ofOpenMP
parallelisation in Post-meshing phase, disabled by default.