Commit 23a434a0 authored by François Trigaux's avatar François Trigaux
Browse files

📝 created a Readme file

parent 8a53aca9
# C-GEBT
A C wrapper for the fortran code "GEBT" by Wang and Yu.
## Theoretical references
To understand how GEBT work, this paper can be used as reference:
Wang, Qi, and Wenbin Yu. "Geometrically nonlinear analysis of composite beams using Wiener-Milenković parameters." Journal of Renewable and Sustainable Energy 9.3 (2017): 033306.
This code implements a C interface that allows to use the publicly available code GEBT from C.
The fortran code can be downloaded from https://cdmhub.org/resources/gebt but is also integrated to this git, with some modifications.
The C wrapper redefines all the IO functions to create a beam. The C code then calls the "analysis" function to use gebt.
Please note that this code is still in development, hence it is not usable "as such" for most cases. Instead, I recommand that you adapt the code to your needs, or use it as an example to develop C<->Fortran interfaces.
## Development notes
Those notes are used by the developpers of the library, and might therefore be hard to understand...
### Compatibility with PETSc
When CGEBT is used on a linux platform, there may be spurious interactions with the PETSc library. The reason for it is that CGEBT and PETSc both uses their own version of BLAS, which may not be compatible. Consequently, if both libraries are linked dynamically, some symbols could be overwritten. Consequently, CGEBT could use PETSc's version of BLAS, or conversely.
To avoid this problem, we need to tell to CGEBT which symbols it can export, and which symbols it can not. One way to do this with GCC is to use the linker option `(-Wl,)--version-script=...`. This allows to tell which symbols must be kept local, and which symbols can be exported.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment