-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/MilanSkocic/codata
- Loading branch information
Showing
57 changed files
with
471 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Introduction | ||
|
||
`codata` is a C library providing the latest codata constants (2022) and | ||
older values (2018, 2014 and 2010). | ||
The raw codata are taken from http://physics.nist.gov/constants. | ||
The constants (values and uncertainties) are implemented as double precision reals. | ||
|
||
|
||
# Dependencies | ||
|
||
``` | ||
gcc>=10 | ||
``` | ||
|
||
|
||
# Installation | ||
|
||
A Makefile is provided for building the library. | ||
|
||
* On windows, [msys2](https://www.msys2.org) needs to be installed. | ||
Add the msys2 binary (usually C:\\msys64\\usr\\bin) to the path in order to be able to use make. | ||
* On Darwin, the [gcc](https://formulae.brew.sh/formula/gcc) toolchain needs to be installed. | ||
|
||
Build: the configuration file will set all the environment variables necessary for the compilation | ||
|
||
``` | ||
cd .. | ||
. configure.sh | ||
cd C | ||
make | ||
make install | ||
make uninstall | ||
``` | ||
|
||
|
||
# License | ||
|
||
MIT | ||
|
||
|
||
# Usage | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0 | ||
2.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef CODATA_CONSTANTS_H | ||
#define CODATA_CONSTANTS_H | ||
#if _MSC_VER | ||
#define ADD_IMPORT __declspec(dllimport) | ||
#else | ||
#define ADD_IMPORT | ||
#endif | ||
#include "codata_constants_type.h" | ||
#include "codata_constants_2010.h" | ||
#include "codata_constants_2014.h" | ||
#include "codata_constants_2018.h" | ||
#include "codata_constants_2022.h" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#include "codata_version.h" | ||
const char version[32] = "2.0.0"; | ||
const char version[32] = "2.0.1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Introduction | ||
|
||
`codata` is a Fortran library providing the latest codata constants (2022) and | ||
older values (2018, 2014 and 2010). | ||
The raw codata are taken from http://physics.nist.gov/constants. | ||
The constants (values and uncertainties) are implemented as double precision reals. | ||
|
||
The names are quite long and can be aliased with shorter names. | ||
|
||
To use `codata` within your [fpm](https://github.com/fortran-lang/fpm) project, | ||
add the following to your `fpm.toml` file: | ||
|
||
``` | ||
[dependencies] | ||
codata = { git="https://github.com/MilanSkocic/codata.git" } | ||
``` | ||
|
||
**Notes**: | ||
|
||
* The latest codata constants were integrated in the [stdlib](https://github.com/fortran-lang/stdlib/releases/tag/v0.7.0). The constants are implemented as derived type which carries the name, the value, the uncertainty and the unit. This library will be complementary to the constants defined in the stdlib by providing older values for the constants. | ||
|
||
* If you only need sources for the codata constants that you can integrate directly in your sources you may be interested by https://github.com/vmagnin/fundamental_constants. | ||
|
||
**Extra:** | ||
|
||
* Pure python code is provided in the `py` folder. See `py/README.md`. | ||
* Pure C code is provided in the `C` folder. See `C/README.md` | ||
|
||
|
||
# Dependencies | ||
|
||
``` | ||
gfortran>=10 | ||
fpm>=0.7 | ||
stdlib>=0.5 | ||
fypp>=3.0 | ||
``` | ||
|
||
|
||
# Installation | ||
|
||
A Makefile is provided, which uses [fpm](https://fpm.fortran-lang.org), for building the library. | ||
|
||
* On windows, [msys2](https://www.msys2.org) needs to be installed. | ||
Add the msys2 binary (usually C:\\msys64\\usr\\bin) to the path in order to be able to use make. | ||
* On Darwin, the [gcc](https://formulae.brew.sh/formula/gcc) toolchain needs to be installed. | ||
|
||
Build: the configuration file will set all the environment variables necessary for the compilation | ||
|
||
``` | ||
chmod +x configure.sh | ||
. ./configure.sh | ||
make | ||
make install | ||
make uninstall | ||
``` | ||
|
||
|
||
# License | ||
|
||
MIT | ||
|
||
|
||
# Usage | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0 | ||
2.0.1 |
Oops, something went wrong.