SkillAgentSearch skills...

FURY

Fortran Units (environment) for Reliable phYsical math

Install / Use

/learn @szaghi/FURY
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<a name="top"></a>

FURY GitHub tag Join the chat at https://gitter.im/szaghi/FURY

dedicated to W. Van Snyder[<sup>rg</sup>]

License License License License

Status Build Status Build Status Coverage Status

FURY, Fortran Units (environment) for Reliable phYsical math

A KISS pure Fortran Library for improving reliability of physical math computations by taking into account units of measure:

  • FURY is a pure Fortran (KISS) library for improving reliability of physical math computations;
  • FURY is a pure Fortran (KISS) library for symbolic algebra on units symbols;
  • FURY is Fortran 2003+ standard compliant;
  • FURY is OOP designed;
  • FURY is a Free, Open Source Project.

A taste of FURY

use, intrinsic :: iso_fortran_env, only : real64
use fury
type(uom)   :: meter
type(uom)   :: second
type(qreal) :: distance_to_arrival
type(qreal) :: time_to_arrival
type(qreal) :: mean_velocity

meter = uom('m = meter = metre [length] {meter}')
second = uom('s = sec = second [time] {second}')

distance_to_arrival = qreal(100._real64, meter)
time_to_arrival = qreal(9.58_real64, second)

mean_velocity = distance_to_arrival / time_to_arrival

print "(A)", 'Bolt''s record speed: '//mean_velocity%stringify(with_dimensions=.true.)
! print
! Bolt's record speed: +0.104384133611691E+002 m.s-1 [length.time-1]

Issues

GitHub issues Ready in backlog In Progress Open bugs

Compiler Support

Compiler Compiler Compiler Compiler Compiler Compiler


What is FURY? | Main features | Copyrights | Download | Compilation | Documentation | References


What is FURY?

FURY is a poor-by-blow of reliability concept

  • reliability is expression of the consistency-of-a-set-of-measures
  • reliability measures successful probability, i.e. 1 - probability-of-failure
  • reliability (absence) played a role on the Mars Climate Orbiter disaster<sup>mco</sup>

ergo reliability counts

FURY project started to respond to two questions:

  1. is a units-consistency-check facility (UCCF) a desirable feature for a programming language?
    • is useful? or
    • is dangerous?
  2. how it can be implemented in Fortran?
    • is feasible?

These questions are generated by an inspiring Fortran Language Google Group discussion started by W. Van Snyder[<sup>rg</sup>]. They are really controversial: someone want UCCF to be a built-in feature in Fortran, others claim that such a feature is not useful at all or even dangerous just because it could add more space for errors than it could reduce (thus reducing the reliability).

Starting from an agnostic point of view, the FURY case study conveys us to think that a UCCF is a desirable feature for the next Fortran standards.

Moreover, the large experience borrowed from other programming languages, see references, proves that UCCF like features can be feasible in modern programming languages and they are of proved usefulness. As a consequence, FURY started to begin a fully featured, self-contained project that is presently usable for production-applications, even if the first comprehensive testing phase (of pre v1.0.0 bug-fix one) is still not completed.

FURY is the result of the tentative to respond the above questions:

FURY is a pure Fortran library providing a new set of types (the quantities) having a built-in units-consistency-check facility that is able to improve the reliability of physical computations. Moreover, FURY can perform symbolic math on units symbols.

FURY can do reliable math computations, preserving quantities dimensionality, checking consistency and propagating multiplicative scaling factors. For example, if you want to know how fast is Bolt you can do it with FURY, in a reliable way :smile:

use, intrinsic :: iso_fortran_env, only : real64
use fury
type(uom)   :: meter
type(uom)   :: second
type(qreal) :: distance_to_arrival
type(qreal) :: time_to_arrival
type(qreal) :: mean_velocity

meter = uom('m = meter = metre [length] {meter}')
second = uom('s = sec = second [time] {second}')

distance_to_arrival = qreal(100._real64, meter)
time_to_arrival = qreal(9.58_real64, second)

mean_velocity = distance_to_arrival / time_to_arrival

print "(A)", 'Bolt''s record speed: '//mean_velocity%stringify(with_dimensions=.true.)
! print
! Bolt's record speed: +0.104384133611691E+002 m.s-1 [length.time-1]

FURY is based on a powerful parser of unit-of-measure (UOM) definitions: once a (set of) UOM is defined its scaling factor, symbol and dimensions are consistently checked, preserved and propagated in all computations. For set of UOMs with defined conversion-formulas FURY can check the consistency of all conversions. Eventually, if a quantity has a defined UOM, any tentative to assign it to another quantity with a different UOM will raise an error as well as for all inconsistent computations.

Go to Top

Main features

FURY is inspired by the python great module pint, thus many features are taken from it. Here the main features are listed.

  • [x] User-friendly classes to add units of measure to numbers;
  • [x] errors trapping for invalid computations/assignments;
  • [x] unit parsing: prefixed forms of units are recognized without explicitly defining them, i.e. as the prefix kilo and the unit meter are defined, FURY understands kilometer;
  • [x] effortless conversion even for complex derived UOM;
  • [ ] standalone unit definitions: units definitions are loaded from simple and easy to edit text file;
  • [ ] advanced string parsing:
    • [x] symbolic algebra on units symbols;
    • [ ] Buckingham Pi Theorem;
  • [ ] replicate all the useful features of pint;
  • [x] Test Driven Developed (TDD);
  • [x] collaborative developed;
  • [x] well documented;
  • [x] free!

Any feature request is welcome.

Go to Top

Copyrights

FURY is an open source project, it is distributed under a multi-licensing system:

Anyone is interest to use, to develop or to contribute to FURY is welcome, feel free to select the license that best matches your soul!

More details can be found on wiki.

Go to Top

Download

FURY home is at https://github.com/szaghi/FURY. To download all the source files you can:

Go to Top

Compilation

FURY is a modern Fortran project thus a modern Fortran compiler is need to compile the project.

The library is modular, namely it exploits Fortran modules. As a consequence, there is compilation-cascade hierarchy to build the library. To correctly build the library the following approaches are supported

The FoBiS building support is the most complete, as it is the one used for the developing FURY.

Build by means of FoBiS

A fobos file is provided to build the library by means of the Fortran Building System FoBiS.

Build all tests

Type

FoBiS.py build

After (a successful) building a directory ./exe is created contai

View on GitHub
GitHub Stars34
CategoryDevelopment
Updated5mo ago
Forks4

Languages

Fortran

Security Score

77/100

Audited on Oct 16, 2025

No findings