Salome HOME
Increment version: 9.2.2
[samples/sierpinsky.git] / README
diff --git a/README b/README
index 64c0a2d33674b11d4dfb8adb139813059ccee72a..c97d67eee8361c7848ff399d2a984b00d1ee940b 100755 (executable)
--- a/README
+++ b/README
-============================================================
-README for:
-* Randomizer module : version 0.2
-* Sierpinsky module : version 0.2
-============================================================
+******************************
+About SALOME SIERPINSKY sample
+******************************
 
-Contents of this file:
+SIERPINSKY is a simple example of SALOME module written in C++ and
+implementing services via CORBA interface. It works in conjunction
+with SALOME RANDOMIZER sample module; with latter it interfers by means
+of CORBA services (see below).
 
-1. Introduction.
-2. Prerequisites.
-3. Installation.
-4. Launching.
-5. Functionality.
-6. Testing.
+RANDOMIZER and SIERPINSKY modules implement simple interface to calculate
+Sierpinsky fields.
 
-=======================================================
-1. Introduction.
-=======================================================
+For more information please visit the SALOME platform web site:
 
-Randomizer and Sierpinsky SALOME-based modules implement simple interface to calculate Sierpinsky fields.
+  <http://www.salome-platform.org/>
 
-=======================================================
-2. Prerequisites.
-=======================================================
+=======
+License
+=======
 
-SALOME platform.
-All other products are those used by SALOME.
+SALOME platform is distributed under the GNU Lesser General Public License.
+See COPYING file for more details.
 
-=======================================================
-3. Installation.
-=======================================================
+Also, additional information can be found at SALOME platform web site:
 
-The compilation procedure is exactly the same as for other SALOME modules:
+  <http://www.salome-platform.org/downloads/license/>
 
-3.1. install SALOME with all prerequisite products;
-3.2. unpack Randomizer and Sierpinsky modules sources;
-3.3  set environment:
+============
+Installation
+============
 
-   source <salome_install_dir>/env_products.csh
+--------------
+Pre-requisites
+--------------
 
-   where <salome_install_dir> is a directory where SALOME is installed to.
+SALOME platform relies on a set of third-party softwares; some of them are needed
+at build time only, while other ones are needed in runtime also.
 
-3.4 create build directory for Randomizer module:
+For more information about the pre-requisites please visit SALOME platform web
+site:
 
-   mkdir RANDOMIZER_BUILD
-   cd RANDOMIZER_BUILD
+* Check Release Notes and Software Requirements of the latest SALOME release at
 
-3.5 make and install Randomizer module:
+  <http://www.salome-platform.org/downloads/current-version/>
 
-   <RANDOMIZER_src_dir>/build_configure
-   <RANDOMIZER_src_dir>/configure --prefix=${RANDOMIZER_install_dir}
-   make
-   make install
+* Pre-requisites page at SALOME web site:
 
-   where <RANDOMIZER_src_dir> is a Randomizer module sources directory and 
-   <RANDOMIZER_install_dir> is a directory where you want to install the Randomizer module.
+  <http://www.salome-platform.org/downloads/license/>
 
-3.6. Repeat 3.4, 3.5 steps for Sierpinsky module.
+Note: SALOME SIERPINSKY needs SALOME KERNEL, SALOME GUI, SALOME RANDOMIZER and,
+optionally, SALOME Mesh modules as pre-requisites.
 
-Launch 'configure --help' command to learn more about configuration options.
+------------------
+Basic Installation
+------------------
 
-=======================================================
-4. Launching.
-=======================================================
+The build procedure of the SALOME platform is implemented with CMake.
+In order to build the module you have to do the following actions:
 
-To launch SALOME application the following steps should be performed:
+1. Set up environment for pre-requisites (see "Pre-requisites" section above).
 
-4.1. set environment:
+2. Create a build directory:
 
-   source <salome_install_dir>/env_products.csh
+   % mkdir SIERPINSKY_BUILD
 
-   where <salome_install_dir> is a directory where SALOME is installed to.
+3. Configure the build procedure:
 
-4.3. add Randomizer and Sierpinsky modules environment:
+   % cd SIERPINSKY_BUILD
+   % cmake -DCMAKE_BUILD_TYPE=<mode> -DCMAKE_INSTALL_PREFIX=<installation_directory> <path_to_src_dir>
 
