| sphin(3) | Library Functions Manual | sphin(3) |
NAME
sphin - sphin library definitions
SYNOPSIS
#include <sphin.h>
DESCRIPTION
The sphin C library provides functions to parse, load and expose data of a photoreactive system as described in the star-phor-input(5) file format.
It provides a unified data representation that abstract original format used to save data on disk. For example, geometries are all stored in a consistent structure - primarly using one-dimensional arrays - regardless of their original file format.
Once loaded, the data is intended to be independent of any specific numerical method. In other words, the library is designed to be independent of a solver but nevertheless aims to provide all the data (geometric and physical) necessary for a numerical simulation. The data is thus said to be unstructured with regard to a resolution method. A deterministic solver would therefore be responsible for meshing the integration domains, while a statistical solver would have to build structures capable of accelerating random access to the system data.
The library's dynamic memory management is based on reference counting. Each API object allocated by the library has a reference counter, initialized when it is created: the caller is therefore the owner. The caller can then obtain other references or release them as needed. However, other dynamically allocated API objects can also obtain additional references to the API objects on which they depend and which they need throughout their lifetime. An object is effectively released once all its references have been released, either by the caller or by the other objects that depend on it. Thus, unlike a manual allocation/deallocation policy, the caller can release the references it holds without having to worry about the order of release; the actual deallocation of an object only occurs once all references have been released.
There is currently no manual page documenting the API of the sphin library. Users are therefore invited to consult its header /usr/local/include/sphin.h as the primary reference documentation and index of the functions it offers.
SEE ALSO
star-phor-input(5), sphin-lint(1)
HISTORY
The sphin library has been developed thanks to the funding of the ECOCHEM project (ProjetIA-22-PESP-0006) belonging to the PEPR SPLEEN.
| 2026-04-15 | UNIX |