From c6cccd87a4f5792a7d18a6e16fe478383b0f19f2 Mon Sep 17 00:00:00 2001 From: Karl-Michael Schindler <karl-michael.schindler@web.de> Date: Tue, 1 Oct 2024 18:26:08 +0200 Subject: [PATCH] Create DEVELOPER NOTES --- source/f90/DEVELOPER NOTES | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 source/f90/DEVELOPER NOTES diff --git a/source/f90/DEVELOPER NOTES b/source/f90/DEVELOPER NOTES new file mode 100644 index 0000000..ff53eaa --- /dev/null +++ b/source/f90/DEVELOPER NOTES @@ -0,0 +1,34 @@ +This is the new version of inputs and uses yaml input files. There are differences to the original eelsin/bosin input files. + +*** YAML input *** + +The input of yaml files uses the package fortran-yaml-c from: + +https://github.com/Nicholaswogan/fortran-yaml-c + +This is a fortran interface to the common C-library libyaml. + +The package needs libyaml, gfortran and cmake and is build from sources with these commands: + +mkdir build +cd build +cmake .. +cmake --build . + +Among others, it creates these files: + +fortran_yaml_c_interface.mod fortran_yaml_c_interface.f90.o fortran_yaml_c_types.mod fortran_yaml_c_types.f90.o fortran_yaml_c.mod fortran_yaml_c.f90.o libyaml_interface.c.o + +Search for and copy them to your preferred location. If you like, you can also remove the .f90 and .c from the names. + +Compile your source with a correspondingly adjusted command: + +gfortran libyaml_interface.o fortran_yaml_c_interface.o fortran_yaml_c_types.o fortran_yaml_c.o -lyaml -L/opt/local/lib -o test test.f90 + +Or do it in a Makefile. + +In the fortran file add + + use fortran_yaml_c + +For the details of usage, check out example.f90 and test_yaml.f90 in fortran-yaml-c/tests. \ No newline at end of file -- GitLab