-   setenv RANDOMIZER_ROOT_DIR <RANDOMIZER_install_dir>
-   setenv SIERPINSKY_ROOT_DIR <SIERPINSKY_install_dir>
+   where
+   - <mode> is either Release or Debug (default: Release);
+   - <installation_directory> is a destination folder to install SALOME SIERPINSKY
+     module (default: /usr);
+   - <path_to_src_dir> is a path to the SALOME SIERPINSKY sources directory.
 
-   where <RANDOMIZER_install_dir> and <SIERPINSKY_install_dir> are the directories where
-   you have installed Randomizer and Sierpinsky modules correspondingly (see paragraph 3 above).
+   Note: by default (if CMAKE_INSTALL_PREFIX option is not given), SALOME SIERPINSKY
+   module will be configured for installation to the /usr directory that requires
+   root permissions to complete the installation.
 
-4.4. launch SALOME:
+4. Build and install:
 
-   ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=MED,VISU,RANDOMIZER,SIERPINSKY
-   
-=======================================================
-5. Functionality.
-=======================================================
+   % make
+   % make install
 
-5.1 Randomizer module
+   This will install SALOME SIERPINSKY module to the <installation_directory>
+   specified to cmake command on the previous step.
 
-Randomizer module is implemented as pure Python module. It does not have any GUI.
-The IDL interface includes two methods:
+-------------------
+Custom installation
+-------------------
+
+SALOME SIERPINSKY module supports a set of advanced configuration options;
+for more details learn CMakeLists.txt file in the root source directory.
+
+You can also use other options of cmake command to customize your installation.
+Learn more about available options by typing
+
+   % cmake --help
+
+=============
+Functionality
+=============
+
+* RANDOMIZER module
+
+SALOME RANDOMIZER module is implemented as pure Python module. It does not have
+any GUI. The IDL interface includes two methods:
 
 - void InitPoint( out double theX, out double theY );
 
@@ -100,24 +115,30 @@ The IDL interface includes two methods:
 
   to calculate next random iteration step: the integer value in range {1,3}.
 
-  The functionality of this module is used by Sierpinsky module to calculate Sierpinsky fields.
+The functionality of this module is used by SIERPINSKY module to calculate
+Sierpinsky fields.
 
-5.2. Sierpinsky module.
+* SIERPINSKY module
 
 The engine interface includes the following methods:
 
-- void Init( in double X1, in double Y1, in double X2, in double Y2, in double X3, in double Y3 );
+- void Init( in double X1, in double Y1, in double X2, in double Y2, in double X3,
+             in double Y3 );
 
-  to initialize the engine with three points which will be used as reference points in the calculations;
+  to initialize the engine with three points which will be used as reference points
+  in the calculations;
 
 - void Reset();
 
-  to initializes the engine with three default reference points: (0.5, 1), (0, 0), (1, 0);
+  to initializes the engine with three default reference points: (0.5, 1), (0, 0),
+  (1, 0);
 
-- void NextPoint( in double X, in double Y, in long iter, out double nextX, out double nextY );
+- void NextPoint( in double X, in double Y, in long iter, out double nextX,
+                  out double nextY );
 
-  calculates next iteration point, basing on the previous one and the iteration step given from 
-  Randomizer engine; this method is called subsequently in the loop to generate the points cloud;
+  calculates next iteration point, basing on the previous one and the iteration
+  step given from RANDOMIZER engine; this method is called subsequently in the loop
+  to generate the points cloud;
 
 - boolean ExportToJPEG( in string fileName, in long size );
 
@@ -127,70 +148,44 @@ The engine interface includes the following methods:
 
   exports the collected points data to the MED file.
 
