From 1afc31f6fbee110ee8ffa72e5618fb95dc4a15c5 Mon Sep 17 00:00:00 2001
From: Giovanni La Mura <giovanni.lamura@inaf.it>
Date: Wed, 17 Jan 2024 16:35:22 +0100
Subject: [PATCH] Add trapping test instructions

---
 build/README.md | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/build/README.md b/build/README.md
index 7e92ec88..f19cbc78 100644
--- a/build/README.md
+++ b/build/README.md
@@ -62,6 +62,16 @@ The default behaviour of `np_sphere` is to take the same input files as `edfb` a
 
 ### trapping
 
-The execution of trapping programs requires at least one of the previous programs to have produced a complete output set. The working assumption is that the `frfme` program is a pre-requisite to `lffft`.
+The execution of trapping programs requires at least one of the previous programs to have produced a complete output set. A light-weight trapping calculation has been configured with input and legacy output files stored in the `../../test_data/trapping/` folder. Since the FORTRAN code assumes the input and output to be defined within the program, it is not yet possible to run the *FORTRAN* version on this case, unless the source code is modified accordingly. Conversely, the *C++* version can be executed without the need to modfy and re-compile the code. The work-flow to test trapping is described below.
 
-*TODO:* Define a common format for binary I/O operations on the TTMS file.
+1. cd to the `build/sphere` folder.
+2. run `np_sphere` with arguments to take input from the trapping tast and write output in the trapping folder:
+
+   > ./np_sphere ../../test_data/trapping/DEDFB ../../test_data/trapping/DSPH ../trapping
+
+3. cd to the trapping folder.
+4. run `np_trapping`
+
+   > ./np_trapping ../../test_data/trapping/DFRFME ../../test_data/trapping/DLFFT .
+
+5. Check the consistency between `np_trapping` output files (`c_out66.txt` and `c_out67.txt`) and the legacy *FORTRAN* output for this case (the files named, respectively, `fort.66` and `fort.67` in the `test_data/trapping/` folder).
-- 
GitLab