From d15dbbf64baa608bfd479d3494aa0fdaaeeea995 Mon Sep 17 00:00:00 2001
From: Noels Ludovic <l.noels@uliege.be>
Date: Wed, 6 Dec 2023 21:08:03 +0000
Subject: [PATCH] Update README.md

---
 SFEM/README.md | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/SFEM/README.md b/SFEM/README.md
index e9dc3a8..2c1aef3 100644
--- a/SFEM/README.md
+++ b/SFEM/README.md
@@ -77,7 +77,7 @@ Instructions for Debian/Ubuntu based workstations are as follows.
 * [vizualizeRF.py](./generateRF/vizualizeRF.py): file used to generate a gmsh (www.gmsh.info) compatible file to vizualize the random fields
   * Reads the ```N``` random fields of type ```'RandField_And_GP_X.csv'``` found in ```mechDir+'/randomFields/'```, where ```mechDir``` is the working directory. Examples of generated 2-dimension RFs can be found in [rnnRF/randomFields/](./rnnRF/randomFields/).
   * Uses the mesh structure of the considered application. The script tries to read stress file in ```mechDir+'/GPData'```, where ```mechDir``` is the working directory, describing the elements structure. One example of stress file can be found in [rnnRF/GPData/stress_step1.msh](./rnnRF/GPData/stress_step1.msh).
-  * The random field number ```X``` is saved in format compatible with Gmhs in the file ```mechDir+'/randomFields/RandField_X.msh'```, where ```mechDir``` is the working directory. One example of generated 2-dimension RF can be found in [rnnRF/randomFields/RandField_0.msh](./rnnRF/randomFields/RandField_0.msh). 
+  * The random field number ```X``` is saved in format compatible with gmsh (www.gmsh.info) in the file ```mechDir+'/randomFields/RandField_X.msh'```, where ```mechDir``` is the working directory. One example of generated 2-dimension RF can be found in [rnnRF/randomFields/RandField_0.msh](./rnnRF/randomFields/RandField_0.msh). 
 * [utilRF.py](./generateRF/plotRF.py): set of functions used by the RF generator and vizualization files.
 
 ### rnnRF
@@ -132,6 +132,32 @@ After execution the ouput files are store in ```'rnnRF/randomFields'```:
 * The random field number ```X``` is saved in the file ```'rnnRF/randomFields/RandField_X.csv'```. The number of columns is the dimension (2) of the random vector and the number of lines is the number of spatial points. One example of generated 2-dimension RF can be found in [rnnRF/randomFields/RandField_0.csv](./rnnRF/randomFields/RandField_0.csv). 
 * The random field number ```X``` along with the spatial points coordinates is saved in the file ```'rnnRF/randomFields/RandField_And_GP_X.csv'```. The number of columns is the dimension (2) of the random vector plus the 3 spatial coordinates and the number of lines is the number of spatial points. One example of generated 2-dimension RF can be found in [rnnRF/randomFields/RandField_And_GP_0.csv](./rnnRF/randomFields/RandField_And_GP_0.csv). 
 
+### Vizualize the random vector distribution
+
+From the [generateRF](./generateRF/) directory, select ```testNb=1``` for ```'rnnRF'``` in the file [plotRF.py](./generateRF/plotRF.py) and then run
+
+```bash
+python3 plotRF.py 
+```
+
+### Vizualize the random field distribution
+
+From the [generateRF](./generateRF/) directory, select ```testNb=1``` for ```'rnnRF'``` in the file [vizualizeRF.py](./generateRF/vizualizeRF.py) and then run
+
+```bash
+python3 vizualizeRF.py 
+```
+
+After execution the ouput files are store in ```'rnnRF/randomFields'```:
+* The random field number ```X``` is saved in format compatible with gmsh (www.gmsh.info) in the file ```'rnnRF/randomFields/RandField_X.msh'```. One example of generated 2-dimension RF can be found in [rnnRF/randomFields/RandField_0.msh](./rnnRF/randomFields/RandField_0.msh). 
+
+Then, from [rnnRF](./rnnRF/) directory run
+```bash
+gmsh rubics.msh randomFields/RandField_*.msh 
+```
+to vizualize the RF discretization compatible with the geometry.
+
+
 ## Disclaimer
 
 Code related to MOAMMM project
-- 
GitLab