-  The Init() and Reset() methods clear the collected points data and prepare engine to the new calculations.
-  The JPEG file can be viewed with help of any image viewer supporting JPEG format.
-  The MED files created by ExportToMED() method can be then imported in the Post-Pro (VISU) module for the
-  visualization (see below).
-
-=======================================================
-6. Testing.
-=======================================================
-
-6.1. GUI mode.
-
-Launch SALOME (see paragraph 4) and create a new study. To activate Sierpinsky module click the corresponding
-button on the 'Components' toolbar or select it in the components combo-box.
-
-The only action of the Sierpinsky module's GUI is available via 'Sierpinsky' main menu - it is a 'Run' command
-(there is also corresponding button on the toolbar).
-This command opens 'Run Sierpinsky Algo' dialog box which allows:
-
-- to define a start point for the calculations; if 'Random' checkbox is turned on, the start point will
-be generated automatically via Randomizer module functionality;
-
-- to define three reference points for the algo; if 'Random' checkbox is turned on, the reference points
-will be generated automatically via Randomizer module functionality; if 'Default' checkbox is turned on
-the default values will be used;
-
-- to enter the number of the points to be calculated;
-
-- to create JPEG image after calculcations finishing; 'Image size' parameter defines the size of the image side
-in pixels;
-
-- to export results to the MED file after calculcations finishing; 'Mesh size' parameter defines the mesh range.
-
-- to import generated MED file automatically to the Post-Pro (VISU) module for the further visualisation.
-
-After pressing the 'Start' button the calculation begins. It is possible to stop the calculation by pressing 
-'Stop' button. The progress bar in the lower part of the dialog box displays the calculation status.
+  The Init() and Reset() methods clear the collected points data and prepare engine
+  to the new calculations. The JPEG file can be viewed with help of any image viewer
+  supporting JPEG format. The MED files created by ExportToMED() method can be then
+  imported in the SALOME ParaVis module for the visualization (see below).
 
-6.2. Visualization.
+=====
+Usage
+=====
 
-Activate Post-Pro (VISU) module by clicking the corresponding button on the 'Components' toolbar.
-Select 'File - Import from file' menu command. Select the MED file, click 'Open' button. The MED file is imported
-to the study.
-Note: the MED file can be automatically imported to the study after finishing of the calculations
-(see previous paragraph).
+* Start SALOME:
 
-Select 'Post-Pro/<med_file>.med/Sierpinsky/Families/onNodes' object in the Object Browser, invoke context popup
-menu by mouse right-button click and select 'Display Only' command. The cloud of points is displayed in the viewer.
-Note: the visualizaion of mesh is only possible in the VTK viewer.
+   ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=SMESH,RANDOMIZER,SIERPINSKY
 
-6.3. Supervision.
+* Create new study: menu File - New
 
-Activate YACS module by clicking the corresponding button on the 'Components' toolbar.
-There are two sample YACS schemas which allow to test the Randomizer and Sierpinsky modules
-functionality. These files can be found in the <SIERPINSKY_install_dir>/share/salome/resources directory
-where <SIERPINSKY_install_dir> is the directory where you have installed Sierpinsky module (see paragraph 3).
+* Activate SIERPINSKY module: click the corresponding button on the 'Components' toolbar
+  or select it in the "Components" combo-box.
 
-Call 'YACS - Import Schema' menu command, then browse to the 'schema1.xml' or 'schema2.xml' file and click 'Open' button.
-To prepare the schema for execution, call 'YACS - Run Current Schema' menu command or just click the corresponding toolbar button.
-Then launch the ready schema by calling 'YACS - Start/Resume execution' menu command.
+  The only action of the SIERPINSKY module's GUI is available via 'Sierpinsky' main menu
+  - it is a 'Run' command (there is also corresponding button on the toolbar).
+  This command opens 'Run Sierpinsky Algo' dialog box which allows:
+  - Defining a start point for the calculations; if 'Random' checkbox is turned on, the
+    start point will be generated automatically via RANDOMIZER module functionality.
+  - Defining three reference points for the algo; if 'Random' checkbox is turned on, the
+    reference points will be generated automatically via RANDOMIZER module functionality;
+    if 'Default' checkbox is turned on the default values will be used.
+  - Entering the number of the points to be calculated.
+  - Creating JPEG image after the calculcations are finished; 'Image size' parameter defines
+    the size of the image side in pixels.
+  - Exporting results to the MED file after the calculcations are finished; 'Mesh size'
+    parameter defines the mesh range.
 
-The both schemas implement simple loop to perform calculations. The first schema uses default parameters and 
-exports the generated data to the JPEG file after calculation finishing.
+    After pressing the 'Start' button the calculation begins. It is possible to stop the
+    calculation by pressing 'Stop' button. The progress bar in the lower part of the dialog
+    box displays the calculation status.
 
-The second schema is some more complicated. It uses random start and reference points. After the calculations finishing
-it exports the data to the JPEG file and to the MED file, then automatically imports the MED file to the Post-Pro
-module and displays it in the new 3d viewer (the 'ImportToVisu' inline node performs the importation and visualizing).
+===============
+Troubleshooting
+===============
 
+Please, send a mail to webmaster.salome@opencascade.com.